@pie-element/math-templated 8.0.3-next.20261007184841 → 8.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{horizontal-keypad-CN7h8aIy.js → horizontal-keypad-Bng7yQkr.js} +4367 -4404
- package/dist/browser/editor-runtime/horizontal-keypad-Bng7yQkr.js.map +1 -0
- package/dist/browser/editor-runtime/{main-BwrQeu2f.js → main-D-a8wxSx.js} +2 -2
- package/dist/browser/editor-runtime/{main-BwrQeu2f.js.map → main-D-a8wxSx.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{horizontal-keypad-DJngMKwo.js → horizontal-keypad-DYblKSrp.js} +4367 -4404
- package/dist/browser/horizontal-keypad-DYblKSrp.js.map +1 -0
- package/dist/browser/{main-BJdq6qBM.js → main-D45ntVy4.js} +2 -2
- package/dist/browser/{main-BJdq6qBM.js.map → main-D45ntVy4.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/index.iife.js +7 -7
- package/module/print.js +1032 -1069
- package/module/print.js.map +1 -1
- package/package.json +16 -16
- package/dist/browser/editor-runtime/horizontal-keypad-CN7h8aIy.js.map +0 -1
- package/dist/browser/horizontal-keypad-DJngMKwo.js.map +0 -1
package/dist/index.iife.js
CHANGED
|
@@ -182,21 +182,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
182
182
|
color: ${zS} !important;
|
|
183
183
|
background-color: ${US} !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=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function qS(){let e=globalThis;e[KS]||(e[KS]=!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 JS(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(),qS()}function YS(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`,()=>JS(e),{once:!0}),a})}`${Sx}`;var XS={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1]},ZS=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,QS=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,$S=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,eC=/\\embed\{newLine\}\[\]/g,tC=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],nC=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),rC=`MJX-CHTML-styles`,iC=`PIE-MJX-SVG-styles`,aC=`PIE-MathJax-Menu-Settings`,oC={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},sC=200,cC=201;function lC(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 tC)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function dC(e){return uC(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var fC=`mathjax_ignore`,pC=`mathjax_process`;function mC(e,t){let n=e.closest(`.${fC}, .${pC}`);return n!==null&&t.contains(n)&&!n.classList.contains(pC)}function hC(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||mC(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${dC(n)}\\)`.replace(eC,`\\newline `),t.dataset.mathHandled=`true`)}}function gC(e){for(let t of e.querySelectorAll(`math`))t.closest(`mjx-container`)||t.setAttribute(`displaystyle`,`true`)}function _C(e,t){for(let t of e.querySelectorAll(`math`))if(!t.closest(`mjx-assistive-mml`))return!0;return(t?$S:QS).test(e.textContent??``)}function vC(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 yC(t)&&bC(t),e}}},startup:{typeset:!1,ready:()=>{let e=Vx(),r=e?.startup,i=yC(e);i&&(bC(e),xC(e,s.speechLocales),Ax(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(SC(r?.document),r?.document?.addStyles?.(oC),YS(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...XS}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:!1}},a11y:{inTabOrder:!1}}};r&&c.tex&&(console.warn(ZS),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 yC(e){return!!e?.version?.startsWith(`4.`)}function bC(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 xC(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=aC;try{let e=localStorage.getItem(aC);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(aC,JSON.stringify(i)):localStorage.removeItem(aC)}catch{}}}function SC(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(lC(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,cC,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&lC(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===rC&&(r.id=Gx),TC()}function CC(e){return e instanceof HTMLStyleElement&&Kx.includes(e.id)}function wC(e){zx(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function TC(){let e=document.head,t=[...e.children].find(CC);if(t){wC(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(CC);if(e){wC(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function EC(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=sC&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function DC(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 OC(e){let t=Vx();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():DC(t):vC(e)}function kC(e){return OC(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 AC(e){let t=Wx,n=t[nC];return n||(n=kC(e),t[nC]=n),n}function jC(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}`),hC(n),Zx(n),gC(n),LS(n);let i=AC(e);if(!_C(n,t)){i.catch(()=>{});return}await i;let a=Vx();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){GS(),EC(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}lC(n)}}}var MC=/[-]/g,NC={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},PC={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},FC={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},IC={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},LC={"+":`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`,...PC,...FC,...IC},RC=new Set([`|`,`‖`]),zC=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),BC={α:`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`},VC={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},HC={2:[`half`,`halves`],3:[`third`,`thirds`],4:[`quarter`,`quarters`],5:[`fifth`,`fifths`],6:[`sixth`,`sixths`],7:[`seventh`,`sevenths`],8:[`eighth`,`eighths`],9:[`ninth`,`ninths`],10:[`tenth`,`tenths`]},UC=e=>(e.textContent??``).replace(MC,``).replace(/\s+/g,` `).trim(),WC=e=>e.replace(/\s+/g,` `).trim(),GC=e=>[...e.children];function KC(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?KC(e.children[0]):!1}function qC(e){let t=e?UC(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function JC(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function YC(e){return BC[e]??e}function XC(e){return LC[e]??e}function ZC(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(ow(r)),n=!0;continue}let e=UC(r);e&&(!n&&NC[e]?t.push(NC[e]):e in IC?t.push(IC[e]):(t.push(XC(e)),n=e in FC||RC.has(e)&&n))}return t.filter(Boolean).join(` `)}function QC(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(UC(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&UC(t)===UC(r)&&!a.some(i)){let e=WC(ZC(a));return UC(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return ZC(e)}function $C(e,t){let n=qC(e),r=qC(t),i=r===void 0?void 0:HC[r];if(n!==void 0&&i)return`${n} ${n===1?i[0]:i[1]}`;let a=e?ow(e):``,o=t?ow(t):``;return KC(e)&&KC(t)?`${a} over ${o}`:`the fraction with numerator ${a} and denominator ${o}`}function ew(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function tw(e,t){let n=t?UC(t):``;if(t&&KC(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in IC)return`${e} ${IC[n]}`}let r=t?ow(t):``;return KC(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function nw(e,t){let n=t?ow(t):``;return KC(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function rw(e,t,n){let r=UC(e);if(r===`lim`)return`limit as ${t?ow(t):``} of`;if(!zC.has(r))return;let i=t?`from ${ow(t)}`:``,a=n?`to ${ow(n)}`:``;return`${XC(r)} ${i} ${a} of`}function iw(e){let t=GC(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>GC(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=>WC(ZC(GC(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function aw(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=GC(e).map((e,t,n)=>t<n.length-1?`${ow(e)} ${XC(r[Math.min(t,r.length-1)]??`,`)}`:ow(e));return[XC(t),...i,XC(n)].filter(Boolean).join(` `)}function ow(e){let t=GC(e);switch(e.localName){case`mi`:return YC(UC(e));case`mn`:case`mtext`:case`ms`:return UC(e);case`mo`:return XC(UC(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?ow(t[0]):``;case`mfrac`:return $C(t[0],t[1]);case`msqrt`:return ew(WC(ZC(t)),`square root`,t.length===1&&KC(t[0]));case`mroot`:{let e=qC(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${JC(e)} root`:`root with index ${t[1]?ow(t[1]):``}`;return ew(t[0]?ow(t[0]):``,n,KC(t[0]))}case`msup`:return tw(t[0]?ow(t[0]):``,t[1]);case`msub`:return nw(t[0]?ow(t[0]):``,t[1]);case`msubsup`:return(t[0]?rw(t[0],t[1],t[2]):void 0)||tw(nw(t[0]?ow(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?rw(n,a,o):void 0;if(s)return s;let c=n?ow(n):``,l=e.localName===`mover`&&r?VC[UC(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${ow(a)} below`:``,o?`with ${ow(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return aw(e);case`mtable`:return iw(e);case`mrow`:case`math`:return QC(t);default:return t.length?ZC(t):UC(e)}}function sw(e){return WC(ow(e))}var cw=new Set(`address.article.aside.blockquote.br.dd.div.dl.dt.fieldset.figure.footer.h1.h2.h3.h4.h5.h6.header.hr.li.ol.p.pre.section.table.td.th.tr.ul`.split(`.`)),lw=e=>e.replace(/\s+/g,` `).trim();function uw(e){return e.getAttribute(`aria-hidden`)===`true`||e.hidden===!0||e.style?.display===`none`}function dw(e){return e.localName===`math`?e:e.querySelector(`math`)}function fw(e,t,n){if(e.nodeType===3)return e.textContent??``;if(!(e instanceof Element)||uw(e))return``;let r=e.localName===`mjx-container`||e.localName===`math`?dw(e):null;if(r){let e=lw(t(r)??r.textContent??``);return e&&(n.math=!0),` ${e} `}if(e.localName===`mjx-container`)return` `;let i=e.getAttribute(`aria-label`)?.trim();if(i)return` ${i} `;if(e.localName===`img`)return` ${e.getAttribute(`alt`)??``} `;let a=[...e.childNodes].map(e=>fw(e,t,n)).join(``);return cw.has(e.localName)?` ${a} `:a}function pw(e,t={}){let n=t.speak??sw,r={math:!1},i=lw([...e.childNodes].map(e=>fw(e,n,r)).join(``));return r.math&&i?i:void 0}var mw=`@pie-lib/math-rendering`,hw=`@pie-lib/math-rendering@2`,gw=`pie-print`,_w=50,vw=1e4,yw=null;function bw(){return!!window[hw]?.opts?.useSingleDollar}function xw(){return yw||=jC({useSingleDollar:bw()}),yw}function Sw(){if(typeof window>`u`)return null;let e=window[mw];return typeof e?.renderMath==`function`&&e.renderMath!==Ew?e:null}function Cw(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===gw)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function ww(){let e=window.renderMath;return typeof e==`function`?e:null}async function Tw(e){let t=Cw(e);if(!t)return null;let n=ww();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+vw;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,_w));let e=ww();if(e)return e}return null}var Ew=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=Sw(),i=r||t?null:await Tw(n);return r?await r.renderMath?.(n):i&&i!==Ew?await i(n):await xw()(n),t?n.innerHTML:void 0},Dw={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`}},Ow={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`,kw=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},Aw=e=>e==null?``:``+e,jw=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Mw=/###/g,Nw=e=>e&&e.indexOf(`###`)>-1?e.replace(Mw,`.`):e,Pw=e=>!e||H(e),Fw=(e,t,n)=>{let r=H(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(Pw(e))return{};let t=Nw(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return Pw(e)?{}:{obj:e,k:Nw(r[i])}},Iw=(e,t,n)=>{let{obj:r,k:i}=Fw(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=Fw(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Fw(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Lw=(e,t,n,r)=>{let{obj:i,k:a}=Fw(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Rw=(e,t)=>{let{obj:n,k:r}=Fw(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},zw=(e,t,n)=>{let r=Rw(e,n);return r===void 0?Rw(t,n):r},Bw=(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]):Bw(e[r],t[r],n):e[r]=t[r]);return e},Vw=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Hw={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Uw=e=>H(e)?e.replace(/[&<>"'\/]/g,e=>Hw[e]):e,Ww=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}},Gw=[` `,`,`,`?`,`!`,`;`],Kw=new Ww(20),qw=(e,t,n)=>{t||=``,n||=``;let r=Gw.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(r.length===0)return!0;let i=Kw.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},Jw=(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},Yw=e=>e?.replace(/_/g,`-`),Xw={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)}},Zw=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Xw,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)}},Qw=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])})}},$w=class extends Qw{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=Rw(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:Jw(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),Iw(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=Rw(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Bw(s,n,i):s={...s,...n},Iw(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}},eT={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}},tT=Symbol(`i18next/PATH_KEY`);function nT(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===tT?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function rT(e,t){let{[tT]:n}=e(nT()),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 iT={},aT=e=>!H(e)&&typeof e!=`boolean`&&typeof e!=`number`,oT=class e extends Qw{constructor(e,t={}){super(),jw([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Zw.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=aT(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&&!qw(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=rT(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?rT(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=aT(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:aT(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=eT.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`?rT(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,!iT[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(iT[`${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}},sT=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Zw.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Yw(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=Yw(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}},cT={zero:0,one:1,two:2,few:3,many:4,other:5},lT={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},uT=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Zw.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Yw(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!`),lT;if(!e.match(/-|_/))return lT;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)=>cT[e]-cT[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))}},dT=(e,t,n,r=`.`,i=!0)=>{let a=zw(e,t,n);return!a&&i&&H(n)&&(a=Jw(e,n,r),a===void 0&&(a=Jw(t,n,r))),a},fT=e=>e.replace(/\$/g,`$$$$`),pT=class{constructor(e={}){this.logger=Zw.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?Uw:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Vw(i):a||`{{`,this.suffix=o?Vw(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u||`-`,this.unescapeSuffix=this.unescapePrefix?``:l||``,this.nestingPrefix=d?Vw(d):f||Vw(`$t(`),this.nestingSuffix=p?Vw(p):m||Vw(`)`),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=dT(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(dT(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=>fT(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?fT(this.escape(e)):fT(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=Aw(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(`${Vw(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=Aw(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}},mT=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}},hT=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(Yw(r),i),t[o]=s),s(n)}},gT=e=>(t,n,r)=>e(Yw(n),r)(t),_T=class{constructor(e={}){this.logger=Zw.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?hT:gT;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()]=hT(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}=mT(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)}},vT=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},yT=class extends Qw{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Zw.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=>{Lw(n.loaded,[i],a),vT(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)}}},bT=()=>({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}),xT=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),ST=()=>{},CT=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},wT=`__i18next_supportNoticeShown`,TT=()=>!!(typeof globalThis<`u`&&globalThis[wT]||typeof process<`u`&&process.env&&process.env.I18NEXT_NO_SUPPORT_NOTICE||typeof process<`u`&&process.env),ET=()=>{typeof globalThis<`u`&&(globalThis[wT]=!0)},DT=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)),OT=class e extends Qw{constructor(e={},t){if(super(),this.options=xT(e),this.services={},this.logger=Zw,this.modules={external:[]},CT(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=bT();this.options={...n,...this.options,...xT(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&&!DT(this)&&!TT()&&(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 💙`),ET());let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Zw.init(r(this.modules.logger),this.options):Zw.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:_T;let t=new sT(this.options);this.store=new $w(this.options.resources,this.options);let i=this.services;i.logger=Zw,i.resourceStore=this.store,i.languageUtils=t,i.pluralResolver=new uT(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 pT(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new yT(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 oT(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||=ST,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=kw(),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=ST){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=kw();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||=ST,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`&&eT.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=kw();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=rT(a.keyPrefix,o));let s=this.options.keySeparator||`.`,c;return a.keyPrefix&&Array.isArray(e)?c=e.map(e=>(typeof e==`function`&&(e=rT(e,o)),`${a.keyPrefix}${s}${e}`)):(typeof e==`function`&&(e=rT(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=kw();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=kw();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 sT(bT());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=ST){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 $w(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={...bT().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new pT(n)}return a.translator=new oT(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();OT.createInstance,OT.dir,OT.init,OT.loadResources,OT.reloadResources,OT.use,OT.changeLanguage,OT.getFixedT,OT.t,OT.exists,OT.setDefaultNamespace,OT.hasLoadedNamespace,OT.loadNamespaces,OT.loadLanguages,OT.init({fallbackLng:`en`,lng:`en`,showSupportNotice:!1,resources:{en:Dw,es:Ow}});var kT={translator:{...OT,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 OT.t(e,{lng:n,...t})}},languageOptions:[{value:`en_US`,label:`English (US)`},{value:`es_ES`,label:`Spanish`}]},AT=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,jT=e=>N.useState(()=>AT(e))[0],{translator:MT}=kT,NT=I(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:gb(),cursor:`pointer`}),PT=I(`span`)({borderBottom:`1px dotted currentColor`}),FT=I(_x)(({theme:e})=>({paddingTop:e.spacing(2)})),IT=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=AT(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};componentDidMount(){Ew(this.root)}componentDidUpdate(){Ew(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=i?e.visible||MT.t(`common:hide`,{lng:r}):e.hidden||MT.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)(NT,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,P.jsx)(PT,{children:a})})}),(0,P.jsx)(`div`,{id:this.panelId,children:(0,P.jsx)(FT,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}},LT=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`),RT=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`),zT=I(`div`)({display:`flex`,flexDirection:`column`}),BT=I(`div`)({display:`flex`,alignItems:`center`,justifyContent:`center`}),VT=I(`div`)(({theme:e})=>({width:`24px`,height:`24px`,color:`gray`,marginRight:e.spacing(1),display:`flex`,alignItems:`center`})),HT=I(Lh)(({theme:e})=>({display:`flex`,alignItems:`center`,marginLeft:e.spacing(3),marginRight:e.spacing(3)})),UT=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)(zT,{children:[(0,P.jsxs)(BT,{children:[(0,P.jsxs)(HT,{color:`primary`,disabled:n.length===0,onClick:this.onUndo,children:[(0,P.jsx)(VT,{children:(0,P.jsx)(RT,{})}),`Undo`]}),(0,P.jsxs)(HT,{color:`primary`,disabled:n.length===0,onClick:this.onReset,children:[(0,P.jsx)(VT,{children:(0,P.jsx)(LT,{})}),`Start Over`]})]}),(0,P.jsx)(e,{...t,session:r,onSessionChange:this.onSessionChange})]})}}return t},WT=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`}}}}}}),GT=I(`div`)({"& table, th, td":{fontSize:`inherit`}}),KT=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=AT(`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:WT,children:[i?.rules?(0,P.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`.${this.scopeClass} { ${i.rules} }`}}):null,(0,P.jsx)(GT,{className:`${t} extraCSSRules ${this.scopeClass}`,...a,...o&&{style:o},children:e})]})})}},qT=I(KT)({display:`flex`,flexDirection:`column`,position:`relative`}),JT=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)(qT,{...t?{"aria-label":t,role:n}:{},extraCSSRules:r,fontSizeFactor:i,classes:a,children:e})}},YT=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 XT({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 ZT=N.createContext(void 0);function QT(){return N.useContext(ZT)}function $T(e){return Ba(`MuiFormLabel`,e)}var eE=Va(`MuiFormLabel`,[`root`,`colorSecondary`,`focused`,`disabled`,`error`,`filled`,`required`,`asterisk`]),tE=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`]},$T,t)},nE=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:{[`&.${eE.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${eE.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${eE.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),rE=I(`span`,{name:`MuiFormLabel`,slot:`Asterisk`})(Rc(({theme:e})=>({[`&.${eE.error}`]:{color:(e.vars||e).palette.error.main}}))),iE=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=XT({props:n,muiFormControl:QT(),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=tE(m);return(0,P.jsxs)(nE,{as:o,ownerState:m,className:Ra(h.root,i),ref:t,...f,children:[r,p.required&&(0,P.jsxs)(rE,{ownerState:m,"aria-hidden":!0,className:h.asterisk,children:[` `,`*`]})]})});function aE(e){return Ba(`MuiInputLabel`,e)}Va(`MuiInputLabel`,[`root`,`focused`,`disabled`,`error`,`required`,`asterisk`,`formControl`,`sizeSmall`,`shrink`,`animated`,`standard`,`filled`,`outlined`]);var oE=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`]},aE,t);return{...t,...c}},sE=I(iE,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiInputLabel`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${eE.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)`}}]}))),cE=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=QT(),u=a;u===void 0&&l&&(u=l.filled||l.focused||l.adornedStart);let d=XT({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=oE(f);return(0,P.jsx)(sE,{"data-shrink":u,ref:t,className:Ra(p.root,s),...c,ownerState:f,classes:p})});function lE(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function uE(e,t=!1){return e&&(lE(e.value)&&e.value!==``||t&&lE(e.defaultValue)&&e.defaultValue!==``)}function dE(e){return e.startAdornment}function fE(e){return Ba(`MuiFormControl`,e)}Va(`MuiFormControl`,[`root`,`marginNone`,`marginNormal`,`marginDense`,`fullWidth`,`disabled`]);var pE=e=>{let{classes:t,margin:n,fullWidth:r}=e;return ls({root:[`root`,n!==`none`&&`margin${R(n)}`,r&&`fullWidth`]},fE,t)},mE=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%`}}]}),hE=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=pE(_),[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&&dE(n.props)&&(e=!0)}),e}),[x,S]=N.useState(()=>{let e=!1;return r&&N.Children.forEach(r,t=>{Bm(t,[`Input`,`Select`])&&(uE(t.props,!0)||uE(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)(ZT.Provider,{value:O,children:(0,P.jsx)(mE,{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)})),gE=I(cE)(()=>({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)`}})),_E=({label:e,className:t,children:n})=>(0,P.jsxs)(hE,{className:t,children:[(0,P.jsx)(gE,{shrink:!0,children:e}),n]});_E.propTypes={label:O.oneOfType([O.string,O.object]).isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};var{translator:vE}=kT,yE=`pie-prompt-audio-player`,bE=`play-audio-button`,xE=e=>`&:not(.MathJax) > table${e}, &:not(.MathJax) > .pie-table-scroll > table${e}`,SE=I(`div`)(({theme:e,tagName:t})=>({[`& .${bE}:focus-visible`]:{outline:`2px solid ${Nb()}`,outlineOffset:`2px`},[xE(`: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()},[xE(`:not([role="presentation"]):has(tbody tr > th:first-child):not(:has(tbody tr > td:first-child)) tbody td:nth-child(even)`)]:{backgroundColor:wb()},[xE(`: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`},[xE(` 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`}}})),CE=/\\embed\{newLine\}\[\]/g,wE=`\\newline `,TE=`preview-prompt`,EE=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=AT(yE);playButtonId=AT(bE);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(yE),a.appendChild(e),n){a.style.display=`none`;let e=document.createElement(`button`);e.setAttribute(`type`,`button`),e.setAttribute(`aria-label`,vE.t(`common:playAudio`,{lng:r})),e.id=this.playButtonId,e.className=bE,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(`.${bE}`),i=n?.querySelector(`.${yE}`);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 Ew==`function`&&Ew(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`:``} ${TE}`.trim();return(0,P.jsx)(SE,{as:t||`div`,ref:this.promptRef,onClick:r,className:a,tagName:t,dangerouslySetInnerHTML:{__html:this.parsedText(e||``).replace(CE,wE)}})}},DE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-readable":e.false===void 0}))});DE.propTypes={children:O.node,false:O.bool};var OE=e=>(0,P.jsx)(P.Fragment,{children:N.Children.map(e.children,t=>N.cloneElement(t,{"data-pie-purpose":e.purpose}))});OE.propTypes={children:O.node,purpose:O.string};var kE;typeof window<`u`&&(kE=new DOMParser);var AE=e=>kE.parseFromString(e,`text/html`).body.textContent,jE=e=>{if(!e)return!1;let t=AE(e);return!!(t&&t.trim())},ME;typeof window<`u`&&(ME=new DOMParser);var NE=e=>{if(!e)return!1;let t=ME.parseFromString(e,`text/html`);return!!t.body.querySelector(`img`)||!!t.body.querySelector(`video`)||!!t.body.querySelector(`audio`)},PE=`data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYEBAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQCwkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAJYAyADAREAAhEBAxEB/8QAHgABAQABBQEBAQAAAAAAAAAAAAEIAgMGBwkEBQr/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAA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oAABLa3AoAAAAAAAAAAAAAAACJ8dLW+kCgAJbW9/mAoAAAAARtKyb48AKAAAAAAAAAAAAEStzuBQAACX1tb5wKAAAAAAAAAAAAAAAAiSSSSslwQFAmt+OgFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+HECgAAAAAAAAAEavzsBQAAABG7crgUAAAAAAAAAAAAAACJJXaXHiBQAE1vx0AoAAAAAf/Z`;function FE(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 IE=N.createContext({});function LE(e){return Ba(`MuiList`,e)}Va(`MuiList`,[`root`,`padding`,`dense`,`subheader`]);var RE=e=>{let{classes:t,disablePadding:n,dense:r,subheader:i}=e;return ls({root:[`root`,!n&&`padding`,r&&`dense`,i&&`subheader`]},LE,t)},zE=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}}]}),BE=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=RE(d);return(0,P.jsx)(IE.Provider,{value:u,children:(0,P.jsxs)(zE,{as:a,className:Ra(f.root,i),ref:t,ownerState:d,...l,children:[c,r]})})}),VE=vg;function HE(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function UE(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function WE(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 GE(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`)||!WE(s,a)||t)s=i(e,s,n);else return s.focus(),!0}return!1}var KE=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=`${VE(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(),GE(t,r,c,s,HE);else if(n===`ArrowUp`)e.preventDefault(),GE(t,r,c,s,UE);else if(n===`Home`)e.preventDefault(),GE(t,null,c,s,HE);else if(n===`End`)e.preventDefault(),GE(t,null,c,s,UE);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&&WE(r,i);i.previousKeyMatched&&(c||GE(t,r,!1,s,HE,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)(BE,{role:`menu`,ref:h,className:o,onKeyDown:m,tabIndex:r?0:-1,...d,children:_})});function qE(e){return Ba(`MuiMenu`,e)}Va(`MuiMenu`,[`root`,`paper`,`list`]);var JE={vertical:`top`,horizontal:`right`},YE={vertical:`top`,horizontal:`left`},XE=e=>{let{classes:t}=e;return ls({root:[`root`],paper:[`paper`],list:[`list`]},qE,t)},ZE=I(g_,{shouldForwardProp:e=>Cc(e)||e===`classes`,name:`MuiMenu`,slot:`Root`})({}),QE=I(h_,{name:`MuiMenu`,slot:`Paper`})({maxHeight:`calc(100% - 96px)`,WebkitOverflowScrolling:`touch`}),$E=I(KE,{name:`MuiMenu`,slot:`List`})({outline:0}),eD=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=XE(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:QE,externalForwardedProps:D,shouldForwardComponentProp:!0,ownerState:b}),[k,A]=Gd(`list`,{className:Ra(x.list,s.className),elementType:$E,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)(ZE,{onClose:c,anchorOrigin:{vertical:`bottom`,horizontal:y?`right`:`left`},transformOrigin:y?JE:YE,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})})}),tD=({slotProps:e,...t})=>(0,P.jsx)(eD,{...t,disableScrollLock:!0,slotProps:{...e,root:{...e?.root,style:{backgroundColor:`transparent`,...e?.root?.style}},backdrop:{invisible:!0,...e?.backdrop}}});function nD(e,t){let[n,r]=(0,N.useState)(),i=(0,N.useRef)({node:null,observer:null}),a=(0,N.useRef)(t);return a.current=t,(0,N.useLayoutEffect)(()=>{let t=i.current,n=e.current;if(n===t.node)return;if(t.observer?.disconnect(),t.observer=null,t.node=n,!n){r(void 0);return}let o=()=>r(n.querySelector(`math`)?pw(n,{speak:a.current}):void 0);o(),!(typeof MutationObserver>`u`)&&(t.observer=new MutationObserver(o),t.observer.observe(n,{childList:!0,subtree:!0,characterData:!0}))}),(0,N.useLayoutEffect)(()=>()=>{i.current.observer?.disconnect(),i.current={node:null,observer:null}},[]),n}function rD({speak:e,children:t}){let n=(0,N.useRef)(null);return(0,P.jsx)(P.Fragment,{children:t(nD(n,e),n)})}var iD=s({Collapsible:()=>IT,EnableAudioAutoplayImage:()=>PE,Feedback:()=>tx,HtmlAndMath:()=>YT,InlineMenu:()=>tD,InputContainer:()=>_E,MathName:()=>rD,PreviewLayout:()=>JT,PreviewPrompt:()=>EE,Purpose:()=>OE,Readable:()=>DE,UiLayout:()=>KT,color:()=>Vy,createUniqueId:()=>AT,hasMedia:()=>NE,hasText:()=>jE,indicators:()=>nx,transformDataHeadings:()=>FE,useMathName:()=>nD,useUniqueId:()=>jT,withUndoReset:()=>UT}),{translator:aD}=kT;function oD(e,t){if(!e)return;let n=aD.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===uD?this.elements[0]?this.elements[0].getAttribute(e):uD:(this.elements.forEach(function(n){n.setAttribute(e,t)}),this)},U.prototype.html=function(e){return e===uD?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 sD(e){return(e||``).split(`.`)[0]}U.prototype.on=function(e,t){var n=sD(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=sD(e);r.elements.forEach(function(e){e.addEventListener(t,a)})}),this},U.prototype.off=function(e,t){var n=sD(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=sD(e);this.elements.forEach(function(e){e.removeEventListener(n,t)})}return this},U.prototype.trigger=function(e){var t=new Event(sD(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===uD){if(typeof e==`string`){var n=this.elements[0];return n?window.getComputedStyle(n).getPropertyValue(e.replace(/([A-Z])/g,`-$1`).toLowerCase()):uD}}else this.elements.forEach(function(n){n.style[e]=t});return this},U.prototype.scrollTop=function(e){var t=this.elements[0];return e===uD?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===uD?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===uD?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===uD?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===uD?t.value===uD?t.textContent:t.value:(this.elements.forEach(function(t){t.value===uD?t.textContent=e:t.value=e}),this):uD};function cD(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===uD?[]:Array.from(e);return cD(n)};W.contains=function(e,t){return e!==t&&e.contains(t)};var lD=W,uD,dD=`mathquill-command-id`,fD=`mathquill-block-id`,pD=Math.min,mD=Math.max;function hD(){}var gD=[].slice;function _D(e){var t=e.length-1;return function(){var n=gD.call(arguments,0,t),r=gD.call(arguments,t);return e.apply(this,n.concat([r]))}}var vD=_D(function(e,t){return _D(function(n,r){if(e in n)return n[e].apply(n,t.concat(r))})});function yD(e){return _D(function(t,n){return typeof t!=`function`&&(t=vD(t)),e.call(this,function(e){return t.apply(e,[e].concat(n))})})}function G(e){var t=gD.call(arguments,1);return function(){return e.apply(this,t)}}function bD(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 xD(e){bD(`a direction was passed`,e===q||e===J)}var SD=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 SD(e.parent,e[q],e[J])}}),CD=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(),CD.byId[this.id]=this,this.ends={},this.ends[q]=0,this.ends[J]=0},e.dispose=function(){delete CD.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&&CD.byId[n].jQadd(e),r&&CD.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){xD(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 kD(e,t)},e.bubble=yD(function(e){for(var t=this;t&&e(t)!==!1;t=t.parent);return this}),e.postOrder=yD(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 TD(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 TD(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return TD(this,this).adopt(e,t,n),this},e.disown=function(){return TD(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder(`dispose`),this.disown()}});function wD(e,t,n){bD(`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)),bD(`leftward is properly set up`,(function(){return t?t[J]===n&&t.parent===e:e.ends[q]===n})()),bD(`rightward is properly set up`,(function(){return n?n[q]===t&&n.parent===e:e.ends[J]===t})())}var TD=K(function(e){e.init=function(e,t,n){if(n===uD&&(n=q),xD(n),bD(`no half-empty fragments`,!e==!t),this.ends={},e){bD(`withDir is passed to Fragment`,e instanceof CD),bD(`oppDir is passed to Fragment`,t instanceof CD),bD(`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){wD(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 wD(r,t[q],t),wD(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=yD(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={},ED={},DD={},OD=K(SD,function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=W(`<span class="mq-cursor">​</span>`);this.blink=function(){n.toggleClass(`mq-blink`)},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass(`mq-blink`),`intervalId`in this?clearInterval(this.intervalId):(this[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 xD(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 xD(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]=SD.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=SD.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 SD&&(i=i[J]),a instanceof SD&&(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 JD);return t},e.isTooDeep=function(e){if(this.options.maxDepth!==uD)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}}),kD=K(TD,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]()})}}),AD=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=OD(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}}),jD={},MD=K(),ND={},PD=K(),FD={};function ID(){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 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={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},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/xABiEAACAQIDBAMKCAYMCgYLAQAAAQIDEQQFIQYSMUEHCFETFRYiUmFxkdHhCRRjgaGisfAXMjRTcsEjJDY4QmJ1dpKztMQYMzdEVIKyw9PxQ1hmc3SWJzVFRlZXhJOUldJk/8QAGwEBAQADAQEBAAAAAAAAAAAAAAcEBQYCAQP/xABBEQEAAQIDAgkJBgUFAQEBAAAAAQIDBAYRBSESMUFEYXGCscITNDVRcoGRocEUIjJS0eEVI2KSsjNCU6LwFtLx/9oADAMBAAI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gFAAAAACJ3AoAAAAAAAAAAAARq9vMBQAACa34aAUAAAAAAETTuk+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">​</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:
|
|
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
|
|
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:
|
|
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`)},ID(),LD},LD.getInterface=BD;var RD=BD.MIN=1,zD=BD.MAX=3;function BD(e){if(!(RD<=e&&e<=zD))throw`Only interface versions between `+RD+` and `+zD+` 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(fD),r=t&&CD.byId[t].controller;return r?n[r.KIND_OF_MQ](r):null}var n={};t.L=q,t.R=J,t.saneKeyboardEvents=UD;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=ND[r];e[r]=a?a(i):i}}t.config=function(e){return r(MD.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`;FD[e]=t};var i=n.AbstractMathQuill=K(PD,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(fD,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:hD});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),UO().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 lD.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,jD)(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=AD(a.RootBlock(),W(n),MD());return s.KIND_OF_MQ=r,a(s).__mathquillify(i,e)},t[r].prototype=a.prototype})(a,jD[a]);return t}LD.noConflict=function(){return window.MathQuill=VD,LD};var VD=window.MathQuill;window.MathQuill=LD;function HD(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){bD(`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 bD(`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){bD(`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)})}),UD=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=lD(e),o=lD(n.container||a),s=hD,c;function l(e){s=e,clearTimeout(c),c=setTimeout(e)}function u(e){l(function(t){s=hD,clearTimeout(c),e(t)})}o.bind(`keydown keypress input keyup focusout paste`,function(e){s(e)});function d(e){s(),s=hD,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}}}();AD.open(function(e,t){e.exportText=function(){return this.root.foldChildren(``,function(e,t){return e+t.text()})}}),AD.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()}}),AD.open(function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}}),CD.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(){bD(`overridden or never called on this node`)}}),AD.open(function(e){this.onNotify(function(e){(e===`move`||e===`upDown`)&&this.show().clearSelection()}),e.escapeDir=function(e,t,n){xD(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`)},ND.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){xD(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 CD&&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){xD(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){xD(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify(`edit`),e===q?TD(t.parent.ends[q],t[q]).remove():TD(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;xD(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 WD=/[\\]{2,}/gm,GD=(function(){function e(e){var t=JD();return e.adopt(t,0,0),t}function t(e){for(var t=e[0]||JD(),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 rO(e)}),u=r(/^[^${}\\_^]/).map(function(e){return Q(e)}),d=r(/^\\not\\[a-z]+/).then(function(e){return DD[e]&&DD[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})();AD.open(function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,`$1`)},e.parseLatex=function(e){return GD.parse(e).postOrder(`finalizeTree`,MD.p).join(`latex`).trim()},ND.maxDepth=function(e){return typeof e==`number`?e:uD},e.writeLatex=function(e){var t=this.notify(`edit`).cursor,n=X.all,r=X.eof,i=GD.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(WD,`\\`));var t=this.root,n=this.cursor;n.options;var r=t.jQ,i=X.all,a=X.eof,o=GD.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(GD).skip(i(`$`).or(a)).map(function(e){var t=$D(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)}}}),AD.open(function(e){MD.p.ignoreNextMousedown=hD,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=CD.byId[n.attr(fD)||e.attr(fD)].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=hD;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)})}}),AD.open(function(e){e.seek=function(e,t,n){var r=this.notify(`select`).cursor;if(e){var i=e.attr(fD)||e.attr(dD);if(!i){var a=e.parent();i=a.attr(fD)||a.attr(dD)}}var o=i&&CD.byId[i]?CD.byId[i]:this.root;return r.clearSelection().show(),o.seek(t,r),this.scrollHoriz(),this}}),AD.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)}}),AD.open(function(e){MD.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;_O(e.container[0]),e.textareaSelectionTimeout===uD&&(e.textareaSelectionTimeout=setTimeout(function(){e.setTextareaSelection()}))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=uD;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(lD(`<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()}},MD.p.substituteKeyboardEvents=UD,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 KD=K(CD,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!==uD){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 JD);t=r[1]+a,t<=e?n.push([i,t]):(a?i.children():i).remove()})}}),Z=K(KD,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=GD.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]=JD()).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 kD(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);bD(`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)===`<`){bD(`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],bD(`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]||``)})}}),qD=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=hD,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=hD,e.isEmpty=function(){return!0}}),Q=K(qD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span>`+(n||e)+`</span>`)}}),$=K(qD,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<span class="mq-binary-operator">`+n+`</span>`,r)}}),JD=K(KD,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]$/)?rO(e):/^\d$/.test(e)?tO(e):t&&t.typingSlashWritesDivisionSymbol&&e===`/`?Y[`÷`](e):t&&t.typingAsteriskWritesTimesSymbol&&e===`*`?Y[`×`](e):(n=ED[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}});MD.p.mouseEvents=!0,jD.StaticMath=function(e){return K(e.AbstractMathQuill,function(t,n){this.RootBlock=JD,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 YD=K(JD,HD);jD.MathField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=YD,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=hD),t.__mathquillify.call(this,`mq-editable-field mq-math-mode`),delete this.__controller.root.reflow,this}})};var XD=K(CD,function(e,t){e.ctrlSeq=`\\text`,e.replaces=function(e){e instanceof TD?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?TD():(ZD(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`)):ZD(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=XD(),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=SD.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=SD(this,u[q],u)}}},e.blur=function(e){JD.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:``},bD(`only node in TextBlock span is Text node`,t.nodeType===3);var n=ZD(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}e.focus=JD.prototype.focus}),ZD=K(CD,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){xD(t),t===J?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=ZD(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){xD(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):ZD(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){xD(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=ZD(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=ZD(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=XD;function QD(e,t,n){return K(XD,{ctrlSeq:e,htmlTemplate:`<`+t+` `+n+`>&0</`+t+`>`})}Y.em=Y.italic=Y.italics=Y.emph=Y.textit=Y.textsl=QD(`\\textit`,`i`,`class="mq-text-mode"`),Y.strong=Y.bold=Y.textbf=QD(`\\textbf`,`b`,`class="mq-text-mode"`),Y.sf=Y.textsf=QD(`\\textsf`,`span`,`class="mq-sans-serif mq-text-mode"`),Y.tt=Y.texttt=QD(`\\texttt`,`span`,`class="mq-monospace mq-text-mode"`),Y.textsc=QD(`\\textsc`,`span`,`style="font-variant:small-caps" class="mq-text-mode"`),Y.uppercase=QD(`\\uppercase`,`span`,`style="text-transform:uppercase" class="mq-text-mode"`),Y.lowercase=QD(`\\lowercase`,`span`,`style="text-transform:lowercase" class="mq-text-mode"`);var $D=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]?JD.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent):JD.prototype.write.call(this,e,t)}},e.latex=function(){return`$`+this.ends[q].latex()+`$`}}),eO=K(YD,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===`$`)$D(e).createLeftOf(e);else{var n;t===`<`?n=`<`:t===`>`&&(n=`>`),Q(t,n).createLeftOf(e)}}});jD.TextField=function(e){return K(e.EditableField,function(e,t){this.RootBlock=eO,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()}})},ED[`\\`]=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=XD(),n.replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}}),Y[`∉`]=Y.notin=G($,`\\notin `,`∉`),Y[`≅`]=Y.cong=G($,`\\cong `,`≅`),Y[`≡`]=Y.equiv=G($,`\\equiv `,`≡`),Y[`⊕`]=Y.oplus=G($,`\\oplus `,`⊕`),Y[`⊗`]=Y.otimes=G($,`\\otimes `,`⊗`),Y[`≠`]=Y.ne=Y.neq=G($,`\\ne `,`≠`),Y[`≇`]=Y.ncong=G($,`\\ncong `,`≇`),Y[`∗`]=Y.ast=Y.star=Y.loast=Y.lowast=G($,`\\ast `,`∗`),Y.therefor=Y.therefore=G($,`\\therefore `,`∴`),Y.cuz=Y.because=G($,`\\because `,`∵`),Y.prop=Y.propto=G($,`\\propto `,`∝`),Y[`≈`]=Y.asymp=Y.approx=G($,`\\approx `,`≈`),Y[`≉`]=Y.nasymp=Y.napprox=G($,`\\napprox `,`≉`),Y.isin=Y.in=G($,`\\in `,`∈`),Y.ni=Y.contains=G($,`\\ni `,`∋`),Y.notni=Y.niton=Y.notcontains=Y.doesnotcontain=DD[`\\not\\ni`]=G($,`\\not\\ni `,`∌`),Y.sub=Y.subset=G($,`\\subset `,`⊂`),Y.sup=Y.supset=Y.superset=G($,`\\supset `,`⊃`),Y.nsub=Y.notsub=Y.nsubset=Y.notsubset=DD[`\\not\\subset`]=G($,`\\not\\subset `,`⊄`),Y.nsup=Y.notsup=Y.nsupset=Y.notsupset=Y.nsuperset=Y.notsuperset=DD[`\\not\\supset`]=G($,`\\not\\supset `,`⊅`),Y.sube=Y.subeq=Y.subsete=Y.subseteq=G($,`\\subseteq `,`⊆`),Y.supe=Y.supeq=Y.supsete=Y.supseteq=Y.supersete=Y.superseteq=G($,`\\supseteq `,`⊇`),Y.nsube=Y.nsubeq=Y.notsube=Y.notsubeq=Y.nsubsete=Y.nsubseteq=Y.notsubsete=Y.notsubseteq=DD[`\\not\\subseteq`]=G($,`\\not\\subseteq `,`⊈`),Y.nsupe=Y.nsupeq=Y.notsupe=Y.notsupeq=Y.nsupsete=Y.nsupseteq=Y.notsupsete=Y.notsupseteq=Y.nsupersete=Y.nsuperseteq=Y.notsupersete=Y.notsuperseteq=DD[`\\not\\supseteq`]=G($,`\\not\\supseteq `,`⊉`),Y.N=Y.naturals=Y.Naturals=G(Q,`\\mathbb{N}`,`ℕ`),Y.P=Y.primes=Y.Primes=Y.projective=Y.Projective=Y.probability=Y.Probability=G(Q,`\\mathbb{P}`,`ℙ`),Y.Z=Y.integers=Y.Integers=G(Q,`\\mathbb{Z}`,`ℤ`),Y.Q=Y.rationals=Y.Rationals=G(Q,`\\mathbb{Q}`,`ℚ`),Y.R=Y.reals=Y.Reals=G(Q,`\\mathbb{R}`,`ℝ`),Y.C=Y.complex=Y.Complex=Y.complexes=Y.Complexes=Y.complexplane=Y.Complexplane=Y.ComplexPlane=G(Q,`\\mathbb{C}`,`ℂ`),Y.H=Y.Hamiltonian=Y.quaternions=Y.Quaternions=G(Q,`\\mathbb{H}`,`ℍ`),Y.quad=Y.emsp=G(Q,`\\quad `,` `),Y.qquad=G(Q,`\\qquad `,` `),Y.diamond=G(Q,`\\diamond `,`◇`),Y.bigtriangleup=G(Q,`\\bigtriangleup `,`△`),Y.ominus=G(Q,`\\ominus `,`⊖`),Y.uplus=G(Q,`\\uplus `,`⊎`),Y.bigtriangledown=G(Q,`\\bigtriangledown `,`▽`),Y.sqcap=G(Q,`\\sqcap `,`⊓`),Y.triangleleft=G(Q,`\\triangleleft `,`⊲`),Y.sqcup=G(Q,`\\sqcup `,`⊔`),Y.triangleright=G(Q,`\\triangleright `,`⊳`),Y.odot=Y.circledot=G(Q,`\\odot `,`⊙`),Y.bigcirc=G(Q,`\\bigcirc `,`◯`),Y.dagger=G(Q,`\\dagger `,`†`),Y.ddagger=G(Q,`\\ddagger `,`‡`),Y.wr=G(Q,`\\wr `,`≀`),Y.amalg=G(Q,`\\amalg `,`∐`),Y.models=G(Q,`\\models `,`⊨`),Y.prec=G(Q,`\\prec `,`≺`),Y.succ=G(Q,`\\succ `,`≻`),Y.preceq=G(Q,`\\preceq `,`≼`),Y.succeq=G(Q,`\\succeq `,`≽`),Y.simeq=G(Q,`\\simeq `,`≃`),Y.mid=G(Q,`\\mid `,`∣`),Y.ll=G(Q,`\\ll `,`≪`),Y.gg=G(Q,`\\gg `,`≫`),Y.parallel=G(Q,`\\parallel `,`∥`),Y.nparallel=G(Q,`\\nparallel `,`∦`),Y.bowtie=G(Q,`\\bowtie `,`⋈`),Y.sqsubset=G(Q,`\\sqsubset `,`⊏`),Y.sqsupset=G(Q,`\\sqsupset `,`⊐`),Y.smile=G(Q,`\\smile `,`⌣`),Y.sqsubseteq=G(Q,`\\sqsubseteq `,`⊑`),Y.sqsupseteq=G(Q,`\\sqsupseteq `,`⊒`),Y.doteq=G(Q,`\\doteq `,`≐`),Y.frown=G(Q,`\\frown `,`⌢`),Y.vdash=G(Q,`\\vdash `,`⊦`),Y.dashv=G(Q,`\\dashv `,`⊣`),Y.nless=G(Q,`\\nless `,`≮`),Y.ngtr=G(Q,`\\ngtr `,`≯`),Y.longleftarrow=G(Q,`\\longleftarrow `,`←`),Y.longrightarrow=G(Q,`\\longrightarrow `,`→`),Y.Longleftarrow=G(Q,`\\Longleftarrow `,`⇐`),Y.Longrightarrow=G(Q,`\\Longrightarrow `,`⇒`),Y.longleftrightarrow=G(Q,`\\longleftrightarrow `,`↔`),Y.updownarrow=G(Q,`\\updownarrow `,`↕`),Y.Longleftrightarrow=G(Q,`\\Longleftrightarrow `,`⇔`),Y.Updownarrow=G(Q,`\\Updownarrow `,`⇕`),Y.mapsto=G(Q,`\\mapsto `,`↦`),Y.nearrow=G(Q,`\\nearrow `,`↗`),Y.hookleftarrow=G(Q,`\\hookleftarrow `,`↩`),Y.hookrightarrow=G(Q,`\\hookrightarrow `,`↪`),Y.searrow=G(Q,`\\searrow `,`↘`),Y.leftharpoonup=G(Q,`\\leftharpoonup `,`↼`),Y.rightharpoonup=G(Q,`\\rightharpoonup `,`⇀`),Y.swarrow=G(Q,`\\swarrow `,`↙`),Y.leftharpoondown=G(Q,`\\leftharpoondown `,`↽`),Y.rightharpoondown=G(Q,`\\rightharpoondown `,`⇁`),Y.nwarrow=G(Q,`\\nwarrow `,`↖`),Y.ldots=G(Q,`\\ldots `,`…`),Y.cdots=G(Q,`\\cdots `,`⋯`),Y.vdots=G(Q,`\\vdots `,`⋮`),Y.ddots=G(Q,`\\ddots `,`⋱`),Y.surd=G(Q,`\\surd `,`√`),Y.triangle=G(Q,`\\triangle `,`△`),Y.ell=G(Q,`\\ell `,`ℓ`),Y.top=G(Q,`\\top `,`⊤`),Y.flat=G(Q,`\\flat `,`♭`),Y.natural=G(Q,`\\natural `,`♮`),Y.sharp=G(Q,`\\sharp `,`♯`),Y.wp=G(Q,`\\wp `,`℘`),Y.bot=G(Q,`\\bot `,`⊥`),Y.clubsuit=G(Q,`\\clubsuit `,`♣`),Y.diamondsuit=G(Q,`\\diamondsuit `,`♢`),Y.heartsuit=G(Q,`\\heartsuit `,`♡`),Y.spadesuit=G(Q,`\\spadesuit `,`♠`),Y.circledot=G(Q,`\\circledot `,`⊙`),Y.middot=G(Q,`\\middot `,`·`),Y.dottedsquare=G(Q,`\\dottedsquare `,`⬚`),Y.square=G(Q,`\\square `,`⬜`),Y.rectangle=G(Q,`\\rectangle `,`▯`),Y.oint=G(Q,`\\oint `,`∮`),Y.bigcap=G(Q,`\\bigcap `,`∩`),Y.bigcup=G(Q,`\\bigcup `,`∪`),Y.bigsqcup=G(Q,`\\bigsqcup `,`⊔`),Y.bigvee=G(Q,`\\bigvee `,`∨`),Y.bigwedge=G(Q,`\\bigwedge `,`∧`),Y.bigodot=G(Q,`\\bigodot `,`⊙`),Y.bigotimes=G(Q,`\\bigotimes `,`⊗`),Y.bigoplus=G(Q,`\\bigoplus `,`⊕`),Y.biguplus=G(Q,`\\biguplus `,`⊎`),Y.lfloor=G(Q,`\\lfloor `,`⌊`),Y.rfloor=G(Q,`\\rfloor `,`⌋`),Y.lceil=G(Q,`\\lceil `,`⌈`),Y.rceil=G(Q,`\\rceil `,`⌉`),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 `,`⊥`),Y.nabla=Y.del=G(Q,`\\nabla `,`∇`),Y.hbar=G(Q,`\\hbar `,`ℏ`),Y.AA=Y.Angstrom=Y.angstrom=G(Q,`\\text\\AA `,`Å`),Y.ring=Y.circ=Y.circle=G(Q,`\\circ `,`∘`),Y.bull=Y.bullet=G(Q,`\\bullet `,`•`),Y.setminus=Y.smallsetminus=G(Q,`\\setminus `,`∖`),Y.not=Y[`¬`]=Y.neg=G(Q,`\\neg `,`¬`),Y[`…`]=Y.dots=Y.ellip=Y.hellip=Y.ellipsis=Y.hellipsis=G(Q,`\\dots `,`…`),Y.converges=Y.darr=Y.dnarr=Y.dnarrow=Y.downarrow=G(Q,`\\downarrow `,`↓`),Y.dArr=Y.dnArr=Y.dnArrow=Y.Downarrow=G(Q,`\\Downarrow `,`⇓`),Y.diverges=Y.uarr=Y.uparrow=G(Q,`\\uparrow `,`↑`),Y.uArr=Y.Uparrow=G(Q,`\\Uparrow `,`⇑`),Y.to=G($,`\\to `,`→`),Y.rarr=Y.rightarrow=G(Q,`\\rightarrow `,`→`),Y.implies=G($,`\\Rightarrow `,`⇒`),Y.rArr=Y.Rightarrow=G(Q,`\\Rightarrow `,`⇒`),Y.gets=G($,`\\gets `,`←`),Y.larr=Y.leftarrow=G(Q,`\\leftarrow `,`←`),Y.impliedby=G($,`\\Leftarrow `,`⇐`),Y.lArr=Y.Leftarrow=G(Q,`\\Leftarrow `,`⇐`),Y.harr=Y.lrarr=Y.leftrightarrow=G(Q,`\\leftrightarrow `,`↔`),Y.iff=G($,`\\Leftrightarrow `,`⇔`),Y.hArr=Y.lrArr=Y.Leftrightarrow=G(Q,`\\Leftrightarrow `,`⇔`),Y.Re=Y.Real=Y.real=G(Q,`\\Re `,`ℜ`),Y.Im=Y.imag=Y.image=Y.imagin=Y.imaginary=Y.Imaginary=G(Q,`\\Im `,`ℑ`),Y.part=Y.partial=G(Q,`\\partial `,`∂`),Y.infty=Y.infin=Y.infinity=G(Q,`\\infty `,`∞`),Y.pounds=G(Q,`\\pounds `,`£`),Y.alef=Y.alefsym=Y.aleph=Y.alephsym=G(Q,`\\aleph `,`ℵ`),Y.xist=Y.xists=Y.exist=Y.exists=G(Q,`\\exists `,`∃`),Y.nexists=Y.nexist=G(Q,`\\nexists `,`∄`),Y.and=Y.land=Y.wedge=G($,`\\wedge `,`∧`),Y.or=Y.lor=Y.vee=G($,`\\vee `,`∨`),Y.o=Y.O=Y.empty=Y.emptyset=Y.oslash=Y.Oslash=Y.nothing=Y.varnothing=G($,`\\varnothing `,`∅`),Y.cup=Y.union=G($,`\\cup `,`∪`),Y.cap=Y.intersect=Y.intersection=G($,`\\cap `,`∩`),Y.deg=Y.degree=G(Q,`\\degree `,`°`),Y.ang=Y.angle=G(Q,`\\angle `,`∠`),Y.measuredangle=G(Q,`\\measuredangle `,`m∠`);var tO=K(Q,function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[q]instanceof nO&&e[q].isItalic!==!1||e[q]instanceof jO&&e[q][q]instanceof nO&&e[q][q].isItalic!==!1)?(Y._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}}),nO=K(qD,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 nO)&&!(this[q]instanceof $)&&this[q].ctrlSeq!==`\\ `&&(e=`*`+e),this[J]&&!(this[J]instanceof $)&&!(this[J]instanceof jO)&&(e+=`*`)),e}});MD.p.autoCommands={_maxLength:0},ND.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]===sO)throw`"`+a+`" is a built-in operator name`;n[a]=1,r=mD(r,a.length)}return n._maxLength=r,n};var rO=K(nO,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 rO&&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 TD(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 rO||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 rO;i=i[q])r=i.letter+r;for(var a=this[J];a instanceof rO;a=a[J])r+=a.letter;TD(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=pD(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=iO.hasOwnProperty(l);if(s.ctrlSeq=(p?`\\`:`\\operatorname{`)+s.ctrlSeq,f.ctrlSeq+=p?` `:`}`,oO.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 jO){var m=f[J];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass(`mq-after-operator-name`,!(m[J]instanceof BO))})()}else f.jQ.toggleClass(`mq-last`,!(f[J]instanceof BO));o+=c-1,s=f;continue outer}}}};function n(e){return!e||e instanceof $||e instanceof PO}}),iO={},aO=MD.p.autoOperatorNames={_maxLength:9},oO={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)iO[e[t]]=aO[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)iO[n[t]]=1;for(var r=`sin cos tan sec cosec csc cotan cot ctg`.split(` `),t=0;t<r.length;t+=1)aO[r[t]]=aO[`arc`+r[t]]=aO[r[t]+`h`]=aO[`ar`+r[t]+`h`]=aO[`arc`+r[t]+`h`]=1;for(var i=`gcf hcf lcm proj span`.split(` `),t=0;t<i.length;t+=1)aO[i[t]]=1})(),ND.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=mD(r,a.length)}return n._maxLength=r,n};var sO=K(qD,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)rO(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=JD(),n=0;n<e.length;n+=1)rO(e.charAt(n)).adopt(t,t.ends[J],0);return X.succeed(t.children())}});for(var cO in aO)aO.hasOwnProperty(cO)&&(Y[cO]=sO);Y.operatorname=K(Z,function(e){e.createLeftOf=hD,e.numBlocks=function(){return 1},e.parser=function(){return GD.block.map(function(e){return e.children()})}}),Y.f=K(rO,function(e,t){e.init=function(){qD.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,`\\ `,` `),Y[`'`]=Y.prime=G(Q,`'`,`′`),Y[`″`]=Y.dprime=G(Q,`″`,`″`),Y[`"`]=Y.doublePrime=G(Q,`"`,`″`),Y.backslash=G(Q,`\\backslash `,`\\`),ED[`\\`]||=Y.backslash,Y.$=G(Q,`\\$`,`$`);var lO=K(qD,function(e,t){e.init=function(e,n){t.init.call(this,e,`<span class="mq-nonSymbola">`+(n||e)+`</span>`)}});Y[`@`]=lO,Y[`&`]=G(lO,`\\&`,`&`),Y[`%`]=G(lO,`\\%`,`%`),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(nO,function(e,t){e.init=function(e){t.init.call(this,`\\`+e+` `,`&`+e+`;`)}}),Y.phi=G(nO,`\\phi `,`ϕ`),Y.phiv=Y.varphi=G(nO,`\\varphi `,`φ`),Y.epsilon=G(nO,`\\epsilon `,`ϵ`),Y.epsiv=Y.varepsilon=G(nO,`\\varepsilon `,`ε`),Y.piv=Y.varpi=G(nO,`\\varpi `,`ϖ`),Y.sigmaf=Y.sigmav=Y.varsigma=G(nO,`\\varsigma `,`ς`),Y.thetav=Y.vartheta=Y.thetasym=G(nO,`\\vartheta `,`ϑ`),Y.upsilon=Y.upsi=G(nO,`\\upsilon `,`υ`),Y.gammad=Y.Gammad=Y.digamma=G(nO,`\\digamma `,`ϝ`),Y.kappav=Y.varkappa=G(nO,`\\varkappa `,`ϰ`),Y.rhov=Y.varrho=G(nO,`\\varrho `,`ϱ`),Y.pi=Y.π=G(lO,`\\pi `,`π`),Y.lambda=G(lO,`\\lambda `,`λ`),Y.Upsilon=Y.Upsi=Y.upsih=Y.Upsih=G(qD,`\\Upsilon `,`<var style="font-family: serif">ϒ</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 `,`∀`);var uO=K(Z,function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=GD.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=GD.parse(this.latex).children();return X.succeed(e)}});Y[`¹`]=G(uO,`^1`),Y[`²`]=G(uO,`^2`),Y[`³`]=G(uO,`^3`),Y[`¼`]=G(uO,`\\frac14`),Y[`½`]=G(uO,`\\frac12`),Y[`¾`]=G(uO,`\\frac34`);var dO=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(dO,`+`,`+`),Y[`–`]=Y[`-`]=G(dO,`-`,`−`),Y[`±`]=Y.pm=Y.plusmn=Y.plusminus=G(dO,`\\pm `,`±`),Y.mp=Y.mnplus=Y.minusplus=G(dO,`\\mp `,`∓`),ED[`*`]=Y.sdot=Y.cdot=G($,`\\cdot `,`·`,`*`);var fO=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)}}),pO={ctrlSeq:`\\le `,html:`≤`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`<`,textStrict:`<`},mO={ctrlSeq:`\\ge `,html:`≥`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`>`,textStrict:`>`};Y[`<`]=Y.lt=G(fO,pO,!0),Y[`>`]=Y.gt=G(fO,mO,!0),Y[`≤`]=Y.le=Y.leq=G(fO,pO,!1),Y[`≥`]=Y.ge=Y.geq=G(fO,mO,!1);var hO=K($,function(e,t){e.init=function(){t.init.call(this,`=`,`=`)},e.createLeftOf=function(e){if(e[q]instanceof fO&&e[q].strict){e[q].swap(!1),e[q].bubble(`reflow`);return}t.createLeftOf.apply(this,arguments)}});Y[`=`]=hO,Y[`×`]=Y.times=G($,`\\times `,`×`,`[x]`),Y[`÷`]=Y.div=Y.divide=Y.divides=G($,`\\div `,`÷`,`[/]`),ED[`~`]=Y.sim=G($,`\\sim `,`~`,`~`),ED[`≁`]=Y.nsim=G($,`\\nsim `,`≁`,`≁`),Y.complement=Y[`∁`]=G(Q,`\\complement `,`∁`),Y.nexists=Y[`∄`]=G(Q,`\\nexists `,`∄`),Y.sphericalangle=Y[`∢`]=G(Q,`\\sphericalangle `,`∢`),Y.iint=Y[`∬`]=G(Q,`\\iint `,`∬`),Y.iiint=Y[`∭`]=G(Q,`\\iiint `,`∭`),Y.oiint=Y[`∯`]=G(Q,`\\oiint `,`∯`),Y.oiiint=Y[`∰`]=G(Q,`\\oiiint `,`∰`),Y.backsim=Y[`∽`]=G(Q,`\\backsim `,`∽`),Y.backsimeq=Y[`⋍`]=G(Q,`\\backsimeq `,`⋍`),Y.eqsim=Y[`≂`]=G(Q,`\\eqsim `,`≂`),Y.ncong=Y[`≇`]=G(Q,`\\ncong `,`≇`),Y.approxeq=Y[`≊`]=G(Q,`\\approxeq `,`≊`),Y.bumpeq=Y[`≏`]=G(Q,`\\bumpeq `,`≏`),Y.Bumpeq=Y[`≎`]=G(Q,`\\Bumpeq `,`≎`),Y.doteqdot=Y[`≑`]=G(Q,`\\doteqdot `,`≑`),Y.fallingdotseq=Y[`≒`]=G(Q,`\\fallingdotseq `,`≒`),Y.risingdotseq=Y[`≓`]=G(Q,`\\risingdotseq `,`≓`),Y.eqcirc=Y[`≖`]=G(Q,`\\eqcirc `,`≖`),Y.circeq=Y[`≗`]=G(Q,`\\circeq `,`≗`),Y.triangleq=Y[`≜`]=G(Q,`\\triangleq `,`≜`),Y.leqq=Y[`≦`]=G(Q,`\\leqq `,`≦`),Y.geqq=Y[`≧`]=G(Q,`\\geqq `,`≧`),Y.lneqq=Y[`≨`]=G(Q,`\\lneqq `,`≨`),Y.gneqq=Y[`≩`]=G(Q,`\\gneqq `,`≩`),Y.between=Y[`≬`]=G(Q,`\\between `,`≬`),Y.nleq=Y[`≰`]=G(Q,`\\nleq `,`≰`),Y.ngeq=Y[`≱`]=G(Q,`\\ngeq `,`≱`),Y.lesssim=Y[`≲`]=G(Q,`\\lesssim `,`≲`),Y.gtrsim=Y[`≳`]=G(Q,`\\gtrsim `,`≳`),Y.lessgtr=Y[`≶`]=G(Q,`\\lessgtr `,`≶`),Y.gtrless=Y[`≷`]=G(Q,`\\gtrless `,`≷`),Y.preccurlyeq=Y[`≼`]=G(Q,`\\preccurlyeq `,`≼`),Y.succcurlyeq=Y[`≽`]=G(Q,`\\succcurlyeq `,`≽`),Y.precsim=Y[`≾`]=G(Q,`\\precsim `,`≾`),Y.succsim=Y[`≿`]=G(Q,`\\succsim `,`≿`),Y.nprec=Y[`⊀`]=G(Q,`\\nprec `,`⊀`),Y.nsucc=Y[`⊁`]=G(Q,`\\nsucc `,`⊁`),Y.subsetneq=Y[`⊊`]=G(Q,`\\subsetneq `,`⊊`),Y.supsetneq=Y[`⊋`]=G(Q,`\\supsetneq `,`⊋`),Y.vDash=Y[`⊨`]=G(Q,`\\vDash `,`⊨`),Y.Vdash=Y[`⊩`]=G(Q,`\\Vdash `,`⊩`),Y.Vvdash=Y[`⊪`]=G(Q,`\\Vvdash `,`⊪`),Y.VDash=Y[`⊫`]=G(Q,`\\VDash `,`⊫`),Y.nvdash=Y[`⊬`]=G(Q,`\\nvdash `,`⊬`),Y.nvDash=Y[`⊭`]=G(Q,`\\nvDash `,`⊭`),Y.nVdash=Y[`⊮`]=G(Q,`\\nVdash `,`⊮`),Y.nVDash=Y[`⊯`]=G(Q,`\\nVDash `,`⊯`),Y.vartriangleleft=Y[`⊲`]=G(Q,`\\vartriangleleft `,`⊲`),Y.vartriangleright=Y[`⊳`]=G(Q,`\\vartriangleright `,`⊳`),Y.trianglelefteq=Y[`⊴`]=G(Q,`\\trianglelefteq `,`⊴`),Y.trianglerighteq=Y[`⊵`]=G(Q,`\\trianglerighteq `,`⊵`),Y.multimap=Y[`⊸`]=G(Q,`\\multimap `,`⊸`),Y.Subset=Y[`⋐`]=G(Q,`\\Subset `,`⋐`),Y.Supset=Y[`⋑`]=G(Q,`\\Supset `,`⋑`),Y.Cap=Y[`⋒`]=G(Q,`\\Cap `,`⋒`),Y.Cup=Y[`⋓`]=G(Q,`\\Cup `,`⋓`),Y.pitchfork=Y[`⋔`]=G(Q,`\\pitchfork `,`⋔`),Y.lessdot=Y[`⋖`]=G(Q,`\\lessdot `,`⋖`),Y.gtrdot=Y[`⋗`]=G(Q,`\\gtrdot `,`⋗`),Y.lll=Y[`⋘`]=G(Q,`\\lll `,`⋘`),Y.ggg=Y[`⋙`]=G(Q,`\\ggg `,`⋙`),Y.lesseqgtr=Y[`⋚`]=G(Q,`\\lesseqgtr `,`⋚`),Y.gtreqless=Y[`⋛`]=G(Q,`\\gtreqless `,`⋛`),Y.curlyeqprec=Y[`⋞`]=G(Q,`\\curlyeqprec `,`⋞`),Y.curlyeqsucc=Y[`⋟`]=G(Q,`\\curlyeqsucc `,`⋟`),Y.nsim=Y[`≁`]=G(Q,`\\nsim `,`≁`),Y.lnsim=Y[`⋦`]=G(Q,`\\lnsim `,`⋦`),Y.gnsim=Y[`⋧`]=G(Q,`\\gnsim `,`⋧`),Y.precnsim=Y[`⋨`]=G(Q,`\\precnsim `,`⋨`),Y.succnsim=Y[`⋩`]=G(Q,`\\succnsim `,`⋩`),Y.ntriangleleft=Y[`⋪`]=G(Q,`\\ntriangleleft `,`⋪`),Y.ntriangleright=Y[`⋫`]=G(Q,`\\ntriangleright `,`⋫`),Y.ntrianglelefteq=Y[`⋬`]=G(Q,`\\ntrianglelefteq `,`⋬`),Y.ntrianglerighteq=Y[`⋭`]=G(Q,`\\ntrianglerighteq `,`⋭`),Y.blacksquare=Y[`∎`]=G(Q,`\\blacksquare `,`∎`),Y.colon=Y[`∶`]=G(Q,`\\colon `,`∶`),Y.llcorner=Y[`∟`]=G(Q,`\\llcorner `,`∟`),Y.dotplus=Y[`∔`]=G($,`\\dotplus `,`∔`),Y.nmid=Y[`∤`]=G($,`
|
|
199
|
-
mid `,`∤`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`⊺`),Y.veebar=Y[`⊻`]=G($,`\\veebar `,`⊻`),Y.barwedge=Y[`⊼`]=G($,`\\barwedge `,`⊼`),Y.ltimes=Y[`⋉`]=G($,`\\ltimes `,`⋉`),Y.rtimes=Y[`⋊`]=G($,`\\rtimes `,`⋊`),Y.leftthreetimes=Y[`⋋`]=G($,`\\leftthreetimes `,`⋋`),Y.rightthreetimes=Y[`⋌`]=G($,`\\rightthreetimes `,`⋌`),Y.curlyvee=Y[`⋎`]=G($,`\\curlyvee `,`⋎`),Y.curlywedge=Y[`⋏`]=G($,`\\curlywedge `,`⋏`),Y.circledcirc=Y[`⊚`]=G($,`\\circledcirc `,`⊚`),Y.circledast=Y[`⊛`]=G($,`\\circledast `,`⊛`),Y.circleddash=Y[`⊝`]=G($,`\\circleddash `,`⊝`),Y.boxplus=Y[`⊞`]=G($,`\\boxplus `,`⊞`),Y.boxminus=Y[`⊟`]=G($,`\\boxminus `,`⊟`),Y.boxtimes=Y[`⊠`]=G($,`\\boxtimes `,`⊠`),Y.boxdot=Y[`⊡`]=G($,`\\boxdot `,`⊡`),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 gO,_O=hD,vO=document.createElement(`div`).style,yO={transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1},bO;for(var xO in yO)if(xO in vO){bO=xO;break}bO?gO=function(e,t,n){e.css(bO,`scale(`+t+`,`+n+`)`)}:`filter`in vO?(_O=function(e){e.className=e.className},gO=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()})}):gO=function(e,t,n){e.css(`fontSize`,n+`em`)};var SO=K(Z,function(e,t){e.init=function(e,n,r){t.init.call(this,e,`<`+n+` `+r+`>&0</`+n+`>`)}}),CO=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 GD.optBlock.then(function(t){return GD.block.map(function(n){var r=wO.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))}}),wO=K(CO,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]}}),TO=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+`>`)}})},EO=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>`)}}),DO=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>`)}}),OO=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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),kO=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>`)}}),AO=function(e,t){return K(qD,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(SO,`\\mathrm`,`span`,`class="mq-roman mq-font"`),Y.mathit=G(SO,`\\mathit`,`i`,`class="mq-font"`),Y.mathbf=G(SO,`\\mathbf`,`b`,`class="mq-font"`),Y.mathsf=G(SO,`\\mathsf`,`span`,`class="mq-sans-serif mq-font"`),Y.mathtt=G(SO,`\\mathtt`,`span`,`class="mq-monospace mq-font"`),Y.underline=G(SO,`\\underline`,`span`,`class="mq-non-leaf mq-underline"`),Y.overline=Y.bar=G(TO(`mq-overline`),`\\overline`,`span`,`class="mq-non-leaf mq-overline"`),Y.longdiv=G(EO,`\\longdiv`,`span`,`class="mq-non-leaf mq-longdiv"`),Y.overrightarrow=G(TO(`mq-overarrow`),`\\overrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-right"`),Y.overleftarrow=G(TO(`mq-overarrow`),`\\overleftarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-left"`),Y.xleftarrow=G(CO,`\\xleftarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-left"`),Y.xrightarrow=G(CO,`\\xrightarrow`,`span`,`class="mq-non-leaf mq-xarrow mq-arrow-right"`),Y.overleftrightarrow=G(SO,`\\overleftrightarrow`,`span`,`class="mq-non-leaf mq-overarrow mq-arrow-both"`),Y.overarc=G(SO,`\\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">˙</span><span class="mq-empty-box">&0</span></span></span>`)}}),Y.addmatrixrow=G(DO,`\\addmatrixrow`,`span`,`+`),Y.addmatrixcol=G(kO,`\\addmatrixcol`,`span`,`+`),Y.ngtr=Y[`≯`]=G(AO(`mq-ngtr`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Y.nless=Y[`≮`]=G(AO(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Y.dot=G(OO,`\\dot`),Y.parallelogram=G(AO(`mq-parallelogram`,`▱`),`\\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 jO=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 jO){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=SD(i,0,i.ends[q]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var o=r.children().disown(),a=SD(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}},MD.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 qD?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),JD.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 qD?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(fD,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(fD,e.id).appendTo(this.jQ.removeClass(`mq-sup-only`)),this.jQ.append(`<span style="display:inline-block;width:0">​</span>`));for(var t=0;t<2;t+=1)(function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+`Into`],e[n][r+`OutOf`]=MO,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 MO(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(jO,function(e,t){e.supsub=`sub`,e.htmlTemplate=`<span class="mq-supsub mq-non-leaf"><span class="mq-sub"><span class="mq-empty-box">&0</span></span><span style="display:inline-block;width:0">​</span></span>`,e.textTemplate=[`_`],e.finalizeTree=function(){this.downInto=this.sub=this.ends[q],this.sub.upOutOf=MO,t.finalizeTree.call(this)}}),Y.superscript=Y.supscript=Y[`^`]=K(jO,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=MO,t.finalizeTree.call(this)}});var NO=K(Z,function(e,t){e.parser=function(){for(var e=X.string,t=X.optWhitespace,n=X.succeed,r=GD.block,i=this,a=i.blocks=[JD(),JD()],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]}}),PO=K(NO,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>`;qD.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&&(rO(`n`).createLeftOf(e),hO().createLeftOf(e))}});Y[`∑`]=Y.sum=Y.summation=G(PO,`\\sum `,`∑`),Y[`∏`]=Y.prod=Y.product=G(PO,`\\prod `,`∏`),Y.coprod=Y.coproduct=G(PO,`\\coprod `,`∐`),Y[`∫`]=Y.int=Y.integral=K(PO,function(e,t){e.init=function(){qD.prototype.init.call(this,`\\int `,`<span class="mq-int mq-non-leaf"><big>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>`)},e.createLeftOf=Z.p.createLeftOf}),Y.lim=Y.limit=K(NO,function(e,t){e.init=function(){qD.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 FO=Y.over=ED[`/`]=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">​</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||hD)||n instanceof PO||n.ctrlSeq===`\\ `||/^[,;:]$/.test(n.ctrlSeq));)n=n[q];n instanceof PO&&n[J]instanceof jO&&(n=n[J],n[J]instanceof jO&&n[J].ctrlSeq!=n.ctrlSeq&&(n=n[J])),n!==e[q]&&!e.isTooDeep(1)&&(this.replaces(TD(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 IO=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">√</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 GD.optBlock.then(function(e){return GD.block.map(function(t){var n=LO();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();gO(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 LO=Y.nthroot=K(IO,function(e,t){e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">&0</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&1</span></span></span>`,e.textTemplate=[`sqrt[`,`](`,`)`],e.latex=function(){return`\\sqrt[`+this.ends[q].latex()+`]{`+this.ends[J].latex()+`}`}}),RO=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(RO,`\\vec`,`→`,[`vec(`,`)`]),Y.tilde=G(RO,`\\tilde`,`~`,[`tilde(`,`)`]),Y.lrncuberoot=K(IO,function(e,t){e.ctrlSeq=`\\lrncuberoot`,e.htmlTemplate=`<sup class="mq-nthroot mq-non-leaf"><span class="mq-empty-box">3</span></sup><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf"><span class="mq-empty-box">&0</span></span></span>`,e.textTemplate=[`sqrt[3](`,`)`],e.latex=function(){return`\\sqrt[3]{`+this.ends[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"> </span></span></span>`,e.textTemplate=[``,`_`],e.latex=function(){return this.ends[q].latex()+`_`+this.ends[J].latex()}});function zO(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`));gO(this.delimjQs,pD(1+.2*(e-1),1.2),1.2*e)}}var BO=K(K(Z,zO),function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,`\\left`+i,uD,[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 BO&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||VO[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]&&TD(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(TD(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=hD,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:VO[this.sides[this.side].ch],ctrlSeq:VO[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];TD(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()}}),VO={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\langle ":`\\rangle `,"\\rangle ":`\\langle `,"|":`|`,"\\lVert ":`\\rVert `,"\\rVert ":`\\lVert `};function HO(e,t){var t=t||e,n=VO[e],r=VO[t];ED[e]=G(BO,q,e,n,t,r),ED[n]=G(BO,J,e,n,t,r)}HO(`(`),HO(`[`),HO(`{`,`\\{`),Y.langle=G(BO,q,`⟨`,`⟩`,`\\langle `,`\\rangle `),Y.rangle=G(BO,J,`⟨`,`⟩`,`\\langle `,`\\rangle `),ED[`|`]=G(BO,q,`|`,`|`,`|`,`|`),Y.lVert=G(BO,q,`∥`,`∥`,`\\lVert `,`\\rVert `),Y.rVert=G(BO,J,`∥`,`∥`,`\\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=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,r+=` `),GD.then(function(a){return t(`\\right`).skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle(?![a-zA-Z])|\\rVert(?![a-zA-Z]))/)).map(function(e){var t=e.charAt(0)===`\\`?e.slice(1):e;e==`\\rangle`&&(t=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,e+=` `);var n=BO(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,zO),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=FO.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=AD(this.ends[q],this.jQ,e);t.KIND_OF_MQ=`MathField`,t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),HD(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 UO=Y.embed=K(qD,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(FD[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 WO=Y.matrix=K(Z,function(e,t){var n=K(JD,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&&gO(n,pD(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);GD.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=CD.byId[e.first().attr(fD)],n=CD.byId[e.last().attr(fD)],r=e.eq(0).closest(`tr`),i=[];e.each(function(t){var n=CD.byId[W(this).attr(fD)],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=CD.byId[a.attr(fD)];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=CD.byId[l.attr(fD)];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 CD.byId[W(this).attr(fD)].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=CD.byId[this.jQ.find(`tr`).eq(r).find(`td`).eq(n).attr(fD)]),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(fD,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(fD,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(WO,function(e,t){e.ctrlSeq=`\\pmatrix`,e.parentheses={left:`(`,right:`)`}}),Y.bmatrix=K(WO,function(e,t){e.ctrlSeq=`\\bmatrix`,e.parentheses={left:`[`,right:`]`}}),Y.Bmatrix=K(WO,function(e,t){e.ctrlSeq=`\\Bmatrix`,e.parentheses={left:`{`,right:`}`}}),Y.vmatrix=K(WO,function(e,t){e.ctrlSeq=`\\vmatrix`,e.parentheses={left:`|`,right:`|`}}),Y.Vmatrix=K(WO,function(e,t){e.ctrlSeq=`\\Vmatrix`,e.parentheses={left:`‖`,right:`‖`}});var GO=BD(3);for(var KO in GO)(function(e,t){typeof t==`function`?(LD[e]=function(){return ID(),t.apply(this,arguments)},LD[e].prototype=t.prototype):LD[e]=t})(KO,GO[KO]);var qO=function(e){e.registerEmbed(`newLine`,()=>({htmlString:`<div class="newLine"></div>`,text:()=>`testText`,latex:()=>`\\embed{newLine}[]`}))},JO;typeof window<`u`&&(JO=LD.getInterface(3),JO&&JO.registerEmbed&&qO(JO));function YO(e,t){!JO||!JO.registerEmbed||JO.registerEmbed(e,t)}function XO(e,t,n){if(!(!JO||!e))return t!=null&&(e.textContent=t),JO.StaticMath(e,n)}var ZO=e=>`&.mq-math-mode ${e}, & .mq-math-mode ${e}`,QO={"&.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(ZO).join(`, `)]:{borderTopColor:`currentColor`},[[`.mq-underline`,`.mq-xarrow .mq-xarrow-over`].map(ZO).join(`, `)]:{borderBottomColor:`currentColor`},[ZO(`.mq-abs`)]:{borderLeftColor:`currentColor`,borderRightColor:`currentColor`},[ZO(`.mq-matrix td.mq-empty`)]:{borderColor:`currentColor`}},$O={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`}},ek={"& .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`}},tk={"& *":{...$O,...ek,"& .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`}}},nk=Gh(`pie-lib:math-input:mq:static`),rk=/\\MathQuillMathField\[r\d*\]\{(.*?)\}/g,ik=/ /g;function ak(e=``){return e.replace(ik,``)}function ok(e){let t=0;for(let n=0;n<(e||``).length;n++)e[n]===`{`&&t++;return t}var sk=I(`span`)(QO),ck=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(ok(e)>ok(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(!JO)throw Error(`MQ is not defined - but component has mounted?`);this.mathField||=JO.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}oD(this.inputRef?.current,this.props.language)};blur=()=>{nk(`blur mathfield`),this.mathField.blur()};focus=()=>{nk(`focus mathfield...`),this.mathField.focus()};shouldComponentUpdate(e){try{let t=ak(this.mathField.parseLatex(e.latex)),n=(e.latex.match(rk)||[]).length,r=t!==ak(this.mathField.latex().trim())||n!==Object.keys(this.mathField.innerFields).length/2;return nk(`[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)(sk,{className:t,onFocus:this.onFocus,onBlur:e,ref:this.inputRef})}},lk=e=>(Rt(5-e.length,()=>e.push([])),zt.apply(null,e)),uk=Gh(`pie-lib:math-inline:keypad`),dk=Hy(`pie`),fk=[Uy(),qb()],pk={"& .MuiTouchRipple-root":{color:`rgb(from ${Uy()} min(r, 255 - r) min(g, 255 - g) min(b, 255 - b))`}},mk={"&.Mui-focusVisible":{outline:`2px solid ${Nb()}`,outlineOffset:`-2px`,boxShadow:`inset 0 0 0 4px ${dk(`background`,B.WHITE)}`}},hk=I(ck)(({latex:e})=>{let t={pointerEvents:`none`,textTransform:`none !important`,color:fk,"& .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});hk.propTypes={latex:O.string.isRequired};var gk=e=>e?{gridTemplateColumns:`repeat(${e.columns}, minmax(min-content, 150px))`,gridTemplateRows:`repeat(${e.rows}, minmax(40px, 60px))`,gridAutoFlow:`initial`}:{},_k=I(`div`)(()=>({...tk,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`}}})),vk=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:fk,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},...pk,...mk,borderRadius:0,...t&&{fontFamily:`Roboto, Helvetica, Arial, sans-serif !important`}})),yk=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()},...pk,...mk})),bk=I(Uh)(({category:e})=>({minWidth:`auto`,backgroundColor:e===`operators`?Hb():Vb(),"&:hover":{backgroundColor:e===`operators`?Gb():Wb()},borderRadius:0,"& .icon":{height:`30px`}})),xk=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=>{uk(`[buttonClick]`,e);let{onPress:t}=this.props;t(e)};flowKeys=(e,t)=>Mt([...lk(e),...lk(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))`,...gk(r)};return(0,P.jsx)(_k,{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)(yk,{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)(hk,{latex:e.latex})},r.key);if(e.label)return(0,P.jsx)(vk,{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)(bk,{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)}})})}},Sk=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}},Ck=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(Sk(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)(xk,{className:i,controlledKeypadMode:n,onFocus:t,noDecimal:r,layoutForKeyPad:o,additionalKeys:mf(hm(e),c),onPress:this.keypadPress,mode:e,setKeypadInteraction:s})}},wk=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}})),Tk=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}})),Ek=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toUpperCase()+e.substring(1):e}})),Dk=o(((e,t)=>{var n=Ek(),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)}})()})),Ok=o(((e,t)=>{t.exports=/[-\s]+(.)?/g})),kk=o(((e,t)=>{var n=function(e,t){return t?t.toUpperCase():``},r=Ok();t.exports=function(e){return e?e.replace(r,n):``}})),Ak=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||`-`):``}})),jk=o(((e,t)=>{var n=Ak();t.exports=function(e){return n(e).toLowerCase()}})),Mk=o(((e,t)=>{t.exports=function(e){return e.length?e.charAt(0).toLowerCase()+e.substring(1):e}})),Nk=o(((e,t)=>{var n=kk(),r=jk(),i=Mk(),a=Ek(),o=Dk(),s=wk(),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}}})),Pk=o(((e,t)=>{t.exports=Nk()()})),Fk=o(((e,t)=>{var n=Object.prototype.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}})),Ik=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return!!e&&n.call(e)===`[object Object]`}})),Lk=o(((e,t)=>{var n=Object.prototype.toString;t.exports=function(e){return n.apply(e)===`[object Function]`}})),Rk=o(((e,t)=>{Dk();var n=Pk(),r=jk(),i=kk(),a=Fk(),o=Ik(),s=Lk(),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:Tk()},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})),zk=o(((e,t)=>{var n=Rk(),r=Fk();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(`; `)}})),Bk=o(((e,t)=>{t.exports={prefixProperties:wk(),cssUnitless:Tk(),object:Rk(),string:zk()}}))(),Vk=Gh(`@pie-lib:mask-markup:serialization`),Hk=[`span`],Uk=[`em`,`strong`,`u`],Wk=3,Gk=8,Kk=1,qk=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},Jk=e=>Hk.includes(e)?`inline`:Uk.includes(e)?`mark`:`block`,Yk=e=>{let t=/([\w-]*)\s*:\s*([^;]*)/g,n,r={};for(;n=t.exec(e);)r[n[1]]=n[2].trim();return r},Xk=e=>(0,Bk.object)(e,{camelize:!0,addUnits:!1}),Zk=(e,t)=>Xk(Yk(e.getAttribute(t))),Qk=(e,t,n)=>{let r=e.getAttribute(n);return delete t.class,r},$k=e=>(t,n)=>{if(!e.getAttribute)return t;if(e.getAttribute(n))switch(n){case`style`:t.style=Zk(e,n);break;case`class`:t.className=Qk(e,t,n);break;default:t[n]=e.getAttribute(n);break}return t},eA=[`border`,`class`,`style`],tA={b:`bold`,em:`italic`,u:`underline`,s:`strikethrough`,code:`code`,strong:`strong`},nA=(e,t=[])=>{if(e.nodeType===Gk)return null;if(e.nodeType===Wk){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===Kk){let n=e.tagName.toLowerCase(),r=tA[n];if(r)return Vk(`[deserialize] mark: `,r),{_flatten:!0,nodes:rA(e.childNodes,[...t,r])};if(n===`math`)return{isMath:!0,nodes:[e]};let i=qk(e)||{};n===`audio`&&i.controls===``&&(i.controls=!0);let a=eA.reduce($k(e),{...i}),o=Jk(n),s=rA(e.childNodes,t);return{object:o,type:n,data:{dataset:{...e.dataset},attributes:{...a}},nodes:s}}return null},rA=(e,t=[])=>{let n=[];for(let r=0;r<e.length;r++){let i=nA(e[r],t);i!==null&&(i._flatten&&i.nodes?n.push(...i.nodes):n.push(i))}return n},iA=e=>{if(!e||!e.trim())return{object:`value`,document:{object:`document`,data:{},nodes:[{object:`block`,type:`span`,data:{},isVoid:!1,nodes:[]}]}};let t=rA(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}}},aA=I(`div`)(({theme:e})=>({paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5)})),oA=I(`span`)(()=>({display:`inline-block`,width:`.75em`})),sA=[`tbody`,`tr`],cA=(e,t)=>{let n=t.trim()===``,r=e&&e.type;if(!(n&&sA.includes(r)))return t},lA=e=>{let t=e.leaves.find(e=>Nt(e,`marks`,[]).length);return t?t.marks:null},uA=(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)(oA,{},`spacer-${s}-before`)),o.push(a),t&&o.push((0,P.jsx)(oA,{},`spacer-${s}-after`));return}}if(e.object===`text`){let t=e.leaves.reduce((e,t)=>{let n=t.text,r=cA(i,n);return r?e+r:e},``),n=lA(e);if(n?.length>0){let e=n.map(e=>Object.keys(tA).find(t=>tA[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=uA(e,t,n,r,e,a);if(e.type===`p`||e.type===`paragraph`)o.push((0,P.jsx)(aA,{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},dA=I(`div`)(()=>({display:`initial`,"&:not(.MathJax) table":{borderCollapse:`collapse`},"&:not(.MathJax) table td, &:not(.MathJax) table th":{padding:`8px 12px`,textAlign:`left`}})),fA=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 Ew==`function`&&Ew(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=uA(t,e,this.handleChange,this.props.renderChildren,null,n),a=r||this.internalContainerRef;return(0,P.jsx)(dA,{ref:a,children:i})}},pA=/\{\{(\d+)\}\}/g,mA=(e,t)=>e?{markup:e.replace(pA,(e,n)=>`<span data-component="${t}" data-id="${n}"></span>`)}:{markup:``},hA=(e,t)=>{let{markup:n}=mA(e,t);return iA(Ry(n)).document},gA=((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||hA(n,e);return(0,P.jsx)(fA,{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)}),_A=`height ease-in 300ms, opacity ease-in 300ms`,vA=I(`div`)(()=>({position:`relative`,height:0,overflow:`hidden`,display:`flex`,visibility:`hidden`,width:0,"&.enter":{transition:_A,opacity:1,height:`auto`,width:`auto`,visibility:`visible`,minHeight:`25px`},"&.enter-done":{height:`auto`,visibility:`visible`,width:`auto`,minHeight:`25px`},"&.exit":{transition:_A,opacity:0,height:0,visibility:`visible`,width:0},"&.exit-done":{opacity:0,visibility:`hidden`,height:0,width:0}})),yA=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)(vA,{ref:i,className:r,children:n})})};yA.propTypes={show:O.bool.isRequired,className:O.string,children:O.oneOfType([O.arrayOf(O.node),O.node]).isRequired};function bA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function xA(e,t){return!e||bA(e)?e:bA(e.default)?e.default:t&&bA(e[t])?e[t]:t&&bA(e[t]?.default)?e[t].default:e}var SA=xA(DE,`Readable`)||xA(TA.Readable,`Readable`),CA=iD,wA=CA.default,TA=wA&&typeof wA==`object`?wA:CA,{translator:EA}=kT,DA={WebkitTouchCallout:`none`,WebkitUserSelect:`none`,KhtmlUserSelect:`none`,MozUserSelect:`none`,msUserSelect:`none`,userSelect:`none`},OA=I(`div`)(()=>({width:`100%`,cursor:`pointer`})),kA=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`}})),AA=I(`div`)(()=>({width:`fit-content`,minWidth:`140px`,alignSelf:`center`,verticalAlign:`middle`,color:`var(--correct-answer-toggle-label-color, ${Uy()})`,fontWeight:`normal`,...DA})),jA=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`}})),MA=I(`div`)(()=>({width:`25px`,marginRight:`5px`,display:`flex`,alignItems:`center`})),NA=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:EA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:EA.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:EA.t(`common:showCorrectAnswer`,{lng:t.language}),hideMessage:EA.t(`common:hideCorrectAnswer`,{lng:t.language})})}render(){let{className:e,toggled:t,hideMessage:n,showMessage:r}=this.props;return(0,P.jsx)(OA,{className:e,children:(0,P.jsx)(yA,{show:this.state.show,children:(0,P.jsxs)(kA,{type:`button`,"aria-pressed":!!t,onClick:this.onClick.bind(this),onTouchEnd:this.onTouch.bind(this),children:[(0,P.jsxs)(MA,{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)(jA,{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)(jA,{ref:this.closedIconRef,children:(0,P.jsx)(sg,{open:t},`correct-closed`)})})]}),(0,P.jsx)(SA,{false:!0,children:(0,P.jsx)(AA,{"aria-hidden":!this.state.show,children:t?n:r})})]})})})}};function PA(e){return typeof e==`function`||typeof e==`object`&&!!e&&typeof e.$$typeof==`symbol`}function FA(e,t){return!e||PA(e)?e:PA(e.default)?e.default:t&&PA(e[t])?e[t]:t&&PA(e[t]?.default)?e[t].default:e}var IA=FA(KT,`UiLayout`)||FA(HA.UiLayout,`UiLayout`),LA=FA(EE,`PreviewPrompt`)||FA(HA.PreviewPrompt,`PreviewPrompt`),RA=FA(DE,`Readable`)||FA(HA.Readable,`Readable`),zA=FA(IT,`Collapsible`)||FA(HA.Collapsible,`Collapsible`),BA=iD,VA=BA.default,HA=VA&&typeof VA==`object`?VA:BA,{translator:UA}=kT,WA=I(IA)({color:Uy(),backgroundColor:db(),display:`inline-block`}),GA=I(`div`)({width:`100%`,position:`relative`,backgroundColor:db(),color:Uy()}),KA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),qA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),JA=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}}),YA=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}}})),XA=I(ck)({"& > .mq-root-block":{"& > .mq-editable-field":{borderColor:Uy()}}}),ZA=I(`div`)(({theme:e})=>({zIndex:10,minWidth:`400px`,marginTop:e.spacing(2)})),QA=I(`div`)(({theme:e})=>({marginBottom:e.spacing(1),pointerEvents:`none`})),$A=I(`h2`)({position:`absolute`,left:`-10000px`,top:`auto`,width:`1px`,height:`1px`,overflow:`hidden`}),ej=I(`div`)(({theme:e})=>({marginBottom:e.spacing(2)})),tj=I(NA)(({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`)},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=`<`:t===`>`&&(n=`>`),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 `,`∉`),Y[`≅`]=Y.cong=G($,`\\cong `,`≅`),Y[`≡`]=Y.equiv=G($,`\\equiv `,`≡`),Y[`⊕`]=Y.oplus=G($,`\\oplus `,`⊕`),Y[`⊗`]=Y.otimes=G($,`\\otimes `,`⊗`),Y[`≠`]=Y.ne=Y.neq=G($,`\\ne `,`≠`),Y[`≇`]=Y.ncong=G($,`\\ncong `,`≇`),Y[`∗`]=Y.ast=Y.star=Y.loast=Y.lowast=G($,`\\ast `,`∗`),Y.therefor=Y.therefore=G($,`\\therefore `,`∴`),Y.cuz=Y.because=G($,`\\because `,`∵`),Y.prop=Y.propto=G($,`\\propto `,`∝`),Y[`≈`]=Y.asymp=Y.approx=G($,`\\approx `,`≈`),Y[`≉`]=Y.nasymp=Y.napprox=G($,`\\napprox `,`≉`),Y.isin=Y.in=G($,`\\in `,`∈`),Y.ni=Y.contains=G($,`\\ni `,`∋`),Y.notni=Y.niton=Y.notcontains=Y.doesnotcontain=CD[`\\not\\ni`]=G($,`\\not\\ni `,`∌`),Y.sub=Y.subset=G($,`\\subset `,`⊂`),Y.sup=Y.supset=Y.superset=G($,`\\supset `,`⊃`),Y.nsub=Y.notsub=Y.nsubset=Y.notsubset=CD[`\\not\\subset`]=G($,`\\not\\subset `,`⊄`),Y.nsup=Y.notsup=Y.nsupset=Y.notsupset=Y.nsuperset=Y.notsuperset=CD[`\\not\\supset`]=G($,`\\not\\supset `,`⊅`),Y.sube=Y.subeq=Y.subsete=Y.subseteq=G($,`\\subseteq `,`⊆`),Y.supe=Y.supeq=Y.supsete=Y.supseteq=Y.supersete=Y.superseteq=G($,`\\supseteq `,`⊇`),Y.nsube=Y.nsubeq=Y.notsube=Y.notsubeq=Y.nsubsete=Y.nsubseteq=Y.notsubsete=Y.notsubseteq=CD[`\\not\\subseteq`]=G($,`\\not\\subseteq `,`⊈`),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 `,`⊉`),Y.N=Y.naturals=Y.Naturals=G(Q,`\\mathbb{N}`,`ℕ`),Y.P=Y.primes=Y.Primes=Y.projective=Y.Projective=Y.probability=Y.Probability=G(Q,`\\mathbb{P}`,`ℙ`),Y.Z=Y.integers=Y.Integers=G(Q,`\\mathbb{Z}`,`ℤ`),Y.Q=Y.rationals=Y.Rationals=G(Q,`\\mathbb{Q}`,`ℚ`),Y.R=Y.reals=Y.Reals=G(Q,`\\mathbb{R}`,`ℝ`),Y.C=Y.complex=Y.Complex=Y.complexes=Y.Complexes=Y.complexplane=Y.Complexplane=Y.ComplexPlane=G(Q,`\\mathbb{C}`,`ℂ`),Y.H=Y.Hamiltonian=Y.quaternions=Y.Quaternions=G(Q,`\\mathbb{H}`,`ℍ`),Y.quad=Y.emsp=G(Q,`\\quad `,` `),Y.qquad=G(Q,`\\qquad `,` `),Y.diamond=G(Q,`\\diamond `,`◇`),Y.bigtriangleup=G(Q,`\\bigtriangleup `,`△`),Y.ominus=G(Q,`\\ominus `,`⊖`),Y.uplus=G(Q,`\\uplus `,`⊎`),Y.bigtriangledown=G(Q,`\\bigtriangledown `,`▽`),Y.sqcap=G(Q,`\\sqcap `,`⊓`),Y.triangleleft=G(Q,`\\triangleleft `,`⊲`),Y.sqcup=G(Q,`\\sqcup `,`⊔`),Y.triangleright=G(Q,`\\triangleright `,`⊳`),Y.odot=Y.circledot=G(Q,`\\odot `,`⊙`),Y.bigcirc=G(Q,`\\bigcirc `,`◯`),Y.dagger=G(Q,`\\dagger `,`†`),Y.ddagger=G(Q,`\\ddagger `,`‡`),Y.wr=G(Q,`\\wr `,`≀`),Y.amalg=G(Q,`\\amalg `,`∐`),Y.models=G(Q,`\\models `,`⊨`),Y.prec=G(Q,`\\prec `,`≺`),Y.succ=G(Q,`\\succ `,`≻`),Y.preceq=G(Q,`\\preceq `,`≼`),Y.succeq=G(Q,`\\succeq `,`≽`),Y.simeq=G(Q,`\\simeq `,`≃`),Y.mid=G(Q,`\\mid `,`∣`),Y.ll=G(Q,`\\ll `,`≪`),Y.gg=G(Q,`\\gg `,`≫`),Y.parallel=G(Q,`\\parallel `,`∥`),Y.nparallel=G(Q,`\\nparallel `,`∦`),Y.bowtie=G(Q,`\\bowtie `,`⋈`),Y.sqsubset=G(Q,`\\sqsubset `,`⊏`),Y.sqsupset=G(Q,`\\sqsupset `,`⊐`),Y.smile=G(Q,`\\smile `,`⌣`),Y.sqsubseteq=G(Q,`\\sqsubseteq `,`⊑`),Y.sqsupseteq=G(Q,`\\sqsupseteq `,`⊒`),Y.doteq=G(Q,`\\doteq `,`≐`),Y.frown=G(Q,`\\frown `,`⌢`),Y.vdash=G(Q,`\\vdash `,`⊦`),Y.dashv=G(Q,`\\dashv `,`⊣`),Y.nless=G(Q,`\\nless `,`≮`),Y.ngtr=G(Q,`\\ngtr `,`≯`),Y.longleftarrow=G(Q,`\\longleftarrow `,`←`),Y.longrightarrow=G(Q,`\\longrightarrow `,`→`),Y.Longleftarrow=G(Q,`\\Longleftarrow `,`⇐`),Y.Longrightarrow=G(Q,`\\Longrightarrow `,`⇒`),Y.longleftrightarrow=G(Q,`\\longleftrightarrow `,`↔`),Y.updownarrow=G(Q,`\\updownarrow `,`↕`),Y.Longleftrightarrow=G(Q,`\\Longleftrightarrow `,`⇔`),Y.Updownarrow=G(Q,`\\Updownarrow `,`⇕`),Y.mapsto=G(Q,`\\mapsto `,`↦`),Y.nearrow=G(Q,`\\nearrow `,`↗`),Y.hookleftarrow=G(Q,`\\hookleftarrow `,`↩`),Y.hookrightarrow=G(Q,`\\hookrightarrow `,`↪`),Y.searrow=G(Q,`\\searrow `,`↘`),Y.leftharpoonup=G(Q,`\\leftharpoonup `,`↼`),Y.rightharpoonup=G(Q,`\\rightharpoonup `,`⇀`),Y.swarrow=G(Q,`\\swarrow `,`↙`),Y.leftharpoondown=G(Q,`\\leftharpoondown `,`↽`),Y.rightharpoondown=G(Q,`\\rightharpoondown `,`⇁`),Y.nwarrow=G(Q,`\\nwarrow `,`↖`),Y.ldots=G(Q,`\\ldots `,`…`),Y.cdots=G(Q,`\\cdots `,`⋯`),Y.vdots=G(Q,`\\vdots `,`⋮`),Y.ddots=G(Q,`\\ddots `,`⋱`),Y.surd=G(Q,`\\surd `,`√`),Y.triangle=G(Q,`\\triangle `,`△`),Y.ell=G(Q,`\\ell `,`ℓ`),Y.top=G(Q,`\\top `,`⊤`),Y.flat=G(Q,`\\flat `,`♭`),Y.natural=G(Q,`\\natural `,`♮`),Y.sharp=G(Q,`\\sharp `,`♯`),Y.wp=G(Q,`\\wp `,`℘`),Y.bot=G(Q,`\\bot `,`⊥`),Y.clubsuit=G(Q,`\\clubsuit `,`♣`),Y.diamondsuit=G(Q,`\\diamondsuit `,`♢`),Y.heartsuit=G(Q,`\\heartsuit `,`♡`),Y.spadesuit=G(Q,`\\spadesuit `,`♠`),Y.circledot=G(Q,`\\circledot `,`⊙`),Y.middot=G(Q,`\\middot `,`·`),Y.dottedsquare=G(Q,`\\dottedsquare `,`⬚`),Y.square=G(Q,`\\square `,`⬜`),Y.rectangle=G(Q,`\\rectangle `,`▯`),Y.oint=G(Q,`\\oint `,`∮`),Y.bigcap=G(Q,`\\bigcap `,`∩`),Y.bigcup=G(Q,`\\bigcup `,`∪`),Y.bigsqcup=G(Q,`\\bigsqcup `,`⊔`),Y.bigvee=G(Q,`\\bigvee `,`∨`),Y.bigwedge=G(Q,`\\bigwedge `,`∧`),Y.bigodot=G(Q,`\\bigodot `,`⊙`),Y.bigotimes=G(Q,`\\bigotimes `,`⊗`),Y.bigoplus=G(Q,`\\bigoplus `,`⊕`),Y.biguplus=G(Q,`\\biguplus `,`⊎`),Y.lfloor=G(Q,`\\lfloor `,`⌊`),Y.rfloor=G(Q,`\\rfloor `,`⌋`),Y.lceil=G(Q,`\\lceil `,`⌈`),Y.rceil=G(Q,`\\rceil `,`⌉`),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 `,`⊥`),Y.nabla=Y.del=G(Q,`\\nabla `,`∇`),Y.hbar=G(Q,`\\hbar `,`ℏ`),Y.AA=Y.Angstrom=Y.angstrom=G(Q,`\\text\\AA `,`Å`),Y.ring=Y.circ=Y.circle=G(Q,`\\circ `,`∘`),Y.bull=Y.bullet=G(Q,`\\bullet `,`•`),Y.setminus=Y.smallsetminus=G(Q,`\\setminus `,`∖`),Y.not=Y[`¬`]=Y.neg=G(Q,`\\neg `,`¬`),Y[`…`]=Y.dots=Y.ellip=Y.hellip=Y.ellipsis=Y.hellipsis=G(Q,`\\dots `,`…`),Y.converges=Y.darr=Y.dnarr=Y.dnarrow=Y.downarrow=G(Q,`\\downarrow `,`↓`),Y.dArr=Y.dnArr=Y.dnArrow=Y.Downarrow=G(Q,`\\Downarrow `,`⇓`),Y.diverges=Y.uarr=Y.uparrow=G(Q,`\\uparrow `,`↑`),Y.uArr=Y.Uparrow=G(Q,`\\Uparrow `,`⇑`),Y.to=G($,`\\to `,`→`),Y.rarr=Y.rightarrow=G(Q,`\\rightarrow `,`→`),Y.implies=G($,`\\Rightarrow `,`⇒`),Y.rArr=Y.Rightarrow=G(Q,`\\Rightarrow `,`⇒`),Y.gets=G($,`\\gets `,`←`),Y.larr=Y.leftarrow=G(Q,`\\leftarrow `,`←`),Y.impliedby=G($,`\\Leftarrow `,`⇐`),Y.lArr=Y.Leftarrow=G(Q,`\\Leftarrow `,`⇐`),Y.harr=Y.lrarr=Y.leftrightarrow=G(Q,`\\leftrightarrow `,`↔`),Y.iff=G($,`\\Leftrightarrow `,`⇔`),Y.hArr=Y.lrArr=Y.Leftrightarrow=G(Q,`\\Leftrightarrow `,`⇔`),Y.Re=Y.Real=Y.real=G(Q,`\\Re `,`ℜ`),Y.Im=Y.imag=Y.image=Y.imagin=Y.imaginary=Y.Imaginary=G(Q,`\\Im `,`ℑ`),Y.part=Y.partial=G(Q,`\\partial `,`∂`),Y.infty=Y.infin=Y.infinity=G(Q,`\\infty `,`∞`),Y.pounds=G(Q,`\\pounds `,`£`),Y.alef=Y.alefsym=Y.aleph=Y.alephsym=G(Q,`\\aleph `,`ℵ`),Y.xist=Y.xists=Y.exist=Y.exists=G(Q,`\\exists `,`∃`),Y.nexists=Y.nexist=G(Q,`\\nexists `,`∄`),Y.and=Y.land=Y.wedge=G($,`\\wedge `,`∧`),Y.or=Y.lor=Y.vee=G($,`\\vee `,`∨`),Y.o=Y.O=Y.empty=Y.emptyset=Y.oslash=Y.Oslash=Y.nothing=Y.varnothing=G($,`\\varnothing `,`∅`),Y.cup=Y.union=G($,`\\cup `,`∪`),Y.cap=Y.intersect=Y.intersection=G($,`\\cap `,`∩`),Y.deg=Y.degree=G(Q,`\\degree `,`°`),Y.ang=Y.angle=G(Q,`\\angle `,`∠`),Y.measuredangle=G(Q,`\\measuredangle `,`m∠`);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,`\\ `,` `),Y[`'`]=Y.prime=G(Q,`'`,`′`),Y[`″`]=Y.dprime=G(Q,`″`,`″`),Y[`"`]=Y.doublePrime=G(Q,`"`,`″`),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,`\\&`,`&`),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 `,`ϕ`),Y.phiv=Y.varphi=G(QD,`\\varphi `,`φ`),Y.epsilon=G(QD,`\\epsilon `,`ϵ`),Y.epsiv=Y.varepsilon=G(QD,`\\varepsilon `,`ε`),Y.piv=Y.varpi=G(QD,`\\varpi `,`ϖ`),Y.sigmaf=Y.sigmav=Y.varsigma=G(QD,`\\varsigma `,`ς`),Y.thetav=Y.vartheta=Y.thetasym=G(QD,`\\vartheta `,`ϑ`),Y.upsilon=Y.upsi=G(QD,`\\upsilon `,`υ`),Y.gammad=Y.Gammad=Y.digamma=G(QD,`\\digamma `,`ϝ`),Y.kappav=Y.varkappa=G(QD,`\\varkappa `,`ϰ`),Y.rhov=Y.varrho=G(QD,`\\varrho `,`ϱ`),Y.pi=Y.π=G(aO,`\\pi `,`π`),Y.lambda=G(aO,`\\lambda `,`λ`),Y.Upsilon=Y.Upsi=Y.upsih=Y.Upsih=G(UD,`\\Upsilon `,`<var style="font-family: serif">ϒ</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 `,`∀`);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,`-`,`−`),Y[`±`]=Y.pm=Y.plusmn=Y.plusminus=G(sO,`\\pm `,`±`),Y.mp=Y.mnplus=Y.minusplus=G(sO,`\\mp `,`∓`),SD[`*`]=Y.sdot=Y.cdot=G($,`\\cdot `,`·`,`*`);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:`≤`,text:`≤`,ctrlSeqStrict:`<`,htmlStrict:`<`,textStrict:`<`},uO={ctrlSeq:`\\ge `,html:`≥`,text:`≥`,ctrlSeqStrict:`>`,htmlStrict:`>`,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 `,`×`,`[x]`),Y[`÷`]=Y.div=Y.divide=Y.divides=G($,`\\div `,`÷`,`[/]`),SD[`~`]=Y.sim=G($,`\\sim `,`~`,`~`),SD[`≁`]=Y.nsim=G($,`\\nsim `,`≁`,`≁`),Y.complement=Y[`∁`]=G(Q,`\\complement `,`∁`),Y.nexists=Y[`∄`]=G(Q,`\\nexists `,`∄`),Y.sphericalangle=Y[`∢`]=G(Q,`\\sphericalangle `,`∢`),Y.iint=Y[`∬`]=G(Q,`\\iint `,`∬`),Y.iiint=Y[`∭`]=G(Q,`\\iiint `,`∭`),Y.oiint=Y[`∯`]=G(Q,`\\oiint `,`∯`),Y.oiiint=Y[`∰`]=G(Q,`\\oiiint `,`∰`),Y.backsim=Y[`∽`]=G(Q,`\\backsim `,`∽`),Y.backsimeq=Y[`⋍`]=G(Q,`\\backsimeq `,`⋍`),Y.eqsim=Y[`≂`]=G(Q,`\\eqsim `,`≂`),Y.ncong=Y[`≇`]=G(Q,`\\ncong `,`≇`),Y.approxeq=Y[`≊`]=G(Q,`\\approxeq `,`≊`),Y.bumpeq=Y[`≏`]=G(Q,`\\bumpeq `,`≏`),Y.Bumpeq=Y[`≎`]=G(Q,`\\Bumpeq `,`≎`),Y.doteqdot=Y[`≑`]=G(Q,`\\doteqdot `,`≑`),Y.fallingdotseq=Y[`≒`]=G(Q,`\\fallingdotseq `,`≒`),Y.risingdotseq=Y[`≓`]=G(Q,`\\risingdotseq `,`≓`),Y.eqcirc=Y[`≖`]=G(Q,`\\eqcirc `,`≖`),Y.circeq=Y[`≗`]=G(Q,`\\circeq `,`≗`),Y.triangleq=Y[`≜`]=G(Q,`\\triangleq `,`≜`),Y.leqq=Y[`≦`]=G(Q,`\\leqq `,`≦`),Y.geqq=Y[`≧`]=G(Q,`\\geqq `,`≧`),Y.lneqq=Y[`≨`]=G(Q,`\\lneqq `,`≨`),Y.gneqq=Y[`≩`]=G(Q,`\\gneqq `,`≩`),Y.between=Y[`≬`]=G(Q,`\\between `,`≬`),Y.nleq=Y[`≰`]=G(Q,`\\nleq `,`≰`),Y.ngeq=Y[`≱`]=G(Q,`\\ngeq `,`≱`),Y.lesssim=Y[`≲`]=G(Q,`\\lesssim `,`≲`),Y.gtrsim=Y[`≳`]=G(Q,`\\gtrsim `,`≳`),Y.lessgtr=Y[`≶`]=G(Q,`\\lessgtr `,`≶`),Y.gtrless=Y[`≷`]=G(Q,`\\gtrless `,`≷`),Y.preccurlyeq=Y[`≼`]=G(Q,`\\preccurlyeq `,`≼`),Y.succcurlyeq=Y[`≽`]=G(Q,`\\succcurlyeq `,`≽`),Y.precsim=Y[`≾`]=G(Q,`\\precsim `,`≾`),Y.succsim=Y[`≿`]=G(Q,`\\succsim `,`≿`),Y.nprec=Y[`⊀`]=G(Q,`\\nprec `,`⊀`),Y.nsucc=Y[`⊁`]=G(Q,`\\nsucc `,`⊁`),Y.subsetneq=Y[`⊊`]=G(Q,`\\subsetneq `,`⊊`),Y.supsetneq=Y[`⊋`]=G(Q,`\\supsetneq `,`⊋`),Y.vDash=Y[`⊨`]=G(Q,`\\vDash `,`⊨`),Y.Vdash=Y[`⊩`]=G(Q,`\\Vdash `,`⊩`),Y.Vvdash=Y[`⊪`]=G(Q,`\\Vvdash `,`⊪`),Y.VDash=Y[`⊫`]=G(Q,`\\VDash `,`⊫`),Y.nvdash=Y[`⊬`]=G(Q,`\\nvdash `,`⊬`),Y.nvDash=Y[`⊭`]=G(Q,`\\nvDash `,`⊭`),Y.nVdash=Y[`⊮`]=G(Q,`\\nVdash `,`⊮`),Y.nVDash=Y[`⊯`]=G(Q,`\\nVDash `,`⊯`),Y.vartriangleleft=Y[`⊲`]=G(Q,`\\vartriangleleft `,`⊲`),Y.vartriangleright=Y[`⊳`]=G(Q,`\\vartriangleright `,`⊳`),Y.trianglelefteq=Y[`⊴`]=G(Q,`\\trianglelefteq `,`⊴`),Y.trianglerighteq=Y[`⊵`]=G(Q,`\\trianglerighteq `,`⊵`),Y.multimap=Y[`⊸`]=G(Q,`\\multimap `,`⊸`),Y.Subset=Y[`⋐`]=G(Q,`\\Subset `,`⋐`),Y.Supset=Y[`⋑`]=G(Q,`\\Supset `,`⋑`),Y.Cap=Y[`⋒`]=G(Q,`\\Cap `,`⋒`),Y.Cup=Y[`⋓`]=G(Q,`\\Cup `,`⋓`),Y.pitchfork=Y[`⋔`]=G(Q,`\\pitchfork `,`⋔`),Y.lessdot=Y[`⋖`]=G(Q,`\\lessdot `,`⋖`),Y.gtrdot=Y[`⋗`]=G(Q,`\\gtrdot `,`⋗`),Y.lll=Y[`⋘`]=G(Q,`\\lll `,`⋘`),Y.ggg=Y[`⋙`]=G(Q,`\\ggg `,`⋙`),Y.lesseqgtr=Y[`⋚`]=G(Q,`\\lesseqgtr `,`⋚`),Y.gtreqless=Y[`⋛`]=G(Q,`\\gtreqless `,`⋛`),Y.curlyeqprec=Y[`⋞`]=G(Q,`\\curlyeqprec `,`⋞`),Y.curlyeqsucc=Y[`⋟`]=G(Q,`\\curlyeqsucc `,`⋟`),Y.nsim=Y[`≁`]=G(Q,`\\nsim `,`≁`),Y.lnsim=Y[`⋦`]=G(Q,`\\lnsim `,`⋦`),Y.gnsim=Y[`⋧`]=G(Q,`\\gnsim `,`⋧`),Y.precnsim=Y[`⋨`]=G(Q,`\\precnsim `,`⋨`),Y.succnsim=Y[`⋩`]=G(Q,`\\succnsim `,`⋩`),Y.ntriangleleft=Y[`⋪`]=G(Q,`\\ntriangleleft `,`⋪`),Y.ntriangleright=Y[`⋫`]=G(Q,`\\ntriangleright `,`⋫`),Y.ntrianglelefteq=Y[`⋬`]=G(Q,`\\ntrianglelefteq `,`⋬`),Y.ntrianglerighteq=Y[`⋭`]=G(Q,`\\ntrianglerighteq `,`⋭`),Y.blacksquare=Y[`∎`]=G(Q,`\\blacksquare `,`∎`),Y.colon=Y[`∶`]=G(Q,`\\colon `,`∶`),Y.llcorner=Y[`∟`]=G(Q,`\\llcorner `,`∟`),Y.dotplus=Y[`∔`]=G($,`\\dotplus `,`∔`),Y.nmid=Y[`∤`]=G($,`
|
|
199
|
+
mid `,`∤`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`⊺`),Y.veebar=Y[`⊻`]=G($,`\\veebar `,`⊻`),Y.barwedge=Y[`⊼`]=G($,`\\barwedge `,`⊼`),Y.ltimes=Y[`⋉`]=G($,`\\ltimes `,`⋉`),Y.rtimes=Y[`⋊`]=G($,`\\rtimes `,`⋊`),Y.leftthreetimes=Y[`⋋`]=G($,`\\leftthreetimes `,`⋋`),Y.rightthreetimes=Y[`⋌`]=G($,`\\rightthreetimes `,`⋌`),Y.curlyvee=Y[`⋎`]=G($,`\\curlyvee `,`⋎`),Y.curlywedge=Y[`⋏`]=G($,`\\curlywedge `,`⋏`),Y.circledcirc=Y[`⊚`]=G($,`\\circledcirc `,`⊚`),Y.circledast=Y[`⊛`]=G($,`\\circledast `,`⊛`),Y.circleddash=Y[`⊝`]=G($,`\\circleddash `,`⊝`),Y.boxplus=Y[`⊞`]=G($,`\\boxplus `,`⊞`),Y.boxminus=Y[`⊟`]=G($,`\\boxminus `,`⊟`),Y.boxtimes=Y[`⊠`]=G($,`\\boxtimes `,`⊠`),Y.boxdot=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`⋅`]=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">˙</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">˙</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`,`≯`),`\\ngtr `,`span`,`class="mq-non-leaf mq-ngtr"`),Y.nless=Y[`≮`]=G(EO(`mq-nless`,`≮`),`\\nless `,`span`,`class="mq-non-leaf mq-nless"`),Y.dot=G(wO,`\\dot`),Y.parallelogram=G(EO(`mq-parallelogram`,`▱`),`\\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">​</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">​</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 `,`∑`),Y[`∏`]=Y.prod=Y.product=G(AO,`\\prod `,`∏`),Y.coprod=Y.coproduct=G(AO,`\\coprod `,`∐`),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>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>`)},e.createLeftOf=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">​</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">√</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">√</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`,`→`,[`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">√</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"> </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={"(":`)`,")":`(`,"[":`]`,"]":`[`,"{":`}`,"}":`{`,"\\{":`\\}`,"\\}":`\\{`,"⟨":`⟩`,"⟩":`⟨`,"\\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,`⟨`,`⟩`,`\\langle `,`\\rangle `),Y.rangle=G(IO,J,`⟨`,`⟩`,`\\langle `,`\\rangle `),SD[`|`]=G(IO,q,`|`,`|`,`|`,`|`),Y.lVert=G(IO,q,`∥`,`∥`,`\\lVert `,`\\rVert `),Y.rVert=G(IO,J,`∥`,`∥`,`\\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=`⟨`,r+=` `),r==`\\lVert`&&(i=`∥`,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=`⟩`,e+=` `),e==`\\rVert`&&(t=`∥`,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=`
|
|
200
200
|
.block-container {
|
|
201
201
|
margin: 8px !important;
|
|
202
202
|
display: inline-flex;
|
|
@@ -231,9 +231,9 @@ mid `,`∤`),Y.intercal=Y[`⊺`]=G($,`\\intercal `,`⊺`),Y.veebar=Y[`
|
|
|
231
231
|
.incorrect {
|
|
232
232
|
border-color: ${Zy()} !important;
|
|
233
233
|
}
|
|
234
|
-
`,document.head.appendChild(t)}}var
|
|
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">
|
|
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];
|
|
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})();
|