@pie-element/math-inline 13.0.6-next.20261018193205 → 13.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/browser/author/index.js +2 -2
  2. package/dist/browser/controller/index.js +1 -1
  3. package/dist/browser/delivery/index.js +2 -2
  4. package/dist/browser/{dist-wLr8qNGy.js → dist-BVdDxOHw.js} +55 -55
  5. package/dist/browser/{editor-runtime/dist-CFIpidXS.js.map → dist-BVdDxOHw.js.map} +1 -1
  6. package/dist/browser/editor-runtime/author/index.js +2 -2
  7. package/dist/browser/editor-runtime/controller/index.js +1 -1
  8. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  9. package/dist/browser/editor-runtime/{dist-CFIpidXS.js → dist-BEIVwMMd.js} +55 -55
  10. package/dist/browser/editor-runtime/dist-BEIVwMMd.js.map +1 -0
  11. package/dist/browser/editor-runtime/{main-CuO1Hz4R.js → main-CBPT0tJf.js} +2 -2
  12. package/dist/browser/editor-runtime/{main-CuO1Hz4R.js.map → main-CBPT0tJf.js.map} +1 -1
  13. package/dist/browser/editor-runtime/{mathjax-CptWnMbQ-DlzgkqoE.js → mathjax-DqXi3q4c-M53s6mdE.js} +3 -3
  14. package/dist/browser/editor-runtime/{mathjax-CptWnMbQ-DlzgkqoE.js.map → mathjax-DqXi3q4c-M53s6mdE.js.map} +1 -1
  15. package/dist/browser/editor-runtime/print/index.js +3 -3
  16. package/dist/browser/{main-qc9k2bIv.js → main-BG7QHLlI.js} +2 -2
  17. package/dist/browser/{main-qc9k2bIv.js.map → main-BG7QHLlI.js.map} +1 -1
  18. package/dist/browser/{mathjax-CptWnMbQ-DdmHhmSv.js → mathjax-DqXi3q4c-CBcqCJT1.js} +3 -3
  19. package/dist/browser/{mathjax-CptWnMbQ-DdmHhmSv.js.map → mathjax-DqXi3q4c-CBcqCJT1.js.map} +1 -1
  20. package/dist/browser/print/index.js +3 -3
  21. package/dist/index.iife.js +1 -1
  22. package/dist/schemas/configuration.schema.json +1 -1
  23. package/dist/schemas/model.schema.json +1 -1
  24. package/dist/schemas/session.schema.json +1 -1
  25. package/module/print.js +31 -31
  26. package/module/print.js.map +1 -1
  27. package/package.json +16 -16
  28. package/dist/browser/dist-wLr8qNGy.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { o as e } from "../rolldown-runtime-DY7j01NX.js";
2
2
  import { a as t, m as n } from "../dist-Fa1nzZ4V.js";
3
- import { R as r } from "../dist-wLr8qNGy.js";
4
- import { t as i } from "../main-qc9k2bIv.js";
3
+ import { R as r } from "../dist-BVdDxOHw.js";
4
+ import { t as i } from "../main-BG7QHLlI.js";
5
5
  import a from "react";
6
6
  import { createRoot as o } from "react-dom/client";
7
7
  var s = (0, (/* @__PURE__ */ e(n(), 1)).default)("pie-element:math-inline:print"), c = (e, t) => {
@@ -48,7 +48,7 @@ var s = (0, (/* @__PURE__ */ e(n(), 1)).default)("pie-element:math-inline:print"
48
48
  }
49
49
  }, u = Object.freeze({
50
50
  name: "@pie-element/math-inline",
51
- version: "13.0.6-next.20261018193205"
51
+ version: "13.0.6"
52
52
  });
53
53
  //#endregion
54
54
  export { l as default, u as piePackage };
@@ -82,7 +82,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
82
82
  color: ${fg} !important;
83
83
  background-color: ${gg} !important;
84
84
  }
