@pie-element/math-templated 8.0.3 → 8.0.4-next.20261009061152

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.
Files changed (28) hide show
  1. package/dist/browser/author/index.js +3 -3
  2. package/dist/browser/delivery/index.js +1 -1
  3. package/dist/browser/editor-runtime/author/index.js +3 -3
  4. package/dist/browser/editor-runtime/delivery/index.js +1 -1
  5. package/dist/browser/editor-runtime/{horizontal-keypad-Bng7yQkr.js → horizontal-keypad-CSBLtcQO.js} +4061 -4061
  6. package/dist/browser/editor-runtime/{horizontal-keypad-Bng7yQkr.js.map → horizontal-keypad-CSBLtcQO.js.map} +1 -1
  7. package/dist/browser/editor-runtime/{main-D-a8wxSx.js → main-BOGsQ33e.js} +2 -2
  8. package/dist/browser/editor-runtime/{main-D-a8wxSx.js.map → main-BOGsQ33e.js.map} +1 -1
  9. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-DuTZV4jb.js → mathjax-CptWnMbQ-DlzgkqoE.js} +18 -18
  10. package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-DuTZV4jb.js.map → mathjax-CptWnMbQ-DlzgkqoE.js.map} +1 -1
  11. package/dist/browser/editor-runtime/print/index.js +2 -2
  12. package/dist/browser/editor-runtime/{speech-worker-CP5P4gRS-gMyVDYaA.js → speech-worker-CTpOB9m5-BGJy2uAz.js} +37 -34
  13. package/dist/browser/editor-runtime/speech-worker-CTpOB9m5-BGJy2uAz.js.map +1 -0
  14. package/dist/browser/{horizontal-keypad-DYblKSrp.js → horizontal-keypad-BbkFsjM-.js} +4061 -4061
  15. package/dist/browser/{horizontal-keypad-DYblKSrp.js.map → horizontal-keypad-BbkFsjM-.js.map} +1 -1
  16. package/dist/browser/{main-D45ntVy4.js → main-BJ5CZJ9d.js} +2 -2
  17. package/dist/browser/{main-D45ntVy4.js.map → main-BJ5CZJ9d.js.map} +1 -1
  18. package/dist/browser/{mathjax-BKrHE4xs-BZMA-d_s.js → mathjax-CptWnMbQ-DdmHhmSv.js} +18 -18
  19. package/dist/browser/{mathjax-BKrHE4xs-BZMA-d_s.js.map → mathjax-CptWnMbQ-DdmHhmSv.js.map} +1 -1
  20. package/dist/browser/print/index.js +2 -2
  21. package/dist/browser/{speech-worker-CP5P4gRS-gMyVDYaA.js → speech-worker-CTpOB9m5-BGJy2uAz.js} +37 -34
  22. package/dist/browser/speech-worker-CTpOB9m5-BGJy2uAz.js.map +1 -0
  23. package/dist/index.iife.js +22 -22
  24. package/module/print.js +1021 -1018
  25. package/module/print.js.map +1 -1
  26. package/package.json +16 -16
  27. package/dist/browser/editor-runtime/speech-worker-CP5P4gRS-gMyVDYaA.js.map +0 -1
  28. package/dist/browser/speech-worker-CP5P4gRS-gMyVDYaA.js.map +0 -1
@@ -147,56 +147,56 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
147
147
  M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z`,fill:n}),(0,P.jsx)(`polygon`,{points:`-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2`,fill:t})]});ag.propTypes={bgFill:O.string.isRequired,fgFill:O.string.isRequired,borderFill:O.string.isRequired};var og=I(`div`)(({size:e})=>({width:e||`25px`,height:e||`25px`})),sg=({open:e,size:t})=>(0,P.jsx)(og,{size:t,children:e?(0,P.jsx)(ig,{bgFill:`#bce2ff`,fgFill:`#1a9cff`}):(0,P.jsx)(ag,{bgFill:`white`,fgFill:`#1a9cff`,borderFill:`#bce2ff`})});sg.propTypes={open:O.bool,size:O.string},sg.defaultProps={open:!1};var cg=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(0.5, 0.5)`,children:[(0,P.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,P.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})]});cg.propTypes={fill:O.string.isRequired};var lg=({fill:e})=>(0,P.jsxs)(`g`,{transform:`translate(1,0)`,children:[(0,P.jsx)(`rect`,{x:`21`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,P.jsx)(`rect`,{x:`12.7`,y:`12.9`,width:`3.7`,height:`4.7`,fill:e}),(0,P.jsx)(`rect`,{x:`12.2`,y:`22.5`,width:`13`,height:`3.3`,fill:e})]});lg.propTypes={fill:O.string.isRequired};var ug=eg(cg,lg);ug.propTypes={iconSet:O.oneOf([`emoji`,`check`]),shape:O.oneOf([`round`,`square`]),category:O.oneOf([`feedback`,void 0]),open:O.bool,fg:O.string,bg:O.string,size:O.oneOfType([O.string,O.number])},ug.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#fcb733`,bg:`#fbf2e3`,size:30};var dg=({fill:e})=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`rect`,{x:`19.3`,y:`10.3`,width:`4.5`,height:`12.7`,fill:e}),(0,P.jsx)(`rect`,{x:`19.3`,y:`26.2`,width:`4.5`,height:`4.5`,fill:e})]});dg.propTypes={fill:O.string.isRequired};var fg=({fill:e})=>(0,P.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});fg.propTypes={fill:O.string.isRequired};var pg=({fill:e})=>(0,P.jsxs)(`g`,{children:[(0,P.jsx)(`rect`,{x:`23.8`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,P.jsx)(`rect`,{x:`16`,y:`15`,width:`3.5`,height:`4.4`,fill:e}),(0,P.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
148
148
  C25.7,26.4,25,27.1,24.2,27.1z`,fill:e})]});pg.propTypes={fill:O.string.isRequired};var mg=class extends N.Component{constructor(e){super(e);let{fg:t=`#464146`,bg:n=`white`}=this.props;this.icons={check:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(dg,{fill:t})]}),emoji:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(pg,{fill:t})]}),feedback:{check:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(pg,{fill:t})]}),emoji:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(pg,{fill:t})]}),square:{check:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(dg,{fill:t})]}),emoji:(0,P.jsxs)(Jh,{children:[(0,P.jsx)(fg,{fill:n}),(0,P.jsx)(pg,{fill:t})]}),open:{check:(0,P.jsx)(Jh,{children:(0,P.jsx)(dg,{fill:n})}),emoji:(0,P.jsx)(Jh,{children:(0,P.jsx)(pg,{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]}};mg.propTypes={iconSet:O.oneOf([`emoji`,`check`,void 0]),shape:O.oneOf([`square`,void 0]),category:O.oneOf([`feedback`,void 0]),open:O.bool,fg:O.string,bg:O.string},mg.defaultProps={iconSet:`check`,shape:void 0,category:void 0,open:!1,fg:`#464146`,bg:`white`};var hg=({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})]});hg.propTypes={fill:O.string.isRequired};var gg=({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})]});gg.propTypes={fill:O.string.isRequired};var _g=eg(hg,gg);_g.propTypes={iconSet:O.oneOf([`emoji`,`check`]),shape:O.oneOf([`round`,`square`]),category:O.oneOf([`feedback`,void 0]),open:O.bool,fg:O.string,bg:O.string,size:O.oneOfType([O.string,O.number])},_g.defaultProps={iconSet:`check`,shape:`round`,category:void 0,open:!1,fg:`#4aaf46`,bg:`#c1e1ac`,size:30};function vg(e=window){let t=e.document.documentElement.clientWidth;return e.innerWidth-t}function yg(e){let t=El(e);return t.body===e?Hm(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function bg(e,t){t?e.setAttribute(`aria-hidden`,`true`):e.removeAttribute(`aria-hidden`)}function xg(e){return parseFloat(Hm(e).getComputedStyle(e).paddingRight)||0}function Sg(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 Cg(e,t,n,r,i){let a=[t,n,...r];[].forEach.call(e.children,e=>{let t=!a.includes(e),n=!Sg(e);t&&n&&bg(e,i)})}function wg(e,t){let n=-1;return e.some((e,r)=>t(e)?(n=r,!0):!1),n}function Tg(e,t){let n=[],r=e.container;if(!t.disableScrollLock){if(yg(r)){let e=vg(Hm(r));n.push({value:r.style.paddingRight,property:`padding-right`,el:r}),r.style.paddingRight=`${xg(r)+e}px`;let t=El(r).querySelectorAll(`.mui-fixed`);[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:`padding-right`,el:t}),t.style.paddingRight=`${xg(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=El(r).body;else{let t=r.parentElement,n=Hm(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 Eg(e){let t=[];return[].forEach.call(e.children,e=>{e.getAttribute(`aria-hidden`)===`true`&&t.push(e)}),t}var Dg=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&&bg(e.modalRef,!1);let r=Eg(t);Cg(t,e.mount,e.modalRef,r,!0);let i=wg(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=wg(this.containers,t=>t.modals.includes(e)),r=this.containers[n];r.restore||=Tg(r,t)}remove(e,t=!0){let n=this.modals.indexOf(e);if(n===-1)return n;let r=wg(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&&bg(e.modalRef,t),Cg(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&&bg(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Og(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 kg=Og;function Ag(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}var jg=Ag,Mg=`data-mui-focusable`;function Ng(e){return e?e.hasAttribute(`data-mui-focusable`)?e:e.querySelector(`[${Mg}]`):null}var Pg=[`input`,`select`,`textarea`,`a[href]`,`button`,`[tabindex]`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable="false"])`].join(`,`);function Fg(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 Ig(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 Lg(e){return!(e.disabled||e.tagName===`INPUT`&&e.type===`hidden`||Ig(e))}function Rg(e){let t=[],n=[];return Array.from(e.querySelectorAll(Pg)).forEach((e,r)=>{let i=Fg(e);i===-1||!Lg(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 zg(){return!0}function Bg(e){let{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Rg,isEnabled:o=zg,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=bl(Lc(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=jg(El(m.current)),t=Ng(m.current)??m.current;return kg(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=El(m.current),t=t=>{g.current=t,!(r||!o()||t.key!==`Tab`)&&jg(e)===m.current&&t.shiftKey&&(c.current=!0,u.current&&u.current.focus())},n=()=>{let t=m.current;if(t===null)return;let n=jg(e);if(!e.hasFocus()||!o()||c.current){c.current=!1;return}if(kg(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=jg(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`})]})}var Vg={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},Hg={opacity:0,visibility:`hidden`},Ug=N.forwardRef(function(e,t){let n=xc(),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=xl(v,Lc(o),t),b=_l(v,d),x=_l(v,(e,t)=>{gl(e);let r=yl({style:h,timeout:g,easing:s},{mode:`enter`});e.style.transition=n.transitions.create(`opacity`,r),l&&l(e,t)}),S=_l(v,u),C=_l(v,m),w=_l(v,e=>{let t=yl({style:h,timeout:g,easing:s},{mode:`exit`});e.style.transition=n.transitions.create(`opacity`,t),f&&f(e)}),T=_l(v,e=>{e.style.transition=``,p&&p(e)});return(0,P.jsx)(nl,{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=vl(e,c,Vg,Hg,h,o.props.style);return N.cloneElement(o,{style:r,ref:y,...n})}})});function Wg(e){return Ba(`MuiBackdrop`,e)}Va(`MuiBackdrop`,[`root`,`invisible`]);var Gg=e=>{let{classes:t,invisible:n}=e;return ls({root:[`root`,n&&`invisible`]},Wg,t)},Kg=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`}}]}),qg=N.forwardRef(function(e,t){let n=zc({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=Gg(h),_={component:a,slots:{transition:f,root:c.Root,...d},slotProps:{...l,...u}},[v,y]=Gd(`root`,{elementType:Kg,externalForwardedProps:_,className:Ra(g.root,i),ownerState:h}),[b,x]=Gd(`transition`,{elementType:Ug,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 Jg(e){return typeof e==`function`?e():e}function Yg(e){return e?e.props.hasOwnProperty(`in`):!1}var Xg=()=>{},Zg=new Dg;function Qg(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=bl(p,u),[h,g]=N.useState(!l),_=Yg(s),v=!0;(e[`aria-hidden`]===`false`||e[`aria-hidden`]===!1)&&(v=!1);let y=()=>El(f.current),b=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),x=()=>{Zg.mount(b(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},S=Bd(()=>{let e=Jg(t)||y().body;Zg.add(b(),e),p.current&&x()}),C=()=>Zg.isTopModal(b()),w=Bd(e=>{f.current=e,e&&(l&&C()?x():p.current&&bg(p.current,v))}),T=N.useCallback(()=>{Zg.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=Cd(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:Mm(()=>{g(!1),a&&a()},s?.props.onEnter??Xg),onExited:Mm(()=>{g(!0),o&&o(),i&&T()},s?.props.onExited??Xg)}),rootRef:m,portalRef:w,isTopModal:C,exited:h,hasTransition:_}}function $g(e){return Ba(`MuiModal`,e)}Va(`MuiModal`,[`root`,`hidden`,`backdrop`]);var e_=e=>{let{open:t,exited:n,classes:r}=e;return ls({root:[`root`,!t&&n&&`hidden`],backdrop:[`backdrop`]},$g,r)},t_=I(`div`,{name:`MuiModal`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Rc(({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`}}]}))),n_=I(qg,{name:`MuiModal`,slot:`Backdrop`})({zIndex:-1}),r_=N.forwardRef(function(e,t){let n=zc({name:`MuiModal`,props:e}),{BackdropComponent:r=n_,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,ee={...n,closeAfterTransition:s,disableAutoFocus:p,disableEnforceFocus:m,disableEscapeKeyDown:h,disablePortal:g,disableRestoreFocus:_,disableScrollLock:v,hideBackdrop:y,keepMounted:b},{getRootProps:te,getBackdropProps:k,getTransitionProps:A,portalRef:ne,isTopModal:j,exited:re,hasTransition:ie}=Qg({...ee,rootRef:t}),ae={...ee,exited:re},oe=e_(ae),se={};if(c.props.tabIndex===void 0&&(se.tabIndex=`-1`),ie){let{onEnter:e,onExited:t}=A();se.onEnter=e,se.onExited=t}let ce={slots:{root:d.Root,backdrop:d.Backdrop,...E},slotProps:{...f,...T}},[le,ue]=Gd(`root`,{ref:t,elementType:t_,externalForwardedProps:{...ce,...O,component:u},getSlotProps:te,ownerState:ae,className:Ra(o,oe?.root,!ae.open&&ae.exited&&oe?.hidden)}),[de,fe]=Gd(`backdrop`,{ref:i?.ref,elementType:r,externalForwardedProps:ce,shouldForwardComponentProp:!0,additionalProps:i,getSlotProps:e=>k({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:Ra(i?.className,oe?.backdrop),ownerState:ae});return!b&&!w&&(!ie||re)?null:(0,P.jsx)(Ad,{ref:ne,container:l,disablePortal:g,children:(0,P.jsxs)(le,{...ue,children:[!y&&r?(0,P.jsx)(de,{...fe}):null,(0,P.jsx)(Bg,{disableEnforceFocus:m,disableAutoFocus:p,disableRestoreFocus:_,isEnabled:j,open:w,children:N.cloneElement(c,se)})]})})});function i_(e){return Ba(`MuiPaper`,e)}Va(`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 a_=e=>{let{square:t,elevation:n,variant:r,classes:i}=e;return ls({root:[`root`,r,!t&&`rounded`,r===`elevation`&&`elevation${n}`]},i_,i)},o_=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}`]]}})(Rc(({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)`}}]}))),s_=N.forwardRef(function(e,t){let n=zc({props:e,name:`MuiPaper`}),r=xc(),{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=a_(u);return(0,P.jsx)(o_,{as:a,ownerState:u,className:Ra(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(${po(`#fff`,nc(o))}, ${po(`#fff`,nc(o))})`}},...l.style}})});function c_(e){return Ba(`MuiPopover`,e)}Va(`MuiPopover`,[`root`,`paper`]);function l_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.height/2:t===`bottom`&&(n=e.height),n}function u_(e,t){let n=0;return typeof t==`number`?n=t:t===`center`?n=e.width/2:t===`right`&&(n=e.width),n}function d_(e){return[e.horizontal,e.vertical].map(e=>typeof e==`number`?`${e}px`:e).join(` `)}function f_(e){return typeof e==`function`?e():e}var p_=e=>{let{classes:t}=e;return ls({root:[`root`],paper:[`paper`]},c_,t)},m_=I(r_,{name:`MuiPopover`,slot:`Root`})({}),h_=I(s_,{name:`MuiPopover`,slot:`Paper`})({position:`absolute`,overflowY:`auto`,overflowX:`hidden`,minWidth:16,minHeight:16,maxWidth:`calc(100% - 32px)`,maxHeight:`calc(100% - 32px)`,outline:0}),g_=N.forwardRef(function(e,t){let n=zc({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=p_(w),E=N.useCallback(()=>{if(s===`anchorPosition`)return o;let e=f_(i),t=(e&&e.nodeType===1?e:Vm(C.current).body).getBoundingClientRect();return{top:t.top+l_(t,a.vertical),left:t.left+u_(t,a.horizontal)}},[i,a.horizontal,a.vertical,o,s]),D=N.useCallback(e=>({vertical:l_(e,_.vertical),horizontal:u_(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:d_(n)};let r=E(),a=r.top-n.vertical,o=r.left-n.horizontal,c=a+t.height,l=o+t.width,u=Um(f_(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:d_(n)}},[i,s,E,D,f]),[ee,te]=N.useState(p),k=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,te(!0)},[O]);N.useEffect(()=>(x&&window.addEventListener(`scroll`,k),()=>window.removeEventListener(`scroll`,k)),[i,x,k]);let A=()=>{k()},ne=()=>{te(!1)};N.useEffect(()=>{p&&k()}),N.useImperativeHandle(r,()=>p?{updatePosition:()=>{k()}}:null,[p,k]),N.useEffect(()=>{if(!p)return;let e=zm(()=>{k()}),t=Um(f_(i));return t.addEventListener(`resize`,e),()=>{e.clear(),t.removeEventListener(`resize`,e)}},[i,p,k]);let j=y,re={slots:{transition:v,...h},slotProps:{transition:b,paper:m,...g}},[ie,ae]=Gd(`transition`,{elementType:Tl,externalForwardedProps:re,ownerState:w,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),A()},onExited:t=>{e.onExited?.(t),ne()}}),additionalProps:{appear:!0,in:p}});y===`auto`&&!ie.muiSupportAuto&&(j=void 0);let oe=u||(i?Vm(f_(i)).body:void 0),[se,{slots:ce,slotProps:le,...ue}]=Gd(`root`,{ref:t,elementType:m_,externalForwardedProps:{...re,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:Km(typeof g.backdrop==`function`?g.backdrop(w):g.backdrop,{invisible:!0})},container:oe,open:p},ownerState:w,className:Ra(T.root,l)}),[de,fe]=Gd(`paper`,{ref:C,className:T.paper,elementType:h_,externalForwardedProps:re,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:ee?void 0:{opacity:0}},ownerState:w});return(0,P.jsx)(se,{...ue,...!xd(se)&&{slots:ce,slotProps:le,disableScrollLock:x},children:(0,P.jsx)(ie,{...ae,timeout:j,children:(0,P.jsx)(de,{...fe,children:c})})})});function __(e,t){this.v=e,this.k=t}function v_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function y_(e){if(Array.isArray(e))return e}function b_(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function x_(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
149
149
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S_(e,t){return y_(e)||b_(e,t)||C_(e,t)||x_()}function C_(e,t){if(e){if(typeof e==`string`)return v_(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v_(e,t):void 0}}function w_(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof __;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}w_.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},w_.prototype.next=function(e){return this._invoke(`next`,e)},w_.prototype.throw=function(e){return this._invoke(`throw`,e)},w_.prototype.return=function(e){return this._invoke(`return`,e)};var T_=Object.entries,E_=Object.setPrototypeOf,D_=Object.isFrozen,O_=Object.getPrototypeOf,k_=Object.getOwnPropertyDescriptor,A_=Object.freeze,j_=Object.seal,M_=Object.create,N_=typeof Reflect<`u`&&Reflect,P_=N_.apply,F_=N_.construct;A_||=function(e){return e},j_||=function(e){return e},P_||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},F_||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)};var I_=nv(Array.prototype.forEach);Array.prototype.indexOf;var L_=nv(Array.prototype.lastIndexOf),R_=nv(Array.prototype.pop),z_=nv(Array.prototype.push);Array.prototype.slice;var B_=nv(Array.prototype.splice),V_=Array.isArray,H_=nv(String.prototype.toLowerCase),U_=nv(String.prototype.toString),W_=nv(String.prototype.match),G_=nv(String.prototype.replace),K_=nv(String.prototype.indexOf),q_=nv(String.prototype.trim),J_=nv(Number.prototype.toString),Y_=nv(Boolean.prototype.toString),X_=typeof BigInt>`u`?null:nv(BigInt.prototype.toString),Z_=typeof Symbol>`u`?null:nv(Symbol.prototype.toString),Q_=nv(Object.prototype.hasOwnProperty),$_=nv(Object.prototype.toString),ev=nv(RegExp.prototype.test),tv=rv(TypeError);function nv(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return P_(e,t,r)}}function rv(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return F_(e,n)}}function iv(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:H_;if(E_&&E_(e,null),!V_(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(D_(t)||(t[r]=e),i=e)}e[i]=!0}return e}function av(e){for(let t=0;t<e.length;t++)Q_(e,t)||(e[t]=null);return e}function ov(e){let t=M_(null);for(let r of T_(e)){var n=S_(r,2);let i=n[0],a=n[1];Q_(e,i)&&(V_(a)?t[i]=av(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=ov(a):t[i]=a)}return t}function sv(e){switch(typeof e){case`string`:return e;case`number`:return J_(e);case`boolean`:return Y_(e);case`bigint`:return X_?X_(e):`0`;case`symbol`:return Z_?Z_(e):`Symbol()`;case`undefined`:return $_(e);case`function`:case`object`:{if(e===null)return $_(e);let t=e,n=cv(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:$_(e)}return $_(e)}default:return $_(e)}}function cv(e,t){for(;e!==null;){let n=k_(e,t);if(n){if(n.get)return nv(n.get);if(typeof n.value==`function`)return nv(n.value)}e=O_(e)}function n(){return null}return n}function lv(e){try{return ev(e,``),!0}catch{return!1}}var uv=A_(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),dv=A_(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),fv=A_([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),pv=A_([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),mv=A_(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),hv=A_([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),gv=A_([`#text`]),_v=A_(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),vv=A_(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),yv=A_(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),bv=A_([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),xv=j_(/{{[\w\W]*|^[\w\W]*}}/g),Sv=j_(/<%[\w\W]*|^[\w\W]*%>/g),Cv=j_(/\${[\w\W]*/g),wv=j_(/^data-[\-\w.\u00B7-\uFFFF]+$/),Tv=j_(/^aria-[\-\w]+$/),Ev=j_(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dv=j_(/^(?:\w+script|data):/i),Ov=j_(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kv=j_(/^html$/i),Av=j_(/^[a-z][.\w]*(-[.\w]+)+$/i),jv=j_(/<[/\w!]/g),Mv=j_(/<[/\w]/g),Nv=j_(/<\/no(script|embed|frames)/i),Pv=j_(/\/>/i),Fv={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Iv=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Lv=A_(iv({},Iv)),Rv=function(){let e={};return I_(Iv,t=>{e[t]=j_(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),A_(e)}(),zv=function(){return typeof window>`u`?null:window},Bv=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Vv=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Hv=function(e,t,n,r){return Q_(e,t)&&V_(e[t])?iv(r.base?ov(r.base):{},e[t],r.transform):n},Uv=function(e,t,n){let r=Q_(e,t)?e[t]:void 0;return r&&typeof r==`object`?ov(r):n()};function Wv(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:zv(),t=e=>Wv(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==Fv.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=cv(d,`cloneNode`),p=cv(d,`remove`),m=cv(d,`removeAttributeNode`),h=cv(d,`nextSibling`),g=cv(d,`childNodes`),_=cv(d,`parentNode`),v=cv(d,`shadowRoot`),y=cv(d,`attributes`),b=o&&o.prototype?cv(o.prototype,`nodeType`):null,x=o&&o.prototype?cv(o.prototype,`nodeName`):null,S=o&&o.prototype?cv(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,O=!1,ee=0,te=function(){if(ee>0)throw tv(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},k=function(e){te(),ee++;try{return T.createHTML(e)}finally{ee--}},A=function(e){te(),ee++;try{return T.createScriptURL(e)}finally{ee--}},ne=function(){return O||=(D=Bv(u,i),!0),D},j=n,re=j.implementation,ie=j.createNodeIterator,ae=j.createDocumentFragment,oe=j.getElementsByTagName,se=r.importNode,ce=Vv();t.isSupported=typeof T_==`function`&&typeof _==`function`&&re&&re.createHTMLDocument!==void 0;let le=xv,ue=Sv,de=Cv,fe=wv,pe=Tv,me=Dv,he=Ov,ge=Av,_e=Ev,ve=null,ye=iv({},[...uv,...dv,...fv,...mv,...gv]),M=null,be=iv({},[..._v,...vv,...yv,...bv]),xe=Object.seal(M_(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Se=null,Ce=null,we=Object.seal(M_(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Te=!0,Ee=!0,De=!1,Oe=!0,ke=!1,Ae=!0,je=!1,Me=!1,Ne=null,Pe=null,Fe=!1,Ie=!1,Le=!1,Re=!1,ze=!0,Be=!1,Ve=`user-content-`,He=!0,Ue=!1,We={},Ge=null,Ke=iv({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),qe=null,Je=iv({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ye=null,Xe=iv({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ze=`http://www.w3.org/1998/Math/MathML`,Qe=`http://www.w3.org/2000/svg`,$e=`http://www.w3.org/1999/xhtml`,et=$e,tt=!1,nt=null,rt=iv({},[Ze,Qe,$e],U_),it=A_([`mi`,`mo`,`mn`,`ms`,`mtext`]),at=iv({},it),ot=A_([`annotation-xml`]),st=iv({},ot),ct=iv({},[`title`,`style`,`font`,`a`,`script`]),lt=null,ut=[`application/xhtml+xml`,`text/html`],dt=null,ft=null,pt=n.createElement(`form`),mt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ft&&ft===e)return;(!e||typeof e!=`object`)&&(e={}),e=ov(e),lt=ut.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,dt=lt===`application/xhtml+xml`?U_:H_,ve=Hv(e,`ALLOWED_TAGS`,ye,{transform:dt}),M=Hv(e,`ALLOWED_ATTR`,be,{transform:dt}),nt=Hv(e,`ALLOWED_NAMESPACES`,rt,{transform:U_}),Ye=Hv(e,`ADD_URI_SAFE_ATTR`,Xe,{transform:dt,base:Xe}),qe=Hv(e,`ADD_DATA_URI_TAGS`,Je,{transform:dt,base:Je}),Ge=Hv(e,`FORBID_CONTENTS`,Ke,{transform:dt}),Se=Hv(e,`FORBID_TAGS`,ov({}),{transform:dt}),Ce=Hv(e,`FORBID_ATTR`,ov({}),{transform:dt}),We=Q_(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?ov(e.USE_PROFILES):e.USE_PROFILES:!1,Te=e.ALLOW_ARIA_ATTR!==!1,Ee=e.ALLOW_DATA_ATTR!==!1,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ke=e.SAFE_FOR_TEMPLATES||!1,Ae=e.SAFE_FOR_XML!==!1,je=e.WHOLE_DOCUMENT||!1,Ie=e.RETURN_DOM||!1,Le=e.RETURN_DOM_FRAGMENT||!1,Re=e.RETURN_TRUSTED_TYPE||!1,Fe=e.FORCE_BODY||!1,ze=e.SANITIZE_DOM!==!1,Be=e.SANITIZE_NAMED_PROPS||!1,He=e.KEEP_CONTENT!==!1,Ue=e.IN_PLACE||!1,_e=lv(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ev,et=typeof e.NAMESPACE==`string`?e.NAMESPACE:$e,at=Uv(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>iv({},it)),st=Uv(e,`HTML_INTEGRATION_POINTS`,()=>iv({},ot));let t=Uv(e,`CUSTOM_ELEMENT_HANDLING`,()=>M_(null));if(xe=M_(null),Q_(t,`tagNameCheck`)&&mt(t.tagNameCheck)&&(xe.tagNameCheck=t.tagNameCheck),Q_(t,`attributeNameCheck`)&&mt(t.attributeNameCheck)&&(xe.attributeNameCheck=t.attributeNameCheck),Q_(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(xe.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),j_(xe),ke&&(Ee=!1),Le&&(Ie=!0),We&&(ve=iv({},gv),M=M_(null),We.html===!0&&(iv(ve,uv),iv(M,_v)),We.svg===!0&&(iv(ve,dv),iv(M,vv),iv(M,bv)),We.svgFilters===!0&&(iv(ve,fv),iv(M,vv),iv(M,bv)),We.mathMl===!0&&(iv(ve,mv),iv(M,yv),iv(M,bv))),we.tagCheck=null,we.attributeCheck=null,Q_(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?we.tagCheck=e.ADD_TAGS:V_(e.ADD_TAGS)&&(ve===ye&&(ve=ov(ve)),iv(ve,e.ADD_TAGS,dt))),Q_(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?we.attributeCheck=e.ADD_ATTR:V_(e.ADD_ATTR)&&(M===be&&(M=ov(M)),iv(M,e.ADD_ATTR,dt))),Q_(e,`ADD_FORBID_CONTENTS`)&&V_(e.ADD_FORBID_CONTENTS)&&(Ge===Ke&&(Ge=ov(Ge)),iv(Ge,e.ADD_FORBID_CONTENTS,dt)),He&&(ve[`#text`]=!0),je&&iv(ve,[`html`,`head`,`body`]),ve.table&&(iv(ve,[`tbody`]),delete Se.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw tv(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw tv(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=k(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=ne()),T&&typeof E==`string`&&(E=k(``)));A_&&A_(e),ft=e},gt=iv({},[...dv,...fv,...pv]),_t=iv({},[...mv,...hv]),vt=function(e,t,n){return t.namespaceURI===$e?e===`svg`:t.namespaceURI===Ze?e===`svg`&&(n===`annotation-xml`||at[n]):!!gt[e]},yt=function(e,t,n){return t.namespaceURI===$e?e===`math`:t.namespaceURI===Qe?e===`math`&&st[n]:!!_t[e]},bt=function(e,t,n){return t.namespaceURI===Qe&&!st[n]||t.namespaceURI===Ze&&!at[n]?!1:!_t[e]&&(ct[e]||!gt[e])},xt=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:et,tagName:`template`});let n=H_(e.tagName),r=H_(t.tagName);return nt[e.namespaceURI]?e.namespaceURI===Qe?vt(n,t,r):e.namespaceURI===Ze?yt(n,t,r):e.namespaceURI===$e?bt(n,t,r):!!(lt===`application/xhtml+xml`&&nt[e.namespaceURI]):!1},St=function(e){z_(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(p(e),!_(e))throw tv(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Ct=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},wt=function(e){Dt(e);let t=g(e);if(t){let e=[];I_(t,t=>{z_(e,t)}),I_(e,e=>{try{p(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&Ct(e,r,i)}},Tt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}z_(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`)if(Ie||Le)try{St(n)}catch{}else try{n.setAttribute(e,``)}catch{}},Et=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||M[dt(i)]||Ct(e,r,i)}},Dt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===Fv.element&&Et(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Ot=function(e,t){return Ae?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},kt=function(e){if(!Ae)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===Fv.processingInstruction||n===Fv.comment&&ev(Mv,e.data)){try{p(e)}catch{}continue}if(n===Fv.element){let t=e,n=dt(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Ot(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},At=function(e){let t=null,r=null;if(Fe)e=`<remove></remove>`+e;else{let t=W_(e,/^[\r\n\t ]+/);r=t&&t[0]}lt===`application/xhtml+xml`&&et===$e&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?k(e):e;if(et===$e)try{t=new l().parseFromString(i,lt)}catch{}if(!t||!t.documentElement){t=re.createDocument(et,`template`,null);try{t.documentElement.innerHTML=tt?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),et===$e?oe.call(t,je?`html`:`body`)[0]:je?t.documentElement:a},jt=function(e){let t=S?S(e):e.ownerDocument;return ie.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Mt=function(e){return e=G_(e,le,` `),e=G_(e,ue,` `),e=G_(e,de,` `),e},Nt=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=ie.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=Mt(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&I_(i,e=>{Ft(e.content)&&Nt(e.content)})},Pt=function(e){let t=x?x(e):null;return typeof t!=`string`||dt(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},Ft=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Fv.documentFragment}catch{return!1}},It=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function Lt(e,n,r){e.length!==0&&I_(e,e=>{e.call(t,n,r,ft)})}let Rt=function(e,t){return!!(Ae&&e.hasChildNodes()&&!It(e.firstElementChild)&&ev(jv,e.textContent)&&ev(jv,e.innerHTML)||Ae&&e.namespaceURI===$e&&Lv[t]&&(It(e.firstElementChild)||typeof e.textContent==`string`&&ev(Rv[t],e.textContent))||e.nodeType===Fv.processingInstruction||Ae&&e.nodeType===Fv.comment&&ev(Mv,e.data))},zt=function(e,t){if(e instanceof RegExp)return ev(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},Bt=function(e,t,n){if(!Se[t]&&Kt(t)&&zt(xe.tagNameCheck,t))return!1;if(He&&!Ge[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return St(e),!0},Vt=function(e,t,n,r){return e.length===0?t:t===n||t===r?ov(t):t},Ht=function(e,t){return e===t||_(e)!==null?!1:(Ue&&Dt(e),!0)},Ut=function(e,n){if(Lt(ce.beforeSanitizeElements,e,null),Ht(e,n))return!0;if(Pt(e))return St(e),!0;let r=dt(w(e));if(ve=Vt(ce.uponSanitizeElement,ve,ye,Ne),Lt(ce.uponSanitizeElement,e,{tagName:r,allowedTags:ve}),Ht(e,n))return!0;if(Rt(e,r))return St(e),!0;if(Se[r]||!(we.tagCheck instanceof Function&&we.tagCheck(r))&&!ve[r]){let t=Bt(e,r,n);return t===!1&&(Lt(ce.afterSanitizeElements,e,null),Ht(e,n))?!0:t}if(C(e)===Fv.element&&!xt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&ev(Nv,e.innerHTML))return St(e),!0;if(ke&&e.nodeType===Fv.text){let n=Mt(e.textContent);e.textContent!==n&&(z_(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Lt(ce.afterSanitizeElements,e,null),Ht(e,n)},Wt=function(e,t,r){if(Ce[t]||Ot(t,e)||ze&&(t===`id`||t===`name`)&&(r in n||r in pt))return!1;let i=M[t]||we.attributeCheck instanceof Function&&we.attributeCheck(t,e);return Ee&&ev(fe,t)||Te&&ev(pe,t)?!0:i?Ye[t]||ev(_e,G_(r,he,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&K_(r,`data:`)===0&&qe[e]||De&&!ev(me,G_(r,he,``))?!0:!r:Kt(e)&&zt(xe.tagNameCheck,e)&&zt(xe.attributeNameCheck,t,e)||t===`is`&&xe.allowCustomizedBuiltInElements&&zt(xe.tagNameCheck,r)},Gt=iv({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Kt=function(e){return!Gt[H_(e)]&&ev(ge,e)},qt=function(e,t,n,r){if(T&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return k(r);case`TrustedScriptURL`:return A(r)}return r},Jt=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),Pt(e)?(St(e),!1):!0}catch{return Tt(t,e),!1}},Yt=function(e,n){if(Lt(ce.beforeSanitizeAttributes,e,null),Ht(e,n))return;let r=e.attributes;if(!r||Pt(e))return;M=Vt(ce.uponSanitizeAttribute,M,be,Pe);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:M,forceKeepAttr:void 0},a=r.length,o=dt(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=dt(s),d=l,f=s===`value`?d:q_(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,Lt(ce.uponSanitizeAttribute,e,i),f=i.attrValue,Be&&(u===`id`||u===`name`)&&K_(f,Ve)!==0&&(Tt(s,e,n),f=Ve+f,p=!0),Ae&&ev(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Tt(s,e,n);continue}if(u===`attributename`&&W_(f,`href`)){Tt(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){Tt(s,e,n);continue}if(!Oe&&ev(Pv,f)){Tt(s,e,n);continue}if(ke&&(f=Mt(f)),!Wt(o,u,f)){Tt(s,e,n);continue}f=qt(o,u,c,f),f!==d&&Jt(e,s,c,f)&&p&&R_(t.removed)}}Lt(ce.afterSanitizeAttributes,e,null),Ht(e,n)},Xt=function(e){let t=null,n=jt(e);for(Lt(ce.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Lt(ce.uponSanitizeShadowNode,t,null),Ut(t,e),Yt(t,e),Ft(t.content)&&Xt(t.content),C(t)===Fv.element){let e=v(t);Ft(e)&&(Zt(e),Xt(e))}Lt(ce.afterSanitizeShadowDOM,e,null)},Zt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Xt(e.shadow);continue}let n=e.node,r=C(n)===Fv.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&dt(e)===`template`){let e=n.content;Ft(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);Ft(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(tt=!e,tt&&(e=`<!-->`),typeof e!=`string`&&!It(e)&&(e=sv(e),typeof e!=`string`))throw tv(`dirty is not a string, aborting`);if(!t.isSupported)return e;Me?(ve=Ne,M=Pe):ht(n),(ce.uponSanitizeElement.length>0||ce.uponSanitizeAttribute.length>0)&&(ve=ov(ve)),ce.uponSanitizeAttribute.length>0&&(M=ov(M)),t.removed=[];let c=Ue&&typeof e!=`string`&&It(e);if(c){kt(e);let t=w(e);if(typeof t==`string`){let n=dt(t);if(!ve[n]||Se[n])throw wt(e),tv(`root node is forbidden and cannot be sanitized in-place`)}if(Pt(e))throw wt(e),tv(`root node is clobbered and cannot be sanitized in-place`);try{Zt(e)}catch(t){throw wt(e),t}}else if(It(e))i=At(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Fv.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Zt(i);else{if(!Ie&&!ke&&!je&&e.indexOf(`<`)===-1)return T&&Re?k(e):e;if(i=At(e),!i)return Ie?null:Re?E:``}i&&Fe&&St(i.firstChild);let l=c?e:i;try{let e=jt(l);for(;o=e.nextNode();)Ut(o,l),Yt(o,l),Ft(o.content)&&Xt(o.content)}catch(n){throw c&&(wt(e),I_(t.removed,e=>{e.element&&Dt(e.element)})),n}if(c){let n=!1;if(I_(t.removed,t=>{t.element&&(t.element===e&&(n=!0),Dt(t.element))}),n)throw tv(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return ke&&Nt(e),e}if(Ie){if(ke&&Nt(i),Le)for(s=ae.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(M.shadowroot||M.shadowrootmode)&&(s=se.call(r,s,!0)),s}let u=je?i.outerHTML:i.innerHTML;return je&&ve[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&ev(kv,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
150
- `+u),ke&&(u=Mt(u)),T&&Re?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ht(e),Me=!0,Ne=ve,Pe=M},t.clearConfig=function(){ft=null,Me=!1,Ne=null,Pe=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ft||ht({});let r=dt(e),i=dt(t);return Wt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Q_(ce,e)&&z_(ce[e],t)},t.removeHook=function(e,t){if(Q_(ce,e)){if(t!==void 0){let n=L_(ce[e],t);return n===-1?void 0:B_(ce[e],n,1)[0]}return R_(ce[e])}},t.removeHooks=function(e){Q_(ce,e)&&(ce[e]=[])},t.removeAllHooks=function(){ce=Vv()},t}var Gv=Wv(),Kv=`data-pie-authored-ink`,qv=`data-pie-authored-fill`,Jv=`data-pie-authored-border`,Yv=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],Xv=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function Zv(e){let t=e?.trim().toLowerCase();return!t||Xv.has(t)||t.includes(`var(`)?!1:ty(t)?.a!==0}function Qv(e){let t=ty(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*xy(r)+.7152*xy(i)+.0722*xy(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function $v(e){e.removeAttribute(Kv),e.removeAttribute(qv),e.removeAttribute(Jv);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;Zv(i||a)&&(e.setAttribute(Kv,``),i&&r.push(`color`));let o=n(`background-color`),s=o||ey(e.getAttribute(`bgcolor`));Zv(s)&&(e.setAttribute(qv,Qv(s)),o&&r.push(`background-color`));let c=Yv.filter(e=>Zv(n(e)));c.length&&(e.setAttribute(Jv,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function ey(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function ty(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=ry().get(t);if(n)return iy(n);if(t.startsWith(`#`))return iy(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=cy(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>oy(e,255)/255);break;case`hsl`:case`hsla`:u=uy(sy(a),oy(o,100)/100,oy(s,100)/100);break;case`hwb`:u=dy(sy(a),oy(o,100)/100,oy(s,100)/100);break;case`lab`:u=_y(oy(a,100),oy(o,125),oy(s,125));break;case`lch`:u=_y(oy(a,100),...ly(oy(o,150),sy(s)));break;case`oklab`:u=vy(oy(a,1),oy(o,.4),oy(s,.4));break;case`oklch`:u=vy(oy(a,1),...ly(oy(o,.4),sy(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>Sy(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var ny;function ry(){return ny??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),ny}function iy(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var ay=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function oy(e,t){if(e===`none`)return 0;let n=ay.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function sy(e){if(e===`none`)return 0;let t=ay.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function cy(e){return e===void 0?1:Sy(oy(e,1),0,1)}function ly(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function uy(e,t,n){let r=Sy(t,0,1),i=Sy(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function dy(e,t,n){let r=Sy(t,0,1),i=Sy(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):uy(e,1,.5).map(e=>e*(1-r-i)+r)}var fy=24389/27,py=216/24389,my=[.3457/.3585,1,.2958/.3585],hy=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],gy=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function _y(e,t,n){let r=Sy(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return yy(gy,yy(hy,[a**3>py?a**3:(116*a-16)/fy,r>fy*py?i**3:r/fy,o**3>py?o**3:(116*o-16)/fy].map((e,t)=>e*my[t]))).map(by)}function vy(e,t,n){let r=Sy(e,0,1);return yy([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map(by)}function yy(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function by(e){let t=Sy(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function xy(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Sy(e,t,n){return Math.min(n,Math.max(t,e))}var Cy=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],wy=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],Ty=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),Ey=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,Dy=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],Oy=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,ky=`data-pie-play-audio`,Ay={ADD_TAGS:e=>Ty.has(e)||Ey.test(e),ADD_ATTR:Dy,FORBID_TAGS:Cy,FORBID_ATTR:wy,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},jy=!1;function My(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(ky);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var Ny=null;function Py(){return Ny||(Ny=Gv(window),Ny.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=Oy.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(ky,t),jy||=(document.addEventListener(`click`,My),!0))}),Ny.addHook(`afterSanitizeAttributes`,$v),Ny)}var Fy=1e6,Iy=new Map,Ly=0;function Ry(e){if(e==null||e===``||!Gv.isSupported)return``;let t=typeof e==`string`?e:String(e),n=Iy.get(t);if(n!==void 0)return n;let r=String(Py().sanitize(t,Ay)),i=t.length+r.length;if(i>Fy)return r;for(let[e,t]of Iy){if(Ly+i<=Fy)break;Iy.delete(e),Ly-=e.length+t.length}return Iy.set(t,r),Ly+=i,r}var zy={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`},By={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`},Vy=s({background:()=>db,backgroundDark:()=>fb,black:()=>Tb,blueGrey100:()=>Fb,blueGrey300:()=>Ib,blueGrey600:()=>Lb,blueGrey900:()=>Rb,border:()=>vb,borderDark:()=>bb,borderGray:()=>xb,borderLight:()=>yb,buttonBorder:()=>Yb,buttonFocusOutline:()=>Mb,buttonHoverBg:()=>Xb,correct:()=>qy,correctSecondary:()=>Jy,correctTertiary:()=>Yy,correctWithIcon:()=>Xy,defaults:()=>B,disabled:()=>Wy,disabledSecondary:()=>Gy,disabledText:()=>Ky,dropdownBackground:()=>mb,editorToolbar:()=>Jb,fadedPrimary:()=>ob,focusChecked:()=>Ob,focusCheckedBorder:()=>kb,focusOutline:()=>Nb,focusUnchecked:()=>Ab,focusUncheckedBorder:()=>jb,incorrect:()=>Zy,incorrectSecondary:()=>$y,incorrectWithIcon:()=>Qy,keyBoardFocusIndicator:()=>Pb,keypadButton:()=>Vb,keypadButtonHover:()=>Wb,keypadButtonOperator:()=>Hb,keypadButtonOperatorHover:()=>Gb,keypadEmptyPlaceholder:()=>Ub,keypadInk:()=>qb,missing:()=>eb,missingWithIcon:()=>tb,primary:()=>nb,primaryDark:()=>ib,primaryLight:()=>rb,primaryText:()=>ab,secondary:()=>sb,secondaryBackground:()=>pb,secondaryDark:()=>lb,secondaryLight:()=>cb,secondaryText:()=>ub,surface:()=>hb,tableGrid:()=>Sb,tableGridLight:()=>Cb,tableStripe:()=>wb,tertiary:()=>gb,tertiaryLight:()=>_b,text:()=>Uy,transparent:()=>Db,v:()=>Hy,visualElementsColors:()=>Zb,white:()=>Eb}),B={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:vs[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:ms[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:ms[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:By[500],PRIMARY_LIGHT:By[200],PRIMARY_DARK:By[800],SECONDARY:zy.A400,SECONDARY_LIGHT:zy[200],SECONDARY_DARK:zy[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:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,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:`#81848F`,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)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(B);var Hy=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},V=Hy(`pie`),Uy=()=>V(`text`,B.TEXT),Wy=()=>V(`disabled`,B.DISABLED),Gy=()=>V(`disabled-secondary`,B.DISABLED_SECONDARY),Ky=()=>V(`disabled-text`,`text`,B.DISABLED_TEXT),qy=()=>V(`correct`,B.CORRECT),Jy=()=>V(`correct-secondary`,B.CORRECT_SECONDARY),Yy=()=>V(`correct-tertiary`,B.CORRECT_TERTIARY),Xy=()=>V(`correct-icon`,B.CORRECT_WITH_ICON),Zy=()=>V(`incorrect`,B.INCORRECT),Qy=()=>V(`incorrect-icon`,B.INCORRECT_WITH_ICON),$y=()=>V(`incorrect-secondary`,B.INCORRECT_SECONDARY),eb=()=>V(`missing`,B.MISSING),tb=()=>V(`missing-icon`,B.MISSING_WITH_ICON),nb=()=>V(`primary`,B.PRIMARY),rb=()=>V(`primary-light`,B.PRIMARY_LIGHT),ib=()=>V(`primary-dark`,B.PRIMARY_DARK),ab=()=>V(`primary-text`,`text`,B.TEXT),ob=()=>V(`faded-primary`,B.FADED_PRIMARY),sb=()=>V(`secondary`,B.SECONDARY),cb=()=>V(`secondary-light`,B.SECONDARY_LIGHT),lb=()=>V(`secondary-dark`,B.SECONDARY_DARK),ub=()=>V(`secondary-text`,`text`,B.TEXT),db=()=>V(`background`,B.BACKGROUND),fb=()=>V(`background-dark`,B.BACKGROUND_DARK),pb=()=>V(`secondary-background`,B.SECONDARY_BACKGROUND),mb=()=>V(`dropdown-background`,B.DROPDOWN_BACKGROUND),hb=()=>V(`surface`,B.SURFACE),gb=()=>V(`tertiary`,B.TERTIARY),_b=()=>V(`tertiary-light`,B.TERTIARY_LIGHT),vb=()=>V(`border`,B.BORDER),yb=()=>V(`border-light`,B.BORDER_LIGHT),bb=()=>V(`border-dark`,B.BORDER_DARK),xb=()=>V(`border-gray`,B.BORDER_GRAY),Sb=()=>V(`table-grid`,`text`,B.TABLE_GRID),Cb=()=>V(`table-grid-light`,`border-light`,B.TABLE_GRID_LIGHT),wb=()=>V(`table-stripe`,`background-dark`,B.TABLE_STRIPE),Tb=()=>V(`black`,B.BLACK),Eb=()=>V(`white`,B.WHITE),Db=()=>B.TRANSPARENT,Ob=()=>V(`focus-checked`,B.FOCUS_CHECKED),kb=()=>V(`focus-checked-border`,B.FOCUS_CHECKED_BORDER),Ab=()=>V(`focus-unchecked`,B.FOCUS_UNCHECKED),jb=()=>V(`focus-unchecked-border`,B.FOCUS_UNCHECKED_BORDER),Mb=()=>V(`button-focus-outline`,B.BUTTON_FOCUS_OUTLINE),Nb=()=>V(`focus-outline`,`button-focus-outline`,`focus-checked-border`,B.FOCUS_CHECKED_BORDER),Pb=Nb,Fb=()=>V(`blue-grey-100`,B.BLUE_GREY100),Ib=()=>V(`blue-grey-300`,B.BLUE_GREY300),Lb=()=>V(`blue-grey-600`,B.BLUE_GREY600),Rb=()=>V(`blue-grey-900`,B.BLUE_GREY900),zb=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},Bb=(e,t)=>`color-mix(in srgb, rgb(${zb(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${V(`background`,B.WHITE)})`,Vb=()=>V(`keypad-button`,Bb(B.KEYPAD_BUTTON,.5)),Hb=()=>V(`keypad-button-operator`,Bb(B.KEYPAD_BUTTON_OPERATOR,.5)),Ub=()=>V(`keypad-empty-placeholder`,B.KEYPAD_EMPTY_PLACEHOLDER),Wb=()=>V(`keypad-button-hover`,Bb(B.KEYPAD_BUTTON_HOVER,.25)),Gb=()=>V(`keypad-button-operator-hover`,Bb(B.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),Kb=`clamp(0.6, (r + g + b) / 450, 1)`,qb=()=>`rgb(from ${Uy()} calc(r * ${Kb}) calc(g * ${Kb}) calc(b * ${Kb}))`,Jb=()=>Bb(B.EDITOR_TOOLBAR,.125),Yb=()=>V(`button-border`,B.BUTTON_BORDER),Xb=()=>V(`button-hover-bg`,B.BUTTON_HOVER_BG),Zb={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},Qb=I(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),$b=I(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${fb()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${Uy()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Jy()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$y()})`}}),ex=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`}}),tx=class extends N.Component{static propTypes={correctness:O.string,feedback:O.string};nodeRef=N.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,P.jsx)(ol,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,P.jsx)(ex,{ref:this.nodeRef,children:(0,P.jsx)(Qb,{children:(0,P.jsx)($b,{role:`alert`,className:e,dangerouslySetInnerHTML:{__html:Ry(t)}})})})},`hasFeedback`)}render(){return(0,P.jsx)(`div`,{children:(0,P.jsx)(hl,{children:this.renderFeedback()})})}},nx=s({Correct:()=>cx,Incorrect:()=>lx,NothingSubmitted:()=>dx,PartiallyCorrect:()=>ux}),rx=Gh(`pie-libs:render-ui:response-indicators`),ix=I(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),ax=I(g_)({cursor:`pointer`}),ox=I(`div`)({padding:`0`,borderRadius:`4px`}),sx=(e,t)=>{class n extends N.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{rx(`[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)(ix,{hasFeedback:!!n,children:[(0,P.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,P.jsx)(e,{})}),n&&(0,P.jsx)(ax,{PaperComponent:ox,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,P.jsx)(tx,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:O.string},n},cx=sx(rg,`correct`),lx=sx(ug,`incorrect`),ux=sx(_g,`partially-correct`),dx=sx(mg,`nothing-submitted`);function fx(e){return Ba(`MuiCollapse`,e)}Va(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var px=e=>{let{orientation:t,classes:n}=e;return ls({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},fx,n)},mx=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]}})(Rc(({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`}}]}))),hx=I(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),gx=I(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),_x=N.forwardRef(function(e,t){let n=zc({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=Gs.standard,TransitionComponent:x=nl,...S}=n,C={...n,orientation:g,collapsedSize:o},w=px(C),T=xc(),E=Fc(),D=N.useRef(null),O=N.useRef(),ee=typeof o==`number`?`${o}px`:o,te=g===`horizontal`,k=te?`width`:`height`,A=N.useRef(null),ne=xl(t,A),j=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=_l(A,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,u&&u(e,t)}),ie=_l(A,(e,t)=>{let n=j();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=yl({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[k]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),ae=_l(A,(e,t)=>{e.style[k]=`auto`,d&&d(e,t)}),oe=_l(A,e=>{e.style[k]=`${j()}px`,p&&p(e)}),se=_l(A,m),ce=_l(A,e=>{let t=j(),{duration:n,easing:r}=yl({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[k]=ee,e.style.transitionTimingFunction=r,h&&h(e)}),le=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(A.current,e)},ue={slots:_,slotProps:v,component:s},[de,fe]=Gd(`root`,{ref:ne,className:Ra(w.root,a),elementType:mx,externalForwardedProps:ue,ownerState:C,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...y}}}),[pe,me]=Gd(`wrapper`,{ref:D,className:w.wrapper,elementType:hx,externalForwardedProps:ue,ownerState:C}),[he,ge]=Gd(`wrapperInner`,{className:w.wrapperInner,elementType:gx,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:A,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,P.jsx)(de,{...fe,className:Ra(fe.className,{entered:w.entered,exited:!l&&ee===`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})})})}})});_x&&(_x.muiSupportAuto=!0);var vx=`4.1.3`,yx=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,bx=`@pie-lib/math-rendering@2`,xx=[`nemeth`,`euro`],Sx=`mathjax@${vx}/sre`,Cx=/^[^@]+@[^@]+$/;function wx(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!Cx.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function Tx(){let e=globalThis[bx]?.opts;return e&&typeof e==`object`?e:{}}function Ex(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function Dx(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=Ex(r);e&&t.set(n,e)}return t.size?t:void 0}function Ox(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function kx(e,t){let n=Tx(),r=Ex(e.assetRoot??n.assetRoot)??wx(t);return{root:r,speechPath:Ex(e.speechPath??n.speechPath)??(r?`${r}/${Sx}`:void 0),speechLocales:Ox(e.speechLocales??n.speechLocales),urls:Dx(e.assetUrls??n.assetUrls)}}function Ax(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!xx.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function jx(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!xx.includes(e))}var Mx=`pie-mathjax-no-asset-root`,Nx={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},Px=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function Fx(e){let t=globalThis;t[Px]??=[];let n=t[Px];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${Nx[e]}. Set window['${bx}'].opts.assetRoot to an npm root. See ${yx}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(Mx,{detail:{effect:e,message:r,docsUrl:yx}}))}var Ix=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,Lx=`pie-mathjax-version-conflict`,Rx=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function zx(e,t){if(typeof window>`u`)return;let n=globalThis;n[Rx]??={logged:!1,conditions:[]};let r=n[Rx];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Ix}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(Lx,{detail:{condition:e,message:i,docsUrl:Ix}}))}function Bx(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function Vx(){return window.MathJax}function Hx(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${vx}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${vx}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function Ux(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(Hx(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(Fx(`untypeset`),Promise.resolve(!1))}var Wx=globalThis,Gx=`PIE-MJX-CHTML-styles`,Kx=[`MJX-CHTML-styles`,`MJX-SVG-styles`],qx=Bx,Jx=`http://www.w3.org/1998/Math/MathML`,Yx=/^([a-z_][\w.-]*):math$/,Xx=/^[a-z][a-z0-9-]*$/;function Zx(e){for(let t of e.querySelectorAll(`*`)){let n=Yx.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith(Qx(t,`${n}:`))}}function Qx(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!Xx.test(n))return e;let r=e.ownerDocument.createElementNS(Jx,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?Qx(n,t):n)}return r}var $x=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),eS={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},tS={tight:`0em`,medium:`0.1em`,loose:`0.2em`},nS=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,rS=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,iS=/^(\d+(\.\d*)?|\.\d+)$/,aS=new Set([`mn`,`mo`,`mi`,`mtext`]),oS=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function sS(e,t,n=[],r={}){let i=e.createElementNS(Jx,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function cS(e,t){let n=sS(e.document,`mo`);return n.textContent=t,n}function lS(e){let t=sS(e.document,`mn`);return t.textContent=`0`,sS(e.document,`mphantom`,[t])}function uS(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function dS(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function fS(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function pS(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function mS(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(fS(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else aS.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:pS(r.length,n.stackAlign,i??a),position:t}}function hS(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>$x.has(e))}function gS(e,t){let n=[...e.children].filter(e=>!fS(e));return n.length<=1?n[0]??null:sS(t.document,`mrow`,n)}function _S(e,t,n){let r=uS(e,`location`)??`n`,i=hS(e.getAttribute(`crossout`)),a=[...e.children].map(e=>fS(e)?null:e.localName===`mscarry`?{content:gS(e,n),location:uS(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?hS(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:pS(a.length,n.stackAlign),position:t,scale:iS.test(o)?o:`0.6`}}function vS(e){let t=uS(e,`mslinethickness`)??`medium`,n=eS[t]??(nS.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${rS.test(r)?r:`currentColor`}`}function yS(e,t,n){let r=Math.max(0,dS(e,`length`));return{kind:`line`,length:r,anchor:pS(r,n.stackAlign),position:t,border:vS(e)}}function bS(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+dS(e,`position`);switch(e.localName){case`msgroup`:bS([...e.children],o,dS(e,`shift`),r,i);break;case`msline`:i.push(yS(e,o,r));break;case`mscarries`:i.push(_S(e,o,r));break;case`msrow`:case`mrow`:i.push(mS([...e.children],o,r));break;default:i.push(mS([e],o,r))}})}function xS(e){return-e.anchor-e.position}function SS(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function CS(e){return xS(e)+SS(e)-1}function wS(e,t,n,r){let i=e=>sS(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>sS(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function TS(e,t,n){let r=sS(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?sS(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function ES(e,t,n,r,i){let a=e&&t.crossout.length?TS(e,t.crossout,i):e;if(!t.content)return a;let o=sS(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return wS(a??lS(i),o,n,i)}function DS(e,t){return e.carries[t-xS(e)]??null}function OS(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=DS(s,t),l=n.slice(0,o).some(e=>DS(e,t));if(!c&&!l)return;let u=c??{content:lS(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=ES(i,u,d,s.scale,r)}),e.content=i}function kS(e,t){let n=e.filter(e=>SS(e)>0),r=Math.min(0,...n.map(xS)),i=Math.max(r,...n.map(CS))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+xS(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+xS(e)+r].content=t}),u.length&&n.forEach((e,n)=>{OS(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function AS(e,{rows:t},n){let r=sS(n.document,`mtable`,t.map(e=>sS(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return sS(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])oS.has(t)||r.setAttribute(t,n);let i=uS(e,`charspacing`)??`medium`,a=uS(e,`charalign`);return r.setAttribute(`columnspacing`,tS[i]??(nS.test(i)?i:tS.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function jS(e){return{document:e.ownerDocument,stackAlign:uS(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function MS(e){let t=jS(e),n=[];return bS([...e.children],0,0,t,n),AS(e,kS(n,t),t)}function NS(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function PS(e,t){let n=cS(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[sS(t.document,`mrow`,[e,sS(t.document,`mspace`,[],{width:`0.2em`})]),sS(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function FS(e){let t=jS(e),[n,r,...i]=[...e.children],a=n&&!fS(n)?n:null,o=r&&!fS(r)?r:null,s=uS(e,`longdivstyle`)??`lefttop`,c=vS(e),l=[];bS(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...mS(n,0,t).cells)};switch(s){case`left/\\right`:f(a,cS(t,`/`)),p(cS(t,`\\`),o);break;case`left)(right`:f(a,cS(t,`)`)),p(cS(t,`(`),o);break;case`:right=right`:p(cS(t,`:`),a,cS(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&bS([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...PS(a,t));break}let m=kS(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+xS(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+CS(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,NS(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,NS(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:IS(h,g,s,a,o,c,t);break;default:NS(h,g,_(1),v,`top`,c)}return AS(e,m,t)}function IS(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&sS(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function LS(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?MS(t):FS(t))}var RS=`PIE-MJX-explorer-styles`,zS=`var(--pie-text, black)`,BS=`var(--pie-background, #ffffff)`,VS=`var(--pie-border-dark, #66686A)`,HS=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,US=`color-mix(in srgb, ${HS} 15%, transparent)`,WS=`
150
+ `+u),ke&&(u=Mt(u)),T&&Re?k(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ht(e),Me=!0,Ne=ve,Pe=M},t.clearConfig=function(){ft=null,Me=!1,Ne=null,Pe=null,T=D,E=``},t.isValidAttribute=function(e,t,n){ft||ht({});let r=dt(e),i=dt(t);return Wt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&Q_(ce,e)&&z_(ce[e],t)},t.removeHook=function(e,t){if(Q_(ce,e)){if(t!==void 0){let n=L_(ce[e],t);return n===-1?void 0:B_(ce[e],n,1)[0]}return R_(ce[e])}},t.removeHooks=function(e){Q_(ce,e)&&(ce[e]=[])},t.removeAllHooks=function(){ce=Vv()},t}var Gv=Wv(),Kv=`data-pie-authored-ink`,qv=`data-pie-authored-fill`,Jv=`data-pie-authored-border`,Yv=[`border-top-color`,`border-right-color`,`border-bottom-color`,`border-left-color`],Xv=new Set([`currentcolor`,`inherit`,`initial`,`unset`,`revert`,`revert-layer`,`transparent`]);function Zv(e){let t=e?.trim().toLowerCase();return!t||Xv.has(t)||t.includes(`var(`)?!1:ty(t)?.a!==0}function Qv(e){let t=ty(e);if(!t)return`shade`;let n=e=>(e*t.a+255*(1-t.a))/255,[r,i,a]=[n(t.r),n(t.g),n(t.b)],o=.2126*xy(r)+.7152*xy(i)+.0722*xy(a),s=Math.max(r,i,a)-Math.min(r,i,a);return o>=.85&&s<=.08?`light`:`shade`}function $v(e){e.removeAttribute(Kv),e.removeAttribute(qv),e.removeAttribute(Jv);let t=e.hasAttribute(`style`)?e.style:void 0,n=e=>t?.getPropertyValue(e).trim()??``,r=[],i=n(`color`),a=e.localName===`font`?e.getAttribute(`color`):null;Zv(i||a)&&(e.setAttribute(Kv,``),i&&r.push(`color`));let o=n(`background-color`),s=o||ey(e.getAttribute(`bgcolor`));Zv(s)&&(e.setAttribute(qv,Qv(s)),o&&r.push(`background-color`));let c=Yv.filter(e=>Zv(n(e)));c.length&&(e.setAttribute(Jv,``),r.push(...c));for(let e of r)t?.getPropertyPriority(e)===`important`&&t.setProperty(e,t.getPropertyValue(e))}function ey(e){let t=e?.trim()??``;return/^(?:[\da-f]{3}|[\da-f]{6})$/i.test(t)?`#${t}`:t}function ty(e){let t=e.trim().toLowerCase();if(t===`transparent`)return{r:0,g:0,b:0,a:0};let n=ry().get(t);if(n)return iy(n);if(t.startsWith(`#`))return iy(t.slice(1));let r=/^([a-z]+)\(([^()]*)\)$/.exec(t);if(!r)return null;let i=r[2].trim().split(/\s*[\s,/]\s*/);if(i.length!==3&&i.length!==4)return null;let[a,o,s,c]=i,l=cy(c),u;switch(r[1]){case`rgb`:case`rgba`:u=[a,o,s].map(e=>oy(e,255)/255);break;case`hsl`:case`hsla`:u=uy(sy(a),oy(o,100)/100,oy(s,100)/100);break;case`hwb`:u=dy(sy(a),oy(o,100)/100,oy(s,100)/100);break;case`lab`:u=_y(oy(a,100),oy(o,125),oy(s,125));break;case`lch`:u=_y(oy(a,100),...ly(oy(o,150),sy(s)));break;case`oklab`:u=vy(oy(a,1),oy(o,.4),oy(s,.4));break;case`oklch`:u=vy(oy(a,1),...ly(oy(o,.4),sy(s)));break;default:return null}if(Number.isNaN(l)||u.some(Number.isNaN))return null;let[d,f,p]=u.map(e=>Sy(e,0,1)*255);return{r:d,g:f,b:p,a:l}}var ny;function ry(){return ny??=new Map(`aliceblue:f0f8ff antiquewhite:faebd7 aqua:00ffff aquamarine:7fffd4 azure:f0ffff beige:f5f5dc bisque:ffe4c4 black:000000 blanchedalmond:ffebcd blue:0000ff blueviolet:8a2be2 brown:a52a2a burlywood:deb887 cadetblue:5f9ea0 chartreuse:7fff00 chocolate:d2691e coral:ff7f50 cornflowerblue:6495ed cornsilk:fff8dc crimson:dc143c cyan:00ffff darkblue:00008b darkcyan:008b8b darkgoldenrod:b8860b darkgray:a9a9a9 darkgreen:006400 darkgrey:a9a9a9 darkkhaki:bdb76b darkmagenta:8b008b darkolivegreen:556b2f darkorange:ff8c00 darkorchid:9932cc darkred:8b0000 darksalmon:e9967a darkseagreen:8fbc8f darkslateblue:483d8b darkslategray:2f4f4f darkslategrey:2f4f4f darkturquoise:00ced1 darkviolet:9400d3 deeppink:ff1493 deepskyblue:00bfff dimgray:696969 dimgrey:696969 dodgerblue:1e90ff firebrick:b22222 floralwhite:fffaf0 forestgreen:228b22 fuchsia:ff00ff gainsboro:dcdcdc ghostwhite:f8f8ff gold:ffd700 goldenrod:daa520 gray:808080 green:008000 greenyellow:adff2f grey:808080 honeydew:f0fff0 hotpink:ff69b4 indianred:cd5c5c indigo:4b0082 ivory:fffff0 khaki:f0e68c lavender:e6e6fa lavenderblush:fff0f5 lawngreen:7cfc00 lemonchiffon:fffacd lightblue:add8e6 lightcoral:f08080 lightcyan:e0ffff lightgoldenrodyellow:fafad2 lightgray:d3d3d3 lightgreen:90ee90 lightgrey:d3d3d3 lightpink:ffb6c1 lightsalmon:ffa07a lightseagreen:20b2aa lightskyblue:87cefa lightslategray:778899 lightslategrey:778899 lightsteelblue:b0c4de lightyellow:ffffe0 lime:00ff00 limegreen:32cd32 linen:faf0e6 magenta:ff00ff maroon:800000 mediumaquamarine:66cdaa mediumblue:0000cd mediumorchid:ba55d3 mediumpurple:9370db mediumseagreen:3cb371 mediumslateblue:7b68ee mediumspringgreen:00fa9a mediumturquoise:48d1cc mediumvioletred:c71585 midnightblue:191970 mintcream:f5fffa mistyrose:ffe4e1 moccasin:ffe4b5 navajowhite:ffdead navy:000080 oldlace:fdf5e6 olive:808000 olivedrab:6b8e23 orange:ffa500 orangered:ff4500 orchid:da70d6 palegoldenrod:eee8aa palegreen:98fb98 paleturquoise:afeeee palevioletred:db7093 papayawhip:ffefd5 peachpuff:ffdab9 peru:cd853f pink:ffc0cb plum:dda0dd powderblue:b0e0e6 purple:800080 rebeccapurple:663399 red:ff0000 rosybrown:bc8f8f royalblue:4169e1 saddlebrown:8b4513 salmon:fa8072 sandybrown:f4a460 seagreen:2e8b57 seashell:fff5ee sienna:a0522d silver:c0c0c0 skyblue:87ceeb slateblue:6a5acd slategray:708090 slategrey:708090 snow:fffafa springgreen:00ff7f steelblue:4682b4 tan:d2b48c teal:008080 thistle:d8bfd8 tomato:ff6347 turquoise:40e0d0 violet:ee82ee wheat:f5deb3 white:ffffff whitesmoke:f5f5f5 yellow:ffff00 yellowgreen:9acd32`.split(` `).map(e=>e.split(`:`))),ny}function iy(e){if(!/^(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/.test(e))return null;let[t,n,r,i=255]=(e.length<=4?[...e].map(e=>e+e):e.match(/../g)??[]).map(e=>Number.parseInt(e,16));return{r:t,g:n,b:r,a:i/255}}var ay=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(%|deg|rad|grad|turn)?$/;function oy(e,t){if(e===`none`)return 0;let n=ay.exec(e);return!n||n[2]&&n[2]!==`%`?NaN:n[2]?Number(n[1])/100*t:Number(n[1])}function sy(e){if(e===`none`)return 0;let t=ay.exec(e);if(!t||t[2]===`%`)return NaN;let n=Number(t[1]);return((t[2]===`rad`?n*180/Math.PI:t[2]===`grad`?n*.9:t[2]===`turn`?n*360:n)%360+360)%360}function cy(e){return e===void 0?1:Sy(oy(e,1),0,1)}function ly(e,t){let n=Math.max(0,e),r=t*Math.PI/180;return[n*Math.cos(r),n*Math.sin(r)]}function uy(e,t,n){let r=Sy(t,0,1),i=Sy(n,0,1),a=t=>{let n=(t+e/30)%12,a=r*Math.min(i,1-i);return i-a*Math.max(-1,Math.min(n-3,9-n,1))};return[a(0),a(8),a(4)]}function dy(e,t,n){let r=Sy(t,0,1),i=Sy(n,0,1);return r+i>=1?[,,,].fill(r/(r+i)):uy(e,1,.5).map(e=>e*(1-r-i)+r)}var fy=24389/27,py=216/24389,my=[.3457/.3585,1,.2958/.3585],hy=[[.955473421488075,-.02309845494876471,.06325924320057072],[-.0283697093338637,1.0099953980813041,.021041441191917323],[.012314014864481998,-.020507649298898964,1.330365926242124]],gy=[[12831/3959,-329/214,-1974/3959],[-851781/878810,1648619/878810,36519/878810],[705/12673,-2585/12673,705/667]];function _y(e,t,n){let r=Sy(e,0,100),i=(r+16)/116,a=t/500+i,o=i-n/200;return yy(gy,yy(hy,[a**3>py?a**3:(116*a-16)/fy,r>fy*py?i**3:r/fy,o**3>py?o**3:(116*o-16)/fy].map((e,t)=>e*my[t]))).map(by)}function vy(e,t,n){let r=Sy(e,0,1);return yy([[4.0767416621,-3.3077115913,.2309699292],[-1.2684380046,2.6097574011,-.3413193965],[-.0041960863,-.7034186147,1.707614701]],[r+.3963377774*t+.2158037573*n,r-.1055613458*t-.0638541728*n,r-.0894841775*t-1.291485548*n].map(e=>e**3)).map(by)}function yy(e,t){return e.map(e=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2])}function by(e){let t=Sy(e,0,1);return t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055}function xy(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Sy(e,t,n){return Math.min(n,Math.max(t,e))}var Cy=[`script`,`embed`,`base`,`form`,`meta`,`link`,`style`,`foreignobject`],wy=[`onerror`,`onload`,`onclick`,`onmouseover`,`onmouseout`,`onmouseenter`,`onmouseleave`,`onfocus`,`onblur`,`onkeydown`,`onkeyup`,`onkeypress`,`onsubmit`,`onchange`,`onbeforeunload`,`formaction`,`xlink:href`],Ty=new Set([`iframe`,`object`,`mstack`,`mlongdiv`,`msgroup`,`msrow`,`msline`,`mscarries`,`mscarry`,`semantics`,`annotation`,`none`]),Ey=/^[a-z_][\w.-]*:[a-z][\w.-]*$/,Dy=[`alignment`,`target`,`allow`,`allowfullscreen`,`frameborder`,`scrolling`,`data`,`stackalign`,`charalign`,`charspacing`,`longdivstyle`,`position`,`shift`,`location`,`crossout`,`leftoverhang`,`rightoverhang`,`mslinethickness`,`linebreak`],Oy=/^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/,ky=`data-pie-play-audio`,Ay={ADD_TAGS:e=>Ty.has(e)||Ey.test(e),ADD_ATTR:Dy,FORBID_TAGS:Cy,FORBID_ATTR:wy,ALLOW_UNKNOWN_PROTOCOLS:!1,RETURN_TRUSTED_TYPE:!1},jy=!1;function My(e){for(let t of e.composedPath()){if(!(t instanceof Element))continue;let n=t.getAttribute(ky);if(n===null)continue;e.preventDefault();let r=t.getRootNode().getElementById?.(n)??document.getElementById(n);r instanceof HTMLMediaElement&&r.play()?.catch(()=>void 0);return}}var Ny=null;function Py(){return Ny||(Ny=Gv(window),Ny.addHook(`beforeSanitizeAttributes`,e=>{if(e.nodeName!==`A`)return;let t=Oy.exec(e.getAttribute(`onclick`)??``)?.[2];t!==void 0&&(e.removeAttribute(`onclick`),e.setAttribute(ky,t),jy||=(document.addEventListener(`click`,My),!0))}),Ny.addHook(`afterSanitizeAttributes`,$v),Ny)}var Fy=1e6,Iy=new Map,Ly=0;function Ry(e){if(e==null||e===``||!Gv.isSupported)return``;let t=typeof e==`string`?e:String(e),n=Iy.get(t);if(n!==void 0)return n;let r=String(Py().sanitize(t,Ay)),i=t.length+r.length;if(i>Fy)return r;for(let[e,t]of Iy){if(Ly+i<=Fy)break;Iy.delete(e),Ly-=e.length+t.length}return Iy.set(t,r),Ly+=i,r}var zy={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`},By={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`},Vy=s({background:()=>db,backgroundDark:()=>fb,black:()=>Tb,blueGrey100:()=>Fb,blueGrey300:()=>Ib,blueGrey600:()=>Lb,blueGrey900:()=>Rb,border:()=>vb,borderDark:()=>bb,borderGray:()=>xb,borderLight:()=>yb,buttonBorder:()=>Yb,buttonFocusOutline:()=>Mb,buttonHoverBg:()=>Xb,correct:()=>qy,correctSecondary:()=>Jy,correctTertiary:()=>Yy,correctWithIcon:()=>Xy,defaults:()=>B,disabled:()=>Wy,disabledSecondary:()=>Gy,disabledText:()=>Ky,dropdownBackground:()=>mb,editorToolbar:()=>Jb,fadedPrimary:()=>ob,focusChecked:()=>Ob,focusCheckedBorder:()=>kb,focusOutline:()=>Nb,focusUnchecked:()=>Ab,focusUncheckedBorder:()=>jb,incorrect:()=>Zy,incorrectSecondary:()=>$y,incorrectWithIcon:()=>Qy,keyBoardFocusIndicator:()=>Pb,keypadButton:()=>Vb,keypadButtonHover:()=>Wb,keypadButtonOperator:()=>Hb,keypadButtonOperatorHover:()=>Gb,keypadEmptyPlaceholder:()=>Ub,keypadInk:()=>qb,missing:()=>eb,missingWithIcon:()=>tb,primary:()=>nb,primaryDark:()=>ib,primaryLight:()=>rb,primaryText:()=>ab,secondary:()=>sb,secondaryBackground:()=>pb,secondaryDark:()=>lb,secondaryLight:()=>cb,secondaryText:()=>ub,surface:()=>hb,tableGrid:()=>Sb,tableGridLight:()=>Cb,tableStripe:()=>wb,tertiary:()=>gb,tertiaryLight:()=>_b,text:()=>Uy,transparent:()=>Db,v:()=>Hy,visualElementsColors:()=>Zb,white:()=>Eb}),B={TEXT:`black`,DISABLED:`grey`,DISABLED_SECONDARY:`#ABABAB`,DISABLED_TEXT:`#545454`,CORRECT:`#208537`,CORRECT_SECONDARY:vs[50],CORRECT_TERTIARY:`#0EA449`,CORRECT_WITH_ICON:`#087D38`,INCORRECT:`#a65f00`,INCORRECT_SECONDARY:ms[50],INCORRECT_WITH_ICON:`#BF0D00`,MISSING:ms[700],MISSING_WITH_ICON:`#6A78A1`,PRIMARY:By[500],PRIMARY_LIGHT:By[200],PRIMARY_DARK:By[800],SECONDARY:zy.A400,SECONDARY_LIGHT:zy[200],SECONDARY_DARK:zy[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:`#EBECF1`,BORDER:`#9A9A9A`,BORDER_LIGHT:`#D1D1D1`,BORDER_DARK:`#66686A`,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:`#81848F`,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)`,EDITOR_TOOLBAR:`#efefef`,BUTTON_BORDER:`rgba(0, 0, 0, 0.23)`,BUTTON_HOVER_BG:`rgba(0, 0, 0, 0.08)`};Object.freeze(B);var Hy=e=>(...t)=>{let n=t.pop();return t.reduceRight((t,n)=>`var(--${e}-${n}, ${t})`,n)},V=Hy(`pie`),Uy=()=>V(`text`,B.TEXT),Wy=()=>V(`disabled`,B.DISABLED),Gy=()=>V(`disabled-secondary`,B.DISABLED_SECONDARY),Ky=()=>V(`disabled-text`,`text`,B.DISABLED_TEXT),qy=()=>V(`correct`,B.CORRECT),Jy=()=>V(`correct-secondary`,B.CORRECT_SECONDARY),Yy=()=>V(`correct-tertiary`,B.CORRECT_TERTIARY),Xy=()=>V(`correct-icon`,B.CORRECT_WITH_ICON),Zy=()=>V(`incorrect`,B.INCORRECT),Qy=()=>V(`incorrect-icon`,B.INCORRECT_WITH_ICON),$y=()=>V(`incorrect-secondary`,B.INCORRECT_SECONDARY),eb=()=>V(`missing`,B.MISSING),tb=()=>V(`missing-icon`,B.MISSING_WITH_ICON),nb=()=>V(`primary`,B.PRIMARY),rb=()=>V(`primary-light`,B.PRIMARY_LIGHT),ib=()=>V(`primary-dark`,B.PRIMARY_DARK),ab=()=>V(`primary-text`,`text`,B.TEXT),ob=()=>V(`faded-primary`,B.FADED_PRIMARY),sb=()=>V(`secondary`,B.SECONDARY),cb=()=>V(`secondary-light`,B.SECONDARY_LIGHT),lb=()=>V(`secondary-dark`,B.SECONDARY_DARK),ub=()=>V(`secondary-text`,`text`,B.TEXT),db=()=>V(`background`,B.BACKGROUND),fb=()=>V(`background-dark`,B.BACKGROUND_DARK),pb=()=>V(`secondary-background`,B.SECONDARY_BACKGROUND),mb=()=>V(`dropdown-background`,B.DROPDOWN_BACKGROUND),hb=()=>V(`surface`,B.SURFACE),gb=()=>V(`tertiary`,B.TERTIARY),_b=()=>V(`tertiary-light`,B.TERTIARY_LIGHT),vb=()=>V(`border`,B.BORDER),yb=()=>V(`border-light`,B.BORDER_LIGHT),bb=()=>V(`border-dark`,B.BORDER_DARK),xb=()=>V(`border-gray`,B.BORDER_GRAY),Sb=()=>V(`table-grid`,`text`,B.TABLE_GRID),Cb=()=>V(`table-grid-light`,`border-light`,B.TABLE_GRID_LIGHT),wb=()=>V(`table-stripe`,`background-dark`,B.TABLE_STRIPE),Tb=()=>V(`black`,B.BLACK),Eb=()=>V(`white`,B.WHITE),Db=()=>B.TRANSPARENT,Ob=()=>V(`focus-checked`,B.FOCUS_CHECKED),kb=()=>V(`focus-checked-border`,B.FOCUS_CHECKED_BORDER),Ab=()=>V(`focus-unchecked`,B.FOCUS_UNCHECKED),jb=()=>V(`focus-unchecked-border`,B.FOCUS_UNCHECKED_BORDER),Mb=()=>V(`button-focus-outline`,B.BUTTON_FOCUS_OUTLINE),Nb=()=>V(`focus-outline`,`button-focus-outline`,`focus-checked-border`,B.FOCUS_CHECKED_BORDER),Pb=Nb,Fb=()=>V(`blue-grey-100`,B.BLUE_GREY100),Ib=()=>V(`blue-grey-300`,B.BLUE_GREY300),Lb=()=>V(`blue-grey-600`,B.BLUE_GREY600),Rb=()=>V(`blue-grey-900`,B.BLUE_GREY900),zb=e=>{let t=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return t?t.slice(1).map(e=>parseInt(e,16)):e.match(/\d+/g).slice(0,3).map(Number)},Bb=(e,t)=>`color-mix(in srgb, rgb(${zb(e).map(e=>(e-255*(1-t))/t).join(` `)}) ${t*100}%, ${V(`background`,B.WHITE)})`,Vb=()=>V(`keypad-button`,Bb(B.KEYPAD_BUTTON,.5)),Hb=()=>V(`keypad-button-operator`,Bb(B.KEYPAD_BUTTON_OPERATOR,.5)),Ub=()=>V(`keypad-empty-placeholder`,B.KEYPAD_EMPTY_PLACEHOLDER),Wb=()=>V(`keypad-button-hover`,Bb(B.KEYPAD_BUTTON_HOVER,.25)),Gb=()=>V(`keypad-button-operator-hover`,Bb(B.KEYPAD_BUTTON_OPERATOR_HOVER,.25)),Kb=`clamp(0.6, (r + g + b) / 450, 1)`,qb=()=>`rgb(from ${Uy()} calc(r * ${Kb}) calc(g * ${Kb}) calc(b * ${Kb}))`,Jb=()=>Bb(B.EDITOR_TOOLBAR,.125),Yb=()=>V(`button-border`,B.BUTTON_BORDER),Xb=()=>V(`button-hover-bg`,B.BUTTON_HOVER_BG),Zb={AXIS_LINE_COLOR:`#5A53C9`,ROLLOVER_FILL_BAR_COLOR:`#050F2D`,GRIDLINES_COLOR:`#8E88EA`,PLOT_FILL_COLOR:`#1463B3`,SHAPES_FILL_COLOR:`#7986cb`},Qb=I(`div`)({transformOrigin:`0% 0px 0px`,width:`100%`,display:`block`,overflow:`hidden`,"&.incorrect":{color:`#946202`}}),$b=I(`div`)({WebkitFontSmoothing:`antialiased`,backgroundColor:`var(--feedback-bg-color, ${fb()})`,borderRadius:`4px`,lineHeight:`25px`,margin:`0px`,padding:`10px`,verticalAlign:`middle`,color:`var(--feedback-color, ${Uy()})`,"&.correct":{backgroundColor:`var(--feedback-correct-bg-color, ${Jy()})`},"&.incorrect":{backgroundColor:`var(--feedback-incorrect-bg-color, ${$y()})`}}),ex=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`}}),tx=class extends N.Component{static propTypes={correctness:O.string,feedback:O.string};nodeRef=N.createRef();renderFeedback(){let{correctness:e,feedback:t}=this.props;return!e||!t?null:(0,P.jsx)(ol,{nodeRef:this.nodeRef,timeout:{enter:500,exit:200},classNames:`feedback`,children:(0,P.jsx)(ex,{ref:this.nodeRef,children:(0,P.jsx)(Qb,{children:(0,P.jsx)($b,{role:`alert`,className:e,dangerouslySetInnerHTML:{__html:Ry(t)}})})})},`hasFeedback`)}render(){return(0,P.jsx)(`div`,{children:(0,P.jsx)(hl,{children:this.renderFeedback()})})}},nx=s({Correct:()=>cx,Incorrect:()=>lx,NothingSubmitted:()=>dx,PartiallyCorrect:()=>ux}),rx=Gh(`pie-libs:render-ui:response-indicators`),ix=I(`div`)(({hasFeedback:e})=>({cursor:e?`pointer`:`default`})),ax=I(g_)({cursor:`pointer`}),ox=I(`div`)({padding:`0`,borderRadius:`4px`}),sx=(e,t)=>{class n extends N.Component{constructor(e){super(e),this.state={}}handlePopoverOpen=e=>{rx(`[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)(ix,{hasFeedback:!!n,children:[(0,P.jsx)(`span`,{ref:e=>this.icon=e,onClick:this.handlePopoverOpen,children:(0,P.jsx)(e,{})}),n&&(0,P.jsx)(ax,{PaperComponent:ox,open:!!r,anchorEl:r,anchorOrigin:{vertical:`bottom`,horizontal:`left`},transformOrigin:{vertical:`top`,horizontal:`left`},onClose:this.handlePopoverClose,children:(0,P.jsx)(tx,{feedback:n,correctness:t})})]})}}return n.propTypes={feedback:O.string},n},cx=sx(rg,`correct`),lx=sx(ug,`incorrect`),ux=sx(_g,`partially-correct`),dx=sx(mg,`nothing-submitted`);function fx(e){return Ba(`MuiCollapse`,e)}Va(`MuiCollapse`,[`root`,`horizontal`,`vertical`,`entered`,`hidden`,`wrapper`,`wrapperInner`]);var px=e=>{let{orientation:t,classes:n}=e;return ls({root:[`root`,t],entered:[`entered`],hidden:[`hidden`],wrapper:[`wrapper`,t],wrapperInner:[`wrapperInner`,t]},fx,n)},mx=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]}})(Rc(({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`}}]}))),hx=I(`div`,{name:`MuiCollapse`,slot:`Wrapper`})({display:`flex`,width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),gx=I(`div`,{name:`MuiCollapse`,slot:`WrapperInner`})({width:`100%`,variants:[{props:{orientation:`horizontal`},style:{width:`auto`,height:`100%`}}]}),_x=N.forwardRef(function(e,t){let n=zc({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=Gs.standard,TransitionComponent:x=nl,...S}=n,C={...n,orientation:g,collapsedSize:o},w=px(C),T=xc(),E=Fc(),D=N.useRef(null),O=N.useRef(),ee=typeof o==`number`?`${o}px`:o,te=g===`horizontal`,k=te?`width`:`height`,A=N.useRef(null),ne=xl(t,A),j=()=>D.current?D.current[te?`clientWidth`:`clientHeight`]:0,re=_l(A,(e,t)=>{D.current&&te&&(D.current.style.position=`absolute`),e.style[k]=ee,u&&u(e,t)}),ie=_l(A,(e,t)=>{let n=j();D.current&&te&&(D.current.style.position=``);let{duration:r,easing:i}=yl({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[k]=`${n}px`,e.style.transitionTimingFunction=i,f&&f(e,t)}),ae=_l(A,(e,t)=>{e.style[k]=`auto`,d&&d(e,t)}),oe=_l(A,e=>{e.style[k]=`${j()}px`,p&&p(e)}),se=_l(A,m),ce=_l(A,e=>{let t=j(),{duration:n,easing:r}=yl({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[k]=ee,e.style.transitionTimingFunction=r,h&&h(e)}),le=e=>{b===`auto`&&E.start(O.current||0,e),r&&r(A.current,e)},ue={slots:_,slotProps:v,component:s},[de,fe]=Gd(`root`,{ref:ne,className:Ra(w.root,a),elementType:mx,externalForwardedProps:ue,ownerState:C,additionalProps:{style:{[te?`minWidth`:`minHeight`]:ee,...y}}}),[pe,me]=Gd(`wrapper`,{ref:D,className:w.wrapper,elementType:hx,externalForwardedProps:ue,ownerState:C}),[he,ge]=Gd(`wrapperInner`,{className:w.wrapperInner,elementType:gx,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:A,timeout:b===`auto`?null:b,...S,children:(e,{ownerState:t,...n})=>{let r={...C,state:e};return(0,P.jsx)(de,{...fe,className:Ra(fe.className,{entered:w.entered,exited:!l&&ee===`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})})})}})});_x&&(_x.muiSupportAuto=!0);var vx=`4.1.3`,yx=`https://github.com/pie-framework/pie-elements-ng/blob/develop/docs/MATH-RENDERING.md#assets`,bx=`@pie-lib/math-rendering@2`,xx=[`nemeth`,`euro`],Sx=`mathjax@${vx}/sre`,Cx=/^[^@]+@[^@]+$/;function wx(e){if(!e)return;let t;try{t=new URL(e)}catch{return}if(t.origin===`null`)return;let n=t.pathname.split(`/`);for(let e=n.length-1;e>0;e--){let r=n[e];if(r===`node_modules`)return;if(!Cx.test(r))continue;let i=n[e-1]?.startsWith(`@`)?e-1:e;return t.origin+n.slice(0,i).join(`/`)}}function Tx(){let e=globalThis[bx]?.opts;return e&&typeof e==`object`?e:{}}function Ex(){return Tx().inTabOrder===!0}function Dx(e){if(typeof e!=`string`||!e)return;let t=typeof document>`u`?void 0:document.baseURI;try{return new URL(e,t).href.replace(/\/+$/,``)}catch{return}}function Ox(e){if(!e||typeof e!=`object`)return;let t=new Map;for(let[n,r]of Object.entries(e)){let e=Dx(r);e&&t.set(n,e)}return t.size?t:void 0}function kx(e){if(Array.isArray(e))return new Map(e.filter(e=>typeof e==`string`).map(e=>[e,void 0]));if(e&&typeof e==`object`)return new Map(Object.entries(e).map(([e,t])=>[e,typeof t==`string`?t:void 0]))}function Ax(e,t){let n=Tx(),r=Dx(e.assetRoot??n.assetRoot)??wx(t);return{root:r,speechPath:Dx(e.speechPath??n.speechPath)??(r?`${r}/${Sx}`:void 0),speechLocales:kx(e.speechLocales??n.speechLocales),urls:Ox(e.assetUrls??n.assetUrls)}}function jx(e,t){if(!(!e||!t)){for(let n of[...e.keys()])!t.has(n)&&!xx.includes(n)&&e.delete(n);for(let[n,r]of t)(r||!e.has(n))&&e.set(n,r??n)}}function Mx(e){if(!(!e||e.has(`en`)))return[...e.keys()].find(e=>!xx.includes(e))}var Nx=`pie-mathjax-no-asset-root`,Px={untypeset:`no MathJax loads, so math stays untypeset`,"no-web-fonts":`math renders without web fonts`,"no-web-fonts-or-speech":`math renders without web fonts and speech`},Fx=Symbol.for(`@pie-element/shared-math-rendering-mathjax/no-assets`);function Ix(e){let t=globalThis;t[Fx]??=[];let n=t[Fx];if(n.includes(e))return;n.push(e);let r=`[math-rendering] No asset root for MathJax: ${Px[e]}. Set window['${bx}'].opts.assetRoot to an npm root. See ${yx}`;e===`untypeset`?console.error(r):console.warn(r),!(typeof window>`u`)&&window.dispatchEvent(new CustomEvent(Nx,{detail:{effect:e,message:r,docsUrl:yx}}))}var Lx=`https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page`,Rx=`pie-mathjax-version-conflict`,zx=Symbol.for(`@pie-element/shared-math-rendering-mathjax/unsupported-page`);function Bx(e,t){if(typeof window>`u`)return;let n=globalThis;n[zx]??={logged:!1,conditions:[]};let r=n[zx];if(r.conditions.includes(e))return;r.conditions.push(e);let i=`[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Lx}`;r.logged||(r.logged=!0,console.error(i)),window.dispatchEvent(new CustomEvent(Rx,{detail:{condition:e,message:i,docsUrl:Lx}}))}function Vx(){let e=window.MathJax?.version;return typeof e==`string`&&e.startsWith(`3.`)?e:void 0}function Hx(){return window.MathJax}function Ux(e,{root:t,speechPath:n}){t&&(e.loader={...e.loader,paths:{fonts:`${t}/@mathjax`,"mathjax-newcm":`${t}/@mathjax/mathjax-newcm-font@${vx}`,"mathjax-mhchem-extension":`${t}/@mathjax/mathjax-mhchem-font-extension@${vx}`}}),n&&(e.options={...e.options,worker:{path:n,maps:`${n}/mathmaps`}})}function Wx(e,t){let n=t.srcUrl||(t.root?`${t.root}/mathjax@4.1.3/tex-mml-chtml.js`:void 0);return n?(Ux(e,t),new Promise((t,r)=>{window.MathJax=e;let i=document.createElement(`script`);i.src=n,i.async=!0,i.onload=()=>t(!0),i.onerror=()=>r(Error(`Failed to load MathJax`)),document.head.appendChild(i)})):(Ix(`untypeset`),Promise.resolve(!1))}var Gx=globalThis,Kx=`PIE-MJX-CHTML-styles`,qx=[`MJX-CHTML-styles`,`MJX-SVG-styles`],Jx=Vx,Yx=`http://www.w3.org/1998/Math/MathML`,Xx=/^([a-z_][\w.-]*):math$/,Zx=/^[a-z][a-z0-9-]*$/;function Qx(e){for(let t of e.querySelectorAll(`*`)){let n=Xx.exec(t.tagName.toLowerCase())?.[1];!n||!e.contains(t)||t.closest(`mjx-container`)||t.replaceWith($x(t,`${n}:`))}}function $x(e,t){let n=e.tagName.toLowerCase().slice(t.length);if(!Zx.test(n))return e;let r=e.ownerDocument.createElementNS(Yx,n);for(let t of e.attributes)r.setAttribute(t.name,t.value);for(let n of[...e.childNodes]){let e=n instanceof Element&&n.tagName.toLowerCase().startsWith(t);r.appendChild(e?$x(n,t):n)}return r}var eS=new Set([`updiagonalstrike`,`downdiagonalstrike`,`verticalstrike`,`horizontalstrike`]),tS={thin:`0.035em`,medium:`0.07em`,thick:`0.14em`},nS={tight:`0em`,medium:`0.1em`,loose:`0.2em`},rS=/^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/,iS=/^(#[0-9a-f]{3,8}|[a-z]+)$/i,aS=/^(\d+(\.\d*)?|\.\d+)$/,oS=new Set([`mn`,`mo`,`mi`,`mtext`]),sS=new Set([`stackalign`,`charalign`,`charspacing`,`longdivstyle`]);function cS(e,t,n=[],r={}){let i=e.createElementNS(Yx,t);for(let[e,t]of Object.entries(r))i.setAttribute(e,t);for(let e of n)e&&i.appendChild(e);return i}function lS(e,t){let n=cS(e.document,`mo`);return n.textContent=t,n}function uS(e){let t=cS(e.document,`mn`);return t.textContent=`0`,cS(e.document,`mphantom`,[t])}function dS(e,t){return e.getAttribute(t)?.trim().toLowerCase()||void 0}function fS(e,t){let n=Number.parseInt(e.getAttribute(t)??``,10);return Number.isFinite(n)?n:0}function pS(e){return e.localName===`none`||e.localName===`mrow`&&e.children.length===0&&!e.textContent?.trim()}function mS(e,t,n=e){switch(t){case`left`:return 0;case`center`:return Math.floor(e/2);case`right`:return e;default:return n}}function hS(e,t,n){let r=[],i,a,o=(e,t)=>{let s=e=>t.reduceRight((e,t)=>{let n=t.cloneNode(!1);return n.appendChild(e),n},e);if(e.localName===`mstyle`)for(let n of[...e.children])o(n,[...t,e]);else if(pS(e))r.push(null);else if(e.localName===`mn`&&e.children.length===0){let t=[...(e.textContent??``).trim()];for(let a of t){a===n.decimalPoint&&(i??=r.length);let t=e.cloneNode(!1);t.textContent=a,r.push(s(t))}t.length&&(a??=r.length)}else oS.has(e.localName)&&e.textContent?.trim()===n.decimalPoint&&(i??=r.length),r.push(s(e))};for(let t of e)o(t,[]);return{kind:`digits`,cells:r,anchor:mS(r.length,n.stackAlign,i??a),position:t}}function gS(e){return(e??``).toLowerCase().split(/\s+/).filter(e=>eS.has(e))}function _S(e,t){let n=[...e.children].filter(e=>!pS(e));return n.length<=1?n[0]??null:cS(t.document,`mrow`,n)}function vS(e,t,n){let r=dS(e,`location`)??`n`,i=gS(e.getAttribute(`crossout`)),a=[...e.children].map(e=>pS(e)?null:e.localName===`mscarry`?{content:_S(e,n),location:dS(e,`location`)??r,crossout:e.hasAttribute(`crossout`)?gS(e.getAttribute(`crossout`)):i}:{content:e,location:r,crossout:i}),o=e.getAttribute(`scriptsizemultiplier`)?.trim()??``;return{kind:`carries`,carries:a,anchor:mS(a.length,n.stackAlign),position:t,scale:aS.test(o)?o:`0.6`}}function yS(e){let t=dS(e,`mslinethickness`)??`medium`,n=tS[t]??(rS.test(t)?t:`0.07em`),r=e.getAttribute(`mathcolor`)?.trim()??``;return`${n} solid ${iS.test(r)?r:`currentColor`}`}function bS(e,t,n){let r=Math.max(0,fS(e,`length`));return{kind:`line`,length:r,anchor:mS(r,n.stackAlign),position:t,border:yS(e)}}function xS(e,t,n,r,i){e.forEach((e,a)=>{let o=t+a*n+fS(e,`position`);switch(e.localName){case`msgroup`:xS([...e.children],o,fS(e,`shift`),r,i);break;case`msline`:i.push(bS(e,o,r));break;case`mscarries`:i.push(vS(e,o,r));break;case`msrow`:case`mrow`:i.push(hS([...e.children],o,r));break;default:i.push(hS([e],o,r))}})}function SS(e){return-e.anchor-e.position}function CS(e){return e.kind===`digits`?e.cells.length:e.kind===`carries`?e.carries.length:e.length}function wS(e){return SS(e)+CS(e)-1}function TS(e,t,n,r){let i=e=>cS(r.document,`mpadded`,[t],{width:`0`,...e?{lspace:e}:{}}),a=(e,t)=>cS(r.document,e,t);switch(n){case`s`:return a(`munder`,[e,i(`-0.5width`)]);case`ne`:return a(`msup`,[e,i()]);case`se`:return a(`msub`,[e,i()]);case`nw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),a(`none`,[]),i(`-1width`)]);case`sw`:return a(`mmultiscripts`,[e,a(`mprescripts`,[]),i(`-1width`),a(`none`,[])]);case`w`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[i(`-1width`),e]);case`e`:return t.setAttribute(`scriptlevel`,`+1`),a(`mrow`,[e,i()]);default:return a(`mover`,[e,i(`-0.5width`)])}}function ES(e,t,n){let r=cS(n.document,`menclose`,[e],{notation:t.join(` `),"data-padding":`0.1em`,"data-thickness":`0.067em`}),i=t.some(e=>e.endsWith(`diagonalstrike`))?.167:t.includes(`horizontalstrike`)?.1:0;return i?cS(n.document,`mpadded`,[r],{lspace:`-${i}em`,width:`-${2*i}em`}):r}function DS(e,t,n,r,i){let a=e&&t.crossout.length?ES(e,t.crossout,i):e;if(!t.content)return a;let o=cS(i.document,`mstyle`,[t.content],{scriptsizemultiplier:r});return TS(a??uS(i),o,n,i)}function OS(e,t){return e.carries[t-SS(e)]??null}function kS(e,t,n,r){let i=e.content;n.forEach((e,a)=>{let o=n.length-1-a,s=n[o],c=OS(s,t),l=n.slice(0,o).some(e=>OS(e,t));if(!c&&!l)return;let u=c??{content:uS(r),location:`n`,crossout:[]},d=a===0?u.location:`n`;i=DS(i,u,d,s.scale,r)}),e.content=i}function AS(e,t){let n=e.filter(e=>CS(e)>0),r=Math.min(0,...n.map(SS)),i=Math.max(r,...n.map(wS))-r+1,a=-r,o=[],s=new Map,c=()=>Array.from({length:i},()=>({content:null,borders:{}})),l=e=>e.length===0?Array.from({length:i},(e,t)=>t):Array.from({length:e.length},(t,n)=>a+SS(e)+n),u=[],d=[],f=e=>{let n=c();e.cells.forEach((t,r)=>{n[a+SS(e)+r].content=t}),u.length&&n.forEach((e,n)=>{kS(e,n-a,u,t)});for(let e of d)for(let t of l(e))n[t].borders.top=e.border;u=[],d=[],s.set(e,o.length),o.push(n)};for(let t of e)t.kind===`digits`?f(t):t.kind===`carries`?u.push(t):d.push(t);(u.length||!o.length)&&f({kind:`digits`,cells:[],anchor:0,position:0});let p=o[o.length-1];for(let e of d)for(let t of l(e))p[t].borders.bottom=e.border;return{rows:o,rowOf:s,origin:a}}function jS(e,{rows:t},n){let r=cS(n.document,`mtable`,t.map(e=>cS(n.document,`mtr`,e.map(e=>{let t=Object.entries(e.borders).map(([e,t])=>`border-${e}:${t}`).join(`;`);return cS(n.document,`mtd`,[e.content],{...t?{style:t}:{},...e.align?{columnalign:e.align}:{}})}))));for(let{name:t,value:n}of[...e.attributes])sS.has(t)||r.setAttribute(t,n);let i=dS(e,`charspacing`)??`medium`,a=dS(e,`charalign`);return r.setAttribute(`columnspacing`,nS[i]??(rS.test(i)?i:nS.medium)),r.setAttribute(`columnalign`,a===`left`||a===`center`?a:`right`),r.setAttribute(`rowspacing`,`0`),r.setAttribute(`align`,e.getAttribute(`align`)??`baseline`),r}function MS(e){return{document:e.ownerDocument,stackAlign:dS(e,`stackalign`)??`decimalpoint`,decimalPoint:e.closest(`[decimalpoint]`)?.getAttribute(`decimalpoint`)?.trim().charAt(0)||`.`}}function NS(e){let t=MS(e),n=[];return xS([...e.children],0,0,t,n),jS(e,AS(n,t),t)}function PS(e,t,n,r,i,a){for(let o=n;o<=r;o++)e[t][o].borders[i]=a}function FS(e,t){let n=lS(t,`)`);return n.setAttribute(`minsize`,`1.2em`),[cS(t.document,`mrow`,[e,cS(t.document,`mspace`,[],{width:`0.2em`})]),cS(t.document,`mpadded`,[n],{voffset:`0.1em`,lspace:`-0.15em`,depth:`-0.2em`,height:`-0.2em`})]}function IS(e){let t=MS(e),[n,r,...i]=[...e.children],a=n&&!pS(n)?n:null,o=r&&!pS(r)?r:null,s=dS(e,`longdivstyle`)??`lefttop`,c=yS(e),l=[];xS(i,0,0,t,l);let u=l.find(e=>e.kind===`digits`);u||(u={kind:`digits`,cells:[],anchor:0,position:0},l.unshift(u));let d=[],f=(...e)=>{u.cells.unshift(...e),u.anchor+=e.length},p=(...e)=>{let n=e.flatMap(e=>e?e.localName===`mrow`?[...e.children]:[e]:[]);u.cells.push(...hS(n,0,t).cells)};switch(s){case`left/\\right`:f(a,lS(t,`/`)),p(lS(t,`\\`),o);break;case`left)(right`:f(a,lS(t,`)`)),p(lS(t,`(`),o);break;case`:right=right`:p(lS(t,`:`),a,lS(t,`=`),o);break;case`righttop`:case`stackedleftlinetop`:case`lefttop`:o&&xS([o],0,0,t,d),l.splice(l.indexOf(u),0,...d),s===`righttop`?p(a):s===`stackedleftlinetop`?f(a):f(...FS(a,t));break}let m=AS(l,t),h=m.rows,g=m.rowOf.get(u)??0,_=e=>m.origin+SS(u)+e,v=Math.max(_(u.cells.length-1),...d.map(e=>m.origin+wS(e)));switch(s){case`left/\\right`:case`left)(right`:case`:right=right`:break;case`righttop`:{let e=h[g][_(u.cells.length-1)];e.borders.left=c,e.borders.bottom=c,PS(h,g,_(0),_(u.cells.length-1),`top`,c);break}case`stackedleftlinetop`:{let e=h[g][_(0)];e.borders.right=c,e.borders.bottom=c,PS(h,g,_(1),v,`top`,c);break}case`stackedrightright`:case`mediumstackedrightright`:case`shortstackedrightright`:case`stackedleftleft`:LS(h,g,s,a,o,c,t);break;default:PS(h,g,_(1),v,`top`,c)}return jS(e,m,t)}function LS(e,t,n,r,i,a,o){let s=n===`stackedleftleft`,c=s?`right`:`left`,l=e=>e&&cS(o.document,`mpadded`,[e],{lspace:`0.2em`,width:`+0.4em`});e.length<t+2&&e.push(e[0].map(()=>({content:null,borders:{}}))),e.forEach((e,o)=>{let u={content:null,borders:{},align:s?`right`:`left`};o===t?(u.content=l(r),u.borders={[c]:a,bottom:a}):o===t+1?(u.content=l(i),n!==`shortstackedrightright`&&(u.borders[c]=a)):o>t+1&&(n===`stackedrightright`||s)&&(u.borders[c]=a),s?e.unshift(u):e.push(u)})}function RS(e){for(let t of[...e.querySelectorAll(`mstack, mlongdiv`)])!t.closest(`math`)||t.closest(`mjx-container`)||t.replaceWith(t.localName===`mstack`?NS(t):IS(t))}var zS=`PIE-MJX-explorer-styles`,BS=`var(--pie-text, black)`,VS=`var(--pie-background, #ffffff)`,HS=`var(--pie-border-dark, #66686A)`,US=`var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))`,WS=`color-mix(in srgb, ${US} 15%, transparent)`,GS=`
151
151
  :root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
152
- color: ${zS} !important;
153
- fill: ${zS} !important;
152
+ color: ${BS} !important;
153
+ fill: ${BS} !important;
154
154
  }
155
155
  :root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
156
- background-color: ${US} !important;
156
+ background-color: ${WS} !important;
157
157
  }
158
158
  :root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
159
- fill: ${US} !important;
159
+ fill: ${WS} !important;
160
160
  }
161
161
  :root mjx-container .mjx-selected {
162
- outline: 2px solid ${HS} !important;
162
+ outline: 2px solid ${US} !important;
163
163
  }
164
164
  :root mjx-container [data-sre-highlight-2] {
165
- color: ${zS} !important;
165
+ color: ${BS} !important;
166
166
  background-color: transparent !important;
167
- fill: ${zS} !important;
168
- outline: 2px dashed ${HS} !important;
167
+ fill: ${BS} !important;
168
+ outline: 2px dashed ${US} !important;
169
169
  }
170
170
  :root mjx-container rect[data-sre-highlight-2] {
171
171
  fill: transparent !important;
172
- stroke: ${HS} !important;
172
+ stroke: ${US} !important;
173
173
  stroke-width: 2px !important;
174
174
  vector-effect: non-scaling-stroke;
175
175
  }
176
176
  :root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
177
- color: ${zS} !important;
178
- background-color: ${BS} !important;
179
- border-color: ${VS} !important;
177
+ color: ${BS} !important;
178
+ background-color: ${VS} !important;
179
+ border-color: ${HS} !important;
180
180
  }
181
181
  :root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
182
- color: ${zS} !important;
183
- background-color: ${US} !important;
182
+ color: ${BS} !important;
183
+ background-color: ${WS} !important;
184
184
  }
185
- `;function GS(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=RS,t.textContent=WS,e.head.appendChild(t)}var KS=/[⁡-⁤]/g,qS={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},JS={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},YS={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},XS={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},ZS={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...JS,...YS,...XS},QS=new Set([`|`,`‖`]),$S=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),eC={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},tC={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},nC=e=>(e.textContent??``).replace(KS,``).replace(/\s+/g,` `).trim(),rC=e=>e.replace(/\s+/g,` `).trim(),iC=e=>[...e.children];function aC(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?aC(e.children[0]):!1}function oC(e){let t=e?nC(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function sC(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function cC(e){return eC[e]??e}function lC(e){return ZS[e]??e}function uC(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(yC(r)),n=!0;continue}let e=nC(r);e&&(!n&&qS[e]?t.push(qS[e]):e in XS?t.push(XS[e]):(t.push(lC(e)),n=e in YS||QS.has(e)&&n))}return t.filter(Boolean).join(` `)}function dC(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(nC(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&nC(t)===nC(r)&&!a.some(i)){let e=rC(uC(a));return nC(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return uC(e)}function fC(e,t){let n=e?yC(e):``,r=t?yC(t):``;return aC(e)&&aC(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function pC(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function mC(e,t){let n=t?nC(t):``;if(t&&aC(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in XS)return`${e} ${XS[n]}`}let r=t?yC(t):``;return aC(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function hC(e,t){let n=t?yC(t):``;return aC(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function gC(e,t,n){let r=nC(e);if(r===`lim`)return`limit as ${t?yC(t):``} of`;if(!$S.has(r))return;let i=t?`from ${yC(t)}`:``,a=n?`to ${yC(n)}`:``;return`${lC(r)} ${i} ${a} of`}function _C(e){let t=iC(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>iC(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>rC(uC(iC(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function vC(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=iC(e).map((e,t,n)=>t<n.length-1?`${yC(e)} ${lC(r[Math.min(t,r.length-1)]??`,`)}`:yC(e));return[lC(t),...i,lC(n)].filter(Boolean).join(` `)}function yC(e){let t=iC(e);switch(e.localName){case`mi`:return cC(nC(e));case`mn`:case`mtext`:case`ms`:return nC(e);case`mo`:return lC(nC(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?yC(t[0]):``;case`mfrac`:return fC(t[0],t[1]);case`msqrt`:return pC(rC(uC(t)),`square root`,t.length===1&&aC(t[0]));case`mroot`:{let e=oC(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${sC(e)} root`:`root with index ${t[1]?yC(t[1]):``}`;return pC(t[0]?yC(t[0]):``,n,aC(t[0]))}case`msup`:return mC(t[0]?yC(t[0]):``,t[1]);case`msub`:return hC(t[0]?yC(t[0]):``,t[1]);case`msubsup`:return(t[0]?gC(t[0],t[1],t[2]):void 0)||mC(hC(t[0]?yC(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?gC(n,a,o):void 0;if(s)return s;let c=n?yC(n):``,l=e.localName===`mover`&&r?tC[nC(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${yC(a)} below`:``,o?`with ${yC(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return vC(e);case`mtable`:return _C(e);case`mrow`:case`math`:return dC(t);default:return t.length?uC(t):nC(e)}}function bC(e){return rC(yC(e))}var xC=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function SC(e){if(e.hasAttribute(`aria-label`)||!e.closest(xC))return;let t=e.querySelector(`math`),n=t?bC(t):``;n&&e.setAttribute(`aria-label`,n)}function CC(e){for(let t of e.querySelectorAll(`mjx-container`))SC(t)}var wC=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function TC(){let e=globalThis;e[wC]||(e[wC]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${yx}`))}function EC(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),TC()}function DC(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>EC(e),{once:!0}),a})}`${Sx}`;var OC={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},kC=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,AC=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,jC=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,MC=/\\embed\{newLine\}\[\]/g,NC=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],PC=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),FC=`MJX-CHTML-styles`,IC=`PIE-MJX-SVG-styles`,LC=`PIE-MathJax-Menu-Settings`,RC={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},zC=200,BC=201,VC=202;function HC(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function UC(e){for(let[t,n]of NC)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function WC(e){return UC(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var GC=`mathjax_ignore`,KC=`mathjax_process`;function qC(e,t){let n=e.closest(`.${GC}, .${KC}`);return n!==null&&t.contains(n)&&!n.classList.contains(KC)}function JC(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||qC(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${WC(n)}\\)`.replace(MC,`\\newline `),t.dataset.mathHandled=`true`)}}function YC(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function XC(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?jC:AC).test(e.textContent??``)}function ZC(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=kx(e,{}.url),c={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=Vx();return QC(t)&&$C(t),e}}},startup:{typeset:!1,ready:()=>{let e=Vx(),r=e?.startup,i=QC(e);i&&($C(e),ew(e,s.speechLocales),Ax(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(tw(r?.document),nw(r?.document),r?.document?.addStyles?.(RC),DC(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...OC}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(kC),c.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],c.tex.processEscapes=!0),a||(c.chtml={fontURL:``});let l=jx(s.speechLocales);l&&c.options&&(c.options.sre={locale:l}),Ux(c,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function QC(e){return!!e?.version?.startsWith(`4.`)}function $C(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=Gx);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=IC)}function ew(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=LC;try{let e=localStorage.getItem(LC);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(LC,JSON.stringify(i)):localStorage.removeItem(LC)}catch{}}}function tw(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(HC(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,BC,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&HC(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===FC&&(r.id=Gx),aw()}function nw(e){let t=e=>{e.typesetRoot&&SC(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,VC,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function rw(e){return e instanceof HTMLStyleElement&&Kx.includes(e.id)}function iw(e){zx(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function aw(){let e=document.head,t=[...e.children].find(rw);if(t){iw(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(rw);if(e){iw(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function ow(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=zC&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function sw(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=Vx()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function cw(e){let t=Vx();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():sw(t):ZC(e)}function lw(e){return cw(e).then(()=>{let e=Vx();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function uw(e){let t=Wx,n=t[PC];return n||(n=lw(e),t[PC]=n),n}function dw(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=qx();r&&zx(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),JC(n),Zx(n),YC(n),LS(n);let i=uw(e);if(!XC(n,t)){i.catch(()=>{});return}await i;let a=Vx();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){GS(),ow(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}HC(n),CC(n)}}}var fw=`@pie-lib/math-rendering`,pw=`@pie-lib/math-rendering@2`,mw=`pie-print`,hw=50,gw=1e4,_w=null;function vw(){return!!window[pw]?.opts?.useSingleDollar}function yw(){return _w||=dw({useSingleDollar:vw()}),_w}function bw(){if(typeof window>`u`)return null;let e=window[fw];return typeof e?.renderMath==`function`&&e.renderMath!==ww?e:null}function xw(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===mw)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Sw(){let e=window.renderMath;return typeof e==`function`?e:null}async function Cw(e){let t=xw(e);if(!t)return null;let n=Sw();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+gw;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,hw));let e=Sw();if(e)return e}return null}var ww=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=bw(),i=r||t?null:await Cw(n);return r?(await r.renderMath?.(n),CC(n)):i&&i!==ww?(await i(n),CC(n)):await yw()(n),t?n.innerHTML:void 0},Tw={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},Ew={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},H=e=>typeof e==`string`,Dw=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Ow=e=>e==null?``:``+e,kw=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Aw=/###/g,jw=e=>e&&e.indexOf(`###`)>-1?e.replace(Aw,`.`):e,Mw=e=>!e||H(e),Nw=(e,t,n)=>{let r=H(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Mw(e))return{};let t=jw(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Mw(e)?{}:{obj:e,k:jw(r[i])}},Pw=(e,t,n)=>{let{obj:r,k:i}=Nw(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Nw(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Nw(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Fw=(e,t,n,r)=>{let{obj:i,k:a}=Nw(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Iw=(e,t)=>{let{obj:n,k:r}=Nw(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Lw=(e,t,n)=>{let r=Iw(e,n);return r===void 0?Iw(t,n):r},Rw=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?H(e[r])||e[r]instanceof String||H(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Rw(e[r],t[r],n):e[r]=t[r]);return e},zw=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Bw={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Vw=e=>H(e)?e.replace(/[&<>"'\/]/g,e=>Bw[e]):e,Hw=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Uw=[` `,`,`,`?`,`!`,`;`],Ww=new Hw(20),Gw=(e,t,n)=>{t||=``,n||=``;let r=Uw.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Ww.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},Kw=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},qw=e=>e?.replace(/_/g,`-`),Jw={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Yw=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Jw,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(H(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Xw=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Zw=class extends Xw{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):H(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Iw(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!H(n)?s:Kw(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Pw(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(H(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Iw(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Rw(s,n,i):s={...s,...n},Pw(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Qw={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},$w=Symbol(`i18next/PATH_KEY`);function eT(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===$w?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function tT(e,t){let{[$w]:n}=e(eT()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var nT={},rT=e=>!H(e)&&typeof e!=`boolean`&&typeof e!=`number`,iT=class e extends Xw{constructor(e,t={}){super(),kw([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Yw.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=rT(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Gw(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:H(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:H(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=tT(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?tT(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!H(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=rT(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(H(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:rT(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&H(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=H(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!H(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=H(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Qw.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return H(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?tT(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!H(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(H(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!nT[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(nT[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!H(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},aT=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Yw.create(`languageUtils`)}getScriptPartFromCode(e){if(e=qw(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=qw(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(H(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),H(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return H(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):H(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},oT={zero:0,one:1,two:2,few:3,many:4,other:5},sT={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},cT=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Yw.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=qw(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),sT;if(!e.match(/-|_/))return sT;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>oT[e]-oT[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},lT=(e,t,n,r=`.`,i=!0)=>{let a=Lw(e,t,n);return!a&&i&&H(n)&&(a=Kw(e,n,r),a===void 0&&(a=Kw(t,n,r))),a},uT=e=>e.replace(/\$/g,`$$$$`),dT=class{constructor(e={}){this.logger=Yw.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Vw:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?zw(i):a||`{{`,this.suffix=o?zw(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?zw(d):f||zw(`$t(`),this.nestingSuffix=p?zw(p):m||zw(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=lT(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(lT(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>uT(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?uT(this.escape(e)):uT(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=H(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!H(a)&&!this.useRawValueToEscape&&(a=Ow(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${zw(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!H(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!H(i))return i;H(i)||(i=Ow(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},fT=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},pT=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(qw(r),i),t[o]=s),s(n)}},mT=e=>(t,n,r)=>e(qw(n),r)(t),hT=class{constructor(e={}){this.logger=Yw.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?pT:mT;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=pT(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=fT(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},gT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},_T=class extends Xw{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Yw.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Fw(n.loaded,[i],a),gT(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();H(e)&&(e=this.languageUtils.toResolveHierarchy(e)),H(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},vT=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),H(e[1])&&(t.defaultValue=e[1]),H(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),yT=e=>(H(e.ns)&&(e.ns=[e.ns]),H(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),H(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),bT=()=>{},xT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},ST=`__i18next_supportNoticeShown`,CT=()=>!!(typeof globalThis<`u`&&globalThis[ST]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),wT=()=>{typeof globalThis<`u`&&(globalThis[ST]=!0)},TT=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),ET=class e extends Xw{constructor(e={},t){if(super(),this.options=yT(e),this.services={},this.logger=Yw,this.modules={external:[]},xT(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(H(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=vT();this.options={...n,...this.options,...yT(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!TT(this)&&!CT()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),wT());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Yw.init(r(this.modules.logger),this.options):Yw.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:hT;let t=new aT(this.options);this.store=new Zw(this.options.resources,this.options);let i=this.services;i.logger=Yw,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new cT(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new dT(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new _T(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new iT(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=bT,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Dw(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=bT){let n=t,r=H(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Dw();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=bT,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Qw.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Dw();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=H(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(H(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=tT(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=tT(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=tT(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return H(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Dw();return this.options.ns?(H(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Dw();H(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new aT(vT());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=bT){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Zw(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...vT().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new dT(n)}return a.translator=new iT(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();ET.createInstance,ET.dir,ET.init,ET.loadResources,ET.reloadResources,ET.use,ET.changeLanguage,ET.getFixedT,ET.t,ET.exists,ET.setDefaultNamespace,ET.hasLoadedNamespace,ET.loadNamespaces,ET.loadLanguages,ET.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Tw,es:Ew}});var DT={translator:{...ET,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return ET.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},OT=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,kT=e=>N.useState(()=>OT(e))[0],{translator:AT}=DT,jT=I(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:gb(),cursor:`pointer`}),MT=I(`span`)({borderBottom:`1px dotted currentColor`}),NT=I(_x)(({theme:e})=>({paddingTop:e.spacing(2)})),PT=class extends N.Component{static propTypes={className:O.string,children:O.object,labels:O.shape({visible:O.string,hidden:O.string}),language:O.string};static defaultProps={labels:{}};state={expanded:!1};panelId=OT(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){ww(this.root)}componentDidUpdate(){ww(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||AT.t(`common:hide`,{lng:r}):e.hidden||AT.t(`common:show`,{lng:r});return(0,P.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,P.jsx)(`div`,{children:(0,P.jsx)(jT,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,P.jsx)(MT,{children:a})})}),(0,P.jsx)(`div`,{id:this.panelId,children:(0,P.jsx)(NT,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}},FT=Lm((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`),IT=Lm((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`),LT=I(`div`)({display:`flex`,flexDirection:`column`}),RT=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),zT=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),BT=I(Lh)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),VT=e=>{class t extends N.Component{static propTypes={session:O.object,onSessionChange:O.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)(LT,{children:[(0,P.jsxs)(RT,{children:[(0,P.jsxs)(BT,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(zT,{children:(0,P.jsx)(IT,{})}),`Undo`]}),(0,P.jsxs)(BT,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(zT,{children:(0,P.jsx)(FT,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},HT=yc({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`}}}}}}),UT=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),WT=class extends N.Component{static propTypes={className:O.string,children:O.array,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=OT(`extra-css-rules`);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)(ti,{injectFirst:!0,children:(0,P.jsxs)(kc,{theme:HT,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,P.jsx)(UT,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}},GT=I(WT)({display:`flex`,flexDirection:`column`,position:`relative`}),KT=class extends N.Component{static propTypes={ariaLabel:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired,role:O.string,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,P.jsx)(GT,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},qT=class extends N.Component{static propTypes={tag:O.string,className:O.string,html:O.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:Ry(n)}})}};function JT({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 YT=N.createContext(void 0);function XT(){return N.useContext(YT)}function ZT(e){return Ba(`MuiFormLabel`,e)}var QT=Va(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),$T=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return ls({root:[`root`,`color${R(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},ZT,t)},eE=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]}})(Rc(({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(ph()).map(([t])=>({props:{color:t},style:{[`&.${QT.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${QT.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${QT.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),tE=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Rc(({theme:e})=>({[`&.${QT.error}`]:{color:(e.vars||e).palette.error.main}}))),nE=N.forwardRef(function(e,t){let n=zc({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=JT({props:n,muiFormControl:XT(),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=$T(m);return(0,P.jsxs)(eE,{as:o,ownerState:m,className:Ra(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(tE,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function rE(e){return Ba(`MuiInputLabel`,e)}Va(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var iE=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=ls({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${R(r)}`,o],asterisk:[s&&`asterisk`]},rE,t);return{...t,...c}},aE=I(nE,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${QT.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]]}})(Rc(({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)`}}]}))),oE=N.forwardRef(function(e,t){let n=zc({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=XT(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=JT({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=iE(f);return(0,P.jsx)(aE,{"data-shrink":u,ref:t,className:Ra(p.root,s),...c,ownerState:f,classes:p})});function sE(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function cE(e,t=!1){return e&&(sE(e.value)&&e.value!==``||t&&sE(e.defaultValue)&&e.defaultValue!==``)}function lE(e){return e.startAdornment}function uE(e){return Ba(`MuiFormControl`,e)}Va(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var dE=e=>{let{classes:t,margin:n,fullWidth:r}=e;return ls({root:[`root`,n!==`none`&&`margin${R(n)}`,r&&`fullWidth`]},uE,t)},fE=I(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${R(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%`}}]}),pE=I(N.forwardRef(function(e,t){let n=zc({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=dE(_),[y,b]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{if(!Bm(t,[`Input`,`Select`]))return;let n=Bm(t,[`Select`])?t.props.input:t;n&&lE(n.props)&&(e=!0)}),e}),[x,S]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{Bm(t,[`Input`,`Select`])&&(cE(t.props,!0)||cE(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)(YT.Provider,{value:O,children:(0,P.jsx)(fE,{as:o,ownerState:_,className:Ra(v.root,i),ref:t,...g,children:r})})}))(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),mE=I(oE)(()=>({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)`}})),hE=({label:e,className:t,children:n})=>(0,P.jsxs)(pE,{className:t,children:[(0,P.jsx)(mE,{shrink:!0,children:e}),n]});hE.propTypes={label:O.oneOfType([O.string,O.object]).isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var{translator:gE}=DT,_E=`pie-prompt-audio-player`,vE=`play-audio-button`,yE=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,bE=I(`div`)(({theme:e,tagName:t})=>({[`& .${vE}:focus-visible`]:{outline:`2px solid ${Nb()}`,outlineOffset:`2px`},[yE(`: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:Sb()},[yE(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:wb()},[yE(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:wb()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[yE(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:Uy()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Uy()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),xE=/\\embed\{newLine\}\[\]/g,SE=`\\newline `,CE=`preview-prompt`,wE=class extends N.Component{static propTypes={prompt:O.string,tagName:O.string,className:O.string,onClick:O.func,defaultClassName:O.string,autoplayAudioEnabled:O.bool,customAudioButton:O.shape({playImage:O.string,pauseImage:O.string}),language:O.string};static defaultProps={onClick:()=>{}};promptRef=N.createRef();audioId=OT(_E);playButtonId=OT(vE);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=Ry(e);let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(_E),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,gE.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=vE,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${vE}`),i=n?.querySelector(`.${_E}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._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 ww==`function`&&ww(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`:``} ${CE}`.trim();return(0,P.jsx)(bE,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(xE,SE)}})}},TE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-readable":e.false===void 0}))});TE.propTypes={children:O.node,false:O.bool};var EE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-purpose":e.purpose}))});EE.propTypes={children:O.node,purpose:O.string};var DE;typeof window<`u`&&(DE=new DOMParser);var OE=e=>DE.parseFromString(e,`text/html`).body.textContent,kE=e=>{if(!e)return!1;let t=OE(e);return!!(t&&t.trim())},AE;typeof window<`u`&&(AE=new DOMParser);var jE=e=>{if(!e)return!1;let t=AE.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},ME=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXM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AUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function NE(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}var PE=N.createContext({});function FE(e){return Ba(`MuiList`,e)}Va(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var IE=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ls({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},FE,t)},LE=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}}]}),RE=N.forwardRef(function(e,t){let n=zc({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=IE(d);return(0,P.jsx)(PE.Provider,{value:u,children:(0,P.jsxs)(LE,{as:a,className:Ra(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),zE=vg;function BE(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function VE(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function HE(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 UE(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`)||!HE(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var WE=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});Wm(()=>{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=`${zE(Um(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=jg(Vm(t));if(n===`ArrowDown`)e.preventDefault(),UE(t,r,c,s,BE);else if(n===`ArrowUp`)e.preventDefault(),UE(t,r,c,s,VE);else if(n===`Home`)e.preventDefault(),UE(t,null,c,s,BE);else if(n===`End`)e.preventDefault(),UE(t,null,c,s,VE);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&&HE(r,i);i.previousKeyMatched&&(c||UE(t,r,!1,s,BE,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=xl(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)(RE,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function GE(e){return Ba(`MuiMenu`,e)}Va(`MuiMenu`,[`root`,`paper`,`list`]);var KE={vertical:`top`,horizontal:`right`},qE={vertical:`top`,horizontal:`left`},JE=e=>{let{classes:t}=e;return ls({root:[`root`],paper:[`paper`],list:[`list`]},GE,t)},YE=I(g_,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),XE=I(h_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),ZE=I(WE,{name:`MuiMenu`,slot:`List`})({outline:0}),QE=N.forwardRef(function(e,t){let n=zc({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=Oo(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=JE(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=Dd({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Gd(`paper`,{className:x.paper,elementType:XE,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Gd(`list`,{className:Ra(x.list,s.className),elementType:ZE,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,P.jsx)(YE,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?KE:qE,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,P.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),$E=({slotProps:e,...t})=>(0,P.jsx)(QE,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),eD=s({Collapsible:()=>PT,EnableAudioAutoplayImage:()=>ME,Feedback:()=>tx,HtmlAndMath:()=>qT,InlineMenu:()=>$E,InputContainer:()=>hE,PreviewLayout:()=>KT,PreviewPrompt:()=>wE,Purpose:()=>EE,Readable:()=>TE,UiLayout:()=>WT,color:()=>Vy,createUniqueId:()=>OT,hasMedia:()=>jE,hasText:()=>kE,indicators:()=>nx,transformDataHeadings:()=>NE,useUniqueId:()=>kT,withUndoReset:()=>VT}),{translator:tD}=DT;function nD(e,t){if(!e)return;let n=tD.t(`mathInput.enterAnswer`,{lng:t});for(let t of e.querySelectorAll(`.mq-editable-field > .mq-textarea > textarea`))t.setAttribute(`aria-label`,n)}function U(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]}U.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},U.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},U.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},U.prototype.attr=function(e,t){return t===oD?this.elements[0]?this.elements[0].getAttribute(e):oD:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},U.prototype.html=function(e){return e===oD?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},U.prototype.append=function(e){var t=e instanceof U?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},U.prototype.prepend=function(e){var t=e instanceof U?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},U.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 U)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},U.prototype.appendTo=function(e){var t=e instanceof U?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},U.prototype.prependTo=function(e){var t=e instanceof U?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},U.prototype.insertBefore=function(e){var t=e instanceof U?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},U.prototype.insertAfter=function(e){var t=e instanceof U?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},U.prototype.replaceWith=function(e){var t=[];return e instanceof U?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},U.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},U.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},U.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 U(t)},U.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 U(t)},U.prototype.closest=function(e){return new U(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},U.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new U(e)},U.prototype.filter=function(e){return new U(this.elements.filter(function(t,n){return e(n,t)}))},U.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},U.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},U.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function rD(e){return(e||``).split(`.`)[0]}U.prototype.on=function(e,t){var n=rD(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},U.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=rD(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},U.prototype.off=function(e,t){var n=rD(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},U.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=rD(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},U.prototype.trigger=function(e){var t=new Event(rD(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},U.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},U.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){U.prototype[e]=function(t){return this.on(e,t)}}),U.prototype.next=function(e){return new U(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},U.prototype.prev=function(e){return new U(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},U.prototype.parent=function(){return new U(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},U.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)}},U.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},U.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},U.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},U.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},U.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},U.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},U.prototype.css=function(e,t){if(t===oD){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):oD}}else this.elements.forEach(function(n){n.style[e]=t});return this},U.prototype.scrollTop=function(e){var t=this.elements[0];return e===oD?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)},U.prototype.scrollLeft=function(e){var t=this.elements[0];return e===oD?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)},U.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},U.prototype.eq=function(e){return new U([this.elements[e]])},U.prototype.get=function(e){return e===oD?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},U.prototype.add=function(e){var t=this.elements.slice();return e instanceof U?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new U(t)},U.prototype.first=function(){return new U([this.elements[0]])},U.prototype.last=function(){return new U([this.elements[this.elements.length-1]])},U.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 U?e.elements[0]:e;return this.elements.indexOf(n)},U.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},U.prototype.text=function(e){return e===oD?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},U.prototype.val=function(e){var t=this.elements[0];return t?e===oD?t.value===oD?t.textContent:t.value:(this.elements.forEach(function(t){t.value===oD?t.textContent=e:t.value=e}),this):oD};function iD(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(U.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var W=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 U?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof U?e.elements:e.length===oD?[]:Array.from(e);return iD(n)};W.contains=function(e,t){return e!==t&&e.contains(t)};var aD=W,oD,sD=`mathquill-command-id`,cD=`mathquill-block-id`,lD=Math.min,uD=Math.max;function dD(){}var fD=[].slice;function pD(e){var t=e.length-1;return function(){var n=fD.call(arguments,0,t),r=fD.call(arguments,t);return e.apply(this,n.concat([r]))}}var mD=pD(function(e,t){return pD(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function hD(e){return pD(function(t,n){return typeof t!=`function`&&(t=mD(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function G(e){var t=fD.call(arguments,1);return function(){return e.apply(this,t)}}function gD(e,t){if(!t)throw Error(`prayer failed: `+e)}var K=(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),q=-1,J=1;function _D(e){gD(`a direction was passed`,e===q||e===J)}var vD=K(function(e){e.parent=0,e[q]=0,e[J]=0,e.init=function(e,t,n){this.parent=e,this[q]=t,this[J]=n},this.copy=function(e){return vD(e.parent,e[q],e[J])}}),yD=K(function(e){e[q]=0,e[J]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),yD.byId[this.id]=this,this.ends={},this.ends[q]=0,this.ends[J]=0},e.dispose=function(){delete yD.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=W(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=W(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&yD.byId[n].jQadd(e),r&&yD.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){_D(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[q],t[J]),n},e.createLeftOf=function(e){return this.createDir(q,e)},e.selectChildren=function(e,t){return TD(e,t)},e.bubble=hD(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=hD(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[q]===0&&this.ends[J]===0},e.isStyleBlock=function(){return!1},e.children=function(){return xD(this.ends[q],this.ends[J])},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 xD(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return xD(this,this).adopt(e,t,n),this},e.disown=function(){return xD(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function bD(e,t,n){gD(`a parent is always present`,e),t&&(t[J]!==n&&(t[J]=n),t.parent!==e&&(t.parent=e)),n&&(n[q]!==t&&(n[q]=t),n.parent!==e&&(n.parent=e)),gD(`leftward is properly set up`,(function(){return t?t[J]===n&&t.parent===e:e.ends[q]===n})()),gD(`rightward is properly set up`,(function(){return n?n[q]===t&&n.parent===e:e.ends[J]===t})())}var xD=K(function(e){e.init=function(e,t,n){if(n===oD&&(n=q),_D(n),gD(`no half-empty fragments`,!e==!t),this.ends={},e){gD(`withDir is passed to Fragment`,e instanceof yD),gD(`oppDir is passed to Fragment`,t instanceof yD),gD(`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=W(),e.withDirAdopt=function(e,t,n,r){return e===q?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){bD(e,t,n);var r=this;r.disowned=!1;var i=r.ends[q];if(!i)return this;var a=r.ends[J];return t||(e.ends[q]=i),n?n[q]=a:e.ends[J]=a,r.ends[J][J]=n,r.each(function(n){n[q]=t,n.parent=e,t&&(t[J]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[q];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[J],r=t.parent;return bD(r,t[q],t),bD(r,n,n[J]),t[q]?t[q][J]=n[J]:r.ends[q]=n[J],n[J]?n[J][q]=t[q]:r.ends[J]=t[q],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=hD(function(e){var t=this,n=t.ends[q];if(!n)return t;for(;n!==t.ends[J][J]&&e(n)!==!1;n=n[J]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Y={},SD={},CD={},wD=K(vD,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=W(`<span class="mq-cursor">&#8203;</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[J]?this.selection&&this.selection.ends[q][q]===this[q]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[J].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=W(),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 _D(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(q,e)},e.insRightOf=function(e){return this.insDirOf(J,e)},e.insAtDirEnd=function(e,t){return _D(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(q,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(J,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=vD.copy(n);var r=n.upDownCache[t.id];if(r)r[J]?n.insLeftOf(r[J]):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[J],r=this,i=e[q];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[J])}),!this[J])if(this[q])this[J]=this[q][J];else for(;!this[J];)if(this.parent=this.parent[J],this.parent)this[J]=this.parent.ends[q];else{this[J]=e[J],this.parent=t;break}this[J]?this.insLeftOf(this[J]):this.insAtRightEnd(t),e.jQ.remove(),e[q].siblingDeleted&&e[q].siblingDeleted(r.options,J),e[J].siblingDeleted&&e[J].siblingDeleted(r.options,q)},e.startSelection=function(){for(var e=this.anticursor=vD.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[q]===e[q]&&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=J;if(n[q]!==r){for(var s=n;s;s=s[J])if(s[J]===r[J]){o=q,i=n,a=r;break}}return o===J&&(i=r,a=n),i instanceof vD&&(i=i[J]),a instanceof vD&&(a=a[q]),!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[q]=this.selection.ends[q][q],this[J]=this.selection.ends[J][J],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[q]=e.ends[q][q],this[J]=e.ends[J][J],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof WD);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==oD)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}}),TD=K(xD,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]()})}}),ED=K(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=wD(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===q||t===J?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}}),DD={},OD=K(),kD={},AD=K(),jD={};function MD(){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:
185
+ `;function KS(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=zS,t.textContent=GS,e.head.appendChild(t)}var qS=/[⁡-⁤]/g,JS={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},YS={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},XS={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},ZS={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},QS={"+":`plus`,"-":`minus`,"−":`minus`,"±":`plus or minus`,"∓":`minus or plus`,"×":`times`,"⋅":`times`,"·":`times`,"*":`times`,"÷":`divided by`,"/":`divided by`,"=":`equals`,"≠":`does not equal`,"<":`is less than`,">":`is greater than`,"≤":`is less than or equal to`,"≥":`is greater than or equal to`,"≈":`is approximately equal to`,"≡":`is equivalent to`,"∝":`is proportional to`,"∈":`is an element of`,"∉":`is not an element of`,"⊂":`is a subset of`,"⊆":`is a subset of or equal to`,"∪":`union`,"∩":`intersection`,"→":`right arrow`,"←":`left arrow`,"⇒":`implies`,"⇔":`if and only if`,"∑":`sum`,"∏":`product`,"∫":`integral`,"∞":`infinity`,"∠":`angle`,"⊥":`is perpendicular to`,"∥":`is parallel to`,"∴":`therefore`,",":`comma`,";":`semicolon`,":":`colon`,"|":`vertical bar`,"‖":`double vertical bar`,...YS,...XS,...ZS},$S=new Set([`|`,`‖`]),eC=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),tC={α:`alpha`,β:`beta`,γ:`gamma`,δ:`delta`,ε:`epsilon`,θ:`theta`,λ:`lambda`,μ:`mu`,π:`pi`,ρ:`rho`,σ:`sigma`,τ:`tau`,φ:`phi`,ω:`omega`,Δ:`capital delta`,Σ:`capital sigma`,Ω:`capital omega`,"∞":`infinity`,sin:`sine`,cos:`cosine`,tan:`tangent`,sec:`secant`,csc:`cosecant`,cot:`cotangent`,ln:`natural log`,lim:`limit`},nC={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},rC=e=>(e.textContent??``).replace(qS,``).replace(/\s+/g,` `).trim(),iC=e=>e.replace(/\s+/g,` `).trim(),aC=e=>[...e.children];function oC(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?oC(e.children[0]):!1}function sC(e){let t=e?rC(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function cC(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function lC(e){return tC[e]??e}function uC(e){return QS[e]??e}function dC(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(bC(r)),n=!0;continue}let e=rC(r);e&&(!n&&JS[e]?t.push(JS[e]):e in ZS?t.push(ZS[e]):(t.push(uC(e)),n=e in XS||$S.has(e)&&n))}return t.filter(Boolean).join(` `)}function fC(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(rC(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&rC(t)===rC(r)&&!a.some(i)){let e=iC(dC(a));return rC(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return dC(e)}function pC(e,t){let n=e?bC(e):``,r=t?bC(t):``;return oC(e)&&oC(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function mC(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function hC(e,t){let n=t?rC(t):``;if(t&&oC(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in ZS)return`${e} ${ZS[n]}`}let r=t?bC(t):``;return oC(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function gC(e,t){let n=t?bC(t):``;return oC(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function _C(e,t,n){let r=rC(e);if(r===`lim`)return`limit as ${t?bC(t):``} of`;if(!eC.has(r))return;let i=t?`from ${bC(t)}`:``,a=n?`to ${bC(n)}`:``;return`${uC(r)} ${i} ${a} of`}function vC(e){let t=aC(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>aC(e).filter(e=>e.localName===`mtd`)),r=Math.max(0,...n.map(e=>e.length)),i=n.map((e,t)=>`row ${t+1}: ${e.map(e=>iC(dC(aC(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function yC(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=aC(e).map((e,t,n)=>t<n.length-1?`${bC(e)} ${uC(r[Math.min(t,r.length-1)]??`,`)}`:bC(e));return[uC(t),...i,uC(n)].filter(Boolean).join(` `)}function bC(e){let t=aC(e);switch(e.localName){case`mi`:return lC(rC(e));case`mn`:case`mtext`:case`ms`:return rC(e);case`mo`:return uC(rC(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?bC(t[0]):``;case`mfrac`:return pC(t[0],t[1]);case`msqrt`:return mC(iC(dC(t)),`square root`,t.length===1&&oC(t[0]));case`mroot`:{let e=sC(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${cC(e)} root`:`root with index ${t[1]?bC(t[1]):``}`;return mC(t[0]?bC(t[0]):``,n,oC(t[0]))}case`msup`:return hC(t[0]?bC(t[0]):``,t[1]);case`msub`:return gC(t[0]?bC(t[0]):``,t[1]);case`msubsup`:return(t[0]?_C(t[0],t[1],t[2]):void 0)||hC(gC(t[0]?bC(t[0]):``,t[1]),t[2]);case`munder`:case`mover`:case`munderover`:{let[n,r,i]=t,a=e.localName===`mover`?void 0:r,o=e.localName===`munder`?void 0:e.localName===`mover`?r:i,s=n?_C(n,a,o):void 0;if(s)return s;let c=n?bC(n):``,l=e.localName===`mover`&&r?nC[rC(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${bC(a)} below`:``,o?`with ${bC(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return yC(e);case`mtable`:return vC(e);case`mrow`:case`math`:return fC(t);default:return t.length?dC(t):rC(e)}}function xC(e){return iC(bC(e))}var SC=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function CC(e){if(e.hasAttribute(`aria-label`)||!e.closest(SC))return;let t=e.querySelector(`math`),n=t?xC(t):``;n&&e.setAttribute(`aria-label`,n)}function wC(e){for(let t of e.querySelectorAll(`mjx-container`))CC(t)}var TC=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function EC(){let e=globalThis;e[TC]||(e[TC]=!0,console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${yx}`))}function DC(e){let t=e.webworker;if(!t||t.ready)return;e.options??={};let n=e.options;n.enableSpeech=!1,n.enableBraille=!1,n.speechError=()=>{},t.Post=()=>Promise.reject(Error(`The speech worker did not start`)),t.Terminate(),EC()}function OC(e){let t=e?.adaptor,n=t?.createWorker;!e||!t||!n||(t.createWorker=async(r,i)=>{let a=await n.call(t,r,i);return a.addEventListener(`error`,()=>DC(e),{once:!0}),a})}`${Sx}`;var kC={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},AC=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,jC=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,MC=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,NC=/\\embed\{newLine\}\[\]/g,PC=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],FC=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),IC=`MJX-CHTML-styles`,LC=`PIE-MJX-SVG-styles`,RC=`PIE-MathJax-Menu-Settings`,zC={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},BC=200,VC=201,HC=202;function UC(e){let t=[...e.matches(`mjx-container`)?[e]:[],...e.querySelectorAll(`mjx-container`)];for(let e of t)for(let t of[e,...e.querySelectorAll(`[data-latex],[data-latex-item]`)])t.removeAttribute(`data-latex`),t.removeAttribute(`data-latex-item`)}function WC(e){for(let[t,n]of PC)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function GC(e){return WC(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var KC=`mathjax_ignore`,qC=`mathjax_process`;function JC(e,t){let n=e.closest(`.${KC}, .${qC}`);return n!==null&&t.contains(n)&&!n.classList.contains(qC)}function YC(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||JC(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${GC(n)}\\)`.replace(NC,`\\newline `),t.dataset.mathHandled=`true`)}}function XC(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function ZC(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?MC:jC).test(e.textContent??``)}function QC(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=Ax(e,{}.url),c=Ex(),l={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=Hx();return $C(t)&&ew(t),e}}},startup:{typeset:!1,ready:()=>{let e=Hx(),r=e?.startup,i=$C(e);i&&(ew(e),tw(e,s.speechLocales),jx(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(nw(r?.document),rw(r?.document),r?.document?.addStyles?.(zC),OC(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...kC}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:c}},a11y:{inTabOrder:c}}};r&&l.tex&&(console.warn(AC),l.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],l.tex.processEscapes=!0),a||(l.chtml={fontURL:``});let u=Mx(s.speechLocales);u&&l.options&&(l.options.sre={locale:u}),Wx(l,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function $C(e){return!!e?.version?.startsWith(`4.`)}function ew(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=Kx);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=LC)}function tw(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=RC;try{let e=localStorage.getItem(RC);if(!e)return;let{assistiveMml:n,locale:r,...i}=JSON.parse(e),a=r===void 0||!t||t.has(r);if(n===void 0&&a)return;a&&r!==void 0&&(i.locale=r),Object.keys(i).length?localStorage.setItem(RC,JSON.stringify(i)):localStorage.removeItem(RC)}catch{}}}function nw(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(UC(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,VC,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&UC(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===IC&&(r.id=Kx),ow()}function rw(e){let t=e=>{e.typesetRoot&&CC(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,HC,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function iw(e){return e instanceof HTMLStyleElement&&qx.includes(e.id)}function aw(e){Bx(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function ow(){let e=document.head,t=[...e.children].find(iw);if(t){aw(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(iw);if(e){aw(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function sw(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=BC&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function cw(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=Hx()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function lw(e){let t=Hx();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():cw(t):QC(e)}function uw(e){return lw(e).then(()=>{let e=Hx();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function dw(e){let t=Gx,n=t[FC];return n||(n=uw(e),t[FC]=n),n}function fw(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=Jx();r&&Bx(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),YC(n),Qx(n),XC(n),RS(n);let i=dw(e);if(!ZC(n,t)){i.catch(()=>{});return}await i;let a=Hx();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){KS(),sw(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}UC(n),wC(n)}}}var pw=`@pie-lib/math-rendering`,mw=`@pie-lib/math-rendering@2`,hw=`pie-print`,gw=50,_w=1e4,vw=null;function yw(){return!!window[mw]?.opts?.useSingleDollar}function bw(){return vw||=fw({useSingleDollar:yw()}),vw}function xw(){if(typeof window>`u`)return null;let e=window[pw];return typeof e?.renderMath==`function`&&e.renderMath!==Tw?e:null}function Sw(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===hw)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Cw(){let e=window.renderMath;return typeof e==`function`?e:null}async function ww(e){let t=Sw(e);if(!t)return null;let n=Cw();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+_w;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,gw));let e=Cw();if(e)return e}return null}var Tw=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=xw(),i=r||t?null:await ww(n);return r?(await r.renderMath?.(n),wC(n)):i&&i!==Tw?(await i(n),wC(n)):await bw()(n),t?n.innerHTML:void 0},Ew={translation:{categorize:{limitMaxChoicesPerCategory:`You've reached the limit of {{maxChoicesPerCategory}} responses per area. To add another response, one must first be removed.`,maxChoicesPerCategoryRestriction:`To change this value to {{maxChoicesPerCategory}}, each category must have {{maxChoicesPerCategory}} or fewer answer choice[s].`},dragInTheBlank:{blank:`Blank {{index}}`},ebsr:{part:`Part {{index}}`,twoPartQuestion:`Two-Part Question`},editableHtml:{responseAreaToolbar:`Response area`,toolbar:`Editing tools`,buttons:{insertTable:`Insert table`,addTableRow:`Add table row`,removeTableRow:`Remove table row`,addTableColumn:`Add table column`,removeTableColumn:`Remove table column`,removeTable:`Remove table`,tableBorders:`Table borders`,bold:`Bold`,italic:`Italic`,strikethrough:`Strikethrough`,code:`Code`,underline:`Underline`,subscript:`Subscript`,superscript:`Superscript`,insertImage:`Insert image`,insertVideo:`Insert video`,insertAudio:`Insert audio`,cssClasses:`CSS classes`,blockquote:`Blockquote`,heading:`Heading`,insertMath:`Insert math`,spanishCharacters:`Spanish characters (ñ)`,specialCharacters:`Special characters (€)`,textAlignment:`Text alignment`,bulletedList:`Bulleted list`,numberedList:`Numbered list`,done:`Done`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Fill in the Blank Question`,response:`Response {{index}} of {{total}}`},extendedTextEntry:{comment:`Comment`,constructedResponseQuestion:`Constructed Response Question`,response:`Your response`,writtenResponseQuestion:`Written Response Question`},fractionModel:{modelLabel_one:`Model {{index}} of {{total}}: {{selected}} of {{count}} part selected`,modelLabel_other:`Model {{index}} of {{total}}: {{selected}} of {{count}} parts selected`},numberLine:{addElementLimit_one:`You can only add {{count}} element`,addElementLimit_other:`You can only add {{count}} elements`,clearAll:`Clear all`,closedEnd:`closed`,elementCorrect:`Correct.`,elementIncorrect:`Incorrect.`,graphLabel:`Number line from {{min}} to {{max}}, with a tick every {{interval}}`,line:`Line from {{left}} ({{leftEnd}}) to {{right}} ({{rightEnd}}).`,openEnd:`open`,plottedNone:`Nothing is plotted.`,pointClosed:`Closed point at {{position}}.`,pointOpen:`Open point at {{position}}.`,rayLeft:`Ray from {{position}} ({{end}}) to the left.`,rayRight:`Ray from {{position}} ({{end}}) to the right.`},hotspot:{correctlySelected:`Correctly selected`,image_one:`Image with {{count}} hotspot`,image_other:`Image with {{count}} hotspots`,shape:`Hotspot {{index}} of {{total}}`,shouldHaveBeenSelected:`Should have been selected`,shouldNotHaveBeenSelected:`Should not have been selected`},imageClozeAssociation:{answerChoice:`Answer choice {{index}} of {{total}}`,image_one:`Image with {{count}} response area`,image_other:`Image with {{count}} response areas`,reachedLimit_one:`You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.`,reachedLimit_other:`Full`,responseArea:`Response area {{index}} of {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Inline Dropdown Question`,query:`Query`,queryNumber:`Query {{index}}`,showRationaleForChoices:`Show Rationale for choices`,hideRationaleForChoices:`Hide Rationale for choices`},drawingResponse:{fillColor:`Fill color`,outlineColor:`Outline color`,noFill:`No fill`,lightblue:`Light blue`,lightyellow:`Light yellow`,red:`Red`,orange:`Orange`,yellow:`Yellow`,violet:`Violet`,blue:`Blue`,green:`Green`,white:`White`,black:`Black`,onDoubleClick:`Double click to edit this text. Press Enter to submit.`,drawingArea:`Drawing area`,drawingAreaOverImage:`Drawing area over a background image`,tools:{select:`Select`,freeDraw:`Free Draw`,line:`Line`,rectangle:`Rectangle`,circle:`Circle`,textEntry:`Text Entry`,eraser:`Eraser`}},charting:{addCategory:`Add category`,actions:`Actions`,add:`Add`,delete:`Delete`,newLabel:`New label`,categoryLabel:`Category {{index}} label`,categoryLabelValue:`Category {{index}} label: {{label}}`,category:`Category {{index}}`,reachedLimit_other:`There can't be more than {{count}} categories.`,keyLegend:{incorrectAnswer:`Student incorrect answer`,correctAnswer:`Student correct answer`,correctKeyAnswer:`Answer key correct`},chartTypes:{bar:`Bar chart`,histogram:`Histogram`,lineDot:`Line chart with dots`,lineCross:`Line chart with crosses`,dotPlot:`Dot plot`,linePlot:`Line plot`},categories_zero:`No categories.`,categories_one:`{{count}} category: {{categories}}.`,categories_other:`{{count}} categories: {{categories}}.`,valueRange:`Values from {{min}} to {{max}}.`,labelledValueRange:`{{label}} from {{min}} to {{max}}.`},graphing:{graph:`Coordinate graph`,axisRange:`{{axis}} axis from {{min}} to {{max}}.`,plotted_zero:`Nothing plotted.`,plotted_one:`{{count}} object plotted: {{marks}}.`,plotted_other:`{{count}} objects plotted: {{marks}}.`,shadedRegion:`Shaded region`,point:`Point`,circle:`Circle`,line:`Line`,parabola:`Parabola`,absolute:`Absolute Value`,exponential:`Exponential`,polygon:`Polygon`,ray:`Ray`,segment:`Segment`,sine:`Sine`,vector:`Vector`,label:`Label`,markLabel:`Label at ({{x}}, {{y}})`,correctMarkLabel:`Correct label at ({{x}}, {{y}})`,redo:`Redo`,reset:`Reset`,keyLegend:{missingRequiredLabel:`Missing Required Label`,answerKeyCorrect:`Answer Key Correct`,answerKeyCorrectLabel:`Answer Key Correct Label`,studentIncorrect:`Student Incorrect`,incorrectStudentLabel:`Incorrect Student Label`,studentCorrect:`Student Correct`,studentCorrectLabel:`Student Correct Label`}},mathInline:{keypadInstructions:`This field supports both keypad and keyboard input. Use the keyboard to access and interact with the on-screen math keypad, which accepts LaTeX markup. Use the down arrow key to open the keypad and navigate its buttons. Use the escape key to close the keypad and return to the input field.`,mathEquationResponseQuestion:`Math Equation Response Question`,mathResponseQuestion:`Math Response Question`,primaryCorrectWithAlternates:`Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct.`},mathInput:{enterAnswer:`Enter answer`},mcPopulatedBlank:{answerChoices:`Answer choices`,blankLabel:`blank`,emptyBlank:`(blank)`,blankPreSelectionHint:`The answer you choose will appear on the blank line above.`,correctAnswerSelected:`Correct answer selected`,incorrectAnswerSelected:`Incorrect answer selected`,selectedAnswerImage:`Selected answer image`,choiceImage:`Choice {{id}}`,clickToEnableAutoplay:`Click to enable audio autoplay`,audioResourceUnavailable:`Audio is enabled but no playable audio URL is configured.`,listen:`Listen`,listenSilentAlt:`Repeat instructions`,listenPlayingAlt:`Instructions are playing`,printAudio:`Audio:`,printTranscript:`Transcript:`},multipleChoice:{minSelections:`Select at least {{minSelections}}.`,maxSelections_one:`Only {{maxSelections}} answer is allowed.`,maxSelections_other:`Only {{maxSelections}} answers are allowed.`,minmaxSelections_equal:`Select {{minSelections}}.`,minmaxSelections_range:`Select between {{minSelections}} and {{maxSelections}}.`,multipleChoiceQuestion:`Multiple Choice Question`,multipleCorrectAnswerQuestion:`Multiple Correct Answer Question`,multipleSelectQuestion:`Multiple Select Question`},rubric:{rubric:`Rubric`,showRubric:`Show Rubric`,hideRubric:`Hide Rubric`},selectText:{correctAnswerSelected:`Correct`,correctAnswerNotSelected:`Correct Answer Not Selected`,incorrectSelection:`Incorrect Selection`,key:`Key`,textGroup:`Selectable text`,textGroupWithLimit:`Selectable text, select up to {{max}}`,tokenPosition:`{{index}} of {{total}}`},simpleCloze:{correctAnswerShown:`Correct answer`,correct:`Correct`,incorrect:`Incorrect`,unanswered:`No answer`,placeholder:`Enter your answer...`,answerInput:`Your answer`,printCorrectAnswer:`Correct answer:`,printAnswerBlank:`Answer blank`},vennClassification:{tray:`Tiles to classify`,unknownTarget:`unknown`,cancelled:`Cancelled`,returnedToTray:`{{name}} returned to tray`,placedIn:`{{name}} placed in {{target}}`,pickedUp:`Picked up {{name}}`,pickedUpWithKeyboard:`Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.`,dropTarget:`Drop target: {{target}}`,unsupportedCircles_one:`This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.`,unsupportedCircles_other:`This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.`,setNumber:`Set {{number}}`,regionOnly:`{{set}} only`,regionNeither:`Neither {{first}} nor {{second}}`,regionNoneOf:`None of {{sets}}`,regionAndSeparator:` and `,tileFallbackName:`Tile`,tileNotPlaced:`not placed`,tileInRegion:`in {{region}}`,tileCorrect:`correct`,tileIncorrect:`incorrect`}},common:{undo:`Undo`,clearAll:`Clear all`,correct:`Correct`,incorrect:`Incorrect`,showCorrectAnswer:`Show correct answer`,hideCorrectAnswer:`Hide correct answer`,showTeacherInstructions:`Show Teacher Instructions`,hideTeacherInstructions:`Hide Teacher Instructions`,show:`Show`,hide:`Hide`,showRationale:`Show Rationale`,hideRationale:`Hide Rationale`,commonCorrectAnswerWithAlternates:`Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.`,warning:`Warning`,showNote:`Show Note`,hideNote:`Hide Note`,cancel:`Cancel`,playAudio:`Play audio`}},Dw={translation:{categorize:{limitMaxChoicesPerCategory:`Has alcanzado el límite de {{maxChoicesPerCategory}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,maxChoicesPerCategoryRestriction:`Para cambiar este valor a {{maxChoicesPerCategory}}, cada categoría debe tener {{maxChoicesPerCategory}} o menos opciones de respuesta`},dragInTheBlank:{blank:`Espacio en blanco {{index}}`},ebsr:{part:`Parte {{index}}`,twoPartQuestion:`Pregunta de dos partes`},editableHtml:{responseAreaToolbar:`Área de respuesta`,toolbar:`Herramientas de edición`,buttons:{insertTable:`Insertar tabla`,addTableRow:`Agregar fila a la tabla`,removeTableRow:`Eliminar fila de la tabla`,addTableColumn:`Agregar columna a la tabla`,removeTableColumn:`Eliminar columna de la tabla`,removeTable:`Eliminar tabla`,tableBorders:`Bordes de la tabla`,bold:`Negrita`,italic:`Cursiva`,strikethrough:`Tachado`,code:`Código`,underline:`Subrayado`,subscript:`Subíndice`,superscript:`Superíndice`,insertImage:`Insertar imagen`,insertVideo:`Insertar video`,insertAudio:`Insertar audio`,cssClasses:`Clases CSS`,blockquote:`Cita en bloque`,heading:`Encabezado`,insertMath:`Insertar expresión matemática`,spanishCharacters:`Caracteres del español (ñ)`,specialCharacters:`Caracteres especiales (€)`,textAlignment:`Alineación del texto`,bulletedList:`Lista con viñetas`,numberedList:`Lista numerada`,done:`Listo`}},explicitConstructedResponse:{fillInTheBlankQuestion:`Pregunta para completar espacios en blanco`,response:`Respuesta {{index}} de {{total}}`},extendedTextEntry:{comment:`Comentario`,constructedResponseQuestion:`Pregunta de respuesta construida`,response:`Tu respuesta`,writtenResponseQuestion:`Pregunta de respuesta escrita`},fractionModel:{modelLabel_one:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} parte seleccionada`,modelLabel_other:`Modelo {{index}} de {{total}}: {{selected}} de {{count}} partes seleccionadas`},numberLine:{addElementLimit_one:`Solo puedes agregar {{count}} elemento`,addElementLimit_other:`Solo puedes agregar {{count}} elementos`,clearAll:`Borrar todo`,closedEnd:`cerrado`,elementCorrect:`Correcto.`,elementIncorrect:`Incorrecto.`,graphLabel:`Recta numérica de {{min}} a {{max}}, con una marca cada {{interval}}`,line:`Línea de {{left}} ({{leftEnd}}) a {{right}} ({{rightEnd}}).`,openEnd:`abierto`,plottedNone:`No hay nada marcado en la recta.`,pointClosed:`Punto cerrado en {{position}}.`,pointOpen:`Punto abierto en {{position}}.`,rayLeft:`Rayo desde {{position}} ({{end}}) hacia la izquierda.`,rayRight:`Rayo desde {{position}} ({{end}}) hacia la derecha.`},hotspot:{correctlySelected:`Seleccionada correctamente`,image_one:`Imagen con {{count}} zona activa`,image_other:`Imagen con {{count}} zonas activas`,shape:`Zona activa {{index}} de {{total}}`,shouldHaveBeenSelected:`Debía seleccionarse`,shouldNotHaveBeenSelected:`No debía seleccionarse`},imageClozeAssociation:{answerChoice:`Opción de respuesta {{index}} de {{total}}`,image_one:`Imagen con {{count}} área de respuesta`,image_other:`Imagen con {{count}} áreas de respuesta`,reachedLimit_one:`Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.`,reachedLimit_other:`Lleno`,responseArea:`Área de respuesta {{index}} de {{total}}`},inlineDropdown:{inlineDropdownQuestion:`Pregunta con menú desplegable`,query:`Consulta`,queryNumber:`Consulta {{index}}`,showRationaleForChoices:`Mostrar justificación de las opciones`,hideRationaleForChoices:`Ocultar justificación de las opciones`},drawingResponse:{fillColor:`Color de relleno`,outlineColor:`Color del contorno`,noFill:`Sin relleno`,lightblue:`Azul claro`,lightyellow:`Amarillo claro`,red:`Rojo`,orange:`Naranja`,yellow:`Amarillo`,violet:`Violeta`,blue:`Azul`,green:`Verde`,white:`Blanco`,black:`Negro`,onDoubleClick:`Haz doble clic para revisar este texto. Presiona el botón de ingreso para enviar`,drawingArea:`Área de dibujo`,drawingAreaOverImage:`Área de dibujo sobre una imagen de fondo`,tools:{select:`Seleccionar`,freeDraw:`Dibujo libre`,line:`Línea`,rectangle:`Rectángulo`,circle:`Círculo`,textEntry:`Entrada de texto`,eraser:`Borrador`}},charting:{addCategory:`Añadir categoría`,actions:`Acciones`,add:`Añadir`,delete:`Eliminar`,newLabel:`Nueva etiqueta`,categoryLabel:`Etiqueta de la categoría {{index}}`,categoryLabelValue:`Etiqueta de la categoría {{index}}: {{label}}`,category:`Categoría {{index}}`,reachedLimit_other:`No puede haber más de {{count}} categorías.`,keyLegend:{incorrectAnswer:`Respuesta incorrecta del estudiante`,correctAnswer:`Respuesta correcta del estudiante`,correctKeyAnswer:`Clave de respuesta correcta`},chartTypes:{bar:`Gráfico de barras`,histogram:`Histograma`,lineDot:`Gráfico de líneas con puntos`,lineCross:`Gráfico de líneas con cruces`,dotPlot:`Diagrama de puntos`,linePlot:`Diagrama de líneas`},categories_zero:`Sin categorías.`,categories_one:`{{count}} categoría: {{categories}}.`,categories_other:`{{count}} categorías: {{categories}}.`,valueRange:`Valores de {{min}} a {{max}}.`,labelledValueRange:`{{label}} de {{min}} a {{max}}.`},graphing:{graph:`Gráfica de coordenadas`,axisRange:`Eje {{axis}} de {{min}} a {{max}}.`,plotted_zero:`Nada trazado.`,plotted_one:`{{count}} objeto trazado: {{marks}}.`,plotted_other:`{{count}} objetos trazados: {{marks}}.`,shadedRegion:`Región sombreada`,point:`Punto`,circle:`Circulo`,line:`Línea`,parabola:`Parábola`,absolute:`Valor absoluto`,exponential:`Exponencial`,polygon:`Polígono`,ray:`Semirrecta`,segment:`Segmento `,sine:`Seno`,vector:`Vector`,label:`Etiqueta`,markLabel:`Etiqueta en ({{x}}, {{y}})`,correctMarkLabel:`Etiqueta correcta en ({{x}}, {{y}})`,redo:`Rehacer`,reset:`Reiniciar`,keyLegend:{missingRequiredLabel:`Falta una etiqueta obligatoria`,answerKeyCorrect:`Clave de respuesta correcta`,answerKeyCorrectLabel:`Etiqueta correcta de la clave de respuesta`,studentIncorrect:`Respuesta incorrecta del estudiante`,incorrectStudentLabel:`Etiqueta incorrecta del estudiante`,studentCorrect:`Respuesta correcta del estudiante`,studentCorrectLabel:`Etiqueta correcta del estudiante`}},mathInline:{keypadInstructions:`Este campo admite la entrada con el teclado en pantalla y con el teclado físico. Usa el teclado físico para acceder al teclado matemático en pantalla e interactuar con él; este acepta notación LaTeX. Usa la tecla de flecha hacia abajo para abrir el teclado en pantalla y recorrer sus botones. Usa la tecla Escape para cerrar el teclado en pantalla y volver al campo de entrada.`,mathEquationResponseQuestion:`Pregunta de respuesta con ecuación matemática`,mathResponseQuestion:`Pregunta de respuesta matemática`,primaryCorrectWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas.`},mathInput:{enterAnswer:`Escribe la respuesta`},mcPopulatedBlank:{answerChoices:`Opciones de respuesta`,blankLabel:`espacio en blanco`,emptyBlank:`(en blanco)`,blankPreSelectionHint:`La respuesta que elijas aparecerá en la línea en blanco de arriba.`,correctAnswerSelected:`Respuesta correcta seleccionada`,incorrectAnswerSelected:`Respuesta incorrecta seleccionada`,selectedAnswerImage:`Imagen de la respuesta seleccionada`,choiceImage:`Opción {{id}}`,clickToEnableAutoplay:`Haz clic para activar la reproducción automática del audio`,audioResourceUnavailable:`El audio está activado, pero no hay una URL de audio reproducible configurada.`,listen:`Escuchar`,listenSilentAlt:`Escuchar. Repetir las instrucciones.`,listenPlayingAlt:`Escuchar. Estas son las instrucciones.`,printAudio:`Audio:`,printTranscript:`Transcripción:`},multipleChoice:{minSelections:`Seleccione al menos {{minSelections}}.`,maxSelections_one:`Sólo se permite {{maxSelections}} respuesta.`,maxSelections_other:`Sólo se permiten {{maxSelections}} respuestas.`,minmaxSelections_equal:`Seleccione {{minSelections}}.`,minmaxSelections_range:`Seleccione entre {{minSelections}} y {{maxSelections}}.`,multipleChoiceQuestion:`Pregunta de opción múltiple`,multipleCorrectAnswerQuestion:`Pregunta con varias respuestas correctas`,multipleSelectQuestion:`Pregunta de selección múltiple`},rubric:{rubric:`Rúbrica`,showRubric:`Mostrar rúbrica`,hideRubric:`Ocultar rúbrica`},selectText:{correctAnswerSelected:`Respuesta Correcta`,correctAnswerNotSelected:`Respuesta Correcta No Seleccionada`,incorrectSelection:`Selección Incorrecta`,key:`Clave`,textGroup:`Texto seleccionable`,textGroupWithLimit:`Texto seleccionable, selecciona hasta {{max}}`,tokenPosition:`{{index}} de {{total}}`},simpleCloze:{correctAnswerShown:`Respuesta correcta`,correct:`Correcto`,incorrect:`Incorrecto`,unanswered:`Sin respuesta`,placeholder:`Escribe tu respuesta...`,answerInput:`Tu respuesta`,printCorrectAnswer:`Respuesta correcta:`,printAnswerBlank:`Espacio para la respuesta`},vennClassification:{tray:`Fichas para clasificar`,unknownTarget:`desconocido`,cancelled:`Cancelado`,returnedToTray:`Se devolvió {{name}} a la bandeja`,placedIn:`Se colocó {{name}} en {{target}}`,pickedUp:`Se tomó {{name}}`,pickedUpWithKeyboard:`Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.`,dropTarget:`Destino: {{target}}`,unsupportedCircles_one:`No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.`,unsupportedCircles_other:`No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.`,setNumber:`Conjunto {{number}}`,regionOnly:`Solo {{set}}`,regionNeither:`Ni {{first}} ni {{second}}`,regionNoneOf:`Ninguno de {{sets}}`,regionAndSeparator:` y `,tileFallbackName:`Ficha`,tileNotPlaced:`sin colocar`,tileInRegion:`en {{region}}`,tileCorrect:`correcta`,tileIncorrect:`incorrecta`}},common:{undo:`Deshacer`,clearAll:`Borrar todo`,correct:`Correcto`,incorrect:`Incorrecto`,showCorrectAnswer:`Mostrar respuesta correcta`,hideCorrectAnswer:`Ocultar respuesta correcta`,showTeacherInstructions:`Mostrar instrucciones para el maestro`,hideTeacherInstructions:`Ocultar instrucciones para el maestro`,show:`Mostrar`,hide:`Ocultar`,showRationale:`Mostrar justificación`,hideRationale:`Ocultar justificación`,commonCorrectAnswerWithAlternates:`Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.`,warning:`Advertencia`,showNote:`Mostrar Nota`,hideNote:`Ocultar Nota`,cancel:`Cancelar`,playAudio:`Reproducir audio`}},H=e=>typeof e==`string`,Ow=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},kw=e=>e==null?``:``+e,Aw=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},jw=/###/g,Mw=e=>e&&e.indexOf(`###`)>-1?e.replace(jw,`.`):e,Nw=e=>!e||H(e),Pw=(e,t,n)=>{let r=H(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Nw(e))return{};let t=Mw(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Nw(e)?{}:{obj:e,k:Mw(r[i])}},Fw=(e,t,n)=>{let{obj:r,k:i}=Pw(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Pw(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Pw(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Iw=(e,t,n,r)=>{let{obj:i,k:a}=Pw(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Lw=(e,t)=>{let{obj:n,k:r}=Pw(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Rw=(e,t,n)=>{let r=Lw(e,n);return r===void 0?Lw(t,n):r},zw=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?H(e[r])||e[r]instanceof String||H(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):zw(e[r],t[r],n):e[r]=t[r]);return e},Bw=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Vw={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Hw=e=>H(e)?e.replace(/[&<>"'\/]/g,e=>Vw[e]):e,Uw=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Ww=[` `,`,`,`?`,`!`,`;`],Gw=new Uw(20),Kw=(e,t,n)=>{t||=``,n||=``;let r=Ww.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Gw.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},qw=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].indexOf(typeof t)>-1&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Jw=e=>e?.replace(/_/g,`-`),Yw={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Xw=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Yw,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(H(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Zw=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n.apply(n,[e,...t])})}},Qw=class extends Zw{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.indexOf(`.`)>-1?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):H(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Lw(this.data,o);return!s&&!t&&!n&&e.indexOf(`.`)>-1&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!H(n)?s:qw(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.indexOf(`.`)>-1&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Fw(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(H(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(`.`)>-1&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Lw(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?zw(s,n,i):s={...s,...n},Fw(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},$w={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},eT=Symbol(`i18next/PATH_KEY`);function tT(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===eT?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function nT(e,t){let{[eT]:n}=e(tT()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`;if(n.length>1&&i){let e=t?.ns,a=Array.isArray(e)?e:null;if(a&&a.length>1&&a.slice(1).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var rT={},iT=e=>!H(e)&&typeof e!=`boolean`&&typeof e!=`number`,aT=class e extends Zw{constructor(e,t={}){super(),Aw([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Xw.create(`translator`)}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=iT(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Kw(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:H(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:H(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=nT(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?nT(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!H(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=iT(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&_.indexOf(O)<0&&!(H(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:iT(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&H(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&t.indexOf(`${this.options.pluralSeparator}zero`)<0&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=H(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!H(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=H(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=$w.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return H(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?nT(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!H(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(H(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!rT[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(rT[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.indexOf(i)===0&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.indexOf(i)===0&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!H(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.substring(0,12)===`defaultValue`&&e[t]!==void 0)return!0;return!1}},oT=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xw.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Jw(e),!e||e.indexOf(`-`)<0)return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Jw(e),!e||e.indexOf(`-`)<0)return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(H(e)&&e.indexOf(`-`)>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(e.indexOf(`-`)<0&&r.indexOf(`-`)<0)&&(e.indexOf(`-`)>0&&r.indexOf(`-`)<0&&e.substring(0,e.indexOf(`-`))===r||e.indexOf(r)===0&&r.length>1))return e})}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),H(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return H(e)&&(e.indexOf(`-`)>-1||e.indexOf(`_`)>-1)?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):H(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&i(this.formatLanguageCode(e))}),r}},sT={zero:0,one:1,two:2,few:3,many:4,other:5},cT={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},lT=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Xw.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Jw(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),cT;if(!e.match(/-|_/))return cT;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>sT[e]-sT[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},uT=(e,t,n,r=`.`,i=!0)=>{let a=Rw(e,t,n);return!a&&i&&H(n)&&(a=qw(e,n,r),a===void 0&&(a=qw(t,n,r))),a},dT=e=>e.replace(/\$/g,`$$$$`),fT=class{constructor(e={}){this.logger=Xw.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Hw:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Bw(i):a||`{{`,this.suffix=o?Bw(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Bw(d):f||Bw(`$t(`),this.nestingSuffix=p?Bw(p):m||Bw(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(e.indexOf(this.formatSeparator)<0){let i=uT(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(uT(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp();let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>dT(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?dT(this.escape(e)):dT(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=H(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!H(a)&&!this.useRawValueToEscape&&(a=kw(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;let r=e.split(RegExp(`${Bw(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!H(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!H(i))return i;H(i)||(i=kw(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},pT=e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf(`(`)>-1){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].substring(0,r[1].length-1);t===`currency`&&i.indexOf(`:`)<0?n.currency||=i.trim():t===`relativetime`&&i.indexOf(`:`)<0?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},mT=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Jw(r),i),t[o]=s),s(n)}},hT=e=>(t,n,r)=>e(Jw(n),r)(t),gT=class{constructor(e={}){this.logger=Xw.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?mT:hT;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=mT(t)}format(e,t,n,r={}){let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&i[0].indexOf(`)`)<0&&i.find(e=>e.indexOf(`)`)>-1)){let e=i.findIndex(e=>e.indexOf(`)`)>-1);i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=pT(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},_T=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},vT=class extends Zw{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Xw.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Iw(n.loaded,[i],a),_T(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();H(e)&&(e=this.languageUtils.toResolveHierarchy(e)),H(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},yT=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,simplifyPluralSuffix:!0,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),H(e[1])&&(t.defaultValue=e[1]),H(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),bT=e=>(H(e.ns)&&(e.ns=[e.ns]),H(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),H(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.(`cimode`)<0&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),typeof e.initImmediate==`boolean`&&(e.initAsync=e.initImmediate),e),xT=()=>{},ST=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},CT=`__i18next_supportNoticeShown`,wT=()=>!!(typeof globalThis<`u`&&globalThis[CT]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),TT=()=>{typeof globalThis<`u`&&(globalThis[CT]=!0)},ET=e=>!!(e?.modules?.backend?.name?.indexOf(`Locize`)>0||e?.modules?.backend?.constructor?.name?.indexOf(`Locize`)>0||e?.options?.backend?.backends&&e.options.backend.backends.some(e=>e?.name?.indexOf(`Locize`)>0||e?.constructor?.name?.indexOf(`Locize`)>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(e=>e?.projectId)),DT=class e extends Zw{constructor(e={},t){if(super(),this.options=bT(e),this.services={},this.logger=Xw,this.modules={external:[]},ST(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(H(e.ns)?e.defaultNS=e.ns:e.ns.indexOf(`translation`)<0&&(e.defaultNS=e.ns[0]));let n=yT();this.options={...n,...this.options,...bT(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!ET(this)&&!wT()&&(typeof console<`u`&&console.info!==void 0&&console.info(`🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙`),TT());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Xw.init(r(this.modules.logger),this.options):Xw.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:gT;let t=new oT(this.options);this.store=new Qw(this.options.resources,this.options);let i=this.services;i.logger=Xw,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new lT(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate(`init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting`),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(i.formatter=r(e),i.formatter.init&&i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new fT(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new vT(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new aT(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=xT,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Ow(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=xT){let n=t,r=H(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&e.indexOf(t)<0&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Ow();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=xT,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&$w.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!([`cimode`,`dev`].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!([`cimode`,`dev`].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Ow();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=H(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(H(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n){let r=(e,t,...i)=>{let a;a=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(i)),a.lng=a.lng||r.lng,a.lngs=a.lngs||r.lngs,a.ns=a.ns||r.ns,a.keyPrefix!==``&&(a.keyPrefix=a.keyPrefix||n||r.keyPrefix);let o={...this.options,...a};typeof a.keyPrefix==`function`&&(a.keyPrefix=nT(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=nT(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=nT(e,o)),c=a.keyPrefix?`${a.keyPrefix}${s}${e}`:e),this.t(c,a)};return H(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Ow();return this.options.ns?(H(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Ow();H(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new oT(yT());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=xT){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Qw(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...yT().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new fT(n)}return a.translator=new aT(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();DT.createInstance,DT.dir,DT.init,DT.loadResources,DT.reloadResources,DT.use,DT.changeLanguage,DT.getFixedT,DT.t,DT.exists,DT.setDefaultNamespace,DT.hasLoadedNamespace,DT.loadNamespaces,DT.loadLanguages,DT.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Ew,es:Dw}});var OT={translator:{...DT,t:(e,t)=>{let{lng:n}=t;switch(n){case`en_US`:case`en-US`:t.lng=`en`;break;case`es_ES`:case`es-ES`:case`es_MX`:case`es-MX`:t.lng=`es`;break;default:break}return DT.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},kT=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,AT=e=>N.useState(()=>kT(e))[0],{translator:jT}=OT,MT=I(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:gb(),cursor:`pointer`}),NT=I(`span`)({borderBottom:`1px dotted currentColor`}),PT=I(_x)(({theme:e})=>({paddingTop:e.spacing(2)})),FT=class extends N.Component{static propTypes={className:O.string,children:O.object,labels:O.shape({visible:O.string,hidden:O.string}),language:O.string};static defaultProps={labels:{}};state={expanded:!1};panelId=kT(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){Tw(this.root)}componentDidUpdate(){Tw(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||jT.t(`common:hide`,{lng:r}):e.hidden||jT.t(`common:show`,{lng:r});return(0,P.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,P.jsx)(`div`,{children:(0,P.jsx)(MT,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,P.jsx)(NT,{children:a})})}),(0,P.jsx)(`div`,{id:this.panelId,children:(0,P.jsx)(PT,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}},IT=Lm((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`),LT=Lm((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`),RT=I(`div`)({display:`flex`,flexDirection:`column`}),zT=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),BT=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),VT=I(Lh)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),HT=e=>{class t extends N.Component{static propTypes={session:O.object,onSessionChange:O.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)(RT,{children:[(0,P.jsxs)(zT,{children:[(0,P.jsxs)(VT,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(BT,{children:(0,P.jsx)(LT,{})}),`Undo`]}),(0,P.jsxs)(VT,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(BT,{children:(0,P.jsx)(IT,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},UT=yc({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`}}}}}}),WT=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),GT=class extends N.Component{static propTypes={className:O.string,children:O.array,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};static defaultProps={extraCSSRules:{},fontSizeFactor:1};constructor(e){super(e),this.classesSheet=document.createElement(`style`)}scopeClass=kT(`extra-css-rules`);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)(ti,{injectFirst:!0,children:(0,P.jsxs)(kc,{theme:UT,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,P.jsx)(WT,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}},KT=I(GT)({display:`flex`,flexDirection:`column`,position:`relative`}),qT=class extends N.Component{static propTypes={ariaLabel:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired,role:O.string,extraCSSRules:O.shape({names:O.arrayOf(O.string),rules:O.string}),fontSizeFactor:O.number};render(){let{children:e,ariaLabel:t,role:n,extraCSSRules:r,fontSizeFactor:i,classes:a}=this.props;return(0,P.jsx)(KT,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},JT=class extends N.Component{static propTypes={tag:O.string,className:O.string,html:O.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:Ry(n)}})}};function YT({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 XT=N.createContext(void 0);function ZT(){return N.useContext(XT)}function QT(e){return Ba(`MuiFormLabel`,e)}var $T=Va(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),eE=e=>{let{classes:t,color:n,focused:r,disabled:i,error:a,filled:o,required:s}=e;return ls({root:[`root`,`color${R(n)}`,i&&`disabled`,a&&`error`,o&&`filled`,r&&`focused`,s&&`required`],asterisk:[`asterisk`,a&&`error`]},QT,t)},tE=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]}})(Rc(({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(ph()).map(([t])=>({props:{color:t},style:{[`&.${$T.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${$T.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${$T.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),nE=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Rc(({theme:e})=>({[`&.${$T.error}`]:{color:(e.vars||e).palette.error.main}}))),rE=N.forwardRef(function(e,t){let n=zc({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=YT({props:n,muiFormControl:ZT(),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=eE(m);return(0,P.jsxs)(tE,{as:o,ownerState:m,className:Ra(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(nE,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function iE(e){return Ba(`MuiInputLabel`,e)}Va(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var aE=e=>{let{classes:t,formControl:n,size:r,shrink:i,disableAnimation:a,variant:o,required:s}=e,c=ls({root:[`root`,n&&`formControl`,!a&&`animated`,i&&`shrink`,r&&r!==`medium`&&`size${R(r)}`,o],asterisk:[s&&`asterisk`]},iE,t);return{...t,...c}},oE=I(rE,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${$T.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]]}})(Rc(({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)`}}]}))),sE=N.forwardRef(function(e,t){let n=zc({name:`MuiInputLabel`,props:e}),{disableAnimation:r=!1,margin:i,shrink:a,variant:o,className:s,...c}=n,l=ZT(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=YT({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=aE(f);return(0,P.jsx)(oE,{"data-shrink":u,ref:t,className:Ra(p.root,s),...c,ownerState:f,classes:p})});function cE(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function lE(e,t=!1){return e&&(cE(e.value)&&e.value!==``||t&&cE(e.defaultValue)&&e.defaultValue!==``)}function uE(e){return e.startAdornment}function dE(e){return Ba(`MuiFormControl`,e)}Va(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var fE=e=>{let{classes:t,margin:n,fullWidth:r}=e;return ls({root:[`root`,n!==`none`&&`margin${R(n)}`,r&&`fullWidth`]},dE,t)},pE=I(`div`,{name:`MuiFormControl`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`margin${R(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%`}}]}),mE=I(N.forwardRef(function(e,t){let n=zc({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=fE(_),[y,b]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{if(!Bm(t,[`Input`,`Select`]))return;let n=Bm(t,[`Select`])?t.props.input:t;n&&uE(n.props)&&(e=!0)}),e}),[x,S]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{Bm(t,[`Input`,`Select`])&&(lE(t.props,!0)||lE(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)(XT.Provider,{value:O,children:(0,P.jsx)(pE,{as:o,ownerState:_,className:Ra(v.root,i),ref:t,...g,children:r})})}))(({theme:e})=>({margin:0,padding:0,flex:`1 0 auto`,minWidth:e.spacing(4)})),hE=I(sE)(()=>({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)`}})),gE=({label:e,className:t,children:n})=>(0,P.jsxs)(mE,{className:t,children:[(0,P.jsx)(hE,{shrink:!0,children:e}),n]});gE.propTypes={label:O.oneOfType([O.string,O.object]).isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var{translator:_E}=OT,vE=`pie-prompt-audio-player`,yE=`play-audio-button`,bE=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,xE=I(`div`)(({theme:e,tagName:t})=>({[`& .${yE}:focus-visible`]:{outline:`2px solid ${Nb()}`,outlineOffset:`2px`},[bE(`: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:Sb()},[bE(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:wb()},[bE(`:not([role="presentation"]):has(tbody tr > td:first-child) tbody tr:nth-child(even) td`)]:{backgroundColor:wb()},'&:not(.MathJax) table:not([role="presentation"]) td, &:not(.MathJax) table:not([role="presentation"]) th':{padding:`.6em 1em`,textAlign:`left`},[bE(` td > p.kds-indent`)]:{textAlign:`initial`},"&.prompt":{verticalAlign:`middle`,color:Uy()},"&.legend":{width:`100%`,fontSize:`inherit !important`},"&.rationale":{paddingLeft:e.spacing(4),paddingBottom:e.spacing(1)},"&.prompt-label":{color:`${Uy()} !important`,display:`flex`,flexDirection:`column`,verticalAlign:`middle`,cursor:`pointer`,"& > p":{margin:`0 0 0 0 !important`}}})),SE=/\\embed\{newLine\}\[\]/g,CE=`\\newline `,wE=`preview-prompt`,TE=class extends N.Component{static propTypes={prompt:O.string,tagName:O.string,className:O.string,onClick:O.func,defaultClassName:O.string,autoplayAudioEnabled:O.bool,customAudioButton:O.shape({playImage:O.string,pauseImage:O.string}),language:O.string};static defaultProps={onClick:()=>{}};promptRef=N.createRef();audioId=kT(vE);playButtonId=kT(yE);parsedText=e=>{let{autoplayAudioEnabled:t,customAudioButton:n,language:r}=this.props,i=document.createElement(`div`);i.innerHTML=Ry(e);let a=i.querySelector(`audio`);if(a){let e=document.createElement(`source`);if(e.setAttribute(`type`,`audio/mp3`),e.setAttribute(`src`,a.getAttribute(`src`)),a.removeAttribute(`src`),a.id=this.audioId,a.classList.add(vE),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,_E.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=yE,Object.assign(e.style,{cursor:`pointer`,display:`block`,width:`128px`,height:`128px`,margin:`0`,padding:`0`,font:`inherit`,backgroundColor:`transparent`,backgroundImage:`url(${t?n.pauseImage:n.playImage})`,backgroundSize:`cover`,borderRadius:`50%`,border:`1px solid #326295`}),a.parentNode.insertBefore(e,a)}}return i.innerHTML};addCustomAudioButtonControls(){let{autoplayAudioEnabled:e,customAudioButton:t}=this.props,n=this.promptRef.current,r=n?.querySelector(`.${yE}`),i=n?.querySelector(`.${vE}`);if(e&&i&&i.play().then(()=>{r&&t&&i.addEventListener(`ended`,o)}).catch(e=>{r&&t&&(r.style.backgroundImage=`url(${t.playImage})`),console.error(`Error playing audio`,e)}),!r||!i||!t)return;let a=()=>{i.paused&&i.play()},o=()=>{r.style.backgroundImage=`url(${t.playImage})`},s=()=>{Object.assign(r.style,{backgroundImage:`url(${t.pauseImage})`,border:`1px solid #ccc`})},c=()=>{Object.assign(r.style,{backgroundImage:`url(${t.playImage})`,border:`1px solid #326295`})};r.addEventListener(`click`,a),i.addEventListener(`play`,s),i.addEventListener(`pause`,c),i.addEventListener(`ended`,o),this._playButton=r,this._audio=i,this._handlePlayClick=a,this._handleAudioPlay=s,this._handleAudioPause=c,this._handleAudioEnded=o}removeCustomAudioButtonListeners(){let e=this._playButton,t=this._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 Tw==`function`&&Tw(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`:``} ${wE}`.trim();return(0,P.jsx)(xE,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(SE,CE)}})}},EE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-readable":e.false===void 0}))});EE.propTypes={children:O.node,false:O.bool};var DE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-purpose":e.purpose}))});DE.propTypes={children:O.node,purpose:O.string};var OE;typeof window<`u`&&(OE=new DOMParser);var kE=e=>OE.parseFromString(e,`text/html`).body.textContent,AE=e=>{if(!e)return!1;let t=kE(e);return!!(t&&t.trim())},jE;typeof window<`u`&&(jE=new DOMParser);var ME=e=>{if(!e)return!1;let t=jE.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},NE=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAIRAxEAPwD1TAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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rvkBQAAAAAAAAET46Wt9IFAAAAAAAAARO4FAAAAAABLK97armBQJdXtfV8gKAAAAIlYCgAAAAAAiXHW9/oAoAAAAAAI72dnZ8gKAAAAAAAAAivZXVnzAoAAAAAAAEb4aXv8AQBQAAAAAARXsrqz5gUAAAAAAAAAAARuybSv5gFle9tXzAoAAAAAAAAABLa3AoETvfzAUAAAAAAAABErc7gUAAAiaeqdwKAAAAAACK+t36AKAAAAAAAAAAAI72dld8gKAAAAAAAAAAAAEsr3tq+YBO6Tat5gKAAAAAAAAAjVwKAAjdrecCgAAAAAAARrhra30gUAAAARtLVuwFAAAAAAAAAAAAAAAltbgUCJ3SbVvMBQAAAAAAAAAAAAltb3+YCgAI3ZNvkBQAAAAAAAAAAAAivzYFAAAAETTuk+HECgAAAAAAAAJZXvbVcwCvrdegCgAAAAAAAAAAAAAltbgUCN2TaV/MBQAAAAAAAAAAAAjV+dgKAAAAIndJrmBQAAAAAAAAACO+ln6QKAAAAAEaTs2uHACgAAAAAAAAAEbSTbdkuLAoEd+SAoAAAAjVwKAAAAAAAAAAAAAABG+Gl7/AEAUAAAltb3+YCgAAAAAAAAAAAAAAAAETuk1zAoE1vx0AoAAAAARJLRKwFAAAAAAAAAAAEbSTbdkuLAoEV+aAoAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function PE(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}var FE=N.createContext({});function IE(e){return Ba(`MuiList`,e)}Va(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var LE=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ls({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},IE,t)},RE=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}}]}),zE=N.forwardRef(function(e,t){let n=zc({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=LE(d);return(0,P.jsx)(FE.Provider,{value:u,children:(0,P.jsxs)(RE,{as:a,className:Ra(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),BE=vg;function VE(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function HE(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function UE(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 WE(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`)||!UE(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var GE=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});Wm(()=>{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=`${BE(Um(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=jg(Vm(t));if(n===`ArrowDown`)e.preventDefault(),WE(t,r,c,s,VE);else if(n===`ArrowUp`)e.preventDefault(),WE(t,r,c,s,HE);else if(n===`Home`)e.preventDefault(),WE(t,null,c,s,VE);else if(n===`End`)e.preventDefault(),WE(t,null,c,s,HE);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&&UE(r,i);i.previousKeyMatched&&(c||WE(t,r,!1,s,VE,i))?e.preventDefault():i.previousKeyMatched=!1}l&&l(e)},h=xl(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)(zE,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function KE(e){return Ba(`MuiMenu`,e)}Va(`MuiMenu`,[`root`,`paper`,`list`]);var qE={vertical:`top`,horizontal:`right`},JE={vertical:`top`,horizontal:`left`},YE=e=>{let{classes:t}=e;return ls({root:[`root`],paper:[`paper`],list:[`list`]},KE,t)},XE=I(g_,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),ZE=I(h_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),QE=I(GE,{name:`MuiMenu`,slot:`List`})({outline:0}),$E=N.forwardRef(function(e,t){let n=zc({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=Oo(),b={...n,autoFocus:r,disableAutoFocusItem:o,MenuListProps:s,onEntering:p,PaperProps:u,transitionDuration:f,TransitionProps:m,variant:h},x=YE(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=Dd({elementType:g.root,externalSlotProps:_.root,ownerState:b,className:[x.root,a]}),[ee,te]=Gd(`paper`,{className:x.paper,elementType:ZE,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Gd(`list`,{className:Ra(x.list,s.className),elementType:QE,shouldForwardComponentProp:!0,externalForwardedProps:D,getSlotProps:e=>({...e,onKeyDown:t=>{T(t),e.onKeyDown?.(t)}}),ownerState:b}),ne=typeof D.slotProps.transition==`function`?D.slotProps.transition(b):D.slotProps.transition;return(0,P.jsx)(XE,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?qE:JE,slots:{root:g.root,paper:ee,backdrop:g.backdrop,...g.transition&&{transition:g.transition}},slotProps:{root:O,paper:te,backdrop:typeof _.backdrop==`function`?_.backdrop(b):_.backdrop,transition:{...ne,onEntering:(...e)=>{w(...e),ne?.onEntering?.(...e)}}},open:l,ref:t,transitionDuration:f,ownerState:b,...v,classes:d,children:(0,P.jsx)(k,{actions:C,autoFocus:r&&(E===-1||o),autoFocusItem:S,variant:h,...A,children:i})})}),eD=({slotProps:e,...t})=>(0,P.jsx)($E,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}}),tD=s({Collapsible:()=>FT,EnableAudioAutoplayImage:()=>NE,Feedback:()=>tx,HtmlAndMath:()=>JT,InlineMenu:()=>eD,InputContainer:()=>gE,PreviewLayout:()=>qT,PreviewPrompt:()=>TE,Purpose:()=>DE,Readable:()=>EE,UiLayout:()=>GT,color:()=>Vy,createUniqueId:()=>kT,hasMedia:()=>ME,hasText:()=>AE,indicators:()=>nx,transformDataHeadings:()=>PE,useUniqueId:()=>AT,withUndoReset:()=>HT}),{translator:nD}=OT;function rD(e,t){if(!e)return;let n=nD.t(`mathInput.enterAnswer`,{lng:t});for(let t of e.querySelectorAll(`.mq-editable-field > .mq-textarea > textarea`))t.setAttribute(`aria-label`,n)}function U(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]}U.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},U.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},U.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},U.prototype.attr=function(e,t){return t===sD?this.elements[0]?this.elements[0].getAttribute(e):sD:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},U.prototype.html=function(e){return e===sD?this.elements[0]?this.elements[0].innerHTML:``:(this.elements.forEach(function(t){t.innerHTML=e}),this)},U.prototype.append=function(e){var t=e instanceof U?e.elements[0]:e;return this.elements.forEach(function(e){e.appendChild(t)}),this},U.prototype.prepend=function(e){var t=e instanceof U?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},U.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 U)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},U.prototype.appendTo=function(e){var t=e instanceof U?e.elements[0]:e;return t&&this.elements.forEach(function(e){t.appendChild(e)}),this},U.prototype.prependTo=function(e){var t=e instanceof U?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},U.prototype.insertBefore=function(e){var t=e instanceof U?e.elements[0]:e;if(!t)return this;var n=t.parentNode;return n&&this.elements.forEach(function(e){n.insertBefore(e,t)}),this},U.prototype.insertAfter=function(e){var t=e instanceof U?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},U.prototype.replaceWith=function(e){var t=[];return e instanceof U?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},U.prototype.insDirOf=function(e,t){return e===-1?this.insertBefore(t.first()):this.insertAfter(t.last())},U.prototype.insAtDirEnd=function(e,t){return e===-1?this.prependTo(t):this.appendTo(t)},U.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 U(t)},U.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 U(t)},U.prototype.closest=function(e){return new U(this.elements.map(function(t){return t.closest(e)}).filter(Boolean))},U.prototype.contents=function(){var e=[];return this.elements.forEach(function(t){var n=Array.from(t.childNodes);e.push.apply(e,n)}),new U(e)},U.prototype.filter=function(e){return new U(this.elements.filter(function(t,n){return e(n,t)}))},U.prototype.detach=function(){return this.elements.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)}),this},U.prototype.remove=function(){return this.elements.forEach(function(e){e.remove()}),this},U.prototype.empty=function(){return this.elements.forEach(function(e){e.innerHTML=``}),this};function iD(e){return(e||``).split(`.`)[0]}U.prototype.on=function(e,t){var n=iD(e);return this.elements.forEach(function(e){e.addEventListener(n,t)}),this},U.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=iD(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},U.prototype.off=function(e,t){var n=iD(e);return this.elements.forEach(function(e){e.removeEventListener(n,t)}),this},U.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=iD(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},U.prototype.trigger=function(e){var t=new Event(iD(e),{bubbles:!0,cancelable:!0});return this.elements.forEach(function(e){e.dispatchEvent(t)}),this},U.prototype.focus=function(e){return typeof e==`function`?this.on(`focus`,e):(this.elements.forEach(function(e){e.focus&&e.focus()}),this)},U.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){U.prototype[e]=function(t){return this.on(e,t)}}),U.prototype.next=function(e){return new U(this.elements.map(function(e){return e.nextElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},U.prototype.prev=function(e){return new U(this.elements.map(function(e){return e.previousElementSibling}).filter(function(t){return!e||t&&t.matches(e)}))},U.prototype.parent=function(){return new U(this.elements.map(function(e){return e.parentElement}).filter(Boolean))},U.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)}},U.prototype.width=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.width)||e.getBoundingClientRect().width},U.prototype.height=function(){var e=this.elements[0];if(!e)return 0;var t=window.getComputedStyle(e);return parseFloat(t.height)||e.getBoundingClientRect().height},U.prototype.outerWidth=function(){return this.elements[0]?this.elements[0].offsetWidth:0},U.prototype.outerHeight=function(){return this.elements[0]?this.elements[0].offsetHeight:0},U.prototype.innerWidth=function(){return this.elements[0]?this.elements[0].clientWidth:0},U.prototype.innerHeight=function(){return this.elements[0]?this.elements[0].clientHeight:0},U.prototype.css=function(e,t){if(t===sD){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):sD}}else this.elements.forEach(function(n){n.style[e]=t});return this},U.prototype.scrollTop=function(e){var t=this.elements[0];return e===sD?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)},U.prototype.scrollLeft=function(e){var t=this.elements[0];return e===sD?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)},U.prototype.each=function(e){return this.elements.forEach(function(t,n){e.call(t,n,t)}),this},U.prototype.eq=function(e){return new U([this.elements[e]])},U.prototype.get=function(e){return e===sD?this.elements:e<0?this.elements[this.elements.length+e]:this.elements[e]},U.prototype.add=function(e){var t=this.elements.slice();return e instanceof U?t.push.apply(t,e.elements):Array.isArray(e)?t.push.apply(t,e):e&&e.nodeType&&t.push(e),new U(t)},U.prototype.first=function(){return new U([this.elements[0]])},U.prototype.last=function(){return new U([this.elements[this.elements.length-1]])},U.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 U?e.elements[0]:e;return this.elements.indexOf(n)},U.prototype.is=function(e){return this.elements.some(function(t){return t.matches(e)})},U.prototype.text=function(e){return e===sD?this.elements.map(function(e){return e.textContent}).join(``):(this.elements.forEach(function(t){t.textContent=e}),this)},U.prototype.val=function(e){var t=this.elements[0];return t?e===sD?t.value===sD?t.textContent:t.value:(this.elements.forEach(function(t){t.value===sD?t.textContent=e:t.value=e}),this):sD};function aD(e){var t=Array.isArray(e)?e:[e].filter(Boolean),n=Object.create(U.prototype);n.elements=t,n.length=t.length;for(var r=0;r<t.length;r++)n[r]=t[r];return n}var W=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 U?t.elements[0]:t||document;n=Array.from(i.querySelectorAll(e))}else n=e instanceof U?e.elements:e.length===sD?[]:Array.from(e);return aD(n)};W.contains=function(e,t){return e!==t&&e.contains(t)};var oD=W,sD,cD=`mathquill-command-id`,lD=`mathquill-block-id`,uD=Math.min,dD=Math.max;function fD(){}var pD=[].slice;function mD(e){var t=e.length-1;return function(){var n=pD.call(arguments,0,t),r=pD.call(arguments,t);return e.apply(this,n.concat([r]))}}var hD=mD(function(e,t){return mD(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function gD(e){return mD(function(t,n){return typeof t!=`function`&&(t=hD(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function G(e){var t=pD.call(arguments,1);return function(){return e.apply(this,t)}}function _D(e,t){if(!t)throw Error(`prayer failed: `+e)}var K=(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),q=-1,J=1;function vD(e){_D(`a direction was passed`,e===q||e===J)}var yD=K(function(e){e.parent=0,e[q]=0,e[J]=0,e.init=function(e,t,n){this.parent=e,this[q]=t,this[J]=n},this.copy=function(e){return yD(e.parent,e[q],e[J])}}),bD=K(function(e){e[q]=0,e[J]=0,e.parent=0;var t=0;function n(){return t+=1}this.byId={},e.init=function(){this.id=n(),bD.byId[this.id]=this,this.ends={},this.ends[q]=0,this.ends[J]=0},e.dispose=function(){delete bD.byId[this.id]},e.toString=function(){return`{{ MathQuill Node #`+this.id+` }}`},e.jQ=W(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){var e=W(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute(`mathquill-command-id`),r=e.getAttribute(`mathquill-block-id`);n&&bD.byId[n].jQadd(e),r&&bD.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){vD(e);var n=this;return n.jQize(),n.jQ.insDirOf(e,t.jQ),t[e]=n.adopt(t.parent,t[q],t[J]),n},e.createLeftOf=function(e){return this.createDir(q,e)},e.selectChildren=function(e,t){return ED(e,t)},e.bubble=gD(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=gD(function(e){return(function t(n){n.eachChild(t),e(n)})(this),this}),e.isEmpty=function(){return this.ends[q]===0&&this.ends[J]===0},e.isStyleBlock=function(){return!1},e.children=function(){return SD(this.ends[q],this.ends[J])},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 SD(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return SD(this,this).adopt(e,t,n),this},e.disown=function(){return SD(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function xD(e,t,n){_D(`a parent is always present`,e),t&&(t[J]!==n&&(t[J]=n),t.parent!==e&&(t.parent=e)),n&&(n[q]!==t&&(n[q]=t),n.parent!==e&&(n.parent=e)),_D(`leftward is properly set up`,(function(){return t?t[J]===n&&t.parent===e:e.ends[q]===n})()),_D(`rightward is properly set up`,(function(){return n?n[q]===t&&n.parent===e:e.ends[J]===t})())}var SD=K(function(e){e.init=function(e,t,n){if(n===sD&&(n=q),vD(n),_D(`no half-empty fragments`,!e==!t),this.ends={},e){_D(`withDir is passed to Fragment`,e instanceof bD),_D(`oppDir is passed to Fragment`,t instanceof bD),_D(`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=W(),e.withDirAdopt=function(e,t,n,r){return e===q?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){xD(e,t,n);var r=this;r.disowned=!1;var i=r.ends[q];if(!i)return this;var a=r.ends[J];return t||(e.ends[q]=i),n?n[q]=a:e.ends[J]=a,r.ends[J][J]=n,r.each(function(n){n[q]=t,n.parent=e,t&&(t[J]=n),t=n}),r},e.disown=function(){var e=this,t=e.ends[q];if(!t||e.disowned)return e;e.disowned=!0;var n=e.ends[J],r=t.parent;return xD(r,t[q],t),xD(r,n,n[J]),t[q]?t[q][J]=n[J]:r.ends[q]=n[J],n[J]?n[J][q]=t[q]:r.ends[J]=t[q],e},e.remove=function(){return this.jQ.remove(),this.each(`postOrder`,`dispose`),this.disown()},e.each=gD(function(e){var t=this,n=t.ends[q];if(!n)return t;for(;n!==t.ends[J][J]&&e(n)!==!1;n=n[J]);return t}),e.fold=function(e,t){return this.each(function(n){e=t.call(this,e,n)}),e}}),Y={},CD={},wD={},TD=K(yD,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=W(`<span class="mq-cursor">&#8203;</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[J]?this.selection&&this.selection.ends[q][q]===this[q]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[J].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=W(),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 vD(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(q,e)},e.insRightOf=function(e){return this.insDirOf(J,e)},e.insAtDirEnd=function(e,t){return vD(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(q,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(J,e)},e.jumpUpDown=function(e,t){var n=this;n.upDownCache[e.id]=yD.copy(n);var r=n.upDownCache[t.id];if(r)r[J]?n.insLeftOf(r[J]):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[J],r=this,i=e[q];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[J])}),!this[J])if(this[q])this[J]=this[q][J];else for(;!this[J];)if(this.parent=this.parent[J],this.parent)this[J]=this.parent.ends[q];else{this[J]=e[J],this.parent=t;break}this[J]?this.insLeftOf(this[J]):this.insAtRightEnd(t),e.jQ.remove(),e[q].siblingDeleted&&e[q].siblingDeleted(r.options,J),e[J].siblingDeleted&&e[J].siblingDeleted(r.options,q)},e.startSelection=function(){for(var e=this.anticursor=yD.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[q]===e[q]&&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=J;if(n[q]!==r){for(var s=n;s;s=s[J])if(s[J]===r[J]){o=q,i=n,a=r;break}}return o===J&&(i=r,a=n),i instanceof yD&&(i=i[J]),a instanceof yD&&(a=a[q]),!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[q]=this.selection.ends[q][q],this[J]=this.selection.ends[J][J],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[q]=e.ends[q][q],this[J]=e.ends[J][J],delete this.selection),e},e.depth=function(){for(var e=this,t=0;e=e.parent;)t+=+(e instanceof GD);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==sD)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}}),ED=K(SD,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]()})}}),DD=K(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=TD(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===q||t===J?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}}),OD={},kD=K(),AD={},jD=K(),MD={};function ND(){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:
186
186
 
187
187
  MathQuill = MathQuill.getInterface(1);
188
188
  // now MathQuill.MathField() works like it used to
189
189
 
190
190
  See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
191
- https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)}function ND(e){return MD(),VO(e)}ND.prototype=AD.p,ND.VERSION=`v1.2.1-beta.1`,ND.interfaceVersion=function(e){if(e!==1)throw`Only interface version 1 supported. You specified: `+e;return MD=function(){window.console&&console.warn(`You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:
191
+ https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)}function PD(e){return ND(),HO(e)}PD.prototype=jD.p,PD.VERSION=`v1.2.1-beta.1`,PD.interfaceVersion=function(e){if(e!==1)throw`Only interface version 1 supported. You specified: `+e;return ND=function(){window.console&&console.warn(`You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:
192
192
 
193
193
  MathQuill = MathQuill.getInterface(1);
194
194
  // now MathQuill.MathField() works like it used to
195
195
 
196
196
  See also the "\`dev\` branch (2014–2015) → v0.10.0 Migration Guide" at
197
- https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},MD(),ND},ND.getInterface=ID;var PD=ID.MIN=1,FD=ID.MAX=3;function ID(e){if(!(PD<=e&&e<=FD))throw`Only interface versions between `+PD+` and `+FD+` 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=W(e).children(`.mq-root-block`).attr(cD),r=t&&yD.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=q,t.R=J,t.saneKeyboardEvents=zD;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=kD[r];e[r]=a?a(i):i}}t.config=function(e){return r(OD.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`;jD[e]=t};var i=n.AbstractMathQuill=K(AD,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=W(`<span class="mq-root-block"/>`).attr(cD,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=K(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[q]=e.ends[J]=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=Y[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[q];)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(q)},e.moveToRightEnd=function(){return this.moveToDirEnd(J)},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:dD});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-W(window).scrollLeft(),i=t-W(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(W(a),e,t),zO().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 aD.contains(i.jQ[0],n)||(n=i.jQ[0]),r.seek(W(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,DD)(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=ED(a.RootBlock(),W(n),OD());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,DD[a]);return t}ND.noConflict=function(){return window.MathQuill=LD,ND};var LD=window.MathQuill;window.MathQuill=ND;function RD(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 X=K(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){gD(`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 gD(`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){gD(`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)})}),zD=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=aD(e),o=aD(n.container||a),s=dD,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=dD,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=dD,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}}}();ED.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),ED.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()}),W(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`),W(window).unbind(`blur`,i)}e.blurred=!0,n.hide().parent.blur()}}),ED.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),yD.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(q);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(J,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(q,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[J];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[J]||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[q];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[q]||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[q])for(;r[q];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[J])for(;r[J];)n.selectRight();else n.selectRight();case`Ctrl-Up`:break;case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(J);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[q];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){gD(`overridden or never called on this node`)}}),ED.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){_D(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`)},kD.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){_D(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(q)},e.moveRight=function(){return this.moveDir(J)},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[J][r]?n.insAtLeftEnd(n[J][r]):n[q][r]?n.insAtRightEnd(n[q][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof yD&&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){_D(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[q].siblingDeleted&&t[q].siblingDeleted(t.options,J),t[J].siblingDeleted&&t[J].siblingDeleted(t.options,q),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){_D(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===q?xD(t.parent.ends[q],t[q]).remove():xD(t[J],t.parent.ends[J]).remove(),t.insAtDirEnd(e,t.parent),t[q].siblingDeleted&&t[q].siblingDeleted(t.options,J),t[J].siblingDeleted&&t[J].siblingDeleted(t.options,q),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(q)},e.deleteForward=function(){return this.deleteDir(J)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t=this.notify(`select`).cursor,n=t.selection;_D(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(q)},e.selectRight=function(){return this.selectDir(J)}});var BD=/[\\]{2,}/gm,VD=(function(){function e(e){var t=WD();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||WD(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[J],0);return t}var n=X.string,r=X.regex,i=X.letter,a=X.any,o=X.optWhitespace,s=X.succeed,c=X.fail,l=i.map(function(e){return $D(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return CD[e]&&CD[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=Y[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})();ED.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return VD.parse(e).postOrder(`finalizeTree`,OD.p).join(`latex`).trim()},kD.maxDepth=function(e){return typeof e==`number`?e:oD},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=X.all,r=X.eof,i=VD.skip(r).or(n.result(!1)).parse(e);return i&&!i.isEmpty()&&i.prepareInsertionAt(t)&&(i.children().adopt(t.parent,t[q],t[J]),i.jQize().insertBefore(t.jQ),t[q]=i.ends[J],i.finalizeInsert(t.options,t),i.ends[J][J].siblingCreated&&i.ends[J][J].siblingCreated(t.options,q),i.ends[q][q].siblingCreated&&i.ends[q][q].siblingCreated(t.options,J),t.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){e&&e.replace&&(e=e.replace(BD,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=X.all,a=X.eof,o=VD.skip(a).or(i.result(!1)).parse(e);if(t.eachChild(`postOrder`,`dispose`),t.ends[q]=t.ends[J]=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[q]=t.ends[J]=0,delete n.selection,n.show().insAtRightEnd(t);var r=X.regex,i=X.string,a=X.eof,o=X.all,s=i(`$`).then(VD).skip(i(`$`).or(a)).map(function(e){var t=YD(n);t.createBlocks();var r=t.ends[q];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[J],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}}),ED.open(function(e){OD.p.ignoreNextMousedown=dD,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(t){var n=W(t.target).closest(`.mq-root-block`),r=yD.byId[n.attr(cD)||e.attr(cD)].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=dD;function s(e){i.anticursor||i.startSelection(),r.seek(W(e.target),e.pageX,e.pageY).cursor.select(),e.target&&W(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),W(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(W(t.target),t.pageX,t.pageY).cursor.startSelection(),n.mousemove(s),W(t.target.ownerDocument).mousemove(c).mouseup(l)})}}),ED.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(cD)||e.attr(sD);if(!i){var a=e.parent();i=a.attr(cD)||a.attr(sD)}}var o=i&&yD.byId[i]?yD.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),ED.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[q]===e[J])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)}}),ED.open(function(e){OD.p.substituteTextarea=function(){return W(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e=this.textareaSpan=W(`<span class="mq-textarea"></span>`),t=this.options.substituteTextarea();if(!t.nodeType)throw`substituteTextarea() must return a DOM element, got `+t;t=this.textarea=W(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;pO(e.container[0]),e.textareaSelectionTimeout===oD&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=oD;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(aD(`<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()}},OD.p.substituteKeyboardEvents=zD,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===`
198
- `)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 HD=K(yD,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[J].siblingCreated&&n[J].siblingCreated(e,q),n[q].siblingCreated&&n[q].siblingCreated(e,J),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t=e.options.maxDepth;if(t!==oD){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 WD);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),Z=K(HD,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=VD.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[J],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[q],0,0),r.jQ.appendTo(n.ends[q].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]=WD()).adopt(e,e.ends[J],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[q],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 TD(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[q]=e.jQ.offset().left,t[J]=t[q]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[q])return t.insLeftOf(r);if(e>i[J])return t.insRightOf(r);var a=i[q];r.eachChild(function(o){var s=n(o);if(e<s[q])return e-a<s[q]-e?o[q]?t.insAtRightEnd(o[q]):t.insLeftOf(r):t.insAtLeftEnd(o),!1;if(e>s[J])o[J]?a=s[J]:i[J]-e<e-s[J]?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);gD(`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)===`<`){gD(`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],gD(`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]||``)})}}),UD=K(Z,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 X.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=dD,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=dD,e.isEmpty=function(){return!0}}),Q=K(UD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=K(UD,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),WD=K(HD,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[q]===this.ends[J]&&this.ends[q]!==0?this.ends[q].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`?q:J,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[J];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[q].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[q];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?$D(e):/^\d$/.test(e)?ZD(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Y[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Y[`×`](e):(n=SD[e]||Y[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}});OD.p.mouseEvents=!0,DD.StaticMath=function(e){return K(e.AbstractMathQuill,function(t,n){this.RootBlock=WD,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 GD=K(WD,RD);DD.MathField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=GD,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=dD),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var KD=K(yD,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof xD?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[q]&&this.ends[q].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n=this;if(t.createLeftOf.call(this,e),n[J].siblingCreated&&n[J].siblingCreated(e.options,q),n[q].siblingCreated&&n[q].siblingCreated(e.options,J),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=X.string,n=X.regex;return X.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?xD():(qD(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=Z.prototype.selectTowards,e.deleteTowards=Z.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[q]?(e[q].appendText(n),this.bubble(`reflow`)):qD(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),Q(`\\$`,`$`).createLeftOf(e);else if(!e[J])e.insRightOf(this);else if(!e[q])e.insLeftOf(this);else{var r=KD(),i=this.ends[q];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?q:J,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[q]&&t[q].text.length;else if(t.anticursor.parent===this){var l=t[q]&&t[q].text.length;if(this.anticursorPosition===l)t.anticursor=vD.copy(t);else{if(this.anticursorPosition<l){var u=t[q].splitRight(this.anticursorPosition);t[q]=u}else var u=t[J].splitRight(this.anticursorPosition-l);t.anticursor=vD(this,u[q],u)}}},e.blur=function(e){WD.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[q]===this?e[q]=this[q]:e[J]===this&&(e[J]=this[J])):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:``},gD(`only node in TextBlock span is Text node`,t.nodeType===3);var n=qD(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=WD.prototype.focus}),qD=K(yD,function(e,t){e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=W(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){_D(t),t===J?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=qD(this.text.slice(e)).adopt(this.parent,this,this[J]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t};function n(e,t){return t.charAt(e===q?0:-1+t.length)}e.moveTowards=function(e,t){_D(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):qD(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===J?(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){_D(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=qD(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=qD(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)}});Y.text=Y.textnormal=Y.textrm=Y.textup=Y.textmd=KD;function JD(e,t,n){return K(KD,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Y.em=Y.italic=Y.italics=Y.emph=Y.textit=Y.textsl=JD(`\\textit`,`i`,`class="mq-text-mode"`),Y.strong=Y.bold=Y.textbf=JD(`\\textbf`,`b`,`class="mq-text-mode"`),Y.sf=Y.textsf=JD(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Y.tt=Y.texttt=JD(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Y.textsc=JD(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Y.uppercase=JD(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Y.lowercase=JD(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var YD=K(Z,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[q].cursor=this.cursor,this.ends[q].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),Q(`\\$`,`$`).createLeftOf(e.show())):e[J]?e[q]?WD.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):WD.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[q].latex()+`$`}}),XD=K(GD,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===`$`)YD(e).createLeftOf(e);else{var n;t===`<`?n=`&lt;`:t===`>`&&(n=`&gt;`),Q(t,n).createLeftOf(e)}}});DD.TextField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=XD,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()}})},SD[`\\`]=K(Z,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[q].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[q].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[q].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[q].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 W(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[q].latex()+` `},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[J]?e.insLeftOf(this[J]):e.insAtRightEnd(this.parent);var t=this.ends[q].latex();t||=` `;var n=Y[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=KD(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Y[`∉`]=Y.notin=G($,`\\notin `,`&#8713;`),Y[`≅`]=Y.cong=G($,`\\cong `,`&#8773;`),Y[`≡`]=Y.equiv=G($,`\\equiv `,`&#8801;`),Y[`⊕`]=Y.oplus=G($,`\\oplus `,`&#8853;`),Y[`⊗`]=Y.otimes=G($,`\\otimes `,`&#8855;`),Y[`≠`]=Y.ne=Y.neq=G($,`\\ne `,`&ne;`),Y[`≇`]=Y.ncong=G($,`\\ncong `,`&ncong;`),Y[`∗`]=Y.ast=Y.star=Y.loast=Y.lowast=G($,`\\ast `,`&lowast;`),Y.therefor=Y.therefore=G($,`\\therefore `,`&there4;`),Y.cuz=Y.because=G($,`\\because `,`&#8757;`),Y.prop=Y.propto=G($,`\\propto `,`&prop;`),Y[`≈`]=Y.asymp=Y.approx=G($,`\\approx `,`&asymp;`),Y[`≉`]=Y.nasymp=Y.napprox=G($,`\\napprox `,`&nap;`),Y.isin=Y.in=G($,`\\in `,`&isin;`),Y.ni=Y.contains=G($,`\\ni `,`&ni;`),Y.notni=Y.niton=Y.notcontains=Y.doesnotcontain=CD[`\\not\\ni`]=G($,`\\not\\ni `,`&#8716;`),Y.sub=Y.subset=G($,`\\subset `,`&sub;`),Y.sup=Y.supset=Y.superset=G($,`\\supset `,`&sup;`),Y.nsub=Y.notsub=Y.nsubset=Y.notsubset=CD[`\\not\\subset`]=G($,`\\not\\subset `,`&#8836;`),Y.nsup=Y.notsup=Y.nsupset=Y.notsupset=Y.nsuperset=Y.notsuperset=CD[`\\not\\supset`]=G($,`\\not\\supset `,`&#8837;`),Y.sube=Y.subeq=Y.subsete=Y.subseteq=G($,`\\subseteq `,`&sube;`),Y.supe=Y.supeq=Y.supsete=Y.supseteq=Y.supersete=Y.superseteq=G($,`\\supseteq `,`&supe;`),Y.nsube=Y.nsubeq=Y.notsube=Y.notsubeq=Y.nsubsete=Y.nsubseteq=Y.notsubsete=Y.notsubseteq=CD[`\\not\\subseteq`]=G($,`\\not\\subseteq `,`&#8840;`),Y.nsupe=Y.nsupeq=Y.notsupe=Y.notsupeq=Y.nsupsete=Y.nsupseteq=Y.notsupsete=Y.notsupseteq=Y.nsupersete=Y.nsuperseteq=Y.notsupersete=Y.notsuperseteq=CD[`\\not\\supseteq`]=G($,`\\not\\supseteq `,`&#8841;`),Y.N=Y.naturals=Y.Naturals=G(Q,`\\mathbb{N}`,`&#8469;`),Y.P=Y.primes=Y.Primes=Y.projective=Y.Projective=Y.probability=Y.Probability=G(Q,`\\mathbb{P}`,`&#8473;`),Y.Z=Y.integers=Y.Integers=G(Q,`\\mathbb{Z}`,`&#8484;`),Y.Q=Y.rationals=Y.Rationals=G(Q,`\\mathbb{Q}`,`&#8474;`),Y.R=Y.reals=Y.Reals=G(Q,`\\mathbb{R}`,`&#8477;`),Y.C=Y.complex=Y.Complex=Y.complexes=Y.Complexes=Y.complexplane=Y.Complexplane=Y.ComplexPlane=G(Q,`\\mathbb{C}`,`&#8450;`),Y.H=Y.Hamiltonian=Y.quaternions=Y.Quaternions=G(Q,`\\mathbb{H}`,`&#8461;`),Y.quad=Y.emsp=G(Q,`\\quad `,` `),Y.qquad=G(Q,`\\qquad `,` `),Y.diamond=G(Q,`\\diamond `,`&#9671;`),Y.bigtriangleup=G(Q,`\\bigtriangleup `,`&#9651;`),Y.ominus=G(Q,`\\ominus `,`&#8854;`),Y.uplus=G(Q,`\\uplus `,`&#8846;`),Y.bigtriangledown=G(Q,`\\bigtriangledown `,`&#9661;`),Y.sqcap=G(Q,`\\sqcap `,`&#8851;`),Y.triangleleft=G(Q,`\\triangleleft `,`&#8882;`),Y.sqcup=G(Q,`\\sqcup `,`&#8852;`),Y.triangleright=G(Q,`\\triangleright `,`&#8883;`),Y.odot=Y.circledot=G(Q,`\\odot `,`&#8857;`),Y.bigcirc=G(Q,`\\bigcirc `,`&#9711;`),Y.dagger=G(Q,`\\dagger `,`&#0134;`),Y.ddagger=G(Q,`\\ddagger `,`&#135;`),Y.wr=G(Q,`\\wr `,`&#8768;`),Y.amalg=G(Q,`\\amalg `,`&#8720;`),Y.models=G(Q,`\\models `,`&#8872;`),Y.prec=G(Q,`\\prec `,`&#8826;`),Y.succ=G(Q,`\\succ `,`&#8827;`),Y.preceq=G(Q,`\\preceq `,`&#8828;`),Y.succeq=G(Q,`\\succeq `,`&#8829;`),Y.simeq=G(Q,`\\simeq `,`&#8771;`),Y.mid=G(Q,`\\mid `,`&#8739;`),Y.ll=G(Q,`\\ll `,`&#8810;`),Y.gg=G(Q,`\\gg `,`&#8811;`),Y.parallel=G(Q,`\\parallel `,`&#8741;`),Y.nparallel=G(Q,`\\nparallel `,`&#8742;`),Y.bowtie=G(Q,`\\bowtie `,`&#8904;`),Y.sqsubset=G(Q,`\\sqsubset `,`&#8847;`),Y.sqsupset=G(Q,`\\sqsupset `,`&#8848;`),Y.smile=G(Q,`\\smile `,`&#8995;`),Y.sqsubseteq=G(Q,`\\sqsubseteq `,`&#8849;`),Y.sqsupseteq=G(Q,`\\sqsupseteq `,`&#8850;`),Y.doteq=G(Q,`\\doteq `,`&#8784;`),Y.frown=G(Q,`\\frown `,`&#8994;`),Y.vdash=G(Q,`\\vdash `,`&#8870;`),Y.dashv=G(Q,`\\dashv `,`&#8867;`),Y.nless=G(Q,`\\nless `,`&#8814;`),Y.ngtr=G(Q,`\\ngtr `,`&#8815;`),Y.longleftarrow=G(Q,`\\longleftarrow `,`&#8592;`),Y.longrightarrow=G(Q,`\\longrightarrow `,`&#8594;`),Y.Longleftarrow=G(Q,`\\Longleftarrow `,`&#8656;`),Y.Longrightarrow=G(Q,`\\Longrightarrow `,`&#8658;`),Y.longleftrightarrow=G(Q,`\\longleftrightarrow `,`&#8596;`),Y.updownarrow=G(Q,`\\updownarrow `,`&#8597;`),Y.Longleftrightarrow=G(Q,`\\Longleftrightarrow `,`&#8660;`),Y.Updownarrow=G(Q,`\\Updownarrow `,`&#8661;`),Y.mapsto=G(Q,`\\mapsto `,`&#8614;`),Y.nearrow=G(Q,`\\nearrow `,`&#8599;`),Y.hookleftarrow=G(Q,`\\hookleftarrow `,`&#8617;`),Y.hookrightarrow=G(Q,`\\hookrightarrow `,`&#8618;`),Y.searrow=G(Q,`\\searrow `,`&#8600;`),Y.leftharpoonup=G(Q,`\\leftharpoonup `,`&#8636;`),Y.rightharpoonup=G(Q,`\\rightharpoonup `,`&#8640;`),Y.swarrow=G(Q,`\\swarrow `,`&#8601;`),Y.leftharpoondown=G(Q,`\\leftharpoondown `,`&#8637;`),Y.rightharpoondown=G(Q,`\\rightharpoondown `,`&#8641;`),Y.nwarrow=G(Q,`\\nwarrow `,`&#8598;`),Y.ldots=G(Q,`\\ldots `,`&#8230;`),Y.cdots=G(Q,`\\cdots `,`&#8943;`),Y.vdots=G(Q,`\\vdots `,`&#8942;`),Y.ddots=G(Q,`\\ddots `,`&#8945;`),Y.surd=G(Q,`\\surd `,`&#8730;`),Y.triangle=G(Q,`\\triangle `,`&#9651;`),Y.ell=G(Q,`\\ell `,`&#8467;`),Y.top=G(Q,`\\top `,`&#8868;`),Y.flat=G(Q,`\\flat `,`&#9837;`),Y.natural=G(Q,`\\natural `,`&#9838;`),Y.sharp=G(Q,`\\sharp `,`&#9839;`),Y.wp=G(Q,`\\wp `,`&#8472;`),Y.bot=G(Q,`\\bot `,`&#8869;`),Y.clubsuit=G(Q,`\\clubsuit `,`&#9827;`),Y.diamondsuit=G(Q,`\\diamondsuit `,`&#9826;`),Y.heartsuit=G(Q,`\\heartsuit `,`&#9825;`),Y.spadesuit=G(Q,`\\spadesuit `,`&#9824;`),Y.circledot=G(Q,`\\circledot `,`&#8857;`),Y.middot=G(Q,`\\middot `,`&middot;`),Y.dottedsquare=G(Q,`\\dottedsquare `,`&#11034;`),Y.square=G(Q,`\\square `,`&#11036;`),Y.rectangle=G(Q,`\\rectangle `,`&#9647;`),Y.oint=G(Q,`\\oint `,`&#8750;`),Y.bigcap=G(Q,`\\bigcap `,`&#8745;`),Y.bigcup=G(Q,`\\bigcup `,`&#8746;`),Y.bigsqcup=G(Q,`\\bigsqcup `,`&#8852;`),Y.bigvee=G(Q,`\\bigvee `,`&#8744;`),Y.bigwedge=G(Q,`\\bigwedge `,`&#8743;`),Y.bigodot=G(Q,`\\bigodot `,`&#8857;`),Y.bigotimes=G(Q,`\\bigotimes `,`&#8855;`),Y.bigoplus=G(Q,`\\bigoplus `,`&#8853;`),Y.biguplus=G(Q,`\\biguplus `,`&#8846;`),Y.lfloor=G(Q,`\\lfloor `,`&#8970;`),Y.rfloor=G(Q,`\\rfloor `,`&#8971;`),Y.lceil=G(Q,`\\lceil `,`&#8968;`),Y.rceil=G(Q,`\\rceil `,`&#8969;`),Y.opencurlybrace=Y.lbrace=G(Q,`\\lbrace `,`{`),Y.closecurlybrace=Y.rbrace=G(Q,`\\rbrace `,`}`),Y.lbrack=G(Q,`[`),Y.rbrack=G(Q,`]`),Y.mug=G(Q,`\\mug `,`µg`),Y.mus=G(Q,`\\mus `,`µs`),Y.mum=G(Q,`\\mum `,`µm`),Y.muL=G(Q,`\\muL `,`µL`),Y.slash=G(Q,`/`),Y.vert=G(Q,`|`),Y.perp=Y.perpendicular=G(Q,`\\perp `,`&perp;`),Y.nabla=Y.del=G(Q,`\\nabla `,`&nabla;`),Y.hbar=G(Q,`\\hbar `,`&#8463;`),Y.AA=Y.Angstrom=Y.angstrom=G(Q,`\\text\\AA `,`&#8491;`),Y.ring=Y.circ=Y.circle=G(Q,`\\circ `,`&#8728;`),Y.bull=Y.bullet=G(Q,`\\bullet `,`&bull;`),Y.setminus=Y.smallsetminus=G(Q,`\\setminus `,`&#8726;`),Y.not=Y[`¬`]=Y.neg=G(Q,`\\neg `,`&not;`),Y[`…`]=Y.dots=Y.ellip=Y.hellip=Y.ellipsis=Y.hellipsis=G(Q,`\\dots `,`&hellip;`),Y.converges=Y.darr=Y.dnarr=Y.dnarrow=Y.downarrow=G(Q,`\\downarrow `,`&darr;`),Y.dArr=Y.dnArr=Y.dnArrow=Y.Downarrow=G(Q,`\\Downarrow `,`&dArr;`),Y.diverges=Y.uarr=Y.uparrow=G(Q,`\\uparrow `,`&uarr;`),Y.uArr=Y.Uparrow=G(Q,`\\Uparrow `,`&uArr;`),Y.to=G($,`\\to `,`&rarr;`),Y.rarr=Y.rightarrow=G(Q,`\\rightarrow `,`&rarr;`),Y.implies=G($,`\\Rightarrow `,`&rArr;`),Y.rArr=Y.Rightarrow=G(Q,`\\Rightarrow `,`&rArr;`),Y.gets=G($,`\\gets `,`&larr;`),Y.larr=Y.leftarrow=G(Q,`\\leftarrow `,`&larr;`),Y.impliedby=G($,`\\Leftarrow `,`&lArr;`),Y.lArr=Y.Leftarrow=G(Q,`\\Leftarrow `,`&lArr;`),Y.harr=Y.lrarr=Y.leftrightarrow=G(Q,`\\leftrightarrow `,`&harr;`),Y.iff=G($,`\\Leftrightarrow `,`&hArr;`),Y.hArr=Y.lrArr=Y.Leftrightarrow=G(Q,`\\Leftrightarrow `,`&hArr;`),Y.Re=Y.Real=Y.real=G(Q,`\\Re `,`&real;`),Y.Im=Y.imag=Y.image=Y.imagin=Y.imaginary=Y.Imaginary=G(Q,`\\Im `,`&image;`),Y.part=Y.partial=G(Q,`\\partial `,`&part;`),Y.infty=Y.infin=Y.infinity=G(Q,`\\infty `,`&infin;`),Y.pounds=G(Q,`\\pounds `,`&pound;`),Y.alef=Y.alefsym=Y.aleph=Y.alephsym=G(Q,`\\aleph `,`&alefsym;`),Y.xist=Y.xists=Y.exist=Y.exists=G(Q,`\\exists `,`&exist;`),Y.nexists=Y.nexist=G(Q,`\\nexists `,`&#8708;`),Y.and=Y.land=Y.wedge=G($,`\\wedge `,`&and;`),Y.or=Y.lor=Y.vee=G($,`\\vee `,`&or;`),Y.o=Y.O=Y.empty=Y.emptyset=Y.oslash=Y.Oslash=Y.nothing=Y.varnothing=G($,`\\varnothing `,`&empty;`),Y.cup=Y.union=G($,`\\cup `,`&cup;`),Y.cap=Y.intersect=Y.intersection=G($,`\\cap `,`&cap;`),Y.deg=Y.degree=G(Q,`\\degree `,`&deg;`),Y.ang=Y.angle=G(Q,`\\angle `,`&ang;`),Y.measuredangle=G(Q,`\\measuredangle `,`m&ang;`);var ZD=K(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[q]instanceof QD&&e[q].isItalic!==!1||e[q]instanceof DO&&e[q][q]instanceof QD&&e[q][q].isItalic!==!1)?(Y._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),QD=K(UD,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[q]&&!(this[q]instanceof QD)&&!(this[q]instanceof $)&&this[q].ctrlSeq!==`\\ `&&(e=`*`+e),this[J]&&!(this[J]instanceof $)&&!(this[J]instanceof DO)&&(e+=`*`)),e}});OD.p.autoCommands={_maxLength:0},kD.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(Y[a]===rO)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=uD(r,a.length)}return n._maxLength=r,n};var $D=K(QD,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 $D&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[q],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(var o=1,a=this;o<i.length;o+=1,a=a[q]);return xD(a,this).remove(),e[q]=a[q],Y[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!==q&&this[J]instanceof $D||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(t._maxLength!==0){for(var r=this.letter,i=this[q];i instanceof $D;i=i[q])r=i.letter+r;for(var a=this[J];a instanceof $D;a=a[J])r+=a.letter;xD(i[J]||this.parent.ends[q],a[q]||this.parent.ends[J]).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[J]||this.parent.ends[q];o<r.length;o+=1,s=s[J])for(var c=lD(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[J]){d.italicize(!1);var f=d}var p=eO.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,nO.hasOwnProperty(l)&&f[q][q][q].jQ.addClass(`mq-last`),n(s[q])||s.jQ.addClass(`mq-first`),!n(f[J]))if(f[J]instanceof DO){var m=f[J];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[J]instanceof IO))})()}else f.jQ.toggleClass(`mq-last`,!(f[J]instanceof IO));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof AO}}),eO={},tO=OD.p.autoOperatorNames={_maxLength:9},nO={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)eO[e[t]]=tO[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)eO[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)tO[r[t]]=tO[`arc`+r[t]]=tO[r[t]+`h`]=tO[`ar`+r[t]+`h`]=tO[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)tO[i[t]]=1})(),kD.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=uD(r,a.length)}return n._maxLength=r,n};var rO=K(UD,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)$D(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=WD(),n=0;n<e.length;n+=1)$D(e.charAt(n)).adopt(t,t.ends[J],0);return X.succeed(t.children())}});for(var iO in tO)tO.hasOwnProperty(iO)&&(Y[iO]=rO);Y.operatorname=K(Z,function(e){e.createLeftOf=dD,e.numBlocks=function(){return 1},e.parser=function(){return VD.block.map(function(e){return e.children()})}}),Y.f=K($D,function(e,t){e.init=function(){UD.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)}}),Y[` `]=Y.space=G(Q,`\\ `,`&nbsp;`),Y[`'`]=Y.prime=G(Q,`'`,`&prime;`),Y[`″`]=Y.dprime=G(Q,`″`,`&Prime;`),Y[`"`]=Y.doublePrime=G(Q,`"`,`&Prime;`),Y.backslash=G(Q,`\\backslash `,`\\`),SD[`\\`]||=Y.backslash,Y.$=G(Q,`\\$`,`$`);var aO=K(UD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Y[`@`]=aO,Y[`&`]=G(aO,`\\&`,`&amp;`),Y[`%`]=G(aO,`\\%`,`%`),Y.alpha=Y.beta=Y.gamma=Y.delta=Y.zeta=Y.eta=Y.theta=Y.iota=Y.kappa=Y.mu=Y.nu=Y.xi=Y.rho=Y.sigma=Y.tau=Y.chi=Y.psi=Y.omega=K(QD,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Y.phi=G(QD,`\\phi `,`&#981;`),Y.phiv=Y.varphi=G(QD,`\\varphi `,`&phi;`),Y.epsilon=G(QD,`\\epsilon `,`&#1013;`),Y.epsiv=Y.varepsilon=G(QD,`\\varepsilon `,`&epsilon;`),Y.piv=Y.varpi=G(QD,`\\varpi `,`&piv;`),Y.sigmaf=Y.sigmav=Y.varsigma=G(QD,`\\varsigma `,`&sigmaf;`),Y.thetav=Y.vartheta=Y.thetasym=G(QD,`\\vartheta `,`&thetasym;`),Y.upsilon=Y.upsi=G(QD,`\\upsilon `,`&upsilon;`),Y.gammad=Y.Gammad=Y.digamma=G(QD,`\\digamma `,`&#989;`),Y.kappav=Y.varkappa=G(QD,`\\varkappa `,`&#1008;`),Y.rhov=Y.varrho=G(QD,`\\varrho `,`&#1009;`),Y.pi=Y.π=G(aO,`\\pi `,`&pi;`),Y.lambda=G(aO,`\\lambda `,`&lambda;`),Y.Upsilon=Y.Upsi=Y.upsih=Y.Upsih=G(UD,`\\Upsilon `,`<var style="font-family: serif">&upsih;</var>`),Y.Gamma=Y.Delta=Y.Theta=Y.Lambda=Y.Xi=Y.Pi=Y.Sigma=Y.Phi=Y.Psi=Y.Omega=K(Q,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Y.forall=Y[`∀`]=G(Q,`\\forall `,`&#8704;`);var oO=K(Z,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=VD.parse(this.latex);t.children().adopt(e.parent,e[q],e[J]),e[q]=t.ends[J],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[J][J].siblingCreated&&t.ends[J][J].siblingCreated(e.options,q),t.ends[q][q].siblingCreated&&t.ends[q][q].siblingCreated(e.options,J),e.parent.bubble(`reflow`)},e.parser=function(){var e=VD.parse(this.latex).children();return X.succeed(e)}});Y[`¹`]=G(oO,`^1`),Y[`²`]=G(oO,`^2`),Y[`³`]=G(oO,`^3`),Y[`¼`]=G(oO,`\\frac14`),Y[`½`]=G(oO,`\\frac12`),Y[`¾`]=G(oO,`\\frac34`);var sO=K($,function(e){e.init=Q.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){if(e[q]){if(e[q]instanceof $||/^[,;:\(\[]$/.test(e[q].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!==J)return this.jQ[0].className=n(this),this}});Y[`+`]=G(sO,`+`,`+`),Y[`–`]=Y[`-`]=G(sO,`-`,`&minus;`),Y[`±`]=Y.pm=Y.plusmn=Y.plusminus=G(sO,`\\pm `,`&plusmn;`),Y.mp=Y.mnplus=Y.minusplus=G(sO,`\\mp `,`&#8723;`),SD[`*`]=Y.sdot=Y.cdot=G($,`\\cdot `,`&middot;`,`*`);var cO=K($,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===q&&!this.strict){this.swap(!0),this.bubble(`reflow`);return}t.deleteTowards.apply(this,arguments)}}),lO={ctrlSeq:`\\le `,html:`&le;`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`&lt;`,textStrict:`<`},uO={ctrlSeq:`\\ge `,html:`&ge;`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`&gt;`,textStrict:`>`};Y[`<`]=Y.lt=G(cO,lO,!0),Y[`>`]=Y.gt=G(cO,uO,!0),Y[`≤`]=Y.le=Y.leq=G(cO,lO,!1),Y[`≥`]=Y.ge=Y.geq=G(cO,uO,!1);var dO=K($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[q]instanceof cO&&e[q].strict){e[q].swap(!1),e[q].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Y[`=`]=dO,Y[`×`]=Y.times=G($,`\\times `,`&times;`,`[x]`),Y[`÷`]=Y.div=Y.divide=Y.divides=G($,`\\div `,`&divide;`,`[/]`),SD[`~`]=Y.sim=G($,`\\sim `,`~`,`~`),SD[`≁`]=Y.nsim=G($,`\\nsim `,`≁`,`≁`),Y.complement=Y[`∁`]=G(Q,`\\complement `,`&#8705;`),Y.nexists=Y[`∄`]=G(Q,`\\nexists `,`&#8708;`),Y.sphericalangle=Y[`∢`]=G(Q,`\\sphericalangle `,`&#8738;`),Y.iint=Y[`∬`]=G(Q,`\\iint `,`&#8748;`),Y.iiint=Y[`∭`]=G(Q,`\\iiint `,`&#8749;`),Y.oiint=Y[`∯`]=G(Q,`\\oiint `,`&#8751;`),Y.oiiint=Y[`∰`]=G(Q,`\\oiiint `,`&#8752;`),Y.backsim=Y[`∽`]=G(Q,`\\backsim `,`&#8765;`),Y.backsimeq=Y[`⋍`]=G(Q,`\\backsimeq `,`&#8909;`),Y.eqsim=Y[`≂`]=G(Q,`\\eqsim `,`&#8770;`),Y.ncong=Y[`≇`]=G(Q,`\\ncong `,`&#8775;`),Y.approxeq=Y[`≊`]=G(Q,`\\approxeq `,`&#8778;`),Y.bumpeq=Y[`≏`]=G(Q,`\\bumpeq `,`&#8783;`),Y.Bumpeq=Y[`≎`]=G(Q,`\\Bumpeq `,`&#8782;`),Y.doteqdot=Y[`≑`]=G(Q,`\\doteqdot `,`&#8785;`),Y.fallingdotseq=Y[`≒`]=G(Q,`\\fallingdotseq `,`&#8786;`),Y.risingdotseq=Y[`≓`]=G(Q,`\\risingdotseq `,`&#8787;`),Y.eqcirc=Y[`≖`]=G(Q,`\\eqcirc `,`&#8790;`),Y.circeq=Y[`≗`]=G(Q,`\\circeq `,`&#8791;`),Y.triangleq=Y[`≜`]=G(Q,`\\triangleq `,`&#8796;`),Y.leqq=Y[`≦`]=G(Q,`\\leqq `,`&#8806;`),Y.geqq=Y[`≧`]=G(Q,`\\geqq `,`&#8807;`),Y.lneqq=Y[`≨`]=G(Q,`\\lneqq `,`&#8808;`),Y.gneqq=Y[`≩`]=G(Q,`\\gneqq `,`&#8809;`),Y.between=Y[`≬`]=G(Q,`\\between `,`&#8812;`),Y.nleq=Y[`≰`]=G(Q,`\\nleq `,`&#8816;`),Y.ngeq=Y[`≱`]=G(Q,`\\ngeq `,`&#8817;`),Y.lesssim=Y[`≲`]=G(Q,`\\lesssim `,`&#8818;`),Y.gtrsim=Y[`≳`]=G(Q,`\\gtrsim `,`&#8819;`),Y.lessgtr=Y[`≶`]=G(Q,`\\lessgtr `,`&#8822;`),Y.gtrless=Y[`≷`]=G(Q,`\\gtrless `,`&#8823;`),Y.preccurlyeq=Y[`≼`]=G(Q,`\\preccurlyeq `,`&#8828;`),Y.succcurlyeq=Y[`≽`]=G(Q,`\\succcurlyeq `,`&#8829;`),Y.precsim=Y[`≾`]=G(Q,`\\precsim `,`&#8830;`),Y.succsim=Y[`≿`]=G(Q,`\\succsim `,`&#8831;`),Y.nprec=Y[`⊀`]=G(Q,`\\nprec `,`&#8832;`),Y.nsucc=Y[`⊁`]=G(Q,`\\nsucc `,`&#8833;`),Y.subsetneq=Y[`⊊`]=G(Q,`\\subsetneq `,`&#8842;`),Y.supsetneq=Y[`⊋`]=G(Q,`\\supsetneq `,`&#8843;`),Y.vDash=Y[`⊨`]=G(Q,`\\vDash `,`&#8872;`),Y.Vdash=Y[`⊩`]=G(Q,`\\Vdash `,`&#8873;`),Y.Vvdash=Y[`⊪`]=G(Q,`\\Vvdash `,`&#8874;`),Y.VDash=Y[`⊫`]=G(Q,`\\VDash `,`&#8875;`),Y.nvdash=Y[`⊬`]=G(Q,`\\nvdash `,`&#8876;`),Y.nvDash=Y[`⊭`]=G(Q,`\\nvDash `,`&#8877;`),Y.nVdash=Y[`⊮`]=G(Q,`\\nVdash `,`&#8878;`),Y.nVDash=Y[`⊯`]=G(Q,`\\nVDash `,`&#8879;`),Y.vartriangleleft=Y[`⊲`]=G(Q,`\\vartriangleleft `,`&#8882;`),Y.vartriangleright=Y[`⊳`]=G(Q,`\\vartriangleright `,`&#8883;`),Y.trianglelefteq=Y[`⊴`]=G(Q,`\\trianglelefteq `,`&#8884;`),Y.trianglerighteq=Y[`⊵`]=G(Q,`\\trianglerighteq `,`&#8885;`),Y.multimap=Y[`⊸`]=G(Q,`\\multimap `,`&#8888;`),Y.Subset=Y[`⋐`]=G(Q,`\\Subset `,`&#8912;`),Y.Supset=Y[`⋑`]=G(Q,`\\Supset `,`&#8913;`),Y.Cap=Y[`⋒`]=G(Q,`\\Cap `,`&#8914;`),Y.Cup=Y[`⋓`]=G(Q,`\\Cup `,`&#8915;`),Y.pitchfork=Y[`⋔`]=G(Q,`\\pitchfork `,`&#8916;`),Y.lessdot=Y[`⋖`]=G(Q,`\\lessdot `,`&#8918;`),Y.gtrdot=Y[`⋗`]=G(Q,`\\gtrdot `,`&#8919;`),Y.lll=Y[`⋘`]=G(Q,`\\lll `,`&#8920;`),Y.ggg=Y[`⋙`]=G(Q,`\\ggg `,`&#8921;`),Y.lesseqgtr=Y[`⋚`]=G(Q,`\\lesseqgtr `,`&#8922;`),Y.gtreqless=Y[`⋛`]=G(Q,`\\gtreqless `,`&#8923;`),Y.curlyeqprec=Y[`⋞`]=G(Q,`\\curlyeqprec `,`&#8926;`),Y.curlyeqsucc=Y[`⋟`]=G(Q,`\\curlyeqsucc `,`&#8927;`),Y.nsim=Y[`≁`]=G(Q,`\\nsim `,`&#8769;`),Y.lnsim=Y[`⋦`]=G(Q,`\\lnsim `,`&#8934;`),Y.gnsim=Y[`⋧`]=G(Q,`\\gnsim `,`&#8935;`),Y.precnsim=Y[`⋨`]=G(Q,`\\precnsim `,`&#8936;`),Y.succnsim=Y[`⋩`]=G(Q,`\\succnsim `,`&#8937;`),Y.ntriangleleft=Y[`⋪`]=G(Q,`\\ntriangleleft `,`&#8938;`),Y.ntriangleright=Y[`⋫`]=G(Q,`\\ntriangleright `,`&#8939;`),Y.ntrianglelefteq=Y[`⋬`]=G(Q,`\\ntrianglelefteq `,`&#8940;`),Y.ntrianglerighteq=Y[`⋭`]=G(Q,`\\ntrianglerighteq `,`&#8941;`),Y.blacksquare=Y[`∎`]=G(Q,`\\blacksquare `,`&#8718;`),Y.colon=Y[`∶`]=G(Q,`\\colon `,`&#8758;`),Y.llcorner=Y[`∟`]=G(Q,`\\llcorner `,`&#8735;`),Y.dotplus=Y[`∔`]=G($,`\\dotplus `,`&#8724;`),Y.nmid=Y[`∤`]=G($,`
199
- mid `,`&#8740;`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`&#8890;`),Y.veebar=Y[`⊻`]=G($,`\\veebar `,`&#8891;`),Y.barwedge=Y[`⊼`]=G($,`\\barwedge `,`&#8892;`),Y.ltimes=Y[`⋉`]=G($,`\\ltimes `,`&#8905;`),Y.rtimes=Y[`⋊`]=G($,`\\rtimes `,`&#8906;`),Y.leftthreetimes=Y[`⋋`]=G($,`\\leftthreetimes `,`&#8907;`),Y.rightthreetimes=Y[`⋌`]=G($,`\\rightthreetimes `,`&#8908;`),Y.curlyvee=Y[`⋎`]=G($,`\\curlyvee `,`&#8910;`),Y.curlywedge=Y[`⋏`]=G($,`\\curlywedge `,`&#8911;`),Y.circledcirc=Y[`⊚`]=G($,`\\circledcirc `,`&#8858;`),Y.circledast=Y[`⊛`]=G($,`\\circledast `,`&#8859;`),Y.circleddash=Y[`⊝`]=G($,`\\circleddash `,`&#8861;`),Y.boxplus=Y[`⊞`]=G($,`\\boxplus `,`&#8862;`),Y.boxminus=Y[`⊟`]=G($,`\\boxminus `,`&#8863;`),Y.boxtimes=Y[`⊠`]=G($,`\\boxtimes `,`&#8864;`),Y.boxdot=Y[`⊡`]=G($,`\\boxdot `,`&#8865;`),Y[`∂`]=Y.partial,Y[`∃`]=Y.exists,Y[`∅`]=Y.varnothing,Y[`∆`]=Y.triangle,Y[`∇`]=Y.nabla,Y[`∈`]=Y.in,Y[`∊`]=Y.in,Y[`∋`]=Y.ni,Y[`∌`]=Y.notni,Y[`∍`]=Y.ni,Y[`∐`]=Y.amalg,Y[`−`]=Y[`-`],Y[`∓`]=Y.mp,Y[`∖`]=Y.setminus,Y[`∘`]=Y.circ,Y[`∙`]=Y.bullet,Y[`∝`]=Y.propto,Y[`∞`]=Y.infty,Y[`∠`]=Y.angle,Y[`∡`]=Y.measuredangle,Y[`∣`]=Y.divides,Y[`∥`]=Y.parallel,Y[`∦`]=Y.nparallel,Y[`∧`]=Y.wedge,Y[`∨`]=Y.vee,Y[`∩`]=Y.cap,Y[`∪`]=Y.cup,Y[`∮`]=Y.oint,Y[`∴`]=Y.therefore,Y[`∵`]=Y.because,Y[`∼`]=Y.sim,Y[`≀`]=Y.wr,Y[`≃`]=Y.simeq,Y[`≍`]=Y.asymp,Y[`≐`]=Y.doteq,Y[`≪`]=Y.ll,Y[`≫`]=Y.gg,Y[`≺`]=Y.prec,Y[`≻`]=Y.succ,Y[`⊂`]=Y.subset,Y[`⊃`]=Y.supset,Y[`⊆`]=Y.subseteq,Y[`⊇`]=Y.supseteq,Y[`⊈`]=Y.nsubseteq,Y[`⊉`]=Y.nsupseteq,Y[`⊏`]=Y.sqsubset,Y[`⊐`]=Y.sqsupset,Y[`⊓`]=Y.sqcap,Y[`⊔`]=Y.sqcup,Y[`⊖`]=Y.ominus,Y[`⊘`]=Y.oslash,Y[`⊙`]=Y.odot,Y[`⊢`]=Y.vdash,Y[`⊣`]=Y.dashv,Y[`⊤`]=Y.top,Y[`⊥`]=Y.bot,Y[`⊧`]=Y.models,Y[`⋀`]=Y.wedge,Y[`⋁`]=Y.vee,Y[`⋂`]=Y.cap,Y[`⋃`]=Y.cup,Y[`⋄`]=Y.diamond,Y[`⋅`]=Y.cdot,Y[`⋆`]=Y.star,Y[`⋈`]=Y.bowtie,Y[`⋮`]=Y.vdots,Y[`⋯`]=Y.cdots,Y[`⋱`]=Y.ddots;var fO,pO=dD,mO=document.createElement(`div`).style,hO={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},gO;for(var _O in hO)if(_O in mO){gO=_O;break}gO?fO=function(e,t,n){e.css(gO,`scale(`+t+`,`+n+`)`)}:`filter`in mO?(pO=function(e){e.className=e.className},fO=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);W(window).load(function(){clearTimeout(a),i()})}):fO=function(e,t,n){e.css(`fontSize`,n+`em`)};var vO=K(Z,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),yO=K(Z,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 VD.optBlock.then(function(t){return VD.block.map(function(n){var r=bO.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))}}),bO=K(yO,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+`>`,Z.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[q].latex()+`]{`+this.ends[J].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[q].upOutOf=this.ends[J],this.upInto=this.ends[J].downOutOf=this.ends[q]}}),xO=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return K(Z,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+`>`)}})},SO=K(Z,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>`)}}),CO=K(Z,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>`)}}),wO=K(Z,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">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),TO=K(Z,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>`)}}),EO=function(e,t){return K(UD,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Y.mathrm=G(vO,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Y.mathit=G(vO,`\\mathit`,`i`,`class="mq-font"`),Y.mathbf=G(vO,`\\mathbf`,`b`,`class="mq-font"`),Y.mathsf=G(vO,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Y.mathtt=G(vO,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Y.underline=G(vO,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Y.overline=Y.bar=G(xO(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Y.longdiv=G(SO,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Y.overrightarrow=G(xO(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Y.overleftarrow=G(xO(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Y.xleftarrow=G(yO,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Y.xrightarrow=G(yO,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Y.overleftrightarrow=G(vO,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Y.overarc=G(vO,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Y.dot=K(Z,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">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),Y.addmatrixrow=G(CO,`\\addmatrixrow`,`span`,`+`),Y.addmatrixcol=G(TO,`\\addmatrixcol`,`span`,`+`),Y.ngtr=Y[`≯`]=G(EO(`mq-ngtr`,`&#8815;`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Y.nless=Y[`≮`]=G(EO(`mq-nless`,`&#8814;`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Y.dot=G(wO,`\\dot`),Y.parallelogram=G(EO(`mq-parallelogram`,`&#9649;`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Y.textcolor=K(Z,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=X.optWhitespace,r=X.string,i=X.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}}),Y.class=K(Z,function(e,t){e.parser=function(){var e=this,n=X.string,r=X.regex;return X.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 DO=K(Z,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[q]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=q;t;t=t===q&&J)if(this[t]instanceof DO){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=vD(i,0,i.ends[q]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=vD(i,o.ends[J],i.ends[q]);t===q?o.adopt(i,i.ends[J],0):o.adopt(i,0,i.ends[q])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[q]===this&&(t===J&&a?a[q]?e.insRightOf(a[q]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},OD.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[q].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 UD?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[q]&&!e[J]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),WD.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 UD?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(q,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=W(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(cD,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=W(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(cD,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">&#8203;</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`]=OO,delete e[n].deleteOutOf,t===`sub`&&W(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 OO(e){var t=this.parent,n=e;do{if(n[J])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Y.subscript=Y._=K(DO,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">&#8203;</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[q],this.sub.upOutOf=OO,t.finalizeTree.call(this)}}),Y.superscript=Y.supscript=Y[`^`]=K(DO,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[J],this.sup.downOutOf=OO,t.finalizeTree.call(this)}});var kO=K(Z,function(e,t){e.parser=function(){for(var e=X.string,t=X.optWhitespace,n=X.succeed,r=VD.block,i=this,a=i.blocks=[WD(),WD()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[J],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[J],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[q],this.upInto=this.ends[J],this.ends[q].upOutOf=this.ends[J],this.ends[J].downOutOf=this.ends[q]}}),AO=K(kO,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>`;UD.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[q].latex())+`^`+e(this.ends[J].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&($D(`n`).createLeftOf(e),dO().createLeftOf(e))}});Y[`∑`]=Y.sum=Y.summation=G(AO,`\\sum `,`&sum;`),Y[`∏`]=Y.prod=Y.product=G(AO,`\\prod `,`&prod;`),Y.coprod=Y.coproduct=G(AO,`\\coprod `,`&#8720;`),Y[`∫`]=Y.int=Y.integral=K(AO,function(e,t){e.init=function(){UD.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>&int;</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">&#8203</span></span></span>`)},e.createLeftOf=Z.p.createLeftOf}),Y.lim=Y.limit=K(kO,function(e,t){e.init=function(){UD.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[q].latex())}});var jO=Y.over=SD[`/`]=K(Y.frac=Y.dfrac=Y.cfrac=Y.fraction=K(Z,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">&#8203;</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[J].upOutOf=this.ends[q],this.downInto=this.ends[q].downOutOf=this.ends[J]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[q];n&&!(n instanceof $||n instanceof(Y.text||dD)||n instanceof AO||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[q];n instanceof AO&&n[J]instanceof DO&&(n=n[J],n[J]instanceof DO&&n[J].ctrlSeq!=n.ctrlSeq&&(n=n[J])),n!==e[q]&&!e.isTooDeep(1)&&(this.replaces(xD(n[J]||e.parent.ends[q],e[q])),e[q]=n)}t.createLeftOf.call(this,e)}});Y.underset=K(Z,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[q].upOutOf=this.ends[J],this.upInto=this.ends[J].downOutOf=this.ends[q]}}),Y.overset=K(Z,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[J].upOutOf=this.ends[q],this.upInto=this.ends[q].downOutOf=this.ends[J]}});var MO=Y.sqrt=Y[`√`]=K(Z,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">&radic;</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 VD.optBlock.then(function(e){return VD.block.map(function(t){var n=NO();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[J].jQ.parent();fO(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Y.hat=K(Z,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 NO=Y.nthroot=K(MO,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">&radic;</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[q].latex()+`]{`+this.ends[J].latex()+`}`}}),PO=K(Z,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)}});Y.vec=G(PO,`\\vec`,`&rarr;`,[`vec(`,`)`]),Y.tilde=G(PO,`\\tilde`,`~`,[`tilde(`,`)`]),Y.lrncuberoot=K(MO,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">&radic;</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[q].latex()+`}`}}),Y.abs=K(Z,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Y.lrnplaceholder=K(Z,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[q].latex()}}),Y.lrnexponent=K(Z,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[J].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[q].latex()+`^`+e}}),Y.lrnsquaredexponent=K(Z,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[q].latex()+`^2`}}),Y.lrnsubscript=K(Z,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">&nbsp;</span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[q].latex()+`_`+this.ends[J].latex()}});function FO(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`));fO(this.delimjQs,lD(1+.2*(e-1),1.2),1.2*e)}}var IO=K(K(Z,FO),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,oD,[n,r]),this.side=e,this.sides={},this.sides[q]={ch:n,ctrlSeq:i},this.sides[J]={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===J?` mq-ghost`:``)+`">`+this.sides[q].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===q?` mq-ghost`:``)+`">`+this.sides[J].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[q].ctrlSeq+this.ends[q].latex()+`\\right`+this.sides[J].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof IO&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||LO[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[q].ch]===n.sides[J].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===q?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[q].ch===`|`)var r=this.matchBrack(n,J,e[J])||this.matchBrack(n,q,e[q])||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]&&xD(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(xD(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===q?e.insAtLeftEnd(r.ends[q]):e.insRightOf(r)},e.placeCursor=dD,e.unwrap=function(){this.ends[q].children().disown().adopt(this.parent,this,this[J]).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[q].ends[this.side])){this.closeOpposing(this.ends[q].ends[this.side]);var c=this.ends[q].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:LO[this.sides[this.side].ch],ctrlSeq:LO[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===q?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[q].ends[e];xD(i,a,-e).disown().withDirAdopt(-e,this.ends[q],c,0).jQ.insAtDirEnd(e,this.ends[q].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[q])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[q].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===q)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),LO={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"&lang;":`&rang;`,"&rang;":`&lang;`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function RO(e,t){var t=t||e,n=LO[e],r=LO[t];SD[e]=G(IO,q,e,n,t,r),SD[n]=G(IO,J,e,n,t,r)}RO(`(`),RO(`[`),RO(`{`,`\\{`),Y.langle=G(IO,q,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),Y.rangle=G(IO,J,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),SD[`|`]=G(IO,q,`|`,`|`,`|`,`|`),Y.lVert=G(IO,q,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),Y.rVert=G(IO,J,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),Y.left=K(Z,function(e){e.parser=function(){var e=X.regex,t=X.string;X.succeed;var n=X.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=`&lang;`,r+=` `),r==`\\lVert`&&(i=`&#8741;`,r+=` `),VD.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=`&rang;`,e+=` `),e==`\\rVert`&&(t=`&#8741;`,e+=` `);var n=IO(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Y.right=K(Z,function(e){e.parser=function(){return X.fail(`unmatched \\right`)}}),Y.choose=K(Y.binom=Y.binomial=K(K(Z,FO),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=jO.prototype.createLeftOf}),Y.editable=Y.MathQuillMathField=K(Z,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=X.string,r=X.regex,i=X.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=ED(this.ends[q],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),RD(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[q].controller))},e.latex=function(){return this.ends[q].latex()},e.text=function(){return this.ends[q].text()}});var zO=Y.embed=K(UD,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=X.string,n=X.regex,r=X.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(jD[i](t))})})}});Y.MathQuillResponseContainer=K(Z,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[q].text()}}),Y.MathQuillResponseContainerIcon=K(Z,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[q].text()}});var BO=Y.matrix=K(Z,function(e,t){var n=K(WD,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[J],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&&fO(n,lD(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=X.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);VD.parse(u[e]||` `).children().adopt(f,f.ends[J],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[J],0);return X.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=yD.byId[e.first().attr(cD)],n=yD.byId[e.last().attr(cD)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=yD.byId[W(this).attr(cD)],a=e.eq(t+1),o=W(this).closest(`tr`).next(`tr`),s=W(this).closest(`tr`).index(),c=W(this).index(),l;if(a.length){var u=yD.byId[a.attr(cD)];n[J]=u,u[q]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=yD.byId[l.attr(cD)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[q]=t,this.ends[J]=n,t&&t[q]&&delete t[q],n&&n[J]&&delete n[J],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 W(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return yD.byId[W(this).attr(cD)].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=yD.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(cD)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=W(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=W(`<td class="mq-empty">`).attr(cD,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=W(`<td class="mq-empty">`).attr(cD,a.id),a.jQ.insertAfter(W(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`)}}});Y.pmatrix=K(BO,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Y.bmatrix=K(BO,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Y.Bmatrix=K(BO,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Y.vmatrix=K(BO,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Y.Vmatrix=K(BO,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var VO=ID(3);for(var HO in VO)(function(e,t){typeof t==`function`?(ND[e]=function(){return MD(),t.apply(this,arguments)},ND[e].prototype=t.prototype):ND[e]=t})(HO,VO[HO]);var UO=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},WO;typeof window<`u`&&(WO=ND.getInterface(3),WO&&WO.registerEmbed&&UO(WO));function GO(e,t){!WO||!WO.registerEmbed||WO.registerEmbed(e,t)}function KO(e,t,n){if(!(!WO||!e))return t!=null&&(e.textContent=t),WO.StaticMath(e,n)}var qO=e=>`&.mq-math-mode ${e}, & .mq-math-mode ${e}`,JO={"&.mq-editable-field .mq-cursor, & .mq-editable-field .mq-cursor":{borderLeftColor:`currentColor`},"&.mq-editable-field:not(.mq-focused), & .mq-editable-field:not(.mq-focused)":{borderColor:bb()},[[`.mq-overline .mq-overline-inner`,`.mq-overarrow`,`.mq-overarrow .mq-overarrow-inner`,`.mq-overleftrightarrow .mq-overleftrightarrow-inner`,`.mq-overarc`,`.mq-longdiv .mq-longdiv-inner`].map(qO).join(`, `)]:{borderTopColor:`currentColor`},[[`.mq-underline`,`.mq-xarrow .mq-xarrow-over`].map(qO).join(`, `)]:{borderBottomColor:`currentColor`},[qO(`.mq-abs`)]:{borderLeftColor:`currentColor`,borderRightColor:`currentColor`},[qO(`.mq-matrix td.mq-empty`)]:{borderColor:`currentColor`}},YO={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`}},XO={"& .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`}},ZO={"& *":{...YO,...XO,"& .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`}}},QO=Gh(`pie-lib:math-input:mq:static`),$O=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,ek=/ /g;function tk(e=``){return e.replace(ek,``)}function nk(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var rk=I(`span`)(JO),ik=class extends N.Component{static propTypes={latex:O.string.isRequired,onFocus:O.func,onBlur:O.func,className:O.string,getFieldName:O.func,onSubFieldChange:O.func,onSubFieldFocus:O.func,setInput:O.func,language:O.string};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=N.createRef()}componentDidMount(){this.update(),vm(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),vm()}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(nk(e)>nk(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(!WO)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=WO.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}nD(this.inputRef?.current,this.props.language)};blur=()=>{QO(`blur mathfield`),this.mathField.blur()};focus=()=>{QO(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=tk(this.mathField.parseLatex(e.latex)),n=(e.latex.match($O)||[]).length,r=t!==tk(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return QO(`[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)(rk,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},ak=e=>(Rt(5-e.length,()=>e.push([])),zt.apply(null,e)),ok=Gh(`pie-lib:math-inline:keypad`),sk=Hy(`pie`),ck=[Uy(),qb()],lk={"& .MuiTouchRipple-root":{color:`rgb(from ${Uy()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))`}},uk={"&.Mui-focusVisible":{outline:`2px solid ${Nb()}`,outlineOffset:`-2px`,boxShadow:`inset 0 0 0 4px ${sk(`background`,B.WHITE)}`}},dk=I(ik)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:ck,"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${Ub()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid currentColor`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid currentColor`,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 currentColor !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});dk.propTypes={latex:O.string.isRequired};var fk=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},pk=I(`div`)(()=>({...ZO,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`}}})),mk=I(Lh)(({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:ck,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},...lk,...uk,borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),hk=I(Lh)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},...lk,...uk})),gk=I(Uh)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},borderRadius:0,"& .icon":{height:`30px`}})),_k=class extends N.Component{static propTypes={className:O.string,controlledKeypadMode:O.bool,baseSet:O.array,additionalKeys:O.array,layoutForKeyPad:O.object,onPress:O.func.isRequired,onFocus:O.func,noDecimal:O.bool,setKeypadInteraction:O.func,mode:O.oneOfType([O.string,O.number])};static defaultProps={baseSet:jm,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=>{ok(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>Mt([...ak(e),...ak(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))`,...fk(r)};return(0,P.jsx)(pk,{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)(hk,{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)(dk,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(mk,{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)(gk,{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)}})})}},vk=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}},yk=class extends N.Component{static propTypes={className:O.string,controlledKeypadMode:O.bool,mode:O.oneOfType([O.string,O.number]),layoutForKeyPad:O.object,onClick:O.func.isRequired,onFocus:O.func,noDecimal:O.bool,additionalKeys:O.array,setKeypadInteraction:O.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(vk(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=_m(a);return(0,P.jsx)(_k,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:mf(hm(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},bk=o(((e,t)=>{t.exports={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(e,t){return[t+`box-flex`]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1}})),xk=o(((e,t)=>{t.exports={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1}})),Sk=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e}})),Ck=o(((e,t)=>{var n=Sk(),r=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,i=typeof document>`u`?{}:document.documentElement.style;t.exports=(function(){var e=(function(){for(var e in i)if(r.test(e))return e.match(r)[0];return`WebkitOpacity`in i?`Webkit`:`KhtmlOpacity`in i?`Khtml`:``})();return{style:e,css:`-`+e.toLowerCase()+`-`,dom:{Webkit:`WebKit`,ms:`MS`,o:`WebKit`}[e]||n(e)}})()})),wk=o(((e,t)=>{t.exports=/[-\s]+(.)?/g})),Tk=o(((e,t)=>{var n=function(e,t){return t?t.toUpperCase():``},r=wk();t.exports=function(e){return e?e.replace(r,n):``}})),Ek=o(((e,t)=>{var n=/::/g,r=/([A-Z]+)([A-Z][a-z])/g,i=/([a-z\d])([A-Z])/g,a=/_/g;t.exports=function(e,t){return e?e.replace(n,`/`).replace(r,`$1_$2`).replace(i,`$1_$2`).replace(a,t||`-`):``}})),Dk=o(((e,t)=>{var n=Ek();t.exports=function(e){return n(e).toLowerCase()}})),Ok=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e}})),kk=o(((e,t)=>{var n=Tk(),r=Dk(),i=Ok(),a=Sk(),o=Ck(),s=bk(),c=typeof document>`u`?{}:document.documentElement.style;t.exports=function(e){return function(t,l){l||={};var u=i(n(t)),d=r(t),f=e?u:d,p=o.style?e?o.style:o.css:``;if(u in c)return l.asString?f:[f];var m=f,h=s[d],g=[];if(e&&(m=a(f)),typeof h==`function`){var _=h(f,p)||[];_&&!Array.isArray(_)&&(_=[_]),_.length&&(_=_.map(function(t){return e?i(n(t)):r(t)})),g=g.concat(_)}return p&&g.push(p+m),g.push(f),l.asString||g.length==1?g[0]:g}}})),Ak=o(((e,t)=>{t.exports=kk()()})),jk=o(((e,t)=>{var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}})),Mk=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return!!e&&n.call(e)===`[object Object]`}})),Nk=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.apply(e)===`[object Function]`}})),Pk=o(((e,t)=>{Ck();var n=Ak(),r=Dk(),i=Tk(),a=jk(),o=Mk(),s=Nk(),c=function(e,t,r,i){n(t).forEach(function(t){e[i?i(t):t]=r})},l=function(e){e=(e||``).split(`;`);var t={};return e.forEach(function(e){var n=e.split(`:`);n.length==2&&(t[n[0].trim()]=n[1].trim())}),t},u={cssUnitless:xk()},d=function(e,t,n,f){typeof e==`string`&&(e=l(e)),t||=u,t.cssUnitless=t.cssUnitless||u.cssUnitless,f||={};var p=t.scope||{},m=t.addUnits==null?p&&p.addUnits!=null?p.addUnits:!0:t.addUnits,h=(t.cssUnitless==null?p?p.cssUnitless:null:t.cssUnitless)||{},g=(t.cssUnit||p?p.cssUnit:null)||`px`,_=t.prefixProperties||(p?p.prefixProperties:null)||{},v=t.camelize?i:r,y,b,x,S,C,w,T,E;for(x in e)if(a(e,x)){if(S=e[x],b=r(n?n+x:x),y=!1,E=!1,s(S)&&(T=S.call(p||e,S,x,b,e),o(T)&&T.value!=null?(S=T.value,E=T.prefix,b=T.name?r(T.name):b):S=T),C=typeof S,w=C==`number`||C==`string`&&S!=``&&S*1==S,S==null||b==null||b===``)continue;if((w||C==`string`)&&(y=!0),!y&&S.value!=null&&S.prefix&&(y=!0,E=S.prefix,S=S.value),y){if(E||=!!_[b],w&&(S=m&&!(b in h)?S+g:S+``),(b==`border`||!b.indexOf(`border`)&&!~b.indexOf(`radius`)&&!~b.indexOf(`width`))&&w&&(b+=`-width`),!b.indexOf(`border-radius-`)&&(b.replace(/border(-radius)(-(.*))/,function(e,t,n){var r={"-top":[`-top-left`,`-top-right`],"-left":[`-top-left`,`-bottom-left`],"-right":[`-top-right`,`-bottom-right`],"-bottom":[`-bottom-left`,`-bottom-right`]};n in r?(b=[],r[n].forEach(function(e){b.push(`border`+e+t)})):b=`border`+n+t}),Array.isArray(b))){b.forEach(function(e){E?c(f,e,S,v):f[v(e)]=S});continue}E?c(f,b,S,v):f[v(b)]=S}else d(S,t,b+`-`,f)}return f};t.exports=d})),Fk=o(((e,t)=>{var n=Pk(),r=jk();t.exports=function(e,t){e=n(e,t);var i=[],a;for(a in e)r(e,a)&&i.push(a+`: `+e[a]);return i.join(`; `)}})),Ik=o(((e,t)=>{t.exports={prefixProperties:bk(),cssUnitless:xk(),object:Pk(),string:Fk()}}))(),Lk=Gh(`@pie-lib:mask-markup:serialization`),Rk=[`span`],zk=[`em`,`strong`,`u`],Bk=3,Vk=8,Hk=1,Uk=e=>{if(!e.attributes||e.attributes.length<=0)return;let t={},n;for(n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t},Wk=e=>Rk.includes(e)?`inline`:zk.includes(e)?`mark`:`block`,Gk=e=>{let t=/([\w-]*)\s*:\s*([^;]*)/g,n,r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r},Kk=e=>(0,Ik.object)(e,{camelize:!0,addUnits:!1}),qk=(e,t)=>Kk(Gk(e.getAttribute(t))),Jk=(e,t,n)=>{let r=e.getAttribute(n);return delete t.class,r},Yk=e=>(t,n)=>{if(!e.getAttribute)return t;if(e.getAttribute(n))switch(n){case`style`:t.style=qk(e,n);break;case`class`:t.className=Jk(e,t,n);break;default:t[n]=e.getAttribute(n);break}return t},Xk=[`border`,`class`,`style`],Zk={b:`bold`,em:`italic`,u:`underline`,s:`strikethrough`,code:`code`,strong:`strong`},Qk=(e,t=[])=>{if(e.nodeType===Vk)return null;if(e.nodeType===Bk){let n={text:e.textContent};return t.length>0&&(n.marks=t.map(e=>({type:e,data:void 0}))),{object:`text`,leaves:[n]}}if(e.nodeType===Hk){let n=e.tagName.toLowerCase(),r=Zk[n];if(r)return Lk(`[deserialize] mark: `,r),{_flatten:!0,nodes:$k(e.childNodes,[...t,r])};if(n===`math`)return{isMath:!0,nodes:[e]};let i=Uk(e)||{};n===`audio`&&i.controls===``&&(i.controls=!0);let a=Xk.reduce(Yk(e),{...i}),o=Wk(n),s=$k(e.childNodes,t);return{object:o,type:n,data:{dataset:{...e.dataset},attributes:{...a}},nodes:s}}return null},$k=(e,t=[])=>{let n=[];for(let r=0;r<e.length;r++){let i=Qk(e[r],t);i!==null&&(i._flatten&&i.nodes?n.push(...i.nodes):n.push(i))}return n},eA=e=>{if(!e||!e.trim())return{object:`value`,document:{object:`document`,data:{},nodes:[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:[]}]}};let t=$k(new DOMParser().parseFromString(e,`text/html`).body.childNodes);return!t.some(e=>e.object===`block`||e.object===`inline`)&&t.length>0&&(t=[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:t}]),t.length===0&&(t=[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:[]}]),{object:`value`,document:{object:`document`,data:{},nodes:t}}},tA=I(`div`)(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),nA=I(`span`)(()=>({display:`inline-block`,width:`.75em`})),rA=[`tbody`,`tr`],iA=(e,t)=>{let n=t.trim()===``,r=e&&e.type;if(!(n&&rA.includes(r)))return t},aA=e=>{let t=e.leaves.find(e=>Nt(e,`marks`,[]).length);return t?t.marks:null},oA=(e,t,n,r,i,a)=>{if(!t)return null;let o=[];return(e.nodes||[]).forEach((e,s)=>{let c=e.type?`${e.type}-${s}`:`${s}`;if(e.isMath)return o.push((0,P.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Ry(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`)}})),o;if(r){let a=r(e,t,n);if(a){let t=e.data?.dataset?.component===`blank`&&i?.type!==`td`;t&&o.push((0,P.jsx)(nA,{},`spacer-${s}-before`)),o.push(a),t&&o.push((0,P.jsx)(nA,{},`spacer-${s}-after`));return}}if(e.object===`text`){let t=e.leaves.reduce((e,t)=>{let n=t.text,r=iA(i,n);return r?e+r:e},``),n=aA(e);if(n?.length>0){let e=n.map(e=>Object.keys(Zk).find(t=>Zk[t]===e.type)).filter(Boolean);e.length>0?o.push(e.reduceRight((e,t,n)=>(0,P.jsx)(t,{children:e},`${c}-${t}-${n}`),t)):o.push(t)}else t.length>0&&o.push(t)}else{let i=oA(e,t,n,r,e,a);if(e.type===`p`||e.type===`paragraph`)o.push((0,P.jsx)(tA,{children:i},c));else{let t=e.type;e.nodes&&e.nodes.length>0?o.push((0,P.jsx)(t,{...e.data.attributes,children:i},c)):o.push((0,P.jsx)(t,{...e.data.attributes},c))}}}),o},sA=I(`div`)(()=>({display:`initial`,"&:not(.MathJax) table":{borderCollapse:`collapse`},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:`8px 12px`,textAlign:`left`}})),cA=class extends N.Component{constructor(e){super(e),this.internalContainerRef=N.createRef()}static propTypes={renderChildren:O.func,layout:O.object,value:O.object,onChange:O.func,elementType:O.string,containerRef:O.oneOfType([O.func,O.shape({current:O.instanceOf(Element)})])};componentDidMount(){let e=this.props.containerRef||this.internalContainerRef;e.current&&typeof ww==`function`&&ww(e.current)}handleChange=(e,t)=>{let n={...this.props.value,[e]:t};this.props.onChange(n)};render(){let{value:e,layout:t,elementType:n,containerRef:r}=this.props,i=oA(t,e,this.handleChange,this.props.renderChildren,null,n),a=r||this.internalContainerRef;return(0,P.jsx)(sA,{ref:a,children:i})}},lA=/\{\{(\d+)\}\}/g,uA=(e,t)=>e?{markup:e.replace(lA,(e,n)=>`<span data-component="${t}" data-id="${n}"></span>`)}:{markup:``},dA=(e,t)=>{let{markup:n}=uA(e,t);return eA(Ry(n)).document},fA=((e,t)=>class extends N.Component{static propTypes={markup:O.string,layout:O.object,value:O.object,onChange:O.func,customMarkMarkupComponent:O.func,elementType:O.string};constructor(e){super(e),this.containerRef=N.createRef()}componentDidUpdate(e){if(this.props.markup!==e.markup){let e=this.containerRef.current;(e&&e.querySelectorAll(`[data-latex][data-math-handled="true"]`)||[]).forEach(e=>{let t=e.querySelector(`mjx-container`);t&&e.removeChild(t),e.textContent=e.getAttribute(`data-raw`),e.removeAttribute(`data-math-handled`)})}}render(){let{markup:n,layout:r,value:i,onChange:a,elementType:o}=this.props,s=r||dA(n,e);return(0,P.jsx)(cA,{containerRef:this.containerRef,elementType:o,layout:s,value:i,onChange:a,renderChildren:t(this.props)})}})(`input`,e=>(t,n,r)=>{let i=t.data&&t.data.dataset||{};if(i.component===`input`)return e.customMarkMarkupComponent(i.id)}),pA=`height ease-in 300ms, opacity ease-in 300ms`,mA=I(`div`)(()=>({position:`relative`,height:0,overflow:`hidden`,display:`flex`,visibility:`hidden`,width:0,"&.enter":{transition:pA,opacity:1,height:`auto`,width:`auto`,visibility:`visible`,minHeight:`25px`},"&.enter-done":{height:`auto`,visibility:`visible`,width:`auto`,minHeight:`25px`},"&.exit":{transition:pA,opacity:0,height:0,visibility:`visible`,width:0},"&.exit-done":{opacity:0,visibility:`hidden`,height:0,width:0}})),hA=e=>{let{show:t,children:n,className:r}=e,i=(0,N.useRef)(null);return(0,P.jsx)(ol,{nodeRef:i,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:`enter`,enterDone:`enter-done`,exit:`exit`,exitDone:`exit-done`},children:(0,P.jsx)(mA,{ref:i,className:r,children:n})})};hA.propTypes={show:O.bool.isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};function gA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function _A(e,t){return!e||gA(e)?e:gA(e.default)?e.default:t&&gA(e[t])?e[t]:t&&gA(e[t]?.default)?e[t].default:e}var vA=_A(TE,`Readable`)||_A(xA.Readable,`Readable`),yA=eD,bA=yA.default,xA=bA&&typeof bA==`object`?bA:yA,{translator:SA}=DT,CA={WebkitTouchCallout:`none`,WebkitUserSelect:`none`,KhtmlUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`,userSelect:`none`},wA=I(`div`)(()=>({width:`100%`,cursor:`pointer`})),TA=I(`button`)(()=>({margin:`0 auto`,textAlign:`center`,display:`flex`,minWidth:`24px`,minHeight:`24px`,padding:0,border:0,background:`none`,color:`inherit`,font:`inherit`,cursor:`pointer`,"&:focus-visible":{outline:`2px solid ${Mb()}`,outlineOffset:`-2px`}})),EA=I(`div`)(()=>({width:`fit-content`,minWidth:`140px`,alignSelf:`center`,verticalAlign:`middle`,color:`var(--correct-answer-toggle-label-color, ${Uy()})`,fontWeight:`normal`,...CA})),DA=I(`div`)(()=>({position:`absolute`,width:`25px`,"&.enter":{opacity:`0`},"&.enter-active":{opacity:`1`,transition:`opacity 0.3s ease-in`},"&.exit":{opacity:`1`},"&.exit-active":{opacity:`0`,transition:`opacity 0.3s ease-in`}})),OA=I(`div`)(()=>({width:`25px`,marginRight:`5px`,display:`flex`,alignItems:`center`})),kA=class e extends N.Component{static propTypes={onToggle:O.func,toggled:O.bool,show:O.bool,hideMessage:O.string,showMessage:O.string,className:O.string,language:O.string};static defaultProps={showMessage:`Show correct answer`,hideMessage:`Hide correct answer`,show:!1,toggled:!1};constructor(t){super(t),this.state={show:t.show},this.openIconRef=N.createRef(),this.closedIconRef=N.createRef(),e.defaultProps={...e.defaultProps,showMessage:SA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:SA.t(`common:hideCorrectAnswer`,{lng:t.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(t){this.setState({show:t.show}),t.language!==this.props?.language&&(e.defaultProps={...e.defaultProps,showMessage:SA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:SA.t(`common:hideCorrectAnswer`,{lng:t.language})})}render(){let{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return(0,P.jsx)(wA,{className:e,children:(0,P.jsx)(hA,{show:this.state.show,children:(0,P.jsxs)(TA,{type:`button`,"aria-pressed":!!t,onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this),children:[(0,P.jsxs)(OA,{children:[(0,P.jsx)(ol,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,P.jsx)(DA,{ref:this.openIconRef,children:(0,P.jsx)(sg,{open:t},`correct-open`)})}),(0,P.jsx)(ol,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,P.jsx)(DA,{ref:this.closedIconRef,children:(0,P.jsx)(sg,{open:t},`correct-closed`)})})]}),(0,P.jsx)(vA,{false:!0,children:(0,P.jsx)(EA,{"aria-hidden":!this.state.show,children:t?n:r})})]})})})}};function AA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function jA(e,t){return!e||AA(e)?e:AA(e.default)?e.default:t&&AA(e[t])?e[t]:t&&AA(e[t]?.default)?e[t].default:e}var MA=jA(WT,`UiLayout`)||jA(RA.UiLayout,`UiLayout`),NA=jA(wE,`PreviewPrompt`)||jA(RA.PreviewPrompt,`PreviewPrompt`),PA=jA(TE,`Readable`)||jA(RA.Readable,`Readable`),FA=jA(PT,`Collapsible`)||jA(RA.Collapsible,`Collapsible`),IA=eD,LA=IA.default,RA=LA&&typeof LA==`object`?LA:IA,{translator:zA}=DT,BA=I(MA)({color:Uy(),backgroundColor:db(),display:`inline-block`}),VA=I(`div`)({width:`100%`,position:`relative`,backgroundColor:db(),color:Uy()}),HA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),UA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),WA=I(`div`)({position:`relative`,"& > div > div":{display:`flex`,alignItems:`baseline`,flexWrap:`wrap`},"& .mq-overarrow-inner":{border:`none !important`,padding:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`-2.4em`,right:`-1px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85}}),GA=I(`div`)(({theme:e,$incorrect:t,$correct:n,$showCorrectness:r,$correctAnswerShown:i})=>({maxWidth:`fit-content`,...t&&{borderColor:`${Zy()} !important`},...n&&{borderColor:`${qy()} !important`},...r&&{border:`2px solid`},...i&&{padding:e.spacing(1),letterSpacing:`0.5px`},"& > .mq-math-mode":{"& > .mq-root-block":{"& > .mq-editable-field":{minWidth:`10px`,padding:e.spacing(.25)}},"& sup":{top:0}}})),KA=I(ik)({"& > .mq-root-block":{"& > .mq-editable-field":{borderColor:Uy()}}}),qA=I(`div`)(({theme:e})=>({zIndex:10,minWidth:`400px`,marginTop:e.spacing(2)})),JA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(1),pointerEvents:`none`})),YA=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),XA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),ZA=I(kA)(({theme:e})=>({color:Uy(),marginBottom:e.spacing(2)}));if(typeof document<`u`){let e=`math-templated-main-styles`;if(!document.getElementById(e)){let t=document.createElement(`style`);t.id=e,t.textContent=`
197
+ https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide`)},ND(),PD},PD.getInterface=LD;var FD=LD.MIN=1,ID=LD.MAX=3;function LD(e){if(!(FD<=e&&e<=ID))throw`Only interface versions between `+FD+` and `+ID+` 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=W(e).children(`.mq-root-block`).attr(lD),r=t&&bD.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=q,t.R=J,t.saneKeyboardEvents=BD;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=AD[r];e[r]=a?a(i):i}}t.config=function(e){return r(kD.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`;MD[e]=t};var i=n.AbstractMathQuill=K(jD,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=W(`<span class="mq-root-block"/>`).attr(lD,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=K(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[q]=e.ends[J]=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=Y[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[q];)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(q)},e.moveToRightEnd=function(){return this.moveToDirEnd(J)},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:fD});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-W(window).scrollLeft(),i=t-W(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(W(a),e,t),BO().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 oD.contains(i.jQ[0],n)||(n=i.jQ[0]),r.seek(W(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,OD)(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=DD(a.RootBlock(),W(n),kD());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,OD[a]);return t}PD.noConflict=function(){return window.MathQuill=RD,PD};var RD=window.MathQuill;window.MathQuill=PD;function zD(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 X=K(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){_D(`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 _D(`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){_D(`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)})}),BD=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=oD(e),o=oD(n.container||a),s=fD,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=fD,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=fD,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}}}();DD.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),DD.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()}),W(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`),W(window).unbind(`blur`,i)}e.blurred=!0,n.hide().parent.blur()}}),DD.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),bD.open(function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case`Ctrl-Shift-Backspace`:case`Ctrl-Backspace`:n.ctrlDeleteDir(q);break;case`Shift-Backspace`:case`Backspace`:n.backspace();break;case`Esc`:case`Tab`:n.escapeDir(J,e,t);return;case`Shift-Tab`:case`Shift-Esc`:n.escapeDir(q,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[J];)n.selectRight();break;case`Ctrl-Shift-End`:for(;r[J]||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[q];)n.selectLeft();break;case`Ctrl-Shift-Home`:for(;r[q]||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[q])for(;r[q];)n.selectLeft();else n.selectLeft();case`Shift-Down`:if(r[J])for(;r[J];)n.selectRight();else n.selectRight();case`Ctrl-Up`:break;case`Ctrl-Down`:break;case`Ctrl-Shift-Del`:case`Ctrl-Del`:n.ctrlDeleteDir(J);break;case`Shift-Del`:case`Del`:n.deleteForward();break;case`Meta-A`:case`Ctrl-A`:for(n.notify(`move`).cursor.insAtRightEnd(n.root);r[q];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){_D(`overridden or never called on this node`)}}),DD.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){vD(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`)},AD.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){vD(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(q)},e.moveRight=function(){return this.moveDir(J)},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[J][r]?n.insAtLeftEnd(n[J][r]):n[q][r]?n.insAtRightEnd(n[q][r]):n.parent.bubble(function(e){var t=e[i];if(t&&(typeof t==`function`&&(t=e[i](n)),t instanceof bD&&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){vD(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[q].siblingDeleted&&t[q].siblingDeleted(t.options,J),t[J].siblingDeleted&&t[J].siblingDeleted(t.options,q),t.parent.bubble(`reflow`),this},e.ctrlDeleteDir=function(e){vD(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===q?SD(t.parent.ends[q],t[q]).remove():SD(t[J],t.parent.ends[J]).remove(),t.insAtDirEnd(e,t.parent),t[q].siblingDeleted&&t[q].siblingDeleted(t.options,J),t[J].siblingDeleted&&t[J].siblingDeleted(t.options,q),t.parent.bubble(`reflow`),this)},e.backspace=function(){return this.deleteDir(q)},e.deleteForward=function(){return this.deleteDir(J)},this.onNotify(function(e){e!==`select`&&this.endSelection()}),e.selectDir=function(e){var t=this.notify(`select`).cursor,n=t.selection;vD(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(q)},e.selectRight=function(){return this.selectDir(J)}});var VD=/[\\]{2,}/gm,HD=(function(){function e(e){var t=GD();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||GD(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[J],0);return t}var n=X.string,r=X.regex,i=X.letter,a=X.any,o=X.optWhitespace,s=X.succeed,c=X.fail,l=i.map(function(e){return eO(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return wD[e]&&wD[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=Y[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})();DD.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return HD.parse(e).postOrder(`finalizeTree`,kD.p).join(`latex`).trim()},AD.maxDepth=function(e){return typeof e==`number`?e:sD},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=X.all,r=X.eof,i=HD.skip(r).or(n.result(!1)).parse(e);return i&&!i.isEmpty()&&i.prepareInsertionAt(t)&&(i.children().adopt(t.parent,t[q],t[J]),i.jQize().insertBefore(t.jQ),t[q]=i.ends[J],i.finalizeInsert(t.options,t),i.ends[J][J].siblingCreated&&i.ends[J][J].siblingCreated(t.options,q),i.ends[q][q].siblingCreated&&i.ends[q][q].siblingCreated(t.options,J),t.parent.bubble(`reflow`)),this},e.renderLatexMath=function(e){e&&e.replace&&(e=e.replace(VD,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=X.all,a=X.eof,o=HD.skip(a).or(i.result(!1)).parse(e);if(t.eachChild(`postOrder`,`dispose`),t.ends[q]=t.ends[J]=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[q]=t.ends[J]=0,delete n.selection,n.show().insAtRightEnd(t);var r=X.regex,i=X.string,a=X.eof,o=X.all,s=i(`$`).then(HD).skip(i(`$`).or(a)).map(function(e){var t=XD(n);t.createBlocks();var r=t.ends[q];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[J],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}}),DD.open(function(e){kD.p.ignoreNextMousedown=fD,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind(`mousedown.mathquill`,function(t){var n=W(t.target).closest(`.mq-root-block`),r=bD.byId[n.attr(lD)||e.attr(lD)].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=fD;function s(e){i.anticursor||i.startSelection(),r.seek(W(e.target),e.pageX,e.pageY).cursor.select(),e.target&&W(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),W(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(W(t.target),t.pageX,t.pageY).cursor.startSelection(),n.mousemove(s),W(t.target.ownerDocument).mousemove(c).mouseup(l)})}}),DD.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(lD)||e.attr(cD);if(!i){var a=e.parent();i=a.attr(lD)||a.attr(cD)}}var o=i&&bD.byId[i]?bD.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),DD.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[q]===e[J])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)}}),DD.open(function(e){kD.p.substituteTextarea=function(){return W(`<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />`)[0]},e.createTextarea=function(){var e=this.textareaSpan=W(`<span class="mq-textarea"></span>`),t=this.options.substituteTextarea();if(!t.nodeType)throw`substituteTextarea() must return a DOM element, got `+t;t=this.textarea=W(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;mO(e.container[0]),e.textareaSelectionTimeout===sD&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=sD;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(oD(`<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()}},kD.p.substituteKeyboardEvents=BD,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===`
198
+ `)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 UD=K(bD,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[J].siblingCreated&&n[J].siblingCreated(e,q),n[q].siblingCreated&&n[q].siblingCreated(e,J),n.bubble(`reflow`)},e.prepareInsertionAt=function(e){var t=e.options.maxDepth;if(t!==sD){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 GD);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),Z=K(UD,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=HD.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[J],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[q],0,0),r.jQ.appendTo(n.ends[q].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]=GD()).adopt(e,e.ends[J],0)},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[q],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 ED(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[q]=e.jQ.offset().left,t[J]=t[q]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[q])return t.insLeftOf(r);if(e>i[J])return t.insRightOf(r);var a=i[q];r.eachChild(function(o){var s=n(o);if(e<s[q])return e-a<s[q]-e?o[q]?t.insAtRightEnd(o[q]):t.insLeftOf(r):t.insAtLeftEnd(o),!1;if(e>s[J])o[J]?a=s[J]:i[J]-e<e-s[J]?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);_D(`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)===`<`){_D(`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],_D(`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]||``)})}}),WD=K(Z,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 X.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=fD,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=fD,e.isEmpty=function(){return!0}}),Q=K(WD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=K(WD,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),GD=K(UD,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[q]===this.ends[J]&&this.ends[q]!==0?this.ends[q].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`?q:J,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[J];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[q].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[q];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?eO(e):/^\d$/.test(e)?QD(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Y[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Y[`×`](e):(n=CD[e]||Y[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}});kD.p.mouseEvents=!0,OD.StaticMath=function(e){return K(e.AbstractMathQuill,function(t,n){this.RootBlock=GD,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 KD=K(GD,zD);OD.MathField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=KD,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=fD),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var qD=K(bD,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof SD?this.replacedText=e.remove().jQ.text():typeof e==`string`&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[q]&&this.ends[q].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){var n=this;if(t.createLeftOf.call(this,e),n[J].siblingCreated&&n[J].siblingCreated(e.options,q),n[q].siblingCreated&&n[q].siblingCreated(e.options,J),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=X.string,n=X.regex;return X.optWhitespace.then(t(`{`)).then(n(/^[^}]*/)).skip(t(`}`)).map(function(t){return t.length===0?SD():(JD(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=Z.prototype.selectTowards,e.deleteTowards=Z.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[q]?(e[q].appendText(n),this.bubble(`reflow`)):JD(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),Q(`\\$`,`$`).createLeftOf(e);else if(!e[J])e.insRightOf(this);else if(!e[q])e.insLeftOf(this);else{var r=qD(),i=this.ends[q];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?q:J,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[q]&&t[q].text.length;else if(t.anticursor.parent===this){var l=t[q]&&t[q].text.length;if(this.anticursorPosition===l)t.anticursor=yD.copy(t);else{if(this.anticursorPosition<l){var u=t[q].splitRight(this.anticursorPosition);t[q]=u}else var u=t[J].splitRight(this.anticursorPosition-l);t.anticursor=yD(this,u[q],u)}}},e.blur=function(e){GD.prototype.blur.call(this),e&&(this.textContents()===``?(this.remove(),e[q]===this?e[q]=this[q]:e[J]===this&&(e[J]=this[J])):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:``},_D(`only node in TextBlock span is Text node`,t.nodeType===3);var n=JD(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=GD.prototype.focus}),JD=K(bD,function(e,t){e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=W(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){vD(t),t===J?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=JD(this.text.slice(e)).adopt(this.parent,this,this[J]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t};function n(e,t){return t.charAt(e===q?0:-1+t.length)}e.moveTowards=function(e,t){vD(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):JD(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?e===J?(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){vD(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=JD(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=JD(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)}});Y.text=Y.textnormal=Y.textrm=Y.textup=Y.textmd=qD;function YD(e,t,n){return K(qD,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Y.em=Y.italic=Y.italics=Y.emph=Y.textit=Y.textsl=YD(`\\textit`,`i`,`class="mq-text-mode"`),Y.strong=Y.bold=Y.textbf=YD(`\\textbf`,`b`,`class="mq-text-mode"`),Y.sf=Y.textsf=YD(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Y.tt=Y.texttt=YD(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Y.textsc=YD(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Y.uppercase=YD(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Y.lowercase=YD(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var XD=K(Z,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[q].cursor=this.cursor,this.ends[q].write=function(e,t){t===`$`?this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),Q(`\\$`,`$`).createLeftOf(e.show())):e[J]?e[q]?GD.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):GD.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[q].latex()+`$`}}),ZD=K(KD,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===`$`)XD(e).createLeftOf(e);else{var n;t===`<`?n=`&lt;`:t===`>`&&(n=`&gt;`),Q(t,n).createLeftOf(e)}}});OD.TextField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=ZD,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()}})},CD[`\\`]=K(Z,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[q].focus=function(){return this.parent.jQ.addClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.removeClass(`mq-empty`),this},this.ends[q].blur=function(){return this.parent.jQ.removeClass(`mq-hasCursor`),this.isEmpty()&&this.parent.jQ.addClass(`mq-empty`),this},this.ends[q].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[q].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 W(e.target=n).trigger(e),!1}).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return`\\`+this.ends[q].latex()+` `},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[J]?e.insLeftOf(this[J]):e.insAtRightEnd(this.parent);var t=this.ends[q].latex();t||=` `;var n=Y[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):(n=qD(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Y[`∉`]=Y.notin=G($,`\\notin `,`&#8713;`),Y[`≅`]=Y.cong=G($,`\\cong `,`&#8773;`),Y[`≡`]=Y.equiv=G($,`\\equiv `,`&#8801;`),Y[`⊕`]=Y.oplus=G($,`\\oplus `,`&#8853;`),Y[`⊗`]=Y.otimes=G($,`\\otimes `,`&#8855;`),Y[`≠`]=Y.ne=Y.neq=G($,`\\ne `,`&ne;`),Y[`≇`]=Y.ncong=G($,`\\ncong `,`&ncong;`),Y[`∗`]=Y.ast=Y.star=Y.loast=Y.lowast=G($,`\\ast `,`&lowast;`),Y.therefor=Y.therefore=G($,`\\therefore `,`&there4;`),Y.cuz=Y.because=G($,`\\because `,`&#8757;`),Y.prop=Y.propto=G($,`\\propto `,`&prop;`),Y[`≈`]=Y.asymp=Y.approx=G($,`\\approx `,`&asymp;`),Y[`≉`]=Y.nasymp=Y.napprox=G($,`\\napprox `,`&nap;`),Y.isin=Y.in=G($,`\\in `,`&isin;`),Y.ni=Y.contains=G($,`\\ni `,`&ni;`),Y.notni=Y.niton=Y.notcontains=Y.doesnotcontain=wD[`\\not\\ni`]=G($,`\\not\\ni `,`&#8716;`),Y.sub=Y.subset=G($,`\\subset `,`&sub;`),Y.sup=Y.supset=Y.superset=G($,`\\supset `,`&sup;`),Y.nsub=Y.notsub=Y.nsubset=Y.notsubset=wD[`\\not\\subset`]=G($,`\\not\\subset `,`&#8836;`),Y.nsup=Y.notsup=Y.nsupset=Y.notsupset=Y.nsuperset=Y.notsuperset=wD[`\\not\\supset`]=G($,`\\not\\supset `,`&#8837;`),Y.sube=Y.subeq=Y.subsete=Y.subseteq=G($,`\\subseteq `,`&sube;`),Y.supe=Y.supeq=Y.supsete=Y.supseteq=Y.supersete=Y.superseteq=G($,`\\supseteq `,`&supe;`),Y.nsube=Y.nsubeq=Y.notsube=Y.notsubeq=Y.nsubsete=Y.nsubseteq=Y.notsubsete=Y.notsubseteq=wD[`\\not\\subseteq`]=G($,`\\not\\subseteq `,`&#8840;`),Y.nsupe=Y.nsupeq=Y.notsupe=Y.notsupeq=Y.nsupsete=Y.nsupseteq=Y.notsupsete=Y.notsupseteq=Y.nsupersete=Y.nsuperseteq=Y.notsupersete=Y.notsuperseteq=wD[`\\not\\supseteq`]=G($,`\\not\\supseteq `,`&#8841;`),Y.N=Y.naturals=Y.Naturals=G(Q,`\\mathbb{N}`,`&#8469;`),Y.P=Y.primes=Y.Primes=Y.projective=Y.Projective=Y.probability=Y.Probability=G(Q,`\\mathbb{P}`,`&#8473;`),Y.Z=Y.integers=Y.Integers=G(Q,`\\mathbb{Z}`,`&#8484;`),Y.Q=Y.rationals=Y.Rationals=G(Q,`\\mathbb{Q}`,`&#8474;`),Y.R=Y.reals=Y.Reals=G(Q,`\\mathbb{R}`,`&#8477;`),Y.C=Y.complex=Y.Complex=Y.complexes=Y.Complexes=Y.complexplane=Y.Complexplane=Y.ComplexPlane=G(Q,`\\mathbb{C}`,`&#8450;`),Y.H=Y.Hamiltonian=Y.quaternions=Y.Quaternions=G(Q,`\\mathbb{H}`,`&#8461;`),Y.quad=Y.emsp=G(Q,`\\quad `,` `),Y.qquad=G(Q,`\\qquad `,` `),Y.diamond=G(Q,`\\diamond `,`&#9671;`),Y.bigtriangleup=G(Q,`\\bigtriangleup `,`&#9651;`),Y.ominus=G(Q,`\\ominus `,`&#8854;`),Y.uplus=G(Q,`\\uplus `,`&#8846;`),Y.bigtriangledown=G(Q,`\\bigtriangledown `,`&#9661;`),Y.sqcap=G(Q,`\\sqcap `,`&#8851;`),Y.triangleleft=G(Q,`\\triangleleft `,`&#8882;`),Y.sqcup=G(Q,`\\sqcup `,`&#8852;`),Y.triangleright=G(Q,`\\triangleright `,`&#8883;`),Y.odot=Y.circledot=G(Q,`\\odot `,`&#8857;`),Y.bigcirc=G(Q,`\\bigcirc `,`&#9711;`),Y.dagger=G(Q,`\\dagger `,`&#0134;`),Y.ddagger=G(Q,`\\ddagger `,`&#135;`),Y.wr=G(Q,`\\wr `,`&#8768;`),Y.amalg=G(Q,`\\amalg `,`&#8720;`),Y.models=G(Q,`\\models `,`&#8872;`),Y.prec=G(Q,`\\prec `,`&#8826;`),Y.succ=G(Q,`\\succ `,`&#8827;`),Y.preceq=G(Q,`\\preceq `,`&#8828;`),Y.succeq=G(Q,`\\succeq `,`&#8829;`),Y.simeq=G(Q,`\\simeq `,`&#8771;`),Y.mid=G(Q,`\\mid `,`&#8739;`),Y.ll=G(Q,`\\ll `,`&#8810;`),Y.gg=G(Q,`\\gg `,`&#8811;`),Y.parallel=G(Q,`\\parallel `,`&#8741;`),Y.nparallel=G(Q,`\\nparallel `,`&#8742;`),Y.bowtie=G(Q,`\\bowtie `,`&#8904;`),Y.sqsubset=G(Q,`\\sqsubset `,`&#8847;`),Y.sqsupset=G(Q,`\\sqsupset `,`&#8848;`),Y.smile=G(Q,`\\smile `,`&#8995;`),Y.sqsubseteq=G(Q,`\\sqsubseteq `,`&#8849;`),Y.sqsupseteq=G(Q,`\\sqsupseteq `,`&#8850;`),Y.doteq=G(Q,`\\doteq `,`&#8784;`),Y.frown=G(Q,`\\frown `,`&#8994;`),Y.vdash=G(Q,`\\vdash `,`&#8870;`),Y.dashv=G(Q,`\\dashv `,`&#8867;`),Y.nless=G(Q,`\\nless `,`&#8814;`),Y.ngtr=G(Q,`\\ngtr `,`&#8815;`),Y.longleftarrow=G(Q,`\\longleftarrow `,`&#8592;`),Y.longrightarrow=G(Q,`\\longrightarrow `,`&#8594;`),Y.Longleftarrow=G(Q,`\\Longleftarrow `,`&#8656;`),Y.Longrightarrow=G(Q,`\\Longrightarrow `,`&#8658;`),Y.longleftrightarrow=G(Q,`\\longleftrightarrow `,`&#8596;`),Y.updownarrow=G(Q,`\\updownarrow `,`&#8597;`),Y.Longleftrightarrow=G(Q,`\\Longleftrightarrow `,`&#8660;`),Y.Updownarrow=G(Q,`\\Updownarrow `,`&#8661;`),Y.mapsto=G(Q,`\\mapsto `,`&#8614;`),Y.nearrow=G(Q,`\\nearrow `,`&#8599;`),Y.hookleftarrow=G(Q,`\\hookleftarrow `,`&#8617;`),Y.hookrightarrow=G(Q,`\\hookrightarrow `,`&#8618;`),Y.searrow=G(Q,`\\searrow `,`&#8600;`),Y.leftharpoonup=G(Q,`\\leftharpoonup `,`&#8636;`),Y.rightharpoonup=G(Q,`\\rightharpoonup `,`&#8640;`),Y.swarrow=G(Q,`\\swarrow `,`&#8601;`),Y.leftharpoondown=G(Q,`\\leftharpoondown `,`&#8637;`),Y.rightharpoondown=G(Q,`\\rightharpoondown `,`&#8641;`),Y.nwarrow=G(Q,`\\nwarrow `,`&#8598;`),Y.ldots=G(Q,`\\ldots `,`&#8230;`),Y.cdots=G(Q,`\\cdots `,`&#8943;`),Y.vdots=G(Q,`\\vdots `,`&#8942;`),Y.ddots=G(Q,`\\ddots `,`&#8945;`),Y.surd=G(Q,`\\surd `,`&#8730;`),Y.triangle=G(Q,`\\triangle `,`&#9651;`),Y.ell=G(Q,`\\ell `,`&#8467;`),Y.top=G(Q,`\\top `,`&#8868;`),Y.flat=G(Q,`\\flat `,`&#9837;`),Y.natural=G(Q,`\\natural `,`&#9838;`),Y.sharp=G(Q,`\\sharp `,`&#9839;`),Y.wp=G(Q,`\\wp `,`&#8472;`),Y.bot=G(Q,`\\bot `,`&#8869;`),Y.clubsuit=G(Q,`\\clubsuit `,`&#9827;`),Y.diamondsuit=G(Q,`\\diamondsuit `,`&#9826;`),Y.heartsuit=G(Q,`\\heartsuit `,`&#9825;`),Y.spadesuit=G(Q,`\\spadesuit `,`&#9824;`),Y.circledot=G(Q,`\\circledot `,`&#8857;`),Y.middot=G(Q,`\\middot `,`&middot;`),Y.dottedsquare=G(Q,`\\dottedsquare `,`&#11034;`),Y.square=G(Q,`\\square `,`&#11036;`),Y.rectangle=G(Q,`\\rectangle `,`&#9647;`),Y.oint=G(Q,`\\oint `,`&#8750;`),Y.bigcap=G(Q,`\\bigcap `,`&#8745;`),Y.bigcup=G(Q,`\\bigcup `,`&#8746;`),Y.bigsqcup=G(Q,`\\bigsqcup `,`&#8852;`),Y.bigvee=G(Q,`\\bigvee `,`&#8744;`),Y.bigwedge=G(Q,`\\bigwedge `,`&#8743;`),Y.bigodot=G(Q,`\\bigodot `,`&#8857;`),Y.bigotimes=G(Q,`\\bigotimes `,`&#8855;`),Y.bigoplus=G(Q,`\\bigoplus `,`&#8853;`),Y.biguplus=G(Q,`\\biguplus `,`&#8846;`),Y.lfloor=G(Q,`\\lfloor `,`&#8970;`),Y.rfloor=G(Q,`\\rfloor `,`&#8971;`),Y.lceil=G(Q,`\\lceil `,`&#8968;`),Y.rceil=G(Q,`\\rceil `,`&#8969;`),Y.opencurlybrace=Y.lbrace=G(Q,`\\lbrace `,`{`),Y.closecurlybrace=Y.rbrace=G(Q,`\\rbrace `,`}`),Y.lbrack=G(Q,`[`),Y.rbrack=G(Q,`]`),Y.mug=G(Q,`\\mug `,`µg`),Y.mus=G(Q,`\\mus `,`µs`),Y.mum=G(Q,`\\mum `,`µm`),Y.muL=G(Q,`\\muL `,`µL`),Y.slash=G(Q,`/`),Y.vert=G(Q,`|`),Y.perp=Y.perpendicular=G(Q,`\\perp `,`&perp;`),Y.nabla=Y.del=G(Q,`\\nabla `,`&nabla;`),Y.hbar=G(Q,`\\hbar `,`&#8463;`),Y.AA=Y.Angstrom=Y.angstrom=G(Q,`\\text\\AA `,`&#8491;`),Y.ring=Y.circ=Y.circle=G(Q,`\\circ `,`&#8728;`),Y.bull=Y.bullet=G(Q,`\\bullet `,`&bull;`),Y.setminus=Y.smallsetminus=G(Q,`\\setminus `,`&#8726;`),Y.not=Y[`¬`]=Y.neg=G(Q,`\\neg `,`&not;`),Y[`…`]=Y.dots=Y.ellip=Y.hellip=Y.ellipsis=Y.hellipsis=G(Q,`\\dots `,`&hellip;`),Y.converges=Y.darr=Y.dnarr=Y.dnarrow=Y.downarrow=G(Q,`\\downarrow `,`&darr;`),Y.dArr=Y.dnArr=Y.dnArrow=Y.Downarrow=G(Q,`\\Downarrow `,`&dArr;`),Y.diverges=Y.uarr=Y.uparrow=G(Q,`\\uparrow `,`&uarr;`),Y.uArr=Y.Uparrow=G(Q,`\\Uparrow `,`&uArr;`),Y.to=G($,`\\to `,`&rarr;`),Y.rarr=Y.rightarrow=G(Q,`\\rightarrow `,`&rarr;`),Y.implies=G($,`\\Rightarrow `,`&rArr;`),Y.rArr=Y.Rightarrow=G(Q,`\\Rightarrow `,`&rArr;`),Y.gets=G($,`\\gets `,`&larr;`),Y.larr=Y.leftarrow=G(Q,`\\leftarrow `,`&larr;`),Y.impliedby=G($,`\\Leftarrow `,`&lArr;`),Y.lArr=Y.Leftarrow=G(Q,`\\Leftarrow `,`&lArr;`),Y.harr=Y.lrarr=Y.leftrightarrow=G(Q,`\\leftrightarrow `,`&harr;`),Y.iff=G($,`\\Leftrightarrow `,`&hArr;`),Y.hArr=Y.lrArr=Y.Leftrightarrow=G(Q,`\\Leftrightarrow `,`&hArr;`),Y.Re=Y.Real=Y.real=G(Q,`\\Re `,`&real;`),Y.Im=Y.imag=Y.image=Y.imagin=Y.imaginary=Y.Imaginary=G(Q,`\\Im `,`&image;`),Y.part=Y.partial=G(Q,`\\partial `,`&part;`),Y.infty=Y.infin=Y.infinity=G(Q,`\\infty `,`&infin;`),Y.pounds=G(Q,`\\pounds `,`&pound;`),Y.alef=Y.alefsym=Y.aleph=Y.alephsym=G(Q,`\\aleph `,`&alefsym;`),Y.xist=Y.xists=Y.exist=Y.exists=G(Q,`\\exists `,`&exist;`),Y.nexists=Y.nexist=G(Q,`\\nexists `,`&#8708;`),Y.and=Y.land=Y.wedge=G($,`\\wedge `,`&and;`),Y.or=Y.lor=Y.vee=G($,`\\vee `,`&or;`),Y.o=Y.O=Y.empty=Y.emptyset=Y.oslash=Y.Oslash=Y.nothing=Y.varnothing=G($,`\\varnothing `,`&empty;`),Y.cup=Y.union=G($,`\\cup `,`&cup;`),Y.cap=Y.intersect=Y.intersection=G($,`\\cap `,`&cap;`),Y.deg=Y.degree=G(Q,`\\degree `,`&deg;`),Y.ang=Y.angle=G(Q,`\\angle `,`&ang;`),Y.measuredangle=G(Q,`\\measuredangle `,`m&ang;`);var QD=K(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[q]instanceof $D&&e[q].isItalic!==!1||e[q]instanceof OO&&e[q][q]instanceof $D&&e[q][q].isItalic!==!1)?(Y._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),$D=K(WD,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[q]&&!(this[q]instanceof $D)&&!(this[q]instanceof $)&&this[q].ctrlSeq!==`\\ `&&(e=`*`+e),this[J]&&!(this[J]instanceof $)&&!(this[J]instanceof OO)&&(e+=`*`)),e}});kD.p.autoCommands={_maxLength:0},AD.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(Y[a]===iO)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=dD(r,a.length)}return n._maxLength=r,n};var eO=K($D,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 eO&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[q],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(var o=1,a=this;o<i.length;o+=1,a=a[q]);return SD(a,this).remove(),e[q]=a[q],Y[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!==q&&this[J]instanceof eO||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(t._maxLength!==0){for(var r=this.letter,i=this[q];i instanceof eO;i=i[q])r=i.letter+r;for(var a=this[J];a instanceof eO;a=a[J])r+=a.letter;SD(i[J]||this.parent.ends[q],a[q]||this.parent.ends[J]).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[J]||this.parent.ends[q];o<r.length;o+=1,s=s[J])for(var c=uD(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[J]){d.italicize(!1);var f=d}var p=tO.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,rO.hasOwnProperty(l)&&f[q][q][q].jQ.addClass(`mq-last`),n(s[q])||s.jQ.addClass(`mq-first`),!n(f[J]))if(f[J]instanceof OO){var m=f[J];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[J]instanceof LO))})()}else f.jQ.toggleClass(`mq-last`,!(f[J]instanceof LO));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof jO}}),tO={},nO=kD.p.autoOperatorNames={_maxLength:9},rO={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)tO[e[t]]=nO[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)tO[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)nO[r[t]]=nO[`arc`+r[t]]=nO[r[t]+`h`]=nO[`ar`+r[t]+`h`]=nO[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)nO[i[t]]=1})(),AD.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=dD(r,a.length)}return n._maxLength=r,n};var iO=K(WD,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)eO(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=GD(),n=0;n<e.length;n+=1)eO(e.charAt(n)).adopt(t,t.ends[J],0);return X.succeed(t.children())}});for(var aO in nO)nO.hasOwnProperty(aO)&&(Y[aO]=iO);Y.operatorname=K(Z,function(e){e.createLeftOf=fD,e.numBlocks=function(){return 1},e.parser=function(){return HD.block.map(function(e){return e.children()})}}),Y.f=K(eO,function(e,t){e.init=function(){WD.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)}}),Y[` `]=Y.space=G(Q,`\\ `,`&nbsp;`),Y[`'`]=Y.prime=G(Q,`'`,`&prime;`),Y[`″`]=Y.dprime=G(Q,`″`,`&Prime;`),Y[`"`]=Y.doublePrime=G(Q,`"`,`&Prime;`),Y.backslash=G(Q,`\\backslash `,`\\`),CD[`\\`]||=Y.backslash,Y.$=G(Q,`\\$`,`$`);var oO=K(WD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Y[`@`]=oO,Y[`&`]=G(oO,`\\&`,`&amp;`),Y[`%`]=G(oO,`\\%`,`%`),Y.alpha=Y.beta=Y.gamma=Y.delta=Y.zeta=Y.eta=Y.theta=Y.iota=Y.kappa=Y.mu=Y.nu=Y.xi=Y.rho=Y.sigma=Y.tau=Y.chi=Y.psi=Y.omega=K($D,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Y.phi=G($D,`\\phi `,`&#981;`),Y.phiv=Y.varphi=G($D,`\\varphi `,`&phi;`),Y.epsilon=G($D,`\\epsilon `,`&#1013;`),Y.epsiv=Y.varepsilon=G($D,`\\varepsilon `,`&epsilon;`),Y.piv=Y.varpi=G($D,`\\varpi `,`&piv;`),Y.sigmaf=Y.sigmav=Y.varsigma=G($D,`\\varsigma `,`&sigmaf;`),Y.thetav=Y.vartheta=Y.thetasym=G($D,`\\vartheta `,`&thetasym;`),Y.upsilon=Y.upsi=G($D,`\\upsilon `,`&upsilon;`),Y.gammad=Y.Gammad=Y.digamma=G($D,`\\digamma `,`&#989;`),Y.kappav=Y.varkappa=G($D,`\\varkappa `,`&#1008;`),Y.rhov=Y.varrho=G($D,`\\varrho `,`&#1009;`),Y.pi=Y.π=G(oO,`\\pi `,`&pi;`),Y.lambda=G(oO,`\\lambda `,`&lambda;`),Y.Upsilon=Y.Upsi=Y.upsih=Y.Upsih=G(WD,`\\Upsilon `,`<var style="font-family: serif">&upsih;</var>`),Y.Gamma=Y.Delta=Y.Theta=Y.Lambda=Y.Xi=Y.Pi=Y.Sigma=Y.Phi=Y.Psi=Y.Omega=K(Q,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Y.forall=Y[`∀`]=G(Q,`\\forall `,`&#8704;`);var sO=K(Z,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=HD.parse(this.latex);t.children().adopt(e.parent,e[q],e[J]),e[q]=t.ends[J],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[J][J].siblingCreated&&t.ends[J][J].siblingCreated(e.options,q),t.ends[q][q].siblingCreated&&t.ends[q][q].siblingCreated(e.options,J),e.parent.bubble(`reflow`)},e.parser=function(){var e=HD.parse(this.latex).children();return X.succeed(e)}});Y[`¹`]=G(sO,`^1`),Y[`²`]=G(sO,`^2`),Y[`³`]=G(sO,`^3`),Y[`¼`]=G(sO,`\\frac14`),Y[`½`]=G(sO,`\\frac12`),Y[`¾`]=G(sO,`\\frac34`);var cO=K($,function(e){e.init=Q.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){function n(e){if(e[q]){if(e[q]instanceof $||/^[,;:\(\[]$/.test(e[q].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!==J)return this.jQ[0].className=n(this),this}});Y[`+`]=G(cO,`+`,`+`),Y[`–`]=Y[`-`]=G(cO,`-`,`&minus;`),Y[`±`]=Y.pm=Y.plusmn=Y.plusminus=G(cO,`\\pm `,`&plusmn;`),Y.mp=Y.mnplus=Y.minusplus=G(cO,`\\mp `,`&#8723;`),CD[`*`]=Y.sdot=Y.cdot=G($,`\\cdot `,`&middot;`,`*`);var lO=K($,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===q&&!this.strict){this.swap(!0),this.bubble(`reflow`);return}t.deleteTowards.apply(this,arguments)}}),uO={ctrlSeq:`\\le `,html:`&le;`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`&lt;`,textStrict:`<`},dO={ctrlSeq:`\\ge `,html:`&ge;`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`&gt;`,textStrict:`>`};Y[`<`]=Y.lt=G(lO,uO,!0),Y[`>`]=Y.gt=G(lO,dO,!0),Y[`≤`]=Y.le=Y.leq=G(lO,uO,!1),Y[`≥`]=Y.ge=Y.geq=G(lO,dO,!1);var fO=K($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[q]instanceof lO&&e[q].strict){e[q].swap(!1),e[q].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Y[`=`]=fO,Y[`×`]=Y.times=G($,`\\times `,`&times;`,`[x]`),Y[`÷`]=Y.div=Y.divide=Y.divides=G($,`\\div `,`&divide;`,`[/]`),CD[`~`]=Y.sim=G($,`\\sim `,`~`,`~`),CD[`≁`]=Y.nsim=G($,`\\nsim `,`≁`,`≁`),Y.complement=Y[`∁`]=G(Q,`\\complement `,`&#8705;`),Y.nexists=Y[`∄`]=G(Q,`\\nexists `,`&#8708;`),Y.sphericalangle=Y[`∢`]=G(Q,`\\sphericalangle `,`&#8738;`),Y.iint=Y[`∬`]=G(Q,`\\iint `,`&#8748;`),Y.iiint=Y[`∭`]=G(Q,`\\iiint `,`&#8749;`),Y.oiint=Y[`∯`]=G(Q,`\\oiint `,`&#8751;`),Y.oiiint=Y[`∰`]=G(Q,`\\oiiint `,`&#8752;`),Y.backsim=Y[`∽`]=G(Q,`\\backsim `,`&#8765;`),Y.backsimeq=Y[`⋍`]=G(Q,`\\backsimeq `,`&#8909;`),Y.eqsim=Y[`≂`]=G(Q,`\\eqsim `,`&#8770;`),Y.ncong=Y[`≇`]=G(Q,`\\ncong `,`&#8775;`),Y.approxeq=Y[`≊`]=G(Q,`\\approxeq `,`&#8778;`),Y.bumpeq=Y[`≏`]=G(Q,`\\bumpeq `,`&#8783;`),Y.Bumpeq=Y[`≎`]=G(Q,`\\Bumpeq `,`&#8782;`),Y.doteqdot=Y[`≑`]=G(Q,`\\doteqdot `,`&#8785;`),Y.fallingdotseq=Y[`≒`]=G(Q,`\\fallingdotseq `,`&#8786;`),Y.risingdotseq=Y[`≓`]=G(Q,`\\risingdotseq `,`&#8787;`),Y.eqcirc=Y[`≖`]=G(Q,`\\eqcirc `,`&#8790;`),Y.circeq=Y[`≗`]=G(Q,`\\circeq `,`&#8791;`),Y.triangleq=Y[`≜`]=G(Q,`\\triangleq `,`&#8796;`),Y.leqq=Y[`≦`]=G(Q,`\\leqq `,`&#8806;`),Y.geqq=Y[`≧`]=G(Q,`\\geqq `,`&#8807;`),Y.lneqq=Y[`≨`]=G(Q,`\\lneqq `,`&#8808;`),Y.gneqq=Y[`≩`]=G(Q,`\\gneqq `,`&#8809;`),Y.between=Y[`≬`]=G(Q,`\\between `,`&#8812;`),Y.nleq=Y[`≰`]=G(Q,`\\nleq `,`&#8816;`),Y.ngeq=Y[`≱`]=G(Q,`\\ngeq `,`&#8817;`),Y.lesssim=Y[`≲`]=G(Q,`\\lesssim `,`&#8818;`),Y.gtrsim=Y[`≳`]=G(Q,`\\gtrsim `,`&#8819;`),Y.lessgtr=Y[`≶`]=G(Q,`\\lessgtr `,`&#8822;`),Y.gtrless=Y[`≷`]=G(Q,`\\gtrless `,`&#8823;`),Y.preccurlyeq=Y[`≼`]=G(Q,`\\preccurlyeq `,`&#8828;`),Y.succcurlyeq=Y[`≽`]=G(Q,`\\succcurlyeq `,`&#8829;`),Y.precsim=Y[`≾`]=G(Q,`\\precsim `,`&#8830;`),Y.succsim=Y[`≿`]=G(Q,`\\succsim `,`&#8831;`),Y.nprec=Y[`⊀`]=G(Q,`\\nprec `,`&#8832;`),Y.nsucc=Y[`⊁`]=G(Q,`\\nsucc `,`&#8833;`),Y.subsetneq=Y[`⊊`]=G(Q,`\\subsetneq `,`&#8842;`),Y.supsetneq=Y[`⊋`]=G(Q,`\\supsetneq `,`&#8843;`),Y.vDash=Y[`⊨`]=G(Q,`\\vDash `,`&#8872;`),Y.Vdash=Y[`⊩`]=G(Q,`\\Vdash `,`&#8873;`),Y.Vvdash=Y[`⊪`]=G(Q,`\\Vvdash `,`&#8874;`),Y.VDash=Y[`⊫`]=G(Q,`\\VDash `,`&#8875;`),Y.nvdash=Y[`⊬`]=G(Q,`\\nvdash `,`&#8876;`),Y.nvDash=Y[`⊭`]=G(Q,`\\nvDash `,`&#8877;`),Y.nVdash=Y[`⊮`]=G(Q,`\\nVdash `,`&#8878;`),Y.nVDash=Y[`⊯`]=G(Q,`\\nVDash `,`&#8879;`),Y.vartriangleleft=Y[`⊲`]=G(Q,`\\vartriangleleft `,`&#8882;`),Y.vartriangleright=Y[`⊳`]=G(Q,`\\vartriangleright `,`&#8883;`),Y.trianglelefteq=Y[`⊴`]=G(Q,`\\trianglelefteq `,`&#8884;`),Y.trianglerighteq=Y[`⊵`]=G(Q,`\\trianglerighteq `,`&#8885;`),Y.multimap=Y[`⊸`]=G(Q,`\\multimap `,`&#8888;`),Y.Subset=Y[`⋐`]=G(Q,`\\Subset `,`&#8912;`),Y.Supset=Y[`⋑`]=G(Q,`\\Supset `,`&#8913;`),Y.Cap=Y[`⋒`]=G(Q,`\\Cap `,`&#8914;`),Y.Cup=Y[`⋓`]=G(Q,`\\Cup `,`&#8915;`),Y.pitchfork=Y[`⋔`]=G(Q,`\\pitchfork `,`&#8916;`),Y.lessdot=Y[`⋖`]=G(Q,`\\lessdot `,`&#8918;`),Y.gtrdot=Y[`⋗`]=G(Q,`\\gtrdot `,`&#8919;`),Y.lll=Y[`⋘`]=G(Q,`\\lll `,`&#8920;`),Y.ggg=Y[`⋙`]=G(Q,`\\ggg `,`&#8921;`),Y.lesseqgtr=Y[`⋚`]=G(Q,`\\lesseqgtr `,`&#8922;`),Y.gtreqless=Y[`⋛`]=G(Q,`\\gtreqless `,`&#8923;`),Y.curlyeqprec=Y[`⋞`]=G(Q,`\\curlyeqprec `,`&#8926;`),Y.curlyeqsucc=Y[`⋟`]=G(Q,`\\curlyeqsucc `,`&#8927;`),Y.nsim=Y[`≁`]=G(Q,`\\nsim `,`&#8769;`),Y.lnsim=Y[`⋦`]=G(Q,`\\lnsim `,`&#8934;`),Y.gnsim=Y[`⋧`]=G(Q,`\\gnsim `,`&#8935;`),Y.precnsim=Y[`⋨`]=G(Q,`\\precnsim `,`&#8936;`),Y.succnsim=Y[`⋩`]=G(Q,`\\succnsim `,`&#8937;`),Y.ntriangleleft=Y[`⋪`]=G(Q,`\\ntriangleleft `,`&#8938;`),Y.ntriangleright=Y[`⋫`]=G(Q,`\\ntriangleright `,`&#8939;`),Y.ntrianglelefteq=Y[`⋬`]=G(Q,`\\ntrianglelefteq `,`&#8940;`),Y.ntrianglerighteq=Y[`⋭`]=G(Q,`\\ntrianglerighteq `,`&#8941;`),Y.blacksquare=Y[`∎`]=G(Q,`\\blacksquare `,`&#8718;`),Y.colon=Y[`∶`]=G(Q,`\\colon `,`&#8758;`),Y.llcorner=Y[`∟`]=G(Q,`\\llcorner `,`&#8735;`),Y.dotplus=Y[`∔`]=G($,`\\dotplus `,`&#8724;`),Y.nmid=Y[`∤`]=G($,`
199
+ mid `,`&#8740;`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`&#8890;`),Y.veebar=Y[`⊻`]=G($,`\\veebar `,`&#8891;`),Y.barwedge=Y[`⊼`]=G($,`\\barwedge `,`&#8892;`),Y.ltimes=Y[`⋉`]=G($,`\\ltimes `,`&#8905;`),Y.rtimes=Y[`⋊`]=G($,`\\rtimes `,`&#8906;`),Y.leftthreetimes=Y[`⋋`]=G($,`\\leftthreetimes `,`&#8907;`),Y.rightthreetimes=Y[`⋌`]=G($,`\\rightthreetimes `,`&#8908;`),Y.curlyvee=Y[`⋎`]=G($,`\\curlyvee `,`&#8910;`),Y.curlywedge=Y[`⋏`]=G($,`\\curlywedge `,`&#8911;`),Y.circledcirc=Y[`⊚`]=G($,`\\circledcirc `,`&#8858;`),Y.circledast=Y[`⊛`]=G($,`\\circledast `,`&#8859;`),Y.circleddash=Y[`⊝`]=G($,`\\circleddash `,`&#8861;`),Y.boxplus=Y[`⊞`]=G($,`\\boxplus `,`&#8862;`),Y.boxminus=Y[`⊟`]=G($,`\\boxminus `,`&#8863;`),Y.boxtimes=Y[`⊠`]=G($,`\\boxtimes `,`&#8864;`),Y.boxdot=Y[`⊡`]=G($,`\\boxdot `,`&#8865;`),Y[`∂`]=Y.partial,Y[`∃`]=Y.exists,Y[`∅`]=Y.varnothing,Y[`∆`]=Y.triangle,Y[`∇`]=Y.nabla,Y[`∈`]=Y.in,Y[`∊`]=Y.in,Y[`∋`]=Y.ni,Y[`∌`]=Y.notni,Y[`∍`]=Y.ni,Y[`∐`]=Y.amalg,Y[`−`]=Y[`-`],Y[`∓`]=Y.mp,Y[`∖`]=Y.setminus,Y[`∘`]=Y.circ,Y[`∙`]=Y.bullet,Y[`∝`]=Y.propto,Y[`∞`]=Y.infty,Y[`∠`]=Y.angle,Y[`∡`]=Y.measuredangle,Y[`∣`]=Y.divides,Y[`∥`]=Y.parallel,Y[`∦`]=Y.nparallel,Y[`∧`]=Y.wedge,Y[`∨`]=Y.vee,Y[`∩`]=Y.cap,Y[`∪`]=Y.cup,Y[`∮`]=Y.oint,Y[`∴`]=Y.therefore,Y[`∵`]=Y.because,Y[`∼`]=Y.sim,Y[`≀`]=Y.wr,Y[`≃`]=Y.simeq,Y[`≍`]=Y.asymp,Y[`≐`]=Y.doteq,Y[`≪`]=Y.ll,Y[`≫`]=Y.gg,Y[`≺`]=Y.prec,Y[`≻`]=Y.succ,Y[`⊂`]=Y.subset,Y[`⊃`]=Y.supset,Y[`⊆`]=Y.subseteq,Y[`⊇`]=Y.supseteq,Y[`⊈`]=Y.nsubseteq,Y[`⊉`]=Y.nsupseteq,Y[`⊏`]=Y.sqsubset,Y[`⊐`]=Y.sqsupset,Y[`⊓`]=Y.sqcap,Y[`⊔`]=Y.sqcup,Y[`⊖`]=Y.ominus,Y[`⊘`]=Y.oslash,Y[`⊙`]=Y.odot,Y[`⊢`]=Y.vdash,Y[`⊣`]=Y.dashv,Y[`⊤`]=Y.top,Y[`⊥`]=Y.bot,Y[`⊧`]=Y.models,Y[`⋀`]=Y.wedge,Y[`⋁`]=Y.vee,Y[`⋂`]=Y.cap,Y[`⋃`]=Y.cup,Y[`⋄`]=Y.diamond,Y[`⋅`]=Y.cdot,Y[`⋆`]=Y.star,Y[`⋈`]=Y.bowtie,Y[`⋮`]=Y.vdots,Y[`⋯`]=Y.cdots,Y[`⋱`]=Y.ddots;var pO,mO=fD,hO=document.createElement(`div`).style,gO={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},_O;for(var vO in gO)if(vO in hO){_O=vO;break}_O?pO=function(e,t,n){e.css(_O,`scale(`+t+`,`+n+`)`)}:`filter`in hO?(mO=function(e){e.className=e.className},pO=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);W(window).load(function(){clearTimeout(a),i()})}):pO=function(e,t,n){e.css(`fontSize`,n+`em`)};var yO=K(Z,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),bO=K(Z,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 HD.optBlock.then(function(t){return HD.block.map(function(n){var r=xO.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))}}),xO=K(bO,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+`>`,Z.prototype.init.call(this,e),this.textTemplate=[e.replace(`\\`,``)+`[`,`](`,`)`]},e.latex=function(){return this.ctrlSeq+`[`+this.ends[q].latex()+`]{`+this.ends[J].latex()+`}`},e.finalizeTree=function(){this.downInto=this.ends[q].upOutOf=this.ends[J],this.upInto=this.ends[J].downOutOf=this.ends[q]}}),SO=function(e){var t=`<span class="`+e+`-inner-right">g</span><span class="`+e+`-inner-left">h</span>`;return K(Z,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+`>`)}})},CO=K(Z,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>`)}}),wO=K(Z,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>`)}}),TO=K(Z,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">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),EO=K(Z,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>`)}}),DO=function(e,t){return K(WD,function(n,r){n.init=function(n,i,a){r.init.call(this,n,`<`+i+` `+a+`><`+i+` class="`+e+`-inner">`+t+`</`+i+`></`+i+`>`)}})};Y.mathrm=G(yO,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Y.mathit=G(yO,`\\mathit`,`i`,`class="mq-font"`),Y.mathbf=G(yO,`\\mathbf`,`b`,`class="mq-font"`),Y.mathsf=G(yO,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Y.mathtt=G(yO,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Y.underline=G(yO,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Y.overline=Y.bar=G(SO(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Y.longdiv=G(CO,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Y.overrightarrow=G(SO(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Y.overleftarrow=G(SO(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Y.xleftarrow=G(bO,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Y.xrightarrow=G(bO,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Y.overleftrightarrow=G(yO,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Y.overarc=G(yO,`\\overarc`,`span`,`class="mq-non-leaf mq-overarc"`),Y.dot=K(Z,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">&#x2d9;</span><span class="mq-empty-box">&0</span></span></span>`)}}),Y.addmatrixrow=G(wO,`\\addmatrixrow`,`span`,`+`),Y.addmatrixcol=G(EO,`\\addmatrixcol`,`span`,`+`),Y.ngtr=Y[`≯`]=G(DO(`mq-ngtr`,`&#8815;`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Y.nless=Y[`≮`]=G(DO(`mq-nless`,`&#8814;`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Y.dot=G(TO,`\\dot`),Y.parallelogram=G(DO(`mq-parallelogram`,`&#9649;`),`\\parallelogram `,`span`,`class="mq-non-leaf mq-parallelogram"`),Y.textcolor=K(Z,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=X.optWhitespace,r=X.string,i=X.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}}),Y.class=K(Z,function(e,t){e.parser=function(){var e=this,n=X.string,r=X.regex;return X.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 OO=K(Z,function(e,t){e.ctrlSeq=`_{...}^{...}`,e.createLeftOf=function(e){if(!(!this.replacedFragment&&!e[q]&&e.options.supSubsRequireOperand))return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=q;t;t=t===q&&J)if(this[t]instanceof OO){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=yD(i,0,i.ends[q]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=yD(i,o.ends[J],i.ends[q]);t===q?o.adopt(i,i.ends[J],0):o.adopt(i,0,i.ends[q])}this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[q]===this&&(t===J&&a?a[q]?e.insRightOf(a[q]):e.insAtLeftEnd(a.parent):e.insRightOf(this[t]));break}},kD.p.charsThatBreakOutOfSupSub=``,e.finalizeTree=function(){this.ends[q].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 WD?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[q]&&!e[J]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),GD.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 WD?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(q,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=W(`<span class="mq-sup"/>`).append(e.jQ.children()).attr(lD,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=W(`<span class="mq-sub"></span>`).append(e.jQ.children()).attr(lD,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">&#8203;</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`]=kO,delete e[n].deleteOutOf,t===`sub`&&W(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 kO(e){var t=this.parent,n=e;do{if(n[J])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}Y.subscript=Y._=K(OO,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">&#8203;</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[q],this.sub.upOutOf=kO,t.finalizeTree.call(this)}}),Y.superscript=Y.supscript=Y[`^`]=K(OO,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[J],this.sup.downOutOf=kO,t.finalizeTree.call(this)}});var AO=K(Z,function(e,t){e.parser=function(){for(var e=X.string,t=X.optWhitespace,n=X.succeed,r=HD.block,i=this,a=i.blocks=[GD(),GD()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[J],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[J],0),n(i)})}).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[q],this.upInto=this.ends[J],this.ends[q].upOutOf=this.ends[J],this.ends[J].downOutOf=this.ends[q]}}),jO=K(AO,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>`;WD.prototype.init.call(this,e,n)},e.latex=function(){function e(e){return e.length===1?e:`{`+(e||` `)+`}`}return this.ctrlSeq+`_`+e(this.ends[q].latex())+`^`+e(this.ends[J].latex())},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(eO(`n`).createLeftOf(e),fO().createLeftOf(e))}});Y[`∑`]=Y.sum=Y.summation=G(jO,`\\sum `,`&sum;`),Y[`∏`]=Y.prod=Y.product=G(jO,`\\prod `,`&prod;`),Y.coprod=Y.coproduct=G(jO,`\\coprod `,`&#8720;`),Y[`∫`]=Y.int=Y.integral=K(jO,function(e,t){e.init=function(){WD.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>&int;</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">&#8203</span></span></span>`)},e.createLeftOf=Z.p.createLeftOf}),Y.lim=Y.limit=K(AO,function(e,t){e.init=function(){WD.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[q].latex())}});var MO=Y.over=CD[`/`]=K(Y.frac=Y.dfrac=Y.cfrac=Y.fraction=K(Z,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">&#8203;</span></span>`,e.textTemplate=[`(`,`)/(`,`)`],e.finalizeTree=function(){this.upInto=this.ends[J].upOutOf=this.ends[q],this.downInto=this.ends[q].downOutOf=this.ends[J]}}),function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[q];n&&!(n instanceof $||n instanceof(Y.text||fD)||n instanceof jO||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[q];n instanceof jO&&n[J]instanceof OO&&(n=n[J],n[J]instanceof OO&&n[J].ctrlSeq!=n.ctrlSeq&&(n=n[J])),n!==e[q]&&!e.isTooDeep(1)&&(this.replaces(SD(n[J]||e.parent.ends[q],e[q])),e[q]=n)}t.createLeftOf.call(this,e)}});Y.underset=K(Z,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[q].upOutOf=this.ends[J],this.upInto=this.ends[J].downOutOf=this.ends[q]}}),Y.overset=K(Z,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[J].upOutOf=this.ends[q],this.upInto=this.ends[q].downOutOf=this.ends[J]}});var NO=Y.sqrt=Y[`√`]=K(Z,function(e,t){e.ctrlSeq=`\\sqrt`,e.htmlTemplate=`<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">&radic;</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 HD.optBlock.then(function(e){return HD.block.map(function(t){var n=PO();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[J].jQ.parent();pO(e.prev(),1,e.innerHeight()/+e.css(`fontSize`).slice(0,-2)-.1)}});Y.hat=K(Z,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 PO=Y.nthroot=K(NO,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">&radic;</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[q].latex()+`]{`+this.ends[J].latex()+`}`}}),FO=K(Z,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)}});Y.vec=G(FO,`\\vec`,`&rarr;`,[`vec(`,`)`]),Y.tilde=G(FO,`\\tilde`,`~`,[`tilde(`,`)`]),Y.lrncuberoot=K(NO,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">&radic;</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[q].latex()+`}`}}),Y.abs=K(Z,function(e){e.ctrlSeq=`\\abs`,e.htmlTemplate=`<span class="mq-abs mq-non-leaf"><span class="mq-empty-box">&0</span></span>`,e.textTemplate=[`|`,`|`]}),Y.lrnplaceholder=K(Z,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[q].latex()}}),Y.lrnexponent=K(Z,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[J].latex();return e.length>1?e=`{`+e+`}`:e.length===0&&(e=`{ }`),this.ends[q].latex()+`^`+e}}),Y.lrnsquaredexponent=K(Z,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[q].latex()+`^2`}}),Y.lrnsubscript=K(Z,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">&nbsp;</span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[q].latex()+`_`+this.ends[J].latex()}});function IO(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`));pO(this.delimjQs,uD(1+.2*(e-1),1.2),1.2*e)}}var LO=K(K(Z,IO),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,sD,[n,r]),this.side=e,this.sides={},this.sides[q]={ch:n,ctrlSeq:i},this.sides[J]={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===J?` mq-ghost`:``)+`">`+this.sides[q].ch+`</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren`+(this.side===q?` mq-ghost`:``)+`">`+this.sides[J].ch+`</span></span>`,t.html.call(this)},e.latex=function(){return`\\left`+this.sides[q].ctrlSeq+this.ends[q].latex()+`\\right`+this.sides[J].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof LO&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||RO[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":`]`,"[":`)`}[this.sides[q].ch]===n.sides[J].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===q?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[q].ch===`|`)var r=this.matchBrack(n,J,e[J])||this.matchBrack(n,q,e[q])||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]&&SD(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(SD(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===q?e.insAtLeftEnd(r.ends[q]):e.insRightOf(r)},e.placeCursor=fD,e.unwrap=function(){this.ends[q].children().disown().adopt(this.parent,this,this[J]).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[q].ends[this.side])){this.closeOpposing(this.ends[q].ends[this.side]);var c=this.ends[q].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:RO[this.sides[this.side].ch],ctrlSeq:RO[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass(`mq-ghost`).eq(e===q?0:1).addClass(`mq-ghost`).html(this.sides[e].ch);if(i){var c=this.ends[q].ends[e];SD(i,a,-e).disown().withDirAdopt(-e,this.ends[q],c,0).jQ.insAtDirEnd(e,this.ends[q].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[q])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[q].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(+(this.side===q)).removeClass(`mq-ghost`),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}}),RO={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"&lang;":`&rang;`,"&rang;":`&lang;`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function zO(e,t){var t=t||e,n=RO[e],r=RO[t];CD[e]=G(LO,q,e,n,t,r),CD[n]=G(LO,J,e,n,t,r)}zO(`(`),zO(`[`),zO(`{`,`\\{`),Y.langle=G(LO,q,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),Y.rangle=G(LO,J,`&lang;`,`&rang;`,`\\langle `,`\\rangle `),CD[`|`]=G(LO,q,`|`,`|`,`|`,`|`),Y.lVert=G(LO,q,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),Y.rVert=G(LO,J,`&#8741;`,`&#8741;`,`\\lVert `,`\\rVert `),Y.left=K(Z,function(e){e.parser=function(){var e=X.regex,t=X.string;X.succeed;var n=X.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=`&lang;`,r+=` `),r==`\\lVert`&&(i=`&#8741;`,r+=` `),HD.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=`&rang;`,e+=` `),e==`\\rVert`&&(t=`&#8741;`,e+=` `);var n=LO(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n})})})}}),Y.right=K(Z,function(e){e.parser=function(){return X.fail(`unmatched \\right`)}}),Y.choose=K(Y.binom=Y.binomial=K(K(Z,IO),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=MO.prototype.createLeftOf}),Y.editable=Y.MathQuillMathField=K(Z,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=X.string,r=X.regex,i=X.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=DD(this.ends[q],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),zD(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[q].controller))},e.latex=function(){return this.ends[q].latex()},e.text=function(){return this.ends[q].text()}});var BO=Y.embed=K(WD,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=X.string,n=X.regex,r=X.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(MD[i](t))})})}});Y.MathQuillResponseContainer=K(Z,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[q].text()}}),Y.MathQuillResponseContainerIcon=K(Z,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[q].text()}});var VO=Y.matrix=K(Z,function(e,t){var n=K(GD,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[J],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&&pO(n,uD(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=X.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);HD.parse(u[e]||` `).children().adopt(f,f.ends[J],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[J],0);return X.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=bD.byId[e.first().attr(lD)],n=bD.byId[e.last().attr(lD)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=bD.byId[W(this).attr(lD)],a=e.eq(t+1),o=W(this).closest(`tr`).next(`tr`),s=W(this).closest(`tr`).index(),c=W(this).index(),l;if(a.length){var u=bD.byId[a.attr(lD)];n[J]=u,u[q]=n}if(l=o.length?o.find(`td`).eq(c):r.find(`td`).eq(c+1),l.length){var d=bD.byId[l.attr(lD)];n.downOutOf=d,d.upOutOf=n}n.column=c,n.row=s,i.push(n)}),this.ends[q]=t,this.ends[J]=n,t&&t[q]&&delete t[q],n&&n[J]&&delete n[J],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 W(this).find(`td`)[n]}),o=this.jQ.find(`td`).length===1,s;function c(){return bD.byId[W(this).attr(lD)].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=bD.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(lD)]),s},e.addRow=function(e){if(!(this.jQ.find(`tr`).length>=this.maximum.rows)){for(var t=e.find(`td`).length,r=W(`<tr></tr>`),i,a,o=0;o<t;o++)i=n(),i.parent=this,i.jQ=W(`<td class="mq-empty">`).attr(lD,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=W(`<td class="mq-empty">`).attr(lD,a.id),a.jQ.insertAfter(W(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`)}}});Y.pmatrix=K(VO,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Y.bmatrix=K(VO,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Y.Bmatrix=K(VO,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Y.vmatrix=K(VO,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Y.Vmatrix=K(VO,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var HO=LD(3);for(var UO in HO)(function(e,t){typeof t==`function`?(PD[e]=function(){return ND(),t.apply(this,arguments)},PD[e].prototype=t.prototype):PD[e]=t})(UO,HO[UO]);var WO=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},GO;typeof window<`u`&&(GO=PD.getInterface(3),GO&&GO.registerEmbed&&WO(GO));function KO(e,t){!GO||!GO.registerEmbed||GO.registerEmbed(e,t)}function qO(e,t,n){if(!(!GO||!e))return t!=null&&(e.textContent=t),GO.StaticMath(e,n)}var JO=e=>`&.mq-math-mode ${e}, & .mq-math-mode ${e}`,YO={"&.mq-editable-field .mq-cursor, & .mq-editable-field .mq-cursor":{borderLeftColor:`currentColor`},"&.mq-editable-field:not(.mq-focused), & .mq-editable-field:not(.mq-focused)":{borderColor:bb()},[[`.mq-overline .mq-overline-inner`,`.mq-overarrow`,`.mq-overarrow .mq-overarrow-inner`,`.mq-overleftrightarrow .mq-overleftrightarrow-inner`,`.mq-overarc`,`.mq-longdiv .mq-longdiv-inner`].map(JO).join(`, `)]:{borderTopColor:`currentColor`},[[`.mq-underline`,`.mq-xarrow .mq-xarrow-over`].map(JO).join(`, `)]:{borderBottomColor:`currentColor`},[JO(`.mq-abs`)]:{borderLeftColor:`currentColor`,borderRightColor:`currentColor`},[JO(`.mq-matrix td.mq-empty`)]:{borderColor:`currentColor`}},XO={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`}},ZO={"& .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`}},QO={"& *":{...XO,...ZO,"& .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`}}},$O=Gh(`pie-lib:math-input:mq:static`),ek=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,tk=/ /g;function nk(e=``){return e.replace(tk,``)}function rk(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var ik=I(`span`)(YO),ak=class extends N.Component{static propTypes={latex:O.string.isRequired,onFocus:O.func,onBlur:O.func,className:O.string,getFieldName:O.func,onSubFieldChange:O.func,onSubFieldFocus:O.func,setInput:O.func,language:O.string};static defaultProps={getFieldName:()=>{}};constructor(e){super(e),this.state={announcement:``,previousLatex:``,inputSource:null,isDeleteKeyPressed:!1},this.inputRef=N.createRef()}componentDidMount(){this.update(),vm(),this.createLiveRegion(),this.addEventListeners()}componentDidUpdate(){this.update(),vm()}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(rk(e)>rk(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(!GO)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=GO.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}rD(this.inputRef?.current,this.props.language)};blur=()=>{$O(`blur mathfield`),this.mathField.blur()};focus=()=>{$O(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=nk(this.mathField.parseLatex(e.latex)),n=(e.latex.match(ek)||[]).length,r=t!==nk(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return $O(`[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)(ik,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},ok=e=>(Rt(5-e.length,()=>e.push([])),zt.apply(null,e)),sk=Gh(`pie-lib:math-inline:keypad`),ck=Hy(`pie`),lk=[Uy(),qb()],uk={"& .MuiTouchRipple-root":{color:`rgb(from ${Uy()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))`}},dk={"&.Mui-focusVisible":{outline:`2px solid ${Nb()}`,outlineOffset:`-2px`,boxShadow:`inset 0 0 0 4px ${ck(`background`,B.WHITE)}`}},fk=I(ak)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:lk,"& .mq-scaled.mq-sqrt-prefix":{transform:`scale(1, 0.9) !important`},"& .mq-sup-only .mq-sup":{marginBottom:`0.9px !important`},"& .mq-empty":{backgroundColor:`${Ub()} !important`},"& .mq-overline .mq-overline-inner":{borderTop:`2px solid currentColor`},"& .mq-non-leaf.mq-overline":{borderTop:`none !important`},"& .mq-overarrow":{width:`30px`,marginTop:`0 !important`,borderTop:`2px solid currentColor`,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 currentColor !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});fk.propTypes={latex:O.string.isRequired};var pk=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},mk=I(`div`)(()=>({...QO,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`}}})),hk=I(Lh)(({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:lk,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},...uk,...dk,borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),gk=I(Lh)(({category:e})=>({textTransform:`none`,padding:0,margin:0,fontSize:`110% !important`,minWidth:`auto`,borderRadius:0,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},...uk,...dk})),_k=I(Uh)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},borderRadius:0,"& .icon":{height:`30px`}})),vk=class extends N.Component{static propTypes={className:O.string,controlledKeypadMode:O.bool,baseSet:O.array,additionalKeys:O.array,layoutForKeyPad:O.object,onPress:O.func.isRequired,onFocus:O.func,noDecimal:O.bool,setKeypadInteraction:O.func,mode:O.oneOfType([O.string,O.number])};static defaultProps={baseSet:jm,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=>{sk(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>Mt([...ok(e),...ok(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))`,...pk(r)};return(0,P.jsx)(mk,{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)(gk,{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)(fk,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(hk,{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)(_k,{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)}})})}},yk=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}},bk=class extends N.Component{static propTypes={className:O.string,controlledKeypadMode:O.bool,mode:O.oneOfType([O.string,O.number]),layoutForKeyPad:O.object,onClick:O.func.isRequired,onFocus:O.func,noDecimal:O.bool,additionalKeys:O.array,setKeypadInteraction:O.func};static defaultProps={mode:`scientific`,noDecimal:!1,additionalKeys:[]};keypadPress=e=>{let{onClick:t}=this.props;t(yk(e))};render(){let{mode:e,onFocus:t,controlledKeypadMode:n,noDecimal:r,className:i,additionalKeys:a,layoutForKeyPad:o,setKeypadInteraction:s}=this.props,c=_m(a);return(0,P.jsx)(vk,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:mf(hm(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},xk=o(((e,t)=>{t.exports={"border-radius":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"box-shadow":1,order:1,flex:function(e,t){return[t+`box-flex`]},"box-flex":1,"box-align":1,animation:1,"animation-duration":1,"animation-name":1,transition:1,"transition-duration":1,transform:1,"transform-style":1,"transform-origin":1,"backface-visibility":1,perspective:1,"box-pack":1}})),Sk=o(((e,t)=>{t.exports={animation:1,"column-count":1,columns:1,"font-weight":1,opacity:1,"order ":1,"z-index":1,zoom:1,flex:1,"box-flex":1,transform:1,perspective:1,"box-pack":1,"box-align":1,colspan:1,rowspan:1}})),Ck=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e}})),wk=o(((e,t)=>{var n=Ck(),r=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,i=typeof document>`u`?{}:document.documentElement.style;t.exports=(function(){var e=(function(){for(var e in i)if(r.test(e))return e.match(r)[0];return`WebkitOpacity`in i?`Webkit`:`KhtmlOpacity`in i?`Khtml`:``})();return{style:e,css:`-`+e.toLowerCase()+`-`,dom:{Webkit:`WebKit`,ms:`MS`,o:`WebKit`}[e]||n(e)}})()})),Tk=o(((e,t)=>{t.exports=/[-\s]+(.)?/g})),Ek=o(((e,t)=>{var n=function(e,t){return t?t.toUpperCase():``},r=Tk();t.exports=function(e){return e?e.replace(r,n):``}})),Dk=o(((e,t)=>{var n=/::/g,r=/([A-Z]+)([A-Z][a-z])/g,i=/([a-z\d])([A-Z])/g,a=/_/g;t.exports=function(e,t){return e?e.replace(n,`/`).replace(r,`$1_$2`).replace(i,`$1_$2`).replace(a,t||`-`):``}})),Ok=o(((e,t)=>{var n=Dk();t.exports=function(e){return n(e).toLowerCase()}})),kk=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e}})),Ak=o(((e,t)=>{var n=Ek(),r=Ok(),i=kk(),a=Ck(),o=wk(),s=xk(),c=typeof document>`u`?{}:document.documentElement.style;t.exports=function(e){return function(t,l){l||={};var u=i(n(t)),d=r(t),f=e?u:d,p=o.style?e?o.style:o.css:``;if(u in c)return l.asString?f:[f];var m=f,h=s[d],g=[];if(e&&(m=a(f)),typeof h==`function`){var _=h(f,p)||[];_&&!Array.isArray(_)&&(_=[_]),_.length&&(_=_.map(function(t){return e?i(n(t)):r(t)})),g=g.concat(_)}return p&&g.push(p+m),g.push(f),l.asString||g.length==1?g[0]:g}}})),jk=o(((e,t)=>{t.exports=Ak()()})),Mk=o(((e,t)=>{var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}})),Nk=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return!!e&&n.call(e)===`[object Object]`}})),Pk=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.apply(e)===`[object Function]`}})),Fk=o(((e,t)=>{wk();var n=jk(),r=Ok(),i=Ek(),a=Mk(),o=Nk(),s=Pk(),c=function(e,t,r,i){n(t).forEach(function(t){e[i?i(t):t]=r})},l=function(e){e=(e||``).split(`;`);var t={};return e.forEach(function(e){var n=e.split(`:`);n.length==2&&(t[n[0].trim()]=n[1].trim())}),t},u={cssUnitless:Sk()},d=function(e,t,n,f){typeof e==`string`&&(e=l(e)),t||=u,t.cssUnitless=t.cssUnitless||u.cssUnitless,f||={};var p=t.scope||{},m=t.addUnits==null?p&&p.addUnits!=null?p.addUnits:!0:t.addUnits,h=(t.cssUnitless==null?p?p.cssUnitless:null:t.cssUnitless)||{},g=(t.cssUnit||p?p.cssUnit:null)||`px`,_=t.prefixProperties||(p?p.prefixProperties:null)||{},v=t.camelize?i:r,y,b,x,S,C,w,T,E;for(x in e)if(a(e,x)){if(S=e[x],b=r(n?n+x:x),y=!1,E=!1,s(S)&&(T=S.call(p||e,S,x,b,e),o(T)&&T.value!=null?(S=T.value,E=T.prefix,b=T.name?r(T.name):b):S=T),C=typeof S,w=C==`number`||C==`string`&&S!=``&&S*1==S,S==null||b==null||b===``)continue;if((w||C==`string`)&&(y=!0),!y&&S.value!=null&&S.prefix&&(y=!0,E=S.prefix,S=S.value),y){if(E||=!!_[b],w&&(S=m&&!(b in h)?S+g:S+``),(b==`border`||!b.indexOf(`border`)&&!~b.indexOf(`radius`)&&!~b.indexOf(`width`))&&w&&(b+=`-width`),!b.indexOf(`border-radius-`)&&(b.replace(/border(-radius)(-(.*))/,function(e,t,n){var r={"-top":[`-top-left`,`-top-right`],"-left":[`-top-left`,`-bottom-left`],"-right":[`-top-right`,`-bottom-right`],"-bottom":[`-bottom-left`,`-bottom-right`]};n in r?(b=[],r[n].forEach(function(e){b.push(`border`+e+t)})):b=`border`+n+t}),Array.isArray(b))){b.forEach(function(e){E?c(f,e,S,v):f[v(e)]=S});continue}E?c(f,b,S,v):f[v(b)]=S}else d(S,t,b+`-`,f)}return f};t.exports=d})),Ik=o(((e,t)=>{var n=Fk(),r=Mk();t.exports=function(e,t){e=n(e,t);var i=[],a;for(a in e)r(e,a)&&i.push(a+`: `+e[a]);return i.join(`; `)}})),Lk=o(((e,t)=>{t.exports={prefixProperties:xk(),cssUnitless:Sk(),object:Fk(),string:Ik()}}))(),Rk=Gh(`@pie-lib:mask-markup:serialization`),zk=[`span`],Bk=[`em`,`strong`,`u`],Vk=3,Hk=8,Uk=1,Wk=e=>{if(!e.attributes||e.attributes.length<=0)return;let t={},n;for(n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t},Gk=e=>zk.includes(e)?`inline`:Bk.includes(e)?`mark`:`block`,Kk=e=>{let t=/([\w-]*)\s*:\s*([^;]*)/g,n,r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r},qk=e=>(0,Lk.object)(e,{camelize:!0,addUnits:!1}),Jk=(e,t)=>qk(Kk(e.getAttribute(t))),Yk=(e,t,n)=>{let r=e.getAttribute(n);return delete t.class,r},Xk=e=>(t,n)=>{if(!e.getAttribute)return t;if(e.getAttribute(n))switch(n){case`style`:t.style=Jk(e,n);break;case`class`:t.className=Yk(e,t,n);break;default:t[n]=e.getAttribute(n);break}return t},Zk=[`border`,`class`,`style`],Qk={b:`bold`,em:`italic`,u:`underline`,s:`strikethrough`,code:`code`,strong:`strong`},$k=(e,t=[])=>{if(e.nodeType===Hk)return null;if(e.nodeType===Vk){let n={text:e.textContent};return t.length>0&&(n.marks=t.map(e=>({type:e,data:void 0}))),{object:`text`,leaves:[n]}}if(e.nodeType===Uk){let n=e.tagName.toLowerCase(),r=Qk[n];if(r)return Rk(`[deserialize] mark: `,r),{_flatten:!0,nodes:eA(e.childNodes,[...t,r])};if(n===`math`)return{isMath:!0,nodes:[e]};let i=Wk(e)||{};n===`audio`&&i.controls===``&&(i.controls=!0);let a=Zk.reduce(Xk(e),{...i}),o=Gk(n),s=eA(e.childNodes,t);return{object:o,type:n,data:{dataset:{...e.dataset},attributes:{...a}},nodes:s}}return null},eA=(e,t=[])=>{let n=[];for(let r=0;r<e.length;r++){let i=$k(e[r],t);i!==null&&(i._flatten&&i.nodes?n.push(...i.nodes):n.push(i))}return n},tA=e=>{if(!e||!e.trim())return{object:`value`,document:{object:`document`,data:{},nodes:[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:[]}]}};let t=eA(new DOMParser().parseFromString(e,`text/html`).body.childNodes);return!t.some(e=>e.object===`block`||e.object===`inline`)&&t.length>0&&(t=[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:t}]),t.length===0&&(t=[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:[]}]),{object:`value`,document:{object:`document`,data:{},nodes:t}}},nA=I(`div`)(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),rA=I(`span`)(()=>({display:`inline-block`,width:`.75em`})),iA=[`tbody`,`tr`],aA=(e,t)=>{let n=t.trim()===``,r=e&&e.type;if(!(n&&iA.includes(r)))return t},oA=e=>{let t=e.leaves.find(e=>Nt(e,`marks`,[]).length);return t?t.marks:null},sA=(e,t,n,r,i,a)=>{if(!t)return null;let o=[];return(e.nodes||[]).forEach((e,s)=>{let c=e.type?`${e.type}-${s}`:`${s}`;if(e.isMath)return o.push((0,P.jsx)(`span`,{dangerouslySetInnerHTML:{__html:Ry(`<math displaystyle="true">${e.nodes[0].innerHTML}</math>`)}})),o;if(r){let a=r(e,t,n);if(a){let t=e.data?.dataset?.component===`blank`&&i?.type!==`td`;t&&o.push((0,P.jsx)(rA,{},`spacer-${s}-before`)),o.push(a),t&&o.push((0,P.jsx)(rA,{},`spacer-${s}-after`));return}}if(e.object===`text`){let t=e.leaves.reduce((e,t)=>{let n=t.text,r=aA(i,n);return r?e+r:e},``),n=oA(e);if(n?.length>0){let e=n.map(e=>Object.keys(Qk).find(t=>Qk[t]===e.type)).filter(Boolean);e.length>0?o.push(e.reduceRight((e,t,n)=>(0,P.jsx)(t,{children:e},`${c}-${t}-${n}`),t)):o.push(t)}else t.length>0&&o.push(t)}else{let i=sA(e,t,n,r,e,a);if(e.type===`p`||e.type===`paragraph`)o.push((0,P.jsx)(nA,{children:i},c));else{let t=e.type;e.nodes&&e.nodes.length>0?o.push((0,P.jsx)(t,{...e.data.attributes,children:i},c)):o.push((0,P.jsx)(t,{...e.data.attributes},c))}}}),o},cA=I(`div`)(()=>({display:`initial`,"&:not(.MathJax) table":{borderCollapse:`collapse`},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:`8px 12px`,textAlign:`left`}})),lA=class extends N.Component{constructor(e){super(e),this.internalContainerRef=N.createRef()}static propTypes={renderChildren:O.func,layout:O.object,value:O.object,onChange:O.func,elementType:O.string,containerRef:O.oneOfType([O.func,O.shape({current:O.instanceOf(Element)})])};componentDidMount(){let e=this.props.containerRef||this.internalContainerRef;e.current&&typeof Tw==`function`&&Tw(e.current)}handleChange=(e,t)=>{let n={...this.props.value,[e]:t};this.props.onChange(n)};render(){let{value:e,layout:t,elementType:n,containerRef:r}=this.props,i=sA(t,e,this.handleChange,this.props.renderChildren,null,n),a=r||this.internalContainerRef;return(0,P.jsx)(cA,{ref:a,children:i})}},uA=/\{\{(\d+)\}\}/g,dA=(e,t)=>e?{markup:e.replace(uA,(e,n)=>`<span data-component="${t}" data-id="${n}"></span>`)}:{markup:``},fA=(e,t)=>{let{markup:n}=dA(e,t);return tA(Ry(n)).document},pA=((e,t)=>class extends N.Component{static propTypes={markup:O.string,layout:O.object,value:O.object,onChange:O.func,customMarkMarkupComponent:O.func,elementType:O.string};constructor(e){super(e),this.containerRef=N.createRef()}componentDidUpdate(e){if(this.props.markup!==e.markup){let e=this.containerRef.current;(e&&e.querySelectorAll(`[data-latex][data-math-handled="true"]`)||[]).forEach(e=>{let t=e.querySelector(`mjx-container`);t&&e.removeChild(t),e.textContent=e.getAttribute(`data-raw`),e.removeAttribute(`data-math-handled`)})}}render(){let{markup:n,layout:r,value:i,onChange:a,elementType:o}=this.props,s=r||fA(n,e);return(0,P.jsx)(lA,{containerRef:this.containerRef,elementType:o,layout:s,value:i,onChange:a,renderChildren:t(this.props)})}})(`input`,e=>(t,n,r)=>{let i=t.data&&t.data.dataset||{};if(i.component===`input`)return e.customMarkMarkupComponent(i.id)}),mA=`height ease-in 300ms, opacity ease-in 300ms`,hA=I(`div`)(()=>({position:`relative`,height:0,overflow:`hidden`,display:`flex`,visibility:`hidden`,width:0,"&.enter":{transition:mA,opacity:1,height:`auto`,width:`auto`,visibility:`visible`,minHeight:`25px`},"&.enter-done":{height:`auto`,visibility:`visible`,width:`auto`,minHeight:`25px`},"&.exit":{transition:mA,opacity:0,height:0,visibility:`visible`,width:0},"&.exit-done":{opacity:0,visibility:`hidden`,height:0,width:0}})),gA=e=>{let{show:t,children:n,className:r}=e,i=(0,N.useRef)(null);return(0,P.jsx)(ol,{nodeRef:i,in:t,appear:!0,mountOnEnter:!1,timeout:300,classNames:{enter:`enter`,enterDone:`enter-done`,exit:`exit`,exitDone:`exit-done`},children:(0,P.jsx)(hA,{ref:i,className:r,children:n})})};gA.propTypes={show:O.bool.isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};function _A(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function vA(e,t){return!e||_A(e)?e:_A(e.default)?e.default:t&&_A(e[t])?e[t]:t&&_A(e[t]?.default)?e[t].default:e}var yA=vA(EE,`Readable`)||vA(SA.Readable,`Readable`),bA=tD,xA=bA.default,SA=xA&&typeof xA==`object`?xA:bA,{translator:CA}=OT,wA={WebkitTouchCallout:`none`,WebkitUserSelect:`none`,KhtmlUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`,userSelect:`none`},TA=I(`div`)(()=>({width:`100%`,cursor:`pointer`})),EA=I(`button`)(()=>({margin:`0 auto`,textAlign:`center`,display:`flex`,minWidth:`24px`,minHeight:`24px`,padding:0,border:0,background:`none`,color:`inherit`,font:`inherit`,cursor:`pointer`,"&:focus-visible":{outline:`2px solid ${Mb()}`,outlineOffset:`-2px`}})),DA=I(`div`)(()=>({width:`fit-content`,minWidth:`140px`,alignSelf:`center`,verticalAlign:`middle`,color:`var(--correct-answer-toggle-label-color, ${Uy()})`,fontWeight:`normal`,...wA})),OA=I(`div`)(()=>({position:`absolute`,width:`25px`,"&.enter":{opacity:`0`},"&.enter-active":{opacity:`1`,transition:`opacity 0.3s ease-in`},"&.exit":{opacity:`1`},"&.exit-active":{opacity:`0`,transition:`opacity 0.3s ease-in`}})),kA=I(`div`)(()=>({width:`25px`,marginRight:`5px`,display:`flex`,alignItems:`center`})),AA=class e extends N.Component{static propTypes={onToggle:O.func,toggled:O.bool,show:O.bool,hideMessage:O.string,showMessage:O.string,className:O.string,language:O.string};static defaultProps={showMessage:`Show correct answer`,hideMessage:`Hide correct answer`,show:!1,toggled:!1};constructor(t){super(t),this.state={show:t.show},this.openIconRef=N.createRef(),this.closedIconRef=N.createRef(),e.defaultProps={...e.defaultProps,showMessage:CA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:CA.t(`common:hideCorrectAnswer`,{lng:t.language})}}onClick(){this.props.onToggle(!this.props.toggled)}onTouch(e){e.preventDefault(),this.props.onToggle(!this.props.toggled)}UNSAFE_componentWillReceiveProps(t){this.setState({show:t.show}),t.language!==this.props?.language&&(e.defaultProps={...e.defaultProps,showMessage:CA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:CA.t(`common:hideCorrectAnswer`,{lng:t.language})})}render(){let{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return(0,P.jsx)(TA,{className:e,children:(0,P.jsx)(gA,{show:this.state.show,children:(0,P.jsxs)(EA,{type:`button`,"aria-pressed":!!t,onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this),children:[(0,P.jsxs)(kA,{children:[(0,P.jsx)(ol,{nodeRef:this.openIconRef,timeout:400,in:t,exit:!t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,P.jsx)(OA,{ref:this.openIconRef,children:(0,P.jsx)(sg,{open:t},`correct-open`)})}),(0,P.jsx)(ol,{nodeRef:this.closedIconRef,timeout:5e3,in:!t,exit:t,classNames:{enter:`enter`,enterActive:`enter-active`,exit:`exit`,exitActive:`exit-active`},children:(0,P.jsx)(OA,{ref:this.closedIconRef,children:(0,P.jsx)(sg,{open:t},`correct-closed`)})})]}),(0,P.jsx)(yA,{false:!0,children:(0,P.jsx)(DA,{"aria-hidden":!this.state.show,children:t?n:r})})]})})})}};function jA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function MA(e,t){return!e||jA(e)?e:jA(e.default)?e.default:t&&jA(e[t])?e[t]:t&&jA(e[t]?.default)?e[t].default:e}var NA=MA(GT,`UiLayout`)||MA(zA.UiLayout,`UiLayout`),PA=MA(TE,`PreviewPrompt`)||MA(zA.PreviewPrompt,`PreviewPrompt`),FA=MA(EE,`Readable`)||MA(zA.Readable,`Readable`),IA=MA(FT,`Collapsible`)||MA(zA.Collapsible,`Collapsible`),LA=tD,RA=LA.default,zA=RA&&typeof RA==`object`?RA:LA,{translator:BA}=OT,VA=I(NA)({color:Uy(),backgroundColor:db(),display:`inline-block`}),HA=I(`div`)({width:`100%`,position:`relative`,backgroundColor:db(),color:Uy()}),UA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),WA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),GA=I(`div`)({position:`relative`,"& > div > div":{display:`flex`,alignItems:`baseline`,flexWrap:`wrap`},"& .mq-overarrow-inner":{border:`none !important`,padding:`0 !important`},"& .mq-overarrow-inner-right":{display:`none !important`},"& .mq-overarrow-inner-left":{display:`none !important`},"& .mq-overarrow.mq-arrow-both":{minWidth:`1.23em`,"& *":{lineHeight:`1 !important`},"&:before":{top:`-0.4em`,left:`-1px`},"&:after":{top:`-2.4em`,right:`-1px`},"&.mq-empty:after":{top:`-0.45em`}},"& .mq-overarrow.mq-arrow-right":{"&:before":{top:`-0.4em`,right:`-1px`}},"& .mq-longdiv-inner":{borderTop:`1px solid !important`,paddingTop:`1.5px !important`},"& .mq-parallelogram":{lineHeight:.85}}),KA=I(`div`)(({theme:e,$incorrect:t,$correct:n,$showCorrectness:r,$correctAnswerShown:i})=>({maxWidth:`fit-content`,...t&&{borderColor:`${Zy()} !important`},...n&&{borderColor:`${qy()} !important`},...r&&{border:`2px solid`},...i&&{padding:e.spacing(1),letterSpacing:`0.5px`},"& > .mq-math-mode":{"& > .mq-root-block":{"& > .mq-editable-field":{minWidth:`10px`,padding:e.spacing(.25)}},"& sup":{top:0}}})),qA=I(ak)({"& > .mq-root-block":{"& > .mq-editable-field":{borderColor:Uy()}}}),JA=I(`div`)(({theme:e})=>({zIndex:10,minWidth:`400px`,marginTop:e.spacing(2)})),YA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(1),pointerEvents:`none`})),XA=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),ZA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),QA=I(AA)(({theme:e})=>({color:Uy(),marginBottom:e.spacing(2)}));if(typeof document<`u`){let e=`math-templated-main-styles`;if(!document.getElementById(e)){let t=document.createElement(`style`);t.id=e,t.textContent=`
200
200
  .block-container {
201
201
  margin: 8px !important;
202
202
  display: inline-flex;
@@ -231,9 +231,9 @@ mid `,`&#8740;`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`&#8890;`),Y.veebar=Y[`
231
231
  .incorrect {
232
232
  border-color: ${Zy()} !important;
233
233
  }
234
- `,document.head.appendChild(t)}}var QA=!1,$A=/(\{\{\d+\}\})/gm,ej=6,tj=8,nj=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function rj(e=[]){return e.map(e=>({name:e,latex:e,write:e,label:e}))}function ij(e=[],t){return Math.floor(e.length/5)*30+(t===`miscellaneous`?600:500)}function aj(e){return e.split($A).filter(e=>e)}function oj(e,t){let{responses:n,disabled:r,markup:i,printMode:a,alwaysShowCorrect:o}=e||{};if(i)return t.showCorrect?Object.keys(n||{}).reduce((e,t)=>(e[t]=n?.[t]?.answer,e),{}):aj(i).reduce((e,n)=>{if(n.match($A)){let i=cj.getResponseKey(n),s=t.session.answers[`r${i}`];if(a&&!o){let t=`\\ \\ `.repeat(30)+`\\embed{newLine}[] `;return{...e,[i]:`\\MathQuillMathField[r${i}]{${t.repeat(3)}}`}}return r?{...e,[i]:`\\embed{answerBlock}[r${i}]`}:{...e,[i]:`\\MathQuillMathField[r${i}]{${s&&s.value||``}}`}}return e},{})}var sj={name:`smartHorizontalPlacement`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:({state:e})=>{let t=e.modifiersData.popperOffsets;if(!t)return;let n=window.innerWidth||document.documentElement.clientWidth,r=e.rects.popper.width,i=e.elements.reference.getBoundingClientRect().left,a=e.elements.popper?.offsetParent,o=a?.getBoundingClientRect?.()||{left:0},s=a?.scrollLeft||0,c=i-o.left+s,l=c-i,u=l+tj,d=l+n-r-tj;i+r<=n?t.x=c:t.x=c-r,d<u?t.x=u:t.x=Math.min(Math.max(t.x,u),d)}},cj=class e extends N.Component{static getResponseKey=e=>(e||``).replaceAll(`{{`,``).replaceAll(`}}`,``);static propTypes={session:O.object.isRequired,onSessionChange:O.func,model:O.object.isRequired};constructor(t){super(t);let n={},{model:r,session:i}=t||{},{markup:a,alwaysShowCorrect:o}=r||{},{answers:s}=i||{};a&&(a||``).replace($A,t=>{let r=e.getResponseKey(t),i=s&&s[`r${r}`];n[`r${r}`]={value:i?.value||``}}),this.state={session:{...t.session,answers:n},activeAnswerBlock:``,showCorrect:o||!1,tooltipContainerRef:N.createRef()}}UNSAFE_componentWillMount(){typeof window<`u`&&(QA||=(GO(`answerBlock`,e=>({htmlString:`<div class="block-container">
234
+ `,document.head.appendChild(t)}}var $A=!1,ej=/(\{\{\d+\}\})/gm,tj=6,nj=8,rj=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function ij(e=[]){return e.map(e=>({name:e,latex:e,write:e,label:e}))}function aj(e=[],t){return Math.floor(e.length/5)*30+(t===`miscellaneous`?600:500)}function oj(e){return e.split(ej).filter(e=>e)}function sj(e,t){let{responses:n,disabled:r,markup:i,printMode:a,alwaysShowCorrect:o}=e||{};if(i)return t.showCorrect?Object.keys(n||{}).reduce((e,t)=>(e[t]=n?.[t]?.answer,e),{}):oj(i).reduce((e,n)=>{if(n.match(ej)){let i=lj.getResponseKey(n),s=t.session.answers[`r${i}`];if(a&&!o){let t=`\\ \\ `.repeat(30)+`\\embed{newLine}[] `;return{...e,[i]:`\\MathQuillMathField[r${i}]{${t.repeat(3)}}`}}return r?{...e,[i]:`\\embed{answerBlock}[r${i}]`}:{...e,[i]:`\\MathQuillMathField[r${i}]{${s&&s.value||``}}`}}return e},{})}var cj={name:`smartHorizontalPlacement`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:({state:e})=>{let t=e.modifiersData.popperOffsets;if(!t)return;let n=window.innerWidth||document.documentElement.clientWidth,r=e.rects.popper.width,i=e.elements.reference.getBoundingClientRect().left,a=e.elements.popper?.offsetParent,o=a?.getBoundingClientRect?.()||{left:0},s=a?.scrollLeft||0,c=i-o.left+s,l=c-i,u=l+nj,d=l+n-r-nj;i+r<=n?t.x=c:t.x=c-r,d<u?t.x=u:t.x=Math.min(Math.max(t.x,u),d)}},lj=class e extends N.Component{static getResponseKey=e=>(e||``).replaceAll(`{{`,``).replaceAll(`}}`,``);static propTypes={session:O.object.isRequired,onSessionChange:O.func,model:O.object.isRequired};constructor(t){super(t);let n={},{model:r,session:i}=t||{},{markup:a,alwaysShowCorrect:o}=r||{},{answers:s}=i||{};a&&(a||``).replace(ej,t=>{let r=e.getResponseKey(t),i=s&&s[`r${r}`];n[`r${r}`]={value:i?.value||``}}),this.state={session:{...t.session,answers:n},activeAnswerBlock:``,showCorrect:o||!1,tooltipContainerRef:N.createRef()}}UNSAFE_componentWillMount(){typeof window<`u`&&($A||=(KO(`answerBlock`,e=>({htmlString:`<div class="block-container">
235
235
  <div class="block-response" data-answer-block-index="${e}">R</div>
236
236
  <div class="block-math">
237
237
  <span data-answer-block="${e}"></span>
238
238
  </div>
239
- </div>`,text:()=>`text`,latex:()=>`\\embed{answerBlock}[${e}]`})),!0))}handleAnswerBlockDomUpdate=()=>{let{model:e}=this.props,{session:t,showCorrect:n}=this.state,r=t.answers;this.root&&e.disabled&&!n&&Object.keys(r).forEach(t=>{let n=this.root.querySelector(`[data-answer-block="${t}"]`),i=this.root.querySelector(`[data-answer-block-index="${t}"]`);if(n){let a=r[t];KO(n,a&&a.value||``),e.view&&(n.parentElement.parentElement.classList.remove(`correct`),n.parentElement.parentElement.classList.remove(`incorrect`)),i.textContent=`R`}}),ww(this.root)};UNSAFE_componentWillReceiveProps(t){let{model:n}=this.props,{model:r={}}=t||{},{markup:i=``,env:a={}}=n||{},{markup:o=``,env:s={},alwaysShowCorrect:c=!1}=r,l=e=>e&&e.mode===`evaluate`;(!l(a)||!l(s))&&this.setState(e=>({...e.session,showCorrect:!1})),c&&this.setState({showCorrect:!0});let u=i.match($A),d=o.match($A);if(!Ft(u,d)){let t={},n=this.state.session.answers;(d||[]).forEach(r=>{let i=e.getResponseKey(r),a=n&&n[`r${i}`];t[`r${i}`]={value:a?.value||``}}),this.setState(e=>({session:{...e.session,answers:t}}),()=>{this.props.onSessionChange(this.state.session),this.handleAnswerBlockDomUpdate()})}}shouldComponentUpdate(e,t){let n=Ft(this.props.model,e.model),r=Ft(this.state,t);return!n||!r}componentDidMount(){this.handleAnswerBlockDomUpdate(),setTimeout(()=>ww(this.root),100)}componentDidUpdate(){this.handleAnswerBlockDomUpdate()}onSubFieldFocus=e=>{let t=Array.from(this.root?.querySelectorAll(`.mq-editable-field`)||[]).map(e=>({el:e,left:e.scrollLeft,top:e.scrollTop})),n=()=>{t.forEach(({el:e,left:t,top:n})=>{e.scrollLeft=t,e.scrollTop=n})};this.setState({activeAnswerBlock:e},()=>{n(),requestAnimationFrame(n),setTimeout(n,0)})};toNodeData=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}};setInput=e=>{this.input=e};onClick=e=>{let t=this.toNodeData(e);t.type===`clear`?this.input.clear():t.type===`command`?Array.isArray(t.value)?t.value.forEach(e=>{this.input.cmd(e)}):this.input.cmd(t.value):t.type===`cursor`?this.input.keystroke(t.value):this.input.write(t.value);let n=this.input?.el?.()||this.root,r=[],i=n;for(;i&&i!==document.body&&i!==document.documentElement;)(i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight)&&r.push(i),i=i.parentElement;document.scrollingElement&&r.push(document.scrollingElement);let a=r.map(e=>({el:e,left:e.scrollLeft,top:e.scrollTop})),o={x:window.scrollX,y:window.scrollY},s=()=>{a.forEach(({el:e,left:t,top:n})=>{e.scrollLeft=t,e.scrollTop=n}),window.scrollTo(o.x,o.y)};this.input.focus(),s(),requestAnimationFrame(s),setTimeout(s,0)};callOnSessionChange=()=>{let{onSessionChange:e}=this.props;e&&e(this.state.session)};toggleShowCorrect=e=>{this.setState({showCorrect:e},this.handleAnswerBlockDomUpdate)};subFieldChanged=(e,t)=>{vm(),e&&this.setState(n=>({session:{...n.session,answers:{...n.session.answers,[e]:{value:t}}}}),this.callOnSessionChange)};getFieldName=(e,t)=>{let{answers:n}=this.state.session;if(Object.keys(n||{}).length)return Object.keys(n).find(n=>{let r=t[n];return r&&r.id==e.id})};onBlur=e=>{let{relatedTarget:t,currentTarget:n}=e||{};function r(e,t=0){if(!e||t>=16)return null;let n=e.offsetParent;return n?n.getAttribute(`role`)===`tooltip`?n:r(n,t+1):null}function i(e,t=0){if(!e||t>=4)return null;let n=e?.children?.[0];return n?n.attributes&&n.attributes[`data-keypad`]?n:i(n,t+1):null}let a=r(t),o=a?i(a):null;(!t||!n||!o?.attributes[`data-keypad`])&&this.setState({activeAnswerBlock:``})};setTooltipRef(e){setTimeout(()=>{if(e&&nj){let e=document.querySelector(`[role='tooltip']`);e&&e.firstChild.setAttribute(`tabindex`,`-1`)}},1)}renderTeacherInstructions=()=>{let{model:e}=this.props,{teacherInstructions:t,animationsDisabled:n}=e||{},r=t&&(kE(t)||jE(t)),i=(0,P.jsx)(NA,{defaultClassName:`teacher-instructions`,prompt:t});return r&&(0,P.jsx)(UA,{children:n?i:(0,P.jsx)(FA,{labels:{hidden:zA.t(`common:showTeacherInstructions`,{lng:e?.language}),visible:zA.t(`common:hideTeacherInstructions`,{lng:e?.language})},children:i})})};renderRationale=()=>{let{model:e}=this.props,{rationale:t,animationsDisabled:n}=e||{},r=(0,P.jsx)(NA,{prompt:t});return t&&(kE(t)||jE(t))&&(0,P.jsx)(UA,{children:n?r:(0,P.jsx)(FA,{labels:{hidden:zA.t(`common:showRationale`,{lng:e?.language}),visible:zA.t(`common:hideRationale`,{lng:e?.language})},children:r})})};renderPlayerContent=()=>{let{model:e}=this.props,{activeAnswerBlock:t,showCorrect:n,session:r,tooltipContainerRef:i}=this.state,{correctness:a,disabled:o,view:s,responses:c,equationEditor:l,customKeys:u,feedback:d,env:{mode:f}={},printMode:p,alwaysShowCorrect:m,language:h}=e||{},g=Pt(c),_=rj(u),v=oj(e,this.state)||``,y=p&&!m;return(0,P.jsx)(WA,{children:(0,P.jsx)(fA,{disabled:o,markup:e.markup,value:{},customMarkMarkupComponent:e=>{let c=f===`evaluate`&&d&&d[e],u=(0,P.jsx)(KA,{ref:e=>{this.mqStatic=e||this.mqStatic},latex:v[e],language:h,onSubFieldChange:this.subFieldChanged,getFieldName:this.getFieldName,setInput:this.setInput,onSubFieldFocus:this.onSubFieldFocus,onBlur:this.onBlur});return(0,P.jsx)(GA,{ref:i,$incorrect:!g&&!c&&!n,$correct:!g&&(c||n),$showCorrectness:!g&&o&&a&&!s,$correctAnswerShown:n,children:(0,P.jsx)(rf,{ref:e=>this.setTooltipRef(e),enterTouchDelay:0,interactive:!0,open:t===`r${e}`,slotProps:{popper:{container:i?.current||void 0,placement:`bottom-start`,sx:{backgroundColor:`transparent`,width:`auto`,opacity:1,"& .MuiTooltip-arrow":{display:`none`}},modifiers:[{name:`preventOverflow`,enabled:!1},{name:`flip`,enabled:!1},sj]},tooltip:{sx:{fontSize:`initial`,backgroundColor:`transparent`,width:`auto`,maxWidth:`none`,marginTop:0,paddingTop:0,boxShadow:`none`}}},title:Object.keys(r.answers).map(e=>e===t&&!(n||o)&&(0,P.jsx)(qA,{"data-keypad":!0,style:{width:ij(_,l)},children:(0,P.jsx)(yk,{additionalKeys:_,mode:l||ej,onClick:this.onClick})},e)||null),children:y?(0,P.jsx)(JA,{children:u}):(0,P.jsx)(`div`,{children:u})})})}})})};render(){let{model:e}=this.props,{showCorrect:t}=this.state,{prompt:n,env:{mode:r,role:i}={},extraCSSRules:a,correctness:o,responses:s,language:c,showNote:l,note:u}=e||{},d=!Pt(s)&&o&&o.correctness!==`correct`,f=(t||r===`view`&&i===`instructor`)&&l&&u;return(0,P.jsx)(BA,{extraCSSRules:a,ref:e=>{let t=Xc.findDOMNode(e);this.root=t||this.root},children:(0,P.jsxs)(VA,{children:[r===`gather`&&(0,P.jsx)(YA,{children:zA.t(`mathInline.mathEquationResponseQuestion`,{lng:c})}),(0,P.jsx)(VA,{children:d&&(0,P.jsx)(ZA,{language:c,show:!0,toggled:t,onToggle:this.toggleShowCorrect})}),this.renderTeacherInstructions(),n&&(0,P.jsx)(HA,{children:(0,P.jsx)(NA,{prompt:n})}),(0,P.jsx)(PA,{false:!0,children:this.renderPlayerContent()}),f&&(0,P.jsx)(XA,{className:`note`,dangerouslySetInnerHTML:{__html:Ry(u)}}),this.renderRationale()]})})}},lj=g(),uj=class extends HTMLElement{constructor(){super(),this._root=null,this._sessionNotifier=S(this,()=>{this.dispatchEvent(new T(this.tagName.toLowerCase(),!0))},{delayMs:1e3}),this.sessionChangedEventCaller=()=>this._sessionNotifier.notify()}set model(e){this._model=e,this.render(),this.dispatchEvent(new w(this.tagName.toLowerCase(),this.isSessionComplete(),this._model!==void 0))}get model(){return this._model}set session(e){this._session=e,this.render()}get session(){return this._session}isSessionComplete(){return!0}onSessionChange(e){Object.keys(e).map(t=>{this._session[t]=e[t]}),this.sessionChangedEventCaller(),this.render()}connectedCallback(){this.render()}render(){if(!(!this._model||!this._session)&&this._model&&this._session){let e=N.createElement(cj,{model:this._model,session:this._session,onSessionChange:this.onSessionChange.bind(this)});this._root||=(0,lj.createRoot)(this),this._root.render(e)}}disconnectedCallback(){C(this),this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`math-templated-element`)&&customElements.define(`math-templated-element`,uj),uj})();
239
+ </div>`,text:()=>`text`,latex:()=>`\\embed{answerBlock}[${e}]`})),!0))}handleAnswerBlockDomUpdate=()=>{let{model:e}=this.props,{session:t,showCorrect:n}=this.state,r=t.answers;this.root&&e.disabled&&!n&&Object.keys(r).forEach(t=>{let n=this.root.querySelector(`[data-answer-block="${t}"]`),i=this.root.querySelector(`[data-answer-block-index="${t}"]`);if(n){let a=r[t];qO(n,a&&a.value||``),e.view&&(n.parentElement.parentElement.classList.remove(`correct`),n.parentElement.parentElement.classList.remove(`incorrect`)),i.textContent=`R`}}),Tw(this.root)};UNSAFE_componentWillReceiveProps(t){let{model:n}=this.props,{model:r={}}=t||{},{markup:i=``,env:a={}}=n||{},{markup:o=``,env:s={},alwaysShowCorrect:c=!1}=r,l=e=>e&&e.mode===`evaluate`;(!l(a)||!l(s))&&this.setState(e=>({...e.session,showCorrect:!1})),c&&this.setState({showCorrect:!0});let u=i.match(ej),d=o.match(ej);if(!Ft(u,d)){let t={},n=this.state.session.answers;(d||[]).forEach(r=>{let i=e.getResponseKey(r),a=n&&n[`r${i}`];t[`r${i}`]={value:a?.value||``}}),this.setState(e=>({session:{...e.session,answers:t}}),()=>{this.props.onSessionChange(this.state.session),this.handleAnswerBlockDomUpdate()})}}shouldComponentUpdate(e,t){let n=Ft(this.props.model,e.model),r=Ft(this.state,t);return!n||!r}componentDidMount(){this.handleAnswerBlockDomUpdate(),setTimeout(()=>Tw(this.root),100)}componentDidUpdate(){this.handleAnswerBlockDomUpdate()}onSubFieldFocus=e=>{let t=Array.from(this.root?.querySelectorAll(`.mq-editable-field`)||[]).map(e=>({el:e,left:e.scrollLeft,top:e.scrollTop})),n=()=>{t.forEach(({el:e,left:t,top:n})=>{e.scrollLeft=t,e.scrollTop=n})};this.setState({activeAnswerBlock:e},()=>{n(),requestAnimationFrame(n),setTimeout(n,0)})};toNodeData=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}};setInput=e=>{this.input=e};onClick=e=>{let t=this.toNodeData(e);t.type===`clear`?this.input.clear():t.type===`command`?Array.isArray(t.value)?t.value.forEach(e=>{this.input.cmd(e)}):this.input.cmd(t.value):t.type===`cursor`?this.input.keystroke(t.value):this.input.write(t.value);let n=this.input?.el?.()||this.root,r=[],i=n;for(;i&&i!==document.body&&i!==document.documentElement;)(i.scrollWidth>i.clientWidth||i.scrollHeight>i.clientHeight)&&r.push(i),i=i.parentElement;document.scrollingElement&&r.push(document.scrollingElement);let a=r.map(e=>({el:e,left:e.scrollLeft,top:e.scrollTop})),o={x:window.scrollX,y:window.scrollY},s=()=>{a.forEach(({el:e,left:t,top:n})=>{e.scrollLeft=t,e.scrollTop=n}),window.scrollTo(o.x,o.y)};this.input.focus(),s(),requestAnimationFrame(s),setTimeout(s,0)};callOnSessionChange=()=>{let{onSessionChange:e}=this.props;e&&e(this.state.session)};toggleShowCorrect=e=>{this.setState({showCorrect:e},this.handleAnswerBlockDomUpdate)};subFieldChanged=(e,t)=>{vm(),e&&this.setState(n=>({session:{...n.session,answers:{...n.session.answers,[e]:{value:t}}}}),this.callOnSessionChange)};getFieldName=(e,t)=>{let{answers:n}=this.state.session;if(Object.keys(n||{}).length)return Object.keys(n).find(n=>{let r=t[n];return r&&r.id==e.id})};onBlur=e=>{let{relatedTarget:t,currentTarget:n}=e||{};function r(e,t=0){if(!e||t>=16)return null;let n=e.offsetParent;return n?n.getAttribute(`role`)===`tooltip`?n:r(n,t+1):null}function i(e,t=0){if(!e||t>=4)return null;let n=e?.children?.[0];return n?n.attributes&&n.attributes[`data-keypad`]?n:i(n,t+1):null}let a=r(t),o=a?i(a):null;(!t||!n||!o?.attributes[`data-keypad`])&&this.setState({activeAnswerBlock:``})};setTooltipRef(e){setTimeout(()=>{if(e&&rj){let e=document.querySelector(`[role='tooltip']`);e&&e.firstChild.setAttribute(`tabindex`,`-1`)}},1)}renderTeacherInstructions=()=>{let{model:e}=this.props,{teacherInstructions:t,animationsDisabled:n}=e||{},r=t&&(AE(t)||ME(t)),i=(0,P.jsx)(PA,{defaultClassName:`teacher-instructions`,prompt:t});return r&&(0,P.jsx)(WA,{children:n?i:(0,P.jsx)(IA,{labels:{hidden:BA.t(`common:showTeacherInstructions`,{lng:e?.language}),visible:BA.t(`common:hideTeacherInstructions`,{lng:e?.language})},children:i})})};renderRationale=()=>{let{model:e}=this.props,{rationale:t,animationsDisabled:n}=e||{},r=(0,P.jsx)(PA,{prompt:t});return t&&(AE(t)||ME(t))&&(0,P.jsx)(WA,{children:n?r:(0,P.jsx)(IA,{labels:{hidden:BA.t(`common:showRationale`,{lng:e?.language}),visible:BA.t(`common:hideRationale`,{lng:e?.language})},children:r})})};renderPlayerContent=()=>{let{model:e}=this.props,{activeAnswerBlock:t,showCorrect:n,session:r,tooltipContainerRef:i}=this.state,{correctness:a,disabled:o,view:s,responses:c,equationEditor:l,customKeys:u,feedback:d,env:{mode:f}={},printMode:p,alwaysShowCorrect:m,language:h}=e||{},g=Pt(c),_=ij(u),v=sj(e,this.state)||``,y=p&&!m;return(0,P.jsx)(GA,{children:(0,P.jsx)(pA,{disabled:o,markup:e.markup,value:{},customMarkMarkupComponent:e=>{let c=f===`evaluate`&&d&&d[e],u=(0,P.jsx)(qA,{ref:e=>{this.mqStatic=e||this.mqStatic},latex:v[e],language:h,onSubFieldChange:this.subFieldChanged,getFieldName:this.getFieldName,setInput:this.setInput,onSubFieldFocus:this.onSubFieldFocus,onBlur:this.onBlur});return(0,P.jsx)(KA,{ref:i,$incorrect:!g&&!c&&!n,$correct:!g&&(c||n),$showCorrectness:!g&&o&&a&&!s,$correctAnswerShown:n,children:(0,P.jsx)(rf,{ref:e=>this.setTooltipRef(e),enterTouchDelay:0,interactive:!0,open:t===`r${e}`,slotProps:{popper:{container:i?.current||void 0,placement:`bottom-start`,sx:{backgroundColor:`transparent`,width:`auto`,opacity:1,"& .MuiTooltip-arrow":{display:`none`}},modifiers:[{name:`preventOverflow`,enabled:!1},{name:`flip`,enabled:!1},cj]},tooltip:{sx:{fontSize:`initial`,backgroundColor:`transparent`,width:`auto`,maxWidth:`none`,marginTop:0,paddingTop:0,boxShadow:`none`}}},title:Object.keys(r.answers).map(e=>e===t&&!(n||o)&&(0,P.jsx)(JA,{"data-keypad":!0,style:{width:aj(_,l)},children:(0,P.jsx)(bk,{additionalKeys:_,mode:l||tj,onClick:this.onClick})},e)||null),children:y?(0,P.jsx)(YA,{children:u}):(0,P.jsx)(`div`,{children:u})})})}})})};render(){let{model:e}=this.props,{showCorrect:t}=this.state,{prompt:n,env:{mode:r,role:i}={},extraCSSRules:a,correctness:o,responses:s,language:c,showNote:l,note:u}=e||{},d=!Pt(s)&&o&&o.correctness!==`correct`,f=(t||r===`view`&&i===`instructor`)&&l&&u;return(0,P.jsx)(VA,{extraCSSRules:a,ref:e=>{let t=Xc.findDOMNode(e);this.root=t||this.root},children:(0,P.jsxs)(HA,{children:[r===`gather`&&(0,P.jsx)(XA,{children:BA.t(`mathInline.mathEquationResponseQuestion`,{lng:c})}),(0,P.jsx)(HA,{children:d&&(0,P.jsx)(QA,{language:c,show:!0,toggled:t,onToggle:this.toggleShowCorrect})}),this.renderTeacherInstructions(),n&&(0,P.jsx)(UA,{children:(0,P.jsx)(PA,{prompt:n})}),(0,P.jsx)(FA,{false:!0,children:this.renderPlayerContent()}),f&&(0,P.jsx)(ZA,{className:`note`,dangerouslySetInnerHTML:{__html:Ry(u)}}),this.renderRationale()]})})}},uj=g(),dj=class extends HTMLElement{constructor(){super(),this._root=null,this._sessionNotifier=S(this,()=>{this.dispatchEvent(new T(this.tagName.toLowerCase(),!0))},{delayMs:1e3}),this.sessionChangedEventCaller=()=>this._sessionNotifier.notify()}set model(e){this._model=e,this.render(),this.dispatchEvent(new w(this.tagName.toLowerCase(),this.isSessionComplete(),this._model!==void 0))}get model(){return this._model}set session(e){this._session=e,this.render()}get session(){return this._session}isSessionComplete(){return!0}onSessionChange(e){Object.keys(e).map(t=>{this._session[t]=e[t]}),this.sessionChangedEventCaller(),this.render()}connectedCallback(){this.render()}render(){if(!(!this._model||!this._session)&&this._model&&this._session){let e=N.createElement(lj,{model:this._model,session:this._session,onSessionChange:this.onSessionChange.bind(this)});this._root||=(0,uj.createRoot)(this),this._root.render(e)}}disconnectedCallback(){C(this),this._root&&=(this._root.unmount(),null)}};return typeof window<`u`&&!customElements.get(`math-templated-element`)&&customElements.define(`math-templated-element`,dj),dj})();