@pie-element/extended-text-entry 15.1.2-next.10 → 15.1.2-next.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +172 -172
- package/dist/browser/delivery/index.js +72 -18
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-BefNeqwZ.js → dist-CnfFKHzv.js} +6515 -6501
- package/dist/browser/{dist-BefNeqwZ.js.map → dist-CnfFKHzv.js.map} +1 -1
- package/dist/browser/{main-1U6_tsVt.js → main-C6TaNfom.js} +180 -182
- package/dist/browser/{main-1U6_tsVt.js.map → main-C6TaNfom.js.map} +1 -1
- package/dist/browser/print/index.js +5 -5
- package/dist/delivery/index.js +17 -13
- package/dist/delivery/main.d.ts +0 -2
- package/dist/delivery/main.js +57 -60
- package/dist/index.iife.js +34 -34
- package/dist/print/index.js +13 -13
- package/module/print.js +465 -456
- package/module/print.js.map +1 -1
- package/package.json +5 -12
package/dist/index.iife.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
this.ExtendedTextEntryElement=(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var te={current:null},N={transition:null},ne={ReactCurrentDispatcher:te,ReactCurrentBatchConfig:N,ReactCurrentOwner:C};function re(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,e.act=re,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}},e.unstable_act=re,e.useCallback=function(e,t){return te.current.useCallback(e,t)},e.useContext=function(e){return te.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return te.current.useDeferredValue(e)},e.useEffect=function(e,t){return te.current.useEffect(e,t)},e.useId=function(){return te.current.useId()},e.useImperativeHandle=function(e,t,n){return te.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return te.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return te.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return te.current.useMemo(e,t)},e.useReducer=function(e,t,n){return te.current.useReducer(e,t,n)},e.useRef=function(e){return te.current.useRef(e)},e.useState=function(e){return te.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return te.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return te.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=()=>null,p=new Proxy(f,{get:()=>f}),m=Object.prototype;function h(e){return typeof e==`object`&&!!e}function g(e){return Array.isArray(e)?e:typeof e==`number`?[e]:e.replace(/\[(\d+)\]/g,`.$1`).split(`.`).filter(Boolean)}function _(e){return(e??[]).filter(Boolean)}function v(e,t=0,n={}){let r,i,a,o,s,c=n.leading===!0,l=n.trailing!==!1,u=()=>{if(!a)return s;let t=a,n=o;return a=void 0,o=void 0,s=e.apply(n,t),s},d=()=>{r&&clearTimeout(r),i&&clearTimeout(i),r=void 0,i=void 0,a=void 0,o=void 0},f=function(...e){let d=c&&!r;return a=e,o=this,d&&u(),r&&clearTimeout(r),r=setTimeout(()=>{r=void 0,i&&=(clearTimeout(i),void 0),l?u():(a=void 0,o=void 0)},t),n.maxWait!==void 0&&!i&&(i=setTimeout(()=>{r&&clearTimeout(r),r=void 0,i=void 0,l||!c?u():(a=void 0,o=void 0)},n.maxWait)),s};return f.cancel=d,f.flush=()=>(r&&=(clearTimeout(r),void 0),i&&=(clearTimeout(i),void 0),u()),f}function y(e){let t=[];for(let n of e??[])Array.isArray(n)?t.push(...n):t.push(n);return t}function b(e,t,n){if(!Array.isArray(t)&&e!=null&&Object.prototype.hasOwnProperty.call(Object(e),t)){let r=e[t];return r===void 0?n:r}let r=e;for(let e of g(t)){if(r==null)return n;r=r[e]}return r===void 0?n:r}function x(e){return e==null?!0:typeof e==`string`||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:!h(e)||Object.keys(e).length===0}function S(e,t,n){let r=n?.(e,t);if(r!==void 0)return!!r;if(Object.is(e,t))return!0;if(!h(e)||!h(t))return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime();if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,r)=>S(e,t[r],n));let i=Object.keys(e),a=Object.keys(t);return i.length===a.length&&i.every(r=>m.hasOwnProperty.call(t,r)&&S(e[r],t[r],n))}function C(e,t){return S(e,t)}function w(e,t){let n={...e??{}};for(let e of Array.isArray(t)?t:[t])delete n[e];return n}function T(e,t){let n=t??(e=>e);return Array.from({length:Math.max(0,e)},(e,t)=>n(t))}function E(...e){let t=Math.max(0,...e.map(e=>e.length));return Array.from({length:t},(t,n)=>e.map(e=>e[n]))}function D(){return()=>{}}function O(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=O(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function k(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=O(e))&&(r&&(r+=` `),r+=t);return r}function A(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function j(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function M(e){if(typeof e!=`string`)throw Error(j(7));return e.charAt(0).toUpperCase()+e.slice(1)}var ee=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),te=o(((e,t)=>{t.exports=ee()})),N=l(d()),ne=te();function re(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function ie(e){if(N.isValidElement(e)||(0,ne.isValidElementType)(e)||!re(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=ie(e[n])}),t}function ae(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return re(e)&&re(t)&&Object.keys(t).forEach(i=>{N.isValidElement(t[i])||(0,ne.isValidElementType)(t[i])?r[i]=t[i]:re(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&re(e[i])?r[i]=ae(e[i],t[i],n):n.clone?r[i]=re(t[i])?ie(t[i]):t[i]:r[i]=t[i]}),r}function oe(e,t){return t?ae(e,t,{clone:!1}):e}function se(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function ce(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function le(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function ue(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var de={xs:0,sm:600,md:900,lg:1200,xl:1536},fe={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${de[e]}px)`},pe={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:de[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function me(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||fe;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||fe;return Object.keys(t).reduce((i,a)=>{if(ce(e.keys,a)){let e=le(r.containerQueries?r:pe,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||de).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function he(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function ge(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function _e(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function ve(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:_e(e,n)||r,t&&(i=t(i,r,e)),i}function ye(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=_e(o,r)||{};return me(e,a,e=>{let r=ve(s,i,e);return e===r&&typeof e==`string`&&(r=ve(s,i,`${t}${e==="default"?``:M(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function be(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var xe={m:`margin`,p:`padding`},Se={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},Ce={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},we=be(e=>{if(e.length>2)if(Ce[e])e=Ce[e];else return[e];let[t,n]=e.split(``),r=xe[t],i=Se[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),Te=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],Ee=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],De=[...Te,...Ee];function Oe(e,t,n,r){let i=_e(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function ke(e){return Oe(e,`spacing`,8,`spacing`)}function Ae(e,t){return typeof t==`string`||t==null?t:e(t)}function je(e,t){return n=>e.reduce((e,r)=>(e[r]=Ae(t,n),e),{})}function Me(e,t,n,r){if(!t.includes(n))return null;let i=je(we(n),r),a=e[n];return me(e,a,i)}function Ne(e,t){let n=ke(e.theme);return Object.keys(e).map(r=>Me(e,t,r,n)).reduce(oe,{})}function Pe(e){return Ne(e,Te)}Pe.propTypes={},Pe.filterProps=Te;function Fe(e){return Ne(e,Ee)}Fe.propTypes={},Fe.filterProps=Ee;function Ie(e){return Ne(e,De)}Ie.propTypes={},Ie.filterProps=De;function Le(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?oe(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Re(e){return typeof e==`number`?`${e}px solid`:e}function ze(e,t){return ye({prop:e,themeKey:`borders`,transform:t})}var Be=ze(`border`,Re),Ve=ze(`borderTop`,Re),He=ze(`borderRight`,Re),Ue=ze(`borderBottom`,Re),We=ze(`borderLeft`,Re),Ge=ze(`borderColor`),Ke=ze(`borderTopColor`),qe=ze(`borderRightColor`),Je=ze(`borderBottomColor`),Ye=ze(`borderLeftColor`),Xe=ze(`outline`,Re),Ze=ze(`outlineColor`),Qe=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=Oe(e.theme,`shape.borderRadius`,4,`borderRadius`);return me(e,e.borderRadius,e=>({borderRadius:Ae(t,e)}))}return null};Qe.propTypes={},Qe.filterProps=[`borderRadius`],Le(Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Qe,Xe,Ze);var $e=e=>{if(e.gap!==void 0&&e.gap!==null){let t=Oe(e.theme,`spacing`,8,`gap`);return me(e,e.gap,e=>({gap:Ae(t,e)}))}return null};$e.propTypes={},$e.filterProps=[`gap`];var et=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=Oe(e.theme,`spacing`,8,`columnGap`);return me(e,e.columnGap,e=>({columnGap:Ae(t,e)}))}return null};et.propTypes={},et.filterProps=[`columnGap`];var tt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=Oe(e.theme,`spacing`,8,`rowGap`);return me(e,e.rowGap,e=>({rowGap:Ae(t,e)}))}return null};tt.propTypes={},tt.filterProps=[`rowGap`],Le($e,et,tt,ye({prop:`gridColumn`}),ye({prop:`gridRow`}),ye({prop:`gridAutoFlow`}),ye({prop:`gridAutoColumns`}),ye({prop:`gridAutoRows`}),ye({prop:`gridTemplateColumns`}),ye({prop:`gridTemplateRows`}),ye({prop:`gridTemplateAreas`}),ye({prop:`gridArea`}));function nt(e,t){return t===`grey`?t:e}Le(ye({prop:`color`,themeKey:`palette`,transform:nt}),ye({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:nt}),ye({prop:`backgroundColor`,themeKey:`palette`,transform:nt}));function rt(e){return e<=1&&e!==0?`${e*100}%`:e}var it=ye({prop:`width`,transform:rt}),at=e=>e.maxWidth!==void 0&&e.maxWidth!==null?me(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||de[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:rt(t)}}):null;at.filterProps=[`maxWidth`];var ot=ye({prop:`minWidth`,transform:rt}),st=ye({prop:`height`,transform:rt}),ct=ye({prop:`maxHeight`,transform:rt}),lt=ye({prop:`minHeight`,transform:rt});ye({prop:`size`,cssProperty:`width`,transform:rt}),ye({prop:`size`,cssProperty:`height`,transform:rt}),Le(it,at,ot,st,ct,lt,ye({prop:`boxSizing`}));var ut={border:{themeKey:`borders`,transform:Re},borderTop:{themeKey:`borders`,transform:Re},borderRight:{themeKey:`borders`,transform:Re},borderBottom:{themeKey:`borders`,transform:Re},borderLeft:{themeKey:`borders`,transform:Re},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:Re},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Qe},color:{themeKey:`palette`,transform:nt},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:nt},backgroundColor:{themeKey:`palette`,transform:nt},p:{style:Fe},pt:{style:Fe},pr:{style:Fe},pb:{style:Fe},pl:{style:Fe},px:{style:Fe},py:{style:Fe},padding:{style:Fe},paddingTop:{style:Fe},paddingRight:{style:Fe},paddingBottom:{style:Fe},paddingLeft:{style:Fe},paddingX:{style:Fe},paddingY:{style:Fe},paddingInline:{style:Fe},paddingInlineStart:{style:Fe},paddingInlineEnd:{style:Fe},paddingBlock:{style:Fe},paddingBlockStart:{style:Fe},paddingBlockEnd:{style:Fe},m:{style:Pe},mt:{style:Pe},mr:{style:Pe},mb:{style:Pe},ml:{style:Pe},mx:{style:Pe},my:{style:Pe},margin:{style:Pe},marginTop:{style:Pe},marginRight:{style:Pe},marginBottom:{style:Pe},marginLeft:{style:Pe},marginX:{style:Pe},marginY:{style:Pe},marginInline:{style:Pe},marginInlineStart:{style:Pe},marginInlineEnd:{style:Pe},marginBlock:{style:Pe},marginBlockStart:{style:Pe},marginBlockEnd:{style:Pe},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:$e},rowGap:{style:tt},columnGap:{style:et},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:rt},maxWidth:{style:at},minWidth:{transform:rt},height:{transform:rt},maxHeight:{transform:rt},minHeight:{transform:rt},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function dt(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function ft(e,t){return typeof e==`function`?e(t):e}function pt(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=_e(n,s)||{};return l?l(i):me(i,t,t=>{let n=ve(u,c,t);return t===n&&typeof t==`string`&&(n=ve(u,c,`${e}${t==="default"?``:M(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??ut;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=he(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=ft(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=oe(l,e(n,a,i,o));else{let e=me({theme:i},a,e=>({[n]:e}));dt(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=oe(l,e)}else l=oe(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":se(i,ge(c,l))}:se(i,ge(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var mt=pt();mt.filterProps=[`sx`];var ht=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??ut;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function gt(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=ht(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return re(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}function _t(){return _t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_t.apply(null,arguments)}function vt(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function yt(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var bt=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(yt(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=vt(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),xt=`-ms-`,St=`-moz-`,Ct=`-webkit-`,wt=`comm`,Tt=`rule`,Et=`decl`,Dt=`@import`,Ot=`@keyframes`,kt=`@layer`,At=Math.abs,jt=String.fromCharCode,Mt=Object.assign;function Nt(e,t){return Rt(e,0)^45?(((t<<2^Rt(e,0))<<2^Rt(e,1))<<2^Rt(e,2))<<2^Rt(e,3):0}function Pt(e){return e.trim()}function Ft(e,t){return(e=t.exec(e))?e[0]:e}function It(e,t,n){return e.replace(t,n)}function Lt(e,t){return e.indexOf(t)}function Rt(e,t){return e.charCodeAt(t)|0}function zt(e,t,n){return e.slice(t,n)}function Bt(e){return e.length}function Vt(e){return e.length}function Ht(e,t){return t.push(e),e}function Ut(e,t){return e.map(t).join(``)}var Wt=1,Gt=1,Kt=0,qt=0,Jt=0,Yt=``;function Xt(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Wt,column:Gt,length:o,return:``}}function Zt(e,t){return Mt(Xt(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Qt(){return Jt}function $t(){return Jt=qt>0?Rt(Yt,--qt):0,Gt--,Jt===10&&(Gt=1,Wt--),Jt}function en(){return Jt=qt<Kt?Rt(Yt,qt++):0,Gt++,Jt===10&&(Gt=1,Wt++),Jt}function tn(){return Rt(Yt,qt)}function nn(){return qt}function rn(e,t){return zt(Yt,e,t)}function an(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function on(e){return Wt=Gt=1,Kt=Bt(Yt=e),qt=0,[]}function sn(e){return Yt=``,e}function cn(e){return Pt(rn(qt-1,dn(e===91?e+2:e===40?e+1:e)))}function ln(e){for(;(Jt=tn())&&Jt<33;)en();return an(e)>2||an(Jt)>3?``:` `}function un(e,t){for(;--t&&en()&&!(Jt<48||Jt>102||Jt>57&&Jt<65||Jt>70&&Jt<97););return rn(e,nn()+(t<6&&tn()==32&&en()==32))}function dn(e){for(;en();)switch(Jt){case e:return qt;case 34:case 39:e!==34&&e!==39&&dn(Jt);break;case 40:e===41&&dn(e);break;case 92:en();break}return qt}function fn(e,t){for(;en()&&e+Jt!==57&&!(e+Jt===84&&tn()===47););return`/*`+rn(t,qt-1)+`*`+jt(e===47?e:en())}function pn(e){for(;!an(tn());)en();return rn(e,qt)}function mn(e){return sn(hn(``,null,null,null,[``],e=on(e),0,[0],e))}function hn(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=en()){case 40:if(m!=108&&Rt(C,d-1)==58){Lt(C+=It(cn(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=cn(v);break;case 9:case 10:case 13:case 32:C+=ln(m);break;case 92:C+=un(nn()-1,7);continue;case 47:switch(tn()){case 42:case 47:Ht(_n(fn(en(),nn()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=Bt(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=It(C,/\f/g,``)),p>0&&Bt(C)-d&&Ht(p>32?vn(C+`;`,r,n,d-1):vn(It(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(Ht(S=gn(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)hn(C,t,S,S,b,a,d,s,x);else switch(f===99&&Rt(C,3)===110?100:f){case 100:case 108:case 109:case 115:hn(e,S,S,r&&Ht(gn(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:hn(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Bt(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&$t()==125)continue}switch(C+=jt(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Bt(C)-1)*_,_=1;break;case 64:tn()===45&&(C+=cn(en())),f=tn(),u=d=Bt(y=C+=pn(nn())),v++;break;case 45:m===45&&Bt(C)==2&&(h=0)}}return a}function gn(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=Vt(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=zt(e,d+1,d=At(h=o[m])),y=e;_<p;++_)(y=Pt(h>0?f[_]+` `+v:It(v,/&\f/g,f[_])))&&(c[g++]=y);return Xt(e,t,n,i===0?Tt:s,c,l,u)}function _n(e,t,n){return Xt(e,t,n,wt,jt(Qt()),zt(e,2,-2),0)}function vn(e,t,n,r){return Xt(e,t,n,Et,zt(e,0,r),zt(e,r+1,-1),r)}function yn(e,t){for(var n=``,r=Vt(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function bn(e,t,n,r){switch(e.type){case kt:if(e.children.length)break;case Dt:case Et:return e.return=e.return||e.value;case wt:return``;case Ot:return e.return=e.value+`{`+yn(e.children,r)+`}`;case Tt:e.value=e.props.join(`,`)}return Bt(n=yn(e.children,r))?e.return=e.value+`{`+n+`}`:``}function xn(e){var t=Vt(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Sn(e){return function(t){t.root||(t=t.return)&&e(t)}}function Cn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var wn=function(e,t,n){for(var r=0,i=0;r=i,i=tn(),r===38&&i===12&&(t[n]=1),!an(i);)en();return rn(e,qt)},Tn=function(e,t){var n=-1,r=44;do switch(an(r)){case 0:r===38&&tn()===12&&(t[n]=1),e[n]+=wn(qt-1,t,n);break;case 2:e[n]+=cn(r);break;case 4:if(r===44){e[++n]=tn()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=jt(r)}while(r=en());return e},En=function(e,t){return sn(Tn(on(e),t))},Dn=new WeakMap,On=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!Dn.get(n))&&!r){Dn.set(e,!0);for(var i=[],a=En(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},kn=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function An(e,t){switch(Nt(e,t)){case 5103:return Ct+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ct+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ct+e+St+e+xt+e+e;case 6828:case 4268:return Ct+e+xt+e+e;case 6165:return Ct+e+xt+`flex-`+e+e;case 5187:return Ct+e+It(e,/(\w+).+(:[^]+)/,Ct+`box-$1$2`+xt+`flex-$1$2`)+e;case 5443:return Ct+e+xt+`flex-item-`+It(e,/flex-|-self/,``)+e;case 4675:return Ct+e+xt+`flex-line-pack`+It(e,/align-content|flex-|-self/,``)+e;case 5548:return Ct+e+xt+It(e,`shrink`,`negative`)+e;case 5292:return Ct+e+xt+It(e,`basis`,`preferred-size`)+e;case 6060:return Ct+`box-`+It(e,`-grow`,``)+Ct+e+xt+It(e,`grow`,`positive`)+e;case 4554:return Ct+It(e,/([^-])(transform)/g,`$1`+Ct+`$2`)+e;case 6187:return It(It(It(e,/(zoom-|grab)/,Ct+`$1`),/(image-set)/,Ct+`$1`),e,``)+e;case 5495:case 3959:return It(e,/(image-set\([^]*)/,Ct+"$1$`$1");case 4968:return It(It(e,/(.+:)(flex-)?(.*)/,Ct+`box-pack:$3`+xt+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+Ct+e+e;case 4095:case 3583:case 4068:case 2532:return It(e,/(.+)-inline(.+)/,Ct+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Bt(e)-1-t>6)switch(Rt(e,t+1)){case 109:if(Rt(e,t+4)!==45)break;case 102:return It(e,/(.+:)(.+)-([^]+)/,`$1`+Ct+`$2-$3$1`+St+(Rt(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Lt(e,`stretch`)?An(It(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(Rt(e,t+1)!==115)break;case 6444:switch(Rt(e,Bt(e)-3-(~Lt(e,`!important`)&&10))){case 107:return It(e,`:`,`:`+Ct)+e;case 101:return It(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+Ct+(Rt(e,14)===45?`inline-`:``)+`box$3$1`+Ct+`$2$3$1`+xt+`$2box$3`)+e}break;case 5936:switch(Rt(e,t+11)){case 114:return Ct+e+xt+It(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return Ct+e+xt+It(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return Ct+e+xt+It(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return Ct+e+xt+e+e}return e}var jn=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Et:e.return=An(e.value,e.length);break;case Ot:return yn([Zt(e,{value:It(e.value,`@`,`@`+Ct)})],r);case Tt:if(e.length)return Ut(e.props,function(t){switch(Ft(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return yn([Zt(e,{props:[It(t,/:(read-\w+)/,`:`+St+`$1`)]})],r);case`::placeholder`:return yn([Zt(e,{props:[It(t,/:(plac\w+)/,`:`+Ct+`input-$1`)]}),Zt(e,{props:[It(t,/:(plac\w+)/,`:`+St+`$1`)]}),Zt(e,{props:[It(t,/:(plac\w+)/,xt+`input-$1`)]})],r)}return``})}}],Mn=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||jn,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[On,kn],l,u=[bn,Sn(function(e){l.insert(e)})],d=xn(c.concat(r,u)),f=function(e){return yn(mn(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new bt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},Nn=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Pn=o(((e,t)=>{t.exports=Nn()})),Fn=o(((e,t)=>{var n=Pn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function In(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var Ln=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},Rn=function(e,t,n){Ln(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function zn(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Bn={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Vn=/[A-Z]|^ms/g,Hn=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Un=function(e){return e.charCodeAt(1)===45},Wn=function(e){return e!=null&&typeof e!=`boolean`},Gn=Cn(function(e){return Un(e)?e:e.replace(Vn,`-$&`).toLowerCase()}),Kn=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(Hn,function(e,t,n){return Xn={name:t,styles:n,next:Xn},t})}return Bn[e]!==1&&!Un(e)&&typeof t==`number`&&t!==0?t+`px`:t};function qn(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return Xn={name:i.name,styles:i.styles,next:Xn},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Xn={name:o.name,styles:o.styles,next:Xn},o=o.next;return a.styles+`;`}return Jn(e,t,n);case`function`:if(e!==void 0){var s=Xn,c=n(e);return Xn=s,qn(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function Jn(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=qn(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Wn(s)&&(r+=Gn(a)+`:`+Kn(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Wn(o[c])&&(r+=Gn(a)+`:`+Kn(a,o[c])+`;`);else{var l=qn(e,t,o);switch(a){case`animation`:case`animationName`:r+=Gn(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var Yn=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Zn(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;Xn=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=qn(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=qn(n,t,e[o]),r&&(i+=a[o]);Yn.lastIndex=0;for(var s=``,c;(c=Yn.exec(i))!==null;)s+=`-`+c[1];return{name:zn(i)+s,styles:i,next:Xn}}var Qn=function(e){return e()},$n=N.useInsertionEffect?N.useInsertionEffect:!1,er=$n||Qn,tr=$n||N.useLayoutEffect,nr=N.createContext(typeof HTMLElement<`u`?Mn({key:`css`}):null),rr=nr.Provider,ir=function(e){return(0,N.forwardRef)(function(t,n){return e(t,(0,N.useContext)(nr),n)})},ar=N.createContext({}),or={}.hasOwnProperty,sr=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,cr=function(e,t){var n={};for(var r in t)or.call(t,r)&&(n[r]=t[r]);return n[sr]=e,n},lr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ln(t,n,r),er(function(){return Rn(t,n,r)}),null},ur=ir(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[sr],a=[r],o=``;typeof e.className==`string`?o=In(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=Zn(a,void 0,N.useContext(ar));o+=t.key+`-`+s.name;var c={};for(var l in e)or.call(e,l)&&l!==`css`&&l!==sr&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),N.createElement(N.Fragment,null,N.createElement(lr,{cache:t,serialized:s,isStringTag:typeof i==`string`}),N.createElement(i,c))});Fn();var dr=function(e,t){var n=arguments;if(t==null||!or.call(t,`css`))return N.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=ur,i[1]=cr(e,t);for(var a=2;a<r;a++)i[a]=n[a];return N.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})(dr||={});var fr=ir(function(e,t){var n=e.styles,r=Zn([n],void 0,N.useContext(ar)),i=N.useRef();return tr(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),tr(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&Rn(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function pr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zn(t)}function mr(){var e=pr.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var hr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,gr=Cn(function(e){return hr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),_r=function(e){return e!==`theme`},vr=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?gr:_r},yr=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},br=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ln(t,n,r),er(function(){return Rn(t,n,r)}),null},xr=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=yr(t,n,r),c=s||vr(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=ir(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=N.useContext(ar)}typeof e.className==`string`?a=In(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=Zn(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?vr(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),N.createElement(N.Fragment,null,N.createElement(br,{cache:t,serialized:m,isStringTag:typeof r==`string`}),N.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,_t({},n,r,{shouldForwardProp:yr(h,r,!0)})).apply(void 0,d)},h}},Sr=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),Cr=xr.bind(null);Sr.forEach(function(e){Cr[e]=Cr(e)});var wr=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),P=o(((e,t)=>{t.exports=wr()}))(),Tr=new Map,Er={insert:void 0},Dr=(e,t)=>{let n=Mn(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n},Or;if(typeof document==`object`&&(Or=document.querySelector(`[name="emotion-insertion-point"]`),!Or)){Or=document.createElement(`meta`),Or.setAttribute(`name`,`emotion-insertion-point`),Or.setAttribute(`content`,``);let e=document.querySelector(`head`);e&&e.prepend(Or)}function kr(e,t){if(e||t){class n extends bt{insert(e,t){return Er.insert?Er.insert(e,t):(this.key&&this.key.endsWith(`global`)&&(this.before=Or),super.insert(e,t))}}let r=Dr({key:`css`,insertionPoint:e?Or:void 0},n);if(t){let e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}}function Ar(e){let{injectFirst:t,enableCssLayer:n,children:r}=e,i=N.useMemo(()=>{let e=`${t}-${n}`;if(typeof document==`object`&&Tr.has(e))return Tr.get(e);let r=kr(t,n);return Tr.set(e,r),r},[t,n]);return i?(0,P.jsx)(rr,{value:i,children:r}):r}function jr(e){return e==null||Object.keys(e).length===0}function Mr(e){let{styles:t,defaultTheme:n={}}=e;return(0,P.jsx)(fr,{styles:typeof t==`function`?e=>t(jr(e)?n:e):t})}function Nr(e,t){return Cr(e,t)}function Pr(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Fr=[];function Ir(e){return Fr[0]=e,Zn(Fr)}var Lr=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Rr(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Lr(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}var zr={borderRadius:4};function Br(e=8,t=ke({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function Vr(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Hr(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Rr(n),c=Br(i),l=ae({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...zr,...a}},o);return l=ue(l),l.applyStyles=Vr,l=t.reduce((e,t)=>ae(e,t),l),l.unstable_sxConfig={...ut,...o?.unstable_sxConfig},l.unstable_sx=function(e){return mt({sx:e,theme:this})},l}function Ur(e){return Object.keys(e).length===0}function Wr(e=null){let t=N.useContext(ar);return!t||Ur(t)?e:t}var Gr=Hr();function Kr(e=Gr){return Wr(e)}function qr(e){let t=Ir(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Jr({styles:e,themeId:t,defaultTheme:n={}}){let r=Kr(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>qr(typeof e==`function`?e(i):e)):qr(a)),(0,P.jsx)(Mr,{styles:a})}var Yr=e=>e,Xr=(()=>{let e=Yr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yr}}})(),Zr={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Qr(e,t,n=`Mui`){let r=Zr[t];return r?`${n}-${r}`:`${Xr.generate(e)}-${t}`}function $r(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Qr(e,t,n)}),r}function ei(e){let{variants:t,...n}=e,r={variants:t,style:Ir(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=Ir(e.style))}),r}var ti=Hr();function ni(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function ri(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function ii(e){return e?(t,n)=>n[e]:null}function ai(e,t,n){e.theme=li(e.theme)?n:e.theme[t]||e.theme}function oi(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>oi(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?ri(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?ri(Ir(i),n):i}return si(e,r.variants,[t],n)}return r?.isProcessed?n?ri(Ir(r.style),n):r.style:n?ri(Ir(r),n):r}function si(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?ri(Ir(o.style(i)),r):o.style(i))):n.push(r?ri(Ir(o.style),r):o.style)}return n}function ci(e={}){let{themeId:t,defaultTheme:n=ti,rootShouldForwardProp:r=ni,slotShouldForwardProp:i=ni}=e;function a(e){ai(e,t,n)}return(e,t={})=>{Pr(e,e=>e.filter(e=>e!==mt));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=ii(di(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=ni;o===`Root`||o===`root`?m=r:o?m=i:ui(e)&&(m=void 0);let h=Nr(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return oi(t,e,t.theme.modularCssLayers?d:void 0)};if(re(e)){let t=ei(e);return function(e){return t.variants?oi(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?ri(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=oi(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?si(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(mt),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function li(e){for(let t in e)return!1;return!0}function ui(e){return typeof e==`string`&&e.charCodeAt(0)>96}function di(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function fi(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=fi(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=k(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}var pi=typeof window<`u`?N.useLayoutEffect:N.useEffect;function mi(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function hi(e,t=0,n=1){return mi(e,t,n)}function gi(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function _i(e){if(e.type)return e;if(e.charAt(0)===`#`)return _i(gi(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(j(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(j(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var vi=e=>{let t=_i(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},yi=(e,t)=>{try{return vi(e)}catch{return e}};function bi(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function xi(e){e=_i(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),bi({type:s,values:c})}function Si(e){e=_i(e);let t=e.type===`hsl`||e.type===`hsla`?_i(xi(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Ci(e,t){let n=Si(e),r=Si(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function wi(e,t){return e=_i(e),t=hi(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,bi(e)}function Ti(e,t,n){try{return wi(e,t)}catch{return e}}function Ei(e,t){if(e=_i(e),t=hi(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return bi(e)}function Di(e,t,n){try{return Ei(e,t)}catch{return e}}function Oi(e,t){if(e=_i(e),t=hi(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return bi(e)}function ki(e,t,n){try{return Oi(e,t)}catch{return e}}function Ai(e,t=.15){return Si(e)>.5?Ei(e,t):Oi(e,t)}function ji(e,t,n){try{return Ai(e,t)}catch{return e}}var Mi=N.createContext(null);function Ni(){return N.useContext(Mi)}var Pi=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Fi(e,t){return typeof t==`function`?t(e):{...e,...t}}function Ii(e){let{children:t,theme:n}=e,r=Ni(),i=N.useMemo(()=>{let e=r===null?{...n}:Fi(r,n);return e!=null&&(e[Pi]=r!==null),e},[n,r]);return(0,P.jsx)(Mi.Provider,{value:i,children:t})}var Li=N.createContext();function Ri({value:e,...t}){return(0,P.jsx)(Li.Provider,{value:e??!0,...t})}var zi=()=>N.useContext(Li)??!1,Bi=N.createContext(void 0);function Vi({value:e,children:t}){return(0,P.jsx)(Bi.Provider,{value:e,children:t})}function Hi(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?fi(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?fi(i,r,t.components.mergeClassNameAndStyle):r}function Ui({props:e,name:t}){return Hi({props:e,name:t,theme:{components:N.useContext(Bi)}})}var Wi=0;function Gi(e){let[t,n]=N.useState(e),r=e||t;return N.useEffect(()=>{t??(Wi+=1,n(`mui-${Wi}`))},[t]),r}var Ki={...N}.useId;function qi(e){if(Ki!==void 0){let t=Ki();return e??t}return Gi(e)}function Ji(e){let t=Wr(),n=qi()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,pi(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,P.jsx)(Jr,{styles:i}):null}var Yi={};function Xi(e,t,n,r=!1){return N.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function Zi(e){let{children:t,theme:n,themeId:r}=e,i=Wr(Yi),a=Ni()||Yi,o=Xi(r,i,n),s=Xi(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Ji(o);return(0,P.jsx)(Ii,{theme:s,children:(0,P.jsx)(ar.Provider,{value:o,children:(0,P.jsx)(Ri,{value:c,children:(0,P.jsxs)(Vi,{value:r?o[r].components:o.components,children:[l,t]})})})})}var Qi={theme:void 0};function $i(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Qi.theme=r.theme,i=ei(e(Qi)),t=i,n=r.theme),i}}var ea=`mode`,ta=`color-scheme`,na=`data-color-scheme`;function ra(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=ea,colorSchemeStorageKey:a=ta,attribute:o=na,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
1
|
+
this.ExtendedTextEntryElement=(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ee(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function D(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function te(e,t){return typeof e==`object`&&e&&e.key!=null?D(``+e.key):t.toString(36)}function k(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+te(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(O,`$&/`)+`/`),k(o,r,i,``,function(e){return e})):o!=null&&(ee(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+te(s,l);c+=k(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+te(s,l++),c+=k(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function A(e,t,n){if(e==null)return e;var r=[],i=0;return k(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function j(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var M={current:null},ne={transition:null},re={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:ne,ReactCurrentOwner:C};function ie(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:A,forEach:function(e,t,n){A(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return A(e,function(){t++}),t},toArray:function(e){return A(e,function(e){return e})||[]},only:function(e){if(!ee(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,e.act=ie,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ee,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:j}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ne.transition;ne.transition={};try{e()}finally{ne.transition=t}},e.unstable_act=ie,e.useCallback=function(e,t){return M.current.useCallback(e,t)},e.useContext=function(e){return M.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return M.current.useDeferredValue(e)},e.useEffect=function(e,t){return M.current.useEffect(e,t)},e.useId=function(){return M.current.useId()},e.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return M.current.useMemo(e,t)},e.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},e.useRef=function(e){return M.current.useRef(e)},e.useState=function(e){return M.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return M.current.useTransition()},e.version=`18.3.1`})),d=o(((e,t)=>{t.exports=u()})),f=()=>null,p=new Proxy(f,{get:()=>f});function m(){return()=>{}}function h(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=h(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function g(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=h(e))&&(r&&(r+=` `),r+=t);return r}function _(e,t,n=void 0){let r={};for(let i in e){let a=e[i],o=``,s=!0;for(let e=0;e<a.length;e+=1){let r=a[e];r&&(o+=(s===!0?``:` `)+t(r),s=!1,n&&n[r]&&(o+=` `+n[r]))}r[i]=o}return r}function v(e,...t){let n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>n.searchParams.append(`args[]`,e)),`Minified MUI error #${e}; visit ${n} for the full message.`}function y(e){if(typeof e!=`string`)throw Error(v(7));return e.charAt(0).toUpperCase()+e.slice(1)}var b=o((e=>{var t=Symbol.for(`react.fragment`),n=Symbol.for(`react.strict_mode`),r=Symbol.for(`react.profiler`),i=Symbol.for(`react.consumer`),a=Symbol.for(`react.context`),o=Symbol.for(`react.forward_ref`),s=Symbol.for(`react.suspense`),c=Symbol.for(`react.suspense_list`),l=Symbol.for(`react.memo`),u=Symbol.for(`react.lazy`),d=Symbol.for(`react.client.reference`);e.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===t||e===r||e===n||e===s||e===c||typeof e==`object`&&e&&(e.$$typeof===u||e.$$typeof===l||e.$$typeof===a||e.$$typeof===i||e.$$typeof===o||e.$$typeof===d||e.getModuleId!==void 0))}})),x=o(((e,t)=>{t.exports=b()})),S=l(d()),C=x();function w(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function T(e){if(S.isValidElement(e)||(0,C.isValidElementType)(e)||!w(e))return e;let t={};return Object.keys(e).forEach(n=>{t[n]=T(e[n])}),t}function E(e,t,n={clone:!0}){let r=n.clone?{...e}:e;return w(e)&&w(t)&&Object.keys(t).forEach(i=>{S.isValidElement(t[i])||(0,C.isValidElementType)(t[i])?r[i]=t[i]:w(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&w(e[i])?r[i]=E(e[i],t[i],n):n.clone?r[i]=w(t[i])?T(t[i]):t[i]:r[i]=t[i]}),r}function ee(e,t){return t?E(e,t,{clone:!1}):e}function D(e,t){if(!e.containerQueries)return t;let n=Object.keys(t).filter(e=>e.startsWith(`@container`)).sort((e,t)=>{let n=/min-width:\s*([0-9.]+)/;return(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{let r=t[n];return delete e[n],e[n]=r,e},{...t}):t}function O(e,t){return t===`@`||t.startsWith(`@`)&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function te(e,t){let n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;let[,r,i]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(a)}function k(e){let t=(e,t)=>e.replace(`@media`,t?`@container ${t}`:`@container`);function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{let i=t(e.breakpoints.not(...n),r);return i.includes(`not all and`)?i.replace(`not all and `,``).replace(`min-width:`,`width<`).replace(`max-width:`,`width>`).replace(`and`,`or`):i}}let r={},i=e=>(n(r,e),r);return n(i),{...e,containerQueries:i}}var A={xs:0,sm:600,md:900,lg:1200,xl:1536},j={keys:[`xs`,`sm`,`md`,`lg`,`xl`],up:e=>`@media (min-width:${A[e]}px)`},M={containerQueries:e=>({up:t=>{let n=typeof t==`number`?t:A[t]||t;return typeof n==`number`&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function ne(e,t,n){let r=e.theme||{};if(Array.isArray(t)){let e=r.breakpoints||j;return t.reduce((r,i,a)=>(r[e.up(e.keys[a])]=n(t[a]),r),{})}if(typeof t==`object`){let e=r.breakpoints||j;return Object.keys(t).reduce((i,a)=>{if(O(e.keys,a)){let e=te(r.containerQueries?r:M,a);e&&(i[e]=n(t[a],a))}else if(Object.keys(e.values||A).includes(a)){let r=e.up(a);i[r]=n(t[a],a)}else{let e=a;i[e]=t[e]}return i},{})}return n(t)}function re(e={}){return e.keys?.reduce((t,n)=>{let r=e.up(n);return t[r]={},t},{})||{}}function ie(e,t){return e.reduce((e,t)=>{let n=e[t];return(!n||Object.keys(n).length===0)&&delete e[t],e},t)}function ae(e,t,n=!0){if(!t||typeof t!=`string`)return null;if(e&&e.vars&&n){let n=`vars.${t}`.split(`.`).reduce((e,t)=>e&&e[t]?e[t]:null,e);if(n!=null)return n}return t.split(`.`).reduce((e,t)=>e&&e[t]!=null?e[t]:null,e)}function oe(e,t,n,r=n){let i;return i=typeof e==`function`?e(n):Array.isArray(e)?e[n]||r:ae(e,n)||r,t&&(i=t(i,r,e)),i}function se(e){let{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,a=e=>{if(e[t]==null)return null;let a=e[t],o=e.theme,s=ae(o,r)||{};return ne(e,a,e=>{let r=oe(s,i,e);return e===r&&typeof e==`string`&&(r=oe(s,i,`${t}${e==="default"?``:y(e)}`,e)),n===!1?r:{[n]:r}})};return a.propTypes={},a.filterProps=[t],a}function ce(e){let t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}var le={m:`margin`,p:`padding`},ue={t:`Top`,r:`Right`,b:`Bottom`,l:`Left`,x:[`Left`,`Right`],y:[`Top`,`Bottom`]},de={marginX:`mx`,marginY:`my`,paddingX:`px`,paddingY:`py`},fe=ce(e=>{if(e.length>2)if(de[e])e=de[e];else return[e];let[t,n]=e.split(``),r=le[t],i=ue[n]||``;return Array.isArray(i)?i.map(e=>r+e):[r+i]}),pe=[`m`,`mt`,`mr`,`mb`,`ml`,`mx`,`my`,`margin`,`marginTop`,`marginRight`,`marginBottom`,`marginLeft`,`marginX`,`marginY`,`marginInline`,`marginInlineStart`,`marginInlineEnd`,`marginBlock`,`marginBlockStart`,`marginBlockEnd`],me=[`p`,`pt`,`pr`,`pb`,`pl`,`px`,`py`,`padding`,`paddingTop`,`paddingRight`,`paddingBottom`,`paddingLeft`,`paddingX`,`paddingY`,`paddingInline`,`paddingInlineStart`,`paddingInlineEnd`,`paddingBlock`,`paddingBlockStart`,`paddingBlockEnd`],he=[...pe,...me];function ge(e,t,n,r){let i=ae(e,t,!0)??n;return typeof i==`number`||typeof i==`string`?e=>typeof e==`string`?e:typeof i==`string`?i.startsWith(`var(`)&&e===0?0:i.startsWith(`var(`)&&e===1?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if(typeof e==`string`)return e;let t=i[Math.abs(e)];return e>=0?t:typeof t==`number`?-t:typeof t==`string`&&t.startsWith(`var(`)?`calc(-1 * ${t})`:`-${t}`}:typeof i==`function`?i:()=>void 0}function _e(e){return ge(e,`spacing`,8,`spacing`)}function ve(e,t){return typeof t==`string`||t==null?t:e(t)}function ye(e,t){return n=>e.reduce((e,r)=>(e[r]=ve(t,n),e),{})}function be(e,t,n,r){if(!t.includes(n))return null;let i=ye(fe(n),r),a=e[n];return ne(e,a,i)}function xe(e,t){let n=_e(e.theme);return Object.keys(e).map(r=>be(e,t,r,n)).reduce(ee,{})}function Se(e){return xe(e,pe)}Se.propTypes={},Se.filterProps=pe;function Ce(e){return xe(e,me)}Ce.propTypes={},Ce.filterProps=me;function we(e){return xe(e,he)}we.propTypes={},we.filterProps=he;function Te(...e){let t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?ee(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Ee(e){return typeof e==`number`?`${e}px solid`:e}function De(e,t){return se({prop:e,themeKey:`borders`,transform:t})}var Oe=De(`border`,Ee),ke=De(`borderTop`,Ee),Ae=De(`borderRight`,Ee),je=De(`borderBottom`,Ee),Me=De(`borderLeft`,Ee),Ne=De(`borderColor`),Pe=De(`borderTopColor`),Fe=De(`borderRightColor`),Ie=De(`borderBottomColor`),Le=De(`borderLeftColor`),Re=De(`outline`,Ee),ze=De(`outlineColor`),Be=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){let t=ge(e.theme,`shape.borderRadius`,4,`borderRadius`);return ne(e,e.borderRadius,e=>({borderRadius:ve(t,e)}))}return null};Be.propTypes={},Be.filterProps=[`borderRadius`],Te(Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Be,Re,ze);var Ve=e=>{if(e.gap!==void 0&&e.gap!==null){let t=ge(e.theme,`spacing`,8,`gap`);return ne(e,e.gap,e=>({gap:ve(t,e)}))}return null};Ve.propTypes={},Ve.filterProps=[`gap`];var He=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){let t=ge(e.theme,`spacing`,8,`columnGap`);return ne(e,e.columnGap,e=>({columnGap:ve(t,e)}))}return null};He.propTypes={},He.filterProps=[`columnGap`];var Ue=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){let t=ge(e.theme,`spacing`,8,`rowGap`);return ne(e,e.rowGap,e=>({rowGap:ve(t,e)}))}return null};Ue.propTypes={},Ue.filterProps=[`rowGap`],Te(Ve,He,Ue,se({prop:`gridColumn`}),se({prop:`gridRow`}),se({prop:`gridAutoFlow`}),se({prop:`gridAutoColumns`}),se({prop:`gridAutoRows`}),se({prop:`gridTemplateColumns`}),se({prop:`gridTemplateRows`}),se({prop:`gridTemplateAreas`}),se({prop:`gridArea`}));function We(e,t){return t===`grey`?t:e}Te(se({prop:`color`,themeKey:`palette`,transform:We}),se({prop:`bgcolor`,cssProperty:`backgroundColor`,themeKey:`palette`,transform:We}),se({prop:`backgroundColor`,themeKey:`palette`,transform:We}));function Ge(e){return e<=1&&e!==0?`${e*100}%`:e}var Ke=se({prop:`width`,transform:Ge}),qe=e=>e.maxWidth!==void 0&&e.maxWidth!==null?ne(e,e.maxWidth,t=>{let n=e.theme?.breakpoints?.values?.[t]||A[t];return n?e.theme?.breakpoints?.unit===`px`?{maxWidth:n}:{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:Ge(t)}}):null;qe.filterProps=[`maxWidth`];var Je=se({prop:`minWidth`,transform:Ge}),Ye=se({prop:`height`,transform:Ge}),Xe=se({prop:`maxHeight`,transform:Ge}),Ze=se({prop:`minHeight`,transform:Ge});se({prop:`size`,cssProperty:`width`,transform:Ge}),se({prop:`size`,cssProperty:`height`,transform:Ge}),Te(Ke,qe,Je,Ye,Xe,Ze,se({prop:`boxSizing`}));var Qe={border:{themeKey:`borders`,transform:Ee},borderTop:{themeKey:`borders`,transform:Ee},borderRight:{themeKey:`borders`,transform:Ee},borderBottom:{themeKey:`borders`,transform:Ee},borderLeft:{themeKey:`borders`,transform:Ee},borderColor:{themeKey:`palette`},borderTopColor:{themeKey:`palette`},borderRightColor:{themeKey:`palette`},borderBottomColor:{themeKey:`palette`},borderLeftColor:{themeKey:`palette`},outline:{themeKey:`borders`,transform:Ee},outlineColor:{themeKey:`palette`},borderRadius:{themeKey:`shape.borderRadius`,style:Be},color:{themeKey:`palette`,transform:We},bgcolor:{themeKey:`palette`,cssProperty:`backgroundColor`,transform:We},backgroundColor:{themeKey:`palette`,transform:We},p:{style:Ce},pt:{style:Ce},pr:{style:Ce},pb:{style:Ce},pl:{style:Ce},px:{style:Ce},py:{style:Ce},padding:{style:Ce},paddingTop:{style:Ce},paddingRight:{style:Ce},paddingBottom:{style:Ce},paddingLeft:{style:Ce},paddingX:{style:Ce},paddingY:{style:Ce},paddingInline:{style:Ce},paddingInlineStart:{style:Ce},paddingInlineEnd:{style:Ce},paddingBlock:{style:Ce},paddingBlockStart:{style:Ce},paddingBlockEnd:{style:Ce},m:{style:Se},mt:{style:Se},mr:{style:Se},mb:{style:Se},ml:{style:Se},mx:{style:Se},my:{style:Se},margin:{style:Se},marginTop:{style:Se},marginRight:{style:Se},marginBottom:{style:Se},marginLeft:{style:Se},marginX:{style:Se},marginY:{style:Se},marginInline:{style:Se},marginInlineStart:{style:Se},marginInlineEnd:{style:Se},marginBlock:{style:Se},marginBlockStart:{style:Se},marginBlockEnd:{style:Se},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Ve},rowGap:{style:Ue},columnGap:{style:He},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:`zIndex`},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:`shadows`},width:{transform:Ge},maxWidth:{style:qe},minWidth:{transform:Ge},height:{transform:Ge},maxHeight:{transform:Ge},minHeight:{transform:Ge},boxSizing:{},font:{themeKey:`font`},fontFamily:{themeKey:`typography`},fontSize:{themeKey:`typography`},fontStyle:{themeKey:`typography`},fontWeight:{themeKey:`typography`},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:`typography`}};function $e(...e){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function et(e,t){return typeof e==`function`?e(t):e}function tt(){function e(e,t,n,r){let i={[e]:t,theme:n},a=r[e];if(!a)return{[e]:t};let{cssProperty:o=e,themeKey:s,transform:c,style:l}=a;if(t==null)return null;if(s===`typography`&&t===`inherit`)return{[e]:t};let u=ae(n,s)||{};return l?l(i):ne(i,t,t=>{let n=oe(u,c,t);return t===n&&typeof t==`string`&&(n=oe(u,c,`${e}${t==="default"?``:y(t)}`,t)),o===!1?n:{[o]:n}})}function t(n){let{sx:r,theme:i={},nested:a}=n||{};if(!r)return null;let o=i.unstable_sxConfig??Qe;function s(n){let r=n;if(typeof n==`function`)r=n(i);else if(typeof n!=`object`)return n;if(!r)return null;let s=re(i.breakpoints),c=Object.keys(s),l=s;return Object.keys(r).forEach(n=>{let a=et(r[n],i);if(a!=null)if(typeof a==`object`)if(o[n])l=ee(l,e(n,a,i,o));else{let e=ne({theme:i},a,e=>({[n]:e}));$e(e,a)?l[n]=t({sx:a,theme:i,nested:!0}):l=ee(l,e)}else l=ee(l,e(n,a,i,o))}),!a&&i.modularCssLayers?{"@layer sx":D(i,ie(c,l))}:D(i,ie(c,l))}return Array.isArray(r)?r.map(s):s(r)}return t}var nt=tt();nt.filterProps=[`sx`];var rt=e=>{let t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??Qe;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function it(e){let{sx:t,...n}=e,{systemProps:r,otherProps:i}=rt(n),a;return a=Array.isArray(t)?[r,...t]:typeof t==`function`?(...e)=>{let n=t(...e);return w(n)?{...r,...n}:r}:{...r,...t},{...i,sx:a}}function at(){return at=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},at.apply(null,arguments)}function ot(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function st(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var ct=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(st(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=ot(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),lt=`-ms-`,ut=`-moz-`,dt=`-webkit-`,ft=`comm`,pt=`rule`,mt=`decl`,ht=`@import`,gt=`@keyframes`,_t=`@layer`,vt=Math.abs,yt=String.fromCharCode,bt=Object.assign;function xt(e,t){return Et(e,0)^45?(((t<<2^Et(e,0))<<2^Et(e,1))<<2^Et(e,2))<<2^Et(e,3):0}function St(e){return e.trim()}function Ct(e,t){return(e=t.exec(e))?e[0]:e}function wt(e,t,n){return e.replace(t,n)}function Tt(e,t){return e.indexOf(t)}function Et(e,t){return e.charCodeAt(t)|0}function Dt(e,t,n){return e.slice(t,n)}function Ot(e){return e.length}function kt(e){return e.length}function At(e,t){return t.push(e),e}function jt(e,t){return e.map(t).join(``)}var Mt=1,Nt=1,Pt=0,Ft=0,It=0,Lt=``;function Rt(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Mt,column:Nt,length:o,return:``}}function zt(e,t){return bt(Rt(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Bt(){return It}function Vt(){return It=Ft>0?Et(Lt,--Ft):0,Nt--,It===10&&(Nt=1,Mt--),It}function Ht(){return It=Ft<Pt?Et(Lt,Ft++):0,Nt++,It===10&&(Nt=1,Mt++),It}function Ut(){return Et(Lt,Ft)}function Wt(){return Ft}function Gt(e,t){return Dt(Lt,e,t)}function Kt(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function qt(e){return Mt=Nt=1,Pt=Ot(Lt=e),Ft=0,[]}function Jt(e){return Lt=``,e}function Yt(e){return St(Gt(Ft-1,Qt(e===91?e+2:e===40?e+1:e)))}function Xt(e){for(;(It=Ut())&&It<33;)Ht();return Kt(e)>2||Kt(It)>3?``:` `}function Zt(e,t){for(;--t&&Ht()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return Gt(e,Wt()+(t<6&&Ut()==32&&Ht()==32))}function Qt(e){for(;Ht();)switch(It){case e:return Ft;case 34:case 39:e!==34&&e!==39&&Qt(It);break;case 40:e===41&&Qt(e);break;case 92:Ht();break}return Ft}function $t(e,t){for(;Ht()&&e+It!==57&&!(e+It===84&&Ut()===47););return`/*`+Gt(t,Ft-1)+`*`+yt(e===47?e:Ht())}function en(e){for(;!Kt(Ut());)Ht();return Gt(e,Ft)}function tn(e){return Jt(nn(``,null,null,null,[``],e=qt(e),0,[0],e))}function nn(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=Ht()){case 40:if(m!=108&&Et(C,d-1)==58){Tt(C+=wt(Yt(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=Yt(v);break;case 9:case 10:case 13:case 32:C+=Xt(m);break;case 92:C+=Zt(Wt()-1,7);continue;case 47:switch(Ut()){case 42:case 47:At(an($t(Ht(),Wt()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=Ot(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=wt(C,/\f/g,``)),p>0&&Ot(C)-d&&At(p>32?on(C+`;`,r,n,d-1):on(wt(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(At(S=rn(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123)if(u===0)nn(C,t,S,S,b,a,d,s,x);else switch(f===99&&Et(C,3)===110?100:f){case 100:case 108:case 109:case 115:nn(e,S,S,r&&At(rn(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:nn(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+Ot(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&Vt()==125)continue}switch(C+=yt(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(Ot(C)-1)*_,_=1;break;case 64:Ut()===45&&(C+=Yt(Ht())),f=Ut(),u=d=Ot(y=C+=en(Wt())),v++;break;case 45:m===45&&Ot(C)==2&&(h=0)}}return a}function rn(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=kt(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=Dt(e,d+1,d=vt(h=o[m])),y=e;_<p;++_)(y=St(h>0?f[_]+` `+v:wt(v,/&\f/g,f[_])))&&(c[g++]=y);return Rt(e,t,n,i===0?pt:s,c,l,u)}function an(e,t,n){return Rt(e,t,n,ft,yt(Bt()),Dt(e,2,-2),0)}function on(e,t,n,r){return Rt(e,t,n,mt,Dt(e,0,r),Dt(e,r+1,-1),r)}function sn(e,t){for(var n=``,r=kt(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function cn(e,t,n,r){switch(e.type){case _t:if(e.children.length)break;case ht:case mt:return e.return=e.return||e.value;case ft:return``;case gt:return e.return=e.value+`{`+sn(e.children,r)+`}`;case pt:e.value=e.props.join(`,`)}return Ot(n=sn(e.children,r))?e.return=e.value+`{`+n+`}`:``}function ln(e){var t=kt(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function un(e){return function(t){t.root||(t=t.return)&&e(t)}}function dn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var fn=function(e,t,n){for(var r=0,i=0;r=i,i=Ut(),r===38&&i===12&&(t[n]=1),!Kt(i);)Ht();return Gt(e,Ft)},pn=function(e,t){var n=-1,r=44;do switch(Kt(r)){case 0:r===38&&Ut()===12&&(t[n]=1),e[n]+=fn(Ft-1,t,n);break;case 2:e[n]+=Yt(r);break;case 4:if(r===44){e[++n]=Ut()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=yt(r)}while(r=Ht());return e},mn=function(e,t){return Jt(pn(qt(e),t))},hn=new WeakMap,gn=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!hn.get(n))&&!r){hn.set(e,!0);for(var i=[],a=mn(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},_n=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function vn(e,t){switch(xt(e,t)){case 5103:return dt+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return dt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return dt+e+ut+e+lt+e+e;case 6828:case 4268:return dt+e+lt+e+e;case 6165:return dt+e+lt+`flex-`+e+e;case 5187:return dt+e+wt(e,/(\w+).+(:[^]+)/,dt+`box-$1$2`+lt+`flex-$1$2`)+e;case 5443:return dt+e+lt+`flex-item-`+wt(e,/flex-|-self/,``)+e;case 4675:return dt+e+lt+`flex-line-pack`+wt(e,/align-content|flex-|-self/,``)+e;case 5548:return dt+e+lt+wt(e,`shrink`,`negative`)+e;case 5292:return dt+e+lt+wt(e,`basis`,`preferred-size`)+e;case 6060:return dt+`box-`+wt(e,`-grow`,``)+dt+e+lt+wt(e,`grow`,`positive`)+e;case 4554:return dt+wt(e,/([^-])(transform)/g,`$1`+dt+`$2`)+e;case 6187:return wt(wt(wt(e,/(zoom-|grab)/,dt+`$1`),/(image-set)/,dt+`$1`),e,``)+e;case 5495:case 3959:return wt(e,/(image-set\([^]*)/,dt+"$1$`$1");case 4968:return wt(wt(e,/(.+:)(flex-)?(.*)/,dt+`box-pack:$3`+lt+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+dt+e+e;case 4095:case 3583:case 4068:case 2532:return wt(e,/(.+)-inline(.+)/,dt+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ot(e)-1-t>6)switch(Et(e,t+1)){case 109:if(Et(e,t+4)!==45)break;case 102:return wt(e,/(.+:)(.+)-([^]+)/,`$1`+dt+`$2-$3$1`+ut+(Et(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~Tt(e,`stretch`)?vn(wt(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(Et(e,t+1)!==115)break;case 6444:switch(Et(e,Ot(e)-3-(~Tt(e,`!important`)&&10))){case 107:return wt(e,`:`,`:`+dt)+e;case 101:return wt(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+dt+(Et(e,14)===45?`inline-`:``)+`box$3$1`+dt+`$2$3$1`+lt+`$2box$3`)+e}break;case 5936:switch(Et(e,t+11)){case 114:return dt+e+lt+wt(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return dt+e+lt+wt(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return dt+e+lt+wt(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return dt+e+lt+e+e}return e}var yn=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case mt:e.return=vn(e.value,e.length);break;case gt:return sn([zt(e,{value:wt(e.value,`@`,`@`+dt)})],r);case pt:if(e.length)return jt(e.props,function(t){switch(Ct(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return sn([zt(e,{props:[wt(t,/:(read-\w+)/,`:`+ut+`$1`)]})],r);case`::placeholder`:return sn([zt(e,{props:[wt(t,/:(plac\w+)/,`:`+dt+`input-$1`)]}),zt(e,{props:[wt(t,/:(plac\w+)/,`:`+ut+`$1`)]}),zt(e,{props:[wt(t,/:(plac\w+)/,lt+`input-$1`)]})],r)}return``})}}],bn=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||yn,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[gn,_n],l,u=[cn,un(function(e){l.insert(e)})],d=ln(c.concat(r,u)),f=function(e){return sn(tn(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new ct({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},xn=o((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),Sn=o(((e,t)=>{t.exports=xn()})),Cn=o(((e,t)=>{var n=Sn(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function wn(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var Tn=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},En=function(e,t,n){Tn(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function Dn(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var On={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},kn=/[A-Z]|^ms/g,An=/_EMO_([^_]+?)_([^]*?)_EMO_/g,jn=function(e){return e.charCodeAt(1)===45},Mn=function(e){return e!=null&&typeof e!=`boolean`},Nn=dn(function(e){return jn(e)?e:e.replace(kn,`-$&`).toLowerCase()}),Pn=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(An,function(e,t,n){return Rn={name:t,styles:n,next:Rn},t})}return On[e]!==1&&!jn(e)&&typeof t==`number`&&t!==0?t+`px`:t};function Fn(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return Rn={name:i.name,styles:i.styles,next:Rn},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Rn={name:o.name,styles:o.styles,next:Rn},o=o.next;return a.styles+`;`}return In(e,t,n);case`function`:if(e!==void 0){var s=Rn,c=n(e);return Rn=s,Fn(e,t,c)}break}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function In(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Fn(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:Mn(s)&&(r+=Nn(a)+`:`+Pn(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Mn(o[c])&&(r+=Nn(a)+`:`+Pn(a,o[c])+`;`);else{var l=Fn(e,t,o);switch(a){case`animation`:case`animationName`:r+=Nn(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var Ln=/label:\s*([^\s;{]+)\s*(;|$)/g,Rn;function zn(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;Rn=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=Fn(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=Fn(n,t,e[o]),r&&(i+=a[o]);Ln.lastIndex=0;for(var s=``,c;(c=Ln.exec(i))!==null;)s+=`-`+c[1];return{name:Dn(i)+s,styles:i,next:Rn}}var Bn=function(e){return e()},Vn=S.useInsertionEffect?S.useInsertionEffect:!1,Hn=Vn||Bn,Un=Vn||S.useLayoutEffect,Wn=S.createContext(typeof HTMLElement<`u`?bn({key:`css`}):null),Gn=Wn.Provider,Kn=function(e){return(0,S.forwardRef)(function(t,n){return e(t,(0,S.useContext)(Wn),n)})},qn=S.createContext({}),Jn={}.hasOwnProperty,Yn=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Xn=function(e,t){var n={};for(var r in t)Jn.call(t,r)&&(n[r]=t[r]);return n[Yn]=e,n},Zn=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Tn(t,n,r),Hn(function(){return En(t,n,r)}),null},Qn=Kn(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Yn],a=[r],o=``;typeof e.className==`string`?o=wn(t.registered,a,e.className):e.className!=null&&(o=e.className+` `);var s=zn(a,void 0,S.useContext(qn));o+=t.key+`-`+s.name;var c={};for(var l in e)Jn.call(e,l)&&l!==`css`&&l!==Yn&&(c[l]=e[l]);return c.className=o,n&&(c.ref=n),S.createElement(S.Fragment,null,S.createElement(Zn,{cache:t,serialized:s,isStringTag:typeof i==`string`}),S.createElement(i,c))});Cn();var $n=function(e,t){var n=arguments;if(t==null||!Jn.call(t,`css`))return S.createElement.apply(void 0,n);var r=n.length,i=Array(r);i[0]=Qn,i[1]=Xn(e,t);for(var a=2;a<r;a++)i[a]=n[a];return S.createElement.apply(null,i)};(function(e){var t;t||=e.JSX||={}})($n||={});var er=Kn(function(e,t){var n=e.styles,r=zn([n],void 0,S.useContext(qn)),i=S.useRef();return Un(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Un(function(){var e=i.current,n=e[0];if(e[1]){e[1]=!1;return}r.next!==void 0&&En(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1)},[t,r.name]),null});function tr(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return zn(t)}function nr(){var e=tr.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}var rr=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ir=dn(function(e){return rr.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),ar=function(e){return e!==`theme`},or=function(e){return typeof e==`string`&&e.charCodeAt(0)>96?ir:ar},sr=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return typeof r!=`function`&&n&&(r=e.__emotion_forwardProp),r},cr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Tn(t,n,r),Hn(function(){return En(t,n,r)}),null},lr=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,a,o;n!==void 0&&(a=n.label,o=n.target);var s=sr(t,n,r),c=s||or(i),l=!c(`as`);return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&d.push(`label:`+a+`;`),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,m=1;m<p;m++)d.push(u[m],f[m])}var h=Kn(function(e,t,n){var r=l&&e.as||i,a=``,u=[],f=e;if(e.theme==null){for(var p in f={},e)f[p]=e[p];f.theme=S.useContext(qn)}typeof e.className==`string`?a=wn(t.registered,u,e.className):e.className!=null&&(a=e.className+` `);var m=zn(d.concat(u),t.registered,f);a+=t.key+`-`+m.name,o!==void 0&&(a+=` `+o);var h=l&&s===void 0?or(r):c,g={};for(var _ in e)l&&_===`as`||h(_)&&(g[_]=e[_]);return g.className=a,n&&(g.ref=n),S.createElement(S.Fragment,null,S.createElement(cr,{cache:t,serialized:m,isStringTag:typeof r==`string`}),S.createElement(r,g))});return h.displayName=a===void 0?`Styled(`+(typeof i==`string`?i:i.displayName||i.name||`Component`)+`)`:a,h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return`.`+o}}),h.withComponent=function(t,r){return e(t,at({},n,r,{shouldForwardProp:sr(h,r,!0)})).apply(void 0,d)},h}},ur=`a.abbr.address.area.article.aside.audio.b.base.bdi.bdo.big.blockquote.body.br.button.canvas.caption.cite.code.col.colgroup.data.datalist.dd.del.details.dfn.dialog.div.dl.dt.em.embed.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.iframe.img.input.ins.kbd.keygen.label.legend.li.link.main.map.mark.marquee.menu.menuitem.meta.meter.nav.noscript.object.ol.optgroup.option.output.p.param.picture.pre.progress.q.rp.rt.ruby.s.samp.script.section.select.small.source.span.strong.style.sub.summary.sup.table.tbody.td.textarea.tfoot.th.thead.time.title.tr.track.u.ul.var.video.wbr.circle.clipPath.defs.ellipse.foreignObject.g.image.line.linearGradient.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.svg.text.tspan`.split(`.`),dr=lr.bind(null);ur.forEach(function(e){dr[e]=dr(e)});var fr=o((e=>{var t=d(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),N=o(((e,t)=>{t.exports=fr()}))(),pr=new Map,mr={insert:void 0},hr=(e,t)=>{let n=bn(e);return n.sheet=new t({key:n.key,nonce:n.sheet.nonce,container:n.sheet.container,speedy:n.sheet.isSpeedy,prepend:n.sheet.prepend,insertionPoint:n.sheet.insertionPoint}),n},gr;if(typeof document==`object`&&(gr=document.querySelector(`[name="emotion-insertion-point"]`),!gr)){gr=document.createElement(`meta`),gr.setAttribute(`name`,`emotion-insertion-point`),gr.setAttribute(`content`,``);let e=document.querySelector(`head`);e&&e.prepend(gr)}function _r(e,t){if(e||t){class n extends ct{insert(e,t){return mr.insert?mr.insert(e,t):(this.key&&this.key.endsWith(`global`)&&(this.before=gr),super.insert(e,t))}}let r=hr({key:`css`,insertionPoint:e?gr:void 0},n);if(t){let e=r.insert;r.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return r}}function vr(e){let{injectFirst:t,enableCssLayer:n,children:r}=e,i=S.useMemo(()=>{let e=`${t}-${n}`;if(typeof document==`object`&&pr.has(e))return pr.get(e);let r=_r(t,n);return pr.set(e,r),r},[t,n]);return i?(0,N.jsx)(Gn,{value:i,children:r}):r}function yr(e){return e==null||Object.keys(e).length===0}function br(e){let{styles:t,defaultTheme:n={}}=e;return(0,N.jsx)(er,{styles:typeof t==`function`?e=>t(yr(e)?n:e):t})}function xr(e,t){return dr(e,t)}function Sr(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Cr=[];function wr(e){return Cr[0]=e,zn(Cr)}var Tr=e=>{let t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function Er(e){let{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n=`px`,step:r=5,...i}=e,a=Tr(t),o=Object.keys(a);function s(e){return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n})`}function c(e){return`@media (max-width:${(typeof t[e]==`number`?t[e]:e)-r/100}${n})`}function l(e,i){let a=o.indexOf(i);return`@media (min-width:${typeof t[e]==`number`?t[e]:e}${n}) and (max-width:${(a!==-1&&typeof t[o[a]]==`number`?t[o[a]]:i)-r/100}${n})`}function u(e){return o.indexOf(e)+1<o.length?l(e,o[o.indexOf(e)+1]):s(e)}function d(e){let t=o.indexOf(e);return t===0?s(o[1]):t===o.length-1?c(o[t]):l(e,o[o.indexOf(e)+1]).replace(`@media`,`@media not all and`)}return{keys:o,values:a,up:s,down:c,between:l,only:u,not:d,unit:n,...i}}var Dr={borderRadius:4};function Or(e=8,t=_e({spacing:e})){if(e.mui)return e;let n=(...e)=>(e.length===0?[1]:e).map(e=>{let n=t(e);return typeof n==`number`?`${n}px`:n}).join(` `);return n.mui=!0,n}function kr(e,t){let n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!=`function`)return{};let r=n.getColorSchemeSelector(e);return r===`&`?t:((r.includes(`data-`)||r.includes(`.`))&&(r=`*:where(${r.replace(/\s*&$/,``)}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Ar(e={},...t){let{breakpoints:n={},palette:r={},spacing:i,shape:a={},...o}=e,s=Er(n),c=Or(i),l=E({breakpoints:s,direction:`ltr`,components:{},palette:{mode:`light`,...r},spacing:c,shape:{...Dr,...a}},o);return l=k(l),l.applyStyles=kr,l=t.reduce((e,t)=>E(e,t),l),l.unstable_sxConfig={...Qe,...o?.unstable_sxConfig},l.unstable_sx=function(e){return nt({sx:e,theme:this})},l}function jr(e){return Object.keys(e).length===0}function Mr(e=null){let t=S.useContext(qn);return!t||jr(t)?e:t}var Nr=Ar();function Pr(e=Nr){return Mr(e)}function Fr(e){let t=wr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Ir({styles:e,themeId:t,defaultTheme:n={}}){let r=Pr(n),i=t&&r[t]||r,a=typeof e==`function`?e(i):e;return i.modularCssLayers&&(a=Array.isArray(a)?a.map(e=>Fr(typeof e==`function`?e(i):e)):Fr(a)),(0,N.jsx)(br,{styles:a})}var Lr=e=>e,Rr=(()=>{let e=Lr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Lr}}})(),zr={active:`active`,checked:`checked`,completed:`completed`,disabled:`disabled`,error:`error`,expanded:`expanded`,focused:`focused`,focusVisible:`focusVisible`,open:`open`,readOnly:`readOnly`,required:`required`,selected:`selected`};function Br(e,t,n=`Mui`){let r=zr[t];return r?`${n}-${r}`:`${Rr.generate(e)}-${t}`}function Vr(e,t,n=`Mui`){let r={};return t.forEach(t=>{r[t]=Br(e,t,n)}),r}function Hr(e){let{variants:t,...n}=e,r={variants:t,style:wr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{typeof e.style!=`function`&&(e.style=wr(e.style))}),r}var Ur=Ar();function Wr(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}function Gr(e,t){return t&&e&&typeof e==`object`&&e.styles&&!e.styles.startsWith(`@layer`)&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Kr(e){return e?(t,n)=>n[e]:null}function qr(e,t,n){e.theme=Zr(e.theme)?n:e.theme[t]||e.theme}function Jr(e,t,n){let r=typeof t==`function`?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Jr(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Gr(r.style,n):r.style;else{let{variants:e,...i}=r;t=n?Gr(wr(i),n):i}return Yr(e,r.variants,[t],n)}return r?.isProcessed?n?Gr(wr(r.style),n):r.style:n?Gr(wr(r),n):r}function Yr(e,t,n=[],r=void 0){let i;variantLoop:for(let a=0;a<t.length;a+=1){let o=t[a];if(typeof o.props==`function`){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(let t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue variantLoop;typeof o.style==`function`?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Gr(wr(o.style(i)),r):o.style(i))):n.push(r?Gr(wr(o.style),r):o.style)}return n}function Xr(e={}){let{themeId:t,defaultTheme:n=Ur,rootShouldForwardProp:r=Wr,slotShouldForwardProp:i=Wr}=e;function a(e){qr(e,t,n)}return(e,t={})=>{Sr(e,e=>e.filter(e=>e!==nt));let{name:n,slot:o,skipVariantsResolver:s,skipSx:c,overridesResolver:l=Kr($r(o)),...u}=t,d=n&&n.startsWith(`Mui`)||o?`components`:`custom`,f=s===void 0?o&&o!==`Root`&&o!==`root`||!1:s,p=c||!1,m=Wr;o===`Root`||o===`root`?m=r:o?m=i:Qr(e)&&(m=void 0);let h=xr(e,{shouldForwardProp:m,label:void 0,...u}),g=e=>{if(e.__emotion_real===e)return e;if(typeof e==`function`)return function(t){return Jr(t,e,t.theme.modularCssLayers?d:void 0)};if(w(e)){let t=Hr(e);return function(e){return t.variants?Jr(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Gr(t.style,d):t.style}}return e},_=(...t)=>{let r=[],i=t.map(g),o=[];if(r.push(a),n&&l&&o.push(function(e){let t=e.theme.components?.[n]?.styleOverrides;if(!t)return null;let r={};for(let n in t)r[n]=Jr(e,t[n],e.theme.modularCssLayers?`theme`:void 0);return l(e,r)}),n&&!f&&o.push(function(e){let t=e.theme?.components?.[n]?.variants;return t?Yr(e,t,[],e.theme.modularCssLayers?`theme`:void 0):null}),p||o.push(nt),Array.isArray(i[0])){let e=i.shift(),t=Array(r.length).fill(``),n=Array(o.length).fill(``),a;a=[...t,...e,...n],a.raw=[...t,...e.raw,...n],r.unshift(a)}let s=[...r,...i,...o],c=h(...s);return e.muiName&&(c.muiName=e.muiName),c};return h.withConfig&&(_.withConfig=h.withConfig),_}}function Zr(e){for(let t in e)return!1;return!0}function Qr(e){return typeof e==`string`&&e.charCodeAt(0)>96}function $r(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ei(e,t,n=!1){let r={...t};for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let a=i;if(a===`components`||a===`slots`)r[a]={...e[a],...r[a]};else if(a===`componentsProps`||a===`slotProps`){let i=e[a],o=t[a];if(!o)r[a]=i||{};else if(!i)r[a]=o;else{r[a]={...o};for(let e in i)if(Object.prototype.hasOwnProperty.call(i,e)){let t=e;r[a][t]=ei(i[t],o[t],n)}}}else a===`className`&&n&&t.className?r.className=g(e?.className,t?.className):a===`style`&&n&&t.style?r.style={...e?.style,...t?.style}:r[a]===void 0&&(r[a]=e[a])}return r}var ti=typeof window<`u`?S.useLayoutEffect:S.useEffect;function ni(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function ri(e,t=0,n=1){return ni(e,t,n)}function ii(e){e=e.slice(1);let t=RegExp(`.{1,${e.length>=6?2:1}}`,`g`),n=e.match(t);return n&&n[0].length===1&&(n=n.map(e=>e+e)),n?`rgb${n.length===4?`a`:``}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(`, `)})`:``}function ai(e){if(e.type)return e;if(e.charAt(0)===`#`)return ai(ii(e));let t=e.indexOf(`(`),n=e.substring(0,t);if(![`rgb`,`rgba`,`hsl`,`hsla`,`color`].includes(n))throw Error(v(9,e));let r=e.substring(t+1,e.length-1),i;if(n===`color`){if(r=r.split(` `),i=r.shift(),r.length===4&&r[3].charAt(0)===`/`&&(r[3]=r[3].slice(1)),![`srgb`,`display-p3`,`a98-rgb`,`prophoto-rgb`,`rec-2020`].includes(i))throw Error(v(10,i))}else r=r.split(`,`);return r=r.map(e=>parseFloat(e)),{type:n,values:r,colorSpace:i}}var oi=e=>{let t=ai(e);return t.values.slice(0,3).map((e,n)=>t.type.includes(`hsl`)&&n!==0?`${e}%`:e).join(` `)},si=(e,t)=>{try{return oi(e)}catch{return e}};function ci(e){let{type:t,colorSpace:n}=e,{values:r}=e;return t.includes(`rgb`)?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes(`hsl`)&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes(`color`)?`${n} ${r.join(` `)}`:`${r.join(`, `)}`,`${t}(${r})`}function li(e){e=ai(e);let{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),o=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1),s=`rgb`,c=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type===`hsla`&&(s+=`a`,c.push(t[3])),ci({type:s,values:c})}function ui(e){e=ai(e);let t=e.type===`hsl`||e.type===`hsla`?ai(li(e)).values:e.values;return t=t.map(t=>(e.type!==`color`&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function di(e,t){let n=ui(e),r=ui(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function fi(e,t){return e=ai(e),t=ri(t),(e.type===`rgb`||e.type===`hsl`)&&(e.type+=`a`),e.type===`color`?e.values[3]=`/${t}`:e.values[3]=t,ci(e)}function pi(e,t,n){try{return fi(e,t)}catch{return e}}function mi(e,t){if(e=ai(e),t=ri(t),e.type.includes(`hsl`))e.values[2]*=1-t;else if(e.type.includes(`rgb`)||e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ci(e)}function hi(e,t,n){try{return mi(e,t)}catch{return e}}function gi(e,t){if(e=ai(e),t=ri(t),e.type.includes(`hsl`))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes(`rgb`))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes(`color`))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ci(e)}function _i(e,t,n){try{return gi(e,t)}catch{return e}}function vi(e,t=.15){return ui(e)>.5?mi(e,t):gi(e,t)}function yi(e,t,n){try{return vi(e,t)}catch{return e}}var bi=S.createContext(null);function xi(){return S.useContext(bi)}var Si=typeof Symbol==`function`&&Symbol.for?Symbol.for(`mui.nested`):`__THEME_NESTED__`;function Ci(e,t){return typeof t==`function`?t(e):{...e,...t}}function wi(e){let{children:t,theme:n}=e,r=xi(),i=S.useMemo(()=>{let e=r===null?{...n}:Ci(r,n);return e!=null&&(e[Si]=r!==null),e},[n,r]);return(0,N.jsx)(bi.Provider,{value:i,children:t})}var Ti=S.createContext();function Ei({value:e,...t}){return(0,N.jsx)(Ti.Provider,{value:e??!0,...t})}var Di=()=>S.useContext(Ti)??!1,Oi=S.createContext(void 0);function ki({value:e,children:t}){return(0,N.jsx)(Oi.Provider,{value:e,children:t})}function Ai(e){let{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;let i=t.components[n];return i.defaultProps?ei(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ei(i,r,t.components.mergeClassNameAndStyle):r}function ji({props:e,name:t}){return Ai({props:e,name:t,theme:{components:S.useContext(Oi)}})}var Mi=0;function Ni(e){let[t,n]=S.useState(e),r=e||t;return S.useEffect(()=>{t??(Mi+=1,n(`mui-${Mi}`))},[t]),r}var Pi={...S}.useId;function Fi(e){if(Pi!==void 0){let t=Pi();return e??t}return Ni(e)}function Ii(e){let t=Mr(),n=Fi()||``,{modularCssLayers:r}=e,i=`mui.global, mui.components, mui.theme, mui.custom, mui.sx`;return i=!r||t!==null?``:typeof r==`string`?r.replace(/mui(?!\.)/g,i):`@layer ${i};`,ti(()=>{let e=document.querySelector(`head`);if(!e)return;let t=e.firstChild;if(i){if(t&&t.hasAttribute?.(`data-mui-layer-order`)&&t.getAttribute(`data-mui-layer-order`)===n)return;let r=document.createElement(`style`);r.setAttribute(`data-mui-layer-order`,n),r.textContent=i,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[i,n]),i?(0,N.jsx)(Ir,{styles:i}):null}var Li={};function Ri(e,t,n,r=!1){return S.useMemo(()=>{let i=e&&t[e]||t;if(typeof n==`function`){let a=n(i),o=e?{...t,[e]:a}:a;return r?()=>o:o}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function zi(e){let{children:t,theme:n,themeId:r}=e,i=Mr(Li),a=xi()||Li,o=Ri(r,i,n),s=Ri(r,a,n,!0),c=(r?o[r]:o).direction===`rtl`,l=Ii(o);return(0,N.jsx)(wi,{theme:s,children:(0,N.jsx)(qn.Provider,{value:o,children:(0,N.jsx)(Ei,{value:c,children:(0,N.jsxs)(ki,{value:r?o[r].components:o.components,children:[l,t]})})})})}var Bi={theme:void 0};function Vi(e){let t,n;return function(r){let i=t;return(i===void 0||r.theme!==n)&&(Bi.theme=r.theme,i=Hr(e(Bi)),t=i,n=r.theme),i}}var Hi=`mode`,Ui=`color-scheme`,Wi=`data-color-scheme`;function Gi(e){let{defaultMode:t=`system`,defaultLightColorScheme:n=`light`,defaultDarkColorScheme:r=`dark`,modeStorageKey:i=Hi,colorSchemeStorageKey:a=Ui,attribute:o=Wi,colorSchemeNode:s=`document.documentElement`,nonce:c}=e||{},l=``,u=o;if(o===`class`&&(u=`.%s`),o===`data`&&(u=`[data-%s]`),u.startsWith(`.`)){let e=u.substring(1);l+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));
|
|
2
2
|
${s}.classList.add('${e}'.replace('%s', colorScheme));`}let d=u.match(/\[([^[\]]+)\]/);if(d){let[e,t]=d[1].split(`=`);t||(l+=`${s}.removeAttribute('${e}'.replace('%s', light));
|
|
3
3
|
${s}.removeAttribute('${e}'.replace('%s', dark));`),l+=`
|
|
4
|
-
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,
|
|
4
|
+
${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:`""`});`}else u!==`.%s`&&(l+=`${s}.setAttribute('${u}', colorScheme);`);return(0,N.jsx)(`script`,{suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(function() {
|
|
5
5
|
try {
|
|
6
6
|
let colorScheme = '';
|
|
7
7
|
const mode = localStorage.getItem('${i}') || '${t}';
|
|
@@ -25,22 +25,22 @@ try {
|
|
|
25
25
|
if (colorScheme) {
|
|
26
26
|
${l}
|
|
27
27
|
}
|
|
28
|
-
} catch(e){}})();`}},`mui-color-scheme-init`)}function ia(){}var aa=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return ia;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function oa(){}function sa(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function ca(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function la(e){return ca(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function ua(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=ea,colorSchemeStorageKey:o=ta,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=aa,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=N.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=N.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=N.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=N.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:sa(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=N.useState(l||!d);N.useEffect(()=>{v(!0)},[]);let y=la(h),b=N.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:sa(r)}})},[f,t]),x=N.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return ca(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),S=N.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),C=N.useRef(S);return C.current=S,N.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>C.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),N.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||oa,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||oa,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||oa;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var da=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function fa(e){let{themeId:t,theme:n={},modeStorageKey:r=ea,colorSchemeStorageKey:i=ta,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=N.createContext(void 0),u=()=>N.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:S=`system`,forceThemeRerender:C=!1,noSsr:w}=e,T=N.useRef(!1),E=Ni(),D=N.useContext(l),O=!!D&&!b,k=N.useMemo(()=>u||(typeof n==`function`?n():n),[u]),A=k[t],j=A||k,{colorSchemes:M=d,components:ee=f,cssVarPrefix:te}=j,ne=Object.keys(M).filter(e=>!!M[e]).join(`,`),re=N.useMemo(()=>ne.split(`,`),[ne]),ie=typeof o==`string`?o:o.light,ae=typeof o==`string`?o:o.dark,{mode:oe,setMode:se,systemMode:ce,lightColorScheme:le,darkColorScheme:ue,colorScheme:de,setColorScheme:fe}=ua({supportedColorSchemes:re,defaultLightColorScheme:ie,defaultDarkColorScheme:ae,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:M[ie]&&M[ae]?S:M[j.defaultColorScheme]?.palette?.mode||j.palette?.mode,storageManager:g,storageWindow:_,noSsr:w}),pe=oe,me=de;O&&(pe=D.mode,me=D.colorScheme);let he=me||j.defaultColorScheme;j.vars&&!C&&(he=j.defaultColorScheme);let ge=N.useMemo(()=>{let e=j.generateThemeVars?.()||j.vars,t={...j,components:ee,colorSchemes:M,cssVarPrefix:te,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),he){let e=M[he];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[j,he,ee,M,te]),_e=j.colorSchemeSelector;pi(()=>{if(me&&y&&_e&&_e!==`media`){let e=_e,t=_e;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...re.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,me));else{let e=t.replace(`%s`,me).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||re.forEach(e=>{y.removeAttribute(t.replace(me,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,me)}}},[me,_e,y,re]),N.useEffect(()=>{let e;if(h&&T.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode(da)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[me,h,v]),N.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);let ve=N.useMemo(()=>({allColorSchemes:re,colorScheme:me,darkColorScheme:ue,lightColorScheme:le,mode:pe,setColorScheme:fe,setMode:se,systemMode:ce}),[re,me,ue,le,pe,fe,se,ce,ge.colorSchemeSelector]),ye=!0;(x||j.cssVariables===!1||O&&E?.cssVarPrefix===te)&&(ye=!1);let be=(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(Zi,{themeId:A?t:void 0,theme:ge,children:c}),ye&&(0,P.jsx)(Mr,{styles:ge.generateStyleSheets?.()||[]})]});return O?be:(0,P.jsx)(l.Provider,{value:ve,children:be})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>ra({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function pa(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var ma=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},ha=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},ga=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function _a(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return ha(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=ga(e,t);Object.assign(i,{[r]:c}),ma(a,e,`var(${r})`,s),ma(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function va(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=_a(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=_a(n,t);p=ae(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=_a(h,t);p=ae(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=ae(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function ya(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function ba(e,t){return N.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var xa={black:`#000`,white:`#fff`},Sa={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},Ca={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},wa={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},Ta={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},Ea={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},Da={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},Oa={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function ka(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:xa.white,default:xa.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var Aa=ka();function ja(){return{text:{primary:xa.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:xa.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var Ma=ja();function Na(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=Oi(e.main,i):t===`dark`&&(e.dark=Ei(e.main,a)))}function Pa(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function Fa(e=`light`){return e===`dark`?{main:Ea[200],light:Ea[50],dark:Ea[400]}:{main:Ea[700],light:Ea[400],dark:Ea[800]}}function Ia(e=`light`){return e===`dark`?{main:Ca[200],light:Ca[50],dark:Ca[400]}:{main:Ca[500],light:Ca[300],dark:Ca[700]}}function La(e=`light`){return e===`dark`?{main:wa[500],light:wa[300],dark:wa[700]}:{main:wa[700],light:wa[400],dark:wa[800]}}function Ra(e=`light`){return e===`dark`?{main:Da[400],light:Da[300],dark:Da[700]}:{main:Da[700],light:Da[500],dark:Da[900]}}function za(e=`light`){return e===`dark`?{main:Oa[400],light:Oa[300],dark:Oa[700]}:{main:Oa[800],light:Oa[500],dark:Oa[900]}}function Ba(e=`light`){return e===`dark`?{main:Ta[400],light:Ta[300],dark:Ta[700]}:{main:`#ed6c02`,light:Ta[500],dark:Ta[900]}}function Va(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Ha(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||Fa(t),s=e.secondary||Ia(t),c=e.error||La(t),l=e.info||Ra(t),u=e.success||za(t),d=e.warning||Ba(t);function f(e){return i?Va(e):Ci(e,Ma.text.primary)>=n?Ma.text.primary:Aa.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(j(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(j(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(Pa(i,e,`light`,a,r),Pa(i,e,`dark`,o,r)):(Na(e,`light`,a,r),Na(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=ka():t===`dark`&&(m=ja()),ae({common:{...xa},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:Sa,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function Ua(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Wa(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Ga(e){return Math.round(e*1e5)/1e5}var Ka={textTransform:`uppercase`},qa=`"Roboto", "Helvetica", "Arial", sans-serif`;function Ja(e,t){let{fontFamily:n=qa,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===qa?{letterSpacing:`${Ga(i/t)}em`}:{},...a,...l});return ae({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Ka),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Ka),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var Ya=.2,Xa=.14,Za=.12;function Qa(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Ya})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Xa})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Za})`].join(`,`)}var $a=[`none`,Qa(0,2,1,-1,0,1,1,0,0,1,3,0),Qa(0,3,1,-2,0,2,2,0,0,1,5,0),Qa(0,3,3,-2,0,3,4,0,0,1,8,0),Qa(0,2,4,-1,0,4,5,0,0,1,10,0),Qa(0,3,5,-1,0,5,8,0,0,1,14,0),Qa(0,3,5,-1,0,6,10,0,0,1,18,0),Qa(0,4,5,-2,0,7,10,1,0,2,16,1),Qa(0,5,5,-3,0,8,10,1,0,3,14,2),Qa(0,5,6,-3,0,9,12,1,0,3,16,2),Qa(0,6,6,-3,0,10,14,1,0,4,18,3),Qa(0,6,7,-4,0,11,15,1,0,4,20,3),Qa(0,7,8,-4,0,12,17,2,0,5,22,4),Qa(0,7,8,-4,0,13,19,2,0,5,24,4),Qa(0,7,9,-4,0,14,21,2,0,5,26,4),Qa(0,8,9,-5,0,15,22,2,0,6,28,5),Qa(0,8,10,-5,0,16,24,2,0,6,30,5),Qa(0,8,11,-5,0,17,26,2,0,6,32,5),Qa(0,9,11,-5,0,18,28,2,0,7,34,6),Qa(0,9,12,-6,0,19,29,2,0,7,36,6),Qa(0,10,13,-6,0,20,31,3,0,8,38,7),Qa(0,10,13,-6,0,21,33,3,0,8,40,7),Qa(0,10,14,-6,0,22,35,3,0,8,42,7),Qa(0,11,14,-7,0,23,36,3,0,9,44,8),Qa(0,11,15,-7,0,24,38,3,0,9,46,8)],eo={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},to={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function no(e){return`${Math.round(e)}ms`}function ro(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function io(e){let t={...eo,...e.easing},n={...to,...e.duration};return{getAutoHeightDuration:ro,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:no(i)} ${a} ${typeof o==`string`?o:no(o)}`).join(`,`)},...e,easing:t,duration:n}}var ao={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function oo(e){return re(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function so(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!oo(a)||i.startsWith(`unstable_`)?delete e[i]:re(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
28
|
+
} catch(e){}})();`}},`mui-color-scheme-init`)}function Ki(){}var qi=({key:e,storageWindow:t})=>(!t&&typeof window<`u`&&(t=window),{get(n){if(typeof window>`u`)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Ki;let r=t=>{let r=t.newValue;t.key===e&&n(r)};return t.addEventListener(`storage`,r),()=>{t.removeEventListener(`storage`,r)}}});function Ji(){}function Yi(e){if(typeof window<`u`&&typeof window.matchMedia==`function`&&e===`system`)return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Xi(e,t){if(e.mode===`light`||e.mode===`system`&&e.systemMode===`light`)return t(`light`);if(e.mode===`dark`||e.mode===`system`&&e.systemMode===`dark`)return t(`dark`)}function Zi(e){return Xi(e,t=>{if(t===`light`)return e.lightColorScheme;if(t===`dark`)return e.darkColorScheme})}function Qi(e){let{defaultMode:t=`light`,defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:a=Hi,colorSchemeStorageKey:o=Ui,storageWindow:s=typeof window>`u`?void 0:window,storageManager:c=qi,noSsr:l=!1}=e,u=i.join(`,`),d=i.length>1,f=S.useMemo(()=>c?.({key:a,storageWindow:s}),[c,a,s]),p=S.useMemo(()=>c?.({key:`${o}-light`,storageWindow:s}),[c,o,s]),m=S.useMemo(()=>c?.({key:`${o}-dark`,storageWindow:s}),[c,o,s]),[h,g]=S.useState(()=>{let e=f?.get(t)||t,i=p?.get(n)||n,a=m?.get(r)||r;return{mode:e,systemMode:Yi(e),lightColorScheme:i,darkColorScheme:a}}),[_,v]=S.useState(l||!d);S.useEffect(()=>{v(!0)},[]);let y=Zi(h),b=S.useCallback(e=>{g(n=>{if(e===n.mode)return n;let r=e??t;return f?.set(r),{...n,mode:r,systemMode:Yi(r)}})},[f,t]),x=S.useCallback(e=>{e?typeof e==`string`?e&&!u.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):g(t=>{let n={...t};return Xi(t,t=>{t===`light`&&(p?.set(e),n.lightColorScheme=e),t===`dark`&&(m?.set(e),n.darkColorScheme=e)}),n}):g(t=>{let i={...t},a=e.light===null?n:e.light,o=e.dark===null?r:e.dark;return a&&(u.includes(a)?(i.lightColorScheme=a,p?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),o&&(u.includes(o)?(i.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),i}):g(e=>(p?.set(n),m?.set(r),{...e,lightColorScheme:n,darkColorScheme:r}))},[u,p,m,n,r]),C=S.useCallback(e=>{h.mode===`system`&&g(t=>{let n=e?.matches?`dark`:`light`;return t.systemMode===n?t:{...t,systemMode:n}})},[h.mode]),w=S.useRef(C);return w.current=C,S.useEffect(()=>{if(typeof window.matchMedia!=`function`||!d)return;let e=(...e)=>w.current(...e),t=window.matchMedia(`(prefers-color-scheme: dark)`);return t.addListener(e),e(t),()=>{t.removeListener(e)}},[d]),S.useEffect(()=>{if(d){let e=f?.subscribe(e=>{(!e||[`light`,`dark`,`system`].includes(e))&&b(e||t)})||Ji,n=p?.subscribe(e=>{(!e||u.match(e))&&x({light:e})})||Ji,r=m?.subscribe(e=>{(!e||u.match(e))&&x({dark:e})})||Ji;return()=>{e(),n(),r()}}},[x,b,u,t,s,d,f,p,m]),{...h,mode:_?h.mode:void 0,systemMode:_?h.systemMode:void 0,colorScheme:_?y:void 0,setMode:b,setColorScheme:x}}var $i=`*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`;function ea(e){let{themeId:t,theme:n={},modeStorageKey:r=Hi,colorSchemeStorageKey:i=Ui,disableTransitionOnChange:a=!1,defaultColorScheme:o,resolveTheme:s}=e,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},l=S.createContext(void 0),u=()=>S.useContext(l)||c,d={},f={};function p(e){let{children:c,theme:u,modeStorageKey:p=r,colorSchemeStorageKey:m=i,disableTransitionOnChange:h=a,storageManager:g,storageWindow:_=typeof window>`u`?void 0:window,documentNode:v=typeof document>`u`?void 0:document,colorSchemeNode:y=typeof document>`u`?void 0:document.documentElement,disableNestedContext:b=!1,disableStyleSheetGeneration:x=!1,defaultMode:C=`system`,forceThemeRerender:w=!1,noSsr:T}=e,E=S.useRef(!1),ee=xi(),D=S.useContext(l),O=!!D&&!b,te=S.useMemo(()=>u||(typeof n==`function`?n():n),[u]),k=te[t],A=k||te,{colorSchemes:j=d,components:M=f,cssVarPrefix:ne}=A,re=Object.keys(j).filter(e=>!!j[e]).join(`,`),ie=S.useMemo(()=>re.split(`,`),[re]),ae=typeof o==`string`?o:o.light,oe=typeof o==`string`?o:o.dark,{mode:se,setMode:ce,systemMode:le,lightColorScheme:ue,darkColorScheme:de,colorScheme:fe,setColorScheme:pe}=Qi({supportedColorSchemes:ie,defaultLightColorScheme:ae,defaultDarkColorScheme:oe,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:j[ae]&&j[oe]?C:j[A.defaultColorScheme]?.palette?.mode||A.palette?.mode,storageManager:g,storageWindow:_,noSsr:T}),me=se,he=fe;O&&(me=D.mode,he=D.colorScheme);let ge=he||A.defaultColorScheme;A.vars&&!w&&(ge=A.defaultColorScheme);let _e=S.useMemo(()=>{let e=A.generateThemeVars?.()||A.vars,t={...A,components:M,colorSchemes:j,cssVarPrefix:ne,vars:e};if(typeof t.generateSpacing==`function`&&(t.spacing=t.generateSpacing()),ge){let e=j[ge];e&&typeof e==`object`&&Object.keys(e).forEach(n=>{e[n]&&typeof e[n]==`object`?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return s?s(t):t},[A,ge,M,j,ne]),ve=A.colorSchemeSelector;ti(()=>{if(he&&y&&ve&&ve!==`media`){let e=ve,t=ve;if(e===`class`&&(t=`.%s`),e===`data`&&(t=`[data-%s]`),e?.startsWith(`data-`)&&!e.includes(`%s`)&&(t=`[${e}="%s"]`),t.startsWith(`.`))y.classList.remove(...ie.map(e=>t.substring(1).replace(`%s`,e))),y.classList.add(t.substring(1).replace(`%s`,he));else{let e=t.replace(`%s`,he).match(/\[([^\]]+)\]/);if(e){let[t,n]=e[1].split(`=`);n||ie.forEach(e=>{y.removeAttribute(t.replace(he,e))}),y.setAttribute(t,n?n.replace(/"|'/g,``):``)}else y.setAttribute(t,he)}}},[he,ve,y,ie]),S.useEffect(()=>{let e;if(h&&E.current&&v){let t=v.createElement(`style`);t.appendChild(v.createTextNode($i)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[he,h,v]),S.useEffect(()=>(E.current=!0,()=>{E.current=!1}),[]);let ye=S.useMemo(()=>({allColorSchemes:ie,colorScheme:he,darkColorScheme:de,lightColorScheme:ue,mode:me,setColorScheme:pe,setMode:ce,systemMode:le}),[ie,he,de,ue,me,pe,ce,le,_e.colorSchemeSelector]),be=!0;(x||A.cssVariables===!1||O&&ee?.cssVarPrefix===ne)&&(be=!1);let xe=(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(zi,{themeId:k?t:void 0,theme:_e,children:c}),be&&(0,N.jsx)(br,{styles:_e.generateStyleSheets?.()||[]})]});return O?xe:(0,N.jsx)(l.Provider,{value:ye,children:xe})}let m=typeof o==`string`?o:o.light,h=typeof o==`string`?o:o.dark;return{CssVarsProvider:p,useColorScheme:u,getInitColorSchemeScript:e=>Gi({colorSchemeStorageKey:i,defaultLightColorScheme:m,defaultDarkColorScheme:h,modeStorageKey:r,...e})}}function ta(e=``){function t(...n){if(!n.length)return``;let r=n[0];return typeof r==`string`&&!r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:``}${r}${t(...n.slice(1))})`:`, ${r}`}return(n,...r)=>`var(--${e?`${e}-`:``}${n}${t(...r)})`}var na=(e,t,n,r=[])=>{let i=e;t.forEach((e,a)=>{a===t.length-1?Array.isArray(i)?i[Number(e)]=n:i&&typeof i==`object`&&(i[e]=n):i&&typeof i==`object`&&(i[e]||(i[e]=r.includes(e)?[]:{}),i=i[e])})},ra=(e,t,n)=>{function r(e,i=[],a=[]){Object.entries(e).forEach(([e,o])=>{(!n||n&&!n([...i,e]))&&o!=null&&(typeof o==`object`&&Object.keys(o).length>0?r(o,[...i,e],Array.isArray(o)?[...a,e]:a):t([...i,e],o,a))})}r(e)},ia=(e,t)=>typeof t==`number`?[`lineHeight`,`fontWeight`,`opacity`,`zIndex`].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes(`opacity`)?t:`${t}px`:t;function aa(e,t){let{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},a={},o={};return ra(e,(e,t,s)=>{if((typeof t==`string`||typeof t==`number`)&&(!r||!r(e,t))){let r=`--${n?`${n}-`:``}${e.join(`-`)}`,c=ia(e,t);Object.assign(i,{[r]:c}),na(a,e,`var(${r})`,s),na(o,e,`var(${r}, ${c})`,s)}},e=>e[0]===`vars`),{css:i,vars:a,varsWithDefaults:o}}function oa(e,t={}){let{getSelector:n=_,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:c=`light`,...l}=e,{vars:u,css:d,varsWithDefaults:f}=aa(l,t),p=f,m={},{[c]:h,...g}=o;if(Object.entries(g||{}).forEach(([e,n])=>{let{vars:r,css:i,varsWithDefaults:a}=aa(n,t);p=E(p,a),m[e]={css:i,vars:r}}),h){let{css:e,vars:n,varsWithDefaults:r}=aa(h,t);p=E(p,r),m[c]={css:e,vars:n}}function _(t,n){let r=i;if(i===`class`&&(r=`.%s`),i===`data`&&(r=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(r=`[${i}="%s"]`),t){if(r===`media`)return e.defaultColorScheme===t?`:root`:{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":n}};if(r)return e.defaultColorScheme===t?`:root, ${r.replace(`%s`,String(t))}`:r.replace(`%s`,String(t))}return`:root`}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(m).forEach(([,{vars:t}])=>{e=E(e,t)}),e},generateStyleSheets:()=>{let t=[],i=e.defaultColorScheme||`light`;function s(e,n){Object.keys(n).length&&t.push(typeof e==`string`?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);let{[i]:c,...l}=m;if(c){let{css:e}=c,t=o[i]?.palette?.mode,a=!r&&t?{colorScheme:t,...e}:{...e};s(n(i,{...a}),a)}return Object.entries(l).forEach(([e,{css:t}])=>{let i=o[e]?.palette?.mode,a=!r&&i?{colorScheme:i,...t}:{...t};s(n(e,{...a}),a)}),a&&t.push({":root":{"--__l-threshold":`0.7`,"--__l":`clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)`,"--__a":`clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)`}}),t}}}function sa(e){return function(t){return e===`media`?`@media (prefers-color-scheme: ${t})`:e?e.startsWith(`data-`)&&!e.includes(`%s`)?`[${e}="${t}"] &`:e===`class`?`.${t} &`:e===`data`?`[data-${t}] &`:`${e.replace(`%s`,t)} &`:`&`}}function ca(e,t){return S.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}var la={black:`#000`,white:`#fff`},ua={50:`#fafafa`,100:`#f5f5f5`,200:`#eeeeee`,300:`#e0e0e0`,400:`#bdbdbd`,500:`#9e9e9e`,600:`#757575`,700:`#616161`,800:`#424242`,900:`#212121`,A100:`#f5f5f5`,A200:`#eeeeee`,A400:`#bdbdbd`,A700:`#616161`},da={50:`#f3e5f5`,100:`#e1bee7`,200:`#ce93d8`,300:`#ba68c8`,400:`#ab47bc`,500:`#9c27b0`,600:`#8e24aa`,700:`#7b1fa2`,800:`#6a1b9a`,900:`#4a148c`,A100:`#ea80fc`,A200:`#e040fb`,A400:`#d500f9`,A700:`#aa00ff`},fa={50:`#ffebee`,100:`#ffcdd2`,200:`#ef9a9a`,300:`#e57373`,400:`#ef5350`,500:`#f44336`,600:`#e53935`,700:`#d32f2f`,800:`#c62828`,900:`#b71c1c`,A100:`#ff8a80`,A200:`#ff5252`,A400:`#ff1744`,A700:`#d50000`},pa={50:`#fff3e0`,100:`#ffe0b2`,200:`#ffcc80`,300:`#ffb74d`,400:`#ffa726`,500:`#ff9800`,600:`#fb8c00`,700:`#f57c00`,800:`#ef6c00`,900:`#e65100`,A100:`#ffd180`,A200:`#ffab40`,A400:`#ff9100`,A700:`#ff6d00`},ma={50:`#e3f2fd`,100:`#bbdefb`,200:`#90caf9`,300:`#64b5f6`,400:`#42a5f5`,500:`#2196f3`,600:`#1e88e5`,700:`#1976d2`,800:`#1565c0`,900:`#0d47a1`,A100:`#82b1ff`,A200:`#448aff`,A400:`#2979ff`,A700:`#2962ff`},ha={50:`#e1f5fe`,100:`#b3e5fc`,200:`#81d4fa`,300:`#4fc3f7`,400:`#29b6f6`,500:`#03a9f4`,600:`#039be5`,700:`#0288d1`,800:`#0277bd`,900:`#01579b`,A100:`#80d8ff`,A200:`#40c4ff`,A400:`#00b0ff`,A700:`#0091ea`},ga={50:`#e8f5e9`,100:`#c8e6c9`,200:`#a5d6a7`,300:`#81c784`,400:`#66bb6a`,500:`#4caf50`,600:`#43a047`,700:`#388e3c`,800:`#2e7d32`,900:`#1b5e20`,A100:`#b9f6ca`,A200:`#69f0ae`,A400:`#00e676`,A700:`#00c853`};function _a(){return{text:{primary:`rgba(0, 0, 0, 0.87)`,secondary:`rgba(0, 0, 0, 0.6)`,disabled:`rgba(0, 0, 0, 0.38)`},divider:`rgba(0, 0, 0, 0.12)`,background:{paper:la.white,default:la.white},action:{active:`rgba(0, 0, 0, 0.54)`,hover:`rgba(0, 0, 0, 0.04)`,hoverOpacity:.04,selected:`rgba(0, 0, 0, 0.08)`,selectedOpacity:.08,disabled:`rgba(0, 0, 0, 0.26)`,disabledBackground:`rgba(0, 0, 0, 0.12)`,disabledOpacity:.38,focus:`rgba(0, 0, 0, 0.12)`,focusOpacity:.12,activatedOpacity:.12}}}var va=_a();function ya(){return{text:{primary:la.white,secondary:`rgba(255, 255, 255, 0.7)`,disabled:`rgba(255, 255, 255, 0.5)`,icon:`rgba(255, 255, 255, 0.5)`},divider:`rgba(255, 255, 255, 0.12)`,background:{paper:`#121212`,default:`#121212`},action:{active:la.white,hover:`rgba(255, 255, 255, 0.08)`,hoverOpacity:.08,selected:`rgba(255, 255, 255, 0.16)`,selectedOpacity:.16,disabled:`rgba(255, 255, 255, 0.3)`,disabledBackground:`rgba(255, 255, 255, 0.12)`,disabledOpacity:.38,focus:`rgba(255, 255, 255, 0.12)`,focusOpacity:.12,activatedOpacity:.24}}}var ba=ya();function xa(e,t,n,r){let i=r.light||r,a=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t===`light`?e.light=gi(e.main,i):t===`dark`&&(e.dark=mi(e.main,a)))}function Sa(e,t,n,r,i){let a=i.light||i,o=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n===`light`?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:n===`dark`&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function Ca(e=`light`){return e===`dark`?{main:ma[200],light:ma[50],dark:ma[400]}:{main:ma[700],light:ma[400],dark:ma[800]}}function wa(e=`light`){return e===`dark`?{main:da[200],light:da[50],dark:da[400]}:{main:da[500],light:da[300],dark:da[700]}}function Ta(e=`light`){return e===`dark`?{main:fa[500],light:fa[300],dark:fa[700]}:{main:fa[700],light:fa[400],dark:fa[800]}}function Ea(e=`light`){return e===`dark`?{main:ha[400],light:ha[300],dark:ha[700]}:{main:ha[700],light:ha[500],dark:ha[900]}}function Da(e=`light`){return e===`dark`?{main:ga[400],light:ga[300],dark:ga[700]}:{main:ga[800],light:ga[500],dark:ga[900]}}function Oa(e=`light`){return e===`dark`?{main:pa[400],light:pa[300],dark:pa[700]}:{main:`#ed6c02`,light:pa[500],dark:pa[900]}}function ka(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Aa(e){let{mode:t=`light`,contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...a}=e,o=e.primary||Ca(t),s=e.secondary||wa(t),c=e.error||Ta(t),l=e.info||Ea(t),u=e.success||Da(t),d=e.warning||Oa(t);function f(e){return i?ka(e):di(e,ba.text.primary)>=n?ba.text.primary:va.text.primary}let p=({color:e,name:t,mainShade:n=500,lightShade:a=300,darkShade:o=700})=>{if(e={...e},!e.main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty(`main`))throw Error(v(11,t?` (${t})`:``,n));if(typeof e.main!=`string`)throw Error(v(12,t?` (${t})`:``,JSON.stringify(e.main)));return i?(Sa(i,e,`light`,a,r),Sa(i,e,`dark`,o,r)):(xa(e,`light`,a,r),xa(e,`dark`,o,r)),e.contrastText||=f(e.main),e},m;return t===`light`?m=_a():t===`dark`&&(m=ya()),E({common:{...la},mode:t,primary:p({color:o,name:`primary`}),secondary:p({color:s,name:`secondary`,mainShade:`A400`,lightShade:`A200`,darkShade:`A700`}),error:p({color:c,name:`error`}),warning:p({color:d,name:`warning`}),info:p({color:l,name:`info`}),success:p({color:u,name:`success`}),grey:ua,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...m},a)}function ja(e){let t={};return Object.entries(e).forEach(e=>{let[n,r]=e;typeof r==`object`&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:``}${r.fontVariant?`${r.fontVariant} `:``}${r.fontWeight?`${r.fontWeight} `:``}${r.fontStretch?`${r.fontStretch} `:``}${r.fontSize||``}${r.lineHeight?`/${r.lineHeight} `:``}${r.fontFamily||``}`)}),t}function Ma(e,t){return{toolbar:{minHeight:56,[e.up(`xs`)]:{"@media (orientation: landscape)":{minHeight:48}},[e.up(`sm`)]:{minHeight:64}},...t}}function Na(e){return Math.round(e*1e5)/1e5}var Pa={textTransform:`uppercase`},Fa=`"Roboto", "Helvetica", "Arial", sans-serif`;function Ia(e,t){let{fontFamily:n=Fa,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:o=500,fontWeightBold:s=700,htmlFontSize:c=16,allVariants:l,pxToRem:u,...d}=typeof t==`function`?t(e):t,f=r/14,p=u||(e=>`${e/c*f}rem`),m=(e,t,r,i,a)=>({fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Fa?{letterSpacing:`${Na(i/t)}em`}:{},...a,...l});return E({htmlFontSize:c,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:o,fontWeightBold:s,h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(o,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(o,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(o,14,1.75,.4,Pa),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Pa),inherit:{fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},d,{clone:!1})}var La=.2,Ra=.14,za=.12;function Ba(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${La})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ra})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${za})`].join(`,`)}var Va=[`none`,Ba(0,2,1,-1,0,1,1,0,0,1,3,0),Ba(0,3,1,-2,0,2,2,0,0,1,5,0),Ba(0,3,3,-2,0,3,4,0,0,1,8,0),Ba(0,2,4,-1,0,4,5,0,0,1,10,0),Ba(0,3,5,-1,0,5,8,0,0,1,14,0),Ba(0,3,5,-1,0,6,10,0,0,1,18,0),Ba(0,4,5,-2,0,7,10,1,0,2,16,1),Ba(0,5,5,-3,0,8,10,1,0,3,14,2),Ba(0,5,6,-3,0,9,12,1,0,3,16,2),Ba(0,6,6,-3,0,10,14,1,0,4,18,3),Ba(0,6,7,-4,0,11,15,1,0,4,20,3),Ba(0,7,8,-4,0,12,17,2,0,5,22,4),Ba(0,7,8,-4,0,13,19,2,0,5,24,4),Ba(0,7,9,-4,0,14,21,2,0,5,26,4),Ba(0,8,9,-5,0,15,22,2,0,6,28,5),Ba(0,8,10,-5,0,16,24,2,0,6,30,5),Ba(0,8,11,-5,0,17,26,2,0,6,32,5),Ba(0,9,11,-5,0,18,28,2,0,7,34,6),Ba(0,9,12,-6,0,19,29,2,0,7,36,6),Ba(0,10,13,-6,0,20,31,3,0,8,38,7),Ba(0,10,13,-6,0,21,33,3,0,8,40,7),Ba(0,10,14,-6,0,22,35,3,0,8,42,7),Ba(0,11,14,-7,0,23,36,3,0,9,44,8),Ba(0,11,15,-7,0,24,38,3,0,9,46,8)],Ha={easeInOut:`cubic-bezier(0.4, 0, 0.2, 1)`,easeOut:`cubic-bezier(0.0, 0, 0.2, 1)`,easeIn:`cubic-bezier(0.4, 0, 1, 1)`,sharp:`cubic-bezier(0.4, 0, 0.6, 1)`},Ua={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Wa(e){return`${Math.round(e)}ms`}function Ga(e){if(!e)return 0;let t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ka(e){let t={...Ha,...e.easing},n={...Ua,...e.duration};return{getAutoHeightDuration:Ga,create:(e=[`all`],r={})=>{let{duration:i=n.standard,easing:a=t.easeInOut,delay:o=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${typeof i==`string`?i:Wa(i)} ${a} ${typeof o==`string`?o:Wa(o)}`).join(`,`)},...e,easing:t,duration:n}}var qa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Ja(e){return w(e)||e===void 0||typeof e==`string`||typeof e==`boolean`||typeof e==`number`||Array.isArray(e)}function Ya(e={}){let t={...e};function n(e){let t=Object.entries(e);for(let r=0;r<t.length;r++){let[i,a]=t[r];!Ja(a)||i.startsWith(`unstable_`)?delete e[i]:w(a)&&(e[i]={...a},n(e[i]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
29
29
|
|
|
30
30
|
const theme = ${JSON.stringify(t,null,2)};
|
|
31
31
|
|
|
32
32
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
33
33
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
34
34
|
|
|
35
|
-
export default theme;`}function
|
|
36
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function wo(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var To=e=>{try{return e()}catch{}},Eo=(e=`mui`)=>pa(e);function Do(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=_o({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=fo({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...ho(a),...n?.opacity},overlays:n?.overlays||go(a)},s}function Oo(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=vo,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=Eo(a),{[f]:m,light:h,dark:g,..._}=n,v={..._},y=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(y=!0),!y)throw Error(j(21,f));let b;o&&(b=`oklch`);let x=Do(b,v,y,u,f);h&&!v.light&&Do(b,v,h,void 0,`light`),g&&!v.dark&&Do(b,v,g,void 0,`dark`);let S={defaultColorScheme:f,...x,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:v,font:{...Ua(x.typography),...x.font},spacing:wo(u.spacing)};Object.keys(S.colorSchemes).forEach(e=>{let t=S.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(F(t.common,`background`,`#fff`),F(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(F(t.common,`background`,`#000`),F(t.common,`onBackground`,`#fff`));function r(e,t,n){if(b){let r;return e===Ti&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===Di&&(r=`#000 ${(n*100).toFixed(0)}%`),e===ki&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${b}, ${t}, ${r})`}return e(t,n)}if(xo(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){F(t.Alert,`errorColor`,r(Di,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(Di,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(Di,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(Di,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-main`)),F(t.Alert,`infoFilledBg`,n(`palette-info-main`)),F(t.Alert,`successFilledBg`,n(`palette-success-main`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),F(t.Alert,`errorFilledColor`,To(()=>t.getContrastText(t.error.main))),F(t.Alert,`infoFilledColor`,To(()=>t.getContrastText(t.info.main))),F(t.Alert,`successFilledColor`,To(()=>t.getContrastText(t.success.main))),F(t.Alert,`warningFilledColor`,To(()=>t.getContrastText(t.warning.main))),F(t.Alert,`errorStandardBg`,r(ki,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(ki,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(ki,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(ki,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-100`)),F(t.Avatar,`defaultBg`,n(`palette-grey-400`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),F(t.Chip,`defaultBorder`,n(`palette-grey-400`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),F(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),F(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),F(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),F(t.LinearProgress,`primaryBg`,r(ki,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.LinearProgress,`secondaryBg`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.LinearProgress,`errorBg`,r(ki,o?p(`palette-error-main`):t.error.main,.62)),F(t.LinearProgress,`infoBg`,r(ki,o?p(`palette-info-main`):t.info.main,.62)),F(t.LinearProgress,`successBg`,r(ki,o?p(`palette-success-main`):t.success.main,.62)),F(t.LinearProgress,`warningBg`,r(ki,o?p(`palette-warning-light`):t.warning.main,.62)),F(t.Skeleton,`bg`,b?r(Ti,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),F(t.Slider,`primaryTrack`,r(ki,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Slider,`secondaryTrack`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Slider,`errorTrack`,r(ki,o?p(`palette-error-main`):t.error.main,.62)),F(t.Slider,`infoTrack`,r(ki,o?p(`palette-info-main`):t.info.main,.62)),F(t.Slider,`successTrack`,r(ki,o?p(`palette-success-main`):t.success.main,.62)),F(t.Slider,`warningTrack`,r(ki,o?p(`palette-warning-main`):t.warning.main,.62));let e=b?r(Di,o?p(`palette-background-default`):t.background.default,.6825):ji(t.background.default,.8);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,To(()=>b?Ma.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,ji(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-400`)),F(t.StepContent,`border`,n(`palette-grey-400`)),F(t.Switch,`defaultColor`,n(`palette-common-white`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),F(t.Switch,`primaryDisabledColor`,r(ki,o?p(`palette-primary-main`):t.primary.main,.62)),F(t.Switch,`secondaryDisabledColor`,r(ki,o?p(`palette-secondary-main`):t.secondary.main,.62)),F(t.Switch,`errorDisabledColor`,r(ki,o?p(`palette-error-main`):t.error.main,.62)),F(t.Switch,`infoDisabledColor`,r(ki,o?p(`palette-info-main`):t.info.main,.62)),F(t.Switch,`successDisabledColor`,r(ki,o?p(`palette-success-main`):t.success.main,.62)),F(t.Switch,`warningDisabledColor`,r(ki,o?p(`palette-warning-main`):t.warning.main,.62)),F(t.TableCell,`border`,r(ki,Ti(o?p(`palette-divider`):t.divider,1),.88)),F(t.Tooltip,`bg`,r(Ti,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){F(t.Alert,`errorColor`,r(ki,o?p(`palette-error-light`):t.error.light,.6)),F(t.Alert,`infoColor`,r(ki,o?p(`palette-info-light`):t.info.light,.6)),F(t.Alert,`successColor`,r(ki,o?p(`palette-success-light`):t.success.light,.6)),F(t.Alert,`warningColor`,r(ki,o?p(`palette-warning-light`):t.warning.light,.6)),F(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),F(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),F(t.Alert,`successFilledBg`,n(`palette-success-dark`)),F(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),F(t.Alert,`errorFilledColor`,To(()=>t.getContrastText(t.error.dark))),F(t.Alert,`infoFilledColor`,To(()=>t.getContrastText(t.info.dark))),F(t.Alert,`successFilledColor`,To(()=>t.getContrastText(t.success.dark))),F(t.Alert,`warningFilledColor`,To(()=>t.getContrastText(t.warning.dark))),F(t.Alert,`errorStandardBg`,r(Di,o?p(`palette-error-light`):t.error.light,.9)),F(t.Alert,`infoStandardBg`,r(Di,o?p(`palette-info-light`):t.info.light,.9)),F(t.Alert,`successStandardBg`,r(Di,o?p(`palette-success-light`):t.success.light,.9)),F(t.Alert,`warningStandardBg`,r(Di,o?p(`palette-warning-light`):t.warning.light,.9)),F(t.Alert,`errorIconColor`,n(`palette-error-main`)),F(t.Alert,`infoIconColor`,n(`palette-info-main`)),F(t.Alert,`successIconColor`,n(`palette-success-main`)),F(t.Alert,`warningIconColor`,n(`palette-warning-main`)),F(t.AppBar,`defaultBg`,n(`palette-grey-900`)),F(t.AppBar,`darkBg`,n(`palette-background-paper`)),F(t.AppBar,`darkColor`,n(`palette-text-primary`)),F(t.Avatar,`defaultBg`,n(`palette-grey-600`)),F(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),F(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),F(t.Chip,`defaultBorder`,n(`palette-grey-700`)),F(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),F(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),F(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),F(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),F(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),F(t.LinearProgress,`primaryBg`,r(Di,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.LinearProgress,`secondaryBg`,r(Di,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.LinearProgress,`errorBg`,r(Di,o?p(`palette-error-main`):t.error.main,.5)),F(t.LinearProgress,`infoBg`,r(Di,o?p(`palette-info-main`):t.info.main,.5)),F(t.LinearProgress,`successBg`,r(Di,o?p(`palette-success-main`):t.success.main,.5)),F(t.LinearProgress,`warningBg`,r(Di,o?p(`palette-warning-main`):t.warning.main,.5)),F(t.Skeleton,`bg`,b?r(Ti,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),F(t.Slider,`primaryTrack`,r(Di,o?p(`palette-primary-main`):t.primary.main,.5)),F(t.Slider,`secondaryTrack`,r(Di,o?p(`palette-secondary-main`):t.secondary.main,.5)),F(t.Slider,`errorTrack`,r(Di,o?p(`palette-error-main`):t.error.main,.5)),F(t.Slider,`infoTrack`,r(Di,o?p(`palette-info-main`):t.info.main,.5)),F(t.Slider,`successTrack`,r(Di,o?p(`palette-success-main`):t.success.main,.5)),F(t.Slider,`warningTrack`,r(Di,o?p(`palette-warning-light`):t.warning.main,.5));let e=b?r(ki,o?p(`palette-background-default`):t.background.default,.985):ji(t.background.default,.98);F(t.SnackbarContent,`bg`,e),F(t.SnackbarContent,`color`,To(()=>b?Aa.text.primary:t.getContrastText(e))),F(t.SpeedDialAction,`fabHoverBg`,ji(t.background.paper,.15)),F(t.StepConnector,`border`,n(`palette-grey-600`)),F(t.StepContent,`border`,n(`palette-grey-600`)),F(t.Switch,`defaultColor`,n(`palette-grey-300`)),F(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),F(t.Switch,`primaryDisabledColor`,r(Di,o?p(`palette-primary-main`):t.primary.main,.55)),F(t.Switch,`secondaryDisabledColor`,r(Di,o?p(`palette-secondary-main`):t.secondary.main,.55)),F(t.Switch,`errorDisabledColor`,r(Di,o?p(`palette-error-main`):t.error.main,.55)),F(t.Switch,`infoDisabledColor`,r(Di,o?p(`palette-info-main`):t.info.main,.55)),F(t.Switch,`successDisabledColor`,r(Di,o?p(`palette-success-main`):t.success.main,.55)),F(t.Switch,`warningDisabledColor`,r(Di,o?p(`palette-warning-light`):t.warning.main,.55)),F(t.TableCell,`border`,r(Di,Ti(o?p(`palette-divider`):t.divider,1),.68)),F(t.Tooltip,`bg`,r(Ti,o?p(`palette-grey-700`):t.grey[700],.92))}o||(Co(t.background,`default`),Co(t.background,`paper`),Co(t.common,`background`),Co(t.common,`onBackground`),Co(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&F(t[e],`mainChannel`,yi(So(n.main))),n.light&&F(t[e],`lightChannel`,yi(So(n.light))),n.dark&&F(t[e],`darkChannel`,yi(So(n.dark))),n.contrastText&&F(t[e],`contrastTextChannel`,yi(So(n.contrastText))),e===`text`&&(Co(t[e],`primary`),Co(t[e],`secondary`)),e===`action`&&(n.active&&Co(t[e],`active`),n.selected&&Co(t[e],`selected`)))})}),S=t.reduce((e,t)=>ae(e,t),S);let C={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:bo(S),enableContrastVars:o},{vars:w,generateThemeVars:T,generateStyleSheets:E}=va(S,C);return S.vars=w,Object.entries(S.colorSchemes[S.defaultColorScheme]).forEach(([e,t])=>{S[e]=t}),S.generateThemeVars=T,S.generateStyleSheets=E,S.generateSpacing=function(){return Br(u.spacing,ke(this))},S.getColorSchemeSelector=ya(c),S.spacing=S.generateSpacing(),S.shouldSkipGeneratingVar=s,S.unstable_sxConfig={...ut,...u?.unstable_sxConfig},S.unstable_sx=function(e){return mt({sx:e,theme:this})},S.toRuntimeSource=so,S}function ko(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Ha({...n===!0?{}:n.palette,mode:t})})}function Ao(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return fo(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=fo({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},ko(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},ko(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),Oo({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var jo=Ao(),Mo=`$$material`;function No(){let e=Kr(jo);return e.$$material||e}function Po(e){return(0,P.jsx)(Jr,{...e,defaultTheme:jo,themeId:Mo})}function Fo(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var Io=e=>Fo(e)&&e!==`classes`,I=ci({themeId:Mo,defaultTheme:jo,rootShouldForwardProp:Io});function Lo(e){return function(t){return(0,P.jsx)(Po,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function Ro(){return gt}var zo=$i;function Bo(e){return Ui(e)}var L=M;function Vo(e){return typeof e.main==`string`}function Ho(e,t=[]){if(!Vo(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Uo(e=[]){return([,t])=>t&&Ho(t,e)}function Wo(e){return Qr(`MuiTypography`,e)}$r(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]);var Go={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Ko=Ro(),qo=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return A({root:[`root`,a,e.align!==`inherit`&&`align${L(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},Wo,o)},Jo=I(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${L(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(zo(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${L(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Yo={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Xo=N.forwardRef(function(e,t){let{color:n,...r}=Bo({props:e,name:`MuiTypography`}),i=!Go[n],a=Ko({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=Yo,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p},g=c||(d?`p`:p[f]||Yo[f])||`span`,_=qo(h);return(0,P.jsx)(Jo,{as:g,ref:t,className:k(_.root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function Zo({theme:e,...t}){let n=`$$material`in e?e[Mo]:void 0;return(0,P.jsx)(Zi,{...t,themeId:n?Mo:void 0,theme:n||e})}var Qo={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:$o,useColorScheme:es,getInitColorSchemeScript:ts}=fa({themeId:Mo,theme:()=>Ao({cssVariables:!0}),colorSchemeStorageKey:Qo.colorSchemeStorageKey,modeStorageKey:Qo.modeStorageKey,defaultColorScheme:{light:Qo.defaultLightColorScheme,dark:Qo.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:Ja(e.palette,e.typography)};return t.unstable_sx=function(e){return mt({sx:e,theme:this})},t}}),ns=$o;function rs({theme:e,...t}){let n=N.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[Mo]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,P.jsx)(Zo,{theme:n,...t}):(0,P.jsx)(ns,{theme:e,...t})}var is=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&ee(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&ee(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function ee(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,M(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,ee(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),as=o(((e,t)=>{t.exports=is()})),ss=o((e=>{var t=d(),n=as();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e){return l.call(p,e)?!0:l.call(f,e)?!1:u.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),D=Symbol.for(`react.profiler`),O=Symbol.for(`react.provider`),k=Symbol.for(`react.context`),A=Symbol.for(`react.forward_ref`),j=Symbol.for(`react.suspense`),M=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),N=Symbol.for(`react.offscreen`),ne=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Object.assign,ae;function oe(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``}return`
|
|
37
|
-
`+
|
|
35
|
+
export default theme;`}function Xa(e){return typeof e==`number`?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}var Za=e=>{if(!Number.isNaN(+e))return+e;let t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n};function Qa(e){Object.assign(e,{alpha(t,n){let r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n==`string`?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,`var(--$1Channel)`)} / ${typeof n==`string`?`calc(${n})`:n})`:fi(t,Za(n))},lighten(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Xa(n)})`:gi(t,n)},darken(t,n){let r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Xa(n)})`:mi(t,n)}})}function $a(e={},...t){let{breakpoints:n,mixins:r={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:c,colorSpace:l,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw Error(v(20));let d=Aa({...a,colorSpace:l}),f=Ar(e),p=E(f,{mixins:Ma(f.breakpoints,r),palette:d,shadows:Va.slice(),typography:Ia(d,s),transitions:Ka(o),zIndex:{...qa}});return p=E(p,u),p=t.reduce((e,t)=>E(e,t),p),p.unstable_sxConfig={...Qe,...u?.unstable_sxConfig},p.unstable_sx=function(e){return nt({sx:e,theme:this})},p.toRuntimeSource=Ya,Qa(p),p}function eo(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}var to=[...Array(25)].map((e,t)=>{if(t===0)return`none`;let n=eo(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function no(e){return{inputPlaceholder:e===`dark`?.5:.42,inputUnderline:e===`dark`?.7:.42,switchTrackDisabled:e===`dark`?.2:.12,switchTrack:e===`dark`?.3:.38}}function ro(e){return e===`dark`?to:[]}function io(e){let{palette:t={mode:`light`},opacity:n,overlays:r,colorSpace:i,...a}=e,o=Aa({...t,colorSpace:i});return{palette:o,opacity:{...no(o.mode),...n},overlays:r||ro(o.mode),...a}}function ao(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]===`palette`&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var oo=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:``}overlays-${n}`),`--${e?`${e}-`:``}palette-AppBar-darkBg`,`--${e?`${e}-`:``}palette-AppBar-darkColor`],so=e=>(t,n)=>{let r=e.rootSelector||`:root`,i=e.colorSchemeSelector,a=i;if(i===`class`&&(a=`.%s`),i===`data`&&(a=`[data-%s]`),i?.startsWith(`data-`)&&!i.includes(`%s`)&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t===`dark`){let i={};return oo(e.cssVarPrefix).forEach(e=>{i[e]=n[e],delete n[e]}),a===`media`?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:i}}:a?{[a.replace(`%s`,t)]:i,[`${r}, ${a.replace(`%s`,t)}`]:n}:{[r]:{...n,...i}}}if(a&&a!==`media`)return`${r}, ${a.replace(`%s`,String(t))}`}else if(t){if(a===`media`)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(a)return a.replace(`%s`,String(t))}return r};function co(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function P(e,t,n){!e[t]&&n&&(e[t]=n)}function lo(e){return typeof e!=`string`||!e.startsWith(`hsl`)?e:li(e)}function uo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=si(lo(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
36
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function fo(e){return typeof e==`number`?`${e}px`:typeof e==`string`||typeof e==`function`||Array.isArray(e)?e:`8px`}var po=e=>{try{return e()}catch{}},mo=(e=`mui`)=>ta(e);function ho(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;let a=i===`dark`?`dark`:`light`;if(!r){t[i]=io({...n,palette:{mode:a,...n?.palette},colorSpace:e});return}let{palette:o,...s}=$a({...r,palette:{mode:a,...n?.palette},colorSpace:e});return t[i]={...n,palette:o,opacity:{...no(a),...n?.opacity},overlays:n?.overlays||ro(a)},s}function go(e={},...t){let{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:a=`mui`,nativeColor:o=!1,shouldSkipGeneratingVar:s=ao,colorSchemeSelector:c=n.light&&n.dark?`media`:void 0,rootSelector:l=`:root`,...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!==`light`?`light`:d),p=mo(a),{[f]:m,light:h,dark:g,..._}=n,y={..._},b=m;if((f===`dark`&&!(`dark`in n)||f===`light`&&!(`light`in n))&&(b=!0),!b)throw Error(v(21,f));let x;o&&(x=`oklch`);let S=ho(x,y,b,u,f);h&&!y.light&&ho(x,y,h,void 0,`light`),g&&!y.dark&&ho(x,y,g,void 0,`dark`);let C={defaultColorScheme:f,...S,cssVarPrefix:a,colorSchemeSelector:c,rootSelector:l,getCssVar:p,colorSchemes:y,font:{...ja(S.typography),...S.font},spacing:fo(u.spacing)};Object.keys(C.colorSchemes).forEach(e=>{let t=C.colorSchemes[e].palette,n=e=>{let n=e.split(`-`),r=n[1],i=n[2];return p(e,t[r][i])};t.mode===`light`&&(P(t.common,`background`,`#fff`),P(t.common,`onBackground`,`#000`)),t.mode===`dark`&&(P(t.common,`background`,`#000`),P(t.common,`onBackground`,`#fff`));function r(e,t,n){if(x){let r;return e===pi&&(r=`transparent ${((1-n)*100).toFixed(0)}%`),e===hi&&(r=`#000 ${(n*100).toFixed(0)}%`),e===_i&&(r=`#fff ${(n*100).toFixed(0)}%`),`color-mix(in ${x}, ${t}, ${r})`}return e(t,n)}if(co(t,[`Alert`,`AppBar`,`Avatar`,`Button`,`Chip`,`FilledInput`,`LinearProgress`,`Skeleton`,`Slider`,`SnackbarContent`,`SpeedDialAction`,`StepConnector`,`StepContent`,`Switch`,`TableCell`,`Tooltip`]),t.mode===`light`){P(t.Alert,`errorColor`,r(hi,o?p(`palette-error-light`):t.error.light,.6)),P(t.Alert,`infoColor`,r(hi,o?p(`palette-info-light`):t.info.light,.6)),P(t.Alert,`successColor`,r(hi,o?p(`palette-success-light`):t.success.light,.6)),P(t.Alert,`warningColor`,r(hi,o?p(`palette-warning-light`):t.warning.light,.6)),P(t.Alert,`errorFilledBg`,n(`palette-error-main`)),P(t.Alert,`infoFilledBg`,n(`palette-info-main`)),P(t.Alert,`successFilledBg`,n(`palette-success-main`)),P(t.Alert,`warningFilledBg`,n(`palette-warning-main`)),P(t.Alert,`errorFilledColor`,po(()=>t.getContrastText(t.error.main))),P(t.Alert,`infoFilledColor`,po(()=>t.getContrastText(t.info.main))),P(t.Alert,`successFilledColor`,po(()=>t.getContrastText(t.success.main))),P(t.Alert,`warningFilledColor`,po(()=>t.getContrastText(t.warning.main))),P(t.Alert,`errorStandardBg`,r(_i,o?p(`palette-error-light`):t.error.light,.9)),P(t.Alert,`infoStandardBg`,r(_i,o?p(`palette-info-light`):t.info.light,.9)),P(t.Alert,`successStandardBg`,r(_i,o?p(`palette-success-light`):t.success.light,.9)),P(t.Alert,`warningStandardBg`,r(_i,o?p(`palette-warning-light`):t.warning.light,.9)),P(t.Alert,`errorIconColor`,n(`palette-error-main`)),P(t.Alert,`infoIconColor`,n(`palette-info-main`)),P(t.Alert,`successIconColor`,n(`palette-success-main`)),P(t.Alert,`warningIconColor`,n(`palette-warning-main`)),P(t.AppBar,`defaultBg`,n(`palette-grey-100`)),P(t.Avatar,`defaultBg`,n(`palette-grey-400`)),P(t.Button,`inheritContainedBg`,n(`palette-grey-300`)),P(t.Button,`inheritContainedHoverBg`,n(`palette-grey-A100`)),P(t.Chip,`defaultBorder`,n(`palette-grey-400`)),P(t.Chip,`defaultAvatarColor`,n(`palette-grey-700`)),P(t.Chip,`defaultIconColor`,n(`palette-grey-700`)),P(t.FilledInput,`bg`,`rgba(0, 0, 0, 0.06)`),P(t.FilledInput,`hoverBg`,`rgba(0, 0, 0, 0.09)`),P(t.FilledInput,`disabledBg`,`rgba(0, 0, 0, 0.12)`),P(t.LinearProgress,`primaryBg`,r(_i,o?p(`palette-primary-main`):t.primary.main,.62)),P(t.LinearProgress,`secondaryBg`,r(_i,o?p(`palette-secondary-main`):t.secondary.main,.62)),P(t.LinearProgress,`errorBg`,r(_i,o?p(`palette-error-main`):t.error.main,.62)),P(t.LinearProgress,`infoBg`,r(_i,o?p(`palette-info-main`):t.info.main,.62)),P(t.LinearProgress,`successBg`,r(_i,o?p(`palette-success-main`):t.success.main,.62)),P(t.LinearProgress,`warningBg`,r(_i,o?p(`palette-warning-light`):t.warning.main,.62)),P(t.Skeleton,`bg`,x?r(pi,o?p(`palette-text-primary`):t.text.primary,.11):`rgba(${n(`palette-text-primaryChannel`)} / 0.11)`),P(t.Slider,`primaryTrack`,r(_i,o?p(`palette-primary-main`):t.primary.main,.62)),P(t.Slider,`secondaryTrack`,r(_i,o?p(`palette-secondary-main`):t.secondary.main,.62)),P(t.Slider,`errorTrack`,r(_i,o?p(`palette-error-main`):t.error.main,.62)),P(t.Slider,`infoTrack`,r(_i,o?p(`palette-info-main`):t.info.main,.62)),P(t.Slider,`successTrack`,r(_i,o?p(`palette-success-main`):t.success.main,.62)),P(t.Slider,`warningTrack`,r(_i,o?p(`palette-warning-main`):t.warning.main,.62));let e=x?r(hi,o?p(`palette-background-default`):t.background.default,.6825):yi(t.background.default,.8);P(t.SnackbarContent,`bg`,e),P(t.SnackbarContent,`color`,po(()=>x?ba.text.primary:t.getContrastText(e))),P(t.SpeedDialAction,`fabHoverBg`,yi(t.background.paper,.15)),P(t.StepConnector,`border`,n(`palette-grey-400`)),P(t.StepContent,`border`,n(`palette-grey-400`)),P(t.Switch,`defaultColor`,n(`palette-common-white`)),P(t.Switch,`defaultDisabledColor`,n(`palette-grey-100`)),P(t.Switch,`primaryDisabledColor`,r(_i,o?p(`palette-primary-main`):t.primary.main,.62)),P(t.Switch,`secondaryDisabledColor`,r(_i,o?p(`palette-secondary-main`):t.secondary.main,.62)),P(t.Switch,`errorDisabledColor`,r(_i,o?p(`palette-error-main`):t.error.main,.62)),P(t.Switch,`infoDisabledColor`,r(_i,o?p(`palette-info-main`):t.info.main,.62)),P(t.Switch,`successDisabledColor`,r(_i,o?p(`palette-success-main`):t.success.main,.62)),P(t.Switch,`warningDisabledColor`,r(_i,o?p(`palette-warning-main`):t.warning.main,.62)),P(t.TableCell,`border`,r(_i,pi(o?p(`palette-divider`):t.divider,1),.88)),P(t.Tooltip,`bg`,r(pi,o?p(`palette-grey-700`):t.grey[700],.92))}if(t.mode===`dark`){P(t.Alert,`errorColor`,r(_i,o?p(`palette-error-light`):t.error.light,.6)),P(t.Alert,`infoColor`,r(_i,o?p(`palette-info-light`):t.info.light,.6)),P(t.Alert,`successColor`,r(_i,o?p(`palette-success-light`):t.success.light,.6)),P(t.Alert,`warningColor`,r(_i,o?p(`palette-warning-light`):t.warning.light,.6)),P(t.Alert,`errorFilledBg`,n(`palette-error-dark`)),P(t.Alert,`infoFilledBg`,n(`palette-info-dark`)),P(t.Alert,`successFilledBg`,n(`palette-success-dark`)),P(t.Alert,`warningFilledBg`,n(`palette-warning-dark`)),P(t.Alert,`errorFilledColor`,po(()=>t.getContrastText(t.error.dark))),P(t.Alert,`infoFilledColor`,po(()=>t.getContrastText(t.info.dark))),P(t.Alert,`successFilledColor`,po(()=>t.getContrastText(t.success.dark))),P(t.Alert,`warningFilledColor`,po(()=>t.getContrastText(t.warning.dark))),P(t.Alert,`errorStandardBg`,r(hi,o?p(`palette-error-light`):t.error.light,.9)),P(t.Alert,`infoStandardBg`,r(hi,o?p(`palette-info-light`):t.info.light,.9)),P(t.Alert,`successStandardBg`,r(hi,o?p(`palette-success-light`):t.success.light,.9)),P(t.Alert,`warningStandardBg`,r(hi,o?p(`palette-warning-light`):t.warning.light,.9)),P(t.Alert,`errorIconColor`,n(`palette-error-main`)),P(t.Alert,`infoIconColor`,n(`palette-info-main`)),P(t.Alert,`successIconColor`,n(`palette-success-main`)),P(t.Alert,`warningIconColor`,n(`palette-warning-main`)),P(t.AppBar,`defaultBg`,n(`palette-grey-900`)),P(t.AppBar,`darkBg`,n(`palette-background-paper`)),P(t.AppBar,`darkColor`,n(`palette-text-primary`)),P(t.Avatar,`defaultBg`,n(`palette-grey-600`)),P(t.Button,`inheritContainedBg`,n(`palette-grey-800`)),P(t.Button,`inheritContainedHoverBg`,n(`palette-grey-700`)),P(t.Chip,`defaultBorder`,n(`palette-grey-700`)),P(t.Chip,`defaultAvatarColor`,n(`palette-grey-300`)),P(t.Chip,`defaultIconColor`,n(`palette-grey-300`)),P(t.FilledInput,`bg`,`rgba(255, 255, 255, 0.09)`),P(t.FilledInput,`hoverBg`,`rgba(255, 255, 255, 0.13)`),P(t.FilledInput,`disabledBg`,`rgba(255, 255, 255, 0.12)`),P(t.LinearProgress,`primaryBg`,r(hi,o?p(`palette-primary-main`):t.primary.main,.5)),P(t.LinearProgress,`secondaryBg`,r(hi,o?p(`palette-secondary-main`):t.secondary.main,.5)),P(t.LinearProgress,`errorBg`,r(hi,o?p(`palette-error-main`):t.error.main,.5)),P(t.LinearProgress,`infoBg`,r(hi,o?p(`palette-info-main`):t.info.main,.5)),P(t.LinearProgress,`successBg`,r(hi,o?p(`palette-success-main`):t.success.main,.5)),P(t.LinearProgress,`warningBg`,r(hi,o?p(`palette-warning-main`):t.warning.main,.5)),P(t.Skeleton,`bg`,x?r(pi,o?p(`palette-text-primary`):t.text.primary,.13):`rgba(${n(`palette-text-primaryChannel`)} / 0.13)`),P(t.Slider,`primaryTrack`,r(hi,o?p(`palette-primary-main`):t.primary.main,.5)),P(t.Slider,`secondaryTrack`,r(hi,o?p(`palette-secondary-main`):t.secondary.main,.5)),P(t.Slider,`errorTrack`,r(hi,o?p(`palette-error-main`):t.error.main,.5)),P(t.Slider,`infoTrack`,r(hi,o?p(`palette-info-main`):t.info.main,.5)),P(t.Slider,`successTrack`,r(hi,o?p(`palette-success-main`):t.success.main,.5)),P(t.Slider,`warningTrack`,r(hi,o?p(`palette-warning-light`):t.warning.main,.5));let e=x?r(_i,o?p(`palette-background-default`):t.background.default,.985):yi(t.background.default,.98);P(t.SnackbarContent,`bg`,e),P(t.SnackbarContent,`color`,po(()=>x?va.text.primary:t.getContrastText(e))),P(t.SpeedDialAction,`fabHoverBg`,yi(t.background.paper,.15)),P(t.StepConnector,`border`,n(`palette-grey-600`)),P(t.StepContent,`border`,n(`palette-grey-600`)),P(t.Switch,`defaultColor`,n(`palette-grey-300`)),P(t.Switch,`defaultDisabledColor`,n(`palette-grey-600`)),P(t.Switch,`primaryDisabledColor`,r(hi,o?p(`palette-primary-main`):t.primary.main,.55)),P(t.Switch,`secondaryDisabledColor`,r(hi,o?p(`palette-secondary-main`):t.secondary.main,.55)),P(t.Switch,`errorDisabledColor`,r(hi,o?p(`palette-error-main`):t.error.main,.55)),P(t.Switch,`infoDisabledColor`,r(hi,o?p(`palette-info-main`):t.info.main,.55)),P(t.Switch,`successDisabledColor`,r(hi,o?p(`palette-success-main`):t.success.main,.55)),P(t.Switch,`warningDisabledColor`,r(hi,o?p(`palette-warning-light`):t.warning.main,.55)),P(t.TableCell,`border`,r(hi,pi(o?p(`palette-divider`):t.divider,1),.68)),P(t.Tooltip,`bg`,r(pi,o?p(`palette-grey-700`):t.grey[700],.92))}o||(uo(t.background,`default`),uo(t.background,`paper`),uo(t.common,`background`),uo(t.common,`onBackground`),uo(t,`divider`)),Object.keys(t).forEach(e=>{let n=t[e];e!==`tonalOffset`&&!o&&n&&typeof n==`object`&&(n.main&&P(t[e],`mainChannel`,si(lo(n.main))),n.light&&P(t[e],`lightChannel`,si(lo(n.light))),n.dark&&P(t[e],`darkChannel`,si(lo(n.dark))),n.contrastText&&P(t[e],`contrastTextChannel`,si(lo(n.contrastText))),e===`text`&&(uo(t[e],`primary`),uo(t[e],`secondary`)),e===`action`&&(n.active&&uo(t[e],`active`),n.selected&&uo(t[e],`selected`)))})}),C=t.reduce((e,t)=>E(e,t),C);let w={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:so(C),enableContrastVars:o},{vars:T,generateThemeVars:ee,generateStyleSheets:D}=oa(C,w);return C.vars=T,Object.entries(C.colorSchemes[C.defaultColorScheme]).forEach(([e,t])=>{C[e]=t}),C.generateThemeVars=ee,C.generateStyleSheets=D,C.generateSpacing=function(){return Or(u.spacing,_e(this))},C.getColorSchemeSelector=sa(c),C.spacing=C.generateSpacing(),C.shouldSkipGeneratingVar=s,C.unstable_sxConfig={...Qe,...u?.unstable_sxConfig},C.unstable_sx=function(e){return nt({sx:e,theme:this})},C.toRuntimeSource=Ya,C}function _o(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Aa({...n===!0?{}:n.palette,mode:t})})}function vo(e={},...t){let{palette:n,cssVariables:r=!1,colorSchemes:i=n?void 0:{light:!0},defaultColorScheme:a=n?.mode,...o}=e,s=a||`light`,c=i?.[s],l={...i,...n?{[s]:{...typeof c!=`boolean`&&c,palette:n}}:void 0};if(r===!1){if(!(`colorSchemes`in e))return $a(e,...t);let r=n;`palette`in e||l[s]&&(l[s]===!0?s===`dark`&&(r={mode:`dark`}):r=l[s].palette);let i=$a({...e,palette:r},...t);return i.defaultColorScheme=s,i.colorSchemes=l,i.palette.mode===`light`&&(i.colorSchemes.light={...l.light!==!0&&l.light,palette:i.palette},_o(i,`dark`,l.dark)),i.palette.mode===`dark`&&(i.colorSchemes.dark={...l.dark!==!0&&l.dark,palette:i.palette},_o(i,`light`,l.light)),i}return!n&&!(`light`in l)&&s===`light`&&(l.light=!0),go({...o,colorSchemes:l,defaultColorScheme:s,...typeof r!=`boolean`&&r},...t)}var yo=vo(),bo=`$$material`;function xo(){let e=Pr(yo);return e.$$material||e}function So(e){return(0,N.jsx)(Ir,{...e,defaultTheme:yo,themeId:bo})}function Co(e){return e!==`ownerState`&&e!==`theme`&&e!==`sx`&&e!==`as`}var wo=e=>Co(e)&&e!==`classes`,F=Xr({themeId:bo,defaultTheme:yo,rootShouldForwardProp:wo});function To(e){return function(t){return(0,N.jsx)(So,{styles:typeof e==`function`?n=>e({theme:n,...t}):e})}}function Eo(){return it}var Do=Vi;function I(e){return ji(e)}var L=y;function Oo(e){return typeof e.main==`string`}function ko(e,t=[]){if(!Oo(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function Ao(e=[]){return([,t])=>t&&ko(t,e)}function jo(e){return Br(`MuiTypography`,e)}Vr(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`,`paragraph`]);var Mo={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},No=Eo(),Po=e=>{let{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:a,classes:o}=e;return _({root:[`root`,a,e.align!==`inherit`&&`align${L(t)}`,n&&`gutterBottom`,r&&`noWrap`,i&&`paragraph`]},jo,o)},Fo=F(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${L(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Do(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${L(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}},{props:({ownerState:e})=>e.paragraph,style:{marginBottom:16}}]}))),Io={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},Lo=S.forwardRef(function(e,t){let{color:n,...r}=I({props:e,name:`MuiTypography`}),i=!Mo[n],a=No({...r,...i&&{color:n}}),{align:o=`inherit`,className:s,component:c,gutterBottom:l=!1,noWrap:u=!1,paragraph:d=!1,variant:f=`body1`,variantMapping:p=Io,...m}=a,h={...a,align:o,color:n,className:s,component:c,gutterBottom:l,noWrap:u,paragraph:d,variant:f,variantMapping:p},_=c||(d?`p`:p[f]||Io[f])||`span`,v=Po(h);return(0,N.jsx)(Fo,{as:_,ref:t,className:g(v.root,s),...m,ownerState:h,style:{...o!==`inherit`&&{"--Typography-textAlign":o},...m.style}})});function Ro({theme:e,...t}){let n=`$$material`in e?e[bo]:void 0;return(0,N.jsx)(zi,{...t,themeId:n?bo:void 0,theme:n||e})}var zo={attribute:`data-mui-color-scheme`,colorSchemeStorageKey:`mui-color-scheme`,defaultLightColorScheme:`light`,defaultDarkColorScheme:`dark`,modeStorageKey:`mui-mode`},{CssVarsProvider:Bo,useColorScheme:Vo,getInitColorSchemeScript:Ho}=ea({themeId:bo,theme:()=>vo({cssVariables:!0}),colorSchemeStorageKey:zo.colorSchemeStorageKey,modeStorageKey:zo.modeStorageKey,defaultColorScheme:{light:zo.defaultLightColorScheme,dark:zo.defaultDarkColorScheme},resolveTheme:e=>{let t={...e,typography:Ia(e.palette,e.typography)};return t.unstable_sx=function(e){return nt({sx:e,theme:this})},t}}),Uo=Bo;function Wo({theme:e,...t}){let n=S.useMemo(()=>{if(typeof e==`function`)return e;let t=`$$material`in e?e[bo]:e;return`colorSchemes`in t?null:`vars`in t?e:{...e,vars:null}},[e]);return n?(0,N.jsx)(Ro,{theme:n,...t}):(0,N.jsx)(Uo,{theme:e,...t})}var Go=Object.prototype;function Ko(e){return typeof e==`object`&&!!e}function qo(e){return Array.isArray(e)?e:typeof e==`number`?[e]:e.replace(/\[(\d+)\]/g,`.$1`).split(`.`).filter(Boolean)}function Jo(e){return(e??[]).filter(Boolean)}function Yo(e,t=0,n={}){let r,i,a,o,s,c=n.leading===!0,l=n.trailing!==!1,u=()=>{if(!a)return s;let t=a,n=o;return a=void 0,o=void 0,s=e.apply(n,t),s},d=()=>{r&&clearTimeout(r),i&&clearTimeout(i),r=void 0,i=void 0,a=void 0,o=void 0},f=function(...e){let d=c&&!r;return a=e,o=this,d&&u(),r&&clearTimeout(r),r=setTimeout(()=>{r=void 0,i&&=(clearTimeout(i),void 0),l?u():(a=void 0,o=void 0)},t),n.maxWait!==void 0&&!i&&(i=setTimeout(()=>{r&&clearTimeout(r),r=void 0,i=void 0,l||!c?u():(a=void 0,o=void 0)},n.maxWait)),s};return f.cancel=d,f.flush=()=>(r&&=(clearTimeout(r),void 0),i&&=(clearTimeout(i),void 0),u()),f}function Xo(e){let t=[];for(let n of e??[])Array.isArray(n)?t.push(...n):t.push(n);return t}function Zo(e,t,n){if(!Array.isArray(t)&&e!=null&&Object.prototype.hasOwnProperty.call(Object(e),t)){let r=e[t];return r===void 0?n:r}let r=e;for(let e of qo(t)){if(r==null)return n;r=r[e]}return r===void 0?n:r}function Qo(e){return e==null?!0:typeof e==`string`||Array.isArray(e)?e.length===0:e instanceof Map||e instanceof Set?e.size===0:!Ko(e)||Object.keys(e).length===0}function $o(e,t,n){let r=n?.(e,t);if(r!==void 0)return!!r;if(Object.is(e,t))return!0;if(!Ko(e)||!Ko(t))return!1;if(e instanceof Date||t instanceof Date)return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime();if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((e,r)=>$o(e,t[r],n));let i=Object.keys(e),a=Object.keys(t);return i.length===a.length&&i.every(r=>Go.hasOwnProperty.call(t,r)&&$o(e[r],t[r],n))}function es(e,t){return $o(e,t)}function ts(e,t){let n={...e??{}};for(let e of Array.isArray(t)?t:[t])delete n[e];return n}function ns(e,t){let n=t??(e=>e);return Array.from({length:Math.max(0,e)},(e,t)=>n(t))}function rs(...e){let t=Math.max(0,...e.map(e=>e.length));return Array.from({length:t},(t,n)=>e.map(e=>e[n]))}var is=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,A(x);else{var t=n(l);t!==null&&j(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&j(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function ee(){return!(e.unstable_now()-E<T)}function D(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?O():(S=!1,C=null)}}else S=!1}var O;if(typeof v==`function`)O=function(){v(D)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,k=te.port2;te.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){g(D,0)};function A(e){C=e,S||(S=!0,O())}function j(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,A(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,j(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,A(x))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),as=o(((e,t)=>{t.exports=is()})),ss=o((e=>{var t=d(),n=as();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n]);return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e){return l.call(p,e)?!0:l.call(f,e)?!1:u.test(e)?p[e]=!0:(f[e]=!0,!1)}function h(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function g(e,t,n,r){if(t==null||h(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function _(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var v={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){v[e]=new _(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];v[t]=new _(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){v[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){v[e]=new _(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){v[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){v[e]=new _(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){v[e]=new _(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){v[e]=new _(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){v[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var y=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(y,b);v[t]=new _(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new _(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){v[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function x(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(g(t,n,i,r)&&(n=null),r||i===null?m(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var S=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,C=Symbol.for(`react.element`),w=Symbol.for(`react.portal`),T=Symbol.for(`react.fragment`),E=Symbol.for(`react.strict_mode`),ee=Symbol.for(`react.profiler`),D=Symbol.for(`react.provider`),O=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),k=Symbol.for(`react.suspense`),A=Symbol.for(`react.suspense_list`),j=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),ne=Symbol.for(`react.offscreen`),re=Symbol.iterator;function ie(e){return typeof e!=`object`||!e?null:(e=re&&e[re]||e[`@@iterator`],typeof e==`function`?e:null)}var ae=Object.assign,oe;function se(e){if(oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||``}return`
|
|
37
|
+
`+oe+e}var ce=!1;function le(e,t){if(!e||ce)return``;ce=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
|
38
38
|
`),a=r.stack.split(`
|
|
39
39
|
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
|
40
|
-
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{se=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?oe(e):``}function le(e){switch(e.tag){case 5:return oe(e.type);case 16:return oe(`Lazy`);case 13:return oe(`Suspense`);case 19:return oe(`SuspenseList`);case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return``}}function ue(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case w:return`Portal`;case D:return`Profiler`;case E:return`StrictMode`;case j:return`Suspense`;case M:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case k:return(e.displayName||`Context`)+`.Consumer`;case O:return(e._context.displayName||`Context`)+`.Provider`;case A:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?ue(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return ue(e(t))}catch{}}return null}function de(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return ue(t);case 8:return t===E?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function fe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function pe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function me(e){var t=pe(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function he(e){e._valueTracker||=me(e)}function ge(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=pe(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function _e(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function ve(e,t){var n=t.checked;return ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ye(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=fe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function be(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function xe(e,t){be(e,t);var n=fe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?Ce(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&Ce(e,t.type,fe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Se(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function Ce(e,t,n){(t!==`number`||_e(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var we=Array.isArray;function Te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+fe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ee(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ie({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function De(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(we(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:fe(n)}}function Oe(e,t){var n=fe(t.value),r=fe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function ke(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ae(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function je(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ae(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Me,Ne=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Me||=document.createElement(`div`),Me.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ie=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Fe).forEach(function(e){Ie.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fe[t]=Fe[e]})});function Le(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Fe.hasOwnProperty(e)&&Fe[e]?(``+t).trim():t+`px`}function Re(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Le(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var ze=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Be(e,t){if(t){if(ze[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ve(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var He=null;function Ue(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var We=null,Ge=null,Ke=null;function qe(e){if(e=qi(e)){if(typeof We!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Yi(t),We(e.stateNode,e.type,t))}}function Je(e){Ge?Ke?Ke.push(e):Ke=[e]:Ge=e}function Ye(){if(Ge){var e=Ge,t=Ke;if(Ke=Ge=null,qe(e),t)for(e=0;e<t.length;e++)qe(t[e])}}function Xe(e,t){return e(t)}function Ze(){}var Qe=!1;function $e(e,t,n){if(Qe)return e(t,n);Qe=!0;try{return Xe(e,t,n)}finally{Qe=!1,(Ge!==null||Ke!==null)&&(Ze(),Ye())}}function et(e,t){var n=e.stateNode;if(n===null)return null;var i=Yi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var tt=!1;if(c)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener(`test`,nt,nt),window.removeEventListener(`test`,nt,nt)}catch{tt=!1}function rt(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var it=!1,at=null,ot=!1,st=null,ct={onError:function(e){it=!0,at=e}};function lt(e,t,n,r,i,a,o,s,c){it=!1,at=null,rt.apply(ct,arguments)}function ut(e,t,n,i,a,o,s,c,l){if(lt.apply(this,arguments),it){if(it){var u=at;it=!1,at=null}else throw Error(r(198));ot||(ot=!0,st=u)}}function dt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ft(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 pt(e){if(dt(e)!==e)throw Error(r(188))}function mt(e){var t=e.alternate;if(!t){if(t=dt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return pt(a),e;if(o===i)return pt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ht(e){return e=mt(e),e===null?null:gt(e)}function gt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gt(e);if(t!==null)return t;e=e.sibling}return null}var _t=n.unstable_scheduleCallback,vt=n.unstable_cancelCallback,yt=n.unstable_shouldYield,bt=n.unstable_requestPaint,xt=n.unstable_now,St=n.unstable_getCurrentPriorityLevel,Ct=n.unstable_ImmediatePriority,wt=n.unstable_UserBlockingPriority,Tt=n.unstable_NormalPriority,Et=n.unstable_LowPriority,Dt=n.unstable_IdlePriority,Ot=null,kt=null;function At(e){if(kt&&typeof kt.onCommitFiberRoot==`function`)try{kt.onCommitFiberRoot(Ot,e,void 0,(e.current.flags&128)==128)}catch{}}var jt=Math.clz32?Math.clz32:Pt,Mt=Math.log,Nt=Math.LN2;function Pt(e){return e>>>=0,e===0?32:31-(Mt(e)/Nt|0)|0}var Ft=64,It=4194304;function Lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Rt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Lt(a))):r=Lt(s)}else o=n&~i,o===0?a!==0&&(r=Lt(a)):r=Lt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-jt(t),i=1<<n,r|=e[n],t&=~i;return r}function zt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-jt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=zt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Vt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ht(){var e=Ft;return Ft<<=1,!(Ft&4194240)&&(Ft=64),e}function Ut(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Wt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-jt(t),e[t]=n}function Gt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-jt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Kt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var qt=0;function Jt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Yt,Xt,Zt,Qt,$t,en=!1,tn=[],nn=null,rn=null,an=null,on=new Map,sn=new Map,cn=[],ln=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function un(e,t){switch(e){case`focusin`:case`focusout`:nn=null;break;case`dragenter`:case`dragleave`:rn=null;break;case`mouseover`:case`mouseout`:an=null;break;case`pointerover`:case`pointerout`:on.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:sn.delete(t.pointerId)}}function dn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=qi(t),t!==null&&Xt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function fn(e,t,n,r,i){switch(t){case`focusin`:return nn=dn(nn,e,t,n,r,i),!0;case`dragenter`:return rn=dn(rn,e,t,n,r,i),!0;case`mouseover`:return an=dn(an,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return on.set(a,dn(on.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,sn.set(a,dn(sn.get(a)||null,e,t,n,r,i)),!0}return!1}function pn(e){var t=Ki(e.target);if(t!==null){var n=dt(t);if(n!==null){if(t=n.tag,t===13){if(t=ft(n),t!==null){e.blockedOn=t,$t(e.priority,function(){Zt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);He=r,n.target.dispatchEvent(r),He=null}else return t=qi(n),t!==null&&Xt(t),e.blockedOn=n,!1;t.shift()}return!0}function hn(e,t,n){mn(e)&&n.delete(t)}function gn(){en=!1,nn!==null&&mn(nn)&&(nn=null),rn!==null&&mn(rn)&&(rn=null),an!==null&&mn(an)&&(an=null),on.forEach(hn),sn.forEach(hn)}function _n(e,t){e.blockedOn===t&&(e.blockedOn=null,en||(en=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,gn)))}function vn(e){function t(t){return _n(t,e)}if(0<tn.length){_n(tn[0],e);for(var n=1;n<tn.length;n++){var r=tn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&_n(nn,e),rn!==null&&_n(rn,e),an!==null&&_n(an,e),on.forEach(t),sn.forEach(t),n=0;n<cn.length;n++)r=cn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<cn.length&&(n=cn[0],n.blockedOn===null);)pn(n),n.blockedOn===null&&cn.shift()}var yn=S.ReactCurrentBatchConfig,bn=!0;function xn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=1,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Sn(e,t,n,r){var i=qt,a=yn.transition;yn.transition=null;try{qt=4,Cn(e,t,n,r)}finally{qt=i,yn.transition=a}}function Cn(e,t,n,r){if(bn){var i=Tn(e,t,n,r);if(i===null)vi(e,t,r,wn,n),un(e,r);else if(fn(i,e,t,n,r))r.stopPropagation();else if(un(e,r),t&4&&-1<ln.indexOf(e)){for(;i!==null;){var a=qi(i);if(a!==null&&Yt(a),a=Tn(e,t,n,r),a===null&&vi(e,t,r,wn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else vi(e,t,r,null,n)}}var wn=null;function Tn(e,t,n,r){if(wn=null,e=Ue(r),e=Ki(e),e!==null)if(t=dt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ft(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wn=e,null}function En(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(St()){case Ct:return 1;case wt:return 4;case Tt:case Et:return 16;case Dt:return 536870912;default:return 16}default:return 16}}var Dn=null,On=null,kn=null;function An(){if(kn)return kn;var e,t=On,n=t.length,r,i=`value`in Dn?Dn.value:Dn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return kn=i.slice(e,1<r?1-r:void 0)}function jn(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 Mn(){return!0}function Nn(){return!1}function Pn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Mn:Nn,this.isPropagationStopped=Nn,this}return ie(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Mn)},persist:function(){},isPersistent:Mn}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},In=Pn(Fn),Ln=ie({},Fn,{view:0,detail:0}),Rn=Pn(Ln),zn,Bn,Vn,Hn=ie({},Ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,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!==Vn&&(Vn&&e.type===`mousemove`?(zn=e.screenX-Vn.screenX,Bn=e.screenY-Vn.screenY):Bn=zn=0,Vn=e),zn)},movementY:function(e){return`movementY`in e?e.movementY:Bn}}),Un=Pn(Hn),Wn=Pn(ie({},Hn,{dataTransfer:0})),Gn=Pn(ie({},Ln,{relatedTarget:0})),Kn=Pn(ie({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0})),qn=Pn(ie({},Fn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Jn=Pn(ie({},Fn,{data:0})),Yn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Xn={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`},Zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zn[e])?!!t[e]:!1}function $n(){return Qn}var er=Pn(ie({},Ln,{key:function(e){if(e.key){var t=Yn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=jn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Xn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?jn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?jn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Pn(ie({},Hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Pn(ie({},Ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),rr=Pn(ie({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),ir=Pn(ie({},Hn,{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})),ar=[9,13,27,32],or=c&&`CompositionEvent`in window,sr=null;c&&`documentMode`in document&&(sr=document.documentMode);var cr=c&&`TextEvent`in window&&!sr,lr=c&&(!or||sr&&8<sr&&11>=sr),ur=` `,dr=!1;function fr(e,t){switch(e){case`keyup`:return ar.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var mr=!1;function hr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(dr=!0,ur):null;case`textInput`:return e=t.data,e===ur&&dr?null:e;default:return null}}function gr(e,t){if(mr)return e===`compositionend`||!or&&fr(e,t)?(e=An(),kn=On=Dn=null,mr=!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 lr&&t.locale!==`ko`?null:t.data;default:return null}}var _r={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 vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!_r[e.type]:t===`textarea`}function yr(e,t,n,r){Je(r),t=bi(t,`onChange`),0<t.length&&(n=new In(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var br=null,xr=null;function Sr(e){fi(e,0)}function Cr(e){if(ge(Ji(e)))return e}function wr(e,t){if(e===`change`)return t}var P=!1;if(c){var Tr;if(c){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;P=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){br&&(br.detachEvent(`onpropertychange`,kr),xr=br=null)}function kr(e){if(e.propertyName===`value`&&Cr(xr)){var t=[];yr(t,xr,e,Ue(e)),$e(Sr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),br=t,xr=n,br.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Cr(xr)}function Mr(e,t){if(e===`click`)return Cr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Cr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(){for(var e=window,t=_e();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=_e(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Hr(e){var t=Br(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&zr(n.ownerDocument.documentElement,n)){if(r!==null&&Vr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Rr(n,a);var o=Rr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ur=c&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==_e(r)||(r=Wr,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=bi(Gr,`onSelect`),0<r.length&&(t=new In(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};c&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionend`),ii=new Map,ai=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function oi(e,t){ii.set(e,t),o(t,[e])}for(var si=0;si<ai.length;si++){var ci=ai[si];oi(ci.toLowerCase(),`on`+(ci[0].toUpperCase()+ci.slice(1)))}oi(ei,`onAnimationEnd`),oi(ti,`onAnimationIteration`),oi(ni,`onAnimationStart`),oi(`dblclick`,`onDoubleClick`),oi(`focusin`,`onFocus`),oi(`focusout`,`onBlur`),oi(ri,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var li=`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(` `),ui=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(li));function di(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ut(r,t,void 0,e),e.currentTarget=null}function fi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;di(i,s,l),a=c}}}if(ot)throw e=st,ot=!1,st=null,e}function pi(e,t){var n=t[Ui];n===void 0&&(n=t[Ui]=new Set);var r=e+`__bubble`;n.has(r)||(_i(t,e,2,!1),n.add(r))}function mi(e,t,n){var r=0;t&&(r|=4),_i(n,e,r,t)}var hi=`_reactListening`+Math.random().toString(36).slice(2);function gi(e){if(!e[hi]){e[hi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ui.has(t)||mi(t,!1,e),mi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[hi]||(t[hi]=!0,mi(`selectionchange`,!1,t))}}function _i(e,t,n,r){switch(En(t)){case 1:var i=xn;break;case 4:i=Sn;break;default:i=Cn}n=i.bind(null,t,n,e),i=void 0,!tt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function vi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ki(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}$e(function(){var r=a,i=Ue(n),o=[];a:{var s=ii.get(e);if(s!==void 0){var c=In,l=e;switch(e){case`keypress`:if(jn(n)===0)break a;case`keydown`:case`keyup`:c=er;break;case`focusin`:l=`focus`,c=Gn;break;case`focusout`:l=`blur`,c=Gn;break;case`beforeblur`:case`afterblur`:c=Gn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Un;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Wn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=nr;break;case ei:case ti:case ni:c=Kn;break;case ri:c=rr;break;case`scroll`:c=Rn;break;case`wheel`:c=ir;break;case`copy`:case`cut`:case`paste`:c=qn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=tr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=et(p,f),h!=null&&u.push(yi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==He&&(l=n.relatedTarget||n.fromElement)&&(Ki(l)||l[Hi]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ki(l):null,l!==null&&(d=dt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Un,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=tr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Ji(c),m=l==null?s:Ji(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ki(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=xi(m))p++;for(m=0,h=f;h;h=xi(h))m++;for(;0<p-m;)u=xi(u),p--;for(;0<m-p;)f=xi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=xi(u),f=xi(f)}u=null}else u=null;c!==null&&Si(o,s,c,u,!1),l!==null&&d!==null&&Si(o,d,l,u,!0)}}a:{if(s=r?Ji(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=wr;else if(vr(s))if(P)g=Nr;else{g=jr;var _=Ar}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Mr);if(g&&=g(e,r)){yr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&Ce(s,`number`,s.value)}switch(_=r?Ji(r):window,e){case`focusin`:(vr(_)||_.contentEditable===`true`)&&(Wr=_,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(o,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(o,n,i)}var v;if(or)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else mr?fr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(lr&&n.locale!==`ko`&&(mr||y!==`onCompositionStart`?y===`onCompositionEnd`&&mr&&(v=An()):(Dn=i,On=`value`in Dn?Dn.value:Dn.textContent,mr=!0)),_=bi(r,y),0<_.length&&(y=new Jn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=cr?hr(e,n):gr(e,n))&&(r=bi(r,`onBeforeInput`),0<r.length&&(i=new Jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}fi(o,t)})}function yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=et(e,n),a!=null&&r.unshift(yi(e,a,i)),a=et(e,t),a!=null&&r.push(yi(e,a,i))),e=e.return}return r}function xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Si(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=et(n,a),c!=null&&o.unshift(yi(n,c,s))):i||(c=et(n,a),c!=null&&o.push(yi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ci=/\r\n?/g,wi=/\u0000|\uFFFD/g;function Ti(e){return(typeof e==`string`?e:``+e).replace(Ci,`
|
|
41
|
-
`).replace(wi,``)}function Ei(e,t,n){if(t=Ti(t),Ti(e)!==t&&n)throw Error(r(425))}function Di(){}var Oi=null,ki=null;function Ai(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ji=typeof setTimeout==`function`?setTimeout:void 0,Mi=typeof clearTimeout==`function`?clearTimeout:void 0,Ni=typeof Promise==`function`?Promise:void 0,Pi=typeof queueMicrotask==`function`?queueMicrotask:Ni===void 0?ji:function(e){return Ni.resolve(null).then(e).catch(Fi)};function Fi(e){setTimeout(function(){throw e})}function Ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),vn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);vn(t)}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Ri(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var zi=Math.random().toString(36).slice(2),Bi=`__reactFiber$`+zi,Vi=`__reactProps$`+zi,Hi=`__reactContainer$`+zi,Ui=`__reactEvents$`+zi,Wi=`__reactListeners$`+zi,Gi=`__reactHandles$`+zi;function Ki(e){var t=e[Bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Hi]||n[Bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ri(e);e!==null;){if(n=e[Bi])return n;e=Ri(e)}return t}e=n,n=e.parentNode}return null}function qi(e){return e=e[Bi]||e[Hi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Yi(e){return e[Vi]||null}var Xi=[],Zi=-1;function Qi(e){return{current:e}}function $i(e){0>Zi||(e.current=Xi[Zi],Xi[Zi]=null,Zi--)}function ea(e,t){Zi++,Xi[Zi]=e.current,e.current=t}var ta={},na=Qi(ta),ra=Qi(!1),ia=ta;function aa(e,t){var n=e.type.contextTypes;if(!n)return ta;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function oa(e){return e=e.childContextTypes,e!=null}function sa(){$i(ra),$i(na)}function ca(e,t,n){if(na.current!==ta)throw Error(r(168));ea(na,t),ea(ra,n)}function la(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,de(e)||`Unknown`,a));return ie({},n,i)}function ua(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ta,ia=na.current,ea(na,e),ea(ra,ra.current),!0}function da(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=la(e,t,ia),i.__reactInternalMemoizedMergedChildContext=e,$i(ra),$i(na),ea(na,e)):$i(ra),ea(ra,n)}var fa=null,pa=!1,ma=!1;function ha(e){fa===null?fa=[e]:fa.push(e)}function ga(e){pa=!0,ha(e)}function _a(){if(!ma&&fa!==null){ma=!0;var e=0,t=qt;try{var n=fa;for(qt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}fa=null,pa=!1}catch(t){throw fa!==null&&(fa=fa.slice(e+1)),_t(Ct,_a),t}finally{qt=t,ma=!1}}return null}var va=[],ya=0,ba=null,xa=0,Sa=[],Ca=0,wa=null,Ta=1,Ea=``;function Da(e,t){va[ya++]=xa,va[ya++]=ba,ba=e,xa=t}function Oa(e,t,n){Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,wa=e;var r=Ta;e=Ea;var i=32-jt(r)-1;r&=~(1<<i),n+=1;var a=32-jt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ta=1<<32-jt(t)+i|n<<i|r,Ea=a+e}else Ta=1<<a|n<<i|r,Ea=e}function ka(e){e.return!==null&&(Da(e,1),Oa(e,1,0))}function Aa(e){for(;e===ba;)ba=va[--ya],va[ya]=null,xa=va[--ya],va[ya]=null;for(;e===wa;)wa=Sa[--Ca],Sa[Ca]=null,Ea=Sa[--Ca],Sa[Ca]=null,Ta=Sa[--Ca],Sa[Ca]=null}var ja=null,Ma=null,Na=!1,Pa=null;function Fa(e,t){var n=ru(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=Li(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ja=e,Ma=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=wa===null?null:{id:Ta,overflow:Ea},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ru(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ja=e,Ma=null,!0);default:return!1}}function La(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Ra(e){if(Na){var t=Ma;if(t){var n=t;if(!Ia(e,t)){if(La(e))throw Error(r(418));t=Li(n.nextSibling);var i=ja;t&&Ia(e,t)?Fa(i,n):(e.flags=e.flags&-4097|2,Na=!1,ja=e)}}else{if(La(e))throw Error(r(418));e.flags=e.flags&-4097|2,Na=!1,ja=e}}}function za(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ja=e}function Ba(e){if(e!==ja)return!1;if(!Na)return za(e),Na=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Ai(e.type,e.memoizedProps)),t&&=Ma){if(La(e))throw Va(),Error(r(418));for(;t;)Fa(e,t),t=Li(t.nextSibling)}if(za(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Ma=Li(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Ma=null}}else Ma=ja?Li(e.stateNode.nextSibling):null;return!0}function Va(){for(var e=Ma;e;)e=Li(e.nextSibling)}function Ha(){Ma=ja=null,Na=!1}function Ua(e){Pa===null?Pa=[e]:Pa.push(e)}var Wa=S.ReactCurrentBatchConfig;function Ga(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ka(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function qa(e){var t=e._init;return t(e._payload)}function Ja(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=ou(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=uu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===te&&qa(i)===t.type)?(r=a(t,n.props),r.ref=Ga(e,t,n),r.return=e,r):(r=su(n.type,n.key,n.props,null,e.mode,r),r.ref=Ga(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=du(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=cu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=uu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=su(t.type,t.key,t.props,null,e.mode,n),n.ref=Ga(e,null,t),n.return=e,n;case w:return t=du(t,e.mode,n),t.return=e,t;case te:var r=t._init;return f(e,r(t._payload),n)}if(we(t)||re(t))return t=cu(t,e.mode,n,null),t.return=e,t;Ka(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case te:return i=n._init,p(e,t,i(n._payload),r)}if(we(n)||re(n))return i===null?d(e,t,n,r,null):null;Ka(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case te:var a=r._init;return m(e,t,n,a(r._payload),i)}if(we(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);Ka(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Na&&Da(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Na&&Da(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Na&&Da(r,h),l}function g(a,s,c,l){var u=re(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Na&&Da(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Na&&Da(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Na&&Da(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===te&&qa(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ga(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===T?(r=cu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=su(i.type,i.key,i.props,null,e.mode,o),o.ref=Ga(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=du(i,e.mode,o),r.return=e,e=r}return s(e);case te:return l=i._init,_(e,r,l(i._payload),o)}if(we(i))return h(e,r,i,o);if(re(i))return g(e,r,i,o);Ka(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=uu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ya=Ja(!0),Xa=Ja(!1),Za=Qi(null),Qa=null,$a=null,eo=null;function to(){eo=$a=Qa=null}function no(e){var t=Za.current;$i(Za),e._currentValue=t}function ro(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function io(e,t){Qa=e,eo=$a=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Gs=!0),e.firstContext=null)}function ao(e){var t=e._currentValue;if(eo!==e)if(e={context:e,memoizedValue:t,next:null},$a===null){if(Qa===null)throw Error(r(308));$a=e,Qa.dependencies={lanes:0,firstContext:e}}else $a=$a.next=e;return t}var oo=null;function so(e){oo===null?oo=[e]:oo.push(e)}function co(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,so(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,el&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,so(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}function _o(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vo(e,t,n,r){var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ie({},d,f);break a;case 2:uo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);cl|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var bo={},xo=Qi(bo),F=Qi(bo),So=Qi(bo);function Co(e){if(e===bo)throw Error(r(174));return e}function wo(e,t){switch(ea(So,t),ea(F,e),ea(xo,bo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:je(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=je(t,e)}$i(xo),ea(xo,t)}function To(){$i(xo),$i(F),$i(So)}function Eo(e){Co(So.current);var t=Co(xo.current),n=je(t,e.type);t!==n&&(ea(F,e),ea(xo,n))}function Do(e){F.current===e&&($i(xo),$i(F))}var Oo=Qi(0);function ko(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ao=[];function jo(){for(var e=0;e<Ao.length;e++)Ao[e]._workInProgressVersionPrimary=null;Ao.length=0}var Mo=S.ReactCurrentDispatcher,No=S.ReactCurrentBatchConfig,Po=0,Fo=null,Io=null,I=null,Lo=!1,Ro=!1,zo=0,Bo=0;function L(){throw Error(r(321))}function Vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Ho(e,t,n,i,a,o){if(Po=o,Fo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mo.current=e===null||e.memoizedState===null?Ts:Es,e=n(i,a),Ro){o=0;do{if(Ro=!1,zo=0,25<=o)throw Error(r(301));o+=1,I=Io=null,t.updateQueue=null,Mo.current=Ds,e=n(i,a)}while(Ro)}if(Mo.current=ws,t=Io!==null&&Io.next!==null,Po=0,I=Io=Fo=null,Lo=!1,t)throw Error(r(300));return e}function Uo(){var e=zo!==0;return zo=0,e}function Wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return I===null?Fo.memoizedState=I=e:I=I.next=e,I}function Go(){if(Io===null){var e=Fo.alternate;e=e===null?null:e.memoizedState}else e=Io.next;var t=I===null?Fo.memoizedState:I.next;if(t!==null)I=t,Io=e;else{if(e===null)throw Error(r(310));Io=e,e={memoizedState:Io.memoizedState,baseState:Io.baseState,baseQueue:Io.baseQueue,queue:Io.queue,next:null},I===null?Fo.memoizedState=I=e:I=I.next=e}return I}function Ko(e,t){return typeof t==`function`?t(e):t}function qo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Io,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Po&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Fo.lanes|=d,cl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Fr(i,t.memoizedState)||(Gs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Fo.lanes|=o,cl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Gs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Yo(){}function Xo(e,t){var n=Fo,i=Go(),a=t(),o=!Fr(i.memoizedState,a);if(o&&(i.memoizedState=a,Gs=!0),i=i.queue,us($o.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||I!==null&&I.memoizedState.tag&1){if(n.flags|=2048,rs(9,Qo.bind(null,n,i,a,t),void 0,null),tl===null)throw Error(r(349));Po&30||Zo(n,t,a)}return a}function Zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Fo.updateQueue,t===null?(t={lastEffect:null,stores:null},Fo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qo(e,t,n,r){t.value=n,t.getSnapshot=r,es(t)&&ts(e)}function $o(e,t,n){return n(function(){es(t)&&ts(e)})}function es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ts(e){var t=lo(e,1);t!==null&&Ol(t,e,1,-1)}function ns(e){var t=Wo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t.queue=e,e=e.dispatch=bs.bind(null,Fo,e),[t.memoizedState,e]}function rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Fo.updateQueue,t===null?(t={lastEffect:null,stores:null},Fo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function is(){return Go().memoizedState}function ss(e,t,n,r){var i=Wo();Fo.flags|=e,i.memoizedState=rs(1|t,n,void 0,r===void 0?null:r)}function cs(e,t,n,r){var i=Go();r=r===void 0?null:r;var a=void 0;if(Io!==null){var o=Io.memoizedState;if(a=o.destroy,r!==null&&Vo(r,o.deps)){i.memoizedState=rs(t,n,a,r);return}}Fo.flags|=e,i.memoizedState=rs(1|t,n,a,r)}function ls(e,t){return ss(8390656,8,e,t)}function us(e,t){return cs(2048,8,e,t)}function ds(e,t){return cs(4,2,e,t)}function fs(e,t){return cs(4,4,e,t)}function ps(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function R(e,t,n){return n=n==null?null:n.concat([e]),cs(4,4,ps.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _s(e,t,n){return Po&21?(Fr(n,t)||(n=Ht(),Fo.lanes|=n,cl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Gs=!0),e.memoizedState=n)}function vs(e,t){var n=qt;qt=n!==0&&4>n?n:4,e(!0);var r=No.transition;No.transition={};try{e(!1),t()}finally{qt=n,No.transition=r}}function z(){return Go().memoizedState}function ys(e,t,n){var r=Dl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xs(e))Ss(t,n);else if(n=co(e,t,n,r),n!==null){var i=El();Ol(n,e,r,i),Cs(n,t,r)}}function bs(e,t,n){var r=Dl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xs(e))Ss(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o)){var c=t.interleaved;c===null?(i.next=i,so(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=co(e,t,i,r),n!==null&&(i=El(),Ol(n,e,r,i),Cs(n,t,r))}}function xs(e){var t=e.alternate;return e===Fo||t!==null&&t===Fo}function Ss(e,t){Ro=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kt(e,n)}}var ws={readContext:ao,useCallback:L,useContext:L,useEffect:L,useImperativeHandle:L,useInsertionEffect:L,useLayoutEffect:L,useMemo:L,useReducer:L,useRef:L,useState:L,useDebugValue:L,useDeferredValue:L,useTransition:L,useMutableSource:L,useSyncExternalStore:L,useId:L,unstable_isNewReconciler:!1},Ts={readContext:ao,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:ao,useEffect:ls,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ss(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return ss(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ys.bind(null,Fo,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:ns,useDebugValue:ms,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=ns(!1),t=e[0];return e=vs.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Fo,a=Wo();if(Na){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),tl===null)throw Error(r(349));Po&30||Zo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls($o.bind(null,i,o,e),[e]),i.flags|=2048,rs(9,Qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=tl.identifierPrefix;if(Na){var n=Ea,r=Ta;n=(r&~(1<<32-jt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=zo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Bo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Es={readContext:ao,useCallback:hs,useContext:ao,useEffect:us,useImperativeHandle:R,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:gs,useReducer:qo,useRef:is,useState:function(){return qo(Ko)},useDebugValue:ms,useDeferredValue:function(e){return _s(Go(),Io.memoizedState,e)},useTransition:function(){return[qo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:z,unstable_isNewReconciler:!1},Ds={readContext:ao,useCallback:hs,useContext:ao,useEffect:us,useImperativeHandle:R,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:gs,useReducer:Jo,useRef:is,useState:function(){return Jo(Ko)},useDebugValue:ms,useDeferredValue:function(e){var t=Go();return Io===null?t.memoizedState=e:_s(t,Io.memoizedState,e)},useTransition:function(){return[Jo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:z,unstable_isNewReconciler:!1};function Os(e,t){if(e&&e.defaultProps){for(var n in t=ie({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ie({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var As={isMounted:function(e){return(e=e._reactInternals)?dt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=El(),i=Dl(e),a=mo(r,i);a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(Ol(t,e,i,r),go(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=El(),i=Dl(e),a=mo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(Ol(t,e,i,r),go(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=El(),r=Dl(e),i=mo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ho(e,i,r),t!==null&&(Ol(t,e,r,n),go(t,e,r))}};function js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function Ms(e,t,n){var r=!1,i=ta,a=t.contextType;return typeof a==`object`&&a?a=ao(a):(i=oa(t)?ia:na.current,r=t.contextTypes,a=(r=r!=null)?aa(e,i):ta),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=As,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ns(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function Ps(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},fo(e);var a=t.contextType;typeof a==`object`&&a?i.context=ao(a):(a=oa(t)?ia:na.current,i.context=aa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ks(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&As.enqueueReplaceState(i,i.state,null),vo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Fs(e,t){try{var n=``,r=t;do n+=le(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
40
|
+
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ce=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?se(e):``}function ue(e){switch(e.tag){case 5:return se(e.type);case 16:return se(`Lazy`);case 13:return se(`Suspense`);case 19:return se(`SuspenseList`);case 0:case 2:case 15:return e=le(e.type,!1),e;case 11:return e=le(e.type.render,!1),e;case 1:return e=le(e.type,!0),e;default:return``}}function de(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case T:return`Fragment`;case w:return`Portal`;case ee:return`Profiler`;case E:return`StrictMode`;case k:return`Suspense`;case A:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case O:return(e.displayName||`Context`)+`.Consumer`;case D:return(e._context.displayName||`Context`)+`.Provider`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case j:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}function fe(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return de(t);case 8:return t===E?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function pe(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function he(e){var t=me(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ge(e){e._valueTracker||=he(e)}function _e(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=me(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function ve(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function ye(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function be(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=pe(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function xe(e,t){t=t.checked,t!=null&&x(e,`checked`,t,!1)}function Se(e,t){xe(e,t);var n=pe(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?we(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&we(e,t.type,pe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ce(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function we(e,t,n){(t!==`number`||ve(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Te=Array.isArray;function Ee(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+pe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function De(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ae({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Oe(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Te(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:pe(n)}}function ke(e,t){var n=pe(t.value),r=pe(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function je(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Me(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?je(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ne,Pe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Ne||=document.createElement(`div`),Ne.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ne.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ie={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Le=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ie).forEach(function(e){Le.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ie[t]=Ie[e]})});function Re(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ie.hasOwnProperty(e)&&Ie[e]?(``+t).trim():t+`px`}function ze(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Re(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Be=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ve(e,t){if(t){if(Be[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function He(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ue=null;function We(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ge=null,Ke=null,qe=null;function Je(e){if(e=Ji(e)){if(typeof Ge!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Xi(t),Ge(e.stateNode,e.type,t))}}function Ye(e){Ke?qe?qe.push(e):qe=[e]:Ke=e}function Xe(){if(Ke){var e=Ke,t=qe;if(qe=Ke=null,Je(e),t)for(e=0;e<t.length;e++)Je(t[e])}}function Ze(e,t){return e(t)}function Qe(){}var $e=!1;function et(e,t,n){if($e)return e(t,n);$e=!0;try{return Ze(e,t,n)}finally{$e=!1,(Ke!==null||qe!==null)&&(Qe(),Xe())}}function tt(e,t){var n=e.stateNode;if(n===null)return null;var i=Xi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var nt=!1;if(c)try{var rt={};Object.defineProperty(rt,"passive",{get:function(){nt=!0}}),window.addEventListener(`test`,rt,rt),window.removeEventListener(`test`,rt,rt)}catch{nt=!1}function it(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var at=!1,ot=null,st=!1,ct=null,lt={onError:function(e){at=!0,ot=e}};function ut(e,t,n,r,i,a,o,s,c){at=!1,ot=null,it.apply(lt,arguments)}function dt(e,t,n,i,a,o,s,c,l){if(ut.apply(this,arguments),at){if(at){var u=ot;at=!1,ot=null}else throw Error(r(198));st||(st=!0,ct=u)}}function ft(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function pt(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 mt(e){if(ft(e)!==e)throw Error(r(188))}function ht(e){var t=e.alternate;if(!t){if(t=ft(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return mt(a),e;if(o===i)return mt(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function gt(e){return e=ht(e),e===null?null:_t(e)}function _t(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_t(e);if(t!==null)return t;e=e.sibling}return null}var vt=n.unstable_scheduleCallback,yt=n.unstable_cancelCallback,bt=n.unstable_shouldYield,xt=n.unstable_requestPaint,St=n.unstable_now,Ct=n.unstable_getCurrentPriorityLevel,wt=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Et=n.unstable_NormalPriority,Dt=n.unstable_LowPriority,Ot=n.unstable_IdlePriority,kt=null,At=null;function jt(e){if(At&&typeof At.onCommitFiberRoot==`function`)try{At.onCommitFiberRoot(kt,e,void 0,(e.current.flags&128)==128)}catch{}}var Mt=Math.clz32?Math.clz32:Ft,Nt=Math.log,Pt=Math.LN2;function Ft(e){return e>>>=0,e===0?32:31-(Nt(e)/Pt|0)|0}var It=64,Lt=4194304;function Rt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Rt(a))):r=Rt(s)}else o=n&~i,o===0?a!==0&&(r=Rt(a)):r=Rt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Mt(t),i=1<<n,r|=e[n],t&=~i;return r}function Bt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Mt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Bt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ht(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Ut(){var e=It;return It<<=1,!(It&4194240)&&(It=64),e}function Wt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Mt(t),e[t]=n}function Kt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Mt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function qt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Mt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Jt=0;function Yt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xt,Zt,Qt,$t,en,tn=!1,nn=[],rn=null,an=null,on=null,sn=new Map,cn=new Map,ln=[],un=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function dn(e,t){switch(e){case`focusin`:case`focusout`:rn=null;break;case`dragenter`:case`dragleave`:an=null;break;case`mouseover`:case`mouseout`:on=null;break;case`pointerover`:case`pointerout`:sn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:cn.delete(t.pointerId)}}function fn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Ji(t),t!==null&&Zt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function pn(e,t,n,r,i){switch(t){case`focusin`:return rn=fn(rn,e,t,n,r,i),!0;case`dragenter`:return an=fn(an,e,t,n,r,i),!0;case`mouseover`:return on=fn(on,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return sn.set(a,fn(sn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,cn.set(a,fn(cn.get(a)||null,e,t,n,r,i)),!0}return!1}function mn(e){var t=qi(e.target);if(t!==null){var n=ft(t);if(n!==null){if(t=n.tag,t===13){if(t=pt(n),t!==null){e.blockedOn=t,en(e.priority,function(){Qt(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function hn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=En(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ue=r,n.target.dispatchEvent(r),Ue=null}else return t=Ji(n),t!==null&&Zt(t),e.blockedOn=n,!1;t.shift()}return!0}function gn(e,t,n){hn(e)&&n.delete(t)}function _n(){tn=!1,rn!==null&&hn(rn)&&(rn=null),an!==null&&hn(an)&&(an=null),on!==null&&hn(on)&&(on=null),sn.forEach(gn),cn.forEach(gn)}function vn(e,t){e.blockedOn===t&&(e.blockedOn=null,tn||(tn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,_n)))}function yn(e){function t(t){return vn(t,e)}if(0<nn.length){vn(nn[0],e);for(var n=1;n<nn.length;n++){var r=nn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(rn!==null&&vn(rn,e),an!==null&&vn(an,e),on!==null&&vn(on,e),sn.forEach(t),cn.forEach(t),n=0;n<ln.length;n++)r=ln[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)mn(n),n.blockedOn===null&&ln.shift()}var bn=S.ReactCurrentBatchConfig,xn=!0;function Sn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=1,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function Cn(e,t,n,r){var i=Jt,a=bn.transition;bn.transition=null;try{Jt=4,wn(e,t,n,r)}finally{Jt=i,bn.transition=a}}function wn(e,t,n,r){if(xn){var i=En(e,t,n,r);if(i===null)yi(e,t,r,Tn,n),dn(e,r);else if(pn(i,e,t,n,r))r.stopPropagation();else if(dn(e,r),t&4&&-1<un.indexOf(e)){for(;i!==null;){var a=Ji(i);if(a!==null&&Xt(a),a=En(e,t,n,r),a===null&&yi(e,t,r,Tn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else yi(e,t,r,null,n)}}var Tn=null;function En(e,t,n,r){if(Tn=null,e=We(r),e=qi(e),e!==null)if(t=ft(e),t===null)e=null;else if(n=t.tag,n===13){if(e=pt(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Tn=e,null}function Dn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(Ct()){case wt:return 1;case Tt:return 4;case Et:case Dt:return 16;case Ot:return 536870912;default:return 16}default:return 16}}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(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 Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=ae({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=ae({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,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!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(ae({},Un,{dataTransfer:0})),Kn=Fn(ae({},Rn,{relatedTarget:0})),qn=Fn(ae({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(ae({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(ae({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={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`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(ae({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(ae({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(ae({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ir=Fn(ae({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),ar=Fn(ae({},Un,{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})),or=[9,13,27,32],sr=c&&`CompositionEvent`in window,cr=null;c&&`documentMode`in document&&(cr=document.documentMode);var lr=c&&`TextEvent`in window&&!cr,ur=c&&(!sr||cr&&8<cr&&11>=cr),dr=` `,fr=!1;function N(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function pr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var mr=!1;function hr(e,t){switch(e){case`compositionend`:return pr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function gr(e,t){if(mr)return e===`compositionend`||!sr&&N(e,t)?(e=jn(),An=kn=On=null,mr=!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 ur&&t.locale!==`ko`?null:t.data;default:return null}}var _r={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 vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!_r[e.type]:t===`textarea`}function yr(e,t,n,r){Ye(r),t=xi(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var br=null,xr=null;function Sr(e){pi(e,0)}function Cr(e){if(_e(Yi(e)))return e}function wr(e,t){if(e===`change`)return t}var Tr=!1;if(c){var Er;if(c){var Dr=`oninput`in document;if(!Dr){var Or=document.createElement(`div`);Or.setAttribute(`oninput`,`return;`),Dr=typeof Or.oninput==`function`}Er=Dr}else Er=!1;Tr=Er&&(!document.documentMode||9<document.documentMode)}function kr(){br&&(br.detachEvent(`onpropertychange`,Ar),xr=br=null)}function Ar(e){if(e.propertyName===`value`&&Cr(xr)){var t=[];yr(t,xr,e,We(e)),et(Sr,t)}}function jr(e,t,n){e===`focusin`?(kr(),br=t,xr=n,br.attachEvent(`onpropertychange`,Ar)):e===`focusout`&&kr()}function Mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Cr(xr)}function Nr(e,t){if(e===`click`)return Cr(t)}function Pr(e,t){if(e===`input`||e===`change`)return Cr(t)}function Fr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Ir=typeof Object.is==`function`?Object.is:Fr;function Lr(e,t){if(Ir(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Ir(e[i],t[i]))return!1}return!0}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(){for(var e=window,t=ve();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=ve(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Ur(e){var t=Vr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Br(n.ownerDocument.documentElement,n)){if(r!==null&&Hr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=zr(n,a);var o=zr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Wr=c&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==ve(r)||(r=Gr,`selectionStart`in r&&Hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Lr(qr,r)||(qr=r,r=xi(Kr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Gr)))}function Xr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Zr={animationend:Xr(`Animation`,`AnimationEnd`),animationiteration:Xr(`Animation`,`AnimationIteration`),animationstart:Xr(`Animation`,`AnimationStart`),transitionend:Xr(`Transition`,`TransitionEnd`)},Qr={},$r={};c&&($r=document.createElement(`div`).style,`AnimationEvent`in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),`TransitionEvent`in window||delete Zr.transitionend.transition);function ei(e){if(Qr[e])return Qr[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $r)return Qr[e]=t[n];return e}var ti=ei(`animationend`),ni=ei(`animationiteration`),ri=ei(`animationstart`),ii=ei(`transitionend`),ai=new Map,oi=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function si(e,t){ai.set(e,t),o(t,[e])}for(var ci=0;ci<oi.length;ci++){var li=oi[ci];si(li.toLowerCase(),`on`+(li[0].toUpperCase()+li.slice(1)))}si(ti,`onAnimationEnd`),si(ni,`onAnimationIteration`),si(ri,`onAnimationStart`),si(`dblclick`,`onDoubleClick`),si(`focusin`,`onFocus`),si(`focusout`,`onBlur`),si(ii,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var ui=`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(` `),di=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ui));function fi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,dt(r,t,void 0,e),e.currentTarget=null}function pi(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;fi(i,s,l),a=c}}}if(st)throw e=ct,st=!1,ct=null,e}function mi(e,t){var n=t[Wi];n===void 0&&(n=t[Wi]=new Set);var r=e+`__bubble`;n.has(r)||(vi(t,e,2,!1),n.add(r))}function hi(e,t,n){var r=0;t&&(r|=4),vi(n,e,r,t)}var gi=`_reactListening`+Math.random().toString(36).slice(2);function _i(e){if(!e[gi]){e[gi]=!0,i.forEach(function(t){t!==`selectionchange`&&(di.has(t)||hi(t,!1,e),hi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gi]||(t[gi]=!0,hi(`selectionchange`,!1,t))}}function vi(e,t,n,r){switch(Dn(t)){case 1:var i=Sn;break;case 4:i=Cn;break;default:i=wn}n=i.bind(null,t,n,e),i=void 0,!nt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function yi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=qi(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}et(function(){var r=a,i=We(n),o=[];a:{var s=ai.get(e);if(s!==void 0){var c=Ln,l=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:c=tr;break;case`focusin`:l=`focus`,c=Kn;break;case`focusout`:l=`blur`,c=Kn;break;case`beforeblur`:case`afterblur`:c=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=rr;break;case ti:case ni:case ri:c=qn;break;case ii:c=ir;break;case`scroll`:c=zn;break;case`wheel`:c=ar;break;case`copy`:case`cut`:case`paste`:c=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=nr}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=tt(p,f),h!=null&&u.push(bi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Ue&&(l=n.relatedTarget||n.fromElement)&&(qi(l)||l[Ui]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?qi(l):null,l!==null&&(d=ft(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Wn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=nr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Yi(c),m=l==null?s:Yi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,qi(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=Si(m))p++;for(m=0,h=f;h;h=Si(h))m++;for(;0<p-m;)u=Si(u),p--;for(;0<m-p;)f=Si(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=Si(u),f=Si(f)}u=null}else u=null;c!==null&&Ci(o,s,c,u,!1),l!==null&&d!==null&&Ci(o,d,l,u,!0)}}a:{if(s=r?Yi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=wr;else if(vr(s))if(Tr)g=Pr;else{g=Mr;var _=jr}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Nr);if(g&&=g(e,r)){yr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&we(s,`number`,s.value)}switch(_=r?Yi(r):window,e){case`focusin`:(vr(_)||_.contentEditable===`true`)&&(Gr=_,Kr=r,qr=null);break;case`focusout`:qr=Kr=Gr=null;break;case`mousedown`:Jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Jr=!1,Yr(o,n,i);break;case`selectionchange`:if(Wr)break;case`keydown`:case`keyup`:Yr(o,n,i)}var v;if(sr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else mr?N(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(ur&&n.locale!==`ko`&&(mr||y!==`onCompositionStart`?y===`onCompositionEnd`&&mr&&(v=jn()):(On=i,kn=`value`in On?On.value:On.textContent,mr=!0)),_=xi(r,y),0<_.length&&(y=new Yn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=pr(n),v!==null&&(y.data=v)))),(v=lr?hr(e,n):gr(e,n))&&(r=xi(r,`onBeforeInput`),0<r.length&&(i=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}pi(o,t)})}function bi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xi(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=tt(e,n),a!=null&&r.unshift(bi(e,a,i)),a=tt(e,t),a!=null&&r.push(bi(e,a,i))),e=e.return}return r}function Si(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ci(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=tt(n,a),c!=null&&o.unshift(bi(n,c,s))):i||(c=tt(n,a),c!=null&&o.push(bi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var wi=/\r\n?/g,Ti=/\u0000|\uFFFD/g;function Ei(e){return(typeof e==`string`?e:``+e).replace(wi,`
|
|
41
|
+
`).replace(Ti,``)}function Di(e,t,n){if(t=Ei(t),Ei(e)!==t&&n)throw Error(r(425))}function Oi(){}var ki=null,Ai=null;function ji(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mi=typeof setTimeout==`function`?setTimeout:void 0,Ni=typeof clearTimeout==`function`?clearTimeout:void 0,Pi=typeof Promise==`function`?Promise:void 0,Fi=typeof queueMicrotask==`function`?queueMicrotask:Pi===void 0?Mi:function(e){return Pi.resolve(null).then(e).catch(Ii)};function Ii(e){setTimeout(function(){throw e})}function Li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),yn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);yn(t)}function Ri(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function zi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Bi=Math.random().toString(36).slice(2),Vi=`__reactFiber$`+Bi,Hi=`__reactProps$`+Bi,Ui=`__reactContainer$`+Bi,Wi=`__reactEvents$`+Bi,Gi=`__reactListeners$`+Bi,Ki=`__reactHandles$`+Bi;function qi(e){var t=e[Vi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ui]||n[Vi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zi(e);e!==null;){if(n=e[Vi])return n;e=zi(e)}return t}e=n,n=e.parentNode}return null}function Ji(e){return e=e[Vi]||e[Ui],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Xi(e){return e[Hi]||null}var Zi=[],Qi=-1;function $i(e){return{current:e}}function ea(e){0>Qi||(e.current=Zi[Qi],Zi[Qi]=null,Qi--)}function ta(e,t){Qi++,Zi[Qi]=e.current,e.current=t}var na={},ra=$i(na),ia=$i(!1),aa=na;function oa(e,t){var n=e.type.contextTypes;if(!n)return na;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function sa(e){return e=e.childContextTypes,e!=null}function ca(){ea(ia),ea(ra)}function la(e,t,n){if(ra.current!==na)throw Error(r(168));ta(ra,t),ta(ia,n)}function ua(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,fe(e)||`Unknown`,a));return ae({},n,i)}function da(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||na,aa=ra.current,ta(ra,e),ta(ia,ia.current),!0}function fa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ua(e,t,aa),i.__reactInternalMemoizedMergedChildContext=e,ea(ia),ea(ra),ta(ra,e)):ea(ia),ta(ia,n)}var pa=null,ma=!1,ha=!1;function ga(e){pa===null?pa=[e]:pa.push(e)}function _a(e){ma=!0,ga(e)}function va(){if(!ha&&pa!==null){ha=!0;var e=0,t=Jt;try{var n=pa;for(Jt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}pa=null,ma=!1}catch(t){throw pa!==null&&(pa=pa.slice(e+1)),vt(wt,va),t}finally{Jt=t,ha=!1}}return null}var ya=[],ba=0,xa=null,Sa=0,Ca=[],wa=0,Ta=null,Ea=1,Da=``;function Oa(e,t){ya[ba++]=Sa,ya[ba++]=xa,xa=e,Sa=t}function ka(e,t,n){Ca[wa++]=Ea,Ca[wa++]=Da,Ca[wa++]=Ta,Ta=e;var r=Ea;e=Da;var i=32-Mt(r)-1;r&=~(1<<i),n+=1;var a=32-Mt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ea=1<<32-Mt(t)+i|n<<i|r,Da=a+e}else Ea=1<<a|n<<i|r,Da=e}function Aa(e){e.return!==null&&(Oa(e,1),ka(e,1,0))}function ja(e){for(;e===xa;)xa=ya[--ba],ya[ba]=null,Sa=ya[--ba],ya[ba]=null;for(;e===Ta;)Ta=Ca[--wa],Ca[wa]=null,Da=Ca[--wa],Ca[wa]=null,Ea=Ca[--wa],Ca[wa]=null}var Ma=null,Na=null,Pa=!1,Fa=null;function Ia(e,t){var n=ru(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function La(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,Ma=e,Na=Ri(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,Ma=e,Na=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=Ta===null?null:{id:Ea,overflow:Da},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ru(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ma=e,Na=null,!0);default:return!1}}function Ra(e){return(e.mode&1)!=0&&(e.flags&128)==0}function za(e){if(Pa){var t=Na;if(t){var n=t;if(!La(e,t)){if(Ra(e))throw Error(r(418));t=Ri(n.nextSibling);var i=Ma;t&&La(e,t)?Ia(i,n):(e.flags=e.flags&-4097|2,Pa=!1,Ma=e)}}else{if(Ra(e))throw Error(r(418));e.flags=e.flags&-4097|2,Pa=!1,Ma=e}}}function Ba(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ma=e}function Va(e){if(e!==Ma)return!1;if(!Pa)return Ba(e),Pa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!ji(e.type,e.memoizedProps)),t&&=Na){if(Ra(e))throw Ha(),Error(r(418));for(;t;)Ia(e,t),t=Ri(t.nextSibling)}if(Ba(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Na=Ri(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Na=null}}else Na=Ma?Ri(e.stateNode.nextSibling):null;return!0}function Ha(){for(var e=Na;e;)e=Ri(e.nextSibling)}function Ua(){Na=Ma=null,Pa=!1}function Wa(e){Fa===null?Fa=[e]:Fa.push(e)}var Ga=S.ReactCurrentBatchConfig;function Ka(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function qa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ja(e){var t=e._init;return t(e._payload)}function Ya(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=ou(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=uu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===T?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===M&&Ja(i)===t.type)?(r=a(t,n.props),r.ref=Ka(e,t,n),r.return=e,r):(r=su(n.type,n.key,n.props,null,e.mode,r),r.ref=Ka(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=du(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=cu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=uu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case C:return n=su(t.type,t.key,t.props,null,e.mode,n),n.ref=Ka(e,null,t),n.return=e,n;case w:return t=du(t,e.mode,n),t.return=e,t;case M:var r=t._init;return f(e,r(t._payload),n)}if(Te(t)||ie(t))return t=cu(t,e.mode,n,null),t.return=e,t;qa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case C:return n.key===i?l(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case M:return i=n._init,p(e,t,i(n._payload),r)}if(Te(n)||ie(n))return i===null?d(e,t,n,r,null):null;qa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case C:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case w:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case M:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Te(r)||ie(r))return e=e.get(n)||null,d(t,e,r,i,null);qa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Pa&&Oa(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Pa&&Oa(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Pa&&Oa(r,h),l}function g(a,s,c,l){var u=ie(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Pa&&Oa(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Pa&&Oa(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Pa&&Oa(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===T&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case C:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===T){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===M&&Ja(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Ka(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===T?(r=cu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=su(i.type,i.key,i.props,null,e.mode,o),o.ref=Ka(e,r,i),o.return=e,e=o)}return s(e);case w:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=du(i,e.mode,o),r.return=e,e=r}return s(e);case M:return l=i._init,_(e,r,l(i._payload),o)}if(Te(i))return h(e,r,i,o);if(ie(i))return g(e,r,i,o);qa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=uu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Xa=Ya(!0),Za=Ya(!1),Qa=$i(null),$a=null,eo=null,to=null;function no(){to=eo=$a=null}function ro(e){var t=Qa.current;ea(Qa),e._currentValue=t}function io(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ao(e,t){$a=e,to=eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Gs=!0),e.firstContext=null)}function oo(e){var t=e._currentValue;if(to!==e)if(e={context:e,memoizedValue:t,next:null},eo===null){if($a===null)throw Error(r(308));eo=e,$a.dependencies={lanes:0,firstContext:e}}else eo=eo.next=e;return t}var so=null;function co(e){so===null?so=[e]:so.push(e)}function P(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,co(t)):(n.next=i.next,i.next=n),t.interleaved=n,lo(e,r)}function lo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var uo=!1;function fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function po(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,el&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lo(e,n)}return i=r.interleaved,i===null?(t.next=t,co(r)):(t.next=i.next,i.next=t),r.interleaved=t,lo(e,n)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}function _o(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function vo(e,t,n,r){var i=e.updateQueue;uo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ae({},d,f);break a;case 2:uo=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);cl|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var bo={},xo=$i(bo),So=$i(bo),Co=$i(bo);function wo(e){if(e===bo)throw Error(r(174));return e}function F(e,t){switch(ta(Co,t),ta(So,e),ta(xo,bo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Me(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Me(t,e)}ea(xo),ta(xo,t)}function To(){ea(xo),ea(So),ea(Co)}function Eo(e){wo(Co.current);var t=wo(xo.current),n=Me(t,e.type);t!==n&&(ta(So,e),ta(xo,n))}function Do(e){So.current===e&&(ea(xo),ea(So))}var I=$i(0);function L(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Oo=[];function ko(){for(var e=0;e<Oo.length;e++)Oo[e]._workInProgressVersionPrimary=null;Oo.length=0}var Ao=S.ReactCurrentDispatcher,jo=S.ReactCurrentBatchConfig,Mo=0,No=null,Po=null,Fo=null,Io=!1,Lo=!1,Ro=0,zo=0;function Bo(){throw Error(r(321))}function Vo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ir(e[n],t[n]))return!1;return!0}function Ho(e,t,n,i,a,o){if(Mo=o,No=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ao.current=e===null||e.memoizedState===null?Ts:Es,e=n(i,a),Lo){o=0;do{if(Lo=!1,Ro=0,25<=o)throw Error(r(301));o+=1,Fo=Po=null,t.updateQueue=null,Ao.current=Ds,e=n(i,a)}while(Lo)}if(Ao.current=ws,t=Po!==null&&Po.next!==null,Mo=0,Fo=Po=No=null,Io=!1,t)throw Error(r(300));return e}function Uo(){var e=Ro!==0;return Ro=0,e}function Wo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e,Fo}function Go(){if(Po===null){var e=No.alternate;e=e===null?null:e.memoizedState}else e=Po.next;var t=Fo===null?No.memoizedState:Fo.next;if(t!==null)Fo=t,Po=e;else{if(e===null)throw Error(r(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Fo===null?No.memoizedState=Fo=e:Fo=Fo.next=e}return Fo}function Ko(e,t){return typeof t==`function`?t(e):t}function qo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Po,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Mo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,No.lanes|=d,cl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Ir(i,t.memoizedState)||(Gs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,No.lanes|=o,cl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jo(e){var t=Go(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Ir(o,t.memoizedState)||(Gs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Yo(){}function Xo(e,t){var n=No,i=Go(),a=t(),o=!Ir(i.memoizedState,a);if(o&&(i.memoizedState=a,Gs=!0),i=i.queue,us($o.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Fo!==null&&Fo.memoizedState.tag&1){if(n.flags|=2048,rs(9,Qo.bind(null,n,i,a,t),void 0,null),tl===null)throw Error(r(349));Mo&30||Zo(n,t,a)}return a}function Zo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Qo(e,t,n,r){t.value=n,t.getSnapshot=r,es(t)&&ts(e)}function $o(e,t,n){return n(function(){es(t)&&ts(e)})}function es(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ir(e,n)}catch{return!0}}function ts(e){var t=lo(e,1);t!==null&&Ol(t,e,1,-1)}function ns(e){var t=Wo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t.queue=e,e=e.dispatch=bs.bind(null,No,e),[t.memoizedState,e]}function rs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=No.updateQueue,t===null?(t={lastEffect:null,stores:null},No.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function is(){return Go().memoizedState}function ss(e,t,n,r){var i=Wo();No.flags|=e,i.memoizedState=rs(1|t,n,void 0,r===void 0?null:r)}function cs(e,t,n,r){var i=Go();r=r===void 0?null:r;var a=void 0;if(Po!==null){var o=Po.memoizedState;if(a=o.destroy,r!==null&&Vo(r,o.deps)){i.memoizedState=rs(t,n,a,r);return}}No.flags|=e,i.memoizedState=rs(1|t,n,a,r)}function ls(e,t){return ss(8390656,8,e,t)}function us(e,t){return cs(2048,8,e,t)}function ds(e,t){return cs(4,2,e,t)}function fs(e,t){return cs(4,4,e,t)}function ps(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function R(e,t,n){return n=n==null?null:n.concat([e]),cs(4,4,ps.bind(null,t,e),n)}function ms(){}function hs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gs(e,t){var n=Go();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Vo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function _s(e,t,n){return Mo&21?(Ir(n,t)||(n=Ut(),No.lanes|=n,cl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Gs=!0),e.memoizedState=n)}function vs(e,t){var n=Jt;Jt=n!==0&&4>n?n:4,e(!0);var r=jo.transition;jo.transition={};try{e(!1),t()}finally{Jt=n,jo.transition=r}}function z(){return Go().memoizedState}function ys(e,t,n){var r=Dl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xs(e))Ss(t,n);else if(n=P(e,t,n,r),n!==null){var i=El();Ol(n,e,r,i),Cs(n,t,r)}}function bs(e,t,n){var r=Dl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xs(e))Ss(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ir(s,o)){var c=t.interleaved;c===null?(i.next=i,co(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=P(e,t,i,r),n!==null&&(i=El(),Ol(n,e,r,i),Cs(n,t,r))}}function xs(e){var t=e.alternate;return e===No||t!==null&&t===No}function Ss(e,t){Lo=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qt(e,n)}}var ws={readContext:oo,useCallback:Bo,useContext:Bo,useEffect:Bo,useImperativeHandle:Bo,useInsertionEffect:Bo,useLayoutEffect:Bo,useMemo:Bo,useReducer:Bo,useRef:Bo,useState:Bo,useDebugValue:Bo,useDeferredValue:Bo,useTransition:Bo,useMutableSource:Bo,useSyncExternalStore:Bo,useId:Bo,unstable_isNewReconciler:!1},Ts={readContext:oo,useCallback:function(e,t){return Wo().memoizedState=[e,t===void 0?null:t],e},useContext:oo,useEffect:ls,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),ss(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){return ss(4,2,e,t)},useMemo:function(e,t){var n=Wo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Wo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ys.bind(null,No,e),[r.memoizedState,e]},useRef:function(e){var t=Wo();return e={current:e},t.memoizedState=e},useState:ns,useDebugValue:ms,useDeferredValue:function(e){return Wo().memoizedState=e},useTransition:function(){var e=ns(!1),t=e[0];return e=vs.bind(null,e[1]),Wo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=No,a=Wo();if(Pa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),tl===null)throw Error(r(349));Mo&30||Zo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls($o.bind(null,i,o,e),[e]),i.flags|=2048,rs(9,Qo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Wo(),t=tl.identifierPrefix;if(Pa){var n=Da,r=Ea;n=(r&~(1<<32-Mt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ro++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=zo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},Es={readContext:oo,useCallback:hs,useContext:oo,useEffect:us,useImperativeHandle:R,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:gs,useReducer:qo,useRef:is,useState:function(){return qo(Ko)},useDebugValue:ms,useDeferredValue:function(e){return _s(Go(),Po.memoizedState,e)},useTransition:function(){return[qo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:z,unstable_isNewReconciler:!1},Ds={readContext:oo,useCallback:hs,useContext:oo,useEffect:us,useImperativeHandle:R,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:gs,useReducer:Jo,useRef:is,useState:function(){return Jo(Ko)},useDebugValue:ms,useDeferredValue:function(e){var t=Go();return Po===null?t.memoizedState=e:_s(t,Po.memoizedState,e)},useTransition:function(){return[Jo(Ko)[0],Go().memoizedState]},useMutableSource:Yo,useSyncExternalStore:Xo,useId:z,unstable_isNewReconciler:!1};function Os(e,t){if(e&&e.defaultProps){for(var n in t=ae({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var As={isMounted:function(e){return(e=e._reactInternals)?ft(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=El(),i=Dl(e),a=mo(r,i);a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(Ol(t,e,i,r),go(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=El(),i=Dl(e),a=mo(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ho(e,a,i),t!==null&&(Ol(t,e,i,r),go(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=El(),r=Dl(e),i=mo(n,r);i.tag=2,t!=null&&(i.callback=t),t=ho(e,i,r),t!==null&&(Ol(t,e,r,n),go(t,e,r))}};function js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Lr(n,r)||!Lr(i,a):!0}function Ms(e,t,n){var r=!1,i=na,a=t.contextType;return typeof a==`object`&&a?a=oo(a):(i=sa(t)?aa:ra.current,r=t.contextTypes,a=(r=r!=null)?oa(e,i):na),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=As,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ns(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&As.enqueueReplaceState(t,t.state,null)}function Ps(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},fo(e);var a=t.contextType;typeof a==`object`&&a?i.context=oo(a):(a=sa(t)?aa:ra.current,i.context=oa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(ks(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&As.enqueueReplaceState(i,i.state,null),vo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Fs(e,t){try{var n=``,r=t;do n+=ue(r),r=r.return;while(r);var i=n}catch(e){i=`
|
|
42
42
|
Error generating stack: `+e.message+`
|
|
43
|
-
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ls(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Rs=typeof WeakMap==`function`?WeakMap:Map;function zs(e,t,n){n=mo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gl||(gl=!0,_l=r),Ls(e,t)},n}function Bs(e,t,n){n=mo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ls(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ls(e,t),typeof r!=`function`&&(vl===null?vl=new Set([this]):vl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Vs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Xl.bind(null,e,t,n),t.then(e,e))}function Hs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Us(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mo(-1,1),t.tag=2,ho(n,t,1))),n.lanes|=1),e)}var Ws=S.ReactCurrentOwner,Gs=!1;function Ks(e,t,n,r){t.child=e===null?Xa(t,null,n,r):Ya(t,e.child,n,r)}function qs(e,t,n,r,i){n=n.render;var a=t.ref;return io(t,i),r=Ho(e,t,n,r,a,i),n=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Na&&n&&ka(t),t.flags|=1,Ks(e,t,r,i),t.child)}function Js(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!iu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ys(e,t,a,r,i)):(e=su(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return pc(e,t,i)}return t.flags|=1,e=ou(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ys(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(Gs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Gs=!0);else return t.lanes=e.lanes,pc(e,t,i)}return Qs(e,t,n,r,i)}function Xs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ea(al,il),il|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ea(al,il),il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ea(al,il),il|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ea(al,il),il|=r;return Ks(e,t,i,n),t.child}function Zs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qs(e,t,n,r,i){var a=oa(n)?ia:na.current;return a=aa(t,a),io(t,i),n=Ho(e,t,n,r,a,i),r=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Na&&r&&ka(t),t.flags|=1,Ks(e,t,n,i),t.child)}function $s(e,t,n,r,i){if(oa(n)){var a=!0;ua(t)}else a=!1;if(io(t,i),t.stateNode===null)fc(e,t),Ms(t,n,r),Ps(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=ao(l):(l=oa(n)?ia:na.current,l=aa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ns(t,o,r,l),uo=!1;var f=t.memoizedState;o.state=f,vo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ra.current||uo?(typeof u==`function`&&(ks(t,n,u,r),c=t.memoizedState),(s=uo||js(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,po(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Os(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=ao(c):(c=oa(n)?ia:na.current,c=aa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ns(t,o,r,c),uo=!1,f=t.memoizedState,o.state=f,vo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ra.current||uo?(typeof p==`function`&&(ks(t,n,p,r),m=t.memoizedState),(l=uo||js(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ec(e,t,n,r,a,i)}function ec(e,t,n,r,i,a){Zs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&da(t,n,!1),pc(e,t,a);r=t.stateNode,Ws.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ya(t,e.child,null,a),t.child=Ya(t,null,s,a)):Ks(e,t,s,a),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function tc(e){var t=e.stateNode;t.pendingContext?ca(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ca(e,t.context,!1),wo(e,t.containerInfo)}function nc(e,t,n,r,i){return Ha(),Ua(i),t.flags|=256,Ks(e,t,n,r),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0};function ic(e){return{baseLanes:e,cachePool:null,transitions:null}}function ac(e,t,n){var r=t.pendingProps,i=Oo.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ea(Oo,i&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=lu(o,r,0,null),e=cu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ic(n),t.memoizedState=rc,e):oc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return cc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ou(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=cu(a,o,n,null),a.flags|=2):a=ou(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ic(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=rc,r}return a=e.child,e=a.sibling,r=ou(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function oc(e,t){return t=lu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function sc(e,t,n,r){return r!==null&&Ua(r),Ya(t,e.child,null,n),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Is(Error(r(422))),sc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=lu({mode:`visible`,children:i.children},a,0,null),o=cu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ya(t,e.child,null,s),t.child.memoizedState=ic(s),t.memoizedState=rc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return sc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Is(o,i,void 0),sc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Gs||c){if(i=tl,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),Ol(i,e,a,-1))}return Hl(),i=Is(Error(r(421))),sc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Ql.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Ma=Li(a.nextSibling),ja=t,Na=!0,Pa=null,e!==null&&(Sa[Ca++]=Ta,Sa[Ca++]=Ea,Sa[Ca++]=wa,Ta=e.id,Ea=e.overflow,wa=t),t=oc(t,i.children),t.flags|=4096,t)}function lc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ro(e.return,t,n)}function uc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ks(e,t,r.children,n),r=Oo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lc(e,n,t);else if(e.tag===19)lc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ea(Oo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ko(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),uc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ko(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}uc(t,!0,n,null,a);break;case`together`:uc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=ou(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ou(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mc(e,t,n){switch(t.tag){case 3:tc(t),Ha();break;case 5:Eo(t);break;case 1:oa(t.type)&&ua(t);break;case 4:wo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ea(Za,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ea(Oo,Oo.current&1),e=pc(e,t,n),e===null?null:e.sibling):ac(e,t,n):(ea(Oo,Oo.current&1),t.flags|=128,null);ea(Oo,Oo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ea(Oo,Oo.current),r)break;return null;case 22:case 23:return t.lanes=0,Xs(e,t,n)}return pc(e,t,n)}var hc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},gc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Co(xo.current);var o=null;switch(n){case`input`:i=ve(e,i),r=ve(e,r),o=[];break;case`select`:i=ie({},i,{value:void 0}),r=ie({},r,{value:void 0}),o=[];break;case`textarea`:i=Ee(e,i),r=Ee(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Di)}Be(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&pi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},_c=function(e,t,n,r){n!==r&&(t.flags|=4)};function vc(e,t){if(!Na)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bc(e,t,n){var i=t.pendingProps;switch(Aa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yc(t),null;case 1:return oa(t.type)&&sa(),yc(t),null;case 3:return i=t.stateNode,To(),$i(ra),$i(na),jo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ba(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pa!==null&&(Ml(Pa),Pa=null))),yc(t),null;case 5:Do(t);var o=Co(So.current);if(n=t.type,e!==null&&t.stateNode!=null)gc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return yc(t),null}if(e=Co(xo.current),Ba(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Bi]=t,i[Vi]=s,e=(t.mode&1)!=0,n){case`dialog`:pi(`cancel`,i),pi(`close`,i);break;case`iframe`:case`object`:case`embed`:pi(`load`,i);break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],i);break;case`source`:pi(`error`,i);break;case`img`:case`image`:case`link`:pi(`error`,i),pi(`load`,i);break;case`details`:pi(`toggle`,i);break;case`input`:ye(i,s),pi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},pi(`invalid`,i);break;case`textarea`:De(i,s),pi(`invalid`,i)}for(var c in Be(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Ei(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&pi(`scroll`,i)}switch(n){case`input`:he(i),Se(i,s,!0);break;case`textarea`:he(i),ke(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ae(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Bi]=t,e[Vi]=i,hc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ve(n,i),n){case`dialog`:pi(`cancel`,e),pi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:pi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<li.length;o++)pi(li[o],e);o=i;break;case`source`:pi(`error`,e),o=i;break;case`img`:case`image`:case`link`:pi(`error`,e),pi(`load`,e),o=i;break;case`details`:pi(`toggle`,e),o=i;break;case`input`:ye(e,i),o=ve(e,i),pi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ie({},i,{value:void 0}),pi(`invalid`,e);break;case`textarea`:De(e,i),o=Ee(e,i),pi(`invalid`,e);break;default:o=i}for(s in Be(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Re(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ne(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Pe(e,u):typeof u==`number`&&Pe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&pi(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:he(e),Se(e,i,!1);break;case`textarea`:he(e),ke(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+fe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Te(e,!!i.multiple,i.defaultValue,!0):Te(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yc(t),null;case 6:if(e&&t.stateNode!=null)_c(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Co(So.current),Co(xo.current),Ba(t)){if(i=t.stateNode,n=t.memoizedProps,i[Bi]=t,(s=i.nodeValue!==n)&&(e=ja,e!==null))switch(e.tag){case 3:Ei(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Ei(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Bi]=t,t.stateNode=i}return yc(t),null;case 13:if($i(Oo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Na&&Ma!==null&&t.mode&1&&!(t.flags&128))Va(),Ha(),t.flags|=98560,s=!1;else if(s=Ba(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Bi]=t}else Ha(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yc(t),s=!1}else Pa!==null&&(Ml(Pa),Pa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||Oo.current&1?ol===0&&(ol=3):Hl())),t.updateQueue!==null&&(t.flags|=4),yc(t),null);case 4:return To(),e===null&&gi(t.stateNode.containerInfo),yc(t),null;case 10:return no(t.type._context),yc(t),null;case 17:return oa(t.type)&&sa(),yc(t),null;case 19:if($i(Oo),s=t.memoizedState,s===null)return yc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)vc(s,!1);else{if(ol!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=ko(e),c!==null){for(t.flags|=128,vc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ea(Oo,Oo.current&1|2),t.child}e=e.sibling}s.tail!==null&&xt()>ml&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304)}else{if(!i)if(e=ko(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Na)return yc(t),null}else 2*xt()-s.renderingStartTime>ml&&n!==1073741824&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(yc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xt(),t.sibling=null,n=Oo.current,ea(Oo,i?n&1|2:n&1),t);case 22:case 23:return Rl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?il&1073741824&&(yc(t),t.subtreeFlags&6&&(t.flags|=8192)):yc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function xc(e,t){switch(Aa(t),t.tag){case 1:return oa(t.type)&&sa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return To(),$i(ra),$i(na),jo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Do(t),null;case 13:if($i(Oo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ha()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $i(Oo),null;case 4:return To(),null;case 10:return no(t.type._context),null;case 22:case 23:return Rl(),null;case 24:return null;default:return null}}var Sc=!1,Cc=!1,wc=typeof WeakSet==`function`?WeakSet:Set,B=null;function Tc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){U(e,t,n)}else n.current=null}function Ec(e,t,n){try{n()}catch(n){U(e,t,n)}}var Dc=!1;function Oc(e,t){if(Oi=bn,e=Br(),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ki={focusedElem:e,selectionRange:n},bn=!1,B=t;B!==null;)if(t=B,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Os(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){U(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return h=Dc,Dc=!1,h}function kc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Ec(t,n,a)}i=i.next}while(i!==r)}}function Ac(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function jc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Mc(e){var t=e.alternate;t!==null&&(e.alternate=null,Mc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[Vi],delete t[Ui],delete t[Wi],delete t[Gi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Nc(e){return e.tag===5||e.tag===3||e.tag===4}function Pc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Di));else if(r!==4&&(e=e.child,e!==null))for(Fc(e,t,n),e=e.sibling;e!==null;)Fc(e,t,n),e=e.sibling}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}var Lc=null,Rc=!1;function zc(e,t,n){for(n=n.child;n!==null;)Bc(e,t,n),n=n.sibling}function Bc(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount==`function`)try{kt.onCommitFiberUnmount(Ot,n)}catch{}switch(n.tag){case 5:Cc||Tc(n,t);case 6:var r=Lc,i=Rc;Lc=null,zc(e,t,n),Lc=r,Rc=i,Lc!==null&&(Rc?(e=Lc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lc.removeChild(n.stateNode));break;case 18:Lc!==null&&(Rc?(e=Lc,n=n.stateNode,e.nodeType===8?Ii(e.parentNode,n):e.nodeType===1&&Ii(e,n),vn(e)):Ii(Lc,n.stateNode));break;case 4:r=Lc,i=Rc,Lc=n.stateNode.containerInfo,Rc=!0,zc(e,t,n),Lc=r,Rc=i;break;case 0:case 11:case 14:case 15:if(!Cc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Ec(n,t,o),i=i.next}while(i!==r)}zc(e,t,n);break;case 1:if(!Cc&&(Tc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){U(n,t,e)}zc(e,t,n);break;case 21:zc(e,t,n);break;case 22:n.mode&1?(Cc=(r=Cc)||n.memoizedState!==null,zc(e,t,n),Cc=r):zc(e,t,n);break;default:zc(e,t,n)}}function Vc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wc),t.forEach(function(t){var r=$l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Hc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Lc=c.stateNode,Rc=!1;break a;case 3:Lc=c.stateNode.containerInfo,Rc=!0;break a;case 4:Lc=c.stateNode.containerInfo,Rc=!0;break a}c=c.return}if(Lc===null)throw Error(r(160));Bc(o,s,a),Lc=null,Rc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){U(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Uc(t,e),t=t.sibling}function Uc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Hc(t,e),Wc(e),i&4){try{kc(3,e,e.return),Ac(3,e)}catch(t){U(e,e.return,t)}try{kc(5,e,e.return)}catch(t){U(e,e.return,t)}}break;case 1:Hc(t,e),Wc(e),i&512&&n!==null&&Tc(n,n.return);break;case 5:if(Hc(t,e),Wc(e),i&512&&n!==null&&Tc(n,n.return),e.flags&32){var a=e.stateNode;try{Pe(a,``)}catch(t){U(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&be(a,o),Ve(c,s);var u=Ve(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Re(a,f):d===`dangerouslySetInnerHTML`?Ne(a,f):d===`children`?Pe(a,f):x(a,d,f,u)}switch(c){case`input`:xe(a,o);break;case`textarea`:Oe(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Te(a,!!o.multiple,o.multiple?[]:``,!1):Te(a,!!o.multiple,o.defaultValue,!0)):Te(a,!!o.multiple,m,!1)}a[Vi]=o}catch(t){U(e,e.return,t)}}break;case 6:if(Hc(t,e),Wc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){U(e,e.return,t)}}break;case 3:if(Hc(t,e),Wc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{vn(t.containerInfo)}catch(t){U(e,e.return,t)}break;case 4:Hc(t,e),Wc(e);break;case 13:Hc(t,e),Wc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(pl=xt())),i&4&&Vc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Cc=(u=Cc)||d,Hc(t,e),Cc=u):Hc(t,e),Wc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(f=B=d;B!==null;){switch(p=B,m=p.child,p.tag){case 0:case 11:case 14:case 15:kc(4,p,p.return);break;case 1:Tc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){U(i,n,e)}}break;case 5:Tc(p,p.return);break;case 22:if(p.memoizedState!==null){Jc(f);continue}}m===null?Jc(f):(m.return=p,B=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Le(`display`,s))}catch(t){U(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){U(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Hc(t,e),Wc(e),i&4&&Vc(e);break;case 21:break;default:Hc(t,e),Wc(e)}}function Wc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Nc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Pe(a,``),i.flags&=-33),Ic(e,Pc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Fc(e,Pc(e),o);break;default:throw Error(r(161))}}catch(t){U(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gc(e,t,n){B=e,Kc(e,t,n)}function Kc(e,t,n){for(var r=(e.mode&1)!=0;B!==null;){var i=B,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Sc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Cc;s=Sc;var l=Cc;if(Sc=o,(Cc=c)&&!l)for(B=i;B!==null;)o=B,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Yc(i):(c.return=o,B=c);for(;a!==null;)B=a,Kc(a,t,n),a=a.sibling;B=i,Sc=s,Cc=l}qc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,B=a):qc(e,t,n)}}function qc(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Cc||Ac(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Cc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Os(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&yo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}yo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&vn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Cc||t.flags&512&&jc(t)}catch(e){U(t,t.return,e)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Jc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Yc(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ac(4,t)}catch(e){U(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){U(t,i,e)}}var a=t.return;try{jc(t)}catch(e){U(t,a,e)}break;case 5:var o=t.return;try{jc(t)}catch(e){U(t,o,e)}}}catch(e){U(t,t.return,e)}if(t===e){B=null;break}var s=t.sibling;if(s!==null){s.return=t.return,B=s;break}B=t.return}}var Xc=Math.ceil,Zc=S.ReactCurrentDispatcher,Qc=S.ReactCurrentOwner,$c=S.ReactCurrentBatchConfig,el=0,tl=null,nl=null,rl=0,il=0,al=Qi(0),ol=0,sl=null,cl=0,ll=0,ul=0,dl=null,fl=null,pl=0,ml=1/0,hl=null,gl=!1,_l=null,vl=null,yl=!1,bl=null,xl=0,Sl=0,Cl=null,wl=-1,Tl=0;function El(){return el&6?xt():wl===-1?wl=xt():wl}function Dl(e){return e.mode&1?el&2&&rl!==0?rl&-rl:Wa.transition===null?(e=qt,e===0?(e=window.event,e=e===void 0?16:En(e.type),e):e):(Tl===0&&(Tl=Ht()),Tl):1}function Ol(e,t,n,i){if(50<Sl)throw Sl=0,Cl=null,Error(r(185));Wt(e,n,i),(!(el&2)||e!==tl)&&(e===tl&&(!(el&2)&&(ll|=n),ol===4&&Pl(e,rl)),kl(e,i),n===1&&el===0&&!(t.mode&1)&&(ml=xt()+500,pa&&_a()))}function kl(e,t){var n=e.callbackNode;Bt(e,t);var r=Rt(e,e===tl?rl:0);if(r===0)n!==null&&vt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vt(n),t===1)e.tag===0?ga(Fl.bind(null,e)):ha(Fl.bind(null,e)),Pi(function(){!(el&6)&&_a()}),n=null;else{switch(Jt(r)){case 1:n=Ct;break;case 4:n=wt;break;case 16:n=Tt;break;case 536870912:n=Dt;break;default:n=Tt}n=tu(n,Al.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Al(e,t){if(wl=-1,Tl=0,el&6)throw Error(r(327));var n=e.callbackNode;if(H()&&e.callbackNode!==n)return null;var i=Rt(e,e===tl?rl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Ul(e,i);else{t=i;var a=el;el|=2;var o=Vl();(tl!==e||rl!==t)&&(hl=null,ml=xt()+500,zl(e,t));do try{Gl();break}catch(t){Bl(e,t)}while(1);to(),Zc.current=o,el=a,nl===null?(tl=null,rl=0,t=ol):t=0}if(t!==0){if(t===2&&(a=Vt(e),a!==0&&(i=a,t=jl(e,a))),t===1)throw n=sl,zl(e,0),Pl(e,i),kl(e,xt()),n;if(t===6)Pl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Nl(a)&&(t=Ul(e,i),t===2&&(o=Vt(e),o!==0&&(i=o,t=jl(e,o))),t===1))throw n=sl,zl(e,0),Pl(e,i),kl(e,xt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:ql(e,fl,hl);break;case 3:if(Pl(e,i),(i&130023424)===i&&(t=pl+500-xt(),10<t)){if(Rt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){El(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=ji(ql.bind(null,e,fl,hl),t);break}ql(e,fl,hl);break;case 4:if(Pl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-jt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=xt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Xc(i/1960))-i,10<i){e.timeoutHandle=ji(ql.bind(null,e,fl,hl),i);break}ql(e,fl,hl);break;case 5:ql(e,fl,hl);break;default:throw Error(r(329))}}}return kl(e,xt()),e.callbackNode===n?Al.bind(null,e):null}function jl(e,t){var n=dl;return e.current.memoizedState.isDehydrated&&(zl(e,t).flags|=256),e=Ul(e,t),e!==2&&(t=fl,fl=n,t!==null&&Ml(t)),e}function Ml(e){fl===null?fl=e:fl.push.apply(fl,e)}function Nl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pl(e,t){for(t&=~ul,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-jt(t),r=1<<n;e[n]=-1,t&=~r}}function Fl(e){if(el&6)throw Error(r(327));H();var t=Rt(e,0);if(!(t&1))return kl(e,xt()),null;var n=Ul(e,t);if(e.tag!==0&&n===2){var i=Vt(e);i!==0&&(t=i,n=jl(e,i))}if(n===1)throw n=sl,zl(e,0),Pl(e,t),kl(e,xt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ql(e,fl,hl),kl(e,xt()),null}function Il(e,t){var n=el;el|=1;try{return e(t)}finally{el=n,el===0&&(ml=xt()+500,pa&&_a())}}function Ll(e){bl!==null&&bl.tag===0&&!(el&6)&&H();var t=el;el|=1;var n=$c.transition,r=qt;try{if($c.transition=null,qt=1,e)return e()}finally{qt=r,$c.transition=n,el=t,!(el&6)&&_a()}}function Rl(){il=al.current,$i(al)}function zl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Mi(n)),nl!==null)for(n=nl.return;n!==null;){var r=n;switch(Aa(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&sa();break;case 3:To(),$i(ra),$i(na),jo();break;case 5:Do(r);break;case 4:To();break;case 13:$i(Oo);break;case 19:$i(Oo);break;case 10:no(r.type._context);break;case 22:case 23:Rl()}n=n.return}if(tl=e,nl=e=ou(e.current,null),rl=il=t,ol=0,sl=null,ul=ll=cl=0,fl=dl=null,oo!==null){for(t=0;t<oo.length;t++)if(n=oo[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}oo=null}return e}function Bl(e,t){do{var n=nl;try{if(to(),Mo.current=ws,Lo){for(var i=Fo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Lo=!1}if(Po=0,I=Io=Fo=null,Ro=!1,zo=0,Qc.current=null,n===null||n.return===null){ol=1,sl=t,nl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=rl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Hs(s);if(m!==null){m.flags&=-257,Us(m,s,c,o,t),m.mode&1&&Vs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Vs(o,u,t),Hl();break a}l=Error(r(426))}}else if(Na&&c.mode&1){var _=Hs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Us(_,s,c,o,t),Ua(Fs(l,c));break a}}o=l=Fs(l,c),ol!==4&&(ol=2),dl===null?dl=[o]:dl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=zs(o,l,t);_o(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(vl===null||!vl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Bs(o,c,t);_o(o,x);break a}}o=o.return}while(o!==null)}Kl(n)}catch(e){t=e,nl===n&&n!==null&&(nl=n=n.return);continue}break}while(1)}function Vl(){var e=Zc.current;return Zc.current=ws,e===null?ws:e}function Hl(){(ol===0||ol===3||ol===2)&&(ol=4),tl===null||!(cl&268435455)&&!(ll&268435455)||Pl(tl,rl)}function Ul(e,t){var n=el;el|=2;var i=Vl();(tl!==e||rl!==t)&&(hl=null,zl(e,t));do try{Wl();break}catch(t){Bl(e,t)}while(1);if(to(),el=n,Zc.current=i,nl!==null)throw Error(r(261));return tl=null,rl=0,ol}function Wl(){for(;nl!==null;)V(nl)}function Gl(){for(;nl!==null&&!yt();)V(nl)}function V(e){var t=eu(e.alternate,e,il);e.memoizedProps=e.pendingProps,t===null?Kl(e):nl=t,Qc.current=null}function Kl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xc(n,t),n!==null){n.flags&=32767,nl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ol=6,nl=null;return}}else if(n=bc(n,t,il),n!==null){nl=n;return}if(t=t.sibling,t!==null){nl=t;return}nl=t=e}while(t!==null);ol===0&&(ol=5)}function ql(e,t,n){var r=qt,i=$c.transition;try{$c.transition=null,qt=1,Jl(e,t,n,r)}finally{$c.transition=i,qt=r}return null}function Jl(e,t,n,i){do H();while(bl!==null);if(el&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Gt(e,o),e===tl&&(nl=tl=null,rl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||yl||(yl=!0,tu(Tt,function(){return H(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=$c.transition,$c.transition=null;var s=qt;qt=1;var c=el;el|=4,Qc.current=null,Oc(e,n),Uc(n,e),Hr(ki),bn=!!Oi,ki=Oi=null,e.current=n,Gc(n,e,a),bt(),el=c,qt=s,$c.transition=o}else e.current=n;if(yl&&(yl=!1,bl=e,xl=a),o=e.pendingLanes,o===0&&(vl=null),At(n.stateNode,i),kl(e,xt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(gl)throw gl=!1,e=_l,_l=null,e;return xl&1&&e.tag!==0&&H(),o=e.pendingLanes,o&1?e===Cl?Sl++:(Sl=0,Cl=e):Sl=0,_a(),null}function H(){if(bl!==null){var e=Jt(xl),t=$c.transition,n=qt;try{if($c.transition=null,qt=16>e?16:e,bl===null)var i=!1;else{if(e=bl,bl=null,xl=0,el&6)throw Error(r(331));var a=el;for(el|=4,B=e.current;B!==null;){var o=B,s=o.child;if(B.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(B=u;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:kc(8,d,o)}var f=d.child;if(f!==null)f.return=d,B=f;else for(;B!==null;){d=B;var p=d.sibling,m=d.return;if(Mc(d),d===u){B=null;break}if(p!==null){p.return=m,B=p;break}B=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}B=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,B=s;else b:for(;B!==null;){if(o=B,o.flags&2048)switch(o.tag){case 0:case 11:case 15:kc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,B=v;break b}B=o.return}}var y=e.current;for(B=y;B!==null;){s=B;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,B=b;else b:for(s=y;B!==null;){if(c=B,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ac(9,c)}}catch(e){U(c,c.return,e)}if(c===s){B=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,B=x;break b}B=c.return}}if(el=a,_a(),kt&&typeof kt.onPostCommitFiberRoot==`function`)try{kt.onPostCommitFiberRoot(Ot,e)}catch{}i=!0}return i}finally{qt=n,$c.transition=t}}return!1}function Yl(e,t,n){t=Fs(n,t),t=zs(e,t,1),e=ho(e,t,1),t=El(),e!==null&&(Wt(e,1,t),kl(e,t))}function U(e,t,n){if(e.tag===3)Yl(e,e,n);else for(;t!==null;){if(t.tag===3){Yl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vl===null||!vl.has(r))){e=Fs(n,e),e=Bs(t,e,1),t=ho(t,e,1),e=El(),t!==null&&(Wt(t,1,e),kl(t,e));break}}t=t.return}}function Xl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=El(),e.pingedLanes|=e.suspendedLanes&n,tl===e&&(rl&n)===n&&(ol===4||ol===3&&(rl&130023424)===rl&&500>xt()-pl?zl(e,0):ul|=n),kl(e,t)}function Zl(e,t){t===0&&(e.mode&1?(t=It,It<<=1,!(It&130023424)&&(It=4194304)):t=1);var n=El();e=lo(e,t),e!==null&&(Wt(e,t,n),kl(e,n))}function Ql(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zl(e,n)}function $l(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Zl(e,n)}var eu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ra.current)Gs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Gs=!1,mc(e,t,n);Gs=!!(e.flags&131072)}else Gs=!1,Na&&t.flags&1048576&&Oa(t,xa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;fc(e,t),e=t.pendingProps;var a=aa(t,na.current);io(t,n),a=Ho(null,t,i,e,a,n);var o=Uo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,oa(i)?(o=!0,ua(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,fo(t),a.updater=As,t.stateNode=a,a._reactInternals=t,Ps(t,i,e,n),t=ec(null,t,i,!0,o,n)):(t.tag=0,Na&&o&&ka(t),Ks(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(fc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=au(i),e=Os(i,e),a){case 0:t=Qs(null,t,i,e,n);break a;case 1:t=$s(null,t,i,e,n);break a;case 11:t=qs(null,t,i,e,n);break a;case 14:t=Js(null,t,i,Os(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),Qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),$s(e,t,i,a,n);case 3:a:{if(tc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,po(e,t),vo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Fs(Error(r(423)),t),t=nc(e,t,i,n,a);break a}else if(i!==a){a=Fs(Error(r(424)),t),t=nc(e,t,i,n,a);break a}else for(Ma=Li(t.stateNode.containerInfo.firstChild),ja=t,Na=!0,Pa=null,n=Xa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ha(),i===a){t=pc(e,t,n);break a}Ks(e,t,i,n)}t=t.child}return t;case 5:return Eo(t),e===null&&Ra(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Ai(i,a)?s=null:o!==null&&Ai(i,o)&&(t.flags|=32),Zs(e,t),Ks(e,t,s,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return ac(e,t,n);case 4:return wo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ya(t,null,i,n):Ks(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),qs(e,t,i,a,n);case 7:return Ks(e,t,t.pendingProps,n),t.child;case 8:return Ks(e,t,t.pendingProps.children,n),t.child;case 12:return Ks(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ea(Za,i._currentValue),i._currentValue=s,o!==null)if(Fr(o.value,s)){if(o.children===a.children&&!ra.current){t=pc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=mo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ro(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ro(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ks(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,io(t,n),a=ao(a),i=i(a),t.flags|=1,Ks(e,t,i,n),t.child;case 14:return i=t.type,a=Os(i,t.pendingProps),a=Os(i.type,a),Js(e,t,i,a,n);case 15:return Ys(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),fc(e,t),t.tag=1,oa(i)?(e=!0,ua(t)):e=!1,io(t,n),Ms(t,i,a),Ps(t,i,a,n),ec(null,t,i,!0,e,n);case 19:return dc(e,t,n);case 22:return Xs(e,t,n)}throw Error(r(156,t.tag))};function tu(e,t){return _t(e,t)}function nu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ru(e,t,n,r){return new nu(e,t,n,r)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function au(e){if(typeof e==`function`)return+!!iu(e);if(e!=null){if(e=e.$$typeof,e===A)return 11;if(e===ee)return 14}return 2}function ou(e,t){var n=e.alternate;return n===null?(n=ru(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function su(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)iu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return cu(n.children,a,o,t);case E:s=8,a|=8;break;case D:return e=ru(12,n,t,a|2),e.elementType=D,e.lanes=o,e;case j:return e=ru(13,n,t,a),e.elementType=j,e.lanes=o,e;case M:return e=ru(19,n,t,a),e.elementType=M,e.lanes=o,e;case N:return lu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case O:s=10;break a;case k:s=9;break a;case A:s=11;break a;case ee:s=14;break a;case te:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=ru(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function cu(e,t,n,r){return e=ru(7,e,r,t),e.lanes=n,e}function lu(e,t,n,r){return e=ru(22,e,r,t),e.elementType=N,e.lanes=n,e.stateNode={isHidden:!1},e}function uu(e,t,n){return e=ru(6,e,null,t),e.lanes=n,e}function du(e,t,n){return t=ru(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ut(0),this.expirationTimes=Ut(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pu(e,t,n,r,i,a,o,s,c){return e=new fu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=ru(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fo(a),e}function mu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function hu(e){if(!e)return ta;e=e._reactInternals;a:{if(dt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(oa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(oa(n))return la(e,n,t)}return t}function gu(e,t,n,r,i,a,o,s,c){return e=pu(n,r,!0,e,i,a,o,s,c),e.context=hu(null),n=e.current,r=El(),i=Dl(n),a=mo(r,i),a.callback=t??null,ho(n,a,i),e.current.lanes=i,Wt(e,i,r),kl(e,r),e}function _u(e,t,n,r){var i=t.current,a=El(),o=Dl(i);return n=hu(n),t.context===null?t.context=n:t.pendingContext=n,t=mo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ho(i,t,o),e!==null&&(Ol(e,i,o,a),go(e,i,o)),o}function vu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function yu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bu(e,t){yu(e,t),(e=e.alternate)&&yu(e,t)}function xu(){return null}var Su=typeof reportError==`function`?reportError:function(e){console.error(e)};function Cu(e){this._internalRoot=e}wu.prototype.render=Cu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));_u(e,t,null,null)},wu.prototype.unmount=Cu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ll(function(){_u(null,e,null,null)}),t[Hi]=null}};function wu(e){this._internalRoot=e}wu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<cn.length&&t!==0&&t<cn[n].priority;n++);cn.splice(n,0,e),n===0&&pn(e)}};function Tu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Du(){}function Ou(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=vu(o);a.call(e)}}var o=gu(t,r,e,0,null,!1,!1,``,Du);return e._reactRootContainer=o,e[Hi]=o.current,gi(e.nodeType===8?e.parentNode:e),Ll(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=vu(c);s.call(e)}}var c=pu(e,0,!1,null,null,!1,!1,``,Du);return e._reactRootContainer=c,e[Hi]=c.current,gi(e.nodeType===8?e.parentNode:e),Ll(function(){_u(t,c,n,r)}),c}function ku(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=vu(o);s.call(e)}}_u(t,o,e,i)}else o=Ou(n,t,e,i,r);return vu(o)}Yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lt(t.pendingLanes);n!==0&&(Kt(t,n|1),kl(t,xt()),!(el&6)&&(ml=xt()+500,_a()))}break;case 13:Ll(function(){var t=lo(e,1);t!==null&&Ol(t,e,1,El())}),bu(e,1)}},Xt=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&Ol(t,e,134217728,El()),bu(e,134217728)}},Zt=function(e){if(e.tag===13){var t=Dl(e),n=lo(e,t);n!==null&&Ol(n,e,t,El()),bu(e,t)}},Qt=function(){return qt},$t=function(e,t){var n=qt;try{return qt=e,t()}finally{qt=n}},We=function(e,t,n){switch(t){case`input`:if(xe(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Yi(i);if(!a)throw Error(r(90));ge(i),xe(i,a)}}}break;case`textarea`:Oe(e,n);break;case`select`:t=n.value,t!=null&&Te(e,!!n.multiple,t,!1)}},Xe=Il,Ze=Ll;var Au={usingClientEntryPoint:!1,Events:[qi,Ji,Yi,Je,Ye,Il]},ju={findFiberByHostInstance:Ki,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Mu={bundleType:ju.bundleType,version:ju.version,rendererPackageName:ju.rendererPackageName,rendererConfig:ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ht(e),e===null?null:e.stateNode},findFiberByHostInstance:ju.findFiberByHostInstance||xu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{Ot=Nu.inject(Mu),kt=Nu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Au,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tu(t))throw Error(r(200));return mu(e,t,null,n)},e.createRoot=function(e,t){if(!Tu(e))throw Error(r(299));var n=!1,i=``,a=Su;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=pu(e,1,!1,null,null,n,!1,i,a),e[Hi]=t.current,gi(e.nodeType===8?e.parentNode:e),new Cu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ht(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Ll(e)},e.hydrate=function(e,t,n){if(!Eu(t))throw Error(r(200));return ku(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Tu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Su;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=gu(t,null,e,1,n??null,a,!1,o,s),e[Hi]=t.current,gi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new wu(t)},e.render=function(e,t,n){if(!Eu(t))throw Error(r(200));return ku(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Eu(e))throw Error(r(40));return e._reactRootContainer?(Ll(function(){ku(null,null,e,!1,function(){e._reactRootContainer=null,e[Hi]=null})}),!0):!1},e.unstable_batchedUpdates=Il,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Eu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return ku(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),cs=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ss()})),ls=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),us=o(((e,t)=>{t.exports=ls()}));function ds(e){this.content=e}ds.prototype={constructor:ds,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new ds(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ds(n)},addToStart:function(e,t){return new ds([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ds(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new ds(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ds.from(e),e.size?new ds(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ds.from(e),e.size?new ds(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ds.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ds.from=function(e){if(e instanceof ds)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ds(t)};function fs(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=fs(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function ps(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=ps(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var R=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return fs(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return ps(this,e,t,n)}findIndex(e){if(e==0)return hs(0,e);if(e==this.size)return hs(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?hs(t+1,i):hs(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};R.empty=new R([],0);var ms={index:0,offset:0};function hs(e,t){return ms.index=e,ms.offset=t,ms}function gs(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!gs(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!gs(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var _s=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&gs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};_s.none=[];var vs=class extends Error{},z=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=bs(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ys(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(R.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};z.empty=new z(R.empty,0,0);function ys(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ys(a.content,t-i-1,n-i-1)))}function bs(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=bs(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function xs(e,t,n){if(n.openStart>e.depth)throw new vs(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new vs(`Inconsistent open depths`);return Ss(e,t,n,0)}function Ss(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Ss(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return Ds(a,ks(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Ds(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=As(n,e);return Ds(a,Os(e,i,o,t,r))}}function Cs(e,t){if(!t.type.compatibleContent(e.type))throw new vs(`Cannot join `+t.type.name+` onto `+e.type.name)}function ws(e,t,n){let r=e.node(n);return Cs(r,t.node(n)),r}function Ts(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Es(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Ts(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Ts(i.child(e),r);t&&t.depth==n&&t.textOffset&&Ts(t.nodeBefore,r)}function Ds(e,t){return e.type.checkContent(t),e.copy(t)}function Os(e,t,n,r,i){let a=e.depth>i&&ws(e,t,i+1),o=r.depth>i&&ws(n,r,i+1),s=[];return Es(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Cs(a,o),Ts(Ds(a,Os(e,t,n,r,i+1)),s)):(a&&Ts(Ds(a,ks(e,t,i+1)),s),Es(t,n,i,s),o&&Ts(Ds(o,ks(n,r,i+1)),s)),Es(r,null,i,s),new R(s)}function ks(e,t,n){let r=[];return Es(null,e,n,r),e.depth>n&&Ts(Ds(ws(e,t,n+1),ks(e,t,n+1)),r),Es(t,null,n,r),new R(r)}function As(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(R.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var js=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _s.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Fs(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=Ps.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else Ps.set(t,r=new Ms);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%Ns,i}},Ms=class{constructor(){this.elts=[],this.i=0}},Ns=12,Ps=new WeakMap,Fs=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Is=Object.create(null),Ls=class e{constructor(e,t,n,r=_s.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||R.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&gs(this.attrs,t||e.defaultAttrs||Is)&&_s.sameSet(this.marks,n||_s.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return z.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new z(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return xs(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return js.resolveCached(this,e)}resolveNoCache(e){return js.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),zs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=R.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_s.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!_s.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=R.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};Ls.prototype.text=void 0;var Rs=class e extends Ls{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):zs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function zs(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var Bs=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Vs(t,n);if(r.next==null)return e.empty;let i=Hs(r);r.next&&r.err(`Unexpected trailing text`);let a=Qs(Ys(i));return $s(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return R.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
43
|
+
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Is(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ls(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Rs=typeof WeakMap==`function`?WeakMap:Map;function zs(e,t,n){n=mo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){gl||(gl=!0,_l=r),Ls(e,t)},n}function Bs(e,t,n){n=mo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Ls(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Ls(e,t),typeof r!=`function`&&(vl===null?vl=new Set([this]):vl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Vs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rs;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Xl.bind(null,e,t,n),t.then(e,e))}function Hs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Us(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mo(-1,1),t.tag=2,ho(n,t,1))),n.lanes|=1),e)}var Ws=S.ReactCurrentOwner,Gs=!1;function Ks(e,t,n,r){t.child=e===null?Za(t,null,n,r):Xa(t,e.child,n,r)}function qs(e,t,n,r,i){n=n.render;var a=t.ref;return ao(t,i),r=Ho(e,t,n,r,a,i),n=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Pa&&n&&Aa(t),t.flags|=1,Ks(e,t,r,i),t.child)}function Js(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!iu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Ys(e,t,a,r,i)):(e=su(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Lr:n,n(o,r)&&e.ref===t.ref)return pc(e,t,i)}return t.flags|=1,e=ou(a,r),e.ref=t.ref,e.return=t,t.child=e}function Ys(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Lr(a,r)&&e.ref===t.ref)if(Gs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Gs=!0);else return t.lanes=e.lanes,pc(e,t,i)}return Qs(e,t,n,r,i)}function Xs(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ta(al,il),il|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ta(al,il),il|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,ta(al,il),il|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),ta(al,il),il|=r;return Ks(e,t,i,n),t.child}function Zs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qs(e,t,n,r,i){var a=sa(n)?aa:ra.current;return a=oa(t,a),ao(t,i),n=Ho(e,t,n,r,a,i),r=Uo(),e!==null&&!Gs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,pc(e,t,i)):(Pa&&r&&Aa(t),t.flags|=1,Ks(e,t,n,i),t.child)}function $s(e,t,n,r,i){if(sa(n)){var a=!0;da(t)}else a=!1;if(ao(t,i),t.stateNode===null)fc(e,t),Ms(t,n,r),Ps(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=oo(l):(l=sa(n)?aa:ra.current,l=oa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Ns(t,o,r,l),uo=!1;var f=t.memoizedState;o.state=f,vo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||ia.current||uo?(typeof u==`function`&&(ks(t,n,u,r),c=t.memoizedState),(s=uo||js(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,po(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Os(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=oo(c):(c=sa(n)?aa:ra.current,c=oa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Ns(t,o,r,c),uo=!1,f=t.memoizedState,o.state=f,vo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||ia.current||uo?(typeof p==`function`&&(ks(t,n,p,r),m=t.memoizedState),(l=uo||js(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ec(e,t,n,r,a,i)}function ec(e,t,n,r,i,a){Zs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&fa(t,n,!1),pc(e,t,a);r=t.stateNode,Ws.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):Ks(e,t,s,a),t.memoizedState=r.state,i&&fa(t,n,!0),t.child}function tc(e){var t=e.stateNode;t.pendingContext?la(e,t.pendingContext,t.pendingContext!==t.context):t.context&&la(e,t.context,!1),F(e,t.containerInfo)}function nc(e,t,n,r,i){return Ua(),Wa(i),t.flags|=256,Ks(e,t,n,r),t.child}var rc={dehydrated:null,treeContext:null,retryLane:0};function ic(e){return{baseLanes:e,cachePool:null,transitions:null}}function ac(e,t,n){var r=t.pendingProps,i=I.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),ta(I,i&1),e===null)return za(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=lu(o,r,0,null),e=cu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=ic(n),t.memoizedState=rc,e):oc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return cc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ou(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=cu(a,o,n,null),a.flags|=2):a=ou(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?ic(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=rc,r}return a=e.child,e=a.sibling,r=ou(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function oc(e,t){return t=lu({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function sc(e,t,n,r){return r!==null&&Wa(r),Xa(t,e.child,null,n),e=oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Is(Error(r(422))),sc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=lu({mode:`visible`,children:i.children},a,0,null),o=cu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Xa(t,e.child,null,s),t.child.memoizedState=ic(s),t.memoizedState=rc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return sc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Is(o,i,void 0),sc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Gs||c){if(i=tl,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,lo(e,a),Ol(i,e,a,-1))}return Hl(),i=Is(Error(r(421))),sc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Ql.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Na=Ri(a.nextSibling),Ma=t,Pa=!0,Fa=null,e!==null&&(Ca[wa++]=Ea,Ca[wa++]=Da,Ca[wa++]=Ta,Ea=e.id,Da=e.overflow,Ta=t),t=oc(t,i.children),t.flags|=4096,t)}function lc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),io(e.return,t,n)}function uc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function dc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ks(e,t,r.children,n),r=I.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lc(e,n,t);else if(e.tag===19)lc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ta(I,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&L(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),uc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&L(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}uc(t,!0,n,null,a);break;case`together`:uc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),cl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=ou(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ou(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function mc(e,t,n){switch(t.tag){case 3:tc(t),Ua();break;case 5:Eo(t);break;case 1:sa(t.type)&&da(t);break;case 4:F(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;ta(Qa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ta(I,I.current&1),e=pc(e,t,n),e===null?null:e.sibling):ac(e,t,n):(ta(I,I.current&1),t.flags|=128,null);ta(I,I.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return dc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ta(I,I.current),r)break;return null;case 22:case 23:return t.lanes=0,Xs(e,t,n)}return pc(e,t,n)}var hc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},gc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,wo(xo.current);var o=null;switch(n){case`input`:i=ye(e,i),r=ye(e,r),o=[];break;case`select`:i=ae({},i,{value:void 0}),r=ae({},r,{value:void 0}),o=[];break;case`textarea`:i=De(e,i),r=De(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=Oi)}Ve(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&mi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},_c=function(e,t,n,r){n!==r&&(t.flags|=4)};function vc(e,t){if(!Pa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bc(e,t,n){var i=t.pendingProps;switch(ja(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yc(t),null;case 1:return sa(t.type)&&ca(),yc(t),null;case 3:return i=t.stateNode,To(),ea(ia),ea(ra),ko(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Va(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fa!==null&&(Ml(Fa),Fa=null))),yc(t),null;case 5:Do(t);var o=wo(Co.current);if(n=t.type,e!==null&&t.stateNode!=null)gc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return yc(t),null}if(e=wo(xo.current),Va(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Vi]=t,i[Hi]=s,e=(t.mode&1)!=0,n){case`dialog`:mi(`cancel`,i),mi(`close`,i);break;case`iframe`:case`object`:case`embed`:mi(`load`,i);break;case`video`:case`audio`:for(o=0;o<ui.length;o++)mi(ui[o],i);break;case`source`:mi(`error`,i);break;case`img`:case`image`:case`link`:mi(`error`,i),mi(`load`,i);break;case`details`:mi(`toggle`,i);break;case`input`:be(i,s),mi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},mi(`invalid`,i);break;case`textarea`:Oe(i,s),mi(`invalid`,i)}for(var c in Ve(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Di(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Di(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&mi(`scroll`,i)}switch(n){case`input`:ge(i),Ce(i,s,!0);break;case`textarea`:ge(i),Ae(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Oi)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=je(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Vi]=t,e[Hi]=i,hc(e,t,!1,!1),t.stateNode=e;a:{switch(c=He(n,i),n){case`dialog`:mi(`cancel`,e),mi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:mi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ui.length;o++)mi(ui[o],e);o=i;break;case`source`:mi(`error`,e),o=i;break;case`img`:case`image`:case`link`:mi(`error`,e),mi(`load`,e),o=i;break;case`details`:mi(`toggle`,e),o=i;break;case`input`:be(e,i),o=ye(e,i),mi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ae({},i,{value:void 0}),mi(`invalid`,e);break;case`textarea`:Oe(e,i),o=De(e,i),mi(`invalid`,e);break;default:o=i}for(s in Ve(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?ze(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Pe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Fe(e,u):typeof u==`number`&&Fe(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&mi(`scroll`,e):u!=null&&x(e,s,u,c))}switch(n){case`input`:ge(e),Ce(e,i,!1);break;case`textarea`:ge(e),Ae(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+pe(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&Ee(e,!!i.multiple,i.defaultValue,!0):Ee(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=Oi)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yc(t),null;case 6:if(e&&t.stateNode!=null)_c(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=wo(Co.current),wo(xo.current),Va(t)){if(i=t.stateNode,n=t.memoizedProps,i[Vi]=t,(s=i.nodeValue!==n)&&(e=Ma,e!==null))switch(e.tag){case 3:Di(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Di(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Vi]=t,t.stateNode=i}return yc(t),null;case 13:if(ea(I),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pa&&Na!==null&&t.mode&1&&!(t.flags&128))Ha(),Ua(),t.flags|=98560,s=!1;else if(s=Va(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Vi]=t}else Ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yc(t),s=!1}else Fa!==null&&(Ml(Fa),Fa=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||I.current&1?ol===0&&(ol=3):Hl())),t.updateQueue!==null&&(t.flags|=4),yc(t),null);case 4:return To(),e===null&&_i(t.stateNode.containerInfo),yc(t),null;case 10:return ro(t.type._context),yc(t),null;case 17:return sa(t.type)&&ca(),yc(t),null;case 19:if(ea(I),s=t.memoizedState,s===null)return yc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)vc(s,!1);else{if(ol!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=L(e),c!==null){for(t.flags|=128,vc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ta(I,I.current&1|2),t.child}e=e.sibling}s.tail!==null&&St()>ml&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304)}else{if(!i)if(e=L(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),vc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Pa)return yc(t),null}else 2*St()-s.renderingStartTime>ml&&n!==1073741824&&(t.flags|=128,i=!0,vc(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(yc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=St(),t.sibling=null,n=I.current,ta(I,i?n&1|2:n&1),t);case 22:case 23:return Rl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?il&1073741824&&(yc(t),t.subtreeFlags&6&&(t.flags|=8192)):yc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function xc(e,t){switch(ja(t),t.tag){case 1:return sa(t.type)&&ca(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return To(),ea(ia),ea(ra),ko(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Do(t),null;case 13:if(ea(I),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ea(I),null;case 4:return To(),null;case 10:return ro(t.type._context),null;case 22:case 23:return Rl(),null;case 24:return null;default:return null}}var Sc=!1,Cc=!1,wc=typeof WeakSet==`function`?WeakSet:Set,B=null;function Tc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){U(e,t,n)}else n.current=null}function Ec(e,t,n){try{n()}catch(n){U(e,t,n)}}var Dc=!1;function Oc(e,t){if(ki=xn,e=Vr(),Hr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ai={focusedElem:e,selectionRange:n},xn=!1,B=t;B!==null;)if(t=B,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Os(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){U(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return h=Dc,Dc=!1,h}function kc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Ec(t,n,a)}i=i.next}while(i!==r)}}function Ac(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function jc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Mc(e){var t=e.alternate;t!==null&&(e.alternate=null,Mc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vi],delete t[Hi],delete t[Wi],delete t[Gi],delete t[Ki])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Nc(e){return e.tag===5||e.tag===3||e.tag===4}function Pc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Oi));else if(r!==4&&(e=e.child,e!==null))for(Fc(e,t,n),e=e.sibling;e!==null;)Fc(e,t,n),e=e.sibling}function Ic(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ic(e,t,n),e=e.sibling;e!==null;)Ic(e,t,n),e=e.sibling}var Lc=null,Rc=!1;function zc(e,t,n){for(n=n.child;n!==null;)Bc(e,t,n),n=n.sibling}function Bc(e,t,n){if(At&&typeof At.onCommitFiberUnmount==`function`)try{At.onCommitFiberUnmount(kt,n)}catch{}switch(n.tag){case 5:Cc||Tc(n,t);case 6:var r=Lc,i=Rc;Lc=null,zc(e,t,n),Lc=r,Rc=i,Lc!==null&&(Rc?(e=Lc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Lc.removeChild(n.stateNode));break;case 18:Lc!==null&&(Rc?(e=Lc,n=n.stateNode,e.nodeType===8?Li(e.parentNode,n):e.nodeType===1&&Li(e,n),yn(e)):Li(Lc,n.stateNode));break;case 4:r=Lc,i=Rc,Lc=n.stateNode.containerInfo,Rc=!0,zc(e,t,n),Lc=r,Rc=i;break;case 0:case 11:case 14:case 15:if(!Cc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Ec(n,t,o),i=i.next}while(i!==r)}zc(e,t,n);break;case 1:if(!Cc&&(Tc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){U(n,t,e)}zc(e,t,n);break;case 21:zc(e,t,n);break;case 22:n.mode&1?(Cc=(r=Cc)||n.memoizedState!==null,zc(e,t,n),Cc=r):zc(e,t,n);break;default:zc(e,t,n)}}function Vc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wc),t.forEach(function(t){var r=$l.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Hc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Lc=c.stateNode,Rc=!1;break a;case 3:Lc=c.stateNode.containerInfo,Rc=!0;break a;case 4:Lc=c.stateNode.containerInfo,Rc=!0;break a}c=c.return}if(Lc===null)throw Error(r(160));Bc(o,s,a),Lc=null,Rc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){U(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Uc(t,e),t=t.sibling}function Uc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Hc(t,e),Wc(e),i&4){try{kc(3,e,e.return),Ac(3,e)}catch(t){U(e,e.return,t)}try{kc(5,e,e.return)}catch(t){U(e,e.return,t)}}break;case 1:Hc(t,e),Wc(e),i&512&&n!==null&&Tc(n,n.return);break;case 5:if(Hc(t,e),Wc(e),i&512&&n!==null&&Tc(n,n.return),e.flags&32){var a=e.stateNode;try{Fe(a,``)}catch(t){U(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&xe(a,o),He(c,s);var u=He(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ze(a,f):d===`dangerouslySetInnerHTML`?Pe(a,f):d===`children`?Fe(a,f):x(a,d,f,u)}switch(c){case`input`:Se(a,o);break;case`textarea`:ke(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?Ee(a,!!o.multiple,o.multiple?[]:``,!1):Ee(a,!!o.multiple,o.defaultValue,!0)):Ee(a,!!o.multiple,m,!1)}a[Hi]=o}catch(t){U(e,e.return,t)}}break;case 6:if(Hc(t,e),Wc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){U(e,e.return,t)}}break;case 3:if(Hc(t,e),Wc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{yn(t.containerInfo)}catch(t){U(e,e.return,t)}break;case 4:Hc(t,e),Wc(e);break;case 13:Hc(t,e),Wc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(pl=St())),i&4&&Vc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Cc=(u=Cc)||d,Hc(t,e),Cc=u):Hc(t,e),Wc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(f=B=d;B!==null;){switch(p=B,m=p.child,p.tag){case 0:case 11:case 14:case 15:kc(4,p,p.return);break;case 1:Tc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){U(i,n,e)}}break;case 5:Tc(p,p.return);break;case 22:if(p.memoizedState!==null){Jc(f);continue}}m===null?Jc(f):(m.return=p,B=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Re(`display`,s))}catch(t){U(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){U(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Hc(t,e),Wc(e),i&4&&Vc(e);break;case 21:break;default:Hc(t,e),Wc(e)}}function Wc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Nc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Fe(a,``),i.flags&=-33),Ic(e,Pc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Fc(e,Pc(e),o);break;default:throw Error(r(161))}}catch(t){U(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gc(e,t,n){B=e,Kc(e,t,n)}function Kc(e,t,n){for(var r=(e.mode&1)!=0;B!==null;){var i=B,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Sc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Cc;s=Sc;var l=Cc;if(Sc=o,(Cc=c)&&!l)for(B=i;B!==null;)o=B,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Yc(i):(c.return=o,B=c);for(;a!==null;)B=a,Kc(a,t,n),a=a.sibling;B=i,Sc=s,Cc=l}qc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,B=a):qc(e,t,n)}}function qc(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Cc||Ac(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Cc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Os(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&yo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}yo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&yn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Cc||t.flags&512&&jc(t)}catch(e){U(t,t.return,e)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Jc(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Yc(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ac(4,t)}catch(e){U(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){U(t,i,e)}}var a=t.return;try{jc(t)}catch(e){U(t,a,e)}break;case 5:var o=t.return;try{jc(t)}catch(e){U(t,o,e)}}}catch(e){U(t,t.return,e)}if(t===e){B=null;break}var s=t.sibling;if(s!==null){s.return=t.return,B=s;break}B=t.return}}var Xc=Math.ceil,Zc=S.ReactCurrentDispatcher,Qc=S.ReactCurrentOwner,$c=S.ReactCurrentBatchConfig,el=0,tl=null,nl=null,rl=0,il=0,al=$i(0),ol=0,sl=null,cl=0,ll=0,ul=0,dl=null,fl=null,pl=0,ml=1/0,hl=null,gl=!1,_l=null,vl=null,yl=!1,bl=null,xl=0,Sl=0,Cl=null,wl=-1,Tl=0;function El(){return el&6?St():wl===-1?wl=St():wl}function Dl(e){return e.mode&1?el&2&&rl!==0?rl&-rl:Ga.transition===null?(e=Jt,e===0?(e=window.event,e=e===void 0?16:Dn(e.type),e):e):(Tl===0&&(Tl=Ut()),Tl):1}function Ol(e,t,n,i){if(50<Sl)throw Sl=0,Cl=null,Error(r(185));Gt(e,n,i),(!(el&2)||e!==tl)&&(e===tl&&(!(el&2)&&(ll|=n),ol===4&&Pl(e,rl)),kl(e,i),n===1&&el===0&&!(t.mode&1)&&(ml=St()+500,ma&&va()))}function kl(e,t){var n=e.callbackNode;Vt(e,t);var r=zt(e,e===tl?rl:0);if(r===0)n!==null&&yt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&yt(n),t===1)e.tag===0?_a(Fl.bind(null,e)):ga(Fl.bind(null,e)),Fi(function(){!(el&6)&&va()}),n=null;else{switch(Yt(r)){case 1:n=wt;break;case 4:n=Tt;break;case 16:n=Et;break;case 536870912:n=Ot;break;default:n=Et}n=tu(n,Al.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Al(e,t){if(wl=-1,Tl=0,el&6)throw Error(r(327));var n=e.callbackNode;if(H()&&e.callbackNode!==n)return null;var i=zt(e,e===tl?rl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Ul(e,i);else{t=i;var a=el;el|=2;var o=Vl();(tl!==e||rl!==t)&&(hl=null,ml=St()+500,zl(e,t));do try{Gl();break}catch(t){Bl(e,t)}while(1);no(),Zc.current=o,el=a,nl===null?(tl=null,rl=0,t=ol):t=0}if(t!==0){if(t===2&&(a=Ht(e),a!==0&&(i=a,t=jl(e,a))),t===1)throw n=sl,zl(e,0),Pl(e,i),kl(e,St()),n;if(t===6)Pl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Nl(a)&&(t=Ul(e,i),t===2&&(o=Ht(e),o!==0&&(i=o,t=jl(e,o))),t===1))throw n=sl,zl(e,0),Pl(e,i),kl(e,St()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:ql(e,fl,hl);break;case 3:if(Pl(e,i),(i&130023424)===i&&(t=pl+500-St(),10<t)){if(zt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){El(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Mi(ql.bind(null,e,fl,hl),t);break}ql(e,fl,hl);break;case 4:if(Pl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Mt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=St()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Xc(i/1960))-i,10<i){e.timeoutHandle=Mi(ql.bind(null,e,fl,hl),i);break}ql(e,fl,hl);break;case 5:ql(e,fl,hl);break;default:throw Error(r(329))}}}return kl(e,St()),e.callbackNode===n?Al.bind(null,e):null}function jl(e,t){var n=dl;return e.current.memoizedState.isDehydrated&&(zl(e,t).flags|=256),e=Ul(e,t),e!==2&&(t=fl,fl=n,t!==null&&Ml(t)),e}function Ml(e){fl===null?fl=e:fl.push.apply(fl,e)}function Nl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ir(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pl(e,t){for(t&=~ul,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Mt(t),r=1<<n;e[n]=-1,t&=~r}}function Fl(e){if(el&6)throw Error(r(327));H();var t=zt(e,0);if(!(t&1))return kl(e,St()),null;var n=Ul(e,t);if(e.tag!==0&&n===2){var i=Ht(e);i!==0&&(t=i,n=jl(e,i))}if(n===1)throw n=sl,zl(e,0),Pl(e,t),kl(e,St()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ql(e,fl,hl),kl(e,St()),null}function Il(e,t){var n=el;el|=1;try{return e(t)}finally{el=n,el===0&&(ml=St()+500,ma&&va())}}function Ll(e){bl!==null&&bl.tag===0&&!(el&6)&&H();var t=el;el|=1;var n=$c.transition,r=Jt;try{if($c.transition=null,Jt=1,e)return e()}finally{Jt=r,$c.transition=n,el=t,!(el&6)&&va()}}function Rl(){il=al.current,ea(al)}function zl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Ni(n)),nl!==null)for(n=nl.return;n!==null;){var r=n;switch(ja(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ca();break;case 3:To(),ea(ia),ea(ra),ko();break;case 5:Do(r);break;case 4:To();break;case 13:ea(I);break;case 19:ea(I);break;case 10:ro(r.type._context);break;case 22:case 23:Rl()}n=n.return}if(tl=e,nl=e=ou(e.current,null),rl=il=t,ol=0,sl=null,ul=ll=cl=0,fl=dl=null,so!==null){for(t=0;t<so.length;t++)if(n=so[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}so=null}return e}function Bl(e,t){do{var n=nl;try{if(no(),Ao.current=ws,Io){for(var i=No.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Io=!1}if(Mo=0,Fo=Po=No=null,Lo=!1,Ro=0,Qc.current=null,n===null||n.return===null){ol=1,sl=t,nl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=rl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Hs(s);if(m!==null){m.flags&=-257,Us(m,s,c,o,t),m.mode&1&&Vs(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Vs(o,u,t),Hl();break a}l=Error(r(426))}}else if(Pa&&c.mode&1){var _=Hs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Us(_,s,c,o,t),Wa(Fs(l,c));break a}}o=l=Fs(l,c),ol!==4&&(ol=2),dl===null?dl=[o]:dl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=zs(o,l,t);_o(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(vl===null||!vl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Bs(o,c,t);_o(o,x);break a}}o=o.return}while(o!==null)}Kl(n)}catch(e){t=e,nl===n&&n!==null&&(nl=n=n.return);continue}break}while(1)}function Vl(){var e=Zc.current;return Zc.current=ws,e===null?ws:e}function Hl(){(ol===0||ol===3||ol===2)&&(ol=4),tl===null||!(cl&268435455)&&!(ll&268435455)||Pl(tl,rl)}function Ul(e,t){var n=el;el|=2;var i=Vl();(tl!==e||rl!==t)&&(hl=null,zl(e,t));do try{Wl();break}catch(t){Bl(e,t)}while(1);if(no(),el=n,Zc.current=i,nl!==null)throw Error(r(261));return tl=null,rl=0,ol}function Wl(){for(;nl!==null;)V(nl)}function Gl(){for(;nl!==null&&!bt();)V(nl)}function V(e){var t=eu(e.alternate,e,il);e.memoizedProps=e.pendingProps,t===null?Kl(e):nl=t,Qc.current=null}function Kl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=xc(n,t),n!==null){n.flags&=32767,nl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ol=6,nl=null;return}}else if(n=bc(n,t,il),n!==null){nl=n;return}if(t=t.sibling,t!==null){nl=t;return}nl=t=e}while(t!==null);ol===0&&(ol=5)}function ql(e,t,n){var r=Jt,i=$c.transition;try{$c.transition=null,Jt=1,Jl(e,t,n,r)}finally{$c.transition=i,Jt=r}return null}function Jl(e,t,n,i){do H();while(bl!==null);if(el&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Kt(e,o),e===tl&&(nl=tl=null,rl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||yl||(yl=!0,tu(Et,function(){return H(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=$c.transition,$c.transition=null;var s=Jt;Jt=1;var c=el;el|=4,Qc.current=null,Oc(e,n),Uc(n,e),Ur(Ai),xn=!!ki,Ai=ki=null,e.current=n,Gc(n,e,a),xt(),el=c,Jt=s,$c.transition=o}else e.current=n;if(yl&&(yl=!1,bl=e,xl=a),o=e.pendingLanes,o===0&&(vl=null),jt(n.stateNode,i),kl(e,St()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(gl)throw gl=!1,e=_l,_l=null,e;return xl&1&&e.tag!==0&&H(),o=e.pendingLanes,o&1?e===Cl?Sl++:(Sl=0,Cl=e):Sl=0,va(),null}function H(){if(bl!==null){var e=Yt(xl),t=$c.transition,n=Jt;try{if($c.transition=null,Jt=16>e?16:e,bl===null)var i=!1;else{if(e=bl,bl=null,xl=0,el&6)throw Error(r(331));var a=el;for(el|=4,B=e.current;B!==null;){var o=B,s=o.child;if(B.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(B=u;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:kc(8,d,o)}var f=d.child;if(f!==null)f.return=d,B=f;else for(;B!==null;){d=B;var p=d.sibling,m=d.return;if(Mc(d),d===u){B=null;break}if(p!==null){p.return=m,B=p;break}B=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}B=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,B=s;else b:for(;B!==null;){if(o=B,o.flags&2048)switch(o.tag){case 0:case 11:case 15:kc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,B=v;break b}B=o.return}}var y=e.current;for(B=y;B!==null;){s=B;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,B=b;else b:for(s=y;B!==null;){if(c=B,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Ac(9,c)}}catch(e){U(c,c.return,e)}if(c===s){B=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,B=x;break b}B=c.return}}if(el=a,va(),At&&typeof At.onPostCommitFiberRoot==`function`)try{At.onPostCommitFiberRoot(kt,e)}catch{}i=!0}return i}finally{Jt=n,$c.transition=t}}return!1}function Yl(e,t,n){t=Fs(n,t),t=zs(e,t,1),e=ho(e,t,1),t=El(),e!==null&&(Gt(e,1,t),kl(e,t))}function U(e,t,n){if(e.tag===3)Yl(e,e,n);else for(;t!==null;){if(t.tag===3){Yl(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(vl===null||!vl.has(r))){e=Fs(n,e),e=Bs(t,e,1),t=ho(t,e,1),e=El(),t!==null&&(Gt(t,1,e),kl(t,e));break}}t=t.return}}function Xl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=El(),e.pingedLanes|=e.suspendedLanes&n,tl===e&&(rl&n)===n&&(ol===4||ol===3&&(rl&130023424)===rl&&500>St()-pl?zl(e,0):ul|=n),kl(e,t)}function Zl(e,t){t===0&&(e.mode&1?(t=Lt,Lt<<=1,!(Lt&130023424)&&(Lt=4194304)):t=1);var n=El();e=lo(e,t),e!==null&&(Gt(e,t,n),kl(e,n))}function Ql(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zl(e,n)}function $l(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Zl(e,n)}var eu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ia.current)Gs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Gs=!1,mc(e,t,n);Gs=!!(e.flags&131072)}else Gs=!1,Pa&&t.flags&1048576&&ka(t,Sa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;fc(e,t),e=t.pendingProps;var a=oa(t,ra.current);ao(t,n),a=Ho(null,t,i,e,a,n);var o=Uo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,sa(i)?(o=!0,da(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,fo(t),a.updater=As,t.stateNode=a,a._reactInternals=t,Ps(t,i,e,n),t=ec(null,t,i,!0,o,n)):(t.tag=0,Pa&&o&&Aa(t),Ks(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(fc(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=au(i),e=Os(i,e),a){case 0:t=Qs(null,t,i,e,n);break a;case 1:t=$s(null,t,i,e,n);break a;case 11:t=qs(null,t,i,e,n);break a;case 14:t=Js(null,t,i,Os(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),Qs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),$s(e,t,i,a,n);case 3:a:{if(tc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,po(e,t),vo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Fs(Error(r(423)),t),t=nc(e,t,i,n,a);break a}else if(i!==a){a=Fs(Error(r(424)),t),t=nc(e,t,i,n,a);break a}else for(Na=Ri(t.stateNode.containerInfo.firstChild),Ma=t,Pa=!0,Fa=null,n=Za(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ua(),i===a){t=pc(e,t,n);break a}Ks(e,t,i,n)}t=t.child}return t;case 5:return Eo(t),e===null&&za(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,ji(i,a)?s=null:o!==null&&ji(i,o)&&(t.flags|=32),Zs(e,t),Ks(e,t,s,n),t.child;case 6:return e===null&&za(t),null;case 13:return ac(e,t,n);case 4:return F(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Xa(t,null,i,n):Ks(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),qs(e,t,i,a,n);case 7:return Ks(e,t,t.pendingProps,n),t.child;case 8:return Ks(e,t,t.pendingProps.children,n),t.child;case 12:return Ks(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,ta(Qa,i._currentValue),i._currentValue=s,o!==null)if(Ir(o.value,s)){if(o.children===a.children&&!ia.current){t=pc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=mo(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),io(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),io(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ks(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,ao(t,n),a=oo(a),i=i(a),t.flags|=1,Ks(e,t,i,n),t.child;case 14:return i=t.type,a=Os(i,t.pendingProps),a=Os(i.type,a),Js(e,t,i,a,n);case 15:return Ys(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Os(i,a),fc(e,t),t.tag=1,sa(i)?(e=!0,da(t)):e=!1,ao(t,n),Ms(t,i,a),Ps(t,i,a,n),ec(null,t,i,!0,e,n);case 19:return dc(e,t,n);case 22:return Xs(e,t,n)}throw Error(r(156,t.tag))};function tu(e,t){return vt(e,t)}function nu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ru(e,t,n,r){return new nu(e,t,n,r)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function au(e){if(typeof e==`function`)return+!!iu(e);if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===j)return 14}return 2}function ou(e,t){var n=e.alternate;return n===null?(n=ru(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function su(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)iu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case T:return cu(n.children,a,o,t);case E:s=8,a|=8;break;case ee:return e=ru(12,n,t,a|2),e.elementType=ee,e.lanes=o,e;case k:return e=ru(13,n,t,a),e.elementType=k,e.lanes=o,e;case A:return e=ru(19,n,t,a),e.elementType=A,e.lanes=o,e;case ne:return lu(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case D:s=10;break a;case O:s=9;break a;case te:s=11;break a;case j:s=14;break a;case M:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=ru(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function cu(e,t,n,r){return e=ru(7,e,r,t),e.lanes=n,e}function lu(e,t,n,r){return e=ru(22,e,r,t),e.elementType=ne,e.lanes=n,e.stateNode={isHidden:!1},e}function uu(e,t,n){return e=ru(6,e,null,t),e.lanes=n,e}function du(e,t,n){return t=ru(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function fu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wt(0),this.expirationTimes=Wt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function pu(e,t,n,r,i,a,o,s,c){return e=new fu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=ru(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fo(a),e}function mu(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function hu(e){if(!e)return na;e=e._reactInternals;a:{if(ft(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(sa(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(sa(n))return ua(e,n,t)}return t}function gu(e,t,n,r,i,a,o,s,c){return e=pu(n,r,!0,e,i,a,o,s,c),e.context=hu(null),n=e.current,r=El(),i=Dl(n),a=mo(r,i),a.callback=t??null,ho(n,a,i),e.current.lanes=i,Gt(e,i,r),kl(e,r),e}function _u(e,t,n,r){var i=t.current,a=El(),o=Dl(i);return n=hu(n),t.context===null?t.context=n:t.pendingContext=n,t=mo(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ho(i,t,o),e!==null&&(Ol(e,i,o,a),go(e,i,o)),o}function vu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function yu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bu(e,t){yu(e,t),(e=e.alternate)&&yu(e,t)}function xu(){return null}var Su=typeof reportError==`function`?reportError:function(e){console.error(e)};function Cu(e){this._internalRoot=e}wu.prototype.render=Cu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));_u(e,t,null,null)},wu.prototype.unmount=Cu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ll(function(){_u(null,e,null,null)}),t[Ui]=null}};function wu(e){this._internalRoot=e}wu.prototype.unstable_scheduleHydration=function(e){if(e){var t=$t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ln.length&&t!==0&&t<ln[n].priority;n++);ln.splice(n,0,e),n===0&&mn(e)}};function Tu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Du(){}function Ou(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=vu(o);a.call(e)}}var o=gu(t,r,e,0,null,!1,!1,``,Du);return e._reactRootContainer=o,e[Ui]=o.current,_i(e.nodeType===8?e.parentNode:e),Ll(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=vu(c);s.call(e)}}var c=pu(e,0,!1,null,null,!1,!1,``,Du);return e._reactRootContainer=c,e[Ui]=c.current,_i(e.nodeType===8?e.parentNode:e),Ll(function(){_u(t,c,n,r)}),c}function ku(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=vu(o);s.call(e)}}_u(t,o,e,i)}else o=Ou(n,t,e,i,r);return vu(o)}Xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rt(t.pendingLanes);n!==0&&(qt(t,n|1),kl(t,St()),!(el&6)&&(ml=St()+500,va()))}break;case 13:Ll(function(){var t=lo(e,1);t!==null&&Ol(t,e,1,El())}),bu(e,1)}},Zt=function(e){if(e.tag===13){var t=lo(e,134217728);t!==null&&Ol(t,e,134217728,El()),bu(e,134217728)}},Qt=function(e){if(e.tag===13){var t=Dl(e),n=lo(e,t);n!==null&&Ol(n,e,t,El()),bu(e,t)}},$t=function(){return Jt},en=function(e,t){var n=Jt;try{return Jt=e,t()}finally{Jt=n}},Ge=function(e,t,n){switch(t){case`input`:if(Se(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Xi(i);if(!a)throw Error(r(90));_e(i),Se(i,a)}}}break;case`textarea`:ke(e,n);break;case`select`:t=n.value,t!=null&&Ee(e,!!n.multiple,t,!1)}},Ze=Il,Qe=Ll;var Au={usingClientEntryPoint:!1,Events:[Ji,Yi,Xi,Ye,Xe,Il]},ju={findFiberByHostInstance:qi,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Mu={bundleType:ju.bundleType,version:ju.version,rendererPackageName:ju.rendererPackageName,rendererConfig:ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:S.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gt(e),e===null?null:e.stateNode},findFiberByHostInstance:ju.findFiberByHostInstance||xu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Nu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nu.isDisabled&&Nu.supportsFiber)try{kt=Nu.inject(Mu),At=Nu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Au,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Tu(t))throw Error(r(200));return mu(e,t,null,n)},e.createRoot=function(e,t){if(!Tu(e))throw Error(r(299));var n=!1,i=``,a=Su;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=pu(e,1,!1,null,null,n,!1,i,a),e[Ui]=t.current,_i(e.nodeType===8?e.parentNode:e),new Cu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=gt(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Ll(e)},e.hydrate=function(e,t,n){if(!Eu(t))throw Error(r(200));return ku(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Tu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Su;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=gu(t,null,e,1,n??null,a,!1,o,s),e[Ui]=t.current,_i(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new wu(t)},e.render=function(e,t,n){if(!Eu(t))throw Error(r(200));return ku(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Eu(e))throw Error(r(40));return e._reactRootContainer?(Ll(function(){ku(null,null,e,!1,function(){e._reactRootContainer=null,e[Ui]=null})}),!0):!1},e.unstable_batchedUpdates=Il,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Eu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return ku(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),cs=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ss()})),ls=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),us=o(((e,t)=>{t.exports=ls()}));function ds(e){this.content=e}ds.prototype={constructor:ds,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new ds(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ds(n)},addToStart:function(e,t){return new ds([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ds(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new ds(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ds.from(e),e.size?new ds(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ds.from(e),e.size?new ds(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ds.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ds.from=function(e){if(e instanceof ds)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ds(t)};function fs(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a){n+=i.nodeSize;continue}if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){for(let e=0;i.text[e]==a.text[e];e++)n++;return n}if(i.content.size||a.content.size){let e=fs(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}function ps(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s){n-=c,r-=c;continue}if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=0,t=Math.min(o.text.length,s.text.length);for(;e<t&&o.text[o.text.length-e-1]==s.text[s.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(o.content.size||s.content.size){let e=ps(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}var R=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return fs(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return ps(this,e,t,n)}findIndex(e){if(e==0)return hs(0,e);if(e==this.size)return hs(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?hs(t+1,i):hs(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};R.empty=new R([],0);var ms={index:0,offset:0};function hs(e,t){return ms.index=e,ms.offset=t,ms}function gs(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!gs(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!gs(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var _s=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&gs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};_s.none=[];var vs=class extends Error{},z=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=bs(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(ys(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(R.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};z.empty=new z(R.empty,0,0);function ys(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(ys(a.content,t-i-1,n-i-1)))}function bs(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=bs(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function xs(e,t,n){if(n.openStart>e.depth)throw new vs(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new vs(`Inconsistent open depths`);return Ss(e,t,n,0)}function Ss(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Ss(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}else if(!n.content.size)return Ds(a,ks(e,t,r));else if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Ds(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}else{let{start:i,end:o}=As(n,e);return Ds(a,Os(e,i,o,t,r))}}function Cs(e,t){if(!t.type.compatibleContent(e.type))throw new vs(`Cannot join `+t.type.name+` onto `+e.type.name)}function ws(e,t,n){let r=e.node(n);return Cs(r,t.node(n)),r}function Ts(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Es(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Ts(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Ts(i.child(e),r);t&&t.depth==n&&t.textOffset&&Ts(t.nodeBefore,r)}function Ds(e,t){return e.type.checkContent(t),e.copy(t)}function Os(e,t,n,r,i){let a=e.depth>i&&ws(e,t,i+1),o=r.depth>i&&ws(n,r,i+1),s=[];return Es(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Cs(a,o),Ts(Ds(a,Os(e,t,n,r,i+1)),s)):(a&&Ts(Ds(a,ks(e,t,i+1)),s),Es(t,n,i,s),o&&Ts(Ds(o,ks(n,r,i+1)),s)),Es(r,null,i,s),new R(s)}function ks(e,t,n){let r=[];return Es(null,e,n,r),e.depth>n&&Ts(Ds(ws(e,t,n+1),ks(e,t,n+1)),r),Es(t,null,n,r),new R(r)}function As(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(R.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var js=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _s.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive===!1&&(!r||!i[a].isInSet(r.marks))&&(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive===!1&&(!r||!n[i].isInSet(r.marks))&&(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Fs(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=Ps.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else Ps.set(t,r=new Ms);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%Ns,i}},Ms=class{constructor(){this.elts=[],this.i=0}},Ns=12,Ps=new WeakMap,Fs=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Is=Object.create(null),Ls=class e{constructor(e,t,n,r=_s.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||R.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&gs(this.attrs,t||e.defaultAttrs||Is)&&_s.sameSet(this.marks,n||_s.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return z.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new z(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return xs(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return js.resolveCached(this,e)}resolveNoCache(e){return js.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),zs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=R.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=_s.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!_s.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=R.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}};Ls.prototype.text=void 0;var Rs=class e extends Ls{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):zs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function zs(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}var Bs=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Vs(t,n);if(r.next==null)return e.empty;let i=Hs(r);r.next&&r.err(`Unexpected trailing text`);let a=Qs(Ys(i));return $s(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return R.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in t)&&(!r.type||o.validEnd)&&(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
44
44
|
`)}};Bs.empty=new Bs(!0);var Vs=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function Hs(e){let t=[];do t.push(Us(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function Us(e){let t=[];do t.push(Ws(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Ws(e){let t=Js(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=Ks(e,t);else break;return t}function Gs(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function Ks(e,t){let n=Gs(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Gs(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function qs(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function Js(e){if(e.eat(`(`)){let t=Hs(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}else if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=qs(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function Ys(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function Xs(e,t){return t-e}function Zs(e,t){let n=[];return r(t),n.sort(Xs);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function Qs(e){let t=Object.create(null);return n(Zs(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);Zs(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new Bs(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(Xs);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function $s(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function ec(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function tc(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError(`No value supplied for attribute `+r)}n[r]=i}return n}function nc(e,t,n,r){for(let r in t)if(!(r in e))throw RangeError(`Unsupported attribute ${r} for ${n} of type ${r}`);for(let n in e){let r=e[n];r.validate&&r.validate(t[n])}}function rc(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new oc(e,r,t[r]);return n}var ic=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=rc(e,n.attrs),this.defaultAttrs=ec(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Bs.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:tc(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Ls(this,this.computeAttrs(e),R.from(t),_s.setFrom(n))}createChecked(e=null,t,n){return t=R.from(t),this.checkContent(t),new Ls(this,this.computeAttrs(e),t,_s.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=R.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(R.empty,!0);return i?new Ls(this,e,t.append(i),_s.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){nc(this.attrs,e,`node`,this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:_s.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function ac(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var oc=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?ac(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},sc=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=rc(e,r.attrs),this.excluded=null;let i=ec(this.attrs);this.instance=i?new _s(this,i):null}create(e=null){return!e&&this.instance?this.instance:new _s(this,tc(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){nc(this.attrs,e,`mark`,this.name)}excludes(e){return this.excluded.indexOf(e)>-1}},cc=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=ds.from(e.nodes),t.marks=ds.from(e.marks||{}),this.nodes=ic.compile(this.spec.nodes,this),this.marks=sc.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=Bs.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?lc(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:lc(this,n.split(` `))}this.nodeFromJSON=e=>Ls.fromJSON(this,e),this.markFromJSON=e=>_s.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof ic))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Rs(n,n.defaultAttrs,e,_s.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function lc(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function uc(e){return e.tag!=null}function dc(e){return e.style!=null}var fc=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(uc(e))this.tags.push(e);else if(dc(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new xc(this,t,!1);return n.addAll(e,_s.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new xc(this,t,!0);return n.addAll(e,_s.none,t.from,t.to),z.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Cc(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=wc(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=wc(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},pc={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},mc={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},hc={ol:!0,ul:!0},gc=1,_c=2,vc=4;function yc(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?gc:0)|(t===`full`?_c:0)}var bc=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=_s.none,this.match=i||(a&vc?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(R.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&gc)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=R.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(R.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!pc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},xc=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=yc(null,t.preserveWhitespace,0)|(n?vc:0);i=r?new bc(r.type,r.attrs,_s.none,!0,t.topMatch||r.type.contentMatch,a):n?new bc(null,null,_s.none,!0,null,a):new bc(e.schema.topNodeType,null,_s.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&_c?`full`:this.localPreserveWS||(r.options&gc)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
45
45
|
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;hc.hasOwnProperty(a)&&this.parser.normalizeLists&&Sc(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:mc.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(pc.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
46
46
|
`),t)}ignoreFallback(e,t){e.nodeName==`BR`&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node)if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=_s.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):B(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=yc(e,i,a.options);a.options&vc&&a.content.length==0&&(o|=vc);let s=_s.none;return n=n.filter(t=>(a.type?a.type.allowsMarkType(t.type):B(t.type,e))?(s=t.addToSet(s),!1):!0),this.nodes.push(new bc(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));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(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=gc);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}else{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function Sc(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&hc.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function Cc(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function wc(e){let t={};for(let n in e)t[n]=e[n];return t}function B(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var Tc=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Dc(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name]){a++;continue}if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Dc(t).createTextNode(e.text);let{dom:n,contentDOM:r}=jc(Dc(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&jc(Dc(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:jc(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=Ec(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return Ec(e.marks)}};function Ec(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Dc(e){return e.document||window.document}var Oc=new WeakMap;function kc(e){let t=Oc.get(e);return t===void 0&&Oc.set(e,t=Ac(e)),t}function Ac(e){let t=null;function n(e){if(e&&typeof e==`object`)if(Array.isArray(e))if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}function jc(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=kc(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}else if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=jc(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var Mc=65535,Nc=2**16;function Pc(e,t){return e+t*Nc}function Fc(e){return e&Mc}function Ic(e){return(e-(e&Mc))/Nc}var Lc=1,Rc=2,zc=4,Bc=8,Vc=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&Bc)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&zc)>0}},Hc=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Fc(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+Ic(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:Pc(o/3,e-s),f=e==s?Rc:e==u?Lc:zc;return(t<0?e!=s:e!=u)&&(f|=Bc),new Vc(a,f,d)}r+=l-c}return n?e+r:new Vc(e+r,0,null)}touches(e,t){let n=0,r=Fc(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}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])}};Hc.empty=new Hc([]);var Uc=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Vc(e,r,null)}},Wc=Object.create(null),Gc=class{getMap(){return Hc.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Wc[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Wc)throw RangeError(`Duplicate use of step JSON ID `+e);return Wc[e]=t,t.prototype.jsonID=e,t}},Kc=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof vs)return e.fail(t.message);throw t}}};function qc(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(qc(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return R.fromArray(r)}var Jc=class e extends Gc{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new z(qc(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return Kc.fromReplace(e,this.from,this.to,i)}invert(){return new Yc(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.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,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Gc.jsonID(`addMark`,Jc);var Yc=class e extends Gc{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new z(qc(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return Kc.fromReplace(e,this.from,this.to,n)}invert(){return new Jc(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new e(n.pos,r.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,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Gc.jsonID(`removeMark`,Yc);var Xc=class e extends Gc{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kc.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Kc.fromReplace(e,this.pos,this.pos+1,new z(R.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new Zc(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Gc.jsonID(`addNodeMark`,Xc);var Zc=class e extends Gc{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Kc.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Kc.fromReplace(e,this.pos,this.pos+1,new z(R.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Xc(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Gc.jsonID(`removeNodeMark`,Zc);var Qc=class e extends Gc{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&el(e,this.from,this.to)?Kc.fail(`Structure replace would overwrite content`):Kc.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Hc([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 n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,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 n=this.slice.size+t.slice.size==0?z.empty:new z(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?z.empty:new z(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,z.fromJSON(t,n.slice),!!n.structure)}};Qc.MAP_BIAS=1,Gc.jsonID(`replace`,Qc);var $c=class e extends Gc{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(el(e,this.from,this.gapFrom)||el(e,this.gapTo,this.to)))return Kc.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Kc.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?Kc.fromReplace(e,this.from,this.to,n):Kc.fail(`Content does not fit in gap`)}getMap(){return new Hc([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,z.fromJSON(t,n.slice),n.insert,!!n.structure)}};Gc.jsonID(`replaceAround`,$c);function el(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function tl(e,t,n,r){let i=[],a=[],o,s;e.doc.nodesBetween(t,n,(e,c,l)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&l.type.allowsMarkType(r.type)){let l=Math.max(c,t),d=Math.min(c+e.nodeSize,n),f=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(o&&o.to==l&&o.mark.eq(u[e])?o.to=d:i.push(o=new Yc(l,d,u[e])));s&&s.to==l?s.to=d:a.push(s=new Jc(l,d,r))}}),i.forEach(t=>e.step(t)),a.forEach(t=>e.step(t))}function nl(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline)return;a++;let s=null;if(r instanceof sc){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new Yc(t.from,t.to,t.style)))}function rl(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new Qc(s,l,z.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new Yc(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new z(R.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new Qc(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(R.empty,!0);e.replace(s,s,new z(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function il(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function al(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!il(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function ol(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=R.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=R.from(r.node(e).copy(u)),d++):c--;let f=R.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=R.from(i.node(e).copy(f)),p++):l++;e.step(new $c(c,l,o,s,new z(u.append(f),d,p),u.size-d,!0))}function sl(e,t,n=null,r=e){let i=ll(e,t),a=i&&ul(r,t);return a?i.map(cl).concat({type:t,attrs:n}).concat(a.map(cl)):null}function cl(e){return{type:e,attrs:null}}function ll(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function ul(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function dl(e,t,n){let r=R.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=R.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new $c(i,a,i,a,new z(r,0,0),n.length,!0))}function fl(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&hl(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&ml(e,t,n,a),rl(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new $c(c,l,c+1,l-1,new z(R.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&pl(e,t,n,a),!1}})}function pl(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function ml(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
@@ -142,13 +142,13 @@ ${o}
|
|
|
142
142
|
`);e.trim()&&(p=t.customNestedParser?t.customNestedParser(e):n.blockTokens(e))}let h=t.createToken(l,p);i.push(h)}if(i.length!==0)return{items:i,raw:a}}function Ib(e,t,n,r){if(!e||!Array.isArray(e.content))return``;let i=typeof n==`function`?n(r):n,[a,...o]=e.content,s=[`${i}${t.renderChildren([a])}`];return o&&o.length>0&&o.forEach(e=>{let n=t.renderChildren([e]);if(n){let e=n.split(`
|
|
143
143
|
`).map(e=>e?t.indent(e):``).join(`
|
|
144
144
|
`);s.push(e)}}),s.join(`
|
|
145
|
-
`)}function Lb(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var Rb=class e extends $y{constructor(){super(...arguments),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},zb=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t;let{view:n}=this.editor,r=e.target,i=r.nodeType===3?r.parentElement?.closest(`[data-drag-handle]`):r.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(r)||!i)return;let a=0,o=0;if(this.dom!==i){let t=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;a=n.x-t.x+r,o=n.y-t.y+s}let s=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();s.style.width=`${Math.round(e.width)}px`,s.style.height=`${Math.round(e.height)}px`,s.style.boxSizing=`border-box`,s.style.pointerEvents=`none`}catch{}let c=null;try{c=document.createElement(`div`),c.style.position=`absolute`,c.style.top=`-9999px`,c.style.left=`-9999px`,c.style.pointerEvents=`none`,c.appendChild(s),document.body.appendChild(c),(t=e.dataTransfer)==null||t.setDragImage(s,a,o)}finally{c&&setTimeout(()=>{try{c?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=U.create(n.state.doc,l),d=n.state.tr.setSelection(u);n.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!(this.dom.contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type.startsWith(`drag`),r=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!r&&!n)return!0;let{isEditable:i}=this.editor,{isDragging:a}=this,o=!!this.node.type.spec.draggable,s=U.isSelectable(this.node),c=e.type===`copy`,l=e.type===`paste`,u=e.type===`cut`,d=e.type===`mousedown`;if(!o&&s&&n&&e.target===this.dom&&e.preventDefault(),o&&n&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(o&&i&&!a&&d){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(a||r||c||l||u||d&&s)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.dom.contains(e.target)&&e.type===`childList`&&(W_()||U_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`?(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0):!1})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}},{getOwnPropertyNames:Bb,getOwnPropertySymbols:Vb}=Object,{hasOwnProperty:Hb}=Object.prototype;function Ub(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Wb(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Gb(e){return e?.[Symbol.toStringTag]}function Kb(e){return Bb(e).concat(Vb(e))}var qb=Object.hasOwn||((e,t)=>Hb.call(e,t));function Jb(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Yb=`__v`,Xb=`__o`,Zb=`_owner`,{getOwnPropertyDescriptor:Qb,keys:$b}=Object;function ex(e,t){return e.byteLength===t.byteLength&&px(new Uint8Array(e),new Uint8Array(t))}function tx(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function nx(e,t){return e.byteLength===t.byteLength&&px(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function rx(e,t){return Jb(e.getTime(),t.getTime())}function ix(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ax(e,t){return e===t}function ox(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var sx=Jb;function cx(e,t,n){let r=$b(e),i=r.length;if($b(t).length!==i)return!1;for(;i-->0;)if(!hx(e,t,n,r[i]))return!1;return!0}function lx(e,t,n){let r=Kb(e),i=r.length;if(Kb(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!hx(e,t,n,a)||(o=Qb(e,a),s=Qb(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ux(e,t){return Jb(e.valueOf(),t.valueOf())}function dx(e,t){return e.source===t.source&&e.flags===t.flags}function fx(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function px(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function mx(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 hx(e,t,n,r){return(r===Zb||r===Xb||r===Yb)&&(e.$$typeof||t.$$typeof)?!0:qb(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var gx=`[object ArrayBuffer]`,_x=`[object Arguments]`,vx=`[object Boolean]`,yx=`[object DataView]`,bx=`[object Date]`,xx=`[object Error]`,Sx=`[object Map]`,Cx=`[object Number]`,wx=`[object Object]`,Tx=`[object RegExp]`,Ex=`[object Set]`,Dx=`[object String]`,Ox={"[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},kx=`[object URL]`,Ax=Object.prototype.toString;function jx({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=Ax.call(h);if(b===bx)return r(h,g,_);if(b===Tx)return u(h,g,_);if(b===Sx)return o(h,g,_);if(b===Ex)return d(h,g,_);if(b===wx)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===kx)return p(h,g,_);if(b===xx)return i(h,g,_);if(b===_x)return c(h,g,_);if(Ox[b])return f(h,g,_);if(b===gx)return e(h,g,_);if(b===yx)return n(h,g,_);if(b===vx||b===Cx||b===Dx)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Gb(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function Mx({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ex,areArraysEqual:n?lx:tx,areDataViewsEqual:nx,areDatesEqual:rx,areErrorsEqual:ix,areFunctionsEqual:ax,areMapsEqual:n?Ub(ox,lx):ox,areNumbersEqual:sx,areObjectsEqual:n?lx:cx,arePrimitiveWrappersEqual:ux,areRegExpsEqual:dx,areSetsEqual:n?Ub(fx,lx):fx,areTypedArraysEqual:n?Ub(px,lx):px,areUrlsEqual:mx,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Wb(r.areArraysEqual),t=Wb(r.areMapsEqual),n=Wb(r.areObjectsEqual),i=Wb(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Nx(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Px({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Fx=Ix();Ix({strict:!0}),Ix({circular:!0}),Ix({circular:!0,strict:!0}),Ix({createInternalComparator:()=>Jb}),Ix({strict:!0,createInternalComparator:()=>Jb}),Ix({circular:!0,createInternalComparator:()=>Jb}),Ix({circular:!0,createInternalComparator:()=>Jb,strict:!0});function Ix(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=jx(Mx(e));return Px({circular:t,comparator:a,createState:r,equals:n?n(a):Nx(a),strict:i})}var Lx=o((e=>{var t=d(),n=us();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Rx=o(((e,t)=>{t.exports=Lx()})),zx=l(cs(),1),Bx=us(),Vx=Rx(),Hx=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Ux=({contentComponent:e})=>{let t=(0,Bx.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,P.jsx)(P.Fragment,{children:Object.values(t)})};function Wx(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:zx.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var Gx=class extends N.Component{constructor(e){super(e),this.editorContentRef=N.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!e.editor?.contentComponent}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Wx(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(`div`,{ref:Hx(t,this.editorContentRef),...n}),e?.contentComponent&&(0,P.jsx)(Ux,{contentComponent:e.contentComponent})]})}},Kx=(0,N.forwardRef)((e,t)=>{let n=N.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return N.createElement(Gx,{key:n,innerRef:t,...e})}),qx=N.memo(Kx),Jx=typeof window<`u`?N.useLayoutEffect:N.useEffect,Yx=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 e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Xx(e){let[t]=(0,N.useState)(()=>new Yx(e.editor)),n=(0,Vx.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Fx);return Jx(()=>t.watch(e.editor),[e.editor,t]),(0,N.useDebugValue)(n),n}var Zx=typeof window>`u`,Qx=Zx||!!(typeof window<`u`&&window.next),$x=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,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(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?Zx||Qx?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){return new Cb({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>e===t.extensions?.[n]):e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function eS(e={},t=[]){let n=(0,N.useRef)(e);n.current=e;let[r]=(0,N.useState)(()=>new $x(n)),i=(0,Bx.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,N.useDebugValue)(i),(0,N.useEffect)(r.onRender(t)),Xx({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var tS=(0,N.createContext)({editor:null});tS.Consumer;var nS=(0,N.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),rS=()=>(0,N.useContext)(nS),iS=N.forwardRef((e,t)=>{let{onDragStart:n}=rS();return(0,P.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function aS(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function oS(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function sS(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function cS(e){if(aS(e)||oS(e))return!0;if(sS(e)){let t=e.type;if(t)return aS(t)||oS(t)}return!1}function lS(){try{if(N.version)return parseInt(N.version.split(`.`)[0],10)>=19}catch{}return!1}var uS=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isInitialized?(0,zx.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=lS(),a=cS(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,P.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};N.createContext({markViewContentRef:()=>{}});var dS=class extends zb{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,N.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,N.memo)(e=>(0,P.jsx)(nS.Provider,{value:t,children:(0,N.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new uS(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n?!0:(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=Uv(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function fS(e,t){return n=>n.editor.contentComponent?new dS(e,n,t):{}}var pS=(0,N.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});pS.displayName=`TiptapContext`;var mS=()=>(0,N.useContext)(pS);function hS({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,N.useMemo)(()=>({editor:r}),[r]),a=(0,N.useMemo)(()=>({editor:r}),[r]);return(0,P.jsx)(tS.Provider,{value:a,children:(0,P.jsx)(pS.Provider,{value:i,children:n})})}hS.displayName=`Tiptap`;function gS({...e}){let{editor:t}=mS();return(0,P.jsx)(qx,{editor:t,...e})}gS.displayName=`Tiptap.Content`,Object.assign(hS,{Content:gS});var _S=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vS=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},yS=null,bS=function(e,t,n){let r=yS||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},xS=function(){yS=null},SS=function(e,t,n,r){return n&&(wS(e,t,n,r,-1)||wS(e,t,n,r,1))},CS=/^(img|br|input|textarea|hr)$/i;function wS(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:TS(e))){let n=e.parentNode;if(!n||n.nodeType!=1||kS(e)||CS.test(e.nodeName)||e.contentEditable==`false`)return!1;t=_S(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?TS(e):0}else return!1}}function TS(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ES(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=TS(e)}else if(e.parentNode&&!kS(e))t=_S(e),e=e.parentNode;else return null}}function DS(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&&!kS(e))t=_S(e)+1,e=e.parentNode;else return null}}function OS(e,t,n){for(let r=t==0,i=t==TS(e);r||i;){if(e==n)return!0;let t=_S(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==TS(e)}}function kS(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var AS=function(e){return e.focusNode&&SS(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function jS(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function MS(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function NS(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(TS(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(TS(r.startContainer),r.startOffset)}}}var PS=typeof navigator<`u`?navigator:null,FS=typeof document<`u`?document:null,IS=PS&&PS.userAgent||``,LS=/Edge\/(\d+)/.exec(IS),RS=/MSIE \d/.exec(IS),zS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(IS),BS=!!(RS||zS||LS),VS=RS?document.documentMode:zS?+zS[1]:LS?+LS[1]:0,HS=!BS&&/gecko\/(\d+)/i.test(IS);HS&&+(/Firefox\/(\d+)/.exec(IS)||[0,0])[1];var US=!BS&&/Chrome\/(\d+)/.exec(IS),WS=!!US,GS=US?+US[1]:0,KS=!BS&&!!PS&&/Apple Computer/.test(PS.vendor),qS=KS&&(/Mobile\/\w+/.test(IS)||!!PS&&PS.maxTouchPoints>2),JS=qS||(PS?/Mac/.test(PS.platform):!1),YS=PS?/Win/.test(PS.platform):!1,XS=/Android \d/.test(IS),ZS=!!FS&&`webkitFontSmoothing`in FS.documentElement.style,QS=ZS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function $S(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 eC(e,t){return typeof e==`number`?e:e[t]}function tC(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function nC(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=vS(o);continue}let e=o,n=e==a.body,s=n?$S(a):tC(e),c=0,l=0;if(t.top<s.top+eC(r,`top`)?l=-(s.top-t.top+eC(i,`top`)):t.bottom>s.bottom-eC(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+eC(i,`top`)-s.top:t.bottom-s.bottom+eC(i,`bottom`)),t.left<s.left+eC(r,`left`)?c=-(s.left-t.left+eC(i,`left`)):t.right>s.right-eC(r,`right`)&&(c=t.right-s.right+eC(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:vS(o)}}function rC(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:iC(e.dom)}}function iC(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=vS(r));return t}function aC({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;oC(n,r==0?0:r-t)}function oC(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var sC=null;function cC(e){if(e.setActive)return e.setActive();if(sC)return e.focus(sC);let t=iC(e);e.focus(sC==null?{get preventScroll(){return sC={preventScroll:!0},!0}}:void 0),sC||(sC=!1,oC(t,0))}function lC(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=bS(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?uC(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:lC(n,i)}function uC(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=vC(r,1);if(n.top!=n.bottom&&dC(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function dC(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function fC(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function pC(e,t,n){let{node:r,offset:i}=lC(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function mC(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function hC(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(dC(t,i))return hC(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function gC(e,t){let n=e.dom.ownerDocument,r,i=0,a=NS(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!dC(t,n)||(o=hC(e.dom,t,n),!o))return null}if(KS)for(let e=o;r&&e;e=vS(e))e.draggable&&(r=void 0);if(o=fC(o,t),r){if(HS&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;ZS&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=mC(e,r,i,t))}s??=pC(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function _C(e){return e.top<e.bottom||e.left<e.right}function vC(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(_C(e))return e}return Array.prototype.find.call(n,_C)||e.getBoundingClientRect()}var yC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function bC(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=ZS||HS;if(r.nodeType==3)if(o&&(yC.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=vC(bS(r,i,i),n);if(HS&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=vC(bS(r,i-1,i-1),-1);if(t.top==e.top){let n=vC(bS(r,i,i+1),-1);if(n.top!=e.top)return xC(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,xC(vC(bS(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==TS(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return SC(e.getBoundingClientRect(),!1)}if(a==null&&i<TS(r)){let e=r.childNodes[i];if(e.nodeType==1)return SC(e.getBoundingClientRect(),!0)}return SC(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==TS(r))){let e=r.childNodes[i-1],t=e.nodeType==3?bS(e,TS(e)-+!o):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return xC(vC(t,1),!1)}if(a==null&&i<TS(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?bS(e,0,+!o):e.nodeType==1?e:null:null;if(t)return xC(vC(t,-1),!0)}return xC(vC(r.nodeType==3?bS(r):r,-n),n>=0)}function xC(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function SC(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function CC(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function wC(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return CC(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=bC(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=bS(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var TC=/[\u0590-\u08ac]/;function EC(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!TC.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:CC(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var DC=null,OC=null,kC=!1;function AC(e,t,n){return DC==t&&OC==n?kC:(DC=t,OC=n,kC=n==`up`||n==`down`?wC(e,t,n):EC(e,t,n))}var jC=0,MC=1,NC=2,PC=3,FC=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=jC,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.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(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>_S(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof HC){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof IC&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?_S(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?_S(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=_S(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=_S(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((HS||KS)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
145
|
+
`)}function Lb(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var Rb=class e extends $y{constructor(){super(...arguments),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},zb=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t;let{view:n}=this.editor,r=e.target,i=r.nodeType===3?r.parentElement?.closest(`[data-drag-handle]`):r.closest(`[data-drag-handle]`);if(!this.dom||this.contentDOM?.contains(r)||!i)return;let a=0,o=0;if(this.dom!==i){let t=this.dom.getBoundingClientRect(),n=i.getBoundingClientRect(),r=e.offsetX??e.nativeEvent?.offsetX,s=e.offsetY??e.nativeEvent?.offsetY;a=n.x-t.x+r,o=n.y-t.y+s}let s=this.dom.cloneNode(!0);try{let e=this.dom.getBoundingClientRect();s.style.width=`${Math.round(e.width)}px`,s.style.height=`${Math.round(e.height)}px`,s.style.boxSizing=`border-box`,s.style.pointerEvents=`none`}catch{}let c=null;try{c=document.createElement(`div`),c.style.position=`absolute`,c.style.top=`-9999px`,c.style.left=`-9999px`,c.style.pointerEvents=`none`,c.appendChild(s),document.body.appendChild(c),(t=e.dataTransfer)==null||t.setDragImage(s,a,o)}finally{c&&setTimeout(()=>{try{c?.remove()}catch{}},0)}let l=this.getPos();if(typeof l!=`number`)return;let u=U.create(n.state.doc,l),d=n.state.tr.setSelection(u);n.dispatch(d)}stopEvent(e){if(!this.dom)return!1;if(typeof this.options.stopEvent==`function`)return this.options.stopEvent({event:e});let t=e.target;if(!(this.dom.contains(t)&&!this.contentDOM?.contains(t)))return!1;let n=e.type.startsWith(`drag`),r=e.type===`drop`;if(([`INPUT`,`BUTTON`,`SELECT`,`TEXTAREA`].includes(t.tagName)||t.isContentEditable)&&!r&&!n)return!0;let{isEditable:i}=this.editor,{isDragging:a}=this,o=!!this.node.type.spec.draggable,s=U.isSelectable(this.node),c=e.type===`copy`,l=e.type===`paste`,u=e.type===`cut`,d=e.type===`mousedown`;if(!o&&s&&n&&e.target===this.dom&&e.preventDefault(),o&&n&&!a&&e.target===this.dom)return e.preventDefault(),!1;if(o&&i&&!a&&d){let e=t.closest(`[data-drag-handle]`);e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener(`dragend`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`drop`,()=>{this.isDragging=!1},{once:!0}),document.addEventListener(`mouseup`,()=>{this.isDragging=!1},{once:!0}))}return!(a||r||c||l||u||d&&s)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation==`function`?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type===`selection`||this.dom.contains(e.target)&&e.type===`childList`&&(W_()||U_())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every(e=>e.isContentEditable)?!1:this.contentDOM===e.target&&e.type===`attributes`||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{let n=this.getPos();return typeof n==`number`?(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0):!1})}deleteNode(){let e=this.getPos();if(typeof e!=`number`)return;let t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}},{getOwnPropertyNames:Bb,getOwnPropertySymbols:Vb}=Object,{hasOwnProperty:Hb}=Object.prototype;function Ub(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function Wb(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function Gb(e){return e?.[Symbol.toStringTag]}function Kb(e){return Bb(e).concat(Vb(e))}var qb=Object.hasOwn||((e,t)=>Hb.call(e,t));function Jb(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Yb=`__v`,Xb=`__o`,Zb=`_owner`,{getOwnPropertyDescriptor:Qb,keys:$b}=Object;function ex(e,t){return e.byteLength===t.byteLength&&px(new Uint8Array(e),new Uint8Array(t))}function tx(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function nx(e,t){return e.byteLength===t.byteLength&&px(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function rx(e,t){return Jb(e.getTime(),t.getTime())}function ix(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ax(e,t){return e===t}function ox(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var sx=Jb;function cx(e,t,n){let r=$b(e),i=r.length;if($b(t).length!==i)return!1;for(;i-->0;)if(!hx(e,t,n,r[i]))return!1;return!0}function lx(e,t,n){let r=Kb(e),i=r.length;if(Kb(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!hx(e,t,n,a)||(o=Qb(e,a),s=Qb(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function ux(e,t){return Jb(e.valueOf(),t.valueOf())}function dx(e,t){return e.source===t.source&&e.flags===t.flags}function fx(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function px(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function mx(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 hx(e,t,n,r){return(r===Zb||r===Xb||r===Yb)&&(e.$$typeof||t.$$typeof)?!0:qb(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var gx=`[object ArrayBuffer]`,_x=`[object Arguments]`,vx=`[object Boolean]`,yx=`[object DataView]`,bx=`[object Date]`,xx=`[object Error]`,Sx=`[object Map]`,Cx=`[object Number]`,wx=`[object Object]`,Tx=`[object RegExp]`,Ex=`[object Set]`,Dx=`[object String]`,Ox={"[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},kx=`[object URL]`,Ax=Object.prototype.toString;function jx({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);let b=Ax.call(h);if(b===bx)return r(h,g,_);if(b===Tx)return u(h,g,_);if(b===Sx)return o(h,g,_);if(b===Ex)return d(h,g,_);if(b===wx)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===kx)return p(h,g,_);if(b===xx)return i(h,g,_);if(b===_x)return c(h,g,_);if(Ox[b])return f(h,g,_);if(b===gx)return e(h,g,_);if(b===yx)return n(h,g,_);if(b===vx||b===Cx||b===Dx)return l(h,g,_);if(m){let e=m[b];if(!e){let t=Gb(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function Mx({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:ex,areArraysEqual:n?lx:tx,areDataViewsEqual:nx,areDatesEqual:rx,areErrorsEqual:ix,areFunctionsEqual:ax,areMapsEqual:n?Ub(ox,lx):ox,areNumbersEqual:sx,areObjectsEqual:n?lx:cx,arePrimitiveWrappersEqual:ux,areRegExpsEqual:dx,areSetsEqual:n?Ub(fx,lx):fx,areTypedArraysEqual:n?Ub(px,lx):px,areUrlsEqual:mx,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=Wb(r.areArraysEqual),t=Wb(r.areMapsEqual),n=Wb(r.areObjectsEqual),i=Wb(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}function Nx(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Px({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}var Fx=Ix();Ix({strict:!0}),Ix({circular:!0}),Ix({circular:!0,strict:!0}),Ix({createInternalComparator:()=>Jb}),Ix({strict:!0,createInternalComparator:()=>Jb}),Ix({circular:!0,createInternalComparator:()=>Jb}),Ix({circular:!0,createInternalComparator:()=>Jb,strict:!0});function Ix(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=jx(Mx(e));return Px({circular:t,comparator:a,createState:r,equals:n?n(a):Nx(a),strict:i})}var Lx=o((e=>{var t=d(),n=us();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Rx=o(((e,t)=>{t.exports=Lx()})),zx=l(cs(),1),Bx=us(),Vx=Rx(),Hx=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},Ux=({contentComponent:e})=>{let t=(0,Bx.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,N.jsx)(N.Fragment,{children:Object.values(t)})};function Wx(){let e=new Set,t={};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:zx.createPortal(r.reactElement,r.element,n)},e.forEach(e=>e())},removeRenderer(n){let r={...t};delete r[n],t=r,e.forEach(e=>e())}}}var Gx=class extends S.Component{constructor(e){super(e),this.editorContentRef=S.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!e.editor?.contentComponent}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t}),e.contentComponent=Wx(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=e.contentComponent.subscribe(()=>{this.setState(e=>e.hasContentComponentInitialized?e:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),e.createNodeViews(),this.initialized=!0}}componentWillUnmount(){let e=this.props.editor;if(e){this.initialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`div`,{ref:Hx(t,this.editorContentRef),...n}),e?.contentComponent&&(0,N.jsx)(Ux,{contentComponent:e.contentComponent})]})}},Kx=(0,S.forwardRef)((e,t)=>{let n=S.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return S.createElement(Gx,{key:n,innerRef:t,...e})}),qx=S.memo(Kx),Jx=typeof window<`u`?S.useLayoutEffect:S.useEffect,Yx=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 e=()=>{this.transactionNumber+=1,this.subscribers.forEach(e=>e())},t=this.editor;return t.on(`transaction`,e),()=>{t.off(`transaction`,e)}}}};function Xx(e){let[t]=(0,S.useState)(()=>new Yx(e.editor)),n=(0,Vx.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??Fx);return Jx(()=>t.watch(e.editor),[e.editor,t]),(0,S.useDebugValue)(n),n}var Zx=typeof window>`u`,Qx=Zx||!!(typeof window<`u`&&window.next),$x=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,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(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?Zx||Qx?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){return new Cb({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>e===t.extensions?.[n]):e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function eS(e={},t=[]){let n=(0,S.useRef)(e);n.current=e;let[r]=(0,S.useState)(()=>new $x(n)),i=(0,Bx.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,S.useDebugValue)(i),(0,S.useEffect)(r.onRender(t)),Xx({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var tS=(0,S.createContext)({editor:null});tS.Consumer;var nS=(0,S.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),rS=()=>(0,S.useContext)(nS),iS=S.forwardRef((e,t)=>{let{onDragStart:n}=rS();return(0,N.jsx)(e.as||`div`,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})});function aS(e){return!!(typeof e==`function`&&e.prototype&&e.prototype.isReactComponent)}function oS(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.forward_ref)`||e.$$typeof.description===`react.forward_ref`))}function sS(e){return!!(typeof e==`object`&&e.$$typeof&&(e.$$typeof.toString()===`Symbol(react.memo)`||e.$$typeof.description===`react.memo`))}function cS(e){if(aS(e)||oS(e))return!0;if(sS(e)){let t=e.type;if(t)return aS(t)||oS(t)}return!1}function lS(){try{if(S.version)return parseInt(S.version.split(`.`)[0],10)>=19}catch{}return!1}var uS=class{constructor(e,{editor:t,props:n={},as:r=`div`,className:i=``}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add(`react-renderer`),i&&this.element.classList.add(...i.split(` `)),this.editor.isInitialized?(0,zx.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,r=this.editor,i=lS(),a=cS(t),o={...n};o.ref&&!(i||a)&&delete o.ref,!o.ref&&(i||a)&&(o.ref=e=>{this.ref=e}),this.reactElement=(0,N.jsx)(t,{...o}),(e=r?.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0,(e=this.editor?.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};S.createContext({markViewContentRef:()=>{}});var dS=class extends zb{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?`span`:`div`),this.contentDOMElement.dataset.nodeViewContentReact=``,this.contentDOMElement.dataset.nodeViewWrapper=``,this.contentDOMElement.style.whiteSpace=`inherit`;let e=this.dom.querySelector(`[data-node-view-content]`);if(!e)return;e.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){return r===`storage`?e.storage[t.name]??{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){let e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode(),ref:(0,S.createRef)()};if(!this.component.displayName){let e=e=>e.charAt(0).toUpperCase()+e.substring(1);this.component.displayName=e(this.extension.name)}let t={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement&&(e.hasAttribute(`data-node-view-wrapper`)&&e.removeAttribute(`data-node-view-wrapper`),e.appendChild(this.contentDOMElement))}},n=this.component,r=(0,S.memo)(e=>(0,N.jsx)(nS.Provider,{value:t,children:(0,S.createElement)(n,e)}));r.displayName=`ReactNodeView`;let i=this.node.isInline?`span`:`div`;this.options.as&&(i=this.options.as);let{className:a=``}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new uS(r,{editor:this.editor,props:e,as:i,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on(`selectionUpdate`,this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){if(this.renderer.element.firstElementChild&&!this.renderer.element.firstElementChild?.hasAttribute(`data-node-view-wrapper`))throw Error(`Please use the NodeViewWrapper component for your node view.`);return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;let{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n==`number`)if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){let r=e=>{this.renderer.updateProps(e),typeof this.options.attrs==`function`&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update==`function`){let i=this.node,a=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:a,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n?!0:(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add(`ProseMirror-selectednode`)}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove(`ProseMirror-selectednode`)}destroy(){this.renderer.destroy(),this.editor.off(`selectionUpdate`,this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&=(cancelAnimationFrame(this.selectionRafId),null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs==`function`){let t=this.editor.extensionManager.attributes,n=Uv(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function fS(e,t){return n=>n.editor.contentComponent?new dS(e,n,t):{}}var pS=(0,S.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});pS.displayName=`TiptapContext`;var mS=()=>(0,S.useContext)(pS);function hS({editor:e,instance:t,children:n}){let r=e??t;if(!r)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let i=(0,S.useMemo)(()=>({editor:r}),[r]),a=(0,S.useMemo)(()=>({editor:r}),[r]);return(0,N.jsx)(tS.Provider,{value:a,children:(0,N.jsx)(pS.Provider,{value:i,children:n})})}hS.displayName=`Tiptap`;function gS({...e}){let{editor:t}=mS();return(0,N.jsx)(qx,{editor:t,...e})}gS.displayName=`Tiptap.Content`,Object.assign(hS,{Content:gS});var _S=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},vS=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},yS=null,bS=function(e,t,n){let r=yS||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},xS=function(){yS=null},SS=function(e,t,n,r){return n&&(wS(e,t,n,r,-1)||wS(e,t,n,r,1))},CS=/^(img|br|input|textarea|hr)$/i;function wS(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:TS(e))){let n=e.parentNode;if(!n||n.nodeType!=1||kS(e)||CS.test(e.nodeName)||e.contentEditable==`false`)return!1;t=_S(e)+(i<0?0:1),e=n}else if(e.nodeType==1){let n=e.childNodes[t+(i<0?-1:0)];if(n.nodeType==1&&n.contentEditable==`false`)if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1;else e=n,t=i<0?TS(e):0}else return!1}}function TS(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function ES(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=TS(e)}else if(e.parentNode&&!kS(e))t=_S(e),e=e.parentNode;else return null}}function DS(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&&!kS(e))t=_S(e)+1,e=e.parentNode;else return null}}function OS(e,t,n){for(let r=t==0,i=t==TS(e);r||i;){if(e==n)return!0;let t=_S(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==TS(e)}}function kS(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var AS=function(e){return e.focusNode&&SS(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function jS(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function MS(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function NS(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(TS(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(TS(r.startContainer),r.startOffset)}}}var PS=typeof navigator<`u`?navigator:null,FS=typeof document<`u`?document:null,IS=PS&&PS.userAgent||``,LS=/Edge\/(\d+)/.exec(IS),RS=/MSIE \d/.exec(IS),zS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(IS),BS=!!(RS||zS||LS),VS=RS?document.documentMode:zS?+zS[1]:LS?+LS[1]:0,HS=!BS&&/gecko\/(\d+)/i.test(IS);HS&&+(/Firefox\/(\d+)/.exec(IS)||[0,0])[1];var US=!BS&&/Chrome\/(\d+)/.exec(IS),WS=!!US,GS=US?+US[1]:0,KS=!BS&&!!PS&&/Apple Computer/.test(PS.vendor),qS=KS&&(/Mobile\/\w+/.test(IS)||!!PS&&PS.maxTouchPoints>2),JS=qS||(PS?/Mac/.test(PS.platform):!1),YS=PS?/Win/.test(PS.platform):!1,XS=/Android \d/.test(IS),ZS=!!FS&&`webkitFontSmoothing`in FS.documentElement.style,QS=ZS?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function $S(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 eC(e,t){return typeof e==`number`?e:e[t]}function tC(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function nC(e,t,n){let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(o.nodeType!=1){o=vS(o);continue}let e=o,n=e==a.body,s=n?$S(a):tC(e),c=0,l=0;if(t.top<s.top+eC(r,`top`)?l=-(s.top-t.top+eC(i,`top`)):t.bottom>s.bottom-eC(r,`bottom`)&&(l=t.bottom-t.top>s.bottom-s.top?t.top+eC(i,`top`)-s.top:t.bottom-s.bottom+eC(i,`bottom`)),t.left<s.left+eC(r,`left`)?c=-(s.left-t.left+eC(i,`left`)):t.right>s.right-eC(r,`right`)&&(c=t.right-s.right+eC(i,`right`)),c||l)if(n)a.defaultView.scrollBy(c,l);else{let n=e.scrollLeft,r=e.scrollTop;l&&(e.scrollTop+=l),c&&(e.scrollLeft+=c);let i=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-i,top:t.top-a,right:t.right-i,bottom:t.bottom-a}}let u=n?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(u))break;o=u==`absolute`?o.offsetParent:vS(o)}}function rC(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:iC(e.dom)}}function iC(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=vS(r));return t}function aC({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;oC(n,r==0?0:r-t)}function oC(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var sC=null;function cC(e){if(e.setActive)return e.setActive();if(sC)return e.focus(sC);let t=iC(e);e.focus(sC==null?{get preventScroll(){return sC={preventScroll:!0},!0}}:void 0),sC||(sC=!1,oC(t,0))}function lC(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(u.nodeType==1)e=u.getClientRects();else if(u.nodeType==3)e=bS(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&n.nodeType==3?{left:p.right<t.left?p.right:p.left,top:t.top}:t,u.nodeType==1&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&n.nodeType==3?uC(n,i):!n||r&&n.nodeType==1?{node:e,offset:a}:lC(n,i)}function uC(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=vC(r,1);if(n.top!=n.bottom&&dC(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function dC(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function fC(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function pC(e,t,n){let{node:r,offset:i}=lC(t,n),a=-1;if(r.nodeType==1&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function mC(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(t.dom.nodeType==1&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function hC(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(n.nodeType==1){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(dC(t,i))return hC(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function gC(e,t){let n=e.dom.ownerDocument,r,i=0,a=NS(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o.nodeType==1?o:o.parentNode)){let n=e.dom.getBoundingClientRect();if(!dC(t,n)||(o=hC(e.dom,t,n),!o))return null}if(KS)for(let e=o;r&&e;e=vS(e))e.draggable&&(r=void 0);if(o=fC(o,t),r){if(HS&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;ZS&&i&&r.nodeType==1&&(n=r.childNodes[i-1]).nodeType==1&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!=`BR`)&&(s=mC(e,r,i,t))}s??=pC(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function _C(e){return e.top<e.bottom||e.left<e.right}function vC(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(_C(e))return e}return Array.prototype.find.call(n,_C)||e.getBoundingClientRect()}var yC=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function bC(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=ZS||HS;if(r.nodeType==3)if(o&&(yC.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=vC(bS(r,i,i),n);if(HS&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=vC(bS(r,i-1,i-1),-1);if(t.top==e.top){let n=vC(bS(r,i,i+1),-1);if(n.top!=e.top)return xC(n,n.left<t.left)}}return e}else{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,xC(vC(bS(r,e,t),a),a<0)}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==TS(r))){let e=r.childNodes[i-1];if(e.nodeType==1)return SC(e.getBoundingClientRect(),!1)}if(a==null&&i<TS(r)){let e=r.childNodes[i];if(e.nodeType==1)return SC(e.getBoundingClientRect(),!0)}return SC(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==TS(r))){let e=r.childNodes[i-1],t=e.nodeType==3?bS(e,TS(e)-+!o):e.nodeType==1&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return xC(vC(t,1),!1)}if(a==null&&i<TS(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?e.nodeType==3?bS(e,0,+!o):e.nodeType==1?e:null:null;if(t)return xC(vC(t,-1),!0)}return xC(vC(r.nodeType==3?bS(r):r,-n),n>=0)}function xC(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function SC(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function CC(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function wC(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return CC(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=bC(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(e.nodeType==1)t=e.getClientRects();else if(e.nodeType==3)t=bS(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var TC=/[\u0590-\u08ac]/;function EC(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!TC.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:CC(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!l.contains(u.nodeType==1?u:u.parentNode)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var DC=null,OC=null,kC=!1;function AC(e,t,n){return DC==t&&OC==n?kC:(DC=t,OC=n,kC=n==`up`||n==`down`?wC(e,t,n):EC(e,t,n))}var jC=0,MC=1,NC=2,PC=3,FC=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=jC,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.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(e,t,n){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}else{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}let r;if(e==this.dom&&this.contentDOM)r=t>_S(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node))if(n&&(a=i.nodeDOM)&&!(a.nodeType==1?a.contains(e.nodeType==1?e:e.parentNode):a==e))n=!1;else return i}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e||i instanceof HC){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let e;n&&!(e=this.children[n-1]).size&&e instanceof IC&&e.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,!(!e||e.dom.parentNode==this.contentDOM);n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?_S(e.dom)+1:0}}else{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,!(!e||e.dom.parentNode==this.contentDOM);n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?_S(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=_S(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=_S(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(t.nodeType!=1||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((HS||KS)&&e==t){let{node:e,offset:t}=o;if(e.nodeType==3){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
146
146
|
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:_S(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(HS&&l.focusNode&&l.focusNode!=s.node&&l.focusNode.nodeType==1){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&KS)&&SS(o.node,o.offset,l.anchorNode,l.anchorOffset)&&SS(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&HS)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?NC:MC,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=PC:i.markDirty(e-r,t-r);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?NC:PC}n=a}this.dirty=NC}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?NC:MC;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},IC=class extends FC{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){if(a.nodeType!=1){let e=document.createElement(`span`);e.appendChild(a),a=e}a.contentEditable=`false`,a.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==jC&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.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}},LC=class extends FC{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},RC=class e extends FC{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return(!o||!o.dom)&&(o=Tc.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&PC||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=PC&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=jC){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=jC}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=aw(a,n,o,r)),t>0&&(a=aw(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},zC=class e extends FC{constructor(e,t,n,r,i,a,o,s,c){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=Tc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=XC(u,r,n),l?c=new UC(t,n,r,i,u,d||null,f,l,a,o+1):n.isText?new VC(t,n,r,i,u,f,a):new e(t,n,r,i,u,d||null,f,a,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(e.preserveWhitespace=`full`),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>R.empty)}return e}matchesNode(e,t,n){return this.dirty==jC&&e.eq(this.node)&&ZC(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new $C(this,a&&a.node,e);nw(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?_s.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,c,l)=>{s.syncToMarks(t.marks,n,e,l);let u;s.findNodeMatch(t,a,c,l)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,c,u,e)||s.updateNextNode(t,a,c,e,l,r)||s.addNode(t,a,c,e,r),r+=t.nodeSize}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==NC)&&(a&&this.protectLocalComposition(e,a),WC(this.contentDOM,this.children,e),qS&&rw(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof H)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=iw(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}else return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;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&&=void 0}let a=new LC(this,i,t,r);e.input.compositionNodes.push(a),this.children=aw(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==PC||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=jC}updateOuterDeco(e){if(ZC(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,n=this.dom;this.dom=JC(this.dom,this.nodeDOM,qC(this.outerDeco,this.node,t),qC(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}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 BC(e,t,n,r,i){XC(r,t,e);let a=new zC(void 0,e,t,n,r,r,r,i,0);return a.contentDOM&&a.updateChildren(i,0),a}var VC=class e extends zC{constructor(e,t,n,r,i,a,o){super(e,t,n,r,i,null,a,o,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==PC||this.dirty!=jC&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=jC||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=jC,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=PC)}get domAtom(){return!1}isText(e){return this.node.text==e}},HC=class extends FC{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==jC&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},UC=class extends zC{constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r,i,a,o,c,l),this.spec=s}update(e,t,n,r){if(this.dirty==PC)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}else if(!this.contentDOM&&!e.isLeaf)return!1;else return super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function WC(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=QC(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof RC){let t=r?r.previousSibling:e.lastChild;WC(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=QC(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var GC=function(e){e&&(this.nodeName=e)};GC.prototype=Object.create(null);var KC=[new GC];function qC(e,t,n){if(e.length==0)return KC;let r=n?KC[0]:new GC,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new GC(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new GC(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function JC(e,t,n,r){if(n==KC&&r==KC)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName?i=t:(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=KC[0],i=t)}YC(i,o||KC[0],a)}return i}function YC(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function XC(e,t,n){return JC(e,e,KC,qC(t,n,e.nodeType!=1))}function ZC(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function QC(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var $C=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=ew(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=jC,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=RC.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==PC&&a.dom==a.contentDOM&&(a.dirty=NC),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof zC){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=PC&&ZC(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=NC,u.updateChildren(r,a+1),u.dirty=jC),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!ZC(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=zC.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=zC.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new IC(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof RC;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof VC)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((KS||WS)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new HC(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}};function ew(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof RC)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function tw(e,t){return e.type.side-t.type.side}function nw(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u)if(d){d.sort(tw);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c);let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function rw(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 iw(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function aw(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function ow(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(AS(n)){for(c=o;i&&!i.node;)i=i.parent;let e=i.node;if(i&&e.isAtom&&U.isSelectable(e)&&i.parent&&!(e.isInline&&OS(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new U(o==e?s:r.resolve(e))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=_w(e,u,s,n)}return l}function sw(e){return e.editable?e.hasFocus():yw(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function cw(e,t=!1){let n=e.state.selection;if(hw(e,n),sw(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&WS){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&SS(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)mw(e);else{let{anchor:r,head:i}=n,a,o;lw&&!(n instanceof H)&&(n.$from.parent.inlineContent||(a=uw(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=uw(e,n.to))),e.docView.setSelection(r,i,e,t),lw&&(a&&fw(a),o&&fw(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&pw(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}var lw=KS||WS&&GS<63;function uw(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(KS&&i&&i.contentEditable==`false`)return dw(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return dw(i);if(a)return dw(a)}}function dw(e){return e.contentEditable=`true`,KS&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function fw(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function pw(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!sw(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function mw(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,_S(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&BS&&VS<=11&&(n.disabled=!0,n.disabled=!1)}function hw(e,t){if(t instanceof U){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(gw(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else gw(e)}function gw(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function _w(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||H.between(t,n,r)}function vw(e){return e.editable&&!e.hasFocus()?!1:yw(e)}function yw(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{return!1}}function bw(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return SS(t.node,t.offset,n.anchorNode,n.anchorOffset)}function xw(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&V.findFrom(a,t)}function Sw(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Cw(e,t,n){let r=e.state.selection;if(r instanceof H){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return Sw(e,new H(r.$anchor,a))}else if(!r.empty)return!1;else if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=xw(e.state,t);return n&&n instanceof U?Sw(e,n):!1}else if(!(JS&&n.indexOf(`m`)>-1)){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?U.isSelectable(i)?Sw(e,new U(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):ZS?Sw(e,new H(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1:!1}}else if(r instanceof U&&r.node.isInline)return Sw(e,new H(t>0?r.$to:r.$from));else{let n=xw(e.state,t);return n?Sw(e,n):!1}}function ww(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Tw(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`)}function Ew(e,t){return t<0?Dw(e):Ow(e)}function Dw(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(HS&&n.nodeType==1&&r<ww(n)&&Tw(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let e=n.childNodes[r-1];if(Tw(e,-1))i=n,a=--r;else if(e.nodeType==3)n=e,r=n.nodeValue.length;else break}}else if(kw(n))break;else{let t=n.previousSibling;for(;t&&Tw(t,-1);)i=n.parentNode,a=_S(t),t=t.previousSibling;if(t)n=t,r=ww(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?Mw(e,n,r):i&&Mw(e,i,a)}function Ow(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=ww(n),a,o;for(;;)if(r<i){if(n.nodeType!=1)break;let e=n.childNodes[r];if(Tw(e,1))a=n,o=++r;else break}else if(kw(n))break;else{let t=n.nextSibling;for(;t&&Tw(t,1);)a=t.parentNode,o=_S(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=ww(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&Mw(e,a,o)}function kw(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Aw(e,t){for(;e&&t==e.childNodes.length&&!kS(e);)t=_S(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=0}}function jw(e,t){for(;e&&!t&&!kS(e);)t=_S(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function Mw(e,t,n){if(t.nodeType!=3){let e,r;(r=Aw(t,n))?(t=r,n=0):(e=jw(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(!r)return;if(AS(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&cw(e)},50)}function Nw(e,t){let n=e.state.doc.resolve(t);if(!(WS||YS)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}return getComputedStyle(e.dom).direction==`rtl`?`rtl`:`ltr`}function Pw(e,t,n){let r=e.state.selection;if(r instanceof H&&!r.empty||n.indexOf(`s`)>-1||JS&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=xw(e.state,t);if(n&&n instanceof U)return Sw(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof Zl?V.near(n,t):V.findFrom(n,t);return o?Sw(e,o):!1}return!1}function Fw(e,t){if(!(e.state.selection instanceof H))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function Iw(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Lw(e){if(!KS||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable==`false`){let n=t.firstChild;Iw(e,n,`true`),setTimeout(()=>Iw(e,n,`false`),20)}return!1}function Rw(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function zw(e,t){let n=t.keyCode,r=Rw(t);if(n==8||JS&&n==72&&r==`c`)return Fw(e,-1)||Ew(e,-1);if(n==46&&!t.shiftKey||JS&&n==68&&r==`c`)return Fw(e,1)||Ew(e,1);if(n==13||n==27)return!0;if(n==37||JS&&n==66&&r==`c`){let t=n==37?Nw(e,e.state.selection.from)==`ltr`?-1:1:-1;return Cw(e,t,r)||Ew(e,t)}else if(n==39||JS&&n==70&&r==`c`){let t=n==39?Nw(e,e.state.selection.from)==`ltr`?1:-1:1;return Cw(e,t,r)||Ew(e,t)}else if(n==38||JS&&n==80&&r==`c`)return Pw(e,-1,r)||Ew(e,-1);else if(n==40||JS&&n==78&&r==`c`)return Lw(e)||Pw(e,1,r)||Ew(e,1);else if(r==(JS?`m`:`c`)&&(n==66||n==73||n==89||n==90))return!0;return!1}function Bw(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||Tc.fromSchema(e.state.schema),s=Zw(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&l.nodeType==1&&(u=Yw[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&l.nodeType==1&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
147
147
|
|
|
148
148
|
`),slice:t}}function Vw(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new z(R.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
149
149
|
`))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=Tc.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=eT(n),ZS&&tT(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&e.nodeType!=1;)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||fc.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!Hw.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=nT(Jw(s,+u[1],+u[2]),u[4]);else if(s=z.maxOpen(Uw(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=Jw(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var Hw=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Uw(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&Gw(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=Kw(a[a.length-1],i.length));let n=Ww(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return R.from(a)}return e}function Ww(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,R.from(e));return e}function Gw(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=Gw(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(R.from(Ww(n,e,i+1))))}}function Kw(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,Kw(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(R.empty,!0);return e.copy(n.append(r))}function qw(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=qw(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(R.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function Jw(e,t,n){return t<e.openStart&&(e=new z(qw(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new z(qw(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var Yw={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]},Xw=null;function Zw(){return Xw||=document.implementation.createHTMLDocument(`title`)}var Qw=null;function $w(e){let t=window.trustedTypes;return t?(Qw||=t.defaultPolicy||t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e}),Qw.createHTML(e)):e}function eT(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=Zw().createElement(`div`),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&Yw[r[1].toLowerCase()])&&(e=i.map(e=>`<`+e+`>`).join(``)+e+i.map(e=>`</`+e+`>`).reverse().join(``)),n.innerHTML=$w(e),i)for(let e=0;e<i.length;e++)n=n.querySelector(i[e])||n;return n}function tT(e){let t=e.querySelectorAll(WS?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function nT(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;i=R.from(t.create(r[e+1],i)),a++,o++}return new z(i,a,o)}var rT={},iT={},aT={touchstart:!0,touchmove:!0},oT=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function sT(e){for(let t in rT){let n=rT[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{fT(e,t)&&!dT(e,t)&&(e.editable||!(t.type in iT))&&n(e,t)},aT[t]?{passive:!0}:void 0)}KS&&e.dom.addEventListener(`input`,()=>null),uT(e)}function cT(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function lT(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function uT(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>dT(e,t))})}function dT(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function fT(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function pT(e,t){!dT(e,t)&&rT[t.type]&&(e.editable||!(t.type in iT))&&rT[t.type](e,t)}iT.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!DT(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(XS&&WS&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),qS&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(e.someProp(`handleKeyDown`,t=>t(e,jS(13,`Enter`))),e.input.lastIOSEnter=0)},200)}else e.someProp(`handleKeyDown`,t=>t(e,n))||zw(e,n)?n.preventDefault():cT(e,`key`)},iT.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},iT.keypress=(e,t)=>{let n=t;if(DT(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||JS&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof H)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function mT(e){return{left:e.clientX,top:e.clientY}}function hT(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function gT(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function _T(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);n==`pointer`&&r.setMeta(`pointer`,!0),e.dispatch(r)}function vT(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&U.isSelectable(r)?(_T(e,new U(n),`pointer`),!0):!1}function yT(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof U&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(U.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i==null?!1:(_T(e,U.create(e.state.doc,i),`pointer`),!0)}function bT(e,t,n,r,i){return gT(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?yT(e,n):vT(e,n))}function xT(e,t,n,r){return gT(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function ST(e,t,n,r){return gT(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||CT(e,n,r)}function CT(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(_T(e,H.create(r,0,r.content.size),`pointer`),!0):!1;let i=r.resolve(t);for(let t=i.depth+1;t>0;t--){let n=t>i.depth?i.nodeAfter:i.node(t),a=i.before(t);if(n.inlineContent)_T(e,H.create(r,a+1,a+1+n.content.size),`pointer`);else if(U.isSelectable(n))_T(e,U.create(r,a),`pointer`);else continue;return!0}}function wT(e){return PT(e)}var TT=JS?`metaKey`:`ctrlKey`;rT.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=wT(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&hT(n,e.input.lastClick)&&!n[TT]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button};let o=e.posAtCoords(mT(n));o&&(a==`singleClick`?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new ET(e,o,n,!!r)):(a==`doubleClick`?xT:ST)(e,o.pos,o.inside,n)?n.preventDefault():cT(e,`pointer`))};var ET=class{constructor(e,t,n,r){this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[TT],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&s.nodeDOM.nodeType==1?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof U&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&HS&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this)),cT(e,`pointer`)}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>cw(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(mT(e))),this.updateAllowDefault(e),this.allowDefault||!t?cT(this.view,`pointer`):bT(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||KS&&this.mightDrag&&!this.mightDrag.node.isAtom||WS&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(_T(this.view,V.near(this.view.state.doc.resolve(t.pos)),`pointer`),e.preventDefault()):cT(this.view,`pointer`)}move(e){this.updateAllowDefault(e),cT(this.view,`pointer`),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}};rT.touchstart=e=>{e.input.lastTouch=Date.now(),wT(e),cT(e,`pointer`)},rT.touchmove=e=>{e.input.lastTouch=Date.now(),cT(e,`pointer`)},rT.contextmenu=e=>wT(e);function DT(e,t){return e.composing?!0:KS&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var OT=XS?5e3:-1;iT.compositionstart=iT.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof H&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||WS&&YS&&kT(e)))e.markCursor=e.state.storedMarks||n.marks(),PT(e,!0),e.markCursor=null;else if(PT(e,!t.selection.empty),HS&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&n.nodeType==1&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(t.nodeType==3){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}else n=t,r=-1}}e.input.composing=!0}AT(e,OT)};function kT(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||t.nodeType!=1||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return r.nodeType==1&&r.contentEditable==`false`}iT.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,AT(e,20))};function AT(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>PT(e),t))}function jT(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=NT());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function MT(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=ES(t.focusNode,t.focusOffset),r=DS(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(!(!e||!e.isText(n.nodeValue)))return r}}return n||r}function NT(){let e=document.createEvent(`Event`);return e.initEvent(`event`,!0,!0),e.timeStamp}function PT(e,t=!1){if(!(XS&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),jT(e),t||e.docView&&e.docView.dirty){let n=ow(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function FT(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var IT=BS&&VS<15||qS&&QS<604;rT.copy=iT.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=IT?null:n.clipboardData,{dom:o,text:s}=Bw(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):FT(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function LT(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function RT(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?zT(e,r.value,null,i,t):zT(e,r.textContent,r.innerHTML,i,t)},50)}function zT(e,t,n,r,i){let a=Vw(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||z.empty)))return!0;if(!a)return!1;let o=LT(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function BT(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}iT.paste=(e,t)=>{let n=t;if(e.composing&&!XS)return;let r=IT?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&zT(e,BT(r),r.getData(`text/html`),i,n)?n.preventDefault():RT(e,n)};var VT=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},HT=JS?`altKey`:`ctrlKey`;function UT(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[HT]:!n}rT.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(mT(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof U?i.to-1:i.to))){if(r&&r.mightDrag)o=U.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=U.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=Bw(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!WS||GS>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(IT?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,IT||n.dataTransfer.setData(`text/plain`,c),e.dragging=new VT(l,UT(e,n),o)},rT.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},iT.dragover=iT.dragenter=(e,t)=>t.preventDefault(),iT.drop=(e,t)=>{try{WT(e,t,e.dragging)}finally{e.dragging=null}};function WT(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(mT(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=Vw(e,BT(t.dataTransfer),IT?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&UT(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||z.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?Tl(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&U.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new U(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(_w(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}rT.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&cw(e)},20))},rT.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},rT.beforeinput=(e,t)=>{if(WS&&XS&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||(e.dom.blur(),e.focus(),e.someProp(`handleKeyDown`,t=>t(e,jS(8,`Backspace`)))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in iT)rT[e]=iT[e];function GT(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var KT=class e{constructor(e,t){this.toDOM=e,this.spec=t||ZT,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new YT(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&>(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},qT=class e{constructor(e,t){this.attrs=e,this.spec=t||ZT}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new YT(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&>(this.attrs,t.attrs)&>(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},JT=class e{constructor(e,t){this.attrs=e,this.spec=t||ZT}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new YT(i.pos-n,a.pos-n,this)}valid(e,t){let{index:n,offset:r}=e.content.findIndex(t.from),i;return r==t.from&&!(i=e.child(n)).isText&&r+i.nodeSize==t.to}eq(t){return this==t||t instanceof e&>(this.attrs,t.attrs)&>(this.spec,t.spec)}destroy(){}},YT=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new KT(n,r))}static inline(t,n,r,i){return new e(t,n,new qT(r,i))}static node(t,n,r,i){return new e(t,n,new JT(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof qT}get widget(){return this.type instanceof KT}},XT=[],ZT={},QT=class e{constructor(e,t){this.local=e.length?e:XT,this.children=t.length?t:XT}static create(e,t){return t.length?oE(t,e,0,ZT):$T}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==$T||e.maps.length==0?this:this.mapInner(e,t,0,0,n||ZT)}mapInner(t,n,r,i,a){let o;for(let e=0;e<this.local.length;e++){let s=this.local[e].map(t,r,i);s&&s.type.valid(n,s)?(o||=[]).push(s):a.onRemove&&a.onRemove(this.local[e].spec)}return this.children.length?tE(this.children,o||[],t,n,r,i,a):o?new e(o.sort(sE),XT):$T}add(t,n){return n.length?this==$T?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=iE(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,oE(s,e,o+1,ZT)),a+=3}});let o=nE(a?aE(n):n,-r);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||o.splice(e--,1);return new e(o.length?this.local.concat(o).sort(sE):this.local,i||this.children)}remove(e){return e.length==0||this==$T?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==$T?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):$T}forChild(t,n){if(this==$T)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof qT){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(sE),XT);return r?new eE([t,r]):t}return r||$T}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return cE(this.localsInner(e))}localsInner(e){if(this==$T)return XT;if(e.inlineContent||!this.local.some(qT.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof qT||t.push(this.local[e]);return t}forEachSet(e){e(this)}};QT.empty=new QT([],[]),QT.removeOverlap=cE;var $T=QT.empty,eE=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,ZT));return e.from(r)}forChild(t,n){if(n.isLeaf)return QT.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=$T&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length)if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}return t?cE(n?t:t.sort(sE)):XT}static from(t){switch(t.length){case 0:return $T;case 1:return t[0];default:return new e(t.every(e=>e instanceof QT)?t:t.reduce((e,t)=>e.concat(t instanceof QT?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function tE(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==$T?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=oE(rE(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new QT(t.sort(sE),s)}function nE(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new YT(i.from+t,i.to+t,i.type))}return n}function rE(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function iE(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function aE(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function oE(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=iE(e,t,o+n);if(s){a=!0;let e=oE(s,t,n+o+1,r);e!=$T&&i.push(o,o+t.nodeSize,e)}});let o=nE(a?aE(e):e,-n).sort(sE);for(let e=0;e<o.length;e++)o[e].type.valid(t,o[e])||(r.onRemove&&r.onRemove(o[e].spec),o.splice(e--,1));return o.length||i.length?new QT(o,i):$T}function sE(e,t){return e.from-t.from||e.to-t.to}function cE(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from){a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),lE(t,i+1,a.copy(r.to,a.to)));continue}else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),lE(t,i,r.copy(a.from,r.to)));break}}}return t}function lE(e,t,n){for(;t<e.length&&sE(n,e[t])>0;)t++;e.splice(t,0,n)}function uE(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=$T&&t.push(r)}),e.cursorWrapper&&t.push(QT.create(e.state.doc,[e.cursorWrapper.deco])),eE.from(t)}var dE={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fE=BS&&VS<=11,pE=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},mE=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new pE,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);BS&&VS<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():KS&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),fE&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,dE)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(vw(this.view)){if(this.suppressingSelectionUpdates)return cw(this.view);if(BS&&VS<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&SS(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=vS(n))t.add(n);for(let r=e.anchorNode;r;r=vS(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:n.nodeType==3?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&vw(e)&&!this.ignoreSelectionChange(n),i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&t.nodeType==1;){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(HS&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||bE(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&AS(n)&&(c=ow(e))&&c.eq(V.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,cw(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),_E(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,xE(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||cw(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),r.nodeType==3&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(BS&&VS<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?_S(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?_S(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}else if(e.type==`attributes`)return{from:n.posAtStart-n.border,to:n.posAtEnd+n.border};else return this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}},hE=new WeakMap,gE=!1;function _E(e){if(!hE.has(e)&&(hE.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=HS,gE)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),gE=!0}}function vE(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return SS(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function yE(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return vE(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?vE(e,n):null}function bE(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function xE(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||e.nodeType!=1||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function SE(e,t,n){let{node:r,fromOffset:i,toOffset:a,from:o,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),l,u=c.anchorNode;if(u&&e.dom.contains(u.nodeType==1?u:u.parentNode)&&(l=[{node:u,offset:c.anchorOffset}],AS(c)||l.push({node:c.focusNode,offset:c.focusOffset})),WS&&e.input.lastKeyCode===8)for(let e=a;e>i;e--){let t=r.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){a=e;break}if(!n||n.size)break}let d=e.state.doc,f=e.someProp(`domParser`)||fc.fromSchema(e.state.schema),p=d.resolve(o),m=null,h=f.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:i,to:a,preserveWhitespace:p.parent.type.whitespace!=`pre`||`full`,findPositions:l,ruleFromNode:CE,context:p});if(l&&l[0].pos!=null){let e=l[0].pos,t=l[1]&&l[1].pos;t??=e,m={anchor:e+o,head:t+o}}return{doc:h,sel:m,from:o,to:s}}function CE(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName==`BR`&&e.parentNode){if(KS&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}else if(e.parentNode.lastChild==e||KS&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName==`IMG`&&e.getAttribute(`mark-placeholder`))return{ignore:!0};return null}var wE=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function TE(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=ow(e,t);if(n&&!e.state.selection.eq(n)){if(WS&&XS&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp(`handleKeyDown`,t=>t(e,jS(13,`Enter`))))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=SE(e,t,n),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=AE(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(qS&&e.input.lastIOSEnter>Date.now()-225||XS)&&i.some(e=>e.nodeType==1&&!wE.test(e.nodeName))&&(!m||m.endA>=m.endB)&&e.someProp(`handleKeyDown`,t=>t(e,jS(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof H&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=EE(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof H&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),BS&&VS<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((qS&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&h.pos<l.doc.content.size&&(!h.sameParent(g)||!h.parent.inlineContent)&&h.pos<g.pos&&!/\S/.test(l.doc.textBetween(h.pos,g.pos,``,``)))&&e.someProp(`handleKeyDown`,t=>t(e,jS(13,`Enter`)))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&OE(u,m.start,m.endA,h,g)&&e.someProp(`handleKeyDown`,t=>t(e,jS(8,`Backspace`)))){XS&&WS&&e.domObserver.suppressSelectionUpdates();return}WS&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),XS&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>{e.someProp(`handleKeyDown`,function(t){return t(e,jS(13,`Enter`))})},20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=EE(e,n.doc,l.sel);t&&!(WS&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||BS&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v)if(h.pos==g.pos){BS&&VS<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>cw(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=DE(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x());else e.dispatch(x())}function EE(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_w(e,t.resolve(n.anchor),t.resolve(n.head))}function DE(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(R.from(l).eq(e))return{mark:s,type:o}}function OE(e,t,n,r,i){if(n-t<=i.pos-r.pos||kE(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(kE(a,!0,!0));return!o.parent.isTextblock||o.pos>n||kE(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function kE(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function AE(e,t,n,r,i){let a=e.findDiffStart(t,n);if(a==null)return null;let{a:o,b:s}=e.findDiffEnd(t,n+e.size,n+t.size);if(i==`end`){let e=Math.max(0,a-Math.min(o,s));r-=o+e-a}if(o<a&&e.size<t.size){let e=r<=a&&r>=o?a-r:0;a-=e,a&&a<t.size&&jE(t.textBetween(a-1,a+1))&&(a+=e?1:-1),s=a+(s-o),o=a}else if(s<a){let t=r<=a&&r>=s?a-r:0;a-=t,a&&a<e.size&&jE(e.textBetween(a-1,a+1))&&(a+=t?1:-1),o=a+(o-s),s=a}return{start:a,endA:o,endB:s}}function jE(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}var ME=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new oT,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(zE),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=FE(this),PE(this),this.nodeViews=LE(this),this.docView=BC(this.state.doc,NE(this),uE(this),this.dom,this),this.domObserver=new mE(this,(e,t,n,r)=>TE(this,e,t,n,r)),this.domObserver.start(),sT(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&uT(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(zE),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(jT(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=LE(this);RE(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&uT(this),this.editable=FE(this),PE(this);let o=uE(this),s=NE(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&rC(this);if(i){this.domObserver.stop();let t=l&&(BS||WS)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&IE(n.selection,e.selection);if(l){let n=WS?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=MT(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=BC(e.doc,s,o,this.dom,this)),n&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&bw(this))?cw(this,t):(hw(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&aC(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))&&!this.someProp(`handleScrollToSelection`,e=>e(this)))if(this.state.selection instanceof U){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&nC(this,t.getBoundingClientRect(),e)}else nC(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new VT(e.slice,e.move,r<0?void 0:U.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(BS){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&cC(this.dom),cw(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return gC(this,e)}coordsAtPos(e,t=1){return bC(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return AC(this,t||this.state,e)}pasteHTML(e,t){return zT(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return zT(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return Bw(this,e)}destroy(){this.docView&&(lT(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],uE(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,xS())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return pT(this,e)}domSelectionRange(){let e=this.domSelection();return e?KS&&this.root.nodeType===11&&MS(this.dom.ownerDocument)==this.dom&&yE(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};ME.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function NE(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[YT.node(0,e.state.doc.content.size,t)]}function PE(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:YT.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function FE(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function IE(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function LE(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function RE(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function zE(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}var BE=Object.defineProperty,VE=(e,t)=>{for(var n in t)BE(e,n,{get:t[n],enumerable:!0})};function HE(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var UE=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:HE({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},WE={};VE(WE,{blur:()=>GE,clearContent:()=>KE,clearNodes:()=>qE,command:()=>JE,createParagraphNear:()=>YE,cut:()=>XE,deleteCurrentNode:()=>ZE,deleteNode:()=>$E,deleteRange:()=>eD,deleteSelection:()=>iD,enter:()=>aD,exitCode:()=>oD,extendMarkRange:()=>pD,first:()=>mD,focus:()=>xD,forEach:()=>SD,insertContent:()=>CD,insertContentAt:()=>kD,joinBackward:()=>MD,joinDown:()=>jD,joinForward:()=>ND,joinItemBackward:()=>PD,joinItemForward:()=>FD,joinTextblockBackward:()=>ID,joinTextblockForward:()=>LD,joinUp:()=>AD,keyboardShortcut:()=>BD,lift:()=>HD,liftEmptyBlock:()=>UD,liftListItem:()=>WD,newlineInCode:()=>GD,resetAttributes:()=>JD,scrollIntoView:()=>YD,selectAll:()=>XD,selectNodeBackward:()=>ZD,selectNodeForward:()=>QD,selectParentNode:()=>$D,selectTextblockEnd:()=>eO,selectTextblockStart:()=>tO,setContent:()=>rO,setMark:()=>XO,setMeta:()=>ZO,setNode:()=>QO,setNodeSelection:()=>$O,setTextDirection:()=>ek,setTextSelection:()=>tk,sinkListItem:()=>nk,splitBlock:()=>ik,splitListItem:()=>ak,toggleList:()=>lk,toggleMark:()=>uk,toggleNode:()=>dk,toggleWrap:()=>fk,undoInputRule:()=>pk,unsetAllMarks:()=>mk,unsetMark:()=>hk,unsetTextDirection:()=>gk,updateAttributes:()=>_k,wrapIn:()=>vk,wrapInList:()=>yk});var GE=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),KE=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),qE=()=>({state:e,tr:t,dispatch:n})=>{let{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,(e,n)=>{if(e.type.isText)return;let{doc:r,mapping:i}=t,a=r.resolve(i.map(n)),o=r.resolve(i.map(n+e.nodeSize)),s=a.blockRange(o);if(!s)return;let c=al(s);if(e.type.isTextblock){let{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(s.start,e)}(c||c===0)&&t.lift(s,c)})}),!0},JE=e=>t=>e(t),YE=()=>({state:e,dispatch:t})=>Pu(e,t),XE=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new H(r.doc.resolve(Math.max(o-1,0)))),!0},ZE=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function QE(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var $E=e=>({tr:t,state:n,dispatch:r})=>{let i=QE(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},eD=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},tD=e=>e.content?/^text(\*|\+)/.test(e.content):!1,nD=(e,t,n)=>{if(!e.parent.isInline||n===`left`&&e.pos>e.start()||n===`right`&&e.pos<e.end())return e.pos;let r=t.nodes[e.parent.type.name].spec;return tD(r)?n===`left`?e.start()-1:e.end()+1:e.pos},rD=(e,t,n)=>({from:nD(e,n,`left`),to:nD(t,n,`right`)}),iD=()=>({state:e,dispatch:t})=>{let{$from:n,$to:r}=e.selection;if(e.selection.empty)return!1;let{from:i,to:a}=rD(n,r,e.schema);return t&&(e.tr.deleteRange(i,a).scrollIntoView(),t(e.tr)),!0},aD=()=>({commands:e})=>e.keyboardShortcut(`Enter`),oD=()=>({state:e,dispatch:t})=>Nu(e,t);function sD(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function cD(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:sD(t[r])?t[r].test(e[r]):t[r]===e[r])}function lD(e,t,n={}){return e.find(e=>e.type===t&&cD(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function uD(e,t,n={}){return!!lD(e,t,n)}function dD(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if((!r.node||!r.node.marks.some(e=>e.type===t))&&(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!lD([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&uD([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&uD([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function fD(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var pD=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=fD(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=dD(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=H.create(o,e.from,e.to);n.setSelection(t)}}return!0},mD=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function hD(e){return e instanceof H}function gD(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function _D(e,t=null){if(!t)return null;let n=V.atStart(e),r=V.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?H.create(e,gD(0,i,a),gD(e.content.size,i,a)):H.create(e,gD(t,i,a),gD(t,i,a))}function vD(){return navigator.platform===`Android`||/android/i.test(navigator.userAgent)}function yD(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function bD(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var xD=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(yD()||vD())&&r.dom.focus(),bD()&&!yD()&&!vD()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!hD(n.state.selection))return o(),!0;let s=_D(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},SD=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),CD=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),wD=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&wD(r)}return e};function TD(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return wD(n)}function ED(e,t,n){if(e instanceof Ls||e instanceof R)return e;n={slice:!0,parseOptions:{},...n};let r=typeof e==`object`&&!!e,i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return R.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),ED(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new cc({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?fc.fromSchema(a).parseSlice(TD(e),n.parseOptions):fc.fromSchema(a).parse(TD(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=fc.fromSchema(t);return n.slice?r.parseSlice(TD(e),n.parseOptions).content:r.parse(TD(e),n.parseOptions)}return ED(``,t,n)}function DD(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Qc||i instanceof $c))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(V.near(e.doc.resolve(o),n))}var OD=e=>!(`type`in e),kD=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{ED(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=ED(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if((OD(i)?i:[i]).forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let f;if(u){if(Array.isArray(t))f=t.map(e=>e.text||``).join(``);else if(t instanceof R){let e=``;t.forEach(t=>{t.text&&(e+=t.text)}),f=e}else f=typeof t==`object`&&t&&t.text?t.text:t;r.insertText(f,c,l)}else{f=i;let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,a=t.isText||t.isTextblock,o=t.content.size>0;n&&a&&o&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&DD(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:f}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:f})}return!0},AD=()=>({state:e,dispatch:t})=>Ou(e,t),jD=()=>({state:e,dispatch:t})=>ku(e,t),MD=()=>({state:e,dispatch:t})=>_u(e,t),ND=()=>({state:e,dispatch:t})=>Tu(e,t),PD=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Sl(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},FD=()=>({state:e,dispatch:t,tr:n})=>{try{let r=Sl(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},ID=()=>({state:e,dispatch:t})=>vu(e,t),LD=()=>({state:e,dispatch:t})=>yu(e,t);function RD(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function zD(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))yD()||RD()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var BD=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=zD(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function VD(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?QE(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>!o||o.name===e.node.type.name).filter(e=>cD(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var HD=(e,t={})=>({state:n,dispatch:r})=>VD(n,QE(e,n.schema),t)?Au(n,r):!1,UD=()=>({state:e,dispatch:t})=>Fu(e,t),WD=e=>({state:t,dispatch:n})=>Df(QE(e,t.schema))(t,n),GD=()=>({state:e,dispatch:t})=>ju(e,t);function KD(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function qD(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var JD=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=KD(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=QE(e,r.schema)),s===`mark`&&(o=fD(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,qD(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(qD(a.attrs,t))))})})}),c},YD=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),XD=()=>({tr:e,dispatch:t})=>{if(t){let t=new Zl(e.doc);e.setSelection(t)}return!0},ZD=()=>({state:e,dispatch:t})=>Su(e,t),QD=()=>({state:e,dispatch:t})=>Eu(e,t),$D=()=>({state:e,dispatch:t})=>Ru(e,t),eO=()=>({state:e,dispatch:t})=>Wu(e,t),tO=()=>({state:e,dispatch:t})=>Uu(e,t);function nO(e,t,n={},r={}){return ED(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var rO=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=nO(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});return o&&a.replaceWith(0,c.content.size,s).setMeta(`preventUpdate`,!n),!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function iO(e,t){let n=fD(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function aO(e,t){let n=new Wl(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function oO(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function sO(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function cO(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function lO(e){return t=>cO(t.$from,e)}function uO(e,t,n){return e.config[t]===void 0&&e.parent?uO(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?uO(e.parent,t,n):null}):e.config[t]}function dO(e){return e.map(e=>{let t=uO(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...dO(t())]:e}).flat(10)}function fO(e,t){let n=Tc.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function pO(e){return typeof e==`function`}function mO(e,t=void 0,...n){return pO(e)?t?e.bind(t)(...n):e(...n):e}function hO(e={}){return Object.keys(e).length===0&&e.constructor===Object}function gO(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function _O(e){let t=[],{nodeExtensions:n,markExtensions:r}=gO(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=uO(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=uO(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function vO(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i){r=!r,n+=o;continue}if(o===`"`&&!r){i=!i,n+=o;continue}if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}return n&&t.push(n),t}function yO(e){let t=[],n=vO(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function bO(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(!n[e]){n[e]=t;return}if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...yO(n[e]),...yO(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function xO(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>bO(e,t),{})}function SO(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function CO(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):SO(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function wO(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&hO(t)?!1:t!=null))}function TO(e){let t={};return!e?.attribute?.isRequired&&`default`in(e?.attribute||{})&&(t.default=e.attribute.default),e?.attribute?.validate!==void 0&&(t.validate=e.attribute.validate),[e.name,t]}function EO(e,t){let n=_O(e),{nodeExtensions:r,markExtensions:i}=gO(e);return new cc({topNode:r.find(e=>uO(e,`topNode`))?.name,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=wO({...e.reduce((e,t)=>{let n=uO(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:mO(uO(r,`content`,a)),marks:mO(uO(r,`marks`,a)),group:mO(uO(r,`group`,a)),inline:mO(uO(r,`inline`,a)),atom:mO(uO(r,`atom`,a)),selectable:mO(uO(r,`selectable`,a)),draggable:mO(uO(r,`draggable`,a)),code:mO(uO(r,`code`,a)),whitespace:mO(uO(r,`whitespace`,a)),linebreakReplacement:mO(uO(r,`linebreakReplacement`,a)),defining:mO(uO(r,`defining`,a)),isolating:mO(uO(r,`isolating`,a)),attrs:Object.fromEntries(i.map(TO))}),s=mO(uO(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>CO(e,i)));let c=uO(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:xO(e,i)}));let l=uO(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=wO({...e.reduce((e,t)=>{let n=uO(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:mO(uO(r,`inclusive`,a)),excludes:mO(uO(r,`excludes`,a)),group:mO(uO(r,`group`,a)),spanning:mO(uO(r,`spanning`,a)),code:mO(uO(r,`code`,a)),attrs:Object.fromEntries(i.map(TO))}),s=mO(uO(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>CO(e,i)));let c=uO(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:xO(e,i)})),[r.name,o]}))})}function DO(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function OO(e){return e.sort((e,t)=>{let n=uO(e,`priority`)||100,r=uO(t,`priority`)||100;return n>r?-1:+(n<r)})}function kO(e){let t=OO(dO(e)),n=DO(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function AO(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
|
|
150
150
|
|
|
151
|
-
`,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;e.isText&&(s+=(e?.text)?.slice(Math.max(r,n)-n,i-n))}),s}function jO(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function MO(e,t){let n=QE(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function NO(e,t){let n=KD(typeof t==`string`?t:t.name,e.schema);return n===`node`?MO(e,t):n===`mark`?iO(e,t):{}}function PO(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function FO(e){let t=PO(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function IO(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),FO(r)}function LO(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=dD(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{!e||e?.nodeSize===void 0||r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var RO=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]};function zO(e,t){return t.nodes[e]||t.marks[e]||null}function BO(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var VO=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function HO(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?fD(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>cD(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>cD(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}var UO=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=lO(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},WO=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function GO(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function KO(e,t){let{nodeExtensions:n}=gO(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=mO(uO(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function qO(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(qO(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function JO(e){return e instanceof U}function YO(e,t,n){let{selection:r}=t,i=null;if(hD(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var XO=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=fD(e,r.schema);if(i)if(o){let e=iO(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})});return YO(r,n,c)},ZO=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),QO=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=QE(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Ku(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Ku(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},$O=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=gD(e,0,n.content.size),i=U.create(n,r);t.setSelection(i)}return!0},ek=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},tk=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=H.atStart(n).from,o=H.atEnd(n).to,s=gD(r,a,o),c=gD(i,a,o),l=H.create(n,s,c);t.setSelection(l)}return!0},nk=e=>({state:t,dispatch:n})=>Af(QE(e,t.schema))(t,n);function rk(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var ik=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=BO(l,s.node().type.name,s.node().attrs);if(a instanceof U&&a.node.isBlock)return!s.parentOffset||!_l(o,s.pos)?!1:(r&&(e&&rk(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:oO(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=_l(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&_l(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof H&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&rk(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},ak=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=QE(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=R.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=R.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...BO(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(R.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new z(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(H.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...BO(d,u.type.name,u.attrs),...t},m={...BO(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!_l(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0},ok=(e,t)=>{let n=lO(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&yl(e.doc,n.pos)&&e.join(n.pos),!0},sk=(e,t)=>{let n=lO(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&yl(e.doc,r)&&e.join(r),!0};function ck(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return H.between(r,i)}var lk=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=QE(e,o.schema),m=QE(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=lO(e=>KO(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&KO(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=ck(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(KO(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>ok(a,p)).command(()=>sk(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>ok(a,p)).command(()=>sk(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>ok(a,p)).command(()=>sk(a,p)).run()},uk=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=fD(e,r.schema);return HO(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},dk=(e,t,n={})=>({state:r,commands:i})=>{let a=QE(e,r.schema),o=QE(t,r.schema),s=VD(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},fk=(e,t={})=>({state:n,commands:r})=>{let i=QE(e,n.schema);return VD(n,i,t)?r.lift(i):r.wrapIn(i,t)},pk=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},mk=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},hk=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=fD(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=dD(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},gk=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},_k=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=KD(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=QE(e,r.schema)),s===`mark`&&(o=fD(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},vk=(e,t={})=>({state:n,dispatch:r})=>Gu(QE(e,n.schema),t)(n,r),yk=(e,t={})=>({state:n,dispatch:r})=>wf(QE(e,n.schema),t)(n,r),bk=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},xk=(e,t)=>{if(sD(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function Sk(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=VO(c)+i;return a.forEach(e=>{if(l)return;let a=xk(u,e.find);if(!a)return;let c=s.state.tr,d=HE({state:s.state,transaction:c}),f={from:n-(a[0].length-i.length),to:r},{commands:p,chain:m,can:h}=new UE({editor:t,state:d});e.handler({state:d,range:f,match:a,commands:p,chain:m,can:h})===null||!c.steps.length||(e.undoable&&c.setMeta(o,{transform:c,from:n,to:r,text:i}),s.dispatch(c),l=!0)}),l}function Ck(e){let{editor:t,rules:n}=e,r=new du({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:fO(R.from(e),a.schema);let{from:i}=s,o=i+e.length;Sk({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return Sk({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&Sk({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?Sk({editor:t,from:a.pos,to:a.pos,text:`
|
|
151
|
+
`,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;e.isText&&(s+=(e?.text)?.slice(Math.max(r,n)-n,i-n))}),s}function jO(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function MO(e,t){let n=QE(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function NO(e,t){let n=KD(typeof t==`string`?t:t.name,e.schema);return n===`node`?MO(e,t):n===`mark`?iO(e,t):{}}function PO(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function FO(e){let t=PO(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function IO(e){let{mapping:t,steps:n}=e,r=[];return t.maps.forEach((e,i)=>{let a=[];if(e.ranges.length)e.forEach((e,t)=>{a.push({from:e,to:t})});else{let{from:e,to:t}=n[i];if(e===void 0||t===void 0)return;a.push({from:e,to:t})}a.forEach(({from:e,to:n})=>{let a=t.slice(i).map(e,-1),o=t.slice(i).map(n),s=t.invert().map(a,-1),c=t.invert().map(o);r.push({oldRange:{from:s,to:c},newRange:{from:a,to:o}})})}),FO(r)}function LO(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=dD(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{!e||e?.nodeSize===void 0||r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var RO=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]};function zO(e,t){return t.nodes[e]||t.marks[e]||null}function BO(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var VO=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function HO(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?fD(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>cD(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>cD(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}var UO=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=lO(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},WO=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function GO(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function KO(e,t){let{nodeExtensions:n}=gO(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=mO(uO(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function qO(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&(qO(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function JO(e){return e instanceof U}function YO(e,t,n){let{selection:r}=t,i=null;if(hD(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var XO=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=fD(e,r.schema);if(i)if(o){let e=iO(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})});return YO(r,n,c)},ZO=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),QO=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=QE(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>Ku(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>Ku(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},$O=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=gD(e,0,n.content.size),i=U.create(n,r);t.setSelection(i)}return!0},ek=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},tk=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=H.atStart(n).from,o=H.atEnd(n).to,s=gD(r,a,o),c=gD(i,a,o),l=H.create(n,s,c);t.setSelection(l)}return!0},nk=e=>({state:t,dispatch:n})=>Af(QE(e,t.schema))(t,n);function rk(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var ik=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=BO(l,s.node().type.name,s.node().attrs);if(a instanceof U&&a.node.isBlock)return!s.parentOffset||!_l(o,s.pos)?!1:(r&&(e&&rk(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:oO(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=_l(t.doc,t.mapping.map(s.pos),1,p);if(!p&&!m&&_l(t.doc,t.mapping.map(s.pos),1,f?[{type:f}]:void 0)&&(m=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(m&&(a instanceof H&&t.deleteSelection(),t.split(t.mapping.map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f)){let e=t.mapping.map(s.before()),n=t.doc.resolve(e);s.node(-1).canReplaceWith(n.index(),n.index()+1,f)&&t.setNodeMarkup(t.mapping.map(s.before()),f)}e&&rk(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return m},ak=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=QE(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=R.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=R.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...BO(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(R.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new z(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(H.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...BO(d,u.type.name,u.attrs),...t},m={...BO(d,s.node().type.name,s.node().attrs),...t};n.delete(s.pos,c.pos);let h=f?[{type:o,attrs:p},{type:f,attrs:m}]:[{type:o,attrs:p}];if(!_l(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,h).scrollIntoView(),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0},ok=(e,t)=>{let n=lO(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&yl(e.doc,n.pos)&&e.join(n.pos),!0},sk=(e,t)=>{let n=lO(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return n.node.type===i?.type&&yl(e.doc,r)&&e.join(r),!0};function ck(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return H.between(r,i)}var lk=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=QE(e,o.schema),m=QE(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=lO(e=>KO(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&KO(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,ee=!!x&&y.depth>=1&&y.depth-x.depth<=1,D=!!T;if((ee||D)&&E){if(E.node.type===p)return S&&D?c().command(({tr:e,dispatch:t})=>{let n=ck(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(KO(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>ok(a,p)).command(()=>sk(a,p)).run()}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>ok(a,p)).command(()=>sk(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>ok(a,p)).command(()=>sk(a,p)).run()},uk=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=fD(e,r.schema);return HO(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},dk=(e,t,n={})=>({state:r,commands:i})=>{let a=QE(e,r.schema),o=QE(t,r.schema),s=VD(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},fk=(e,t={})=>({state:n,commands:r})=>{let i=QE(e,n.schema);return VD(n,i,t)?r.lift(i):r.wrapIn(i,t)},pk=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},mk=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(t=>{e.removeMark(t.$from.pos,t.$to.pos)}),!0},hk=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=fD(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=dD(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},gk=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},_k=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=KD(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=QE(e,r.schema)),s===`mark`&&(o=fD(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},vk=(e,t={})=>({state:n,dispatch:r})=>Gu(QE(e,n.schema),t)(n,r),yk=(e,t={})=>({state:n,dispatch:r})=>wf(QE(e,n.schema),t)(n,r),bk=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},xk=(e,t)=>{if(sD(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function Sk(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o}=e,{view:s}=t;if(s.composing)return!1;let c=s.state.doc.resolve(n);if(c.parent.type.spec.code||(c.nodeBefore||c.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let l=!1,u=VO(c)+i;return a.forEach(e=>{if(l)return;let a=xk(u,e.find);if(!a)return;let c=s.state.tr,d=HE({state:s.state,transaction:c}),f={from:n-(a[0].length-i.length),to:r},{commands:p,chain:m,can:h}=new UE({editor:t,state:d});e.handler({state:d,range:f,match:a,commands:p,chain:m,can:h})===null||!c.steps.length||(e.undoable&&c.setMeta(o,{transform:c,from:n,to:r,text:i}),s.dispatch(c),l=!0)}),l}function Ck(e){let{editor:t,rules:n}=e,r=new du({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:fO(R.from(e),a.schema);let{from:i}=s,o=i+e.length;Sk({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return Sk({editor:t,from:i,to:a,text:o,rules:n,plugin:r})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&Sk({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?Sk({editor:t,from:a.pos,to:a.pos,text:`
|
|
152
152
|
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function wk(e){return Object.prototype.toString.call(e).slice(8,-1)}function Tk(e){return wk(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Ek(e,t){let n={...e};return Tk(e)&&Tk(t)&&Object.keys(t).forEach(r=>{Tk(t[r])&&Tk(e[r])?n[r]=Ek(e[r],t[r]):n[r]=t[r]}),n}var Dk=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...mO(uO(this,`addOptions`,{name:this.name}))}}get storage(){return{...mO(uO(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>Ek(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},Ok=class e extends Dk{constructor(){super(...arguments),this.type=`mark`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function kk(e){return typeof e==`number`}var Ak=class{constructor(e){this.find=e.find,this.handler=e.handler}},jk=(e,t,n)=>{if(sD(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function Mk(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new UE({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{if(e.type?.spec?.code||!(e.isText||e.isTextblock||e.isInline))return;let f=e.content?.size??e.nodeSize??0,p=Math.max(r,t),m=Math.min(i,t+f);p>=m||jk(e.isText?e.text||``:e.textBetween(p-t,m-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=p+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var Nk=null,Pk=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function Fk(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr,l=HE({state:e,transaction:c});if(!(!Mk({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})||!c.steps.length)){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return n.map(e=>new du({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(Nk=t)},i=()=>{Nk&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=Nk;e?.isEditable&&setTimeout(()=>{let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:fO(R.from(t),r.schema);let{from:n}=d,i=n+t.length,a=Pk(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(!(!kk(p)||!m||p===m.b))return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var Ik=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=kO(e),this.schema=EO(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=uO(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:zO(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this;return OO([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:zO(t.name,this.schema)},r=[],i=uO(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&uO(t,`exitable`,n)&&(a.ArrowRight=()=>Ok.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=f_(a);r.push(o);let s=uO(t,`addInputRules`,n);if(GO(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=Ck({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=uO(t,`addPasteRules`,n);if(GO(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=Fk({editor:e,rules:t});r.push(...n)}}let l=uO(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r})}get attributes(){return _O(this.extensions)}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=gO(this.extensions);return Object.fromEntries(t.filter(e=>!!uO(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=uO(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:QE(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=xO(r,n);return i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:l})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return OO([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:zO(n.name,this.schema)},i=uO(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return OO([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:zO(n.name,this.schema)},i=uO(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=gO(this.extensions);return Object.fromEntries(t.filter(e=>!!uO(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=uO(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:fD(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=xO(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{lA(i,e,t)}})}]:[]}))}destroy(){this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zO(e.name,this.schema)};e.type===`mark`&&(mO(uO(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name);let n=uO(e,`onBeforeCreate`,t),r=uO(e,`onCreate`,t),i=uO(e,`onUpdate`,t),a=uO(e,`onSelectionUpdate`,t),o=uO(e,`onTransaction`,t),s=uO(e,`onFocus`,t),c=uO(e,`onBlur`,t),l=uO(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};Ik.resolve=kO,Ik.sort=OO,Ik.flatten=dO,VE({},{ClipboardTextSerializer:()=>Rk,Commands:()=>zk,Delete:()=>Bk,Drop:()=>Vk,Editable:()=>Hk,FocusEvents:()=>Wk,Keymap:()=>Gk,Paste:()=>Kk,Tabindex:()=>qk,TextDirection:()=>Jk,focusEventsPluginKey:()=>Uk});var Lk=class e extends Dk{constructor(){super(...arguments),this.type=`extension`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},Rk=Lk.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new du({key:new mu(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:a}=i,o=Math.min(...a.map(e=>e.$from.pos)),s=Math.max(...a.map(e=>e.$to.pos)),c=jO(n);return AO(r,{from:o,to:s},{...this.options.blockSeparator===void 0?{}:{blockSeparator:this.options.blockSeparator},textSerializers:c})}}})]}}),zk=Lk.create({name:`commands`,addCommands(){return{...WE}}}),Bk=Lk.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){let n=()=>{var n;if(((n=this.editor.options.coreExtensionOptions?.delete)?.filterTransaction)?.call(n,e)??e.getMeta(`y-sync$`))return;let r=aO(e.before,[e,...t]);IO(r).forEach(t=>{r.mapping.mapResult(t.oldRange.from).deletedAfter&&r.mapping.mapResult(t.oldRange.to).deletedBefore&&r.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,i)=>{let a=i+n.nodeSize-2,o=t.oldRange.from<=i&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:i,to:a,newFrom:r.mapping.map(i),newTo:r.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:r})})});let i=r.mapping;r.steps.forEach((t,n)=>{if(t instanceof Yc){let a=i.slice(n).map(t.from,-1),o=i.slice(n).map(t.to),s=i.invert().map(a,-1),c=i.invert().map(o),l=a>0&&r.doc.nodeAt(a-1)?.marks.some(e=>e.eq(t.mark)),u=r.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:a,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:r})}})};this.editor.options.coreExtensionOptions?.delete?.async??!0?setTimeout(n,0):n()}}),Vk=Lk.create({name:`drop`,addProseMirrorPlugins(){return[new du({key:new mu(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),Hk=Lk.create({name:`editable`,addProseMirrorPlugins(){return[new du({key:new mu(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),Uk=new mu(`focusEvents`),Wk=Lk.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new du({key:Uk,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),Gk=Lk.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:V.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return yD()||RD()?i:r},addProseMirrorPlugins(){return[new du({key:new mu(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=V.atStart(t.doc).from,l=V.atEnd(t.doc).to;if(a||!(o===c&&s===l)||!qO(n.doc))return;let u=n.tr,d=HE({state:n,transaction:u}),{commands:f}=new UE({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),Kk=Lk.create({name:`paste`,addProseMirrorPlugins(){return[new du({key:new mu(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),qk=Lk.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new du({key:new mu(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),Jk=Lk.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=gO(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new du({key:new mu(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}});function Yk(e){return new bk({find:e.find,handler:({state:t,range:n,match:r})=>{let i=mO(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(LO(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function Xk(e){return new bk({find:e.find,handler:({state:t,range:n,match:r})=>{let i=mO(e.getAttributes,void 0,r)||{},{tr:a}=t,o=n.from,s=n.to,c=e.type.create(i);if(r[1]){let e=o+r[0].lastIndexOf(r[1]);e>s?e=s:s=e+r[1].length;let t=r[0][r[0].length-1];a.insertText(t,o+r[0].length-1),a.replaceWith(e,s,c)}else if(r[0]){let t=e.type.isInline?o:o-1;a.insert(t,e.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function Zk(e){return new bk({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=mO(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function Qk(e){return new bk({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=mO(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&sl(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&yl(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}function $k(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof U){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;--i}return!1}VE({},{createAtomBlockMarkdownSpec:()=>nA,createBlockMarkdownSpec:()=>rA,createInlineMarkdownSpec:()=>oA,parseAttributes:()=>eA,parseIndentedBlocks:()=>sA,renderNestedMarkdownContent:()=>cA,serializeAttributes:()=>tA});function eA(e){if(!e?.trim())return{};let t={},n=[],r=e.replace(/["']([^"']*)["']/g,e=>(n.push(e),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);i&&(t.class=i.map(e=>e.trim().slice(1)).join(` `));let a=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);a&&(t.id=a[1]),Array.from(r.matchAll(/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g)).forEach(([,e,r])=>{let i=parseInt(r.match(/__QUOTED_(\d+)__/)?.[1]||`0`,10),a=n[i];a&&(t[e]=a.slice(1,-1))});let o=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,``).replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,``).replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,``).trim();return o&&o.split(/\s+/).filter(Boolean).forEach(e=>{e.match(/^[a-zA-Z][\w-]*$/)&&(t[e]=!0)}),t}function tA(e){if(!e||Object.keys(e).length===0)return``;let t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(e=>t.push(`.${e}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([e,n])=>{e===`class`||e===`id`||(n===!0?t.push(e):n!==!1&&n!=null&&t.push(`${e}="${String(n)}"`))}),t.join(` `)}function nA(e){let{nodeName:t,name:n,parseAttributes:r=eA,serializeAttributes:i=tA,defaultAttributes:a={},requiredAttributes:o=[],allowedAttributes:s}=e,c=n||t,l=e=>{if(!s)return e;let t={};return s.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let r={...a,...e.attributes};return n.createNode(t,r,[])},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${c}(?:\\s|$)`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,i){let a=RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),s=e.match(a);if(!s)return;let l=s[1]||``,u=r(l);if(!o.find(e=>!(e in u)))return{type:t,raw:s[0],attributes:u}}},renderMarkdown:e=>{let t=l(e.attrs||{}),n=i(t),r=n?` {${n}}`:``;return`:::${c}${r} :::`}}}function rA(e){let{nodeName:t,name:n,getContent:r,parseAttributes:i=eA,serializeAttributes:a=tA,defaultAttributes:o={},content:s=`block`,allowedAttributes:c}=e,l=n||t,u=e=>{if(!c)return e;let t={};return c.forEach(n=>{n in e&&(t[n]=e[n])}),t};return{parseMarkdown:(e,n)=>{let i;if(r){let t=r(e);i=typeof t==`string`?[{type:`text`,text:t}]:t}else i=s===`block`?n.parseChildren(e.tokens||[]):n.parseInline(e.tokens||[]);let a={...o,...e.attributes};return n.createNode(t,a,i)},markdownTokenizer:{name:t,level:`block`,start(e){let t=RegExp(`^:::${l}`,`m`),n=e.match(t)?.index;return n===void 0?-1:n},tokenize(e,n,r){let a=RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),o=e.match(a);if(!o)return;let[c,u=``]=o,d=i(u),f=1,p=c.length,m=``,h=/^:::([\w-]*)(\s.*)?/gm,g=e.slice(p);for(h.lastIndex=0;;){let n=h.exec(g);if(n===null)break;let i=n.index,a=n[1];if(!n[2]?.endsWith(`:::`)){if(a)f+=1;else if(--f,f===0){let a=g.slice(0,i);m=a.trim();let o=e.slice(0,p+i+n[0].length),c=[];if(m)if(s===`block`)for(c=r.blockTokens(a),c.forEach(e=>{e.text&&(!e.tokens||e.tokens.length===0)&&(e.tokens=r.inlineTokens(e.text))});c.length>0;){let e=c[c.length-1];if(e.type===`paragraph`&&(!e.text||e.text.trim()===``))c.pop();else break}else c=r.inlineTokens(m);return{type:t,raw:o,attributes:d,content:m,tokens:c}}}}}},renderMarkdown:(e,t)=>{let n=u(e.attrs||{}),r=a(n),i=r?` {${r}}`:``,o=t.renderChildren(e.content||[],`
|
|
153
153
|
|
|
154
154
|
`);return`:::${l}${i}
|
|
@@ -211,7 +211,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
211
211
|
`,(l?i.slice(1):i).forEach(e=>{u+=`| ${Array(a).fill(0).map((t,n)=>s(e[n]&&e[n].text||``,o[n])).join(` | `)} |
|
|
212
212
|
`}),u}var kL=OL,AL=Rb.create({name:`table`,addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:bL,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:`tableRow+`,tableRole:`table`,isolating:!0,group:`block`,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=xL(e,this.options.cellMinWidth),a=t.style;function o(){return a||(r?`width: ${r}`:`min-width: ${i}`)}let s=[`table`,Hv(this.options.HTMLAttributes,t,{style:o()}),n,[`tbody`,0]];return this.options.renderWrapper?[`div`,{class:`tableWrapper`},s]:s},parseMarkdown:(e,t)=>{let n=[];if(e.header){let r=[];e.header.forEach(e=>{r.push(t.createNode(`tableHeader`,{},[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},r))}return e.rows&&e.rows.forEach(e=>{let r=[];e.forEach(e=>{r.push(t.createNode(`tableCell`,{},[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},r))}),t.createNode(`table`,void 0,n)},renderMarkdown:(e,t)=>kL(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:a})=>{let o=wL(a.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(H.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>lI(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>uI(e,t),deleteColumn:()=>({state:e,dispatch:t})=>fI(e,t),addRowBefore:()=>({state:e,dispatch:t})=>hI(e,t),addRowAfter:()=>({state:e,dispatch:t})=>gI(e,t),deleteRow:()=>({state:e,dispatch:t})=>vI(e,t),deleteTable:()=>({state:e,dispatch:t})=>jI(e,t),mergeCells:()=>({state:e,dispatch:t})=>xI(e,t),splitCell:()=>({state:e,dispatch:t})=>SI(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>DI(`column`)(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>DI(`row`)(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>OI(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>xI(e,t)?!0:SI(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>wI(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>AI(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>AI(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&aI(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=ZF.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:EL,"Mod-Backspace":EL,Delete:EL,"Mod-Delete":EL}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[eL({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],mL({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){return{tableRole:Rv(Pv(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}});cb.create({name:`tableKit`,addExtensions(){let e=[];return this.options.table!==!1&&e.push(AL.configure(this.options.table)),this.options.tableCell!==!1&&e.push(hL.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(gL.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(_L.configure(this.options.tableRow)),e}});var jL=(e,t)=>{let n=t?.border!=null&&t.border!==``?t.border:`1`;e.setAttribute(`border`,n),e.style.setProperty(`color`,`var(--pie-text, black)`),e.style.setProperty(`background-color`,`var(--pie-background, rgba(255, 255, 255))`)},ML=class extends bL{constructor(e,t,n){super(e,t,n),jL(this.table,e.attrs)}update(e){let t=super.update(e);return t&&jL(this.table,e.attrs),t}},NL=AL.extend({addOptions(){return{...this.parent?.(),resizable:!0,handleWidth:0,View:ML}},addAttributes(){return{border:{default:`1`}}},renderHTML(e){let t=this.parent(e),{border:n}=e.HTMLAttributes,r=`${t[1].style}${t[1].style.match(/.*; */)?``:`;`}`;return t[1].style=`${r}
|
|
213
213
|
color: var(--pie-text, black);
|
|
214
|
-
background-color: var(--pie-background, rgba(255, 255, 255))`,t[1].border=n||`1`,t}}),PL=`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`,FL=hL.extend({content:PL}),IL=gL.extend({content:PL}),LL=Rb.create({name:`div`,group:`block`,content:`inline*`,parseHTML(){return[{tag:`div`}]},renderHTML({HTMLAttributes:e}){return[`div`,e,0]},addKeyboardShortcuts(){let e=e=>{for(let t=e.depth;t>=0;--t)if(e.node(t).type.name===`listItem`)return!0;return!1};return{Enter:()=>{let{state:t}=this.editor,{$from:n}=t.selection;return n.parent.type.name!==`div`||e(n)?!1:this.editor.chain().focus().setNode(`paragraph`).splitBlock().run()},Backspace:()=>{let{state:e}=this.editor,{$from:t,empty:n}=e.selection;if(t.parent.type.name!==`div`||!n)return!1;let r=t.parent.textContent;if(r.length===0)return e.doc.childCount===1;if(r.length===1&&t.parentOffset===1){let{tr:n}=e;return n.delete(t.pos-1,t.pos),this.editor.view.dispatch(n),!0}return!1}}}}),RL=cb.create({name:`ensureEmptyRootIsDiv`,addProseMirrorPlugins(){return[new du({key:new mu(this.name),appendTransaction(e,t,n){if(!e.some(e=>e.docChanged))return null;let{doc:r}=n;if(r.childCount!==1)return null;let i=r.firstChild;if(i.type.name!==`paragraph`||i.content.size>0)return null;let a=n.schema.nodes.div;if(!a)return null;let o=i.nodeSize;return n.tr.replaceWith(0,o,a.create())}})]}}),zL=cb.create({name:`ensureListItemContentIsDiv`,addProseMirrorPlugins(){return[new du({key:new mu(this.name),appendTransaction(e,t,n){if(!e.some(e=>e.docChanged))return null;let{doc:r,schema:i}=n,a=i.nodes.div;if(!a)return null;let o=[];if(r.descendants((e,t)=>{if(e.type.name!==`listItem`)return;let n=1;e.forEach(e=>{e.type.name===`paragraph`&&o.push({pos:t+n,attrs:e.attrs}),n+=e.nodeSize})}),o.length===0)return null;let s=n.tr;return o.sort((e,t)=>t.pos-e.pos).forEach(({pos:e,attrs:t})=>s.setNodeMarkup(e,a,t)),s}})]}});function BL(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function VL(e){return Qr(`MuiSvgIcon`,e)}$r(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var HL=e=>{let{color:t,fontSize:n,classes:r}=e;return A({root:[`root`,t!==`inherit`&&`color${L(t)}`,`fontSize${L(n)}`]},VL,r)},UL=I(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${L(n.color)}`],t[`fontSize${L(n.fontSize)}`]]}})(zo(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),WL=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=N.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=HL(m);return(0,P.jsxs)(UL,{as:o,className:k(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,P.jsx)(`title`,{children:u}):null]})});WL.muiName=`SvgIcon`;function GL(e,t){function n(t,n){return(0,P.jsx)(WL,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=WL.muiName,N.memo(N.forwardRef(n))}function KL(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var qL=KL,JL=ba;function YL(e){return e&&e.ownerDocument||document}var XL=YL;function ZL(e){return YL(e).defaultView||window}var QL=ZL;function $L(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var eR=pi,tR=qi;function nR(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=N.useRef(t!==void 0),[o,s]=N.useState(n);return[a?t:o,N.useCallback(e=>{a||s(e)},[])]}var rR=nR;function iR(e){let t=N.useRef(e);return pi(()=>{t.current=e}),N.useRef((...e)=>(0,t.current)(...e)).current}var aR=iR;function oR(...e){let t=N.useRef(void 0),n=N.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return N.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var sR=oR;function cR(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function lR(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{cR(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=k(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=k(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function uR(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var dR={};function fR(e,t){let n=N.useRef(dR);return n.current===dR&&(n.current=e(t)),n}var pR=class e{static create(){return new e}static use(){let t=fR(e.create).current,[n,r]=N.useState(!1);return t.shouldMount=n,t.setShouldMount=r,N.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=hR(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function mR(){return pR.use()}function hR(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function gR(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _R(e,t){return _R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_R(e,t)}function vR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_R(e,t)}function yR(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function bR(e,t){e.classList?e.classList.add(t):yR(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function xR(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function SR(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=xR(e.className,t):e.setAttribute(`class`,xR(e.className&&e.className.baseVal||``,t))}var CR={disabled:!1},wR=N.createContext(null),TR=function(e){return e.scrollTop},ER=`unmounted`,DR=`exited`,OR=`entering`,kR=`entered`,AR=`exiting`,jR=function(e){vR(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=DR,r.appearStatus=OR):o=kR:o=t.unmountOnExit||t.mountOnEnter?ER:DR,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:DR}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=OR):(n===`entering`||n===`entered`)&&(t=AR)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this);n&&TR(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:ER})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[zx.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||CR.disabled){this.safeSetState({status:kR},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:OR},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:kR},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:zx.findDOMNode(this);if(!t||CR.disabled){this.safeSetState({status:DR},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:AR},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:DR},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=gR(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return N.createElement(wR.Provider,{value:null},typeof n==`function`?n(e,r):N.cloneElement(N.Children.only(n),r))},t}(N.Component);jR.contextType=wR,jR.propTypes={};function MR(){}jR.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:MR,onEntering:MR,onEntered:MR,onExit:MR,onExiting:MR,onExited:MR},jR.UNMOUNTED=ER,jR.EXITED=DR,jR.ENTERING=OR,jR.ENTERED=kR,jR.EXITING=AR;var NR=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return bR(e,t)})},PR=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return SR(e,t)})},FR=function(e){vR(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&TR(e),r&&(this.appliedClasses[t][n]=r,NR(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&PR(e,r),i&&PR(e,i),a&&PR(e,a)},n.render=function(){var e=this.props;e.classNames;var t=gR(e,[`classNames`]);return N.createElement(jR,_t({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(N.Component);FR.defaultProps={classNames:``},FR.propTypes={};function IR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function LR(e,t){var n=function(e){return t&&(0,N.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&N.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function RR(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function zR(e,t,n){return n[t]==null?e.props[t]:n[t]}function BR(e,t){return LR(e.children,function(n){return(0,N.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:zR(n,`appear`,e),enter:zR(n,`enter`,e),exit:zR(n,`exit`,e)})})}function VR(e,t,n){var r=LR(e.children),i=RR(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,N.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,N.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,N.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:zR(o,`exit`,e),enter:zR(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,N.cloneElement)(o,{in:!1}):c&&s&&(0,N.isValidElement)(l)&&(i[a]=(0,N.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:zR(o,`exit`,e),enter:zR(o,`enter`,e)}))}}),i}var HR=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},UR={component:`div`,childFactory:function(e){return e}},WR=function(e){vR(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(IR(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?BR(e,r):VR(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=LR(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=_t({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=gR(e,[`component`,`childFactory`]),i=this.state.contextValue,a=HR(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?N.createElement(wR.Provider,{value:i},a):N.createElement(wR.Provider,{value:i},N.createElement(t,r,a))},t}(N.Component);WR.propTypes={},WR.defaultProps=UR;var GR=[];function KR(e){N.useEffect(e,GR)}var qR=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function JR(){let e=fR(qR.create).current;return KR(e.disposeEffect),e}function YR(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=N.useState(!1),f=k(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=k(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),N.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,P.jsx)(`span`,{className:f,style:p,children:(0,P.jsx)(`span`,{className:m})})}var XR=$r(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),ZR=550,QR=mr`
|
|
214
|
+
background-color: var(--pie-background, rgba(255, 255, 255))`,t[1].border=n||`1`,t}}),PL=`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`,FL=hL.extend({content:PL}),IL=gL.extend({content:PL}),LL=Rb.create({name:`div`,group:`block`,content:`inline*`,parseHTML(){return[{tag:`div`}]},renderHTML({HTMLAttributes:e}){return[`div`,e,0]},addKeyboardShortcuts(){let e=e=>{for(let t=e.depth;t>=0;--t)if(e.node(t).type.name===`listItem`)return!0;return!1};return{Enter:()=>{let{state:t}=this.editor,{$from:n}=t.selection;return n.parent.type.name!==`div`||e(n)?!1:this.editor.chain().focus().setNode(`paragraph`).splitBlock().run()},Backspace:()=>{let{state:e}=this.editor,{$from:t,empty:n}=e.selection;if(t.parent.type.name!==`div`||!n)return!1;let r=t.parent.textContent;if(r.length===0)return e.doc.childCount===1;if(r.length===1&&t.parentOffset===1){let{tr:n}=e;return n.delete(t.pos-1,t.pos),this.editor.view.dispatch(n),!0}return!1}}}}),RL=cb.create({name:`ensureEmptyRootIsDiv`,addProseMirrorPlugins(){return[new du({key:new mu(this.name),appendTransaction(e,t,n){if(!e.some(e=>e.docChanged))return null;let{doc:r}=n;if(r.childCount!==1)return null;let i=r.firstChild;if(i.type.name!==`paragraph`||i.content.size>0)return null;let a=n.schema.nodes.div;if(!a)return null;let o=i.nodeSize;return n.tr.replaceWith(0,o,a.create())}})]}}),zL=cb.create({name:`ensureListItemContentIsDiv`,addProseMirrorPlugins(){return[new du({key:new mu(this.name),appendTransaction(e,t,n){if(!e.some(e=>e.docChanged))return null;let{doc:r,schema:i}=n,a=i.nodes.div;if(!a)return null;let o=[];if(r.descendants((e,t)=>{if(e.type.name!==`listItem`)return;let n=1;e.forEach(e=>{e.type.name===`paragraph`&&o.push({pos:t+n,attrs:e.attrs}),n+=e.nodeSize})}),o.length===0)return null;let s=n.tr;return o.sort((e,t)=>t.pos-e.pos).forEach(({pos:e,attrs:t})=>s.setNodeMarkup(e,a,t)),s}})]}});function BL(...e){return e.reduce((e,t)=>t==null?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function VL(e){return Br(`MuiSvgIcon`,e)}Vr(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var HL=e=>{let{color:t,fontSize:n,classes:r}=e;return _({root:[`root`,t!==`inherit`&&`color${L(t)}`,`fontSize${L(n)}`]},VL,r)},UL=F(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${L(n.color)}`],t[`fontSize${L(n.fontSize)}`]]}})(Do(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,transition:e.transitions?.create?.(`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),WL=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=S.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let _=HL(m);return(0,N.jsxs)(UL,{as:o,className:g(_.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,N.jsx)(`title`,{children:u}):null]})});WL.muiName=`SvgIcon`;function GL(e,t){function n(t,n){return(0,N.jsx)(WL,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=WL.muiName,S.memo(S.forwardRef(n))}function KL(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}var qL=KL,JL=ca;function YL(e){return e&&e.ownerDocument||document}var XL=YL;function ZL(e){return YL(e).defaultView||window}var QL=ZL;function $L(e,t){typeof e==`function`?e(t):e&&(e.current=t)}var eR=ti,tR=Fi;function nR(e){let{controlled:t,default:n,name:r,state:i=`value`}=e,{current:a}=S.useRef(t!==void 0),[o,s]=S.useState(n);return[a?t:o,S.useCallback(e=>{a||s(e)},[])]}var rR=nR;function iR(e){let t=S.useRef(e);return ti(()=>{t.current=e}),S.useRef((...e)=>(0,t.current)(...e)).current}var aR=iR;function oR(...e){let t=S.useRef(void 0),n=S.useCallback(t=>{let n=e.map(e=>{if(e==null)return null;if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}});return()=>{n.forEach(e=>e?.())}},e);return S.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var sR=oR;function cR(e,t){let n=e.charCodeAt(2);return e[0]===`o`&&e[1]===`n`&&n>=65&&n<=90&&typeof t==`function`}function lR(e,t){if(!e)return t;function n(e,t){let n={};return Object.keys(t).forEach(r=>{cR(r,t[r])&&typeof e[r]==`function`&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})}),n}if(typeof e==`function`||typeof t==`function`)return r=>{let i=typeof t==`function`?t(r):t,a=typeof e==`function`?e({...r,...i}):e,o=g(r?.className,i?.className,a?.className),s=n(a,i);return{...i,...a,...s,...!!o&&{className:o},...i?.style&&a?.style&&{style:{...i.style,...a.style}},...i?.sx&&a?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(a.sx)?a.sx:[a.sx]]}}};let r=t,i=n(e,r),a=g(r?.className,e?.className);return{...t,...e,...i,...!!a&&{className:a},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function uR(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var dR={};function fR(e,t){let n=S.useRef(dR);return n.current===dR&&(n.current=e(t)),n}var pR=class e{static create(){return new e}static use(){let t=fR(e.create).current,[n,r]=S.useState(!1);return t.shouldMount=n,t.setShouldMount=r,S.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=hR(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function mR(){return pR.use()}function hR(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function gR(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _R(e,t){return _R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_R(e,t)}function vR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_R(e,t)}function yR(e,t){return e.classList?!!t&&e.classList.contains(t):(` `+(e.className.baseVal||e.className)+` `).indexOf(` `+t+` `)!==-1}function bR(e,t){e.classList?e.classList.add(t):yR(e,t)||(typeof e.className==`string`?e.className=e.className+` `+t:e.setAttribute(`class`,(e.className&&e.className.baseVal||``)+` `+t))}function xR(e,t){return e.replace(RegExp(`(^|\\s)`+t+`(?:\\s|$)`,`g`),`$1`).replace(/\s+/g,` `).replace(/^\s*|\s*$/g,``)}function SR(e,t){e.classList?e.classList.remove(t):typeof e.className==`string`?e.className=xR(e.className,t):e.setAttribute(`class`,xR(e.className&&e.className.baseVal||``,t))}var CR={disabled:!1},wR=S.createContext(null),TR=function(e){return e.scrollTop},ER=`unmounted`,DR=`exited`,OR=`entering`,kR=`entered`,AR=`exiting`,jR=function(e){vR(t,e);function t(t,n){var r=e.call(this,t,n)||this,i=n,a=i&&!i.isMounting?t.enter:t.appear,o;return r.appearStatus=null,t.in?a?(o=DR,r.appearStatus=OR):o=kR:o=t.unmountOnExit||t.mountOnEnter?ER:DR,r.state={status:o},r.nextCallback=null,r}t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===`unmounted`?{status:DR}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==`entering`&&n!==`entered`&&(t=OR):(n===`entering`||n===`entered`)&&(t=AR)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=n=r=e,n,r;return e!=null&&typeof e!=`number`&&(t=e.exit,n=e.enter,r=e.appear===void 0?n:e.appear),{exit:t,enter:n,appear:r}},n.updateStatus=function(e,t){if(e===void 0&&(e=!1),t!==null)if(this.cancelNextCallback(),t===`entering`){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this);n&&TR(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===`exited`&&this.setState({status:ER})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[zx.findDOMNode(this),r],a=i[0],o=i[1],s=this.getTimeouts(),c=r?s.appear:s.enter;if(!e&&!n||CR.disabled){this.safeSetState({status:kR},function(){t.props.onEntered(a)});return}this.props.onEnter(a,o),this.safeSetState({status:OR},function(){t.props.onEntering(a,o),t.onTransitionEnd(c,function(){t.safeSetState({status:kR},function(){t.props.onEntered(a,o)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:zx.findDOMNode(this);if(!t||CR.disabled){this.safeSetState({status:DR},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:AR},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:DR},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:zx.findDOMNode(this),r=e==null&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],o=i[1];this.props.addEndListener(a,o)}e!=null&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===`unmounted`)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=gR(t,[`children`,`in`,`mountOnEnter`,`unmountOnExit`,`appear`,`enter`,`exit`,`timeout`,`addEndListener`,`onEnter`,`onEntering`,`onEntered`,`onExit`,`onExiting`,`onExited`,`nodeRef`]);return S.createElement(wR.Provider,{value:null},typeof n==`function`?n(e,r):S.cloneElement(S.Children.only(n),r))},t}(S.Component);jR.contextType=wR,jR.propTypes={};function MR(){}jR.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:MR,onEntering:MR,onEntered:MR,onExit:MR,onExiting:MR,onExited:MR},jR.UNMOUNTED=ER,jR.EXITED=DR,jR.ENTERING=OR,jR.ENTERED=kR,jR.EXITING=AR;var NR=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return bR(e,t)})},PR=function(e,t){return e&&t&&t.split(` `).forEach(function(t){return SR(e,t)})},FR=function(e){vR(t,e);function t(){for(var t,n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,t.appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1];t.removeClasses(i,`exit`),t.addClass(i,a?`appear`:`enter`,`base`),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.addClass(i,a,`active`),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.resolveArguments(e,n),i=r[0],a=r[1]?`appear`:`enter`;t.removeClasses(i,a),t.addClass(i,a,`done`),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`appear`),t.removeClasses(n,`enter`),t.addClass(n,`exit`,`base`),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,`exit`,`active`),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,`exit`),t.addClass(n,`exit`,`done`),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,r=typeof n==`string`,i=r&&n?n+`-`:``,a=r?``+i+e:n[e];return{baseClassName:a,activeClassName:r?a+`-active`:n[e+`Active`],doneClassName:r?a+`-done`:n[e+`Done`]}},t}var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+`ClassName`],i=this.getClassNames(`enter`).doneClassName;t===`appear`&&n===`done`&&i&&(r+=` `+i),n===`active`&&e&&TR(e),r&&(this.appliedClasses[t][n]=r,NR(e,r))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},r&&PR(e,r),i&&PR(e,i),a&&PR(e,a)},n.render=function(){var e=this.props;e.classNames;var t=gR(e,[`classNames`]);return S.createElement(jR,at({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(S.Component);FR.defaultProps={classNames:``},FR.propTypes={};function IR(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}function LR(e,t){var n=function(e){return t&&(0,S.isValidElement)(e)?t(e):e},r=Object.create(null);return e&&S.Children.map(e,function(e){return e}).forEach(function(e){r[e.key]=n(e)}),r}function RR(e,t){e||={},t||={};function n(n){return n in t?t[n]:e[n]}var r=Object.create(null),i=[];for(var a in e)a in t?i.length&&(r[a]=i,i=[]):i.push(a);var o,s={};for(var c in t){if(r[c])for(o=0;o<r[c].length;o++){var l=r[c][o];s[r[c][o]]=n(l)}s[c]=n(c)}for(o=0;o<i.length;o++)s[i[o]]=n(i[o]);return s}function zR(e,t,n){return n[t]==null?e.props[t]:n[t]}function BR(e,t){return LR(e.children,function(n){return(0,S.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:zR(n,`appear`,e),enter:zR(n,`enter`,e),exit:zR(n,`exit`,e)})})}function VR(e,t,n){var r=LR(e.children),i=RR(t,r);return Object.keys(i).forEach(function(a){var o=i[a];if((0,S.isValidElement)(o)){var s=a in t,c=a in r,l=t[a],u=(0,S.isValidElement)(l)&&!l.props.in;c&&(!s||u)?i[a]=(0,S.cloneElement)(o,{onExited:n.bind(null,o),in:!0,exit:zR(o,`exit`,e),enter:zR(o,`enter`,e)}):!c&&s&&!u?i[a]=(0,S.cloneElement)(o,{in:!1}):c&&s&&(0,S.isValidElement)(l)&&(i[a]=(0,S.cloneElement)(o,{onExited:n.bind(null,o),in:l.props.in,exit:zR(o,`exit`,e),enter:zR(o,`enter`,e)}))}}),i}var HR=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},UR={component:`div`,childFactory:function(e){return e}},WR=function(e){vR(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.state={contextValue:{isMounting:!0},handleExited:r.handleExited.bind(IR(r)),firstRender:!0},r}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?BR(e,r):VR(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=LR(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=at({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=gR(e,[`component`,`childFactory`]),i=this.state.contextValue,a=HR(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,t===null?S.createElement(wR.Provider,{value:i},a):S.createElement(wR.Provider,{value:i},S.createElement(t,r,a))},t}(S.Component);WR.propTypes={},WR.defaultProps=UR;var GR=[];function KR(e){S.useEffect(e,GR)}var qR=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function JR(){let e=fR(qR.create).current;return KR(e.disposeEffect),e}function YR(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=S.useState(!1),f=g(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=g(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),S.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,N.jsx)(`span`,{className:f,style:p,children:(0,N.jsx)(`span`,{className:m})})}var XR=Vr(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),ZR=550,QR=nr`
|
|
215
215
|
0% {
|
|
216
216
|
transform: scale(0);
|
|
217
217
|
opacity: 0.1;
|
|
@@ -221,7 +221,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
221
221
|
transform: scale(1);
|
|
222
222
|
opacity: 0.3;
|
|
223
223
|
}
|
|
224
|
-
`,$R=
|
|
224
|
+
`,$R=nr`
|
|
225
225
|
0% {
|
|
226
226
|
opacity: 1;
|
|
227
227
|
}
|
|
@@ -229,7 +229,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
229
229
|
100% {
|
|
230
230
|
opacity: 0;
|
|
231
231
|
}
|
|
232
|
-
`,ez=
|
|
232
|
+
`,ez=nr`
|
|
233
233
|
0% {
|
|
234
234
|
transform: scale(1);
|
|
235
235
|
}
|
|
@@ -241,7 +241,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
241
241
|
100% {
|
|
242
242
|
transform: scale(1);
|
|
243
243
|
}
|
|
244
|
-
`,tz=
|
|
244
|
+
`,tz=F(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),nz=F(YR,{name:`MuiTouchRipple`,slot:`Ripple`})`
|
|
245
245
|
opacity: 0;
|
|
246
246
|
position: absolute;
|
|
247
247
|
|
|
@@ -284,7 +284,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
284
284
|
animation-iteration-count: infinite;
|
|
285
285
|
animation-delay: 200ms;
|
|
286
286
|
}
|
|
287
|
-
`,rz=
|
|
287
|
+
`,rz=S.forwardRef(function(e,t){let{center:n=!1,classes:r={},className:i,...a}=I({props:e,name:`MuiTouchRipple`}),[o,s]=S.useState([]),c=S.useRef(0),l=S.useRef(null);S.useEffect(()=>{l.current&&=(l.current(),null)},[o]);let u=S.useRef(!1),d=JR(),f=S.useRef(null),p=S.useRef(null),m=S.useCallback(e=>{let{pulsate:t,rippleX:n,rippleY:i,rippleSize:a,cb:o}=e;s(e=>[...e,(0,N.jsx)(nz,{classes:{ripple:g(r.ripple,XR.ripple),rippleVisible:g(r.rippleVisible,XR.rippleVisible),ripplePulsate:g(r.ripplePulsate,XR.ripplePulsate),child:g(r.child,XR.child),childLeaving:g(r.childLeaving,XR.childLeaving),childPulsate:g(r.childPulsate,XR.childPulsate)},timeout:ZR,pulsate:t,rippleX:n,rippleY:i,rippleSize:a},c.current)]),c.current+=1,l.current=o},[r]),h=S.useCallback((e={},t={},r=()=>{})=>{let{pulsate:i=!1,center:a=n||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&u.current){u.current=!1;return}e?.type===`touchstart`&&(u.current=!0);let s=o?null:p.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0},l,h,g;if(a||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)l=Math.round(c.width/2),h=Math.round(c.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;l=Math.round(t-c.left),h=Math.round(n-c.top)}if(a)g=Math.sqrt((2*c.width**2+c.height**2)/3),g%2==0&&(g+=1);else{let e=Math.max(Math.abs((s?s.clientWidth:0)-l),l)*2+2,t=Math.max(Math.abs((s?s.clientHeight:0)-h),h)*2+2;g=Math.sqrt(e**2+t**2)}e?.touches?f.current===null&&(f.current=()=>{m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},d.start(80,()=>{f.current&&=(f.current(),null)})):m({pulsate:i,rippleX:l,rippleY:h,rippleSize:g,cb:r})},[n,m,d]),_=S.useCallback(()=>{h({},{pulsate:!0})},[h]),v=S.useCallback((e,t)=>{if(d.clear(),e?.type===`touchend`&&f.current){f.current(),f.current=null,d.start(0,()=>{v(e,t)});return}f.current=null,s(e=>e.length>0?e.slice(1):e),l.current=t},[d]);return S.useImperativeHandle(t,()=>({pulsate:_,start:h,stop:v}),[_,h,v]),(0,N.jsx)(tz,{className:g(XR.root,r.root,i),ref:p,...a,children:(0,N.jsx)(WR,{component:null,exit:!0,children:o})})});function iz(e){return Br(`MuiButtonBase`,e)}var az=Vr(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),oz=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,a=_({root:[`root`,t&&`disabled`,n&&`focusVisible`]},iz,i);return n&&r&&(a.root+=` ${r}`),a},sz=F(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${az.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),cz=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p=`a`,onBlur:m,onClick:h,onContextMenu:_,onDragLeave:v,onFocus:y,onFocusVisible:b,onKeyDown:x,onKeyUp:C,onMouseDown:w,onMouseLeave:T,onMouseUp:E,onTouchEnd:ee,onTouchMove:D,onTouchStart:O,tabIndex:te=0,TouchRippleProps:k,touchRippleRef:A,type:j,...M}=n,ne=S.useRef(null),re=mR(),ie=sR(re.ref,A),[ae,oe]=S.useState(!1);c&&ae&&oe(!1),S.useImperativeHandle(r,()=>({focusVisible:()=>{oe(!0),ne.current.focus()}}),[]);let se=re.shouldMount&&!l&&!c;S.useEffect(()=>{ae&&d&&!l&&re.pulsate()},[l,d,ae,re]);let ce=lz(re,`start`,w,u),le=lz(re,`stop`,_,u),ue=lz(re,`stop`,v,u),de=lz(re,`stop`,E,u),fe=lz(re,`stop`,e=>{ae&&e.preventDefault(),T&&T(e)},u),pe=lz(re,`start`,O,u),me=lz(re,`stop`,ee,u),he=lz(re,`stop`,D,u),ge=lz(re,`stop`,e=>{uR(e.target)||oe(!1),m&&m(e)},!1),_e=aR(e=>{ne.current||=e.currentTarget,uR(e.target)&&(oe(!0),b&&b(e)),y&&y(e)}),ve=()=>{let e=ne.current;return e?e.tagName!==`BUTTON`&&!(e.tagName===`A`&&e.href):s&&s!==`button`},ye=aR(e=>{d&&!e.repeat&&ae&&e.key===` `&&re.stop(e,()=>{re.start(e)}),e.target===e.currentTarget&&ve()&&e.key===` `&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ve()&&e.key===`Enter`&&!c&&(e.preventDefault(),h&&h(e))}),be=aR(e=>{d&&e.key===` `&&ae&&!e.defaultPrevented&&re.stop(e,()=>{re.pulsate(e)}),C&&C(e),h&&e.target===e.currentTarget&&ve()&&e.key===` `&&!e.defaultPrevented&&!c&&h(e)}),xe=s;xe===`button`&&(M.href||M.to)&&(xe=p);let Se={};if(xe===`button`){let e=!!M.formAction;Se.type=j===void 0&&!e?`button`:j,Se.disabled=c}else!M.href&&!M.to&&(Se.role=`button`),c&&(Se[`aria-disabled`]=c);let Ce=sR(t,ne),we={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,tabIndex:te,focusVisible:ae},Te=oz(we);return(0,N.jsxs)(sz,{as:xe,className:g(Te.root,o),ownerState:we,onBlur:ge,onClick:h,onContextMenu:le,onFocus:_e,onKeyDown:ye,onKeyUp:be,onMouseDown:ce,onMouseLeave:fe,onMouseUp:de,onDragLeave:ue,onTouchEnd:me,onTouchMove:he,onTouchStart:pe,ref:Ce,tabIndex:c?-1:te,type:j,...Se,...M,children:[a,se?(0,N.jsx)(rz,{ref:ie,center:i,...k}):null]})});function lz(e,t,n,r=!1){return aR(i=>(n&&n(i),r||e[t](i),!0))}function uz(e){return Br(`MuiCircularProgress`,e)}Vr(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDeterminate`,`circleIndeterminate`,`circleDisableShrink`]);var dz=44,fz=nr`
|
|
288
288
|
0% {
|
|
289
289
|
transform: rotate(0deg);
|
|
290
290
|
}
|
|
@@ -292,7 +292,7 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
292
292
|
100% {
|
|
293
293
|
transform: rotate(360deg);
|
|
294
294
|
}
|
|
295
|
-
`,pz=
|
|
295
|
+
`,pz=nr`
|
|
296
296
|
0% {
|
|
297
297
|
stroke-dasharray: 1px, 200px;
|
|
298
298
|
stroke-dashoffset: 0;
|
|
@@ -307,13 +307,13 @@ ${n}`}}),s}function lA(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants
|
|
|
307
307
|
stroke-dasharray: 1px, 200px;
|
|
308
308
|
stroke-dashoffset: -126px;
|
|
309
309
|
}
|
|
310
|
-
`,mz=typeof fz==`string`?null:
|
|
310
|
+
`,mz=typeof fz==`string`?null:tr`
|
|
311
311
|
animation: ${fz} 1.4s linear infinite;
|
|
312
|
-
`,hz=typeof pz==`string`?null:
|
|
312
|
+
`,hz=typeof pz==`string`?null:tr`
|
|
313
313
|
animation: ${pz} 1.4s ease-in-out infinite;
|
|
314
|
-
`,gz=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return A({root:[`root`,n,`color${L(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${L(n)}`,i&&`circleDisableShrink`]},uz,t)},_z=I(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${L(n.color)}`]]}})(zo(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:mz||{animation:`${fz} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),vz=I(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),yz=I(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${L(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(zo(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:hz||{animation:`${pz} 1.4s ease-in-out infinite`}}]}))),bz=I(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(zo(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),xz=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=gz(p),h={},g={},_={};if(d===`determinate`){let e=2*Math.PI*((dz-l)/2);h.strokeDasharray=e.toFixed(3),_[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,g.transform=`rotate(-90deg)`}return(0,P.jsx)(_z,{className:k(m.root,r),style:{width:s,height:s,...g,...c},ownerState:p,ref:t,role:`progressbar`,..._,...f,children:(0,P.jsxs)(vz,{className:m.svg,ownerState:p,viewBox:`${dz/2} ${dz/2} ${dz} ${dz}`,children:[o?(0,P.jsx)(bz,{className:m.track,ownerState:p,cx:dz,cy:dz,r:(dz-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,P.jsx)(yz,{className:m.circle,style:h,ownerState:p,cx:dz,cy:dz,r:(dz-l)/2,fill:`none`,strokeWidth:l})]})})});function Sz(e){return Qr(`MuiIconButton`,e)}var Cz=$r(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),wz=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return A({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${L(r)}`,i&&`edge${L(i)}`,`size${L(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Sz,t)},Tz=I(cz,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${L(n.color)}`],n.edge&&t[`edge${L(n.edge)}`],t[`size${L(n.size)}`]]}})(zo(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),zo(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Cz.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Cz.loading}`]:{color:`transparent`}}))),Ez=I(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),Dz=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=tR(u),h=f??(0,P.jsx)(xz,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=wz(g);return(0,P.jsxs)(Tz,{id:d?m:u,className:k(_.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,P.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,P.jsx)(Ez,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})}),Oz=GL((0,P.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),kz=`pie-toolbar`,Az=GL((0,P.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),jz=I(Dz)({verticalAlign:`top`,width:`28px`,height:`28px`,color:`var(--editable-html-toolbar-check, #00bb00)`,padding:`4px`}),Mz=({onClick:e,doneButtonRef:t})=>(0,P.jsx)(jz,{"aria-label":`Done`,buttonRef:t,onClick:e,children:(0,P.jsx)(Az,{})});Mz.propTypes={onClick:p.func,doneButtonRef:p.func};var Nz=Mz,Pz=I(`div`,{shouldForwardProp:e=>![`showDone`,`toolbarAlignment`,`isFocused`,`autoWidth`,`isHidden`].includes(e)})(({showDone:e,toolbarAlignment:t,isFocused:n,autoWidth:r,isHidden:i})=>({position:`absolute`,zIndex:10,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:e?`280px`:`265px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:1,...t===`right`&&{right:0},...r?{width:`auto`}:{width:`100%`},...i&&{visibility:`hidden`}})),Fz=I(Dz)({width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`}),Iz=I(`div`)({display:`flex`});function Lz(e){let{children:t,deletable:n,toolbarOpts:r,autoWidth:i,isFocused:a,doneButtonRef:o,onDelete:s,showDone:c,onDone:l,style:u}=e,d=r.minWidth===void 0?{}:{minWidth:r.minWidth};return(0,P.jsxs)(Pz,{className:kz,showDone:c,toolbarAlignment:r.alignment,isFocused:r.alwaysVisible||a,autoWidth:i,isHidden:r.isHidden===!0,style:{...d,...u},children:[t,(0,P.jsxs)(Iz,{children:[n&&(0,P.jsx)(Fz,{"aria-label":`Delete`,onMouseDown:e=>s?.(e),children:(0,P.jsx)(Oz,{})}),c&&(0,P.jsx)(Nz,{doneButtonRef:o,onClick:l})]})]})}var Rz=`toolbarOpenedChanged`,zz=(e,t)=>{let n=!!t;e._toolbarOpened!==n&&(e._toolbarOpened=n,e?.view&&e?.state?.tr&&e.view.dispatch(e.state.tr.setMeta(Rz,!0)))},Bz=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s}=o,{respAreaToolbar:c,error:l}=i,u=r(),[d,f]=(0,N.useState)(!1),p=c([n,u],t,()=>{}),m=(0,N.useRef)(null),h;if(l){let e=l(),t=parseInt(o.index,10);h=!!e?.[t]?.[0]}return(0,N.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&f(a):f(a)},[t,n,a]),(0,N.useEffect)(()=>{let e=e=>{!(e.target.closest(`.insert-character-dialog`)||e.target.closest(`[data-toolbar-for]`))&&m.current&&!m.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&f(!1)};return d?document.addEventListener(`mousedown`,e):document.removeEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[d]),(0,P.jsxs)(iS,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline-flex`,minHeight:`55px`,position:`relative`,cursor:`pointer`},children:[(0,P.jsx)(`div`,{...o,style:{display:`inline-flex`,width:`100%`,minHeight:`46px`,height:`46px`,backgroundColor:`#FFF`,border:`1px solid ${h?`red`:`#C0C3CF`}`,boxSizing:`border-box`,borderRadius:`4px`,overflow:`hidden`,padding:`12px 21px`,margin:`0 4px`,minWidth:`178px`,visibility:d?`hidden`:`visible`},onClick:()=>f(!0),dangerouslySetInnerHTML:{__html:s||`<div> </div>`}}),d&&(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(`div`,{ref:m,className:`absolute z-50 bg-white shadow-lg rounded p-2`,style:{zIndex:1},children:(0,P.jsx)(p,{})}),t._tiptapContainerEl&&zx.createPortal((0,P.jsx)(Lz,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),zz(t,!1),t.view.dispatch(e),f(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};Bz.propTypes={attributes:p.object,error:p.any,value:p.string,isFocused:p.bool};var Vz=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Hz(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Uz(e){return`nodeType`in e}function Wz(e){return e?Hz(e)?e:Uz(e)?e.ownerDocument?.defaultView??window:window:window}function Gz(e){let{Document:t}=Wz(e);return e instanceof t}function Kz(e){return!Hz(e)&&e instanceof Wz(e).HTMLElement}function qz(e){return e instanceof Wz(e).SVGElement}function Jz(e){return e?Hz(e)?e.document:Uz(e)?Gz(e)?e:Kz(e)||qz(e)?e.ownerDocument:document:document:document}var Yz=Vz?N.useLayoutEffect:N.useEffect;function Xz(e){let t=(0,N.useRef)(e);return Yz(()=>{t.current=e}),(0,N.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function Zz(e,t){t===void 0&&(t=[e]);let n=(0,N.useRef)(e);return Yz(()=>{n.current!==e&&(n.current=e)},t),n}function Qz(e){let t=Xz(e),n=(0,N.useRef)(null);return[n,(0,N.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var $z={};function eB(e,t){return(0,N.useMemo)(()=>{if(t)return t;let n=$z[e]==null?0:$z[e]+1;return $z[e]=n,e+`-`+n},[e,t])}function tB(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var nB=tB(1),rB=tB(-1);function iB(e){return`clientX`in e&&`clientY`in e}function aB(e){if(!e)return!1;let{KeyboardEvent:t}=Wz(e.target);return t&&e instanceof t}function oB(e){if(!e)return!1;let{TouchEvent:t}=Wz(e.target);return t&&e instanceof t}function sB(e){if(oB(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return iB(e)?{x:e.clientX,y:e.clientY}:null}var cB;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(cB||={});function lB(){}var uB=Object.freeze({x:0,y:0});function dB(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function fB(e,t,n){let r=dB(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var pB={ignoreTransform:!1};function mB(e,t){t===void 0&&(t=pB);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Wz(e).getComputedStyle(e);t&&(n=fB(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function hB(e,t){return t===void 0&&(t=Wz(e).getComputedStyle(e)),t.position===`fixed`}function gB(e,t){t===void 0&&(t=Wz(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function _B(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Gz(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Kz(i)||qz(i)||n.includes(i))return n;let a=Wz(e).getComputedStyle(i);return i!==e&&gB(i,a)&&n.push(i),hB(i,a)?n:r(i.parentNode)}return e?r(e):n}function vB(e){let[t]=_B(e,1);return t??null}var yB;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(yB||={});function bB(e){return!Vz||!e?!1:e===document.scrollingElement}function xB(e){let t={x:0,y:0},n=bB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}function SB(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function CB(e,t){if(t===void 0&&(t=mB),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);vB(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var wB=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function TB(e){let{EventTarget:t}=Wz(e);return e instanceof t?e:Jz(e)}function EB(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var DB;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(DB||={});function OB(e){e.preventDefault()}function kB(e){e.stopPropagation()}var AB;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(AB||={});var jB={start:[AB.Space,AB.Enter],cancel:[AB.Esc],end:[AB.Space,AB.Enter,AB.Tab]},MB=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case AB.Right:return{...n,x:n.x+25};case AB.Left:return{...n,x:n.x-25};case AB.Down:return{...n,y:n.y+25};case AB.Up:return{...n,y:n.y-25}}},NB=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new wB(Jz(t)),this.windowListeners=new wB(Wz(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(DB.Resize,this.handleCancel),this.windowListeners.add(DB.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(DB.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&CB(n),t(uB)}handleKeyDown(e){if(aB(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=jB,coordinateGetter:a=MB,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:uB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=rB(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=xB(n),p=SB(n),m={x:Math.min(i===AB.Right?p.right-p.width/2:p.right,Math.max(i===AB.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===AB.Down?p.bottom-p.height/2:p.bottom,Math.max(i===AB.Down?p.top:p.top+p.height/2,u.y))},h=i===AB.Right&&!s||i===AB.Left&&!c,g=i===AB.Down&&!l||i===AB.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===AB.Right&&e<=d.x||i===AB.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===AB.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===AB.Down&&e<=d.y||i===AB.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===AB.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,nB(rB(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};NB.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=jB,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function PB(e){return!!(e&&`distance`in e)}function FB(e){return!!(e&&`delay`in e)}var IB=class{constructor(e,t,n){n===void 0&&(n=TB(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Jz(i),this.documentListeners=new wB(this.document),this.listeners=new wB(n),this.windowListeners=new wB(Wz(i)),this.initialCoordinates=sB(r)??uB,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(DB.Resize,this.handleCancel),this.windowListeners.add(DB.DragStart,OB),this.windowListeners.add(DB.VisibilityChange,this.handleCancel),this.windowListeners.add(DB.ContextMenu,OB),this.documentListeners.add(DB.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FB(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(PB(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(DB.Click,kB,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(DB.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=sB(e)??uB,s=rB(n,o);if(!t&&a){if(PB(a)){if(a.tolerance!=null&&EB(s,a.tolerance))return this.handleCancel();if(EB(s,a.distance))return this.handleStart()}if(FB(a)&&EB(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===AB.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},LB={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},RB=class extends IB{constructor(e){let{event:t}=e,n=Jz(t.target);super(e,LB,n)}};RB.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var zB={move:{name:`mousemove`},end:{name:`mouseup`}},BB;(function(e){e[e.RightClick=2]=`RightClick`})(BB||={});var VB=class extends IB{constructor(e){super(e,zB,Jz(e.event.target))}};VB.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===BB.RightClick?!1:(r?.({event:n}),!0)}}];var HB={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},UB=class extends IB{constructor(e){super(e,HB)}static setup(){return window.addEventListener(HB.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(HB.move.name,e)};function e(){}}};UB.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var WB;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(WB||={});var GB;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(GB||={}),yB.Backward,yB.Forward,yB.Backward,yB.Forward;var KB;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(KB||={});var qB;(function(e){e.Optimized=`optimized`})(qB||={});function JB(e){let{callback:t,disabled:n}=e,r=Xz(t),i=(0,N.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,N.useEffect)(()=>()=>i?.disconnect(),[i]),i}function YB(e,t){return(0,N.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}KB.WhileDragging,qB.Optimized;var XB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:lB,draggableNodes:new Map,over:null,measureDroppableContainers:lB},ZB=(0,N.createContext)(XB),QB=(0,N.createContext)({...uB,scaleX:1,scaleY:1}),$B;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})($B||={});var eV=(0,N.createContext)(null),tV=`button`,nV=`Draggable`;function rV(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=eB(nV),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,N.useContext)(ZB),{role:p=tV,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,N.useContext)(g?QB:eV),[v,y]=Qz(),[b,x]=Qz(),S=YB(o,t),C=Zz(n);return Yz(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,N.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===tV?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}var iV=`Droppable`,aV={timeout:25};function oV(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=eB(iV),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,N.useContext)(ZB),u=(0,N.useRef)({disabled:n}),d=(0,N.useRef)(!1),f=(0,N.useRef)(null),p=(0,N.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...aV,...i},_=Zz(h??r),v=JB({callback:(0,N.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Qz((0,N.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=Zz(t);return(0,N.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,N.useEffect)(()=>(s({type:cB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:cB.UnregisterDroppable,key:a,id:r})),[r]),(0,N.useEffect)(()=>{n!==u.current.disabled&&(s({type:cB.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}var sV=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,cV=({size:e,children:t})=>(e=sV(e),(0,P.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));cV.propTypes={size:p.number,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var lV=({size:e,children:t,sx:n})=>(0,P.jsx)(cV,{size:e,children:(0,P.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});lV.propTypes={size:p.oneOfType([p.string,p.number]),children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,sx:p.object};var uV=({fill:e})=>(0,P.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});uV.propTypes={fill:p.string.isRequired};var dV=({fill:e})=>(0,P.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});dV.propTypes={fill:p.string.isRequired};var fV=({fill:e})=>(0,P.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});fV.propTypes={fill:p.string.isRequired};var pV=({fill:e})=>(0,P.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});pV.propTypes={fill:p.string.isRequired};var mV=({fill:e})=>(0,P.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});mV.propTypes={fill:p.string.isRequired};var hV=(e,t)=>{class n extends N.Component{static propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,size:p.oneOfType([p.number,p.string]),fg:p.string,bg:p.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,P.jsx)(e,{fill:s}):(0,P.jsx)(t,{fill:s}),u=n===`check`?(0,P.jsx)(e,{fill:c}):(0,P.jsx)(t,{fill:c});return a?(0,P.jsx)(lV,{size:o,children:u}):(0,P.jsxs)(lV,{size:o,children:[i===`feedback`?r===`round`?(0,P.jsx)(fV,{fill:c}):(0,P.jsx)(dV,{fill:c}):r===`round`?(0,P.jsx)(pV,{fill:c}):(0,P.jsx)(mV,{fill:c}),l]})}}return n},gV=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,P.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
|
|
315
|
-
c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,
|
|
316
|
-
C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});wV.propTypes={fill:p.string.isRequired};var TV=class extends N.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(SV,{fill:t})]}),emoji:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(wV,{fill:t})]}),feedback:{check:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(wV,{fill:t})]}),emoji:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(wV,{fill:t})]}),square:{check:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(SV,{fill:t})]}),emoji:(0,P.jsxs)(lV,{children:[(0,P.jsx)(CV,{fill:n}),(0,P.jsx)(wV,{fill:t})]}),open:{check:(0,P.jsx)(lV,{children:(0,P.jsx)(SV,{fill:n})}),emoji:(0,P.jsx)(lV,{children:(0,P.jsx)(wV,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};TV.propTypes={iconSet:p.oneOf([`emoji`,`check`,void 0]),shape:p.oneOf([`square`,void 0]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string},TV.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var EV=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,P.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,P.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});EV.propTypes={fill:p.string.isRequired};var DV=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,P.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,P.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});DV.propTypes={fill:p.string.isRequired};var OV=hV(EV,DV);OV.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},OV.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function kV(e){return typeof e==`string`}function AV(e){return e?.ref||null}var jV=e=>e.scrollTop;function MV(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function NV(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function PV(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function FV(e){return`scale(${e}, ${e**2})`}var IV={entering:{opacity:1,transform:FV(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:FV(.75)},exited:{opacity:0,transform:FV(.75)}},LV={opacity:0,transform:FV(.75),visibility:`hidden`},RV=N.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=JR(),_=N.useRef(),v=No(),y=N.useRef(null),b=sR(y,AV(i),t),x=MV(y,l),S=MV(y,(e,t)=>{jV(e);let{duration:n,delay:r,easing:i}=PV({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),C=MV(y,c),w=MV(y,f),T=MV(y,e=>{let{duration:t,delay:n,easing:r}=PV({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=FV(.75),u&&u(e)}),E=MV(y,e=>{e.style.transition=``,d&&d(e)});return(0,P.jsx)(jR,{appear:r,in:o,nodeRef:y,onEnter:S,onEntered:C,onEntering:x,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=NV(e,o,IV,LV,p,i.props.style);return N.cloneElement(i,{style:r,ref:b,...n})}})});RV&&(RV.muiSupportAuto=!0);function zV(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function BV(e){let t=YL(e);return t.body===e?ZL(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function VV(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function HV(e){return parseFloat(ZL(e).getComputedStyle(e).paddingRight)||0}function UV(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function WV(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!UV(e);t&&n&&VV(e,i)})}function GV(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function KV(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(BV(r)){let e=zV(ZL(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${HV(r)+e}px`;let t=YL(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${HV(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=YL(r).body;else{let t=r.parentElement,n=ZL(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function qV(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var JV=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&VV(e.modalRef,!1);let r=qV(t);WV(t,e.mount,e.modalRef,r,!0);let i=GV(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=GV(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=KV(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=GV(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&VV(e.modalRef,t),WV(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&VV(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function YV(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var XV=YV;function ZV(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var QV=ZV,$V=`data-mui-focusable`;function eH(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${$V}]`):null}var tH=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function nH(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function rH(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function iH(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||rH(e))}function aH(e){let t=[],n=[];return Array.from(e.querySelectorAll(tH)).forEach((e,r)=>{let i=nH(e);i===-1||!iH(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function oH(){return!0}function sH(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=aH,isEnabled:o=oH,open:s}=e,c=N.useRef(!1),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null),f=N.useRef(null),p=N.useRef(!1),m=N.useRef(null),h=oR(AV(t),m),g=N.useRef(null);N.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),N.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=QV(YL(m.current)),t=eH(m.current)??m.current;return XV(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),N.useEffect(()=>{if(!s||!m.current)return;let e=YL(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&QV(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=QV(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(XV(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=QV(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),N.cloneElement(t,{ref:h,onFocus:_}),(0,P.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function cH(e){return typeof e==`function`?e():e}var lH=N.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=N.useState(null),s=oR(N.isValidElement(n)?AV(n):null,t);if(pi(()=>{i||o(cH(r)||document.body)},[r,i]),pi(()=>{if(a&&!i)return $L(t,a),()=>{$L(t,null)}},[t,a,i]),i){if(N.isValidElement(n)){let e={ref:s};return N.cloneElement(n,e)}return n}return a&&zx.createPortal(n,a)});function uH(e,t,n){return e===void 0||kV(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function dH(e,t,n){return typeof e==`function`?e(t,n):e}function fH(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function pH(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function mH(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=k(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=fH({...i,...r}),s=pH(r),c=pH(i),l=t(o),u=k(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function hH(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=dH(d[e],i),{props:{component:h,...g},internalRef:_}=mH({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=oR(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,uH(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var gH={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},_H={opacity:0,visibility:`hidden`},vH=N.forwardRef(function(e,t){let n=No(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=N.useRef(null),y=sR(v,AV(o),t),b=MV(v,d),x=MV(v,(e,t)=>{jV(e);let r=PV({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=MV(v,u),C=MV(v,m),w=MV(v,e=>{let t=PV({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=MV(v,e=>{e.style.transition=``,p&&p(e)});return(0,P.jsx)(jR,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:S,onEntering:b,onExit:w,onExited:T,onExiting:C,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=NV(e,c,gH,_H,h,o.props.style);return N.cloneElement(o,{style:r,ref:y,...n})}})});function yH(e){return Qr(`MuiBackdrop`,e)}$r(`MuiBackdrop`,[`root`,`invisible`]);var bH=e=>{let{classes:t,invisible:n}=e;return A({root:[`root`,n&&`invisible`]},yH,t)},xH=I(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),SH=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},g=bH(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=hH(`root`,{elementType:xH,externalForwardedProps:_,className:k(g.root,i),ownerState:h}),[b,x]=hH(`transition`,{elementType:vH,externalForwardedProps:_,ownerState:h});return(0,P.jsx)(b,{in:s,timeout:p,...m,...x,children:(0,P.jsx)(v,{"aria-hidden":!0,...y,ref:t,children:r})})});function CH(e){return typeof e==`function`?e():e}function wH(e){return e?e.props.hasOwnProperty(`in`):!1}var TH=()=>{},EH=new JV;function DH(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=N.useRef({}),f=N.useRef(null),p=N.useRef(null),m=oR(p,u),[h,g]=N.useState(!l),_=wH(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>YL(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{EH.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=iR(()=>{let e=CH(t)||y().body;EH.add(b(),e),p.current&&x()}),C=()=>EH.isTopModal(b()),w=iR(e=>{f.current=e,e&&(l&&C()?x():p.current&&VV(p.current,v))}),T=N.useCallback(()=>{EH.remove(b(),v)},[v]);N.useEffect(()=>()=>{T()},[T]),N.useEffect(()=>{l?S():(!_||!i)&&T()},[l,T,_,i,S]);let E=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!C())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=fH(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:E(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:BL(()=>{g(!1),a&&a()},s?.props.onEnter??TH),onExited:BL(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??TH)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function OH(e){return Qr(`MuiModal`,e)}$r(`MuiModal`,[`root`,`hidden`,`backdrop`]);var kH=e=>{let{open:t,exited:n,classes:r}=e;return A({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},OH,r)},AH=I(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(zo(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),jH=I(SH,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),MH=N.forwardRef(function(e,t){let n=Bo({name:`MuiModal`,props:e}),{BackdropComponent:r=jH,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:g=!1,disableRestoreFocus:_=!1,disableScrollLock:v=!1,hideBackdrop:y=!1,keepMounted:b=!1,onClose:x,onTransitionEnter:S,onTransitionExited:C,open:w,slotProps:T={},slots:E={},theme:D,...O}=n,A={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:j,getBackdropProps:M,getTransitionProps:ee,portalRef:te,isTopModal:ne,exited:re,hasTransition:ie}=DH({...A,rootRef:t}),ae={...A,exited:re},oe=kH(ae),se={};if(c.props.tabIndex===void 0&&(se.tabIndex=`-1`),ie){let{onEnter:e,onExited:t}=ee();se.onEnter=e,se.onExited=t}let ce={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[le,ue]=hH(`root`,{ref:t,elementType:AH,externalForwardedProps:{...ce,...O,component:u},getSlotProps:j,ownerState:ae,className:k(o,oe?.root,!ae.open&&ae.exited&&oe?.hidden)}),[de,fe]=hH(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ce,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>M({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:k(i?.className,oe?.backdrop),ownerState:ae});return!b&&!w&&(!ie||re)?null:(0,P.jsx)(lH,{ref:te,container:l,disablePortal:g,children:(0,P.jsxs)(le,{...ue,children:[!y&&r?(0,P.jsx)(de,{...fe}):null,(0,P.jsx)(sH,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:ne,open:w,children:N.cloneElement(c,se)})]})})});function NH(e){return Qr(`MuiPaper`,e)}$r(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var PH=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return A({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},NH,i)},FH=I(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(zo(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),IH=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiPaper`}),r=No(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=PH(u);return(0,P.jsx)(FH,{as:a,ownerState:u,className:k(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${wi(`#fff`,po(o))}, ${wi(`#fff`,po(o))})`}},...l.style}})});function LH(e){return Qr(`MuiPopover`,e)}$r(`MuiPopover`,[`root`,`paper`]);function RH(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function zH(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function BH(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function VH(e){return typeof e==`function`?e():e}var HH=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`]},LH,t)},UH=I(MH,{name:`MuiPopover`,slot:`Root`})({}),WH=I(IH,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),GH=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:g={},transformOrigin:_={vertical:`top`,horizontal:`left`},TransitionComponent:v,transitionDuration:y=`auto`,TransitionProps:b={},disableScrollLock:x=!1,...S}=n,C=N.useRef(),w={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:_,TransitionComponent:v,transitionDuration:y,TransitionProps:b},T=HH(w),E=N.useCallback(()=>{if(s===`anchorPosition`)return o;let e=VH(i),t=(e&&e.nodeType===1?e:XL(C.current).body).getBoundingClientRect();return{top:t.top+RH(t,a.vertical),left:t.left+zH(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=N.useCallback(e=>({vertical:RH(e,_.vertical),horizontal:zH(e,_.horizontal)}),[_.horizontal,_.vertical]),O=N.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=D(t);if(s===`none`)return{top:null,left:null,transformOrigin:BH(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=QL(VH(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:BH(n)}},[i,s,E,D,f]),[A,j]=N.useState(p),M=N.useCallback(()=>{let e=C.current;if(!e)return;let t=O(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,j(!0)},[O]);N.useEffect(()=>(x&&window.addEventListener(`scroll`,M),()=>window.removeEventListener(`scroll`,M)),[i,x,M]);let ee=()=>{M()},te=()=>{j(!1)};N.useEffect(()=>{p&&M()}),N.useImperativeHandle(r,()=>p?{updatePosition:()=>{M()}}:null,[p,M]),N.useEffect(()=>{if(!p)return;let e=qL(()=>{M()}),t=QL(VH(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,M]);let ne=y,re={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[ie,ae]=hH(`transition`,{elementType:RV,externalForwardedProps:re,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),ee()},onExited:t=>{e.onExited?.(t),te()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!ie.muiSupportAuto&&(ne=void 0);let oe=u||(i?XL(VH(i)).body:void 0),[se,{slots:ce,slotProps:le,...ue}]=hH(`root`,{ref:t,elementType:UH,externalForwardedProps:{...re,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:lR(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:oe,open:p},ownerState:w,className:k(T.root,l)}),[de,fe]=hH(`paper`,{ref:C,className:T.paper,elementType:WH,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:A?void 0:{opacity:0}},ownerState:w});return(0,P.jsx)(se,{...ue,...!kV(se)&&{slots:ce,slotProps:le,disableScrollLock:x},children:(0,P.jsx)(ie,{...ae,timeout:ne,children:(0,P.jsx)(de,{...fe,children:c})})})}),KH={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},qH={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},JH=s({background:()=>vU,backgroundDark:()=>yU,black:()=>MU,blueGrey100:()=>BU,blueGrey300:()=>VU,blueGrey600:()=>HU,blueGrey900:()=>UU,border:()=>TU,borderDark:()=>DU,borderGray:()=>OU,borderLight:()=>EU,buttonBorder:()=>XU,buttonFocusOutline:()=>zU,buttonHoverBg:()=>ZU,correct:()=>eU,correctSecondary:()=>tU,correctTertiary:()=>nU,correctWithIcon:()=>rU,defaults:()=>G,disabled:()=>QH,disabledSecondary:()=>$H,dropdownBackground:()=>xU,fadedPrimary:()=>pU,focusChecked:()=>FU,focusCheckedBorder:()=>IU,focusUnchecked:()=>LU,focusUncheckedBorder:()=>RU,incorrect:()=>iU,incorrectSecondary:()=>oU,incorrectWithIcon:()=>aU,keyBoardFocusIndicator:()=>YU,keypadButton:()=>WU,keypadButtonHover:()=>qU,keypadButtonOperator:()=>GU,keypadButtonOperatorHover:()=>JU,keypadEmptyPlaceholder:()=>KU,missing:()=>sU,missingWithIcon:()=>cU,primary:()=>lU,primaryDark:()=>dU,primaryLight:()=>uU,primaryText:()=>fU,secondary:()=>mU,secondaryBackground:()=>bU,secondaryDark:()=>gU,secondaryLight:()=>hU,secondaryText:()=>_U,surface:()=>SU,tableGrid:()=>kU,tableGridLight:()=>AU,tableStripe:()=>jU,tertiary:()=>CU,tertiaryLight:()=>wU,text:()=>ZH,transparent:()=>PU,v:()=>YH,visualElementsColors:()=>QU,white:()=>NU}),G={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:Oa[500],CORRECT_SECONDARY:Oa[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:Ta[500],INCORRECT_SECONDARY:wa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:wa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:qH[500],PRIMARY_LIGHT:qH[200],PRIMARY_DARK:qH[800],SECONDARY:KH.A400,SECONDARY_LIGHT:KH[200],SECONDARY_DARK:KH[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(G);var YH=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},XH=YH(`pie`),ZH=()=>XH(`text`,G.TEXT),QH=()=>XH(`disabled`,G.DISABLED),$H=()=>XH(`disabled-secondary`,G.DISABLED_SECONDARY),eU=()=>XH(`correct`,G.CORRECT),tU=()=>XH(`correct-secondary`,G.CORRECT_SECONDARY),nU=()=>XH(`correct-tertiary`,G.CORRECT_TERTIARY),rU=()=>XH(`correct-icon`,G.CORRECT_WITH_ICON),iU=()=>XH(`incorrect`,G.INCORRECT),aU=()=>XH(`incorrect-icon`,G.INCORRECT_WITH_ICON),oU=()=>XH(`incorrect-secondary`,G.INCORRECT_SECONDARY),sU=()=>XH(`missing`,G.MISSING),cU=()=>XH(`missing-icon`,G.MISSING_WITH_ICON),lU=()=>XH(`primary`,G.PRIMARY),uU=()=>XH(`primary-light`,G.PRIMARY_LIGHT),dU=()=>XH(`primary-dark`,G.PRIMARY_DARK),fU=()=>XH(`primary-text`,`text`,G.TEXT),pU=()=>XH(`faded-primary`,G.FADED_PRIMARY),mU=()=>XH(`secondary`,G.SECONDARY),hU=()=>XH(`secondary-light`,G.SECONDARY_LIGHT),gU=()=>XH(`secondary-dark`,G.SECONDARY_DARK),_U=()=>XH(`secondary-text`,`text`,G.TEXT),vU=()=>XH(`background`,G.BACKGROUND),yU=()=>XH(`background-dark`,G.BACKGROUND_DARK),bU=()=>XH(`secondary-background`,G.SECONDARY_BACKGROUND),xU=()=>XH(`dropdown-background`,G.DROPDOWN_BACKGROUND),SU=()=>XH(`surface`,G.SURFACE),CU=()=>XH(`tertiary`,G.TERTIARY),wU=()=>XH(`tertiary-light`,G.TERTIARY_LIGHT),TU=()=>XH(`border`,G.BORDER),EU=()=>XH(`border-light`,G.BORDER_LIGHT),DU=()=>XH(`border-dark`,G.BORDER_DARK),OU=()=>XH(`border-gray`,G.BORDER_GRAY),kU=()=>XH(`table-grid`,`text`,G.TABLE_GRID),AU=()=>XH(`table-grid-light`,`border-light`,G.TABLE_GRID_LIGHT),jU=()=>XH(`table-stripe`,`background-dark`,G.TABLE_STRIPE),MU=()=>XH(`black`,G.BLACK),NU=()=>XH(`white`,G.WHITE),PU=()=>G.TRANSPARENT,FU=()=>XH(`focus-checked`,G.FOCUS_CHECKED),IU=()=>XH(`focus-checked-border`,G.FOCUS_CHECKED_BORDER),LU=()=>XH(`focus-unchecked`,G.FOCUS_UNCHECKED),RU=()=>XH(`focus-unchecked-border`,G.FOCUS_UNCHECKED_BORDER),zU=()=>XH(`button-focus-outline`,G.BUTTON_FOCUS_OUTLINE),BU=()=>XH(`blue-grey-100`,G.BLUE_GREY100),VU=()=>XH(`blue-grey-300`,G.BLUE_GREY300),HU=()=>XH(`blue-grey-600`,G.BLUE_GREY600),UU=()=>XH(`blue-grey-900`,G.BLUE_GREY900),WU=()=>XH(`keypad-button`,G.KEYPAD_BUTTON),GU=()=>XH(`keypad-button-operator`,G.KEYPAD_BUTTON_OPERATOR),KU=()=>XH(`keypad-empty-placeholder`,G.KEYPAD_EMPTY_PLACEHOLDER),qU=()=>XH(`keypad-button-hover`,G.KEYPAD_BUTTON_HOVER),JU=()=>XH(`keypad-button-operator-hover`,G.KEYPAD_BUTTON_OPERATOR_HOVER),YU=()=>XH(`keyboard-focus-indicator`,G.KEY_BOARD_FOCUS_INDICATOR),XU=()=>XH(`button-border`,G.BUTTON_BORDER),ZU=()=>XH(`button-hover-bg`,G.BUTTON_HOVER_BG),QU={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},$U=I(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),eW=I(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${QH()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${eU()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${iU()})`}}),tW=I(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),nW=class extends N.Component{static propTypes={correctness:p.string,feedback:p.string};nodeRef=N.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,P.jsx)(FR,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,P.jsx)(tW,{ref:this.nodeRef,children:(0,P.jsx)($U,{children:(0,P.jsx)(eW,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,P.jsx)(`div`,{children:(0,P.jsx)(WR,{children:this.renderFeedback()})})}},rW=s({Correct:()=>lW,Incorrect:()=>uW,NothingSubmitted:()=>fW,PartiallyCorrect:()=>dW}),iW=D(`pie-libs:render-ui:response-indicators`),aW=I(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),oW=I(GH)({cursor:`pointer`}),sW=I(`div`)({padding:`0`,borderRadius:`4px`}),cW=(e,t)=>{class n extends N.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{iW(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,P.jsxs)(aW,{hasFeedback:!!n,children:[(0,P.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,P.jsx)(e,{})}),n&&(0,P.jsx)(oW,{PaperComponent:sW,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,P.jsx)(nW,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:p.string},n},lW=cW(vV,`correct`),uW=cW(xV,`incorrect`),dW=cW(OV,`partially-correct`),fW=cW(TV,`nothing-submitted`);function pW(e){return Qr(`MuiCollapse`,e)}$r(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var mW=e=>{let{orientation:t,classes:n}=e;return A({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},pW,n)},hW=I(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(zo(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),gW=I(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),_W=I(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),vW=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:g=`vertical`,slots:_={},slotProps:v={},style:y,timeout:b=to.standard,TransitionComponent:x=jR,...S}=n,C={...n,orientation:g,collapsedSize:o},w=mW(C),T=No(),E=JR(),D=N.useRef(null),O=N.useRef(),A=typeof o==`number`?`${o}px`:o,j=g===`horizontal`,M=j?`width`:`height`,ee=N.useRef(null),te=sR(t,ee),ne=()=>D.current?D.current[j?`clientWidth`:`clientHeight`]:0,re=MV(ee,(e,t)=>{D.current&&j&&(D.current.style.position=`absolute`),e.style[M]=A,u&&u(e,t)}),ie=MV(ee,(e,t)=>{let n=ne();D.current&&j&&(D.current.style.position=``);let{duration:r,easing:i}=PV({style:y,timeout:b,easing:c},{mode:`enter`});if(b===`auto`){let t=T.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,O.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[M]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),ae=MV(ee,(e,t)=>{e.style[M]=`auto`,d&&d(e,t)}),oe=MV(ee,e=>{e.style[M]=`${ne()}px`,p&&p(e)}),se=MV(ee,m),ce=MV(ee,e=>{let t=ne(),{duration:n,easing:r}=PV({style:y,timeout:b,easing:c},{mode:`exit`});if(b===`auto`){let n=T.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,O.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[M]=A,e.style.transitionTimingFunction=r,h&&h(e)}),le=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(ee.current,e)},ue={slots:_,slotProps:v,component:s},[de,fe]=hH(`root`,{ref:te,className:k(w.root,a),elementType:hW,externalForwardedProps:ue,ownerState:C,additionalProps:{style:{[j?`minWidth`:`minHeight`]:A,...y}}}),[pe,me]=hH(`wrapper`,{ref:D,className:w.wrapper,elementType:gW,externalForwardedProps:ue,ownerState:C}),[he,ge]=hH(`wrapperInner`,{className:w.wrapperInner,elementType:_W,externalForwardedProps:ue,ownerState:C});return(0,P.jsx)(x,{in:l,onEnter:re,onEntered:ae,onEntering:ie,onExit:oe,onExited:se,onExiting:ce,addEndListener:le,nodeRef:ee,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,P.jsx)(de,{...fe,className:k(fe.className,{entered:w.entered,exited:!l&&A===`0px`&&w.hidden}[e]),ownerState:r,...n,children:(0,P.jsx)(pe,{...me,ownerState:r,children:(0,P.jsx)(he,{...ge,ownerState:r,children:i})})})}})});vW&&(vW.muiSupportAuto=!0);var yW=`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,bW=null;function xW(e){return typeof window>`u`||window.MathJax?.typesetPromise?Promise.resolve():bW||(bW=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||yW,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),bW)}function SW(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function CW(e={}){return async t=>{if(await xW(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),SW()}}var wW=`@pie-lib/math-rendering`,TW=null;function EW(){return TW||=CW({accessibility:!0,useSingleDollar:!0}),TW}function DW(){if(typeof window>`u`)return null;let e=window[wW];return typeof e?.renderMath==`function`?e:null}var OW=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=DW();return r?await r.renderMath?.(n):await EW()(n),t?n.innerHTML:void 0},kW=e=>DW()?.wrapMath?.(e)??e,AW=I(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),jW=I(vW)(({theme:e})=>({paddingTop:e.spacing(2)})),MW=class extends N.Component{static propTypes={className:p.string,children:p.object,labels:p.shape({visible:p.string,hidden:p.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){OW(this.root)}componentDidUpdate(){OW(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,P.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,P.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,P.jsx)(AW,{children:r})}),(0,P.jsx)(jW,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function NW(e){return Qr(`MuiButton`,e)}var PW=$r(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),FW=N.createContext({}),IW=N.createContext(void 0),LW=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=A({root:[`root`,o&&`loading`,a,`${a}${L(t)}`,`size${L(i)}`,`${a}Size${L(i)}`,`color${L(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${L(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${L(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${L(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},NW,c);return{...c,...l}},RW=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],zW=I(cz,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${L(n.color)}`],t[`size${L(n.size)}`],t[`${n.variant}Size${L(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(zo(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${PW.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${PW.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${PW.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${PW.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${PW.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${PW.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${PW.loading}`]:{color:`transparent`}}}]}})),BW=I(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${L(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...RW]})),VW=I(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${L(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...RW]})),HW=I(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),UW=I(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),WW=N.forwardRef(function(e,t){let n=N.useContext(FW),r=N.useContext(IW),i=Bo({props:fi(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:b,type:x,variant:S=`text`,...C}=i,w=tR(h),T=_??(0,P.jsx)(xz,{"aria-labelledby":w,color:`inherit`,size:16}),E={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:T,loadingPosition:v,size:y,type:x,variant:S},D=LW(E),O=(b||g&&v===`start`)&&(0,P.jsx)(BW,{className:D.startIcon,ownerState:E,children:b||(0,P.jsx)(UW,{className:D.loadingIconPlaceholder,ownerState:E})}),A=(f||g&&v===`end`)&&(0,P.jsx)(VW,{className:D.endIcon,ownerState:E,children:f||(0,P.jsx)(UW,{className:D.loadingIconPlaceholder,ownerState:E})}),j=r||``,M=typeof g==`boolean`?(0,P.jsx)(`span`,{className:D.loadingWrapper,style:{display:`contents`},children:g&&(0,P.jsx)(HW,{className:D.loadingIndicator,ownerState:E,children:T})}):null,{root:ee,...te}=D;return(0,P.jsxs)(zW,{ownerState:E,className:k(n.className,D.root,c,j),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:k(D.focusVisible,p),ref:t,type:x,id:g?w:h,...C,classes:te,children:[O,v!==`end`&&M,a,v===`end`&&M,A]})}),GW=GL((0,P.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),KW=GL((0,P.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),qW=I(`div`)({display:`flex`,flexDirection:`column`}),JW=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),YW=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),XW=I(WW)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),ZW=e=>{class t extends N.Component{static propTypes={session:p.object,onSessionChange:p.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,P.jsxs)(qW,{children:[(0,P.jsxs)(JW,{children:[(0,P.jsxs)(XW,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(YW,{children:(0,P.jsx)(KW,{})}),`Undo`]}),(0,P.jsxs)(XW,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(YW,{children:(0,P.jsx)(GW,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},QW=Ao({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),$W=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),eG=class extends N.Component{static propTypes={className:p.string,children:p.array,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,P.jsx)(Ar,{injectFirst:!0,children:(0,P.jsxs)(rs,{theme:QW,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,P.jsx)($W,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},tG=I(eG)({display:`flex`,flexDirection:`column`,position:`relative`}),nG=class extends N.Component{static propTypes={ariaLabel:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,role:p.string,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,P.jsx)(tG,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},rG=class extends N.Component{static propTypes={tag:p.string,className:p.string,html:p.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,P.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function iG({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var aG=N.createContext(void 0);function oG(){return N.useContext(aG)}function sG(e){return Qr(`MuiFormLabel`,e)}var cG=$r(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),lG=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return A({root:[`root`,`color${L(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},sG,t)},uG=I(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(zo(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{[`&.${cG.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${cG.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${cG.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),dG=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(zo(({theme:e})=>({[`&.${cG.error}`]:{color:(e.vars||e).palette.error.main}}))),fG=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=iG({props:n,muiFormControl:oG(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=lG(m);return(0,P.jsxs)(uG,{as:o,ownerState:m,className:k(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(dG,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function pG(e){return Qr(`MuiInputLabel`,e)}$r(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var mG=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=A({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${L(r)}`,o],asterisk:[s&&`asterisk`]},pG,t);return{...t,...c}},hG=I(fG,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cG.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(zo(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),gG=N.forwardRef(function(e,t){let n=Bo({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=oG(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=iG({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=mG(f);return(0,P.jsx)(hG,{"data-shrink":u,ref:t,className:k(p.root,s),...c,ownerState:f,classes:p})});function _G(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function vG(e,t=!1){return e&&(_G(e.value)&&e.value!==``||t&&_G(e.defaultValue)&&e.defaultValue!==``)}function yG(e){return e.startAdornment}function bG(e){return Qr(`MuiFormControl`,e)}$r(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var xG=e=>{let{classes:t,margin:n,fullWidth:r}=e;return A({root:[`root`,n!==`none`&&`margin${L(n)}`,r&&`fullWidth`]},bG,t)},SG=I(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${L(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),CG=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,...g}=n,_={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},v=xG(_),[y,b]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{if(!JL(t,[`Input`,`Select`]))return;let n=JL(t,[`Select`])?t.props.input:t;n&&yG(n.props)&&(e=!0)}),e}),[x,S]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{JL(t,[`Input`,`Select`])&&(vG(t.props,!0)||vG(t.props.inputProps,!0))&&(e=!0)}),e}),[C,w]=N.useState(!1);s&&C&&w(!1);let T=l!==void 0&&!s?l:C;N.useRef(!1);let E=N.useCallback(()=>{S(!0)},[]),D=N.useCallback(()=>{S(!1)},[]),O=N.useMemo(()=>({adornedStart:y,setAdornedStart:b,color:a,disabled:s,error:c,filled:x,focused:T,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{w(!1)},onFocus:()=>{w(!0)},onEmpty:D,onFilled:E,registerEffect:void 0,required:p,variant:h}),[y,a,s,c,x,T,u,d,void 0,D,E,p,m,h]);return(0,P.jsx)(aG.Provider,{value:O,children:(0,P.jsx)(SG,{as:o,ownerState:_,className:k(v.root,i),ref:t,...g,children:r})})}),wG=I(CG)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),TG=I(gG)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),EG=({label:e,className:t,children:n})=>(0,P.jsxs)(wG,{className:t,children:[(0,P.jsx)(TG,{shrink:!0,children:e}),n]});EG.propTypes={label:p.oneOfType([p.string,p.object]).isRequired,className:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var DG=I(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:kU()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:jU()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:jU()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:ZH()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${ZH()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),OG=/\\embed\{newLine\}\[\]/g,kG=`\\newline `,AG=`preview-prompt`,jG=class extends N.Component{static propTypes={prompt:p.string,tagName:p.string,className:p.string,onClick:p.func,defaultClassName:p.string,autoplayAudioEnabled:p.bool,customAudioButton:p.shape({playImage:p.string,pauseImage:p.string})};static defaultProps={onClick:()=>{}};promptRef=N.createRef();parsedText=e=>{let{customAudioButton:t}=this.props,n=document.createElement(`div`);n.innerHTML=e;let r=n.querySelector(`audio`);if(r){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,r.getAttribute(`src`)),r.removeAttribute(`src`),r.setAttribute(`id`,`pie-prompt-audio-player`),r.appendChild(e),t){r.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t.pauseImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),r.parentNode.insertBefore(e,r)}}return n.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof OW==`function`&&OW(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${AG}`.trim();return(0,P.jsx)(DG,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(OG,kG)}})}},MG=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-readable":e.false===void 0}))});MG.propTypes={children:p.node,false:p.bool};var NG=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-purpose":e.purpose}))});NG.propTypes={children:p.node,purpose:p.string};var PG;typeof window<`u`&&(PG=new DOMParser);var FG=e=>PG.parseFromString(e,`text/html`).body.textContent,IG=e=>{if(!e)return!1;let t=FG(e);return!!(t&&t.trim())},LG;typeof window<`u`&&(LG=new DOMParser);var RG=e=>{if(!e)return!1;let t=LG.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},zG=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAIRAxEAPwD1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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`;function BG(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function VG(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:dH(n,r),{props:s,internalRef:c}=mH({...a,externalSlotProps:o}),l=oR(c,o?.ref,e.additionalProps?.ref);return uH(t,{...s,ref:l},r)}var HG=N.createContext({});function UG(e){return Qr(`MuiList`,e)}$r(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var WG=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return A({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},UG,t)},GG=I(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),KG=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=N.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=WG(d);return(0,P.jsx)(HG.Provider,{value:u,children:(0,P.jsxs)(GG,{as:a,className:k(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),qG=zV;function JG(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function YG(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function XG(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function ZG(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!XG(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var QG=N.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=N.useRef(null),p=N.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});eR(()=>{r&&f.current.focus()},[r]),N.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${qG(QL(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=QV(XL(t));if(n===`ArrowDown`)e.preventDefault(),ZG(t,r,c,s,JG);else if(n===`ArrowUp`)e.preventDefault(),ZG(t,r,c,s,YG);else if(n===`Home`)e.preventDefault(),ZG(t,null,c,s,JG);else if(n===`End`)e.preventDefault(),ZG(t,null,c,s,YG);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&XG(r,i);i.previousKeyMatched&&(c||ZG(t,r,!1,s,JG,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=sR(f,t),g=-1;N.Children.forEach(a,(e,t)=>{if(!N.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=N.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),N.cloneElement(e,t)}return e});return(0,P.jsx)(KG,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function $G(e){return Qr(`MuiMenu`,e)}$r(`MuiMenu`,[`root`,`paper`,`list`]);var eK={vertical:`top`,horizontal:`right`},tK={vertical:`top`,horizontal:`left`},nK=e=>{let{classes:t}=e;return A({root:[`root`],paper:[`paper`],list:[`list`]},$G,t)},rK=I(GH,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),iK=I(WH,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),aK=I(QG,{name:`MuiMenu`,slot:`List`})({outline:0}),oK=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:g={},slotProps:_={},...v}=n,y=zi(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=nK(b),S=r&&!o&&l,C=N.useRef(null),w=(e,t)=>{C.current&&C.current.adjustStyleForScrollbar(e,{direction:y?`rtl`:`ltr`}),p&&p(e,t)},T=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},E=-1;N.Children.map(i,(e,t)=>{N.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||E===-1)&&(E=t))});let D={slots:g,slotProps:{list:s,transition:m,paper:u,..._}},O=VG({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[A,j]=hH(`paper`,{className:x.paper,elementType:iK,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[M,ee]=hH(`list`,{className:k(x.list,s.className),elementType:aK,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),te=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,P.jsx)(rK,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?eK:tK,slots:{root:g.root,paper:A,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:j,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...te,onEntering:(...e)=>{w(...e),te?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,P.jsx)(M,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...ee,children:i})})}),sK=({slotProps:e,...t})=>(0,P.jsx)(oK,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),cK=s({Collapsible:()=>MW,EnableAudioAutoplayImage:()=>zG,Feedback:()=>nW,HtmlAndMath:()=>rG,InlineMenu:()=>sK,InputContainer:()=>EG,PreviewLayout:()=>nG,PreviewPrompt:()=>jG,Purpose:()=>NG,Readable:()=>MG,UiLayout:()=>eG,color:()=>JH,hasMedia:()=>RG,hasText:()=>IG,indicators:()=>rW,transformDataHeadings:()=>BG,withUndoReset:()=>ZW}),lK=GL((0,P.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),uK=GL((0,P.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),dK=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},fK=e=>{let{direction:t,style:n}=e;return(0,P.jsx)(lK,{style:{transform:`rotate(${dK(t)}deg)`,...n}})};fK.propTypes={direction:p.string,style:p.object};var pK=({style:e})=>(0,P.jsxs)(`span`,{style:e,children:[(0,P.jsx)(uK,{style:{margin:`0 -16px`}}),(0,P.jsx)(uK,{})]});pK.propTypes={style:p.object},I(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`}));var mK=I(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:`120% !important`},"& mjx-frac":{fontSize:`120% !important`}}));function hK({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,N.useState)(null),l=(0,N.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,N.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,N.useEffect)(()=>{l.current&&typeof OW==`function`&&OW(l.current)},[a?.value,r,i?.value?.value]),(0,N.useEffect)(()=>{if(r&&l.current&&!s){let e=l.current;c({width:e.offsetWidth,height:e.offsetHeight})}else!r&&s&&c(null)},[r,s]);let d=i&&r?i.value.value:a.value||`\xA0`,f=n?`\xA0`:d,p=f!==`\xA0`,m=i&&r,h=o?`2px solid ${dU()}`:m?`1px solid ${G.BORDER_DARK}`:`1px solid ${G.BORDER_LIGHT}`;return(0,P.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${G.BORDER_LIGHT}`:`${G.WHITE}`,border:h,boxSizing:`border-box`,borderRadius:`3px`,overflow:`hidden`,position:`relative`,padding:`8px 8px 8px 35px`,width:s?s.width:void 0,height:s?s.height:void 0,touchAction:`none`},"data-key":e.index,contentEditable:!1,children:[p&&(0,P.jsx)(pK,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,P.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}hK.propTypes={n:p.object,children:p.node,isDragging:p.bool,isOver:p.bool,dragItem:p.object,value:p.object,selected:p.bool};function gK({value:e,disabled:t,instanceId:n,children:r,n:i,onChange:a,removeResponse:o,duplicates:s,pos:c,selected:l}){let{attributes:u,listeners:d,setNodeRef:f,isDragging:p}=rV({id:`drag-${i.index}`,disabled:t||!e?.value,data:{id:`drag-${i.index}`,value:e,instanceId:n,n:i,pos:c,opts:{duplicates:s},type:`drag-in-the-blank-placed-choice`,fromChoice:!e,onRemove:e=>o(e),onDrop:(e,t)=>{t?.type===`drag-in-the-blank-drop-choice`&&(a(e),!s&&e.fromChoice&&o(e))}}}),{setNodeRef:m,isOver:h,active:g}=oV({id:`drop-${i.index}`,data:{type:`drag-in-the-blank-drop-choice`,accepts:[`drag-in-the-blank-choice`,`drag-in-the-blank-placed-choice`],instanceId:n,value:e,id:`drop-${i.index}`,pos:c,n:i,opts:{duplicates:s},onDrop:(e,t)=>{if(t?.type===`drag-in-the-blank-drop-choice`&&e.value.id!==t.value.id){if(e.type===`drag-in-the-blank-choice`){a(e),!s&&e.fromChoice&&o(e);return}e.type===`drag-in-the-blank-placed-choice`&&(o(t),a(e),setTimeout(()=>o(e),10))}}}}),_=e=>{f(e),m(e)},v=(0,P.jsx)(hK,{n:i,isDragging:p,isOver:h,dragItem:g?.data?.current,value:e,selected:l,children:r}),y=e?(0,P.jsx)(`span`,{ref:_,...u,...d,children:v}):(0,P.jsx)(`span`,{ref:m,children:v});return(0,P.jsx)(mK,{className:k(h&&`over`),children:y})}gK.propTypes={value:p.object,disabled:p.bool,instanceId:p.string,children:p.node,n:p.object.isRequired,onChange:p.func.isRequired,removeResponse:p.func.isRequired,duplicates:p.bool,selected:p.bool};var _K=(e,t,n,r)=>{let{tr:i}=e.state;i.setNodeMarkup(n,void 0,{...t.attrs,...r.value}),i.isDone=!0,e.view.dispatch(i)},vK=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,w(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},yK=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,P.jsx)(iS,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,P.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,P.jsx)(gK,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>_K(t,n,c,e),removeResponse:e=>vK(t,n,e)})})})};yK.propTypes={attributes:p.object,data:p.object,n:p.object,nodeProps:p.object,opts:p.object};var bK=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div> </div>`,u=r(),d=(0,N.useRef)(null),f=(0,N.useRef)(null),p=(0,N.useRef)(!1),m=(0,N.useRef)(null),h=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[g,_]=(0,N.useState)(!1),[v,y]=(0,N.useState)({top:0,left:0}),b=()=>{h()||(_(!1),i.onInlineDropdownToolbarClose?.(t))},x=i.respAreaToolbar([n,u],t,b),S=()=>{let{tr:e}=t.state,n=e.doc.nodeAt(u);if(!n)return;let{selection:r}=e;r.from===u&&r.to===u+n.nodeSize||(e.setSelection(U.create(e.doc,u)),t.view.dispatch(e))},C=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,b()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,_(!0),setTimeout(S,0)})):b())};(0,N.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&_(!0):g&&C()},[t,n,a]);let w=e=>e.clientX>document.documentElement.clientWidth||e.clientY>document.documentElement.clientHeight||e.target===document.documentElement;return(0,N.useEffect)(()=>{m.current&&typeof OW==`function`&&OW(m.current)},[s]),(0,N.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);y({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{if(w(e))return;let n=e.target.closest(`[data-toolbar-for]`);!e.target.closest(`[data-inline-dropdown-toolbar]`)&&(!n||n.dataset.toolbarFor!==f.current?.instanceId)&&!t._toolbarOpened&&d.current&&!d.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&C()};return g?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[g,n]),(0,P.jsxs)(iS,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,P.jsxs)(`div`,{ref:m,style:{display:`inline-flex`,minWidth:`178px`,height:`36px`,background:`#FFF`,border:`1px solid #C0C3CF`,boxSizing:`border-box`,borderRadius:`3px`,margin:`0 2px`,position:`relative`,alignItems:`center`},onClick:()=>_(!0),children:[(0,P.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,P.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,P.jsx)(fK,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),g&&(0,P.jsxs)(N.Fragment,{children:[zx.createPortal((0,P.jsx)(`div`,{ref:d,children:(0,P.jsx)(x,{editorCallback:e=>{f.current=e}})}),t?._tiptapContainerEl||document.body),t._tiptapContainerEl&&zx.createPortal((0,P.jsx)(Lz,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),zz(t,!1),delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),_(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};bK.propTypes={attributes:p.object,selectedItem:p.oneOfType([p.string,p.object])};var xK=s({greaterThan:()=>wK,greaterThanEqual:()=>EK,lessThan:()=>CK,lessThanEqual:()=>TK}),SK=e=>({...e,category:`comparison`}),CK=SK({name:`Less than`,latex:`<`,command:`\\lt`}),wK=SK({name:`Greater than`,latex:`>`,command:`\\gt`}),TK=SK({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),EK=SK({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),DK=e=>t=>({...t,category:e}),OK=(e=[])=>{let t=[];T(5,()=>t.push([]));let n=e.length,r=0,i=0;for(;i<n;)t[r++].push(e[i++]),r===5&&(r=0);return t},kK=e=>t=>{let n=y(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},AK=(e=[],t=[])=>{t=t.filter(kK(e));let n=[];T(5-e.length,()=>e.push([])),T(5,()=>n.push([]));let r=OK(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},jK=s({theta:()=>FK,x:()=>NK,y:()=>PK}),MK=DK(`vars`),NK=MK({name:`X`,latex:`x`,write:`x`}),PK=MK({name:`Y`,latex:`y`,write:`y`}),FK=MK({name:`Theta`,latex:`\\theta`,write:`\\theta`}),IK=s({blankOverBlank:()=>RK,xBlankBlank:()=>BK,xOverBlank:()=>zK}),LK=DK(`fractions`),RK=LK({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),zK=LK({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),BK=LK({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),VK=s({nthRoot:()=>KK,squareRoot:()=>GK,squared:()=>UK,xToPowerOfN:()=>WK}),HK=DK(`exponent`),UK=HK({name:`Squared`,latex:`x^2`,write:`^2`}),WK=HK({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),GK=HK({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),KK=HK({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),qK=s({absValue:()=>XK,approx:()=>eq,brackets:()=>QK,nApprox:()=>tq,notEqual:()=>nq,notSimilar:()=>iq,parenthesis:()=>ZK,percentage:()=>$K,plusMinus:()=>YK,similar:()=>rq}),JK=DK(`misc`),YK=JK({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),XK=JK({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),ZK=JK({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),QK=JK({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),$K=JK({name:`Percent`,latex:`%`,command:`%`}),eq=JK({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),tq=JK({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),nq=JK({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),rq=JK({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),iq=JK({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),aq=s({eulers:()=>cq,halfInfinity:()=>uq,infinity:()=>lq,pi:()=>sq}),oq=DK(`constants`),sq=oq({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),cq=oq({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),lq=oq({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),uq=oq({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),dq=s({cos:()=>mq,cot:()=>vq,csc:()=>_q,sec:()=>gq,sin:()=>pq,tan:()=>hq}),fq=DK(`trigonometry`),pq=fq({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),mq=fq({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),hq=fq({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),gq=fq({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),_q=fq({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),vq=fq({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),yq=s({angle:()=>Oq,circledDot:()=>Pq,congruentTo:()=>Lq,degree:()=>Fq,doublePrimeArcSecond:()=>Bq,leftArrow:()=>Vq,leftrightArrow:()=>Uq,measureOfAngle:()=>Aq,notCongruentTo:()=>Rq,notParallel:()=>Eq,overArc:()=>kq,overLeftRightArrow:()=>Cq,overRightArrow:()=>Sq,overline:()=>xq,parallel:()=>Tq,parallelogram:()=>Nq,perpindicular:()=>Dq,primeArcminute:()=>zq,rightArrow:()=>Hq,segment:()=>wq,similarTo:()=>Iq,square:()=>Mq,triangle:()=>jq}),bq=e=>({...e,category:`geometry`}),xq=bq({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),Sq=bq({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),Cq=bq({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),wq=bq({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),Tq=bq({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),Eq=bq({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),Dq=bq({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),Oq=bq({name:`Angle`,latex:`\\angle`,command:`\\angle`}),kq=bq({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),Aq=bq({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),jq=bq({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),Mq=bq({name:`Square`,latex:`\\square`,command:`\\square`}),Nq=bq({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),Pq=bq({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),Fq=bq({name:`Degree`,latex:`\\degree`,command:`\\degree`}),Iq=bq({name:`Similar`,command:`\\sim`,latex:`\\sim`}),Lq=bq({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),Rq=bq({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),zq=bq({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),Bq=bq({name:`Double Prime`,latex:`''`,write:`''`}),Vq=bq({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),Hq=bq({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),Uq=bq({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),Wq=s({circleDot:()=>Gq}),Gq=DK(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),Kq=s({ln:()=>Xq,log:()=>Jq,logSubscript:()=>Yq}),qq=DK(`log`),Jq=qq({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),Yq=qq({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),Xq=qq({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),Zq=s({subscript:()=>eJ,superscript:()=>$q}),Qq=DK(`sub-sup`),$q=Qq({name:`Superscript`,latex:`x^{}`,command:`^`}),eJ=Qq({name:`Subscript`,latex:`x_{}`,command:`_`}),tJ=s({mu:()=>aJ,sigma:()=>oJ,smallSigma:()=>sJ,xBar:()=>rJ,yBar:()=>iJ}),nJ=DK(`statistics`),rJ=nJ({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),iJ=nJ({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),aJ=nJ({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),oJ=nJ({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),sJ=nJ({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),cJ=s({divide:()=>pJ,equals:()=>uJ,minus:()=>fJ,multiply:()=>mJ,plus:()=>dJ}),lJ=DK(`operators`),uJ=lJ({write:`=`,label:`=`}),dJ=lJ({write:`+`,label:`+`}),fJ=lJ({write:`−`,label:`−`}),pJ=lJ({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),mJ=lJ({name:`multiply`,label:`×`,command:`\\times`}),hJ=s({doubleCellMatrix:()=>vJ,singleCellMatrix:()=>_J}),gJ=DK(`matrices`),_J=gJ({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),vJ=gJ({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),yJ={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},bJ=T(10,String).map(e=>({name:yJ[e],write:e,label:e,category:`digit`})).reduce((e,t)=>(e[t.name]=t,e),{comma:{name:`comma`,label:`,`,write:`,`,category:`digit`},decimalPoint:{name:`decimal-point`,label:`.`,write:`.`,category:`digit`}}),xJ=DK(`logic`),SJ=xJ({name:`Therefore`,label:`∴`,write:`∴`}),CJ=xJ({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),wJ=DK(`navigation`),TJ=wJ({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),EJ=wJ({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),DJ={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},OJ=[[RK,$K,NK,UK,GK],[Gq,PK,eJ,WK,KK],[YK,CK,wK,TK,EK],[sq,FK,ZK,QK,XK],[nq,pq,mq,hq,Fq]],kJ=(()=>{let e=[...OJ.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(Jq),e[2].push(Yq),e[3].push(Xq),e[4].push(cq),e})(),AJ=(()=>{let e=[...OJ.map(e=>[...e])];return e[0].push(aJ),e[1].push(rJ),e[2].push(iJ),e[3].push(oJ),e[4].push(sJ),e})(),jJ=[{predicate:e=>e>=3&&e<=5,set:[[CK,wK],[zK,BK],[NK,CJ],[UK,WK]]},{predicate:e=>e>=6&&e<=7,set:[[Fq,CK,wK],[Gq,TK,EK],[NK,PK,UK,WK],[YK,zK,BK,GK],[sq,ZK,XK,KK]]},{predicate:e=>e>=8||e===`HS`,set:OJ},{predicate:`non-negative-integers`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[TJ,EJ,DJ]]},{predicate:`integers`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,{name:``,latex:``,write:``},fJ],[TJ,EJ,DJ]]},{predicate:`decimals`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,bJ.decimalPoint,fJ],[TJ,EJ,DJ]]},{predicate:`fractions`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,RK,fJ],[TJ,EJ,DJ]]},{predicate:`geometry`,set:[[RK,Fq,zq,Bq,Lq,Iq],[Gq,Oq,Aq,jq,Rq,iq],[pq,mq,hq,sq,GK,KK],[_q,gq,vq,FK,eJ,WK],[xq,Sq,Cq,kq,Dq,Tq]]},{predicate:`advanced-algebra`,set:kJ},{predicate:`statistics`,set:AJ},{predicate:`item-authoring`,set:[[pJ,RK,CJ,uq,UK,GK,xq,Sq,Cq,Jq],[mJ,Gq,{name:``,latex:``,write:``},eJ,WK,KK,Dq,Tq,kq,Yq],[YK,sq,FK,Fq,Oq,Vq,Hq,jq,Mq,Xq],[nq,XK,sJ,aJ,SJ,oJ,Uq,pq,mq,hq],[TK,EK,{name:``,latex:``,write:``},{name:``,latex:``,write:``},lq,{name:``,latex:``,write:``},{name:``,latex:``,write:``},_q,gq,vq]]},{predicate:e=>e>=1&&e<=2,set:[]}],MJ=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=jJ.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return jJ[2].set},NJ=[...Object.values(cJ),...Object.values(xK),...Object.values(aq),...Object.values(bJ),...Object.values(VK),...Object.values(IK),...Object.values(yq),...Object.values(Kq),...Object.values(hJ),...Object.values(qK),...Object.values(Wq),...Object.values(tJ),...Object.values(Zq),...Object.values(dq),...Object.values(jK)],PJ=e=>(e||[]).map(e=>{let{latex:t}=e,n=(NJ||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),FJ=()=>{(Array.from(document.querySelectorAll(`span[mathquill-command-id]`))||[]).forEach(e=>{e&&e.innerText===`∥`&&e.className!==`mq-editable-field`&&(e.style.fontSize=`32px`),(e.innerText===`′`||e.innerText===`′′`)&&!e.hasAttribute(`data-prime`)&&e.setAttribute(`data-prime`,`true`)})},{one:IJ,two:LJ,three:RJ,four:zJ,five:BJ,six:VJ,seven:HJ,eight:UJ,nine:WJ,zero:GJ,comma:KJ,decimalPoint:qJ}=bJ,JJ=[[HJ,UJ,WJ,pJ],[zJ,BJ,VJ,mJ],[IJ,LJ,RJ,fJ],[GJ,qJ,KJ,dJ],[TJ,EJ,DJ,uJ]];function K(e){this.elements=Array.isArray(e)?e:[e].filter(Boolean),this.length=this.elements.length;for(var t=0;t<this.elements.length;t++)this[t]=this.elements[t]}K.prototype.addClass=function(e){var t=(e||``).split(/\s+/).filter(Boolean);return this.elements.forEach(function(e){t.forEach(function(t){e.classList.add(t)})}),this},K.prototype.removeClass=function(e){return this.elements.forEach(function(t){e?(e||``).split(/\s+/).filter(Boolean).forEach(function(e){t.classList.remove(e)}):t.className=``}),this},K.prototype.toggleClass=function(e,t){var n=(e||``).split(/\s+/).filter(Boolean),r=arguments.length>1?!!t:null;return this.elements.forEach(function(e){n.forEach(function(t){r===null?e.classList.toggle(t):e.classList.toggle(t,r)})}),this},K.prototype.attr=function(e,t){return t===$J?this.elements[0]?this.elements[0].getAttribute(e):$J:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},K.prototype.html=function(e){return e===$J?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},K.prototype.append=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},K.prototype.prepend=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e,n){var r=n===0?t:t.cloneNode(!0);e.insertBefore(r,e.firstChild)}),this},K.prototype.wrapAll=function(e){if(!this.elements.length)return this;var t;if(typeof e==`string`&&e.trim().indexOf(`<`)===0){var n=document.createElement(`div`);n.innerHTML=e.trim(),t=n.firstChild}else if(e instanceof K)t=e.elements[0];else if(e&&e.nodeType)t=e;else return this;var r=this.elements[0],i=r.parentNode;return i&&(i.insertBefore(t,r),this.elements.forEach(function(e){t.appendChild(e)})),this},K.prototype.appendTo=function(e){var t=e instanceof K?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},K.prototype.prependTo=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.firstChild;return this.elements.forEach(function(e){t.insertBefore(e,n),n=e}),this},K.prototype.insertBefore=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},K.prototype.insertAfter=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode,r=t.nextSibling;return n&&this.elements.forEach(function(e){n.insertBefore(e,r),r=e}),this},K.prototype.replaceWith=function(e){var t=[];return e instanceof K?t=e.elements.slice():e&&typeof e.length==`number`&&!e.tagName?t=Array.from(e):e&&e.nodeType&&(t=[e]),this.elements.forEach(function(e){var n=e.parentNode;n&&(t.forEach(function(t){n.insertBefore(t,e)}),n.removeChild(e))}),this},K.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},K.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},K.prototype.children=function(e){var t=[];return this.elements.forEach(function(n){var r;if(!e)r=Array.from(n.children);else if(e===`:first`)r=n.firstElementChild?[n.firstElementChild]:[];else if(e===`:last`)r=n.lastElementChild?[n.lastElementChild]:[];else{var i=/^:eq\((\d+)\)$/.exec(e);if(i){var a=parseInt(i[1],10),o=Array.from(n.children);r=o[a]?[o[a]]:[]}else r=Array.from(n.querySelectorAll(`:scope > `+e))}t.push.apply(t,r)}),new K(t)},K.prototype.find=function(e){var t=[];return this.elements.forEach(function(n){var r=Array.from(n.querySelectorAll(e));t.push.apply(t,r)}),new K(t)},K.prototype.closest=function(e){return new K(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},K.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new K(e)},K.prototype.filter=function(e){return new K(this.elements.filter(function(t,n){return e(n,t)}))},K.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},K.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},K.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function YJ(e){return(e||``).split(`.`)[0]}K.prototype.on=function(e,t){var n=YJ(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},K.prototype.bind=function(e,t,n){var r=this;if(typeof e==`object`){for(var i in e)e.hasOwnProperty(i)&&r.bind(i,e[i]);return this}var a=typeof t==`function`?t:n;return a===!1&&(a=function(e){e.preventDefault()}),(e||``).split(/\s+/).filter(Boolean).forEach(function(e){var t=YJ(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},K.prototype.off=function(e,t){var n=YJ(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},K.prototype.unbind=function(e,t){if(e&&e.includes(`.`))this.elements.forEach(function(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.replaceChild(t,e)});else if(e&&t){var n=YJ(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},K.prototype.trigger=function(e){var t=new Event(YJ(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},K.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},K.prototype.blur=function(e){return typeof e==`function`?this.on(`blur`,e):(this.elements.forEach(function(e){e.blur&&e.blur()}),this)},[`mousemove`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`click`,`keydown`,`keypress`,`keyup`,`focusout`,`paste`,`cut`,`copy`,`input`,`load`].forEach(function(e){K.prototype[e]=function(t){return this.on(e,t)}}),K.prototype.next=function(e){return new K(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.prev=function(e){return new K(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.parent=function(){return new K(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},K.prototype.offset=function(){if(!this.elements[0])return{top:0,left:0};var e=this.elements[0].getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}},K.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},K.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},K.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},K.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},K.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},K.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},K.prototype.css=function(e,t){if(t===$J){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):$J}}else this.elements.forEach(function(n){n.style[e]=t});return this},K.prototype.scrollTop=function(e){var t=this.elements[0];return e===$J?t?t===window?window.pageYOffset||document.documentElement.scrollTop:t.scrollTop:0:(t===window?window.scrollTo(window.pageXOffset||0,e):this.elements.forEach(function(t){t.scrollTop=e}),this)},K.prototype.scrollLeft=function(e){var t=this.elements[0];return e===$J?t?t===window?window.pageXOffset||document.documentElement.scrollLeft:t.scrollLeft:0:(t===window?window.scrollTo(e,window.pageYOffset||0):this.elements.forEach(function(t){t.scrollLeft=e}),this)},K.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},K.prototype.eq=function(e){return new K([this.elements[e]])},K.prototype.get=function(e){return e===$J?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},K.prototype.add=function(e){var t=this.elements.slice();return e instanceof K?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new K(t)},K.prototype.first=function(){return new K([this.elements[0]])},K.prototype.last=function(){return new K([this.elements[this.elements.length-1]])},K.prototype.index=function(e){if(!e){var t=this.elements[0]&&this.elements[0].parentElement;return t?Array.from(t.children).indexOf(this.elements[0]):-1}var n=e instanceof K?e.elements[0]:e;return this.elements.indexOf(n)},K.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},K.prototype.text=function(e){return e===$J?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},K.prototype.val=function(e){var t=this.elements[0];return t?e===$J?t.value===$J?t.textContent:t.value:(this.elements.forEach(function(t){t.value===$J?t.textContent=e:t.value=e}),this):$J};function XJ(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(K.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var ZJ=function(e,t){var n;if(!e)n=[];else if(e===window||e===document)n=[e];else if(e.nodeType)n=[e];else if(e&&e.current&&e.current.nodeType)n=[e.current];else if(typeof e==`string`&&e[0]===`<`){var r=document.createElement(`div`);r.innerHTML=e.trim(),n=Array.from(r.children)}else if(typeof e==`string`){var i=t instanceof K?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof K?e.elements:e.length===$J?[]:Array.from(e);return XJ(n)};ZJ.contains=function(e,t){return e!==t&&e.contains(t)};var QJ=ZJ,$J,eY=`mathquill-command-id`,tY=`mathquill-block-id`,nY=Math.min,rY=Math.max;function iY(){}var aY=[].slice;function oY(e){var t=e.length-1;return function(){var n=aY.call(arguments,0,t),r=aY.call(arguments,t);return e.apply(this,n.concat([r]))}}var sY=oY(function(e,t){return oY(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function cY(e){return oY(function(t,n){return typeof t!=`function`&&(t=sY(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function q(e){var t=aY.call(arguments,1);return function(){return e.apply(this,t)}}function lY(e,t){if(!t)throw Error(`prayer failed: `+e)}var J=(function(e,t,n){function r(e){return typeof e==`object`}function i(e){return typeof e==`function`}function a(){}return function o(s,c){c===n&&(c=s,s=Object);function l(){var e=new u;return i(e.init)&&e.init.apply(e,arguments),e}function u(){}l.Bare=u;var d=a[e]=s[e],f=u[e]=l[e]=l.p=new a,p;return f.constructor=l,l.extend=function(e){return o(l,e)},(l.open=function(e){if(p={},i(e)?p=e.call(l,f,d,l,s):r(e)&&(p=e),r(p))for(var n in p)t.call(p,n)&&(f[n]=p[n]);return i(f.init)||(f.init=s),l})(c)}})(`prototype`,{}.hasOwnProperty),Y=-1,X=1;function uY(e){lY(`a direction was passed`,e===Y||e===X)}var dY=J(function(e){e.parent=0,e[Y]=0,e[X]=0,e.init=function(e,t,n){this.parent=e,this[Y]=t,this[X]=n},this.copy=function(e){return dY(e.parent,e[Y],e[X])}}),fY=J(function(e){e[Y]=0,e[X]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),fY.byId[this.id]=this,this.ends={},this.ends[Y]=0,this.ends[X]=0},e.dispose=function(){delete fY.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=ZJ(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=ZJ(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&fY.byId[n].jQadd(e),r&&fY.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){uY(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[Y],t[X]),n},e.createLeftOf=function(e){return this.createDir(Y,e)},e.selectChildren=function(e,t){return vY(e,t)},e.bubble=cY(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=cY(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[Y]===0&&this.ends[X]===0},e.isStyleBlock=function(){return!1},e.children=function(){return mY(this.ends[Y],this.ends[X])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return mY(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return mY(this,this).adopt(e,t,n),this},e.disown=function(){return mY(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function pY(e,t,n){lY(`a parent is always present`,e),t&&(t[X]!==n&&(t[X]=n),t.parent!==e&&(t.parent=e)),n&&(n[Y]!==t&&(n[Y]=t),n.parent!==e&&(n.parent=e)),lY(`leftward is properly set up`,(function(){return t?t[X]===n&&t.parent===e:e.ends[Y]===n})()),lY(`rightward is properly set up`,(function(){return n?n[Y]===t&&n.parent===e:e.ends[X]===t})())}var mY=J(function(e){e.init=function(e,t,n){if(n===$J&&(n=Y),uY(n),lY(`no half-empty fragments`,!e==!t),this.ends={},e){lY(`withDir is passed to Fragment`,e instanceof fY),lY(`oppDir is passed to Fragment`,t instanceof fY),lY(`withDir and oppDir have the same parent`,e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],function(e,t){return e.push.apply(e,t.jQ.get()),e});this.jQ=this.jQ.add(r)}},e.jQ=ZJ(),e.withDirAdopt=function(e,t,n,r){return e===Y?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){pY(e,t,n);var r=this;r.disowned=!1;var i=r.ends[Y];if(!i)return this;var a=r.ends[X];return t||(e.ends[Y]=i),n?n[Y]=a:e.ends[X]=a,r.ends[X][X]=n,r.each(function(n){n[Y]=t,n.parent=e,t&&(t[X]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[Y];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[X],r=t.parent;return pY(r,t[Y],t),pY(r,n,n[X]),t[Y]?t[Y][X]=n[X]:r.ends[Y]=n[X],n[X]?n[X][Y]=t[Y]:r.ends[X]=t[Y],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=cY(function(e){var t=this,n=t.ends[Y];if(!n)return t;for(;n!==t.ends[X][X]&&e(n)!==!1;n=n[X]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Z={},hY={},gY={},_Y=J(dY,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=ZJ(`<span class="mq-cursor">​</span>`);this.blink=function(){n.toggleClass(`mq-blink`)},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass(`mq-blink`),`intervalId`in this?clearInterval(this.intervalId):(this[X]?this.selection&&this.selection.ends[Y][Y]===this[Y]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[X].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return`intervalId`in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=ZJ(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return uY(e),!t||!t.jQ?this:(this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass(`mq-hasCursor`),this)},e.insLeftOf=function(e){return this.insDirOf(Y,e)},e.insRightOf=function(e){return this.insDirOf(X,e)},e.insAtDirEnd=function(e,t){return uY(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(Y,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(X,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=dY.copy(n);var r=n.upDownCache[t.id];if(r)r[X]?n.insLeftOf(r[X]):n.insAtRightEnd(r.parent);else{var i=n.offset().left;t.seek(i,n)}},e.offset=function(){var e=this,t=e.jQ.removeClass(`mq-cursor`).offset();return e.jQ.addClass(`mq-cursor`),t},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[X],r=this,i=e[Y];if(e.disown().eachChild(function(r){r.isEmpty()||(r.children().adopt(t,i,n).each(function(t){t.jQ.insertBefore(e.jQ.first())}),i=r.ends[X])}),!this[X])if(this[Y])this[X]=this[Y][X];else for(;!this[X];)if(this.parent=this.parent[X],this.parent)this[X]=this.parent.ends[Y];else{this[X]=e[X],this.parent=t;break}this[X]?this.insLeftOf(this[X]):this.insAtRightEnd(t),e.jQ.remove(),e[Y].siblingDeleted&&e[Y].siblingDeleted(r.options,X),e[X].siblingDeleted&&e[X].siblingDeleted(r.options,Y)},e.startSelection=function(){for(var e=this.anticursor=dY.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(!e||!e.ancestors||this[Y]===e[Y]&&this.parent===e.parent)return!1;for(var t,n=this;n.parent;n=n.parent)if(n.parent.id in e.ancestors){t=n.parent;break}if(!t)return!1;var r=e.ancestors[t.id],i,a,o=X;if(n[Y]!==r){for(var s=n;s;s=s[X])if(s[X]===r[X]){o=Y,i=n,a=r;break}}return o===X&&(i=r,a=n),i instanceof dY&&(i=i[X]),a instanceof dY&&(a=a[Y]),!i||!a?!1:(this.hide().selection=t.selectChildren(i,a),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0)},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[Y]=this.selection.ends[Y][Y],this[X]=this.selection.ends[X][X],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[Y]=e.ends[Y][Y],this[X]=e.ends[X][X],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof zY);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==$J)return this.depth()+(e||0)>this.options.maxDepth},e.howDeep=function(){for(var e=0,t=this;t=t.parent;)e++;return 1+Math.floor(e/2)},e.tooDeep=function(){var e=this.options.maxDepth;return e&&this.howDeep()>e}}),vY=J(mY,function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll(`<span class="mq-selection"></span>`).parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){var e=this.jQ[0];return e&&this.jQ.replaceWith(e.childNodes),this},e.join=function(e){return this.fold(``,function(t,n){return t+n[e]()})}}),yY=J(function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=_Y(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===Y||t===X?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}}),bY={},xY=J(),SY={},CY=J(),wY={};function TY(){window.console&&console.warn(`You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:
|
|
314
|
+
`,gz=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return _({root:[`root`,n,`color${L(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,`circle${L(n)}`,i&&`circleDisableShrink`]},uz,t)},_z=F(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${L(n.color)}`]]}})(Do(({theme:e})=>({display:`inline-block`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`transform`)}},{props:{variant:`indeterminate`},style:mz||{animation:`${fz} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),vz=F(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),yz=F(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,t[`circle${L(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Do(({theme:e})=>({stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{transition:e.transitions.create(`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:hz||{animation:`${pz} 1.4s ease-in-out infinite`}}]}))),bz=F(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(Do(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),xz=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,size:s=40,style:c,thickness:l=3.6,value:u=0,variant:d=`indeterminate`,...f}=n,p={...n,color:i,disableShrink:a,size:s,thickness:l,value:u,variant:d,enableTrackSlot:o},m=gz(p),h={},_={},v={};if(d===`determinate`){let e=2*Math.PI*((dz-l)/2);h.strokeDasharray=e.toFixed(3),v[`aria-valuenow`]=Math.round(u),h.strokeDashoffset=`${((100-u)/100*e).toFixed(3)}px`,_.transform=`rotate(-90deg)`}return(0,N.jsx)(_z,{className:g(m.root,r),style:{width:s,height:s,..._,...c},ownerState:p,ref:t,role:`progressbar`,...v,...f,children:(0,N.jsxs)(vz,{className:m.svg,ownerState:p,viewBox:`${dz/2} ${dz/2} ${dz} ${dz}`,children:[o?(0,N.jsx)(bz,{className:m.track,ownerState:p,cx:dz,cy:dz,r:(dz-l)/2,fill:`none`,strokeWidth:l,"aria-hidden":`true`}):null,(0,N.jsx)(yz,{className:m.circle,style:h,ownerState:p,cx:dz,cy:dz,r:(dz-l)/2,fill:`none`,strokeWidth:l})]})})});function Sz(e){return Br(`MuiIconButton`,e)}var Cz=Vr(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),wz=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return _({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${L(r)}`,i&&`edge${L(i)}`,`size${L(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},Sz,t)},Tz=F(cz,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${L(n.color)}`],n.edge&&t[`edge${L(n.edge)}`],t[`size${L(n.size)}`]]}})(Do(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),Do(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Cz.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${Cz.loading}`]:{color:`transparent`}}))),Ez=F(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),Dz=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=tR(u),h=f??(0,N.jsx)(xz,{"aria-labelledby":m,color:`inherit`,size:16}),_={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},v=wz(_);return(0,N.jsxs)(Tz,{id:d?m:u,className:g(v.root,a),centerRipple:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:_,children:[typeof d==`boolean`&&(0,N.jsx)(`span`,{className:v.loadingWrapper,style:{display:`contents`},children:(0,N.jsx)(Ez,{className:v.loadingIndicator,ownerState:_,children:d&&h})}),i]})}),Oz=GL((0,N.jsx)(`path`,{d:`M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z`}),`Delete`),kz=`pie-toolbar`,Az=GL((0,N.jsx)(`path`,{d:`M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z`}),`Check`),jz=F(Dz)({verticalAlign:`top`,width:`28px`,height:`28px`,color:`var(--editable-html-toolbar-check, #00bb00)`,padding:`4px`}),Mz=({onClick:e,doneButtonRef:t})=>(0,N.jsx)(jz,{"aria-label":`Done`,buttonRef:t,onClick:e,children:(0,N.jsx)(Az,{})});Mz.propTypes={onClick:p.func,doneButtonRef:p.func};var Nz=Mz,Pz=F(`div`,{shouldForwardProp:e=>![`showDone`,`toolbarAlignment`,`isFocused`,`autoWidth`,`isHidden`].includes(e)})(({showDone:e,toolbarAlignment:t,isFocused:n,autoWidth:r,isHidden:i})=>({position:`absolute`,zIndex:10,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:e?`280px`:`265px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:1,...t===`right`&&{right:0},...r?{width:`auto`}:{width:`100%`},...i&&{visibility:`hidden`}})),Fz=F(Dz)({width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`}),Iz=F(`div`)({display:`flex`});function Lz(e){let{children:t,deletable:n,toolbarOpts:r,autoWidth:i,isFocused:a,doneButtonRef:o,onDelete:s,showDone:c,onDone:l,style:u}=e,d=r.minWidth===void 0?{}:{minWidth:r.minWidth};return(0,N.jsxs)(Pz,{className:kz,showDone:c,toolbarAlignment:r.alignment,isFocused:r.alwaysVisible||a,autoWidth:i,isHidden:r.isHidden===!0,style:{...d,...u},children:[t,(0,N.jsxs)(Iz,{children:[n&&(0,N.jsx)(Fz,{"aria-label":`Delete`,onMouseDown:e=>s?.(e),children:(0,N.jsx)(Oz,{})}),c&&(0,N.jsx)(Nz,{doneButtonRef:o,onClick:l})]})]})}var Rz=`toolbarOpenedChanged`,zz=(e,t)=>{let n=!!t;e._toolbarOpened!==n&&(e._toolbarOpened=n,e?.view&&e?.state?.tr&&e.view.dispatch(e.state.tr.setMeta(Rz,!0)))},Bz=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s}=o,{respAreaToolbar:c,error:l}=i,u=r(),[d,f]=(0,S.useState)(!1),p=c([n,u],t,()=>{}),m=(0,S.useRef)(null),h;if(l){let e=l(),t=parseInt(o.index,10);h=!!e?.[t]?.[0]}return(0,S.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&f(a):f(a)},[t,n,a]),(0,S.useEffect)(()=>{let e=e=>{!(e.target.closest(`.insert-character-dialog`)||e.target.closest(`[data-toolbar-for]`))&&m.current&&!m.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&f(!1)};return d?document.addEventListener(`mousedown`,e):document.removeEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[d]),(0,N.jsxs)(iS,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline-flex`,minHeight:`55px`,position:`relative`,cursor:`pointer`},children:[(0,N.jsx)(`div`,{...o,style:{display:`inline-flex`,width:`100%`,minHeight:`46px`,height:`46px`,backgroundColor:`#FFF`,border:`1px solid ${h?`red`:`#C0C3CF`}`,boxSizing:`border-box`,borderRadius:`4px`,overflow:`hidden`,padding:`12px 21px`,margin:`0 4px`,minWidth:`178px`,visibility:d?`hidden`:`visible`},onClick:()=>f(!0),dangerouslySetInnerHTML:{__html:s||`<div> </div>`}}),d&&(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(`div`,{ref:m,className:`absolute z-50 bg-white shadow-lg rounded p-2`,style:{zIndex:1},children:(0,N.jsx)(p,{})}),t._tiptapContainerEl&&zx.createPortal((0,N.jsx)(Lz,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),zz(t,!1),t.view.dispatch(e),f(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};Bz.propTypes={attributes:p.object,error:p.any,value:p.string,isFocused:p.bool};var Vz=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Hz(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Uz(e){return`nodeType`in e}function Wz(e){return e?Hz(e)?e:Uz(e)?e.ownerDocument?.defaultView??window:window:window}function Gz(e){let{Document:t}=Wz(e);return e instanceof t}function Kz(e){return!Hz(e)&&e instanceof Wz(e).HTMLElement}function qz(e){return e instanceof Wz(e).SVGElement}function Jz(e){return e?Hz(e)?e.document:Uz(e)?Gz(e)?e:Kz(e)||qz(e)?e.ownerDocument:document:document:document}var Yz=Vz?S.useLayoutEffect:S.useEffect;function Xz(e){let t=(0,S.useRef)(e);return Yz(()=>{t.current=e}),(0,S.useCallback)(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}function Zz(e,t){t===void 0&&(t=[e]);let n=(0,S.useRef)(e);return Yz(()=>{n.current!==e&&(n.current=e)},t),n}function Qz(e){let t=Xz(e),n=(0,S.useRef)(null);return[n,(0,S.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}var $z={};function eB(e,t){return(0,S.useMemo)(()=>{if(t)return t;let n=$z[e]==null?0:$z[e]+1;return $z[e]=n,e+`-`+n},[e,t])}function tB(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var nB=tB(1),rB=tB(-1);function iB(e){return`clientX`in e&&`clientY`in e}function aB(e){if(!e)return!1;let{KeyboardEvent:t}=Wz(e.target);return t&&e instanceof t}function oB(e){if(!e)return!1;let{TouchEvent:t}=Wz(e.target);return t&&e instanceof t}function sB(e){if(oB(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return iB(e)?{x:e.clientX,y:e.clientY}:null}var cB;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(cB||={});function lB(){}var uB=Object.freeze({x:0,y:0});function dB(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function fB(e,t,n){let r=dB(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var pB={ignoreTransform:!1};function mB(e,t){t===void 0&&(t=pB);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Wz(e).getComputedStyle(e);t&&(n=fB(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function hB(e,t){return t===void 0&&(t=Wz(e).getComputedStyle(e)),t.position===`fixed`}function gB(e,t){t===void 0&&(t=Wz(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function _B(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(Gz(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Kz(i)||qz(i)||n.includes(i))return n;let a=Wz(e).getComputedStyle(i);return i!==e&&gB(i,a)&&n.push(i),hB(i,a)?n:r(i.parentNode)}return e?r(e):n}function vB(e){let[t]=_B(e,1);return t??null}var yB;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(yB||={});function bB(e){return!Vz||!e?!1:e===document.scrollingElement}function xB(e){let t={x:0,y:0},n=bB(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}function SB(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function CB(e,t){if(t===void 0&&(t=mB),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);vB(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var wB=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function TB(e){let{EventTarget:t}=Wz(e);return e instanceof t?e:Jz(e)}function EB(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var DB;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(DB||={});function OB(e){e.preventDefault()}function kB(e){e.stopPropagation()}var AB;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})(AB||={});var jB={start:[AB.Space,AB.Enter],cancel:[AB.Esc],end:[AB.Space,AB.Enter,AB.Tab]},MB=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case AB.Right:return{...n,x:n.x+25};case AB.Left:return{...n,x:n.x-25};case AB.Down:return{...n,y:n.y+25};case AB.Up:return{...n,y:n.y-25}}},NB=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new wB(Jz(t)),this.windowListeners=new wB(Wz(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(DB.Resize,this.handleCancel),this.windowListeners.add(DB.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(DB.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&CB(n),t(uB)}handleKeyDown(e){if(aB(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=jB,coordinateGetter:a=MB,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:uB;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=rB(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=xB(n),p=SB(n),m={x:Math.min(i===AB.Right?p.right-p.width/2:p.right,Math.max(i===AB.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===AB.Down?p.bottom-p.height/2:p.bottom,Math.max(i===AB.Down?p.top:p.top+p.height/2,u.y))},h=i===AB.Right&&!s||i===AB.Left&&!c,g=i===AB.Down&&!l||i===AB.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===AB.Right&&e<=d.x||i===AB.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}a?r.x=n.scrollLeft-e:r.x=i===AB.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}else if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===AB.Down&&e<=d.y||i===AB.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}a?r.y=n.scrollTop-e:r.y=i===AB.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,nB(rB(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};NB.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=jB,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function PB(e){return!!(e&&`distance`in e)}function FB(e){return!!(e&&`delay`in e)}var IB=class{constructor(e,t,n){n===void 0&&(n=TB(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Jz(i),this.documentListeners=new wB(this.document),this.listeners=new wB(n),this.windowListeners=new wB(Wz(i)),this.initialCoordinates=sB(r)??uB,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(DB.Resize,this.handleCancel),this.windowListeners.add(DB.DragStart,OB),this.windowListeners.add(DB.VisibilityChange,this.handleCancel),this.windowListeners.add(DB.ContextMenu,OB),this.documentListeners.add(DB.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(FB(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(PB(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(DB.Click,kB,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(DB.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=sB(e)??uB,s=rB(n,o);if(!t&&a){if(PB(a)){if(a.tolerance!=null&&EB(s,a.tolerance))return this.handleCancel();if(EB(s,a.distance))return this.handleStart()}if(FB(a)&&EB(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===AB.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},LB={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},RB=class extends IB{constructor(e){let{event:t}=e,n=Jz(t.target);super(e,LB,n)}};RB.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var zB={move:{name:`mousemove`},end:{name:`mouseup`}},BB;(function(e){e[e.RightClick=2]=`RightClick`})(BB||={});var VB=class extends IB{constructor(e){super(e,zB,Jz(e.event.target))}};VB.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===BB.RightClick?!1:(r?.({event:n}),!0)}}];var HB={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},UB=class extends IB{constructor(e){super(e,HB)}static setup(){return window.addEventListener(HB.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(HB.move.name,e)};function e(){}}};UB.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var WB;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(WB||={});var GB;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(GB||={}),yB.Backward,yB.Forward,yB.Backward,yB.Forward;var KB;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(KB||={});var qB;(function(e){e.Optimized=`optimized`})(qB||={});function JB(e){let{callback:t,disabled:n}=e,r=Xz(t),i=(0,S.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,S.useEffect)(()=>()=>i?.disconnect(),[i]),i}function YB(e,t){return(0,S.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}KB.WhileDragging,qB.Optimized;var XB={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:lB,draggableNodes:new Map,over:null,measureDroppableContainers:lB},ZB=(0,S.createContext)(XB),QB=(0,S.createContext)({...uB,scaleX:1,scaleY:1}),$B;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})($B||={});var eV=(0,S.createContext)(null),tV=`button`,nV=`Draggable`;function rV(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=eB(nV),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,S.useContext)(ZB),{role:p=tV,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,S.useContext)(g?QB:eV),[v,y]=Qz(),[b,x]=Qz(),C=YB(o,t),w=Zz(n);return Yz(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:w}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,S.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===tV?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:C,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}var iV=`Droppable`,aV={timeout:25};function oV(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=eB(iV),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,S.useContext)(ZB),u=(0,S.useRef)({disabled:n}),d=(0,S.useRef)(!1),f=(0,S.useRef)(null),p=(0,S.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...aV,...i},_=Zz(h??r),v=JB({callback:(0,S.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Qz((0,S.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=Zz(t);return(0,S.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,S.useEffect)(()=>(s({type:cB.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:cB.UnregisterDroppable,key:a,id:r})),[r]),(0,S.useEffect)(()=>{n!==u.current.disabled&&(s({type:cB.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}var sV=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:`30px`,cV=({size:e,children:t})=>(e=sV(e),(0,N.jsx)(`div`,{style:{height:e,width:e,display:`inline-block`,position:`relative`},children:t}));cV.propTypes={size:p.number,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var lV=({size:e,children:t,sx:n})=>(0,N.jsx)(cV,{size:e,children:(0,N.jsx)(`svg`,{preserveAspectRatio:`xMinYMin meet`,viewBox:`0 0 44 40`,style:{enableBackground:`new 0 0 44 40`,...n},children:t})});lV.propTypes={size:p.oneOfType([p.string,p.number]),children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,sx:p.object};var uV=({fill:e})=>(0,N.jsx)(`polygon`,{points:`17.4,26.9 10.1,20.6 12.8,17.5 16.3,20.5 22.3,9.7 25.9,11.7`,fill:e});uV.propTypes={fill:p.string.isRequired};var dV=({fill:e})=>(0,N.jsx)(`polygon`,{transform:`translate(2, 0)`,points:`34.1,28.6 34.1,2.2 2,2.2 2,34.3 40.1,34.3`,fill:e});dV.propTypes={fill:p.string.isRequired};var fV=({fill:e})=>(0,N.jsx)(`path`,{transform:`translate(1, 0)`,d:`M31.2,29.1v-0.3c2.2-2.8,3.6-6.3,3.6-10.1c0-8.9-7.2-16.1-16.1-16.1c-8.8,0.1-16,7.3-16,16.2 s7.2,16.1,16.1,16.1h18.5L31.2,29.1z`,fill:e});fV.propTypes={fill:p.string.isRequired};var pV=({fill:e})=>(0,N.jsx)(`circle`,{transform:`translate(-3,0)`,cx:`23`,cy:`20.4`,r:`16`,fill:e});pV.propTypes={fill:p.string.isRequired};var mV=({fill:e})=>(0,N.jsx)(`rect`,{x:`3.6`,y:`4.1`,width:`32`,height:`32`,fill:e});mV.propTypes={fill:p.string.isRequired};var hV=(e,t)=>{class n extends S.Component{static propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,size:p.oneOfType([p.number,p.string]),fg:p.string,bg:p.string};static defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,size:30,fg:`#4aaf46`,bg:`#f8ffe2`};render(){let{iconSet:n,shape:r,category:i,open:a,size:o,fg:s,bg:c}=this.props,l=n===`check`?(0,N.jsx)(e,{fill:s}):(0,N.jsx)(t,{fill:s}),u=n===`check`?(0,N.jsx)(e,{fill:c}):(0,N.jsx)(t,{fill:c});return a?(0,N.jsx)(lV,{size:o,children:u}):(0,N.jsxs)(lV,{size:o,children:[i===`feedback`?r===`round`?(0,N.jsx)(fV,{fill:c}):(0,N.jsx)(dV,{fill:c}):r===`round`?(0,N.jsx)(pV,{fill:c}):(0,N.jsx)(mV,{fill:c}),l]})}}return n},gV=({fill:e})=>(0,N.jsxs)(`g`,{transform:`translate(1, 0)`,children:[(0,N.jsx)(`path`,{d:`M24.7,22.1c-1.5,1.7-3.6,2.7-5.8,2.7s-4.5-1.1-5.8-2.7l-2.8,1.6c2,2.7,5.2,4.2,8.7,4.2
|
|
315
|
+
c3.4,0,6.6-1.6,8.7-4.2L24.7,22.1z`,fill:e}),(0,N.jsx)(`rect`,{x:`21.1`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e}),(0,N.jsx)(`rect`,{x:`12.7`,y:`13.1`,width:`3.7`,height:`4.7`,fill:e})]});gV.propTypes={fill:p.string.isRequired};var _V=({fill:e,x:t=0,y:n=0})=>(0,N.jsx)(`polygon`,{transform:`translate(${t}, ${n})`,points:`19.1,28.6 11.8,22.3 14.4,19.2 17.9,22.1 23.9,11.4 27.5,13.4`,fill:e});_V.propTypes={fill:p.string.isRequired,x:p.number,y:p.number};var vV=hV(_V,gV);vV.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},vV.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#f8ffe2`,size:30};var yV=({fill:e})=>(0,N.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,N.jsx)(`rect`,{x:`11`,y:`17.3`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.852 19.2507)`,width:`16.6`,height:`3.7`,fill:e}),(0,N.jsx)(`rect`,{x:`17.4`,y:`10.7`,transform:`matrix(0.7071 -0.7071 0.7071 0.7071 -7.8175 19.209)`,width:`3.7`,height:`16.6`,fill:e})]});yV.propTypes={fill:p.string.isRequired};var bV=({fill:e})=>(0,N.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,N.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,N.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,N.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});bV.propTypes={fill:p.string.isRequired};var xV=hV(yV,bV);xV.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},xV.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var SV=({fill:e})=>(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,N.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});SV.propTypes={fill:p.string.isRequired};var CV=({fill:e})=>(0,N.jsx)(`polygon`,{points:`14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5`,fill:e});CV.propTypes={fill:p.string.isRequired};var wV=({fill:e})=>(0,N.jsxs)(`g`,{children:[(0,N.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,N.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,N.jsx)(`path`,{d:`M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0
|
|
316
|
+
C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});wV.propTypes={fill:p.string.isRequired};var TV=class extends S.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(SV,{fill:t})]}),emoji:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(wV,{fill:t})]}),feedback:{check:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(wV,{fill:t})]}),emoji:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(wV,{fill:t})]}),square:{check:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(SV,{fill:t})]}),emoji:(0,N.jsxs)(lV,{children:[(0,N.jsx)(CV,{fill:n}),(0,N.jsx)(wV,{fill:t})]}),open:{check:(0,N.jsx)(lV,{children:(0,N.jsx)(SV,{fill:n})}),emoji:(0,N.jsx)(lV,{children:(0,N.jsx)(wV,{fill:n})})}}}}}render(){let{iconSet:e,category:t,shape:n,open:r}=this.props;return t===void 0?this.icons[e]:n===void 0?this.icons.feedback[e]:r===!0?this.icons.feedback.square.open[e]:this.icons.feedback.square[e]}};TV.propTypes={iconSet:p.oneOf([`emoji`,`check`,void 0]),shape:p.oneOf([`square`,void 0]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string},TV.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var EV=({fill:e})=>(0,N.jsxs)(`g`,{transform:`translate(0, 0)`,children:[(0,N.jsx)(`polygon`,{points:`27.5,13.4 23.9,11.4 15.9,25.8 19.1,28.6`,fill:e}),(0,N.jsx)(`polygon`,{points:`16.2,20.6 14.4,19.2 11.8,22.3 14.1,24.3`,fill:e})]});EV.propTypes={fill:p.string.isRequired};var DV=({fill:e})=>(0,N.jsxs)(`g`,{transform:`translate(2, 0)`,children:[(0,N.jsx)(`rect`,{x:`20.6`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,N.jsx)(`rect`,{x:`11.5`,y:`11.8`,width:`4`,height:`5`,fill:e}),(0,N.jsx)(`rect`,{x:`10.9`,y:`22.9`,transform:`matrix(0.9794 -0.2019 0.2019 0.9794 -4.6237 4.1559)`,width:`14.3`,height:`3.7`,fill:e})]});DV.propTypes={fill:p.string.isRequired};var OV=hV(EV,DV);OV.propTypes={iconSet:p.oneOf([`emoji`,`check`]),shape:p.oneOf([`round`,`square`]),category:p.oneOf([`feedback`,void 0]),open:p.bool,fg:p.string,bg:p.string,size:p.oneOfType([p.string,p.number])},OV.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function kV(e){return typeof e==`string`}function AV(e){return e?.ref||null}var jV=e=>e.scrollTop;function MV(e,t){return n=>{if(t){let r=e.current;n===void 0?t(r):t(r,n)}}}function NV(e,t,n,r,i,a){let o=e===`exited`&&!t?r:n[e]||n.exited;return i||a?{...o,...i,...a}:o}function PV(e,t){let{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n==`number`?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r==`object`?r[t.mode]:r),delay:i.transitionDelay}}function FV(e){return`scale(${e}, ${e**2})`}var IV={entering:{opacity:1,transform:FV(1)},entered:{opacity:1,transform:`none`},exiting:{opacity:0,transform:FV(.75)},exited:{opacity:0,transform:FV(.75)}},LV={opacity:0,transform:FV(.75),visibility:`hidden`},RV=S.forwardRef(function(e,t){let{addEndListener:n,appear:r=!0,children:i,easing:a,in:o,onEnter:s,onEntered:c,onEntering:l,onExit:u,onExited:d,onExiting:f,style:p,timeout:m=`auto`,...h}=e,g=JR(),_=S.useRef(),v=xo(),y=S.useRef(null),b=sR(y,AV(i),t),x=MV(y,l),C=MV(y,(e,t)=>{jV(e);let{duration:n,delay:r,easing:i}=PV({style:p,timeout:m,easing:a},{mode:`enter`}),o;m===`auto`?(o=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=o):o=n,e.style.transition=[v.transitions.create(`opacity`,{duration:o,delay:r}),v.transitions.create(`transform`,{duration:o*.666,delay:r,easing:i})].join(`,`),s&&s(e,t)}),w=MV(y,c),T=MV(y,f),E=MV(y,e=>{let{duration:t,delay:n,easing:r}=PV({style:p,timeout:m,easing:a},{mode:`exit`}),i;m===`auto`?(i=v.transitions.getAutoHeightDuration(e.clientHeight),_.current=i):i=t,e.style.transition=[v.transitions.create(`opacity`,{duration:i,delay:n}),v.transitions.create(`transform`,{duration:i*.666,delay:n||i*.333,easing:r})].join(`,`),e.style.opacity=0,e.style.transform=FV(.75),u&&u(e)}),ee=MV(y,e=>{e.style.transition=``,d&&d(e)});return(0,N.jsx)(jR,{appear:r,in:o,nodeRef:y,onEnter:C,onEntered:w,onEntering:x,onExit:E,onExited:ee,onExiting:T,addEndListener:e=>{m===`auto`&&g.start(_.current||0,e),n&&n(y.current,e)},timeout:m===`auto`?null:m,...h,children:(e,{ownerState:t,...n})=>{let r=NV(e,o,IV,LV,p,i.props.style);return S.cloneElement(i,{style:r,ref:b,...n})}})});RV&&(RV.muiSupportAuto=!0);function zV(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function BV(e){let t=YL(e);return t.body===e?ZL(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function VV(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function HV(e){return parseFloat(ZL(e).getComputedStyle(e).paddingRight)||0}function UV(e){let t=[`TEMPLATE`,`SCRIPT`,`STYLE`,`LINK`,`MAP`,`META`,`NOSCRIPT`,`PICTURE`,`COL`,`COLGROUP`,`PARAM`,`SLOT`,`SOURCE`,`TRACK`].includes(e.tagName),n=e.tagName===`INPUT`&&e.getAttribute(`type`)===`hidden`;return t||n}function WV(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!UV(e);t&&n&&VV(e,i)})}function GV(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function KV(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(BV(r)){let e=zV(ZL(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${HV(r)+e}px`;let t=YL(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${HV(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=YL(r).body;else{let t=r.parentElement,n=ZL(r);e=t?.nodeName===`HTML`&&n.getComputedStyle(t).overflowY===`scroll`?t:r}n.push({value:e.style.overflow,property:`overflow`,el:e},{value:e.style.overflowX,property:`overflow-x`,el:e},{value:e.style.overflowY,property:`overflow-y`,el:e}),e.style.overflow=`hidden`}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}function qV(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var JV=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(n!==-1)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&VV(e.modalRef,!1);let r=qV(t);WV(t,e.mount,e.modalRef,r,!0);let i=GV(this.containers,e=>e.container===t);return i===-1?(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n):(this.containers[i].modals.push(e),n)}mount(e,t){let n=GV(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=KV(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=GV(this.containers,t=>t.modals.includes(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),i.modals.length===0)i.restore&&i.restore(),e.modalRef&&VV(e.modalRef,t),WV(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{let e=i.modals[i.modals.length-1];e.modalRef&&VV(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function YV(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;let n=t.getRootNode?.();if(n&&n instanceof ShadowRoot){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode??n.host??null}}return!1}var XV=YV;function ZV(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var QV=ZV,$V=`data-mui-focusable`;function eH(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${$V}]`):null}var tH=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function nH(e){let t=parseInt(e.getAttribute(`tabindex`)||``,10);return Number.isNaN(t)?e.contentEditable===`true`||(e.nodeName===`AUDIO`||e.nodeName===`VIDEO`||e.nodeName===`DETAILS`)&&e.getAttribute(`tabindex`)===null?0:e.tabIndex:t}function rH(e){if(e.tagName!==`INPUT`||e.type!==`radio`||!e.name)return!1;let t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`),n=t(`[name="${e.name}"]:checked`);return n||=t(`[name="${e.name}"]`),n!==e}function iH(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||rH(e))}function aH(e){let t=[],n=[];return Array.from(e.querySelectorAll(tH)).forEach((e,r)=>{let i=nH(e);i===-1||!iH(e)||(i===0?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function oH(){return!0}function sH(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=aH,isEnabled:o=oH,open:s}=e,c=S.useRef(!1),l=S.useRef(null),u=S.useRef(null),d=S.useRef(null),f=S.useRef(null),p=S.useRef(!1),m=S.useRef(null),h=oR(AV(t),m),g=S.useRef(null);S.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),S.useEffect(()=>{if(c.current=!1,!s||!m.current)return;let e=QV(YL(m.current)),t=eH(m.current)??m.current;return XV(m.current,e)||(t.hasAttribute(`tabIndex`)||t.setAttribute(`tabIndex`,`-1`),p.current&&t.focus()),()=>{i||(d.current&&d.current.focus&&(c.current=!0,d.current.focus()),d.current=null)}},[s]),S.useEffect(()=>{if(!s||!m.current)return;let e=YL(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&QV(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=QV(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(XV(t,n)||r&&n!==l.current&&n!==u.current)return;if(n!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let i=[];if((n===l.current||n===u.current)&&(i=a(m.current)),i.length>0){let e=!!(g.current?.shiftKey&&g.current?.key===`Tab`),t=i[0],n=i[i.length-1];typeof t!=`string`&&typeof n!=`string`&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener(`focusin`,n),e.addEventListener(`keydown`,t,!0);let i=setInterval(()=>{let t=QV(e);t&&t.tagName===`BODY`&&n()},50);return()=>{clearInterval(i),e.removeEventListener(`focusin`,n),e.removeEventListener(`keydown`,t,!0)}},[n,r,i,o,s,a]);let _=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;let n=t.props.onFocus;n&&n(e)},v=e=>{d.current===null&&(d.current=e.relatedTarget),p.current=!0};return(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:l,"data-testid":`sentinelStart`}),S.cloneElement(t,{ref:h,onFocus:_}),(0,N.jsx)(`div`,{tabIndex:s?0:-1,onFocus:v,ref:u,"data-testid":`sentinelEnd`})]})}function cH(e){return typeof e==`function`?e():e}var lH=S.forwardRef(function(e,t){let{children:n,container:r,disablePortal:i=!1}=e,[a,o]=S.useState(null),s=oR(S.isValidElement(n)?AV(n):null,t);if(ti(()=>{i||o(cH(r)||document.body)},[r,i]),ti(()=>{if(a&&!i)return $L(t,a),()=>{$L(t,null)}},[t,a,i]),i){if(S.isValidElement(n)){let e={ref:s};return S.cloneElement(n,e)}return n}return a&&zx.createPortal(n,a)});function uH(e,t,n){return e===void 0||kV(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function dH(e,t,n){return typeof e==`function`?e(t,n):e}function fH(e,t=[]){if(e===void 0)return{};let n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&typeof e[n]==`function`&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function pH(e){if(e===void 0)return{};let t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&typeof e[t]==`function`)).forEach(n=>{t[n]=e[n]}),t}function mH(e){let{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){let e=g(n?.className,a,i?.className,r?.className),t={...n?.style,...i?.style,...r?.style},o={...n,...i,...r};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}let o=fH({...i,...r}),s=pH(r),c=pH(i),l=t(o),u=g(l?.className,n?.className,a,i?.className,r?.className),d={...l?.style,...n?.style,...i?.style,...r?.style},f={...l,...n,...c,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:l.ref}}function hH(e,t){let{className:n,elementType:r,ownerState:i,externalForwardedProps:a,internalForwardedProps:o,shouldForwardComponentProp:s=!1,...c}=t,{component:l,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=u[e]||r,m=dH(d[e],i),{props:{component:h,...g},internalRef:_}=mH({className:n,...c,externalForwardedProps:e===`root`?f:void 0,externalSlotProps:m}),v=oR(_,m?.ref,t.ref),y=e===`root`?h||l:h;return[p,uH(p,{...e===`root`&&!l&&!u[e]&&o,...e!==`root`&&!u[e]&&o,...g,...y&&!s&&{as:y},...y&&s&&{component:y},ref:v},i)]}var gH={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},_H={opacity:0,visibility:`hidden`},vH=S.forwardRef(function(e,t){let n=xo(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:o,easing:s,in:c,onEnter:l,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:m,style:h,timeout:g=r,..._}=e,v=S.useRef(null),y=sR(v,AV(o),t),b=MV(v,d),x=MV(v,(e,t)=>{jV(e);let r=PV({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),C=MV(v,u),w=MV(v,m),T=MV(v,e=>{let t=PV({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),E=MV(v,e=>{e.style.transition=``,p&&p(e)});return(0,N.jsx)(jR,{appear:a,in:c,nodeRef:v,onEnter:x,onEntered:C,onEntering:b,onExit:T,onExited:E,onExiting:w,addEndListener:e=>{i&&i(v.current,e)},timeout:g,..._,children:(e,{ownerState:t,...n})=>{let r=NV(e,c,gH,_H,h,o.props.style);return S.cloneElement(o,{style:r,ref:y,...n})}})});function yH(e){return Br(`MuiBackdrop`,e)}Vr(`MuiBackdrop`,[`root`,`invisible`]);var bH=e=>{let{classes:t,invisible:n}=e;return _({root:[`root`,n&&`invisible`]},yH,t)},xH=F(`div`,{name:`MuiBackdrop`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:`fixed`,display:`flex`,alignItems:`center`,justifyContent:`center`,right:0,bottom:0,top:0,left:0,backgroundColor:`rgba(0, 0, 0, 0.5)`,WebkitTapHighlightColor:`transparent`,variants:[{props:{invisible:!0},style:{backgroundColor:`transparent`}}]}),SH=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiBackdrop`}),{children:r,className:i,component:a=`div`,invisible:o=!1,open:s,components:c={},componentsProps:l={},slotProps:u={},slots:d={},TransitionComponent:f,transitionDuration:p,...m}=n,h={...n,component:a,invisible:o},_=bH(h),v={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[y,b]=hH(`root`,{elementType:xH,externalForwardedProps:v,className:g(_.root,i),ownerState:h}),[x,S]=hH(`transition`,{elementType:vH,externalForwardedProps:v,ownerState:h});return(0,N.jsx)(x,{in:s,timeout:p,...m,...S,children:(0,N.jsx)(y,{"aria-hidden":!0,...b,ref:t,children:r})})});function CH(e){return typeof e==`function`?e():e}function wH(e){return e?e.props.hasOwnProperty(`in`):!1}var TH=()=>{},EH=new JV;function DH(e){let{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:o,children:s,onClose:c,open:l,rootRef:u}=e,d=S.useRef({}),f=S.useRef(null),p=S.useRef(null),m=oR(p,u),[h,g]=S.useState(!l),_=wH(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>YL(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{EH.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},C=iR(()=>{let e=CH(t)||y().body;EH.add(b(),e),p.current&&x()}),w=()=>EH.isTopModal(b()),T=iR(e=>{f.current=e,e&&(l&&w()?x():p.current&&VV(p.current,v))}),E=S.useCallback(()=>{EH.remove(b(),v)},[v]);S.useEffect(()=>()=>{E()},[E]),S.useEffect(()=>{l?C():(!_||!i)&&E()},[l,E,_,i,C]);let ee=e=>t=>{e.onKeyDown?.(t),!(t.key!==`Escape`||t.which===229||!w())&&(n||(t.stopPropagation(),c&&c(t,`escapeKeyDown`)))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&c&&c(t,`backdropClick`)};return{getRootProps:(t={})=>{let n=fH(e);delete n.onTransitionEnter,delete n.onTransitionExited;let r={...n,...t};return{role:`presentation`,...r,onKeyDown:ee(r),ref:m}},getBackdropProps:(e={})=>{let t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:l}},getTransitionProps:()=>({onEnter:BL(()=>{g(!1),a&&a()},s?.props.onEnter??TH),onExited:BL(()=>{g(!0),o&&o(),i&&E()},s?.props.onExited??TH)}),rootRef:m,portalRef:T,isTopModal:w,exited:h,hasTransition:_}}function OH(e){return Br(`MuiModal`,e)}Vr(`MuiModal`,[`root`,`hidden`,`backdrop`]);var kH=e=>{let{open:t,exited:n,classes:r}=e;return _({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},OH,r)},AH=F(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Do(({theme:e})=>({position:`fixed`,zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:`hidden`}}]}))),jH=F(SH,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),MH=S.forwardRef(function(e,t){let n=I({name:`MuiModal`,props:e}),{BackdropComponent:r=jH,BackdropProps:i,classes:a,className:o,closeAfterTransition:s=!1,children:c,container:l,component:u,components:d={},componentsProps:f={},disableAutoFocus:p=!1,disableEnforceFocus:m=!1,disableEscapeKeyDown:h=!1,disablePortal:_=!1,disableRestoreFocus:v=!1,disableScrollLock:y=!1,hideBackdrop:b=!1,keepMounted:x=!1,onClose:C,onTransitionEnter:w,onTransitionExited:T,open:E,slotProps:ee={},slots:D={},theme:O,...te}=n,k={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:_,disableRestoreFocus:v,disableScrollLock:y,hideBackdrop:b,keepMounted:x},{getRootProps:A,getBackdropProps:j,getTransitionProps:M,portalRef:ne,isTopModal:re,exited:ie,hasTransition:ae}=DH({...k,rootRef:t}),oe={...k,exited:ie},se=kH(oe),ce={};if(c.props.tabIndex===void 0&&(ce.tabIndex=`-1`),ae){let{onEnter:e,onExited:t}=M();ce.onEnter=e,ce.onExited=t}let le={slots:{root:d.Root,backdrop:d.Backdrop,...D},slotProps:{...f,...ee}},[ue,de]=hH(`root`,{ref:t,elementType:AH,externalForwardedProps:{...le,...te,component:u},getSlotProps:A,ownerState:oe,className:g(o,se?.root,!oe.open&&oe.exited&&se?.hidden)}),[fe,pe]=hH(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:le,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>j({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:g(i?.className,se?.backdrop),ownerState:oe});return!x&&!E&&(!ae||ie)?null:(0,N.jsx)(lH,{ref:ne,container:l,disablePortal:_,children:(0,N.jsxs)(ue,{...de,children:[!b&&r?(0,N.jsx)(fe,{...pe}):null,(0,N.jsx)(sH,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:v,isEnabled:re,open:E,children:S.cloneElement(c,ce)})]})})});function NH(e){return Br(`MuiPaper`,e)}Vr(`MuiPaper`,`root.rounded.outlined.elevation.elevation0.elevation1.elevation2.elevation3.elevation4.elevation5.elevation6.elevation7.elevation8.elevation9.elevation10.elevation11.elevation12.elevation13.elevation14.elevation15.elevation16.elevation17.elevation18.elevation19.elevation20.elevation21.elevation22.elevation23.elevation24`.split(`.`));var PH=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return _({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},NH,i)},FH=F(`div`,{name:`MuiPaper`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant===`elevation`&&t[`elevation${n.elevation}`]]}})(Do(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create(`box-shadow`),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:`outlined`},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:`elevation`},style:{boxShadow:`var(--Paper-shadow)`,backgroundImage:`var(--Paper-overlay)`}}]}))),IH=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiPaper`}),r=xo(),{className:i,component:a=`div`,elevation:o=1,square:s=!1,variant:c=`elevation`,...l}=n,u={...n,component:a,elevation:o,square:s,variant:c},d=PH(u);return(0,N.jsx)(FH,{as:a,ownerState:u,className:g(d.root,i),ref:t,...l,style:{...c===`elevation`&&{"--Paper-shadow":(r.vars||r).shadows[o],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[o]},...!r.vars&&r.palette.mode===`dark`&&{"--Paper-overlay":`linear-gradient(${fi(`#fff`,eo(o))}, ${fi(`#fff`,eo(o))})`}},...l.style}})});function LH(e){return Br(`MuiPopover`,e)}Vr(`MuiPopover`,[`root`,`paper`]);function RH(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function zH(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function BH(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function VH(e){return typeof e==`function`?e():e}var HH=e=>{let{classes:t}=e;return _({root:[`root`],paper:[`paper`]},LH,t)},UH=F(MH,{name:`MuiPopover`,slot:`Root`})({}),WH=F(IH,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),GH=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiPopover`}),{action:r,anchorEl:i,anchorOrigin:a={vertical:`top`,horizontal:`left`},anchorPosition:o,anchorReference:s=`anchorEl`,children:c,className:l,container:u,elevation:d=8,marginThreshold:f=16,open:p,PaperProps:m={},slots:h={},slotProps:_={},transformOrigin:v={vertical:`top`,horizontal:`left`},TransitionComponent:y,transitionDuration:b=`auto`,TransitionProps:x={},disableScrollLock:C=!1,...w}=n,T=S.useRef(),E={...n,anchorOrigin:a,anchorReference:s,elevation:d,marginThreshold:f,transformOrigin:v,TransitionComponent:y,transitionDuration:b,TransitionProps:x},ee=HH(E),D=S.useCallback(()=>{if(s===`anchorPosition`)return o;let e=VH(i),t=(e&&e.nodeType===1?e:XL(T.current).body).getBoundingClientRect();return{top:t.top+RH(t,a.vertical),left:t.left+zH(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),O=S.useCallback(e=>({vertical:RH(e,v.vertical),horizontal:zH(e,v.horizontal)}),[v.horizontal,v.vertical]),te=S.useCallback(e=>{let t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if(s===`none`)return{top:null,left:null,transformOrigin:BH(n)};let r=D(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=QL(VH(i)),d=u.innerHeight-f,p=u.innerWidth-f;if(f!==null&&a<f){let e=a-f;a-=e,n.vertical+=e}else if(f!==null&&c>d){let e=c-d;a-=e,n.vertical+=e}if(f!==null&&o<f){let e=o-f;o-=e,n.horizontal+=e}else if(l>p){let e=l-p;o-=e,n.horizontal+=e}return{top:`${Math.round(a)}px`,left:`${Math.round(o)}px`,transformOrigin:BH(n)}},[i,s,D,O,f]),[k,A]=S.useState(p),j=S.useCallback(()=>{let e=T.current;if(!e)return;let t=te(e);t.top!==null&&e.style.setProperty(`top`,t.top),t.left!==null&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,A(!0)},[te]);S.useEffect(()=>(C&&window.addEventListener(`scroll`,j),()=>window.removeEventListener(`scroll`,j)),[i,C,j]);let M=()=>{j()},ne=()=>{A(!1)};S.useEffect(()=>{p&&j()}),S.useImperativeHandle(r,()=>p?{updatePosition:()=>{j()}}:null,[p,j]),S.useEffect(()=>{if(!p)return;let e=qL(()=>{j()}),t=QL(VH(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,j]);let re=b,ie={slots:{transition:y,...h},slotProps:{transition:x,paper:m,..._}},[ae,oe]=hH(`transition`,{elementType:RV,externalForwardedProps:ie,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),M()},onExited:t=>{e.onExited?.(t),ne()}}),additionalProps:{appear:!0,in:p}});b===`auto`&&!ae.muiSupportAuto&&(re=void 0);let se=u||(i?XL(VH(i)).body:void 0),[ce,{slots:le,slotProps:ue,...de}]=hH(`root`,{ref:t,elementType:UH,externalForwardedProps:{...ie,...w},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:lR(typeof _.backdrop==`function`?_.backdrop(E):_.backdrop,{invisible:!0})},container:se,open:p},ownerState:E,className:g(ee.root,l)}),[fe,pe]=hH(`paper`,{ref:T,className:ee.paper,elementType:WH,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:k?void 0:{opacity:0}},ownerState:E});return(0,N.jsx)(ce,{...de,...!kV(ce)&&{slots:le,slotProps:ue,disableScrollLock:C},children:(0,N.jsx)(ae,{...oe,timeout:re,children:(0,N.jsx)(fe,{...pe,children:c})})})}),KH={50:`#fce4ec`,100:`#f8bbd0`,200:`#f48fb1`,300:`#f06292`,400:`#ec407a`,500:`#e91e63`,600:`#d81b60`,700:`#c2185b`,800:`#ad1457`,900:`#880e4f`,A100:`#ff80ab`,A200:`#ff4081`,A400:`#f50057`,A700:`#c51162`},qH={50:`#e8eaf6`,100:`#c5cae9`,200:`#9fa8da`,300:`#7986cb`,400:`#5c6bc0`,500:`#3f51b5`,600:`#3949ab`,700:`#303f9f`,800:`#283593`,900:`#1a237e`,A100:`#8c9eff`,A200:`#536dfe`,A400:`#3d5afe`,A700:`#304ffe`},JH=s({background:()=>vU,backgroundDark:()=>yU,black:()=>MU,blueGrey100:()=>BU,blueGrey300:()=>VU,blueGrey600:()=>HU,blueGrey900:()=>UU,border:()=>TU,borderDark:()=>DU,borderGray:()=>OU,borderLight:()=>EU,buttonBorder:()=>XU,buttonFocusOutline:()=>zU,buttonHoverBg:()=>ZU,correct:()=>eU,correctSecondary:()=>tU,correctTertiary:()=>nU,correctWithIcon:()=>rU,defaults:()=>G,disabled:()=>QH,disabledSecondary:()=>$H,dropdownBackground:()=>xU,fadedPrimary:()=>pU,focusChecked:()=>FU,focusCheckedBorder:()=>IU,focusUnchecked:()=>LU,focusUncheckedBorder:()=>RU,incorrect:()=>iU,incorrectSecondary:()=>oU,incorrectWithIcon:()=>aU,keyBoardFocusIndicator:()=>YU,keypadButton:()=>WU,keypadButtonHover:()=>qU,keypadButtonOperator:()=>GU,keypadButtonOperatorHover:()=>JU,keypadEmptyPlaceholder:()=>KU,missing:()=>sU,missingWithIcon:()=>cU,primary:()=>lU,primaryDark:()=>dU,primaryLight:()=>uU,primaryText:()=>fU,secondary:()=>mU,secondaryBackground:()=>bU,secondaryDark:()=>gU,secondaryLight:()=>hU,secondaryText:()=>_U,surface:()=>SU,tableGrid:()=>kU,tableGridLight:()=>AU,tableStripe:()=>jU,tertiary:()=>CU,tertiaryLight:()=>wU,text:()=>ZH,transparent:()=>PU,v:()=>YH,visualElementsColors:()=>QU,white:()=>NU}),G={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,CORRECT:ga[500],CORRECT_SECONDARY:ga[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:pa[500],INCORRECT_SECONDARY:fa[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:fa[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:qH[500],PRIMARY_LIGHT:qH[200],PRIMARY_DARK:qH[800],SECONDARY:KH.A400,SECONDARY_LIGHT:KH[200],SECONDARY_DARK:KH[900],TERTIARY:`#146EB3`,TERTIARY_LIGHT:`#D0E2F0`,BACKGROUND:`rgba(255,255,255,0)`,BACKGROUND_DARK:`#ECEDF1`,DROPDOWN_BACKGROUND:`#E0E1E6`,SECONDARY_BACKGROUND:`rgba(241,241,241,1)`,SURFACE:`#E0E1E6`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#646464`,BORDER_GRAY:`#7E8494`,TABLE_GRID:`black`,TABLE_GRID_LIGHT:`#dfe2e5`,TABLE_STRIPE:`#f6f8fa`,BLACK:`#000000`,WHITE:`#ffffff`,TRANSPARENT:`transparent`,FOCUS_CHECKED:`#BBDEFB`,FOCUS_CHECKED_BORDER:`#1565C0`,FOCUS_UNCHECKED:`#E0E0E0`,FOCUS_UNCHECKED_BORDER:`#757575`,BUTTON_FOCUS_OUTLINE:`#3B82F6`,BLUE_GREY100:`#F3F5F7`,BLUE_GREY300:`#C0C3CF`,BLUE_GREY600:`#7E8494`,BLUE_GREY900:`#152452`,FADED_PRIMARY:`#DCDAFB`,KEYPAD_BUTTON:`rgb(188, 194, 229)`,KEYPAD_BUTTON_OPERATOR:`rgb(255, 159, 192)`,KEYPAD_EMPTY_PLACEHOLDER:`rgba(245, 0, 87, 0.4)`,KEYPAD_BUTTON_HOVER:`rgb(214, 218, 239)`,KEYPAD_BUTTON_OPERATOR_HOVER:`rgb(255, 197, 217)`,KEY_BOARD_FOCUS_INDICATOR:`#2B87FF`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(G);var YH=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},XH=YH(`pie`),ZH=()=>XH(`text`,G.TEXT),QH=()=>XH(`disabled`,G.DISABLED),$H=()=>XH(`disabled-secondary`,G.DISABLED_SECONDARY),eU=()=>XH(`correct`,G.CORRECT),tU=()=>XH(`correct-secondary`,G.CORRECT_SECONDARY),nU=()=>XH(`correct-tertiary`,G.CORRECT_TERTIARY),rU=()=>XH(`correct-icon`,G.CORRECT_WITH_ICON),iU=()=>XH(`incorrect`,G.INCORRECT),aU=()=>XH(`incorrect-icon`,G.INCORRECT_WITH_ICON),oU=()=>XH(`incorrect-secondary`,G.INCORRECT_SECONDARY),sU=()=>XH(`missing`,G.MISSING),cU=()=>XH(`missing-icon`,G.MISSING_WITH_ICON),lU=()=>XH(`primary`,G.PRIMARY),uU=()=>XH(`primary-light`,G.PRIMARY_LIGHT),dU=()=>XH(`primary-dark`,G.PRIMARY_DARK),fU=()=>XH(`primary-text`,`text`,G.TEXT),pU=()=>XH(`faded-primary`,G.FADED_PRIMARY),mU=()=>XH(`secondary`,G.SECONDARY),hU=()=>XH(`secondary-light`,G.SECONDARY_LIGHT),gU=()=>XH(`secondary-dark`,G.SECONDARY_DARK),_U=()=>XH(`secondary-text`,`text`,G.TEXT),vU=()=>XH(`background`,G.BACKGROUND),yU=()=>XH(`background-dark`,G.BACKGROUND_DARK),bU=()=>XH(`secondary-background`,G.SECONDARY_BACKGROUND),xU=()=>XH(`dropdown-background`,G.DROPDOWN_BACKGROUND),SU=()=>XH(`surface`,G.SURFACE),CU=()=>XH(`tertiary`,G.TERTIARY),wU=()=>XH(`tertiary-light`,G.TERTIARY_LIGHT),TU=()=>XH(`border`,G.BORDER),EU=()=>XH(`border-light`,G.BORDER_LIGHT),DU=()=>XH(`border-dark`,G.BORDER_DARK),OU=()=>XH(`border-gray`,G.BORDER_GRAY),kU=()=>XH(`table-grid`,`text`,G.TABLE_GRID),AU=()=>XH(`table-grid-light`,`border-light`,G.TABLE_GRID_LIGHT),jU=()=>XH(`table-stripe`,`background-dark`,G.TABLE_STRIPE),MU=()=>XH(`black`,G.BLACK),NU=()=>XH(`white`,G.WHITE),PU=()=>G.TRANSPARENT,FU=()=>XH(`focus-checked`,G.FOCUS_CHECKED),IU=()=>XH(`focus-checked-border`,G.FOCUS_CHECKED_BORDER),LU=()=>XH(`focus-unchecked`,G.FOCUS_UNCHECKED),RU=()=>XH(`focus-unchecked-border`,G.FOCUS_UNCHECKED_BORDER),zU=()=>XH(`button-focus-outline`,G.BUTTON_FOCUS_OUTLINE),BU=()=>XH(`blue-grey-100`,G.BLUE_GREY100),VU=()=>XH(`blue-grey-300`,G.BLUE_GREY300),HU=()=>XH(`blue-grey-600`,G.BLUE_GREY600),UU=()=>XH(`blue-grey-900`,G.BLUE_GREY900),WU=()=>XH(`keypad-button`,G.KEYPAD_BUTTON),GU=()=>XH(`keypad-button-operator`,G.KEYPAD_BUTTON_OPERATOR),KU=()=>XH(`keypad-empty-placeholder`,G.KEYPAD_EMPTY_PLACEHOLDER),qU=()=>XH(`keypad-button-hover`,G.KEYPAD_BUTTON_HOVER),JU=()=>XH(`keypad-button-operator-hover`,G.KEYPAD_BUTTON_OPERATOR_HOVER),YU=()=>XH(`keyboard-focus-indicator`,G.KEY_BOARD_FOCUS_INDICATOR),XU=()=>XH(`button-border`,G.BUTTON_BORDER),ZU=()=>XH(`button-hover-bg`,G.BUTTON_HOVER_BG),QU={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},$U=F(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),eW=F(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${QH()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, white)`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${eU()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${iU()})`}}),tW=F(`div`)({"&.feedback-enter":{height:`1px`},"&.feedback-enter-active":{height:`45px`,transition:`height 500ms`},"&.feedback-exit":{height:`45px`},"&.feedback-exit-active":{height:`1px`,transition:`height 200ms`}}),nW=class extends S.Component{static propTypes={correctness:p.string,feedback:p.string};nodeRef=S.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,N.jsx)(FR,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,N.jsx)(tW,{ref:this.nodeRef,children:(0,N.jsx)($U,{children:(0,N.jsx)(eW,{className:e,dangerouslySetInnerHTML:{__html:t}})})})},`hasFeedback`)}render(){return(0,N.jsx)(`div`,{children:(0,N.jsx)(WR,{children:this.renderFeedback()})})}},rW=s({Correct:()=>lW,Incorrect:()=>uW,NothingSubmitted:()=>fW,PartiallyCorrect:()=>dW}),iW=m(`pie-libs:render-ui:response-indicators`),aW=F(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),oW=F(GH)({cursor:`pointer`}),sW=F(`div`)({padding:`0`,borderRadius:`4px`}),cW=(e,t)=>{class n extends S.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{iW(`[handlePopoverOpen]`,e.target),this.setState({anchorEl:e.target})};handlePopoverClose=()=>{this.setState({anchorEl:null})};render(){let{feedback:n}=this.props,{anchorEl:r}=this.state;return(0,N.jsxs)(aW,{hasFeedback:!!n,children:[(0,N.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,N.jsx)(e,{})}),n&&(0,N.jsx)(oW,{PaperComponent:sW,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,N.jsx)(nW,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:p.string},n},lW=cW(vV,`correct`),uW=cW(xV,`incorrect`),dW=cW(OV,`partially-correct`),fW=cW(TV,`nothing-submitted`);function pW(e){return Br(`MuiCollapse`,e)}Vr(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var mW=e=>{let{orientation:t,classes:n}=e;return _({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},pW,n)},hW=F(`div`,{name:`MuiCollapse`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.orientation],n.state===`entered`&&t.entered,n.state===`exited`&&!n.in&&n.collapsedSize===`0px`&&t.hidden]}})(Do(({theme:e})=>({height:0,overflow:`hidden`,transition:e.transitions.create(`height`),variants:[{props:{orientation:`horizontal`},style:{height:`auto`,width:0,transition:e.transitions.create(`width`)}},{props:{state:`entered`},style:{height:`auto`,overflow:`visible`}},{props:{state:`entered`,orientation:`horizontal`},style:{width:`auto`}},{props:({ownerState:e})=>e.state===`exited`&&!e.in&&e.collapsedSize===`0px`,style:{visibility:`hidden`}}]}))),gW=F(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),_W=F(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),vW=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiCollapse`}),{addEndListener:r,children:i,className:a,collapsedSize:o=`0px`,component:s,easing:c,in:l,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,orientation:_=`vertical`,slots:v={},slotProps:y={},style:b,timeout:x=Ua.standard,TransitionComponent:C=jR,...w}=n,T={...n,orientation:_,collapsedSize:o},E=mW(T),ee=xo(),D=JR(),O=S.useRef(null),te=S.useRef(),k=typeof o==`number`?`${o}px`:o,A=_===`horizontal`,j=A?`width`:`height`,M=S.useRef(null),ne=sR(t,M),re=()=>O.current?O.current[A?`clientWidth`:`clientHeight`]:0,ie=MV(M,(e,t)=>{O.current&&A&&(O.current.style.position=`absolute`),e.style[j]=k,u&&u(e,t)}),ae=MV(M,(e,t)=>{let n=re();O.current&&A&&(O.current.style.position=``);let{duration:r,easing:i}=PV({style:b,timeout:x,easing:c},{mode:`enter`});if(x===`auto`){let t=ee.transitions.getAutoHeightDuration(n);e.style.transitionDuration=`${t}ms`,te.current=t}else e.style.transitionDuration=typeof r==`string`?r:`${r}ms`;e.style[j]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),oe=MV(M,(e,t)=>{e.style[j]=`auto`,d&&d(e,t)}),se=MV(M,e=>{e.style[j]=`${re()}px`,p&&p(e)}),ce=MV(M,m),le=MV(M,e=>{let t=re(),{duration:n,easing:r}=PV({style:b,timeout:x,easing:c},{mode:`exit`});if(x===`auto`){let n=ee.transitions.getAutoHeightDuration(t);e.style.transitionDuration=`${n}ms`,te.current=n}else e.style.transitionDuration=typeof n==`string`?n:`${n}ms`;e.style[j]=k,e.style.transitionTimingFunction=r,h&&h(e)}),ue=e=>{x===`auto`&&D.start(te.current||0,e),r&&r(M.current,e)},de={slots:v,slotProps:y,component:s},[fe,pe]=hH(`root`,{ref:ne,className:g(E.root,a),elementType:hW,externalForwardedProps:de,ownerState:T,additionalProps:{style:{[A?`minWidth`:`minHeight`]:k,...b}}}),[me,he]=hH(`wrapper`,{ref:O,className:E.wrapper,elementType:gW,externalForwardedProps:de,ownerState:T}),[ge,_e]=hH(`wrapperInner`,{className:E.wrapperInner,elementType:_W,externalForwardedProps:de,ownerState:T});return(0,N.jsx)(C,{in:l,onEnter:ie,onEntered:oe,onEntering:ae,onExit:se,onExited:ce,onExiting:le,addEndListener:ue,nodeRef:M,timeout:x===`auto`?null:x,...w,children:(e,{ownerState:t,...n})=>{let r={...T,state:e};return(0,N.jsx)(fe,{...pe,className:g(pe.className,{entered:E.entered,exited:!l&&k===`0px`&&E.hidden}[e]),ownerState:r,...n,children:(0,N.jsx)(me,{...he,ownerState:r,children:(0,N.jsx)(ge,{..._e,ownerState:r,children:i})})})}})});vW&&(vW.muiSupportAuto=!0);var yW=`https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js`,bW=null;function xW(e){return typeof window>`u`||window.MathJax?.typesetPromise?Promise.resolve():bW||(bW=new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s={loader:{load:i?[`a11y/assistive-mml`]:[]},tex:{packages:[`base`,`ams`,`autoload`],macros:{parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`}},options:{enableMenu:i,enableExplorer:i,enableAssistiveMml:i},startup:{ready:()=>{window.MathJax?.startup.defaultReady&&(window.MathJax.startup.defaultReady(),t())},defaultReady:()=>{}}};r&&s.tex&&(s.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],s.tex.processEscapes=!0),a||(s.chtml={fontURL:``}),window.MathJax=s;let c=document.createElement(`script`);c.src=o||yW,c.async=!0,c.onload=()=>{setTimeout(t,100)},c.onerror=()=>{n(Error(`Failed to load MathJax`))},document.head.appendChild(c)}),bW)}function SW(){let e=window.MathJax?.startup?.document;if(typeof e?.assistiveMml==`function`)try{e.assistiveMml().updateDocument?.()}catch(e){console.warn(`[mathjax-renderer] Failed to attach assistive MathML:`,e)}}function CW(e={}){return async t=>{if(await xW(e),!window.MathJax?.typesetPromise){console.warn(`[mathjax-renderer] MathJax not loaded or missing typesetPromise.`);return}await window.MathJax.typesetPromise([t]),SW()}}var wW=`@pie-lib/math-rendering`,TW=null;function EW(){return TW||=CW({accessibility:!0,useSingleDollar:!0}),TW}function DW(){if(typeof window>`u`)return null;let e=window[wW];return typeof e?.renderMath==`function`?e:null}var OW=async e=>{if(typeof window>`u`)return;let t=typeof e==`string`,n;t?(n=document.createElement(`div`),n.innerHTML=e):n=e||document.body;let r=DW();return r?await r.renderMath?.(n):await EW()(n),t?n.innerHTML:void 0},kW=e=>DW()?.wrapMath?.(e)??e,AW=F(`span`)(({theme:e})=>({color:e.palette.primary.light,borderBottom:`1px dotted ${e.palette.primary.light}`,cursor:`pointer`})),jW=F(vW)(({theme:e})=>({paddingTop:e.spacing(2)})),MW=class extends S.Component{static propTypes={className:p.string,children:p.object,labels:p.shape({visible:p.string,hidden:p.string})};static defaultProps={labels:{}};state={expanded:!1};toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){OW(this.root)}componentDidUpdate(){OW(this.root)}render(){let{labels:e,children:t,className:n}=this.props,r=this.state.expanded?e.visible||`Hide`:e.hidden||`Show`;return(0,N.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,N.jsx)(`div`,{onClick:this.toggleExpanded,children:(0,N.jsx)(AW,{children:r})}),(0,N.jsx)(jW,{in:this.state.expanded,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})]})}};function NW(e){return Br(`MuiButton`,e)}var PW=Vr(`MuiButton`,`root.text.textInherit.textPrimary.textSecondary.textSuccess.textError.textInfo.textWarning.outlined.outlinedInherit.outlinedPrimary.outlinedSecondary.outlinedSuccess.outlinedError.outlinedInfo.outlinedWarning.contained.containedInherit.containedPrimary.containedSecondary.containedSuccess.containedError.containedInfo.containedWarning.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.textSizeSmall.textSizeMedium.textSizeLarge.outlinedSizeSmall.outlinedSizeMedium.outlinedSizeLarge.containedSizeSmall.containedSizeMedium.containedSizeLarge.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.iconSizeSmall.iconSizeMedium.iconSizeLarge.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),FW=S.createContext({}),IW=S.createContext(void 0),LW=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=_({root:[`root`,o&&`loading`,a,`${a}${L(t)}`,`size${L(i)}`,`${a}Size${L(i)}`,`color${L(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${L(s)}`],startIcon:[`icon`,`startIcon`,`iconSize${L(i)}`],endIcon:[`icon`,`endIcon`,`iconSize${L(i)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},NW,c);return{...c,...l}},RW=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],zW=F(cz,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${L(n.color)}`],t[`size${L(n.size)}`],t[`${n.variant}Size${L(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(Do(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${PW.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&e.loadingPosition===`start`,style:{"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`}}},{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${PW.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${PW.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${PW.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${PW.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${PW.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{transition:e.transitions.create([`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${PW.loading}`]:{color:`transparent`}}}]}})),BW=F(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${L(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:8,marginLeft:-4,variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...RW]})),VW=F(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${L(n.size)}`]]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{transition:e.transitions.create([`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...RW]})),HW=F(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),UW=F(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),WW=S.forwardRef(function(e,t){let n=S.useContext(FW),r=S.useContext(IW),i=I({props:ei(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:_=null,loadingIndicator:v,loadingPosition:y=`center`,size:b=`medium`,startIcon:x,type:C,variant:w=`text`,...T}=i,E=tR(h),ee=v??(0,N.jsx)(xz,{"aria-labelledby":E,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:_,loadingIndicator:ee,loadingPosition:y,size:b,type:C,variant:w},O=LW(D),te=(x||_&&y===`start`)&&(0,N.jsx)(BW,{className:O.startIcon,ownerState:D,children:x||(0,N.jsx)(UW,{className:O.loadingIconPlaceholder,ownerState:D})}),k=(f||_&&y===`end`)&&(0,N.jsx)(VW,{className:O.endIcon,ownerState:D,children:f||(0,N.jsx)(UW,{className:O.loadingIconPlaceholder,ownerState:D})}),A=r||``,j=typeof _==`boolean`?(0,N.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:_&&(0,N.jsx)(HW,{className:O.loadingIndicator,ownerState:D,children:ee})}):null,{root:M,...ne}=O;return(0,N.jsxs)(zW,{ownerState:D,className:g(n.className,O.root,c,A),component:s,disabled:l||_,focusRipple:!d,focusVisibleClassName:g(O.focusVisible,p),ref:t,type:C,id:_?E:h,...T,classes:ne,children:[te,y!==`end`&&j,a,y===`end`&&j,k]})}),GW=GL((0,N.jsx)(`path`,{d:`M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z`}),`Restore`),KW=GL((0,N.jsx)(`path`,{d:`M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`}),`Undo`),qW=F(`div`)({display:`flex`,flexDirection:`column`}),JW=F(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),YW=F(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),XW=F(WW)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),ZW=e=>{class t extends S.Component{static propTypes={session:p.object,onSessionChange:p.func};constructor(e){super(e),this.state={sessionInitialValues:JSON.parse(JSON.stringify(e.session)),session:e.session,changes:[]}}onSessionChange=e=>{this.setState(t=>({session:e,changes:[...t.changes,e]}),()=>this.props.onSessionChange(e))};onUndo=()=>{this.setState(e=>{let t=[...e.changes];return t.pop(),{changes:t,session:t.length?t[t.length-1]:e.sessionInitialValues}},()=>this.props.onSessionChange(this.state.session))};onReset=()=>{this.setState(e=>({session:e.sessionInitialValues,changes:[]}),()=>this.props.onSessionChange(this.state.sessionInitialValues))};render(){let{...t}=this.props,{changes:n,session:r}=this.state;return(0,N.jsxs)(qW,{children:[(0,N.jsxs)(JW,{children:[(0,N.jsxs)(XW,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,N.jsx)(YW,{children:(0,N.jsx)(KW,{})}),`Undo`]}),(0,N.jsxs)(XW,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,N.jsx)(YW,{children:(0,N.jsx)(GW,{})}),`Start Over`]})]}),(0,N.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},QW=vo({typography:{fontFamily:`inherit`},palette:{action:{disabled:`rgba(0, 0, 0, 0.54);`}},components:{MuiTypography:{styleOverrides:{root:{fontFamily:`inherit`}}},MuiButton:{styleOverrides:{contained:{backgroundColor:`#e0e0e0`,color:`#000000`,"&:hover":{backgroundColor:`#bdbdbd`}}}}}}),$W=F(`div`)({"& table, th, td":{fontSize:`inherit`}}),eG=class extends S.Component{static propTypes={className:p.string,children:p.array,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}computeStyle(e){let t=e=>parseFloat(getComputedStyle(e).fontSize),n=t(document.documentElement),r=t(document.body),i=Math.max(n,r),a=e!=null&&typeof e==`number`?e:1;return a===1?null:{fontSize:`${i*a}px`}}render(){let{children:e,className:t,fontSizeFactor:n,...r}=this.props,{extraCSSRules:i,...a}=r,o=this.computeStyle(n);return(0,N.jsx)(vr,{injectFirst:!0,children:(0,N.jsxs)(Wo,{theme:QW,children:[i?.rules?(0,N.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.extraCSSRules { ${i.rules} }`}}):null,(0,N.jsx)($W,{className:`${t} extraCSSRules`,...a,...o&&{style:o},children:e})]})})}},tG=F(eG)({display:`flex`,flexDirection:`column`,position:`relative`}),nG=class extends S.Component{static propTypes={ariaLabel:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,role:p.string,extraCSSRules:p.shape({names:p.arrayOf(p.string),rules:p.string}),fontSizeFactor:p.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,N.jsx)(tG,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},rG=class extends S.Component{static propTypes={tag:p.string,className:p.string,html:p.string};static defaultProps={tag:`div`,html:``};render(){let{tag:e,className:t,html:n}=this.props;return(0,N.jsx)(e||`div`,{ref:e=>this.node=e,className:t,dangerouslySetInnerHTML:{__html:n}})}};function iG({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&e[r]===void 0&&(t[r]=n[r]),t),{})}var aG=S.createContext(void 0);function oG(){return S.useContext(aG)}function sG(e){return Br(`MuiFormLabel`,e)}var cG=Vr(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),lG=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return _({root:[`root`,`color${L(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},sG,t)},uG=F(`label`,{name:`MuiFormLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color===`secondary`&&t.colorSecondary,n.filled&&t.filled]}})(Do(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:`1.4375em`,padding:0,position:`relative`,variants:[...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{[`&.${cG.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${cG.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${cG.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),dG=F(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Do(({theme:e})=>({[`&.${cG.error}`]:{color:(e.vars||e).palette.error.main}}))),fG=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiFormLabel`}),{children:r,className:i,color:a,component:o=`label`,disabled:s,error:c,filled:l,focused:u,required:d,...f}=n,p=iG({props:n,muiFormControl:oG(),states:[`color`,`required`,`focused`,`disabled`,`error`,`filled`]}),m={...n,color:p.color||`primary`,component:o,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required},h=lG(m);return(0,N.jsxs)(uG,{as:o,ownerState:m,className:g(h.root,i),ref:t,...f,children:[r,p.required&&(0,N.jsxs)(dG,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function pG(e){return Br(`MuiInputLabel`,e)}Vr(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var mG=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=_({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${L(r)}`,o],asterisk:[s&&`asterisk`]},pG,t);return{...t,...c}},hG=F(fG,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${cG.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size===`small`&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Do(({theme:e})=>({display:`block`,transformOrigin:`top left`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`,maxWidth:`100%`,variants:[{props:({ownerState:e})=>e.formControl,style:{position:`absolute`,left:0,top:0,transform:`translate(0, 20px) scale(1)`}},{props:{size:`small`},style:{transform:`translate(0, 17px) scale(1)`}},{props:({ownerState:e})=>e.shrink,style:{transform:`translate(0, -1.5px) scale(0.75)`,transformOrigin:`top left`,maxWidth:`133%`}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create([`color`,`transform`,`max-width`],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:`filled`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(12px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`filled`,size:`small`},style:{transform:`translate(12px, 13px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`filled`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,transform:`translate(12px, 7px) scale(0.75)`,maxWidth:`calc(133% - 24px)`}},{props:({variant:e,ownerState:t,size:n})=>e===`filled`&&t.shrink&&n===`small`,style:{transform:`translate(12px, 4px) scale(0.75)`}},{props:{variant:`outlined`},style:{zIndex:1,pointerEvents:`none`,transform:`translate(14px, 16px) scale(1)`,maxWidth:`calc(100% - 24px)`}},{props:{variant:`outlined`,size:`small`},style:{transform:`translate(14px, 9px) scale(1)`}},{props:({variant:e,ownerState:t})=>e===`outlined`&&t.shrink,style:{userSelect:`none`,pointerEvents:`auto`,maxWidth:`calc(133% - 32px)`,transform:`translate(14px, -9px) scale(0.75)`}}]}))),gG=S.forwardRef(function(e,t){let n=I({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=oG(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=iG({props:n,muiFormControl:l,states:[`size`,`variant`,`required`,`focused`]}),f={...n,disableAnimation:r,formControl:l,shrink:u,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=mG(f);return(0,N.jsx)(hG,{"data-shrink":u,ref:t,className:g(p.root,s),...c,ownerState:f,classes:p})});function _G(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function vG(e,t=!1){return e&&(_G(e.value)&&e.value!==``||t&&_G(e.defaultValue)&&e.defaultValue!==``)}function yG(e){return e.startAdornment}function bG(e){return Br(`MuiFormControl`,e)}Vr(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var xG=e=>{let{classes:t,margin:n,fullWidth:r}=e;return _({root:[`root`,n!==`none`&&`margin${L(n)}`,r&&`fullWidth`]},bG,t)},SG=F(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${L(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:`inline-flex`,flexDirection:`column`,position:`relative`,minWidth:0,padding:0,margin:0,border:0,verticalAlign:`top`,variants:[{props:{margin:`normal`},style:{marginTop:16,marginBottom:8}},{props:{margin:`dense`},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:`100%`}}]}),CG=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiFormControl`}),{children:r,className:i,color:a=`primary`,component:o=`div`,disabled:s=!1,error:c=!1,focused:l,fullWidth:u=!1,hiddenLabel:d=!1,margin:f=`none`,required:p=!1,size:m=`medium`,variant:h=`outlined`,..._}=n,v={...n,color:a,component:o,disabled:s,error:c,fullWidth:u,hiddenLabel:d,margin:f,required:p,size:m,variant:h},y=xG(v),[b,x]=S.useState(()=>{let e=!1;return r&&S.Children.forEach(r,t=>{if(!JL(t,[`Input`,`Select`]))return;let n=JL(t,[`Select`])?t.props.input:t;n&&yG(n.props)&&(e=!0)}),e}),[C,w]=S.useState(()=>{let e=!1;return r&&S.Children.forEach(r,t=>{JL(t,[`Input`,`Select`])&&(vG(t.props,!0)||vG(t.props.inputProps,!0))&&(e=!0)}),e}),[T,E]=S.useState(!1);s&&T&&E(!1);let ee=l!==void 0&&!s?l:T;S.useRef(!1);let D=S.useCallback(()=>{w(!0)},[]),O=S.useCallback(()=>{w(!1)},[]),te=S.useMemo(()=>({adornedStart:b,setAdornedStart:x,color:a,disabled:s,error:c,filled:C,focused:ee,fullWidth:u,hiddenLabel:d,size:m,onBlur:()=>{E(!1)},onFocus:()=>{E(!0)},onEmpty:O,onFilled:D,registerEffect:void 0,required:p,variant:h}),[b,a,s,c,C,ee,u,d,void 0,O,D,p,m,h]);return(0,N.jsx)(aG.Provider,{value:te,children:(0,N.jsx)(SG,{as:o,ownerState:v,className:g(y.root,i),ref:t,..._,children:r})})}),wG=F(CG)(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),TG=F(gG)(()=>({fontSize:`inherit`,whiteSpace:`nowrap`,margin:0,padding:0,alignSelf:`flex-start`,position:`absolute`,top:0,left:0,transformOrigin:`top left`,pointerEvents:`none`,"&.MuiInputLabel-shrink":{transform:`scale(0.75) translate(0, -0.75em)`},"&:not(.MuiInputLabel-shrink)":{transform:`translate(0, 0)`}})),EG=({label:e,className:t,children:n})=>(0,N.jsxs)(wG,{className:t,children:[(0,N.jsx)(TG,{shrink:!0,children:e}),n]});EG.propTypes={label:p.oneOfType([p.string,p.object]).isRequired,className:p.string,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired};var DG=F(`div`)(({theme:e,tagName:t})=>({'&:not(.MathJax) > table:not([role="presentation"])':{borderCollapse:`collapse`},'&:not(.MathJax) table[border]:not([role="presentation"]), &:not(.MathJax) table[border]:not([role="presentation"]) td, &:not(.MathJax) table[border]:not([role="presentation"]) th':{borderStyle:`solid`,borderColor:kU()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)':{backgroundColor:jU()},'&:not(.MathJax) > table:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td':{backgroundColor:jU()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},"&:not(.MathJax) > table td > p.kds-indent":{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:ZH()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${ZH()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),OG=/\\embed\{newLine\}\[\]/g,kG=`\\newline `,AG=`preview-prompt`,jG=class extends S.Component{static propTypes={prompt:p.string,tagName:p.string,className:p.string,onClick:p.func,defaultClassName:p.string,autoplayAudioEnabled:p.bool,customAudioButton:p.shape({playImage:p.string,pauseImage:p.string})};static defaultProps={onClick:()=>{}};promptRef=S.createRef();parsedText=e=>{let{customAudioButton:t}=this.props,n=document.createElement(`div`);n.innerHTML=e;let r=n.querySelector(`audio`);if(r){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,r.getAttribute(`src`)),r.removeAttribute(`src`),r.setAttribute(`id`,`pie-prompt-audio-player`),r.appendChild(e),t){r.style.display=`none`;let e=document.createElement(`div`);e.id=`play-audio-button`,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,backgroundImage:`url(${t.pauseImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),r.parentNode.insertBefore(e,r)}}return n.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=document.getElementById(`play-audio-button`),r=document.getElementById(`pie-prompt-audio-player`);if(e&&r&&r.play().then(()=>{n&&t&&r.addEventListener(`ended`,a)}).catch(e=>{console.error(`Error playing audio`,e)}),!n||!r||!t)return;let i=()=>{r.paused&&(n.style.backgroundImage.includes(t.pauseImage)||r.play())},a=()=>{n.style.backgroundImage=`url(${t.playImage})`},o=()=>{Object.assign(n.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},s=()=>{Object.assign(n.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};n.addEventListener(`click`,i),r.addEventListener(`play`,o),r.addEventListener(`pause`,s),r.addEventListener(`ended`,a),this._handlePlayClick=i,this._handleAudioPlay=o,this._handleAudioPause=s,this._handleAudioEnded=a}removeCustomAudioButtonListeners(){let e=document.getElementById(`play-audio-button`),t=document.querySelector(`audio`);!e||!t||(e.removeEventListener(`click`,this._handlePlayClick),t.removeEventListener(`play`,this._handleAudioPlay),t.removeEventListener(`pause`,this._handleAudioPause),t.removeEventListener(`ended`,this._handleAudioEnded))}componentDidMount(){this.alignImages(),this.addCustomAudioButtonControls(),this.setupMathRendering()}componentDidUpdate(e){this.alignImages(),e.prompt!==this.props.prompt&&this.renderMathContent()}componentWillUnmount(){this.removeCustomAudioButtonListeners()}setupMathRendering(){this.renderMathContent()}renderMathContent(){let e=this.promptRef.current;e&&typeof OW==`function`&&OW(e)}alignImages(){let e=this.promptRef.current;if(!e)return;let t=e.getElementsByTagName(`img`);if(t&&t.length){for(let e of t)if(e.attributes&&e.attributes.alignment&&e.attributes.alignment.value){let t=e.attributes.alignment.value,n=t===`center`?`center`:t===`right`?`flex-end`:`flex-start`,r=e.parentElement;if(r.tagName===`DIV`&&r.style.display===`flex`&&r.style.width===`100%`)r.style.justifyContent=n;else{let t=document.createElement(`div`);t.style.display=`flex`,t.style.width=`100%`,t.style.justifyContent=n;let i=e.cloneNode(!0);t.appendChild(i),r.replaceChild(t,e)}}}}render(){let{prompt:e,tagName:t,className:n,onClick:r,defaultClassName:i}=this.props,a=`${n||``} ${i||``} ${t===`legend`?`legend`:``} ${AG}`.trim();return(0,N.jsx)(DG,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(OG,kG)}})}},MG=e=>(0,N.jsx)(N.Fragment,{children:S.Children.map(e.children,t=>S.cloneElement(t,{"data-pie-readable":e.false===void 0}))});MG.propTypes={children:p.node,false:p.bool};var NG=e=>(0,N.jsx)(N.Fragment,{children:S.Children.map(e.children,t=>S.cloneElement(t,{"data-pie-purpose":e.purpose}))});NG.propTypes={children:p.node,purpose:p.string};var PG;typeof window<`u`&&(PG=new DOMParser);var FG=e=>PG.parseFromString(e,`text/html`).body.textContent,IG=e=>{if(!e)return!1;let t=FG(e);return!!(t&&t.trim())},LG;typeof window<`u`&&(LG=new DOMParser);var RG=e=>{if(!e)return!1;let t=LG.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},zG=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAIRAxEAPwD1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARtJNt2S4sDaljMNB2dZfNr9gGn49hfzv1WA+PYX879VgPj2F/O/VYD49hrNqpeyvaz1A0d8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaA75UPIqepe0B3yoeRU9S9oDvlQ8ip6l7QHfKh5FT1L2gO+VDyKnqXtAd8qHkVPUvaBY5hSm7QpVZPsUb/rA+mLbV3Fx8zAoAAAAAAAAAAAAAAAAAAAAPhxOYqDcaNtOM3w+YD8bF5u296cnLsb4epAfnV887lrvvV6eLoB88topvSNRJW5xfsA0d/Z/nv8AaAd/Z/nv9oCPPpxTbrcFf+EBtvaZX0rafpe8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veA8Jvlvre8B4TfLfW94Dwm+W+t7wHhN8t9b3gPCb5b63vAeE3y31veBu0to4VZ7inLXn3TggP0cJnNOpLuae+km27q6XbxA/UoVac1GruKcZLg219nMD9qjUhOKUFO1r+Mn9rA3AAAAAAAAAAAAAAAAAAB8mPxLoU92ErSlxfYgOF7W7S5XszlmMzzNsfTw2AwNKVatVqLxVGK8Z29F7c3pZan6WbNeIuRatRrVM6RD8716jD25u3Z0piNZl5+9MPWv2828zPEYLZHM8Zs7kEZtUYYafcsVXjfSdWpHxot+RF2SdnvWuVbY+VMLgaIrxNMV3OXXfEdERxT1z7tEn2xmvF46uaMLVNu3yabqp6Znjjqj36ukMXjMZj68sVjsVWxNaesqlao5yl6W9WdTRbotxwaI0joctXcruVcKudZ6WyengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAN7CYzGYCvHFYHFVsNWhrGpRqOEo+hrVHmu3Rcjg1xrHS90XK7dXConSeh3Z0Q9avbvYTMKGB2rzLGbQZFKa7rDEVO6YqgnxnTqy8aVvIk2tLLd4nLbXyphcdRNeGpi3c6N0T0THF749+rqdj5rxeBrijE1Tct9O+Y6Ynjnqn3aM+NltqMBtDluDzvKMXTxeExtOOIw9ZSsqkJap6cHZ8LKz4olN6zXh7lVq5GlUTpMKxZvUYi3TdtTrTMaxLmuX42U4NxqzaUVeMo726r2110t6voPzfo/To1FVhvqpGevFKwG4AAAAAAAAAAAAAAAAAfgZpWko1au/KSi7KV9fmt6AMQOvHthiMDsVlWy2FxDpxzvMJVa8Y/wAOlQSk4S7V3SdKX+qrcztckYWLuMrxFUfgjd0TV+0THvcTnjFTawdGHpn8c7+mKf3mJ9zCcqCWgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGaXUi2wr4zYvNdl8Ripz7y46NahF6qnSrpy3UuzfhVl/rMl+d8LFrGUYiI/HG/rj9piFSyPipu4OvD1T+Cd3RFX7xM+9ltlGKi9y8U3JqTk22mr+p+g4p2zkuFxNOreEIRppO0VdXfzAfSAAAAAAAAAAAAAAAA0VZUowfdpRjFqzcnZAcUziruUG4ylGcVfzNfe+ugGD/Xnqznidj4Saaj3xtbz/ABf7+ooeQ+cdjxJ3n7m/b8LFcoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGUXUeqyp4va1Ra8Z5do158R+q5Pc+c37fhUTIPOOx4mbWVTiqcJVpWcZWi6fBevzXJ4ojmeGgpRjiJL9knHV66/N8yA3wAAAAAAAAAAAAAAAG1ilF4epv8N1+vl9IHDtoXGGH3VFq8XqtF6G+foAwg67zi8Tsju8P2/bstu4bk9fuih5D5x2PEnefub9vwsXihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZOdSj/H7Xf8A0H2YknufOb9vwqJkHnHY8TNjZ7WV5VHBRfJ2TRPFEcwy9zUof4zudvFtfd+wD9IAAAAAAAAAAAAAAABs4tTeHnuSs0m351zA4ftG2sNpNqSacUn62Bg5124OOO2UdrJ/H0r6P/N+XzlDyHzjseJO8/c37fhYxFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lN/je1iva8cDr/8AkE9z5zft+FRMg847HiZrbPb1NqO+oNvTRa8bpXehPFEczy9y7pG1Va6um5NfqswP0wAAAAAAAAAAAAAAAGxjJ7mHmrtNq11G4HDtpFL4uqt/F4JJJPXz8fmsBg912t14zZLdem7jrLs/J/P6Sh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEzd2fhGcVGSun7yeKI5fgYVEoN4eMocp6byA/QAAAAAAAAAAAAAAAAbOLipYeeidk2r8gOG7RNzp9zcYqKW85pXkvMBg/12oRhidkk14/7fu9eFsNb9ZQ8h847HiTvP3N+34WMJQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMm+pSv23tY+xYH+8E9z5zft+FRMg847HiZubOS8ZRat2efiTxRHNcBUh3CFPeSkr6XV3qB9QAAAAAAAAAAAAAAADYxkHKhJqUk4pvR8V5wOGZ81GlKDbV1rfmla33uBg/wBdhp4rZK1tFj+bul+1/m+7KHkPnHY8Sd5+5v2/CxjKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGxjYKeHld23dUBw3aNN0UpNJdrtfj6L2Awd67Di8bso4xaVsdpe/+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAyb6lLfxvaxaarAvh/wCIJ7nzm/b8KiZB5x2PEzb2fjvKLV7p3XjNdvYTxRHNsFTi8PCd5X1/hO3HsA+oAAAAAAAAAAAAAAAB8+Oq9yw8v2Ock1bxeQHEdoG6mC8Vt3krR+/vAwa666ti9kteMcd/uCh5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA+rLMqzPO8fRyrJsuxWPxuJluUcNhaMqtWrLjaMIpuT05I8XLlFqma7kxERyzuh7t2671UUW4mZnkjfLlP4FumP8A+U22X/6HFf8A8GH/ABXAf89H91P6s3+E4/8A4K/7av0PwLdMf/ym2y//AEOK/wD4H8VwH/PR/dT+p/Ccf/wV/wBtX6Nut0O9LmHg6lfos2vpwXGU8jxSS+dwPsbUwNW6L1H90fq+TsvHUxrNmv8Atn9HGsxyvM8oxLwWbZdicFiI6uliKMqc1/qySZl0XKLscKiYmOjew7luu1PBriYnp3PlPbwAZe7A/B/+HGw+QbZ/ha+Jd/Mtw2Y/Fu8PdO491pxnub/xhb1t617K/YjhsbnT7JibmH8hrwZmNeFprpOn5Xd4LJX2zDW8R5fThRE6cHXTWNfzOmOsX0FPoB2uy/ZXwp7+rH5bHMPjHxL4ruXq1Ibm73Sd/wDF3vdceGmu/wBh7Y/jViq9wODpOmmuvJE+qPW5/buxv4Lfps8Ph6xrrppyzHrn1OqTdNIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZ/wC2HUh2G6Rdgsi2g2Eq09mNoauUYSpNJOWCxc3Ri26kFd05N8Zw87cZN3Jlhc24nA4mu1ifv0cKeuN/JPL1T8YU/FZRw2Ow1F3Dfcr4MdU7uWOTrj4Swt6R+inb3onzp5Ht1s/Xy+rJvuNa2/QxEV/CpVF4s1w4O6vqk9Dv8DtLDbSt+Uw1evfHXCfY/ZuK2bc8niaNOnknqlxIzmCAAAAAAAAAAAABk11KbfGtrUvxt3A2fL/OCe585v2/ComQecdjxM3tnL3j2a/rJ4ojmmCVX4vBqcd3XTd149twPqAAAAAAAAAAAAAAAAfPjZ7tFxUrOSfNa+bX9QHD9oKtB4ZQ34RndOytvWf2rUDBzrrxaxeybemmOVuf+b8ih5D5x2PEnefub9vwsZChJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotr8qttXsth6tTD19pcqp1aUnCcJ4ympRknZppvRp6WP2jDXpjWKJ+EvxnE2YnSa4+MN3BbQ5BmVb4vl2eZfiqtr7lHEwnK3oTufK7F23GtVMxHU+037Vc6U1RM9bZ2l2T2Y2yyypk21mQZfm+BqJ71DGYeNWF+1KSdn2NWa4o9WMTewtflLFU0z64nR5xGGs4qjyd+mKo9UxqwQ61vU/w3Rzl9fpH6Mqdeps/TnfMMtnJ1J4BSaSqU5PxpUruzTvKN07tX3aRlzM9WOrjCYz8fJPr6J6e9NsyZXpwNE4vB/g5Y9XTHR3MTjtnDvXnoD/yH7Afzay7+zwIZtn0jf8Abq75XXYvo6x7FPdDDL4Rb/K5s9/Nyn/acQd9kbzK57f0hwGevPbfsfWWKZ2riQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ofVtTsns1ttktfZ3a3JMJmuW4lfsmHxNNTjflJc4yXKSs1yaPGHxN7CXIu2Kppqjlh7xGGs4u3Nq/TFVM8ksJenDqDZtlTxG0PQviamZYNXnPJcXUXxmmuL7jUdlUXZGVpacZtlC2RnOi5pa2hGk/mji98cnXG7qTza+S67et3Z86x+WeP3Ty9U7+tiFmGXZhlGOr5ZmuBxGCxmGm6dbD4ilKnUpyXGMoySafmZ3VFdN2mK6J1ieWHCV26rVU0VxpMck8b5j08AAAAAAAAAABk31Kt1V9rpO+8lgLdlrYi9/oJ7nzm/b8KiZB5x2PEzbyCU4qLjuLXVydrcSeKI5tl874eMGpXV9d12evID6gAAAAAAAAAAAAAAAGxjP8RJb8Yqz4q9/MgOHbQ1GqKS3XNK6klrxs0Bg512JXxuynDhjuSX+jlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1V2l1hNh7v/ANpf7uZpcxei73V9YbvLnpWz1/SXrARRbXjv0wf5Wttv5x5l2/6TU7S77L8xs+xT3Qgu1PPr3t1d8uJRlKElOEnGUXdNOzTM6Y13SwYnTfDMHqS9Yva6W2uD6I9sM5xea5XmdKcMrqYmfdKmErU4Snub8vGdOUYyVm3ZqCjZXRwmbNh2Ps846xTFNVP4tOWJ3a9ffv1d7lLbt/7RGBxFU1U1fh15Jjfp1ftozpzbK8DneV4zJczoRr4PH4ephcRSlwqUpxcZRfmabROLdyq1XFyidJidY9ykXLdN2ibdcaxMaT1S8bNscgeym12ebLOt3Z5PmOJy91PLdKrKG98+7cveFvfabFF780RPxjVAsVY+zX67P5ZmPhOj1h6A/wDIfsB/NrLv7PAie2fSN/26u+Vt2L6OsexT3Qwx+EWv+F3Z/s8G6X9qxB32RvMrnt/SHAZ68+t+x9ZYqHauJc+6NugrpU6WnKpsPslicZhKc9ypjarjRw0HzXdJtRk1zUbtdhrcftjBbN3YiuIn1cc/CGzwGx8btPfhqJmPXxR8Z+jujBfB3dMleCnjdp9kMM2r7ixWJnJPsdqNvU2c/XnjAROlNFc+6P1dDRkbH1RrVXRHvn9HFNt+pJ09bGYSpj6GR4LaOhSW9N5JiJV6iXmpTjCpJ+aMWzNwmbdmYqrgzVNE/wBUafOJmPjLBxeUdp4WnhRTFcf0zr8piJ+EOhqtKpRqTo1qcqdSnJxnCSs4tcU1yZ0sTExrDmpiYnSXbXRt1W+lvpX2Xp7X7G5fltfLqtapQUquYU6c1ODtJOL1Xz8mnzNHj8w4HZt7yGImYq4+KeVvMBl3HbSsxfw8RNPFxxyNvpN6sPS30R7NLazbHKcHTy74zDCyqYbGQrOE5qTi2o8F4tr9rXaetn5gwO073kMPVPC013xo87Qy9jtmWfL4imODrpunV1ObppHLejLov2v6XNpJbK7FYOjiMfDDTxc1WrKlCNKLjFtyei1nFelowtobQsbMteWxE6U66eveztn7Ov7TveQw8a1aa+rc7Xl1E+sHFOUsmydJK7bzSlojSf8A2Gy/zT/bLd//AB21Pyx/dDH2pDudSVPfjLdk1vRd07c15jqInWNXLzGk6NIfAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf8AUwIJjfOrntT3yv2C81t+zHdDkBisoA616YOr50a9NWAdPavJ1SzKEN3D5thEqeLo9i3rePFeTNNcbWepttmbaxeyatbFX3eWmeKf064ajamxMJtanS/T97kqjjj9eqWAXTf1SukrocliM2p4aW0GzVNuSzTBUnejDtr0tXS9N3Dh419Cm7IzLhNqaUTPAuflnl6p5e/oTHa+WcXsvWuI4dv80cnXHJ3dLpA6JzgAAAAAAAAAyb6lNvjO1r4ySwNlfjpiPdzJ7nzm/b8KiZB5x2PEzd2dbSTSb8y+cniiOZYGFZ0ac1WtDXxHFdvaB9gAAAAAAAAAAAAAAAD58bZUJPzNfj7v/P0AcM2jpuUISjFSdrfjtvj2X/UBhB12Zb2N2T0X4uO4K1/ycoeQ+cdjxJ3n7m/b8LGMoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAO1uqt++F2H/lL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8d+l+fdOlnbae7u720WZO172/bNQu+zI0wNmP6Ke6EF2pOuOvT/XV3y4iZzBd59TLYnNtrunjIsfg8JUngNn3PMcfXV1ClFQlGmm+2VRxSjzW9yTOczVi6MNs2umqfvV7o+O/4Q6TKmErxO06KqY+7Rvmfdu+MvUMjqyPHTpZzjC7Q9Ke2OfYGanhsxz/MMVQkuEqc8ROUX6mi8bNtTYwVm3VxxTTHwiEF2ndi/jb12nimqqfnL1O6A/8AIfsB/NrLv7PAjO2fSN/26u+Vn2L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suvOqf0K4Ppp6ToZfn1OU9n8moPH5nGM3B1knu06Ka1W9J6213Yzs07M2uZNq1bKwfCtfjqnSOj1z7o+ejVZa2TTtbGcG7+CmNZ6fVHvn5avTyUsi2SyKdRxwmVZRlWGc3uxjSo4ejCN3otIxSRH/wCZibnLVVVPXMzKxfy8Nb13U00x1REQxuzr4Qroby7N54HLcj2lzXB0puLx1DDUqcKi8qnCpUjNr9JQfmOstZJx9dHCrqppn1TM/PSJj4auSu532fbucGimqqPXER8tZifjo746NekzY/pZ2Xo7XbFZi8Vgas5UpxnBwq0Ksbb1OpF8JK67U0002mmc3j8Bf2bemxiI0n5THrh0uA2hY2lZi/h51j5xPqlip1++hHKKGV4fpn2dwEMPi/jMMJncaUbRrRmrUq8raKSklBv+Fvw7Ne0yZta5Nc7PuzrGmtPRpxx9eje4rOmyLcURtC1Gk66VdOvFP06dz8v4OrpBjhc12k6MsZiIwjjYQzjBRlpepC1OtFPtcXRaXZCR+2eMFwqLeMpji+7PfH1+L8cjY3g13MHVPH96O6fp8GV3TpsL+Enoj2o2OhSdTEY3ATnhIpXbxNJqpRS9NSEV85xWyMZ9gx1q/wAkTv6p3T8pdttjB/b8Ddw/LMbuuN8fOHkJwLmhLOf4OfYfuOU7UdIuJpNSxNenlOFk428SEe6VbPmm50/nh5ic55xety1hI5I4U+/dHdPxUjIuD0t3cXPLPBj3b574+DvDrX9IL6Oug3aHMsPiHSx+aU1lGCcePda94yafJxpqpJPtic5lzBfbto26JjdH3p6o/fSHR5kxv2HZtyuJ31fdjrn9tZeVBaUUAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAACSjGcXCcVKMlZpq6aHEcbGfpw6j+wnSG6+f7ASobK59O85U4U/2hiZ8fHpx1pN+VDTm4t6nXbIzdicDpaxP8yj/tHv5ff8XIbXyjhsdrdwv8uv/rPu5Pd8GB/SN0VbedFGcvI9udnsRl9VuXcazW9QxEU/xqVReLNejVX1SehSsDtHDbSt+Uw1evfHXCaY/ZuJ2bc8niaNO6eqXEjNYIAAAAAADJnqVq+K2telt3A8r8sRy5k9z5zft+FRMg847HiZv7Ocvv2k8URzPAStSjHk78IPjft4AfWAAAAAAAAAAAAAAAA28Rf4vUsv4L+wDhe0tRfF1Sas/wAZPt1QGDfXW/LNk/0cd/dyh5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf+Uv93M0uY/Rd7q+sN3lz0rZ6/pL1gIotrH/aLqQ9CO0+0GZ7S5nDPljM2xlbHYjueYKMO6VZuct1bjsrydlc6exm3aOHtU2aODpTERG7kiNPW5i/lHZ2Iu1Xq+FrVMzO/lmdfU+bB9Qzq/YWuq1fLs7xkFxpVszkov8AoKMvpPdecdqVRpE0x7v11eKcm7LpnWYqn3/po7n2H6PdiujbJoZBsNs5g8owUdXCjFudR6+NUqSbnUlq9ZNs5/F43EY655XEVzVPT9I4o9zoMJgsPgLfksNRFMdH1njn3unetb1lck6Jtlcbsrs7mVHEbZZpQlQo0aUt55fCas8RUt+LJJ3hF6uVnZxTN9lzYNzaV6m9djS1TOs/1ackfXo6WgzJt+3syzNi1Ot2qNI/p15Z+nT0PM0rqQPXnoD/AMh+wH82su/s8CGbZ9I3/bq75XXYvo6x7FPdDDL4RZr8Lmzyvr4OU/7ViDvsjeZXPb+kOAz157b9j6y6M6LumrpD6G62Y4jYDN6GAqZrGlDFSqYOlXclTcnFLukXu/jy4WvpfgjpNo7Jwu1IpjFU68HXTfMcfU5vZ21sVsqapwtWnC013RPF1uyKvTb1renrIMw2JwFPMdoMux8Y0cZHLskppKKlGdpVadNbibSveSunbmamNk7E2NdpxFUxRVG+Nap6uKZ3tvO19t7ZtVYemJrpndOlMdfHEbn5eB6mHWRx0I1F0duhCSunXzTBwfzx7rvL50ftXmrZNG7yuvVTV+j8KMqbXr3+S066qf1ZWdSrob6Veh6ltbgekLKKeX4TMpYKtgoRxlGupVIKsqrSpye67SpXb42Vji817VwW1JtVYWrWaddd0x6tOP3u2ynsrG7Li7TiqdIq003xPr14vc5p1yqFKv1btse6w3u5wwdSOvCSxlGzNdleqadrWdOn/GWwzTTFWyb2vR/lDzo6Ftvq/Rh0pbObbUqjjSy/GRWKXlYaonTrL/7cpW89irbWwUbQwVzDzyxu643x80o2TjZ2fjbeIjknf1Tun5PX6nUp1qca1GpGdOcVKMou6knwafNELmJidJXaJiY1h5M9ZXYV9HnTbtVkEKThhauNlj8Joku4V/2WKjblHfcP9Rlt2DjPt2zrV2ePTSeuN37oht/B/Ydo3bUcWusdU7/lxPR/q5bD/g86FNk9m6kHHErARxmKTVmq9dutOL/Rc93/AFUSfbmL+3bQu3o4tdI6o3R3aq1sLB/Ydn2rPLprPXO+e/Ril8Ij0hvMtq8h6NMHVfccmw8sxxqTVpYitpTi/PGnFv0VjtckYHydivF1cdU6R1Rx/Ge5xOecd5S/bwdPFTGs9c8XwjvYfndODAAAAAAAAAAAAAAAAAAAAAAAAD2W6Pf3A7NfyPg/6mBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA/I2p2S2a23yWvs7tbkmEzXLcR/jMPiaanG/KS5xkuUlZrk0fvh8TewlyLtiqaao5YfhicNZxdubV+mKqZ5JYS9OXUIzTJ1idpOhrFzzHBQTqVMmxlVLEUktX3Gq7Kol5MrS04zbKFsjOVF3Szj40n80cXvjk927qTvbGTK7Wt7Z86x+WeP3Ty+/f1sO5RlCThOLjKLs0+KZ3kTrvhwUxpOkoAAAAAGTXUpt8b2s7d3A/3gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/wBrA+gAAAAAAAAAAAAAAABtYm/xepu+SwOE7RNzW40o2jpJq/PzMDB/rr7vxvZK177uOv2f5uUPIfOOx4k7z9zft+FjIUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAHa3VW/fC7D/yl/u5mlzH6LvdX1hu8uelbPX9JesBFFtYH7d9ffpX2W232h2YweyuydXD5RmuLwFKdXD4lzlClWlCLlauldqKvbS5SMHkzB4nD271VyrWqmJ5OWNfUm2MzpjcNiLlmm3TpTVMcvJOnrcfq/CJ9M0lajsrsZB2d28JipP5v2wZVOR8BHHXX8Y//LEqzzj54qKPhV/+nCtseuf1gNr6FXCLa6GR4aqrSp5Ph44aS/Rq61Y/NNGxwuVdl4WYq4HCn+qdflxfJrsVmvamKiafKcGP6Y0+fH83SWIxFfF16mKxVepWrVpupUqVJOUpybu5NvVtvmdDTTFMcGmNIc7VVNU8KqdZbZ9fHrz0Ba9B+wFv/hvLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWa/C5s8r6+DlP+1Yg77I3mVz2/pDgM9ee2/Y+suDdUzoFwvTft1Xe0DqR2dyCnTxOPjC6eJnKVqeH3lZxUlGbbWqUWlZtNbLMu2atk4aItf6le6Oj1z+jXZZ2NTtbEz5b/To3z0zyR+r0oUNkejnZapOnSy/IMgybDyqSVOEaNDD0oq7dlovtb7WSX+fjr0RvrrqnrmZVv+RgbMzuoopjqiIY47S/CG9FOV4ythNndmc/zuFJ2jid2nhqVXzx3252/Sgn5jq8PkjG3KYqu1009G+Z+W75uTxGeMDbqmm1RVV07oj57/k7C6vXWVyzrBVs8o5Zsrisn7xxw0qjr4mNXuird0tbdirW7l9PmNXtvYNexYomuuKuFrxRpxafq2mxNv0bbmuKKJp4OnHOvHr+i9cT97dtn/3OE/tlE+ZY9LWeuf8AGX3NHom91R/lDyvLOiz1P6ofSC+kLoKyHEYmv3THZJF5Li25b0t6gkqbb43dJ0m782yM5mwX2LaVcRG6r70e/j+eq0ZYxv27ZtuZn71P3Z93F8tHX/Wq6D6nSH0x9FudUcAq2DzDG96M2aV70KO9ilG3DWlHFK77EbTLu14wOAxNuZ0mI4VPXP3e/gtXmPZE47H4W5EaxM8Grqj73dwmUeIxFDCYeri8VVhSo0YSqVKk3aMIpXbb5JJHG00zVMUxxy7OqqKYmqeKHj10sbdYjpL6SNoducQ52zbHVKtGM/xoUF4tGD/RpxhH5i77NwcYDCW8NH+2Pny/PVBtp4ycfi7mJn/dO7q5PhGjiRmsEAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/AKmBBMb51c9qe+V+wXmtv2Y7ocgMVlAAAAA626YOsF0a9CuAdXavOI1cynHew+U4Rqpi62mj3L+JF+XNpdl3obbZmxcXtarSxT93lqnij9eqGo2ptvCbJo1v1fe5KY45/TrlgF03dbbpL6Yp4jKaWJls9s3UvFZXgqrvWg+Vero6v6NlD+LfUpuyctYTZelcxw7n5p5OqOTv6Ux2vmbGbUmaIngW/wAscvXPL3dDo86JzgAAAAAGTXUp/K9rLcd3A2X/AOQT3PnN+34VEyDzjseJm9s5y+/aTxRHNME6vxeCUI7uuu9rx7LAfUAAAAAAAAAAAAAAAA2MXNwoSShJ7yaule3pA4TtJNOMVKlPVaPSy19oGEXXZSWN2TsreLjv4Sf+jlDyHzjseJO8/c37fhYxlCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAB2t1Vv3wuw/8AKX+7maXMfou91fWG7y56Vs9f0l6wEUW1489Ml/wvbcXd34SZnfS3+dVC77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A/wDIfsB/NrLv7PAhm2fSN/26u+V12L6OsexT3Qwy+EWX/pd2fdl+5ylr/wDVYg77I3mVz2/pDgM9ee2/Y+su0Pg43hfwfbWRhKPxlZzTdRc1DuEdz6d/1M0+etftVr1cH6//AMbjImn2W76+F9HZfXJ2U2o2w6CM3y3ZTCVsXiKGIw+Mr4WhFyqV6FOd5KMUm5NPdlZeQanK2Js4XaVFd6dImJiJ9Uz/AO0bjNOGvYrZldFiNZiYmY9cR/7V5eQoV6leOFp0ak605qnGnGLcnJuyilxvfSxYpqiI4UzuRqKZmeDEb3oX1EehvbTo42dz7anbHL6mWT2leGjhsBiIOGIp0qPdP2SpF6w3nVdotJpRu+KJdnDamHx12izh54XA11mOLWdN0dWip5O2ViMBauXsRHB4emkTx6Rrvnr14nYfXBhKfVv20jCLb7hhXZdixdFs1WWPS1nrn/GW2zPv2Te6o/yh5WlnRVlt8Hl0hd6Nu856OcZXaobQYVYzCRfD4zQTckvPKlKbf/dI4jO+C8rhqMXTx0TpPVP797ucj47yWJrwlU7q41jrj9u5n9KnTnKEp04ydOW9BtXcXZq67HZtehsmUTMKdMRPG6T64+362D6Cc7WHxPcsfn+7k2Fs7N91v3Xhr/iY1de1o6DK+C+2bSo1jdR96fdxfPRz2acb9i2bXpO+v7se/j+Wry3LIjIAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUAAPydqdrNmticlr7RbW53hMqy3DL9kxGJqKMU3wiucpPlFXb5Jn74fDXsXci1YpmqqeSH4YjE2cJbm7fqimmOWWEvTh1+c2zV4jZ7oXw1TLcG7wnnWLpr4zUXB9xpu6prslK8teEGihbIyZRb0u7QnWfyxxe+eXqjd1p5tfOldzW1s+NI/NPH7o5Oud/UxCzDMcwzfHV8zzXHYjG4zEzdStiMRVlUqVJPjKUpNtvzs7qiim1TFFEaRHJDhK7lV2qa651meWeN8x6eAAAAAAAGTXUpTeL2stdeLgVfs/KCe585v2/ComQecdjxM3dnJw3VPeW72305k8URzfA/ksPn+1gfQAAAAAAAAAAAAAAAA2sVFSw87xTtFtX5acQOFbS1KkaailHdtdJ63d/QBg711rfG9k+22O05W/a9ih5D5x2PEnefub9vwsZShJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAA7W6q374XYf8AlL/dzNLmP0Xe6vrDd5c9K2ev6S9YCKLa8eemNNdLu3CfFbSZnzv/AJ1U58y77L8xs+xT3Qg21fP7/t1f5S4eZzAAAAD156A7/gP2Av8A/DWW/wBngQzbPpG/7dXfK67G9HWPYp7oYY/CK2/C9s+9L+DdLn//AKsQd9kbzK57f0hwGevPrfsfWXXfVd6fZ9BG21XF5lQq4nZ7O4Qw+a0qSvOCi26daC/hShvS05xlJcbG2zDsb+MYeKaJ0rp30/WPe1OXdtfwbETVXGtFW6r6T7npnshtvslt/k9PP9jNoMFm+AqpNVcNU3t1tX3Zx/GhLtjJJrmiQ4nCX8Fc8liKZpnp/wDb1fwuLsY235XD1xVHR/7c+zvPkGExc87eV5fRxUVKc8X3CEaiTT3m52v231PHlbtVPk+FMx6tfo/TyVqmrynBiJ9en1cP2b6d+jLbDpDxXRlsvtDTzPNsFgqmNr1MPaWGShUjCVNVL2nUW+naN1ZPW6aM6/sfGYXCxjL1PBpmdI1498a66ckdbAsbYweKxU4OzXwqojWdOLdOmmvr6m9057K1ttuh/a/ZnC64jGZTXeHXlVoR7pTj5ryhFX5XPOyMTGEx9q9VxRVGvVO6fk9bYw04vAXbMcc0zp1xvj5vIMuiEuR9HW2OM6Ptusi21wLn3XJ8dSxTjC16lNS/ZIa+VByj85i47C043DV4er/dEx+k+6d7LwOKqwOJoxFP+2Yn9Y98bnsXl+OwuaYDDZngqndMPi6MK9Gdrb0JxUov1NEGrom3VNFXHG5e6K4uUxXTxTvYAfCE9IMc86Rcp6P8FiFPD7NYN18SoyWmKxFpbrXmpRpNfpv56dknBeRwteKqjfXOkdUfvr8EwzvjvLYqjC0zuojWeuf20+LFA7VxAAAAAAAAAAAAAAAAAAAAAAAAAAPZbo9/cDs1/I+D/qYEExvnVz2p75X7Bea2/ZjuhyAxWUkpRhFznJRjFXbbskhxnExn6cOvBsJ0eOvkGwEaG1WfQvCVSFT9oYafDx6kdarXkw05OSeh12yMo4nHaXcT/Lo/7T7uT3/ByG183YbA62sL/Mr/AOse/l93xYH9I/Stt70sZ088262gr5hVi33GjfcoYeL/AINKmvFguHBXdtW3qUnA7Nw2zbfk8NRp3z1ymmP2litpXPKYmvXo5I6ocSM5ggAAAAAAAADJrqUt/HNrFfTdwP8AeCe585v2/ComQecdjxM3dnFJRVnHefO2nMniiOb4C/xSnfjr9rA+gAAAAAAAAAAAAAAABsYxruEouputp2W9a/mA4RtHPeShvR4X4q7+js7AMJOu1u/HtlN2DirY7RvX/oCh5D5x2PEnefub9vwsYihJ2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6suzTM8nxKxuU5jisFiIqyq4atKnNLs3otPkjxct0XY4NcRMdO97t3K7U8K3MxPRufoZrtttlntD4tnm1udZjRtbueLx9WtG3ZaUmj8reEw9mdbdumJ6IiH63MXiL0cG5cqmOmZl+KZDHAAHZvQD0L590z7fZdk2GyvFTyOhiIVM4xsIuNOhhk05x7pwVSS8WK43d7WTa1G2tq2tlYaq5NUcOY+7Hrnq9UcrcbF2Td2riqbcUzwIn708kR1+ueR6uY3GZZs5kuIzDF1KeEy7K8LOtVk9IUaNODbfmSjF+oitFNd+5FNO+qqfjMrZXVRYtzVVuppj4RDx36Qdr8b0gbcZ5tnj3N1s5x1XFbsndwjKXiQ9EY7sV5oou+CwtOCw1GHp4qYiP39/GguOxVWNxNeIq46pmf293E48ZTFAAAAAAAAAAAAAAAAAAAAAAAAAB7LdHv7gdmv5Hwf9TAgmN86ue1PfK/YLzW37Md0OK9MHWD6NehXAOptXnCq5lOG9h8pwlqmLrdj3b2hF+VNpcbXehmbM2Li9rVaWKfu8tU8Ufr1Qwtqbbwmyadb9X3uSmOOf065YBdOHW06SumSVfKaeJls/s1OTSyvBVWnWjqrYiqrOrx/FsocHu3SZTtkZawmy9K5jh3PzTydUcnXx9KY7XzLi9q60RPAt/ljl655eri6HSB0LnAAAAAAAAAAAAZN9Sl2xW1t2krYFu682I5k9z5zft+FRMg847HiZu7NpRUUr8+Lv2k8URzbAK2Fh57/AGgfQAAAAAAAAAAAAAAAA2Mar4ad76di9wHDNok40nJX1Wrtf0a8uHqAwf67CisZsmle6WPTurf6OUPIfOOx4k7z9zft+FjGUJOwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkB1G8uwOZ9PmCw+Y4Ghi6Ky3GS3K1JVIp7lr2aa5/Scxm6uq3syZonSdYdRk+im5tOIrjWNJemNKjhsFQVKhSpUKNNO0YRUYxXF6LREimZrnWd8q/ERRGkboYYddHrQbPY7Z/E9EHR5mlDM6mPtHOsww1RTo0acZp/F6c07TnJxW+1oo+Lq21Hv8q5eu0XYx2Kp4MR+GJ456Z6PV/wC1n+a8w2qrU4DC1cKZ/FMcUdEdPr+HVg6UVOAAAAAAAAAAAAAAAAAAAAAAAAAAAMrtvOvZtC9kMp2M6J8vqZMsJluGwuKzbGQhPEucaUYzVGn40IK6fjtyb4pRepxWDyfa8vXiMbPC1mZimOLj5Z456t3vdtjc43fIUYfAxwdIiJqnj4uSOKOvf7mLWY5jmGb46vmebY/EY3GYmbqV8RiKsqlSrN8ZSlJtt+dnZ0W6LVMUURpEcURxOMuXK7tU11zrM8czxvmPTwAAAAAAAAAAAABk11KVfF7WXs1u4Ff2gnufOb9vwqJkHnHY8TN7Zzl9+0niiObYH8lh8/2sD6AAAAAAAAAAAAAAAAGzjHFYWq5vxd1p6X08/mPsa67nydNN7hu0zn8XUd17mjvra9+HYfH1g311vyzZP9HHf3coeQ+cdjxJ3n7m/b8LGUoSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfwWPx2W4iOLy7G18LXimo1aNRwmr8bNanmuim5HBrjWOl6orqtzwqJ0nofs5p0hbfZ3gll2dbcbQY/CKO6qGKzOtVpqPZuyk1bV+s/C3gcLZq4du3TE+uIiPoyLmOxV6ngXLlUx6pmZ+rj5ksUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZNdSn8s2s/RwP94J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYpSlhqqjPde69bXPsdL5PQ4VtNu9zirPetxvpa/YfH1g711vyzZP8ARx393KHkPnHY8Sd5+5v2/CxlKEnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABk11Kfyzaz9HA/wB4J7nzm/b8KiZB5x2PEze2c5fftJ4ojm2B/JYfP9rA+gAAAAAAAAAAAAAAABtYqEamGqxnG63W/n5H2J03w+TGu6XCtppPucY6Wtfhrx7T4+sHeut+WbJ/o47+7lDyHzjseJO8/c37fhYylCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAya6lP5ZtZ+jgf7wT3PnN+34VEyDzjseJm9s5y+/aTxRHNsD+Sw+f7WB9AAAAAAAAAAAAAAAAD58d+SVeP4vJtNff1duh9p43yricP2mj+11PdXJXs78fV+s+PrBvrrflmyf6OO/u5Q8h847HiTvP3N+34WMpQk7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMmupT+WbWfo4H+8E9z5zft+FRMg847HiZvbOcvv2k8URzbA/ksPn+1gfQAAAAAAAAAAAAAAAA2cXf4rVUW03Bq64rz8GIJcN2jVOWGctd6Nlqrc/pAwc666axmyd014uO+zDlDyHzjseJO8/c37fhYyFCTsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8vPNqdndmqcaufZzhMEpK8VVqJSku1R4v5kYmL2hhcDETibkU6+ud/ujjZmE2fisdMxhrc1aeqN0dc8T8nK+lTo9zmssPgNq8E6spKMY1XKi5N8lvpX+YwcPmHZmKq4Fu9GvTrHfEM7EZd2nhaeHcszp0aT3TLlSaklKLTT1TRueNpeIAAAAAAAAAAAAAAAAAAADJvqUp/G9rJcksCv7QT3PnN+34VEyDzjseJm3s/UjTUXNtJu17Pzk8URzjA/ksPn+1gfQAAAAAAAAAAAAAAAA28RGpKjKNJJuSa1YHC9oIVJwVo9t227fMub9AGEXXeX7a2Rldu6x/F66fF1+ooeQ+cdjxJ3n7m/b8LF4oSdgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4t0k7ZQ2I2VxObxcXipfsOFi7O9Rp2dnxSSb+a3M1G3NpxsrB1Xo/FO6nrn9ONuNhbLna2MpsT+GN9XVH68TFC+0+3e0MIUaGPzfNcwquNChRpzxFatU5QhBJuT/ipehciL38RdxVybt6qaqp5ZWqxh7WFtxas0xTTHJD6dtOjrpA6OsZSwW32wef7MV8ZDutChnGW1sJOcL8YqrGLa86Pxfs7Q6BOknHPNo7D5tinXwleM+99SbcpwnFX7nfjuOKbV+FrI7zKG27kXo2fenWmfw9GkcXVpHucFnDYluqzO0LMaVR+LpiZ4+vWfe7/ACkpoAAAAAAAAAAAAAAAAAADJzqTxcsVtYkld/EEvViCe585v2/ComQecdjxM28hjKO4tWnxSTX0/OTxRHNMA5woxo1IS4XjLimn9nzsD6wAAAAAAAJfWzT42QBNPVO4FAj3tWrPTRecA3w0vf6AF9bAE07pPhxAjTcHF2bas9NPUBxfPsPKVp8UpSjJcX4urd1btAw566uyuIxmyuV7S0aNSp3oxkqdZ20p0qyScm+zukIR+dfN2uSMVFrGV4eqfxxu6Zp/aZn3OJzxhZu4OjEUx+Cd/RFX7xEe9hyVBLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdLdZ2vOGRZNh0lu1cTUcu3SKt9pwee5nyNnrnuh3uQ4jy96eiO+WQXwLezuTZl0+7V59jsBTrY7KNnl8SqzV3RdWqozcextRSvxtdc2TZS2XHwwuSZTmHVPp5tjMBRq4zLdo8G8JXlHx6O/CqpqL4pSSV1wdl2IDxu6HmvwlZEr8cQ+X8V+o22wqpo2jZmn80NTt2mK9m3oq/LLMAt6GgAAAAAAAAAAAAAAAAAAzC6mOy2IweyeabSV6E4d9sZGNF2/wAZSoXSmu1d0lONvMyX53xUXcZRh6Z/BG/omr9oifeqWR8LNrB14iqPxzu6Yp/eZj3Muslw8rQXjOEHHjZtNJ8fUvn7OJxTtnM8JFRo3i7p6J9qSsn89r/OBvgAAGinJzhGTdna0kuF+YGsABJJuLUZWbWjtwAoEcU7taNq11xA03cUlbRXvz0+24GpNO6T4cQKAAjSejVwDV7atWd9APyc4w0KkKkXFN7rmknx4X9Gm8/PZAdZ7Z7L4LaXKsTlGa4ONbB4ym8NWpyjdShK6dufPlrfW97H62b1eHuU3bU6VUzrEvyvWaMRbqtXY1pqjSYYF9J/Vt202Jx1bEZBg6+e5S3vQlhoOpiKMW9I1IJJy5+PBOOjvuvxVV9lZqwmOoinETFuvp3RPVPJ1TOvXxpNtbKmLwNc1YeJuUdG+Y645euI06uJ1LicLicHVlh8Xh6tCrHjCpBxkvSmdPRXTcjhUTrDl66Krc8GuNJbR6eQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0j1oP8A1TkP/ia3+zE4PPf+jZ657od9kP8A1r3VHfLJj4E1L8M23r/7P0f68mylMtfhef3n+J1/94sv/wBmqB4w9DkN7pJyOV7bmIv6fFa/WbTYvpCz7UNXtv0de9mWX5cULAAAAAAAAAAAAAAAAG7hsLicZVjh8Jh6terLhCnByk/Qkea66bccKudIeqKKrk8GiNZdt9F3Vt2z24x1LE7Q4TEZDk8HvVamIp7mIqxT1jTpy1Tdrb0lZXulK1jmNrZrwmBomnDzFy5yacUdcx3Rv5N3G6nZGU8Xj64qxETbt8uu6qeqJ753cu/iZ2bGbL5dkOXYHKMtwtLD4LB0o0qMYrSEY2SjfW78/N9r1JRevV4i5VduzrVVOsyrFmzRh7dNq1GlNMaRDsbJsNOn3Kaptyb33Faacfm+ftt2M/J+rkUI7sVG97JK/wDzA1AAI72dnZ8gNELS1taUW0+fHW1+zh9AG4AAAAAADTKF5RknZrS/m7PoQCM7u1rXV1fi/mA1AAAG3Vpd0XHk/N9PLVIDjecZSoqbtuvWSnG61tdWSv61wb9AHDMyyOClKo8NepBtKnKO7a997TlwWi83YB+LidnI1tZ4fWbkpX5PxbSfLjJffiH5ktloKyWH3ZOVlePN8rc1r7uAG3PZTDWk6bbUXbm9Eld34cftQGl7JUl/CW62kpWlbW/Hs4fdagHsnBLW0bK7clJLzL0v9TAPZKCvpZKN25KSALZGMnFRWjtq1Li/t94EWycJRvBbzSd7KX23Ar2Spp7t05P8WylrrYAtkVa8o217JXta9wItkoys4RvFvR2l22Ar2ThGydruTS0lZ6ff1gFsje/iWt5pagR7Jwcmoq/pUr8E72v5wKtkYpKU1Za30loBFsmm2lFXXFeNdekCvZKMY70lZbt9IydvMwJ4JLelDdV4uzS3tGBfBGKV5Rf4t7KMnr2ATwTW9u2Tdr2W9wA1LZFaOUbXveyk2gNL2TirXilfhfe9X0oCrZG9/EtbzS1AS2Sir2jp51JcrvmBFsmpJOMU03xW8BqeyK4KN3fslawGnwTjdLdV3wXjagVbIp6uNtbcJX9IDwR10hxdlpK/GwGlbKKSbhFSt2bwGt7IRV1a7ukrKVmBpeyaSbcUrK7vvAWOySk14qs+dpWAeCKsrRd7XekgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k4xV5RSS7d778mBVsjd23LaX4S9QB7IrlF8Fe6kgI9k0k24pWV3feAsdklJrxVZ87SsA8EVZWi72u9JAPBHlucXbhIDStlFJNwipW7N4DW9kIq6td3SVlKzAngj/ABPokBPBON0t1XfBeNqBVsinq421twlf0gHsj2Q05aSAj2Stxh9EgC2TUknGKab4reA1PZFcFG7v2StYCeCP8T6JAR7JxVrxSu7L8bj92gKtkb38S1vNLUA9kVd7sW1e2qkgHgj/ABPokBgl8K5lEcr2D2Ge6t6pmWK7b27nTfP0oD874E3/ACzber/s/R/rwMtfhef3n+J/nFl/+zVA8bugDbHI+j/pl2T2y2lq1KWV5VmMK+KnTpd0nGmk02o83qgPQfLfhLerzi83jgMVs7thhMDKpuPMK+EouEVr40oQrOVrJ2STfDTjYMqujvaHYbpY2cwu13R3n+FzzKcX+LXw0pb0HzjODtKE1zjKzWt7Acl8Fry3Y0JPS/O9u3iBfBSX+jT+n2gPBSX+jT+n2ga4bJJqTnBwtG+qlr9IE8E024qKvF2a8bQC+CP8T6JAPBH+J9EgHgjHccpKzXK0gJ4JptxUVeLs142gF8Ef4n0SAeCP8T6JAVbIrdvu62TtaXPl/wAgNK2Ti3uqKva9vG4Afbl2y8YTlCorRcXJOzdnbjr+rUDk2W5LGnGbkoxlzUb3aVr6vz7y5PTzaBy7L8qjRmpyUXaN47qb3eF35+DYHI8FhHh/Hl+NKKVnq49uvq9QH1gAAGipLdTlyinJ9nz/AH5AWEdyKiuC0Xo5AagAAAAAAANurayTfF2VuOumn37QNavZXVnzAoAABtYml3WnupXfov5u1doH5VTJ6uJklUgocbtu6V+xJ6WbbA+Cts9OUtYR5vxJa7rs+GnZbhx83APnxGzfi+JhIQTlGylDhK+9or+d9vNAaIbPw3k3RhaUIySUXuu/B69u8/naXJAIbPJ71Pua7o7Jvdbu2uGvmjf1+dgI7PwlLdjTjreySbT9/i+rXmwIsgp79+5xaVkkldat2XDzvX0eYBPZ2Mp7ihFyuoxitNeHzcX90BZZDSnuzUYxi/Git211yeqAkdn4dzUVTUUtHLdcnbhr5tF6XfncCLIKMHvunCVk278EtHfh5vt7WBZbOwUpRqpKSdmrW1562+kC+D8JLdhSildybSvdLVvhyu/oXYBpWz9BpNqLuteXFei4Fns+mu6OEYxXHxb2vqlw8/Ds8yAd4KMdVGLas1yaa1+1ASWzsYWcoxUUmvxddNOzV3t9IFeQUYp7sYt9vB8nbs5AHs7GNm4xUeGsezjy46ev0gO8FBwsoxvJPXg1dW7OwCS2eju77hFJcfF5vW2i7H9gFWQUEpLdjvLS/Cz52aX0gFs7F33YR5vhfS93y8/2eYCQyCimt+MHrbh6+Xo+6APZ+k5b27HS78yWj7OGn29rAPZxRk4yjBS4JNW9enoA1d4aEorcjFJO/C17cLpoDStnI7nixilFcWr6cE728328wKshoRd5QhJcOHN+hen7sCS2dpSlolJt/O+K7PP97ICvZ6F1KSglJby8W1128ACyGhbd3Ypu+qXFefS3H9TAkdnae94sU/p52XL+N9nYgHg7CLamoXXmt+oCvIaEtN2MbK9ktNfSuz2ASOzkG3GEE29FpfW3o/i/b5wC2fpLioPXs9wFeQ0ZPhFWSsktF6192BI7OQbcYQTb0Wl9bej+L9vnALZ+kuKg9ez3AV5DRk9VFaOySukvV23+0CR2dp73ixT+nnZcv432diAeDsItqahdea36gLLIaL/gQSXJa6v5vN9gEeztJu0YqV3ZW4812ef72QFez0LqUlBKS3l4trrt4AO8FLd3Ywp3el72v6dAIsgoNKUbcecbfqALZyO54sYpRXFq+nBO9vN9vMCxyCindwpy9P8AyAneCi5eNbV8bX9PL0fSA8HqSd1GLtdvhZLR9nm+3tYFezkYScZximuTVn9gCWQ0d227BJcbc/oAng9RacXu3Wj/AF2dvpAq2di77sI83wvpe75ef7PMAjs/SVnKNOXb2fYAeQUm7tR9i9XYBHs9QlHlqvRx+YDzt+GWy74j0b9HslT3VPN8ZyXHuVN8vT9gHXfwJt/wzbe/zfo/14GWvwvP7z/Ffziy/wD2aoHh7s/kecbTZ5gNndn8BiMdmWZ4iGEwuGw9Nzq1qk3uxjGK1bbfADvzpZ6gfWj6F9gqfSZtx0erDZRCEKmNeDxlLE1MBvJNOtCm3uK7s2rxT4tAcD6CusV0odXfNc0znozzmhhK2bYKWDxVLE0FWoyWu5U3HpKpCUm4tp2u07ptAfs1uuZ1pq+ZyzmfTftR3dtXUcVajfjbuSXc7acN22nCwGbHUs+EnzHbDanL+inrAfEPjGa1aeGyzaGjRhh4zrtWjTxME9xOUtFOCSvJXiuIHpjLIaS1tSilJR4N8b25cfxvo7EBVs/SavuxXq9gDwfpdkPo9gFWQUbreUWly+6ALZ6m34lNPe8VRjG+qXC7XYk/6XnAng/S7IfR7AHg/S7IfR7AKsgpXvKMJen/AJATwdhxjBO6eijfglfW36Ovp7WA8H6XZD6PYBVs/STut1NffsA3KeT7jj+yWUWmrPhx5fOB+tgsos9+U5PegnJtr8a6a7eCf/ID9WjhaVBWUU3zk+LA3gAAABtpuorxdotKz7U/pQGtJJJJWS4ICgAAAAAAAaZw3ra8NUnwvyYByau3HRc/YgLdXtfV8gKAAAAJZXvbVcwJKEZXUldPinqvUBVFK1layskuAEUIq9la7u7aXYBwg5Kbit5cHbUA4RlFxkt5Pk9QEYwS3Yx3VF8ErL76gSVOlvd0lCG9deM0r35Aat1NNNXUuKeoGmNKlB3hTjF9qVgK6cJRUZxUkvK1+0CRpU4pqEFG/HdVvsAs6dOdt+EZW4XVwJGlTimoQUb8d1W+wCzp05234RlbhdXAkaVKDvCnGL7UrAV04SiozipJeVr9oGnuNCLUlRgmmrWiBr3U001dS4p6gaPi9D8zT/ooDVGMEkoJJRbso6ICSo0pPelSg2+bigEaNKL3o0oJrmooCuEZRcZLeT5PUDT8Xofmaf8ARQGqNOEVuwioq9/F0AkqVKbvOnGT7WrgT4vQ/M0/6KA1qKVrK1lZJcANDo0JSd6MG+LbiA+L0PzNP+igNdtbgaHQw6snRp68PFQD4vQ/M0/6KA121uBo+L0PzNP+igHxeh+Zp/0UBrUUrWVrKyS4AaHQottujBt8XuoB8Xofmaf9FAao04RW7CKir38XQCSp0qj3p04yfDxogT4vQ/M0/wCigLGjSi96NKCa5qKArhGUXGS3k+T1A0qhh3dKjT04+KgHxeh+Zp/0UBqUIxSUVupcEtEBJUaUnvSpQbfNxQE+L0PzNP8AooAqFFNNUYJrg91Aa91NNNXUuKeoGj4vQ/M0/wCigCoYdpNUIa/xEBY0qUHeFOMX2pWA2sbicBgcHUxmZYihQwuHjv1KuImowhFcZSlLRLzsDojOOvT1PMizSpk+YdOeyaxVKbpzVKv3WMZLk5wTitdOIHcOyO12xe32SYfaPYvPcqzrLMVFTpYrA16danNeaUW0B53/AA3FOnDo16NtyEY3zjHXsrf9FSA6h+BNv+Gbb3+b9H+vAy1+F5/ef4r+cWX/AOzVA8vvg5oQqddbosU1FpZnXklJX1WErtfOnr8wHuN1pqFPE9W3pPo1aMasJbKZnvQlHeTXxeb1QH82GX4WpjcfhsHScVOvWhSjvcLykkr6PTXsYHt9lnwSPVb/AAVQ2WxmW5rX2lqYFp7Rd8KsasMY46VY079z3FLhBxaavze8B4qbU5Didjds822YljFLE5HmdfAPEQbinUo1XBzT4rWN0wMmMR8KH1yFh8Ll+C6RMNgqGCw9LDRjSyyjvT7nFR35ympSc5WvLW13wAyN6rfwum0GI2iwOyfWWy3AVsux1eOHhtLgKTpTwk5KyliaPjRlC7fjQS3Ul4rs2g9XcvqZZmOCoZjl1ShicLiqca1CtTanCcJRTjKL5pqzv5wPo+L0PzNP+igNcYxit2MUkuSQGiVKjOTcqUW+bcf1gT4vh42Xcaer0ukBfi9D8zT/AKKA1RhCCtCKiuxKwElSpTd504yfa1cCLD4df9DD+igHxeh+Zp/0UBqhTpwvuQjG/GysBqAAAAG3Z7705pq+qXn/AFAbgEur2vq+QFAAAIrNuSd+XHsAoAAAAAAAACWV721XMCgRq/OwB30s/SAd+SAJWAJ3SbVvMATvfzAG0rJvjwAoAAAAjSdm1w4AUAAAiXHW9/oAO/JgErJJcgGt+GgFAl9bW+cCgRO9/MBQJ4sk4uz5NAUAAAARq6aTt5wKBErJJcgCvZXd3zAoE1vw0AoEbsm0r+YCgRJK7S48QF9bAUABE00mndPgwKBGuGtrfSASsBQJrfjoBQAE1vw0ANJ6NXAoEvra3zgUDyV+GH6zm08NrsF1btmMyrYLKcPgqOZZ53GdvjdSpd0qUmn+LGKu4u920+QHnVlXRZ0kZ3sziNtMn2GzrHZFhLqtmFDBznQh6ZRVtL/Q+xgc06vHWe6VOrRtpR2q6Os9qLD1aqnmOVV5ftTHwvrGpDhF2taUdVZa20Ay4+ET60mwXWq6uPRhtrsfP4rjMPnONo5pldWadbA1+40rxklxi+MZcGrAb/wJv+Wbb1f9n6P9eBnn8Il0LbY9O3VizrY7YHBvG53hcZh80w2Cj+Pi+5b29Shf+E1NtegDzq+Dj6ofT5lvWl2a292u6Oc42cyLZGWJxmMxWZ4V0VOboVKcKVNSacpOU1qrpJO/ID1e60Kb6uHSbZf+6mZ/2eYH83Gzn7ocr/8AG0P9tAf1IYKSlhaf42kVx56cfQB/Mp00X/DVt3ZpPwpzTVuyX7bqcwPQ7qf/AAVXRl0v9A+S9KPSttPn1LMtrMNPF4PDZXWp04YLDOUo0m3KD36rUVJ3W6t61m9QMDus50JYnq6dNu03RBWzbvnSyWtD4vi3FRdWjUhGpCTXKW7JJ8NU+QHs58Fhthmu2PUx2RhnOIqV6uQ4vHZPRqSlq6FKvJ0o6cownGCXZBAZcgANFSTi4JO15WfaBqSsBQAEaT0auBQAAAAAAAAAABLa3uwHjW5N39GgC+trfOAsr3tquYC1kkm9PnuA8a3Ju/o0AX0V01fl2AE07pPhxAoAAAAAAAAAAAAAAEsr3tquYC2twDXDW1vpAO+ln6QDvyQC+trfOAbtbzgG0tW7AUAAAAAAAAAAARpOza4cAKBErAGr87AUCK+t36ADvZ2V3yAoETvysAbsBQJdXtfVcgKAAAAAACNJppq6fFAUCNXTT5gUABErJJu/nAoEV7K7u+YFAivzQBuybSv5gKB4f/DBbCYzZzrRx2tdKSwO0+UYatSm27d1oxVOpFf0Yv8A1gMsfgb9v8k2o6As96MMVTozxezuaV6lXD1Ypqth8Ruy3t21mt68Xf6bgdM/Cb/B+5XsJg8X1hehbJ3h8ndVPaHJ8PTXc8G5f5zTX8GDdlKPJyVuIHmcpyUHHedr33eK4cfSB6N/Amu/TLt7aTivB+h4i4P9n4vz+1gexTV7eYCgfFneTZbtHkuYbPZxho4nAZphauDxVGXCpRqQcJxfmcZNfOBhRsT8Ef1cdiulPC9IMc52kzTB4DGxx+DyPGVaUsPTnGalFTnu79SCaWj111fADOKK3YqPZotb6elgfzm9YzoG6WdnOsbtvspitg86xGMxe0uNq4P4vgqk44ulXryqUp0pbtpKUJxd1e19QPdzqo7C5/0ZdW/o62C2poRoZtkuz+Fw+MpJ37nV3FKUL87OTXzAeL3wo379Tbj/ALvAf2WmB6QfBBXfU9wzaSb2jzHnrwpJX+b6LelhmyAA26qbimlqne64r2+y4GtNNJp3T4MCgAAAAAAAAAAAAAAAAAAAAAAI0mmmrp8UAtxs2ru4Bb2u9bjpbsAm8rXl4tld35AagAAAAAAAAAAAAAAAAAAAARpNNNXT4oA1e3mAW1vf5gHja8Hrpy0AN2TaV/MAbtbzgLq9r6vkBQAAAAAAAAAAAAAAAAABEkkklZLggCVgFtb3+YBrfjoA1vw0AN2TaV/MBQIndJrmATTuk+HECgAAAAAAAAMIPhZugqp0pdXZ7c5PglVzjYTErMFuxvUqYSfiVYJ2bst5TtpfdQHmd8Ht1gaXV+6x2R5vnGKrU9n8+fejNFCWkY1WlCo1z3ZW7NGwPf8AzPLMj2tyHFZPm+Dw2ZZTm2FlQxOHqpTpV6FSFpRkuDTjL6QP56Ou/wBWzHdWTp1zjZCkt/IMxnLMcjrXu5YSbdoS0spRd4210SfmQZO/AouUumfbpxa12fpOd76Lu9oxXn+iy43A9inxWr48kBQAGinpdNJNvetftA1Li1d9vADTKjRnUhWnShKpTvuScU3G/Gz5XA1geAnwof79Pbn9DA82/wDNqfaB6R/BB73+B1g22t17RZlursV6d/pv99EGbAACO9nZ2fIDRTtFula1tY35rzejh6gNwAAAAAAAAAAAAAAAAAAAAAAAAAAI1dNPmBN3xt5Pjo9PT7QG81+NG3DhrqBU09U7gUAAAAAAAAAAAAAAAAAAAAAAAAARRSbklq+ICztpLnzQDW/DQAnx0tb6QG8rKTdk7cdAKAAAAAAAAAAAAAAAAAAAAAAAjim02tVzAoESskm7+cAr2V3d8wCvzQBPjpa30gL62AXV7X1fID4s8ybLtosmx2QZvho4jBZjh6mFxFKSTU6c4uMlr5mB/OR1seg3OOrx06bRbB46h3PDUsXPFZbUUWozws5OVK1+LUXG4HsH8GV1lodPHQLg8gzzMe7bU7GRhlmPhLWdSjFfsNbhqnGyfJNWAx7+G52VzDE5T0b7X4fK9/C4SpjcHiMXGDbg5dzlGEmvxU9Wr2u78bAcH+BJyjMqnSV0iZ9DBVXgKGUYTCzxG74iqzqyahe1r2i3a/C3agPX4AAA0JS3lvK9lx7H939+Yala7tfjrcCgAP53/hCtocPtP1y+lHM8JUhUpU82hgoyjzeHoUqMr+fepsD1Z+CYy14DqX7PYpRtDMc3zXE03e90sTKlf10n7uCDMcABt1fxqS7Z/qYG4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASyve2q5gLaOzavz7AJvWbu7LRaq2v3sBqAivZXVnzAoEvra3zgUAAAAAAAAAAAAAAAAAAAAAAAAlle9tVzANXt5gDXDW1vpAa346AN5Wcm7JXvfQBrfhoBQAETuk2reYCgAAAAAAAAAAAAAAAAAAAAARpOza4cAMD/hYOrDU6WuiOl0rbJ5Q8RtLsWpVMQqME6mIy+zc1prLc4pekDzU6h3WRn1Z+n3LNo82xk6GzWcLvXn0dbRoSfi1WrXvCWt+ScgPfvN8i2K6Udk4YLP8py3aDIc1owrxpYinGtRqwlG8ZK/mejWuoGjYno42D6N8qlkmwWyeW5DgpzdSdLA0FSU5PnJrVv0sDkgGlXUnGUk76rtArduVwCik20rXAoEbsm3yA+XN80wWR5Tjc7zKsqWEy/D1MViKj/gU6cXKT+ZJgfzDdJe089tekXafbGrJynnmb4vMZt8XKrWlNv1yA/oK6iew9Xo+6o3Rhs5iMJLB4pZJDHYmk0lJVcTOeImn571Xfz3A76AARuzWj9KAkVFNqL0VlbkvZyArvyYFAjvZ2V3yAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQ1JXklvNcOT466/fgBqjJSV0/cBQAEtrcCgAAAAAAAAAAAAAAAAAAAAAAAAAAAARpNNNXT4oAk1bxr2Wt1qwJvNfjR7XpqBbq9r6rkBQIlYCgAAAAAAAAAAAAAAAAAAAA2cZhMNj8JXwGNoQrYfE05UatOavGcJK0otdjTaA/n7+EE6sGP6tvTnmNHA4KpHZXaWpUzHJa1vEjCUvHo38qMr8lo1xAzu+CU62lLbbYqfV+26z+M8/2ejKpkksTUXdMVgEl+xptpydN3VrN7ttdAPRwABpkrq64rVAIyu2nxT7Laff7ANQAABj/wBfTpFh0X9UrpFz9VJwr4vKZ5Nh3Fre7pi/2unrxsqkn81/OB/P30b7KYvb3pB2d2NwmGqYqvnma4XARpw3t6bq1ow5Jv8AhAf085TluHyfKsHlGEio0MDh6eGpJKyUIRUUrctEgPrAAbcW3VlroklZ/avvy8wG4AAAAIkkkkrJcEBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTs2uHADTFSjZPxr8X7gNUZKS3ou6YFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpcU4OC8VWsraW9AF8aztZ9i4AE+OlrfSAjJSW9F6AUAAAAAAAAAAAAAAAAAAAOgeuv1YMq60/Qtj9jXuUM/y6XfHI8W1rTxUIv8AY2/Jmm4v0p8gPAvLcx6Rerz0s0swwscVkW1uxuZtqNanKEqdanKzjKLs3GSumucZPtA9/Op91ptkutV0V4Xa/J6tHDZ3gYww+eZUqu9UwWItzvq4Ss3GVldehgd7AANEotu8dHwf6vT6POwNSaaTTunwYBPjpa30gUDzd+Gt6S5ZL0V7DdF2ExTjV2kzavmeJhHnQwlOMUpeZzxCa88AMNvgrejSPSD1vtncwxdCrPBbJYTFZ7VcYXj3SEVTpKT4Jd0rRf8Aq2A96wAADbp+Om34yk96LfZyA3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACJJXaXHiBpjvRspXbk3qtUvv9+QGpNPVO4FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjSdm1w4AGrgRKS0bvx1+fRAVPWzTXEAmndJ8OIFAAAAAAAAAAAAAAAAefPwoPUbh0v7OVunjo0wShtfs/hpTzfB04aZpgoRbc0lr3amlx/hRuuKTA8t+rJ1jdu+rB0pYDpB2MrznTVSFDNstlJ9yzHB76dShNcna+7LjGVnw3osP6HuiTpQ2W6aejvIek/YzFqvk+fYSOKoKS8elJ6Spz7JRd4tcboDmAACJWvq3d315ARaybfFaLT0AV35IDxO+GV2uxWddZ7K9l3Ubwuz2zWGhCO7bdqVqlSpPXzp0/o8wHcfwIOxtBYbpO6QZqcqzngcnptrxYRtOrNJ9re5f9GIHqeAAkrqL3eNtANKs1Bz/GWiv28/1gawAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0yhvJ68Vaz1T+YA52fjKys22+VgNQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaVFR4fP5/SAbko8N6XqAt9bAE00mndPgwKAAAAAAAAAAANM4QqQlTqQUoSTjKMldNPimgPCr4Uvqz5d0EdOVPazZbDLD7ObeqtmGGw8IJU8LiYOPd6UbKyi5SUknr4z5LQO/vgV+mjHfGNs+g3NMQ5YGlQhn+XOrV0oy3+514RvwUt6nLdXNSemtw9U/juDtf43Rtpr3RcwJ8dwf+l0f/ALiAksXgZRcZYui01Z/si9oCOOwk3piqStrbfXZ9+AGt4nDJpPEU7vgt9agfz4fCObQ4jaLrm9JNWriJVaOCzClgcPrdRhSw9OLS828pAel/wPWzeDynqo1c8oUYxrZ5tFjatWcYpb/ctyjG9uOkPPx48kGcoADbrWcHFrSV4u3G1uXaBrV9bv0AUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEaTTTV0+KAjUknuPWzsnwuAlJRaT58+SA1AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAm6tdLXd3bQBbW9/mAR3reNb0rmBN5Levoo63fCwGoAAAAAAAAB51fDVbI5tm3QjsZtbgMtqV8LkOe1aWNrwjvfF4YiklFy7IudKKvwu4rmgPHTBY3F4GpOrgsTXoVZRcd6jUcHu8Xqnw0WgH1LaLaF2tn+YXbtb41NfrAstos/co2z3Mop83iqmvK/H28wC2jz+y389zG2uqxc73tpz4X/AFgSO0W0V1J57mG6mk28VUt89mAe0W0G6nHPsy0/Gvi58deGvYB8NarUrVXWxU51KspN1HKTc5O+rbfP2Ae/vwZWyeb7H9TTYbA5zg6+GrY143MYwrx3Z9zrYmc4Pd5Jxaa7VZ8wMpwAG3VtaN3rvK1uN/N9+FwNavzQFAAAAAAAAAAAAAAAAAAAAAAiad0nw4gLa3v8wFAAAAACK/NAUAAAAAAACN2Tb5AUAAAjSaaaunxQBKwFAAAJrfjoBQAAAAAAAIndJtW8wFAAAAAAAAAAJonrLjokBQAAAAAjvpZekCgAAAAAAAAAETuk1zAoE3Vrpa7u7aAUAAAAR35MCgAPkzXKcqz3LsRk+d5bhcwwGLpuliMLiqMatGtB8YzhJOMk+xoDrV9U/qsyblLq1dFbb1bexuXf8EA+qf1WZNyl1auitt6tvY3Lv+CA/wAE7qsf9Wnoq/8AJuXf8EB/gndVj/q09FX/AJNy7/ggR9U/qspNrq0dFT83gbl3/BAv+Cd1WP8Aq09FX/k3Lv8Agga8P1VurBhK9PFYXq4dF1GtRmqlOpT2Py6MoSTupJqjdNPVNAdoU6dOlTjSpQjCEEoxjFWSS4JLkBqAARpOza4cAKAAAS2t7/MBQImnqncCgAAACK+t16AKAAAAAAAAAltb3+YCgAAACN2TaV/MBQAAAAAAAAEtrcCgAAEV7K6s+YFAAAAAAAAARtLVuwBpPRq4FAjvpZ+kCgAAAAAAARu1vOBQAAABGr87AUAAAAAAETuk2reYCgAAAAAAltbgUAAAjvZ2V3yAoAAAAAAAAABLK97armAur2vq+QFAivrd+gCgAAAAAAAAIncCgAAEStzuBQAAAAAARPjpa30gUAAAAAAAAAAAS6va+r5AUCW1uBQAAABE7gUAAAASyve2r5gUCJ8dLW+kCgAAAAAAjvZ2V3yAoAAAAAAAACK9ld3fMCgAAAAAAARrhra30gUAAAAAAAABHZvdvqrPRgUAAAAAI3YCgAAEsr3tq+YFAARvhpe/0AUAAAAAAACK9ldWfMCgAAAAAAjvZ2dnyAoAAAAAAAACJcdb3+gCgAAAAAAAAIlYBZXvbV8wKAAAAAAAAAAAAAAAAAAAAABLq9r6rkBQI3YCgAI3w0vf6AKAAARXsrqz5gUABHezs7PkBQAAABEuOt7/AEAUAAAARKwFAAAAEsr3tquYFAAAAAAAAAAAAAAAAAAAAAAAAJdXtfVcgKBL62AoACJ35WAoACK+t16AKAAjvZ2dnyAoAAAAiVkk3fzgUAAAjV7eYCgAAACNJ6NXAoAAAAAAAAAAAAAAAAAAAAAACO9nZ2fICLeVrq7fHsWgF0iufH08QFle9tVzAXV7X1XICgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEd7Ozs+QESem8724O/HTmBdJLxo8+YC+tgKBLq9r6rkBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEsr3tquYFAARKwFAARLjre/0AUABHezs7PkBQAAABFeyurPmBQAACN8NL3+gCgAAACN2AoAAAAAS6va+q5AUAAAAAAAAAAAAAAAAAAAAAAAAjSejVwKAAjV7eYCgAAESskm7+cCgAI72dnZ8gKAAAAIr63XoAoAAAAid+VgKAAAAJfWwFAAAAACPdT3nZXsr/AGAUAAAAAI1cCgAAAAAAjXDW1vpAoAAAAAAAEV7K7u+YFAAAAAABHezsrvkBQAAAAAAAAET46Wt9IFAAAAAAAAARO4FAAAAAABLK97armBQJdXtfV8gKAAAAIlYCgAAAAAAiXHW9/oAoAAAAAAI72dnZ8gKAAAAAAAAAivZXVnzAoAAAAAAAEb4aXv8AQBQAAAAAARXsrqz5gUAAAAAAAAAAARuybSv5gFle9tXzAoAAAAAAAAABLa3AoETvfzAUAAAAAAAABErc7gUAAAiaeqdwKAAAAAACK+t36AKAAAAAAAAAAAI72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function BG(e=``,t=2){if(!e)return e;let n=new DOMParser().parseFromString(e,`text/html`);return n.body.querySelectorAll(`[data-heading]`).forEach(e=>{let r=e.getAttribute(`data-heading`)||``,i=parseInt(r.replace(`heading`,``),10);if(!Number.isFinite(i))return;let a=Math.min(6,Math.max(1,t+i-1)),o=n.createElement(`h${a}`);o.setAttribute(`data-heading`,r),Array.from(e.attributes).forEach(e=>{e.name!==`data-heading`&&o.setAttribute(e.name,e.value)}),o.innerHTML=e.innerHTML,e.replaceWith(o)}),n.body.innerHTML}function VG(e){let{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...a}=e,o=i?{}:dH(n,r),{props:s,internalRef:c}=mH({...a,externalSlotProps:o}),l=oR(c,o?.ref,e.additionalProps?.ref);return uH(t,{...s,ref:l},r)}var HG=S.createContext({});function UG(e){return Br(`MuiList`,e)}Vr(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var WG=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return _({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},UG,t)},GG=F(`ul`,{name:`MuiList`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:`none`,margin:0,padding:0,position:`relative`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),KG=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiList`}),{children:r,className:i,component:a=`ul`,dense:o=!1,disablePadding:s=!1,subheader:c,...l}=n,u=S.useMemo(()=>({dense:o}),[o]),d={...n,component:a,dense:o,disablePadding:s},f=WG(d);return(0,N.jsx)(HG.Provider,{value:u,children:(0,N.jsxs)(GG,{as:a,className:g(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),qG=zV;function JG(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function YG(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function XG(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(``))}function ZG(e,t,n,r,i,a){let o=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(o)return!1;o=!0}let t=r?!1:s.disabled||s.getAttribute(`aria-disabled`)===`true`;if(!s.hasAttribute(`tabindex`)||!XG(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var QG=S.forwardRef(function(e,t){let{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:o,disabledItemsFocusable:s=!1,disableListWrap:c=!1,onKeyDown:l,variant:u=`selectedMenu`,...d}=e,f=S.useRef(null),p=S.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});eR(()=>{r&&f.current.focus()},[r]),S.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{let n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){let n=`${qG(QL(e))}px`;f.current.style[t===`rtl`?`paddingLeft`:`paddingRight`]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);let m=e=>{let t=f.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey){l&&l(e);return}let r=QV(XL(t));if(n===`ArrowDown`)e.preventDefault(),ZG(t,r,c,s,JG);else if(n===`ArrowUp`)e.preventDefault(),ZG(t,r,c,s,YG);else if(n===`Home`)e.preventDefault(),ZG(t,null,c,s,JG);else if(n===`End`)e.preventDefault(),ZG(t,null,c,s,YG);else if(n.length===1){let i=p.current,a=n.toLowerCase(),o=performance.now();i.keys.length>0&&(o-i.lastTime>500?(i.keys=[],i.repeating=!0,i.previousKeyMatched=!0):i.repeating&&a!==i.keys[0]&&(i.repeating=!1)),i.lastTime=o,i.keys.push(a);let c=r&&!i.repeating&&XG(r,i);i.previousKeyMatched&&(c||ZG(t,r,!1,s,JG,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=sR(f,t),g=-1;S.Children.forEach(a,(e,t)=>{if(!S.isValidElement(e)){g===t&&(g+=1,g>=a.length&&(g=-1));return}e.props.disabled||(u===`selectedMenu`&&e.props.selected||g===-1)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))});let _=S.Children.map(a,(e,t)=>{if(t===g){let t={};return i&&(t.autoFocus=!0),e.props.tabIndex===void 0&&u===`selectedMenu`&&(t.tabIndex=0),S.cloneElement(e,t)}return e});return(0,N.jsx)(KG,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function $G(e){return Br(`MuiMenu`,e)}Vr(`MuiMenu`,[`root`,`paper`,`list`]);var eK={vertical:`top`,horizontal:`right`},tK={vertical:`top`,horizontal:`left`},nK=e=>{let{classes:t}=e;return _({root:[`root`],paper:[`paper`],list:[`list`]},$G,t)},rK=F(GH,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),iK=F(WH,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),aK=F(QG,{name:`MuiMenu`,slot:`List`})({outline:0}),oK=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiMenu`}),{autoFocus:r=!0,children:i,className:a,disableAutoFocusItem:o=!1,MenuListProps:s={},onClose:c,open:l,PaperProps:u={},PopoverClasses:d,transitionDuration:f=`auto`,TransitionProps:{onEntering:p,...m}={},variant:h=`selectedMenu`,slots:_={},slotProps:v={},...y}=n,b=Di(),x={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},C=nK(x),w=r&&!o&&l,T=S.useRef(null),E=(e,t)=>{T.current&&T.current.adjustStyleForScrollbar(e,{direction:b?`rtl`:`ltr`}),p&&p(e,t)},ee=e=>{e.key===`Tab`&&(e.preventDefault(),c&&c(e,`tabKeyDown`))},D=-1;S.Children.map(i,(e,t)=>{S.isValidElement(e)&&(e.props.disabled||(h===`selectedMenu`&&e.props.selected||D===-1)&&(D=t))});let O={slots:_,slotProps:{list:s,transition:m,paper:u,...v}},te=VG({elementType:_.root,externalSlotProps:v.root,ownerState:x,className:[C.root,a]}),[k,A]=hH(`paper`,{className:C.paper,elementType:iK,externalForwardedProps:O,shouldForwardComponentProp:!0,ownerState:x}),[j,M]=hH(`list`,{className:g(C.list,s.className),elementType:aK,shouldForwardComponentProp:!0,externalForwardedProps:O,getSlotProps:e=>({...e,onKeyDown:t=>{ee(t),e.onKeyDown?.(t)}}),ownerState:x}),ne=typeof O.slotProps.transition==`function`?O.slotProps.transition(x):O.slotProps.transition;return(0,N.jsx)(rK,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:b?`right`:`left`},transformOrigin:b?eK:tK,slots:{root:_.root,paper:k,backdrop:_.backdrop,..._.transition&&{transition:_.transition}},slotProps:{root:te,paper:A,backdrop:typeof v.backdrop==`function`?v.backdrop(x):v.backdrop,transition:{...ne,onEntering:(...e)=>{E(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:x,...y,classes:d,children:(0,N.jsx)(j,{actions:T,autoFocus:r&&(D===-1||o),autoFocusItem:w,variant:h,...M,children:i})})}),sK=({slotProps:e,...t})=>(0,N.jsx)(oK,{...t,disableScrollLock:!0,hideBackdrop:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,pointerEvents:`none`,...e?.root?.style}},paper:{...e?.paper,style:{pointerEvents:`auto`,...e?.paper?.style}}}}),cK=s({Collapsible:()=>MW,EnableAudioAutoplayImage:()=>zG,Feedback:()=>nW,HtmlAndMath:()=>rG,InlineMenu:()=>sK,InputContainer:()=>EG,PreviewLayout:()=>nG,PreviewPrompt:()=>jG,Purpose:()=>NG,Readable:()=>MG,UiLayout:()=>eG,color:()=>JH,hasMedia:()=>RG,hasText:()=>IG,indicators:()=>rW,transformDataHeadings:()=>BG,withUndoReset:()=>ZW}),lK=GL((0,N.jsx)(`path`,{d:`M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z`}),`ChevronRight`),uK=GL((0,N.jsx)(`path`,{d:`M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2`}),`MoreVert`),dK=e=>{switch(e){case`down`:return 90;case`up`:return-90;case`left`:return 180;default:return 0}},fK=e=>{let{direction:t,style:n}=e;return(0,N.jsx)(lK,{style:{transform:`rotate(${dK(t)}deg)`,...n}})};fK.propTypes={direction:p.string,style:p.object};var pK=({style:e})=>(0,N.jsxs)(`span`,{style:e,children:[(0,N.jsx)(uK,{style:{margin:`0 -16px`}}),(0,N.jsx)(uK,{})]});pK.propTypes={style:p.object},F(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`}));var mK=F(`span`)(({theme:e})=>({border:`solid 0px ${e.palette.primary.main}`,"& mjx-mn:has(~ mjx-mfrac), mjx-mfrac ~ mjx-mn":{fontSize:`120% !important`},"& mjx-frac":{fontSize:`120% !important`}}));function hK({n:e,children:t,isDragging:n,isOver:r,dragItem:i,value:a,selected:o}){let[s,c]=(0,S.useState)(null),l=(0,S.useRef)(null),u=e=>{l.current&&(l.current.contains(e.target)?l.current.classList.add(`selected`):l.current.classList.remove(`selected`))};(0,S.useEffect)(()=>(document.addEventListener(`click`,u),()=>{document.removeEventListener(`click`,u)}),[]),(0,S.useEffect)(()=>{l.current&&typeof OW==`function`&&OW(l.current)},[a?.value,r,i?.value?.value]),(0,S.useEffect)(()=>{if(r&&l.current&&!s){let e=l.current;c({width:e.offsetWidth,height:e.offsetHeight})}else!r&&s&&c(null)},[r,s]);let d=i&&r?i.value.value:a.value||`\xA0`,f=n?`\xA0`:d,p=f!==`\xA0`,m=i&&r,h=o?`2px solid ${dU()}`:m?`1px solid ${G.BORDER_DARK}`:`1px solid ${G.BORDER_LIGHT}`;return(0,N.jsxs)(`div`,{ref:l,className:o?`selected`:void 0,style:{display:`inline-flex`,minWidth:`178px`,minHeight:`36px`,background:m?`${G.BORDER_LIGHT}`:`${G.WHITE}`,border:h,boxSizing:`border-box`,borderRadius:`3px`,overflow:`hidden`,position:`relative`,padding:`8px 8px 8px 35px`,width:s?s.width:void 0,height:s?s.height:void 0,touchAction:`none`},"data-key":e.index,contentEditable:!1,children:[p&&(0,N.jsx)(pK,{style:{position:`absolute`,top:`6px`,left:`15px`,color:`#9B9B9B`},contentEditable:!1}),(0,N.jsx)(`span`,{dangerouslySetInnerHTML:{__html:f}}),t]})}hK.propTypes={n:p.object,children:p.node,isDragging:p.bool,isOver:p.bool,dragItem:p.object,value:p.object,selected:p.bool};function gK({value:e,disabled:t,instanceId:n,children:r,n:i,onChange:a,removeResponse:o,duplicates:s,pos:c,selected:l}){let{attributes:u,listeners:d,setNodeRef:f,isDragging:p}=rV({id:`drag-${i.index}`,disabled:t||!e?.value,data:{id:`drag-${i.index}`,value:e,instanceId:n,n:i,pos:c,opts:{duplicates:s},type:`drag-in-the-blank-placed-choice`,fromChoice:!e,onRemove:e=>o(e),onDrop:(e,t)=>{t?.type===`drag-in-the-blank-drop-choice`&&(a(e),!s&&e.fromChoice&&o(e))}}}),{setNodeRef:m,isOver:h,active:_}=oV({id:`drop-${i.index}`,data:{type:`drag-in-the-blank-drop-choice`,accepts:[`drag-in-the-blank-choice`,`drag-in-the-blank-placed-choice`],instanceId:n,value:e,id:`drop-${i.index}`,pos:c,n:i,opts:{duplicates:s},onDrop:(e,t)=>{if(t?.type===`drag-in-the-blank-drop-choice`&&e.value.id!==t.value.id){if(e.type===`drag-in-the-blank-choice`){a(e),!s&&e.fromChoice&&o(e);return}e.type===`drag-in-the-blank-placed-choice`&&(o(t),a(e),setTimeout(()=>o(e),10))}}}}),v=e=>{f(e),m(e)},y=(0,N.jsx)(hK,{n:i,isDragging:p,isOver:h,dragItem:_?.data?.current,value:e,selected:l,children:r}),b=e?(0,N.jsx)(`span`,{ref:v,...u,...d,children:y}):(0,N.jsx)(`span`,{ref:m,children:y});return(0,N.jsx)(mK,{className:g(h&&`over`),children:b})}gK.propTypes={value:p.object,disabled:p.bool,instanceId:p.string,children:p.node,n:p.object.isRequired,onChange:p.func.isRequired,removeResponse:p.func.isRequired,duplicates:p.bool,selected:p.bool};var _K=(e,t,n,r)=>{let{tr:i}=e.state;i.setNodeMarkup(n,void 0,{...t.attrs,...r.value}),i.isDone=!0,e.view.dispatch(i)},vK=(e,t,n)=>{let{tr:r}=e.state;r.setNodeMarkup(n.pos,void 0,ts(t.attrs,[`value`,`id`])),r.isDone=!0,e.view.dispatch(r)},yK=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{inTable:s}=o,c=r();return(0,N.jsx)(iS,{className:`drag-in-the-blank`,"data-selected":a,style:{display:`inline`,whiteSpace:`normal`},children:(0,N.jsx)(`span`,{...o,style:{display:`inline-flex`,minHeight:`50px`,minWidth:`178px`,position:`relative`,margin:s?`10px`:`0 10px`,cursor:`pointer`},children:(0,N.jsx)(gK,{n:o,dragKey:o.id,targetId:`0`,pos:c,value:o,duplicates:i.duplicates,selected:a,onChange:e=>_K(t,n,c,e),removeResponse:e=>vK(t,n,e)})})})};yK.propTypes={attributes:p.object,data:p.object,n:p.object,nodeProps:p.object,opts:p.object};var bK=e=>{let{editor:t,node:n,getPos:r,options:i,selected:a}=e,{attrs:o}=n,{value:s,error:c}=o,l=s||`<div> </div>`,u=r(),d=(0,S.useRef)(null),f=(0,S.useRef)(null),p=(0,S.useRef)(!1),m=(0,S.useRef)(null),h=()=>t._holdInlineDropdownToolbarIndex!=null&&String(t._holdInlineDropdownToolbarIndex)===String(n.attrs.index),[g,_]=(0,S.useState)(!1),[v,y]=(0,S.useState)({top:0,left:0}),b=()=>{h()||(_(!1),i.onInlineDropdownToolbarClose?.(t))},x=i.respAreaToolbar([n,u],t,b),C=()=>{let{tr:e}=t.state,n=e.doc.nodeAt(u);if(!n)return;let{selection:r}=e;r.from===u&&r.to===u+n.nodeSize||(e.setSelection(U.create(e.doc,u)),t.view.dispatch(e))},w=()=>{p.current||(i.onToolbarCloseRequest?(p.current=!0,i.onToolbarCloseRequest([n,u],t,()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,b()},()=>{p.current=!1,delete t._holdInlineDropdownToolbarIndex,_(!0),setTimeout(C,0)})):b())};(0,S.useEffect)(()=>{let{selection:e}=t.state,r=e.from+n.nodeSize===e.to;a?r&&_(!0):g&&w()},[t,n,a]);let T=e=>e.clientX>document.documentElement.clientWidth||e.clientY>document.documentElement.clientHeight||e.target===document.documentElement;return(0,S.useEffect)(()=>{m.current&&typeof OW==`function`&&OW(m.current)},[s]),(0,S.useEffect)(()=>{let e=document.body.getBoundingClientRect(),{from:n}=t.state.selection,r=t.view.coordsAtPos(n);y({top:r.top+Math.abs(e.top)+40,left:r.left});let i=e=>{if(T(e))return;let n=e.target.closest(`[data-toolbar-for]`);!e.target.closest(`[data-inline-dropdown-toolbar]`)&&(!n||n.dataset.toolbarFor!==f.current?.instanceId)&&!t._toolbarOpened&&d.current&&!d.current.contains(e.target)&&!e.target.closest(`[data-inline-node]`)&&w()};return g?document.addEventListener(`mousedown`,i):document.removeEventListener(`mousedown`,i),()=>document.removeEventListener(`mousedown`,i)},[g,n]),(0,N.jsxs)(iS,{className:`inline-dropdown`,"data-selected":a,style:{display:`inline-flex`,height:`50px`,cursor:`pointer`},children:[(0,N.jsxs)(`div`,{ref:m,style:{display:`inline-flex`,minWidth:`178px`,height:`36px`,background:`#FFF`,border:`1px solid #C0C3CF`,boxSizing:`border-box`,borderRadius:`3px`,margin:`0 2px`,position:`relative`,alignItems:`center`},onClick:()=>_(!0),children:[(0,N.jsx)(`div`,{style:{flex:1,overflow:`hidden`,padding:`0 25px 0 8px`,whiteSpace:`nowrap`,textOverflow:`ellipsis`},children:(0,N.jsx)(`span`,{style:{display:`inline-block`,verticalAlign:`middle`},dangerouslySetInnerHTML:{__html:l}})}),(0,N.jsx)(fK,{direction:`down`,style:{position:`absolute`,top:`5px`,right:`5px`}})]}),g&&(0,N.jsxs)(S.Fragment,{children:[zx.createPortal((0,N.jsx)(`div`,{ref:d,children:(0,N.jsx)(x,{editorCallback:e=>{f.current=e}})}),t?._tiptapContainerEl||document.body),t._tiptapContainerEl&&zx.createPortal((0,N.jsx)(Lz,{deletable:!0,toolbarOpts:{minWidth:`auto`},autoWidth:!0,style:{top:-40,left:0,right:0},onDelete:()=>{let{tr:e}=t.state;e.delete(u,u+n.nodeSize),zz(t,!1),delete t._holdInlineDropdownToolbarIndex,t.view.dispatch(e),_(!1),t.commands.focus()},showDone:!1}),t._tiptapContainerEl)]})]})};bK.propTypes={attributes:p.object,selectedItem:p.oneOfType([p.string,p.object])};var xK=s({greaterThan:()=>wK,greaterThanEqual:()=>EK,lessThan:()=>CK,lessThanEqual:()=>TK}),SK=e=>({...e,category:`comparison`}),CK=SK({name:`Less than`,latex:`<`,command:`\\lt`}),wK=SK({name:`Greater than`,latex:`>`,command:`\\gt`}),TK=SK({name:`Less than or equal`,latex:`\\le`,symbol:`<=`,command:`\\le`,ariaLabel:`less than or equal to`}),EK=SK({name:`Greater than or equal`,symbol:`>=`,command:`\\ge`,latex:`\\ge`}),DK=e=>t=>({...t,category:e}),OK=(e=[])=>{let t=[];ns(5,()=>t.push([]));let n=e.length,r=0,i=0;for(;i<n;)t[r++].push(e[i++]),r===5&&(r=0);return t},kK=e=>t=>{let n=Xo(e),r=n.some(e=>e.latex===t.latex),i=n.some(e=>e.name===t.name);return!r&&!i},AK=(e=[],t=[])=>{t=t.filter(kK(e));let n=[];ns(5-e.length,()=>e.push([])),ns(5,()=>n.push([]));let r=OK(t);for(let t=0;t<5;t++)n[t]=[...e[t],...r[t]];return n},jK=s({theta:()=>FK,x:()=>NK,y:()=>PK}),MK=DK(`vars`),NK=MK({name:`X`,latex:`x`,write:`x`}),PK=MK({name:`Y`,latex:`y`,write:`y`}),FK=MK({name:`Theta`,latex:`\\theta`,write:`\\theta`}),IK=s({blankOverBlank:()=>RK,xBlankBlank:()=>BK,xOverBlank:()=>zK}),LK=DK(`fractions`),RK=LK({name:`blank/blank`,latex:`\\frac{}{}`,command:`\\frac`,ariaLabel:`fraction`}),zK=LK({latex:`\\frac{x}{ }`,name:`X/blank`,label:`x/[]`,command:`/`,ariaLabel:`x over blank fraction`}),BK=LK({name:`X (blank/blank)`,latex:`x\\frac{}{}`,label:`x([]/[])`,command:`\\frac`,ariaLabel:`mixed number`}),VK=s({nthRoot:()=>KK,squareRoot:()=>GK,squared:()=>UK,xToPowerOfN:()=>WK}),HK=DK(`exponent`),UK=HK({name:`Squared`,latex:`x^2`,write:`^2`}),WK=HK({name:`X to the power of n`,latex:`x^{}`,command:`^`,ariaLabel:`exponent`}),GK=HK({name:`Square root`,latex:`\\sqrt{}`,command:`\\sqrt`}),KK=HK({name:`Nth root`,latex:`\\sqrt[{}]{}`,command:`\\nthroot`}),qK=s({absValue:()=>XK,approx:()=>eq,brackets:()=>QK,nApprox:()=>tq,notEqual:()=>nq,notSimilar:()=>iq,parenthesis:()=>ZK,percentage:()=>$K,plusMinus:()=>YK,similar:()=>rq}),JK=DK(`misc`),YK=JK({name:`Plus or Minus`,latex:`\\pm`,write:`\\pm`}),XK=JK({name:`Absolute Value`,latex:`\\abs{}`,symbol:`| |`,command:`|`}),ZK=JK({name:`Parenthesis`,latex:`\\left(\\right)`,symbol:`( )`,command:`(`}),QK=JK({name:`Brackets`,latex:`\\left[\\right]`,symbol:`[ ]`,command:`[`}),$K=JK({name:`Percent`,latex:`%`,command:`%`}),eq=JK({latex:`\\approx`,command:`\\approx`,ariaLabel:`Approximately equal to`}),tq=JK({latex:`\\napprox`,command:`\\napprox`,ariaLabel:`Not pproximately equal to`}),nq=JK({latex:`\\neq`,command:`\\neq`,ariaLabel:`Not equals`}),rq=JK({latex:`\\sim`,command:`\\sim`,ariaLabel:`Similar`}),iq=JK({latex:`\\nsim`,command:`\\nsim`,ariaLabel:`Not similar`}),aq=s({eulers:()=>cq,halfInfinity:()=>uq,infinity:()=>lq,pi:()=>sq}),oq=DK(`constants`),sq=oq({name:`Pi`,label:`π`,latex:`\\pi`,command:`\\pi`,category:`constants`}),cq=oq({name:`Eulers`,label:`e`,latex:`e`,command:`e`,category:`constants`}),lq=oq({name:`Infinity`,label:`\\infty`,latex:`\\infty`,command:`\\infty`,category:`constants`}),uq=oq({name:`Half Infinity`,label:`\\propto`,latex:`\\propto`,command:`\\propto`,category:`constants`}),dq=s({cos:()=>mq,cot:()=>vq,csc:()=>_q,sec:()=>gq,sin:()=>pq,tan:()=>hq}),fq=DK(`trigonometry`),pq=fq({name:`sine`,label:`sin`,command:`\\sin`,latex:`\\sin`}),mq=fq({name:`cosine`,label:`cos`,command:`\\cos`,latex:`\\cos`}),hq=fq({name:`tanget`,label:`tan`,command:`\\tan`,latex:`\\tan`}),gq=fq({name:`secant`,label:`sec`,command:`\\sec`,latex:`\\sec`}),_q=fq({name:`cosecant`,label:`csc`,command:`\\csc`,latex:`\\csc`}),vq=fq({name:`cotangent`,label:`cot`,command:`\\cot`,latex:`\\cot`}),yq=s({angle:()=>Oq,circledDot:()=>Pq,congruentTo:()=>Lq,degree:()=>Fq,doublePrimeArcSecond:()=>Bq,leftArrow:()=>Vq,leftrightArrow:()=>Uq,measureOfAngle:()=>Aq,notCongruentTo:()=>Rq,notParallel:()=>Eq,overArc:()=>kq,overLeftRightArrow:()=>Cq,overRightArrow:()=>Sq,overline:()=>xq,parallel:()=>Tq,parallelogram:()=>Nq,perpindicular:()=>Dq,primeArcminute:()=>zq,rightArrow:()=>Hq,segment:()=>wq,similarTo:()=>Iq,square:()=>Mq,triangle:()=>jq}),bq=e=>({...e,category:`geometry`}),xq=bq({name:`Line`,latex:`\\overline{}`,command:`\\overline`}),Sq=bq({name:`Ray`,latex:`\\overrightarrow{}`,command:`\\overrightarrow`}),Cq=bq({name:`Segment`,latex:`\\overleftrightarrow{\\overline{}}`,symbol:`AB`,command:`\\overleftrightarrow`}),wq=bq({name:`Segment`,latex:`\\overleftrightarrow{AB}`,write:`\\overleftrightarrow{AB}`,label:`AB`}),Tq=bq({name:`Parallel`,latex:`\\parallel`,command:`\\parallel`}),Eq=bq({name:`Not Parallel`,latex:`\\nparallel`,command:`\\nparallel`}),Dq=bq({name:`Perpendicular`,latex:`\\perp`,command:`\\perpendicular`}),Oq=bq({name:`Angle`,latex:`\\angle`,command:`\\angle`}),kq=bq({name:`Over arc`,latex:`\\overarc{\\overline{}}`,command:`\\overarc`}),Aq=bq({name:`Measured Angle`,latex:`\\measuredangle`,command:[`m`,`\\angle`]}),jq=bq({name:`Triangle`,latex:`\\triangle`,command:`\\triangle`}),Mq=bq({name:`Square`,latex:`\\square`,command:`\\square`}),Nq=bq({name:`Parallelogram`,latex:`\\parallelogram`,command:`\\parallelogram`}),Pq=bq({name:`Circled Dot`,latex:`\\odot`,command:`\\odot`}),Fq=bq({name:`Degree`,latex:`\\degree`,command:`\\degree`}),Iq=bq({name:`Similar`,command:`\\sim`,latex:`\\sim`}),Lq=bq({name:`Congruent To`,command:`\\cong`,latex:`\\cong`}),Rq=bq({name:`Not Congruent To`,command:`\\ncong`,latex:`\\ncong`}),zq=bq({name:`Prime`,label:`pam`,latex:`'`,write:`'`}),Bq=bq({name:`Double Prime`,latex:`''`,write:`''`}),Vq=bq({name:`Left Arrow`,latex:`\\leftarrow`,command:`\\leftarrow`}),Hq=bq({name:`Right Arrow`,latex:`\\rightarrow`,command:`\\rightarrow`}),Uq=bq({name:`Left and Right Arrow`,latex:`\\leftrightarrow`,command:`\\leftrightarrow`}),Wq=s({circleDot:()=>Gq}),Gq=DK(`operators`)({name:`CircleDot`,label:`⋅`,write:`\\cdot`,ariaLabel:`Dot multiplier`}),Kq=s({ln:()=>Xq,log:()=>Jq,logSubscript:()=>Yq}),qq=DK(`log`),Jq=qq({name:`Log`,label:`log`,command:`\\log`,latex:`\\log`}),Yq=qq({name:`log base n`,label:`log s`,latex:`\\log_{}`,command:[`\\log`,`_`]}),Xq=qq({name:`natural log`,label:`ln`,command:`\\ln`,latex:`\\ln`}),Zq=s({subscript:()=>eJ,superscript:()=>$q}),Qq=DK(`sub-sup`),$q=Qq({name:`Superscript`,latex:`x^{}`,command:`^`}),eJ=Qq({name:`Subscript`,latex:`x_{}`,command:`_`}),tJ=s({mu:()=>aJ,sigma:()=>oJ,smallSigma:()=>sJ,xBar:()=>rJ,yBar:()=>iJ}),nJ=DK(`statistics`),rJ=nJ({name:`X Bar`,label:`x̄`,latex:`\\overline{x}`,write:`\\overline{x}`}),iJ=nJ({name:`Y Bar`,latex:`\\overline{y}`,write:`\\overline{y}`}),aJ=nJ({name:`mu`,label:`mu`,latex:`\\mu`,write:`\\mu`}),oJ=nJ({name:`Sigma`,ariaLabel:`Uppercase Sigma`,label:`\\Sigma`,latex:`\\Sigma`,write:`\\Sigma`}),sJ=nJ({name:`sigma`,ariaLabel:`Lowercase Sigma`,label:`\\sigma`,latex:`\\sigma`,write:`\\sigma`}),cJ=s({divide:()=>pJ,equals:()=>uJ,minus:()=>fJ,multiply:()=>mJ,plus:()=>dJ}),lJ=DK(`operators`),uJ=lJ({write:`=`,label:`=`}),dJ=lJ({write:`+`,label:`+`}),fJ=lJ({write:`−`,label:`−`}),pJ=lJ({name:`divide`,label:`÷`,command:`\\divide`,otherNotation:`\\div`}),mJ=lJ({name:`multiply`,label:`×`,command:`\\times`}),hJ=s({doubleCellMatrix:()=>vJ,singleCellMatrix:()=>_J}),gJ=DK(`matrices`),_J=gJ({name:`Single Cell Matrix`,label:`[ ]`,write:`\\begin{pmatrix}\\end{pmatrix}`}),vJ=gJ({name:`Double Cell Matrix`,label:`[ ] [ ] \\\\newline [ ] [ ]`,write:`\\begin{bmatrix}&\\\\&\\end{bmatrix}`}),yJ={0:`zero`,1:`one`,2:`two`,3:`three`,4:`four`,5:`five`,6:`six`,7:`seven`,8:`eight`,9:`nine`},bJ=ns(10,String).map(e=>({name:yJ[e],write:e,label:e,category:`digit`})).reduce((e,t)=>(e[t.name]=t,e),{comma:{name:`comma`,label:`,`,write:`,`,category:`digit`},decimalPoint:{name:`decimal-point`,label:`.`,write:`.`,category:`digit`}}),xJ=DK(`logic`),SJ=xJ({name:`Therefore`,label:`∴`,write:`∴`}),CJ=xJ({name:`Long division`,latex:`\\longdiv{}`,command:`\\longdiv`}),wJ=DK(`navigation`),TJ=wJ({label:`◀`,keystroke:`Left`,ariaLabel:`Move cursor left`}),EJ=wJ({label:`▶`,keystroke:`Right`,ariaLabel:`Move cursor right`}),DJ={label:`⌫`,category:`edit`,keystroke:`Backspace`,ariaLabel:`Delete`},OJ=[[RK,$K,NK,UK,GK],[Gq,PK,eJ,WK,KK],[YK,CK,wK,TK,EK],[sq,FK,ZK,QK,XK],[nq,pq,mq,hq,Fq]],kJ=(()=>{let e=[...OJ.map(e=>[...e])];return e[0].push({name:`i`,latex:`i`,write:`i`}),e[1].push(Jq),e[2].push(Yq),e[3].push(Xq),e[4].push(cq),e})(),AJ=(()=>{let e=[...OJ.map(e=>[...e])];return e[0].push(aJ),e[1].push(rJ),e[2].push(iJ),e[3].push(oJ),e[4].push(sJ),e})(),jJ=[{predicate:e=>e>=3&&e<=5,set:[[CK,wK],[zK,BK],[NK,CJ],[UK,WK]]},{predicate:e=>e>=6&&e<=7,set:[[Fq,CK,wK],[Gq,TK,EK],[NK,PK,UK,WK],[YK,zK,BK,GK],[sq,ZK,XK,KK]]},{predicate:e=>e>=8||e===`HS`,set:OJ},{predicate:`non-negative-integers`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,{name:``,latex:``,write:``},{name:``,latex:``,write:``}],[TJ,EJ,DJ]]},{predicate:`integers`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,{name:``,latex:``,write:``},fJ],[TJ,EJ,DJ]]},{predicate:`decimals`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,bJ.decimalPoint,fJ],[TJ,EJ,DJ]]},{predicate:`fractions`,set:[[bJ.seven,bJ.eight,bJ.nine],[bJ.four,bJ.five,bJ.six],[bJ.one,bJ.two,bJ.three],[bJ.zero,RK,fJ],[TJ,EJ,DJ]]},{predicate:`geometry`,set:[[RK,Fq,zq,Bq,Lq,Iq],[Gq,Oq,Aq,jq,Rq,iq],[pq,mq,hq,sq,GK,KK],[_q,gq,vq,FK,eJ,WK],[xq,Sq,Cq,kq,Dq,Tq]]},{predicate:`advanced-algebra`,set:kJ},{predicate:`statistics`,set:AJ},{predicate:`item-authoring`,set:[[pJ,RK,CJ,uq,UK,GK,xq,Sq,Cq,Jq],[mJ,Gq,{name:``,latex:``,write:``},eJ,WK,KK,Dq,Tq,kq,Yq],[YK,sq,FK,Fq,Oq,Vq,Hq,jq,Mq,Xq],[nq,XK,sJ,aJ,SJ,oJ,Uq,pq,mq,hq],[TK,EK,{name:``,latex:``,write:``},{name:``,latex:``,write:``},lq,{name:``,latex:``,write:``},{name:``,latex:``,write:``},_q,gq,vq]]},{predicate:e=>e>=1&&e<=2,set:[]}],MJ=e=>{let t=parseInt(e,10);if(e=isNaN(t)?e:t,!e)return[];let n=jJ.find(t=>typeof t.predicate==`string`?t.predicate===e:t.predicate(e));if(n)return n.set||[];if(e!==`language`)return jJ[2].set},NJ=[...Object.values(cJ),...Object.values(xK),...Object.values(aq),...Object.values(bJ),...Object.values(VK),...Object.values(IK),...Object.values(yq),...Object.values(Kq),...Object.values(hJ),...Object.values(qK),...Object.values(Wq),...Object.values(tJ),...Object.values(Zq),...Object.values(dq),...Object.values(jK)],PJ=e=>(e||[]).map(e=>{let{latex:t}=e,n=(NJ||[]).find(e=>t===e.latex||t===e.write||t===e.command||t===e.otherNotation);return t&&n||e}),FJ=()=>{(Array.from(document.querySelectorAll(`span[mathquill-command-id]`))||[]).forEach(e=>{e&&e.innerText===`∥`&&e.className!==`mq-editable-field`&&(e.style.fontSize=`32px`),(e.innerText===`′`||e.innerText===`′′`)&&!e.hasAttribute(`data-prime`)&&e.setAttribute(`data-prime`,`true`)})},{one:IJ,two:LJ,three:RJ,four:zJ,five:BJ,six:VJ,seven:HJ,eight:UJ,nine:WJ,zero:GJ,comma:KJ,decimalPoint:qJ}=bJ,JJ=[[HJ,UJ,WJ,pJ],[zJ,BJ,VJ,mJ],[IJ,LJ,RJ,fJ],[GJ,qJ,KJ,dJ],[TJ,EJ,DJ,uJ]];function K(e){this.elements=Array.isArray(e)?e:[e].filter(Boolean),this.length=this.elements.length;for(var t=0;t<this.elements.length;t++)this[t]=this.elements[t]}K.prototype.addClass=function(e){var t=(e||``).split(/\s+/).filter(Boolean);return this.elements.forEach(function(e){t.forEach(function(t){e.classList.add(t)})}),this},K.prototype.removeClass=function(e){return this.elements.forEach(function(t){e?(e||``).split(/\s+/).filter(Boolean).forEach(function(e){t.classList.remove(e)}):t.className=``}),this},K.prototype.toggleClass=function(e,t){var n=(e||``).split(/\s+/).filter(Boolean),r=arguments.length>1?!!t:null;return this.elements.forEach(function(e){n.forEach(function(t){r===null?e.classList.toggle(t):e.classList.toggle(t,r)})}),this},K.prototype.attr=function(e,t){return t===$J?this.elements[0]?this.elements[0].getAttribute(e):$J:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},K.prototype.html=function(e){return e===$J?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},K.prototype.append=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},K.prototype.prepend=function(e){var t=e instanceof K?e.elements[0]:e;return this.elements.forEach(function(e,n){var r=n===0?t:t.cloneNode(!0);e.insertBefore(r,e.firstChild)}),this},K.prototype.wrapAll=function(e){if(!this.elements.length)return this;var t;if(typeof e==`string`&&e.trim().indexOf(`<`)===0){var n=document.createElement(`div`);n.innerHTML=e.trim(),t=n.firstChild}else if(e instanceof K)t=e.elements[0];else if(e&&e.nodeType)t=e;else return this;var r=this.elements[0],i=r.parentNode;return i&&(i.insertBefore(t,r),this.elements.forEach(function(e){t.appendChild(e)})),this},K.prototype.appendTo=function(e){var t=e instanceof K?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},K.prototype.prependTo=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.firstChild;return this.elements.forEach(function(e){t.insertBefore(e,n),n=e}),this},K.prototype.insertBefore=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},K.prototype.insertAfter=function(e){var t=e instanceof K?e.elements[0]:e;if(!t)return this;var n=t.parentNode,r=t.nextSibling;return n&&this.elements.forEach(function(e){n.insertBefore(e,r),r=e}),this},K.prototype.replaceWith=function(e){var t=[];return e instanceof K?t=e.elements.slice():e&&typeof e.length==`number`&&!e.tagName?t=Array.from(e):e&&e.nodeType&&(t=[e]),this.elements.forEach(function(e){var n=e.parentNode;n&&(t.forEach(function(t){n.insertBefore(t,e)}),n.removeChild(e))}),this},K.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},K.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},K.prototype.children=function(e){var t=[];return this.elements.forEach(function(n){var r;if(!e)r=Array.from(n.children);else if(e===`:first`)r=n.firstElementChild?[n.firstElementChild]:[];else if(e===`:last`)r=n.lastElementChild?[n.lastElementChild]:[];else{var i=/^:eq\((\d+)\)$/.exec(e);if(i){var a=parseInt(i[1],10),o=Array.from(n.children);r=o[a]?[o[a]]:[]}else r=Array.from(n.querySelectorAll(`:scope > `+e))}t.push.apply(t,r)}),new K(t)},K.prototype.find=function(e){var t=[];return this.elements.forEach(function(n){var r=Array.from(n.querySelectorAll(e));t.push.apply(t,r)}),new K(t)},K.prototype.closest=function(e){return new K(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},K.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new K(e)},K.prototype.filter=function(e){return new K(this.elements.filter(function(t,n){return e(n,t)}))},K.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},K.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},K.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function YJ(e){return(e||``).split(`.`)[0]}K.prototype.on=function(e,t){var n=YJ(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},K.prototype.bind=function(e,t,n){var r=this;if(typeof e==`object`){for(var i in e)e.hasOwnProperty(i)&&r.bind(i,e[i]);return this}var a=typeof t==`function`?t:n;return a===!1&&(a=function(e){e.preventDefault()}),(e||``).split(/\s+/).filter(Boolean).forEach(function(e){var t=YJ(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},K.prototype.off=function(e,t){var n=YJ(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},K.prototype.unbind=function(e,t){if(e&&e.includes(`.`))this.elements.forEach(function(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.replaceChild(t,e)});else if(e&&t){var n=YJ(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},K.prototype.trigger=function(e){var t=new Event(YJ(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},K.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},K.prototype.blur=function(e){return typeof e==`function`?this.on(`blur`,e):(this.elements.forEach(function(e){e.blur&&e.blur()}),this)},[`mousemove`,`mouseup`,`mousedown`,`mouseover`,`mouseout`,`click`,`keydown`,`keypress`,`keyup`,`focusout`,`paste`,`cut`,`copy`,`input`,`load`].forEach(function(e){K.prototype[e]=function(t){return this.on(e,t)}}),K.prototype.next=function(e){return new K(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.prev=function(e){return new K(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},K.prototype.parent=function(){return new K(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},K.prototype.offset=function(){if(!this.elements[0])return{top:0,left:0};var e=this.elements[0].getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft)}},K.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},K.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},K.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},K.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},K.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},K.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},K.prototype.css=function(e,t){if(t===$J){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):$J}}else this.elements.forEach(function(n){n.style[e]=t});return this},K.prototype.scrollTop=function(e){var t=this.elements[0];return e===$J?t?t===window?window.pageYOffset||document.documentElement.scrollTop:t.scrollTop:0:(t===window?window.scrollTo(window.pageXOffset||0,e):this.elements.forEach(function(t){t.scrollTop=e}),this)},K.prototype.scrollLeft=function(e){var t=this.elements[0];return e===$J?t?t===window?window.pageXOffset||document.documentElement.scrollLeft:t.scrollLeft:0:(t===window?window.scrollTo(e,window.pageYOffset||0):this.elements.forEach(function(t){t.scrollLeft=e}),this)},K.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},K.prototype.eq=function(e){return new K([this.elements[e]])},K.prototype.get=function(e){return e===$J?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},K.prototype.add=function(e){var t=this.elements.slice();return e instanceof K?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new K(t)},K.prototype.first=function(){return new K([this.elements[0]])},K.prototype.last=function(){return new K([this.elements[this.elements.length-1]])},K.prototype.index=function(e){if(!e){var t=this.elements[0]&&this.elements[0].parentElement;return t?Array.from(t.children).indexOf(this.elements[0]):-1}var n=e instanceof K?e.elements[0]:e;return this.elements.indexOf(n)},K.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},K.prototype.text=function(e){return e===$J?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},K.prototype.val=function(e){var t=this.elements[0];return t?e===$J?t.value===$J?t.textContent:t.value:(this.elements.forEach(function(t){t.value===$J?t.textContent=e:t.value=e}),this):$J};function XJ(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(K.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var ZJ=function(e,t){var n;if(!e)n=[];else if(e===window||e===document)n=[e];else if(e.nodeType)n=[e];else if(e&&e.current&&e.current.nodeType)n=[e.current];else if(typeof e==`string`&&e[0]===`<`){var r=document.createElement(`div`);r.innerHTML=e.trim(),n=Array.from(r.children)}else if(typeof e==`string`){var i=t instanceof K?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof K?e.elements:e.length===$J?[]:Array.from(e);return XJ(n)};ZJ.contains=function(e,t){return e!==t&&e.contains(t)};var QJ=ZJ,$J,eY=`mathquill-command-id`,tY=`mathquill-block-id`,nY=Math.min,rY=Math.max;function iY(){}var aY=[].slice;function oY(e){var t=e.length-1;return function(){var n=aY.call(arguments,0,t),r=aY.call(arguments,t);return e.apply(this,n.concat([r]))}}var sY=oY(function(e,t){return oY(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function cY(e){return oY(function(t,n){return typeof t!=`function`&&(t=sY(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function q(e){var t=aY.call(arguments,1);return function(){return e.apply(this,t)}}function lY(e,t){if(!t)throw Error(`prayer failed: `+e)}var J=(function(e,t,n){function r(e){return typeof e==`object`}function i(e){return typeof e==`function`}function a(){}return function o(s,c){c===n&&(c=s,s=Object);function l(){var e=new u;return i(e.init)&&e.init.apply(e,arguments),e}function u(){}l.Bare=u;var d=a[e]=s[e],f=u[e]=l[e]=l.p=new a,p;return f.constructor=l,l.extend=function(e){return o(l,e)},(l.open=function(e){if(p={},i(e)?p=e.call(l,f,d,l,s):r(e)&&(p=e),r(p))for(var n in p)t.call(p,n)&&(f[n]=p[n]);return i(f.init)||(f.init=s),l})(c)}})(`prototype`,{}.hasOwnProperty),Y=-1,X=1;function uY(e){lY(`a direction was passed`,e===Y||e===X)}var dY=J(function(e){e.parent=0,e[Y]=0,e[X]=0,e.init=function(e,t,n){this.parent=e,this[Y]=t,this[X]=n},this.copy=function(e){return dY(e.parent,e[Y],e[X])}}),fY=J(function(e){e[Y]=0,e[X]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),fY.byId[this.id]=this,this.ends={},this.ends[Y]=0,this.ends[X]=0},e.dispose=function(){delete fY.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=ZJ(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=ZJ(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&fY.byId[n].jQadd(e),r&&fY.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){uY(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[Y],t[X]),n},e.createLeftOf=function(e){return this.createDir(Y,e)},e.selectChildren=function(e,t){return vY(e,t)},e.bubble=cY(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=cY(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[Y]===0&&this.ends[X]===0},e.isStyleBlock=function(){return!1},e.children=function(){return mY(this.ends[Y],this.ends[X])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return mY(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return mY(this,this).adopt(e,t,n),this},e.disown=function(){return mY(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function pY(e,t,n){lY(`a parent is always present`,e),t&&(t[X]!==n&&(t[X]=n),t.parent!==e&&(t.parent=e)),n&&(n[Y]!==t&&(n[Y]=t),n.parent!==e&&(n.parent=e)),lY(`leftward is properly set up`,(function(){return t?t[X]===n&&t.parent===e:e.ends[Y]===n})()),lY(`rightward is properly set up`,(function(){return n?n[Y]===t&&n.parent===e:e.ends[X]===t})())}var mY=J(function(e){e.init=function(e,t,n){if(n===$J&&(n=Y),uY(n),lY(`no half-empty fragments`,!e==!t),this.ends={},e){lY(`withDir is passed to Fragment`,e instanceof fY),lY(`oppDir is passed to Fragment`,t instanceof fY),lY(`withDir and oppDir have the same parent`,e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],function(e,t){return e.push.apply(e,t.jQ.get()),e});this.jQ=this.jQ.add(r)}},e.jQ=ZJ(),e.withDirAdopt=function(e,t,n,r){return e===Y?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){pY(e,t,n);var r=this;r.disowned=!1;var i=r.ends[Y];if(!i)return this;var a=r.ends[X];return t||(e.ends[Y]=i),n?n[Y]=a:e.ends[X]=a,r.ends[X][X]=n,r.each(function(n){n[Y]=t,n.parent=e,t&&(t[X]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[Y];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[X],r=t.parent;return pY(r,t[Y],t),pY(r,n,n[X]),t[Y]?t[Y][X]=n[X]:r.ends[Y]=n[X],n[X]?n[X][Y]=t[Y]:r.ends[X]=t[Y],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=cY(function(e){var t=this,n=t.ends[Y];if(!n)return t;for(;n!==t.ends[X][X]&&e(n)!==!1;n=n[X]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Z={},hY={},gY={},_Y=J(dY,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=ZJ(`<span class="mq-cursor">​</span>`);this.blink=function(){n.toggleClass(`mq-blink`)},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass(`mq-blink`),`intervalId`in this?clearInterval(this.intervalId):(this[X]?this.selection&&this.selection.ends[Y][Y]===this[Y]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[X].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return`intervalId`in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=ZJ(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return uY(e),!t||!t.jQ?this:(this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass(`mq-hasCursor`),this)},e.insLeftOf=function(e){return this.insDirOf(Y,e)},e.insRightOf=function(e){return this.insDirOf(X,e)},e.insAtDirEnd=function(e,t){return uY(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(Y,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(X,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=dY.copy(n);var r=n.upDownCache[t.id];if(r)r[X]?n.insLeftOf(r[X]):n.insAtRightEnd(r.parent);else{var i=n.offset().left;t.seek(i,n)}},e.offset=function(){var e=this,t=e.jQ.removeClass(`mq-cursor`).offset();return e.jQ.addClass(`mq-cursor`),t},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[X],r=this,i=e[Y];if(e.disown().eachChild(function(r){r.isEmpty()||(r.children().adopt(t,i,n).each(function(t){t.jQ.insertBefore(e.jQ.first())}),i=r.ends[X])}),!this[X])if(this[Y])this[X]=this[Y][X];else for(;!this[X];)if(this.parent=this.parent[X],this.parent)this[X]=this.parent.ends[Y];else{this[X]=e[X],this.parent=t;break}this[X]?this.insLeftOf(this[X]):this.insAtRightEnd(t),e.jQ.remove(),e[Y].siblingDeleted&&e[Y].siblingDeleted(r.options,X),e[X].siblingDeleted&&e[X].siblingDeleted(r.options,Y)},e.startSelection=function(){for(var e=this.anticursor=dY.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(!e||!e.ancestors||this[Y]===e[Y]&&this.parent===e.parent)return!1;for(var t,n=this;n.parent;n=n.parent)if(n.parent.id in e.ancestors){t=n.parent;break}if(!t)return!1;var r=e.ancestors[t.id],i,a,o=X;if(n[Y]!==r){for(var s=n;s;s=s[X])if(s[X]===r[X]){o=Y,i=n,a=r;break}}return o===X&&(i=r,a=n),i instanceof dY&&(i=i[X]),a instanceof dY&&(a=a[Y]),!i||!a?!1:(this.hide().selection=t.selectChildren(i,a),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0)},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[Y]=this.selection.ends[Y][Y],this[X]=this.selection.ends[X][X],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[Y]=e.ends[Y][Y],this[X]=e.ends[X][X],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof zY);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==$J)return this.depth()+(e||0)>this.options.maxDepth},e.howDeep=function(){for(var e=0,t=this;t=t.parent;)e++;return 1+Math.floor(e/2)},e.tooDeep=function(){var e=this.options.maxDepth;return e&&this.howDeep()>e}}),vY=J(mY,function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll(`<span class="mq-selection"></span>`).parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){var e=this.jQ[0];return e&&this.jQ.replaceWith(e.childNodes),this},e.join=function(e){return this.fold(``,function(t,n){return t+n[e]()})}}),yY=J(function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=_Y(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===Y||t===X?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}}),bY={},xY=J(),SY={},CY=J(),wY={};function TY(){window.console&&console.warn(`You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:
|
|
317
317
|
|
|
318
318
|
MathQuill = MathQuill.getInterface(1);
|
|
319
319
|
// now MathQuill.MathField() works like it used to
|
|
@@ -327,9 +327,9 @@ See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
|
|
|
327
327
|
See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
|
|
328
328
|
https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},TY(),EY},EY.getInterface=kY;var DY=kY.MIN=1,OY=kY.MAX=3;function kY(e){if(!(DY<=e&&e<=OY))throw`Only interface versions between `+DY+` and `+OY+` supported. You specified: `+e;if(e<3&&typeof window<`u`&&!window.jQuery)throw`MathQuill interface version `+e+` requires jQuery 1.5.2+ to be loaded first`;function t(e){if(!e||!e.nodeType)return null;var t=ZJ(e).children(`.mq-root-block`).attr(tY),r=t&&fY.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=Y,t.R=X,t.saneKeyboardEvents=NY;function r(e,t){for(var r in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:n}),t)if(t.hasOwnProperty(r)){var i=t[r],a=SY[r];e[r]=a?a(i):i}}t.config=function(e){return r(xY.p,e),this},t.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw`Embed name must start with letter and be only letters and digits`;wY[e]=t};var i=n.AbstractMathQuill=J(CY,function(t){t.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},t.parseLatex=function(e){return this.__controller.parseLatex(e)},t.__mathquillify=function(t){var n=this.__controller,r=n.root,i=n.container;n.createTextarea();var a=i.addClass(t).contents().detach();r.jQ=ZJ(`<span class="mq-root-block"/>`).attr(tY,r.id).appendTo(i),this.latex(a.text()),this.revert=function(){var t=i.empty().unbind(`.mathquill`).removeClass(`mq-editable-field mq-math-mode mq-text-mode`).append(a);return e>=3?t[0]:t}},t.config=function(e){return r(this.__options,e),this},t.el=function(){return this.__controller.container[0]},t.text=function(){return this.__controller.exportText()},t.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},t.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,``).replace(/<span class="?mq-cursor( mq-blink)?"?>.?<\/span>/i,``).replace(/ mq-hasCursor|mq-hasCursor ?/,``).replace(/ class=(""|(?= |>))/g,``)},t.reflow=function(){return this.__controller.root.postOrder(`reflow`),this}});for(var a in t.prototype=i.prototype,n.EditableField=J(i,function(e,t){e.__mathquillify=function(){return t.__mathquillify.apply(this,arguments),this.__controller.editable=!0,this.__controller.delegateMouseEvents(),this.__controller.editablesTextareaEvents(),this},e.focus=function(){return this.__controller.textarea.focus(),this},e.blur=function(){return this.__controller.textarea.blur(),this},e.write=function(e){return this.__controller.writeLatex(e),this.__controller.scrollHoriz(),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this},e.empty=function(){var e=this.__controller.root,t=this.__controller.cursor;return e.eachChild(`postOrder`,`dispose`),e.ends[Y]=e.ends[X]=0,e.jQ.empty(),delete t.selection,t.insAtRightEnd(e),this},e.cmd=function(e){var t=this.__controller.notify(),n=t.cursor;if(/^\\[a-z]+$/i.test(e)&&!n.isTooDeep()){e=e.slice(1);var r=Z[e];r&&(e=r(e),n.selection&&e.replaces(n.replaceSelection()),e.createLeftOf(n.show()),this.__controller.scrollHoriz())}else n.parent.write(n,e);return t.blurred&&n.hide().parent.blur(),this},e.select=function(){var e=this.__controller;for(e.notify(`move`).cursor.insAtRightEnd(e.root);e.cursor[Y];)e.selectLeft();return this},e.clearSelection=function(){return this.__controller.cursor.clearSelection(),this},e.moveToDirEnd=function(e){return this.__controller.notify(`move`).cursor.insAtDirEnd(e,this.__controller.root),this},e.moveToLeftEnd=function(){return this.moveToDirEnd(Y)},e.moveToRightEnd=function(){return this.moveToDirEnd(X)},e.keystroke=function(e){for(var e=e.replace(/^\s+|\s+$/g,``).split(/\s+/),t=0;t<e.length;t+=1)this.__controller.keystroke(e[t],{preventDefault:iY});return this},e.typedText=function(e){for(var t=0;t<e.length;t+=1)this.__controller.typedText(e.charAt(t));return this},e.dropEmbedded=function(e,t,n){var r=e-ZJ(window).scrollLeft(),i=t-ZJ(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(ZJ(a),e,t),PX().setOptions(n).createLeftOf(this.__controller.cursor)},e.clickAt=function(e,t,n){n||=document.elementFromPoint(e,t);var r=this.__controller,i=r.root;return QJ.contains(i.jQ[0],n)||(n=i.jQ[0]),r.seek(ZJ(n),e+pageXOffset,t+pageYOffset),r.blurred&&this.focus(),this},e.ignoreNextMousedown=function(e){return this.__controller.cursor.options.ignoreNextMousedown=e,this}}),t.EditableField=function(){throw`wtf don't call me, I'm 'abstract'`},t.EditableField.prototype=n.EditableField.prototype,bY)(function(r,i){var a=n[r]=i(n);t[r]=function(n,i){var o=t(n);if(o instanceof a||!n||!n.nodeType)return o;var s=yY(a.RootBlock(),ZJ(n),xY());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,bY[a]);return t}EY.noConflict=function(){return window.MathQuill=AY,EY};var AY=window.MathQuill;window.MathQuill=EY;function jY(e){for(var t=`moveOutOf deleteOutOf selectOutOf upOutOf downOutOf`.split(` `),n=0;n<t.length;n+=1)(function(t){e[t]=function(e){this.controller.handle(t,e)}})(t[n]);e.reflow=function(){this.controller.handle(`reflow`),this.controller.handle(`edited`),this.controller.handle(`edit`)}}var MY=J(function(e,t,n){function r(e,t){throw e=e?`'`+e+`'`:`EOF`,`Parse Error: `+t+` at `+e}e.init=function(e){this._=e},e.parse=function(e){return this.skip(o)._(``+e,t,r);function t(e,t){return t}},e.or=function(e){lY(`or is passed a parser`,e instanceof n);var t=this;return n(function(n,r,i){return t._(n,r,a);function a(t){return e._(n,r,i)}})},e.then=function(e){var t=this;return n(function(r,i,a){return t._(r,o,a);function o(t,r){var o=e instanceof n?e:e(r);return lY(`a parser is returned`,o instanceof n),o._(t,i,a)}})},e.many=function(){var e=this;return n(function(t,n,r){for(var i=[];e._(t,a,o););return n(t,i);function a(e,n){return t=e,i.push(n),!0}function o(){return!1}})},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n(function(n,i,a){for(var o=[],s=!0,c,l=0;l<e;l+=1)if(s=r._(n,u,d),!s)return a(n,c);for(;l<t&&s;l+=1)s=r._(n,u,f);return i(n,o);function u(e,t){return o.push(t),n=e,!0}function d(e,t){return c=t,n=e,!1}function f(e,t){return!1}})},e.result=function(e){return this.then(a(e))},e.atMost=function(e){return this.times(0,e)},e.atLeast=function(e){var t=this;return t.times(e).then(function(e){return t.many().map(function(t){return e.concat(t)})})},e.map=function(e){return this.then(function(t){return a(e(t))})},e.skip=function(e){return this.then(function(t){return e.result(t)})},this.string=function(e){var t=e.length,r=`expected '`+e+`'`;return n(function(n,i,a){var o=n.slice(0,t);return o===e?i(n.slice(t),o):a(n,r)})};var i=this.regex=function(e){lY(`regexp parser is anchored`,e.toString().charAt(1)===`^`);var t=`expected `+e;return n(function(n,r,i){var a=e.exec(n);if(a){var o=a[0];return r(n.slice(o.length),o)}else return i(n,t)})},a=n.succeed=function(e){return n(function(t,n){return n(t,e)})};n.fail=function(e){return n(function(t,n,r){return r(t,e)})},n.letter=i(/^[a-z]/i),n.letters=i(/^[a-z]*/i),n.digit=i(/^[0-9]/),n.digits=i(/^[0-9]*/),n.whitespace=i(/^\s+/),n.optWhitespace=i(/^\s*/),n.any=n(function(e,t,n){return e?t(e.slice(1),e.charAt(0)):n(e,`expected any character`)}),n.all=n(function(e,t,n){return t(``,e)});var o=n.eof=n(function(e,t,n){return e?n(e,`expected EOF`):t(e,e)})}),NY=function(){var e={8:`Backspace`,9:`Tab`,10:`Enter`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Esc`,32:`Spacebar`,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`Left`,38:`Up`,39:`Right`,40:`Down`,45:`Insert`,46:`Del`,144:`NumLock`};function t(t){var n=t.which||t.keyCode,r=e[n],i,a=[];return t.ctrlKey&&a.push(`Ctrl`),t.originalEvent&&t.originalEvent.metaKey&&a.push(`Meta`),t.altKey&&a.push(`Alt`),t.shiftKey&&a.push(`Shift`),i=r||String.fromCharCode(n),!a.length&&!r?i:(a.push(i),a.join(`-`))}return function(e,n){var r=null,i=null,a=QJ(e),o=QJ(n.container||a),s=iY,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=iY,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=iY,clearTimeout(c),a.val(e),e&&a[0]&&a[0].select&&a[0].select(),f=!!e}var f=!1;function p(){var e=a[0];return`selectionStart`in e&&e.selectionStart!==e.selectionEnd}function m(){n.keystroke(t(r),r)}function h(e){r=e,i=null,f&&u(function(e){!(e&&e.type===`focusout`)&&a[0]&&a[0].select&&a[0].select()}),m()}function g(e){r&&i&&m(),i=e,l(v)}function _(e){r&&!i&&l(v)}function v(){if(!p()){var e=a.val();e.length===1?(a.val(``),n.typedText(e)):e&&a[0]&&a[0].select&&a[0].select()}}function y(){r=i=null}function b(e){a.focus(),l(x)}function x(){var e=a.val();a.val(``),e&&n.paste(e)}return o.bind({keydown:h,keypress:g,keyup:_,focusout:y,cut:function(){u(function(){n.cut()})},copy:function(){u(function(){n.copy()})},paste:b}),{select:d}}}();yY.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),yY.open(function(e){e.focusBlurEvents=function(){var e=this,t=e.root,n=e.cursor,r;e.textarea.focus(function(){e.blurred=!1,clearTimeout(r),e.container.addClass(`mq-focused`),n.parent||n.insAtRightEnd(t),n.selection?(n.selection.jQ.removeClass(`mq-blur`),e.selectionChanged()):n.show()}).blur(function(){e.blurred=!0,r=setTimeout(function(){t.postOrder(`intentionalBlur`),n.clearSelection().endSelection(),a()}),ZJ(window).bind(`blur`,i)});function i(){clearTimeout(r),n.selection&&n.selection.jQ.addClass(`mq-blur`),a()}function a(){n.hide().parent.blur(),e.container.removeClass(`mq-focused`),ZJ(window).unbind(`blur`,i)}e.blurred=!0,n.hide().parent.blur()}}),yY.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),fY.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(Y);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(X,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(Y,e,t);return;case`End`:n.notify(`move`).cursor.insAtRightEnd(r.parent);break;case`Ctrl-End`:n.notify(`move`).cursor.insAtRightEnd(n.root);break;case`Shift-End`:for(;r[X];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[X]||r.parent!==n.root;)n.selectRight();break;case`Home`:n.notify(`move`).cursor.insAtLeftEnd(r.parent);break;case`Ctrl-Home`:n.notify(`move`).cursor.insAtLeftEnd(n.root);break;case`Shift-Home`:for(;r[Y];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[Y]||r.parent!==n.root;)n.selectLeft();break;case`Left`:n.moveLeft();break;case`Shift-Left`:n.selectLeft();break;case`Ctrl-Left`:break;case`Right`:n.moveRight();break;case`Shift-Right`:n.selectRight();break;case`Ctrl-Right`:break;case`Up`:n.moveUp();break;case`Down`:n.moveDown();break;case`Shift-Up`:if(r[Y])for(;r[Y];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[X])for(;r[X];)n.selectRight();else n.selectRight();case`Ctrl-Up`:break;case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(X);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[Y];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){lY(`overridden or never called on this node`)}}),yY.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){uY(e);var r=this.cursor;if(r.parent!==this.root&&n.preventDefault(),r.parent!==this.root)return r.parent.moveOutOf(e,r),this.notify(`move`)},SY.leftRightIntoCmdGoes=function(e){if(e&&e!==`up`&&e!==`down`)throw`"up" or "down" required for leftRightIntoCmdGoes option, got "`+e+`"`;return e},e.moveDir=function(e){uY(e);var t=this.cursor,n=t.options.leftRightIntoCmdGoes;return t.selection?t.insDirOf(e,t.selection.ends[e]):t[e]?t[e].moveTowards(e,t,n):t.parent.moveOutOf(e,t,n),this.notify(`move`)},e.moveLeft=function(){return this.moveDir(Y)},e.moveRight=function(){return this.moveDir(X)},e.moveUp=function(){return t(this,`up`)},e.moveDown=function(){return t(this,`down`)};function t(e,t){var n=e.notify(`upDown`).cursor,r=t+`Into`,i=t+`OutOf`;return n[X][r]?n.insAtLeftEnd(n[X][r]):n[Y][r]?n.insAtRightEnd(n[Y][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof fY&&n.jumpUpDown(e,t),t!==!0))return!1}),e}this.onNotify(function(e){e!==`upDown`&&(this.upDownCache={})}),this.onNotify(function(e){e===`edit`&&this.show().deleteSelection()}),e.deleteDir=function(e){uY(e);var t=this.cursor,n=t.selection;return this.notify(`edit`),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){uY(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===Y?mY(t.parent.ends[Y],t[Y]).remove():mY(t[X],t.parent.ends[X]).remove(),t.insAtDirEnd(e,t.parent),t[Y].siblingDeleted&&t[Y].siblingDeleted(t.options,X),t[X].siblingDeleted&&t[X].siblingDeleted(t.options,Y),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(Y)},e.deleteForward=function(){return this.deleteDir(X)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t=this.notify(`select`).cursor,n=t.selection;uY(e),t.anticursor||t.startSelection();var r=t[e];r?n&&n.ends[e]===r&&t.anticursor[-e]!==r?r.unselectInto(e,t):r.selectTowards(e,t):t.parent.selectOutOf(e,t),t.clearSelection(),t.select()||t.show()},e.selectLeft=function(){return this.selectDir(Y)},e.selectRight=function(){return this.selectDir(X)}});var PY=/[\\]{2,}/gm,FY=(function(){function e(e){var t=zY();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||zY(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[X],0);return t}var n=MY.string,r=MY.regex,i=MY.letter,a=MY.any,o=MY.optWhitespace,s=MY.succeed,c=MY.fail,l=i.map(function(e){return JY(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return gY[e]&&gY[e]().parser()||c(`unknown compound command: `+e)}),f=r(/^[^\\a-eg-zA-Z]/).or(n(`\\`).then(r(/^begin\{.?matrix\}/).or(r(/^[a-z]+/i)).or(r(/^\s+/).result(` `)).or(a))).then(function(e){e=e.replace(/^begin\{(.?matrix)\}$/,`$1`);var t=Z[e];return t?t(e).parser():c(`unknown command: \\`+e)}),p=d.or(f).or(l).or(u),m=n(`{`).then(function(){return g}).skip(n(`}`)),h=o.then(m.or(p.map(e))),g=h.many().map(t).skip(o),_=n(`[`).then(h.then(function(e){return e.join(`latex`)===`]`?c():s(e)}).many().map(t).skip(o)).skip(n(`]`)),v=g;return v.block=h,v.optBlock=_,v})();yY.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return FY.parse(e).postOrder(`finalizeTree`,xY.p).join(`latex`).trim()},SY.maxDepth=function(e){return typeof e==`number`?e:$J},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=MY.all,r=MY.eof,i=FY.skip(r).or(n.result(!1)).parse(e);return i&&!i.isEmpty()&&i.prepareInsertionAt(t)&&(i.children().adopt(t.parent,t[Y],t[X]),i.jQize().insertBefore(t.jQ),t[Y]=i.ends[X],i.finalizeInsert(t.options,t),i.ends[X][X].siblingCreated&&i.ends[X][X].siblingCreated(t.options,Y),i.ends[Y][Y].siblingCreated&&i.ends[Y][Y].siblingCreated(t.options,X),t.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){e&&e.replace&&(e=e.replace(PY,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=MY.all,a=MY.eof,o=FY.skip(a).or(i.result(!1)).parse(e);if(t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,o&&o.prepareInsertionAt(n)){o.children().adopt(t,0,0);var s=o.join(`html`);r.html(s),t.jQize(r.children()),t.finalizeInsert(n.options)}else r.empty();delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t=this.root,n=this.cursor;t.jQ.children().slice(1).remove(),t.eachChild(`postOrder`,`dispose`),t.ends[Y]=t.ends[X]=0,delete n.selection,n.show().insAtRightEnd(t);var r=MY.regex,i=MY.string,a=MY.eof,o=MY.all,s=i(`$`).then(FY).skip(i(`$`).or(a)).map(function(e){var t=WY(n);t.createBlocks();var r=t.ends[Y];return e.children().adopt(r,0,0),t}),c=i(`\\$`).result(`$`).or(r(/^[^$]/)).map(Q),l=s.or(c).many().skip(a).or(o.result(!1)).parse(e);if(l){for(var u=0;u<l.length;u+=1)l[u].adopt(t,t.ends[X],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}}),yY.open(function(e){xY.p.ignoreNextMousedown=iY,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(t){var n=ZJ(t.target).closest(`.mq-root-block`),r=fY.byId[n.attr(tY)||e.attr(tY)].controller,i=r.cursor;i.blink;var a=r.textareaSpan,o=r.textarea;if(t.preventDefault(),t.target.unselectable=!0,i.options.ignoreNextMousedown(t))return;i.options.ignoreNextMousedown=iY;function s(e){i.anticursor||i.startSelection(),r.seek(ZJ(e.target),e.pageX,e.pageY).cursor.select(),e.target&&ZJ(e.target.ownerDocument).unbind(`mousemove`,c)}function c(e){return delete e.target,s(e)}function l(e){!i.selection&&!r.editable&&a.detach(),n.unbind(`mousemove`,s),ZJ(e.target.ownerDocument).unbind(`mousemove`,c).unbind(`mouseup`,l)}if(a.parent().length===0)return!1;r.blurred&&(r.editable||n.prepend(a),document.body.focus(),o.focus()),t.preventDefault(),t.target.unselectable=!0,i.show(),r.seek(ZJ(t.target),t.pageX,t.pageY).cursor.startSelection(),n.mousemove(s),ZJ(t.target.ownerDocument).mousemove(c).mouseup(l)})}}),yY.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(tY)||e.attr(eY);if(!i){var a=e.parent();i=a.attr(tY)||a.attr(eY)}}var o=i&&fY.byId[i]?fY.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),yY.open(function(e){e.scrollHoriz=function(){var e=this.cursor,t=e.selection,n=this.root.jQ[0].getBoundingClientRect();if(t){var r=t.jQ[0].getBoundingClientRect(),i=r.left-(n.left+20),a=r.right-(n.right-20);if(t.ends[Y]===e[X])if(i<0)var o=i;else if(a>0)if(r.left-a<n.left+20)var o=i;else var o=a;else return;else if(a>0)var o=a;else if(i<0)if(r.right-i>n.right-20)var o=a;else var o=i;else return}else{var s=e.jQ[0].getBoundingClientRect().left;if(s>n.right-20)var o=s-(n.right-20);else if(s<n.left+20)var o=s-(n.left+20);else return}this.root.jQ.stop&&typeof this.root.jQ.stop==`function`&&this.root.jQ.stop().animate({scrollLeft:`+=`+o},100)}}),yY.open(function(e){xY.p.substituteTextarea=function(){return ZJ(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e=this.textareaSpan=ZJ(`<span class="mq-textarea"></span>`),t=this.options.substituteTextarea();if(!t.nodeType)throw`substituteTextarea() must return a DOM element, got `+t;t=this.textarea=ZJ(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;cX(e.container[0]),e.textareaSelectionTimeout===$J&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=$J;var e=``;this.cursor.selection&&(e=this.cursor.selection.join(`latex`),this.options.statelessClipboard&&(e=`$`+e+`$`)),this.selectFn(e)},e.staticMathTextareaEvents=function(){var e=this;e.root;var t=e.cursor,n=e.textarea,r=e.textareaSpan;this.container.prepend(QJ(`<span class="mq-selectable">`).text(`$`+e.exportLatex()+`$`)),e.blurred=!0,n.bind(`cut paste`,!1).bind(`copy`,function(){e.setTextareaSelection()}).focus(function(){e.blurred=!1}).blur(function(){t.selection&&t.selection.clear(),setTimeout(i)});function i(){r.detach(),e.blurred=!0}e.selectFn=function(e){n.val(e),e&&n.select()}},xY.p.substituteKeyboardEvents=NY,e.editablesTextareaEvents=function(){var e=this,t=e.textarea,n=e.textareaSpan,r=this.options.substituteKeyboardEvents(t,this);this.selectFn=function(e){r.select(e)},this.container.prepend(n),this.focusBlurEvents()},e.typedText=function(e){if(e===`
|
|
329
329
|
`)return this.handle(`enter`);var t=this.notify().cursor;t.parent.write(t,e),this.scrollHoriz()},e.cut=function(){var e=this,t=e.cursor;t.selection&&setTimeout(function(){e.notify(`edit`),t.parent.bubble(`reflow`)})},e.copy=function(){this.setTextareaSelection()},e.paste=function(e){this.options.statelessClipboard&&(e=e.slice(0,1)===`$`&&e.slice(-1)===`$`?e.slice(1,-1):`\\text{`+e+`}`),this.writeLatex(e).cursor.show()}});var IY=J(fY,function(e,t){e.finalizeInsert=function(e,t){var n=this;n.postOrder(`finalizeTree`,e),n.postOrder(`contactWeld`,t),n.postOrder(`blur`),n.postOrder(`reflow`),n[X].siblingCreated&&n[X].siblingCreated(e,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e,X),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t=e.options.maxDepth;if(t!==$J){var n=e.depth();if(n>t)return!1;this.removeNodesDeeperThan(t-n)}return!0},e.removeNodesDeeperThan=function(e){for(var t=0,n=[[this,t]],r;n.length;)r=n.shift(),r[0].children().each(function(i){var a=+(i instanceof zY);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),LY=J(IY,function(e,t){e.init=function(e,n,r){var i=this;t.init.call(i),i.ctrlSeq||=e,n&&(i.htmlTemplate=n),r&&(i.textTemplate=r)},e.replaces=function(e){e.disown(),this.replacedFragment=e},e.isEmpty=function(){return this.foldChildren(!0,function(e,t){return e&&t.isEmpty()})},e.parser=function(){var e=FY.block,t=this;return e.times(t.numBlocks()).map(function(e){t.blocks=e;for(var n=0;n<e.length;n+=1)e[n].adopt(t,t.ends[X],0);return t})},e.createLeftOf=function(e){var n=this,r=n.replacedFragment;n.createBlocks(),t.createLeftOf.call(n,e),r&&(r.adopt(n.ends[Y],0,0),r.jQ.appendTo(n.ends[Y].jQ),n.placeCursor(e),n.prepareInsertionAt(e)),n.finalizeInsert(e.options),n.placeCursor(e)},e.createBlocks=function(){for(var e=this,t=e.numBlocks(),n=e.blocks=Array(t),r=0;r<t;r+=1)(n[r]=zY()).adopt(e,e.ends[X],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[Y],function(e,t){return e.isEmpty()?e:t}))},e.moveTowards=function(e,t,n){var r=n&&this[n+`Into`];t.insAtDirEnd(-e,r||this.ends[-e])},e.deleteTowards=function(e,t){this.isEmpty()?t[e]=this.remove()[e]:this.moveTowards(e,t,null)},e.selectTowards=function(e,t){t[-e]=this,t[e]=this[e]},e.selectChildren=function(){return vY(this,this)},e.unselectInto=function(e,t){t.insAtDirEnd(-e,t.anticursor.ancestors[this.id])},e.seek=function(e,t){function n(e){var t={};return t[Y]=e.jQ.offset().left,t[X]=t[Y]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[Y])return t.insLeftOf(r);if(e>i[X])return t.insRightOf(r);var a=i[Y];r.eachChild(function(o){var s=n(o);if(e<s[Y])return e-a<s[Y]-e?o[Y]?t.insAtRightEnd(o[Y]):t.insLeftOf(r):t.insAtLeftEnd(o),!1;if(e>s[X])o[X]?a=s[X]:i[X]-e<e-s[X]?t.insRightOf(r):t.insAtRightEnd(o);else return o.seek(e,t),!1})},e.numBlocks=function(){var e=this.htmlTemplate.match(/&\d+/g);return e?e.length:0},e.html=function(){var e=this,t=e.blocks,n=` mathquill-command-id=`+e.id,r=e.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);lY(`no unmatched angle brackets`,r.join(``)===this.htmlTemplate);for(var i=0,a=r[0];a;i+=1,a=r[i])if(a.slice(-2)===`/>`)r[i]=a.slice(0,-2)+n+`/>`;else if(a.charAt(0)===`<`){lY(`not an unmatched top-level close tag`,a.charAt(1)!==`/`),r[i]=a.slice(0,-1)+n+`>`;var o=1;do i+=1,a=r[i],lY(`no missing close tags`,a),a.slice(0,2)===`</`?--o:a.charAt(0)===`<`&&a.slice(-2)!==`/>`&&(o+=1);while(o>0)}return r.join(``).replace(/>&(\d+)/g,function(e,n){return` mathquill-block-id=`+t[n].id+`>`+t[n].join(`html`)})},e.latex=function(){return this.foldChildren(this.ctrlSeq,function(e,t){return e+`{`+(t.latex()||` `)+`}`})},e.textTemplate=[``],e.text=function(){var e=this,t=0;return e.foldChildren(e.textTemplate[t],function(n,r){t+=1;var i=r.text();return n&&e.textTemplate[t]===`(`&&i[0]===`(`&&i.slice(-1)===`)`?n+i.slice(1,-1)+e.textTemplate[t]:n+i+(e.textTemplate[t]||``)})}}),RY=J(LY,function(e,t){e.init=function(e,n,r){r||=e&&e.length>1?e.slice(1):e,t.init.call(this,e,n,[r])},e.parser=function(){return MY.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=iY,e.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},e.deleteTowards=function(e,t){t[e]=this.remove()[e]},e.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},e.latex=function(){return this.ctrlSeq},e.text=function(){return this.textTemplate},e.placeCursor=iY,e.isEmpty=function(){return!0}}),Q=J(RY,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=J(RY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),zY=J(IY,function(e,t){e.join=function(e){return this.foldChildren(``,function(t,n){return t+n[e]()})},e.html=function(){return this.join(`html`)},e.latex=function(){return this.join(`latex`)},e.text=function(){return this.ends[Y]===this.ends[X]&&this.ends[Y]!==0?this.ends[Y].text():this.join(`text`)},e.keystroke=function(e,n,r){if(r.options.spaceBehavesLikeTab&&(e===`Spacebar`||e===`Shift-Spacebar`)){n.preventDefault(),r.escapeDir(e===`Shift-Spacebar`?Y:X,e,n);return}return t.keystroke.apply(this,arguments)},e.moveOutOf=function(e,t,n){!(n&&this.parent[n+`Into`])&&this[e]?t.insAtDirEnd(-e,this[e]):t.insDirOf(e,this.parent)},e.selectOutOf=function(e,t){t.insDirOf(e,this.parent)},e.deleteOutOf=function(e,t){t.unwrapGramp()},e.seek=function(e,t){var n=this.ends[X];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[Y].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[Y];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?JY(e):/^\d$/.test(e)?KY(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Z[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Z[`×`](e):(n=hY[e]||Z[e])?n(e):Q(e)},e.write=function(e,t){var n;if(e.tooDeep())return!1;n=this.chToCmd(t,e.options),e.selection&&n.replaces(e.replaceSelection()),e.isTooDeep()||n.createLeftOf(e.show())},e.focus=function(){return this.jQ.addClass(`mq-hasCursor`),this.jQ.removeClass(`mq-empty`),this},e.blur=function(){return this.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.jQ.addClass(`mq-empty`),this}});xY.p.mouseEvents=!0,bY.StaticMath=function(e){return J(e.AbstractMathQuill,function(t,n){this.RootBlock=zY,t.__mathquillify=function(e,t){return this.config(e),n.__mathquillify.call(this,`mq-math-mode`),this.__options.mouseEvents&&(this.__controller.delegateMouseEvents(),this.__controller.staticMathTextareaEvents()),this},t.init=function(){n.init.apply(this,arguments),this.__controller.root.postOrder(`registerInnerField`,this.innerFields=[],e.MathField)},t.latex=function(){var t=n.latex.apply(this,arguments);return arguments.length>0&&this.__controller.root.postOrder(`registerInnerField`,this.innerFields=[],e.MathField),t}})};var BY=J(zY,jY);bY.MathField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=BY,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=iY),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var VY=J(fY,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof mY?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[Y]&&this.ends[Y].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n=this;if(t.createLeftOf.call(this,e),n[X].siblingCreated&&n[X].siblingCreated(e.options,Y),n[Y].siblingCreated&&n[Y].siblingCreated(e.options,X),n.bubble(`reflow`),e.insAtRightEnd(n),n.replacedText)for(var r=0;r<n.replacedText.length;r+=1)n.write(e,n.replacedText.charAt(r))},e.parser=function(){var e=this,t=MY.string,n=MY.regex;return MY.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?mY():(HY(t).adopt(e,0,0),e)})},e.textContents=function(){return this.foldChildren(``,function(e,t){return e+t.text})},e.text=function(){return`"`+this.textContents()+`"`},e.latex=function(){var e=this.textContents();return e.length===0?``:`\\text{`+e.replace(/\\/g,`\\backslash `).replace(/[{}]/g,`\\$&`)+`}`},e.html=function(){return`<span class="mq-text-mode" mathquill-command-id=`+this.id+`>`+this.textContents()+`</span>`},e.moveTowards=function(e,t){t.insAtDirEnd(-e,this)},e.moveOutOf=function(e,t){t.insDirOf(e,this)},e.unselectInto=e.moveTowards,e.selectTowards=LY.prototype.selectTowards,e.deleteTowards=LY.prototype.deleteTowards,e.selectOutOf=function(e,t){t.insDirOf(e,this)},e.deleteOutOf=function(e,t){this.isEmpty()&&t.insRightOf(this)},e.write=function(e,n){if(e.show().deleteSelection(),n!==`$`)e[Y]?(e[Y].appendText(n),this.bubble(`reflow`)):HY(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),Q(`\\$`,`$`).createLeftOf(e);else if(!e[X])e.insRightOf(this);else if(!e[Y])e.insLeftOf(this);else{var r=VY(),i=this.ends[Y];i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)}},e.seek=function(e,t){t.hide();var r=n(this),i=this.jQ.width()/this.text.length,a=Math.round((e-this.jQ.offset().left)/i);a<=0?t.insAtLeftEnd(this):a>=r.text.length?t.insAtRightEnd(this):t.insLeftOf(r.splitRight(a));for(var o=e-t.show().offset().left,s=o&&o<0?Y:X,c=s;t[s]&&o*c>0;)t[s].moveTowards(s,t),c=o,o=e-t.offset().left;if(s*o<-s*c&&t[-s].moveTowards(-s,t),!t.anticursor)this.anticursorPosition=t[Y]&&t[Y].text.length;else if(t.anticursor.parent===this){var l=t[Y]&&t[Y].text.length;if(this.anticursorPosition===l)t.anticursor=dY.copy(t);else{if(this.anticursorPosition<l){var u=t[Y].splitRight(this.anticursorPosition);t[Y]=u}else var u=t[X].splitRight(this.anticursorPosition-l);t.anticursor=dY(this,u[Y],u)}}},e.blur=function(e){zY.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[Y]===this?e[Y]=this[Y]:e[X]===this&&(e[X]=this[X])):n(this))};function n(e){e.jQ[0].normalize();var t=e.jQ.contents().filter(function(e,t){return t.nodeType===3})[0];t||={data:``},lY(`only node in TextBlock span is Text node`,t.nodeType===3);var n=HY(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=zY.prototype.focus}),HY=J(fY,function(e,t){e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=ZJ(e)},e.jQize=function(){return this.jQadd(document.createTextNode(this.text))},e.appendText=function(e){this.text+=e,this.dom.appendData(e)},e.prependText=function(e){this.text=e+this.text,this.dom.insertData(0,e)},e.insTextAtDirEnd=function(e,t){uY(t),t===X?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=HY(this.text.slice(e)).adopt(this.parent,this,this[X]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t};function n(e,t){return t.charAt(e===Y?0:-1+t.length)}e.moveTowards=function(e,t){uY(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):HY(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===X?(this.dom.deleteData(0,1),this.text=this.text.slice(1)):(this.dom.deleteData(-1+this.text.length,1),this.text=this.text.slice(0,-1)):(this.remove(),this.jQ.remove(),t[e]=this[e])},e.selectTowards=function(e,t){uY(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=HY(i).createDir(e,t);r[e]=a,t.insDirOf(e,a)}else{var o=this[-e];if(o)o.insTextAtDirEnd(i,e);else{var a=HY(i).createDir(-e,t);a.jQ.insDirOf(-e,t.selection.jQ)}this.text.length===1&&r[-e]===this&&(r[-e]=this[-e])}return this.deleteTowards(e,t)}});Z.text=Z.textnormal=Z.textrm=Z.textup=Z.textmd=VY;function UY(e,t,n){return J(VY,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Z.em=Z.italic=Z.italics=Z.emph=Z.textit=Z.textsl=UY(`\\textit`,`i`,`class="mq-text-mode"`),Z.strong=Z.bold=Z.textbf=UY(`\\textbf`,`b`,`class="mq-text-mode"`),Z.sf=Z.textsf=UY(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Z.tt=Z.texttt=UY(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Z.textsc=UY(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Z.uppercase=UY(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Z.lowercase=UY(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var WY=J(LY,function(e,t){e.init=function(e){t.init.call(this,`$`),this.cursor=e},e.htmlTemplate=`<span class="mq-math-mode">&0</span>`,e.createBlocks=function(){t.createBlocks.call(this),this.ends[Y].cursor=this.cursor,this.ends[Y].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),Q(`\\$`,`$`).createLeftOf(e.show())):e[X]?e[Y]?zY.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):zY.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[Y].latex()+`$`}}),GY=J(BY,function(e,t){e.keystroke=function(e){if(!(e===`Spacebar`||e===`Shift-Spacebar`))return t.keystroke.apply(this,arguments)},e.write=function(e,t){if(e.show().deleteSelection(),t===`$`)WY(e).createLeftOf(e);else{var n;t===`<`?n=`<`:t===`>`&&(n=`>`),Q(t,n).createLeftOf(e)}}});bY.TextField=function(e){return J(e.EditableField,function(e,t){this.RootBlock=GY,e.__mathquillify=function(){return t.__mathquillify.call(this,`mq-editable-field mq-text-mode`)},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexText(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()}})},hY[`\\`]=J(LY,function(e,t){e.ctrlSeq=`\\`,e.replaces=function(e){this._replacedFragment=e.disown(),this.isEmpty=function(){return!1}},e.htmlTemplate=`<span class="mq-latex-command-input mq-non-leaf">\\<span>&0</span></span>`,e.textTemplate=[`\\`],e.createBlocks=function(){t.createBlocks.call(this),this.ends[Y].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[Y].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[Y].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?Q(t).createLeftOf(e):(this.parent.renderCommand(e),(t!==`\\`||!this.isEmpty())&&e.parent.write(e,t))},this.ends[Y].keystroke=function(e,n,r){if(e===`Tab`||e===`Enter`||e===`Spacebar`){this.parent.renderCommand(r.cursor),n.preventDefault();return}return t.keystroke.apply(this,arguments)}},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this._replacedFragment){var n=this.jQ[0];this.jQ=this._replacedFragment.jQ.addClass(`mq-blur`).bind(`mousedown mousemove`,function(e){return ZJ(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[Y].latex()+` `},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[X]?e.insLeftOf(this[X]):e.insAtRightEnd(this.parent);var t=this.ends[Y].latex();t||=` `;var n=Z[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=VY(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Z[`∉`]=Z.notin=q($,`\\notin `,`∉`),Z[`≅`]=Z.cong=q($,`\\cong `,`≅`),Z[`≡`]=Z.equiv=q($,`\\equiv `,`≡`),Z[`⊕`]=Z.oplus=q($,`\\oplus `,`⊕`),Z[`⊗`]=Z.otimes=q($,`\\otimes `,`⊗`),Z[`≠`]=Z.ne=Z.neq=q($,`\\ne `,`≠`),Z[`≇`]=Z.ncong=q($,`\\ncong `,`≇`),Z[`∗`]=Z.ast=Z.star=Z.loast=Z.lowast=q($,`\\ast `,`∗`),Z.therefor=Z.therefore=q($,`\\therefore `,`∴`),Z.cuz=Z.because=q($,`\\because `,`∵`),Z.prop=Z.propto=q($,`\\propto `,`∝`),Z[`≈`]=Z.asymp=Z.approx=q($,`\\approx `,`≈`),Z[`≉`]=Z.nasymp=Z.napprox=q($,`\\napprox `,`≉`),Z.isin=Z.in=q($,`\\in `,`∈`),Z.ni=Z.contains=q($,`\\ni `,`∋`),Z.notni=Z.niton=Z.notcontains=Z.doesnotcontain=gY[`\\not\\ni`]=q($,`\\not\\ni `,`∌`),Z.sub=Z.subset=q($,`\\subset `,`⊂`),Z.sup=Z.supset=Z.superset=q($,`\\supset `,`⊃`),Z.nsub=Z.notsub=Z.nsubset=Z.notsubset=gY[`\\not\\subset`]=q($,`\\not\\subset `,`⊄`),Z.nsup=Z.notsup=Z.nsupset=Z.notsupset=Z.nsuperset=Z.notsuperset=gY[`\\not\\supset`]=q($,`\\not\\supset `,`⊅`),Z.sube=Z.subeq=Z.subsete=Z.subseteq=q($,`\\subseteq `,`⊆`),Z.supe=Z.supeq=Z.supsete=Z.supseteq=Z.supersete=Z.superseteq=q($,`\\supseteq `,`⊇`),Z.nsube=Z.nsubeq=Z.notsube=Z.notsubeq=Z.nsubsete=Z.nsubseteq=Z.notsubsete=Z.notsubseteq=gY[`\\not\\subseteq`]=q($,`\\not\\subseteq `,`⊈`),Z.nsupe=Z.nsupeq=Z.notsupe=Z.notsupeq=Z.nsupsete=Z.nsupseteq=Z.notsupsete=Z.notsupseteq=Z.nsupersete=Z.nsuperseteq=Z.notsupersete=Z.notsuperseteq=gY[`\\not\\supseteq`]=q($,`\\not\\supseteq `,`⊉`),Z.N=Z.naturals=Z.Naturals=q(Q,`\\mathbb{N}`,`ℕ`),Z.P=Z.primes=Z.Primes=Z.projective=Z.Projective=Z.probability=Z.Probability=q(Q,`\\mathbb{P}`,`ℙ`),Z.Z=Z.integers=Z.Integers=q(Q,`\\mathbb{Z}`,`ℤ`),Z.Q=Z.rationals=Z.Rationals=q(Q,`\\mathbb{Q}`,`ℚ`),Z.R=Z.reals=Z.Reals=q(Q,`\\mathbb{R}`,`ℝ`),Z.C=Z.complex=Z.Complex=Z.complexes=Z.Complexes=Z.complexplane=Z.Complexplane=Z.ComplexPlane=q(Q,`\\mathbb{C}`,`ℂ`),Z.H=Z.Hamiltonian=Z.quaternions=Z.Quaternions=q(Q,`\\mathbb{H}`,`ℍ`),Z.quad=Z.emsp=q(Q,`\\quad `,` `),Z.qquad=q(Q,`\\qquad `,` `),Z.diamond=q(Q,`\\diamond `,`◇`),Z.bigtriangleup=q(Q,`\\bigtriangleup `,`△`),Z.ominus=q(Q,`\\ominus `,`⊖`),Z.uplus=q(Q,`\\uplus `,`⊎`),Z.bigtriangledown=q(Q,`\\bigtriangledown `,`▽`),Z.sqcap=q(Q,`\\sqcap `,`⊓`),Z.triangleleft=q(Q,`\\triangleleft `,`⊲`),Z.sqcup=q(Q,`\\sqcup `,`⊔`),Z.triangleright=q(Q,`\\triangleright `,`⊳`),Z.odot=Z.circledot=q(Q,`\\odot `,`⊙`),Z.bigcirc=q(Q,`\\bigcirc `,`◯`),Z.dagger=q(Q,`\\dagger `,`†`),Z.ddagger=q(Q,`\\ddagger `,`‡`),Z.wr=q(Q,`\\wr `,`≀`),Z.amalg=q(Q,`\\amalg `,`∐`),Z.models=q(Q,`\\models `,`⊨`),Z.prec=q(Q,`\\prec `,`≺`),Z.succ=q(Q,`\\succ `,`≻`),Z.preceq=q(Q,`\\preceq `,`≼`),Z.succeq=q(Q,`\\succeq `,`≽`),Z.simeq=q(Q,`\\simeq `,`≃`),Z.mid=q(Q,`\\mid `,`∣`),Z.ll=q(Q,`\\ll `,`≪`),Z.gg=q(Q,`\\gg `,`≫`),Z.parallel=q(Q,`\\parallel `,`∥`),Z.nparallel=q(Q,`\\nparallel `,`∦`),Z.bowtie=q(Q,`\\bowtie `,`⋈`),Z.sqsubset=q(Q,`\\sqsubset `,`⊏`),Z.sqsupset=q(Q,`\\sqsupset `,`⊐`),Z.smile=q(Q,`\\smile `,`⌣`),Z.sqsubseteq=q(Q,`\\sqsubseteq `,`⊑`),Z.sqsupseteq=q(Q,`\\sqsupseteq `,`⊒`),Z.doteq=q(Q,`\\doteq `,`≐`),Z.frown=q(Q,`\\frown `,`⌢`),Z.vdash=q(Q,`\\vdash `,`⊦`),Z.dashv=q(Q,`\\dashv `,`⊣`),Z.nless=q(Q,`\\nless `,`≮`),Z.ngtr=q(Q,`\\ngtr `,`≯`),Z.longleftarrow=q(Q,`\\longleftarrow `,`←`),Z.longrightarrow=q(Q,`\\longrightarrow `,`→`),Z.Longleftarrow=q(Q,`\\Longleftarrow `,`⇐`),Z.Longrightarrow=q(Q,`\\Longrightarrow `,`⇒`),Z.longleftrightarrow=q(Q,`\\longleftrightarrow `,`↔`),Z.updownarrow=q(Q,`\\updownarrow `,`↕`),Z.Longleftrightarrow=q(Q,`\\Longleftrightarrow `,`⇔`),Z.Updownarrow=q(Q,`\\Updownarrow `,`⇕`),Z.mapsto=q(Q,`\\mapsto `,`↦`),Z.nearrow=q(Q,`\\nearrow `,`↗`),Z.hookleftarrow=q(Q,`\\hookleftarrow `,`↩`),Z.hookrightarrow=q(Q,`\\hookrightarrow `,`↪`),Z.searrow=q(Q,`\\searrow `,`↘`),Z.leftharpoonup=q(Q,`\\leftharpoonup `,`↼`),Z.rightharpoonup=q(Q,`\\rightharpoonup `,`⇀`),Z.swarrow=q(Q,`\\swarrow `,`↙`),Z.leftharpoondown=q(Q,`\\leftharpoondown `,`↽`),Z.rightharpoondown=q(Q,`\\rightharpoondown `,`⇁`),Z.nwarrow=q(Q,`\\nwarrow `,`↖`),Z.ldots=q(Q,`\\ldots `,`…`),Z.cdots=q(Q,`\\cdots `,`⋯`),Z.vdots=q(Q,`\\vdots `,`⋮`),Z.ddots=q(Q,`\\ddots `,`⋱`),Z.surd=q(Q,`\\surd `,`√`),Z.triangle=q(Q,`\\triangle `,`△`),Z.ell=q(Q,`\\ell `,`ℓ`),Z.top=q(Q,`\\top `,`⊤`),Z.flat=q(Q,`\\flat `,`♭`),Z.natural=q(Q,`\\natural `,`♮`),Z.sharp=q(Q,`\\sharp `,`♯`),Z.wp=q(Q,`\\wp `,`℘`),Z.bot=q(Q,`\\bot `,`⊥`),Z.clubsuit=q(Q,`\\clubsuit `,`♣`),Z.diamondsuit=q(Q,`\\diamondsuit `,`♢`),Z.heartsuit=q(Q,`\\heartsuit `,`♡`),Z.spadesuit=q(Q,`\\spadesuit `,`♠`),Z.circledot=q(Q,`\\circledot `,`⊙`),Z.middot=q(Q,`\\middot `,`·`),Z.dottedsquare=q(Q,`\\dottedsquare `,`⬚`),Z.square=q(Q,`\\square `,`⬜`),Z.rectangle=q(Q,`\\rectangle `,`▯`),Z.oint=q(Q,`\\oint `,`∮`),Z.bigcap=q(Q,`\\bigcap `,`∩`),Z.bigcup=q(Q,`\\bigcup `,`∪`),Z.bigsqcup=q(Q,`\\bigsqcup `,`⊔`),Z.bigvee=q(Q,`\\bigvee `,`∨`),Z.bigwedge=q(Q,`\\bigwedge `,`∧`),Z.bigodot=q(Q,`\\bigodot `,`⊙`),Z.bigotimes=q(Q,`\\bigotimes `,`⊗`),Z.bigoplus=q(Q,`\\bigoplus `,`⊕`),Z.biguplus=q(Q,`\\biguplus `,`⊎`),Z.lfloor=q(Q,`\\lfloor `,`⌊`),Z.rfloor=q(Q,`\\rfloor `,`⌋`),Z.lceil=q(Q,`\\lceil `,`⌈`),Z.rceil=q(Q,`\\rceil `,`⌉`),Z.opencurlybrace=Z.lbrace=q(Q,`\\lbrace `,`{`),Z.closecurlybrace=Z.rbrace=q(Q,`\\rbrace `,`}`),Z.lbrack=q(Q,`[`),Z.rbrack=q(Q,`]`),Z.mug=q(Q,`\\mug `,`µg`),Z.mus=q(Q,`\\mus `,`µs`),Z.mum=q(Q,`\\mum `,`µm`),Z.muL=q(Q,`\\muL `,`µL`),Z.slash=q(Q,`/`),Z.vert=q(Q,`|`),Z.perp=Z.perpendicular=q(Q,`\\perp `,`⊥`),Z.nabla=Z.del=q(Q,`\\nabla `,`∇`),Z.hbar=q(Q,`\\hbar `,`ℏ`),Z.AA=Z.Angstrom=Z.angstrom=q(Q,`\\text\\AA `,`Å`),Z.ring=Z.circ=Z.circle=q(Q,`\\circ `,`∘`),Z.bull=Z.bullet=q(Q,`\\bullet `,`•`),Z.setminus=Z.smallsetminus=q(Q,`\\setminus `,`∖`),Z.not=Z[`¬`]=Z.neg=q(Q,`\\neg `,`¬`),Z[`…`]=Z.dots=Z.ellip=Z.hellip=Z.ellipsis=Z.hellipsis=q(Q,`\\dots `,`…`),Z.converges=Z.darr=Z.dnarr=Z.dnarrow=Z.downarrow=q(Q,`\\downarrow `,`↓`),Z.dArr=Z.dnArr=Z.dnArrow=Z.Downarrow=q(Q,`\\Downarrow `,`⇓`),Z.diverges=Z.uarr=Z.uparrow=q(Q,`\\uparrow `,`↑`),Z.uArr=Z.Uparrow=q(Q,`\\Uparrow `,`⇑`),Z.to=q($,`\\to `,`→`),Z.rarr=Z.rightarrow=q(Q,`\\rightarrow `,`→`),Z.implies=q($,`\\Rightarrow `,`⇒`),Z.rArr=Z.Rightarrow=q(Q,`\\Rightarrow `,`⇒`),Z.gets=q($,`\\gets `,`←`),Z.larr=Z.leftarrow=q(Q,`\\leftarrow `,`←`),Z.impliedby=q($,`\\Leftarrow `,`⇐`),Z.lArr=Z.Leftarrow=q(Q,`\\Leftarrow `,`⇐`),Z.harr=Z.lrarr=Z.leftrightarrow=q(Q,`\\leftrightarrow `,`↔`),Z.iff=q($,`\\Leftrightarrow `,`⇔`),Z.hArr=Z.lrArr=Z.Leftrightarrow=q(Q,`\\Leftrightarrow `,`⇔`),Z.Re=Z.Real=Z.real=q(Q,`\\Re `,`ℜ`),Z.Im=Z.imag=Z.image=Z.imagin=Z.imaginary=Z.Imaginary=q(Q,`\\Im `,`ℑ`),Z.part=Z.partial=q(Q,`\\partial `,`∂`),Z.infty=Z.infin=Z.infinity=q(Q,`\\infty `,`∞`),Z.pounds=q(Q,`\\pounds `,`£`),Z.alef=Z.alefsym=Z.aleph=Z.alephsym=q(Q,`\\aleph `,`ℵ`),Z.xist=Z.xists=Z.exist=Z.exists=q(Q,`\\exists `,`∃`),Z.nexists=Z.nexist=q(Q,`\\nexists `,`∄`),Z.and=Z.land=Z.wedge=q($,`\\wedge `,`∧`),Z.or=Z.lor=Z.vee=q($,`\\vee `,`∨`),Z.o=Z.O=Z.empty=Z.emptyset=Z.oslash=Z.Oslash=Z.nothing=Z.varnothing=q($,`\\varnothing `,`∅`),Z.cup=Z.union=q($,`\\cup `,`∪`),Z.cap=Z.intersect=Z.intersection=q($,`\\cap `,`∩`),Z.deg=Z.degree=q(Q,`\\degree `,`°`),Z.ang=Z.angle=q(Q,`\\angle `,`∠`),Z.measuredangle=q(Q,`\\measuredangle `,`m∠`);var KY=J(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[Y]instanceof qY&&e[Y].isItalic!==!1||e[Y]instanceof SX&&e[Y][Y]instanceof qY&&e[Y][Y].isItalic!==!1)?(Z._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),qY=J(RY,function(e,t){e.init=function(e,n){t.init.call(this,e,`<var>`+(n||e)+`</var>`)},e.text=function(){var e=this.ctrlSeq;return this.isPartOfOperator?e[0]==`\\`?e=e.slice(1,e.length):e[e.length-1]==` `&&(e=e.slice(0,-1)):(this[Y]&&!(this[Y]instanceof qY)&&!(this[Y]instanceof $)&&this[Y].ctrlSeq!==`\\ `&&(e=`*`+e),this[X]&&!(this[X]instanceof $)&&!(this[X]instanceof SX)&&(e+=`*`)),e}});xY.p.autoCommands={_maxLength:0},SY.autoCommands=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`autocommand "`+a+`" not minimum length of 2`;if(Z[a]===QY)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=rY(r,a.length)}return n._maxLength=r,n};var JY=J(qY,function(e,t){e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments);var n=e.options.autoCommands,r=n._maxLength;if(r>0){for(var i=``,a=this,o=0;a instanceof JY&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[Y],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(var o=1,a=this;o<i.length;o+=1,a=a[Y]);return mY(a,this).remove(),e[Y]=a[Y],Z[i](i).createLeftOf(e)}i=i.slice(1)}}},e.italicize=function(e){return this.isItalic=e,this.isPartOfOperator=!e,this.jQ.toggleClass(`mq-operator-name`,!e),this},e.finalizeTree=e.siblingDeleted=e.siblingCreated=function(e,t){t!==Y&&this[X]instanceof JY||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(t._maxLength!==0){for(var r=this.letter,i=this[Y];i instanceof JY;i=i[Y])r=i.letter+r;for(var a=this[X];a instanceof JY;a=a[X])r+=a.letter;mY(i[X]||this.parent.ends[Y],a[Y]||this.parent.ends[X]).each(function(e){e.italicize(!0).jQ.removeClass(`mq-first mq-last mq-followed-by-supsub`),e.ctrlSeq=e.letter});outer:for(var o=0,s=i[X]||this.parent.ends[Y];o<r.length;o+=1,s=s[X])for(var c=nY(t._maxLength,r.length-o);c>0;--c){var l=r.slice(o,o+c);if(t.hasOwnProperty(l)){for(var u=0,d=s;u<c;u+=1,d=d[X]){d.italicize(!1);var f=d}var p=YY.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,ZY.hasOwnProperty(l)&&f[Y][Y][Y].jQ.addClass(`mq-last`),n(s[Y])||s.jQ.addClass(`mq-first`),!n(f[X]))if(f[X]instanceof SX){var m=f[X];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[X]instanceof jX))})()}else f.jQ.toggleClass(`mq-last`,!(f[X]instanceof jX));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof TX}}),YY={},XY=xY.p.autoOperatorNames={_maxLength:9},ZY={limsup:1,liminf:1,projlim:1,injlim:1};(function(){for(var e=`arg deg det dim exp gcd hom inf ker lg ln log max min sup limsup liminf injlim projlim Pr`.split(` `),t=0;t<e.length;t+=1)YY[e[t]]=XY[e[t]]=1;for(var n=`sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth`.split(` `),t=0;t<n.length;t+=1)YY[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)XY[r[t]]=XY[`arc`+r[t]]=XY[r[t]+`h`]=XY[`ar`+r[t]+`h`]=XY[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)XY[i[t]]=1})(),SY.autoOperatorNames=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw`"`+e+`" not a space-delimited list of only letters`;for(var t=e.split(` `),n={},r=0,i=0;i<t.length;i+=1){var a=t[i];if(a.length<2)throw`"`+a+`" not minimum length of 2`;n[a]=1,r=rY(r,a.length)}return n._maxLength=r,n};var QY=J(RY,function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){for(var t=this.ctrlSeq,n=0;n<t.length;n+=1)JY(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=zY(),n=0;n<e.length;n+=1)JY(e.charAt(n)).adopt(t,t.ends[X],0);return MY.succeed(t.children())}});for(var $Y in XY)XY.hasOwnProperty($Y)&&(Z[$Y]=QY);Z.operatorname=J(LY,function(e){e.createLeftOf=iY,e.numBlocks=function(){return 1},e.parser=function(){return FY.block.map(function(e){return e.children()})}}),Z.f=J(JY,function(e,t){e.init=function(){RY.p.init.call(this,this.letter=`f`,`<var class="mq-f">f</var>`)},e.italicize=function(e){return this.jQ.html(`f`).toggleClass(`mq-f`,e),t.italicize.apply(this,arguments)}}),Z[` `]=Z.space=q(Q,`\\ `,` `),Z[`'`]=Z.prime=q(Q,`'`,`′`),Z[`″`]=Z.dprime=q(Q,`″`,`″`),Z[`"`]=Z.doublePrime=q(Q,`"`,`″`),Z.backslash=q(Q,`\\backslash `,`\\`),hY[`\\`]||=Z.backslash,Z.$=q(Q,`\\$`,`$`);var eX=J(RY,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Z[`@`]=eX,Z[`&`]=q(eX,`\\&`,`&`),Z[`%`]=q(eX,`\\%`,`%`),Z.alpha=Z.beta=Z.gamma=Z.delta=Z.zeta=Z.eta=Z.theta=Z.iota=Z.kappa=Z.mu=Z.nu=Z.xi=Z.rho=Z.sigma=Z.tau=Z.chi=Z.psi=Z.omega=J(qY,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.phi=q(qY,`\\phi `,`ϕ`),Z.phiv=Z.varphi=q(qY,`\\varphi `,`φ`),Z.epsilon=q(qY,`\\epsilon `,`ϵ`),Z.epsiv=Z.varepsilon=q(qY,`\\varepsilon `,`ε`),Z.piv=Z.varpi=q(qY,`\\varpi `,`ϖ`),Z.sigmaf=Z.sigmav=Z.varsigma=q(qY,`\\varsigma `,`ς`),Z.thetav=Z.vartheta=Z.thetasym=q(qY,`\\vartheta `,`ϑ`),Z.upsilon=Z.upsi=q(qY,`\\upsilon `,`υ`),Z.gammad=Z.Gammad=Z.digamma=q(qY,`\\digamma `,`ϝ`),Z.kappav=Z.varkappa=q(qY,`\\varkappa `,`ϰ`),Z.rhov=Z.varrho=q(qY,`\\varrho `,`ϱ`),Z.pi=Z.π=q(eX,`\\pi `,`π`),Z.lambda=q(eX,`\\lambda `,`λ`),Z.Upsilon=Z.Upsi=Z.upsih=Z.Upsih=q(RY,`\\Upsilon `,`<var style="font-family: serif">ϒ</var>`),Z.Gamma=Z.Delta=Z.Theta=Z.Lambda=Z.Xi=Z.Pi=Z.Sigma=Z.Phi=Z.Psi=Z.Omega=J(Q,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Z.forall=Z[`∀`]=q(Q,`\\forall `,`∀`);var tX=J(LY,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=FY.parse(this.latex);t.children().adopt(e.parent,e[Y],e[X]),e[Y]=t.ends[X],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[X][X].siblingCreated&&t.ends[X][X].siblingCreated(e.options,Y),t.ends[Y][Y].siblingCreated&&t.ends[Y][Y].siblingCreated(e.options,X),e.parent.bubble(`reflow`)},e.parser=function(){var e=FY.parse(this.latex).children();return MY.succeed(e)}});Z[`¹`]=q(tX,`^1`),Z[`²`]=q(tX,`^2`),Z[`³`]=q(tX,`^3`),Z[`¼`]=q(tX,`\\frac14`),Z[`½`]=q(tX,`\\frac12`),Z[`¾`]=q(tX,`\\frac34`);var nX=J($,function(e){e.init=Q.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){if(e[Y]){if(e[Y]instanceof $||/^[,;:\(\[]$/.test(e[Y].ctrlSeq))return``}else if(e.parent&&e.parent.parent&&e.parent.parent.isStyleBlock())return n(e.parent.parent);else return``;return`mq-binary-operator`}if(t!==X)return this.jQ[0].className=n(this),this}});Z[`+`]=q(nX,`+`,`+`),Z[`–`]=Z[`-`]=q(nX,`-`,`−`),Z[`±`]=Z.pm=Z.plusmn=Z.plusminus=q(nX,`\\pm `,`±`),Z.mp=Z.mnplus=Z.minusplus=q(nX,`\\mp `,`∓`),hY[`*`]=Z.sdot=Z.cdot=q($,`\\cdot `,`·`,`*`);var rX=J($,function(e,t){e.init=function(e,n){this.data=e,this.strict=n;var r=n?`Strict`:``;t.init.call(this,e[`ctrlSeq`+r],e[`html`+r],e[`text`+r])},e.swap=function(e){this.strict=e;var t=e?`Strict`:``;this.ctrlSeq=this.data[`ctrlSeq`+t],this.jQ.html(this.data[`html`+t]),this.textTemplate=[this.data[`text`+t]]},e.deleteTowards=function(e,n){if(e===Y&&!this.strict){this.swap(!0),this.bubble(`reflow`);return}t.deleteTowards.apply(this,arguments)}}),iX={ctrlSeq:`\\le `,html:`≤`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`<`,textStrict:`<`},aX={ctrlSeq:`\\ge `,html:`≥`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`>`,textStrict:`>`};Z[`<`]=Z.lt=q(rX,iX,!0),Z[`>`]=Z.gt=q(rX,aX,!0),Z[`≤`]=Z.le=Z.leq=q(rX,iX,!1),Z[`≥`]=Z.ge=Z.geq=q(rX,aX,!1);var oX=J($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[Y]instanceof rX&&e[Y].strict){e[Y].swap(!1),e[Y].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Z[`=`]=oX,Z[`×`]=Z.times=q($,`\\times `,`×`,`[x]`),Z[`÷`]=Z.div=Z.divide=Z.divides=q($,`\\div `,`÷`,`[/]`),hY[`~`]=Z.sim=q($,`\\sim `,`~`,`~`),hY[`≁`]=Z.nsim=q($,`\\nsim `,`≁`,`≁`),Z.complement=Z[`∁`]=q(Q,`\\complement `,`∁`),Z.nexists=Z[`∄`]=q(Q,`\\nexists `,`∄`),Z.sphericalangle=Z[`∢`]=q(Q,`\\sphericalangle `,`∢`),Z.iint=Z[`∬`]=q(Q,`\\iint `,`∬`),Z.iiint=Z[`∭`]=q(Q,`\\iiint `,`∭`),Z.oiint=Z[`∯`]=q(Q,`\\oiint `,`∯`),Z.oiiint=Z[`∰`]=q(Q,`\\oiiint `,`∰`),Z.backsim=Z[`∽`]=q(Q,`\\backsim `,`∽`),Z.backsimeq=Z[`⋍`]=q(Q,`\\backsimeq `,`⋍`),Z.eqsim=Z[`≂`]=q(Q,`\\eqsim `,`≂`),Z.ncong=Z[`≇`]=q(Q,`\\ncong `,`≇`),Z.approxeq=Z[`≊`]=q(Q,`\\approxeq `,`≊`),Z.bumpeq=Z[`≏`]=q(Q,`\\bumpeq `,`≏`),Z.Bumpeq=Z[`≎`]=q(Q,`\\Bumpeq `,`≎`),Z.doteqdot=Z[`≑`]=q(Q,`\\doteqdot `,`≑`),Z.fallingdotseq=Z[`≒`]=q(Q,`\\fallingdotseq `,`≒`),Z.risingdotseq=Z[`≓`]=q(Q,`\\risingdotseq `,`≓`),Z.eqcirc=Z[`≖`]=q(Q,`\\eqcirc `,`≖`),Z.circeq=Z[`≗`]=q(Q,`\\circeq `,`≗`),Z.triangleq=Z[`≜`]=q(Q,`\\triangleq `,`≜`),Z.leqq=Z[`≦`]=q(Q,`\\leqq `,`≦`),Z.geqq=Z[`≧`]=q(Q,`\\geqq `,`≧`),Z.lneqq=Z[`≨`]=q(Q,`\\lneqq `,`≨`),Z.gneqq=Z[`≩`]=q(Q,`\\gneqq `,`≩`),Z.between=Z[`≬`]=q(Q,`\\between `,`≬`),Z.nleq=Z[`≰`]=q(Q,`\\nleq `,`≰`),Z.ngeq=Z[`≱`]=q(Q,`\\ngeq `,`≱`),Z.lesssim=Z[`≲`]=q(Q,`\\lesssim `,`≲`),Z.gtrsim=Z[`≳`]=q(Q,`\\gtrsim `,`≳`),Z.lessgtr=Z[`≶`]=q(Q,`\\lessgtr `,`≶`),Z.gtrless=Z[`≷`]=q(Q,`\\gtrless `,`≷`),Z.preccurlyeq=Z[`≼`]=q(Q,`\\preccurlyeq `,`≼`),Z.succcurlyeq=Z[`≽`]=q(Q,`\\succcurlyeq `,`≽`),Z.precsim=Z[`≾`]=q(Q,`\\precsim `,`≾`),Z.succsim=Z[`≿`]=q(Q,`\\succsim `,`≿`),Z.nprec=Z[`⊀`]=q(Q,`\\nprec `,`⊀`),Z.nsucc=Z[`⊁`]=q(Q,`\\nsucc `,`⊁`),Z.subsetneq=Z[`⊊`]=q(Q,`\\subsetneq `,`⊊`),Z.supsetneq=Z[`⊋`]=q(Q,`\\supsetneq `,`⊋`),Z.vDash=Z[`⊨`]=q(Q,`\\vDash `,`⊨`),Z.Vdash=Z[`⊩`]=q(Q,`\\Vdash `,`⊩`),Z.Vvdash=Z[`⊪`]=q(Q,`\\Vvdash `,`⊪`),Z.VDash=Z[`⊫`]=q(Q,`\\VDash `,`⊫`),Z.nvdash=Z[`⊬`]=q(Q,`\\nvdash `,`⊬`),Z.nvDash=Z[`⊭`]=q(Q,`\\nvDash `,`⊭`),Z.nVdash=Z[`⊮`]=q(Q,`\\nVdash `,`⊮`),Z.nVDash=Z[`⊯`]=q(Q,`\\nVDash `,`⊯`),Z.vartriangleleft=Z[`⊲`]=q(Q,`\\vartriangleleft `,`⊲`),Z.vartriangleright=Z[`⊳`]=q(Q,`\\vartriangleright `,`⊳`),Z.trianglelefteq=Z[`⊴`]=q(Q,`\\trianglelefteq `,`⊴`),Z.trianglerighteq=Z[`⊵`]=q(Q,`\\trianglerighteq `,`⊵`),Z.multimap=Z[`⊸`]=q(Q,`\\multimap `,`⊸`),Z.Subset=Z[`⋐`]=q(Q,`\\Subset `,`⋐`),Z.Supset=Z[`⋑`]=q(Q,`\\Supset `,`⋑`),Z.Cap=Z[`⋒`]=q(Q,`\\Cap `,`⋒`),Z.Cup=Z[`⋓`]=q(Q,`\\Cup `,`⋓`),Z.pitchfork=Z[`⋔`]=q(Q,`\\pitchfork `,`⋔`),Z.lessdot=Z[`⋖`]=q(Q,`\\lessdot `,`⋖`),Z.gtrdot=Z[`⋗`]=q(Q,`\\gtrdot `,`⋗`),Z.lll=Z[`⋘`]=q(Q,`\\lll `,`⋘`),Z.ggg=Z[`⋙`]=q(Q,`\\ggg `,`⋙`),Z.lesseqgtr=Z[`⋚`]=q(Q,`\\lesseqgtr `,`⋚`),Z.gtreqless=Z[`⋛`]=q(Q,`\\gtreqless `,`⋛`),Z.curlyeqprec=Z[`⋞`]=q(Q,`\\curlyeqprec `,`⋞`),Z.curlyeqsucc=Z[`⋟`]=q(Q,`\\curlyeqsucc `,`⋟`),Z.nsim=Z[`≁`]=q(Q,`\\nsim `,`≁`),Z.lnsim=Z[`⋦`]=q(Q,`\\lnsim `,`⋦`),Z.gnsim=Z[`⋧`]=q(Q,`\\gnsim `,`⋧`),Z.precnsim=Z[`⋨`]=q(Q,`\\precnsim `,`⋨`),Z.succnsim=Z[`⋩`]=q(Q,`\\succnsim `,`⋩`),Z.ntriangleleft=Z[`⋪`]=q(Q,`\\ntriangleleft `,`⋪`),Z.ntriangleright=Z[`⋫`]=q(Q,`\\ntriangleright `,`⋫`),Z.ntrianglelefteq=Z[`⋬`]=q(Q,`\\ntrianglelefteq `,`⋬`),Z.ntrianglerighteq=Z[`⋭`]=q(Q,`\\ntrianglerighteq `,`⋭`),Z.blacksquare=Z[`∎`]=q(Q,`\\blacksquare `,`∎`),Z.colon=Z[`∶`]=q(Q,`\\colon `,`∶`),Z.llcorner=Z[`∟`]=q(Q,`\\llcorner `,`∟`),Z.dotplus=Z[`∔`]=q($,`\\dotplus `,`∔`),Z.nmid=Z[`∤`]=q($,`
|
|
330
|
-
mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`⊻`]=q($,`\\veebar `,`⊻`),Z.barwedge=Z[`⊼`]=q($,`\\barwedge `,`⊼`),Z.ltimes=Z[`⋉`]=q($,`\\ltimes `,`⋉`),Z.rtimes=Z[`⋊`]=q($,`\\rtimes `,`⋊`),Z.leftthreetimes=Z[`⋋`]=q($,`\\leftthreetimes `,`⋋`),Z.rightthreetimes=Z[`⋌`]=q($,`\\rightthreetimes `,`⋌`),Z.curlyvee=Z[`⋎`]=q($,`\\curlyvee `,`⋎`),Z.curlywedge=Z[`⋏`]=q($,`\\curlywedge `,`⋏`),Z.circledcirc=Z[`⊚`]=q($,`\\circledcirc `,`⊚`),Z.circledast=Z[`⊛`]=q($,`\\circledast `,`⊛`),Z.circleddash=Z[`⊝`]=q($,`\\circleddash `,`⊝`),Z.boxplus=Z[`⊞`]=q($,`\\boxplus `,`⊞`),Z.boxminus=Z[`⊟`]=q($,`\\boxminus `,`⊟`),Z.boxtimes=Z[`⊠`]=q($,`\\boxtimes `,`⊠`),Z.boxdot=Z[`⊡`]=q($,`\\boxdot `,`⊡`),Z[`∂`]=Z.partial,Z[`∃`]=Z.exists,Z[`∅`]=Z.varnothing,Z[`∆`]=Z.triangle,Z[`∇`]=Z.nabla,Z[`∈`]=Z.in,Z[`∊`]=Z.in,Z[`∋`]=Z.ni,Z[`∌`]=Z.notni,Z[`∍`]=Z.ni,Z[`∐`]=Z.amalg,Z[`−`]=Z[`-`],Z[`∓`]=Z.mp,Z[`∖`]=Z.setminus,Z[`∘`]=Z.circ,Z[`∙`]=Z.bullet,Z[`∝`]=Z.propto,Z[`∞`]=Z.infty,Z[`∠`]=Z.angle,Z[`∡`]=Z.measuredangle,Z[`∣`]=Z.divides,Z[`∥`]=Z.parallel,Z[`∦`]=Z.nparallel,Z[`∧`]=Z.wedge,Z[`∨`]=Z.vee,Z[`∩`]=Z.cap,Z[`∪`]=Z.cup,Z[`∮`]=Z.oint,Z[`∴`]=Z.therefore,Z[`∵`]=Z.because,Z[`∼`]=Z.sim,Z[`≀`]=Z.wr,Z[`≃`]=Z.simeq,Z[`≍`]=Z.asymp,Z[`≐`]=Z.doteq,Z[`≪`]=Z.ll,Z[`≫`]=Z.gg,Z[`≺`]=Z.prec,Z[`≻`]=Z.succ,Z[`⊂`]=Z.subset,Z[`⊃`]=Z.supset,Z[`⊆`]=Z.subseteq,Z[`⊇`]=Z.supseteq,Z[`⊈`]=Z.nsubseteq,Z[`⊉`]=Z.nsupseteq,Z[`⊏`]=Z.sqsubset,Z[`⊐`]=Z.sqsupset,Z[`⊓`]=Z.sqcap,Z[`⊔`]=Z.sqcup,Z[`⊖`]=Z.ominus,Z[`⊘`]=Z.oslash,Z[`⊙`]=Z.odot,Z[`⊢`]=Z.vdash,Z[`⊣`]=Z.dashv,Z[`⊤`]=Z.top,Z[`⊥`]=Z.bot,Z[`⊧`]=Z.models,Z[`⋀`]=Z.wedge,Z[`⋁`]=Z.vee,Z[`⋂`]=Z.cap,Z[`⋃`]=Z.cup,Z[`⋄`]=Z.diamond,Z[`⋅`]=Z.cdot,Z[`⋆`]=Z.star,Z[`⋈`]=Z.bowtie,Z[`⋮`]=Z.vdots,Z[`⋯`]=Z.cdots,Z[`⋱`]=Z.ddots;var sX,cX=iY,lX=document.createElement(`div`).style,uX={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},dX;for(var fX in uX)if(fX in lX){dX=fX;break}dX?sX=function(e,t,n){e.css(dX,`scale(`+t+`,`+n+`)`)}:`filter`in lX?(cX=function(e){e.className=e.className},sX=function(e,t,n){t/=1+(n-1)/2,e.css(`fontSize`,n+`em`),e.hasClass(`mq-matrixed-container`)||e.addClass(`mq-matrixed-container`).wrapInner(`<span class="mq-matrixed"></span>`);var r=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`);function i(){e.css(`marginRight`,(r.width()-1)*(t-1)/t+`px`)}i();var a=setInterval(i);ZJ(window).load(function(){clearTimeout(a),i()})}):sX=function(e,t,n){e.css(`fontSize`,n+`em`)};var pX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),mX=J(LY,function(e,t){e.init=function(e,n,r){this.args=arguments,this.htmlTemplate=`<`+n+` `+r+`><`+n+` class="mq-xarrow-over">&0</`+n+`><`+n+` class="mq-xarrow-under"></`+n+`></`+n+`>`,t.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`(`,`)`]},e.parser=function(){var e=this;return FY.optBlock.then(function(t){return FY.block.map(function(n){var r=hX.apply(null,e.args);return r.blocks=[t,n],t.adopt(r,0,0),n.adopt(r,t,0),r})}).or(t.parser.call(this))}}),hX=J(mX,function(e,t){e.init=function(e,t,n){this.htmlTemplate=`<`+t+` `+n+`><`+t+` class="mq-xarrow-over">&1</`+t+`><`+t+` class="mq-xarrow-under">&0</`+t+`></`+t+`>`,LY.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),gX=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return J(LY,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`<span class="mq-empty-box">&0</span></`+i+`></`+i+`>`)}})},_X=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`><span class="mq-longdiv-curve-border">)</span><span class="mq-longdiv-inner"><span class="mq-empty">&0</span></`+n+`></span>`)}}),vX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-row"><p>`+r+`</p><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td><td class="mq-empty"></td><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),yX=J(LY,function(e,t){e.init=function(e){t.init.call(this,e,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),bX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-col"><p>`+r+`</p></span><span class="matrix-edit-content-col"><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),xX=function(e,t){return J(RY,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Z.mathrm=q(pX,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Z.mathit=q(pX,`\\mathit`,`i`,`class="mq-font"`),Z.mathbf=q(pX,`\\mathbf`,`b`,`class="mq-font"`),Z.mathsf=q(pX,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Z.mathtt=q(pX,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Z.underline=q(pX,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Z.overline=Z.bar=q(gX(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Z.longdiv=q(_X,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Z.overrightarrow=q(gX(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Z.overleftarrow=q(gX(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Z.xleftarrow=q(mX,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Z.xrightarrow=q(mX,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Z.overleftrightarrow=q(pX,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Z.overarc=q(pX,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Z.dot=J(LY,function(e,t){e.init=function(){t.init.call(this,`\\dot`,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),Z.addmatrixrow=q(vX,`\\addmatrixrow`,`span`,`+`),Z.addmatrixcol=q(bX,`\\addmatrixcol`,`span`,`+`),Z.ngtr=Z[`≯`]=q(xX(`mq-ngtr`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Z.nless=Z[`≮`]=q(xX(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Z.dot=q(yX,`\\dot`),Z.parallelogram=q(xX(`mq-parallelogram`,`▱`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Z.textcolor=J(LY,function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate=`<span class="mq-textcolor" style="color:`+e+`">&0</span>`},e.latex=function(){return`\\textcolor{`+this.color+`}{`+this.blocks[0].latex()+`}`},e.parser=function(){var e=this,n=MY.optWhitespace,r=MY.string,i=MY.regex;return n.then(r(`{`)).then(i(/^[#\w\s.,()%-]*/)).skip(r(`}`)).then(function(n){return e.setColor(n),t.parser.call(e)})},e.isStyleBlock=function(){return!0}}),Z.class=J(LY,function(e,t){e.parser=function(){var e=this,n=MY.string,r=MY.regex;return MY.optWhitespace.then(n(`{`)).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n(`}`)).then(function(n){return e.cls=n||``,e.htmlTemplate=`<span class="mq-class `+n+`">&0</span>`,t.parser.call(e)})},e.latex=function(){return`\\class{`+this.cls+`}{`+this.blocks[0].latex()+`}`},e.isStyleBlock=function(){return!0}});var SX=J(LY,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[Y]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=Y;t;t=t===Y&&X)if(this[t]instanceof SX){for(var n=`sub`;n;n=n===`sub`&&`sup`){var r=this[n],i=this[t][n];if(r){if(!i)this[t].addBlock(r.disown());else if(r.isEmpty())var a=dY(i,0,i.ends[Y]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=dY(i,o.ends[X],i.ends[Y]);t===Y?o.adopt(i,i.ends[X],0):o.adopt(i,0,i.ends[Y])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[Y]===this&&(t===X&&a?a[Y]?e.insRightOf(a[Y]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},xY.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[Y].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if(t===`_`)return;var n=this.chToCmd(t,e.options);return n instanceof RY?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[Y]&&!e[X]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),zY.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof RY?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(Y,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+(n.length===1?n:`{`+(n||` `)+`}`):``}return e(`_`,this.sub)+e(`^`,this.sup)},e.addBlock=function(e){this.supsub===`sub`?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=ZJ(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(tY,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=ZJ(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(tY,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">​</span>`));for(var t=0;t<2;t+=1)(function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+`Into`],e[n][r+`OutOf`]=CX,delete e[n].deleteOutOf,t===`sub`&&ZJ(e.jQ.addClass(`mq-sup-only`)[0].lastChild).remove(),this.remove()}})(this,`sub sup`.split(` `)[t],`sup sub`.split(` `)[t],`down up`.split(` `)[t])},e.reflow=function(){var e=this.jQ,t=e.prev();if(t.length){var n=e.children(`.mq-sup`);if(n.length){var r=parseInt(n.css(`font-size`)),i=n.offset().top+n.height()-t.offset().top-.7*r,a=parseInt(n.css(`margin-bottom`));n.css(`margin-bottom`,a+i)}}}});function CX(e){var t=this.parent,n=e;do{if(n[X])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Z.subscript=Z._=J(SX,function(e,t){e.supsub=`sub`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&0</span></span><span style="display:inline-block;width:0">​</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[Y],this.sub.upOutOf=CX,t.finalizeTree.call(this)}}),Z.superscript=Z.supscript=Z[`^`]=J(SX,function(e,t){e.supsub=`sup`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`^`],e.finalizeTree=function(){this.upInto=this.sup=this.ends[X],this.sup.downOutOf=CX,t.finalizeTree.call(this)}});var wX=J(LY,function(e,t){e.parser=function(){for(var e=MY.string,t=MY.optWhitespace,n=MY.succeed,r=FY.block,i=this,a=i.blocks=[zY(),zY()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[X],0);return t.then(e(`_`).or(e(`^`))).then(function(e){var t=a[e===`_`?0:1];return r.then(function(e){return e.children().adopt(t,t.ends[X],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[Y],this.upInto=this.ends[X],this.ends[Y].upOutOf=this.ends[X],this.ends[X].downOutOf=this.ends[Y]}}),TX=J(wX,function(e,t){e.init=function(e,t){var n=`<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>`+t+`</big><span class="mq-from"><span>&0</span></span></span>`;RY.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())+`^`+e(this.ends[X].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(JY(`n`).createLeftOf(e),oX().createLeftOf(e))}});Z[`∑`]=Z.sum=Z.summation=q(TX,`\\sum `,`∑`),Z[`∏`]=Z.prod=Z.product=q(TX,`\\prod `,`∏`),Z.coprod=Z.coproduct=q(TX,`\\coprod `,`∐`),Z[`∫`]=Z.int=Z.integral=J(TX,function(e,t){e.init=function(){RY.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>`)},e.createLeftOf=LY.p.createLeftOf}),Z.lim=Z.limit=J(wX,function(e,t){e.init=function(){RY.prototype.init.call(this,`\\lim `,`<span class="mq-lim mq-non-leaf"><span class="mq-un-italicized">lim</span><span class="mq-approaches"><span>&0</span></span></span>`)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())}});var EX=Z.over=hY[`/`]=J(Z.frac=Z.dfrac=Z.cfrac=Z.fraction=J(LY,function(e,t){e.ctrlSeq=`\\frac`,e.htmlTemplate=`<span class="mq-fraction mq-non-leaf"><span class="mq-numerator"><span class="mq-empty-box">&0</span></span><span class="mq-denominator"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">​</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[X].upOutOf=this.ends[Y],this.downInto=this.ends[Y].downOutOf=this.ends[X]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[Y];n&&!(n instanceof $||n instanceof(Z.text||iY)||n instanceof TX||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[Y];n instanceof TX&&n[X]instanceof SX&&(n=n[X],n[X]instanceof SX&&n[X].ctrlSeq!=n.ctrlSeq&&(n=n[X])),n!==e[Y]&&!e.isTooDeep(1)&&(this.replaces(mY(n[X]||e.parent.ends[Y],e[Y])),e[Y]=n)}t.createLeftOf.call(this,e)}});Z.underset=J(LY,function(e,t){e.ctrlSeq=`\\underset`,e.htmlTemplate=`<span class="mq-underset mq-overunder mq-non-leaf"><span class="mq-over">&1</span><span class="mq-under">&0</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),Z.overset=J(LY,function(e,t){e.ctrlSeq=`\\overset`,e.htmlTemplate=`<span class="mq-overset mq-overunder mq-non-leaf"><span class="mq-over">&0</span><span class="mq-under">&1</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[X].upOutOf=this.ends[Y],this.upInto=this.ends[Y].downOutOf=this.ends[X]}});var DX=Z.sqrt=Z[`√`]=J(LY,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</span><span class="mq-non-leaf mq-sqrt-stem"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt(`,`)`],e.parser=function(){return FY.optBlock.then(function(e){return FY.block.map(function(t){var n=OX();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[X].jQ.parent();sX(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Z.hat=J(LY,function(e,t){e.ctrlSeq=`\\hat`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>`,e.textTemplate=[`hat(`,`)`]});var OX=Z.nthroot=J(DX,function(e,t){e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">&0</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&1</span></span></span>`,e.textTemplate=[`sqrt[`,`](`,`)`],e.latex=function(){return`\\sqrt[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`}}),kX=J(LY,function(e,t){e.init=function(e,n,r){var i=`<span class="mq-non-leaf"><span class="mq-diacritic-above">`+n+`</span><span class="mq-diacritic-stem">&0</span></span>`;t.init.call(this,e,i,r)}});Z.vec=q(kX,`\\vec`,`→`,[`vec(`,`)`]),Z.tilde=q(kX,`\\tilde`,`~`,[`tilde(`,`)`]),Z.lrncuberoot=J(DX,function(e,t){e.ctrlSeq=`\\lrncuberoot`,e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">3</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt[3](`,`)`],e.latex=function(){return`\\sqrt[3]{`+this.ends[Y].latex()+`}`}}),Z.abs=J(LY,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Z.lrnplaceholder=J(LY,function(e,t){e.ctrlSeq=`\\lrnplaceholder`,e.htmlTemplate=`<span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[``],e.latex=function(){return this.ends[Y].latex()}}),Z.lrnexponent=J(LY,function(e,t){e.ctrSeq=`\\lrnexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&1</span></span></span></span>`,e.textTemplate=[``,`**`],e.latex=function(){var e=this.ends[X].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[Y].latex()+`^`+e}}),Z.lrnsquaredexponent=J(LY,function(e,t){e.ctrSeq=`\\lrnsquaredexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">2</span></span></span></span>`,e.textTemplate=[``,`**2`],e.latex=function(){return this.ends[Y].latex()+`^2`}}),Z.lrnsubscript=J(LY,function(e,t){e.ctrSeq=`\\lrnsubscript`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0"> </span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[Y].latex()+`_`+this.ends[X].latex()}});function AX(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(`:first`).add(this.jQ.children(`:last`)),this.contentjQ=this.jQ.children(`:eq(1)`)},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css(`fontSize`));sX(this.delimjQs,nY(1+.2*(e-1),1.2),1.2*e)}}var jX=J(J(LY,AX),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,$J,[n,r]),this.side=e,this.sides={},this.sides[Y]={ch:n,ctrlSeq:i},this.sides[X]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===X?` mq-ghost`:``)+`">`+this.sides[Y].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===Y?` mq-ghost`:``)+`">`+this.sides[X].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[Y].ctrlSeq+this.ends[Y].latex()+`\\right`+this.sides[X].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof jX&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||MX[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[Y].ch]===n.sides[X].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===Y?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if(this.sides[Y].ch===`|`)var r=this.matchBrack(n,X,e[X])||this.matchBrack(n,Y,e[Y])||this.matchBrack(n,0,e.parent.parent);else var r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&mY(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)}else r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(mY(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===Y?e.insAtLeftEnd(r.ends[Y]):e.insRightOf(r)},e.placeCursor=iY,e.unwrap=function(){this.ends[Y].children().disown().adopt(this.parent,this,this[X]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[Y].ends[this.side])){this.closeOpposing(this.ends[Y].ends[this.side]);var c=this.ends[Y].ends[e];this.unwrap(),c.siblingCreated&&c.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else if(t&&s){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}else this.sides[e]={ch:MX[this.sides[this.side].ch],ctrlSeq:MX[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===Y?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[Y].ends[e];mY(i,a,-e).disown().withDirAdopt(-e,this.ends[Y],c,0).jQ.insAtDirEnd(e,this.ends[Y].jQ.removeClass(`mq-empty`)),c.siblingCreated&&c.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[Y])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[Y].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===Y)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),MX={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function NX(e,t){var t=t||e,n=MX[e],r=MX[t];hY[e]=q(jX,Y,e,n,t,r),hY[n]=q(jX,X,e,n,t,r)}NX(`(`),NX(`[`),NX(`{`,`\\{`),Z.langle=q(jX,Y,`⟨`,`⟩`,`\\langle `,`\\rangle `),Z.rangle=q(jX,X,`⟨`,`⟩`,`\\langle `,`\\rangle `),hY[`|`]=q(jX,Y,`|`,`|`,`|`,`|`),Z.lVert=q(jX,Y,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.rVert=q(jX,X,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.left=J(LY,function(e){e.parser=function(){var e=MY.regex,t=MY.string;MY.succeed;var n=MY.optWhitespace;return n.then(e(/^(?:[([|]|\\\{|\\langle(?![a-zA-Z])|\\lVert(?![a-zA-Z]))/)).then(function(r){var i=r.charAt(0)===`\\`?r.slice(1):r;return r==`\\langle`&&(i=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,r+=` `),FY.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t=e.charAt(0)===`\\`?e.slice(1):e;e==`\\rangle`&&(t=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,e+=` `);var n=jX(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Z.right=J(LY,function(e){e.parser=function(){return MY.fail(`unmatched \\right`)}}),Z.choose=J(Z.binom=Z.binomial=J(J(LY,AX),function(e,t){e.ctrlSeq=`\\binom`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>`,e.textTemplate=[`choose(`,`,`,`)`]}),function(e){e.createLeftOf=EX.prototype.createLeftOf}),Z.editable=Z.MathQuillMathField=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillMathField`,e.htmlTemplate=`<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>`,e.parser=function(){var e=this,n=MY.string,r=MY.regex,i=MY.succeed;return n(`[`).then(r(/^[a-z][a-z0-9]*/i)).skip(n(`]`)).map(function(t){e.name=t}).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=yY(this.ends[Y],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),jY(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[Y].controller))},e.latex=function(){return this.ends[Y].latex()},e.text=function(){return this.ends[Y].text()}});var PX=Z.embed=J(RY,function(e,t){e.setOptions=function(e){function t(){return``}return this.text=e.text||t,this.htmlTemplate=e.htmlString||``,this.latex=e.latex||t,this},e.parser=function(){var e=this,t=MY.string,n=MY.regex,r=MY.succeed;return t(`{`).then(n(/^[a-z][a-z0-9]*/i)).skip(t(`}`)).then(function(i){return t(`[`).then(n(/^[-\w\s]*/)).skip(t(`]`)).or(r()).map(function(t){return e.setOptions(wY[i](t))})})}});Z.MathQuillResponseContainer=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainer`,e.htmlTemplate=`<span class="lrn-mq-response-container"><marker class="lrn-qe-keyboard-i-response"></marker><content>Response</content></span>`,e.latex=function(){return`\\MathQuillResponseContainer`},e.text=function(){return this.ends[Y].text()}}),Z.MathQuillResponseContainerIcon=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainerIcon`,e.htmlTemplate=`<span class="lrn-mq-response-container-icon"><span class="lrn-qe-keyboard-i-response"></span></span>`,e.latex=function(){return`\\MathQuillResponseContainerIcon`},e.text=function(){return this.ends[Y].text()}});var FX=Z.matrix=J(LY,function(e,t){var n=J(zY,function(e,t){e.init=function(e,n){return this.column=e,this.row=n,t.init.call(this)},e.keystroke=function(e,n,r){switch(e){case`Shift-Spacebar`:return n.preventDefault(),this.parent.insertColumn(this);case`Shift-Enter`:return this.parent.insertRow(this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,function(){return t.deleteOutOf.apply(r,i)})}}),r={column:`&`,row:`\\\\`};e.parentheses={left:null,right:null},e.maximum={rows:5,columns:5},e.defaults={rows:2,columns:2},e.ctrlSeq=`\\matrix`,e.createBlocks=function(){var e=this,t=e.blocks=[],r,i,a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=e.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;i=r===c?i+1:0,t[a]=n(i,c),t[a].adopt(e,e.ends[X],0),r=c,a++})},e.reflow=function(){var e=this.jQ.children(`table`),t=e.outerHeight()/+e.css(`fontSize`).slice(0,-2),n=this.jQ.children(`.mq-paren`);n.length&&sX(n,nY(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e=this.getMatrixName(),t=`\\begin{`+e+`}`,n,i,a;for(a=0;a<this.blocks.length;a++)n=this.blocks[a].row,i!==void 0&&(i===n?t+=r.column:t+=r.row),i=n,t+=this.blocks[a].latex();return t+=`\\end{`+e+`}`,t},e.createLeftOf=function(n){this.cursor=n;var r=Math.min(this.defaults.rows,this.maximum.rows),i=Math.min(this.defaults.columns,this.maximum.columns);this.defaultHtmlTemplate=this.defaultHtmlTemplate||this.generateHtmlTemplate(r,i),e.htmlTemplate=this.defaultHtmlTemplate,t.createLeftOf.call(this,n)},e.getMatrixName=function(){return this.ctrlSeq.replace(`\\`,``)},e.generateHtmlTemplate=function(e,t){var n=`<span class="mq-matrix mq-non-leaf">`+o(this.parentheses.left);n+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns);for(var r=0,i=0;i<e;i++){n+=`<tr>`;for(var a=0;a<t;a++)n+=`<td>&`+r+`</td>`,r++;n+=`</tr>`}return n+=`</table>`,n+=o(this.parentheses.right)+`</span>`,n;function o(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=MY.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i=e.replace(o,``),a=[],s=i.split(r.row),c=Math.min(s.length,t.maximum.rows),l=0,u,d;for(d=0;d<c;d++)u=s[d].split(r.column),l=Math.max(l,u.length);for(l=Math.min(l,t.maximum.columns),d=0;d<c;d++){u=s[d].split(r.column);for(var e=0;e<l;e++){var f=n(e,d);FY.parse(u[e]||` `).children().adopt(f,f.ends[X],0),a.push(f)}}t.htmlTemplate=t.generateHtmlTemplate(c,l),t.blocks=a;for(var d=0;d<a.length;d+=1)a[d].adopt(t,t.ends[X],0);return MY.succeed(t)})},e.finalizeTree=function(){var e=this.jQ.find(`table`);e.length&&(this.relink(),e.removeClass(function(e,t){var n=t.match(/mq-rows-\d+/g);return n&&n.join(` `)||``}),e.addClass(`mq-rows-`+e.find(`tr`).length))},e.relink=function(){var e=this.jQ.find(`td`),t=fY.byId[e.first().attr(tY)],n=fY.byId[e.last().attr(tY)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=fY.byId[ZJ(this).attr(tY)],a=e.eq(t+1),o=ZJ(this).closest(`tr`).next(`tr`),s=ZJ(this).closest(`tr`).index(),c=ZJ(this).index(),l;if(a.length){var u=fY.byId[a.attr(tY)];n[X]=u,u[Y]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=fY.byId[l.attr(tY)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[Y]=t,this.ends[X]=n,t&&t[Y]&&delete t[Y],n&&n[X]&&delete n[X],this.blocks=i},e.deleteCell=function(e){var t=e.jQ.closest(`tr`),n=e.jQ.index(),r=t.index(),i=t.find(`td`).not(e.jQ),a=this.jQ.find(`tr`).not(t).map(function(){return ZJ(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return fY.byId[ZJ(this).attr(tY)].isEmpty()}return i.filter(c).length===i.length&&a.length&&(i.remove(),e.jQ.remove(),t.remove(),this.finalizeTree()),a.filter(c).length===a.length&&i.length&&(a.remove(),e.jQ.remove(),this.finalizeTree()),o||(r=Math.min(r,this.jQ.find(`tr`).length-1),n=Math.min(n,this.jQ.find(`tr`).eq(r).find(`td`).length-1),s=fY.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(tY)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=ZJ(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=ZJ(`<td class="mq-empty">`).attr(tY,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns)){var t=e.index(),r=e.closest(`tr`).index(),i=this,a,o=[];return this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=ZJ(`<td class="mq-empty">`).attr(tY,a.id),a.jQ.insertAfter(ZJ(this).find(`td`).eq(t)),o.push(a)}),o[r]}},e.insertColumn=function(e){newBlock=this.addColumn(e.jQ),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.insertRow=function(e){newBlock=this.addRow(e.jQ.closest(`tr`)),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.backspace=function(e,t,n,r){if(e.isEmpty()){var i=this.deleteCell(e);i?n.insAtRightEnd(i):(r(),this.finalizeTree()),this.bubble(`edited`)}}});Z.pmatrix=J(FX,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Z.bmatrix=J(FX,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Z.Bmatrix=J(FX,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Z.vmatrix=J(FX,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Z.Vmatrix=J(FX,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var IX=kY(3);for(var LX in IX)(function(e,t){typeof t==`function`?(EY[e]=function(){return TY(),t.apply(this,arguments)},EY[e].prototype=t.prototype):EY[e]=t})(LX,IX[LX]);var RX=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},zX;typeof window<`u`&&(zX=EY.getInterface(3),zX&&zX.registerEmbed&&RX(zX));var BX=D(`math-input:mq:input`),VX=I(`span`)({}),HX=class extends N.Component{static propTypes={className:p.string,onClick:p.func,onChange:p.func,latex:p.string,onFocus:p.func,onBlur:p.func};componentDidMount(){if(!zX)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=zX.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex()}componentDidUpdate(){this.updateLatex()}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){BX(`blur mathfield`),this.mathField.blur()}focus(){BX(`focus mathfield...`),this.mathField.focus()}command(e){return BX(`command: `,e),Array.isArray(e)?e.forEach(e=>{this.mathField.cmd(e)}):this.mathField.cmd(e),this.mathField.focus(),this.mathField.latex()}keystroke(e){return this.mathField.keystroke(e),this.mathField.focus(),this.mathField.latex()}write(e){return BX(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{BX(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{if(Object.keys(this.mathField.__controller.options).indexOf(`ignoreNextMousedown`)<0&&this.refresh(),e.charCode===13){e.preventDefault();return}};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return BX(`next: `,e.latex),BX(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,P.jsx)(VX,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},UX=D(`pie-lib:math-input:mq:static`),WX=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,GX=/ /g;function KX(e=``){return e.replace(GX,``)}function qX(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var JX=class extends N.Component{static propTypes={latex:p.string.isRequired,onFocus:p.func,onBlur:p.func,className:p.string,getFieldName:p.func,onSubFieldChange:p.func,onSubFieldFocus:p.func,setInput:p.func};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=N.createRef()}componentDidMount(){this.update(),FJ(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),FJ()}componentWillUnmount(){this.removeLiveRegion(),this.removeEventListeners()}createLiveRegion=()=>{this.liveRegion=document.createElement(`div`),this.liveRegion.style.position=`absolute`,this.liveRegion.style.width=`1px`,this.liveRegion.style.height=`1px`,this.liveRegion.style.marginTop=`-1px`,this.liveRegion.style.clip=`rect(1px, 1px, 1px, 1px)`,this.liveRegion.style.overflow=`hidden`,this.liveRegion.setAttribute(`aria-live`,`polite`),this.liveRegion.setAttribute(`aria-atomic`,`true`),document.body.appendChild(this.liveRegion)};addEventListeners=()=>{let e=this.inputRef.current;e&&(e.addEventListener(`keydown`,this.handleKeyDown),e.addEventListener(`click`,this.handleMathKeyboardClick))};removeEventListeners=()=>{let e=this.inputRef.current;e&&(e.removeEventListener(`keydown`,this.handleKeyDown),e.removeEventListener(`click`,this.handleMathKeyboardClick))};removeLiveRegion=()=>{this.liveRegion&&=(document.body.removeChild(this.liveRegion),null)};handleKeyDown=e=>{(e?.key===`Backspace`||e?.key===`Delete`)&&this.setState({isDeleteKeyPressed:!0}),this.setState({inputSource:`keyboard`})};handleMathKeyboardClick=()=>{this.setState({inputSource:`mathKeyboard`})};onInputEdit=e=>{if(!this.mathField||this._isProgrammaticUpdate)return;let t=this.props.getFieldName(e,this.mathField.innerFields);if(this.props.onSubFieldChange){let n=e.latex().match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.inputRef?.current&&n&&n?.length)try{e.__controller.cursor.insLeftOf(e.__controller.cursor.parent[-1].parent),e.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}else this.props.onSubFieldChange(t,e.latex())}this.announceLatexConversion(e.latex())};announceLatexConversion=e=>{if(!this.state){console.error(`State is not initialized`);return}let{previousLatex:t,inputSource:n,isDeleteKeyPressed:r}=this.state,i=`Converted to math symbol`;if(n===`keyboard`&&!r)if(qX(e)>qX(t))this.announceMessage(i);else try{this.mathField.parseLatex(t),this.mathField.parseLatex(e),e==t&&this.announceMessage(i)}catch(e){console.warn(`Error parsing latex:`,e.message),console.warn(e)}(this.state.previousLatex!==e||this.state.isDeleteKeyPressed)&&this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!zX)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=zX.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this._isProgrammaticUpdate=!0,this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}finally{this._isProgrammaticUpdate=!1}};blur=()=>{UX(`blur mathfield`),this.mathField.blur()};focus=()=>{UX(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=KX(this.mathField.parseLatex(e.latex)),n=(e.latex.match(WX)||[]).length,r=t!==KX(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return UX(`[shouldComponentUpdate] `,r),r}catch(e){return console.warn(`Error parsing latex:`,e.message,`skip update`),console.warn(e),!1}}onFocus=e=>{try{let t=e.target.parentElement.nextSibling,n=parseInt(t.getAttribute(`mathquill-block-id`),10);n||=(t=t.parentElement,parseInt(t.getAttribute(`mathquill-block-id`),10));let r=this.mathField.innerFields.find(e=>e.id===n);if(r){let e=this.props.getFieldName(r,this.mathField.innerFields);this.props.setInput&&this.props.setInput(r),this.props.onSubFieldFocus(e,r)}}catch(e){console.error(`error finding root block`,e.message)}};render(){let{onBlur:e,className:t}=this.props;return(0,P.jsx)(`span`,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},YX={fontFamily:`MJXZERO, MJXTEX !important`,"-webkit-font-smoothing":`antialiased !important`,"& .mq-math-mode > span > var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode span var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode .mq-nonSymbola":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode > span > var.mq-operator-name":{fontFamily:`MJXZERO, MJXTEX !important`}},XX={"& .mq-longdiv-inner":{marginTop:`-1px`,marginLeft:`5px !important;`,"& > .mq-empty":{padding:`0 !important`,marginLeft:`0px !important`,marginTop:`2px`}},"& .mq-math-mode .mq-longdiv":{display:`inline-flex !important`}},ZX={"& .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`0.5em !important`,paddingRight:`0.15em`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-supsub ":{fontSize:`70.7%`},"& .mq-math-mode .mq-supsub.mq-sup-only":{verticalAlign:`-0.1em !important`,"& .mq-sup":{marginBottom:`0px !important`}},"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only":{verticalAlign:`0.4em !important`},"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group":{verticalAlign:`0.4em !important`}},QX={"& *":{...YX,...XX,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-longdiv-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-math-mode .mq-sqrt-stem":{marginTop:`-5px`,paddingTop:`4px`},"& .mq-math-mode .mq-paren":{verticalAlign:`middle !important`},"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ":{padding:`0 !important`}}},$X={commonMqFontStyles:YX,longdivStyles:XX,supsubStyles:ZX,commonMqKeyboardStyles:QX},eZ=e=>(T(5-e.length,()=>e.push([])),E.apply(null,e)),tZ=D(`pie-lib:math-inline:keypad`),nZ=I(JX)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:ZH(),"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${KU()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid black`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid black`,fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`,"&.mq-arrow-both":{top:`0px !important`,"& *":{lineHeight:`1 !important`,borderTop:`none !important`},"&:before":{fontSize:`80%`,left:`calc(-13%) !important`,top:`-0.31em !important`},"&:after":{fontSize:`80% !important`,right:`calc(-13%) !important`,top:`-1.5em`},"&.mq-empty:before":{fontSize:`80%`,left:`calc(-13%)`,top:`-0.26em`},"&.mq-empty:after":{fontSize:`80%`,right:`calc(-13%)`,top:`-0.26em`},"&.mq-empty":{minHeight:`1.4em`}},"&.mq-arrow-right:before":{fontSize:`80%`,right:`calc(-13%) !important`,top:`-0.26em !important`},"& .mq-overarrow-inner":{border:`none !important`},"& .mq-overarrow-inner .mq-overarrow-inner-right":{display:`none !important`}},"& .mq-root-block":{padding:`5px !important`},"& .mq-overarrow.mq-arrow-both.mq-empty:after":{right:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-right.mq-empty:before":{right:`-5px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-both.mq-empty:before":{left:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},"& .mq-overarc":{borderTop:`2px solid black !important`,"& .mq-overline":{borderTop:`none !important`},"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`}}};return e===`\\parallel`?{...t,fontStyle:`italic !important`}:e===`\\overleftrightarrow{\\overline{}}`?{...t,"& .mq-overarrow.mq-arrow-both":{"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`},"&:after":{position:`absolute !important`,top:`0px !important`}}}:t});nZ.propTypes={latex:p.string.isRequired};var rZ=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},iZ=I(`div`)(()=>({...QX,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridRowGap:`0px`,gridColumnGap:`0px`,gridAutoFlow:`column`,"&.character":{textTransform:`initial !important`,gridTemplateRows:`repeat(5, minmax(40px, 50px)) !important`},"&.language":{gridTemplateRows:`repeat(4, minmax(40px, 50px)) !important`,"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),aZ=I(WW)(({category:e,isDelete:t,isComma:n,isDot:r})=>({minWidth:`auto`,textTransform:`none`,fontSize:n||r?`200% !important`:`140% !important`,lineHeight:n||r?`100%`:`normal`,color:ZH(),backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()},borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),oZ=I(WW)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()}})),sZ=I(Dz)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()},borderRadius:0,"& .icon":{height:`30px`}})),cZ=class extends N.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,baseSet:p.array,additionalKeys:p.array,layoutForKeyPad:p.object,onPress:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,setKeypadInteraction:p.func,mode:p.oneOfType([p.string,p.number])};static defaultProps={baseSet:JJ,noDecimal:!1};constructor(e){super(e),this.keypadRef=N.createRef()}componentDidMount(){let e=this.keypadRef?.current,t=e?.closest(`.main-container`),n=e?.closest(`.pie-toolbar`);if(this.props.controlledKeypadMode&&t&&n){let e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.top+e.height-(r.top+r.height);if(i<0){let n=e.height+e.top-i;t&&(t.style.height=`${n}px`)}}e&&(e.addEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.addEventListener(`mousedown`,this.handleKeypadInteraction,!0))}componentWillUnmount(){let e=this.keypadRef?.current;if(this.props.controlledKeypadMode&&e){let t=e.closest(`.main-container`);t&&(t.style.height=`unset`)}e&&(e.removeEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.removeEventListener(`mousedown`,this.handleKeypadInteraction,!0))}handleKeypadInteraction=()=>{this.props.setKeypadInteraction&&this.props.setKeypadInteraction(!0)};buttonClick=e=>{tZ(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>y([...eZ(e),...eZ(t)]);keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return!!((e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t)};render(){let{className:e,baseSet:t,additionalKeys:n,layoutForKeyPad:r,onFocus:i,mode:a}=this.props,o=[`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(a),s=o?this.flowKeys([],n||[]):this.flowKeys(t,n||[]),c=s.length%5?1:0,l={gridTemplateColumns:`repeat(${Math.floor(s.length/5)+c}, minmax(min-content, 150px))`,...rZ(r)};return(0,P.jsx)(iZ,{ref:this.keypadRef,className:[e,a].filter(Boolean).join(` `),style:l,onFocus:i,children:s.map((e,t)=>{let n=this.buttonClick.bind(this,e);if(!e)return(0,P.jsx)(`span`,{},`empty-${t}`);let r={onClick:n,disabled:this.keyIsNotAllowed(e),key:`${e.label||e.latex||e.command}-${t}`,...e.actions||{},...e.extraProps||{}};if(e.latex)return(0,P.jsx)(oZ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(nZ,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(aZ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,isDelete:e.label===`⌫`,isComma:e.label===`,`,isDot:e.label===`.`,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:e.label},r.key);{let t=e.icon?e.icon:`div`;return(0,P.jsx)(sZ,{tabIndex:`-1`,onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,size:`large`,...e.actions||{},...e.extraProps||{},children:(0,P.jsx)(t,{className:`icon`})},r.key)}})})}},lZ=e=>{if(e.command)return{value:e.command,type:`command`};if(e.write)return{value:e.write};if(e.keystroke)return{type:`cursor`,value:e.keystroke}},uZ=class extends N.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,mode:p.oneOfType([p.string,p.number]),layoutForKeyPad:p.object,onClick:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,additionalKeys:p.array,setKeypadInteraction:p.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(lZ(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=PJ(a);return(0,P.jsx)(cZ,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:AK(MJ(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},dZ=I(`span`)(()=>({display:`inline-flex`,border:`1px solid ${TU()}`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),fZ=I(`div`)(()=>({background:yU(),color:ZH(),display:`inline-flex`,borderRight:`2px solid ${TU()}`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),pZ=I(`div`)(()=>({flex:8,color:`var(--pie-text, black)`,padding:`4px !important`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`var(--pie-background, rgba(255, 255, 255, 0))`,"& > .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-overarrow.mq-arrow-both":{marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`}})),mZ=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,P.jsx)(iS,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,P.jsxs)(dZ,{...i,children:[(0,P.jsx)(fZ,{children:s}),(0,P.jsx)(pZ,{children:(0,P.jsx)(JX,{latex:a})})]})})};mZ.propTypes={attributes:p.object,value:p.string,keyToDisplay:p.string};var hZ={},gZ=e=>String(e||``).replace(/-/g,`_`),_Z=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,vZ=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=_Z(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},yZ=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},bZ=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},xZ=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return H.near(n,1)},SZ=cb.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=gZ(this.options.type);return[new du({key:new mu(`response-area-watcher:${e}`),view:t=>(hZ[e]===void 0&&(hZ[e]=0,t.state.doc.descendants(t=>{if(t.type&&t.type.name===e){let n=_Z(t);if(n!=null){let t=parseInt(n,10);!Number.isNaN(t)&&t>hZ[e]&&(hZ[e]=t)}}return!0})),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=vZ(r.doc,e),a=vZ(n.doc,e);if(this.options.toolbar&&(this.options.toolbar.disabled=i.length>=this.options.maxResponseAreas),a.length>i.length){let e=new Set(i.map(e=>e.index)),t=a.filter(t=>!e.has(t.index));t.length&&typeof this.options.onHandleAreaChange==`function`&&this.options.onHandleAreaChange(t)}}})})]},addCommands(){return{insertResponseArea:e=>({tr:t,state:n,dispatch:r,commands:i})=>{let a=gZ(e);if(yZ(n.doc,a)>=this.options.maxResponseAreas)return!1;hZ[a]===void 0&&(hZ[a]=0);let o=hZ[a]+1;hZ[a]+=1;let s=bZ({schema:n.schema,typeName:a,index:o});if(!s)return!1;let{selection:c}=n,l=c.from,u=e=>{try{return t.insert(e,s),e}catch{return null}},d=u(l);if(d??=u(t.doc.content.size),d==null)return!1;if([`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(U.create(t.doc,d));else{let e=d+s.nodeSize;t.setSelection(xZ(t.doc,e))}return r&&(i.focus(),r(t)),!0},refreshResponseArea:()=>({tr:e,state:t,commands:n,dispatch:r})=>{let{selection:i}=t,a=i.$from.nodeAfter,o=i.from;return e.setNodeMarkup(o,void 0,{...a?.attrs,updated:`${Date.now()}`}),e.setSelection(U.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),CZ=Rb.create({name:`explicit_constructed_response`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="explicit_constructed_response"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`explicit_constructed_response`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,P.jsx)(Bz,{...e,options:this.options}))}}),wZ=Rb.create({name:`math_templated`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="math_templated"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`math_templated`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,P.jsx)(mZ,{...e,options:this.options}))}}),TZ=Rb.create({name:`drag_in_the_blank`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},id:{default:null},value:{default:``},inTable:{default:null},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="drag_in_the_blank"]`,getAttrs:e=>({index:e.dataset.index,id:e.dataset.id,value:e.dataset.value,inTable:e.dataset.inTable})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`drag_in_the_blank`,"data-index":e.index,"data-id":e.id,"data-value":e.value,"data-in-table":e.inTable}]},addNodeView(){return fS(e=>(0,P.jsx)(yK,{...e,options:this.options}))}}),EZ=Rb.create({name:`inline_dropdown`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="inline_dropdown"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`inline_dropdown`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,P.jsx)(bK,{...e,options:this.options}))}}),DZ=$r(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),OZ=$r(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),kZ=$r(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function AZ(e){return Qr(`MuiMenuItem`,e)}var jZ=$r(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function MZ(e){return Qr(`MuiNativeSelect`,e)}var NZ=$r(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),PZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`]},MZ,t)},FZ=I(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${NZ.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),IZ=I(FZ,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:Io,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${NZ.multiple}`]:t.multiple}]}})({}),LZ=I(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${NZ.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),RZ=I(LZ,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),zZ=N.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=PZ(l);return(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(IZ,{ownerState:l,className:k(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,P.jsx)(RZ,{as:a,ownerState:l,className:u.icon})]})});function BZ(e){return Qr(`MuiSelect`,e)}var VZ=$r(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function HZ(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function UZ(e){return e==null||typeof e==`string`&&!e.trim()}function WZ(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var GZ=N.createContext(null);function KZ(){return N.useContext(GZ)}var qZ=GZ.Provider,JZ,YZ=I(FZ,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${VZ.select}`]:t.select},{[`&.${VZ.select}`]:t[n.variant]},{[`&.${VZ.error}`]:t.error},{[`&.${VZ.multiple}`]:t.multiple}]}})({[`&.${VZ.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),XZ=I(LZ,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),ZZ=I(`input`,{shouldForwardProp:e=>Fo(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),QZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return A({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},BZ,t)},$Z=N.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:g={},multiple:_,name:v,onBlur:y,onChange:b,onClose:x,onFocus:S,onKeyDown:C,onMouseDown:w,onOpen:T,open:E,readOnly:D,renderValue:O,required:A,SelectDisplayProps:M={},tabIndex:ee,type:te,value:ne,variant:re=`standard`,...ie}=e,[ae,oe]=rR({controlled:ne,default:l,name:`Select`}),[se,ce]=rR({controlled:E,default:c,name:`Select`}),le=N.useRef(null),ue=N.useRef(null),[de,fe]=N.useState(null),{current:pe}=N.useRef(E!=null),[me,he]=N.useState(),[ge,_e]=N.useState(null),ve=sR(t,m),ye=N.useCallback(e=>{ue.current=e,e&&fe(e)},[]),be=de?.parentNode;N.useImperativeHandle(ve,()=>({focus:()=>{ue.current.focus()},node:le.current,value:ae}),[ae]);let xe=de!==null&&se;N.useEffect(()=>{if(!xe||!be||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{he(be.clientWidth)});return e.observe(be),()=>{e.disconnect()}},[xe,be,a]),N.useEffect(()=>{c&&se&&de&&!pe&&(he(a?null:be.clientWidth),ue.current.focus())},[de,a]),N.useEffect(()=>{i&&ue.current.focus()},[i]),N.useEffect(()=>{if(!h)return;let e=XL(ue.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&ue.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Se=(e,t)=>{e?(_e(HZ(t)),T&&T(t)):(_e(null),x&&x(t)),pe||(he(a?null:be.clientWidth),ce(e))},Ce=e=>{w?.(e),e.button===0&&(e.preventDefault(),ue.current.focus(),Se(!0,e))},we=e=>{Se(!1,e)},Te=N.Children.toArray(o),Ee=e=>{let t=Te.find(t=>t.props.value===e.target.value);t!==void 0&&(oe(t.props.value),b&&b(e,t))},De=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(_){n=Array.isArray(ae)?ae.slice():[];let t=ae.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),ae!==n&&(oe(n),b)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:v}}),b(i,e)}_||Se(!1,t)}},Oe=e=>{D||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),Se(!0,e)),C?.(e))},ke=e=>{!xe&&y&&(Object.defineProperty(e,"target",{writable:!0,value:{value:ae,name:v}}),y(e))};delete ie[`aria-invalid`];let Ae,je,Me=[],Ne=!1;(vG({value:ae})||d)&&(O?Ae=O(ae):Ne=!0);let Pe=Te.map(e=>{if(!N.isValidElement(e))return null;let t;if(_){if(!Array.isArray(ae))throw Error(j(2));t=ae.some(t=>WZ(t,e.props.value)),t&&Ne&&Me.push(e.props.children)}else t=WZ(ae,e.props.value),t&&Ne&&(je=e.props.children);return N.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:De(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Ne&&(Ae=_?Me.length===0?null:Me.reduce((e,t,n)=>(e.push(t),n<Me.length-1&&e.push(`, `),e),[]):je);let Fe=me;!a&&pe&&de&&(Fe=be.clientWidth);let Ie;Ie=ee===void 0?u?null:0:ee;let Le=M.id||(v?`mui-component-select-${v}`:void 0),Re={...e,variant:re,value:ae,open:xe,error:f},ze=QZ(Re),Be={...g.PaperProps,...typeof g.slotProps?.paper==`function`?g.slotProps.paper(Re):g.slotProps?.paper},Ve={...g.MenuListProps,...typeof g.slotProps?.list==`function`?g.slotProps.list(Re):g.slotProps?.list},He=qi();return(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(YZ,{as:`div`,ref:ye,tabIndex:Ie,role:`combobox`,"aria-controls":xe?He:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":xe?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Le].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:Oe,onMouseDown:u||D?null:Ce,onBlur:ke,onFocus:S,...M,ownerState:Re,className:k(M.className,ze.select,s),id:Le,children:UZ(Ae)?JZ||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):Ae}),(0,P.jsx)(ZZ,{"aria-invalid":f,value:Array.isArray(ae)?ae.join(`,`):ae,name:v,ref:le,"aria-hidden":!0,onChange:Ee,tabIndex:-1,disabled:u,className:ze.nativeInput,autoFocus:i,required:A,...ie,ownerState:Re}),(0,P.jsx)(XZ,{as:p,className:ze.icon,ownerState:Re}),(0,P.jsx)(qZ,{value:ge,children:(0,P.jsx)(oK,{id:`menu-${v||``}`,anchorEl:be,open:xe,onClose:we,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},...g,slotProps:{...g.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":_?`true`:void 0,disableListWrap:!0,id:He,...Ve},paper:{...Be,style:{minWidth:Fe,...Be==null?null:Be.style}}},children:Pe})})]})}),eQ=GL((0,P.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function tQ(e){return parseInt(e,10)||0}var nQ={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function rQ(e){for(let t in e)return!1;return!0}function iQ(e){return rQ(e)||e.outerHeightStyle===0&&!e.overflowing}var aQ=N.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=N.useRef(o!=null),l=N.useRef(null),u=oR(t,l),d=N.useRef(null),f=N.useRef(null),p=N.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=ZL(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
331
|
-
`&&(n.value+=` `);let o=a.boxSizing,s=tQ(a.paddingBottom)+tQ(a.paddingTop),c=tQ(a.borderBottomWidth)+tQ(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=iR(()=>{let e=l.current,t=p();if(!e||!t||iQ(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=
|
|
332
|
-
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,P.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...nQ.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function oQ(e){return Qr(`MuiInputBase`,e)}var sQ=$r(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),cQ,lQ=`mui-auto-fill`,uQ=`mui-auto-fill-cancel`,dQ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${L(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},fQ=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},pQ=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return A({root:[`root`,`color${L(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${L(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},oQ,t)},mQ=I(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:dQ})(zo(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${sQ.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),hQ=I(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:fQ})(zo(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${sQ.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${sQ.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:uQ,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:lQ}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),gQ=Lo({[`@keyframes ${lQ}`]:{from:{animationName:lQ}},[`@keyframes ${uQ}`]:{from:{animationName:uQ}}}),_Q=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:g,inputComponent:_=`input`,inputProps:v={},inputRef:y,margin:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onClick:D,onFocus:O,onKeyDown:A,onKeyUp:M,placeholder:ee,readOnly:te,renderSuffix:ne,rows:re,size:ie,slotProps:ae={},slots:oe={},startAdornment:se,type:ce=`text`,value:le,...ue}=n,de=v.value==null?le:v.value,{current:fe}=N.useRef(de!=null),pe=N.useRef(),me=N.useCallback(e=>{},[]),he=sR(pe,y,v.ref,me),[ge,_e]=N.useState(!1),ve=oG(),ye=iG({props:n,muiFormControl:ve,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});ye.focused=ve?ve.focused:ge,N.useEffect(()=>{!ve&&d&&ge&&(_e(!1),T&&T())},[ve,d,ge,T]);let be=ve&&ve.onFilled,xe=ve&&ve.onEmpty,Se=N.useCallback(e=>{vG(e)?be&&be():xe&&xe()},[be,xe]);eR(()=>{fe&&Se({value:de})},[de,Se,fe]),eR(()=>{if(!a)return;let e=pe.current;if(!e)return;let t=XL(e),n=QV(t),r=n==null||n===t.body||n===t.documentElement;e===n?ve&&ve.onFocus?ve.onFocus():_e(!0):r&&e.focus()},[a]);let Ce=e=>{O&&O(e),v.onFocus&&v.onFocus(e),ve&&ve.onFocus?ve.onFocus(e):_e(!0)},we=e=>{T&&T(e),v.onBlur&&v.onBlur(e),ve&&ve.onBlur?ve.onBlur(e):_e(!1)},Te=(e,...t)=>{if(!fe){let t=e.target||pe.current;if(t==null)throw Error(j(1));Se({value:t.value})}v.onChange&&v.onChange(e,...t),E&&E(e,...t)};N.useEffect(()=>{Se(pe.current)},[]);let Ee=e=>{pe.current&&e.currentTarget===e.target&&pe.current.focus(),D&&D(e)},De=_,Oe=v;C&&De===`input`&&(Oe=re?{type:void 0,minRows:re,maxRows:re,...Oe}:{type:void 0,maxRows:x,minRows:S,...Oe},De=aQ);let ke=e=>{Se(e.animationName===uQ?pe.current:{value:`x`})};N.useEffect(()=>{ve&&ve.setAdornedStart(!!se)},[ve,se]);let Ae={...n,color:ye.color||`primary`,disabled:ye.disabled,endAdornment:p,error:ye.error,focused:ye.focused,formControl:ve,fullWidth:h,hiddenLabel:ye.hiddenLabel,multiline:C,size:ye.size,startAdornment:se,type:ce},je=pQ(Ae),Me=oe.root||c.Root||mQ,Ne=ae.root||l.root||{},Pe=oe.input||c.Input||hQ;return Oe={...Oe,...ae.input??l.input},(0,P.jsxs)(N.Fragment,{children:[!f&&typeof gQ==`function`&&(cQ||=(0,P.jsx)(gQ,{})),(0,P.jsxs)(Me,{...Ne,ref:t,onClick:Ee,...ue,...!kV(Me)&&{ownerState:{...Ae,...Ne.ownerState}},className:k(je.root,Ne.className,o,te&&`MuiInputBase-readOnly`),children:[se,(0,P.jsx)(aG.Provider,{value:null,children:(0,P.jsx)(Pe,{"aria-invalid":ye.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:ye.disabled,id:g,onAnimationStart:ke,name:w,placeholder:ee,readOnly:te,required:ye.required,rows:re,value:de,onKeyDown:A,onKeyUp:M,type:ce,...Oe,...!kV(Pe)&&{as:De,ownerState:{...Ae,...Oe.ownerState}},ref:he,className:k(je.input,Oe.className,te&&`MuiInputBase-readOnly`),onBlur:we,onChange:Te,onFocus:Ce})}),p,ne?ne({...ye,startAdornment:se}):null]})]})});function vQ(e){return Qr(`MuiInput`,e)}var yQ={...sQ,...$r(`MuiInput`,[`root`,`underline`,`input`])},bQ=e=>{let{classes:t,disableUnderline:n}=e,r=A({root:[`root`,!n&&`underline`],input:[`input`]},vQ,t);return{...t,...r}},xQ=I(mQ,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...dQ(e,t),!n.disableUnderline&&t.underline]}})(zo(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${yQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${yQ.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${yQ.disabled}, .${yQ.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${yQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),SQ=I(hQ,{name:`MuiInput`,slot:`Input`,overridesResolver:fQ})({}),CQ=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=bQ(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?ae(l??a,m):m;return(0,P.jsx)(_Q,{slots:{root:u.root??i.Root??xQ,input:u.input??i.Input??SQ},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});CQ.muiName=`Input`;function wQ(e){return Qr(`MuiFilledInput`,e)}var TQ={...sQ,...$r(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},EQ=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=A({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${L(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},wQ,t);return{...t,...c}},DQ=I(mQ,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...dQ(e,t),!n.disableUnderline&&t.underline]}})(zo(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${TQ.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${TQ.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${TQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${TQ.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${TQ.disabled}, .${TQ.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${TQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),OQ=I(hQ,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:fQ})(zo(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),kQ=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=EQ(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?ae(g,u??a):g;return(0,P.jsx)(_Q,{slots:{root:d.root??i.Root??DQ,input:d.input??i.Input??OQ},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});kQ.muiName=`Input`;var AQ,jQ=I(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:Io})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),MQ=I(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:Io})(zo(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function NQ(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,P.jsx)(jQ,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,P.jsx)(MQ,{ownerState:c,children:s?(0,P.jsx)(`span`,{children:i}):AQ||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function PQ(e){return Qr(`MuiOutlinedInput`,e)}var FQ={...sQ,...$r(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},IQ=e=>{let{classes:t}=e,n=A({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},PQ,t);return{...t,...n}},LQ=I(mQ,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:dQ})(zo(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${FQ.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${FQ.focused} .${FQ.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{[`&.${FQ.focused} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${FQ.error} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${FQ.disabled} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),RQ=I(NQ,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(zo(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),zQ=I(hQ,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:fQ})(zo(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),BQ=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=IQ(n),m=oG(),h=iG({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??LQ,v=l.input??r.Input??zQ,[y,b]=hH(`notchedOutline`,{elementType:RQ,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,P.jsxs)(N.Fragment,{children:[o,` `,`*`]}):o}});return(0,P.jsx)(_Q,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,P.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});BQ.muiName=`Input`;var VQ=e=>{let{classes:t}=e,n=A({root:[`root`]},BZ,t);return{...t,...n}},HQ={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>Io(e)&&e!==`variant`},UQ=I(CQ,HQ)(``),WQ=I(BQ,HQ)(``),GQ=I(kQ,HQ)(``),KQ=N.forwardRef(function(e,t){let n=Bo({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=eQ,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:g=!1,native:_=!1,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:S,variant:C=`outlined`,...w}=n,T=_?zZ:$Z,E=iG({props:n,muiFormControl:oG(),states:[`variant`,`error`]}),D=E.variant||C,O={...n,variant:D,classes:a},A=VQ(O),{root:j,...M}=A,ee=d||{standard:(0,P.jsx)(UQ,{ownerState:O}),outlined:(0,P.jsx)(WQ,{label:p,ownerState:O}),filled:(0,P.jsx)(GQ,{ownerState:O})}[D],te=sR(t,AV(ee));return(0,P.jsx)(N.Fragment,{children:N.cloneElement(ee,{inputComponent:T,inputProps:{children:i,error:E.error,IconComponent:l,variant:D,type:void 0,multiple:g,..._?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:v,onOpen:y,open:b,renderValue:x,SelectDisplayProps:{id:u,...S}},...f,classes:f?ae(M,f.classes):M,...d?d.props.inputProps:{}},...(g&&_||c)&&D===`outlined`?{notched:!0}:{},ref:te,className:k(ee.props.className,o,A.root),...!d&&{variant:D},...w})})});KQ.muiName=`Select`;function qQ(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var JQ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},YQ=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=A({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},AZ,o);return{...o,...s}},XQ=I(cz,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:JQ})(zo(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${jZ.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${jZ.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${jZ.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${jZ.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${jZ.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${DZ.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${DZ.inset}`]:{marginLeft:52},[`& .${kZ.root}`]:{marginTop:0,marginBottom:0},[`& .${kZ.inset}`]:{paddingLeft:36},[`& .${OZ.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${OZ.root} svg`]:{fontSize:`1.25rem`}}}]}))),ZQ=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=KZ(),m=N.useContext(HG),h=N.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),g=N.useRef(null);eR(()=>{r&&g.current&&qQ(g.current,p)},[r]);let _={...n,dense:h.dense,divider:o,disableGutters:s},v=YQ(n),y=sR(g,t),{root:b,...x}=v,S;return n.disabled||(S=u===void 0?-1:u),(0,P.jsx)(HG.Provider,{value:h,children:(0,P.jsx)(XQ,{ref:y,role:l,tabIndex:S,component:i,focusVisibleClassName:k(v.focusVisible,c),className:k(v.root,d),...f,ownerState:_,classes:x})})}),QQ=()=>{document.querySelectorAll(`.mq-supsub.mq-sup-only`).forEach(e=>{let t=e.previousElementSibling;t&&t.classList.contains(`mq-non-leaf`)&&t.querySelector(`.mq-fraction`)?e.classList.add(`mq-after-fraction-group`):e.classList.remove(`mq-after-fraction-group`)})},{commonMqFontStyles:$Q,commonMqKeyboardStyles:e$,longdivStyles:t$,supsubStyles:n$}=$X,r$=D(`@pie-lib:math-toolbar:editor-and-pad`),i$=/\.|,/g,a$=I(`div`)(({theme:e})=>({zIndex:9,position:`relative`,textAlign:`center`,width:`auto`,"& > .mq-math-mode":{border:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`dotted 1px ${e.palette.primary.main}`,borderRadius:`0px`},"& .mq-overarrow-inner":{border:`none !important`,paddingTop:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.8px`,marginTop:`0px`,minWidth:`1.23em`},"& .mq-parallelogram":{lineHeight:.85}})),o$=I(`div`)(({theme:e,hide:t})=>({display:t?`none`:`flex`,alignItems:`center`,"& .mq-editable-field .mq-cursor":{top:`-4px`},"& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection":{paddingTop:`18px`},"& .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& .mq-math-mode .mq-overline .mq-overline-inner":{paddingTop:`0.4em !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.45em`,left:`-1px`},"&:after":{position:`absolute !important`,top:`0px !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& *":{...$Q,...n$,...t$,"& .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-root-block":{paddingTop:`10px`},"& .mq-scaled .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`4px !important`,paddingTop:`6px !important`,paddingLeft:`6px !important`},"& .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`}},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),s$=I(CG)({flex:`initial`,width:`25%`,minWidth:`100px`,marginLeft:`15px`,marginTop:`5px`,marginBottom:`5px`,marginRight:`5px`,"& label":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& div":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}),c$=I(gG)(()=>({backgroundColor:`transparent`})),l$=I(`div`)(({theme:e,error:t})=>({minWidth:`500px`,maxWidth:`900px`,minHeight:`30px`,width:`100%`,display:`flex`,marginTop:e.spacing(1),marginBottom:e.spacing(1),...t&&{border:`2px solid red`},"& .mq-sqrt-prefix .mq-scaled":{verticalAlign:`middle !important`}})),u$=I(HX)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:ZH(),backgroundColor:vU(),padding:`2px`})),d$=I(WW)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:ZH()}),f$=I(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),p$=I(uZ)(({mode:e})=>({...e$,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),m$=e=>{if(!e)return;let{type:t,value:n}=e;return t===`command`||t===`cursor`?e:t===`answer`?{type:`answer`,...e}:n===`clear`?{type:`clear`}:{type:`write`,value:n}},h$=class extends N.Component{static propTypes={classNames:p.object,keypadMode:p.oneOfType([p.string,p.number]),autoFocus:p.bool,allowAnswerBlock:p.bool,showKeypad:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,error:p.string,noDecimal:p.bool,hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,maxResponseAreas:p.number,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onFocus:p.func,onBlur:p.func,onChange:p.func.isRequired,setKeypadInteraction:p.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&setTimeout(()=>this.input.focus(),0)}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=m$(e);if(r$(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(r$(`call clear...`),this.input.clear()):i.type===`command`?this.input.command(i.value):i.type===`cursor`?this.input.keystroke(i.value):i.type===`answer`?this.input.write(`%response%`):this.input.write(i.value))};updateDisable=e=>{let{maxResponseAreas:t}=this.props;if(t){let n=this.checkResponseAreasNumber(t,e);this.setState({addDisabled:n})}};onAnswerBlockClick=()=>{this.props.onAnswerBlockAdd(),this.onClick({type:`answer`}),this.updateDisable(!0)};onEditorChange=e=>{let{onChange:t,noDecimal:n}=this.props;if(FJ(),QQ(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(i$,``));return}let r=e.match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.input&&r&&r?.length){try{this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent),this.input.mathField.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}return}t(e)};shouldComponentUpdate(e,t){let n=this.input.mathField.latex()!==e.latex;return r$(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!C(this.props.error,e.error)||!n&&this.props.keypadMode!==e.keypadMode||!n&&this.props.noDecimal!==e.noDecimal||!n&&this.state.equationEditor!==t.equationEditor?!0:!n&&this.props.controlledKeypad?this.props.showKeypad!==e.showKeypad:n}onEditorTypeChange=e=>{this.setState({equationEditor:e.target.value})};checkResponseAreasNumber=(e,t)=>{let{latex:n}=this.input&&this.input.props||{};if(n){let r=(n.match(/answerBlock/g)||[]).length;return t?r===e-1:r===e}return!1};render(){let{classNames:e,keypadMode:t,allowAnswerBlock:n,additionalKeys:r,controlledKeypad:i,controlledKeypadMode:a,showKeypad:o,setKeypadInteraction:s,noDecimal:c,hideInput:l,layoutForKeyPad:u,latex:d,onFocus:f,onBlur:p,error:m}=this.props,h=!i||i&&o,{addDisabled:g}=this.state;return r$(`[render]`,d),(0,P.jsxs)(a$,{className:e.mathToolbar,children:[(0,P.jsxs)(o$,{hide:l,children:[a&&(0,P.jsxs)(s$,{variant:`standard`,children:[(0,P.jsx)(c$,{id:`equation-editor-label`,children:`Equation Editor`}),(0,P.jsxs)(KQ,{labelId:`equation-editor-label`,id:`equation-editor-select`,name:`equationEditor`,label:`Equation Editor`,onChange:this.onEditorTypeChange,value:this.state.equationEditor,MenuProps:{transitionDuration:{enter:225,exit:195}},children:[(0,P.jsx)(ZQ,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,P.jsx)(ZQ,{value:`integers`,children:`Numeric - Integers`}),(0,P.jsx)(ZQ,{value:`decimals`,children:`Numeric - Decimals`}),(0,P.jsx)(ZQ,{value:`fractions`,children:`Numeric - Fractions`}),(0,P.jsx)(ZQ,{value:1,children:`Grade 1 - 2`}),(0,P.jsx)(ZQ,{value:3,children:`Grade 3 - 5`}),(0,P.jsx)(ZQ,{value:6,children:`Grade 6 - 7`}),(0,P.jsx)(ZQ,{value:8,children:`Grade 8 - HS`}),(0,P.jsx)(ZQ,{value:`geometry`,children:`Geometry`}),(0,P.jsx)(ZQ,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,P.jsx)(ZQ,{value:`statistics`,children:`Statistics`}),(0,P.jsx)(ZQ,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,P.jsx)(l$,{error:m,children:(0,P.jsx)(u$,{onFocus:()=>{f&&f(),this.updateDisable(!1)},onBlur:e=>{this.updateDisable(!1),p&&p(e)},className:e&&e.editor||``,controlledKeypadMode:a,ref:e=>this.input=e,latex:d,onChange:this.onEditorChange})})]}),n&&(0,P.jsx)(d$,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,P.jsx)(f$,{}),h&&(0,P.jsx)(p$,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},g$=I(Dz)(({hideBackground:e})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:`#00bb00`,...e&&{backgroundColor:NU(),"&:hover":{backgroundColor:yU()}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),_$=({onClick:e,hideBackground:t})=>(0,P.jsx)(g$,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,P.jsx)(Az,{})});_$.propTypes={onClick:p.func,hideBackground:p.bool};var v$=_$,{commonMqFontStyles:y$,longdivStyles:b$,supsubStyles:x$}=$X,S$=D(`@pie-lib:math-toolbar:math-preview`),C$=I(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":y$,...x$,...b$,"& > .mq-math-mode":{border:t?`solid 0px lightgrey`:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`solid 1px black`,borderRadius:`0px`},"& > .mq-math-mode .mq-root-block":{paddingTop:`7px !important`},"& > .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& > .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& > .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty":{paddingTop:`6px !important`,paddingLeft:`4px !important`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`0 !important`},"& > .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& > .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-editable-field .mq-cursor":{marginTop:`-15px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.5px`,marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},...t&&{border:`solid 1px ${e.palette.primary.main}`}})),w$=I(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),T$=class extends N.Component{static propTypes={latex:p.string,isSelected:p.bool,onFocus:p.func,onBlur:p.func};componentDidMount(){QQ()}componentDidUpdate(e){this.props.latex!==e.latex&&QQ()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return S$(`[render] latex: `,r),(0,P.jsxs)(C$,{isSelected:e,children:[` `,(0,P.jsx)(w$,{}),(0,P.jsx)(JX,{latex:r,onFocus:t,onBlur:n})]})}},E$=I(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),D$=class extends N.Component{static propTypes={autoFocus:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,keypadMode:p.oneOfType([p.string,p.number]),classNames:p.object,error:p.string,maxResponseAreas:p.number,showKeypad:p.bool,noDecimal:p.bool,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onChange:p.func,onDone:p.func.isRequired,onFocus:p.func,onBlur:p.func,hideDoneButton:p.bool,keyPadCharacterRef:p.func,setKeypadInteraction:p.func};static defaultProps={classNames:{},keypadMode:`item-authoring`,autoFocus:!1,allowAnswerBlock:!1,controlledKeypad:!1,controlledKeypadMode:!1,noDecimal:!1,showKeypad:!0,additionalKeys:[],onChange:()=>{},onAnswerBlockAdd:()=>{},onFocus:()=>{},hideDoneButton:!1};constructor(e){super(e),this.state={latex:e.latex}}done=()=>{this.props.onDone(this.state.latex)};UNSAFE_componentWillReceiveProps(e){this.setState({latex:e.latex})}onChange=e=>{this.setState({latex:e}),this.props.onChange(e)};render(){let{latex:e}=this.state,{classNames:t,autoFocus:n,allowAnswerBlock:r,onAnswerBlockAdd:i,controlledKeypad:a,controlledKeypadMode:o,keypadMode:s,noDecimal:c,additionalKeys:l,showKeypad:u,onFocus:d,onBlur:f,hideDoneButton:p,error:m,keyPadCharacterRef:h,setKeypadInteraction:g,maxResponseAreas:_}=this.props;return(0,P.jsx)(O$,{autoFocus:n,classNames:t,onAnswerBlockAdd:i,allowAnswerBlock:r,latex:e,additionalKeys:l,noDecimal:c,keypadMode:s,keyPadCharacterRef:h,setKeypadInteraction:g,onChange:this.onChange,onDone:this.done,onFocus:d,onBlur:f,showKeypad:u,controlledKeypad:a,controlledKeypadMode:o,hideDoneButton:p,error:m,maxResponseAreas:_})}},O$=class extends N.Component{static propTypes={classNames:p.object,latex:p.string.isRequired,keypadMode:p.oneOfType([p.string,p.number]),hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,onChange:p.func.isRequired,onDone:p.func.isRequired,onBlur:p.func,onAnswerBlockAdd:p.func,additionalKeys:p.array,onFocus:p.func,autoFocus:p.bool,noDecimal:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,showKeypad:p.bool,hideDoneButton:p.bool,hideDoneButtonBackground:p.bool,error:p.any,maxResponseAreas:p.number,keyPadCharacterRef:p.object,setKeypadInteraction:p.func};static defaultProps={classNames:{},hideDoneButtonBackground:!1};render(){let{classNames:e,autoFocus:t,allowAnswerBlock:n,onAnswerBlockAdd:r,controlledKeypad:i,controlledKeypadMode:a,additionalKeys:o,showKeypad:s,keypadMode:c,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,keyPadCharacterRef:p,setKeypadInteraction:m,latex:h,onChange:g,onDone:_,onFocus:v,onBlur:y,hideDoneButton:b,hideDoneButtonBackground:x,error:S,maxResponseAreas:C}=this.props;return(0,P.jsxs)(E$,{className:e&&e.toolbar||``,ref:p,children:[(0,P.jsx)(`div`,{}),(0,P.jsx)(h$,{autoFocus:t,keypadMode:c,classNames:e||{},controlledKeypad:i,controlledKeypadMode:a,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,showKeypad:s,additionalKeys:o,allowAnswerBlock:n,onAnswerBlockAdd:r,latex:h,onChange:g,onFocus:v,onBlur:y,error:S,maxResponseAreas:C,setKeypadInteraction:m}),(!i||i&&s)&&!b&&(0,P.jsx)(v$,{hideBackground:x,onClick:_})]})}},k$=new mu(`ensureTextAfterMath`),A$=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),j$=e=>new du({key:k$,appendTransaction:(t,n,r)=>{if(!t.some(e=>e.docChanged))return null;let i=r.tr,a=!1;return r.doc.descendants((t,n)=>{if(t.type.name===e){let e=n+t.nodeSize,o=r.doc.nodeAt(e);(!o||o.type.name!==`text`)&&(i.insert(e,r.schema.text(``)),a=!0)}}),a?i:null}}),M$=(e,t)=>{let n;for(n=t;n>0;n--){let t=e.nodeAt(n);if(t?.type?.name===`text`&&t.textContent!==``)return-1;if(t&&t?.type?.name!==`text`)break}return n},N$=new du({key:new mu(`zeroWidthSpaceHandling`),props:{handleKeyDown(e,t){let{state:n,dispatch:r}=e,{selection:i,doc:a}=n,{from:o,empty:s}=i;if(s&&t.key===`Backspace`&&o>0){let e=M$(a,o);return e===-1?!1:(r(n.tr.delete(e,o)),!0)}if(s&&t.key===`ArrowLeft`&&o>0){let e=M$(a,o);if(e===-1)return!1;let t=n.doc.resolve(e);if(t.nodeAfter||t.nodeBefore){let t=n.doc.resolve(e);return r(n.tr.setSelection(U.create(n.doc,t.pos))),!0}else return r(n.tr.setSelection(H.create(n.doc,o-2))),!0}return!1}}}),P$=Rb.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[j$(this.name),N$]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:e.getAttribute(`data-raw`)||e.textContent})},{tag:`span[data-type="mathml"]`,getAttrs:e=>({html:e.innerHTML})}]},addCommands(){return{insertMath:(e=``)=>({tr:t,editor:n,dispatch:r})=>{let{state:i}=n.view,a=i.schema.nodes.math.create({latex:e}),{selection:o}=i,s=o.$from.pos;if(t.insert(s,a),a?.type?.name===this.name){let e=U.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),zz(n,!0),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},kW(e.latex,e.wrapper)]},addNodeView(){return fS(e=>(0,P.jsx)(F$,{...e,options:this.options}))}}),F$=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a,getPos:o}=e,[s,c]=(0,N.useState)(i),l=(0,N.useRef)(null),u=(0,N.useRef)(null),d=(0,N.useRef)(Date.now()),[f,p]=(0,N.useState)({top:0,left:0}),{math:m={}}=a||{},{keypadMode:h,controlledKeypadMode:g=!0,customKeys:_=[],keyPadCharacterRef:v,setKeypadInteraction:y}=m,b=t.attrs.latex||``,x=e=>{n({latex:e})},S=(e,{moveCursorAfterNode:i=!0}={})=>{if(n({latex:e}),c(!1),i&&typeof o==`function`){let e=o(),{doc:n}=r.state,i=H.create(n,e+t.nodeSize),a=r.state.tr.setSelection(i);r.view.dispatch(a)}r.commands.focus()};return(0,N.useEffect)(()=>{if(!i)return;let{selection:e}=r.state;e.node?.type?.name===`math`&&c(!0)},[i,r]),(0,N.useEffect)(()=>{zz(r,i||s)},[r,s,i]),(0,N.useEffect)(()=>{if(!r||!s){p({top:0,left:0});return}let e=()=>{if(!l.current)return;let{from:e}=r.state.selection,t=r.view.coordsAtPos(e),n=u.current?.getBoundingClientRect?.(),i=n?.height?n.top:t.top,a=n?.width?n.left:t.left,o=n?.height?n.bottom:t.bottom??t.top,s=l.current.offsetHeight,c=l.current.offsetWidth,d=window.innerHeight-(o+0)>=s?o+0:i-s-0,f=a;d=Math.max(8,Math.min(d,window.innerHeight-s-8)),f=Math.max(8,Math.min(f,window.innerWidth-c-8));let m=(r._tiptapContainerEl||document.body).getBoundingClientRect();p({top:d-m.top,left:f-m.left})};e();let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))};return t=requestAnimationFrame(()=>{t=null,e()}),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{t!==null&&cancelAnimationFrame(t),window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}},[r,s]),(0,N.useEffect)(()=>{let e=e=>{let n=e?.target,i=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,a=!!(n?.id&&n.id.includes(`equation-editor-select`))||!!n?.closest?.(`[id*="equation-editor-select"]`),o=!!n?.closest?.(`.math-node-${d.current}`);if(l.current&&!l.current.contains(n)&&!n?.closest?.(`[data-inline-node]`)&&!i&&!a&&!o){c(!1);let e=!!r?.view?.dom?.contains(n);S(t.attrs.latex,{moveCursorAfterNode:!e})}};return s?document.addEventListener(`click`,e):document.removeEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[r,s,t]),(0,P.jsxs)(iS,{className:`math-node-${d.current}`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,P.jsx)(`div`,{ref:u,onClick:()=>c(!0),contentEditable:!1,children:(0,P.jsx)(T$,{latex:b})}),s&&zx.createPortal((0,P.jsx)(`div`,{ref:l,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${f.top}px`,left:`${f.left}px`,zIndex:1e3,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`},children:(0,P.jsx)(D$,{latex:b,autoFocus:!0,onChange:x,onDone:S,keypadMode:h,controlledKeypadMode:g,additionalKeys:A$(_),keyPadCharacterRef:v,setKeypadInteraction:y})}),r?._tiptapContainerEl||document.body)]})};function I$(e){return Qr(`MuiLinearProgress`,e)}$r(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var L$=4,R$=mr`
|
|
330
|
+
mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`⊻`]=q($,`\\veebar `,`⊻`),Z.barwedge=Z[`⊼`]=q($,`\\barwedge `,`⊼`),Z.ltimes=Z[`⋉`]=q($,`\\ltimes `,`⋉`),Z.rtimes=Z[`⋊`]=q($,`\\rtimes `,`⋊`),Z.leftthreetimes=Z[`⋋`]=q($,`\\leftthreetimes `,`⋋`),Z.rightthreetimes=Z[`⋌`]=q($,`\\rightthreetimes `,`⋌`),Z.curlyvee=Z[`⋎`]=q($,`\\curlyvee `,`⋎`),Z.curlywedge=Z[`⋏`]=q($,`\\curlywedge `,`⋏`),Z.circledcirc=Z[`⊚`]=q($,`\\circledcirc `,`⊚`),Z.circledast=Z[`⊛`]=q($,`\\circledast `,`⊛`),Z.circleddash=Z[`⊝`]=q($,`\\circleddash `,`⊝`),Z.boxplus=Z[`⊞`]=q($,`\\boxplus `,`⊞`),Z.boxminus=Z[`⊟`]=q($,`\\boxminus `,`⊟`),Z.boxtimes=Z[`⊠`]=q($,`\\boxtimes `,`⊠`),Z.boxdot=Z[`⊡`]=q($,`\\boxdot `,`⊡`),Z[`∂`]=Z.partial,Z[`∃`]=Z.exists,Z[`∅`]=Z.varnothing,Z[`∆`]=Z.triangle,Z[`∇`]=Z.nabla,Z[`∈`]=Z.in,Z[`∊`]=Z.in,Z[`∋`]=Z.ni,Z[`∌`]=Z.notni,Z[`∍`]=Z.ni,Z[`∐`]=Z.amalg,Z[`−`]=Z[`-`],Z[`∓`]=Z.mp,Z[`∖`]=Z.setminus,Z[`∘`]=Z.circ,Z[`∙`]=Z.bullet,Z[`∝`]=Z.propto,Z[`∞`]=Z.infty,Z[`∠`]=Z.angle,Z[`∡`]=Z.measuredangle,Z[`∣`]=Z.divides,Z[`∥`]=Z.parallel,Z[`∦`]=Z.nparallel,Z[`∧`]=Z.wedge,Z[`∨`]=Z.vee,Z[`∩`]=Z.cap,Z[`∪`]=Z.cup,Z[`∮`]=Z.oint,Z[`∴`]=Z.therefore,Z[`∵`]=Z.because,Z[`∼`]=Z.sim,Z[`≀`]=Z.wr,Z[`≃`]=Z.simeq,Z[`≍`]=Z.asymp,Z[`≐`]=Z.doteq,Z[`≪`]=Z.ll,Z[`≫`]=Z.gg,Z[`≺`]=Z.prec,Z[`≻`]=Z.succ,Z[`⊂`]=Z.subset,Z[`⊃`]=Z.supset,Z[`⊆`]=Z.subseteq,Z[`⊇`]=Z.supseteq,Z[`⊈`]=Z.nsubseteq,Z[`⊉`]=Z.nsupseteq,Z[`⊏`]=Z.sqsubset,Z[`⊐`]=Z.sqsupset,Z[`⊓`]=Z.sqcap,Z[`⊔`]=Z.sqcup,Z[`⊖`]=Z.ominus,Z[`⊘`]=Z.oslash,Z[`⊙`]=Z.odot,Z[`⊢`]=Z.vdash,Z[`⊣`]=Z.dashv,Z[`⊤`]=Z.top,Z[`⊥`]=Z.bot,Z[`⊧`]=Z.models,Z[`⋀`]=Z.wedge,Z[`⋁`]=Z.vee,Z[`⋂`]=Z.cap,Z[`⋃`]=Z.cup,Z[`⋄`]=Z.diamond,Z[`⋅`]=Z.cdot,Z[`⋆`]=Z.star,Z[`⋈`]=Z.bowtie,Z[`⋮`]=Z.vdots,Z[`⋯`]=Z.cdots,Z[`⋱`]=Z.ddots;var sX,cX=iY,lX=document.createElement(`div`).style,uX={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},dX;for(var fX in uX)if(fX in lX){dX=fX;break}dX?sX=function(e,t,n){e.css(dX,`scale(`+t+`,`+n+`)`)}:`filter`in lX?(cX=function(e){e.className=e.className},sX=function(e,t,n){t/=1+(n-1)/2,e.css(`fontSize`,n+`em`),e.hasClass(`mq-matrixed-container`)||e.addClass(`mq-matrixed-container`).wrapInner(`<span class="mq-matrixed"></span>`);var r=e.children().css(`filter`,`progid:DXImageTransform.Microsoft.Matrix(M11=`+t+`,SizingMethod='auto expand')`);function i(){e.css(`marginRight`,(r.width()-1)*(t-1)/t+`px`)}i();var a=setInterval(i);ZJ(window).load(function(){clearTimeout(a),i()})}):sX=function(e,t,n){e.css(`fontSize`,n+`em`)};var pX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),mX=J(LY,function(e,t){e.init=function(e,n,r){this.args=arguments,this.htmlTemplate=`<`+n+` `+r+`><`+n+` class="mq-xarrow-over">&0</`+n+`><`+n+` class="mq-xarrow-under"></`+n+`></`+n+`>`,t.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`(`,`)`]},e.parser=function(){var e=this;return FY.optBlock.then(function(t){return FY.block.map(function(n){var r=hX.apply(null,e.args);return r.blocks=[t,n],t.adopt(r,0,0),n.adopt(r,t,0),r})}).or(t.parser.call(this))}}),hX=J(mX,function(e,t){e.init=function(e,t,n){this.htmlTemplate=`<`+t+` `+n+`><`+t+` class="mq-xarrow-over">&1</`+t+`><`+t+` class="mq-xarrow-under">&0</`+t+`></`+t+`>`,LY.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),gX=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return J(LY,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`<span class="mq-empty-box">&0</span></`+i+`></`+i+`>`)}})},_X=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`><span class="mq-longdiv-curve-border">)</span><span class="mq-longdiv-inner"><span class="mq-empty">&0</span></`+n+`></span>`)}}),vX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-row"><p>`+r+`</p><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td><td class="mq-empty"></td><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),yX=J(LY,function(e,t){e.init=function(e){t.init.call(this,e,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),bX=J(LY,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-matrix"><span class="mq-paren mq-scaled">[</span><span class="matrix-edit-content-col"><p>`+r+`</p></span><span class="matrix-edit-content-col"><table class="mq-non-leaf mq-rows-3"><tbody><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr><tr><td class="mq-empty"></td></tr></tbody></table></span><span class="mq-paren mq-scaled">]</span></span>`)}}),xX=function(e,t){return J(RY,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Z.mathrm=q(pX,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Z.mathit=q(pX,`\\mathit`,`i`,`class="mq-font"`),Z.mathbf=q(pX,`\\mathbf`,`b`,`class="mq-font"`),Z.mathsf=q(pX,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Z.mathtt=q(pX,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Z.underline=q(pX,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Z.overline=Z.bar=q(gX(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Z.longdiv=q(_X,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Z.overrightarrow=q(gX(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Z.overleftarrow=q(gX(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Z.xleftarrow=q(mX,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Z.xrightarrow=q(mX,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Z.overleftrightarrow=q(pX,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Z.overarc=q(pX,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Z.dot=J(LY,function(e,t){e.init=function(){t.init.call(this,`\\dot`,`<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),Z.addmatrixrow=q(vX,`\\addmatrixrow`,`span`,`+`),Z.addmatrixcol=q(bX,`\\addmatrixcol`,`span`,`+`),Z.ngtr=Z[`≯`]=q(xX(`mq-ngtr`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Z.nless=Z[`≮`]=q(xX(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Z.dot=q(yX,`\\dot`),Z.parallelogram=q(xX(`mq-parallelogram`,`▱`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Z.textcolor=J(LY,function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate=`<span class="mq-textcolor" style="color:`+e+`">&0</span>`},e.latex=function(){return`\\textcolor{`+this.color+`}{`+this.blocks[0].latex()+`}`},e.parser=function(){var e=this,n=MY.optWhitespace,r=MY.string,i=MY.regex;return n.then(r(`{`)).then(i(/^[#\w\s.,()%-]*/)).skip(r(`}`)).then(function(n){return e.setColor(n),t.parser.call(e)})},e.isStyleBlock=function(){return!0}}),Z.class=J(LY,function(e,t){e.parser=function(){var e=this,n=MY.string,r=MY.regex;return MY.optWhitespace.then(n(`{`)).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n(`}`)).then(function(n){return e.cls=n||``,e.htmlTemplate=`<span class="mq-class `+n+`">&0</span>`,t.parser.call(e)})},e.latex=function(){return`\\class{`+this.cls+`}{`+this.blocks[0].latex()+`}`},e.isStyleBlock=function(){return!0}});var SX=J(LY,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[Y]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=Y;t;t=t===Y&&X)if(this[t]instanceof SX){for(var n=`sub`;n;n=n===`sub`&&`sup`){var r=this[n],i=this[t][n];if(r){if(!i)this[t].addBlock(r.disown());else if(r.isEmpty())var a=dY(i,0,i.ends[Y]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=dY(i,o.ends[X],i.ends[Y]);t===Y?o.adopt(i,i.ends[X],0):o.adopt(i,0,i.ends[Y])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[Y]===this&&(t===X&&a?a[Y]?e.insRightOf(a[Y]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},xY.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[Y].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if(t===`_`)return;var n=this.chToCmd(t,e.options);return n instanceof RY?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[Y]&&!e[X]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),zY.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof RY?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(Y,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+(n.length===1?n:`{`+(n||` `)+`}`):``}return e(`_`,this.sub)+e(`^`,this.sup)},e.addBlock=function(e){this.supsub===`sub`?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=ZJ(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(tY,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=ZJ(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(tY,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">​</span>`));for(var t=0;t<2;t+=1)(function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+`Into`],e[n][r+`OutOf`]=CX,delete e[n].deleteOutOf,t===`sub`&&ZJ(e.jQ.addClass(`mq-sup-only`)[0].lastChild).remove(),this.remove()}})(this,`sub sup`.split(` `)[t],`sup sub`.split(` `)[t],`down up`.split(` `)[t])},e.reflow=function(){var e=this.jQ,t=e.prev();if(t.length){var n=e.children(`.mq-sup`);if(n.length){var r=parseInt(n.css(`font-size`)),i=n.offset().top+n.height()-t.offset().top-.7*r,a=parseInt(n.css(`margin-bottom`));n.css(`margin-bottom`,a+i)}}}});function CX(e){var t=this.parent,n=e;do{if(n[X])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Z.subscript=Z._=J(SX,function(e,t){e.supsub=`sub`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&0</span></span><span style="display:inline-block;width:0">​</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[Y],this.sub.upOutOf=CX,t.finalizeTree.call(this)}}),Z.superscript=Z.supscript=Z[`^`]=J(SX,function(e,t){e.supsub=`sup`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`^`],e.finalizeTree=function(){this.upInto=this.sup=this.ends[X],this.sup.downOutOf=CX,t.finalizeTree.call(this)}});var wX=J(LY,function(e,t){e.parser=function(){for(var e=MY.string,t=MY.optWhitespace,n=MY.succeed,r=FY.block,i=this,a=i.blocks=[zY(),zY()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[X],0);return t.then(e(`_`).or(e(`^`))).then(function(e){var t=a[e===`_`?0:1];return r.then(function(e){return e.children().adopt(t,t.ends[X],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[Y],this.upInto=this.ends[X],this.ends[Y].upOutOf=this.ends[X],this.ends[X].downOutOf=this.ends[Y]}}),TX=J(wX,function(e,t){e.init=function(e,t){var n=`<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>`+t+`</big><span class="mq-from"><span>&0</span></span></span>`;RY.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())+`^`+e(this.ends[X].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(JY(`n`).createLeftOf(e),oX().createLeftOf(e))}});Z[`∑`]=Z.sum=Z.summation=q(TX,`\\sum `,`∑`),Z[`∏`]=Z.prod=Z.product=q(TX,`\\prod `,`∏`),Z.coprod=Z.coproduct=q(TX,`\\coprod `,`∐`),Z[`∫`]=Z.int=Z.integral=J(TX,function(e,t){e.init=function(){RY.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>`)},e.createLeftOf=LY.p.createLeftOf}),Z.lim=Z.limit=J(wX,function(e,t){e.init=function(){RY.prototype.init.call(this,`\\lim `,`<span class="mq-lim mq-non-leaf"><span class="mq-un-italicized">lim</span><span class="mq-approaches"><span>&0</span></span></span>`)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[Y].latex())}});var EX=Z.over=hY[`/`]=J(Z.frac=Z.dfrac=Z.cfrac=Z.fraction=J(LY,function(e,t){e.ctrlSeq=`\\frac`,e.htmlTemplate=`<span class="mq-fraction mq-non-leaf"><span class="mq-numerator"><span class="mq-empty-box">&0</span></span><span class="mq-denominator"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0">​</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[X].upOutOf=this.ends[Y],this.downInto=this.ends[Y].downOutOf=this.ends[X]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[Y];n&&!(n instanceof $||n instanceof(Z.text||iY)||n instanceof TX||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[Y];n instanceof TX&&n[X]instanceof SX&&(n=n[X],n[X]instanceof SX&&n[X].ctrlSeq!=n.ctrlSeq&&(n=n[X])),n!==e[Y]&&!e.isTooDeep(1)&&(this.replaces(mY(n[X]||e.parent.ends[Y],e[Y])),e[Y]=n)}t.createLeftOf.call(this,e)}});Z.underset=J(LY,function(e,t){e.ctrlSeq=`\\underset`,e.htmlTemplate=`<span class="mq-underset mq-overunder mq-non-leaf"><span class="mq-over">&1</span><span class="mq-under">&0</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[Y].upOutOf=this.ends[X],this.upInto=this.ends[X].downOutOf=this.ends[Y]}}),Z.overset=J(LY,function(e,t){e.ctrlSeq=`\\overset`,e.htmlTemplate=`<span class="mq-overset mq-overunder mq-non-leaf"><span class="mq-over">&0</span><span class="mq-under">&1</span></span>`,e.textTemplate=[`[`,`|`,`]`],e.finalizeTree=function(){this.downInto=this.ends[X].upOutOf=this.ends[Y],this.upInto=this.ends[Y].downOutOf=this.ends[X]}});var DX=Z.sqrt=Z[`√`]=J(LY,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</span><span class="mq-non-leaf mq-sqrt-stem"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt(`,`)`],e.parser=function(){return FY.optBlock.then(function(e){return FY.block.map(function(t){var n=OX();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n})}).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[X].jQ.parent();sX(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Z.hat=J(LY,function(e,t){e.ctrlSeq=`\\hat`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>`,e.textTemplate=[`hat(`,`)`]});var OX=Z.nthroot=J(DX,function(e,t){e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">&0</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&1</span></span></span>`,e.textTemplate=[`sqrt[`,`](`,`)`],e.latex=function(){return`\\sqrt[`+this.ends[Y].latex()+`]{`+this.ends[X].latex()+`}`}}),kX=J(LY,function(e,t){e.init=function(e,n,r){var i=`<span class="mq-non-leaf"><span class="mq-diacritic-above">`+n+`</span><span class="mq-diacritic-stem">&0</span></span>`;t.init.call(this,e,i,r)}});Z.vec=q(kX,`\\vec`,`→`,[`vec(`,`)`]),Z.tilde=q(kX,`\\tilde`,`~`,[`tilde(`,`)`]),Z.lrncuberoot=J(DX,function(e,t){e.ctrlSeq=`\\lrncuberoot`,e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">3</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt[3](`,`)`],e.latex=function(){return`\\sqrt[3]{`+this.ends[Y].latex()+`}`}}),Z.abs=J(LY,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Z.lrnplaceholder=J(LY,function(e,t){e.ctrlSeq=`\\lrnplaceholder`,e.htmlTemplate=`<span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[``],e.latex=function(){return this.ends[Y].latex()}}),Z.lrnexponent=J(LY,function(e,t){e.ctrSeq=`\\lrnexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">&1</span></span></span></span>`,e.textTemplate=[``,`**`],e.latex=function(){var e=this.ends[X].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[Y].latex()+`^`+e}}),Z.lrnsquaredexponent=J(LY,function(e,t){e.ctrSeq=`\\lrnsquaredexponent`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup"><span class="mq-empty-box">2</span></span></span></span>`,e.textTemplate=[``,`**2`],e.latex=function(){return this.ends[Y].latex()+`^2`}}),Z.lrnsubscript=J(LY,function(e,t){e.ctrSeq=`\\lrnsubscript`,e.htmlTemplate=`<span class="mq-lrnexponent mq-non-leaf"><span class="mq-lrnplaceholder mq-non-leaf"><span class="mq-empty-box">&0</span></span><span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&1</span></span><span style="display:inline-block;width:0"> </span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[Y].latex()+`_`+this.ends[X].latex()}});function AX(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(`:first`).add(this.jQ.children(`:last`)),this.contentjQ=this.jQ.children(`:eq(1)`)},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css(`fontSize`));sX(this.delimjQs,nY(1+.2*(e-1),1.2),1.2*e)}}var jX=J(J(LY,AX),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,$J,[n,r]),this.side=e,this.sides={},this.sides[Y]={ch:n,ctrlSeq:i},this.sides[X]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-paren`+(this.side===X?` mq-ghost`:``)+`">`+this.sides[Y].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===Y?` mq-ghost`:``)+`">`+this.sides[X].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[Y].ctrlSeq+this.ends[Y].latex()+`\\right`+this.sides[X].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof jX&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||MX[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[Y].ch]===n.sides[X].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===Y?0:1).removeClass(`mq-ghost`).html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if(this.sides[Y].ch===`|`)var r=this.matchBrack(n,X,e[X])||this.matchBrack(n,Y,e[Y])||this.matchBrack(n,0,e.parent.parent);else var r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&mY(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble(`reflow`)}else r=this,i=r.side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(mY(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===Y?e.insAtLeftEnd(r.ends[Y]):e.insRightOf(r)},e.placeCursor=iY,e.unwrap=function(){this.ends[Y].children().disown().adopt(this.parent,this,this[X]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[Y].ends[this.side])){this.closeOpposing(this.ends[Y].ends[this.side]);var c=this.ends[Y].ends[e];this.unwrap(),c.siblingCreated&&c.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else if(t&&s){this.unwrap(),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r);return}else this.sides[e]={ch:MX[this.sides[this.side].ch],ctrlSeq:MX[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===Y?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[Y].ends[e];mY(i,a,-e).disown().withDirAdopt(-e,this.ends[Y],c,0).jQ.insAtDirEnd(e,this.ends[Y].jQ.removeClass(`mq-empty`)),c.siblingCreated&&c.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[Y])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[Y].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===Y)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),MX={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function NX(e,t){var t=t||e,n=MX[e],r=MX[t];hY[e]=q(jX,Y,e,n,t,r),hY[n]=q(jX,X,e,n,t,r)}NX(`(`),NX(`[`),NX(`{`,`\\{`),Z.langle=q(jX,Y,`⟨`,`⟩`,`\\langle `,`\\rangle `),Z.rangle=q(jX,X,`⟨`,`⟩`,`\\langle `,`\\rangle `),hY[`|`]=q(jX,Y,`|`,`|`,`|`,`|`),Z.lVert=q(jX,Y,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.rVert=q(jX,X,`∥`,`∥`,`\\lVert `,`\\rVert `),Z.left=J(LY,function(e){e.parser=function(){var e=MY.regex,t=MY.string;MY.succeed;var n=MY.optWhitespace;return n.then(e(/^(?:[([|]|\\\{|\\langle(?![a-zA-Z])|\\lVert(?![a-zA-Z]))/)).then(function(r){var i=r.charAt(0)===`\\`?r.slice(1):r;return r==`\\langle`&&(i=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,r+=` `),FY.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t=e.charAt(0)===`\\`?e.slice(1):e;e==`\\rangle`&&(t=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,e+=` `);var n=jX(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Z.right=J(LY,function(e){e.parser=function(){return MY.fail(`unmatched \\right`)}}),Z.choose=J(Z.binom=Z.binomial=J(J(LY,AX),function(e,t){e.ctrlSeq=`\\binom`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>`,e.textTemplate=[`choose(`,`,`,`)`]}),function(e){e.createLeftOf=EX.prototype.createLeftOf}),Z.editable=Z.MathQuillMathField=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillMathField`,e.htmlTemplate=`<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>`,e.parser=function(){var e=this,n=MY.string,r=MY.regex,i=MY.succeed;return n(`[`).then(r(/^[a-z][a-z0-9]*/i)).skip(n(`]`)).map(function(t){e.name=t}).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=yY(this.ends[Y],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),jY(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[Y].controller))},e.latex=function(){return this.ends[Y].latex()},e.text=function(){return this.ends[Y].text()}});var PX=Z.embed=J(RY,function(e,t){e.setOptions=function(e){function t(){return``}return this.text=e.text||t,this.htmlTemplate=e.htmlString||``,this.latex=e.latex||t,this},e.parser=function(){var e=this,t=MY.string,n=MY.regex,r=MY.succeed;return t(`{`).then(n(/^[a-z][a-z0-9]*/i)).skip(t(`}`)).then(function(i){return t(`[`).then(n(/^[-\w\s]*/)).skip(t(`]`)).or(r()).map(function(t){return e.setOptions(wY[i](t))})})}});Z.MathQuillResponseContainer=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainer`,e.htmlTemplate=`<span class="lrn-mq-response-container"><marker class="lrn-qe-keyboard-i-response"></marker><content>Response</content></span>`,e.latex=function(){return`\\MathQuillResponseContainer`},e.text=function(){return this.ends[Y].text()}}),Z.MathQuillResponseContainerIcon=J(LY,function(e,t){e.ctrlSeq=`\\MathQuillResponseContainerIcon`,e.htmlTemplate=`<span class="lrn-mq-response-container-icon"><span class="lrn-qe-keyboard-i-response"></span></span>`,e.latex=function(){return`\\MathQuillResponseContainerIcon`},e.text=function(){return this.ends[Y].text()}});var FX=Z.matrix=J(LY,function(e,t){var n=J(zY,function(e,t){e.init=function(e,n){return this.column=e,this.row=n,t.init.call(this)},e.keystroke=function(e,n,r){switch(e){case`Shift-Spacebar`:return n.preventDefault(),this.parent.insertColumn(this);case`Shift-Enter`:return this.parent.insertRow(this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,function(){return t.deleteOutOf.apply(r,i)})}}),r={column:`&`,row:`\\\\`};e.parentheses={left:null,right:null},e.maximum={rows:5,columns:5},e.defaults={rows:2,columns:2},e.ctrlSeq=`\\matrix`,e.createBlocks=function(){var e=this,t=e.blocks=[],r,i,a=0;this.htmlTemplate.replace(/&\d+/g,function(o,s){var c=e.htmlTemplate.substring(0,s).match(/<tr[^>]*>/gi).length-1;i=r===c?i+1:0,t[a]=n(i,c),t[a].adopt(e,e.ends[X],0),r=c,a++})},e.reflow=function(){var e=this.jQ.children(`table`),t=e.outerHeight()/+e.css(`fontSize`).slice(0,-2),n=this.jQ.children(`.mq-paren`);n.length&&sX(n,nY(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e=this.getMatrixName(),t=`\\begin{`+e+`}`,n,i,a;for(a=0;a<this.blocks.length;a++)n=this.blocks[a].row,i!==void 0&&(i===n?t+=r.column:t+=r.row),i=n,t+=this.blocks[a].latex();return t+=`\\end{`+e+`}`,t},e.createLeftOf=function(n){this.cursor=n;var r=Math.min(this.defaults.rows,this.maximum.rows),i=Math.min(this.defaults.columns,this.maximum.columns);this.defaultHtmlTemplate=this.defaultHtmlTemplate||this.generateHtmlTemplate(r,i),e.htmlTemplate=this.defaultHtmlTemplate,t.createLeftOf.call(this,n)},e.getMatrixName=function(){return this.ctrlSeq.replace(`\\`,``)},e.generateHtmlTemplate=function(e,t){var n=`<span class="mq-matrix mq-non-leaf">`+o(this.parentheses.left);n+=`<table class="mq-non-leaf">`,e=Math.min(e,this.maximum.rows),t=Math.min(t,this.maximum.columns);for(var r=0,i=0;i<e;i++){n+=`<tr>`;for(var a=0;a<t;a++)n+=`<td>&`+r+`</td>`,r++;n+=`</tr>`}return n+=`</table>`,n+=o(this.parentheses.right)+`</span>`,n;function o(e){return e?`<span class="mq-paren mq-scaled">`+e+`</span>`:``}},e.htmlTemplate=e.generateHtmlTemplate(1,1),e.parser=function(){var e=MY.regex,t=this,i=this.getMatrixName(),a=RegExp(`^(.*?)\\\\end{`+i+`}`),o=RegExp(`\\\\end{`+i+`}`);return e(a).then(function(e){var i=e.replace(o,``),a=[],s=i.split(r.row),c=Math.min(s.length,t.maximum.rows),l=0,u,d;for(d=0;d<c;d++)u=s[d].split(r.column),l=Math.max(l,u.length);for(l=Math.min(l,t.maximum.columns),d=0;d<c;d++){u=s[d].split(r.column);for(var e=0;e<l;e++){var f=n(e,d);FY.parse(u[e]||` `).children().adopt(f,f.ends[X],0),a.push(f)}}t.htmlTemplate=t.generateHtmlTemplate(c,l),t.blocks=a;for(var d=0;d<a.length;d+=1)a[d].adopt(t,t.ends[X],0);return MY.succeed(t)})},e.finalizeTree=function(){var e=this.jQ.find(`table`);e.length&&(this.relink(),e.removeClass(function(e,t){var n=t.match(/mq-rows-\d+/g);return n&&n.join(` `)||``}),e.addClass(`mq-rows-`+e.find(`tr`).length))},e.relink=function(){var e=this.jQ.find(`td`),t=fY.byId[e.first().attr(tY)],n=fY.byId[e.last().attr(tY)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=fY.byId[ZJ(this).attr(tY)],a=e.eq(t+1),o=ZJ(this).closest(`tr`).next(`tr`),s=ZJ(this).closest(`tr`).index(),c=ZJ(this).index(),l;if(a.length){var u=fY.byId[a.attr(tY)];n[X]=u,u[Y]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=fY.byId[l.attr(tY)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[Y]=t,this.ends[X]=n,t&&t[Y]&&delete t[Y],n&&n[X]&&delete n[X],this.blocks=i},e.deleteCell=function(e){var t=e.jQ.closest(`tr`),n=e.jQ.index(),r=t.index(),i=t.find(`td`).not(e.jQ),a=this.jQ.find(`tr`).not(t).map(function(){return ZJ(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return fY.byId[ZJ(this).attr(tY)].isEmpty()}return i.filter(c).length===i.length&&a.length&&(i.remove(),e.jQ.remove(),t.remove(),this.finalizeTree()),a.filter(c).length===a.length&&i.length&&(a.remove(),e.jQ.remove(),this.finalizeTree()),o||(r=Math.min(r,this.jQ.find(`tr`).length-1),n=Math.min(n,this.jQ.find(`tr`).eq(r).find(`td`).length-1),s=fY.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(tY)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=ZJ(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=ZJ(`<td class="mq-empty">`).attr(tY,i.id),r.append(i.jQ),a||=i;return r.insertAfter(e),a}},e.addColumn=function(e){if(!(e.closest(`tr`).find(`td`).length>=this.maximum.columns)){var t=e.index(),r=e.closest(`tr`).index(),i=this,a,o=[];return this.jQ.find(`tr`).each(function(){a=n(),a.parent=i,a.jQ=ZJ(`<td class="mq-empty">`).attr(tY,a.id),a.jQ.insertAfter(ZJ(this).find(`td`).eq(t)),o.push(a)}),o[r]}},e.insertColumn=function(e){newBlock=this.addColumn(e.jQ),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.insertRow=function(e){newBlock=this.addRow(e.jQ.closest(`tr`)),newBlock&&(this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble(`reflow`).cursor.insAtRightEnd(newBlock))},e.backspace=function(e,t,n,r){if(e.isEmpty()){var i=this.deleteCell(e);i?n.insAtRightEnd(i):(r(),this.finalizeTree()),this.bubble(`edited`)}}});Z.pmatrix=J(FX,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Z.bmatrix=J(FX,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Z.Bmatrix=J(FX,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Z.vmatrix=J(FX,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Z.Vmatrix=J(FX,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var IX=kY(3);for(var LX in IX)(function(e,t){typeof t==`function`?(EY[e]=function(){return TY(),t.apply(this,arguments)},EY[e].prototype=t.prototype):EY[e]=t})(LX,IX[LX]);var RX=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},zX;typeof window<`u`&&(zX=EY.getInterface(3),zX&&zX.registerEmbed&&RX(zX));var BX=m(`math-input:mq:input`),VX=F(`span`)({}),HX=class extends S.Component{static propTypes={className:p.string,onClick:p.func,onChange:p.func,latex:p.string,onFocus:p.func,onBlur:p.func};componentDidMount(){if(!zX)throw Error(`MQ is not defined - but component has mounted?`);this.mathField=zX.MathField(this.input,{handlers:{edit:this.onInputEdit.bind(this)}}),this.updateLatex()}componentDidUpdate(){this.updateLatex()}updateLatex(){if(!this.mathField)return;let{latex:e}=this.props;e!=null&&this.mathField.latex(e)}clear(){return this.mathField.latex(``),``}blur(){BX(`blur mathfield`),this.mathField.blur()}focus(){BX(`focus mathfield...`),this.mathField.focus()}command(e){return BX(`command: `,e),Array.isArray(e)?e.forEach(e=>{this.mathField.cmd(e)}):this.mathField.cmd(e),this.mathField.focus(),this.mathField.latex()}keystroke(e){return this.mathField.keystroke(e),this.mathField.focus(),this.mathField.latex()}write(e){return BX(`write: `,e),this.mathField.write(e),this.mathField.focus(),this.mathField.latex()}onInputEdit=()=>{BX(`[onInputEdit] ...`);let{onChange:e}=this.props;this.mathField&&e&&e(this.mathField.latex())};refresh=()=>{this.blur(),this.focus()};onKeyPress=e=>{if(Object.keys(this.mathField.__controller.options).indexOf(`ignoreNextMousedown`)<0&&this.refresh(),e.charCode===13){e.preventDefault();return}};onClick=e=>{let{onClick:t}=this.props;this.refresh(),t&&t(e)};shouldComponentUpdate(e){return BX(`next: `,e.latex),BX(`current: `,this.mathField.latex()),e.latex!==this.mathField.latex()}render(){let{onFocus:e,onBlur:t,className:n}=this.props;return(0,N.jsx)(VX,{className:n,onKeyDown:this.onKeyPress,onClick:this.onClick,onFocus:e,onBlur:t,ref:e=>this.input=e})}},UX=m(`pie-lib:math-input:mq:static`),WX=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,GX=/ /g;function KX(e=``){return e.replace(GX,``)}function qX(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var JX=class extends S.Component{static propTypes={latex:p.string.isRequired,onFocus:p.func,onBlur:p.func,className:p.string,getFieldName:p.func,onSubFieldChange:p.func,onSubFieldFocus:p.func,setInput:p.func};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=S.createRef()}componentDidMount(){this.update(),FJ(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),FJ()}componentWillUnmount(){this.removeLiveRegion(),this.removeEventListeners()}createLiveRegion=()=>{this.liveRegion=document.createElement(`div`),this.liveRegion.style.position=`absolute`,this.liveRegion.style.width=`1px`,this.liveRegion.style.height=`1px`,this.liveRegion.style.marginTop=`-1px`,this.liveRegion.style.clip=`rect(1px, 1px, 1px, 1px)`,this.liveRegion.style.overflow=`hidden`,this.liveRegion.setAttribute(`aria-live`,`polite`),this.liveRegion.setAttribute(`aria-atomic`,`true`),document.body.appendChild(this.liveRegion)};addEventListeners=()=>{let e=this.inputRef.current;e&&(e.addEventListener(`keydown`,this.handleKeyDown),e.addEventListener(`click`,this.handleMathKeyboardClick))};removeEventListeners=()=>{let e=this.inputRef.current;e&&(e.removeEventListener(`keydown`,this.handleKeyDown),e.removeEventListener(`click`,this.handleMathKeyboardClick))};removeLiveRegion=()=>{this.liveRegion&&=(document.body.removeChild(this.liveRegion),null)};handleKeyDown=e=>{(e?.key===`Backspace`||e?.key===`Delete`)&&this.setState({isDeleteKeyPressed:!0}),this.setState({inputSource:`keyboard`})};handleMathKeyboardClick=()=>{this.setState({inputSource:`mathKeyboard`})};onInputEdit=e=>{if(!this.mathField||this._isProgrammaticUpdate)return;let t=this.props.getFieldName(e,this.mathField.innerFields);if(this.props.onSubFieldChange){let n=e.latex().match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.inputRef?.current&&n&&n?.length)try{e.__controller.cursor.insLeftOf(e.__controller.cursor.parent[-1].parent),e.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}else this.props.onSubFieldChange(t,e.latex())}this.announceLatexConversion(e.latex())};announceLatexConversion=e=>{if(!this.state){console.error(`State is not initialized`);return}let{previousLatex:t,inputSource:n,isDeleteKeyPressed:r}=this.state,i=`Converted to math symbol`;if(n===`keyboard`&&!r)if(qX(e)>qX(t))this.announceMessage(i);else try{this.mathField.parseLatex(t),this.mathField.parseLatex(e),e==t&&this.announceMessage(i)}catch(e){console.warn(`Error parsing latex:`,e.message),console.warn(e)}(this.state.previousLatex!==e||this.state.isDeleteKeyPressed)&&this.setState({previousLatex:e,isDeleteKeyPressed:!1})};announceMessage=e=>{this.setState({previousLatex:``}),this.liveRegion&&(this.liveRegion.textContent=e,setTimeout(()=>{this.liveRegion.textContent=``},500))};update=()=>{if(!zX)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=zX.StaticMath(this.inputRef?.current,{handlers:{edit:this.onInputEdit.bind(this)}});try{this._isProgrammaticUpdate=!0,this.mathField.parseLatex(this.props.latex),this.mathField.latex(this.props.latex)}catch{this.mathField.latex(`\\MathQuillMathField[r1]{}`)}finally{this._isProgrammaticUpdate=!1}};blur=()=>{UX(`blur mathfield`),this.mathField.blur()};focus=()=>{UX(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=KX(this.mathField.parseLatex(e.latex)),n=(e.latex.match(WX)||[]).length,r=t!==KX(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return UX(`[shouldComponentUpdate] `,r),r}catch(e){return console.warn(`Error parsing latex:`,e.message,`skip update`),console.warn(e),!1}}onFocus=e=>{try{let t=e.target.parentElement.nextSibling,n=parseInt(t.getAttribute(`mathquill-block-id`),10);n||=(t=t.parentElement,parseInt(t.getAttribute(`mathquill-block-id`),10));let r=this.mathField.innerFields.find(e=>e.id===n);if(r){let e=this.props.getFieldName(r,this.mathField.innerFields);this.props.setInput&&this.props.setInput(r),this.props.onSubFieldFocus(e,r)}}catch(e){console.error(`error finding root block`,e.message)}};render(){let{onBlur:e,className:t}=this.props;return(0,N.jsx)(`span`,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},YX={fontFamily:`MJXZERO, MJXTEX !important`,"-webkit-font-smoothing":`antialiased !important`,"& .mq-math-mode > span > var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode span var":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode .mq-nonSymbola":{fontFamily:`MJXZERO, MJXTEX-I !important`},"& .mq-math-mode > span > var.mq-operator-name":{fontFamily:`MJXZERO, MJXTEX !important`}},XX={"& .mq-longdiv-inner":{marginTop:`-1px`,marginLeft:`5px !important;`,"& > .mq-empty":{padding:`0 !important`,marginLeft:`0px !important`,marginTop:`2px`}},"& .mq-math-mode .mq-longdiv":{display:`inline-flex !important`}},ZX={"& .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`0.5em !important`,paddingRight:`0.15em`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-supsub ":{fontSize:`70.7%`},"& .mq-math-mode .mq-supsub.mq-sup-only":{verticalAlign:`-0.1em !important`,"& .mq-sup":{marginBottom:`0px !important`}},"& .mq-math-mode .mq-fraction + .mq-supsub.mq-sup-only":{verticalAlign:`0.4em !important`},"& .mq-math-mode .mq-supsub.mq-sup-only.mq-after-fraction-group":{verticalAlign:`0.4em !important`}},QX={"& *":{...YX,...XX,"& .mq-math-mode .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-longdiv-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-supsub":{fontSize:`70.7% !important`},"& .mq-math-mode .mq-sqrt-stem":{marginTop:`-5px`,paddingTop:`4px`},"& .mq-math-mode .mq-paren":{verticalAlign:`middle !important`},"& .mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty":{padding:`0 !important`},"& .mq-math-mode .mq-overline .mq-overline-inner .mq-empty ":{padding:`0 !important`}}},$X={commonMqFontStyles:YX,longdivStyles:XX,supsubStyles:ZX,commonMqKeyboardStyles:QX},eZ=e=>(ns(5-e.length,()=>e.push([])),rs.apply(null,e)),tZ=m(`pie-lib:math-inline:keypad`),nZ=F(JX)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:ZH(),"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${KU()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid black`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid black`,fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`,"&.mq-arrow-both":{top:`0px !important`,"& *":{lineHeight:`1 !important`,borderTop:`none !important`},"&:before":{fontSize:`80%`,left:`calc(-13%) !important`,top:`-0.31em !important`},"&:after":{fontSize:`80% !important`,right:`calc(-13%) !important`,top:`-1.5em`},"&.mq-empty:before":{fontSize:`80%`,left:`calc(-13%)`,top:`-0.26em`},"&.mq-empty:after":{fontSize:`80%`,right:`calc(-13%)`,top:`-0.26em`},"&.mq-empty":{minHeight:`1.4em`}},"&.mq-arrow-right:before":{fontSize:`80%`,right:`calc(-13%) !important`,top:`-0.26em !important`},"& .mq-overarrow-inner":{border:`none !important`},"& .mq-overarrow-inner .mq-overarrow-inner-right":{display:`none !important`}},"& .mq-root-block":{padding:`5px !important`},"& .mq-overarrow.mq-arrow-both.mq-empty:after":{right:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-right.mq-empty:before":{right:`-5px`,fontSize:`80% !important`,top:`-3px`},"& .mq-overarrow.mq-arrow-both.mq-empty:before":{left:`-6px`,fontSize:`80% !important`,top:`-3px`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},"& .mq-overarc":{borderTop:`2px solid black !important`,"& .mq-overline":{borderTop:`none !important`},"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`}}};return e===`\\parallel`?{...t,fontStyle:`italic !important`}:e===`\\overleftrightarrow{\\overline{}}`?{...t,"& .mq-overarrow.mq-arrow-both":{"& .mq-overline-inner":{borderTop:`none !important`,paddingTop:`0 !important`},"&:after":{position:`absolute !important`,top:`0px !important`}}}:t});nZ.propTypes={latex:p.string.isRequired};var rZ=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},iZ=F(`div`)(()=>({...QX,width:`100%`,display:`grid`,gridTemplateRows:`repeat(5, minmax(40px, 60px))`,gridRowGap:`0px`,gridColumnGap:`0px`,gridAutoFlow:`column`,"&.character":{textTransform:`initial !important`,gridTemplateRows:`repeat(5, minmax(40px, 50px)) !important`},"&.language":{gridTemplateRows:`repeat(4, minmax(40px, 50px)) !important`,"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),aZ=F(WW)(({category:e,isDelete:t,isComma:n,isDot:r})=>({minWidth:`auto`,textTransform:`none`,fontSize:n||r?`200% !important`:`140% !important`,lineHeight:n||r?`100%`:`normal`,color:ZH(),backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()},borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),oZ=F(WW)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()}})),sZ=F(Dz)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?GU():WU(),"&:hover":{backgroundColor:e===`operators`?JU():qU()},borderRadius:0,"& .icon":{height:`30px`}})),cZ=class extends S.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,baseSet:p.array,additionalKeys:p.array,layoutForKeyPad:p.object,onPress:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,setKeypadInteraction:p.func,mode:p.oneOfType([p.string,p.number])};static defaultProps={baseSet:JJ,noDecimal:!1};constructor(e){super(e),this.keypadRef=S.createRef()}componentDidMount(){let e=this.keypadRef?.current,t=e?.closest(`.main-container`),n=e?.closest(`.pie-toolbar`);if(this.props.controlledKeypadMode&&t&&n){let e=t.getBoundingClientRect(),r=n.getBoundingClientRect(),i=e.top+e.height-(r.top+r.height);if(i<0){let n=e.height+e.top-i;t&&(t.style.height=`${n}px`)}}e&&(e.addEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.addEventListener(`mousedown`,this.handleKeypadInteraction,!0))}componentWillUnmount(){let e=this.keypadRef?.current;if(this.props.controlledKeypadMode&&e){let t=e.closest(`.main-container`);t&&(t.style.height=`unset`)}e&&(e.removeEventListener(`touchstart`,this.handleKeypadInteraction,!0),e.removeEventListener(`mousedown`,this.handleKeypadInteraction,!0))}handleKeypadInteraction=()=>{this.props.setKeypadInteraction&&this.props.setKeypadInteraction(!0)};buttonClick=e=>{tZ(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>Xo([...eZ(e),...eZ(t)]);keyIsNotAllowed=e=>{let{noDecimal:t}=this.props;return!!((e.write===`.`&&e.label===`.`||e.write===`,`&&e.label===`,`)&&t)};render(){let{className:e,baseSet:t,additionalKeys:n,layoutForKeyPad:r,onFocus:i,mode:a}=this.props,o=[`non-negative-integers`,`integers`,`decimals`,`fractions`,`item-authoring`,`language`].includes(a),s=o?this.flowKeys([],n||[]):this.flowKeys(t,n||[]),c=s.length%5?1:0,l={gridTemplateColumns:`repeat(${Math.floor(s.length/5)+c}, minmax(min-content, 150px))`,...rZ(r)};return(0,N.jsx)(iZ,{ref:this.keypadRef,className:[e,a].filter(Boolean).join(` `),style:l,onFocus:i,children:s.map((e,t)=>{let n=this.buttonClick.bind(this,e);if(!e)return(0,N.jsx)(`span`,{},`empty-${t}`);let r={onClick:n,disabled:this.keyIsNotAllowed(e),key:`${e.label||e.latex||e.command}-${t}`,...e.actions||{},...e.extraProps||{}};if(e.latex)return(0,N.jsx)(oZ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:(0,N.jsx)(nZ,{latex:e.latex})},r.key);if(e.label)return(0,N.jsx)(aZ,{onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,isDelete:e.label===`⌫`,isComma:e.label===`,`,isDot:e.label===`.`,"aria-label":e.ariaLabel?e.ariaLabel:e.name||e.label,...e.actions||{},...e.extraProps||{},children:e.label},r.key);{let t=e.icon?e.icon:`div`;return(0,N.jsx)(sZ,{tabIndex:`-1`,onClick:r.onClick,disabled:r.disabled,category:o?void 0:e.category,size:`large`,...e.actions||{},...e.extraProps||{},children:(0,N.jsx)(t,{className:`icon`})},r.key)}})})}},lZ=e=>{if(e.command)return{value:e.command,type:`command`};if(e.write)return{value:e.write};if(e.keystroke)return{type:`cursor`,value:e.keystroke}},uZ=class extends S.Component{static propTypes={className:p.string,controlledKeypadMode:p.bool,mode:p.oneOfType([p.string,p.number]),layoutForKeyPad:p.object,onClick:p.func.isRequired,onFocus:p.func,noDecimal:p.bool,additionalKeys:p.array,setKeypadInteraction:p.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(lZ(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=PJ(a);return(0,N.jsx)(cZ,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:AK(MJ(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},dZ=F(`span`)(()=>({display:`inline-flex`,border:`1px solid ${TU()}`,margin:`1px 5px`,cursor:`pointer`,alignItems:`center`,justifyContent:`center`,minWidth:`50px`,minHeight:`36px`,height:`fit-content`})),fZ=F(`div`)(()=>({background:yU(),color:ZH(),display:`inline-flex`,borderRight:`2px solid ${TU()}`,boxSizing:`border-box`,overflow:`hidden`,fontSize:`12px`,minHeight:`36px`,height:`100%`,alignItems:`center`,fontFamily:`Symbola, Times New Roman, serif`,padding:`0 2px`})),pZ=F(`div`)(()=>({flex:8,color:`var(--pie-text, black)`,padding:`4px !important`,display:`flex`,alignItems:`center`,justifyContent:`center`,backgroundColor:`var(--pie-background, rgba(255, 255, 255, 0))`,"& > .mq-math-mode sup.mq-nthroot":{fontSize:`70% !important`,verticalAlign:`1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-overarrow.mq-arrow-both":{marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`}})),mZ=e=>{let{node:t,options:n,selected:r}=e,{attrs:i}=t,{value:a,index:o}=i,s=`R ${parseInt(o)+1}`;return(0,N.jsx)(iS,{className:`math-templated`,"data-selected":r,style:{display:`inline-flex`,minHeight:`36px`,minWidth:`50px`,cursor:`pointer`},children:(0,N.jsxs)(dZ,{...i,children:[(0,N.jsx)(fZ,{children:s}),(0,N.jsx)(pZ,{children:(0,N.jsx)(JX,{latex:a})})]})})};mZ.propTypes={attributes:p.object,value:p.string,keyToDisplay:p.string};var hZ={},gZ=e=>String(e||``).replace(/-/g,`_`),_Z=e=>e&&e.attrs&&e.attrs.index!=null?String(e.attrs.index):null,vZ=(e,t)=>{let n=[];return e.descendants((e,r)=>{if(e.type&&e.type.name===t){let t=_Z(e);t!=null&&n.push({index:t,pos:r,node:e})}return!0}),n},yZ=(e,t)=>{let n=0;return e.descendants(e=>(e.type&&e.type.name===t&&(n+=1),!0)),n},bZ=({schema:e,typeName:t,index:n})=>{let r=e.nodes[t];return r?r.create({index:String(n),id:String(n),value:``}):null},xZ=(e,t)=>{let n=e.resolve(Math.min(t,e.content.size));return H.near(n,1)},SZ=cb.create({name:`responseArea`,addOptions(){return{maxResponseAreas:null,error:null,options:null,respAreaToolbar:null,onHandleAreaChange:null}},addProseMirrorPlugins(){if(!this.options.type)return[];let e=gZ(this.options.type);return[new du({key:new mu(`response-area-watcher:${e}`),view:t=>(hZ[e]===void 0&&(hZ[e]=0,t.state.doc.descendants(t=>{if(t.type&&t.type.name===e){let n=_Z(t);if(n!=null){let t=parseInt(n,10);!Number.isNaN(t)&&t>hZ[e]&&(hZ[e]=t)}}return!0})),{update:(t,n)=>{let r=t.state;if(n.doc.eq(r.doc))return;let i=vZ(r.doc,e),a=vZ(n.doc,e);if(this.options.toolbar&&(this.options.toolbar.disabled=i.length>=this.options.maxResponseAreas),a.length>i.length){let e=new Set(i.map(e=>e.index)),t=a.filter(t=>!e.has(t.index));t.length&&typeof this.options.onHandleAreaChange==`function`&&this.options.onHandleAreaChange(t)}}})})]},addCommands(){return{insertResponseArea:e=>({tr:t,state:n,dispatch:r,commands:i})=>{let a=gZ(e);if(yZ(n.doc,a)>=this.options.maxResponseAreas)return!1;hZ[a]===void 0&&(hZ[a]=0);let o=hZ[a]+1;hZ[a]+=1;let s=bZ({schema:n.schema,typeName:a,index:o});if(!s)return!1;let{selection:c}=n,l=c.from,u=e=>{try{return t.insert(e,s),e}catch{return null}},d=u(l);if(d??=u(t.doc.content.size),d==null)return!1;if([`inline_dropdown`,`explicit_constructed_response`].includes(a))t.setSelection(U.create(t.doc,d));else{let e=d+s.nodeSize;t.setSelection(xZ(t.doc,e))}return r&&(i.focus(),r(t)),!0},refreshResponseArea:()=>({tr:e,state:t,commands:n,dispatch:r})=>{let{selection:i}=t,a=i.$from.nodeAfter,o=i.from;return e.setNodeMarkup(o,void 0,{...a?.attrs,updated:`${Date.now()}`}),e.setSelection(U.create(e.doc,o)),r&&(n.focus(),r(e)),!0}}}}),CZ=Rb.create({name:`explicit_constructed_response`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="explicit_constructed_response"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`explicit_constructed_response`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,N.jsx)(Bz,{...e,options:this.options}))}}),wZ=Rb.create({name:`math_templated`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="math_templated"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`math_templated`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,N.jsx)(mZ,{...e,options:this.options}))}}),TZ=Rb.create({name:`drag_in_the_blank`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},id:{default:null},value:{default:``},inTable:{default:null},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="drag_in_the_blank"]`,getAttrs:e=>({index:e.dataset.index,id:e.dataset.id,value:e.dataset.value,inTable:e.dataset.inTable})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`drag_in_the_blank`,"data-index":e.index,"data-id":e.id,"data-value":e.value,"data-in-table":e.inTable}]},addNodeView(){return fS(e=>(0,N.jsx)(yK,{...e,options:this.options}))}}),EZ=Rb.create({name:`inline_dropdown`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{index:{default:null},value:{default:``},updated:{default:``}}},parseHTML(){return[{tag:`span[data-type="inline_dropdown"]`,getAttrs:e=>({index:e.dataset.index,value:e.dataset.value})}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-type":`inline_dropdown`,"data-index":e.index,"data-value":e.value}]},addNodeView(){return fS(e=>(0,N.jsx)(bK,{...e,options:this.options}))}}),DZ=Vr(`MuiDivider`,[`root`,`absolute`,`fullWidth`,`inset`,`middle`,`flexItem`,`light`,`vertical`,`withChildren`,`withChildrenVertical`,`textAlignRight`,`textAlignLeft`,`wrapper`,`wrapperVertical`]),OZ=Vr(`MuiListItemIcon`,[`root`,`alignItemsFlexStart`]),kZ=Vr(`MuiListItemText`,[`root`,`multiline`,`dense`,`inset`,`primary`,`secondary`]);function AZ(e){return Br(`MuiMenuItem`,e)}var jZ=Vr(`MuiMenuItem`,[`root`,`focusVisible`,`dense`,`disabled`,`divider`,`gutters`,`selected`]);function MZ(e){return Br(`MuiNativeSelect`,e)}var NZ=Vr(`MuiNativeSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]),PZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return _({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`]},MZ,t)},FZ=F(`select`,{name:`MuiNativeSelect`})(({theme:e})=>({MozAppearance:`none`,WebkitAppearance:`none`,userSelect:`none`,borderRadius:0,cursor:`pointer`,"&:focus":{borderRadius:0},[`&.${NZ.disabled}`]:{cursor:`default`},"&[multiple]":{height:`auto`},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>e.variant!==`filled`&&e.variant!==`outlined`,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:`filled`},style:{"&&&":{paddingRight:32}}},{props:{variant:`outlined`},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),IZ=F(FZ,{name:`MuiNativeSelect`,slot:`Select`,shouldForwardProp:wo,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${NZ.multiple}`]:t.multiple}]}})({}),LZ=F(`svg`,{name:`MuiNativeSelect`})(({theme:e})=>({position:`absolute`,right:0,top:`calc(50% - .5em)`,pointerEvents:`none`,color:(e.vars||e).palette.action.active,[`&.${NZ.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:`rotate(180deg)`}},{props:{variant:`filled`},style:{right:7}},{props:{variant:`outlined`},style:{right:7}}]})),RZ=F(LZ,{name:`MuiNativeSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),zZ=S.forwardRef(function(e,t){let{className:n,disabled:r,error:i,IconComponent:a,inputRef:o,variant:s=`standard`,...c}=e,l={...e,disabled:r,variant:s,error:i},u=PZ(l);return(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(IZ,{ownerState:l,className:g(u.select,n),disabled:r,ref:o||t,...c}),e.multiple?null:(0,N.jsx)(RZ,{as:a,ownerState:l,className:u.icon})]})});function BZ(e){return Br(`MuiSelect`,e)}var VZ=Vr(`MuiSelect`,[`root`,`select`,`multiple`,`filled`,`outlined`,`standard`,`disabled`,`focused`,`icon`,`iconOpen`,`iconFilled`,`iconOutlined`,`iconStandard`,`nativeInput`,`error`]);function HZ(e){return e?e.type===`mousedown`||e.type===`pointerdown`||e.type===`touchstart`?`pointer`:e.type===`keydown`||e.type===`click`&&e.detail===0?`keyboard`:null:null}function UZ(e){return e==null||typeof e==`string`&&!e.trim()}function WZ(e,t){return typeof t==`object`&&t?e===t:String(e)===String(t)}var GZ=S.createContext(null);function KZ(){return S.useContext(GZ)}var qZ=GZ.Provider,JZ,YZ=F(FZ,{name:`MuiSelect`,slot:`Select`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`&.${VZ.select}`]:t.select},{[`&.${VZ.select}`]:t[n.variant]},{[`&.${VZ.error}`]:t.error},{[`&.${VZ.multiple}`]:t.multiple}]}})({[`&.${VZ.select}`]:{height:`auto`,minHeight:`1.4375em`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`}}),XZ=F(LZ,{name:`MuiSelect`,slot:`Icon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${L(n.variant)}`],n.open&&t.iconOpen]}})({}),ZZ=F(`input`,{shouldForwardProp:e=>Co(e)&&e!==`classes`,name:`MuiSelect`,slot:`NativeInput`})({bottom:0,left:0,position:`absolute`,opacity:0,pointerEvents:`none`,width:`100%`,boxSizing:`border-box`}),QZ=e=>{let{classes:t,variant:n,disabled:r,multiple:i,open:a,error:o}=e;return _({select:[`select`,n,r&&`disabled`,i&&`multiple`,o&&`error`],icon:[`icon`,`icon${L(n)}`,a&&`iconOpen`,r&&`disabled`],nativeInput:[`nativeInput`]},BZ,t)},$Z=S.forwardRef(function(e,t){let{"aria-describedby":n,"aria-label":r,autoFocus:i,autoWidth:a,children:o,className:s,defaultOpen:c,defaultValue:l,disabled:u,displayEmpty:d,error:f=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:_={},multiple:y,name:b,onBlur:x,onChange:C,onClose:w,onFocus:T,onKeyDown:E,onMouseDown:ee,onOpen:D,open:O,readOnly:te,renderValue:k,required:A,SelectDisplayProps:j={},tabIndex:M,type:ne,value:re,variant:ie=`standard`,...ae}=e,[oe,se]=rR({controlled:re,default:l,name:`Select`}),[ce,le]=rR({controlled:O,default:c,name:`Select`}),ue=S.useRef(null),de=S.useRef(null),[fe,pe]=S.useState(null),{current:me}=S.useRef(O!=null),[he,ge]=S.useState(),[_e,ve]=S.useState(null),ye=sR(t,m),be=S.useCallback(e=>{de.current=e,e&&pe(e)},[]),xe=fe?.parentNode;S.useImperativeHandle(ye,()=>({focus:()=>{de.current.focus()},node:ue.current,value:oe}),[oe]);let Se=fe!==null&&ce;S.useEffect(()=>{if(!Se||!xe||a||typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{ge(xe.clientWidth)});return e.observe(xe),()=>{e.disconnect()}},[Se,xe,a]),S.useEffect(()=>{c&&ce&&fe&&!me&&(ge(a?null:xe.clientWidth),de.current.focus())},[fe,a]),S.useEffect(()=>{i&&de.current.focus()},[i]),S.useEffect(()=>{if(!h)return;let e=XL(de.current).getElementById(h);if(e){let t=()=>{getSelection().isCollapsed&&de.current.focus()};return e.addEventListener(`click`,t),()=>{e.removeEventListener(`click`,t)}}},[h]);let Ce=(e,t)=>{e?(ve(HZ(t)),D&&D(t)):(ve(null),w&&w(t)),me||(ge(a?null:xe.clientWidth),le(e))},we=e=>{ee?.(e),e.button===0&&(e.preventDefault(),de.current.focus(),Ce(!0,e))},Te=e=>{Ce(!1,e)},Ee=S.Children.toArray(o),De=e=>{let t=Ee.find(t=>t.props.value===e.target.value);t!==void 0&&(se(t.props.value),C&&C(e,t))},Oe=e=>t=>{let n;if(t.currentTarget.hasAttribute(`tabindex`)){if(y){n=Array.isArray(oe)?oe.slice():[];let t=oe.indexOf(e.props.value);t===-1?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),oe!==n&&(se(n),C)){let r=t.nativeEvent||t,i=new r.constructor(r.type,r);Object.defineProperty(i,"target",{writable:!0,value:{value:n,name:b}}),C(i,e)}y||Ce(!1,t)}},ke=e=>{te||([` `,`ArrowUp`,`ArrowDown`,`Enter`].includes(e.key)&&(e.preventDefault(),Ce(!0,e)),E?.(e))},Ae=e=>{!Se&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:oe,name:b}}),x(e))};delete ae[`aria-invalid`];let je,Me,Ne=[],Pe=!1;(vG({value:oe})||d)&&(k?je=k(oe):Pe=!0);let Fe=Ee.map(e=>{if(!S.isValidElement(e))return null;let t;if(y){if(!Array.isArray(oe))throw Error(v(2));t=oe.some(t=>WZ(t,e.props.value)),t&&Pe&&Ne.push(e.props.children)}else t=WZ(oe,e.props.value),t&&Pe&&(Me=e.props.children);return S.cloneElement(e,{"aria-selected":t?`true`:`false`,onClick:Oe(e),onKeyUp:t=>{t.key===` `&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:`option`,selected:t,value:void 0,"data-value":e.props.value})});Pe&&(je=y?Ne.length===0?null:Ne.reduce((e,t,n)=>(e.push(t),n<Ne.length-1&&e.push(`, `),e),[]):Me);let Ie=he;!a&&me&&fe&&(Ie=xe.clientWidth);let Le;Le=M===void 0?u?null:0:M;let Re=j.id||(b?`mui-component-select-${b}`:void 0),ze={...e,variant:ie,value:oe,open:Se,error:f},Be=QZ(ze),Ve={..._.PaperProps,...typeof _.slotProps?.paper==`function`?_.slotProps.paper(ze):_.slotProps?.paper},He={..._.MenuListProps,...typeof _.slotProps?.list==`function`?_.slotProps.list(ze):_.slotProps?.list},Ue=Fi();return(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(YZ,{as:`div`,ref:be,tabIndex:Le,role:`combobox`,"aria-controls":Se?Ue:void 0,"aria-disabled":u?`true`:void 0,"aria-expanded":Se?`true`:`false`,"aria-haspopup":`listbox`,"aria-label":r,"aria-labelledby":[h,Re].filter(Boolean).join(` `)||void 0,"aria-describedby":n,"aria-required":A?`true`:void 0,"aria-invalid":f?`true`:void 0,onKeyDown:ke,onMouseDown:u||te?null:we,onBlur:Ae,onFocus:T,...j,ownerState:ze,className:g(j.className,Be.select,s),id:Re,children:UZ(je)?JZ||=(0,N.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):je}),(0,N.jsx)(ZZ,{"aria-invalid":f,value:Array.isArray(oe)?oe.join(`,`):oe,name:b,ref:ue,"aria-hidden":!0,onChange:De,tabIndex:-1,disabled:u,className:Be.nativeInput,autoFocus:i,required:A,...ae,ownerState:ze}),(0,N.jsx)(XZ,{as:p,className:Be.icon,ownerState:ze}),(0,N.jsx)(qZ,{value:_e,children:(0,N.jsx)(oK,{id:`menu-${b||``}`,anchorEl:xe,open:Se,onClose:Te,anchorOrigin:{vertical:`bottom`,horizontal:`center`},transformOrigin:{vertical:`top`,horizontal:`center`},..._,slotProps:{..._.slotProps,list:{"aria-labelledby":h,role:`listbox`,"aria-multiselectable":y?`true`:void 0,disableListWrap:!0,id:Ue,...He},paper:{...Ve,style:{minWidth:Ie,...Ve==null?null:Ve.style}}},children:Fe})})]})}),eQ=GL((0,N.jsx)(`path`,{d:`M7 10l5 5 5-5z`}),`ArrowDropDown`);function tQ(e){return parseInt(e,10)||0}var nQ={shadow:{visibility:`hidden`,position:`absolute`,overflow:`hidden`,height:0,top:0,left:0,transform:`translateZ(0)`}};function rQ(e){for(let t in e)return!1;return!0}function iQ(e){return rQ(e)||e.outerHeightStyle===0&&!e.overflowing}var aQ=S.forwardRef(function(e,t){let{onChange:n,maxRows:r,minRows:i=1,style:a,value:o,...s}=e,{current:c}=S.useRef(o!=null),l=S.useRef(null),u=oR(t,l),d=S.useRef(null),f=S.useRef(null),p=S.useCallback(()=>{let t=l.current,n=f.current;if(!t||!n)return;let a=ZL(t).getComputedStyle(t);if(a.width===`0px`)return{outerHeightStyle:0,overflowing:!1};n.style.width=a.width,n.value=t.value||e.placeholder||`x`,n.value.slice(-1)===`
|
|
331
|
+
`&&(n.value+=` `);let o=a.boxSizing,s=tQ(a.paddingBottom)+tQ(a.paddingTop),c=tQ(a.borderBottomWidth)+tQ(a.borderTopWidth),u=n.scrollHeight;n.value=`x`;let d=n.scrollHeight,p=u;return i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d),{outerHeightStyle:p+(o===`border-box`?s+c:0),overflowing:Math.abs(p-u)<=1}},[r,i,e.placeholder]),m=iR(()=>{let e=l.current,t=p();if(!e||!t||iQ(t))return!1;let n=t.outerHeightStyle;return d.current!=null&&d.current!==n}),h=S.useCallback(()=>{let e=l.current,t=p();if(!e||!t||iQ(t))return;let n=t.outerHeightStyle;d.current!==n&&(d.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?`hidden`:``},[p]),g=S.useRef(-1);return ti(()=>{let e=KL(h),t=l?.current;if(!t)return;let n=ZL(t);n.addEventListener(`resize`,e);let r;return typeof ResizeObserver<`u`&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(g.current),h(),g.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(g.current),n.removeEventListener(`resize`,e),r&&r.disconnect()}},[p,h,m]),ti(()=>{h()}),(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(`textarea`,{value:o,onChange:e=>{c||h();let t=e.target,r=t.value.length,i=t.value.endsWith(`
|
|
332
|
+
`),a=t.selectionStart===r;i&&a&&t.setSelectionRange(r,r),n&&n(e)},ref:u,rows:i,style:a,...s}),(0,N.jsx)(`textarea`,{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:{...nQ.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function oQ(e){return Br(`MuiInputBase`,e)}var sQ=Vr(`MuiInputBase`,[`root`,`formControl`,`focused`,`disabled`,`adornedStart`,`adornedEnd`,`error`,`sizeSmall`,`multiline`,`colorSecondary`,`fullWidth`,`hiddenLabel`,`readOnly`,`input`,`inputSizeSmall`,`inputMultiline`,`inputTypeSearch`,`inputAdornedStart`,`inputAdornedEnd`,`inputHiddenLabel`]),cQ,lQ=`mui-auto-fill`,uQ=`mui-auto-fill-cancel`,dQ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size===`small`&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${L(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},fQ=(e,t)=>{let{ownerState:n}=e;return[t.input,n.size===`small`&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type===`search`&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},pQ=e=>{let{classes:t,color:n,disabled:r,error:i,endAdornment:a,focused:o,formControl:s,fullWidth:c,hiddenLabel:l,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e;return _({root:[`root`,`color${L(n)}`,r&&`disabled`,i&&`error`,c&&`fullWidth`,o&&`focused`,s&&`formControl`,f&&f!==`medium`&&`size${L(f)}`,u&&`multiline`,p&&`adornedStart`,a&&`adornedEnd`,l&&`hiddenLabel`,d&&`readOnly`],input:[`input`,r&&`disabled`,m===`search`&&`inputTypeSearch`,u&&`inputMultiline`,f===`small`&&`inputSizeSmall`,l&&`inputHiddenLabel`,p&&`inputAdornedStart`,a&&`inputAdornedEnd`,d&&`readOnly`]},oQ,t)},mQ=F(`div`,{name:`MuiInputBase`,slot:`Root`,overridesResolver:dQ})(Do(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:`1.4375em`,boxSizing:`border-box`,position:`relative`,cursor:`text`,display:`inline-flex`,alignItems:`center`,[`&.${sQ.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:`default`},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:`4px 0 5px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:`100%`}}]}))),hQ=F(`input`,{name:`MuiInputBase`,slot:`Input`,overridesResolver:fQ})(Do(({theme:e})=>{let t=e.palette.mode===`light`,n={color:`currentColor`,...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create(`opacity`,{duration:e.transitions.duration.shorter})},r={opacity:`0 !important`},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:`inherit`,letterSpacing:`inherit`,color:`currentColor`,padding:`4px 0 5px`,border:0,boxSizing:`content-box`,background:`none`,height:`1.4375em`,margin:0,WebkitTapHighlightColor:`transparent`,display:`block`,minWidth:0,width:`100%`,"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:`none`},"&::-webkit-search-decoration":{WebkitAppearance:`none`},[`label[data-shrink=false] + .${sQ.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${sQ.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:uQ,animationDuration:`10ms`,"&:-webkit-autofill":{animationDuration:`5000s`,animationName:lQ}}},{props:{size:`small`},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:`auto`,resize:`none`,padding:0,paddingTop:0}},{props:{type:`search`},style:{MozAppearance:`textfield`}}]}})),gQ=To({[`@keyframes ${lQ}`]:{from:{animationName:lQ}},[`@keyframes ${uQ}`]:{from:{animationName:uQ}}}),_Q=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiInputBase`}),{"aria-describedby":r,autoComplete:i,autoFocus:a,className:o,color:s,components:c={},componentsProps:l={},defaultValue:u,disabled:d,disableInjectingGlobalStyles:f,endAdornment:p,error:m,fullWidth:h=!1,id:_,inputComponent:y=`input`,inputProps:b={},inputRef:x,margin:C,maxRows:w,minRows:T,multiline:E=!1,name:ee,onBlur:D,onChange:O,onClick:te,onFocus:k,onKeyDown:A,onKeyUp:j,placeholder:M,readOnly:ne,renderSuffix:re,rows:ie,size:ae,slotProps:oe={},slots:se={},startAdornment:ce,type:le=`text`,value:ue,...de}=n,fe=b.value==null?ue:b.value,{current:pe}=S.useRef(fe!=null),me=S.useRef(),he=S.useCallback(e=>{},[]),ge=sR(me,x,b.ref,he),[_e,ve]=S.useState(!1),ye=oG(),be=iG({props:n,muiFormControl:ye,states:[`color`,`disabled`,`error`,`hiddenLabel`,`size`,`required`,`filled`]});be.focused=ye?ye.focused:_e,S.useEffect(()=>{!ye&&d&&_e&&(ve(!1),D&&D())},[ye,d,_e,D]);let xe=ye&&ye.onFilled,Se=ye&&ye.onEmpty,Ce=S.useCallback(e=>{vG(e)?xe&&xe():Se&&Se()},[xe,Se]);eR(()=>{pe&&Ce({value:fe})},[fe,Ce,pe]),eR(()=>{if(!a)return;let e=me.current;if(!e)return;let t=XL(e),n=QV(t),r=n==null||n===t.body||n===t.documentElement;e===n?ye&&ye.onFocus?ye.onFocus():ve(!0):r&&e.focus()},[a]);let we=e=>{k&&k(e),b.onFocus&&b.onFocus(e),ye&&ye.onFocus?ye.onFocus(e):ve(!0)},Te=e=>{D&&D(e),b.onBlur&&b.onBlur(e),ye&&ye.onBlur?ye.onBlur(e):ve(!1)},Ee=(e,...t)=>{if(!pe){let t=e.target||me.current;if(t==null)throw Error(v(1));Ce({value:t.value})}b.onChange&&b.onChange(e,...t),O&&O(e,...t)};S.useEffect(()=>{Ce(me.current)},[]);let De=e=>{me.current&&e.currentTarget===e.target&&me.current.focus(),te&&te(e)},Oe=y,ke=b;E&&Oe===`input`&&(ke=ie?{type:void 0,minRows:ie,maxRows:ie,...ke}:{type:void 0,maxRows:w,minRows:T,...ke},Oe=aQ);let Ae=e=>{Ce(e.animationName===uQ?me.current:{value:`x`})};S.useEffect(()=>{ye&&ye.setAdornedStart(!!ce)},[ye,ce]);let je={...n,color:be.color||`primary`,disabled:be.disabled,endAdornment:p,error:be.error,focused:be.focused,formControl:ye,fullWidth:h,hiddenLabel:be.hiddenLabel,multiline:E,size:be.size,startAdornment:ce,type:le},Me=pQ(je),Ne=se.root||c.Root||mQ,Pe=oe.root||l.root||{},Fe=se.input||c.Input||hQ;return ke={...ke,...oe.input??l.input},(0,N.jsxs)(S.Fragment,{children:[!f&&typeof gQ==`function`&&(cQ||=(0,N.jsx)(gQ,{})),(0,N.jsxs)(Ne,{...Pe,ref:t,onClick:De,...de,...!kV(Ne)&&{ownerState:{...je,...Pe.ownerState}},className:g(Me.root,Pe.className,o,ne&&`MuiInputBase-readOnly`),children:[ce,(0,N.jsx)(aG.Provider,{value:null,children:(0,N.jsx)(Fe,{"aria-invalid":be.error,"aria-describedby":r,autoComplete:i,autoFocus:a,defaultValue:u,disabled:be.disabled,id:_,onAnimationStart:Ae,name:ee,placeholder:M,readOnly:ne,required:be.required,rows:ie,value:fe,onKeyDown:A,onKeyUp:j,type:le,...ke,...!kV(Fe)&&{as:Oe,ownerState:{...je,...ke.ownerState}},ref:ge,className:g(Me.input,ke.className,ne&&`MuiInputBase-readOnly`),onBlur:Te,onChange:Ee,onFocus:we})}),p,re?re({...be,startAdornment:ce}):null]})]})});function vQ(e){return Br(`MuiInput`,e)}var yQ={...sQ,...Vr(`MuiInput`,[`root`,`underline`,`input`])},bQ=e=>{let{classes:t,disableUnderline:n}=e,r=_({root:[`root`,!n&&`underline`],input:[`input`]},vQ,t);return{...t,...r}},xQ=F(mQ,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...dQ(e,t),!n.disableUnderline&&t.underline]}})(Do(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`;return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:`relative`,variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${yQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${yQ.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${yQ.disabled}, .${yQ.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${yQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),SQ=F(hQ,{name:`MuiInput`,slot:`Input`,overridesResolver:fQ})({}),CQ=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,inputComponent:s=`input`,multiline:c=!1,slotProps:l,slots:u={},type:d=`text`,...f}=n,p=bQ(n),m={root:{ownerState:{disableUnderline:r}}},h=l??a?E(l??a,m):m;return(0,N.jsx)(_Q,{slots:{root:u.root??i.Root??xQ,input:u.input??i.Input??SQ},slotProps:h,fullWidth:o,inputComponent:s,multiline:c,ref:t,type:d,...f,classes:p})});CQ.muiName=`Input`;function wQ(e){return Br(`MuiFilledInput`,e)}var TQ={...sQ,...Vr(`MuiFilledInput`,[`root`,`underline`,`input`,`adornedStart`,`adornedEnd`,`sizeSmall`,`multiline`,`hiddenLabel`])},EQ=e=>{let{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:a,hiddenLabel:o,multiline:s}=e,c=_({root:[`root`,!n&&`underline`,r&&`adornedStart`,i&&`adornedEnd`,a===`small`&&`size${L(a)}`,o&&`hiddenLabel`,s&&`multiline`],input:[`input`]},wQ,t);return{...t,...c}},DQ=F(mQ,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiFilledInput`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[...dQ(e,t),!n.disableUnderline&&t.underline]}})(Do(({theme:e})=>{let t=e.palette.mode===`light`,n=t?`rgba(0, 0, 0, 0.42)`:`rgba(255, 255, 255, 0.7)`,r=t?`rgba(0, 0, 0, 0.06)`:`rgba(255, 255, 255, 0.09)`,i=t?`rgba(0, 0, 0, 0.09)`:`rgba(255, 255, 255, 0.13)`,a=t?`rgba(0, 0, 0, 0.12)`:`rgba(255, 255, 255, 0.12)`;return{position:`relative`,backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${TQ.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${TQ.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:a},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:`""`,position:`absolute`,right:0,transform:`scaleX(0)`,transition:e.transitions.create(`transform`,{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:`none`},[`&.${TQ.focused}:after`]:{transform:`scaleX(1) translateX(0)`},[`&.${TQ.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:`""`,position:`absolute`,right:0,transition:e.transitions.create(`border-bottom-color`,{duration:e.transitions.duration.shorter}),pointerEvents:`none`},[`&:hover:not(.${TQ.disabled}, .${TQ.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${TQ.disabled}:before`]:{borderBottomStyle:`dotted`}}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:`25px 12px 8px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}}]}})),OQ=F(hQ,{name:`MuiFilledInput`,slot:`Input`,overridesResolver:fQ})(Do(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:`inherit`,borderTopRightRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&e.size===`small`,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),kQ=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiFilledInput`}),{disableUnderline:r=!1,components:i={},componentsProps:a,fullWidth:o=!1,hiddenLabel:s,inputComponent:c=`input`,multiline:l=!1,slotProps:u,slots:d={},type:f=`text`,...p}=n,m={...n,disableUnderline:r,fullWidth:o,inputComponent:c,multiline:l,type:f},h=EQ(n),g={root:{ownerState:m},input:{ownerState:m}},_=u??a?E(g,u??a):g;return(0,N.jsx)(_Q,{slots:{root:d.root??i.Root??DQ,input:d.input??i.Input??OQ},slotProps:_,fullWidth:o,inputComponent:c,multiline:l,ref:t,type:f,...p,classes:h})});kQ.muiName=`Input`;var AQ,jQ=F(`fieldset`,{name:`MuiNotchedOutlined`,shouldForwardProp:wo})({textAlign:`left`,position:`absolute`,bottom:0,right:0,top:-5,left:0,margin:0,padding:`0 8px`,pointerEvents:`none`,borderRadius:`inherit`,borderStyle:`solid`,borderWidth:1,overflow:`hidden`,minWidth:`0%`}),MQ=F(`legend`,{name:`MuiNotchedOutlined`,shouldForwardProp:wo})(Do(({theme:e})=>({float:`unset`,width:`auto`,overflow:`hidden`,variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:`11px`,transition:e.transitions.create(`width`,{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:`block`,padding:0,height:11,fontSize:`0.75em`,visibility:`hidden`,maxWidth:.01,transition:e.transitions.create(`max-width`,{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:`nowrap`,"& > span":{paddingLeft:5,paddingRight:5,display:`inline-block`,opacity:0,visibility:`visible`}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:`100%`,transition:e.transitions.create(`max-width`,{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function NQ(e){let{children:t,classes:n,className:r,label:i,notched:a,...o}=e,s=i!=null&&i!==``,c={...e,notched:a,withLabel:s};return(0,N.jsx)(jQ,{"aria-hidden":!0,className:r,ownerState:c,...o,children:(0,N.jsx)(MQ,{ownerState:c,children:s?(0,N.jsx)(`span`,{children:i}):AQ||=(0,N.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``})})})}function PQ(e){return Br(`MuiOutlinedInput`,e)}var FQ={...sQ,...Vr(`MuiOutlinedInput`,[`root`,`notchedOutline`,`input`])},IQ=e=>{let{classes:t}=e,n=_({root:[`root`],notchedOutline:[`notchedOutline`],input:[`input`]},PQ,t);return{...t,...n}},LQ=F(mQ,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiOutlinedInput`,slot:`Root`,overridesResolver:dQ})(Do(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{position:`relative`,borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${FQ.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${FQ.focused} .${FQ.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{[`&.${FQ.focused} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${FQ.error} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${FQ.disabled} .${FQ.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:`16.5px 14px`}},{props:({ownerState:e,size:t})=>e.multiline&&t===`small`,style:{padding:`8.5px 14px`}}]}})),RQ=F(NQ,{name:`MuiOutlinedInput`,slot:`NotchedOutline`})(Do(({theme:e})=>{let t=e.palette.mode===`light`?`rgba(0, 0, 0, 0.23)`:`rgba(255, 255, 255, 0.23)`;return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),zQ=F(hQ,{name:`MuiOutlinedInput`,slot:`Input`,overridesResolver:fQ})(Do(({theme:e})=>({padding:`16.5px 14px`,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode===`light`?null:`0 0 0 100px #266798 inset`,WebkitTextFillColor:e.palette.mode===`light`?null:`#fff`,caretColor:e.palette.mode===`light`?null:`#fff`,borderRadius:`inherit`}},...e.vars&&{"&:-webkit-autofill":{borderRadius:`inherit`},[e.getColorSchemeSelector(`dark`)]:{"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 100px #266798 inset`,WebkitTextFillColor:`#fff`,caretColor:`#fff`}}},variants:[{props:{size:`small`},style:{padding:`8.5px 14px`}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),BQ=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiOutlinedInput`}),{components:r={},fullWidth:i=!1,inputComponent:a=`input`,label:o,multiline:s=!1,notched:c,slots:l={},slotProps:u={},type:d=`text`,...f}=n,p=IQ(n),m=oG(),h=iG({props:n,muiFormControl:m,states:[`color`,`disabled`,`error`,`focused`,`hiddenLabel`,`size`,`required`]}),g={...n,color:h.color||`primary`,disabled:h.disabled,error:h.error,focused:h.focused,formControl:m,fullWidth:i,hiddenLabel:h.hiddenLabel,multiline:s,size:h.size,type:d},_=l.root??r.Root??LQ,v=l.input??r.Input??zQ,[y,b]=hH(`notchedOutline`,{elementType:RQ,className:p.notchedOutline,shouldForwardComponentProp:!0,ownerState:g,externalForwardedProps:{slots:l,slotProps:u},additionalProps:{label:o!=null&&o!==``&&h.required?(0,N.jsxs)(S.Fragment,{children:[o,` `,`*`]}):o}});return(0,N.jsx)(_Q,{slots:{root:_,input:v},slotProps:u,renderSuffix:e=>(0,N.jsx)(y,{...b,notched:c===void 0?!!(e.startAdornment||e.filled||e.focused):c}),fullWidth:i,inputComponent:a,multiline:s,ref:t,type:d,...f,classes:{...p,notchedOutline:null}})});BQ.muiName=`Input`;var VQ=e=>{let{classes:t}=e,n=_({root:[`root`]},BZ,t);return{...t,...n}},HQ={name:`MuiSelect`,slot:`Root`,shouldForwardProp:e=>wo(e)&&e!==`variant`},UQ=F(CQ,HQ)(``),WQ=F(BQ,HQ)(``),GQ=F(kQ,HQ)(``),KQ=S.forwardRef(function(e,t){let n=I({name:`MuiSelect`,props:e}),{autoWidth:r=!1,children:i,classes:a={},className:o,defaultOpen:s=!1,displayEmpty:c=!1,IconComponent:l=eQ,id:u,input:d,inputProps:f,label:p,labelId:m,MenuProps:h,multiple:_=!1,native:v=!1,onClose:y,onOpen:b,open:x,renderValue:C,SelectDisplayProps:w,variant:T=`outlined`,...ee}=n,D=v?zZ:$Z,O=iG({props:n,muiFormControl:oG(),states:[`variant`,`error`]}),te=O.variant||T,k={...n,variant:te,classes:a},A=VQ(k),{root:j,...M}=A,ne=d||{standard:(0,N.jsx)(UQ,{ownerState:k}),outlined:(0,N.jsx)(WQ,{label:p,ownerState:k}),filled:(0,N.jsx)(GQ,{ownerState:k})}[te],re=sR(t,AV(ne));return(0,N.jsx)(S.Fragment,{children:S.cloneElement(ne,{inputComponent:D,inputProps:{children:i,error:O.error,IconComponent:l,variant:te,type:void 0,multiple:_,...v?{id:u}:{autoWidth:r,defaultOpen:s,displayEmpty:c,labelId:m,MenuProps:h,onClose:y,onOpen:b,open:x,renderValue:C,SelectDisplayProps:{id:u,...w}},...f,classes:f?E(M,f.classes):M,...d?d.props.inputProps:{}},...(_&&v||c)&&te===`outlined`?{notched:!0}:{},ref:re,className:g(ne.props.className,o,A.root),...!d&&{variant:te},...ee})})});KQ.muiName=`Select`;function qQ(e,t){if(t==null){e.focus();return}try{e.focus({focusVisible:t===`keyboard`})}catch{e.focus()}}var JQ=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},YQ=e=>{let{disabled:t,dense:n,divider:r,disableGutters:i,selected:a,classes:o}=e,s=_({root:[`root`,n&&`dense`,t&&`disabled`,!i&&`gutters`,r&&`divider`,a&&`selected`]},AZ,o);return{...o,...s}},XQ=F(cz,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiMenuItem`,slot:`Root`,overridesResolver:JQ})(Do(({theme:e})=>({...e.typography.body1,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:`border-box`,whiteSpace:`nowrap`,"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}},[`&.${jZ.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${jZ.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${jZ.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${jZ.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${jZ.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${DZ.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${DZ.inset}`]:{marginLeft:52},[`& .${kZ.root}`]:{marginTop:0,marginBottom:0},[`& .${kZ.inset}`]:{paddingLeft:36},[`& .${OZ.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up(`sm`)]:{minHeight:`auto`}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${OZ.root} svg`]:{fontSize:`1.25rem`}}}]}))),ZQ=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiMenuItem`}),{autoFocus:r=!1,component:i=`li`,dense:a=!1,divider:o=!1,disableGutters:s=!1,focusVisibleClassName:c,role:l=`menuitem`,tabIndex:u,className:d,...f}=n,p=KZ(),m=S.useContext(HG),h=S.useMemo(()=>({dense:a||m.dense||!1,disableGutters:s}),[m.dense,a,s]),_=S.useRef(null);eR(()=>{r&&_.current&&qQ(_.current,p)},[r]);let v={...n,dense:h.dense,divider:o,disableGutters:s},y=YQ(n),b=sR(_,t),{root:x,...C}=y,w;return n.disabled||(w=u===void 0?-1:u),(0,N.jsx)(HG.Provider,{value:h,children:(0,N.jsx)(XQ,{ref:b,role:l,tabIndex:w,component:i,focusVisibleClassName:g(y.focusVisible,c),className:g(y.root,d),...f,ownerState:v,classes:C})})}),QQ=()=>{document.querySelectorAll(`.mq-supsub.mq-sup-only`).forEach(e=>{let t=e.previousElementSibling;t&&t.classList.contains(`mq-non-leaf`)&&t.querySelector(`.mq-fraction`)?e.classList.add(`mq-after-fraction-group`):e.classList.remove(`mq-after-fraction-group`)})},{commonMqFontStyles:$Q,commonMqKeyboardStyles:e$,longdivStyles:t$,supsubStyles:n$}=$X,r$=m(`@pie-lib:math-toolbar:editor-and-pad`),i$=/\.|,/g,a$=F(`div`)(({theme:e})=>({zIndex:9,position:`relative`,textAlign:`center`,width:`auto`,"& > .mq-math-mode":{border:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`dotted 1px ${e.palette.primary.main}`,borderRadius:`0px`},"& .mq-overarrow-inner":{border:`none !important`,paddingTop:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.8px`,marginTop:`0px`,minWidth:`1.23em`},"& .mq-parallelogram":{lineHeight:.85}})),o$=F(`div`)(({theme:e,hide:t})=>({display:t?`none`:`flex`,alignItems:`center`,"& .mq-editable-field .mq-cursor":{top:`-4px`},"& .mq-math-mode .mq-selection, .mq-editable-field .mq-selection":{paddingTop:`18px`},"& .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& .mq-math-mode .mq-overline .mq-overline-inner":{paddingTop:`0.4em !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.45em`,left:`-1px`},"&:after":{position:`absolute !important`,top:`0px !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& *":{...$Q,...n$,...t$,"& .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& .mq-math-mode .mq-empty":{padding:`9px 1px !important`},"& .mq-math-mode .mq-root-block":{paddingTop:`10px`},"& .mq-scaled .mq-sqrt-prefix":{top:`0 !important`},"& .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`4px !important`,paddingTop:`6px !important`,paddingLeft:`6px !important`},"& .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`}},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),s$=F(CG)({flex:`initial`,width:`25%`,minWidth:`100px`,marginLeft:`15px`,marginTop:`5px`,marginBottom:`5px`,marginRight:`5px`,"& label":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& div":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}),c$=F(gG)(()=>({backgroundColor:`transparent`})),l$=F(`div`)(({theme:e,error:t})=>({minWidth:`500px`,maxWidth:`900px`,minHeight:`30px`,width:`100%`,display:`flex`,marginTop:e.spacing(1),marginBottom:e.spacing(1),...t&&{border:`2px solid red`},"& .mq-sqrt-prefix .mq-scaled":{verticalAlign:`middle !important`}})),u$=F(HX)(({controlledKeypadMode:e})=>({maxWidth:e?`400px`:`500px`,color:ZH(),backgroundColor:vU(),padding:`2px`})),d$=F(WW)({position:`absolute`,right:`12px`,border:`1px solid lightgrey`,color:ZH()}),f$=F(`hr`)(({theme:e})=>({padding:0,margin:0,height:`1px`,border:`none`,borderBottom:`solid 1px ${e.palette.primary.main}`})),p$=F(uZ)(({mode:e})=>({...e$,...e===`language`&&{"& *":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}}})),m$=e=>{if(!e)return;let{type:t,value:n}=e;return t===`command`||t===`cursor`?e:t===`answer`?{type:`answer`,...e}:n===`clear`?{type:`clear`}:{type:`write`,value:n}},h$=class extends S.Component{static propTypes={classNames:p.object,keypadMode:p.oneOfType([p.string,p.number]),autoFocus:p.bool,allowAnswerBlock:p.bool,showKeypad:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,error:p.string,noDecimal:p.bool,hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,maxResponseAreas:p.number,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onFocus:p.func,onBlur:p.func,onChange:p.func.isRequired,setKeypadInteraction:p.func};constructor(e){super(e),this.state={equationEditor:`item-authoring`,addDisabled:!1}}componentDidMount(){this.input&&this.props.autoFocus&&setTimeout(()=>this.input.focus(),0)}onClick=e=>{let{noDecimal:t,noLatexHandling:n,onChange:r}=this.props,i=m$(e);if(r$(`mathChange: `,i),n){r(i.value);return}t&&(i.value===`.`||i.value===`,`)||i&&(i.type===`clear`?(r$(`call clear...`),this.input.clear()):i.type===`command`?this.input.command(i.value):i.type===`cursor`?this.input.keystroke(i.value):i.type===`answer`?this.input.write(`%response%`):this.input.write(i.value))};updateDisable=e=>{let{maxResponseAreas:t}=this.props;if(t){let n=this.checkResponseAreasNumber(t,e);this.setState({addDisabled:n})}};onAnswerBlockClick=()=>{this.props.onAnswerBlockAdd(),this.onClick({type:`answer`}),this.updateDisable(!0)};onEditorChange=e=>{let{onChange:t,noDecimal:n}=this.props;if(FJ(),QQ(),this.updateDisable(!0),n&&(e.indexOf(`.`)!==-1||e.indexOf(`,`)!==-1)&&this.input){this.input.clear(),this.input.write(e.replace(i$,``));return}let r=e.match(/[0-9]\\ \\frac\{[^\{]*\}\{ \}/);if(this.input&&r&&r?.length){try{this.input.mathField.__controller.cursor.insLeftOf(this.input.mathField.__controller.cursor.parent[-1].parent),this.input.mathField.el().dispatchEvent(new KeyboardEvent(`keydown`,{keyCode:8}))}catch(e){console.error(e.toString())}return}t(e)};shouldComponentUpdate(e,t){let n=this.input.mathField.latex()!==e.latex;return r$(`[shouldComponentUpdate] `,`inputIsDifferent: `,n),!es(this.props.error,e.error)||!n&&this.props.keypadMode!==e.keypadMode||!n&&this.props.noDecimal!==e.noDecimal||!n&&this.state.equationEditor!==t.equationEditor?!0:!n&&this.props.controlledKeypad?this.props.showKeypad!==e.showKeypad:n}onEditorTypeChange=e=>{this.setState({equationEditor:e.target.value})};checkResponseAreasNumber=(e,t)=>{let{latex:n}=this.input&&this.input.props||{};if(n){let r=(n.match(/answerBlock/g)||[]).length;return t?r===e-1:r===e}return!1};render(){let{classNames:e,keypadMode:t,allowAnswerBlock:n,additionalKeys:r,controlledKeypad:i,controlledKeypadMode:a,showKeypad:o,setKeypadInteraction:s,noDecimal:c,hideInput:l,layoutForKeyPad:u,latex:d,onFocus:f,onBlur:p,error:m}=this.props,h=!i||i&&o,{addDisabled:g}=this.state;return r$(`[render]`,d),(0,N.jsxs)(a$,{className:e.mathToolbar,children:[(0,N.jsxs)(o$,{hide:l,children:[a&&(0,N.jsxs)(s$,{variant:`standard`,children:[(0,N.jsx)(c$,{id:`equation-editor-label`,children:`Equation Editor`}),(0,N.jsxs)(KQ,{labelId:`equation-editor-label`,id:`equation-editor-select`,name:`equationEditor`,label:`Equation Editor`,onChange:this.onEditorTypeChange,value:this.state.equationEditor,MenuProps:{transitionDuration:{enter:225,exit:195}},children:[(0,N.jsx)(ZQ,{value:`non-negative-integers`,children:`Numeric - Non-Negative Integers`}),(0,N.jsx)(ZQ,{value:`integers`,children:`Numeric - Integers`}),(0,N.jsx)(ZQ,{value:`decimals`,children:`Numeric - Decimals`}),(0,N.jsx)(ZQ,{value:`fractions`,children:`Numeric - Fractions`}),(0,N.jsx)(ZQ,{value:1,children:`Grade 1 - 2`}),(0,N.jsx)(ZQ,{value:3,children:`Grade 3 - 5`}),(0,N.jsx)(ZQ,{value:6,children:`Grade 6 - 7`}),(0,N.jsx)(ZQ,{value:8,children:`Grade 8 - HS`}),(0,N.jsx)(ZQ,{value:`geometry`,children:`Geometry`}),(0,N.jsx)(ZQ,{value:`advanced-algebra`,children:`Advanced Algebra`}),(0,N.jsx)(ZQ,{value:`statistics`,children:`Statistics`}),(0,N.jsx)(ZQ,{value:`item-authoring`,children:`Item Authoring`})]})]}),(0,N.jsx)(l$,{error:m,children:(0,N.jsx)(u$,{onFocus:()=>{f&&f(),this.updateDisable(!1)},onBlur:e=>{this.updateDisable(!1),p&&p(e)},className:e&&e.editor||``,controlledKeypadMode:a,ref:e=>this.input=e,latex:d,onChange:this.onEditorChange})})]}),n&&(0,N.jsx)(d$,{type:`primary`,style:{bottom:h?`320px`:`20px`},onClick:this.onAnswerBlockClick,disabled:g,children:`+ Response Area`}),(0,N.jsx)(f$,{}),h&&(0,N.jsx)(p$,{mode:a?this.state.equationEditor:t,controlledKeypadMode:a,layoutForKeyPad:u,additionalKeys:r,onClick:this.onClick,noDecimal:c,setKeypadInteraction:s})]})}},g$=F(Dz)(({hideBackground:e})=>({verticalAlign:`top`,width:`28px`,height:`28px`,color:`#00bb00`,...e&&{backgroundColor:NU(),"&:hover":{backgroundColor:yU()}},"& .MuiIconButton-label":{position:`absolute`,top:`2px`}})),_$=({onClick:e,hideBackground:t})=>(0,N.jsx)(g$,{"aria-label":`Done`,onClick:e,hideBackground:t,size:`large`,children:(0,N.jsx)(Az,{})});_$.propTypes={onClick:p.func,hideBackground:p.bool};var v$=_$,{commonMqFontStyles:y$,longdivStyles:b$,supsubStyles:x$}=$X,S$=m(`@pie-lib:math-toolbar:math-preview`),C$=F(`div`)(({theme:e,isSelected:t})=>({display:`inline-flex`,alignItems:`center`,position:`relative`,"& *":y$,...x$,...b$,"& > .mq-math-mode":{border:t?`solid 0px lightgrey`:`solid 1px lightgrey`},"& > .mq-focused":{outline:`none`,boxShadow:`none`,border:`solid 1px black`,borderRadius:`0px`},"& > .mq-math-mode .mq-root-block":{paddingTop:`7px !important`},"& > .mq-math-mode .mq-overarc ":{paddingTop:`0.45em !important`},"& > .mq-math-mode .mq-sqrt-prefix":{verticalAlign:`baseline !important`,top:`1px !important`,left:`-0.1em !important`},"& > .mq-math-mode .mq-denominator":{marginTop:`-5px !important`,padding:`0.5em 0.1em 0.1em !important`},"& > .mq-math-mode .mq-numerator, .mq-math-mode .mq-over":{padding:`0 0.1em !important`,paddingBottom:`0 !important`,marginBottom:`-2px`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty":{paddingTop:`6px !important`,paddingLeft:`4px !important`},"& > .mq-math-mode .mq-longdiv .mq-longdiv-inner":{marginLeft:`0 !important`},"& > .mq-math-mode .mq-overarrow":{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},"& > .mq-math-mode .mq-paren":{verticalAlign:`top !important`,padding:`1px 0.1em !important`},"& > .mq-math-mode .mq-sqrt-stem":{borderTop:`0.07em solid`,marginLeft:`-1.5px`,marginTop:`-2px !important`,paddingTop:`5px !important`},"& .mq-overarrow-inner":{paddingTop:`0 !important`,border:`none !important`},"& .mq-editable-field .mq-cursor":{marginTop:`-15px !important`},"& .mq-overarrow.mq-arrow-both":{top:`7.5px`,marginTop:`0px`,minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`0px !important`,position:`absolute !important`,right:`-2px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85},'& span[data-prime="true"]':{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`},...t&&{border:`solid 1px ${e.palette.primary.main}`}})),w$=F(`span`)({position:`absolute`,bottom:0,left:0,right:0,top:0}),T$=class extends S.Component{static propTypes={latex:p.string,isSelected:p.bool,onFocus:p.func,onBlur:p.func};componentDidMount(){QQ()}componentDidUpdate(e){this.props.latex!==e.latex&&QQ()}render(){let{isSelected:e,onFocus:t,onBlur:n,latex:r}=this.props;return S$(`[render] latex: `,r),(0,N.jsxs)(C$,{isSelected:e,children:[` `,(0,N.jsx)(w$,{}),(0,N.jsx)(JX,{latex:r,onFocus:t,onBlur:n})]})}},E$=F(`div`)({display:`flex`,width:`100%`,zIndex:8,alignItems:`center`}),D$=class extends S.Component{static propTypes={autoFocus:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,keypadMode:p.oneOfType([p.string,p.number]),classNames:p.object,error:p.string,maxResponseAreas:p.number,showKeypad:p.bool,noDecimal:p.bool,additionalKeys:p.array,latex:p.string.isRequired,onAnswerBlockAdd:p.func,onChange:p.func,onDone:p.func.isRequired,onFocus:p.func,onBlur:p.func,hideDoneButton:p.bool,keyPadCharacterRef:p.func,setKeypadInteraction:p.func};static defaultProps={classNames:{},keypadMode:`item-authoring`,autoFocus:!1,allowAnswerBlock:!1,controlledKeypad:!1,controlledKeypadMode:!1,noDecimal:!1,showKeypad:!0,additionalKeys:[],onChange:()=>{},onAnswerBlockAdd:()=>{},onFocus:()=>{},hideDoneButton:!1};constructor(e){super(e),this.state={latex:e.latex}}done=()=>{this.props.onDone(this.state.latex)};UNSAFE_componentWillReceiveProps(e){this.setState({latex:e.latex})}onChange=e=>{this.setState({latex:e}),this.props.onChange(e)};render(){let{latex:e}=this.state,{classNames:t,autoFocus:n,allowAnswerBlock:r,onAnswerBlockAdd:i,controlledKeypad:a,controlledKeypadMode:o,keypadMode:s,noDecimal:c,additionalKeys:l,showKeypad:u,onFocus:d,onBlur:f,hideDoneButton:p,error:m,keyPadCharacterRef:h,setKeypadInteraction:g,maxResponseAreas:_}=this.props;return(0,N.jsx)(O$,{autoFocus:n,classNames:t,onAnswerBlockAdd:i,allowAnswerBlock:r,latex:e,additionalKeys:l,noDecimal:c,keypadMode:s,keyPadCharacterRef:h,setKeypadInteraction:g,onChange:this.onChange,onDone:this.done,onFocus:d,onBlur:f,showKeypad:u,controlledKeypad:a,controlledKeypadMode:o,hideDoneButton:p,error:m,maxResponseAreas:_})}},O$=class extends S.Component{static propTypes={classNames:p.object,latex:p.string.isRequired,keypadMode:p.oneOfType([p.string,p.number]),hideInput:p.bool,noLatexHandling:p.bool,layoutForKeyPad:p.object,onChange:p.func.isRequired,onDone:p.func.isRequired,onBlur:p.func,onAnswerBlockAdd:p.func,additionalKeys:p.array,onFocus:p.func,autoFocus:p.bool,noDecimal:p.bool,allowAnswerBlock:p.bool,controlledKeypad:p.bool,controlledKeypadMode:p.bool,showKeypad:p.bool,hideDoneButton:p.bool,hideDoneButtonBackground:p.bool,error:p.any,maxResponseAreas:p.number,keyPadCharacterRef:p.object,setKeypadInteraction:p.func};static defaultProps={classNames:{},hideDoneButtonBackground:!1};render(){let{classNames:e,autoFocus:t,allowAnswerBlock:n,onAnswerBlockAdd:r,controlledKeypad:i,controlledKeypadMode:a,additionalKeys:o,showKeypad:s,keypadMode:c,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,keyPadCharacterRef:p,setKeypadInteraction:m,latex:h,onChange:g,onDone:_,onFocus:v,onBlur:y,hideDoneButton:b,hideDoneButtonBackground:x,error:S,maxResponseAreas:C}=this.props;return(0,N.jsxs)(E$,{className:e&&e.toolbar||``,ref:p,children:[(0,N.jsx)(`div`,{}),(0,N.jsx)(h$,{autoFocus:t,keypadMode:c,classNames:e||{},controlledKeypad:i,controlledKeypadMode:a,noDecimal:l,hideInput:u,noLatexHandling:d,layoutForKeyPad:f,showKeypad:s,additionalKeys:o,allowAnswerBlock:n,onAnswerBlockAdd:r,latex:h,onChange:g,onFocus:v,onBlur:y,error:S,maxResponseAreas:C,setKeypadInteraction:m}),(!i||i&&s)&&!b&&(0,N.jsx)(v$,{hideBackground:x,onClick:_})]})}},k$=new mu(`ensureTextAfterMath`),A$=(e=[])=>e.map(e=>({name:e,latex:e,write:e,label:e})),j$=e=>new du({key:k$,appendTransaction:(t,n,r)=>{if(!t.some(e=>e.docChanged))return null;let i=r.tr,a=!1;return r.doc.descendants((t,n)=>{if(t.type.name===e){let e=n+t.nodeSize,o=r.doc.nodeAt(e);(!o||o.type.name!==`text`)&&(i.insert(e,r.schema.text(``)),a=!0)}}),a?i:null}}),M$=(e,t)=>{let n;for(n=t;n>0;n--){let t=e.nodeAt(n);if(t?.type?.name===`text`&&t.textContent!==``)return-1;if(t&&t?.type?.name!==`text`)break}return n},N$=new du({key:new mu(`zeroWidthSpaceHandling`),props:{handleKeyDown(e,t){let{state:n,dispatch:r}=e,{selection:i,doc:a}=n,{from:o,empty:s}=i;if(s&&t.key===`Backspace`&&o>0){let e=M$(a,o);return e===-1?!1:(r(n.tr.delete(e,o)),!0)}if(s&&t.key===`ArrowLeft`&&o>0){let e=M$(a,o);if(e===-1)return!1;let t=n.doc.resolve(e);if(t.nodeAfter||t.nodeBefore){let t=n.doc.resolve(e);return r(n.tr.setSelection(U.create(n.doc,t.pos))),!0}else return r(n.tr.setSelection(H.create(n.doc,o-2))),!0}return!1}}}),P$=Rb.create({name:`math`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{latex:{default:``},wrapper:{default:null},html:{default:null}}},addProseMirrorPlugins(){return[j$(this.name),N$]},parseHTML(){return[{tag:`span[data-latex]`,getAttrs:e=>({latex:e.getAttribute(`data-raw`)||e.textContent})},{tag:`span[data-type="mathml"]`,getAttrs:e=>({html:e.innerHTML})}]},addCommands(){return{insertMath:(e=``)=>({tr:t,editor:n,dispatch:r})=>{let{state:i}=n.view,a=i.schema.nodes.math.create({latex:e}),{selection:o}=i,s=o.$from.pos;if(t.insert(s,a),a?.type?.name===this.name){let e=U.create(t.doc,o.$from.pos);t.setSelection(e)}return r(t),zz(n,!0),!0}}},renderHTML({HTMLAttributes:e}){return e.html?[`span`,{"data-type":`mathml`,dangerouslySetInnerHTML:{__html:e.html}}]:[`span`,{"data-latex":``,"data-raw":e.latex},kW(e.latex,e.wrapper)]},addNodeView(){return fS(e=>(0,N.jsx)(F$,{...e,options:this.options}))}}),F$=e=>{let{node:t,updateAttributes:n,editor:r,selected:i,options:a,getPos:o}=e,[s,c]=(0,S.useState)(i),l=(0,S.useRef)(null),u=(0,S.useRef)(null),d=(0,S.useRef)(Date.now()),[f,p]=(0,S.useState)({top:0,left:0}),{math:m={}}=a||{},{keypadMode:h,controlledKeypadMode:g=!0,customKeys:_=[],keyPadCharacterRef:v,setKeypadInteraction:y}=m,b=t.attrs.latex||``,x=e=>{n({latex:e})},C=(e,{moveCursorAfterNode:i=!0}={})=>{if(n({latex:e}),c(!1),i&&typeof o==`function`){let e=o(),{doc:n}=r.state,i=H.create(n,e+t.nodeSize),a=r.state.tr.setSelection(i);r.view.dispatch(a)}r.commands.focus()};return(0,S.useEffect)(()=>{if(!i)return;let{selection:e}=r.state;e.node?.type?.name===`math`&&c(!0)},[i,r]),(0,S.useEffect)(()=>{zz(r,i||s)},[r,s,i]),(0,S.useEffect)(()=>{if(!r||!s){p({top:0,left:0});return}let e=()=>{if(!l.current)return;let{from:e}=r.state.selection,t=r.view.coordsAtPos(e),n=u.current?.getBoundingClientRect?.(),i=n?.height?n.top:t.top,a=n?.width?n.left:t.left,o=n?.height?n.bottom:t.bottom??t.top,s=l.current.offsetHeight,c=l.current.offsetWidth,d=window.innerHeight-(o+0)>=s?o+0:i-s-0,f=a;d=Math.max(8,Math.min(d,window.innerHeight-s-8)),f=Math.max(8,Math.min(f,window.innerWidth-c-8));let m=(r._tiptapContainerEl||document.body).getBoundingClientRect();p({top:d-m.top,left:f-m.left})};e();let t=null,n=()=>{t===null&&(t=requestAnimationFrame(()=>{t=null,e()}))};return t=requestAnimationFrame(()=>{t=null,e()}),window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{t!==null&&cancelAnimationFrame(t),window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}},[r,s]),(0,S.useEffect)(()=>{let e=e=>{let n=e?.target,i=(document.querySelectorAll?.(`[id^="equation-editor-select"][id*="listbox"], [aria-labelledby="equation-editor-label"][role="listbox"]`)||[]).length>0,a=!!(n?.id&&n.id.includes(`equation-editor-select`))||!!n?.closest?.(`[id*="equation-editor-select"]`),o=!!n?.closest?.(`.math-node-${d.current}`);if(l.current&&!l.current.contains(n)&&!n?.closest?.(`[data-inline-node]`)&&!i&&!a&&!o){c(!1);let e=!!r?.view?.dom?.contains(n);C(t.attrs.latex,{moveCursorAfterNode:!e})}};return s?document.addEventListener(`click`,e):document.removeEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[r,s,t]),(0,N.jsxs)(iS,{className:`math-node-${d.current}`,style:{display:`inline-flex`,cursor:`pointer`,margin:`0 4px`},"data-selected":i,children:[(0,N.jsx)(`div`,{ref:u,onClick:()=>c(!0),contentEditable:!1,children:(0,N.jsx)(T$,{latex:b})}),s&&zx.createPortal((0,N.jsx)(`div`,{ref:l,"data-toolbar-for":r.instanceId,style:{position:`absolute`,top:`${f.top}px`,left:`${f.left}px`,zIndex:1e3,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`},children:(0,N.jsx)(D$,{latex:b,autoFocus:!0,onChange:x,onDone:C,keypadMode:h,controlledKeypadMode:g,additionalKeys:A$(_),keyPadCharacterRef:v,setKeypadInteraction:y})}),r?._tiptapContainerEl||document.body)]})};function I$(e){return Br(`MuiLinearProgress`,e)}Vr(`MuiLinearProgress`,[`root`,`colorPrimary`,`colorSecondary`,`determinate`,`indeterminate`,`buffer`,`query`,`dashed`,`dashedColorPrimary`,`dashedColorSecondary`,`bar`,`bar1`,`bar2`,`barColorPrimary`,`barColorSecondary`,`bar1Indeterminate`,`bar1Determinate`,`bar1Buffer`,`bar2Indeterminate`,`bar2Buffer`]);var L$=4,R$=nr`
|
|
333
333
|
0% {
|
|
334
334
|
left: -35%;
|
|
335
335
|
right: 100%;
|
|
@@ -344,9 +344,9 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
344
344
|
left: 100%;
|
|
345
345
|
right: -90%;
|
|
346
346
|
}
|
|
347
|
-
`,z$=typeof R$==`string`?null:
|
|
347
|
+
`,z$=typeof R$==`string`?null:tr`
|
|
348
348
|
animation: ${R$} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
|
349
|
-
`,B$=
|
|
349
|
+
`,B$=nr`
|
|
350
350
|
0% {
|
|
351
351
|
left: -200%;
|
|
352
352
|
right: 100%;
|
|
@@ -361,9 +361,9 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
361
361
|
left: 107%;
|
|
362
362
|
right: -8%;
|
|
363
363
|
}
|
|
364
|
-
`,V$=typeof B$==`string`?null:
|
|
364
|
+
`,V$=typeof B$==`string`?null:tr`
|
|
365
365
|
animation: ${B$} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
366
|
-
`,H$=
|
|
366
|
+
`,H$=nr`
|
|
367
367
|
0% {
|
|
368
368
|
opacity: 1;
|
|
369
369
|
background-position: 0 -23px;
|
|
@@ -378,9 +378,9 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
378
378
|
opacity: 1;
|
|
379
379
|
background-position: -200px -23px;
|
|
380
380
|
}
|
|
381
|
-
`,U$=typeof H$==`string`?null:
|
|
381
|
+
`,U$=typeof H$==`string`?null:tr`
|
|
382
382
|
animation: ${H$} 3s infinite linear;
|
|
383
|
-
`,W$=e=>{let{classes:t,variant:n,color:r}=e;return A({root:[`root`,`color${L(r)}`,n],dashed:[`dashed`,`dashedColor${L(r)}`],bar1:[`bar`,`bar1`,`barColor${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${L(r)}`,n===`buffer`&&`color${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},I$,t)},G$=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),K$=I(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${L(n.color)}`],t[n.variant]]}})(zo(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{backgroundColor:G$(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),q$=I(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${L(n.color)}`]]}})(zo(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Uo()).map(([t])=>{let n=G$(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),U$||{animation:`${H$} 3s infinite linear`}),J$=I(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(zo(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${L$}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${L$}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:z$||{animation:`${R$} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Y$=I(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(zo(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Uo()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:G$(e,t),transition:`transform .${L$}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:V$||{animation:`${B$} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),X$=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,value:a,valueBuffer:o,variant:s=`indeterminate`,...c}=n,l={...n,color:i,variant:s},u=W$(l),d=zi(),f={},p={bar1:{},bar2:{}};if((s===`determinate`||s===`buffer`)&&a!==void 0){f[`aria-valuenow`]=Math.round(a),f[`aria-valuemin`]=0,f[`aria-valuemax`]=100;let e=a-100;d&&(e=-e),p.bar1.transform=`translateX(${e}%)`}if(s===`buffer`&&o!==void 0){let e=(o||0)-100;d&&(e=-e),p.bar2.transform=`translateX(${e}%)`}return(0,P.jsxs)(K$,{className:k(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,P.jsx)(q$,{className:u.dashed,ownerState:l}):null,(0,P.jsx)(J$,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,P.jsx)(Y$,{className:u.bar2,ownerState:l,style:p.bar2})]})}),Z$=D(`@pie-lib:editable-html:image:insert-image-handler`),Q$=class{constructor(e,t,n,r=!1){this.editor=e,this.nodeInfo=t,this.node=t[0],this.nodePos=t[1],this.onFinish=n,this.isPasted=r,this.chosenFile=null}cancel(){Z$(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(this.nodePos);if(i){let t=r.setNodeMarkup(this.nodePos,void 0,{...i.attrs,...e});n.dispatch(t)}}deleteNode(){let{state:e,view:t}=this.editor,{tr:n}=e,r=n.delete(this.nodePos,this.nodePos+this.node.nodeSize);t.dispatch(r)}done(e,t){Z$(`done: err:`,e),e?(console.log(e),this.onFinish(!1)):(this.updateNode({loaded:!0,src:t,percent:100}),this.onFinish(!0)),this.editor._insertingImage=!1}fileChosen(e){if(!e)return;this.chosenFile=e,this.editor._insertingImage=!1,Z$(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){Z$(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function $$(e){return Qr(`MuiDialogContent`,e)}$r(`MuiDialogContent`,[`root`,`dividers`]);function e1(e){return Qr(`MuiDialogTitle`,e)}var t1=$r(`MuiDialogTitle`,[`root`]),n1=e=>{let{classes:t,dividers:n}=e;return A({root:[`root`,n&&`dividers`]},$$,t)},r1=I(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(zo(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${t1.root} + &`]:{paddingTop:0}}}]}))),i1=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=n1(o);return(0,P.jsx)(r1,{className:k(s.root,r),ownerState:o,ref:t,...a})}),a1=GL((0,P.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function o1(e){return Qr(`MuiFormHelperText`,e)}var s1=$r(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),c1,l1=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return A({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${L(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},o1,t)},u1=I(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${L(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(zo(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${s1.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${s1.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),d1=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,m=iG({props:n,muiFormControl:oG(),states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let g=l1(h);return(0,P.jsx)(u1,{as:a,className:k(g.root,i),ref:t,...p,ownerState:h,children:r===` `?c1||=(0,P.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})});function f1(e){return Qr(`MuiTextField`,e)}$r(`MuiTextField`,[`root`]);var p1={standard:CQ,filled:kQ,outlined:BQ},m1=e=>{let{classes:t}=e;return A({root:[`root`]},f1,t)},h1=I(CG,{name:`MuiTextField`,slot:`Root`})({}),g1=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:g,InputProps:_,inputRef:v,label:y,maxRows:b,minRows:x,multiline:S=!1,name:C,onBlur:w,onChange:T,onFocus:E,placeholder:D,required:O=!1,rows:A,select:j=!1,SelectProps:M,slots:ee={},slotProps:te={},type:N,value:ne,variant:re=`outlined`,...ie}=n,ae={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:S,required:O,select:j,variant:re},oe=m1(ae),se=qi(m),ce=p&&se?`${se}-helper-text`:void 0,le=y&&se?`${se}-label`:void 0,ue=p1[re],de={slots:ee,slotProps:{input:_,inputLabel:h,htmlInput:g,formHelperText:d,select:M,...te}},fe={},pe=de.slotProps.inputLabel;re===`outlined`&&(pe&&pe.shrink!==void 0&&(fe.notched=pe.shrink),fe.label=y),j&&((!M||!M.native)&&(fe.id=void 0),fe[`aria-describedby`]=void 0);let[me,he]=hH(`root`,{elementType:h1,shouldForwardComponentProp:!0,externalForwardedProps:{...de,...ie},ownerState:ae,className:k(oe.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:re}}),[ge,_e]=hH(`input`,{elementType:ue,externalForwardedProps:de,additionalProps:fe,ownerState:ae}),[ve,ye]=hH(`inputLabel`,{elementType:gG,externalForwardedProps:de,ownerState:ae}),[be,xe]=hH(`htmlInput`,{elementType:`input`,externalForwardedProps:de,ownerState:ae}),[Se,Ce]=hH(`formHelperText`,{elementType:d1,externalForwardedProps:de,ownerState:ae}),[we,Te]=hH(`select`,{elementType:KQ,externalForwardedProps:de,ownerState:ae}),Ee=(0,P.jsx)(ge,{"aria-describedby":ce,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:S,name:C,rows:A,maxRows:b,minRows:x,type:N,value:ne,id:se,inputRef:v,onBlur:w,onChange:T,onFocus:E,placeholder:D,inputProps:xe,slots:{input:ee.htmlInput?be:void 0},..._e});return(0,P.jsxs)(me,{...he,children:[y!=null&&y!==``&&(0,P.jsx)(ve,{htmlFor:se,id:le,...ye,children:y}),j?(0,P.jsx)(we,{"aria-describedby":ce,id:se,labelId:le,value:ne,input:Ee,...Te,children:a}):Ee,p&&(0,P.jsx)(Se,{id:ce,...Ce,children:p})]})});function _1(e){return Qr(`MuiDialogActions`,e)}$r(`MuiDialogActions`,[`root`,`spacing`]);var v1=e=>{let{classes:t,disableSpacing:n}=e;return A({root:[`root`,!n&&`spacing`]},_1,t)},y1=I(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),b1=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=v1(o);return(0,P.jsx)(y1,{className:k(s.root,r),ownerState:o,ref:t,...a})});function x1(e){return Qr(`MuiDialog`,e)}var S1=$r(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),C1=N.createContext({}),w1=I(SH,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),T1=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return A({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${L(n)}`],paper:[`paper`,`paperScroll${L(n)}`,`paperWidth${L(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},x1,t)},E1=I(MH,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),D1=I(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${L(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),O1=I(IH,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${L(n.scroll)}`],t[`paperWidth${L(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(zo(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0,[`&.${S1.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),k1=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiDialog`}),r=No(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,BackdropComponent:c,BackdropProps:l,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:h=`sm`,onClick:g,onClose:_,open:v,PaperComponent:y=IH,PaperProps:b={},role:x=`dialog`,scroll:S=`paper`,slots:C={},slotProps:w={},TransitionComponent:T=vH,transitionDuration:E=i,TransitionProps:D,...O}=n,A={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:S},j=T1(A),M=N.useRef(),ee=e=>{M.current=e.target===e.currentTarget},te=e=>{g&&g(e),M.current&&(M.current=null,_&&_(e,`backdropClick`))},ne=qi(o),re=N.useMemo(()=>({titleId:ne}),[ne]),ie={slots:{transition:T,...C},slotProps:{transition:D,paper:b,backdrop:l,...w}},[ae,oe]=hH(`root`,{elementType:E1,shouldForwardComponentProp:!0,externalForwardedProps:ie,ownerState:A,className:k(j.root,d),ref:t}),[se,ce]=hH(`backdrop`,{elementType:w1,shouldForwardComponentProp:!0,externalForwardedProps:ie,ownerState:A,className:j.backdrop}),[le,ue]=hH(`paper`,{elementType:O1,shouldForwardComponentProp:!0,externalForwardedProps:ie,ownerState:A,className:j.paper,additionalProps:{elevation:24,role:x,"aria-describedby":a,"aria-labelledby":ne,"aria-modal":s,tabIndex:-1,[$V]:``}}),[de,fe]=hH(`container`,{elementType:D1,externalForwardedProps:ie,ownerState:A,className:j.container}),[pe,me]=hH(`transition`,{elementType:vH,externalForwardedProps:ie,ownerState:A,additionalProps:{appear:!0,in:v,timeout:E,role:`presentation`}});return(0,P.jsx)(ae,{closeAfterTransition:!0,slots:{backdrop:se},slotProps:{backdrop:{transitionDuration:E,as:c,...ce}},disableEscapeKeyDown:f,onClose:_,open:v,onClick:te,...oe,...O,children:(0,P.jsx)(pe,{...me,children:(0,P.jsx)(de,{onMouseDown:ee,...fe,children:(0,P.jsx)(le,{as:y,...ue,children:(0,P.jsx)(C1.Provider,{value:re,children:u})})})})})}),A1=class extends N.Component{static propTypes={onDone:p.func.isRequired,alt:p.string};constructor(e){super(e);let{alt:t}=e;this.state={value:t}}closeDialog=()=>{document.querySelectorAll(`#text-dialog`).forEach(function(e){return e.remove()})};onDone=()=>{let{onDone:e}=this.props,{value:t}=this.state;e(t),this.closeDialog()};handleOverflow=()=>{document.body.style.removeProperty(`overflow`)};render(){let{value:e}=this.state;return(0,P.jsxs)(k1,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,P.jsx)(i1,{children:(0,P.jsxs)(`div`,{style:{display:`flex`},children:[(0,P.jsx)(a1,{style:{paddingTop:`6px`}}),(0,P.jsx)(g1,{multiline:!0,placeholder:`Enter an Alt Text description of this image`,helperText:`Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.`,value:e,onChange:e=>this.setState({value:e.target.value}),FormHelperTextProps:{style:{fontSize:14}}})]})}),(0,P.jsx)(b1,{children:(0,P.jsx)(WW,{onClick:this.onDone,children:`Done`})})]})}},j1=I(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({active:e,disabled:t})=>({color:e?ZH():QH(),display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:t?`not-allowed`:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:t?QH():ZH()},"&:focus":{outline:`2px solid ${zU()}`},...t&&{opacity:.7}})),M1=D(`pie-elements:editable-html:raw-button`);(class extends N.Component{static propTypes={onClick:p.func.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool,disabled:p.bool,extraStyles:p.object};constructor(e){super(e)}onClick=e=>{M1(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){M1(`[onKeyDown]`),e.preventDefault();let{onClick:t}=this.props;t(e)}};render(){let{active:e,children:t,disabled:n,extraStyles:r,ariaLabel:i}=this.props;return(0,P.jsx)(j1,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var N1=class extends N.Component{static propTypes={onToggle:p.func.isRequired,mark:p.string,label:p.string.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool};constructor(e){super(e)}onToggle=e=>{e.preventDefault(),this.props.onToggle(this.props.mark)};onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.props.onToggle(this.props.mark))};render(){let{children:e,active:t,label:n}=this.props;return(0,P.jsx)(j1,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},P1=D(`@pie-lib:editable-html:plugins:image:image-toolbar`),F1=I(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),I1=I(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),L1=({alignment:e,active:t,onClick:n})=>(0,P.jsx)(N1,{active:t,onToggle:()=>n(e),label:e,children:e});L1.propTypes={alignment:p.string.isRequired,active:p.bool.isRequired,onClick:p.func.isRequired};var R1=class extends N.Component{static propTypes={onChange:p.func.isRequired,alignment:p.string,alt:p.string,imageLoaded:p.bool,disableImageAlignmentButtons:p.bool};onAltTextDone=e=>{P1(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{P1(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,P.jsx)(A1,{alt:e,onDone:this.onAltTextDone});zx.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,P.jsxs)(F1,{children:[!n&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(L1,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,P.jsx)(L1,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,P.jsx)(L1,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,P.jsx)(I1,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}},z1=I(X$,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),B1=I(`div`,{shouldForwardProp:e=>![`active`,`loading`,`pendingDelete`].includes(e)})(({loading:e,pendingDelete:t})=>({position:`relative`,display:`flex`,transition:`opacity 200ms linear`,...e&&{opacity:.3},...t&&{opacity:.3}})),V1=I(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),H1=I(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),U1=I(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),W1=e=>e?`${e}px`:`calc(20px)`;function G1(e){let{node:t,editor:n,attributes:r,onFocus:i,getPos:a,selected:o,options:s,maxImageWidth:c=700,maxImageHeight:l=900}=e,{alt:u}=t.attrs,d=a(),f=n.state.selection.from,p=n.state.selection.to,m=(0,N.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,N.useState)(!1),_=(0,N.useRef)(t),v=(0,N.useRef)(null),y=(0,N.useRef)(null),b=(0,N.useRef)(null),x=(0,N.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),S=(0,N.useCallback)(()=>{let e=_.current.attrs.nodeKey,t=null;return n.state.doc.descendants((n,r)=>{if(t!==null)return!1;if(n.type.name===`imageUploadNode`&&n.attrs.nodeKey===e)return t=r,!1}),t},[n]),w=(0,N.useCallback)(e=>{let t=S();if(t===null)return;let r=n.state.doc.nodeAt(t);r&&n.view.dispatch(n.state.tr.setNodeMarkup(t,void 0,{...r.attrs,...e}))},[n,S]),T=(0,N.useCallback)(()=>{if(!t.attrs.width||!v.current||!v.current.naturalWidth)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&w({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,w]);(0,N.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,N.useEffect)(()=>{o?m&&n.isEditable&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new Q$(n,[t,d],e)),g(o)):g(o)},[m,o,n.isEditable]),(0,N.useEffect)(()=>{T();let e=y?.current;return e&&n.isEditable&&e.addEventListener(`mousedown`,j,!1),()=>{e&&e.removeEventListener(`mousedown`,j,!1)}},[]),(0,N.useEffect)(()=>{T()});let E=(0,N.useCallback)(()=>{let e=v.current;if(e&&(!e.style.width||e.style.width===`calc(20px)`)){let n=Math.min(e.naturalWidth,c),r=Math.min(e.naturalHeight,l);e.style.width=`${n}px`,e.style.height=`${r}px`;let i={width:n,height:r};C(i,{width:t.attrs.width,height:t.attrs.height})||w(i)}},[t.attrs.width,t.attrs.height,c,l,w]),D=(e,t,n=!0,r)=>{if(n){let n=e.width/e.height;return r===`height`?{width:t.height*n,height:t.height}:{width:t.width,height:t.width/n}}return t},O=(0,N.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r={width:t.naturalWidth,height:t.naturalHeight},i=D(r,{width:e.clientX-n.left,height:e.clientY-n.top});i.width>50&&i.height>50&&i.width<=700&&i.height<=900&&(t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,w({width:i.width,height:i.height}))},[n,w]),k=(0,N.useCallback)(e=>{w(e)},[n,w]),A=(0,N.useCallback)(()=>{window.removeEventListener(`mousemove`,O),window.removeEventListener(`mouseup`,A)},[O]),j=(0,N.useCallback)(()=>{window.addEventListener(`mousemove`,O),window.addEventListener(`mouseup`,A)},[O,A]),M={width:W1(t.attrs.width),height:W1(t.attrs.height),objectFit:`contain`},ee={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,P.jsxs)(iS,{children:[(0,P.jsxs)(B1,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:ee},children:[(0,P.jsx)(z1,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,P.jsxs)(V1,{onDragStart:e=>e.preventDefault(),children:[(0,P.jsx)(H1,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:M,onLoad:E,alt:t.attrs.alt}),(0,P.jsx)(U1,{ref:y,className:`resize`,style:{display:n.isEditable?void 0:`none`}})]})]}),h&&n._tiptapContainerEl&&zx.createPortal((0,P.jsx)(`div`,{ref:b,style:{zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,width:`100%`},children:(0,P.jsx)(Lz,{showDone:!0,deletable:!0,toolbarOpts:s.toolbarOpts||{},onDelete:()=>{let e=S();e!==null&&(s.imageHandling?.onDelete?.(_.current),n.view.dispatch(n.state.tr.delete(e,e+n.state.doc.nodeAt(e).nodeSize)),g(!1),n.commands.focus())},onDone:()=>{g(!1),s.imageHandling?.onDone?.(n),n.commands.focus(`end`)},children:(0,P.jsx)(R1,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:k})})}),n._tiptapContainerEl)]})}G1.propTypes={node:p.object.isRequired,editor:p.object.isRequired,attributes:p.object,onFocus:p.func,maxImageWidth:p.number,maxImageHeight:p.number};var K1=Rb.create({name:`imageUploadNode`,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return{nodeKey:{default:null},loaded:{default:!1},deleteStatus:{default:null},alignment:{default:null},percent:{default:null},width:{default:null},height:{default:null},src:{default:null},alt:{default:null}}},parseHTML(){return[{tag:`img[data-type="image-upload-node"]`}]},renderHTML({HTMLAttributes:e}){return[`img`,Hv(e,{"data-type":`image-upload-node`})]},addNodeView(){return fS(e=>(0,P.jsx)(G1,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})}},addProseMirrorPlugins(){let e=this.editor;return[new du({props:{handlePaste(t,n){let r=Array.from(n.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!r)return!1;let i=r.getAsFile();if(!i)return!1;let a=new FileReader;return a.onload=()=>{let t=a.result;typeof t==`string`&&e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!0,nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})},a.readAsDataURL(i),!0}}})]}});function q1(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function J1(e,t,n,r={},i=()=>{}){let{ease:a=q1,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Y1={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function X1(e){let{onChange:t,...n}=e,r=N.useRef(),i=N.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return eR(()=>{let e=qL(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=QL(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),N.useEffect(()=>{a(),t(r.current)},[t]),(0,P.jsx)(`div`,{style:Y1,...n,ref:i})}var Z1=GL((0,P.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Q1=GL((0,P.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function $1(e){return Qr(`MuiTabScrollButton`,e)}var e0=$r(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),t0=e=>{let{classes:t,orientation:n,disabled:r}=e;return A({root:[`root`,n,r&&`disabled`]},$1,t)},n0=I(cz,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${e0.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),r0=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=zi(),d={isRtl:u,...n},f=t0(d),p=i.StartScrollButtonIcon??Z1,m=i.EndScrollButtonIcon??Q1,h=VG({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),g=VG({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,P.jsx)(n0,{component:`div`,className:k(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,P.jsx)(p,{...h}):(0,P.jsx)(m,{...g})})});function i0(e){return Qr(`MuiTabs`,e)}var a0=$r(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),o0=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,s0=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,c0=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},l0=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return A({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},i0,c)},u0=I(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${a0.scrollButtons}`]:t.scrollButtons},{[`& .${a0.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(zo(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${a0.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),d0=I(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),f0=I(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),p0=I(`span`,{name:`MuiTabs`,slot:`Indicator`})(zo(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),m0=I(X1)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),h0={},g0=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiTabs`}),r=No(),i=zi(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:g,scrollButtons:_=`auto`,selectionFollowsFocus:v,slots:y={},slotProps:b={},TabIndicatorProps:x={},TabScrollButtonProps:S={},textColor:C=`primary`,value:w,variant:T=`standard`,visibleScrollbar:E=!1,...D}=n,O=T===`scrollable`,A=h===`vertical`,j=A?`scrollTop`:`scrollLeft`,M=A?`top`:`left`,ee=A?`bottom`:`right`,te=A?`clientHeight`:`clientWidth`,ne=A?`height`:`width`,re={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:A,scrollButtons:_,textColor:C,variant:T,visibleScrollbar:E,fixed:!O,hideScrollbar:O&&!E,scrollableX:O&&!A,scrollableY:O&&A,centered:c&&!O,scrollButtonsHideMobile:!f},ie=l0(re),ae=VG({elementType:y.StartScrollButtonIcon,externalSlotProps:b.startScrollButtonIcon,ownerState:re}),oe=VG({elementType:y.EndScrollButtonIcon,externalSlotProps:b.endScrollButtonIcon,ownerState:re}),[se,ce]=N.useState(!1),[le,ue]=N.useState(h0),[de,fe]=N.useState(!1),[pe,me]=N.useState(!1),[he,ge]=N.useState(!1),[_e,ve]=N.useState({overflow:`hidden`,scrollbarWidth:0}),ye=new Map,be=N.useRef(null),xe=N.useRef(null),Se={slots:y,slotProps:{indicator:x,scrollButtons:S,...b}},Ce=()=>{let e=be.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&w!==!1){let e=xe.current.children;if(e.length>0){let t=e[ye.get(w)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},we=aR(()=>{let{tabsMeta:e,tabMeta:t}=Ce(),n=0,r;A?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[ne]:t?t[ne]:0};if(typeof le[r]!=`number`||typeof le[ne]!=`number`)ue(a);else{let e=Math.abs(le[r]-a[r]),t=Math.abs(le[ne]-a[ne]);(e>=1||t>=1)&&ue(a)}}),Te=(e,{animation:t=!0}={})=>{t?J1(j,be.current,e,{duration:r.transitions.duration.standard}):be.current[j]=e},Ee=e=>{let t=be.current[j];A?t+=e:t+=e*(i?-1:1),Te(t)},De=()=>{let e=be.current[te],t=0,n=Array.from(xe.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[te]>e){r===0&&(t=e);break}t+=i[te]}return t},Oe=()=>{Ee(-1*De())},ke=()=>{Ee(De())},[Ae,{onChange:je,...Me}]=hH(`scrollbar`,{className:k(ie.scrollableX,ie.hideScrollbar),elementType:m0,shouldForwardComponentProp:!0,externalForwardedProps:Se,ownerState:re}),Ne=N.useCallback(e=>{je?.(e),ve({overflow:null,scrollbarWidth:e})},[je]),[Pe,Fe]=hH(`scrollButtons`,{className:k(ie.scrollButtons,S.className),elementType:r0,externalForwardedProps:Se,ownerState:re,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:y.startScrollButtonIcon||y.StartScrollButtonIcon,EndScrollButtonIcon:y.endScrollButtonIcon||y.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:ae,endScrollButtonIcon:oe}}}),Ie=()=>{let e={};e.scrollbarSizeListener=O?(0,P.jsx)(Ae,{...Me,onChange:Ne}):null;let t=O&&(_===`auto`&&(de||pe)||_===!0);return e.scrollButtonStart=t?(0,P.jsx)(Pe,{direction:i?`right`:`left`,onClick:Oe,disabled:!de,...Fe}):null,e.scrollButtonEnd=t?(0,P.jsx)(Pe,{direction:i?`left`:`right`,onClick:ke,disabled:!pe,...Fe}):null,e},Le=aR(e=>{let{tabsMeta:t,tabMeta:n}=Ce();if(!(!n||!t)){if(n[M]<t[M]){let r=t[j]+(n[M]-t[M]);Te(r,{animation:e})}else if(n[ee]>t[ee]){let r=t[j]+(n[ee]-t[ee]);Te(r,{animation:e})}}}),Re=aR(()=>{O&&_!==!1&&ge(!he)});N.useEffect(()=>{let e=qL(()=>{be.current&&we()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),Re()},r=QL(be.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(xe.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(xe.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[we,Re]),N.useEffect(()=>{let e=Array.from(xe.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&O&&_!==!1){let n=e[0],r=e[t-1],i={root:be.current,threshold:.99},a=new IntersectionObserver(e=>{fe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{me(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[O,_,he,l?.length]),N.useEffect(()=>{ce(!0)},[]),N.useEffect(()=>{we()}),N.useEffect(()=>{Le(h0!==le)},[Le,le]),N.useImperativeHandle(s,()=>({updateIndicator:we,updateScrollButtons:Re}),[we,Re]);let[ze,Be]=hH(`indicator`,{className:k(ie.indicator,x.className),elementType:p0,externalForwardedProps:Se,ownerState:re,additionalProps:{style:le}}),Ve=(0,P.jsx)(ze,{...Be}),He=0,Ue=N.Children.map(l,e=>{if(!N.isValidElement(e))return null;let t=e.props.value===void 0?He:e.props.value;ye.set(t,He);let n=t===w;return He+=1,N.cloneElement(e,{fullWidth:T===`fullWidth`,indicator:n&&!se&&Ve,selected:n,selectionFollowsFocus:v,onChange:m,textColor:C,value:t,...He===1&&w===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),We=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=xe.current,n=QV(XL(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),c0(t,n,s0);break;case a:e.preventDefault(),c0(t,n,o0);break;case`Home`:e.preventDefault(),c0(t,null,o0);break;case`End`:e.preventDefault(),c0(t,null,s0);break;default:break}},Ge=Ie(),[Ke,qe]=hH(`root`,{ref:t,className:k(ie.root,u),elementType:u0,externalForwardedProps:{...Se,...D,component:d},ownerState:re}),[Je,Ye]=hH(`scroller`,{ref:be,className:ie.scroller,elementType:d0,externalForwardedProps:Se,ownerState:re,additionalProps:{style:{overflow:_e.overflow,[A?`margin${i?`Left`:`Right`}`:`marginBottom`]:E?void 0:-_e.scrollbarWidth}}}),[Xe,Ze]=hH(`list`,{ref:xe,className:k(ie.list,ie.flexContainer),elementType:f0,externalForwardedProps:Se,ownerState:re,getSlotProps:e=>({...e,onKeyDown:t=>{We(t),e.onKeyDown?.(t)}})});return(0,P.jsxs)(Ke,{...qe,children:[Ge.scrollButtonStart,Ge.scrollbarSizeListener,(0,P.jsxs)(Je,{...Ye,children:[(0,P.jsx)(Xe,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Ze,children:Ue}),se&&Ve]}),Ge.scrollButtonEnd]})});function _0(e){return Qr(`MuiTab`,e)}var v0=$r(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),y0=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return A({root:[`root`,a&&o&&`labelIcon`,`textColor${L(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},_0,t)},b0=I(cz,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${L(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${v0.iconWrapper}`]:t.iconWrapper},{[`& .${v0.icon}`]:t.icon}]}})(zo(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${v0.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${v0.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${v0.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${v0.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${v0.selected}`]:{opacity:1},[`&.${v0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${v0.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${v0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${v0.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${v0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),x0=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:g=`inherit`,value:_,wrapped:v=!1,...y}=n,b={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:g,wrapped:v},x=y0(b),S=s&&u&&N.isValidElement(s)?N.cloneElement(s,{className:k(x.icon,s.props.className)}):s;return(0,P.jsxs)(b0,{focusRipple:!a,className:k(x.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,_),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,_),p&&p(e)},ownerState:b,tabIndex:m?0:-1,...y,children:[c===`top`||c===`start`?(0,P.jsxs)(N.Fragment,{children:[S,u]}):(0,P.jsxs)(N.Fragment,{children:[u,S]}),l]})}),S0=e=>{let{classes:t}=e;return A({root:[`root`]},e1,t)},C0=I(Xo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),w0=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=S0(o),{titleId:c=i}=N.useContext(C1);return(0,P.jsx)(C0,{component:`h2`,className:k(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function T0(e){return Qr(`MuiDialogContentText`,e)}$r(`MuiDialogContentText`,[`root`]);var E0=e=>{let{classes:t}=e,n=A({root:[`root`]},T0,t);return{...t,...n}},D0=I(Xo,{shouldForwardProp:e=>Io(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),O0=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=E0(a);return(0,P.jsx)(D0,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:k(o.root,i),...n,classes:o})}),k0=D(`@pie-lib:editable-html:plugins:media:dialog`),A0=e=>{if(!e)return!1;let t=/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return e.match(t)?e.match(t)[1]:!1},j0=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),M0=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),N0=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},P0=e=>new Promise(t=>{try{fetch(`https://soundcloud.com/oembed?format=json&url=${e}`).then(e=>e.json()).then(e=>{let n=document.createElement(`div`);n.innerHTML=e.html,t(n.querySelector(`iframe`).src)}).catch(e=>{t(``),k0(e)})}catch{t(``)}}),F0={video:`Video`,audio:`Audio`},I0={uploadFile:`upload-file`,insertUrl:`insert-url`},L0=I(k1)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),R0=I(i1)(({theme:e})=>({padding:0})),z0=I(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),B0=I(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),V0=I(`input`)(({theme:e})=>({})),H0=I(Xo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),U0=I(Dz)(({theme:e})=>({marginLeft:e.spacing(1.5)})),W0=class extends N.Component{static propTypes={open:p.bool,edit:p.bool,disablePortal:p.bool,handleClose:p.func,uploadSoundSupport:p.shape({add:p.func,delete:p.func}),type:p.string,src:p.string,url:p.string,urlToUse:p.string,starts:p.number,ends:p.number,height:p.number,width:p.number};constructor(e){super(e);let{ends:t,height:n,src:r,starts:i,type:a,uploadSoundSupport:o,url:s,urlToUse:c,width:l}=e,u=o?.add&&o?.delete&&a!==`video`&&!r;this.state={ends:t||0,url:s,urlToUse:c,formattedUrl:r,height:n||315,invalid:!1,starts:i||0,width:l||560,tabValue:u?I0.uploadFile:I0.insertUrl,fileUpload:{error:null,loading:!1,scheduled:!1,url:``,mimeType:``}}}componentDidMount(){this.props.url&&this.urlChange({target:{value:this.props.url}})}formatUrl=()=>{let{url:e,urlToUse:t,starts:n,ends:r}=this.state,i=A0(e),a=j0(e),o=t;if((i||a)&&t){let e=[],s,c;switch(!0){case a:s=`t`,c=`#`;break;case i:s=`start`,c=`?`;break;default:s=`start`,c=`?`}n&&e.push(`${s}=${n}`),r&&e.push(`end=${r}`),o=`${t}${e.length?c:``}${e.join(`&`)}`}this.setState({formattedUrl:null,updating:!0},()=>this.setState({formattedUrl:o,updating:!1}))};handleStateChange=e=>this.setState(e,this.formatUrl);checkAudio=e=>{N0(e)&&P0(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(k0)};checkVideo=e=>{if(A0(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;k0(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(j0(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;k0(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(M0(e)){let t=`https://drive.google.com/file/d/${e.replace(/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)\/.*/,`$1`)}/preview`;k0(`is google drive`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}};urlChange=e=>{let{value:t}=e.target||{},{type:n}=this.props;if(n&&n===`audio`){this.checkAudio(t);return}else if(n&&n===`video`){this.checkVideo(t);return}this.handleStateChange({urlToUse:null,url:null,invalid:!0})};changeHandler=e=>t=>this.handleStateChange({[e]:t.target.value});handleDone=e=>{let{handleClose:t}=this.props,{tabValue:n,fileUpload:r}=this.state,i=n===I0.insertUrl;if(!e){r.url&&this.handleRemoveFile(),t(e);return}if(i){let{ends:n,height:r,url:i,urlToUse:a,formattedUrl:o,starts:s,width:c}=this.state;t(e,{tag:`iframe`,ends:n,height:r,starts:s,width:c,url:i,urlToUse:a,src:o});return}if(!r.loading){t(e,{tag:`audio`,src:r.url});return}this.setState({fileUpload:{...r,scheduled:!0}})};handleUploadFile=async e=>{e.preventDefault(),this.setState({fileUpload:{...this.state.fileUpload,error:null,loading:!0}});let t=e.target.files[0],n=new FileReader;n.onload=()=>{let e=n.result;this.setState({fileUpload:{...this.state.fileUpload,url:e,mimeType:t.type}})},n.readAsDataURL(t),this.props.uploadSoundSupport.add({fileChosen:t,done:(e,t)=>{if(k0(`done: err:`,e),e){console.log(e),this.setState({fileUpload:{...this.state.fileUpload,scheduled:!1,loading:!1,error:e}});return}let{fileUpload:n}=this.state,r=n&&n.scheduled?this.handleDone.bind(this,!0):void 0;this.setState({fileUpload:{...n,scheduled:!1,loading:!1,url:t}},r)}})};handleRemoveFile=async()=>{this.props.uploadSoundSupport.delete(this.state.fileUpload.url,e=>{e&&(console.log(e),this.setState({fileUpload:{...this.state.fileUpload,error:e}}))}),this.setState({fileUpload:{...this.state.fileUpload,loading:!1,url:``,mimeType:``}})};render(){let{open:e,disablePortal:t,type:n,edit:r,uploadSoundSupport:i}=this.props,{ends:a,height:o,invalid:s,starts:c,width:l,url:u,mimeType:d,formattedUrl:f,updating:p,tabValue:m,fileUpload:h}=this.state,g=A0(u),_=m===I0.insertUrl,v=m===I0.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,P.jsxs)(L0,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,P.jsxs)(w0,{id:`form-dialog-title`,children:[`Insert `,F0[n]]}),(0,P.jsx)(i1,{children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(z0,{children:(0,P.jsxs)(g0,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,P.jsx)(x0,{value:I0.uploadFile,label:`Upload file`}):null,(0,P.jsx)(x0,{value:I0.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,P.jsxs)(`div`,{children:[(0,P.jsx)(g1,{autoFocus:!0,error:s,helperText:s?`Invalid URL`:``,margin:`dense`,id:`name`,label:`URL`,placeholder:`Paste URL of ${n}...`,type:`text`,onChange:this.urlChange,value:u,fullWidth:!0}),n===`video`&&(0,P.jsxs)(R0,{children:[(0,P.jsx)(O0,{children:`Video Properties`}),(0,P.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,P.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,P.jsx)(`iframe`,{width:l,height:o,src:f,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0}),n===`video`&&(f||p)&&!s&&(0,P.jsx)(N.Fragment,{children:(0,P.jsxs)(R0,{children:[(0,P.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,P.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,P.jsx)(B0,{children:(0,P.jsxs)(`div`,{children:[h.url?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(z0,{children:[(0,P.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:d,src:h.url})}),(0,P.jsx)(U0,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,P.jsx)(Oz,{})})]}),!h.scheduled&&h.loading?(0,P.jsx)(Xo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,P.jsx)(Xo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,P.jsx)(V0,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,P.jsx)(H0,{variant:`caption`,children:h.error})]})})]})}),(0,P.jsxs)(b1,{children:[(0,P.jsx)(WW,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,P.jsx)(WW,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},G0=I(`span`)(({theme:e})=>({position:`relative`,bottom:`5px`,left:0,width:`100%`,background:e.palette.common.white,display:`inline-flex`,padding:`5px`,boxShadow:`0px 4px 4px rgba(0, 0, 0, 0.25)`})),K0=I(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),q0=I(`span`)({cursor:`pointer`}),J0=class extends N.Component{static propTypes={onEdit:p.func,hideEdit:p.bool,onRemove:p.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,P.jsxs)(G0,{children:[e?null:(0,P.jsx)(K0,{onClick:t,children:`Edit Settings`}),(0,P.jsx)(q0,{onClick:n,children:`Remove`})]})}},Y0=Rb.create({name:`media`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{type:{default:`video`},src:{default:null},width:{default:null},height:{default:null},title:{default:null},starts:{default:null},ends:{default:null},editing:{default:!1},tag:{default:`iframe`},url:{default:null}}},parseHTML(){return[{tag:`iframe[data-type="video"]`,getAttrs:e=>({type:`video`,tag:`iframe`,src:e.getAttribute(`src`),width:e.getAttribute(`width`),height:e.getAttribute(`height`),title:e.dataset.title,starts:e.dataset.starts,ends:e.dataset.ends,url:e.dataset.url})},{tag:`audio`,getAttrs:e=>({type:`audio`,tag:`audio`,src:e.querySelector(`source`)?.getAttribute(`src`)})}]},renderHTML({HTMLAttributes:e}){let{tag:t,src:n,width:r,height:i}=e;return t===`audio`?[`audio`,{controls:`controls`,controlsList:`nodownload`},[`source`,{src:n,type:`audio/mp3`}]]:[`iframe`,Hv({"data-type":`video`,frameborder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowfullscreen:``,src:n},r?{width:r}:{},i?{height:i}:{})]},addCommands(){return{insertMedia:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateMedia:e=>({commands:t})=>t.updateAttributes(this.name,e)}},addNodeView(){return fS(e=>(0,P.jsx)(Q0,{...e,options:this.options}))}}),X0=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},Z0=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;X0(),t.className=`insert-media-dialog`,document.body.style.overflow=`hidden`;let s=(e,n)=>{r(e,n),t.remove(),document.body.style.overflow=o},c=(0,P.jsx)(W0,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});zx.render(c,t),document.body.appendChild(t)};function Q0({editor:e,node:t,updateAttributes:n,deleteNode:r,options:i}){let{type:a,src:o,width:s,height:c,tag:l}=t.attrs;return(0,N.useEffect)(()=>{o||Z0({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,P.jsxs)(iS,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,P.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,P.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,P.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,P.jsx)(J0,{onEdit:()=>{Z0({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function $0(e){return Qr(`MuiListItem`,e)}$r(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var e2=$r(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function t2(e){return Qr(`MuiListItemSecondaryAction`,e)}$r(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var n2=e=>{let{disableGutters:t,classes:n}=e;return A({root:[`root`,t&&`disableGutters`]},t2,n)},r2=I(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),i2=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=N.useContext(HG),o={...n,disableGutters:a.disableGutters},s=n2(o);return(0,P.jsx)(r2,{className:k(s.root,r),ownerState:o,ref:t,...i})});i2.muiName=`ListItemSecondaryAction`;var a2=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},o2=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return A({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},$0,n)},s2=I(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:a2})(zo(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${e2.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),c2=I(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),l2=N.forwardRef(function(e,t){let n=Bo({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o,components:s={},componentsProps:c={},ContainerComponent:l=`li`,ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:m=!1,divider:h=!1,secondaryAction:g,slotProps:_={},slots:v={},...y}=n,b=N.useContext(HG),x=N.useMemo(()=>({dense:f||b.dense||!1,alignItems:r,disableGutters:p}),[r,b.dense,f,p]),S=N.useRef(null),C=N.Children.toArray(i),w=C.length&&JL(C[C.length-1],[`ListItemSecondaryAction`]),T={...n,alignItems:r,dense:x.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:w},E=o2(T),D=sR(S,t),[O,A]=hH(`secondaryAction`,{elementType:i2,externalForwardedProps:{slots:v,slotProps:_},ownerState:T,className:E.secondaryAction}),j=v.root||s.Root||s2,M=_.root||c.root||{},ee={className:k(E.root,M.className,a),...y},te=o||`li`;return w?(te=!ee.component&&!o?`div`:te,l===`li`&&(te===`li`?te=`div`:ee.component===`li`&&(ee.component=`div`)),(0,P.jsx)(HG.Provider,{value:x,children:(0,P.jsxs)(c2,{as:l,className:k(E.container,u),ref:D,ownerState:T,...d,children:[(0,P.jsx)(j,{...M,...!kV(j)&&{as:te,ownerState:{...T,...M.ownerState}},...ee,children:C}),C.pop()]})})):(0,P.jsx)(HG.Provider,{value:x,children:(0,P.jsxs)(j,{...M,as:te,ref:D,...!kV(j)&&{ownerState:{...T,...M.ownerState}},...ee,children:[C,g&&(0,P.jsx)(O,{...A,children:g})]})})}),u2=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},d2=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;u2(),o.className=`insert-css-dialog`;let c=!1,l=e=>{if(c){let t=o.contains(e.target)||void 0,n=a.contains(e.target);t||n||u()}else c=!0},u=()=>{t(void 0,!0),o.remove(),document.body.removeEventListener(`click`,l)},d=e=>{t(e,!0),o.remove(),document.body.removeEventListener(`click`,l)},f=i?.attrs.class,p=e=>{let t=`<span class="${e}">${r}</span>`;if(i){let e=`span`;i?.object===`inline`&&(e=`span`),i?.object===`block`&&(e=`div`),t=`<${e} class="${f}">${i.text.slice(0,s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`}return t},m=(0,P.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,P.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,P.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,P.jsx)(KG,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,P.jsxs)(l2,{button:!0,onClick:()=>d(e),children:[(0,P.jsx)(`div`,{style:{marginRight:20},children:e}),(0,P.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});zx.render(m,o,()=>{let t=e.view.nodeDOM(e.state.selection.from)?.parentNode;if(t){let e=a.parentElement.parentElement.parentElement.getBoundingClientRect(),n=t.getBoundingClientRect();a.parentElement.parentElement.parentElement.appendChild(o),o.style.maxWidth=`500px`,o.style.position=`absolute`,o.style.top=0,o.style.zIndex=99999;let r=`${n.left+Math.abs(e.left)+t.offsetWidth+10}px`,i=`${n.x}px`;o.style.left=r;let s=o.offsetWidth;o.style.left=`unset`,o.style.right=i;let c=o.offsetWidth;o.style.left=`unset`,o.style.right=`unset`,s>=c?o.style.left=r:o.style.right=i,document.body.addEventListener(`click`,l)}})},f2=eb.create({name:`cssmark`,addOptions(){return{classes:[]}},addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}},parseHTML(){return[{tag:`span[class]`,getAttrs:e=>{let t=e.getAttribute(`class`)||``;if(!t)return!1;if((this.options&&this.options.classes||[]).length>0){let e=this.options.classes.find(e=>t.includes(e));return e?{class:e}:!1}return{class:t}}}]},renderHTML({HTMLAttributes:e}){return[`span`,Hv(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{d2({editor:e,selectedText:e.state.doc.textBetween(e.state.selection.from,e.state.selection.to),parentNode:e.state.selection.$from.nodeAfter,opts:this.options.extraCSSRules,callback:t=>{t&&e.chain().focus().setCSSClass(t).run()}})}}}}),p2=Object.defineProperty,m2=(e,t)=>{for(var n in t)p2(e,n,{get:t[n],enumerable:!0})},h2=`listItem`,g2=`textStyle`,_2=/^\s*([-+*])\s$/,v2=Rb.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Hv(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
383
|
+
`,W$=e=>{let{classes:t,variant:n,color:r}=e;return _({root:[`root`,`color${L(r)}`,n],dashed:[`dashed`,`dashedColor${L(r)}`],bar1:[`bar`,`bar1`,`barColor${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar1Indeterminate`,n===`determinate`&&`bar1Determinate`,n===`buffer`&&`bar1Buffer`],bar2:[`bar`,`bar2`,n!==`buffer`&&`barColor${L(r)}`,n===`buffer`&&`color${L(r)}`,(n===`indeterminate`||n===`query`)&&`bar2Indeterminate`,n===`buffer`&&`bar2Buffer`]},I$,t)},G$=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode===`light`?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),K$=F(`span`,{name:`MuiLinearProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`color${L(n.color)}`],t[n.variant]]}})(Do(({theme:e})=>({position:`relative`,overflow:`hidden`,display:`block`,height:4,zIndex:0,"@media print":{colorAdjust:`exact`},variants:[...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{backgroundColor:G$(e,t)}})),{props:({ownerState:e})=>e.color===`inherit`&&e.variant!==`buffer`,style:{"&::before":{content:`""`,position:`absolute`,left:0,top:0,right:0,bottom:0,backgroundColor:`currentColor`,opacity:.3}}},{props:{variant:`buffer`},style:{backgroundColor:`transparent`}},{props:{variant:`query`},style:{transform:`rotate(180deg)`}}]}))),q$=F(`span`,{name:`MuiLinearProgress`,slot:`Dashed`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.dashed,t[`dashedColor${L(n.color)}`]]}})(Do(({theme:e})=>({position:`absolute`,marginTop:0,height:`100%`,width:`100%`,backgroundSize:`10px 10px`,backgroundPosition:`0 -23px`,variants:[{props:{color:`inherit`},style:{opacity:.3,backgroundImage:`radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`}},...Object.entries(e.palette).filter(Ao()).map(([t])=>{let n=G$(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),U$||{animation:`${H$} 3s infinite linear`}),J$=F(`span`,{name:`MuiLinearProgress`,slot:`Bar1`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar1,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar1Indeterminate,n.variant===`determinate`&&t.bar1Determinate,n.variant===`buffer`&&t.bar1Buffer]}})(Do(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[{props:{color:`inherit`},style:{backgroundColor:`currentColor`}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:`determinate`},style:{transition:`transform .${L$}s linear`}},{props:{variant:`buffer`},style:{zIndex:1,transition:`transform .${L$}s linear`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:z$||{animation:`${R$} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Y$=F(`span`,{name:`MuiLinearProgress`,slot:`Bar2`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.bar,t.bar2,t[`barColor${L(n.color)}`],(n.variant===`indeterminate`||n.variant===`query`)&&t.bar2Indeterminate,n.variant===`buffer`&&t.bar2Buffer]}})(Do(({theme:e})=>({width:`100%`,position:`absolute`,left:0,bottom:0,top:0,transition:`transform 0.2s linear`,transformOrigin:`left`,variants:[...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>e.variant!==`buffer`&&e.color!==`inherit`,style:{backgroundColor:`var(--LinearProgressBar2-barColor, currentColor)`}},{props:({ownerState:e})=>e.variant!==`buffer`&&e.color===`inherit`,style:{backgroundColor:`currentColor`}},{props:{color:`inherit`},style:{opacity:.3}},...Object.entries(e.palette).filter(Ao()).map(([t])=>({props:{color:t,variant:`buffer`},style:{backgroundColor:G$(e,t),transition:`transform .${L$}s linear`}})),{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:{width:`auto`}},{props:({ownerState:e})=>e.variant===`indeterminate`||e.variant===`query`,style:V$||{animation:`${B$} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),X$=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiLinearProgress`}),{className:r,color:i=`primary`,value:a,valueBuffer:o,variant:s=`indeterminate`,...c}=n,l={...n,color:i,variant:s},u=W$(l),d=Di(),f={},p={bar1:{},bar2:{}};if((s===`determinate`||s===`buffer`)&&a!==void 0){f[`aria-valuenow`]=Math.round(a),f[`aria-valuemin`]=0,f[`aria-valuemax`]=100;let e=a-100;d&&(e=-e),p.bar1.transform=`translateX(${e}%)`}if(s===`buffer`&&o!==void 0){let e=(o||0)-100;d&&(e=-e),p.bar2.transform=`translateX(${e}%)`}return(0,N.jsxs)(K$,{className:g(u.root,r),ownerState:l,role:`progressbar`,...f,ref:t,...c,children:[s===`buffer`?(0,N.jsx)(q$,{className:u.dashed,ownerState:l}):null,(0,N.jsx)(J$,{className:u.bar1,ownerState:l,style:p.bar1}),s===`determinate`?null:(0,N.jsx)(Y$,{className:u.bar2,ownerState:l,style:p.bar2})]})}),Z$=m(`@pie-lib:editable-html:image:insert-image-handler`),Q$=class{constructor(e,t,n,r=!1){this.editor=e,this.nodeInfo=t,this.node=t[0],this.nodePos=t[1],this.onFinish=n,this.isPasted=r,this.chosenFile=null}cancel(){Z$(`insert cancelled`);try{this.deleteNode(),this.onFinish(!1)}catch{}finally{this.editor._insertingImage=!1}}updateNode(e){let{state:t,view:n}=this.editor,{tr:r}=t,i=t.doc.nodeAt(this.nodePos);if(i){let t=r.setNodeMarkup(this.nodePos,void 0,{...i.attrs,...e});n.dispatch(t)}}deleteNode(){let{state:e,view:t}=this.editor,{tr:n}=e,r=n.delete(this.nodePos,this.nodePos+this.node.nodeSize);t.dispatch(r)}done(e,t){Z$(`done: err:`,e),e?(console.log(e),this.onFinish(!1)):(this.updateNode({loaded:!0,src:t,percent:100}),this.onFinish(!0)),this.editor._insertingImage=!1}fileChosen(e){if(!e)return;this.chosenFile=e,this.editor._insertingImage=!1,Z$(`[fileChosen] file: `,e);let t=new FileReader;t.onload=()=>{let e=t.result;this.updateNode({src:e})},t.readAsDataURL(e)}progress(e,t,n){Z$(`progress: `,e,t,n),this.updateNode({percent:e})}getChosenFile(){return this.chosenFile}};function $$(e){return Br(`MuiDialogContent`,e)}Vr(`MuiDialogContent`,[`root`,`dividers`]);function e1(e){return Br(`MuiDialogTitle`,e)}var t1=Vr(`MuiDialogTitle`,[`root`]),n1=e=>{let{classes:t,dividers:n}=e;return _({root:[`root`,n&&`dividers`]},$$,t)},r1=F(`div`,{name:`MuiDialogContent`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Do(({theme:e})=>({flex:`1 1 auto`,WebkitOverflowScrolling:`touch`,overflowY:`auto`,padding:`20px 24px`,variants:[{props:({ownerState:e})=>e.dividers,style:{padding:`16px 24px`,borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${t1.root} + &`]:{paddingTop:0}}}]}))),i1=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiDialogContent`}),{className:r,dividers:i=!1,...a}=n,o={...n,dividers:i},s=n1(o);return(0,N.jsx)(r1,{className:g(s.root,r),ownerState:o,ref:t,...a})}),a1=GL((0,N.jsx)(`path`,{d:`M11.67 3.87 9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z`}),`ArrowBackIos`);function o1(e){return Br(`MuiFormHelperText`,e)}var s1=Vr(`MuiFormHelperText`,[`root`,`error`,`disabled`,`sizeSmall`,`sizeMedium`,`contained`,`focused`,`filled`,`required`]),c1,l1=e=>{let{classes:t,contained:n,size:r,disabled:i,error:a,filled:o,focused:s,required:c}=e;return _({root:[`root`,i&&`disabled`,a&&`error`,r&&`size${L(r)}`,n&&`contained`,s&&`focused`,o&&`filled`,c&&`required`]},o1,t)},u1=F(`p`,{name:`MuiFormHelperText`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.size&&t[`size${L(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Do(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:`left`,marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${s1.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${s1.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:`small`},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),d1=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiFormHelperText`}),{children:r,className:i,component:a=`p`,disabled:o,error:s,filled:c,focused:l,margin:u,required:d,variant:f,...p}=n,m=iG({props:n,muiFormControl:oG(),states:[`variant`,`size`,`disabled`,`error`,`filled`,`focused`,`required`]}),h={...n,component:a,contained:m.variant===`filled`||m.variant===`outlined`,variant:m.variant,size:m.size,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required};delete h.ownerState;let _=l1(h);return(0,N.jsx)(u1,{as:a,className:g(_.root,i),ref:t,...p,ownerState:h,children:r===` `?c1||=(0,N.jsx)(`span`,{className:`notranslate`,"aria-hidden":!0,children:``}):r})});function f1(e){return Br(`MuiTextField`,e)}Vr(`MuiTextField`,[`root`]);var p1={standard:CQ,filled:kQ,outlined:BQ},m1=e=>{let{classes:t}=e;return _({root:[`root`]},f1,t)},h1=F(CG,{name:`MuiTextField`,slot:`Root`})({}),g1=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiTextField`}),{autoComplete:r,autoFocus:i=!1,children:a,className:o,color:s=`primary`,defaultValue:c,disabled:l=!1,error:u=!1,FormHelperTextProps:d,fullWidth:f=!1,helperText:p,id:m,InputLabelProps:h,inputProps:_,InputProps:v,inputRef:y,label:b,maxRows:x,minRows:S,multiline:C=!1,name:w,onBlur:T,onChange:E,onFocus:ee,placeholder:D,required:O=!1,rows:te,select:k=!1,SelectProps:A,slots:j={},slotProps:M={},type:ne,value:re,variant:ie=`outlined`,...ae}=n,oe={...n,autoFocus:i,color:s,disabled:l,error:u,fullWidth:f,multiline:C,required:O,select:k,variant:ie},se=m1(oe),ce=Fi(m),le=p&&ce?`${ce}-helper-text`:void 0,ue=b&&ce?`${ce}-label`:void 0,de=p1[ie],fe={slots:j,slotProps:{input:v,inputLabel:h,htmlInput:_,formHelperText:d,select:A,...M}},pe={},me=fe.slotProps.inputLabel;ie===`outlined`&&(me&&me.shrink!==void 0&&(pe.notched=me.shrink),pe.label=b),k&&((!A||!A.native)&&(pe.id=void 0),pe[`aria-describedby`]=void 0);let[he,ge]=hH(`root`,{elementType:h1,shouldForwardComponentProp:!0,externalForwardedProps:{...fe,...ae},ownerState:oe,className:g(se.root,o),ref:t,additionalProps:{disabled:l,error:u,fullWidth:f,required:O,color:s,variant:ie}}),[_e,ve]=hH(`input`,{elementType:de,externalForwardedProps:fe,additionalProps:pe,ownerState:oe}),[ye,be]=hH(`inputLabel`,{elementType:gG,externalForwardedProps:fe,ownerState:oe}),[xe,Se]=hH(`htmlInput`,{elementType:`input`,externalForwardedProps:fe,ownerState:oe}),[Ce,we]=hH(`formHelperText`,{elementType:d1,externalForwardedProps:fe,ownerState:oe}),[Te,Ee]=hH(`select`,{elementType:KQ,externalForwardedProps:fe,ownerState:oe}),De=(0,N.jsx)(_e,{"aria-describedby":le,autoComplete:r,autoFocus:i,defaultValue:c,fullWidth:f,multiline:C,name:w,rows:te,maxRows:x,minRows:S,type:ne,value:re,id:ce,inputRef:y,onBlur:T,onChange:E,onFocus:ee,placeholder:D,inputProps:Se,slots:{input:j.htmlInput?xe:void 0},...ve});return(0,N.jsxs)(he,{...ge,children:[b!=null&&b!==``&&(0,N.jsx)(ye,{htmlFor:ce,id:ue,...be,children:b}),k?(0,N.jsx)(Te,{"aria-describedby":le,id:ce,labelId:ue,value:re,input:De,...Ee,children:a}):De,p&&(0,N.jsx)(Ce,{id:le,...we,children:p})]})});function _1(e){return Br(`MuiDialogActions`,e)}Vr(`MuiDialogActions`,[`root`,`spacing`]);var v1=e=>{let{classes:t,disableSpacing:n}=e;return _({root:[`root`,!n&&`spacing`]},_1,t)},y1=F(`div`,{name:`MuiDialogActions`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:`flex`,alignItems:`center`,padding:8,justifyContent:`flex-end`,flex:`0 0 auto`,variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),b1=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiDialogActions`}),{className:r,disableSpacing:i=!1,...a}=n,o={...n,disableSpacing:i},s=v1(o);return(0,N.jsx)(y1,{className:g(s.root,r),ownerState:o,ref:t,...a})});function x1(e){return Br(`MuiDialog`,e)}var S1=Vr(`MuiDialog`,[`root`,`backdrop`,`scrollPaper`,`scrollBody`,`container`,`paper`,`paperScrollPaper`,`paperScrollBody`,`paperWidthFalse`,`paperWidthXs`,`paperWidthSm`,`paperWidthMd`,`paperWidthLg`,`paperWidthXl`,`paperFullWidth`,`paperFullScreen`]),C1=S.createContext({}),w1=F(SH,{name:`MuiDialog`,slot:`Backdrop`})({zIndex:-1}),T1=e=>{let{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:a}=e;return _({root:[`root`],backdrop:[`backdrop`],container:[`container`,`scroll${L(n)}`],paper:[`paper`,`paperScroll${L(n)}`,`paperWidth${L(String(r))}`,i&&`paperFullWidth`,a&&`paperFullScreen`]},x1,t)},E1=F(MH,{name:`MuiDialog`,slot:`Root`})({"@media print":{position:`absolute !important`}}),D1=F(`div`,{name:`MuiDialog`,slot:`Container`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.container,t[`scroll${L(n.scroll)}`]]}})({height:`100%`,"@media print":{height:`auto`},outline:0,variants:[{props:{scroll:`paper`},style:{display:`flex`,justifyContent:`center`,alignItems:`center`}},{props:{scroll:`body`},style:{overflowY:`auto`,overflowX:`hidden`,textAlign:`center`,"&::after":{content:`""`,display:`inline-block`,verticalAlign:`middle`,height:`100%`,width:`0`}}}]}),O1=F(IH,{name:`MuiDialog`,slot:`Paper`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.paper,t[`scrollPaper${L(n.scroll)}`],t[`paperWidth${L(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Do(({theme:e})=>({margin:32,position:`relative`,overflowY:`auto`,"@media print":{overflowY:`visible`,boxShadow:`none`},variants:[{props:{scroll:`paper`},style:{display:`flex`,flexDirection:`column`,maxHeight:`calc(100% - 64px)`}},{props:{scroll:`body`},style:{display:`inline-block`,verticalAlign:`middle`,textAlign:`initial`}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:`calc(100% - 64px)`}},{props:{maxWidth:`xs`},style:{maxWidth:e.breakpoints.unit===`px`?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:`calc(100% - 64px)`}}}},...Object.keys(e.breakpoints.values).filter(e=>e!==`xs`).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${S1.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:`calc(100% - 64px)`}}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:`calc(100% - 64px)`}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:`100%`,maxWidth:`100%`,height:`100%`,maxHeight:`none`,borderRadius:0,[`&.${S1.paperScrollBody}`]:{margin:0,maxWidth:`100%`}}}]}))),k1=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiDialog`}),r=xo(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":o,"aria-modal":s=!0,BackdropComponent:c,BackdropProps:l,children:u,className:d,disableEscapeKeyDown:f=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:h=`sm`,onClick:_,onClose:v,open:y,PaperComponent:b=IH,PaperProps:x={},role:C=`dialog`,scroll:w=`paper`,slots:T={},slotProps:E={},TransitionComponent:ee=vH,transitionDuration:D=i,TransitionProps:O,...te}=n,k={...n,disableEscapeKeyDown:f,fullScreen:p,fullWidth:m,maxWidth:h,scroll:w},A=T1(k),j=S.useRef(),M=e=>{j.current=e.target===e.currentTarget},ne=e=>{_&&_(e),j.current&&(j.current=null,v&&v(e,`backdropClick`))},re=Fi(o),ie=S.useMemo(()=>({titleId:re}),[re]),ae={slots:{transition:ee,...T},slotProps:{transition:O,paper:x,backdrop:l,...E}},[oe,se]=hH(`root`,{elementType:E1,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:g(A.root,d),ref:t}),[ce,le]=hH(`backdrop`,{elementType:w1,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:A.backdrop}),[ue,de]=hH(`paper`,{elementType:O1,shouldForwardComponentProp:!0,externalForwardedProps:ae,ownerState:k,className:A.paper,additionalProps:{elevation:24,role:C,"aria-describedby":a,"aria-labelledby":re,"aria-modal":s,tabIndex:-1,[$V]:``}}),[fe,pe]=hH(`container`,{elementType:D1,externalForwardedProps:ae,ownerState:k,className:A.container}),[me,he]=hH(`transition`,{elementType:vH,externalForwardedProps:ae,ownerState:k,additionalProps:{appear:!0,in:y,timeout:D,role:`presentation`}});return(0,N.jsx)(oe,{closeAfterTransition:!0,slots:{backdrop:ce},slotProps:{backdrop:{transitionDuration:D,as:c,...le}},disableEscapeKeyDown:f,onClose:v,open:y,onClick:ne,...se,...te,children:(0,N.jsx)(me,{...he,children:(0,N.jsx)(fe,{onMouseDown:M,...pe,children:(0,N.jsx)(ue,{as:b,...de,children:(0,N.jsx)(C1.Provider,{value:ie,children:u})})})})})}),A1=class extends S.Component{static propTypes={onDone:p.func.isRequired,alt:p.string};constructor(e){super(e);let{alt:t}=e;this.state={value:t}}closeDialog=()=>{document.querySelectorAll(`#text-dialog`).forEach(function(e){return e.remove()})};onDone=()=>{let{onDone:e}=this.props,{value:t}=this.state;e(t),this.closeDialog()};handleOverflow=()=>{document.body.style.removeProperty(`overflow`)};render(){let{value:e}=this.state;return(0,N.jsxs)(k1,{open:!0,disablePortal:!0,onClose:this.closeDialog,id:`text-dialog`,hideBackdrop:!0,disableScrollLock:!0,onEntered:this.handleOverflow,children:[(0,N.jsx)(i1,{children:(0,N.jsxs)(`div`,{style:{display:`flex`},children:[(0,N.jsx)(a1,{style:{paddingTop:`6px`}}),(0,N.jsx)(g1,{multiline:!0,placeholder:`Enter an Alt Text description of this image`,helperText:`Users with visual limitations rely on Alt Text, since screen readers cannot otherwise describe the contents of an image.`,value:e,onChange:e=>this.setState({value:e.target.value}),FormHelperTextProps:{style:{fontSize:14}}})]})}),(0,N.jsx)(b1,{children:(0,N.jsx)(WW,{onClick:this.onDone,children:`Done`})})]})}},j1=F(`button`,{shouldForwardProp:e=>![`active`,`disabled`,`extraStyles`].includes(e)})(({active:e,disabled:t})=>({color:e?ZH():QH(),display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:t?`not-allowed`:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:t?QH():ZH()},"&:focus":{outline:`2px solid ${zU()}`},...t&&{opacity:.7}})),M1=m(`pie-elements:editable-html:raw-button`);(class extends S.Component{static propTypes={onClick:p.func.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool,disabled:p.bool,extraStyles:p.object};constructor(e){super(e)}onClick=e=>{M1(`[onClick]`),e.preventDefault();let{onClick:t}=this.props;t(e)};onKeyDown=e=>{if(e.key===`Enter`||e.key===` `){M1(`[onKeyDown]`),e.preventDefault();let{onClick:t}=this.props;t(e)}};render(){let{active:e,children:t,disabled:n,extraStyles:r,ariaLabel:i}=this.props;return(0,N.jsx)(j1,{style:r,active:e,disabled:n,onMouseDown:this.onClick,onKeyDown:this.onKeyDown,"aria-label":i,"aria-pressed":e,tabIndex:0,children:t})}});var N1=class extends S.Component{static propTypes={onToggle:p.func.isRequired,mark:p.string,label:p.string.isRequired,children:p.oneOfType([p.arrayOf(p.node),p.node]).isRequired,active:p.bool};constructor(e){super(e)}onToggle=e=>{e.preventDefault(),this.props.onToggle(this.props.mark)};onKeyDown=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),this.props.onToggle(this.props.mark))};render(){let{children:e,active:t,label:n}=this.props;return(0,N.jsx)(j1,{active:t,onMouseDown:this.onToggle,"aria-pressed":t,onKeyDown:this.onKeyDown,"aria-label":n,tabIndex:0,children:e})}},P1=m(`@pie-lib:editable-html:plugins:image:image-toolbar`),F1=F(`div`)(({theme:e})=>({paddingLeft:e.spacing.unit,display:`flex`,alignItems:`center`})),I1=F(`span`,{shouldForwardProp:e=>![`disabled`,`hasAlignmentButtons`].includes(e)})(({disabled:e,hasAlignmentButtons:t})=>({...e&&{opacity:.5},...t&&{borderLeft:`1px solid grey`,paddingLeft:8,marginLeft:4}})),L1=({alignment:e,active:t,onClick:n})=>(0,N.jsx)(N1,{active:t,onToggle:()=>n(e),label:e,children:e});L1.propTypes={alignment:p.string.isRequired,active:p.bool.isRequired,onClick:p.func.isRequired};var R1=class extends S.Component{static propTypes={onChange:p.func.isRequired,alignment:p.string,alt:p.string,imageLoaded:p.bool,disableImageAlignmentButtons:p.bool};onAltTextDone=e=>{P1(`[onAltTextDone]: alt:`,e),this.props.onChange({alt:e},!0)};onAlignmentClick=e=>{P1(`[onAlignmentClick]: alignment:`,e),this.props.onChange({alignment:e})};renderDialog=()=>{let{alt:e}=this.props,t=document.createElement(`div`),n=(0,N.jsx)(A1,{alt:e,onDone:this.onAltTextDone});zx.render(n,t),document.body.appendChild(t)};render(){let{alignment:e,imageLoaded:t,disableImageAlignmentButtons:n}=this.props;return(0,N.jsxs)(F1,{children:[!n&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(L1,{alignment:`left`,active:e===`left`,onClick:this.onAlignmentClick}),(0,N.jsx)(L1,{alignment:`center`,active:e===`center`,onClick:this.onAlignmentClick}),(0,N.jsx)(L1,{alignment:`right`,active:e===`right`,onClick:this.onAlignmentClick})]}),(0,N.jsx)(I1,{disabled:!t,hasAlignmentButtons:!n,onMouseDown:e=>t&&this.renderDialog(e),children:`Alt text`})]})}},z1=F(X$,{shouldForwardProp:e=>e!==`hideProgress`})(({hideProgress:e})=>({position:`absolute`,left:`0`,width:`fit-content`,top:`0%`,transition:`opacity 200ms linear`,...e&&{opacity:0}})),B1=F(`div`,{shouldForwardProp:e=>![`active`,`loading`,`pendingDelete`].includes(e)})(({loading:e,pendingDelete:t})=>({position:`relative`,display:`flex`,transition:`opacity 200ms linear`,...e&&{opacity:.3},...t&&{opacity:.3}})),V1=F(`div`)(({theme:e})=>({position:`relative`,width:`fit-content`,display:`flex`,alignItems:`center`,"&&:hover > .resize":{display:`block`}})),H1=F(`img`,{shouldForwardProp:e=>e!==`active`})(({theme:e,active:t})=>({border:t?`solid 1px ${e.palette.primary.main}`:`solid 1px transparent`})),U1=F(`div`)(({theme:e})=>({backgroundColor:e.palette.primary.main,cursor:`col-resize`,height:`35px`,width:`5px`,borderRadius:8,marginLeft:`5px`,marginRight:`10px`,display:`none`})),W1=e=>e?`${e}px`:`calc(20px)`;function G1(e){let{node:t,editor:n,attributes:r,onFocus:i,getPos:a,selected:o,options:s,maxImageWidth:c=700,maxImageHeight:l=900}=e,{alt:u}=t.attrs,d=a(),f=n.state.selection.from,p=n.state.selection.to,m=(0,S.useMemo)(()=>f+t.nodeSize===p,[f,p,t.nodeSize]),[h,g]=(0,S.useState)(!1),_=(0,S.useRef)(t),v=(0,S.useRef)(null),y=(0,S.useRef)(null),b=(0,S.useRef)(null),x=(0,S.useCallback)(e=>{let t=e/v.current.naturalWidth*4;return parseInt(t.toFixed(0)*25,10)},[]),C=(0,S.useCallback)(()=>{let e=_.current.attrs.nodeKey,t=null;return n.state.doc.descendants((n,r)=>{if(t!==null)return!1;if(n.type.name===`imageUploadNode`&&n.attrs.nodeKey===e)return t=r,!1}),t},[n]),w=(0,S.useCallback)(e=>{let t=C();if(t===null)return;let r=n.state.doc.nodeAt(t);r&&n.view.dispatch(n.state.tr.setNodeMarkup(t,void 0,{...r.attrs,...e}))},[n,C]),T=(0,S.useCallback)(()=>{if(!t.attrs.width||!v.current||!v.current.naturalWidth)return;let e=x(t.attrs.width);t.attrs.resizePercent!==e&&w({resizePercent:e})},[t.attrs.width,t.attrs.resizePercent,x,w]);(0,S.useEffect)(()=>{_.current={...t,pos:d}},[t,d]),(0,S.useEffect)(()=>{o?m&&n.isEditable&&(!String(t.attrs?.src??``).trim()&&s.imageHandling?.insertImageRequested&&s.imageHandling.insertImageRequested(n,[t,d],e=>new Q$(n,[t,d],e)),g(o)):g(o)},[m,o,n.isEditable]),(0,S.useEffect)(()=>{T();let e=y?.current;return e&&n.isEditable&&e.addEventListener(`mousedown`,k,!1),()=>{e&&e.removeEventListener(`mousedown`,k,!1)}},[]),(0,S.useEffect)(()=>{T()});let E=(0,S.useCallback)(()=>{let e=v.current;if(e&&(!e.style.width||e.style.width===`calc(20px)`)){let n=Math.min(e.naturalWidth,c),r=Math.min(e.naturalHeight,l);e.style.width=`${n}px`,e.style.height=`${r}px`;let i={width:n,height:r};es(i,{width:t.attrs.width,height:t.attrs.height})||w(i)}},[t.attrs.width,t.attrs.height,c,l,w]),ee=(e,t,n=!0,r)=>{if(n){let n=e.width/e.height;return r===`height`?{width:t.height*n,height:t.height}:{width:t.width,height:t.width/n}}return t},D=(0,S.useCallback)(e=>{let t=v.current;if(!t)return;let n=e.target.getBoundingClientRect(),r={width:t.naturalWidth,height:t.naturalHeight},i=ee(r,{width:e.clientX-n.left,height:e.clientY-n.top});i.width>50&&i.height>50&&i.width<=700&&i.height<=900&&(t.style.width=`${i.width}px`,t.style.height=`${i.height}px`,w({width:i.width,height:i.height}))},[n,w]),O=(0,S.useCallback)(e=>{w(e)},[n,w]),te=(0,S.useCallback)(()=>{window.removeEventListener(`mousemove`,D),window.removeEventListener(`mouseup`,te)},[D]),k=(0,S.useCallback)(()=>{window.addEventListener(`mousemove`,D),window.addEventListener(`mouseup`,te)},[D,te]),A={width:W1(t.attrs.width),height:W1(t.attrs.height),objectFit:`contain`},j={left:`flex-start`,center:`center`,right:`flex-end`}[t.attrs.alignment]||`flex-start`;return(0,N.jsxs)(iS,{children:[(0,N.jsxs)(B1,{onFocus:i,loading:!t.attrs.loaded,pendingDelete:t.attrs.deleteStatus===`pending`,style:{justifyContent:j},children:[(0,N.jsx)(z1,{mode:`determinate`,value:t.attrs.percent||0,hideProgress:t.attrs.loaded}),(0,N.jsxs)(V1,{onDragStart:e=>e.preventDefault(),children:[(0,N.jsx)(H1,{...r,active:o&&t.attrs.loaded,draggable:!1,ref:v,src:t.attrs.src,style:A,onLoad:E,alt:t.attrs.alt}),(0,N.jsx)(U1,{ref:y,className:`resize`,style:{display:n.isEditable?void 0:`none`}})]})]}),h&&n._tiptapContainerEl&&zx.createPortal((0,N.jsx)(`div`,{ref:b,style:{zIndex:20,background:`var(--editable-html-toolbar-bg, #efefef)`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,width:`100%`},children:(0,N.jsx)(Lz,{showDone:!0,deletable:!0,toolbarOpts:s.toolbarOpts||{},onDelete:()=>{let e=C();e!==null&&(s.imageHandling?.onDelete?.(_.current),n.view.dispatch(n.state.tr.delete(e,e+n.state.doc.nodeAt(e).nodeSize)),g(!1),n.commands.focus())},onDone:()=>{g(!1),s.imageHandling?.onDone?.(n),n.commands.focus(`end`)},children:(0,N.jsx)(R1,{disableImageAlignmentButtons:s.imageHandling?.disableImageAlignmentButtons,alt:t.attrs.alt,imageLoaded:t.attrs.loaded,alignment:t.attrs.alignment||`left`,onChange:O})})}),n._tiptapContainerEl)]})}G1.propTypes={node:p.object.isRequired,editor:p.object.isRequired,attributes:p.object,onFocus:p.func,maxImageWidth:p.number,maxImageHeight:p.number};var K1=Rb.create({name:`imageUploadNode`,group:`block`,atom:!0,selectable:!0,draggable:!0,addAttributes(){return{nodeKey:{default:null},loaded:{default:!1},deleteStatus:{default:null},alignment:{default:null},percent:{default:null},width:{default:null},height:{default:null},src:{default:null},alt:{default:null}}},parseHTML(){return[{tag:`img[data-type="image-upload-node"]`}]},renderHTML({HTMLAttributes:e}){return[`img`,Hv(e,{"data-type":`image-upload-node`})]},addNodeView(){return fS(e=>(0,N.jsx)(G1,{...e,options:this.options}))},addCommands(){return{setImageUploadNode:()=>({commands:e})=>e.insertContent({type:this.name,attrs:{nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})}},addProseMirrorPlugins(){let e=this.editor;return[new du({props:{handlePaste(t,n){let r=Array.from(n.clipboardData?.items||[]).find(e=>e.kind===`file`&&e.type.startsWith(`image/`));if(!r)return!1;let i=r.getAsFile();if(!i)return!1;let a=new FileReader;return a.onload=()=>{let t=a.result;typeof t==`string`&&e.commands.insertContent({type:`imageUploadNode`,attrs:{src:t,loaded:!0,nodeKey:`img-${Date.now()}-${Math.random().toString(36).slice(2)}`}})},a.readAsDataURL(i),!0}}})]}});function q1(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function J1(e,t,n,r={},i=()=>{}){let{ease:a=q1,duration:o=300}=r,s=null,c=t[e],l=!1,u=()=>{l=!0},d=r=>{if(l){i(Error(`Animation cancelled`));return}s===null&&(s=r);let u=Math.min(1,(r-s)/o);if(t[e]=a(u)*(n-c)+c,u>=1){requestAnimationFrame(()=>{i(null)});return}requestAnimationFrame(d)};return c===n?(i(Error(`Element already at target position`)),u):(requestAnimationFrame(d),u)}var Y1={width:99,height:99,position:`absolute`,top:-9999,overflow:`scroll`};function X1(e){let{onChange:t,...n}=e,r=S.useRef(),i=S.useRef(null),a=()=>{r.current=i.current.offsetHeight-i.current.clientHeight};return eR(()=>{let e=qL(()=>{let e=r.current;a(),e!==r.current&&t(r.current)}),n=QL(i.current);return n.addEventListener(`resize`,e),()=>{e.clear(),n.removeEventListener(`resize`,e)}},[t]),S.useEffect(()=>{a(),t(r.current)},[t]),(0,N.jsx)(`div`,{style:Y1,...n,ref:i})}var Z1=GL((0,N.jsx)(`path`,{d:`M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z`}),`KeyboardArrowLeft`),Q1=GL((0,N.jsx)(`path`,{d:`M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z`}),`KeyboardArrowRight`);function $1(e){return Br(`MuiTabScrollButton`,e)}var e0=Vr(`MuiTabScrollButton`,[`root`,`vertical`,`horizontal`,`disabled`]),t0=e=>{let{classes:t,orientation:n,disabled:r}=e;return _({root:[`root`,n,r&&`disabled`]},$1,t)},n0=F(cz,{name:`MuiTabScrollButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${e0.disabled}`]:{opacity:0},variants:[{props:{orientation:`vertical`},style:{width:`100%`,height:40,"& svg":{transform:`var(--TabScrollButton-svgRotate)`}}}]}),r0=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiTabScrollButton`}),{className:r,slots:i={},slotProps:a={},direction:o,orientation:s,disabled:c,...l}=n,u=Di(),d={isRtl:u,...n},f=t0(d),p=i.StartScrollButtonIcon??Z1,m=i.EndScrollButtonIcon??Q1,h=VG({elementType:p,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d}),_=VG({elementType:m,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:`small`},ownerState:d});return(0,N.jsx)(n0,{component:`div`,className:g(f.root,r),ref:t,role:null,ownerState:d,tabIndex:null,...l,style:{...l.style,...s===`vertical`&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:o===`left`?(0,N.jsx)(p,{...h}):(0,N.jsx)(m,{..._})})});function i0(e){return Br(`MuiTabs`,e)}var a0=Vr(`MuiTabs`,[`root`,`vertical`,`list`,`flexContainer`,`flexContainerVertical`,`centered`,`scroller`,`fixed`,`scrollableX`,`scrollableY`,`hideScrollbar`,`scrollButtons`,`scrollButtonsHideMobile`,`indicator`]),o0=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,s0=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,c0=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}let t=i.disabled||i.getAttribute(`aria-disabled`)===`true`;if(!i.hasAttribute(`tabindex`)||t)i=n(e,i);else{i.focus();return}}},l0=e=>{let{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:a,centered:o,scrollButtonsHideMobile:s,classes:c}=e;return _({root:[`root`,t&&`vertical`],scroller:[`scroller`,n&&`fixed`,r&&`hideScrollbar`,i&&`scrollableX`,a&&`scrollableY`],list:[`list`,`flexContainer`,t&&`flexContainerVertical`,t&&`vertical`,o&&`centered`],indicator:[`indicator`],scrollButtons:[`scrollButtons`,s&&`scrollButtonsHideMobile`],scrollableX:[i&&`scrollableX`],hideScrollbar:[r&&`hideScrollbar`]},i0,c)},u0=F(`div`,{name:`MuiTabs`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${a0.scrollButtons}`]:t.scrollButtons},{[`& .${a0.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Do(({theme:e})=>({overflow:`hidden`,minHeight:48,WebkitOverflowScrolling:`touch`,display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${a0.scrollButtons}`]:{[e.breakpoints.down(`sm`)]:{display:`none`}}}}]}))),d0=F(`div`,{name:`MuiTabs`,slot:`Scroller`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:`relative`,display:`inline-block`,flex:`1 1 auto`,whiteSpace:`nowrap`,variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:`hidden`,width:`100%`}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:`auto`,overflowY:`hidden`}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:`auto`,overflowX:`hidden`}}]}),f0=F(`div`,{name:`MuiTabs`,slot:`List`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.list,t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:`flex`,variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:`column`}},{props:({ownerState:e})=>e.centered,style:{justifyContent:`center`}}]}),p0=F(`span`,{name:`MuiTabs`,slot:`Indicator`})(Do(({theme:e})=>({position:`absolute`,height:2,bottom:0,width:`100%`,transition:e.transitions.create(),variants:[{props:{indicatorColor:`primary`},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:`secondary`},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:`100%`,width:2,right:0}}]}))),m0=F(X1)({overflowX:`auto`,overflowY:`hidden`,scrollbarWidth:`none`,"&::-webkit-scrollbar":{display:`none`}}),h0={},g0=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiTabs`}),r=xo(),i=Di(),{"aria-label":a,"aria-labelledby":o,action:s,centered:c=!1,children:l,className:u,component:d=`div`,allowScrollButtonsMobile:f=!1,indicatorColor:p=`primary`,onChange:m,orientation:h=`horizontal`,ScrollButtonComponent:_,scrollButtons:v=`auto`,selectionFollowsFocus:y,slots:b={},slotProps:x={},TabIndicatorProps:C={},TabScrollButtonProps:w={},textColor:T=`primary`,value:E,variant:ee=`standard`,visibleScrollbar:D=!1,...O}=n,te=ee===`scrollable`,k=h===`vertical`,A=k?`scrollTop`:`scrollLeft`,j=k?`top`:`left`,M=k?`bottom`:`right`,ne=k?`clientHeight`:`clientWidth`,re=k?`height`:`width`,ie={...n,component:d,allowScrollButtonsMobile:f,indicatorColor:p,orientation:h,vertical:k,scrollButtons:v,textColor:T,variant:ee,visibleScrollbar:D,fixed:!te,hideScrollbar:te&&!D,scrollableX:te&&!k,scrollableY:te&&k,centered:c&&!te,scrollButtonsHideMobile:!f},ae=l0(ie),oe=VG({elementType:b.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:ie}),se=VG({elementType:b.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:ie}),[ce,le]=S.useState(!1),[ue,de]=S.useState(h0),[fe,pe]=S.useState(!1),[me,he]=S.useState(!1),[ge,_e]=S.useState(!1),[ve,ye]=S.useState({overflow:`hidden`,scrollbarWidth:0}),be=new Map,xe=S.useRef(null),Se=S.useRef(null),Ce={slots:b,slotProps:{indicator:C,scrollButtons:w,...x}},we=()=>{let e=xe.current,t;if(e){let n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}let n;if(e&&E!==!1){let e=Se.current.children;if(e.length>0){let t=e[be.get(E)];n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},Te=aR(()=>{let{tabsMeta:e,tabMeta:t}=we(),n=0,r;k?(r=`top`,t&&e&&(n=t.top-e.top+e.scrollTop)):(r=i?`right`:`left`,t&&e&&(n=(i?-1:1)*(t[r]-e[r]+e.scrollLeft)));let a={[r]:n,[re]:t?t[re]:0};if(typeof ue[r]!=`number`||typeof ue[re]!=`number`)de(a);else{let e=Math.abs(ue[r]-a[r]),t=Math.abs(ue[re]-a[re]);(e>=1||t>=1)&&de(a)}}),Ee=(e,{animation:t=!0}={})=>{t?J1(A,xe.current,e,{duration:r.transitions.duration.standard}):xe.current[A]=e},De=e=>{let t=xe.current[A];k?t+=e:t+=e*(i?-1:1),Ee(t)},Oe=()=>{let e=xe.current[ne],t=0,n=Array.from(Se.current.children);for(let r=0;r<n.length;r+=1){let i=n[r];if(t+i[ne]>e){r===0&&(t=e);break}t+=i[ne]}return t},ke=()=>{De(-1*Oe())},Ae=()=>{De(Oe())},[je,{onChange:Me,...Ne}]=hH(`scrollbar`,{className:g(ae.scrollableX,ae.hideScrollbar),elementType:m0,shouldForwardComponentProp:!0,externalForwardedProps:Ce,ownerState:ie}),Pe=S.useCallback(e=>{Me?.(e),ye({overflow:null,scrollbarWidth:e})},[Me]),[Fe,Ie]=hH(`scrollButtons`,{className:g(ae.scrollButtons,w.className),elementType:r0,externalForwardedProps:Ce,ownerState:ie,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:b.startScrollButtonIcon||b.StartScrollButtonIcon,EndScrollButtonIcon:b.endScrollButtonIcon||b.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:oe,endScrollButtonIcon:se}}}),Le=()=>{let e={};e.scrollbarSizeListener=te?(0,N.jsx)(je,{...Ne,onChange:Pe}):null;let t=te&&(v===`auto`&&(fe||me)||v===!0);return e.scrollButtonStart=t?(0,N.jsx)(Fe,{direction:i?`right`:`left`,onClick:ke,disabled:!fe,...Ie}):null,e.scrollButtonEnd=t?(0,N.jsx)(Fe,{direction:i?`left`:`right`,onClick:Ae,disabled:!me,...Ie}):null,e},Re=aR(e=>{let{tabsMeta:t,tabMeta:n}=we();if(!(!n||!t)){if(n[j]<t[j]){let r=t[A]+(n[j]-t[j]);Ee(r,{animation:e})}else if(n[M]>t[M]){let r=t[A]+(n[M]-t[M]);Ee(r,{animation:e})}}}),ze=aR(()=>{te&&v!==!1&&_e(!ge)});S.useEffect(()=>{let e=qL(()=>{xe.current&&Te()}),t,n=n=>{n.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),ze()},r=QL(xe.current);r.addEventListener(`resize`,e);let i;return typeof ResizeObserver<`u`&&(t=new ResizeObserver(e),Array.from(Se.current.children).forEach(e=>{t.observe(e)})),typeof MutationObserver<`u`&&(i=new MutationObserver(n),i.observe(Se.current,{childList:!0})),()=>{e.clear(),r.removeEventListener(`resize`,e),i?.disconnect(),t?.disconnect()}},[Te,ze]),S.useEffect(()=>{let e=Array.from(Se.current.children),t=e.length;if(typeof IntersectionObserver<`u`&&t>0&&te&&v!==!1){let n=e[0],r=e[t-1],i={root:xe.current,threshold:.99},a=new IntersectionObserver(e=>{pe(!e[0].isIntersecting)},i);a.observe(n);let o=new IntersectionObserver(e=>{he(!e[0].isIntersecting)},i);return o.observe(r),()=>{a.disconnect(),o.disconnect()}}},[te,v,ge,l?.length]),S.useEffect(()=>{le(!0)},[]),S.useEffect(()=>{Te()}),S.useEffect(()=>{Re(h0!==ue)},[Re,ue]),S.useImperativeHandle(s,()=>({updateIndicator:Te,updateScrollButtons:ze}),[Te,ze]);let[Be,Ve]=hH(`indicator`,{className:g(ae.indicator,C.className),elementType:p0,externalForwardedProps:Ce,ownerState:ie,additionalProps:{style:ue}}),He=(0,N.jsx)(Be,{...Ve}),Ue=0,We=S.Children.map(l,e=>{if(!S.isValidElement(e))return null;let t=e.props.value===void 0?Ue:e.props.value;be.set(t,Ue);let n=t===E;return Ue+=1,S.cloneElement(e,{fullWidth:ee===`fullWidth`,indicator:n&&!ce&&He,selected:n,selectionFollowsFocus:y,onChange:m,textColor:T,value:t,...Ue===1&&E===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),Ge=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;let t=Se.current,n=QV(XL(t));if(n?.getAttribute(`role`)!==`tab`)return;let r=h===`horizontal`?`ArrowLeft`:`ArrowUp`,a=h===`horizontal`?`ArrowRight`:`ArrowDown`;switch(h===`horizontal`&&i&&(r=`ArrowRight`,a=`ArrowLeft`),e.key){case r:e.preventDefault(),c0(t,n,s0);break;case a:e.preventDefault(),c0(t,n,o0);break;case`Home`:e.preventDefault(),c0(t,null,o0);break;case`End`:e.preventDefault(),c0(t,null,s0);break;default:break}},Ke=Le(),[qe,Je]=hH(`root`,{ref:t,className:g(ae.root,u),elementType:u0,externalForwardedProps:{...Ce,...O,component:d},ownerState:ie}),[Ye,Xe]=hH(`scroller`,{ref:xe,className:ae.scroller,elementType:d0,externalForwardedProps:Ce,ownerState:ie,additionalProps:{style:{overflow:ve.overflow,[k?`margin${i?`Left`:`Right`}`:`marginBottom`]:D?void 0:-ve.scrollbarWidth}}}),[Ze,Qe]=hH(`list`,{ref:Se,className:g(ae.list,ae.flexContainer),elementType:f0,externalForwardedProps:Ce,ownerState:ie,getSlotProps:e=>({...e,onKeyDown:t=>{Ge(t),e.onKeyDown?.(t)}})});return(0,N.jsxs)(qe,{...Je,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,(0,N.jsxs)(Ye,{...Xe,children:[(0,N.jsx)(Ze,{"aria-label":a,"aria-labelledby":o,"aria-orientation":h===`vertical`?`vertical`:null,role:`tablist`,...Qe,children:We}),ce&&He]}),Ke.scrollButtonEnd]})});function _0(e){return Br(`MuiTab`,e)}var v0=Vr(`MuiTab`,[`root`,`labelIcon`,`textColorInherit`,`textColorPrimary`,`textColorSecondary`,`selected`,`disabled`,`fullWidth`,`wrapped`,`iconWrapper`,`icon`]),y0=e=>{let{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:a,label:o,selected:s,disabled:c}=e;return _({root:[`root`,a&&o&&`labelIcon`,`textColor${L(n)}`,r&&`fullWidth`,i&&`wrapped`,s&&`selected`,c&&`disabled`],icon:[`iconWrapper`,`icon`]},_0,t)},b0=F(cz,{name:`MuiTab`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${L(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${v0.iconWrapper}`]:t.iconWrapper},{[`& .${v0.icon}`]:t.icon}]}})(Do(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:`relative`,minHeight:48,flexShrink:0,padding:`12px 16px`,overflow:`hidden`,whiteSpace:`normal`,textAlign:`center`,lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&(e.iconPosition===`top`||e.iconPosition===`bottom`),style:{flexDirection:`column`}},{props:({ownerState:e})=>e.label&&e.iconPosition!==`top`&&e.iconPosition!==`bottom`,style:{flexDirection:`row`}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`top`,style:{[`& > .${v0.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`bottom`,style:{[`& > .${v0.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`start`,style:{[`& > .${v0.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&t===`end`,style:{[`& > .${v0.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:`inherit`},style:{color:`inherit`,opacity:.6,[`&.${v0.selected}`]:{opacity:1},[`&.${v0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:`primary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${v0.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${v0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:`secondary`},style:{color:(e.vars||e).palette.text.secondary,[`&.${v0.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${v0.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:`none`}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),x0=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiTab`}),{className:r,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:o,icon:s,iconPosition:c=`top`,indicator:l,label:u,onChange:d,onClick:f,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:_=`inherit`,value:v,wrapped:y=!1,...b}=n,x={...n,disabled:i,disableFocusRipple:a,selected:m,icon:!!s,iconPosition:c,label:!!u,fullWidth:o,textColor:_,wrapped:y},C=y0(x),w=s&&u&&S.isValidElement(s)?S.cloneElement(s,{className:g(C.icon,s.props.className)}):s;return(0,N.jsxs)(b0,{focusRipple:!a,className:g(C.root,r),ref:t,role:`tab`,"aria-selected":m,disabled:i,onClick:e=>{!m&&d&&d(e,v),f&&f(e)},onFocus:e=>{h&&!m&&d&&d(e,v),p&&p(e)},ownerState:x,tabIndex:m?0:-1,...b,children:[c===`top`||c===`start`?(0,N.jsxs)(S.Fragment,{children:[w,u]}):(0,N.jsxs)(S.Fragment,{children:[u,w]}),l]})}),S0=e=>{let{classes:t}=e;return _({root:[`root`]},e1,t)},C0=F(Lo,{name:`MuiDialogTitle`,slot:`Root`})({padding:`16px 24px`,flex:`0 0 auto`}),w0=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiDialogTitle`}),{className:r,id:i,...a}=n,o=n,s=S0(o),{titleId:c=i}=S.useContext(C1);return(0,N.jsx)(C0,{component:`h2`,className:g(s.root,r),ownerState:o,ref:t,variant:`h6`,id:i??c,...a})});function T0(e){return Br(`MuiDialogContentText`,e)}Vr(`MuiDialogContentText`,[`root`]);var E0=e=>{let{classes:t}=e,n=_({root:[`root`]},T0,t);return{...t,...n}},D0=F(Lo,{shouldForwardProp:e=>wo(e)||e===`classes`,name:`MuiDialogContentText`,slot:`Root`})({}),O0=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiDialogContentText`}),{children:r,className:i,...a}=n,o=E0(a);return(0,N.jsx)(D0,{component:`p`,variant:`body1`,color:`textSecondary`,ref:t,ownerState:a,className:g(o.root,i),...n,classes:o})}),k0=m(`@pie-lib:editable-html:plugins:media:dialog`),A0=e=>{if(!e)return!1;let t=/^(?:https?:\/\/)?(?:m\.|www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;return e.match(t)?e.match(t)[1]:!1},j0=e=>e&&/(http|https)?:\/\/(www\.)?(player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|)(video\/)?(\d+)(?:|\/\?)/.test(e),M0=e=>e&&/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)/.test(e),N0=e=>{if(!e)return!1;let t=/^https?:\/\/(soundcloud\.com|snd\.sc)\/(.*)$/;return e.match(t)&&e.match(t)[2]},P0=e=>new Promise(t=>{try{fetch(`https://soundcloud.com/oembed?format=json&url=${e}`).then(e=>e.json()).then(e=>{let n=document.createElement(`div`);n.innerHTML=e.html,t(n.querySelector(`iframe`).src)}).catch(e=>{t(``),k0(e)})}catch{t(``)}}),F0={video:`Video`,audio:`Audio`},I0={uploadFile:`upload-file`,insertUrl:`insert-url`},L0=F(k1)(({theme:e})=>({"& .MuiDialog-paper":{minWidth:`500px`}})),R0=F(i1)(({theme:e})=>({padding:0})),z0=F(`div`)(({theme:e})=>({display:`flex`,flexDirection:`space-between`})),B0=F(`div`)(({theme:e})=>({marginTop:e.spacing(1.5)})),V0=F(`input`)(({theme:e})=>({})),H0=F(Lo)(({theme:e})=>({marginTop:e.spacing(1.5),color:e.palette.error.main})),U0=F(Dz)(({theme:e})=>({marginLeft:e.spacing(1.5)})),W0=class extends S.Component{static propTypes={open:p.bool,edit:p.bool,disablePortal:p.bool,handleClose:p.func,uploadSoundSupport:p.shape({add:p.func,delete:p.func}),type:p.string,src:p.string,url:p.string,urlToUse:p.string,starts:p.number,ends:p.number,height:p.number,width:p.number};constructor(e){super(e);let{ends:t,height:n,src:r,starts:i,type:a,uploadSoundSupport:o,url:s,urlToUse:c,width:l}=e,u=o?.add&&o?.delete&&a!==`video`&&!r;this.state={ends:t||0,url:s,urlToUse:c,formattedUrl:r,height:n||315,invalid:!1,starts:i||0,width:l||560,tabValue:u?I0.uploadFile:I0.insertUrl,fileUpload:{error:null,loading:!1,scheduled:!1,url:``,mimeType:``}}}componentDidMount(){this.props.url&&this.urlChange({target:{value:this.props.url}})}formatUrl=()=>{let{url:e,urlToUse:t,starts:n,ends:r}=this.state,i=A0(e),a=j0(e),o=t;if((i||a)&&t){let e=[],s,c;switch(!0){case a:s=`t`,c=`#`;break;case i:s=`start`,c=`?`;break;default:s=`start`,c=`?`}n&&e.push(`${s}=${n}`),r&&e.push(`end=${r}`),o=`${t}${e.length?c:``}${e.join(`&`)}`}this.setState({formattedUrl:null,updating:!0},()=>this.setState({formattedUrl:o,updating:!1}))};handleStateChange=e=>this.setState(e,this.formatUrl);checkAudio=e=>{N0(e)&&P0(e).then(t=>{this.handleStateChange({urlToUse:t,invalid:!t,url:e})}).catch(k0)};checkVideo=e=>{if(A0(e)){let t=`https://youtube.com/embed/${e.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)[2]}`;k0(`is youtube`),this.handleStateChange({urlToUse:t,url:e,invalid:!1})}if(j0(e)){let t=`https://player.vimeo.com/video/${e.replace(/.*vimeo.com\/(.*)/g,`$1`)}`;k0(`is vimeo`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}if(M0(e)){let t=`https://drive.google.com/file/d/${e.replace(/^https:\/\/drive\.google\.com\/(?:file\/d\/|drive\/(?:u\/\d+\/)?folders\/|uc\?id=)([a-zA-Z0-9_-]+)\/.*/,`$1`)}/preview`;k0(`is google drive`),this.handleStateChange({urlToUse:t,url:e,ends:null,invalid:!1})}};urlChange=e=>{let{value:t}=e.target||{},{type:n}=this.props;if(n&&n===`audio`){this.checkAudio(t);return}else if(n&&n===`video`){this.checkVideo(t);return}this.handleStateChange({urlToUse:null,url:null,invalid:!0})};changeHandler=e=>t=>this.handleStateChange({[e]:t.target.value});handleDone=e=>{let{handleClose:t}=this.props,{tabValue:n,fileUpload:r}=this.state,i=n===I0.insertUrl;if(!e){r.url&&this.handleRemoveFile(),t(e);return}if(i){let{ends:n,height:r,url:i,urlToUse:a,formattedUrl:o,starts:s,width:c}=this.state;t(e,{tag:`iframe`,ends:n,height:r,starts:s,width:c,url:i,urlToUse:a,src:o});return}if(!r.loading){t(e,{tag:`audio`,src:r.url});return}this.setState({fileUpload:{...r,scheduled:!0}})};handleUploadFile=async e=>{e.preventDefault(),this.setState({fileUpload:{...this.state.fileUpload,error:null,loading:!0}});let t=e.target.files[0],n=new FileReader;n.onload=()=>{let e=n.result;this.setState({fileUpload:{...this.state.fileUpload,url:e,mimeType:t.type}})},n.readAsDataURL(t),this.props.uploadSoundSupport.add({fileChosen:t,done:(e,t)=>{if(k0(`done: err:`,e),e){console.log(e),this.setState({fileUpload:{...this.state.fileUpload,scheduled:!1,loading:!1,error:e}});return}let{fileUpload:n}=this.state,r=n&&n.scheduled?this.handleDone.bind(this,!0):void 0;this.setState({fileUpload:{...n,scheduled:!1,loading:!1,url:t}},r)}})};handleRemoveFile=async()=>{this.props.uploadSoundSupport.delete(this.state.fileUpload.url,e=>{e&&(console.log(e),this.setState({fileUpload:{...this.state.fileUpload,error:e}}))}),this.setState({fileUpload:{...this.state.fileUpload,loading:!1,url:``,mimeType:``}})};render(){let{open:e,disablePortal:t,type:n,edit:r,uploadSoundSupport:i}=this.props,{ends:a,height:o,invalid:s,starts:c,width:l,url:u,mimeType:d,formattedUrl:f,updating:p,tabValue:m,fileUpload:h}=this.state,g=A0(u),_=m===I0.insertUrl,v=m===I0.uploadFile,y=_?s||u==null:!h.url||h.scheduled,b=i?.add&&i?.delete&&n!==`video`;return(0,N.jsxs)(L0,{disablePortal:t,open:e,onClose:()=>this.handleDone(!1),"aria-labelledby":`form-dialog-title`,children:[(0,N.jsxs)(w0,{id:`form-dialog-title`,children:[`Insert `,F0[n]]}),(0,N.jsx)(i1,{children:(0,N.jsxs)(`div`,{children:[(0,N.jsx)(z0,{children:(0,N.jsxs)(g0,{indicatorColor:`primary`,value:m,onChange:(e,t)=>{this.setState({tabValue:t})},children:[b?(0,N.jsx)(x0,{value:I0.uploadFile,label:`Upload file`}):null,(0,N.jsx)(x0,{value:I0.insertUrl,label:n===`video`?`Insert YouTube, Vimeo, or Google Drive URL`:`Insert SoundCloud URL`})]})}),_&&(0,N.jsxs)(`div`,{children:[(0,N.jsx)(g1,{autoFocus:!0,error:s,helperText:s?`Invalid URL`:``,margin:`dense`,id:`name`,label:`URL`,placeholder:`Paste URL of ${n}...`,type:`text`,onChange:this.urlChange,value:u,fullWidth:!0}),n===`video`&&(0,N.jsxs)(R0,{children:[(0,N.jsx)(O0,{children:`Video Properties`}),(0,N.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`width`,label:`Width`,type:`number`,placeholder:`Width`,value:l,onChange:this.changeHandler(`width`)}),(0,N.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`height`,label:`Height`,type:`number`,placeholder:`Height`,value:o,onChange:this.changeHandler(`height`)})]}),f&&(0,N.jsx)(`iframe`,{width:l,height:o,src:f,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowFullScreen:!0}),n===`video`&&(f||p)&&!s&&(0,N.jsx)(S.Fragment,{children:(0,N.jsxs)(R0,{children:[(0,N.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`starts`,label:`Starts`,type:`number`,placeholder:`Starts`,value:c,onChange:this.changeHandler(`starts`)}),g&&(0,N.jsx)(g1,{autoFocus:!0,margin:`dense`,id:`ends`,label:`Ends`,type:`number`,placeholder:`Ends`,value:a,onChange:this.changeHandler(`ends`)})]})})]}),v&&(0,N.jsx)(B0,{children:(0,N.jsxs)(`div`,{children:[h.url?(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(z0,{children:[(0,N.jsx)(`audio`,{controls:`controls`,controlsList:`nodownload`,children:(0,N.jsx)(`source`,{type:d,src:h.url})}),(0,N.jsx)(U0,{"aria-label":`delete`,onClick:this.handleRemoveFile,children:(0,N.jsx)(Oz,{})})]}),!h.scheduled&&h.loading?(0,N.jsx)(Lo,{variant:`subheading`,children:`Loading...`}):null,h.scheduled?(0,N.jsx)(Lo,{variant:`subheading`,children:`Waiting for Upload to finish, then inserting item...`}):null]}):h.loading?null:(0,N.jsx)(V0,{accept:`audio/*`,onChange:this.handleUploadFile,type:`file`}),!!h.error&&(0,N.jsx)(H0,{variant:`caption`,children:h.error})]})})]})}),(0,N.jsxs)(b1,{children:[(0,N.jsx)(WW,{onClick:()=>this.handleDone(!1),color:`primary`,children:`Cancel`}),(0,N.jsx)(WW,{disabled:y,onClick:()=>this.handleDone(!0),color:`primary`,children:r?`Update`:`Insert`})]})]})}},G0=F(`span`)(({theme:e})=>({position:`relative`,bottom:`5px`,left:0,width:`100%`,background:e.palette.common.white,display:`inline-flex`,padding:`5px`,boxShadow:`0px 4px 4px rgba(0, 0, 0, 0.25)`})),K0=F(`span`)(({theme:e})=>({cursor:`pointer`,flex:3,border:`solid ${e.palette.common.black}`,textAlign:`right`,borderWidth:`0 2px 0 0`,marginRight:`5px`,paddingRight:`5px`})),q0=F(`span`)({cursor:`pointer`}),J0=class extends S.Component{static propTypes={onEdit:p.func,hideEdit:p.bool,onRemove:p.func};render(){let{hideEdit:e,onEdit:t,onRemove:n}=this.props;return(0,N.jsxs)(G0,{children:[e?null:(0,N.jsx)(K0,{onClick:t,children:`Edit Settings`}),(0,N.jsx)(q0,{onClick:n,children:`Remove`})]})}},Y0=Rb.create({name:`media`,group:`inline`,inline:!0,atom:!0,addAttributes(){return{type:{default:`video`},src:{default:null},width:{default:null},height:{default:null},title:{default:null},starts:{default:null},ends:{default:null},editing:{default:!1},tag:{default:`iframe`},url:{default:null}}},parseHTML(){return[{tag:`iframe[data-type="video"]`,getAttrs:e=>({type:`video`,tag:`iframe`,src:e.getAttribute(`src`),width:e.getAttribute(`width`),height:e.getAttribute(`height`),title:e.dataset.title,starts:e.dataset.starts,ends:e.dataset.ends,url:e.dataset.url})},{tag:`audio`,getAttrs:e=>({type:`audio`,tag:`audio`,src:e.querySelector(`source`)?.getAttribute(`src`)})}]},renderHTML({HTMLAttributes:e}){let{tag:t,src:n,width:r,height:i}=e;return t===`audio`?[`audio`,{controls:`controls`,controlsList:`nodownload`},[`source`,{src:n,type:`audio/mp3`}]]:[`iframe`,Hv({"data-type":`video`,frameborder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture`,allowfullscreen:``,src:n},r?{width:r}:{},i?{height:i}:{})]},addCommands(){return{insertMedia:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e}),updateMedia:e=>({commands:t})=>t.updateAttributes(this.name,e)}},addNodeView(){return fS(e=>(0,N.jsx)(Q0,{...e,options:this.options}))}}),X0=()=>{document.querySelectorAll(`.insert-media-dialog`).forEach(e=>e.remove())},Z0=e=>{let t=document.createElement(`div`),{type:n,callback:r,options:i,...a}=e,o=document.body.style.overflow;X0(),t.className=`insert-media-dialog`,document.body.style.overflow=`hidden`;let s=(e,n)=>{r(e,n),t.remove(),document.body.style.overflow=o},c=(0,N.jsx)(W0,{...a,uploadSoundSupport:i.uploadSoundSupport,type:n,disablePortal:!0,open:!0,handleClose:s});zx.render(c,t),document.body.appendChild(t)};function Q0({editor:e,node:t,updateAttributes:n,deleteNode:r,options:i}){let{type:a,src:o,width:s,height:c,tag:l}=t.attrs;return(0,S.useEffect)(()=>{o||Z0({...t.attrs,options:i,edit:!0,callback:(t,i)=>{t?n(i):r(),e.chain().focus().run()}})},[]),(0,N.jsxs)(iS,{"data-type":a,style:{width:s,height:c},children:[l===`audio`?(0,N.jsx)(`audio`,{controls:!0,controlsList:`nodownload`,children:(0,N.jsx)(`source`,{type:`audio/mp3`,src:o})}):(0,N.jsx)(`iframe`,{src:o,allowFullScreen:!0,frameBorder:`0`,width:s,height:c}),(0,N.jsx)(J0,{onEdit:()=>{Z0({...t.attrs,options:i,edit:!0,callback:(t,r)=>{t&&n(r),e.chain().focus().run()}})},onRemove:r})]})}function $0(e){return Br(`MuiListItem`,e)}Vr(`MuiListItem`,[`root`,`container`,`dense`,`alignItemsFlexStart`,`divider`,`gutters`,`padding`,`secondaryAction`]);var e2=Vr(`MuiListItemButton`,[`root`,`focusVisible`,`dense`,`alignItemsFlexStart`,`disabled`,`divider`,`gutters`,`selected`]);function t2(e){return Br(`MuiListItemSecondaryAction`,e)}Vr(`MuiListItemSecondaryAction`,[`root`,`disableGutters`]);var n2=e=>{let{disableGutters:t,classes:n}=e;return _({root:[`root`,t&&`disableGutters`]},t2,n)},r2=F(`div`,{name:`MuiListItemSecondaryAction`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:`absolute`,right:16,top:`50%`,transform:`translateY(-50%)`,variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),i2=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiListItemSecondaryAction`}),{className:r,...i}=n,a=S.useContext(HG),o={...n,disableGutters:a.disableGutters},s=n2(o);return(0,N.jsx)(r2,{className:g(s.root,r),ownerState:o,ref:t,...i})});i2.muiName=`ListItemSecondaryAction`;var a2=(e,t)=>{let{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems===`flex-start`&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},o2=e=>{let{alignItems:t,classes:n,dense:r,disableGutters:i,disablePadding:a,divider:o,hasSecondaryAction:s}=e;return _({root:[`root`,r&&`dense`,!i&&`gutters`,!a&&`padding`,o&&`divider`,t===`flex-start`&&`alignItemsFlexStart`,s&&`secondaryAction`],container:[`container`],secondaryAction:[`secondaryAction`]},$0,n)},s2=F(`div`,{name:`MuiListItem`,slot:`Root`,overridesResolver:a2})(Do(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,alignItems:`center`,position:`relative`,textDecoration:`none`,width:`100%`,boxSizing:`border-box`,textAlign:`left`,variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>!e.disablePadding&&e.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:e})=>!e.disablePadding&&!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>!e.disablePadding&&!!e.secondaryAction,style:{paddingRight:48}},{props:({ownerState:e})=>!!e.secondaryAction,style:{[`& > .${e2.root}`]:{paddingRight:48}}},{props:{alignItems:`flex-start`},style:{alignItems:`flex-start`}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:`padding-box`}},{props:({ownerState:e})=>e.button,style:{transition:e.transitions.create(`background-color`,{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:`none`,backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:({ownerState:e})=>e.hasSecondaryAction,style:{paddingRight:48}}]}))),c2=F(`li`,{name:`MuiListItem`,slot:`Container`})({position:`relative`}),l2=S.forwardRef(function(e,t){let n=I({props:e,name:`MuiListItem`}),{alignItems:r=`center`,children:i,className:a,component:o,components:s={},componentsProps:c={},ContainerComponent:l=`li`,ContainerProps:{className:u,...d}={},dense:f=!1,disableGutters:p=!1,disablePadding:m=!1,divider:h=!1,secondaryAction:_,slotProps:v={},slots:y={},...b}=n,x=S.useContext(HG),C=S.useMemo(()=>({dense:f||x.dense||!1,alignItems:r,disableGutters:p}),[r,x.dense,f,p]),w=S.useRef(null),T=S.Children.toArray(i),E=T.length&&JL(T[T.length-1],[`ListItemSecondaryAction`]),ee={...n,alignItems:r,dense:C.dense,disableGutters:p,disablePadding:m,divider:h,hasSecondaryAction:E},D=o2(ee),O=sR(w,t),[te,k]=hH(`secondaryAction`,{elementType:i2,externalForwardedProps:{slots:y,slotProps:v},ownerState:ee,className:D.secondaryAction}),A=y.root||s.Root||s2,j=v.root||c.root||{},M={className:g(D.root,j.className,a),...b},ne=o||`li`;return E?(ne=!M.component&&!o?`div`:ne,l===`li`&&(ne===`li`?ne=`div`:M.component===`li`&&(M.component=`div`)),(0,N.jsx)(HG.Provider,{value:C,children:(0,N.jsxs)(c2,{as:l,className:g(D.container,u),ref:O,ownerState:ee,...d,children:[(0,N.jsx)(A,{...j,...!kV(A)&&{as:ne,ownerState:{...ee,...j.ownerState}},...M,children:T}),T.pop()]})})):(0,N.jsx)(HG.Provider,{value:C,children:(0,N.jsxs)(A,{...j,as:ne,ref:O,...!kV(A)&&{ownerState:{...ee,...j.ownerState}},...M,children:[T,_&&(0,N.jsx)(te,{...k,children:_})]})})}),u2=()=>{document.querySelectorAll(`.insert-css-dialog`).forEach(e=>e.remove())},d2=({editor:e,callback:t,opts:n,selectedText:r,parentNode:i})=>{let a=e.options.element,o=document.createElement(`div`),{selection:s}=e.state;u2(),o.className=`insert-css-dialog`;let c=!1,l=e=>{if(c){let t=o.contains(e.target)||void 0,n=a.contains(e.target);t||n||u()}else c=!0},u=()=>{t(void 0,!0),o.remove(),document.body.removeEventListener(`click`,l)},d=e=>{t(e,!0),o.remove(),document.body.removeEventListener(`click`,l)},f=i?.attrs.class,p=e=>{let t=`<span class="${e}">${r}</span>`;if(i){let e=`span`;i?.object===`inline`&&(e=`span`),i?.object===`block`&&(e=`div`),t=`<${e} class="${f}">${i.text.slice(0,s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`}return t},m=(0,N.jsxs)(`div`,{style:{background:`white`,height:500,padding:20,overflow:`hidden`,display:`flex`,flexFlow:`column`},children:[(0,N.jsx)(`h2`,{children:`Please choose a css class`}),f&&(0,N.jsxs)(`div`,{children:[`The current parent has this class `,f]}),(0,N.jsx)(KG,{component:`nav`,style:{overflow:`scroll`},children:n.names.map((e,t)=>(0,N.jsxs)(l2,{button:!0,onClick:()=>d(e),children:[(0,N.jsx)(`div`,{style:{marginRight:20},children:e}),(0,N.jsx)(`div`,{dangerouslySetInnerHTML:{__html:p(e)}})]},`rule-${t}`))})]});zx.render(m,o,()=>{let t=e.view.nodeDOM(e.state.selection.from)?.parentNode;if(t){let e=a.parentElement.parentElement.parentElement.getBoundingClientRect(),n=t.getBoundingClientRect();a.parentElement.parentElement.parentElement.appendChild(o),o.style.maxWidth=`500px`,o.style.position=`absolute`,o.style.top=0,o.style.zIndex=99999;let r=`${n.left+Math.abs(e.left)+t.offsetWidth+10}px`,i=`${n.x}px`;o.style.left=r;let s=o.offsetWidth;o.style.left=`unset`,o.style.right=i;let c=o.offsetWidth;o.style.left=`unset`,o.style.right=`unset`,s>=c?o.style.left=r:o.style.right=i,document.body.addEventListener(`click`,l)}})},f2=eb.create({name:`cssmark`,addOptions(){return{classes:[]}},addAttributes(){return{class:{default:null,parseHTML:e=>e.getAttribute(`class`),renderHTML:e=>e.class?{class:e.class}:{}}}},parseHTML(){return[{tag:`span[class]`,getAttrs:e=>{let t=e.getAttribute(`class`)||``;if(!t)return!1;if((this.options&&this.options.classes||[]).length>0){let e=this.options.classes.find(e=>t.includes(e));return e?{class:e}:!1}return{class:t}}}]},renderHTML({HTMLAttributes:e}){return[`span`,Hv(e),0]},addCommands(){return{setCSSClass:e=>({commands:t})=>t.setMark(this.name,{class:e}),unsetCSSClass:()=>({commands:e})=>e.unsetMark(this.name),openCSSClassDialog:()=>({editor:e})=>{d2({editor:e,selectedText:e.state.doc.textBetween(e.state.selection.from,e.state.selection.to),parentNode:e.state.selection.$from.nodeAfter,opts:this.options.extraCSSRules,callback:t=>{t&&e.chain().focus().setCSSClass(t).run()}})}}}}),p2=Object.defineProperty,m2=(e,t)=>{for(var n in t)p2(e,n,{get:t[n],enumerable:!0})},h2=`listItem`,g2=`textStyle`,_2=/^\s*([-+*])\s$/,v2=Rb.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Hv(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
384
384
|
`):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(h2,this.editor.getAttributes(g2)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=Tb({find:_2,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Tb({find:_2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(g2),editor:this.editor})),[e]}});function y2(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function b2(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var x2=Rb.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Hv(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(y2(e))return{type:`listItem`,content:[{type:`paragraph`,content:b2(e.text||``,t)}]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else{let i=e.tokens[0];if(i&&i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:r}},renderMarkdown:(e,t,n)=>Ib(e,t,e=>e.parentType===`bulletList`?`- `:e.parentType===`orderedList`?`${(e.meta?.parentAttrs?.start||1)+e.index}. `:`- `,n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});m2({},{findListItemPos:()=>S2,getNextListDepth:()=>C2,handleBackspace:()=>D2,handleDelete:()=>A2,hasListBefore:()=>w2,hasListItemAfter:()=>j2,hasListItemBefore:()=>T2,listItemHasSubList:()=>E2,nextListIsDeeper:()=>O2,nextListIsHigher:()=>k2});var S2=(e,t)=>{let{$from:n}=t.selection,r=E_(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},C2=(e,t)=>{let n=S2(e,t);if(!n)return!1;let[,r]=oy(t,e,n.$pos.pos+4);return r},w2=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},T2=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-2);return!(r.index()===0||r.nodeBefore?.type.name!==e)},E2=(e,t,n)=>{if(!n)return!1;let r=E_(e,t.schema),i=!1;return n.descendants(e=>{e.type===r&&(i=!0)}),i},D2=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!fv(e.state,t)&&w2(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!fv(e.state,t)||!py(e.state))return!1;let r=S2(t,e.state);if(!r)return!1;let i=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),a=E2(t,e.state,i);return T2(t,e.state)&&!a?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},O2=(e,t)=>{let n=C2(e,t),r=S2(e,t);return!r||!n?!1:n>r.depth},k2=(e,t)=>{let n=C2(e,t),r=S2(e,t);return!r||!n?!1:n<r.depth},A2=(e,t)=>{if(!fv(e.state,t)||!fy(e.state,t))return!1;let{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:O2(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():k2(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},j2=(e,t)=>{let{$anchor:n}=t.selection,r=t.doc.resolve(n.pos-n.parentOffset-2);return!(r.index()===r.parent.childCount-1||r.nodeAfter?.type.name!==e)},M2=cb.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&A2(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&A2(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&D2(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&D2(e,n,r)&&(t=!0)}),t}}}}),N2=/^(\s*)(\d+)\.\s+(.*)$/,P2=/^\s/;function F2(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function I2(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r){n.push(e);return}if(e.trim()===``){r=!0,n.push(e);return}if(t.length>0&&F2(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function L2(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(N2);if(!a)break;let[,o,s,c]=a,l=o.length,u=[c],d=n+1,f=[i],p=!1;for(;d<e.length;){let t=e[d];if(t.match(N2))break;if(t.trim()===``)f.push(t),u.push(``),p=!0,d+=1;else if(t.match(P2))f.push(t),u.push(t.slice(l+2)),d+=1;else{if(p)break;f.push(t),u.push(t),d+=1}}t.push({indent:l,number:parseInt(s,10),content:u.join(`
|
|
385
385
|
`).trim(),contentLines:u,raw:f.join(`
|
|
386
386
|
`)}),r=d,n=d}return[t,r]}function R2(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=I2(a.contentLines),c=o.join(`
|
|
@@ -390,8 +390,8 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
390
390
|
`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
|
|
391
391
|
`),[i,a]=L2(r);if(i.length===0)return;let o=R2(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
|
|
392
392
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(B2,this.editor.getAttributes(V2)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=Tb({find:H2,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=Tb({find:H2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(V2)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),W2=/^\s*(\[([( |x])?\])\s$/,G2=Rb.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`,Hv(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 n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>Ib(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=Uv(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[Tb({find:W2,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),K2=Rb.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`,Hv(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,`
|
|
393
|
-
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=Fb(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=Fb(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.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()}}});cb.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(v2.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(x2.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(M2.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(U2.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(G2.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(K2.configure(this.options.taskList)),e}});var q2=x2.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),J2=Rb.create({name:`headingParagraph`,group:`block`,content:`inline*`,defining:!0,addAttributes(){return{"data-heading":{default:`heading1`,parseHTML:e=>e.getAttribute(`data-heading`),renderHTML:e=>({"data-heading":e[`data-heading`]})}}},parseHTML(){return[{tag:`p[data-heading]`}]},renderHTML({HTMLAttributes:e}){return[`p`,Hv(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),Y2=e=>{if(!e)return;let t=/^calc\((.*)\)$/;if(typeof e==`string`){if(e.endsWith(`%`))return;if(e.endsWith(`px`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`ch`)||e.endsWith(`em`)||e.match(t))return e;let n=parseInt(e,10);return Number.isNaN(n)?n:`${n}px`}if(typeof e==`number`)return`${e}px`},X2=GL((0,P.jsx)(`path`,{d:`M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5`}),`FormatBold`),Z2=GL((0,P.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),Q2=GL((0,P.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),$2=GL((0,P.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),e4=GL((0,P.jsx)(`path`,{d:`M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z`}),`GridOn`),t4=GL((0,P.jsx)(`path`,{d:`M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z`}),`FormatListBulleted`),n4=GL((0,P.jsx)(`path`,{d:`M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z`}),`FormatListNumbered`),r4=GL((0,P.jsx)(`path`,{d:`M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z`}),`FormatUnderlined`),i4=GL((0,P.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),a4=GL((0,P.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z`}),`Image`),o4=GL((0,P.jsx)(`path`,{d:`M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z`}),`Redo`),s4=GL((0,P.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),c4=GL((0,P.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),l4=GL((0,P.jsx)(`path`,{d:`M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77`}),`VolumeUp`),u4=GL((0,P.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),d4=I(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`})),f4=()=>(0,P.jsx)(d4,{children:`+ Response Area`}),p4={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},m4={hasPreview:!0,characters:[[{unicode:`U+00A2`,description:`CENT SIGN`,write:`¢`,label:`¢`},{unicode:`U+00BF`,description:`INVERTED QUESTION MARK`,write:`¿`,label:`¿`},{unicode:`U+00B4`,description:`ACUTE ACCENT`,write:`´`,label:`´`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E1`,description:`LATIN SMALL LETTER A WITH ACUTE`,write:`á`,label:`á`},{unicode:`U+00E9`,description:`LATIN SMALL LETTER E WITH ACUTE`,write:`é`,label:`é`},{unicode:`U+00ED`,description:`LATIN SMALL LETTER I WITH ACUTE`,write:`í`,label:`í`},{unicode:`U+00F3`,description:`LATIN SMALL LETTER O WITH ACUTE`,write:`ó`,label:`ó`},{unicode:`U+00FA`,description:`LATIN SMALL LETTER U WITH ACUTE`,write:`ú`,label:`ú`},{unicode:`U+00F1`,description:`LATIN SMALL LETTER N WITH TILDE`,write:`ñ`,label:`ñ`}],[{unicode:`U+20AC`,description:`EURO SIGN`,write:`€`,label:`€`},{unicode:`U+00A1`,description:`INVERTED EXCLAMATION MARK`,write:`¡`,label:`¡`},{unicode:`U+00C1`,description:`LATIN CAPITAL LETTER A WITH ACUTE`,write:`Á`,label:`Á`},{unicode:`U+00C9`,description:`LATIN CAPITAL LETTER E WITH ACUTE`,write:`É`,label:`É`},{unicode:`U+00CD`,description:`LATIN CAPITAL LETTER I WITH ACUTE`,write:`Í`,label:`Í`},{unicode:`U+00D3`,description:`LATIN CAPITAL LETTER O WITH ACUTE`,write:`Ó`,label:`Ó`},{unicode:`U+00DA`,description:`LATIN CAPITAL LETTER U WITH ACUTE`,write:`Ú`,label:`Ú`},{unicode:`U+00D1`,description:`LATIN CAPITAL LETTER N WITH TILDE`,write:`Ñ`,label:`Ñ`}],[{unicode:`U+00A3`,description:`POUND SIGN`,write:`£`,label:`£`},{unicode:`U+00AB`,description:`LEFT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`«`,label:`«`},{unicode:`U+005E`,description:`CIRCUMFLEX ACCENT`,write:`^`,label:`^`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E2`,description:`LATIN SMALL LETTER A WITH CIRCUMFLEX`,write:`â`,label:`â`},{unicode:`U+00EA`,description:`LATIN SMALL LETTER E WITH CIRCUMFLEX`,write:`ê`,label:`ê`},{unicode:`U+00EE`,description:`LATIN SMALL LETTER I WITH CIRCUMFLEX`,write:`î`,label:`î`},{unicode:`U+00F4`,description:`LATIN SMALL LETTER O WITH CIRCUMFLEX`,write:`ô`,label:`ô`},{unicode:`U+00FB`,description:`LATIN SMALL LETTER U WITH CIRCUMFLEX`,write:`û`,label:`û`},{unicode:`U+00E7`,description:`LATIN SMALL LETTER C WITH CEDILLA`,write:`ç`,label:`ç`}],[{unicode:`U+00A5`,description:`YEN SIGN`,write:`¥`,label:`¥`},{unicode:`U+00BB`,description:`RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`»`,label:`»`},{unicode:`U+00C2`,description:`LATIN CAPITAL LETTER A WITH CIRCUMFLEX`,write:`Â`,label:`Â`},{unicode:`U+00CA`,description:`LATIN CAPITAL LETTER E WITH CIRCUMFLEX`,write:`Ê`,label:`Ê`},{unicode:`U+00CE`,description:`LATIN CAPITAL LETTER I WITH CIRCUMFLEX`,write:`Î`,label:`Î`},{unicode:`U+00D4`,description:`LATIN CAPITAL LETTER O WITH CIRCUMFLEX`,write:`Ô`,label:`Ô`},{unicode:`U+00DB`,description:`LATIN CAPITAL LETTER U WITH CIRCUMFLEX`,write:`Û`,label:`Û`},{unicode:`U+00C7`,description:`LATIN CAPITAL LETTER C WITH CEDILLA`,write:`Ç`,label:`Ç`}],[{unicode:`U+200A`,description:`HAIR SPACE`,write:String.fromCodePoint(`0x200A`),label:` `},{unicode:`U+00A7`,description:`SECTION SIGN`,write:`§`,label:`§`},{unicode:`U+00A8`,description:`DIAERESIS`,write:`¨`,label:`¨`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E4`,description:`LATIN SMALL LETTER A WITH DIAERESIS`,write:`ä`,label:`ä`},{unicode:`U+00EB`,description:`LATIN SMALL LETTER E WITH DIAERESIS`,write:`ë`,label:`ë`},{unicode:`U+00EF`,description:`LATIN SMALL LETTER I WITH DIAERESIS`,write:`ï`,label:`ï`},{unicode:`U+00F6`,description:`LATIN SMALL LETTER O WITH DIAERESIS`,write:`ö`,label:`ö`},{unicode:`U+00FC`,description:`LATIN SMALL LETTER U WITH DIAERESIS`,write:`ü`,label:`ü`},{unicode:`U+00DF`,description:`LATIN SMALL LETTER SHARP S`,write:`ß`,label:`ß`}],[{unicode:`U+2009`,description:`THIN SPACE`,write:String.fromCodePoint(`0x2009`),label:` `},{unicode:`U+2026`,description:`HORIZONTAL ELLIPSIS`,write:`…`,label:`…`},{unicode:`U+00C4`,description:`LATIN CAPITAL LETTER A WITH DIAERESIS`,write:`Ä`,label:`Ä`},{unicode:`U+00CB`,description:`LATIN CAPITAL LETTER E WITH DIAERESIS`,write:`Ë`,label:`Ë`},{unicode:`U+00CF`,description:`LATIN CAPITAL LETTER I WITH DIAERESIS`,write:`Ï`,label:`Ï`},{unicode:`U+00D6`,description:`LATIN CAPITAL LETTER O WITH DIAERESIS`,write:`Ö`,label:`Ö`},{unicode:`U+00DC`,description:`LATIN CAPITAL LETTER U WITH DIAERESIS`,write:`Ü`,label:`Ü`},{unicode:`U+2212`,description:`MINUS SIGN`,write:`−`,label:`−`}],[{unicode:`U+00A0`,description:`NO-BREAK SPACE`,write:String.fromCodePoint(`0x00A0`),label:` `},{unicode:`U+2022`,description:`BULLET`,write:`•`,label:`•`},{unicode:`U+0060`,description:`GRAVE ACCENT`,write:"`",label:"`",extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E0`,description:`LATIN SMALL LETTER A WITH GRAVE`,write:`à`,label:`à`},{unicode:`U+00E8`,description:`LATIN SMALL LETTER E WITH GRAVE`,write:`è`,label:`è`},{unicode:`U+00EC`,description:`LATIN SMALL LETTER I WITH GRAVE`,write:`ì`,label:`ì`},{unicode:`U+00F2`,description:`LATIN SMALL LETTER O WITH GRAVE`,write:`ò`,label:`ò`},{unicode:`U+00F9`,description:`LATIN SMALL LETTER U WITH GRAVE`,write:`ù`,label:`ù`},{unicode:`U+2013`,description:`EN DASH`,write:`–`,label:`–`}],[{unicode:`U+2003`,description:`EM SPACE`,write:String.fromCodePoint(`0x2003`),label:` `},{unicode:`U+25E6`,description:`WHITE BULLET`,write:`◦`,label:`◦`},{unicode:`U+00C0`,description:`LATIN CAPITAL LETTER A WITH GRAVE`,write:`À`,label:`À`},{unicode:`U+00C8`,description:`LATIN CAPITAL LETTER E WITH GRAVE`,write:`È`,label:`È`},{unicode:`U+00CC`,description:`LATIN CAPITAL LETTER I WITH GRAVE`,write:`Ì`,label:`Ì`},{unicode:`U+00D2`,description:`LATIN CAPITAL LETTER O WITH GRAVE`,write:`Ò`,label:`Ò`},{unicode:`U+00D9`,description:`LATIN CAPITAL LETTER U WITH GRAVE`,write:`Ù`,label:`Ù`},{unicode:`U+2014`,description:`EM DASH`,write:`—`,label:`—`}]]},h4=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),g4=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),_4=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z`,fill:`currentColor`})}),v4=()=>(0,P.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),y4=({editor:e,onChange:t})=>{let[n,r]=(0,N.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,P.jsx)(g4,{});break;case e.isActive({textAlign:`center`}):i=(0,P.jsx)(_4,{});break;case e.isActive({textAlign:`justify`}):i=(0,P.jsx)(v4,{});break;default:i=(0,P.jsx)(h4,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,P.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},"aria-hidden":`true`,children:`▼`})]}),(0,P.jsx)(vW,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,P.jsxs)(KG,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,P.jsx)(l2,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,P.jsx)(h4,{})}),(0,P.jsx)(l2,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,P.jsx)(_4,{})}),(0,P.jsx)(l2,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,P.jsx)(g4,{})}),(0,P.jsx)(l2,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,P.jsx)(v4,{})})]})})]})},b4=I(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),x4=()=>(0,P.jsx)(b4,{children:`CSS`}),S4=I(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),C4=e=>t=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(e,{...t})}),w4=C4(e=>(0,P.jsx)(S4,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),T4=C4(e=>(0,P.jsx)(S4,{...e,d:`M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z`})),E4=C4(e=>(0,P.jsx)(S4,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),D4=C4(e=>(0,P.jsx)(S4,{...e,d:`M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z`})),O4=C4(e=>(0,P.jsx)(S4,{...e,d:`M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z`})),k4=`bottom`,A4=`right`,j4=`left`,M4=`auto`,N4=[`top`,k4,A4,j4],P4=`start`,F4=`clippingParents`,I4=`viewport`,L4=`popper`,R4=`reference`,z4=N4.reduce(function(e,t){return e.concat([t+`-`+P4,t+`-end`])},[]),B4=[].concat(N4,[M4]).reduce(function(e,t){return e.concat([t,t+`-`+P4,t+`-end`])},[]),V4=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function H4(e){return e?(e.nodeName||``).toLowerCase():null}function U4(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function W4(e){return e instanceof U4(e).Element||e instanceof Element}function G4(e){return e instanceof U4(e).HTMLElement||e instanceof HTMLElement}function K4(e){return typeof ShadowRoot>`u`?!1:e instanceof U4(e).ShadowRoot||e instanceof ShadowRoot}function q4(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!G4(i)||!H4(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function J4(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!G4(r)||!H4(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var Y4={name:`applyStyles`,enabled:!0,phase:`write`,fn:q4,effect:J4,requires:[`computeStyles`]};function X4(e){return e.split(`-`)[0]}var Z4=Math.max,Q4=Math.min,$4=Math.round;function e3(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function t3(){return!/^((?!chrome|android).)*safari/i.test(e3())}function n3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&G4(e)&&(i=e.offsetWidth>0&&$4(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$4(r.height)/e.offsetHeight||1);var o=(W4(e)?U4(e):window).visualViewport,s=!t3()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function r3(e){var t=n3(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function i3(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&K4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function a3(e){return U4(e).getComputedStyle(e)}function o3(e){return[`table`,`td`,`th`].indexOf(H4(e))>=0}function s3(e){return((W4(e)?e.ownerDocument:e.document)||window.document).documentElement}function c3(e){return H4(e)===`html`?e:e.assignedSlot||e.parentNode||(K4(e)?e.host:null)||s3(e)}function l3(e){return!G4(e)||a3(e).position===`fixed`?null:e.offsetParent}function u3(e){var t=/firefox/i.test(e3());if(/Trident/i.test(e3())&&G4(e)&&a3(e).position===`fixed`)return null;var n=c3(e);for(K4(n)&&(n=n.host);G4(n)&&[`html`,`body`].indexOf(H4(n))<0;){var r=a3(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function d3(e){for(var t=U4(e),n=l3(e);n&&o3(n)&&a3(n).position===`static`;)n=l3(n);return n&&(H4(n)===`html`||H4(n)===`body`&&a3(n).position===`static`)?t:n||u3(e)||t}function f3(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function p3(e,t,n){return Z4(e,Q4(t,n))}function m3(e,t,n){var r=p3(e,t,n);return r>n?n:r}function h3(){return{top:0,right:0,bottom:0,left:0}}function g3(e){return Object.assign({},h3(),e)}function _3(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var v3=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,g3(typeof e==`number`?_3(e,N4):e)};function y3(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=X4(n.placement),c=f3(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=v3(i.padding,n),d=r3(a),f=c===`y`?`top`:j4,p=c===`y`?k4:A4,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=d3(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=p3(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function b3(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||i3(t.elements.popper,r)&&(t.elements.arrow=r))}var x3={name:`arrow`,enabled:!0,phase:`main`,fn:y3,effect:b3,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function S3(e){return e.split(`-`)[1]}var C3={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function w3(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:$4(n*i)/i||0,y:$4(r*i)/i||0}}function T3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=j4,b=`top`,x=window;if(l){var S=d3(n),C=`clientHeight`,w=`clientWidth`;if(S===U4(n)&&(S=s3(n),a3(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=k4;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=A4;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&C3),O=u===!0?w3({x:p,y:h},U4(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function E3(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:X4(t.placement),variation:S3(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,T3(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,T3(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var D3={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:E3,data:{}},O3={passive:!0};function k3(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=U4(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,O3)}),s&&c.addEventListener(`resize`,n.update,O3),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,O3)}),s&&c.removeEventListener(`resize`,n.update,O3)}}var A3={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:k3,data:{}},j3={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function M3(e){return e.replace(/left|right|bottom|top/g,function(e){return j3[e]})}var N3={start:`end`,end:`start`};function P3(e){return e.replace(/start|end/g,function(e){return N3[e]})}function F3(e){var t=U4(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function I3(e){return n3(s3(e)).left+F3(e).scrollLeft}function L3(e,t){var n=U4(e),r=s3(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=t3();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+I3(e),y:c}}function R3(e){var t=s3(e),n=F3(e),r=e.ownerDocument?.body,i=Z4(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Z4(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+I3(e),s=-n.scrollTop;return a3(r||t).direction===`rtl`&&(o+=Z4(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function z3(e){var t=a3(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function B3(e){return[`html`,`body`,`#document`].indexOf(H4(e))>=0?e.ownerDocument.body:G4(e)&&z3(e)?e:B3(c3(e))}function V3(e,t){t===void 0&&(t=[]);var n=B3(e),r=n===e.ownerDocument?.body,i=U4(n),a=r?[i].concat(i.visualViewport||[],z3(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(V3(c3(a)))}function H3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function U3(e,t){var n=n3(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function W3(e,t,n){return t===`viewport`?H3(L3(e,n)):W4(t)?U3(t,n):H3(R3(s3(e)))}function G3(e){var t=V3(c3(e)),n=[`absolute`,`fixed`].indexOf(a3(e).position)>=0&&G4(e)?d3(e):e;return W4(n)?t.filter(function(e){return W4(e)&&i3(e,n)&&H4(e)!==`body`}):[]}function K3(e,t,n,r){var i=t===`clippingParents`?G3(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=W3(e,n,r);return t.top=Z4(i.top,t.top),t.right=Q4(i.right,t.right),t.bottom=Q4(i.bottom,t.bottom),t.left=Z4(i.left,t.left),t},W3(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function q3(e){var t=e.reference,n=e.element,r=e.placement,i=r?X4(r):null,a=r?S3(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case k4:c={x:o,y:t.y+t.height};break;case A4:c={x:t.x+t.width,y:s};break;case j4:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?f3(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case P4:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function J3(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?F4:s,l=n.rootBoundary,u=l===void 0?I4:l,d=n.elementContext,f=d===void 0?L4:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=g3(typeof g==`number`?_3(g,N4):g),v=f===`popper`?R4:L4,y=e.rects.popper,b=e.elements[m?v:f],x=K3(W4(b)?b:b.contextElement||s3(e.elements.popper),c,u,o),S=n3(e.elements.reference),C=q3({reference:S,element:y,strategy:`absolute`,placement:i}),w=H3(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function Y3(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?B4:c,u=S3(r),d=u?s?z4:z4.filter(function(e){return S3(e)===u}):N4,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=J3(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[X4(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function X3(e){if(X4(e)===`auto`)return[];var t=M3(e);return[P3(e),t,P3(t)]}function Z3(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=X4(g)===g,v=c||(_||!m?[M3(g)]:X3(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(X4(n)===`auto`?Y3(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],D=X4(E),O=S3(E)===P4,k=[`top`,k4].indexOf(D)>=0,A=k?`width`:`height`,j=J3(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),M=k?O?A4:j4:O?k4:`top`;b[A]>x[A]&&(M=M3(M));var ee=M3(M),te=[];if(a&&te.push(j[D]<=0),s&&te.push(j[M]<=0,j[ee]<=0),te.every(function(e){return e})){w=E,C=!1;break}S.set(E,te)}if(C)for(var N=m?3:1,ne=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},re=N;re>0&&ne(re)!==`break`;re--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Q3={name:`flip`,enabled:!0,phase:`main`,fn:Z3,requiresIfExists:[`offset`],data:{_skip:!1}};function $3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function e6(e){return[`top`,A4,k4,j4].some(function(t){return e[t]>=0})}function t6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=J3(t,{elementContext:`reference`}),s=J3(t,{altBoundary:!0}),c=$3(o,r),l=$3(s,i,a),u=e6(c),d=e6(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var n6={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:t6};function r6(e,t,n){var r=X4(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function i6(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=B4.reduce(function(e,n){return e[n]=r6(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var a6={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:i6};function o6(e){var t=e.state,n=e.name;t.modifiersData[n]=q3({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var s6={name:`popperOffsets`,enabled:!0,phase:`read`,fn:o6,data:{}};function c6(e){return e===`x`?`y`:`x`}function l6(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=J3(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=X4(t.placement),v=S3(t.placement),y=!v,b=f3(_),x=c6(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:j4,A=b===`y`?k4:A4,j=b===`y`?`height`:`width`,M=S[b],ee=M+g[k],te=M-g[A],N=p?-w[j]/2:0,ne=v===`start`?C[j]:w[j],re=v===`start`?-w[j]:-C[j],ie=t.elements.arrow,ae=p&&ie?r3(ie):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:h3(),se=oe[k],ce=oe[A],le=p3(0,C[j],ae[j]),ue=y?C[j]/2-N-le-se-E.mainAxis:ne-le-se-E.mainAxis,de=y?-C[j]/2+N+le+ce+E.mainAxis:re+le+ce+E.mainAxis,fe=t.elements.arrow&&d3(t.elements.arrow),pe=fe?b===`y`?fe.clientTop||0:fe.clientLeft||0:0,me=D?.[b]??0,he=M+ue-me-pe,ge=M+de-me,_e=p3(p?Q4(ee,he):ee,M,p?Z4(te,ge):te);S[b]=_e,O[b]=_e-M}if(s){var ve=b===`x`?`top`:j4,ye=b===`x`?k4:A4,be=S[x],xe=x===`y`?`height`:`width`,Se=be+g[ve],Ce=be-g[ye],we=[`top`,j4].indexOf(_)!==-1,Te=D?.[x]??0,Ee=we?Se:be-C[xe]-w[xe]-Te+E.altAxis,De=we?be+C[xe]+w[xe]-Te-E.altAxis:Ce,Oe=p&&we?m3(Ee,be,De):p3(p?Ee:Se,be,p?De:Ce);S[x]=Oe,O[x]=Oe-be}t.modifiersData[r]=O}}var u6={name:`preventOverflow`,enabled:!0,phase:`main`,fn:l6,requiresIfExists:[`offset`]};function d6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function f6(e){return e===U4(e)||!G4(e)?F3(e):d6(e)}function p6(e){var t=e.getBoundingClientRect(),n=$4(t.width)/e.offsetWidth||1,r=$4(t.height)/e.offsetHeight||1;return n!==1||r!==1}function m6(e,t,n){n===void 0&&(n=!1);var r=G4(t),i=G4(t)&&p6(t),a=s3(t),o=n3(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((H4(t)!==`body`||z3(a))&&(s=f6(t)),G4(t)?(c=n3(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=I3(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function h6(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function g6(e){var t=h6(e);return V4.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function _6(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function v6(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var y6={placement:`bottom`,modifiers:[],strategy:`absolute`};function b6(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function x6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?y6:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},y6,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:W4(e)?V3(e):e.contextElement?V3(e.contextElement):[],popper:V3(t)};var s=g6(v6([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(b6(t,n)){i.rects={reference:m6(t,d3(n),i.options.strategy===`fixed`),popper:r3(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:_6(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!b6(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var S6=x6({defaultModifiers:[A3,s6,D3,Y4,a6,Q3,u6,x3,n6]});function C6(e){return Qr(`MuiPopper`,e)}$r(`MuiPopper`,[`root`]);function w6(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function T6(e){return typeof e==`function`?e():e}function E6(e){return e.nodeType!==void 0}var D6=e=>{let{classes:t}=e;return A({root:[`root`]},C6,t)},O6={},k6=N.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=N.useRef(null),_=oR(g,t),v=N.useRef(null),y=oR(v,u),b=N.useRef(y);pi(()=>{b.current=y},[y]),N.useImperativeHandle(u,()=>v.current,[]);let x=w6(c,i),[S,C]=N.useState(x),[w,T]=N.useState(T6(n));N.useEffect(()=>{v.current&&v.current.forceUpdate()}),N.useEffect(()=>{n&&T(T6(n))},[n]),pi(()=>{if(!w||!s)return;let e=e=>{C(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=S6(w,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[w,a,o,s,l,x]);let E={placement:S};p!==null&&(E.TransitionProps=p);let D=D6(e),O=f.root??`div`;return(0,P.jsx)(O,{...VG({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(E):r})}),A6=I(N.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=O6,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=N.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let S;if(i)S=i;else if(n){let e=T6(n);S=e&&E6(e)?YL(e).body:YL(null).body}let C=!l&&s&&(!m||v)?`none`:void 0,w=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,P.jsx)(lH,{disablePortal:o,container:S,children:(0,P.jsx)(k6,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:C,...p},TransitionProps:w,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),j6=I(N.forwardRef(function(e,t){let n=zi(),{anchorEl:r,component:i,components:a,componentsProps:o,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,slots:g,slotProps:_,...v}=Bo({props:e,name:`MuiPopper`}),y=g?.root??a?.Root,b={anchorEl:r,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,...v};return(0,P.jsx)(A6,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),M6=I(Xo)({fontSize:50,textAlign:`center`}),N6=({children:e,...t})=>(0,P.jsx)(j6,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,P.jsx)(M6,{children:e})}),P6=({letter:e})=>(0,P.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});P6.propTypes={letter:p.string};function F6({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,N.useRef)(null),i=(0,N.useRef)(n),[a,o]=(0,N.useState)({top:0,left:0}),[s,c]=(0,N.useState)(null);i.current=n;let l=(0,N.useMemo)(()=>{if(!t)return p4;switch(!0){case t.language===`spanish`:return p4;case t.language===`special`:return m4;default:return t}},[t]),u=(0,N.useMemo)(()=>l.characters.reduce((e,t)=>(t.length>=e.columns&&(e.columns=t.length),e),{rows:l.characters.length,columns:0}),[l]),d=()=>c(null);(0,N.useEffect)(()=>()=>{d()},[]),(0,N.useEffect)(()=>{if(!e)return;let t=e.options.element,n=e.view.dom,a=()=>{if(!r.current)return;let n=t.getBoundingClientRect(),{from:i}=e.state.selection,a=e.view.coordsAtPos(i),s=r.current.offsetHeight,c=r.current.offsetWidth,l=window.innerHeight-(n.bottom+60)>=s||n.top<s+80?n.bottom+60:n.top-s-20,u=a.left;l=Math.max(8,Math.min(l,window.innerHeight-s-8)),u=Math.max(8,Math.min(u,window.innerWidth-c-8)),o({top:l,left:u})};a();let s=null,c=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,a()}))};window.addEventListener(`scroll`,c,!0),window.addEventListener(`resize`,c);let l=e=>{r.current&&!r.current.contains(e.target)&&!n.contains(e.target)&&i.current()},u=setTimeout(()=>{document.addEventListener(`click`,l)});return()=>{clearTimeout(u),s!==null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,c,!0),window.removeEventListener(`resize`,c),document.removeEventListener(`click`,l)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,P.jsxs)(P.Fragment,{children:[zx.createPortal((0,P.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`fixed`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:1e3},children:(0,P.jsx)(`div`,{children:(0,P.jsx)(O$,{keyPadCharacterRef:t.keyPadCharacterRef,setKeypadInteraction:t.setKeypadInteraction,autoFocus:!0,noDecimal:!0,hideInput:!0,noLatexHandling:!0,hideDoneButtonBackground:!0,layoutForKeyPad:u,additionalKeys:l.characters.reduce((e,t)=>(e=[...e,...t.map(e=>({name:b(e,`name`)||e,write:b(e,`write`)||e,label:b(e,`label`)||e,category:`character`,extraClass:`character`,extraProps:{...e.extraProps||{},style:{...(e.extraProps||{}).style,border:`1px solid #000`}},...l.hasPreview?{actions:{onMouseEnter:t=>f(t,e),onMouseLeave:d}}:{}}))],e),[]),keypadMode:`language`,onChange:t=>{typeof t==`string`&&e.chain().focus().insertContent(t).run()},onDone:n})})}),document.body),s&&zx.createPortal((0,P.jsxs)(N6,{onClose:d,anchorEl:s.anchorEl,children:[(0,P.jsx)(`div`,{children:s.el.label}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,P.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}F6.propTypes={editor:p.object,opts:p.object,onClose:p.func.isRequired};var I6=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z`,fill:`currentColor`})}),L6=()=>(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z`,fill:`currentColor`})}),R6=()=>(0,P.jsx)(`svg`,{width:`30`,height:`28`,viewBox:`0 0 30 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`20px`,height:`18px`},"aria-hidden":`true`,focusable:`false`,children:(0,P.jsx)(`path`,{d:`M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z`,fill:`currentColor`})});function z6({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o}){let[s,c]=(0,N.useState)(!1),l=r??{},u=Xx({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof U&&(n=t.node);let r=e.editor?.isActive(`math`)||e.editor?.isActive(`explicit_constructed_response`)||e.editor?.isActive(`imageUploadNode`)||e.editor?.isActive(`drag_in_the_blank`),i=t&&t.empty===!1&&e.editor.isActive(`table`);return{currentNode:n,hideDefaultToolbar:r,hasTextSelectionInTable:i,isFocused:e.editor?.isFocused,toolbarOpened:e.editor?._toolbarOpened??!1,isBold:e.editor.isActive(`bold`)??!1,canBold:e.editor.can().chain().toggleBold().run()??!1,isTable:e.editor.isActive(`table`)??!1,tableHasBorder:e.editor.getAttributes(`table`)?.border===`1`,canTable:e.editor.can().chain().insertTable().run()??!1,isItalic:e.editor.isActive(`italic`)??!1,canItalic:e.editor.can().chain().toggleItalic().run()??!1,isStrike:e.editor.isActive(`strike`)??!1,canStrike:e.editor.can().chain().toggleStrike().run()??!1,isCode:e.editor.isActive(`code`)??!1,canCode:e.editor.can().chain().toggleCode().run()??!1,canClearMarks:e.editor.can().chain().unsetAllMarks().run()??!1,isUnderline:e.editor.isActive(`underline`)??!1,isSubScript:e.editor.isActive(`subscript`)??!1,isSuperScript:e.editor.isActive(`superscript`)??!1,isParagraph:e.editor.isActive(`paragraph`)??!1,isHeading1:e.editor.isActive(`heading`,{level:1})??!1,isHeading2:e.editor.isActive(`heading`,{level:2})??!1,isHeading3:e.editor.isActive(`heading`,{level:3})??!1,isHeadingParagraph:e.editor.isActive(`headingParagraph`)??!1,isHeading4:e.editor.isActive(`heading`,{level:4})??!1,isHeading5:e.editor.isActive(`heading`,{level:5})??!1,isHeading6:e.editor.isActive(`heading`,{level:6})??!1,isBulletList:e.editor.isActive(`bulletList`)??!1,isOrderedList:e.editor.isActive(`orderedList`)??!1,isCodeBlock:e.editor.isActive(`codeBlock`)??!1,isBlockquote:e.editor.isActive(`blockquote`)??!1,canUndo:e.editor.can().chain().undo().run()??!1,canRedo:e.editor.can().chain().redo().run()??!1}}}),d=!!o,f=k(t.toolbar,kz,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:l.position===`top`,[t.toolbarRight]:l.alignment===`right`,[t.focused]:l.alwaysVisible||u.isFocused&&!u.toolbarOpened&&!u.hideDefaultToolbar,[t.autoWidth]:d,[t.fullWidth]:!d,[t.hidden]:l.isHidden===!0}),p=l.minWidth===void 0?{}:{minWidth:l.minWidth},m=e=>{e.preventDefault()},h=(0,N.useMemo)(()=>[{icon:(0,P.jsx)(e4,{}),label:`Insert table`,onClick:e=>e.chain().focus().insertTable({rows:2,cols:2,withHeaderRow:!1}).run(),hidden:e=>!n?.includes(`table`)||e.isTable,isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(w4,{}),label:`Add table row`,onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(T4,{}),label:`Remove table row`,onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(E4,{}),label:`Add table column`,onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(D4,{}),label:`Remove table column`,onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(O4,{}),label:`Remove table`,onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(u4,{}),label:`Table borders`,toggle:!0,onClick:e=>{let t=e.getAttributes(`table`),n={...t,border:t.border===`0`?`1`:`0`};e.commands.updateAttributes(`table`,n)},hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.tableHasBorder,isDisabled:e=>!e.canTable},{icon:(0,P.jsx)(X2,{}),label:`Bold`,toggle:!0,onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,P.jsx)(Z2,{}),label:`Italic`,toggle:!0,onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,P.jsx)(Q2,{}),label:`Strikethrough`,toggle:!0,onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,P.jsx)($2,{}),label:`Code`,toggle:!0,onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,P.jsx)(r4,{}),label:`Underline`,toggle:!0,onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,P.jsx)(L6,{}),label:`Subscript`,toggle:!0,onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,P.jsx)(I6,{}),label:`Superscript`,toggle:!0,onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,P.jsx)(a4,{}),label:`Insert image`,hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,P.jsx)(c4,{}),label:`Insert video`,hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,P.jsx)(l4,{}),label:`Insert audio`,hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,P.jsx)(x4,{}),label:`CSS classes`,hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,P.jsx)(s4,{}),label:`Blockquote`,toggle:!0,hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,P.jsx)(R6,{}),label:`Heading`,toggle:!0,hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,P.jsx)(i4,{}),label:`Insert math`,hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,P.jsx)(P6,{letter:`ñ`}),label:`Spanish characters (ñ)`,hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>c(p4)},{icon:(0,P.jsx)(P6,{letter:`€`}),label:`Special characters (€)`,hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>c(m4)},{icon:(0,P.jsx)(y4,{editor:e}),label:`Text alignment`,hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,P.jsx)(t4,{}),label:`Bulleted list`,toggle:!0,hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,P.jsx)(n4,{}),label:`Numbered list`,toggle:!0,hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,P.jsx)(KW,{}),label:`Undo`,hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,P.jsx)(o4,{}),label:`Redo`,hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e]),g=u.hideDefaultToolbar&&u.currentNode?.type?.name===`drag_in_the_blank`;return(0,P.jsxs)(`div`,{className:f,style:{...p},onMouseDown:m,children:[g&&(0,P.jsx)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:(0,P.jsx)(`div`,{className:t.buttonsContainer,children:(0,P.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,title:`Delete response area`,children:(0,P.jsx)(Oz,{})})})}),!u.hideDefaultToolbar&&(0,P.jsxs)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:[(0,P.jsx)(`div`,{className:t.buttonsContainer,children:h.filter(e=>!e.hidden?.(u)).map((n,r)=>{let i=n.isDisabled?.(u),a=n.isActive?.(u);return(0,P.jsx)(`button`,{type:`button`,disabled:i,"aria-label":n.label,title:n.label,"aria-pressed":n.toggle?!!a:void 0,onClick:t=>{t.preventDefault(),n.onClick(e)},className:k(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,P.jsx)(`button`,{type:`button`,"aria-label":`Insert response area`,title:`Insert response area`,onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,P.jsx)(f4,{})}),l.showDone&&(0,P.jsx)(Nz,{onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),s&&(0,P.jsx)(F6,{editor:e,opts:{...s,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>c(!1)})]})}var B6=e=>{No();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`toolbarButton`,active:`active`,disabled:`disabled`,isActive:`isActive`,toolbar:`toolbar`,toolbarWithNoDone:`toolbarWithNoDone`,toolbarTop:`toolbarTop`,toolbarRight:`toolbarRight`,fullWidth:`fullWidth`,hidden:`hidden`,autoWidth:`autoWidth`,focused:`focused`,iconRoot:`iconRoot`,label:`label`,shared:`shared`};return(0,P.jsx)(V6,{children:(0,P.jsx)(z6,{...e,classes:t})})},V6=I(`div`)(()=>({"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .toolbarButton":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:ZH()},"&:focus":{outline:`2px solid ${zU()}`}},"& .active":{color:ZH()},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:QH()}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`absolute`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:`280px`,margin:`5px 0 0 0`,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:0,pointerEvents:`none`},"& .toolbarWithNoDone":{minWidth:`265px`},"& .toolbarTop":{top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`auto`},"& .focused":{opacity:1,pointerEvents:`auto`},"& .iconRoot":{width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`},"& .label":{color:`var(--editable-html-toolbar-check, #00bb00)`},"& .shared":{display:`flex`}})),H6=I(`div`,{shouldForwardProp:e=>![`noBorder`,`error`].includes(e)})(({theme:e,noBorder:t,error:n})=>({position:`relative`,padding:`0px`,border:t?`none`:`1px solid #ccc`,borderRadius:`4px`,cursor:`text`,'& [data-slate-editor="true"]':{wordBreak:`break-word`,overflow:`visible`,maxHeight:`500px`,padding:`5px`},"&:first-child":{marginTop:0},"& ul, & ol":{padding:`0 1rem`,margin:`1.25rem 1rem 1.25rem 0.4rem`},"& ul li p, & ol li p":{marginTop:`0.25em`,marginBottom:`0.25em`},"& h1, & h2, & h3, & h4, & h5, & h6":{lineHeight:1.1,marginTop:`2.5rem`,textWrap:`pretty`},"& h1, & h2":{marginTop:`3.5rem`,marginBottom:`1.5rem`},"& h1":{fontSize:`1.4rem`},"& h2":{fontSize:`1.2rem`},"& h3":{fontSize:`1.1rem`},"& h4, & h5, & h6":{fontSize:`1rem`},"& code":{backgroundColor:`var(--purple-light)`,borderRadius:`0.4rem`,color:`var(--black)`,fontSize:`0.85rem`,padding:`0.25em 0.3em`},"& pre":{background:`var(--black)`,borderRadius:`0.5rem`,color:`var(--white)`,fontFamily:`'JetBrainsMono', monospace`,margin:`1.5rem 0`,padding:`0.75rem 1rem`,"& code":{background:`none`,color:`inherit`,fontSize:`0.8rem`,padding:0}},"& blockquote":{background:`#f9f9f9`,borderLeft:`5px solid #ccc`,margin:`1.5em 10px`,padding:`.5em 10px`},"& p":{margin:`0`},"& table":{tableLayout:`fixed`,width:`100%`,borderCollapse:`collapse`,color:ZH(),backgroundColor:vU()},'& table:not([border="1"]) tr':{borderTop:`1px solid ${AU()}`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid ${AU()}`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),U6=I(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:ZH(),backgroundColor:n?e.palette.action.selected:vU(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),W6=I(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function G6(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(null),{editor:i,disabled:a,children:o,disableScrollbar:s,activePlugins:c,toolbarOpts:l,responseAreaProps:u,autoFocus:d,minWidth:f,width:p,maxWidth:m,minHeight:h,height:g,maxHeight:_,highlightShape:v,ref:y}=e;(0,N.useEffect)(()=>{i&&r.current&&(i._tiptapContainerEl=r.current)},[i,r.current]),(0,N.useEffect)(()=>{i&&d&&Promise.resolve().then(()=>{i.commands.focus(`end`)})},[i,d]),(0,N.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.style.whiteSpace=`nowrap`,t.textContent=`W`.repeat(e.charactersLimit);let i=window.getComputedStyle(r.current);[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`letterSpacing`,`wordSpacing`,`textTransform`,`lineHeight`].forEach(e=>{t.style[e]=i[e]}),document.body.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let b=(0,N.useMemo)(()=>({width:Y2(t||p),minWidth:Y2(f),maxWidth:Y2(m),height:Y2(g),minHeight:Y2(h),maxHeight:Y2(_)}),[t,f,p,m,h,g,_]);return(0,P.jsxs)(H6,{noBorder:l&&l.noBorder,error:l&&l.error,className:e.className,style:{width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth},ref:r,children:[(0,P.jsx)(U6,{disableScrollbar:s,highlightShape:v,children:(0,P.jsx)(W6,{noPadding:l&&l.noPadding,children:o})}),i&&(0,P.jsx)(B6,{editor:i,responseAreaProps:u,toolbarOpts:l,activePlugins:c,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar})]})}var K6=D(`@pie-lib:editable-html:plugins`),q6=[`bold`,`html`,`extraCSSRules`,`italic`,`underline`,`strikethrough`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`blockquote`,`h3`,`table`,`video`,`audio`,`responseArea`,`redo`,`undo`,`superscript`,`subscript`],J6={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},Y6=q6.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),X6=(e,t,n)=>{K6(`[buildPlugins] opts: `,n),e||=Y6;let r=(t,n=!0)=>e.includes(t)&&n&&t,i=n.image&&n.image.delete,a=n.math,o=n.responseArea&&n.responseArea.type,s=!x(n.extraCSSRules),c=n?.languageCharacters||[];return _([r(`table`),r(`bold`),r(`italic`),r(`strikethrough`),r(`underline`),r(`superscript`),r(`subscript`),r(`image`,!!i),r(`video`),r(`audio`),r(`math`,!!a),...c.map(e=>r(`languageCharacters`,e)),r(`text-align`),r(`blockquote`),r(`h3`),r(`bulleted-list`),r(`numbered-list`),r(`undo`),r(`redo`),r(`responseArea`,!!o),r(`css`,!!s),r(`html`,!!n.html)])},Z6={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},Q6={options:{},respAreaToolbar:()=>{},onHandleAreaChange:()=>{}},$6=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],e8={"--white":`#fff`,"--black":`#2e2b29`,"--black-contrast":`#110f0e`,"--gray-1":`rgba(61, 37, 20, .05)`,"--gray-2":`rgba(61, 37, 20, .08)`,"--gray-3":`rgba(61, 37, 20, .12)`,"--gray-4":`rgba(53, 38, 28, .3)`,"--gray-5":`rgba(28, 25, 23, .6)`,"--green":`#22c55e`,"--purple":`#6a00f5`,"--purple-contrast":`#5800cc`,"--purple-light":`rgba(88, 5, 255, .05)`,"--yellow-contrast":`#facc15`,"--yellow":`rgba(250, 204, 21, .4)`,"--yellow-light":`#fffae5`,"--red":`#ff5c33`,"--red-light":`#ffebe5`,"--shadow":`0px 12px 33px 0px rgba(0, 0, 0, .06),
|
|
394
|
-
0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},t8=e=>({spellcheck:e?`true`:`false`,autocorrect:e?`on`:`off`,autocapitalize:e?`on`:`off`}),n8=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(!1),{toolbarOpts:s}=e,c=(0,N.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...Z6,...s},u=(0,N.useCallback)(t=>{let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)},[e.markup,e.onChange,e.onDone,l.doneOn]),d=(0,N.useMemo)(()=>({...Q6,...e.responseAreaProps,onInlineDropdownToolbarClose:u}),[e.responseAreaProps,u]),f=(0,N.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||$6)?.filter(e=>{let t=J6[e]||e,r=n[t]||{};return!r||!r.disabled});return X6(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:d.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e,d.type]),p=[CF.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),XP,ZP.configure({limit:e.charactersLimit||1e6}),BP.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]},link:{autolink:!1,linkOnPaste:!1}}),q2,LL,J2,RL,zL,EF.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),NL,_L,IL,FL,SZ.configure(d),CZ.configure(d),TZ.configure(d),EZ.configure(d),wZ.configure(d),P$.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),SF,xF,TF,K1.configure({toolbarOpts:l,imageHandling:{disableImageAlignmentButtons:e.disableImageAlignmentButtons,onDone:t=>e.onDone?.(t.getHTML()),onDelete:e.imageSupport&&e.imageSupport.delete&&(t=>{let{src:n}=t.attrs;e.imageSupport.delete(n,e=>{c(t.pos)})}),insertImageRequested:e.imageSupport&&((t,n,r)=>{let[o,s]=n,l=n=>{let r;a&&n&&(r=e.onChange),c(s),r?.(t.getHTML())};t._insertingImage=!0,i(e=>[...e,o]),(()=>{let n=r(l),i=v(()=>{let e=()=>window.removeEventListener(`focus`,i);if(!t._insertingImage){e();return}c(s),t._insertingImage=!1,e()},500);window.addEventListener(`focus`,i),e.imageSupport.add(n)})()}),maxImageWidth:e.maxImageWidth,maxImageHeight:e.maxImageHeight},limit:3}),Y0.configure({uploadSoundSupport:e.uploadSoundSupport}),f2.configure({extraCSSRules:e.extraCSSRules})],m=e.spellCheck!==!1,h=eS({extensions:p,immediatelyRender:!1,editorProps:{attributes:t8(m),handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:kF(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:e})=>{e._insertingImage||e._toolbarOpened||e.isActive(`inline_dropdown`)||e.isActive(`explicit_constructed_response`)||!e.schema||u(e)}},[e.charactersLimit]);(0,N.useEffect)(()=>{e.editorRef&&e.editorRef(h)},[e.editorRef,h]),(0,N.useEffect)(()=>{h?.setEditable(!e.disabled)},[e.disabled,h]),(0,N.useEffect)(()=>{if(!h)return;let e=h.options?.editorProps,t=t8(m);e?.attributes?.spellcheck!==t.spellcheck&&h.setOptions({editorProps:{...e,attributes:t}})},[m,h]),(0,N.useEffect)(()=>{if(!h)return;let t=kF(e.markup);t!==h.getHTML()&&h.commands.setContent(t,{emitUpdate:!1})},[e.markup,h]),(0,N.useEffect)(()=>{Object.entries(e8).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let g=Xx({editor:h,selector:e=>({isFocused:e.editor?.isFocused})}),_=(0,N.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:Y2(n),minWidth:Y2(t),maxWidth:Y2(r),height:Y2(a),minHeight:Y2(i),maxHeight:Y2(o)}},[e]);return(0,P.jsx)(G6,{...e,activePlugins:f,toolbarOpts:l,editorState:g,editor:h,children:h&&(0,P.jsx)(r8,{style:{minHeight:_.minHeight,height:_.height,maxHeight:_.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:h})})},r8=I(qx,{shouldForwardProp:e=>![`showParagraph`,`separateParagraph`].includes(e)})(({showParagraph:e,separateParagraph:t})=>({display:`flex`,outline:`none !important`,"& .ProseMirror":{flex:1,padding:`5px`,maxHeight:`500px`,outline:`none !important`,position:`initial`,"& > p, & > div":{margin:`0`},"& p[data-placeholder].is-empty:only-child, & div[data-placeholder].is-empty:only-child":{position:`relative`},"& p[data-placeholder].is-empty:only-child::before, & div[data-placeholder].is-empty:only-child::before":{content:`attr(data-placeholder)`,position:`absolute`,left:0,top:0,color:`#9CA3AF`,pointerEvents:`none`,whiteSpace:`pre-wrap`},...e&&{"& > p:has(+ p)::after, & > div:has(+ div)::after":{display:`block`,content:`"¶"`,fontSize:`1em`,color:`#146EB3`}},...t&&{"& > p:has(+ p)":{marginBottom:`1em`}}}})),i8=n8,a8=(e,t,n)=>{let r=n||[],i=r.reduce((e,t)=>e+t.textContent.length,0),a=!0;if(i>t)return!1;for(e&&=(e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&r.push(e),e.firstChild);e&&a;)a=a8(e,t,r),e=e.nextSibling;return r},o8=(e,t,n)=>{let r=a8(n,t),i=[],a=0;return r.forEach(n=>{let r=a+n.textContent.length;[e,t].forEach(e=>{a<=e&&e<r&&i.push({node:n,offset:e-a})}),a=r}),i},s8=e=>{let{commonAncestorContainer:t,startContainer:n,endContainer:r,startOffset:i,endOffset:a}=e,o=[],s=!1,c=!1,l=``,u=e=>{let{nodeValue:t,childNodes:d}=e;e===n&&e===r?(t&&(l+=t.substring(i,a)),s=c=!0):e===n?(t&&(l+=t.substring(i)),s=!0):e===r?(t&&(l+=t.substring(0,a)),c=!0):e&&e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&t&&s&&!c&&(l+=t,o.push(e)),d.forEach(e=>{if(!c)u(e);else return})};return u(t),[o,l]},c8=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},l8=e=>{if(e.startContainer===e.endContainer)return[c8(e)];let[t]=s8(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=c8(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=c8(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},u8=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=s8(n),[,i]=s8(e),a=r.length;return{quote:i,start:a,end:a+i.length}},d8=(e,t)=>{(e||[]).forEach(e=>{let t=e.parentNode,n=e.childNodes,r=n.length;if(r>0)for(let i=0;i<r;i++)t.insertBefore(n[0],e);else t.insertBefore(document.createTextNode(e.textContent),e);t.removeChild(e)}),t.normalize()},f8=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},p8=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,m8=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),h8=e=>document.querySelector(`[data-ann-id='${e}']`),g8=I(GH)(({annotationType:e})=>({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginLeft:`16px`,"&::before":{position:`absolute`,right:`100%`,top:`13px`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderRightColor:TU()},...e===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...e===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),_8=I(`div`)(({annotationType:e})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:NU(),border:`4px solid ${TU()}`,...e===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...e===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),v8=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${TU()}`})),y8=I(`div`)(({variant:e,annotationType:t})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${TU()}`},"&:hover":{backgroundColor:yU()},...e===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`typeChange`&&t===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`}},...e===`typeChange`&&t===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`}}})),b8=class extends N.Component{static propTypes={anchorEl:p.object,open:p.bool,offset:p.number,value:p.string,type:p.string,onClose:p.func,onDelete:p.func,onSave:p.func,onTypeChange:p.func};constructor(e){super(e),this.state={value:e.value}}UNSAFE_componentWillReceiveProps(e){let{value:t}=e,{value:n}=this.props;t!==n&&this.setState({value:t})}onValueChange=e=>this.setState({value:e.target.value});handleSave=()=>{let{value:e,onSave:t,onClose:n,onDelete:r}=this.props,{value:i}=this.state;i===``&&r(),e!==i&&t(e,i),this.setState({value:``}),n()};handleTypeChange=()=>{let{onTypeChange:e,onDelete:t}=this.props,{value:n}=this.state;n===``?t():e(n),this.setState({value:``})};render(){let{anchorEl:e,offset:t,onDelete:n,open:r,type:i}=this.props,{value:a}=this.state;return(0,P.jsx)(g8,{anchorEl:e,elevation:2,open:r,onClose:this.handleSave,annotationType:i,style:{marginTop:`${t}px`,transition:`margin-top 2s ease-out`},transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`left`},children:(0,P.jsxs)(_8,{annotationType:i,children:[(0,P.jsx)(g1,{id:`annotation-editor`,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,P.jsxs)(v8,{children:[(0,P.jsx)(y8,{onClick:n,children:`Delete`}),(0,P.jsx)(y8,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,P.jsx)(y8,{onClick:this.handleSave,children:`Save`})]})]})})}},x8=I(GH)({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginTop:`-16px`,"&::after":{position:`absolute`,left:`calc(50% - 7px)`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderTopColor:TU()}}}),S8=I(`div`)(()=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:NU(),border:`2px solid ${TU()}`})),C8=I(`div`)({display:`flex`,flexWrap:`wrap`}),w8=I(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${TU()}`})),T8=I(`div`)(({variant:e})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${TU()}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${TU()}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:yU()},...e===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}}})),E8=class extends N.Component{static propTypes={anchorEl:p.object,open:p.bool,annotations:p.array,isNewAnnotation:p.bool,onClose:p.func,onDelete:p.func,onEdit:p.func,onWrite:p.func,onAnnotate:p.func};render(){let{anchorEl:e,annotations:t,isNewAnnotation:n,onAnnotate:r,onClose:i,onEdit:a,onDelete:o,onWrite:s,open:c}=this.props;return(0,P.jsx)(x8,{anchorEl:e,open:c,onClose:i,elevation:5,transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`center`},transformOrigin:{vertical:`bottom`,horizontal:`center`},children:(0,P.jsxs)(S8,{children:[(0,P.jsx)(C8,{children:t.map((e,t)=>(0,P.jsx)(T8,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,P.jsxs)(w8,{children:[(0,P.jsx)(T8,{onClick:i,children:`Cancel`}),(0,P.jsx)(T8,{style:{pointerEvents:`none`}}),n?(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(T8,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,P.jsx)(T8,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,P.jsxs)(N.Fragment,{children:[(0,P.jsx)(T8,{onClick:o,children:`Delete`}),(0,P.jsx)(T8,{onClick:a,children:`Edit`})]})]})]})})}};function D8(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function O8(e,t){return!e||D8(e)?e:D8(e.default)?e.default:t&&D8(e[t])?e[t]:t&&D8(e[t]?.default)?e[t].default:e}var k8=O8(EG,`InputContainer`)||O8(M8.InputContainer,`InputContainer`),A8=cK,j8=A8.default,M8=j8&&typeof j8==`object`?j8:A8,N8=I(`div`)({padding:`10px 120px 10px 16px`,backgroundColor:`rgba(0, 0, 0, 0.06)`,border:`1px solid #ccc`,borderRadius:`4px`,overflowY:`scroll`,lineHeight:`36px`,whiteSpace:`pre-wrap`,overflowWrap:`break-word`,"& p":{margin:0},"& span[data-latex]":{userSelect:`none`,"-webkit-user-select":`none`,"-moz-user-select":`none`,"-ms-user-select":`none`}}),P8=I(`div`)({width:`230px`}),F8=I(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),I8=I(k8)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),L8=`
|
|
393
|
+
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=Fb(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=Fb(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.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()}}});cb.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(v2.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(x2.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(M2.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(U2.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(G2.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(K2.configure(this.options.taskList)),e}});var q2=x2.extend({content:`(div | paragraph | heading | bulletList | orderedList | blockquote | codeBlock | horizontalRule | image | imageUploadNode)+`}),J2=Rb.create({name:`headingParagraph`,group:`block`,content:`inline*`,defining:!0,addAttributes(){return{"data-heading":{default:`heading1`,parseHTML:e=>e.getAttribute(`data-heading`),renderHTML:e=>({"data-heading":e[`data-heading`]})}}},parseHTML(){return[{tag:`p[data-heading]`}]},renderHTML({HTMLAttributes:e}){return[`p`,Hv(e),0]},addCommands(){return{toggleHeadingParagraph:()=>({commands:e,editor:t})=>t.isActive(`headingParagraph`)?e.setNode(`paragraph`):e.setNode(`headingParagraph`,{"data-heading":`heading1`})}}}),Y2=e=>{if(!e)return;let t=/^calc\((.*)\)$/;if(typeof e==`string`){if(e.endsWith(`%`))return;if(e.endsWith(`px`)||e.endsWith(`vh`)||e.endsWith(`vw`)||e.endsWith(`ch`)||e.endsWith(`em`)||e.match(t))return e;let n=parseInt(e,10);return Number.isNaN(n)?n:`${n}px`}if(typeof e==`number`)return`${e}px`},X2=GL((0,N.jsx)(`path`,{d:`M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42M10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5`}),`FormatBold`),Z2=GL((0,N.jsx)(`path`,{d:`M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z`}),`FormatItalic`),Q2=GL((0,N.jsx)(`path`,{d:`M10 19h4v-3h-4zM5 4v3h5v3h4V7h5V4zM3 14h18v-2H3z`}),`FormatStrikethrough`),$2=GL((0,N.jsx)(`path`,{d:`M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z`}),`Code`),e4=GL((0,N.jsx)(`path`,{d:`M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z`}),`GridOn`),t4=GL((0,N.jsx)(`path`,{d:`M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5m0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5m0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5M7 19h14v-2H7zm0-6h14v-2H7zm0-8v2h14V5z`}),`FormatListBulleted`),n4=GL((0,N.jsx)(`path`,{d:`M2 17h2v.5H3v1h1v.5H2v1h3v-4H2zm1-9h1V4H2v1h1zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2zm5-6v2h14V5zm0 14h14v-2H7zm0-6h14v-2H7z`}),`FormatListNumbered`),r4=GL((0,N.jsx)(`path`,{d:`M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6m-7 2v2h14v-2z`}),`FormatUnderlined`),i4=GL((0,N.jsx)(`path`,{d:`M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z`}),`Functions`),a4=GL((0,N.jsx)(`path`,{d:`M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z`}),`Image`),o4=GL((0,N.jsx)(`path`,{d:`M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z`}),`Redo`),s4=GL((0,N.jsx)(`path`,{d:`M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z`}),`FormatQuote`),c4=GL((0,N.jsx)(`path`,{d:`M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3zM8 17H6v-2h2zm0-4H6v-2h2zm0-4H6V7h2zm10 8h-2v-2h2zm0-4h-2v-2h2zm0-4h-2V7h2z`}),`Theaters`),l4=GL((0,N.jsx)(`path`,{d:`M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77`}),`VolumeUp`),u4=GL((0,N.jsx)(`path`,{d:`M3 3v18h18V3zm8 16H5v-6h6zm0-8H5V5h6zm8 8h-6v-6h6zm0-8h-6V5h6z`}),`BorderAll`),d4=F(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans !important`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,top:`7px`,width:`110px`,height:`28px`,whiteSpace:`nowrap`})),f4=()=>(0,N.jsx)(d4,{children:`+ Response Area`}),p4={characters:[[`á`,`é`,`í`,`ó`,`ú`],[`Á`,`É`,`Í`,`Ó`,`Ú`],[`—`,`«`,`»`,`ñ`,`ü`],[`-`,`¿`,`¡`,`Ñ`,`Ü`]]},m4={hasPreview:!0,characters:[[{unicode:`U+00A2`,description:`CENT SIGN`,write:`¢`,label:`¢`},{unicode:`U+00BF`,description:`INVERTED QUESTION MARK`,write:`¿`,label:`¿`},{unicode:`U+00B4`,description:`ACUTE ACCENT`,write:`´`,label:`´`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E1`,description:`LATIN SMALL LETTER A WITH ACUTE`,write:`á`,label:`á`},{unicode:`U+00E9`,description:`LATIN SMALL LETTER E WITH ACUTE`,write:`é`,label:`é`},{unicode:`U+00ED`,description:`LATIN SMALL LETTER I WITH ACUTE`,write:`í`,label:`í`},{unicode:`U+00F3`,description:`LATIN SMALL LETTER O WITH ACUTE`,write:`ó`,label:`ó`},{unicode:`U+00FA`,description:`LATIN SMALL LETTER U WITH ACUTE`,write:`ú`,label:`ú`},{unicode:`U+00F1`,description:`LATIN SMALL LETTER N WITH TILDE`,write:`ñ`,label:`ñ`}],[{unicode:`U+20AC`,description:`EURO SIGN`,write:`€`,label:`€`},{unicode:`U+00A1`,description:`INVERTED EXCLAMATION MARK`,write:`¡`,label:`¡`},{unicode:`U+00C1`,description:`LATIN CAPITAL LETTER A WITH ACUTE`,write:`Á`,label:`Á`},{unicode:`U+00C9`,description:`LATIN CAPITAL LETTER E WITH ACUTE`,write:`É`,label:`É`},{unicode:`U+00CD`,description:`LATIN CAPITAL LETTER I WITH ACUTE`,write:`Í`,label:`Í`},{unicode:`U+00D3`,description:`LATIN CAPITAL LETTER O WITH ACUTE`,write:`Ó`,label:`Ó`},{unicode:`U+00DA`,description:`LATIN CAPITAL LETTER U WITH ACUTE`,write:`Ú`,label:`Ú`},{unicode:`U+00D1`,description:`LATIN CAPITAL LETTER N WITH TILDE`,write:`Ñ`,label:`Ñ`}],[{unicode:`U+00A3`,description:`POUND SIGN`,write:`£`,label:`£`},{unicode:`U+00AB`,description:`LEFT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`«`,label:`«`},{unicode:`U+005E`,description:`CIRCUMFLEX ACCENT`,write:`^`,label:`^`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E2`,description:`LATIN SMALL LETTER A WITH CIRCUMFLEX`,write:`â`,label:`â`},{unicode:`U+00EA`,description:`LATIN SMALL LETTER E WITH CIRCUMFLEX`,write:`ê`,label:`ê`},{unicode:`U+00EE`,description:`LATIN SMALL LETTER I WITH CIRCUMFLEX`,write:`î`,label:`î`},{unicode:`U+00F4`,description:`LATIN SMALL LETTER O WITH CIRCUMFLEX`,write:`ô`,label:`ô`},{unicode:`U+00FB`,description:`LATIN SMALL LETTER U WITH CIRCUMFLEX`,write:`û`,label:`û`},{unicode:`U+00E7`,description:`LATIN SMALL LETTER C WITH CEDILLA`,write:`ç`,label:`ç`}],[{unicode:`U+00A5`,description:`YEN SIGN`,write:`¥`,label:`¥`},{unicode:`U+00BB`,description:`RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK`,write:`»`,label:`»`},{unicode:`U+00C2`,description:`LATIN CAPITAL LETTER A WITH CIRCUMFLEX`,write:`Â`,label:`Â`},{unicode:`U+00CA`,description:`LATIN CAPITAL LETTER E WITH CIRCUMFLEX`,write:`Ê`,label:`Ê`},{unicode:`U+00CE`,description:`LATIN CAPITAL LETTER I WITH CIRCUMFLEX`,write:`Î`,label:`Î`},{unicode:`U+00D4`,description:`LATIN CAPITAL LETTER O WITH CIRCUMFLEX`,write:`Ô`,label:`Ô`},{unicode:`U+00DB`,description:`LATIN CAPITAL LETTER U WITH CIRCUMFLEX`,write:`Û`,label:`Û`},{unicode:`U+00C7`,description:`LATIN CAPITAL LETTER C WITH CEDILLA`,write:`Ç`,label:`Ç`}],[{unicode:`U+200A`,description:`HAIR SPACE`,write:String.fromCodePoint(`0x200A`),label:` `},{unicode:`U+00A7`,description:`SECTION SIGN`,write:`§`,label:`§`},{unicode:`U+00A8`,description:`DIAERESIS`,write:`¨`,label:`¨`,extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E4`,description:`LATIN SMALL LETTER A WITH DIAERESIS`,write:`ä`,label:`ä`},{unicode:`U+00EB`,description:`LATIN SMALL LETTER E WITH DIAERESIS`,write:`ë`,label:`ë`},{unicode:`U+00EF`,description:`LATIN SMALL LETTER I WITH DIAERESIS`,write:`ï`,label:`ï`},{unicode:`U+00F6`,description:`LATIN SMALL LETTER O WITH DIAERESIS`,write:`ö`,label:`ö`},{unicode:`U+00FC`,description:`LATIN SMALL LETTER U WITH DIAERESIS`,write:`ü`,label:`ü`},{unicode:`U+00DF`,description:`LATIN SMALL LETTER SHARP S`,write:`ß`,label:`ß`}],[{unicode:`U+2009`,description:`THIN SPACE`,write:String.fromCodePoint(`0x2009`),label:` `},{unicode:`U+2026`,description:`HORIZONTAL ELLIPSIS`,write:`…`,label:`…`},{unicode:`U+00C4`,description:`LATIN CAPITAL LETTER A WITH DIAERESIS`,write:`Ä`,label:`Ä`},{unicode:`U+00CB`,description:`LATIN CAPITAL LETTER E WITH DIAERESIS`,write:`Ë`,label:`Ë`},{unicode:`U+00CF`,description:`LATIN CAPITAL LETTER I WITH DIAERESIS`,write:`Ï`,label:`Ï`},{unicode:`U+00D6`,description:`LATIN CAPITAL LETTER O WITH DIAERESIS`,write:`Ö`,label:`Ö`},{unicode:`U+00DC`,description:`LATIN CAPITAL LETTER U WITH DIAERESIS`,write:`Ü`,label:`Ü`},{unicode:`U+2212`,description:`MINUS SIGN`,write:`−`,label:`−`}],[{unicode:`U+00A0`,description:`NO-BREAK SPACE`,write:String.fromCodePoint(`0x00A0`),label:` `},{unicode:`U+2022`,description:`BULLET`,write:`•`,label:`•`},{unicode:`U+0060`,description:`GRAVE ACCENT`,write:"`",label:"`",extraProps:{style:{gridRow:`span 2`}}},{unicode:`U+00E0`,description:`LATIN SMALL LETTER A WITH GRAVE`,write:`à`,label:`à`},{unicode:`U+00E8`,description:`LATIN SMALL LETTER E WITH GRAVE`,write:`è`,label:`è`},{unicode:`U+00EC`,description:`LATIN SMALL LETTER I WITH GRAVE`,write:`ì`,label:`ì`},{unicode:`U+00F2`,description:`LATIN SMALL LETTER O WITH GRAVE`,write:`ò`,label:`ò`},{unicode:`U+00F9`,description:`LATIN SMALL LETTER U WITH GRAVE`,write:`ù`,label:`ù`},{unicode:`U+2013`,description:`EN DASH`,write:`–`,label:`–`}],[{unicode:`U+2003`,description:`EM SPACE`,write:String.fromCodePoint(`0x2003`),label:` `},{unicode:`U+25E6`,description:`WHITE BULLET`,write:`◦`,label:`◦`},{unicode:`U+00C0`,description:`LATIN CAPITAL LETTER A WITH GRAVE`,write:`À`,label:`À`},{unicode:`U+00C8`,description:`LATIN CAPITAL LETTER E WITH GRAVE`,write:`È`,label:`È`},{unicode:`U+00CC`,description:`LATIN CAPITAL LETTER I WITH GRAVE`,write:`Ì`,label:`Ì`},{unicode:`U+00D2`,description:`LATIN CAPITAL LETTER O WITH GRAVE`,write:`Ò`,label:`Ò`},{unicode:`U+00D9`,description:`LATIN CAPITAL LETTER U WITH GRAVE`,write:`Ù`,label:`Ù`},{unicode:`U+2014`,description:`EM DASH`,write:`—`,label:`—`}]]},h4=()=>(0,N.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M42.1875 4.75C42.1875 7.38672 39.9902 9.4375 37.5 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H37.5C39.9902 0.0625 42.1875 2.25977 42.1875 4.75ZM42.1875 42.25C42.1875 44.8867 39.9902 46.9375 37.5 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H37.5C39.9902 37.5625 42.1875 39.7598 42.1875 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),g4=()=>(0,N.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H28.125C25.4883 9.4375 23.4375 7.38672 23.4375 4.75C23.4375 2.25977 25.4883 0.0625 28.125 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H28.125C25.4883 46.9375 23.4375 44.8867 23.4375 42.25C23.4375 39.7598 25.4883 37.5625 28.125 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),_4=()=>(0,N.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M51.5625 4.75C51.5625 7.38672 49.3652 9.4375 46.875 9.4375H18.75C16.1133 9.4375 14.0625 7.38672 14.0625 4.75C14.0625 2.25977 16.1133 0.0625 18.75 0.0625H46.875C49.3652 0.0625 51.5625 2.25977 51.5625 4.75ZM65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5ZM0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61ZM51.5625 42.25C51.5625 44.8867 49.3652 46.9375 46.875 46.9375H18.75C16.1133 46.9375 14.0625 44.8867 14.0625 42.25C14.0625 39.7598 16.1133 37.5625 18.75 37.5625H46.875C49.3652 37.5625 51.5625 39.7598 51.5625 42.25Z`,fill:`currentColor`})}),v4=()=>(0,N.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 66 66`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M65.625 4.75C65.625 7.38672 63.4277 9.4375 60.9375 9.4375H4.6875C2.05078 9.4375 0 7.38672 0 4.75C0 2.25977 2.05078 0.0625 4.6875 0.0625H60.9375C63.4277 0.0625 65.625 2.25977 65.625 4.75ZM65.625 42.25C65.625 44.8867 63.4277 46.9375 60.9375 46.9375H4.6875C2.05078 46.9375 0 44.8867 0 42.25C0 39.7598 2.05078 37.5625 4.6875 37.5625H60.9375C63.4277 37.5625 65.625 39.7598 65.625 42.25ZM0 23.5C0 21.0098 2.05078 18.8125 4.6875 18.8125H60.9375C63.4277 18.8125 65.625 21.0098 65.625 23.5C65.625 26.1367 63.4277 28.1875 60.9375 28.1875H4.6875C2.05078 28.1875 0 26.1367 0 23.5ZM65.625 61C65.625 63.6367 63.4277 65.6875 60.9375 65.6875H4.6875C2.05078 65.6875 0 63.6367 0 61C0 58.5098 2.05078 56.3125 4.6875 56.3125H60.9375C63.4277 56.3125 65.625 58.5098 65.625 61Z`,fill:`currentColor`})}),y4=({editor:e,onChange:t})=>{let[n,r]=(0,S.useState)(!1),i;switch(!0){case e.isActive({textAlign:`right`}):i=(0,N.jsx)(g4,{});break;case e.isActive({textAlign:`center`}):i=(0,N.jsx)(_4,{});break;case e.isActive({textAlign:`justify`}):i=(0,N.jsx)(v4,{});break;default:i=(0,N.jsx)(h4,{});break}let a=t=>{let n=t.currentTarget?.getAttribute(`value`);n&&e.commands.setTextAlign(n),r(!1)};return(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!n)},children:[i,(0,N.jsx)(`span`,{style:{marginLeft:`5px`,fontSize:`8px`},"aria-hidden":`true`,children:`▼`})]}),(0,N.jsx)(vW,{in:n,timeout:`auto`,unmountOnExit:!0,style:{position:`absolute`},children:(0,N.jsxs)(KG,{component:`div`,disablePadding:!0,style:{background:`#fff`,display:`flex`,flexDirection:`row`,padding:0},children:[(0,N.jsx)(l2,{button:!0,type:`submit`,value:`left`,"aria-label":`Align text left`,onClick:a,children:(0,N.jsx)(h4,{})}),(0,N.jsx)(l2,{button:!0,type:`submit`,value:`center`,"aria-label":`Align text center`,onClick:a,children:(0,N.jsx)(_4,{})}),(0,N.jsx)(l2,{button:!0,type:`submit`,value:`right`,"aria-label":`Align text right`,onClick:a,children:(0,N.jsx)(g4,{})}),(0,N.jsx)(l2,{button:!0,type:`submit`,value:`justify`,"aria-label":`Justify text`,onClick:a,children:(0,N.jsx)(v4,{})})]})})]})},b4=F(`div`)(({theme:e})=>({fontFamily:`Cerebri Sans, Arial, sans-serif`,fontSize:e.typography.fontSize,fontWeight:`bold`,lineHeight:`14px`,position:`relative`,whiteSpace:`nowrap`})),x4=()=>(0,N.jsx)(b4,{children:`CSS`}),S4=F(`path`)({fill:`grey`,"&:hover":{fill:`black`}}),C4=e=>t=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,version:`1.1`,width:`24`,height:`24`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(e,{...t})}),w4=C4(e=>(0,N.jsx)(S4,{...e,d:`M22,10A2,2 0 0,1 20,12H4A2,2 0 0,1 2,10V3H4V5H8V3H10V5H14V3H16V5H20V3H22V10M4,10H8V7H4V10M10,10H14V7H10V10M20,10V7H16V10H20M11,14H13V17H16V19H13V22H11V19H8V17H11V14Z`})),T4=C4(e=>(0,N.jsx)(S4,{...e,d:`M9.41,13L12,15.59L14.59,13L16,14.41L13.41,17L16,19.59L14.59,21L12,18.41L9.41,21L8,19.59L10.59,17L8,14.41L9.41,13M22,9A2,2 0 0,1 20,11H4A2,2 0 0,1 2,9V6A2,2 0 0,1 4,4H20A2,2 0 0,1 22,6V9M4,9H8V6H4V9M10,9H14V6H10V9M16,9H20V6H16V9Z`})),E4=C4(e=>(0,N.jsx)(S4,{...e,d:`M11,2A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H2V2H11M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M15,11H18V8H20V11H23V13H20V16H18V13H15V11Z`})),D4=C4(e=>(0,N.jsx)(S4,{...e,d:`M4,2H11A2,2 0 0,1 13,4V20A2,2 0 0,1 11,22H4A2,2 0 0,1 2,20V4A2,2 0 0,1 4,2M4,10V14H11V10H4M4,16V20H11V16H4M4,4V8H11V4H4M17.59,12L15,9.41L16.41,8L19,10.59L21.59,8L23,9.41L20.41,12L23,14.59L21.59,16L19,13.41L16.41,16L15,14.59L17.59,12Z`})),O4=C4(e=>(0,N.jsx)(S4,{...e,d:`M15.46,15.88L16.88,14.46L19,16.59L21.12,14.46L22.54,15.88L20.41,18L22.54,20.12L21.12,21.54L19,19.41L16.88,21.54L15.46,20.12L17.59,18L15.46,15.88M4,3H18A2,2 0 0,1 20,5V12.08C18.45,11.82 16.92,12.18 15.68,13H12V17H13.08C12.97,17.68 12.97,18.35 13.08,19H4A2,2 0 0,1 2,17V5A2,2 0 0,1 4,3M4,7V11H10V7H4M12,7V11H18V7H12M4,13V17H10V13H4Z`})),k4=`bottom`,A4=`right`,j4=`left`,M4=`auto`,N4=[`top`,k4,A4,j4],P4=`start`,F4=`clippingParents`,I4=`viewport`,L4=`popper`,R4=`reference`,z4=N4.reduce(function(e,t){return e.concat([t+`-`+P4,t+`-end`])},[]),B4=[].concat(N4,[M4]).reduce(function(e,t){return e.concat([t,t+`-`+P4,t+`-end`])},[]),V4=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function H4(e){return e?(e.nodeName||``).toLowerCase():null}function U4(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function W4(e){return e instanceof U4(e).Element||e instanceof Element}function G4(e){return e instanceof U4(e).HTMLElement||e instanceof HTMLElement}function K4(e){return typeof ShadowRoot>`u`?!1:e instanceof U4(e).ShadowRoot||e instanceof ShadowRoot}function q4(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!G4(i)||!H4(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function J4(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!G4(r)||!H4(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var Y4={name:`applyStyles`,enabled:!0,phase:`write`,fn:q4,effect:J4,requires:[`computeStyles`]};function X4(e){return e.split(`-`)[0]}var Z4=Math.max,Q4=Math.min,$4=Math.round;function e3(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function t3(){return!/^((?!chrome|android).)*safari/i.test(e3())}function n3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&G4(e)&&(i=e.offsetWidth>0&&$4(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$4(r.height)/e.offsetHeight||1);var o=(W4(e)?U4(e):window).visualViewport,s=!t3()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function r3(e){var t=n3(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function i3(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&K4(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function a3(e){return U4(e).getComputedStyle(e)}function o3(e){return[`table`,`td`,`th`].indexOf(H4(e))>=0}function s3(e){return((W4(e)?e.ownerDocument:e.document)||window.document).documentElement}function c3(e){return H4(e)===`html`?e:e.assignedSlot||e.parentNode||(K4(e)?e.host:null)||s3(e)}function l3(e){return!G4(e)||a3(e).position===`fixed`?null:e.offsetParent}function u3(e){var t=/firefox/i.test(e3());if(/Trident/i.test(e3())&&G4(e)&&a3(e).position===`fixed`)return null;var n=c3(e);for(K4(n)&&(n=n.host);G4(n)&&[`html`,`body`].indexOf(H4(n))<0;){var r=a3(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function d3(e){for(var t=U4(e),n=l3(e);n&&o3(n)&&a3(n).position===`static`;)n=l3(n);return n&&(H4(n)===`html`||H4(n)===`body`&&a3(n).position===`static`)?t:n||u3(e)||t}function f3(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function p3(e,t,n){return Z4(e,Q4(t,n))}function m3(e,t,n){var r=p3(e,t,n);return r>n?n:r}function h3(){return{top:0,right:0,bottom:0,left:0}}function g3(e){return Object.assign({},h3(),e)}function _3(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var v3=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,g3(typeof e==`number`?_3(e,N4):e)};function y3(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=X4(n.placement),c=f3(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=v3(i.padding,n),d=r3(a),f=c===`y`?`top`:j4,p=c===`y`?k4:A4,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=d3(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=p3(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function b3(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||i3(t.elements.popper,r)&&(t.elements.arrow=r))}var x3={name:`arrow`,enabled:!0,phase:`main`,fn:y3,effect:b3,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function S3(e){return e.split(`-`)[1]}var C3={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function w3(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:$4(n*i)/i||0,y:$4(r*i)/i||0}}function T3(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=j4,b=`top`,x=window;if(l){var S=d3(n),C=`clientHeight`,w=`clientWidth`;if(S===U4(n)&&(S=s3(n),a3(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=k4;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=A4;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var ee=Object.assign({position:s},l&&C3),D=u===!0?w3({x:p,y:h},U4(n)):{x:p,y:h};if(p=D.x,h=D.y,c){var O;return Object.assign({},ee,(O={},O[b]=v?`0`:``,O[y]=_?`0`:``,O.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,O))}return Object.assign({},ee,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function E3(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:X4(t.placement),variation:S3(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,T3(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,T3(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var D3={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:E3,data:{}},O3={passive:!0};function k3(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=U4(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,O3)}),s&&c.addEventListener(`resize`,n.update,O3),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,O3)}),s&&c.removeEventListener(`resize`,n.update,O3)}}var A3={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:k3,data:{}},j3={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function M3(e){return e.replace(/left|right|bottom|top/g,function(e){return j3[e]})}var N3={start:`end`,end:`start`};function P3(e){return e.replace(/start|end/g,function(e){return N3[e]})}function F3(e){var t=U4(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function I3(e){return n3(s3(e)).left+F3(e).scrollLeft}function L3(e,t){var n=U4(e),r=s3(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=t3();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+I3(e),y:c}}function R3(e){var t=s3(e),n=F3(e),r=e.ownerDocument?.body,i=Z4(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Z4(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+I3(e),s=-n.scrollTop;return a3(r||t).direction===`rtl`&&(o+=Z4(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function z3(e){var t=a3(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function B3(e){return[`html`,`body`,`#document`].indexOf(H4(e))>=0?e.ownerDocument.body:G4(e)&&z3(e)?e:B3(c3(e))}function V3(e,t){t===void 0&&(t=[]);var n=B3(e),r=n===e.ownerDocument?.body,i=U4(n),a=r?[i].concat(i.visualViewport||[],z3(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(V3(c3(a)))}function H3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function U3(e,t){var n=n3(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function W3(e,t,n){return t===`viewport`?H3(L3(e,n)):W4(t)?U3(t,n):H3(R3(s3(e)))}function G3(e){var t=V3(c3(e)),n=[`absolute`,`fixed`].indexOf(a3(e).position)>=0&&G4(e)?d3(e):e;return W4(n)?t.filter(function(e){return W4(e)&&i3(e,n)&&H4(e)!==`body`}):[]}function K3(e,t,n,r){var i=t===`clippingParents`?G3(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=W3(e,n,r);return t.top=Z4(i.top,t.top),t.right=Q4(i.right,t.right),t.bottom=Q4(i.bottom,t.bottom),t.left=Z4(i.left,t.left),t},W3(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function q3(e){var t=e.reference,n=e.element,r=e.placement,i=r?X4(r):null,a=r?S3(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case k4:c={x:o,y:t.y+t.height};break;case A4:c={x:t.x+t.width,y:s};break;case j4:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?f3(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case P4:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2);break;default:}}return c}function J3(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?F4:s,l=n.rootBoundary,u=l===void 0?I4:l,d=n.elementContext,f=d===void 0?L4:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=g3(typeof g==`number`?_3(g,N4):g),v=f===`popper`?R4:L4,y=e.rects.popper,b=e.elements[m?v:f],x=K3(W4(b)?b:b.contextElement||s3(e.elements.popper),c,u,o),S=n3(e.elements.reference),C=q3({reference:S,element:y,strategy:`absolute`,placement:i}),w=H3(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},ee=e.modifiersData.offset;if(f===`popper`&&ee){var D=ee[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=D[n]*t})}return E}function Y3(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?B4:c,u=S3(r),d=u?s?z4:z4.filter(function(e){return S3(e)===u}):N4,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=J3(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[X4(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function X3(e){if(X4(e)===`auto`)return[];var t=M3(e);return[P3(e),t,P3(t)]}function Z3(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=X4(g)===g,v=c||(_||!m?[M3(g)]:X3(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(X4(n)===`auto`?Y3(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T<y.length;T++){var E=y[T],ee=X4(E),D=S3(E)===P4,O=[`top`,k4].indexOf(ee)>=0,te=O?`width`:`height`,k=J3(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=O?D?A4:j4:D?k4:`top`;b[te]>x[te]&&(A=M3(A));var j=M3(A),M=[];if(a&&M.push(k[ee]<=0),s&&M.push(k[A]<=0,k[j]<=0),M.every(function(e){return e})){w=E,C=!1;break}S.set(E,M)}if(C)for(var ne=m?3:1,re=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},ie=ne;ie>0&&re(ie)!==`break`;ie--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var Q3={name:`flip`,enabled:!0,phase:`main`,fn:Z3,requiresIfExists:[`offset`],data:{_skip:!1}};function $3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function e6(e){return[`top`,A4,k4,j4].some(function(t){return e[t]>=0})}function t6(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=J3(t,{elementContext:`reference`}),s=J3(t,{altBoundary:!0}),c=$3(o,r),l=$3(s,i,a),u=e6(c),d=e6(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var n6={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:t6};function r6(e,t,n){var r=X4(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function i6(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=B4.reduce(function(e,n){return e[n]=r6(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var a6={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:i6};function o6(e){var t=e.state,n=e.name;t.modifiersData[n]=q3({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var s6={name:`popperOffsets`,enabled:!0,phase:`read`,fn:o6,data:{}};function c6(e){return e===`x`?`y`:`x`}function l6(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=J3(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=X4(t.placement),v=S3(t.placement),y=!v,b=f3(_),x=c6(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,D={x:0,y:0};if(S){if(a){var O=b===`y`?`top`:j4,te=b===`y`?k4:A4,k=b===`y`?`height`:`width`,A=S[b],j=A+g[O],M=A-g[te],ne=p?-w[k]/2:0,re=v===`start`?C[k]:w[k],ie=v===`start`?-w[k]:-C[k],ae=t.elements.arrow,oe=p&&ae?r3(ae):{width:0,height:0},se=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:h3(),ce=se[O],le=se[te],ue=p3(0,C[k],oe[k]),de=y?C[k]/2-ne-ue-ce-E.mainAxis:re-ue-ce-E.mainAxis,fe=y?-C[k]/2+ne+ue+le+E.mainAxis:ie+ue+le+E.mainAxis,pe=t.elements.arrow&&d3(t.elements.arrow),me=pe?b===`y`?pe.clientTop||0:pe.clientLeft||0:0,he=ee?.[b]??0,ge=A+de-he-me,_e=A+fe-he,ve=p3(p?Q4(j,ge):j,A,p?Z4(M,_e):M);S[b]=ve,D[b]=ve-A}if(s){var ye=b===`x`?`top`:j4,be=b===`x`?k4:A4,xe=S[x],Se=x===`y`?`height`:`width`,Ce=xe+g[ye],we=xe-g[be],Te=[`top`,j4].indexOf(_)!==-1,Ee=ee?.[x]??0,De=Te?Ce:xe-C[Se]-w[Se]-Ee+E.altAxis,Oe=Te?xe+C[Se]+w[Se]-Ee-E.altAxis:we,ke=p&&Te?m3(De,xe,Oe):p3(p?De:Ce,xe,p?Oe:we);S[x]=ke,D[x]=ke-xe}t.modifiersData[r]=D}}var u6={name:`preventOverflow`,enabled:!0,phase:`main`,fn:l6,requiresIfExists:[`offset`]};function d6(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function f6(e){return e===U4(e)||!G4(e)?F3(e):d6(e)}function p6(e){var t=e.getBoundingClientRect(),n=$4(t.width)/e.offsetWidth||1,r=$4(t.height)/e.offsetHeight||1;return n!==1||r!==1}function m6(e,t,n){n===void 0&&(n=!1);var r=G4(t),i=G4(t)&&p6(t),a=s3(t),o=n3(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((H4(t)!==`body`||z3(a))&&(s=f6(t)),G4(t)?(c=n3(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=I3(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function h6(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function g6(e){var t=h6(e);return V4.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function _6(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function v6(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var y6={placement:`bottom`,modifiers:[],strategy:`absolute`};function b6(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function x6(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?y6:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},y6,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:W4(e)?V3(e):e.contextElement?V3(e.contextElement):[],popper:V3(t)};var s=g6(v6([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(b6(t,n)){i.rects={reference:m6(t,d3(n),i.options.strategy===`fixed`),popper:r3(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:_6(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!b6(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var S6=x6({defaultModifiers:[A3,s6,D3,Y4,a6,Q3,u6,x3,n6]});function C6(e){return Br(`MuiPopper`,e)}Vr(`MuiPopper`,[`root`]);function w6(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function T6(e){return typeof e==`function`?e():e}function E6(e){return e.nodeType!==void 0}var D6=e=>{let{classes:t}=e;return _({root:[`root`]},C6,t)},O6={},k6=S.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=S.useRef(null),_=oR(g,t),v=S.useRef(null),y=oR(v,u),b=S.useRef(y);ti(()=>{b.current=y},[y]),S.useImperativeHandle(u,()=>v.current,[]);let x=w6(c,i),[C,w]=S.useState(x),[T,E]=S.useState(T6(n));S.useEffect(()=>{v.current&&v.current.forceUpdate()}),S.useEffect(()=>{n&&E(T6(n))},[n]),ti(()=>{if(!T||!s)return;let e=e=>{w(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=S6(T,g.current,{placement:x,...l,modifiers:t});b.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();b.current(null)}},[T,a,o,s,l,x]);let ee={placement:C};p!==null&&(ee.TransitionProps=p);let D=D6(e),O=f.root??`div`;return(0,N.jsx)(O,{...VG({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root}),children:typeof r==`function`?r(ee):r})}),A6=F(S.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=O6,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=S.useState(!0),b=()=>{y(!1)},x=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let C;if(i)C=i;else if(n){let e=T6(n);C=e&&E6(e)?YL(e).body:YL(null).body}let w=!l&&s&&(!m||v)?`none`:void 0,T=m?{in:l,onEnter:b,onExited:x}:void 0;return(0,N.jsx)(lH,{disablePortal:o,container:C,children:(0,N.jsx)(k6,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:w,...p},TransitionProps:T,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),j6=F(S.forwardRef(function(e,t){let n=Di(),{anchorEl:r,component:i,components:a,componentsProps:o,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,slots:g,slotProps:_,...v}=I({props:e,name:`MuiPopper`}),y=g?.root??a?.Root,b={anchorEl:r,container:s,disablePortal:c,keepMounted:l,modifiers:u,open:d,placement:f,popperOptions:p,popperRef:m,transition:h,...v};return(0,N.jsx)(A6,{as:i,direction:n?`rtl`:`ltr`,slots:{root:y},slotProps:_??o,...b,ref:t})}))({background:`#fff`,padding:`10px`,pointerEvents:`none`,zIndex:99999}),M6=F(Lo)({fontSize:50,textAlign:`center`}),N6=({children:e,...t})=>(0,N.jsx)(j6,{id:`mouse-over-popover`,open:!0,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},disableRestoreFocus:!0,disableAutoFocus:!0,...t,children:(0,N.jsx)(M6,{children:e})}),P6=({letter:e})=>(0,N.jsx)(`div`,{style:{fontSize:`24px`,lineHeight:`24px`},children:e});P6.propTypes={letter:p.string};function F6({editor:e,opts:t,onClose:n}){if(!t?.characters?.length)return null;let r=(0,S.useRef)(null),i=(0,S.useRef)(n),[a,o]=(0,S.useState)({top:0,left:0}),[s,c]=(0,S.useState)(null);i.current=n;let l=(0,S.useMemo)(()=>{if(!t)return p4;switch(!0){case t.language===`spanish`:return p4;case t.language===`special`:return m4;default:return t}},[t]),u=(0,S.useMemo)(()=>l.characters.reduce((e,t)=>(t.length>=e.columns&&(e.columns=t.length),e),{rows:l.characters.length,columns:0}),[l]),d=()=>c(null);(0,S.useEffect)(()=>()=>{d()},[]),(0,S.useEffect)(()=>{if(!e)return;let t=e.options.element,n=e.view.dom,a=()=>{if(!r.current)return;let n=t.getBoundingClientRect(),{from:i}=e.state.selection,a=e.view.coordsAtPos(i),s=r.current.offsetHeight,c=r.current.offsetWidth,l=window.innerHeight-(n.bottom+60)>=s||n.top<s+80?n.bottom+60:n.top-s-20,u=a.left;l=Math.max(8,Math.min(l,window.innerHeight-s-8)),u=Math.max(8,Math.min(u,window.innerWidth-c-8)),o({top:l,left:u})};a();let s=null,c=()=>{s===null&&(s=requestAnimationFrame(()=>{s=null,a()}))};window.addEventListener(`scroll`,c,!0),window.addEventListener(`resize`,c);let l=e=>{r.current&&!r.current.contains(e.target)&&!n.contains(e.target)&&i.current()},u=setTimeout(()=>{document.addEventListener(`click`,l)});return()=>{clearTimeout(u),s!==null&&cancelAnimationFrame(s),window.removeEventListener(`scroll`,c,!0),window.removeEventListener(`resize`,c),document.removeEventListener(`click`,l)}},[e]);let f=(e,t)=>c({anchorEl:e.currentTarget,el:t});return(0,N.jsxs)(N.Fragment,{children:[zx.createPortal((0,N.jsx)(`div`,{ref:r,className:`insert-character-dialog`,"data-toolbar-for":e.instanceId,style:{visibility:a.top===0&&a.left===0?`hidden`:`initial`,position:`fixed`,top:`${a.top}px`,left:`${a.left}px`,maxWidth:`500px`,zIndex:1e3},children:(0,N.jsx)(`div`,{children:(0,N.jsx)(O$,{keyPadCharacterRef:t.keyPadCharacterRef,setKeypadInteraction:t.setKeypadInteraction,autoFocus:!0,noDecimal:!0,hideInput:!0,noLatexHandling:!0,hideDoneButtonBackground:!0,layoutForKeyPad:u,additionalKeys:l.characters.reduce((e,t)=>(e=[...e,...t.map(e=>({name:Zo(e,`name`)||e,write:Zo(e,`write`)||e,label:Zo(e,`label`)||e,category:`character`,extraClass:`character`,extraProps:{...e.extraProps||{},style:{...(e.extraProps||{}).style,border:`1px solid #000`}},...l.hasPreview?{actions:{onMouseEnter:t=>f(t,e),onMouseLeave:d}}:{}}))],e),[]),keypadMode:`language`,onChange:t=>{typeof t==`string`&&e.chain().focus().insertContent(t).run()},onDone:n})})}),document.body),s&&zx.createPortal((0,N.jsxs)(N6,{onClose:d,anchorEl:s.anchorEl,children:[(0,N.jsx)(`div`,{children:s.el.label}),(0,N.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.description}),(0,N.jsx)(`div`,{style:{fontSize:20,lineHeight:`20px`},children:s.el.unicode})]}),document.body)]})}F6.propTypes={editor:p.object,opts:p.object,onClose:p.func.isRequired};var I6=()=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z`,fill:`currentColor`})}),L6=()=>(0,N.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:`24px`,viewBox:`0 0 24 24`,width:`24px`,fill:`none`,"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z`,fill:`currentColor`})}),R6=()=>(0,N.jsx)(`svg`,{width:`30`,height:`28`,viewBox:`0 0 30 28`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`20px`,height:`18px`},"aria-hidden":`true`,focusable:`false`,children:(0,N.jsx)(`path`,{d:`M27 4V24H29C29.5 24 30 24.5 30 25V27C30 27.5625 29.5 28 29 28H19C18.4375 28 18 27.5625 18 27V25C18 24.5 18.4375 24 19 24H21V16H9V24H11C11.5 24 12 24.5 12 25V27C12 27.5625 11.5 28 11 28H1C0.4375 28 0 27.5625 0 27V25C0 24.5 0.4375 24 1 24H3V4H1C0.4375 4 0 3.5625 0 3V1C0 0.5 0.4375 0 1 0H11C11.5 0 12 0.5 12 1V3C12 3.5625 11.5 4 11 4H9V12H21V4H19C18.4375 4 18 3.5625 18 3V1C18 0.5 18.4375 0 19 0H29C29.5 0 30 0.5 30 1V3C30 3.5625 29.5 4 29 4H27Z`,fill:`currentColor`})});function z6({editor:e,classes:t,activePlugins:n,toolbarOpts:r,responseAreaProps:i,onChange:a,autoWidthToolbar:o}){let[s,c]=(0,S.useState)(!1),l=r??{},u=Xx({editor:e,selector:e=>{let{selection:t}=e.editor?.state||{},n;if(!e.editor?.commandManager)return{};t instanceof U&&(n=t.node);let r=e.editor?.isActive(`math`)||e.editor?.isActive(`explicit_constructed_response`)||e.editor?.isActive(`imageUploadNode`)||e.editor?.isActive(`drag_in_the_blank`),i=t&&t.empty===!1&&e.editor.isActive(`table`);return{currentNode:n,hideDefaultToolbar:r,hasTextSelectionInTable:i,isFocused:e.editor?.isFocused,toolbarOpened:e.editor?._toolbarOpened??!1,isBold:e.editor.isActive(`bold`)??!1,canBold:e.editor.can().chain().toggleBold().run()??!1,isTable:e.editor.isActive(`table`)??!1,tableHasBorder:e.editor.getAttributes(`table`)?.border===`1`,canTable:e.editor.can().chain().insertTable().run()??!1,isItalic:e.editor.isActive(`italic`)??!1,canItalic:e.editor.can().chain().toggleItalic().run()??!1,isStrike:e.editor.isActive(`strike`)??!1,canStrike:e.editor.can().chain().toggleStrike().run()??!1,isCode:e.editor.isActive(`code`)??!1,canCode:e.editor.can().chain().toggleCode().run()??!1,canClearMarks:e.editor.can().chain().unsetAllMarks().run()??!1,isUnderline:e.editor.isActive(`underline`)??!1,isSubScript:e.editor.isActive(`subscript`)??!1,isSuperScript:e.editor.isActive(`superscript`)??!1,isParagraph:e.editor.isActive(`paragraph`)??!1,isHeading1:e.editor.isActive(`heading`,{level:1})??!1,isHeading2:e.editor.isActive(`heading`,{level:2})??!1,isHeading3:e.editor.isActive(`heading`,{level:3})??!1,isHeadingParagraph:e.editor.isActive(`headingParagraph`)??!1,isHeading4:e.editor.isActive(`heading`,{level:4})??!1,isHeading5:e.editor.isActive(`heading`,{level:5})??!1,isHeading6:e.editor.isActive(`heading`,{level:6})??!1,isBulletList:e.editor.isActive(`bulletList`)??!1,isOrderedList:e.editor.isActive(`orderedList`)??!1,isCodeBlock:e.editor.isActive(`codeBlock`)??!1,isBlockquote:e.editor.isActive(`blockquote`)??!1,canUndo:e.editor.can().chain().undo().run()??!1,canRedo:e.editor.can().chain().redo().run()??!1}}}),d=!!o,f=g(t.toolbar,kz,{[t.toolbarWithNoDone]:!0,[t.toolbarTop]:l.position===`top`,[t.toolbarRight]:l.alignment===`right`,[t.focused]:l.alwaysVisible||u.isFocused&&!u.toolbarOpened&&!u.hideDefaultToolbar,[t.autoWidth]:d,[t.fullWidth]:!d,[t.hidden]:l.isHidden===!0}),p=l.minWidth===void 0?{}:{minWidth:l.minWidth},m=e=>{e.preventDefault()},h=(0,S.useMemo)(()=>[{icon:(0,N.jsx)(e4,{}),label:`Insert table`,onClick:e=>e.chain().focus().insertTable({rows:2,cols:2,withHeaderRow:!1}).run(),hidden:e=>!n?.includes(`table`)||e.isTable,isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(w4,{}),label:`Add table row`,onClick:e=>e.chain().focus().addRowAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(T4,{}),label:`Remove table row`,onClick:e=>e.chain().focus().deleteRow().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(E4,{}),label:`Add table column`,onClick:e=>e.chain().focus().addColumnAfter().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(D4,{}),label:`Remove table column`,onClick:e=>e.chain().focus().deleteColumn().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(O4,{}),label:`Remove table`,onClick:e=>e.chain().focus().deleteTable().run(),hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.isTable,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(u4,{}),label:`Table borders`,toggle:!0,onClick:e=>{let t=e.getAttributes(`table`),n={...t,border:t.border===`0`?`1`:`0`};e.commands.updateAttributes(`table`,n)},hidden:e=>!(e.isTable&&!e.hasTextSelectionInTable),isActive:e=>e.tableHasBorder,isDisabled:e=>!e.canTable},{icon:(0,N.jsx)(X2,{}),label:`Bold`,toggle:!0,onClick:e=>e.chain().focus().toggleBold().run(),hidden:()=>!n?.includes(`bold`),isActive:e=>e.isBold,isDisabled:e=>!e.canBold},{icon:(0,N.jsx)(Z2,{}),label:`Italic`,toggle:!0,onClick:e=>e.chain().focus().toggleItalic().run(),hidden:()=>!n?.includes(`italic`),isActive:e=>e.isItalic,isDisabled:e=>!e.canItalic},{icon:(0,N.jsx)(Q2,{}),label:`Strikethrough`,toggle:!0,onClick:e=>e.chain().focus().toggleStrike().run(),hidden:()=>!n?.includes(`strikethrough`),isActive:e=>e.isStrike,isDisabled:e=>!e.canStrike},{icon:(0,N.jsx)($2,{}),label:`Code`,toggle:!0,onClick:e=>e.chain().focus().toggleCode().run(),hidden:()=>!n?.includes(`code`),isActive:e=>e.isCode,isDisabled:e=>!e.canCode},{icon:(0,N.jsx)(r4,{}),label:`Underline`,toggle:!0,onClick:e=>e.chain().focus().toggleUnderline().run(),hidden:()=>!n?.includes(`underline`),isActive:e=>e.isUnderline},{icon:(0,N.jsx)(L6,{}),label:`Subscript`,toggle:!0,onClick:e=>e.chain().focus().toggleSubscript().run(),hidden:()=>!n?.includes(`subscript`),isActive:e=>e.isSubScript},{icon:(0,N.jsx)(I6,{}),label:`Superscript`,toggle:!0,onClick:e=>e.chain().focus().toggleSuperscript().run(),hidden:()=>!n?.includes(`superscript`),isActive:e=>e.isSuperScript},{icon:(0,N.jsx)(a4,{}),label:`Insert image`,hidden:()=>!n?.includes(`image`),onClick:e=>e.chain().focus().setImageUploadNode().run()},{icon:(0,N.jsx)(c4,{}),label:`Insert video`,hidden:()=>!n?.includes(`video`),onClick:e=>e.chain().focus().insertMedia({type:`video`}).run()},{icon:(0,N.jsx)(l4,{}),label:`Insert audio`,hidden:()=>!n?.includes(`audio`),onClick:e=>e.chain().focus().insertMedia({type:`audio`,tag:`audio`}).run()},{icon:(0,N.jsx)(x4,{}),label:`CSS classes`,hidden:()=>!n?.includes(`css`),onClick:e=>e.commands.openCSSClassDialog()},{icon:(0,N.jsx)(s4,{}),label:`Blockquote`,toggle:!0,hidden:()=>!n?.includes(`blockquote`),onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isBlockquote},{icon:(0,N.jsx)(R6,{}),label:`Heading`,toggle:!0,hidden:()=>!n?.includes(`h3`),onClick:e=>e.chain().focus().toggleHeadingParagraph().run(),isActive:e=>e.isHeadingParagraph},{icon:(0,N.jsx)(i4,{}),label:`Insert math`,hidden:()=>!n?.includes(`math`),onClick:e=>e.chain().focus().insertMath(``).run()},{icon:(0,N.jsx)(P6,{letter:`ñ`}),label:`Spanish characters (ñ)`,hidden:()=>!n?.includes(`languageCharacters`),onClick:()=>c(p4)},{icon:(0,N.jsx)(P6,{letter:`€`}),label:`Special characters (€)`,hidden:()=>n?.filter(e=>e===`languageCharacters`).length!==2,onClick:()=>c(m4)},{icon:(0,N.jsx)(y4,{editor:e}),label:`Text alignment`,hidden:()=>!n?.includes(`text-align`),onClick:()=>{}},{icon:(0,N.jsx)(t4,{}),label:`Bulleted list`,toggle:!0,hidden:()=>!n?.includes(`bulleted-list`),onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isBulletList},{icon:(0,N.jsx)(n4,{}),label:`Numbered list`,toggle:!0,hidden:()=>!n?.includes(`numbered-list`),onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isOrderedList},{icon:(0,N.jsx)(KW,{}),label:`Undo`,hidden:()=>!n?.includes(`undo`),onClick:e=>e.chain().focus().undo().run(),isDisabled:e=>!e.canUndo},{icon:(0,N.jsx)(o4,{}),label:`Redo`,hidden:()=>!n?.includes(`redo`),onClick:e=>e.chain().focus().redo().run(),isDisabled:e=>!e.canRedo}],[n,e]),_=u.hideDefaultToolbar&&u.currentNode?.type?.name===`drag_in_the_blank`;return(0,N.jsxs)(`div`,{className:f,style:{...p},onMouseDown:m,children:[_&&(0,N.jsx)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:(0,N.jsx)(`div`,{className:t.buttonsContainer,children:(0,N.jsx)(`button`,{type:`button`,className:t.button,onClick:t=>{t.preventDefault(),e.chain().focus().deleteSelection().run(),a?.(e.getHTML())},"aria-label":`Delete response area`,title:`Delete response area`,children:(0,N.jsx)(Oz,{})})})}),!u.hideDefaultToolbar&&(0,N.jsxs)(`div`,{className:t.defaultToolbar,tabIndex:`1`,children:[(0,N.jsx)(`div`,{className:t.buttonsContainer,children:h.filter(e=>!e.hidden?.(u)).map((n,r)=>{let i=n.isDisabled?.(u),a=n.isActive?.(u);return(0,N.jsx)(`button`,{type:`button`,disabled:i,"aria-label":n.label,title:n.label,"aria-pressed":n.toggle?!!a:void 0,onClick:t=>{t.preventDefault(),n.onClick(e)},className:g(t.button,{[t.active]:a}),children:n.icon},r)})}),n?.includes(`responseArea`)&&(0,N.jsx)(`button`,{type:`button`,"aria-label":`Insert response area`,title:`Insert response area`,onClick:()=>{e.chain().focus().insertResponseArea(i.type).run()},className:t.button,children:(0,N.jsx)(f4,{})}),l.showDone&&(0,N.jsx)(Nz,{onClick:()=>{a?.(e.getHTML()),e.commands.blur()}})]}),s&&(0,N.jsx)(F6,{editor:e,opts:{...s,renderPopOver:(e,t)=>console.log(`Show popover`,t),closePopOver:()=>console.log(`Close popover`)},onClose:()=>c(!1)})]})}var B6=e=>{xo();let t={defaultToolbar:`defaultToolbar`,buttonsContainer:`buttonsContainer`,button:`toolbarButton`,active:`active`,disabled:`disabled`,isActive:`isActive`,toolbar:`toolbar`,toolbarWithNoDone:`toolbarWithNoDone`,toolbarTop:`toolbarTop`,toolbarRight:`toolbarRight`,fullWidth:`fullWidth`,hidden:`hidden`,autoWidth:`autoWidth`,focused:`focused`,iconRoot:`iconRoot`,label:`label`,shared:`shared`};return(0,N.jsx)(V6,{children:(0,N.jsx)(z6,{...e,classes:t})})},V6=F(`div`)(()=>({height:0,overflow:`visible`,"& .defaultToolbar":{display:`flex`,width:`100%`,justifyContent:`space-between`},"& .buttonsContainer":{alignItems:`center`,display:`flex`,width:`100%`},"& .toolbarButton":{color:`grey`,display:`inline-flex`,padding:`2px`,background:`none`,border:`none`,cursor:`pointer`,"& svg":{width:`24px`,height:`24px`},"&:hover":{color:ZH()},"&:focus":{outline:`2px solid ${zU()}`}},"& .active":{color:ZH()},"& .disabled":{opacity:.7,cursor:`not-allowed`,"& :hover":{color:QH()}},"& .isActive":{background:`var(--purple)`,color:`var(--white)`},"& .toolbar":{position:`relative`,top:`5px`,zIndex:20,cursor:`pointer`,justifyContent:`space-between`,background:`var(--editable-html-toolbar-bg, #efefef)`,minWidth:`280px`,margin:0,padding:`2px`,boxShadow:`0px 1px 5px 0px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 3px 1px -2px rgba(0, 0, 0, 0.12)`,boxSizing:`border-box`,display:`flex`,opacity:0,pointerEvents:`none`},"& .toolbarWithNoDone":{minWidth:`265px`},"& .toolbarTop":{position:`absolute`,top:`-45px`},"& .toolbarRight":{right:0},"& .fullWidth":{width:`100%`},"& .hidden":{visibility:`hidden`},"& .autoWidth":{width:`auto`},"& .focused":{opacity:1,pointerEvents:`auto`},"& .iconRoot":{width:`28px`,height:`28px`,padding:`4px`,verticalAlign:`top`},"& .label":{color:`var(--editable-html-toolbar-check, #00bb00)`},"& .shared":{display:`flex`}})),H6=F(`div`,{shouldForwardProp:e=>![`noBorder`,`error`].includes(e)})(({theme:e,noBorder:t,error:n})=>({position:`relative`,padding:`0px`,border:t?`none`:`1px solid #ccc`,borderRadius:`4px`,cursor:`text`,'& [data-slate-editor="true"]':{wordBreak:`break-word`,overflow:`visible`,maxHeight:`500px`,padding:`5px`},"&:first-child":{marginTop:0},"& ul, & ol":{padding:`0 1rem`,margin:`1.25rem 1rem 1.25rem 0.4rem`},"& ul li p, & ol li p":{marginTop:`0.25em`,marginBottom:`0.25em`},"& h1, & h2, & h3, & h4, & h5, & h6":{lineHeight:1.1,marginTop:`2.5rem`,textWrap:`pretty`},"& h1, & h2":{marginTop:`3.5rem`,marginBottom:`1.5rem`},"& h1":{fontSize:`1.4rem`},"& h2":{fontSize:`1.2rem`},"& h3":{fontSize:`1.1rem`},"& h4, & h5, & h6":{fontSize:`1rem`},"& code":{backgroundColor:`var(--purple-light)`,borderRadius:`0.4rem`,color:`var(--black)`,fontSize:`0.85rem`,padding:`0.25em 0.3em`},"& pre":{background:`var(--black)`,borderRadius:`0.5rem`,color:`var(--white)`,fontFamily:`'JetBrainsMono', monospace`,margin:`1.5rem 0`,padding:`0.75rem 1rem`,"& code":{background:`none`,color:`inherit`,fontSize:`0.8rem`,padding:0}},"& blockquote":{background:`#f9f9f9`,borderLeft:`5px solid #ccc`,margin:`1.5em 10px`,padding:`.5em 10px`},"& p":{margin:`0`},"& table":{tableLayout:`fixed`,width:`100%`,borderCollapse:`collapse`,color:ZH(),backgroundColor:vU()},'& table:not([border="1"]) tr':{borderTop:`1px solid ${AU()}`},"& td, th":{padding:`.6em 1em`,textAlign:`center`},'& table:not([border="1"]) td, th':{border:`1px solid ${AU()}`},...n&&{border:`2px solid ${e.palette.error.main} !important`}})),U6=F(`div`,{shouldForwardProp:e=>![`disableScrollbar`,`highlightShape`].includes(e)})(({theme:e,disableScrollbar:t,highlightShape:n})=>({position:`relative`,padding:`0px`,overflowY:`auto`,color:ZH(),backgroundColor:n?e.palette.action.selected:vU(),...t&&{"&::-webkit-scrollbar":{display:`none`},scrollbarWidth:`none`,"-ms-overflow-style":`none`}})),W6=F(`div`,{shouldForwardProp:e=>e!==`noPadding`})(({noPadding:e})=>({padding:e?0:`10px 8px`}));function G6(e){let[t,n]=(0,S.useState)(null),r=(0,S.useRef)(null),{editor:i,disabled:a,children:o,disableScrollbar:s,activePlugins:c,toolbarOpts:l,responseAreaProps:u,autoFocus:d,minWidth:f,width:p,maxWidth:m,minHeight:h,height:g,maxHeight:_,highlightShape:v,ref:y}=e;(0,S.useEffect)(()=>{i&&r.current&&(i._tiptapContainerEl=r.current)},[i,r.current]),(0,S.useEffect)(()=>{i&&d&&Promise.resolve().then(()=>{i.commands.focus(`end`)})},[i,d]),(0,S.useEffect)(()=>{if(e.adjustWidthForLimit){let t=document.createElement(`p`);t.style.visibility=`hidden`,t.style.position=`absolute`,t.style.whiteSpace=`nowrap`,t.textContent=`W`.repeat(e.charactersLimit);let i=window.getComputedStyle(r.current);[`fontFamily`,`fontSize`,`fontWeight`,`fontStyle`,`letterSpacing`,`wordSpacing`,`textTransform`,`lineHeight`].forEach(e=>{t.style[e]=i[e]}),document.body.appendChild(t),n(`${t.offsetWidth+27}px`),t.remove()}},[e.adjustWidthForLimit,e.charactersLimit]);let b=(0,S.useMemo)(()=>({width:Y2(t||p),minWidth:Y2(f),maxWidth:Y2(m),height:Y2(g),minHeight:Y2(h),maxHeight:Y2(_)}),[t,f,p,m,h,g,_]);return(0,N.jsxs)(H6,{noBorder:l&&l.noBorder,error:l&&l.error,className:e.className,style:{width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth},ref:r,children:[(0,N.jsx)(U6,{disableScrollbar:s,highlightShape:v,children:(0,N.jsx)(W6,{noPadding:l&&l.noPadding,children:o})}),i&&(0,N.jsx)(B6,{editor:i,responseAreaProps:u,toolbarOpts:l,activePlugins:c,onChange:e.onChange,autoWidthToolbar:e.autoWidthToolbar})]})}var K6=m(`@pie-lib:editable-html:plugins`),q6=[`bold`,`html`,`extraCSSRules`,`italic`,`underline`,`strikethrough`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`blockquote`,`h3`,`table`,`video`,`audio`,`responseArea`,`redo`,`undo`,`superscript`,`subscript`],J6={"text-align":`textAlign`,"bulleted-list":`ul_list`,"numbered-list":`ol_list`},Y6=q6.filter(e=>![`responseArea`,`h3`,`blockquote`].includes(e)),X6=(e,t,n)=>{K6(`[buildPlugins] opts: `,n),e||=Y6;let r=(t,n=!0)=>e.includes(t)&&n&&t,i=n.image&&n.image.delete,a=n.math,o=n.responseArea&&n.responseArea.type,s=!Qo(n.extraCSSRules),c=n?.languageCharacters||[];return Jo([r(`table`),r(`bold`),r(`italic`),r(`strikethrough`),r(`underline`),r(`superscript`),r(`subscript`),r(`image`,!!i),r(`video`),r(`audio`),r(`math`,!!a),...c.map(e=>r(`languageCharacters`,e)),r(`text-align`),r(`blockquote`),r(`h3`),r(`bulleted-list`),r(`numbered-list`),r(`undo`),r(`redo`),r(`responseArea`,!!o),r(`css`,!!s),r(`html`,!!n.html)])},Z6={position:`bottom`,alignment:`left`,alwaysVisible:!1,showDone:!0,doneOn:`blur`},Q6={options:{},respAreaToolbar:()=>{},onHandleAreaChange:()=>{}},$6=[`bold`,`italic`,`underline`,`strikethrough`,`code`,`bulleted-list`,`numbered-list`,`image`,`math`,`languageCharacters`,`text-align`,`table`,`video`,`audio`,`responseArea`,`superscript`,`subscript`,`css`,`h3`,`undo`,`redo`],e8={"--white":`#fff`,"--black":`#2e2b29`,"--black-contrast":`#110f0e`,"--gray-1":`rgba(61, 37, 20, .05)`,"--gray-2":`rgba(61, 37, 20, .08)`,"--gray-3":`rgba(61, 37, 20, .12)`,"--gray-4":`rgba(53, 38, 28, .3)`,"--gray-5":`rgba(28, 25, 23, .6)`,"--green":`#22c55e`,"--purple":`#6a00f5`,"--purple-contrast":`#5800cc`,"--purple-light":`rgba(88, 5, 255, .05)`,"--yellow-contrast":`#facc15`,"--yellow":`rgba(250, 204, 21, .4)`,"--yellow-light":`#fffae5`,"--red":`#ff5c33`,"--red-light":`#ffebe5`,"--shadow":`0px 12px 33px 0px rgba(0, 0, 0, .06),
|
|
394
|
+
0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)`},t8=e=>({role:`textbox`,"data-pie-editor":`true`,spellcheck:e?`true`:`false`,autocorrect:e?`on`:`off`,autocapitalize:e?`on`:`off`}),n8=e=>{let{showParagraphs:t,separateParagraphs:n}=e.pluginProps||{},[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(!1),{toolbarOpts:s}=e,c=(0,S.useCallback)(e=>{i(t=>{let n=t.filter(t=>t.pos!==e);return n.length===0&&o(!1),n})},[i]),l={...Z6,...s},u=(0,S.useCallback)(t=>{let n=t.getHTML();e.markup!==n&&e.onChange?.(n),l.doneOn===`blur`&&e.onDone?.(n)},[e.markup,e.onChange,e.onDone,l.doneOn]),d=(0,S.useMemo)(()=>({...Q6,...e.responseAreaProps,onInlineDropdownToolbarClose:u}),[e.responseAreaProps,u]),f=(0,S.useMemo)(()=>{let{customPlugins:t,...n}=e.pluginProps||{};t||=[];let r=(e.activePlugins||$6)?.filter(e=>{let t=J6[e]||e,r=n[t]||{};return!r||!r.disabled});return X6(r,t,{math:{},textAlign:e.textAlign,html:{},extraCSSRules:e.extraCSSRules||{},image:{...e.imageSupport},toolbar:{},table:{},responseArea:{type:d.type},languageCharacters:e.languageCharactersProps,keyPadCharacterRef:{},setKeypadInteraction:{},media:{}})},[e,d.type]),p=[CF.configure({types:[`heading`,`paragraph`,`div`,`headingParagraph`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`td`,`th`],alignments:[`left`,`right`,`center`,`justify`]}),XP,ZP.configure({limit:e.charactersLimit||1e6}),BP.configure({trailingNode:{node:`paragraph`,notAfter:[`paragraph`,`div`]},link:{autolink:!1,linkOnPaste:!1}}),q2,LL,J2,RL,zL,EF.configure({placeholder:e.placeholder,showOnlyWhenEditable:!0,showOnlyCurrent:!1,includeChildren:!0}),NL,_L,IL,FL,SZ.configure(d),CZ.configure(d),TZ.configure(d),EZ.configure(d),wZ.configure(d),P$.configure({toolbarOpts:l,math:e.pluginProps?.math||{}}),SF,xF,TF,K1.configure({toolbarOpts:l,imageHandling:{disableImageAlignmentButtons:e.disableImageAlignmentButtons,onDone:t=>e.onDone?.(t.getHTML()),onDelete:e.imageSupport&&e.imageSupport.delete&&(t=>{let{src:n}=t.attrs;e.imageSupport.delete(n,e=>{c(t.pos)})}),insertImageRequested:e.imageSupport&&((t,n,r)=>{let[o,s]=n,l=n=>{let r;a&&n&&(r=e.onChange),c(s),r?.(t.getHTML())};t._insertingImage=!0,i(e=>[...e,o]),(()=>{let n=r(l),i=Yo(()=>{let e=()=>window.removeEventListener(`focus`,i);if(!t._insertingImage){e();return}c(s),t._insertingImage=!1,e()},500);window.addEventListener(`focus`,i),e.imageSupport.add(n)})()}),maxImageWidth:e.maxImageWidth,maxImageHeight:e.maxImageHeight},limit:3}),Y0.configure({uploadSoundSupport:e.uploadSoundSupport}),f2.configure({extraCSSRules:e.extraCSSRules})],m=e.spellCheck!==!1,h=eS({extensions:p,immediatelyRender:!1,editorProps:{attributes:t8(m),handleKeyDown(t,n){return e.onKeyDown?e.onKeyDown(n):!1}},editable:!e.disabled,content:kF(e.markup),onUpdate:({editor:t,transaction:n})=>{n.isDone&&e.onChange?.(t.getHTML())},onBlur:({editor:e})=>{e._insertingImage||e._toolbarOpened||e.isActive(`inline_dropdown`)||e.isActive(`explicit_constructed_response`)||!e.schema||u(e)}},[e.charactersLimit]);(0,S.useEffect)(()=>{e.editorRef&&e.editorRef(h)},[e.editorRef,h]),(0,S.useEffect)(()=>{h?.setEditable(!e.disabled)},[e.disabled,h]),(0,S.useEffect)(()=>{if(!h)return;let e=h.options?.editorProps,t={...e?.attributes,...t8(m)};e?.attributes?.spellcheck!==t.spellcheck&&h.setOptions({editorProps:{...e,attributes:t}})},[m,h]),(0,S.useEffect)(()=>{if(!h)return;let t=kF(e.markup);t!==h.getHTML()&&h.commands.setContent(t,{emitUpdate:!1})},[e.markup,h]),(0,S.useEffect)(()=>{Object.entries(e8).forEach(([e,t])=>{document.documentElement.style.setProperty(e,t)})},[]);let g=Xx({editor:h,selector:e=>({isFocused:e.editor?.isFocused})}),_=(0,S.useMemo)(()=>{let{minWidth:t,width:n,maxWidth:r,minHeight:i,height:a,maxHeight:o}=e;return{width:Y2(n),minWidth:Y2(t),maxWidth:Y2(r),height:Y2(a),minHeight:Y2(i),maxHeight:Y2(o)}},[e]);return(0,N.jsx)(G6,{...e,activePlugins:f,toolbarOpts:l,editorState:g,editor:h,children:h&&(0,N.jsx)(r8,{style:{minHeight:_.minHeight,height:_.height,maxHeight:_.maxHeight},showParagraph:t&&!t.disabled,separateParagraph:n&&!n.disabled,editor:h})})},r8=F(qx,{shouldForwardProp:e=>![`showParagraph`,`separateParagraph`].includes(e)})(({showParagraph:e,separateParagraph:t})=>({display:`flex`,outline:`none !important`,"& .ProseMirror":{flex:1,padding:`5px`,maxHeight:`500px`,outline:`none !important`,position:`initial`,"& > p, & > div":{margin:`0`},"& p[data-placeholder].is-empty:only-child, & div[data-placeholder].is-empty:only-child":{position:`relative`},"& p[data-placeholder].is-empty:only-child::before, & div[data-placeholder].is-empty:only-child::before":{content:`attr(data-placeholder)`,position:`absolute`,left:0,top:0,color:`#9CA3AF`,pointerEvents:`none`,whiteSpace:`pre-wrap`},...e&&{"& > p:has(+ p)::after, & > div:has(+ div)::after":{display:`block`,content:`"¶"`,fontSize:`1em`,color:`#146EB3`}},...t&&{"& > p:has(+ p)":{marginBottom:`1em`}}}})),i8=n8,a8=(e,t,n)=>{let r=n||[],i=r.reduce((e,t)=>e+t.textContent.length,0),a=!0;if(i>t)return!1;for(e&&=(e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&r.push(e),e.firstChild);e&&a;)a=a8(e,t,r),e=e.nextSibling;return r},o8=(e,t,n)=>{let r=a8(n,t),i=[],a=0;return r.forEach(n=>{let r=a+n.textContent.length;[e,t].forEach(e=>{a<=e&&e<r&&i.push({node:n,offset:e-a})}),a=r}),i},s8=e=>{let{commonAncestorContainer:t,startContainer:n,endContainer:r,startOffset:i,endOffset:a}=e,o=[],s=!1,c=!1,l=``,u=e=>{let{nodeValue:t,childNodes:d}=e;e===n&&e===r?(t&&(l+=t.substring(i,a)),s=c=!0):e===n?(t&&(l+=t.substring(i)),s=!0):e===r?(t&&(l+=t.substring(0,a)),c=!0):e&&e.nodeType===3&&e.parentNode&&!e.parentNode.hasAttribute(`data-ann-id`)&&t&&s&&!c&&(l+=t,o.push(e)),d.forEach(e=>{if(!c)u(e);else return})};return u(t),[o,l]},c8=e=>{let t=document.createElement(`SPAN`);return e.surroundContents(t),t},l8=e=>{if(e.startContainer===e.endContainer)return[c8(e)];let[t]=s8(e),n=document.createRange();n.selectNodeContents(e.startContainer),n.setStart(e.startContainer,e.startOffset);let r=c8(n),i=document.createRange();i.selectNode(e.endContainer),i.setEnd(e.endContainer,e.endOffset);let a=c8(i);return[r,...t.map(e=>{let t=document.createElement(`SPAN`);return e.parentNode.insertBefore(t,e),t.appendChild(e),t}),a]},u8=(e,t)=>{let n=document.createRange();n.setStart(t,0),n.setEnd(e.startContainer,e.startOffset);let[,r]=s8(n),[,i]=s8(e),a=r.length;return{quote:i,start:a,end:a+i.length}},d8=(e,t)=>{(e||[]).forEach(e=>{let t=e.parentNode,n=e.childNodes,r=n.length;if(r>0)for(let i=0;i<r;i++)t.insertBefore(n[0],e);else t.insertBefore(document.createTextNode(e.textContent),e);t.removeChild(e)}),t.normalize()},f8=()=>{document.getSelection?(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange())):window.getSelection?window.getSelection().removeAllRanges?(window.getSelection().removeAllRanges(),window.getSelection().addRange(document.createRange())):window.getSelection().empty&&window.getSelection().empty():document.selection&&document.selection.empty()},p8=e=>e.length>=20||e.search(/\n|\r|\r\n/)!==-1,m8=e=>Array.from(document.querySelectorAll(`[data-id='${e}']`)),h8=e=>document.querySelector(`[data-ann-id='${e}']`),g8=F(GH)(({annotationType:e})=>({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginLeft:`16px`,"&::before":{position:`absolute`,right:`100%`,top:`13px`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderRightColor:TU()},...e===`negative`&&{"&::before":{borderRightColor:`rgb(255, 204, 238) !important`}},...e===`positive`&&{"&::before":{borderRightColor:`rgb(153, 255, 153) !important`}}}})),_8=F(`div`)(({annotationType:e})=>({width:`200px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:NU(),border:`4px solid ${TU()}`,...e===`negative`&&{borderColor:`rgb(255, 204, 238) !important`},...e===`positive`&&{borderColor:`rgb(153, 255, 153) !important`}})),v8=F(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${TU()}`})),y8=F(`div`)(({variant:e,annotationType:t})=>({flexGrow:1,width:`28%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,"&:not(:nth-child(3n))":{borderRight:`1px solid ${TU()}`},"&:hover":{backgroundColor:yU()},...e===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`typeChange`&&t===`negative`&&{"&:hover":{backgroundColor:`rgb(153, 255, 153) !important`}},...e===`typeChange`&&t===`positive`&&{"&:hover":{backgroundColor:`rgb(255, 204, 238) !important`}}})),b8=class extends S.Component{static propTypes={anchorEl:p.object,open:p.bool,offset:p.number,value:p.string,type:p.string,onClose:p.func,onDelete:p.func,onSave:p.func,onTypeChange:p.func};constructor(e){super(e),this.state={value:e.value}}UNSAFE_componentWillReceiveProps(e){let{value:t}=e,{value:n}=this.props;t!==n&&this.setState({value:t})}onValueChange=e=>this.setState({value:e.target.value});handleSave=()=>{let{value:e,onSave:t,onClose:n,onDelete:r}=this.props,{value:i}=this.state;i===``&&r(),e!==i&&t(e,i),this.setState({value:``}),n()};handleTypeChange=()=>{let{onTypeChange:e,onDelete:t}=this.props,{value:n}=this.state;n===``?t():e(n),this.setState({value:``})};render(){let{anchorEl:e,offset:t,onDelete:n,open:r,type:i}=this.props,{value:a}=this.state;return(0,N.jsx)(g8,{anchorEl:e,elevation:2,open:r,onClose:this.handleSave,annotationType:i,style:{marginTop:`${t}px`,transition:`margin-top 2s ease-out`},transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`right`},transformOrigin:{vertical:`top`,horizontal:`left`},children:(0,N.jsxs)(_8,{annotationType:i,children:[(0,N.jsx)(g1,{id:`annotation-editor`,style:{padding:`2px 5px`,width:`95%`},autoFocus:!0,multiline:!0,rows:1,maxRows:4,value:a,onChange:this.onValueChange,InputProps:{disableUnderline:!0}}),(0,N.jsxs)(v8,{children:[(0,N.jsx)(y8,{onClick:n,children:`Delete`}),(0,N.jsx)(y8,{variant:`typeChange`,annotationType:i,onClick:this.handleTypeChange,children:i===`negative`?`Green`:`Pink`}),(0,N.jsx)(y8,{onClick:this.handleSave,children:`Save`})]})]})})}},x8=F(GH)({"& .MuiPaper-root":{overflowX:`unset`,overflowY:`unset`,marginTop:`-16px`,"&::after":{position:`absolute`,left:`calc(50% - 7px)`,border:`solid transparent`,content:`""`,height:0,width:0,pointerEvents:`none`,borderWidth:`7px`,borderTopColor:TU()}}}),S8=F(`div`)(()=>({width:`300px`,overflow:`hidden`,borderRadius:`4px`,backgroundColor:NU(),border:`2px solid ${TU()}`})),C8=F(`div`)({display:`flex`,flexWrap:`wrap`}),w8=F(`div`)(()=>({display:`flex`,flexWrap:`wrap`,borderTop:`2px solid ${TU()}`})),T8=F(`div`)(({variant:e})=>({width:`22%`,textAlign:`center`,padding:`4px`,cursor:`pointer`,borderBottom:`1px solid ${TU()}`,"&:not(:nth-child(4n))":{borderRight:`1px solid ${TU()}`},"&:nth-child(4n)":{flexGrow:1},"&:hover":{backgroundColor:yU()},...e===`positive`&&{backgroundColor:`rgb(153, 255, 153) !important`,"&:hover":{filter:`brightness(85%)`}},...e===`negative`&&{backgroundColor:`rgb(255, 204, 238) !important`,"&:hover":{filter:`brightness(85%)`}}})),E8=class extends S.Component{static propTypes={anchorEl:p.object,open:p.bool,annotations:p.array,isNewAnnotation:p.bool,onClose:p.func,onDelete:p.func,onEdit:p.func,onWrite:p.func,onAnnotate:p.func};render(){let{anchorEl:e,annotations:t,isNewAnnotation:n,onAnnotate:r,onClose:i,onEdit:a,onDelete:o,onWrite:s,open:c}=this.props;return(0,N.jsx)(x8,{anchorEl:e,open:c,onClose:i,elevation:5,transitionDuration:{enter:225,exit:195},anchorOrigin:{vertical:`top`,horizontal:`center`},transformOrigin:{vertical:`bottom`,horizontal:`center`},children:(0,N.jsxs)(S8,{children:[(0,N.jsx)(C8,{children:t.map((e,t)=>(0,N.jsx)(T8,{variant:e.type,onClick:()=>r(e),children:e.label},`annotation-${t}`))}),(0,N.jsxs)(w8,{children:[(0,N.jsx)(T8,{onClick:i,children:`Cancel`}),(0,N.jsx)(T8,{style:{pointerEvents:`none`}}),n?(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(T8,{variant:`positive`,onClick:()=>s(`positive`),children:`Write`}),(0,N.jsx)(T8,{variant:`negative`,onClick:()=>s(`negative`),children:`Write`})]}):(0,N.jsxs)(S.Fragment,{children:[(0,N.jsx)(T8,{onClick:o,children:`Delete`}),(0,N.jsx)(T8,{onClick:a,children:`Edit`})]})]})]})})}};function D8(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function O8(e,t){return!e||D8(e)?e:D8(e.default)?e.default:t&&D8(e[t])?e[t]:t&&D8(e[t]?.default)?e[t].default:e}var k8=O8(EG,`InputContainer`)||O8(M8.InputContainer,`InputContainer`),A8=cK,j8=A8.default,M8=j8&&typeof j8==`object`?j8:A8,N8=F(`div`)({padding:`10px 120px 10px 16px`,backgroundColor:`rgba(0, 0, 0, 0.06)`,border:`1px solid #ccc`,borderRadius:`4px`,overflowY:`scroll`,lineHeight:`36px`,whiteSpace:`pre-wrap`,overflowWrap:`break-word`,"& p":{margin:0},"& span[data-latex]":{userSelect:`none`,"-webkit-user-select":`none`,"-moz-user-select":`none`,"-ms-user-select":`none`}}),P8=F(`div`)({width:`230px`}),F8=F(`div`)({position:`relative`,overflowX:`hidden`,display:`flex`}),I8=F(k8)(({theme:e})=>({paddingTop:e.spacing(2),marginBottom:e.spacing(2),marginTop:e.spacing(2),width:`100%`})),L8=`
|
|
395
395
|
.sideAnnotation:before {
|
|
396
396
|
position: absolute;
|
|
397
397
|
right: var(--before-right, 100%);
|
|
@@ -404,4 +404,4 @@ mid `,`∤`),Z.intercal=Z[`⊺`]=q($,`\\intercal `,`⊺`),Z.veebar=Z[`
|
|
|
404
404
|
border-width: var(--before-border-width, 7px);
|
|
405
405
|
border-right-color: var(--before-border-color, rgb(153, 255, 153));
|
|
406
406
|
}
|
|
407
|
-
`;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=L8,document.head.appendChild(e)}var R8=class extends N.Component{static propTypes={text:p.string,comment:p.string,annotations:p.array,predefinedAnnotations:p.array,onChange:p.func.isRequired,onCommentChange:p.func.isRequired,width:p.number,height:p.number,maxHeight:p.string,disabled:p.bool,disabledMath:p.bool,customKeys:p.array,keypadMode:p.string};constructor(e){super(e),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){let{annotations:e,text:t}=this.props;t&&e.forEach(e=>{let[t,n]=o8(e.start,e.end,this.textRef);if(t&&n){let r=document.createRange();r.setStart(t.node,t.offset),r.setEnd(n.node,n.offset);let i=l8(r);this.createDOMAnnotation(i,e)}}),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener(`scroll`,this.adjustAnnotationsPosition))}adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){let e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach(t=>{let n=m8(t.dataset.annId),r=(n[0].offsetTop?n[0].offsetTop:n[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;t.style.top=`${r}px`,t.style.left=`${e}px`})}};handleClick=e=>{let{annotations:t}=this.props,{selectionDetails:n}=this.state;if(n)return;let{id:r,annId:i}=e.target.dataset,a=r||i,o=m8(a),s=h8(a),c=t.findIndex(e=>e.id===a),l=s.hasAttribute(`data-freeform`);l&&(s.style.zIndex=`10`),this.setState({anchorEl:o[0],openedMenu:!!r||!!i&&!l,openedEditor:!!i&&l,selectedElems:o,labelElem:s,annotationIndex:c,annotation:t[c],selectionDetails:null})};handleHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=m8(r),a=h8(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=`20`,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.7)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.55)`)}),o?(a.style.zIndex=`20`,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(128, 255, 128)`,a.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 179, 230)`,a.style.setProperty(`--before-border-color`,`rgb(255, 179, 230)`))):(a.style.zIndex=`20`,a.classList.contains(`positive`)?a.style.color=`rgb(0, 77, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(153, 0, 102)`))};handleCancelHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=m8(r),a=h8(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=``,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`)}),o?(a.style.zIndex=``,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(153, 255, 153)`,a.style.removeProperty(`--before-border-color`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 204, 238)`,a.style.removeProperty(`--before-border-color`))):(a.style.zIndex=``,a.classList.contains(`positive`)?a.style.color=`rgb(0, 128, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(204, 0, 136)`))};handleClose=e=>{let{selectedElems:t,labelElem:n}=this.state;t.length&&!t[0].hasAttribute(`data-id`)&&d8(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),f8()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){f8();return}if(t&&t.rangeCount>0){let e=t.getRangeAt(0),n=e.toString(),r=this.textRef.contains(e.commonAncestorContainer);if(!t.isCollapsed&&n!==``&&r){let t=u8(e,this.textRef),n=l8(e);this.setState({anchorEl:n[0],openedMenu:!0,selectedElems:n,selectionDetails:t})}}};deleteAnnotation=()=>{let{annotations:e,onChange:t}=this.props,{selectedElems:n,labelElem:r,annotationIndex:i,annotation:a}=this.state;(p8(a.label)?this.labelsRef:n[0]).removeChild(r),d8(n,this.textRef),e.splice(i,1),t(e),this.handleClose()};createDOMAnnotation=(e,t)=>{let{disabled:n}=this.props,{id:r,label:i,type:a}=t;(e||[]).forEach(e=>{e.dataset.id=r,e.className=`annotation ${a}`,e.style.position=`relative`,e.style.cursor=`pointer`,a===`positive`?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:a===`negative`&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`),e.onclick=!n&&this.handleClick,e.onmouseover=this.handleHover,e.onmouseout=this.handleCancelHover});let o=e&&e[0]||{},s=document.createElement(`SPAN`);if(s.dataset.annId=r,s.innerHTML=i,s.onclick=!n&&this.handleClick,s.onmouseover=this.handleHover,s.onmouseout=this.handleCancelHover,p8(i)){let e=(o.offsetTop?o.offsetTop:o.offsetParent.offsetTop)-this.textRef.scrollTop,t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;s.dataset.freeform=!0,s.className=`sideAnnotation ${a}`,s.style.position=`absolute`,s.style.padding=`4px`,s.style.borderRadius=`4px`,s.style.marginLeft=`8px`,s.style.width=`180px`,s.style.whiteSpace=`pre-wrap`,s.style.wordBreak=`break-word`,s.style.border=`2px solid #ffffff`,s.style.fontSize=`14px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.top=`${e}px`,s.style.left=`${t}px`,a===`negative`?s.style.backgroundColor=`rgb(255, 204, 238)`:a===`positive`&&(s.style.backgroundColor=`rgb(153, 255, 153)`),s.style.setProperty(`--before-border-width`,`7px`),s.style.setProperty(`--before-top`,`5px`),s.style.setProperty(`--before-right`,`100%`),a===`negative`?s.style.setProperty(`--before-border-color`,`rgb(255, 204, 238)`):a===`positive`&&s.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`),this.labelsRef.appendChild(s)}else s.className=`annotationLabel ${a}`,s.style.backgroundColor=`rgb(242, 242, 242)`,s.style.padding=`2px`,s.style.position=`absolute`,s.style.userSelect=`none`,s.style.whiteSpace=`nowrap`,s.style.top=`-10px`,s.style.left=`-2px`,s.style.fontSize=`12px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.lineHeight=`6px`,s.style.webkitUserSelect=`none`,s.style.mozUserSelect=`none`,s.style.msUserSelect=`none`,a===`positive`?s.style.color=`rgb(0, 128, 0)`:a===`negative`&&(s.style.color=`rgb(204, 0, 136)`),o.appendChild(s)};createNewAnnotation=(e,t)=>{let{selectedElems:n,selectionDetails:r}=this.state,i={id:[r.start,r.end,new Date().getTime()].join(`-`),label:e,type:t,...r};return this.createDOMAnnotation(n,i),i};handleMenuClick=e=>{let{annotations:t,onChange:n}=this.props,{annotation:r,annotationIndex:i}=this.state,{type:a,text:o}=e;if(r){let e={...r,label:o,type:a},{type:n,label:s}=r;this.updateLabel(s,e,a!==n&&n),t.splice(i,1,e)}else{let e=this.createNewAnnotation(o,a);t.push(e)}n(t),this.handleClose()};editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})};addAnnotation=e=>{let{annotations:t,onChange:n}=this.props,r=this.createNewAnnotation(``,e),i=h8(r.id);t.push(r),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:t.length-1,annotation:r,labelElem:i}),n(t)};updateLabel=(e,t,n)=>{let{selectedElems:r,labelElem:i}=this.state,{label:a,type:o}=t;p8(a)&&p8(e)||!p8(a)&&!p8(e)?(i.innerHTML=a,n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):p8(a)&&!p8(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!p8(a)&&p8(e)&&(this.labelsRef.removeChild(i),this.createDOMAnnotation(r,t))};changeAnnotationType=e=>{let{annotations:t,onChange:n}=this.props,{annotationIndex:r,selectedElems:i}=this.state,{type:a,label:o}=t[r],s=a===`positive`?`negative`:`positive`,c={...t[r],type:s,label:e};i.forEach(e=>{e.classList.remove(a),e.classList.add(s)}),this.updateLabel(o,c,a),t.splice(r,1,c),n(t),this.handleClose()};updateAnnotation=(e,t)=>{let{annotations:n,onChange:r}=this.props,{annotationIndex:i}=this.state,a={...n[i],label:t};this.updateLabel(e,a),n.splice(i,1,a),r(n)};componentWillUnmount(){this.textRef.removeEventListener(`scroll`,this.adjustAnnotationsPosition)}render(){let{comment:e,customKeys:t,disabled:n,disabledMath:r,keypadMode:i,height:a,width:o,maxHeight:s,onCommentChange:c,predefinedAnnotations:l,text:u}=this.props,{anchorEl:d,annotation:f,openedMenu:p,openedEditor:m,selectionDetails:h}=this.state,g=d&&(d.offsetTop?d.offsetTop:d.offsetParent.offsetTop),_=this.textRef&&g?g-this.textRef.scrollTop-8:0;return(0,P.jsxs)(`div`,{children:[(0,P.jsxs)(F8,{children:[(0,P.jsx)(N8,{style:{width:o-34,minHeight:a,maxHeight:s},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:f8,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:u}}),(0,P.jsx)(P8,{ref:e=>this.labelsRef=e})]}),(0,P.jsx)(I8,{label:`Comment`,children:(0,P.jsx)(i8,{className:`prompt`,markup:e||``,onChange:c,width:o&&(o+104).toString(),disabled:n,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,P.jsx)(E8,{anchorEl:d,open:p&&!n,annotations:l,isNewAnnotation:!!h,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,P.jsx)(b8,{anchorEl:this.textRef,open:m&&!n,offset:_,value:f&&f.label||``,type:f&&f.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function z8(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function B8(e,t){return!e||z8(e)?e:z8(e.default)?e.default:t&&z8(e[t])?e[t]:t&&z8(e[t]?.default)?e[t].default:e}var V8=B8(eG,`UiLayout`)||B8(q8.UiLayout,`UiLayout`),H8=B8(jG,`PreviewPrompt`)||B8(q8.PreviewPrompt,`PreviewPrompt`),U8=B8(MW,`Collapsible`)||B8(q8.Collapsible,`Collapsible`),W8=B8(nW,`Feedback`)||B8(q8.Feedback,`Feedback`),G8=cK,K8=G8.default,q8=K8&&typeof K8==`object`?K8:G8,J8=D(`@pie-ui:extended-text-entry`),Y8=I(V8)({backgroundColor:vU(),color:ZH()}),X8=I(Xo)(({theme:e})=>({width:`100%`,color:ZH(),marginBottom:e.spacing(2),fontSize:`inherit`,display:`block`})),Z8=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),Q8=I(i8)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),$8=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),e5=class extends N.Component{static propTypes={onValueChange:p.func.isRequired,onAnnotationsChange:p.func.isRequired,onCommentChange:p.func.isRequired,model:p.object,session:p.shape({value:p.string,annotations:p.array,comment:p.string}).isRequired};changeSessionValue=v(this.props.onValueChange,1500);changeSessionComment=v(this.props.onCommentChange,1500);render(){let{model:e,session:t,onAnnotationsChange:n}=this.props,{animationsDisabled:r,annotatorMode:i,customKeys:a,dimensions:o,disabled:s,disabledAnnotator:c,equationEditor:l,extraCSSRules:u,feedback:d,mathInput:f,playersToolbarPosition:p,predefinedAnnotations:m,prompt:h,spanishInput:g,specialInput:_,spellCheckEnabled:v,teacherInstructions:y}=e,{annotations:b,comment:x,value:S}=t,{width:C,height:w}=o||{},T=`40vh`,E={position:p===`top`?`top`:`bottom`};J8(`[render] disabled? `,s);let D=(0,P.jsx)(H8,{defaultClassName:`teacher-instructions`,prompt:y}),O=[];return g&&O.push({language:`spanish`}),_&&O.push({language:`special`}),(0,P.jsxs)(Y8,{extraCSSRules:u,ref:e=>{this.containerRef=e},children:[(0,P.jsx)($8,{children:`Constructed Response Question`}),y&&(0,P.jsx)(Z8,{children:r?D:(0,P.jsx)(U8,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:D})}),h&&(0,P.jsx)(X8,{component:`span`,children:(0,P.jsx)(H8,{defaultClassName:`prompt`,prompt:e.prompt})}),i?(0,P.jsx)(R8,{text:S||``,annotations:b||[],comment:x||``,predefinedAnnotations:m||[],onChange:n,onCommentChange:this.changeSessionComment,width:C,height:w,maxHeight:T,disabled:c,disabledMath:!f,customKeys:a,keypadMode:l}):(0,P.jsx)(Q8,{className:`response-area-editor`,onChange:this.changeSessionValue,markup:S||``,maxWidth:C&&C.toString(),minWidth:`100px`,minHeight:w&&w.toString(),maxHeight:T,disabled:s,highlightShape:!0,toolbarOpts:E,spellCheck:v,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!f,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0},separateParagraphs:{disabled:!1},ul_list:{disabled:!0},ol_list:{disabled:!0}},languageCharactersProps:O}),d&&(0,P.jsx)(W8,{correctness:`correct`,feedback:d})]})}},t5=o((e=>{var t=cs();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),n5=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},r5=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},i5=t5(),a5=D(`@pie-elements:extended-text-entry`),o5=new DOMParser;function s5(e){if(typeof e==`string`)try{return o5.parseFromString(e,`text/html`).body.textContent}catch{return a5(`tried to parse as dom and failed`,e),e}}function c5(e){let t=s5(e);return t!==void 0&&t.length>0}var l5=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}set model(e){this._model=e,this.dispatchEvent(new n5(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(e){this._session=e,this.render()}get session(){return this._session}valueChange(e){this._session.value=e,this.dispatchEvent(new r5(this.tagName.toLowerCase(),c5(e))),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new r5(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this.dispatchEvent(new r5(this.tagName.toLowerCase(),c5(e))),this.render()}connectedCallback(){this.setAttribute(`aria-label`,`Written Response Question`),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=N.createElement(e5,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this._root||=(0,i5.createRoot)(this),this._root.render(e),queueMicrotask(()=>{OW(this)})}}disconnectedCallback(){this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,l5),l5})();
|
|
407
|
+
`;if(!document.getElementById(`annotation-editor-styles`)){let e=document.createElement(`style`);e.id=`annotation-editor-styles`,e.textContent=L8,document.head.appendChild(e)}var R8=class extends S.Component{static propTypes={text:p.string,comment:p.string,annotations:p.array,predefinedAnnotations:p.array,onChange:p.func.isRequired,onCommentChange:p.func.isRequired,width:p.number,height:p.number,maxHeight:p.string,disabled:p.bool,disabledMath:p.bool,customKeys:p.array,keypadMode:p.string};constructor(e){super(e),this.state={anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotation:null,annotationIndex:null}}componentDidMount(){let{annotations:e,text:t}=this.props;t&&e.forEach(e=>{let[t,n]=o8(e.start,e.end,this.textRef);if(t&&n){let r=document.createRange();r.setStart(t.node,t.offset),r.setEnd(n.node,n.offset);let i=l8(r);this.createDOMAnnotation(i,e)}}),this.textRef&&(this.adjustAnnotationsPosition(),this.textRef.addEventListener(`scroll`,this.adjustAnnotationsPosition))}adjustAnnotationsPosition=()=>{if(this.textRef&&this.labelsRef){let e=this.textRef.offsetLeft+this.textRef.offsetWidth+8;Array.from(this.labelsRef.children).forEach(t=>{let n=m8(t.dataset.annId),r=(n[0].offsetTop?n[0].offsetTop:n[0].offsetParent.offsetTop)-this.textRef.scrollTop-6;t.style.top=`${r}px`,t.style.left=`${e}px`})}};handleClick=e=>{let{annotations:t}=this.props,{selectionDetails:n}=this.state;if(n)return;let{id:r,annId:i}=e.target.dataset,a=r||i,o=m8(a),s=h8(a),c=t.findIndex(e=>e.id===a),l=s.hasAttribute(`data-freeform`);l&&(s.style.zIndex=`10`),this.setState({anchorEl:o[0],openedMenu:!!r||!!i&&!l,openedEditor:!!i&&l,selectedElems:o,labelElem:s,annotationIndex:c,annotation:t[c],selectionDetails:null})};handleHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=m8(r),a=h8(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=`20`,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.7)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.55)`)}),o?(a.style.zIndex=`20`,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(128, 255, 128)`,a.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 179, 230)`,a.style.setProperty(`--before-border-color`,`rgb(255, 179, 230)`))):(a.style.zIndex=`20`,a.classList.contains(`positive`)?a.style.color=`rgb(0, 77, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(153, 0, 102)`))};handleCancelHover=e=>{let{id:t,annId:n}=e.target.dataset,r=t||n,i=m8(r),a=h8(r),o=a.hasAttribute(`data-freeform`);i.forEach(e=>{e.style.zIndex=``,e.classList.contains(`positive`)?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:e.classList.contains(`negative`)&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`)}),o?(a.style.zIndex=``,a.classList.contains(`positive`)?(a.style.backgroundColor=`rgb(153, 255, 153)`,a.style.removeProperty(`--before-border-color`)):a.classList.contains(`negative`)&&(a.style.backgroundColor=`rgb(255, 204, 238)`,a.style.removeProperty(`--before-border-color`))):(a.style.zIndex=``,a.classList.contains(`positive`)?a.style.color=`rgb(0, 128, 0)`:a.classList.contains(`negative`)&&(a.style.color=`rgb(204, 0, 136)`))};handleClose=e=>{let{selectedElems:t,labelElem:n}=this.state;t.length&&!t[0].hasAttribute(`data-id`)&&d8(t,this.textRef),n&&(n.style.zIndex=``),this.setState({anchorEl:null,openedMenu:!1,openedEditor:!1,selectedElems:[],labelElem:null,selectionDetails:null,annotationIndex:null,annotation:null}),f8()};handleSelection=e=>{let t=window.getSelection();if(e.detail>2){f8();return}if(t&&t.rangeCount>0){let e=t.getRangeAt(0),n=e.toString(),r=this.textRef.contains(e.commonAncestorContainer);if(!t.isCollapsed&&n!==``&&r){let t=u8(e,this.textRef),n=l8(e);this.setState({anchorEl:n[0],openedMenu:!0,selectedElems:n,selectionDetails:t})}}};deleteAnnotation=()=>{let{annotations:e,onChange:t}=this.props,{selectedElems:n,labelElem:r,annotationIndex:i,annotation:a}=this.state;(p8(a.label)?this.labelsRef:n[0]).removeChild(r),d8(n,this.textRef),e.splice(i,1),t(e),this.handleClose()};createDOMAnnotation=(e,t)=>{let{disabled:n}=this.props,{id:r,label:i,type:a}=t;(e||[]).forEach(e=>{e.dataset.id=r,e.className=`annotation ${a}`,e.style.position=`relative`,e.style.cursor=`pointer`,a===`positive`?e.style.backgroundColor=`rgb(51, 255, 51, 0.5)`:a===`negative`&&(e.style.backgroundColor=`rgba(255, 102, 204, 0.4)`),e.onclick=!n&&this.handleClick,e.onmouseover=this.handleHover,e.onmouseout=this.handleCancelHover});let o=e&&e[0]||{},s=document.createElement(`SPAN`);if(s.dataset.annId=r,s.innerHTML=i,s.onclick=!n&&this.handleClick,s.onmouseover=this.handleHover,s.onmouseout=this.handleCancelHover,p8(i)){let e=(o.offsetTop?o.offsetTop:o.offsetParent.offsetTop)-this.textRef.scrollTop,t=this.textRef.offsetLeft+this.textRef.offsetWidth+8;s.dataset.freeform=!0,s.className=`sideAnnotation ${a}`,s.style.position=`absolute`,s.style.padding=`4px`,s.style.borderRadius=`4px`,s.style.marginLeft=`8px`,s.style.width=`180px`,s.style.whiteSpace=`pre-wrap`,s.style.wordBreak=`break-word`,s.style.border=`2px solid #ffffff`,s.style.fontSize=`14px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.top=`${e}px`,s.style.left=`${t}px`,a===`negative`?s.style.backgroundColor=`rgb(255, 204, 238)`:a===`positive`&&(s.style.backgroundColor=`rgb(153, 255, 153)`),s.style.setProperty(`--before-border-width`,`7px`),s.style.setProperty(`--before-top`,`5px`),s.style.setProperty(`--before-right`,`100%`),a===`negative`?s.style.setProperty(`--before-border-color`,`rgb(255, 204, 238)`):a===`positive`&&s.style.setProperty(`--before-border-color`,`rgb(153, 255, 153)`),this.labelsRef.appendChild(s)}else s.className=`annotationLabel ${a}`,s.style.backgroundColor=`rgb(242, 242, 242)`,s.style.padding=`2px`,s.style.position=`absolute`,s.style.userSelect=`none`,s.style.whiteSpace=`nowrap`,s.style.top=`-10px`,s.style.left=`-2px`,s.style.fontSize=`12px`,s.style.fontStyle=`normal`,s.style.fontWeight=`normal`,s.style.lineHeight=`6px`,s.style.webkitUserSelect=`none`,s.style.mozUserSelect=`none`,s.style.msUserSelect=`none`,a===`positive`?s.style.color=`rgb(0, 128, 0)`:a===`negative`&&(s.style.color=`rgb(204, 0, 136)`),o.appendChild(s)};createNewAnnotation=(e,t)=>{let{selectedElems:n,selectionDetails:r}=this.state,i={id:[r.start,r.end,new Date().getTime()].join(`-`),label:e,type:t,...r};return this.createDOMAnnotation(n,i),i};handleMenuClick=e=>{let{annotations:t,onChange:n}=this.props,{annotation:r,annotationIndex:i}=this.state,{type:a,text:o}=e;if(r){let e={...r,label:o,type:a},{type:n,label:s}=r;this.updateLabel(s,e,a!==n&&n),t.splice(i,1,e)}else{let e=this.createNewAnnotation(o,a);t.push(e)}n(t),this.handleClose()};editAnnotation=()=>{this.setState({openedMenu:!1,openedEditor:!0})};addAnnotation=e=>{let{annotations:t,onChange:n}=this.props,r=this.createNewAnnotation(``,e),i=h8(r.id);t.push(r),this.setState({openedMenu:!1,openedEditor:!0,annotationIndex:t.length-1,annotation:r,labelElem:i}),n(t)};updateLabel=(e,t,n)=>{let{selectedElems:r,labelElem:i}=this.state,{label:a,type:o}=t;p8(a)&&p8(e)||!p8(a)&&!p8(e)?(i.innerHTML=a,n&&(i.classList.remove(n),i.classList.add(o),r.forEach(e=>{e.classList.remove(n),e.classList.add(o)}))):p8(a)&&!p8(e)?(r[0].removeChild(i),this.createDOMAnnotation(r,t)):!p8(a)&&p8(e)&&(this.labelsRef.removeChild(i),this.createDOMAnnotation(r,t))};changeAnnotationType=e=>{let{annotations:t,onChange:n}=this.props,{annotationIndex:r,selectedElems:i}=this.state,{type:a,label:o}=t[r],s=a===`positive`?`negative`:`positive`,c={...t[r],type:s,label:e};i.forEach(e=>{e.classList.remove(a),e.classList.add(s)}),this.updateLabel(o,c,a),t.splice(r,1,c),n(t),this.handleClose()};updateAnnotation=(e,t)=>{let{annotations:n,onChange:r}=this.props,{annotationIndex:i}=this.state,a={...n[i],label:t};this.updateLabel(e,a),n.splice(i,1,a),r(n)};componentWillUnmount(){this.textRef.removeEventListener(`scroll`,this.adjustAnnotationsPosition)}render(){let{comment:e,customKeys:t,disabled:n,disabledMath:r,keypadMode:i,height:a,width:o,maxHeight:s,onCommentChange:c,predefinedAnnotations:l,text:u}=this.props,{anchorEl:d,annotation:f,openedMenu:p,openedEditor:m,selectionDetails:h}=this.state,g=d&&(d.offsetTop?d.offsetTop:d.offsetParent.offsetTop),_=this.textRef&&g?g-this.textRef.scrollTop-8:0;return(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(F8,{children:[(0,N.jsx)(N8,{style:{width:o-34,minHeight:a,maxHeight:s},ref:e=>this.textRef=e,onMouseDown:n?()=>{}:f8,onMouseUp:n?()=>{}:this.handleSelection,dangerouslySetInnerHTML:{__html:u}}),(0,N.jsx)(P8,{ref:e=>this.labelsRef=e})]}),(0,N.jsx)(I8,{label:`Comment`,children:(0,N.jsx)(i8,{className:`prompt`,markup:e||``,onChange:c,width:o&&(o+104).toString(),disabled:n,pluginProps:{math:{disabled:r,customKeys:t,keypadMode:i,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0}}})}),(0,N.jsx)(E8,{anchorEl:d,open:p&&!n,annotations:l,isNewAnnotation:!!h,onClose:this.handleClose,onDelete:this.deleteAnnotation,onEdit:this.editAnnotation,onWrite:this.addAnnotation,onAnnotate:this.handleMenuClick}),(0,N.jsx)(b8,{anchorEl:this.textRef,open:m&&!n,offset:_,value:f&&f.label||``,type:f&&f.type,onClose:this.handleClose,onDelete:this.deleteAnnotation,onSave:this.updateAnnotation,onTypeChange:this.changeAnnotationType})]})}};function z8(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function B8(e,t){return!e||z8(e)?e:z8(e.default)?e.default:t&&z8(e[t])?e[t]:t&&z8(e[t]?.default)?e[t].default:e}var V8=B8(eG,`UiLayout`)||B8(q8.UiLayout,`UiLayout`),H8=B8(jG,`PreviewPrompt`)||B8(q8.PreviewPrompt,`PreviewPrompt`),U8=B8(MW,`Collapsible`)||B8(q8.Collapsible,`Collapsible`),W8=B8(nW,`Feedback`)||B8(q8.Feedback,`Feedback`),G8=cK,K8=G8.default,q8=K8&&typeof K8==`object`?K8:G8,J8=m(`@pie-ui:extended-text-entry`),Y8=F(V8)({backgroundColor:vU(),color:ZH()}),X8=F(Lo)(({theme:e})=>({width:`100%`,color:ZH(),marginBottom:e.spacing(2),fontSize:`inherit`,display:`block`})),Z8=F(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),Q8=F(i8)(({theme:e})=>({marginBottom:e.spacing(2),borderRadius:`4px`})),$8=F(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),e5=class extends S.Component{static propTypes={onValueChange:p.func.isRequired,onAnnotationsChange:p.func.isRequired,onCommentChange:p.func.isRequired,model:p.object,session:p.shape({value:p.string,annotations:p.array,comment:p.string}).isRequired};render(){let{model:e,session:t,onAnnotationsChange:n,onCommentChange:r,onValueChange:i}=this.props,{animationsDisabled:a,annotatorMode:o,customKeys:s,dimensions:c,disabled:l,disabledAnnotator:u,equationEditor:d,extraCSSRules:f,feedback:p,mathInput:m,playersToolbarPosition:h,predefinedAnnotations:g,prompt:_,spanishInput:v,specialInput:y,spellCheckEnabled:b,teacherInstructions:x}=e,{annotations:S,comment:C,value:w}=t,{width:T,height:E}=c||{},ee=`40vh`,D={position:h===`top`?`top`:`bottom`};J8(`[render] disabled? `,l);let O=(0,N.jsx)(H8,{defaultClassName:`teacher-instructions`,prompt:x}),te=[];return v&&te.push({language:`spanish`}),y&&te.push({language:`special`}),(0,N.jsxs)(Y8,{extraCSSRules:f,ref:e=>{this.containerRef=e},children:[(0,N.jsx)($8,{children:`Constructed Response Question`}),x&&(0,N.jsx)(Z8,{children:a?O:(0,N.jsx)(U8,{labels:{hidden:`Show Teacher Instructions`,visible:`Hide Teacher Instructions`},children:O})}),_&&(0,N.jsx)(X8,{component:`span`,children:(0,N.jsx)(H8,{defaultClassName:`prompt`,prompt:e.prompt})}),o?(0,N.jsx)(R8,{text:w||``,annotations:S||[],comment:C||``,predefinedAnnotations:g||[],onChange:n,onCommentChange:r,width:T,height:E,maxHeight:ee,disabled:u,disabledMath:!m,customKeys:s,keypadMode:d}):(0,N.jsx)(Q8,{className:`response-area-editor`,onChange:i,markup:w||``,maxWidth:T&&T.toString(),minWidth:`100px`,minHeight:E&&E.toString(),maxHeight:ee,disabled:l,highlightShape:!0,toolbarOpts:D,spellCheck:b,charactersLimit:5e4,autoWidthToolbar:!0,pluginProps:{math:{disabled:!m,customKeys:this.props.model.customKeys,keypadMode:this.props.model.equationEditor,controlledKeypadMode:!1},video:{disabled:!0},audio:{disabled:!0},table:{disabled:!0},textAlign:{disabled:!0},h3:{disabled:!0},separateParagraphs:{disabled:!1},ul_list:{disabled:!0},ol_list:{disabled:!0}},languageCharactersProps:te}),p&&(0,N.jsx)(W8,{correctness:`correct`,feedback:p})]})}},t5=o((e=>{var t=cs();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),n5=`commitPendingSession`,r5=new WeakMap;function i5(e,t){let n=r5.get(e);n||(n=new Set,r5.set(e,n)),n.add(t)}function a5(e){return Object.getOwnPropertyDescriptor(e,n5)!==void 0}function o5(e){if(a5(e))return;let t=e[n5];Object.defineProperty(e,n5,{value:()=>{if(typeof t==`function`)try{t.call(e)}catch{}c5(e)},configurable:!0,enumerable:!1,writable:!0})}function s5(e,t,n={}){let r=n.delayMs,i=typeof r==`function`?r:()=>r??0,a=n.maxWaitMs,o=null,s=null,c=!1,l=()=>{o!==null&&(clearTimeout(o),o=null),s!==null&&(clearTimeout(s),s=null)},u=()=>{l(),c&&(c=!1,t())},d={notify(){c=!0,o!==null&&clearTimeout(o),o=setTimeout(u,Math.max(0,i())),a!==void 0&&s===null&&(s=setTimeout(u,Math.max(0,a)))},flush(){if(!c){l();return}try{u()}catch(e){console.warn(`[session-notifier] a committed session-changed dispatch threw`,e)}}};return i5(e,d),o5(e),d}function c5(e){let t=r5.get(e);if(t)for(let e of[...t])e.flush()}var l5=class e extends CustomEvent{static{this.TYPE=`model-set`}constructor(t,n,r){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t,hasModel:r}}),this.component=t,this.complete=n}},u5=class e extends CustomEvent{static{this.TYPE=`session-changed`}constructor(t,n){super(e.TYPE,{bubbles:!0,composed:!0,detail:{complete:n,component:t}}),this.component=t,this.complete=n}},d5=t5(),f5=m(`@pie-elements:extended-text-entry`),p5=1500,m5=new DOMParser;function h5(e){if(typeof e==`string`)try{return m5.parseFromString(e,`text/html`).body.textContent}catch{return f5(`tried to parse as dom and failed`,e),e}}function g5(e){let t=h5(e);return t!==void 0&&t.length>0}var _5=class extends HTMLElement{constructor(){super(),this._model=null,this._session=null,this._root=null,this._valueNotifier=s5(this,()=>{this.dispatchEvent(new u5(this.tagName.toLowerCase(),g5(this._session&&this._session.value)))},{delayMs:p5}),this._commentNotifier=s5(this,()=>{this.dispatchEvent(new u5(this.tagName.toLowerCase(),g5(this._session&&this._session.comment)))},{delayMs:p5})}setLangAttribute(){let e=this._model&&typeof this._model.language?this._model.language:``,t=e?e.slice(0,2):`en`;this.setAttribute(`lang`,t)}set model(e){this._model=e,this.dispatchEvent(new l5(this.tagName.toLowerCase(),!1,!!this._model)),this.render()}set session(e){this._session=e,this.render()}get session(){return this._session}valueChange(e){this._session.value=e,this._valueNotifier.notify(),this.render()}annotationsChange(e){this._session.annotations=e,this.dispatchEvent(new u5(this.tagName.toLowerCase(),!0)),this.render()}commentChange(e){this._session.comment=e,this._commentNotifier.notify(),this.render()}connectedCallback(){this.setAttribute(`aria-label`,`Written Response Question`),this.setAttribute(`role`,`region`),this.render()}render(){if(this._model&&this._session){let e=S.createElement(e5,{model:this._model,session:this._session,onValueChange:this.valueChange.bind(this),onAnnotationsChange:this.annotationsChange.bind(this),onCommentChange:this.commentChange.bind(this)});this.setLangAttribute(),this._root||=(0,d5.createRoot)(this),this._root.render(e),queueMicrotask(()=>{OW(this)})}}disconnectedCallback(){c5(this),this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`extended-text-entry-element`)&&customElements.define(`extended-text-entry-element`,_5),_5})();
|