85
- `;function vg(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=dg,t.textContent=_g,e.head.appendChild(t)}var yg=/[⁡-⁤]/g,bg={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},xg={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},Sg={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},Cg={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},wg={"+":`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`,...xg,...Sg,...Cg},Tg=new Set([`|`,`‖`]),Eg=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),Dg={α:`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`},Og={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},kg=e=>(e.textContent??``).replace(yg,``).replace(/\s+/g,` `).trim(),Ag=e=>e.replace(/\s+/g,` `).trim(),jg=e=>[...e.children];function Mg(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?Mg(e.children[0]):!1}function Ng(e){let t=e?kg(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function Pg(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function Fg(e){return Dg[e]??e}function Ig(e){return wg[e]??e}function Lg(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(Kg(r)),n=!0;continue}let e=kg(r);e&&(!n&&bg[e]?t.push(bg[e]):e in Cg?t.push(Cg[e]):(t.push(Ig(e)),n=e in Sg||Tg.has(e)&&n))}return t.filter(Boolean).join(` `)}function Rg(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(kg(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&kg(t)===kg(r)&&!a.some(i)){let e=Ag(Lg(a));return kg(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return Lg(e)}function zg(e,t){let n=e?Kg(e):``,r=t?Kg(t):``;return Mg(e)&&Mg(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function Bg(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function Vg(e,t){let n=t?kg(t):``;if(t&&Mg(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in Cg)return`${e} ${Cg[n]}`}let r=t?Kg(t):``;return Mg(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function Hg(e,t){let n=t?Kg(t):``;return Mg(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function Ug(e,t,n){let r=kg(e);if(r===`lim`)return`limit as ${t?Kg(t):``} of`;if(!Eg.has(r))return;let i=t?`from ${Kg(t)}`:``,a=n?`to ${Kg(n)}`:``;return`${Ig(r)} ${i} ${a} of`}function Wg(e){let t=jg(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>jg(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=>Ag(Lg(jg(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function Gg(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=jg(e).map((e,t,n)=>t<n.length-1?`${Kg(e)} ${Ig(r[Math.min(t,r.length-1)]??`,`)}`:Kg(e));return[Ig(t),...i,Ig(n)].filter(Boolean).join(` `)}function Kg(e){let t=jg(e);switch(e.localName){case`mi`:return Fg(kg(e));case`mn`:case`mtext`:case`ms`:return kg(e);case`mo`:return Ig(kg(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?Kg(t[0]):``;case`mfrac`:return zg(t[0],t[1]);case`msqrt`:return Bg(Ag(Lg(t)),`square root`,t.length===1&&Mg(t[0]));case`mroot`:{let e=Ng(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${Pg(e)} root`:`root with index ${t[1]?Kg(t[1]):``}`;return Bg(t[0]?Kg(t[0]):``,n,Mg(t[0]))}case`msup`:return Vg(t[0]?Kg(t[0]):``,t[1]);case`msub`:return Hg(t[0]?Kg(t[0]):``,t[1]);case`msubsup`:return(t[0]?Ug(t[0],t[1],t[2]):void 0)||Vg(Hg(t[0]?Kg(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?Ug(n,a,o):void 0;if(s)return s;let c=n?Kg(n):``,l=e.localName===`mover`&&r?Og[kg(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${Kg(a)} below`:``,o?`with ${Kg(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return Gg(e);case`mtable`:return Wg(e);case`mrow`:case`math`:return Rg(t);default:return t.length?Lg(t):kg(e)}}function qg(e){return Ag(Kg(e))}var Jg=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function Yg(e){if(e.hasAttribute(`aria-label`)||!e.closest(Jg))return;let t=e.querySelector(`math`),n=t?qg(t):``;n&&e.setAttribute(`aria-label`,n)}function Xg(e){for(let t of e.querySelectorAll(`mjx-container`))Yg(t)}var Zg=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Qg(){let e=globalThis;e[Zg]||(e[Zg]=!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 ${Gm}`))}function $g(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(),Qg()}function e_(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`,()=>$g(e),{once:!0}),a})}`${Jm}`;var t_={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1],perpendicular:`\\perp`,divide:`\\div`},n_=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,r_=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,i_=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,a_=/\\embed\{newLine\}\[\]/g,o_=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]],s_=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),c_=`MJX-CHTML-styles`,l_=`PIE-MJX-SVG-styles`,u_=`PIE-MathJax-Menu-Settings`,d_={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},f_=200,p_=201,m_=202;function h_(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 g_(e){for(let[t,n]of o_)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function __(e){return g_(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}var v_=`mathjax_ignore`,y_=`mathjax_process`;function b_(e,t){let n=e.closest(`.${v_}, .${y_}`);return n!==null&&t.contains(n)&&!n.classList.contains(y_)}function x_(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||b_(t,e))continue;let n=t.textContent;n&&(t.textContent=`\\(${__(n)}\\)`.replace(a_,`\\newline `),t.dataset.mathHandled=`true`)}}function S_(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?i_:r_).test(e.textContent??``)}function w_(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=nh(e,{}.url),c=Qm(),l={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=mh();return T_(t)&&E_(t),e}}},startup:{typeset:!1,ready:()=>{let e=mh(),r=e?.startup,i=T_(e);i&&(E_(e),D_(e,s.speechLocales),rh(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(O_(r?.document),k_(r?.document),r?.document?.addStyles?.(d_),e_(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...t_}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:c}},a11y:{inTabOrder:c}}};r&&l.tex&&(console.warn(n_),l.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],l.tex.processEscapes=!0),a||(l.chtml={fontURL:``});let u=ih(s.speechLocales);u&&l.options&&(l.options.sre={locale:u}),gh(l,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function T_(e){return!!e?.version?.startsWith(`4.`)}function E_(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=vh);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=l_)}function D_(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=u_;try{let e=localStorage.getItem(u_);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(u_,JSON.stringify(i)):localStorage.removeItem(u_)}catch{}}}function O_(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(h_(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,p_,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&h_(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===c_&&(r.id=vh),M_()}function k_(e){let t=e=>{e.typesetRoot&&Yg(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,m_,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function A_(e){return e instanceof HTMLStyleElement&&yh.includes(e.id)}function j_(e){fh(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function M_(){let e=document.head,t=[...e.children].find(A_);if(t){j_(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(A_);if(e){j_(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function N_(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=f_&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function P_(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=mh()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function F_(e){let t=mh();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():P_(t):w_(e)}function I_(e){return F_(e).then(()=>{let e=mh();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function L_(e){let t=_h,n=t[s_];return n||(n=I_(e),t[s_]=n),n}function R_(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=bh();r&&fh(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),x_(n),wh(n),S_(n),ug(n);let i=L_(e);if(!C_(n,t)){i.catch(()=>{});return}await i;let a=mh();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){vg(),N_(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}h_(n),Xg(n)}}}var z_=`@pie-lib/math-rendering`,B_=`@pie-lib/math-rendering@2`,V_=`pie-print`,H_=50,U_=1e4,W_=null;function G_(){return!!window[B_]?.opts?.useSingleDollar}function K_(){return W_||=R_({useSingleDollar:G_()}),W_}function q_(){if(typeof window>`u`)return null;let e=window[z_];return typeof e?.renderMath==`function`&&e.renderMath!==Z_?e:null}function J_(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===V_)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Y_(){let e=window.renderMath;return typeof e==`function`?e:null}async function X_(e){let t=J_(e);if(!t)return null;let n=Y_();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+U_;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,H_));let e=Y_();if(e)return e}return null}var Z_=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=q_(),i=r||t?null:await X_(n);return r?(await r.renderMath?.(n),Xg(n)):i&&i!==Z_?(await i(n),Xg(n)):await K_()(n),t?n.innerHTML:void 0};function Q_(e){return e?e.trim().replace(/_/g,`-`).split(/[.@]/)[0].toLowerCase():``}function $_(e){return e?e.trim().replace(/_/g,`-`):``}function ev(e){let t=Q_(e);if(!t)return[];let n=t.split(`-`),r=[];for(let e=n.length;e>0;e--){let t=n.slice(0,e);t.length>1&&t[t.length-1].length===1||r.push(t.join(`-`))}return r}function tv(e,t){for(let n of ev(e)){let e=t.find(e=>Q_(e)===n);if(e!=null)return e}}var nv=`en-US`,rv=new Set([`ar`,`ckb`,`dv`,`fa`,`he`,`iw`,`ks`,`ku`,`nqo`,`ps`,`sd`,`syr`,`ug`,`ur`,`yi`]),iv=new Set([`zero`,`one`,`two`,`few`,`many`,`other`]);function av(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length>0&&t.every(e=>iv.has(e))}function ov(e){try{let t=new Intl.Locale(e).textInfo;if(t?.direction===`rtl`||t?.direction===`ltr`)return t.direction}catch{}let t=Q_(e).split(`-`)[0]??``;return rv.has(t)?`rtl`:`ltr`}var sv=class e{static{this.pluralRules=new Map}constructor(e){this.listeners=new Set,this.config={...e},this.fallbackLocale=$_(e.fallbackLocale)||`en-US`,this.catalogs=new Map([[nv,e.source]]),this.customMessages={...e.customMessages??{}},this.loading=new Map,this.locale=this.resolveLocaleTag(e.locale)??`en-US`}getLocale(){return this.locale}async setLocale(e){let t=this.resolveLocaleTag(e);if(!t){this.locale=$_(e)||`en-US`,this.notify();return}await this.ensureLoaded(t),this.locale=t,this.notify()}t(e,t){let n=this.lookup(e);return n===void 0?(this.config.onMissingKey?.(e,this.locale),e):dv(n,t,this.locale)}plural(e,t){let n=this.lookupNode(e);return n===void 0||!av(n)?this.t(e,t):dv(n[this.selectPluralCategory(t.count)]??n.other,t,this.locale)}getDirection(){return ov(this.locale)}getAvailableLocales(){return[...new Set([...this.catalogs.keys(),...this.config.availableLocales??[],...Object.keys(this.customMessages)])]}isLocaleLoaded(e){let t=this.resolveLocaleTag(e);return t!==void 0&&this.catalogs.has(t)}needsLoad(e){let t=this.resolveLocaleTag(e);return t!==void 0&&!this.catalogs.has(t)&&this.config.availableLocales?.includes(t)===!0}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}hasKey(e){return this.lookup(e)!==void 0}addCustomMessages(e,t){let n=$_(e);this.customMessages[n]=fv(this.customMessages[n]??{},t),this.notify()}withLocale(t){let n=this.resolveLocaleTag(t)??$_(t);if(n===this.locale)return this;let r=new e({...this.config,locale:n});return r.locale=n||`en-US`,r.catalogs=this.catalogs,r.customMessages=this.customMessages,r.loading=this.loading,r}formatNumber(e,t){try{return new Intl.NumberFormat(this.locale,t).format(e)}catch{return new Intl.NumberFormat(nv,t).format(e)}}formatDate(e,t){try{return new Intl.DateTimeFormat(this.locale,t).format(e)}catch{return new Intl.DateTimeFormat(nv,t).format(e)}}async ensureLoaded(e){if(this.catalogs.has(e)||!this.config.availableLocales?.includes(e))return;let t=this.loading.get(e);if(t){await t;return}let n=this.loadCatalog(e);this.loading.set(e,n);try{await n}finally{this.loading.delete(e)}}resolveLocaleTag(e){if(!e)return;let t=this.getAvailableLocales(),n=tv(e,t);if(n)return n;let r=Q_(e).split(`-`)[0];if(r)return t.find(e=>Q_(e).split(`-`)[0]===r)}async loadCatalog(e){let t=this.config.loadCatalog;if(t)try{this.catalogs.set(e,await t(e))}catch(t){throw Error(`Failed to load i18n catalog for locale: ${e}`,{cause:t})}}lookupNode(e){let t=[this.customMessages[this.locale],this.catalogs.get(this.locale),this.customMessages[this.fallbackLocale],this.catalogs.get(this.fallbackLocale)];for(let n of t){let t=cv(n,e);if(t!==void 0)return t}}lookup(e){let t=this.lookupNode(e);if(typeof t==`string`)return t;if(t!==void 0&&av(t))return t.other}selectPluralCategory(t){let n=e.pluralRules.get(this.locale);if(!n){try{n=new Intl.PluralRules(this.locale)}catch{return t===1?`one`:`other`}e.pluralRules.set(this.locale,n)}return n.select(t)}notify(){for(let e of this.listeners)e()}};function cv(e,t){if(!e)return;let n=e;for(let e of t.split(`.`))if(typeof n!=`object`||!n||(n=n[e],n===void 0))return;return n}var lv=new Map;function uv(e,t){let n=lv.get(t);if(!n){try{n=new Intl.NumberFormat(t)}catch{n=new Intl.NumberFormat(nv)}lv.set(t,n)}return n.format(e)}function dv(e,t,n){return t?e.replace(/\{(\w+)\}/g,(e,r)=>{let i=t[r];return i==null?e:n!==void 0&&typeof i==`number`&&Number.isFinite(i)?uv(i,n):String(i)}):e}function fv(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];r&&typeof r==`object`&&t&&typeof t==`object`?n[e]=fv(t,r):n[e]=r}return n}var pv=Symbol.for(`pie-element.i18n.registry`);function mv(){let e=globalThis;return e[pv]||(e[pv]={sets:new Set,messages:new Map}),e[pv]}function hv(e){let t=e.loaders??{},n=mv(),r=new sv({source:e.source,availableLocales:[nv,...Object.keys(t)],loadCatalog:async e=>(await t[e]()).default});for(let{locale:t,messages:i}of n.messages.get(e.packageName)??[])r.addCustomMessages(t,i);let i=new Map,a=new Map,o=new Set,s=e=>{let t=e||`en-US`,n=i.get(t);return n||(n=r.withLocale(t),i.set(t,n)),n},c={packageName:e.packageName,locales:[nv,...Object.keys(t)],forLocale:(e,t)=>(t&&e&&c.needsLoad(e)&&c.load(e).then(t),s(e)),needsLoad:e=>!o.has(e)&&r.needsLoad(e),load:t=>{if(!c.needsLoad(t))return Promise.resolve();let n=a.get(t);return n||(n=s(t).setLocale(t).catch(n=>{o.add(t),console.warn(`[${e.packageName}]`,n)}).finally(()=>a.delete(t)),a.set(t,n)),n},addCustomMessages:(e,t)=>{r.addCustomMessages(e,t),i.clear()}};return n.sets.add(c),c}var gv=hv({packageName:`@pie-lib/render-ui`,source:{playAudio:`Play audio`,show:`Show`,hide:`Hide`},loaders:{}}),_v=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,vv=e=>R.useState(()=>_v(e))[0],yv=H(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:Hp(),cursor:`pointer`}),bv=H(`span`)({borderBottom:`1px dotted currentColor`}),xv=H(Um)(({theme:e})=>({paddingTop:e.spacing(2)})),Sv=class extends R.Component{static propTypes={className:I.string,children:I.object,labels:I.shape({visible:I.string,hidden:I.string}),language:I.string};static defaultProps={labels:{}};state={expanded:!1};panelId=_v(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};relabel=()=>this.forceUpdate();componentDidMount(){Z_(this.root)}componentDidUpdate(){Z_(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=gv.forLocale(r,this.relabel),o=i?e.visible||a.t(`hide`):e.hidden||a.t(`show`);return(0,z.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,z.jsx)(`div`,{children:(0,z.jsx)(yv,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,z.jsx)(bv,{children:o})})}),(0,z.jsx)(`div`,{id:this.panelId,children:(0,z.jsx)(xv,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function Cv(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var wv=class e{static create(){return new e}static use(){let t=$c(e.create).current,[n,r]=R.useState(!1);return t.shouldMount=n,t.setShouldMount=r,R.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Ev(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Tv(){return wv.use()}function Ev(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Dv(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=R.useState(!1),f=B(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=B(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),R.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,z.jsx)(`span`,{className:f,style:p,children:(0,z.jsx)(`span`,{className:m})})}var Ov=Zi(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),kv=550,Av=Xn`
85
+ `;function vg(e=document){if(e.getElementById(`PIE-MJX-explorer-styles`))return;let t=e.createElement(`style`);t.id=dg,t.textContent=_g,e.head.appendChild(t)}var yg=/[⁡-⁤]/g,bg={"+":`positive`,"-":`negative`,"−":`negative`,"±":`plus or minus`,"∓":`minus or plus`},xg={"(":`open parenthesis`,"[":`open bracket`,"{":`open brace`,"⟨":`open angle bracket`,"⌊":`open floor`,"⌈":`open ceiling`},Sg={")":`close parenthesis`,"]":`close bracket`,"}":`close brace`,"⟩":`close angle bracket`,"⌋":`close floor`,"⌉":`close ceiling`},Cg={"!":`factorial`,"%":`percent`,"°":`degrees`,"′":`prime`,"″":`double prime`},wg={"+":`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`,...xg,...Sg,...Cg},Tg=new Set([`|`,`‖`]),Eg=new Set([`∑`,`∏`,`∫`,`∪`,`∩`]),Dg={α:`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`},Og={"¯":`bar`,"‾":`bar`,"―":`bar`,"^":`hat`,ˆ:`hat`,"~":`tilde`,"˜":`tilde`,"→":`vector`,"⃗":`vector`,"˙":`dot`},kg=e=>(e.textContent??``).replace(yg,``).replace(/\s+/g,` `).trim(),Ag=e=>e.replace(/\s+/g,` `).trim(),jg=e=>[...e.children];function Mg(e){return!e||[`mn`,`mi`,`mtext`,`mo`].includes(e.localName)?!0:[`mrow`,`mstyle`].includes(e.localName)&&e.children.length===1?Mg(e.children[0]):!1}function Ng(e){let t=e?kg(e):``;return/^\d{1,3}$/.test(t)?Number(t):void 0}function Pg(e){return`${e}${e%100>=11&&e%100<=13?`th`:{1:`st`,2:`nd`,3:`rd`}[e%10]??`th`}`}function Fg(e){return Dg[e]??e}function Ig(e){return wg[e]??e}function Lg(e){let t=[],n=!1;for(let r of e){if(r.localName!==`mo`){t.push(Kg(r)),n=!0;continue}let e=kg(r);e&&(!n&&bg[e]?t.push(bg[e]):e in Cg?t.push(Cg[e]):(t.push(Ig(e)),n=e in Sg||Tg.has(e)&&n))}return t.filter(Boolean).join(` `)}function Rg(e){let[t,...n]=e,r=n[n.length-1],i=e=>e?.localName===`mo`&&[`|`,`‖`].includes(kg(e)),a=n.slice(0,-1);if(a.length&&i(t)&&i(r)&&kg(t)===kg(r)&&!a.some(i)){let e=Ag(Lg(a));return kg(t)===`|`?`absolute value of ${e} end absolute value`:`norm of ${e} end norm`}return Lg(e)}function zg(e,t){let n=e?Kg(e):``,r=t?Kg(t):``;return Mg(e)&&Mg(t)?`${n} over ${r}`:`the fraction with numerator ${n} and denominator ${r}`}function Bg(e,t,n){return n?`${t} of ${e}`:`${t} of ${e} end root`}function Vg(e,t){let n=t?kg(t):``;if(t&&Mg(t)){if(n===`2`)return`${e} squared`;if(n===`3`)return`${e} cubed`;if(n in Cg)return`${e} ${Cg[n]}`}let r=t?Kg(t):``;return Mg(t)?`${e} to the power of ${r}`:`${e} to the power of ${r} end power`}function Hg(e,t){let n=t?Kg(t):``;return Mg(t)?`${e} sub ${n}`:`${e} sub ${n} end sub`}function Ug(e,t,n){let r=kg(e);if(r===`lim`)return`limit as ${t?Kg(t):``} of`;if(!Eg.has(r))return;let i=t?`from ${Kg(t)}`:``,a=n?`to ${Kg(n)}`:``;return`${Ig(r)} ${i} ${a} of`}function Wg(e){let t=jg(e).filter(e=>[`mtr`,`mlabeledtr`].includes(e.localName)),n=t.map(e=>jg(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=>Ag(Lg(jg(e)))).join(`, `)}`);return`table with ${t.length} ${t.length===1?`row`:`rows`} and ${r} ${r===1?`column`:`columns`}. ${i.join(`. `)}`}function Gg(e){let t=e.getAttribute(`open`)??`(`,n=e.getAttribute(`close`)??`)`,r=(e.getAttribute(`separators`)??`,`).replace(/\s+/g,``).split(``),i=jg(e).map((e,t,n)=>t<n.length-1?`${Kg(e)} ${Ig(r[Math.min(t,r.length-1)]??`,`)}`:Kg(e));return[Ig(t),...i,Ig(n)].filter(Boolean).join(` `)}function Kg(e){let t=jg(e);switch(e.localName){case`mi`:return Fg(kg(e));case`mn`:case`mtext`:case`ms`:return kg(e);case`mo`:return Ig(kg(e));case`mspace`:case`mphantom`:case`annotation`:case`annotation-xml`:return``;case`semantics`:return t[0]?Kg(t[0]):``;case`mfrac`:return zg(t[0],t[1]);case`msqrt`:return Bg(Ag(Lg(t)),`square root`,t.length===1&&Mg(t[0]));case`mroot`:{let e=Ng(t[1]),n=e===2?`square root`:e===3?`cube root`:e?`${Pg(e)} root`:`root with index ${t[1]?Kg(t[1]):``}`;return Bg(t[0]?Kg(t[0]):``,n,Mg(t[0]))}case`msup`:return Vg(t[0]?Kg(t[0]):``,t[1]);case`msub`:return Hg(t[0]?Kg(t[0]):``,t[1]);case`msubsup`:return(t[0]?Ug(t[0],t[1],t[2]):void 0)||Vg(Hg(t[0]?Kg(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?Ug(n,a,o):void 0;if(s)return s;let c=n?Kg(n):``,l=e.localName===`mover`&&r?Og[kg(r)]:void 0;return l?l===`vector`?`vector ${c}`:`${c} ${l}`:[c,a?`with ${Kg(a)} below`:``,o?`with ${Kg(o)} above`:``].filter(Boolean).join(` `)}case`mfenced`:return Gg(e);case`mtable`:return Wg(e);case`mrow`:case`math`:return Rg(t);default:return t.length?Lg(t):kg(e)}}function qg(e){return Ag(Kg(e))}var Jg=[`a[href]`,`button`,`label`,`summary`,...[`button`,`checkbox`,`combobox`,`link`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`switch`,`tab`,`treeitem`].map(e=>`[role="${e}"]`)].join(`, `);function Yg(e){if(e.hasAttribute(`aria-label`)||!e.closest(Jg))return;let t=e.querySelector(`math`),n=t?qg(t):``;n&&e.setAttribute(`aria-label`,n)}function Xg(e){for(let t of e.querySelectorAll(`mjx-container`))Yg(t)}var Zg=Symbol.for(`@pie-element/shared-math-rendering-mathjax/speech-worker-failed`);function Qg(){let e=globalThis;e[Zg]||(e[Zg]=!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 ${Gm}`))}function $g(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(),Qg()}function e_(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`,()=>$g(e),{once:!0}),a})}`${Jm}`;var t_={parallelogram:`\\lower.2em{\\Huge\\unicode{x25B1}}`,overarc:`\\overparen`,napprox:`\\not\\approx`,longdiv:`\\enclose{longdiv}`,abs:[`\\left|#1\\right|`,1],perpendicular:`\\perp`,divide:`\\div`},n_=/\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/,r_=/\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/,i_=/\\embed\{newLine\}\[\]/g,a_=[[`$$`,`$$`],[`$`,`$`],[`\\[`,`\\]`],[`\\(`,`\\)`]];function o_(e){for(let[t,n]of a_)if(e.startsWith(t)&&e.endsWith(n))return e.substring(t.length,e.length-n.length);return e}function s_(e){return`\\(${o_(e.includes(`\\displaystyle`)?e.replace(`\\displaystyle`,``).trim():e)}\\)`.replace(i_,`\\newline `)}var c_=`mathjax_ignore`,l_=`mathjax_process`,u_=`[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)`,d_=Symbol.for(`@pie-element/shared-math-rendering-mathjax/loading`),f_=`MJX-CHTML-styles`,p_=`PIE-MJX-SVG-styles`,m_=`PIE-MathJax-Menu-Settings`,h_={'mjx-container[overflow="linebreak"][display]':{overflow:`auto clip`,"min-width":`initial !important`}},g_=200,__=201,v_=202;function y_(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 b_(e,t){let n=e.closest(`.${c_}, .${l_}`);return n!==null&&t.contains(n)&&!n.classList.contains(`mathjax_process`)}function x_(e){for(let t of e.querySelectorAll(`[data-latex]`)){if(t.dataset.mathHandled||t.closest(`mjx-container`)||b_(t,e))continue;let n=t.textContent;n&&(t.textContent=s_(n),t.dataset.mathHandled=`true`)}}function S_(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?r_:n_).test(e.textContent??``)}function w_(e){return new Promise((t,n)=>{let{useSingleDollar:r=!1,accessibility:i=!0,loadFonts:a=!0,srcUrl:o}=e,s=nh(e,{}.url),c=Qm(),l={loader:{load:i?[`a11y/assistive-mml`]:[],failed:e=>n(e),"output/svg":{ready:e=>{let t=mh();return T_(t)&&E_(t),e}}},startup:{typeset:!1,ready:()=>{let e=mh(),r=e?.startup,i=T_(e);i&&(E_(e),D_(e,s.speechLocales),rh(e?._?.a11y?.sre_ts?.locales,s.speechLocales)),r?.defaultReady?.(),i&&(O_(r?.document),k_(r?.document),r?.document?.addStyles?.(h_),e_(r?.document)),Promise.resolve(r?.promise).then(()=>t(),n)}},tex:{macros:{...t_}},output:{displayOverflow:`linebreak`},options:{enableMenu:i,menuOptions:{settings:{assistiveMml:i,enrich:!1,inTabOrder:c}},a11y:{inTabOrder:c}}};r&&l.tex&&(console.warn(u_),l.tex.inlineMath=[[`$`,`$`],[`\\(`,`\\)`]],l.tex.processEscapes=!0),a||(l.chtml={fontURL:``});let u=ih(s.speechLocales);u&&l.options&&(l.options.sre={locale:u}),gh(l,{...s,srcUrl:o}).then(e=>{e||t()},n)})}function T_(e){return!!e?.version?.startsWith(`4.`)}function E_(e){let t=e?._?.output,n=t?.chtml_ts?.CHTML;n&&(n.STYLESHEETID=vh);let r=t?.svg_ts?.SVG;r&&(r.STYLESHEETID=p_)}function D_(e,t){let n=e?._?.ui?.menu?.Menu?.Menu;if(n){n.MENU_STORAGE=m_;try{let e=localStorage.getItem(m_);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(m_,JSON.stringify(i)):localStorage.removeItem(m_)}catch{}}}function O_(e){if(!e)return;let t=new WeakSet,n=e=>{let n=e.typesetRoot;!n||t.has(n)||(y_(n),t.add(n))};e.addRenderAction?.(`pie-strip-latex`,__,e=>{for(let t of e.math??[])n(t);return!1},e=>{let t=e.typesetRoot;return t&&y_(t),!1});let r=e.outputJax?.chtmlStyles;r?.id===f_&&(r.id=vh),M_()}function k_(e){let t=e=>{e.typesetRoot&&Yg(e.typesetRoot)};e?.addRenderAction?.(`pie-name-math`,v_,e=>{for(let n of e.math??[])t(n);return!1},e=>(t(e),!1))}function A_(e){return e instanceof HTMLStyleElement&&yh.includes(e.id)}function j_(e){fh(`foreign-output-stylesheet`,`another MathJax added <style id="${e.id}"> to <head>`)}function M_(){let e=document.head,t=[...e.children].find(A_);if(t){j_(t);return}let n=new MutationObserver(e=>{for(let t of e){let e=[...t.addedNodes].find(A_);if(e){j_(e),n.disconnect();return}}});n.observe(e,{childList:!0})}function N_(e){let t=e?.math;if(!t?.remove)return;let n=[...t].filter(e=>(e.state?.()??0)>=g_&&e.typesetRoot?.isConnected===!1);if(n.length!==0){for(let e of[...n].reverse())e.clear?.();t.remove(...n)}}function P_(e){return new Promise((t,n)=>{let r=e.startup??{};e.startup=r;let i=r.ready;r.ready=()=>{let e=mh()?.startup;i?i.call(r):e?.defaultReady?.(),Promise.resolve(e?.promise).then(()=>t(),n)}})}function F_(e){let t=mh();return t?t.version?t.startup?.promise?Promise.resolve(t.startup.promise).then(()=>void 0):Promise.resolve():P_(t):w_(e)}function I_(e){return F_(e).then(()=>{let e=mh();e&&typeof e.typesetPromise!=`function`&&console.warn(`[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.`)})}function L_(e){let t=_h,n=t[d_];return n||(n=I_(e),t[d_]=n),n}function R_(e={}){let t=e.useSingleDollar??!1;return async n=>{if(typeof window>`u`)return;let r=bh();r&&fh(`mathjax-3-global`,`window.MathJax is MathJax ${r}`),x_(n),wh(n),S_(n),ug(n);let i=L_(e);if(!C_(n,t)){i.catch(()=>{});return}await i;let a=mh();if(await a?.startup?.promise,typeof a?.typesetPromise==`function`){vg(),N_(a.startup?.document);try{await a.typesetPromise([n])}catch(e){throw a.typesetClear?.([n]),e}y_(n),Xg(n)}}}var z_=`@pie-lib/math-rendering`,B_=`@pie-lib/math-rendering@2`,V_=`pie-print`,H_=50,U_=1e4,W_=null;function G_(){return!!window[B_]?.opts?.useSingleDollar}function K_(){return W_||=R_({useSingleDollar:G_()}),W_}function q_(){if(typeof window>`u`)return null;let e=window[z_];return typeof e?.renderMath==`function`&&e.renderMath!==Z_?e:null}function J_(e){let t=e;for(;t;){if(t instanceof Element&&t.localName===V_)return t;t=t instanceof ShadowRoot?t.host:t.parentNode}return null}function Y_(){let e=window.renderMath;return typeof e==`function`?e:null}async function X_(e){let t=J_(e);if(!t)return null;let n=Y_();if(n||t.mathRenderingModuleUrlImported!==!0)return n;let r=Date.now()+U_;for(;Date.now()<r;){await new Promise(e=>setTimeout(e,H_));let e=Y_();if(e)return e}return null}var Z_=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=q_(),i=r||t?null:await X_(n);return r?(await r.renderMath?.(n),Xg(n)):i&&i!==Z_?(await i(n),Xg(n)):await K_()(n),t?n.innerHTML:void 0};function Q_(e){return e?e.trim().replace(/_/g,`-`).split(/[.@]/)[0].toLowerCase():``}function $_(e){return e?e.trim().replace(/_/g,`-`):``}function ev(e){let t=Q_(e);if(!t)return[];let n=t.split(`-`),r=[];for(let e=n.length;e>0;e--){let t=n.slice(0,e);t.length>1&&t[t.length-1].length===1||r.push(t.join(`-`))}return r}function tv(e,t){for(let n of ev(e)){let e=t.find(e=>Q_(e)===n);if(e!=null)return e}}var nv=`en-US`,rv=new Set([`ar`,`ckb`,`dv`,`fa`,`he`,`iw`,`ks`,`ku`,`nqo`,`ps`,`sd`,`syr`,`ug`,`ur`,`yi`]),iv=new Set([`zero`,`one`,`two`,`few`,`many`,`other`]);function av(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length>0&&t.every(e=>iv.has(e))}function ov(e){try{let t=new Intl.Locale(e).textInfo;if(t?.direction===`rtl`||t?.direction===`ltr`)return t.direction}catch{}let t=Q_(e).split(`-`)[0]??``;return rv.has(t)?`rtl`:`ltr`}var sv=class e{static{this.pluralRules=new Map}constructor(e){this.listeners=new Set,this.config={...e},this.fallbackLocale=$_(e.fallbackLocale)||`en-US`,this.catalogs=new Map([[nv,e.source]]),this.customMessages={...e.customMessages??{}},this.loading=new Map,this.locale=this.resolveLocaleTag(e.locale)??`en-US`}getLocale(){return this.locale}async setLocale(e){let t=this.resolveLocaleTag(e);if(!t){this.locale=$_(e)||`en-US`,this.notify();return}await this.ensureLoaded(t),this.locale=t,this.notify()}t(e,t){let n=this.lookup(e);return n===void 0?(this.config.onMissingKey?.(e,this.locale),e):dv(n,t,this.locale)}plural(e,t){let n=this.lookupNode(e);return n===void 0||!av(n)?this.t(e,t):dv(n[this.selectPluralCategory(t.count)]??n.other,t,this.locale)}getDirection(){return ov(this.locale)}getAvailableLocales(){return[...new Set([...this.catalogs.keys(),...this.config.availableLocales??[],...Object.keys(this.customMessages)])]}isLocaleLoaded(e){let t=this.resolveLocaleTag(e);return t!==void 0&&this.catalogs.has(t)}needsLoad(e){let t=this.resolveLocaleTag(e);return t!==void 0&&!this.catalogs.has(t)&&this.config.availableLocales?.includes(t)===!0}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}hasKey(e){return this.lookup(e)!==void 0}addCustomMessages(e,t){let n=$_(e);this.customMessages[n]=fv(this.customMessages[n]??{},t),this.notify()}withLocale(t){let n=this.resolveLocaleTag(t)??$_(t);if(n===this.locale)return this;let r=new e({...this.config,locale:n});return r.locale=n||`en-US`,r.catalogs=this.catalogs,r.customMessages=this.customMessages,r.loading=this.loading,r}formatNumber(e,t){try{return new Intl.NumberFormat(this.locale,t).format(e)}catch{return new Intl.NumberFormat(nv,t).format(e)}}formatDate(e,t){try{return new Intl.DateTimeFormat(this.locale,t).format(e)}catch{return new Intl.DateTimeFormat(nv,t).format(e)}}async ensureLoaded(e){if(this.catalogs.has(e)||!this.config.availableLocales?.includes(e))return;let t=this.loading.get(e);if(t){await t;return}let n=this.loadCatalog(e);this.loading.set(e,n);try{await n}finally{this.loading.delete(e)}}resolveLocaleTag(e){if(!e)return;let t=this.getAvailableLocales(),n=tv(e,t);if(n)return n;let r=Q_(e).split(`-`)[0];if(r)return t.find(e=>Q_(e).split(`-`)[0]===r)}async loadCatalog(e){let t=this.config.loadCatalog;if(t)try{this.catalogs.set(e,await t(e))}catch(t){throw Error(`Failed to load i18n catalog for locale: ${e}`,{cause:t})}}lookupNode(e){let t=[this.customMessages[this.locale],this.catalogs.get(this.locale),this.customMessages[this.fallbackLocale],this.catalogs.get(this.fallbackLocale)];for(let n of t){let t=cv(n,e);if(t!==void 0)return t}}lookup(e){let t=this.lookupNode(e);if(typeof t==`string`)return t;if(t!==void 0&&av(t))return t.other}selectPluralCategory(t){let n=e.pluralRules.get(this.locale);if(!n){try{n=new Intl.PluralRules(this.locale)}catch{return t===1?`one`:`other`}e.pluralRules.set(this.locale,n)}return n.select(t)}notify(){for(let e of this.listeners)e()}};function cv(e,t){if(!e)return;let n=e;for(let e of t.split(`.`))if(typeof n!=`object`||!n||(n=n[e],n===void 0))return;return n}var lv=new Map;function uv(e,t){let n=lv.get(t);if(!n){try{n=new Intl.NumberFormat(t)}catch{n=new Intl.NumberFormat(nv)}lv.set(t,n)}return n.format(e)}function dv(e,t,n){return t?e.replace(/\{(\w+)\}/g,(e,r)=>{let i=t[r];return i==null?e:n!==void 0&&typeof i==`number`&&Number.isFinite(i)?uv(i,n):String(i)}):e}function fv(e,t){let n={...e};for(let[e,r]of Object.entries(t)){let t=n[e];r&&typeof r==`object`&&t&&typeof t==`object`?n[e]=fv(t,r):n[e]=r}return n}var pv=Symbol.for(`pie-element.i18n.registry`);function mv(){let e=globalThis;return e[pv]||(e[pv]={sets:new Set,messages:new Map}),e[pv]}function hv(e){let t=e.loaders??{},n=mv(),r=new sv({source:e.source,availableLocales:[nv,...Object.keys(t)],loadCatalog:async e=>(await t[e]()).default});for(let{locale:t,messages:i}of n.messages.get(e.packageName)??[])r.addCustomMessages(t,i);let i=new Map,a=new Map,o=new Set,s=e=>{let t=e||`en-US`,n=i.get(t);return n||(n=r.withLocale(t),i.set(t,n)),n},c={packageName:e.packageName,locales:[nv,...Object.keys(t)],forLocale:(e,t)=>(t&&e&&c.needsLoad(e)&&c.load(e).then(t),s(e)),needsLoad:e=>!o.has(e)&&r.needsLoad(e),load:t=>{if(!c.needsLoad(t))return Promise.resolve();let n=a.get(t);return n||(n=s(t).setLocale(t).catch(n=>{o.add(t),console.warn(`[${e.packageName}]`,n)}).finally(()=>a.delete(t)),a.set(t,n)),n},addCustomMessages:(e,t)=>{r.addCustomMessages(e,t),i.clear()}};return n.sets.add(c),c}var gv=hv({packageName:`@pie-lib/render-ui`,source:{playAudio:`Play audio`,show:`Show`,hide:`Hide`},loaders:{}}),_v=e=>`${e}-${Math.random().toString(36).slice(2,10)}`,vv=e=>R.useState(()=>_v(e))[0],yv=H(`button`)({display:`inline-block`,minHeight:`24px`,padding:0,border:0,background:`transparent`,font:`inherit`,textAlign:`inherit`,color:Hp(),cursor:`pointer`}),bv=H(`span`)({borderBottom:`1px dotted currentColor`}),xv=H(Um)(({theme:e})=>({paddingTop:e.spacing(2)})),Sv=class extends R.Component{static propTypes={className:I.string,children:I.object,labels:I.shape({visible:I.string,hidden:I.string}),language:I.string};static defaultProps={labels:{}};state={expanded:!1};panelId=_v(`pie-collapsible`);toggleExpanded=()=>{this.setState(e=>({expanded:!e.expanded}))};relabel=()=>this.forceUpdate();componentDidMount(){Z_(this.root)}componentDidUpdate(){Z_(this.root)}render(){let{labels:e,children:t,className:n,language:r}=this.props,{expanded:i}=this.state,a=gv.forLocale(r,this.relabel),o=i?e.visible||a.t(`hide`):e.hidden||a.t(`show`);return(0,z.jsxs)(`div`,{className:n,ref:e=>this.root=e,children:[(0,z.jsx)(`div`,{children:(0,z.jsx)(yv,{type:`button`,"aria-expanded":i,"aria-controls":this.panelId,onClick:this.toggleExpanded,children:(0,z.jsx)(bv,{children:o})})}),(0,z.jsx)(`div`,{id:this.panelId,children:(0,z.jsx)(xv,{in:i,timeout:{enter:225,exit:195},unmountOnExit:!0,children:t})})]})}};function Cv(e){try{return e.matches(`:focus-visible`)}catch{}return!1}var wv=class e{static create(){return new e}static use(){let t=$c(e.create).current,[n,r]=R.useState(!1);return t.shouldMount=n,t.setShouldMount=r,R.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=Ev(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function Tv(){return wv.use()}function Ev(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Dv(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=R.useState(!1),f=B(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},m=B(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),R.useEffect(()=>{if(!s&&c!=null){let e=setTimeout(c,l);return()=>{clearTimeout(e)}}},[c,s,l]),(0,z.jsx)(`span`,{className:f,style:p,children:(0,z.jsx)(`span`,{className:m})})}var Ov=Zi(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),kv=550,Av=Xn`
86
86
  0% {
87
87
  transform: scale(0);
88
88
  opacity: 0.1;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6-next.20261018193205/dist/schemas/configuration.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6/dist/schemas/configuration.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "baseInputConfiguration": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6-next.20261018193205/dist/schemas/model.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6/dist/schemas/model.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "responseType": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6-next.20261018193205/dist/schemas/session.schema.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-inline@13.0.6/dist/schemas/session.schema.json",
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "id": {
package/module/print.js CHANGED
@@ -15359,36 +15359,36 @@ var ly = {
15359
15359
  abs: ["\\left|#1\\right|", 1],
15360
15360
  perpendicular: "\\perp",
15361
15361
  divide: "\\div"
15362
- }, uy = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", dy = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, fy = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, py = /\\embed\{newLine\}\[\]/g, my = [
15362
+ }, uy = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, dy = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, fy = /\\embed\{newLine\}\[\]/g, py = [
15363
15363
  ["$$", "$$"],
15364
15364
  ["$", "$"],
15365
15365
  ["\\[", "\\]"],
15366
15366
  ["\\(", "\\)"]
15367
- ], hy = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), gy = "MJX-CHTML-styles", _y = "PIE-MJX-SVG-styles", vy = "PIE-MathJax-Menu-Settings", yy = { "mjx-container[overflow=\"linebreak\"][display]": {
15367
+ ];
15368
+ function my(e) {
15369
+ for (let [t, n] of py) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
15370
+ return e;
15371
+ }
15372
+ function hy(e) {
15373
+ return `\\(${my(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e)}\\)`.replace(fy, "\\newline ");
15374
+ }
15375
+ var gy = "mathjax_ignore", _y = "mathjax_process", vy = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", yy = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), by = "MJX-CHTML-styles", xy = "PIE-MJX-SVG-styles", Sy = "PIE-MathJax-Menu-Settings", Cy = { "mjx-container[overflow=\"linebreak\"][display]": {
15368
15376
  overflow: "auto clip",
15369
15377
  "min-width": "initial !important"
15370
- } }, by = 200, xy = 201, Sy = 202;
15371
- function Cy(e) {
15378
+ } }, wy = 200, Ty = 201, Ey = 202;
15379
+ function Dy(e) {
15372
15380
  let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
15373
15381
  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");
15374
15382
  }
15375
- function wy(e) {
15376
- for (let [t, n] of my) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
15377
- return e;
15378
- }
15379
- function Ty(e) {
15380
- return wy(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
15381
- }
15382
- var Ey = "mathjax_ignore", Dy = "mathjax_process";
15383
15383
  function Oy(e, t) {
15384
- let n = e.closest(`.${Ey}, .${Dy}`);
15385
- return n !== null && t.contains(n) && !n.classList.contains(Dy);
15384
+ let n = e.closest(`.${gy}, .${_y}`);
15385
+ return n !== null && t.contains(n) && !n.classList.contains("mathjax_process");
15386
15386
  }
15387
15387
  function ky(e) {
15388
15388
  for (let t of e.querySelectorAll("[data-latex]")) {
15389
15389
  if (t.dataset.mathHandled || t.closest("mjx-container") || Oy(t, e)) continue;
15390
15390
  let n = t.textContent;
15391
- n && (t.textContent = `\\(${Ty(n)}\\)`.replace(py, "\\newline "), t.dataset.mathHandled = "true");
15391
+ n && (t.textContent = hy(n), t.dataset.mathHandled = "true");
15392
15392
  }
15393
15393
  }
15394
15394
  function Ay(e) {
@@ -15396,7 +15396,7 @@ function Ay(e) {
15396
15396
  }
15397
15397
  function jy(e, t) {
15398
15398
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
15399
- return (t ? fy : dy).test(e.textContent ?? "");
15399
+ return (t ? dy : uy).test(e.textContent ?? "");
15400
15400
  }
15401
15401
  function My(e) {
15402
15402
  return new Promise((t, n) => {
@@ -15413,7 +15413,7 @@ function My(e) {
15413
15413
  typeset: !1,
15414
15414
  ready: () => {
15415
15415
  let e = S_(), r = e?.startup, i = Ny(e);
15416
- i && (Py(e), Fy(e, s.speechLocales), f_(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (Iy(r?.document), Ly(r?.document), r?.document?.addStyles?.(yy), cy(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
15416
+ i && (Py(e), Fy(e, s.speechLocales), f_(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (Iy(r?.document), Ly(r?.document), r?.document?.addStyles?.(Cy), cy(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
15417
15417
  }
15418
15418
  },
15419
15419
  tex: { macros: { ...ly } },
@@ -15428,7 +15428,7 @@ function My(e) {
15428
15428
  a11y: { inTabOrder: c }
15429
15429
  }
15430
15430
  };
15431
- r && l.tex && (console.warn(uy), l.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], l.tex.processEscapes = !0), a || (l.chtml = { fontURL: "" });
15431
+ r && l.tex && (console.warn(vy), l.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], l.tex.processEscapes = !0), a || (l.chtml = { fontURL: "" });
15432
15432
  let u = p_(s.speechLocales);
15433
15433
  u && l.options && (l.options.sre = { locale: u }), w_(l, {
15434
15434
  ...s,
@@ -15445,18 +15445,18 @@ function Py(e) {
15445
15445
  let t = e?._?.output, n = t?.chtml_ts?.CHTML;
15446
15446
  n && (n.STYLESHEETID = E_);
15447
15447
  let r = t?.svg_ts?.SVG;
15448
- r && (r.STYLESHEETID = _y);
15448
+ r && (r.STYLESHEETID = xy);
15449
15449
  }
15450
15450
  function Fy(e, t) {
15451
15451
  let n = e?._?.ui?.menu?.Menu?.Menu;
15452
15452
  if (n) {
15453
- n.MENU_STORAGE = vy;
15453
+ n.MENU_STORAGE = Sy;
15454
15454
  try {
15455
- let e = localStorage.getItem(vy);
15455
+ let e = localStorage.getItem(Sy);
15456
15456
  if (!e) return;
15457
15457
  let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
15458
15458
  if (n === void 0 && a) return;
15459
- a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(vy, JSON.stringify(i)) : localStorage.removeItem(vy);
15459
+ a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(Sy, JSON.stringify(i)) : localStorage.removeItem(Sy);
15460
15460
  } catch {}
15461
15461
  }
15462
15462
  }
@@ -15464,23 +15464,23 @@ function Iy(e) {
15464
15464
  if (!e) return;
15465
15465
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
15466
15466
  let n = e.typesetRoot;
15467
- !n || t.has(n) || (Cy(n), t.add(n));
15467
+ !n || t.has(n) || (Dy(n), t.add(n));
15468
15468
  };
15469
- e.addRenderAction?.("pie-strip-latex", xy, (e) => {
15469
+ e.addRenderAction?.("pie-strip-latex", Ty, (e) => {
15470
15470
  for (let t of e.math ?? []) n(t);
15471
15471
  return !1;
15472
15472
  }, (e) => {
15473
15473
  let t = e.typesetRoot;
15474
- return t && Cy(t), !1;
15474
+ return t && Dy(t), !1;
15475
15475
  });
15476
15476
  let r = e.outputJax?.chtmlStyles;
15477
- r?.id === gy && (r.id = E_), By();
15477
+ r?.id === by && (r.id = E_), By();
15478
15478
  }
15479
15479
  function Ly(e) {
15480
15480
  let t = (e) => {
15481
15481
  e.typesetRoot && ry(e.typesetRoot);
15482
15482
  };
15483
- e?.addRenderAction?.("pie-name-math", Sy, (e) => {
15483
+ e?.addRenderAction?.("pie-name-math", Ey, (e) => {
15484
15484
  for (let n of e.math ?? []) t(n);
15485
15485
  return !1;
15486
15486
  }, (e) => (t(e), !1));
@@ -15511,7 +15511,7 @@ function By() {
15511
15511
  function Vy(e) {
15512
15512
  let t = e?.math;
15513
15513
  if (!t?.remove) return;
15514
- let n = [...t].filter((e) => (e.state?.() ?? 0) >= by && e.typesetRoot?.isConnected === !1);
15514
+ let n = [...t].filter((e) => (e.state?.() ?? 0) >= wy && e.typesetRoot?.isConnected === !1);
15515
15515
  if (n.length !== 0) {
15516
15516
  for (let e of [...n].reverse()) e.clear?.();
15517
15517
  t.remove(...n);
@@ -15539,8 +15539,8 @@ function Wy(e) {
15539
15539
  });
15540
15540
  }
15541
15541
  function Gy(e) {
15542
- let t = T_, n = t[hy];
15543
- return n || (n = Wy(e), t[hy] = n), n;
15542
+ let t = T_, n = t[yy];
15543
+ return n || (n = Wy(e), t[yy] = n), n;
15544
15544
  }
15545
15545
  function Ky(e = {}) {
15546
15546
  let t = e.useSingleDollar ?? !1;
@@ -15562,7 +15562,7 @@ function Ky(e = {}) {
15562
15562
  } catch (e) {
15563
15563
  throw a.typesetClear?.([n]), e;
15564
15564
  }
15565
- Cy(n), iy(n);
15565
+ Dy(n), iy(n);
15566
15566
  }
15567
15567
  };
15568
15568
  }