@hyperdreamer/pi-webui 1.26.1 → 1.26.2

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.
@@ -1,4 +1,4 @@
1
- import{l as e,n as t}from"./index-Jx8Fnguv.js";var n=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteElement=void 0,e.LiteElement=function(){function e(e,a,o){var s,c;a===void 0&&(a={}),o===void 0&&(o=[]),this.kind=e,this.attributes=t({},a),this.children=r([],n(o),!1);try{for(var l=i(this.children),u=l.next();!u.done;u=l.next()){var d=u.value;d.parent=this}}catch(e){s={error:e}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}this.styles=null}return e}()})),r=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0,e.AbstractDOMAdaptor=function(){function e(e){e===void 0&&(e=null),this.document=e}return e.prototype.node=function(e,n,r,i){var a,o;n===void 0&&(n={}),r===void 0&&(r=[]);var s=this.create(e,i);this.setAttributes(s,n);try{for(var c=t(r),l=c.next();!l.done;l=c.next()){var u=l.value;this.append(s,u)}}catch(e){a={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return s},e.prototype.setAttributes=function(e,n){var r,i,a,o,s,c;if(n.style&&typeof n.style!=`string`)try{for(var l=t(Object.keys(n.style)),u=l.next();!u.done;u=l.next()){var d=u.value;this.setStyle(e,d.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}),n.style[d])}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(n.properties)try{for(var f=t(Object.keys(n.properties)),p=f.next();!p.done;p=f.next()){var d=p.value;e[d]=n.properties[d]}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}try{for(var m=t(Object.keys(n)),h=m.next();!h.done;h=m.next()){var d=h.value;(d!==`style`||typeof n.style==`string`)&&d!==`properties`&&this.setAttribute(e,d,n[d])}}catch(e){s={error:e}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},e.prototype.replace=function(e,t){return this.insert(e,t),this.remove(t),t},e.prototype.childNode=function(e,t){return this.childNodes(e)[t]},e.prototype.allClasses=function(e){var t=this.getAttribute(e,`class`);return t?t.replace(/ +/g,` `).replace(/^ /,``).replace(/ $/,``).split(/ /):[]},e}()})),i=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.lookup=e.separateOptions=e.selectOptionsFromKeys=e.selectOptions=e.userOptions=e.defaultOptions=e.insert=e.copy=e.keys=e.makeArray=e.expandable=e.Expandable=e.OPTIONS=e.REMOVE=e.APPEND=e.isObject=void 0;var i={}.constructor;function a(e){return typeof e==`object`&&!!e&&(e.constructor===i||e.constructor===o)}e.isObject=a,e.APPEND=`[+]`,e.REMOVE=`[-]`,e.OPTIONS={invalidOption:`warn`,optionError:function(t,n){if(e.OPTIONS.invalidOption===`fatal`)throw Error(t);console.warn(`MathJax: `+t)}};var o=function(){function e(){}return e}();e.Expandable=o;function s(e){return Object.assign(Object.create(o.prototype),e)}e.expandable=s;function c(e){return Array.isArray(e)?e:[e]}e.makeArray=c;function l(e){return e?Object.keys(e).concat(Object.getOwnPropertySymbols(e)):[]}e.keys=l;function u(e){var n,r,i={};try{for(var c=t(l(e)),f=c.next();!f.done;f=c.next()){var p=f.value,m=Object.getOwnPropertyDescriptor(e,p),h=m.value;Array.isArray(h)?m.value=d([],h,!1):a(h)&&(m.value=u(h)),m.enumerable&&(i[p]=m)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object.defineProperties(e.constructor===o?s({}):{},i)}e.copy=u;function d(i,s,c){var f,p;c===void 0&&(c=!0);var m=function(t){if(c&&i[t]===void 0&&i.constructor!==o)return typeof t==`symbol`&&(t=t.toString()),e.OPTIONS.optionError(`Invalid option "${t}" (no default value).`,t),`continue`;var f=s[t],p=i[t];if(a(f)&&p!==null&&(typeof p==`object`||typeof p==`function`)){var m=l(f);Array.isArray(p)&&(m.length===1&&(m[0]===e.APPEND||m[0]===e.REMOVE)&&Array.isArray(f[m[0]])||m.length===2&&m.sort().join(`,`)===e.APPEND+`,`+e.REMOVE&&Array.isArray(f[e.APPEND])&&Array.isArray(f[e.REMOVE]))?(f[e.REMOVE]&&(p=i[t]=p.filter(function(t){return f[e.REMOVE].indexOf(t)<0})),f[e.APPEND]&&(i[t]=r(r([],n(p),!1),n(f[e.APPEND]),!1))):d(p,f,c)}else Array.isArray(f)?(i[t]=[],d(i[t],f,!1)):a(f)?i[t]=u(f):i[t]=f};try{for(var h=t(l(s)),g=h.next();!g.done;g=h.next()){var _=g.value;m(_)}}catch(e){f={error:e}}finally{try{g&&!g.done&&(p=h.return)&&p.call(h)}finally{if(f)throw f.error}}return i}e.insert=d;function f(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!1)}),e}e.defaultOptions=f;function p(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!0)}),e}e.userOptions=p;function m(e){for(var n,r,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var o={};try{for(var s=t(i),c=s.next();!c.done;c=s.next()){var l=c.value;e.hasOwnProperty(l)&&(o[l]=e[l])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}e.selectOptions=m;function h(e,t){return m.apply(void 0,r([e],n(Object.keys(t)),!1))}e.selectOptionsFromKeys=h;function g(e){for(var n,r,i,a,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var c=[];try{for(var l=t(o),u=l.next();!u.done;u=l.next()){var d=u.value,f={},p={};try{for(var m=(i=void 0,t(Object.keys(e||{}))),h=m.next();!h.done;h=m.next()){var g=h.value;(d[g]===void 0?p:f)[g]=e[g]}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}c.push(f),e=p}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c.unshift(e),c}e.separateOptions=g;function _(e,t,n){return n===void 0&&(n=null),t.hasOwnProperty(e)?t[e]:n}e.lookup=_})),a=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMixin=e.NodeMixinOptions=void 0;var r=i();e.NodeMixinOptions={badCSS:!0,badSizes:!0};function a(i,a){var o;return a===void 0&&(a={}),a=(0,r.userOptions)((0,r.defaultOptions)({},e.NodeMixinOptions),a),o=function(e){t(n,e);function n(){var t=[...arguments],n=e.call(this,t[0])||this,i=n.constructor;return n.options=(0,r.userOptions)((0,r.defaultOptions)({},i.OPTIONS),t[1]),n}return n.prototype.fontSize=function(t){return a.badCSS?this.options.fontSize:e.prototype.fontSize.call(this,t)},n.prototype.fontFamily=function(t){return a.badCSS?this.options.fontFamily:e.prototype.fontFamily.call(this,t)},n.prototype.nodeSize=function(t,r,i){if(r===void 0&&(r=1),i===void 0&&(i=null),!a.badSizes)return e.prototype.nodeSize.call(this,t,r,i);var o=this.textContent(t),s=Array.from(o.replace(n.cjkPattern,``)).length;return[(Array.from(o).length-s)*this.options.cjkCharWidth+s*this.options.unknownCharWidth,this.options.unknownCharHeight]},n.prototype.nodeBBox=function(t){return a.badSizes?{left:0,right:0,top:0,bottom:0}:e.prototype.nodeBBox.call(this,t)},n}(i),o.OPTIONS=n(n({},a.badCSS?{fontSize:16,fontFamily:`Times`}:{}),a.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),o.cjkPattern=new RegExp([`[`,`ᄀ-ᅟ`,`〈〉`,`⺀-〾`,`぀-㉇`,`㉐-䶿`,`一-꓆`,`ꥠ-ꥼ`,`가-힣`,`豈-﫿`,`︐-︙`,`︰-﹫`,`!-⦆¢-₩`,`𛀀-𛀁`,`🈀-🉑`,`𠀀-𿿽`,`]`].join(``),`gu`),o}e.NodeMixin=a})),o=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteDocument=void 0;var t=n();e.LiteDocument=function(){function e(){this.root=new t.LiteElement(`html`,{},[this.head=new t.LiteElement(`head`),this.body=new t.LiteElement(`body`)]),this.type=``}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#document`},enumerable:!1,configurable:!0}),e}()})),s=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.LiteComment=e.LiteText=void 0;var n=function(){function e(e){e===void 0&&(e=``),this.value=e}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#text`},enumerable:!1,configurable:!0}),e}();e.LiteText=n,e.LiteComment=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"kind",{get:function(){return`#comment`},enumerable:!1,configurable:!0}),n}(n)})),c=e((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteList=void 0,e.LiteList=function(){function e(e){this.nodes=[],this.nodes=n([],t(e),!1)}return e.prototype.append=function(e){this.nodes.push(e)},e.prototype[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.nodes.length?{value:null,done:!0}:{value:this.nodes[e++],done:!1}}}},e}()})),l=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retryAfter=e.handleRetriesFor=void 0;function t(e){return new Promise(function t(n,r){try{n(e())}catch(e){e.retry&&e.retry instanceof Promise?e.retry.then(function(){return t(n,r)}).catch(function(e){return r(e)}):e.restart&&e.restart.isCallback?MathJax.Callback.After(function(){return t(n,r)},e.restart):r(e)}})}e.handleRetriesFor=t;function n(e){var t=Error(`MathJax retry`);throw t.retry=e,t}e.retryAfter=n})),u=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`3.2.2`})),d=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PrioritizedList=void 0,e.PrioritizedList=function(){function e(){this.items=[],this.items=[]}return e.prototype[Symbol.iterator]=function(){var e=0,t=this.items;return{next:function(){return{value:t[e++],done:e>t.length}}}},e.prototype.add=function(t,n){n===void 0&&(n=e.DEFAULTPRIORITY);var r=this.items.length;do r--;while(r>=0&&n<this.items[r].priority);return this.items.splice(r+1,0,{item:t,priority:n}),t},e.prototype.remove=function(e){var t=this.items.length;do t--;while(t>=0&&this.items[t].item!==e);t>=0&&this.items.splice(t,1)},e.DEFAULTPRIORITY=5,e}()})),f=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0,e.HandlerList=function(e){t(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.register=function(e){return this.add(e,e.priority)},r.prototype.unregister=function(e){this.remove(e)},r.prototype.handlesDocument=function(e){var t,r;try{for(var i=n(this),a=i.next();!a.done;a=i.next()){var o=a.value.item;if(o.handlesDocument(e))return o}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw Error(`Can't find handler for document`)},r.prototype.document=function(e,t){return t===void 0&&(t=null),this.handlesDocument(e).create(e,t)},r}(d().PrioritizedList)})),p=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathjax=void 0;var t=u(),n=f(),r=l();e.mathjax={version:t.VERSION,handlers:new n.HandlerList,document:function(t,n){return e.mathjax.handlers.document(t,n)},handleRetriesFor:r.handleRetriesFor,retryAfter:r.retryAfter,asyncLoad:null}})),m=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var t=p();function n(e){return t.mathjax.asyncLoad?new Promise(function(n,r){var i=t.mathjax.asyncLoad(e);i instanceof Promise?i.then(function(e){return n(e)}).catch(function(e){return r(e)}):n(i)}):Promise.reject(`Can't load '${e}': No asyncLoad method specified`)}e.asyncLoad=n})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numeric=e.translate=e.remove=e.add=e.entities=e.options=void 0;var t=l(),n=m();e.options={loadMissingEntities:!0},e.entities={ApplyFunction:`⁡`,Backslash:`∖`,Because:`∵`,Breve:`˘`,Cap:`⋒`,CenterDot:`·`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,Congruent:`≡`,ContourIntegral:`∮`,Coproduct:`∐`,Cross:`⨯`,Cup:`⋓`,CupCap:`≍`,Dagger:`‡`,Del:`∇`,Delta:`Δ`,Diamond:`⋄`,DifferentialD:`ⅆ`,DotEqual:`≐`,DoubleDot:`¨`,DoubleRightTee:`⊨`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownLeftVector:`↽`,DownRightVector:`⇁`,DownTee:`⊤`,Downarrow:`⇓`,Element:`∈`,EqualTilde:`≂`,Equilibrium:`⇌`,Exists:`∃`,ExponentialE:`ⅇ`,FilledVerySmallSquare:`▪`,ForAll:`∀`,Gamma:`Γ`,Gg:`⋙`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Hacek:`ˇ`,Hat:`^`,HumpDownHump:`≎`,HumpEqual:`≏`,Im:`ℑ`,ImaginaryI:`ⅈ`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Lambda:`Λ`,Larr:`↞`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDownVector:`⇃`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftTee:`⊣`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpVector:`↿`,LeftVector:`↼`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessSlantEqual:`⩽`,LessTilde:`≲`,Ll:`⋘`,Lleftarrow:`⇚`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lsh:`↰`,MinusPlus:`∓`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotPrecedes:`⊀`,NotPrecedesSlantEqual:`⋠`,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsSlantEqual:`⋡`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotVerticalBar:`∤`,Omega:`Ω`,OverBar:`‾`,OverBrace:`⏞`,PartialD:`∂`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Product:`∏`,Proportional:`∝`,Psi:`Ψ`,Rarr:`↠`,Re:`ℜ`,ReverseEquilibrium:`⇋`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDownVector:`⇂`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpVector:`↾`,RightVector:`⇀`,Rightarrow:`⇒`,Rrightarrow:`⇛`,Rsh:`↱`,Sigma:`Σ`,SmallCircle:`∘`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Star:`⋆`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,Therefore:`∴`,Theta:`Θ`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,UnderBar:`_`,UnderBrace:`⏟`,Union:`⋃`,UnionPlus:`⊎`,UpArrow:`↑`,UpDownArrow:`↕`,UpTee:`⊥`,Uparrow:`⇑`,Updownarrow:`⇕`,Upsilon:`Υ`,Vdash:`⊩`,Vee:`⋁`,VerticalBar:`∣`,VerticalTilde:`≀`,Vvdash:`⊪`,Wedge:`⋀`,Xi:`Ξ`,amp:`&`,acute:`´`,aleph:`ℵ`,alpha:`α`,amalg:`⨿`,and:`∧`,ang:`∠`,angmsd:`∡`,angsph:`∢`,ape:`≊`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,beta:`β`,beth:`ℶ`,between:`≬`,bigcirc:`◯`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,blacklozenge:`⧫`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,bowtie:`⋈`,boxdl:`┐`,boxdr:`┌`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxur:`└`,bsol:`\\`,bull:`•`,cap:`∩`,check:`✓`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,clubs:`♣`,colon:`:`,comp:`∁`,ctdot:`⋯`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cup:`∪`,curarr:`↷`,curlyvee:`⋎`,curlywedge:`⋏`,dagger:`†`,daleth:`ℸ`,ddarr:`⇊`,deg:`°`,delta:`δ`,digamma:`ϝ`,div:`÷`,divideontimes:`⋇`,dot:`˙`,doteqdot:`≑`,dotplus:`∔`,dotsquare:`⊡`,dtdot:`⋱`,ecir:`≖`,efDot:`≒`,egs:`⪖`,ell:`ℓ`,els:`⪕`,empty:`∅`,epsi:`ε`,epsiv:`ϵ`,erDot:`≓`,eta:`η`,eth:`ð`,flat:`♭`,fork:`⋔`,frown:`⌢`,gEl:`⪌`,gamma:`γ`,gap:`⪆`,gimel:`ℷ`,gnE:`≩`,gnap:`⪊`,gne:`⪈`,gnsim:`⋧`,gt:`>`,gtdot:`⋗`,harrw:`↭`,hbar:`ℏ`,hellip:`…`,hookleftarrow:`↩`,hookrightarrow:`↪`,imath:`ı`,infin:`∞`,intcal:`⊺`,iota:`ι`,jmath:`ȷ`,kappa:`κ`,kappav:`ϰ`,lEg:`⪋`,lambda:`λ`,lap:`⪅`,larrlp:`↫`,larrtl:`↢`,lbrace:`{`,lbrack:`[`,le:`≤`,leftleftarrows:`⇇`,leftthreetimes:`⋋`,lessdot:`⋖`,lmoust:`⎰`,lnE:`≨`,lnap:`⪉`,lne:`⪇`,lnsim:`⋦`,longmapsto:`⟼`,looparrowright:`↬`,lowast:`∗`,loz:`◊`,lt:`<`,ltimes:`⋉`,ltri:`◃`,macr:`¯`,malt:`✠`,mho:`℧`,mu:`μ`,multimap:`⊸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,natur:`♮`,nearr:`↗`,nharr:`↮`,nlarr:`↚`,not:`¬`,nrarr:`↛`,nu:`ν`,nvDash:`⊭`,nvdash:`⊬`,nwarr:`↖`,omega:`ω`,omicron:`ο`,or:`∨`,osol:`⊘`,period:`.`,phi:`φ`,phiv:`ϕ`,pi:`π`,piv:`ϖ`,prap:`⪷`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,prime:`′`,psi:`ψ`,quot:`"`,rarrtl:`↣`,rbrace:`}`,rbrack:`]`,rho:`ρ`,rhov:`ϱ`,rightrightarrows:`⇉`,rightthreetimes:`⋌`,ring:`˚`,rmoust:`⎱`,rtimes:`⋊`,rtri:`▹`,scap:`⪸`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,sdot:`⋅`,searr:`↘`,sect:`§`,sharp:`♯`,sigma:`σ`,sigmav:`ς`,simne:`≆`,smile:`⌣`,spades:`♠`,sub:`⊂`,subE:`⫅`,subnE:`⫋`,subne:`⊊`,supE:`⫆`,supnE:`⫌`,supne:`⊋`,swarr:`↙`,tau:`τ`,theta:`θ`,thetav:`ϑ`,tilde:`˜`,times:`×`,triangle:`▵`,triangleq:`≜`,upsi:`υ`,upuparrows:`⇈`,veebar:`⊻`,vellip:`⋮`,weierp:`℘`,xi:`ξ`,yen:`¥`,zeta:`ζ`,zigrarr:`⇝`,nbsp:`\xA0`,rsquo:`’`,lsquo:`‘`};var r={};function i(t,n){Object.assign(e.entities,t),r[n]=!0}e.add=i;function a(t){delete e.entities[t]}e.remove=a;function o(e){return e.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,s)}e.translate=o;function s(i,a){if(a.charAt(0)===`#`)return c(a.slice(1));if(e.entities[a])return e.entities[a];if(e.options.loadMissingEntities){var o=a.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:a.charAt(0).toLowerCase();r[o]||(r[o]=!0,(0,t.retryAfter)((0,n.asyncLoad)(`./util/entities/`+o+`.js`)))}return i}function c(e){var t=e.charAt(0)===`x`?parseInt(e.slice(1),16):parseInt(e);return String.fromCodePoint(t)}e.numeric=c})),g=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},o=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteParser=e.PATTERNS=void 0;var c=i(h()),l=n(),u=s(),d;(function(e){e.TAGNAME=`[a-z][^\\s\\n>]*`,e.ATTNAME=`[a-z][^\\s\\n>=]*`,e.VALUE=`(?:'[^']*'|"[^"]*"|[^\\s\\n]+)`,e.VALUESPLIT=`(?:'([^']*)'|"([^"]*)"|([^\\s\\n]+))`,e.SPACE=`(?:\\s|\\n)+`,e.OPTIONALSPACE=`(?:\\s|\\n)*`,e.ATTRIBUTE=e.ATTNAME+`(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUE+`)?`,e.ATTRIBUTESPLIT=`(`+e.ATTNAME+`)(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUESPLIT+`)?`,e.TAG=`(<(?:`+e.TAGNAME+`(?:`+e.SPACE+e.ATTRIBUTE+`)*`+e.OPTIONALSPACE+`/?|/`+e.TAGNAME+`|!--[^]*?--|![^]*?)(?:>|$))`,e.tag=new RegExp(e.TAG,`i`),e.attr=new RegExp(e.ATTRIBUTE,`i`),e.attrsplit=new RegExp(e.ATTRIBUTESPLIT,`i`)})(d=e.PATTERNS||={}),e.LiteParser=function(){function e(){}return e.prototype.parseFromString=function(e,t,n){t===void 0&&(t=`text/html`),n===void 0&&(n=null);for(var r=n.createDocument(),i=n.body(r),a=e.replace(/<\?.*?\?>/g,``).split(d.tag);a.length;){var o=a.shift(),s=a.shift();o&&this.addText(n,i,o),s&&s.charAt(s.length-1)===`>`&&(s.charAt(1)===`!`?this.addComment(n,i,s):i=s.charAt(1)===`/`?this.closeTag(n,i,s):this.openTag(n,i,s,a))}return this.checkDocument(n,r),r},e.prototype.addText=function(e,t,n){return n=c.translate(n),e.append(t,e.text(n))},e.prototype.addComment=function(e,t,n){return e.append(t,new u.LiteComment(n))},e.prototype.closeTag=function(e,t,n){for(var r=n.slice(2,n.length-1).toLowerCase();e.parent(t)&&e.kind(t)!==r;)t=e.parent(t);return e.parent(t)},e.prototype.openTag=function(e,t,n,r){var i=this.constructor.PCDATA,a=this.constructor.SELF_CLOSING,o=n.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(),s=e.node(o),c=n.replace(/^<.*?[\s\n>]/,``).split(d.attrsplit);return(c.pop().match(/>$/)||c.length<5)&&(this.addAttributes(e,s,c),e.append(t,s),!a[o]&&!n.match(/\/>$/)&&(i[o]?this.handlePCDATA(e,s,o,r):t=s)),t},e.prototype.addAttributes=function(e,t,n){for(var r=this.constructor.CDATA_ATTR;n.length;){var i=a(n.splice(0,5),5),o=i[1],s=i[2],l=i[3],u=i[4],d=s||l||u||``;r[o]||(d=c.translate(d)),e.setAttribute(t,o,d)}},e.prototype.handlePCDATA=function(e,t,n,r){for(var i=[],a=`</`+n+`>`,o=``;r.length&&o!==a;)i.push(o),i.push(r.shift()),o=r.shift();e.append(t,e.text(i.join(``)))},e.prototype.checkDocument=function(e,t){var n,r,i,a,s=this.getOnlyChild(e,e.body(t));if(s){try{for(var c=o(e.childNodes(e.body(t))),l=c.next();!l.done;l=c.next()){var d=l.value;if(d===s)break;d instanceof u.LiteComment&&d.value.match(/^<!DOCTYPE/)&&(t.type=d.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}switch(e.kind(s)){case`html`:try{for(var f=o(s.children),p=f.next();!p.done;p=f.next()){var d=p.value;switch(e.kind(d)){case`head`:t.head=d;break;case`body`:t.body=d;break}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}t.root=s,e.remove(s),e.parent(t.body)!==s&&e.append(s,t.body),e.parent(t.head)!==s&&e.insert(t.head,t.body);break;case`head`:t.head=e.replace(s,t.head);break;case`body`:t.body=e.replace(s,t.body);break}}},e.prototype.getOnlyChild=function(e,t){var n,r,i=null;try{for(var a=o(e.childNodes(t)),s=a.next();!s.done;s=a.next()){var c=s.value;if(c instanceof l.LiteElement){if(i)return null;i=c}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.serialize=function(e,t,n){var r=this;n===void 0&&(n=!1);var i=this.constructor.SELF_CLOSING,a=this.constructor.CDATA_ATTR,o=e.kind(t),s=e.allAttributes(t).map(function(e){return e.name+`="`+(a[e.name]?e.value:r.protectAttribute(e.value))+`"`}).join(` `),c=this.serializeInner(e,t,n);return`<`+o+(s?` `+s:``)+((!n||c)&&!i[o]?`>${c}</${o}>`:n?`/>`:`>`)},e.prototype.serializeInner=function(e,t,n){var r=this;return n===void 0&&(n=!1),this.constructor.PCDATA.hasOwnProperty(t.kind)?e.childNodes(t).map(function(t){return e.value(t)}).join(``):e.childNodes(t).map(function(t){var i=e.kind(t);return i===`#text`?r.protectHTML(e.value(t)):i===`#comment`?t.value:r.serialize(e,t,n)}).join(``)},e.prototype.protectAttribute=function(e){return typeof e!=`string`&&(e=String(e)),e.replace(/"/g,`&quot;`)},e.prototype.protectHTML=function(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)},e.SELF_CLOSING={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},e.PCDATA={option:!0,textarea:!0,fieldset:!0,title:!0,style:!0,script:!0},e.CDATA_ATTR={style:!0,datafld:!0,datasrc:!0,href:!0,src:!0,longdesc:!0,usemap:!0,cite:!0,datetime:!0,action:!0,axis:!0,profile:!0,content:!0,scheme:!0},e}()})),_=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteWindow=void 0;var t=n(),r=o(),i=c(),a=g();e.LiteWindow=function(){function e(){this.DOMParser=a.LiteParser,this.NodeList=i.LiteList,this.HTMLCollection=i.LiteList,this.HTMLElement=t.LiteElement,this.DocumentFragment=i.LiteList,this.Document=r.LiteDocument,this.document=new r.LiteDocument}return e}()})),v=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.Styles=void 0;var i=[`top`,`right`,`bottom`,`left`],a=[`width`,`style`,`color`];function o(e){for(var t=e.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),n=[];t.length>1;)t.shift(),n.push(t.shift());return n}function s(e){var n,r,i=o(this.styles[e]);i.length===0&&i.push(``),i.length===1&&i.push(i[0]),i.length===2&&i.push(i[0]),i.length===3&&i.push(i[1]);try{for(var a=t(v.connect[e].children),s=a.next();!s.done;s=a.next()){var c=s.value;this.setStyle(this.childName(e,c),i.shift())}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function c(e){var n,r,i=v.connect[e].children,a=[];try{for(var o=t(i),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.styles[e+`-`+c];if(!l){delete this.styles[e];return}a.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a[3]===a[1]&&(a.pop(),a[2]===a[0]&&(a.pop(),a[1]===a[0]&&a.pop())),this.styles[e]=a.join(` `)}function l(e){var n,r;try{for(var i=t(v.connect[e].children),a=i.next();!a.done;a=i.next()){var o=a.value;this.setStyle(this.childName(e,o),this.styles[e])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function u(e){var i,a,o=r([],n(v.connect[e].children),!1),s=this.styles[this.childName(e,o.shift())];try{for(var c=t(o),l=c.next();!l.done;l=c.next()){var u=l.value;if(this.styles[this.childName(e,u)]!==s){delete this.styles[e];return}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}this.styles[e]=s}var d={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function f(e){var n,r,i,a,s={width:``,style:``,color:``};try{for(var c=t(o(this.styles[e])),l=c.next();!l.done;l=c.next()){var u=l.value;u.match(d.width)&&s.width===``?s.width=u:u.match(d.style)&&s.style===``?s.style=u:s.color=u}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var f=t(v.connect[e].children),p=f.next();!p.done;p=f.next()){var m=p.value;this.setStyle(this.childName(e,m),s[m])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}function p(e){var n,r,i=[];try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.styles[this.childName(e,s)];c&&i.push(c)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}i.length?this.styles[e]=i.join(` `):delete this.styles[e]}var m={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:RegExp(`^(?:`+[`normal|none`,`inherit|initial|unset`,`common-ligatures|no-common-ligatures`,`discretionary-ligatures|no-discretionary-ligatures`,`historical-ligatures|no-historical-ligatures`,`contextual|no-contextual`,`(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)`,`small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps`,`lining-nums|oldstyle-nums|proportional-nums|tabular-nums`,`diagonal-fractions|stacked-fractions`,`ordinal|slashed-zero`,`jis78|jis83|jis90|jis04|simplified|traditional`,`full-width|proportional-width`,`ruby`].join(`|`)+`)$`),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:RegExp(`^(?:`+[`normal`,`(?:(?:ultra|extra|semi)-)?condensed`,`(?:(?:semi|extra|ulta)-)?expanded`,`inherit|initial|unset`].join(`|`)+`)$`),size:RegExp(`^(?:`+[`xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller`,`[d.]+%|[d.]+[a-z]+`,`inherit|initial|unset`].join(`|`)+`)(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$`)};function h(e){var r,i,a,s,c=o(this.styles[e]),l={style:``,variant:[],weight:``,stretch:``,size:``,family:``,"line-height":``};try{for(var u=t(c),d=u.next();!d.done;d=u.next()){var f=d.value;l.family=f;try{for(var p=(a=void 0,t(Object.keys(m))),h=p.next();!h.done;h=p.next()){var _=h.value;if((Array.isArray(l[_])||l[_]===``)&&f.match(m[_]))if(_===`size`){var v=n(f.split(/\//),2),y=v[0],b=v[1];l[_]=y,b&&(l[`line-height`]=b)}else l.size===``&&(Array.isArray(l[_])?l[_].push(f):l[_]=f)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}g(e,l),delete this.styles[e]}function g(e,n){var r,i;try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.childName(e,s);if(Array.isArray(n[s])){var l=n[s];l.length&&(this.styles[c]=l.join(` `))}else n[s]!==``&&(this.styles[c]=n[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _(e){}var v=function(){function e(e){e===void 0&&(e=``),this.parse(e)}return Object.defineProperty(e.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=t(Object.keys(this.styles)),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.parentName(o);this.styles[s]||r.push(o+`: `+this.styles[o]+`;`)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(` `)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,n){for(t=this.normalizeName(t),this.setStyle(t,n),e.connect[t]&&!e.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/)&&(t=this.parentName(t),e.connect[t]);)e.connect[t].combine.call(this,t)},e.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:``},e.prototype.setStyle=function(t,n){this.styles[t]=n,e.connect[t]&&e.connect[t].children&&e.connect[t].split.call(this,t),n===``&&delete this.styles[t]},e.prototype.combineChildren=function(n){var r,i,a=this.parentName(n);try{for(var o=t(e.connect[n].children),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.childName(a,c);e.connect[l].combine.call(this,l)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.parentName=function(e){var t=e.replace(/-[^-]*$/,``);return e===t?``:t},e.prototype.childName=function(t,n){return n.match(/-/)?n:(e.connect[t]&&!e.connect[t].combine&&(n+=t.replace(/.*-/,`-`),t=this.parentName(t)),t+`-`+n)},e.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(e){return`-`+e.toLowerCase()})},e.prototype.parse=function(e){e===void 0&&(e=``);var t=this.constructor.pattern;this.styles={};for(var r=e.replace(t.comment,``).split(t.style);r.length>1;){var i=n(r.splice(0,3),3),a=i[0],o=i[1],s=i[2];if(a.match(/[^\s\n]/))return;this.set(o,s)}},e.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},e.connect={padding:{children:i,split:s,combine:c},border:{children:i,split:l,combine:u},"border-top":{children:a,split:f,combine:p},"border-right":{children:a,split:f,combine:p},"border-bottom":{children:a,split:f,combine:p},"border-left":{children:a,split:f,combine:p},"border-width":{children:i,split:s,combine:null},"border-style":{children:i,split:s,combine:null},"border-color":{children:i,split:s,combine:null},font:{children:[`style`,`variant`,`weight`,`stretch`,`line-height`,`size`,`family`],split:h,combine:_}},e}();e.Styles=v})),y=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},c=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},l=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},u=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.liteAdaptor=e.LiteAdaptor=e.LiteBase=void 0;var d=r(),f=a(),p=o(),m=n(),h=s(),y=_(),b=g(),x=v(),S=function(e){t(n,e);function n(){var t=e.call(this)||this;return t.parser=new b.LiteParser,t.window=new y.LiteWindow,t}return n.prototype.parse=function(e,t){return this.parser.parseFromString(e,t,this)},n.prototype.create=function(e,t){return t===void 0&&(t=null),new m.LiteElement(e)},n.prototype.text=function(e){return new h.LiteText(e)},n.prototype.comment=function(e){return new h.LiteComment(e)},n.prototype.createDocument=function(){return new p.LiteDocument},n.prototype.head=function(e){return e.head},n.prototype.body=function(e){return e.body},n.prototype.root=function(e){return e.root},n.prototype.doctype=function(e){return e.type},n.prototype.tags=function(e,t,n){n===void 0&&(n=null);var r=[],i=[];if(n)return i;for(var a=e;a;){var o=a.kind;o!==`#text`&&o!==`#comment`&&(a=a,o===t&&i.push(a),a.children.length&&(r=a.children.concat(r))),a=r.shift()}return i},n.prototype.elementById=function(e,t){for(var n=[],r=e;r;){if(r.kind!==`#text`&&r.kind!==`#comment`){if(r=r,r.attributes.id===t)return r;r.children.length&&(n=r.children.concat(n))}r=n.shift()}return null},n.prototype.elementsByClass=function(e,t){for(var n=[],r=[],i=e;i;)i.kind!==`#text`&&i.kind!==`#comment`&&(i=i,(i.attributes.class||``).trim().split(/ +/).includes(t)&&r.push(i),i.children.length&&(n=i.children.concat(n))),i=n.shift();return r},n.prototype.getElements=function(e,t){var n,r,i=[],a=this.body(t);try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var l=s.value;if(typeof l==`string`)if(l.charAt(0)===`#`){var u=this.elementById(a,l.slice(1));u&&i.push(u)}else l.charAt(0)===`.`?i=i.concat(this.elementsByClass(a,l.slice(1))):l.match(/^[-a-z][-a-z0-9]*$/i)&&(i=i.concat(this.tags(a,l)));else Array.isArray(l)?i=i.concat(l):l instanceof this.window.NodeList||l instanceof this.window.HTMLCollection?i=i.concat(l.nodes):i.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},n.prototype.contains=function(e,t){for(;t&&t!==e;)t=this.parent(t);return!!t},n.prototype.parent=function(e){return e.parent},n.prototype.childIndex=function(e){return e.parent?e.parent.children.findIndex(function(t){return t===e}):-1},n.prototype.append=function(e,t){return t.parent&&this.remove(t),e.children.push(t),t.parent=e,t},n.prototype.insert=function(e,t){if(e.parent&&this.remove(e),t&&t.parent){var n=this.childIndex(t);t.parent.children.splice(n,0,e),e.parent=t.parent}},n.prototype.remove=function(e){var t=this.childIndex(e);return t>=0&&e.parent.children.splice(t,1),e.parent=null,e},n.prototype.replace=function(e,t){var n=this.childIndex(t);return n>=0&&(t.parent.children[n]=e,e.parent=t.parent,t.parent=null),t},n.prototype.clone=function(e){var t=this,n=new m.LiteElement(e.kind);return n.attributes=i({},e.attributes),n.children=e.children.map(function(e){if(e.kind===`#text`)return new h.LiteText(e.value);if(e.kind===`#comment`)return new h.LiteComment(e.value);var r=t.clone(e);return r.parent=n,r}),n},n.prototype.split=function(e,t){var n=new h.LiteText(e.value.slice(t));return e.value=e.value.slice(0,t),e.parent.children.splice(this.childIndex(e)+1,0,n),n.parent=e.parent,n},n.prototype.next=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)+1;return n>=0&&n<t.children.length?t.children[n]:null},n.prototype.previous=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)-1;return n>=0?t.children[n]:null},n.prototype.firstChild=function(e){return e.children[0]},n.prototype.lastChild=function(e){return e.children[e.children.length-1]},n.prototype.childNodes=function(e){return u([],l(e.children),!1)},n.prototype.childNode=function(e,t){return e.children[t]},n.prototype.kind=function(e){return e.kind},n.prototype.value=function(e){return e.kind===`#text`?e.value:e.kind===`#comment`?e.value.replace(/^<!(--)?((?:.|\n)*)\1>$/,`$2`):``},n.prototype.textContent=function(e){var t=this;return e.children.reduce(function(e,n){return e+(n.kind===`#text`?n.value:n.kind===`#comment`?``:t.textContent(n))},``)},n.prototype.innerHTML=function(e){return this.parser.serializeInner(this,e)},n.prototype.outerHTML=function(e){return this.parser.serialize(this,e)},n.prototype.serializeXML=function(e){return this.parser.serialize(this,e,!0)},n.prototype.setAttribute=function(e,t,n,r){r===void 0&&(r=null),typeof n!=`string`&&(n=String(n)),r&&(t=r.replace(/.*\//,``)+`:`+t.replace(/^.*:/,``)),e.attributes[t]=n,t===`style`&&(e.styles=null)},n.prototype.getAttribute=function(e,t){return e.attributes[t]},n.prototype.removeAttribute=function(e,t){delete e.attributes[t]},n.prototype.hasAttribute=function(e,t){return e.attributes.hasOwnProperty(t)},n.prototype.allAttributes=function(e){var t,n,r=e.attributes,i=[];try{for(var a=c(Object.keys(r)),o=a.next();!o.done;o=a.next()){var s=o.value;i.push({name:s,value:r[s]})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},n.prototype.addClass=function(e,t){var n=(e.attributes.class||``).split(/ /);n.find(function(e){return e===t})||(n.push(t),e.attributes.class=n.join(` `))},n.prototype.removeClass=function(e,t){var n=(e.attributes.class||``).split(/ /),r=n.findIndex(function(e){return e===t});r>=0&&(n.splice(r,1),e.attributes.class=n.join(` `))},n.prototype.hasClass=function(e,t){return!!(e.attributes.class||``).split(/ /).find(function(e){return e===t})},n.prototype.setStyle=function(e,t,n){e.styles||=new x.Styles(this.getAttribute(e,`style`)),e.styles.set(t,n),e.attributes.style=e.styles.cssText},n.prototype.getStyle=function(e,t){if(!e.styles){var n=this.getAttribute(e,`style`);if(!n)return``;e.styles=new x.Styles(n)}return e.styles.get(t)},n.prototype.allStyles=function(e){return this.getAttribute(e,`style`)},n.prototype.insertRules=function(e,t){e.children=[this.text(t.join(`
1
+ import{l as e,n as t}from"./index-a3D73S5c.js";var n=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteElement=void 0,e.LiteElement=function(){function e(e,a,o){var s,c;a===void 0&&(a={}),o===void 0&&(o=[]),this.kind=e,this.attributes=t({},a),this.children=r([],n(o),!1);try{for(var l=i(this.children),u=l.next();!u.done;u=l.next()){var d=u.value;d.parent=this}}catch(e){s={error:e}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}this.styles=null}return e}()})),r=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0,e.AbstractDOMAdaptor=function(){function e(e){e===void 0&&(e=null),this.document=e}return e.prototype.node=function(e,n,r,i){var a,o;n===void 0&&(n={}),r===void 0&&(r=[]);var s=this.create(e,i);this.setAttributes(s,n);try{for(var c=t(r),l=c.next();!l.done;l=c.next()){var u=l.value;this.append(s,u)}}catch(e){a={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return s},e.prototype.setAttributes=function(e,n){var r,i,a,o,s,c;if(n.style&&typeof n.style!=`string`)try{for(var l=t(Object.keys(n.style)),u=l.next();!u.done;u=l.next()){var d=u.value;this.setStyle(e,d.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}),n.style[d])}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(n.properties)try{for(var f=t(Object.keys(n.properties)),p=f.next();!p.done;p=f.next()){var d=p.value;e[d]=n.properties[d]}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}try{for(var m=t(Object.keys(n)),h=m.next();!h.done;h=m.next()){var d=h.value;(d!==`style`||typeof n.style==`string`)&&d!==`properties`&&this.setAttribute(e,d,n[d])}}catch(e){s={error:e}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},e.prototype.replace=function(e,t){return this.insert(e,t),this.remove(t),t},e.prototype.childNode=function(e,t){return this.childNodes(e)[t]},e.prototype.allClasses=function(e){var t=this.getAttribute(e,`class`);return t?t.replace(/ +/g,` `).replace(/^ /,``).replace(/ $/,``).split(/ /):[]},e}()})),i=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.lookup=e.separateOptions=e.selectOptionsFromKeys=e.selectOptions=e.userOptions=e.defaultOptions=e.insert=e.copy=e.keys=e.makeArray=e.expandable=e.Expandable=e.OPTIONS=e.REMOVE=e.APPEND=e.isObject=void 0;var i={}.constructor;function a(e){return typeof e==`object`&&!!e&&(e.constructor===i||e.constructor===o)}e.isObject=a,e.APPEND=`[+]`,e.REMOVE=`[-]`,e.OPTIONS={invalidOption:`warn`,optionError:function(t,n){if(e.OPTIONS.invalidOption===`fatal`)throw Error(t);console.warn(`MathJax: `+t)}};var o=function(){function e(){}return e}();e.Expandable=o;function s(e){return Object.assign(Object.create(o.prototype),e)}e.expandable=s;function c(e){return Array.isArray(e)?e:[e]}e.makeArray=c;function l(e){return e?Object.keys(e).concat(Object.getOwnPropertySymbols(e)):[]}e.keys=l;function u(e){var n,r,i={};try{for(var c=t(l(e)),f=c.next();!f.done;f=c.next()){var p=f.value,m=Object.getOwnPropertyDescriptor(e,p),h=m.value;Array.isArray(h)?m.value=d([],h,!1):a(h)&&(m.value=u(h)),m.enumerable&&(i[p]=m)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object.defineProperties(e.constructor===o?s({}):{},i)}e.copy=u;function d(i,s,c){var f,p;c===void 0&&(c=!0);var m=function(t){if(c&&i[t]===void 0&&i.constructor!==o)return typeof t==`symbol`&&(t=t.toString()),e.OPTIONS.optionError(`Invalid option "${t}" (no default value).`,t),`continue`;var f=s[t],p=i[t];if(a(f)&&p!==null&&(typeof p==`object`||typeof p==`function`)){var m=l(f);Array.isArray(p)&&(m.length===1&&(m[0]===e.APPEND||m[0]===e.REMOVE)&&Array.isArray(f[m[0]])||m.length===2&&m.sort().join(`,`)===e.APPEND+`,`+e.REMOVE&&Array.isArray(f[e.APPEND])&&Array.isArray(f[e.REMOVE]))?(f[e.REMOVE]&&(p=i[t]=p.filter(function(t){return f[e.REMOVE].indexOf(t)<0})),f[e.APPEND]&&(i[t]=r(r([],n(p),!1),n(f[e.APPEND]),!1))):d(p,f,c)}else Array.isArray(f)?(i[t]=[],d(i[t],f,!1)):a(f)?i[t]=u(f):i[t]=f};try{for(var h=t(l(s)),g=h.next();!g.done;g=h.next()){var _=g.value;m(_)}}catch(e){f={error:e}}finally{try{g&&!g.done&&(p=h.return)&&p.call(h)}finally{if(f)throw f.error}}return i}e.insert=d;function f(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!1)}),e}e.defaultOptions=f;function p(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!0)}),e}e.userOptions=p;function m(e){for(var n,r,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var o={};try{for(var s=t(i),c=s.next();!c.done;c=s.next()){var l=c.value;e.hasOwnProperty(l)&&(o[l]=e[l])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}e.selectOptions=m;function h(e,t){return m.apply(void 0,r([e],n(Object.keys(t)),!1))}e.selectOptionsFromKeys=h;function g(e){for(var n,r,i,a,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var c=[];try{for(var l=t(o),u=l.next();!u.done;u=l.next()){var d=u.value,f={},p={};try{for(var m=(i=void 0,t(Object.keys(e||{}))),h=m.next();!h.done;h=m.next()){var g=h.value;(d[g]===void 0?p:f)[g]=e[g]}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}c.push(f),e=p}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c.unshift(e),c}e.separateOptions=g;function _(e,t,n){return n===void 0&&(n=null),t.hasOwnProperty(e)?t[e]:n}e.lookup=_})),a=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMixin=e.NodeMixinOptions=void 0;var r=i();e.NodeMixinOptions={badCSS:!0,badSizes:!0};function a(i,a){var o;return a===void 0&&(a={}),a=(0,r.userOptions)((0,r.defaultOptions)({},e.NodeMixinOptions),a),o=function(e){t(n,e);function n(){var t=[...arguments],n=e.call(this,t[0])||this,i=n.constructor;return n.options=(0,r.userOptions)((0,r.defaultOptions)({},i.OPTIONS),t[1]),n}return n.prototype.fontSize=function(t){return a.badCSS?this.options.fontSize:e.prototype.fontSize.call(this,t)},n.prototype.fontFamily=function(t){return a.badCSS?this.options.fontFamily:e.prototype.fontFamily.call(this,t)},n.prototype.nodeSize=function(t,r,i){if(r===void 0&&(r=1),i===void 0&&(i=null),!a.badSizes)return e.prototype.nodeSize.call(this,t,r,i);var o=this.textContent(t),s=Array.from(o.replace(n.cjkPattern,``)).length;return[(Array.from(o).length-s)*this.options.cjkCharWidth+s*this.options.unknownCharWidth,this.options.unknownCharHeight]},n.prototype.nodeBBox=function(t){return a.badSizes?{left:0,right:0,top:0,bottom:0}:e.prototype.nodeBBox.call(this,t)},n}(i),o.OPTIONS=n(n({},a.badCSS?{fontSize:16,fontFamily:`Times`}:{}),a.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),o.cjkPattern=new RegExp([`[`,`ᄀ-ᅟ`,`〈〉`,`⺀-〾`,`぀-㉇`,`㉐-䶿`,`一-꓆`,`ꥠ-ꥼ`,`가-힣`,`豈-﫿`,`︐-︙`,`︰-﹫`,`!-⦆¢-₩`,`𛀀-𛀁`,`🈀-🉑`,`𠀀-𿿽`,`]`].join(``),`gu`),o}e.NodeMixin=a})),o=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteDocument=void 0;var t=n();e.LiteDocument=function(){function e(){this.root=new t.LiteElement(`html`,{},[this.head=new t.LiteElement(`head`),this.body=new t.LiteElement(`body`)]),this.type=``}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#document`},enumerable:!1,configurable:!0}),e}()})),s=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.LiteComment=e.LiteText=void 0;var n=function(){function e(e){e===void 0&&(e=``),this.value=e}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#text`},enumerable:!1,configurable:!0}),e}();e.LiteText=n,e.LiteComment=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"kind",{get:function(){return`#comment`},enumerable:!1,configurable:!0}),n}(n)})),c=e((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteList=void 0,e.LiteList=function(){function e(e){this.nodes=[],this.nodes=n([],t(e),!1)}return e.prototype.append=function(e){this.nodes.push(e)},e.prototype[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.nodes.length?{value:null,done:!0}:{value:this.nodes[e++],done:!1}}}},e}()})),l=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retryAfter=e.handleRetriesFor=void 0;function t(e){return new Promise(function t(n,r){try{n(e())}catch(e){e.retry&&e.retry instanceof Promise?e.retry.then(function(){return t(n,r)}).catch(function(e){return r(e)}):e.restart&&e.restart.isCallback?MathJax.Callback.After(function(){return t(n,r)},e.restart):r(e)}})}e.handleRetriesFor=t;function n(e){var t=Error(`MathJax retry`);throw t.retry=e,t}e.retryAfter=n})),u=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`3.2.2`})),d=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PrioritizedList=void 0,e.PrioritizedList=function(){function e(){this.items=[],this.items=[]}return e.prototype[Symbol.iterator]=function(){var e=0,t=this.items;return{next:function(){return{value:t[e++],done:e>t.length}}}},e.prototype.add=function(t,n){n===void 0&&(n=e.DEFAULTPRIORITY);var r=this.items.length;do r--;while(r>=0&&n<this.items[r].priority);return this.items.splice(r+1,0,{item:t,priority:n}),t},e.prototype.remove=function(e){var t=this.items.length;do t--;while(t>=0&&this.items[t].item!==e);t>=0&&this.items.splice(t,1)},e.DEFAULTPRIORITY=5,e}()})),f=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0,e.HandlerList=function(e){t(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.register=function(e){return this.add(e,e.priority)},r.prototype.unregister=function(e){this.remove(e)},r.prototype.handlesDocument=function(e){var t,r;try{for(var i=n(this),a=i.next();!a.done;a=i.next()){var o=a.value.item;if(o.handlesDocument(e))return o}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw Error(`Can't find handler for document`)},r.prototype.document=function(e,t){return t===void 0&&(t=null),this.handlesDocument(e).create(e,t)},r}(d().PrioritizedList)})),p=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathjax=void 0;var t=u(),n=f(),r=l();e.mathjax={version:t.VERSION,handlers:new n.HandlerList,document:function(t,n){return e.mathjax.handlers.document(t,n)},handleRetriesFor:r.handleRetriesFor,retryAfter:r.retryAfter,asyncLoad:null}})),m=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var t=p();function n(e){return t.mathjax.asyncLoad?new Promise(function(n,r){var i=t.mathjax.asyncLoad(e);i instanceof Promise?i.then(function(e){return n(e)}).catch(function(e){return r(e)}):n(i)}):Promise.reject(`Can't load '${e}': No asyncLoad method specified`)}e.asyncLoad=n})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numeric=e.translate=e.remove=e.add=e.entities=e.options=void 0;var t=l(),n=m();e.options={loadMissingEntities:!0},e.entities={ApplyFunction:`⁡`,Backslash:`∖`,Because:`∵`,Breve:`˘`,Cap:`⋒`,CenterDot:`·`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,Congruent:`≡`,ContourIntegral:`∮`,Coproduct:`∐`,Cross:`⨯`,Cup:`⋓`,CupCap:`≍`,Dagger:`‡`,Del:`∇`,Delta:`Δ`,Diamond:`⋄`,DifferentialD:`ⅆ`,DotEqual:`≐`,DoubleDot:`¨`,DoubleRightTee:`⊨`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownLeftVector:`↽`,DownRightVector:`⇁`,DownTee:`⊤`,Downarrow:`⇓`,Element:`∈`,EqualTilde:`≂`,Equilibrium:`⇌`,Exists:`∃`,ExponentialE:`ⅇ`,FilledVerySmallSquare:`▪`,ForAll:`∀`,Gamma:`Γ`,Gg:`⋙`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Hacek:`ˇ`,Hat:`^`,HumpDownHump:`≎`,HumpEqual:`≏`,Im:`ℑ`,ImaginaryI:`ⅈ`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Lambda:`Λ`,Larr:`↞`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDownVector:`⇃`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftTee:`⊣`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpVector:`↿`,LeftVector:`↼`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessSlantEqual:`⩽`,LessTilde:`≲`,Ll:`⋘`,Lleftarrow:`⇚`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lsh:`↰`,MinusPlus:`∓`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotPrecedes:`⊀`,NotPrecedesSlantEqual:`⋠`,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsSlantEqual:`⋡`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotVerticalBar:`∤`,Omega:`Ω`,OverBar:`‾`,OverBrace:`⏞`,PartialD:`∂`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Product:`∏`,Proportional:`∝`,Psi:`Ψ`,Rarr:`↠`,Re:`ℜ`,ReverseEquilibrium:`⇋`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDownVector:`⇂`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpVector:`↾`,RightVector:`⇀`,Rightarrow:`⇒`,Rrightarrow:`⇛`,Rsh:`↱`,Sigma:`Σ`,SmallCircle:`∘`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Star:`⋆`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,Therefore:`∴`,Theta:`Θ`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,UnderBar:`_`,UnderBrace:`⏟`,Union:`⋃`,UnionPlus:`⊎`,UpArrow:`↑`,UpDownArrow:`↕`,UpTee:`⊥`,Uparrow:`⇑`,Updownarrow:`⇕`,Upsilon:`Υ`,Vdash:`⊩`,Vee:`⋁`,VerticalBar:`∣`,VerticalTilde:`≀`,Vvdash:`⊪`,Wedge:`⋀`,Xi:`Ξ`,amp:`&`,acute:`´`,aleph:`ℵ`,alpha:`α`,amalg:`⨿`,and:`∧`,ang:`∠`,angmsd:`∡`,angsph:`∢`,ape:`≊`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,beta:`β`,beth:`ℶ`,between:`≬`,bigcirc:`◯`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,blacklozenge:`⧫`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,bowtie:`⋈`,boxdl:`┐`,boxdr:`┌`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxur:`└`,bsol:`\\`,bull:`•`,cap:`∩`,check:`✓`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,clubs:`♣`,colon:`:`,comp:`∁`,ctdot:`⋯`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cup:`∪`,curarr:`↷`,curlyvee:`⋎`,curlywedge:`⋏`,dagger:`†`,daleth:`ℸ`,ddarr:`⇊`,deg:`°`,delta:`δ`,digamma:`ϝ`,div:`÷`,divideontimes:`⋇`,dot:`˙`,doteqdot:`≑`,dotplus:`∔`,dotsquare:`⊡`,dtdot:`⋱`,ecir:`≖`,efDot:`≒`,egs:`⪖`,ell:`ℓ`,els:`⪕`,empty:`∅`,epsi:`ε`,epsiv:`ϵ`,erDot:`≓`,eta:`η`,eth:`ð`,flat:`♭`,fork:`⋔`,frown:`⌢`,gEl:`⪌`,gamma:`γ`,gap:`⪆`,gimel:`ℷ`,gnE:`≩`,gnap:`⪊`,gne:`⪈`,gnsim:`⋧`,gt:`>`,gtdot:`⋗`,harrw:`↭`,hbar:`ℏ`,hellip:`…`,hookleftarrow:`↩`,hookrightarrow:`↪`,imath:`ı`,infin:`∞`,intcal:`⊺`,iota:`ι`,jmath:`ȷ`,kappa:`κ`,kappav:`ϰ`,lEg:`⪋`,lambda:`λ`,lap:`⪅`,larrlp:`↫`,larrtl:`↢`,lbrace:`{`,lbrack:`[`,le:`≤`,leftleftarrows:`⇇`,leftthreetimes:`⋋`,lessdot:`⋖`,lmoust:`⎰`,lnE:`≨`,lnap:`⪉`,lne:`⪇`,lnsim:`⋦`,longmapsto:`⟼`,looparrowright:`↬`,lowast:`∗`,loz:`◊`,lt:`<`,ltimes:`⋉`,ltri:`◃`,macr:`¯`,malt:`✠`,mho:`℧`,mu:`μ`,multimap:`⊸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,natur:`♮`,nearr:`↗`,nharr:`↮`,nlarr:`↚`,not:`¬`,nrarr:`↛`,nu:`ν`,nvDash:`⊭`,nvdash:`⊬`,nwarr:`↖`,omega:`ω`,omicron:`ο`,or:`∨`,osol:`⊘`,period:`.`,phi:`φ`,phiv:`ϕ`,pi:`π`,piv:`ϖ`,prap:`⪷`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,prime:`′`,psi:`ψ`,quot:`"`,rarrtl:`↣`,rbrace:`}`,rbrack:`]`,rho:`ρ`,rhov:`ϱ`,rightrightarrows:`⇉`,rightthreetimes:`⋌`,ring:`˚`,rmoust:`⎱`,rtimes:`⋊`,rtri:`▹`,scap:`⪸`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,sdot:`⋅`,searr:`↘`,sect:`§`,sharp:`♯`,sigma:`σ`,sigmav:`ς`,simne:`≆`,smile:`⌣`,spades:`♠`,sub:`⊂`,subE:`⫅`,subnE:`⫋`,subne:`⊊`,supE:`⫆`,supnE:`⫌`,supne:`⊋`,swarr:`↙`,tau:`τ`,theta:`θ`,thetav:`ϑ`,tilde:`˜`,times:`×`,triangle:`▵`,triangleq:`≜`,upsi:`υ`,upuparrows:`⇈`,veebar:`⊻`,vellip:`⋮`,weierp:`℘`,xi:`ξ`,yen:`¥`,zeta:`ζ`,zigrarr:`⇝`,nbsp:`\xA0`,rsquo:`’`,lsquo:`‘`};var r={};function i(t,n){Object.assign(e.entities,t),r[n]=!0}e.add=i;function a(t){delete e.entities[t]}e.remove=a;function o(e){return e.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,s)}e.translate=o;function s(i,a){if(a.charAt(0)===`#`)return c(a.slice(1));if(e.entities[a])return e.entities[a];if(e.options.loadMissingEntities){var o=a.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:a.charAt(0).toLowerCase();r[o]||(r[o]=!0,(0,t.retryAfter)((0,n.asyncLoad)(`./util/entities/`+o+`.js`)))}return i}function c(e){var t=e.charAt(0)===`x`?parseInt(e.slice(1),16):parseInt(e);return String.fromCodePoint(t)}e.numeric=c})),g=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},o=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteParser=e.PATTERNS=void 0;var c=i(h()),l=n(),u=s(),d;(function(e){e.TAGNAME=`[a-z][^\\s\\n>]*`,e.ATTNAME=`[a-z][^\\s\\n>=]*`,e.VALUE=`(?:'[^']*'|"[^"]*"|[^\\s\\n]+)`,e.VALUESPLIT=`(?:'([^']*)'|"([^"]*)"|([^\\s\\n]+))`,e.SPACE=`(?:\\s|\\n)+`,e.OPTIONALSPACE=`(?:\\s|\\n)*`,e.ATTRIBUTE=e.ATTNAME+`(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUE+`)?`,e.ATTRIBUTESPLIT=`(`+e.ATTNAME+`)(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUESPLIT+`)?`,e.TAG=`(<(?:`+e.TAGNAME+`(?:`+e.SPACE+e.ATTRIBUTE+`)*`+e.OPTIONALSPACE+`/?|/`+e.TAGNAME+`|!--[^]*?--|![^]*?)(?:>|$))`,e.tag=new RegExp(e.TAG,`i`),e.attr=new RegExp(e.ATTRIBUTE,`i`),e.attrsplit=new RegExp(e.ATTRIBUTESPLIT,`i`)})(d=e.PATTERNS||={}),e.LiteParser=function(){function e(){}return e.prototype.parseFromString=function(e,t,n){t===void 0&&(t=`text/html`),n===void 0&&(n=null);for(var r=n.createDocument(),i=n.body(r),a=e.replace(/<\?.*?\?>/g,``).split(d.tag);a.length;){var o=a.shift(),s=a.shift();o&&this.addText(n,i,o),s&&s.charAt(s.length-1)===`>`&&(s.charAt(1)===`!`?this.addComment(n,i,s):i=s.charAt(1)===`/`?this.closeTag(n,i,s):this.openTag(n,i,s,a))}return this.checkDocument(n,r),r},e.prototype.addText=function(e,t,n){return n=c.translate(n),e.append(t,e.text(n))},e.prototype.addComment=function(e,t,n){return e.append(t,new u.LiteComment(n))},e.prototype.closeTag=function(e,t,n){for(var r=n.slice(2,n.length-1).toLowerCase();e.parent(t)&&e.kind(t)!==r;)t=e.parent(t);return e.parent(t)},e.prototype.openTag=function(e,t,n,r){var i=this.constructor.PCDATA,a=this.constructor.SELF_CLOSING,o=n.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(),s=e.node(o),c=n.replace(/^<.*?[\s\n>]/,``).split(d.attrsplit);return(c.pop().match(/>$/)||c.length<5)&&(this.addAttributes(e,s,c),e.append(t,s),!a[o]&&!n.match(/\/>$/)&&(i[o]?this.handlePCDATA(e,s,o,r):t=s)),t},e.prototype.addAttributes=function(e,t,n){for(var r=this.constructor.CDATA_ATTR;n.length;){var i=a(n.splice(0,5),5),o=i[1],s=i[2],l=i[3],u=i[4],d=s||l||u||``;r[o]||(d=c.translate(d)),e.setAttribute(t,o,d)}},e.prototype.handlePCDATA=function(e,t,n,r){for(var i=[],a=`</`+n+`>`,o=``;r.length&&o!==a;)i.push(o),i.push(r.shift()),o=r.shift();e.append(t,e.text(i.join(``)))},e.prototype.checkDocument=function(e,t){var n,r,i,a,s=this.getOnlyChild(e,e.body(t));if(s){try{for(var c=o(e.childNodes(e.body(t))),l=c.next();!l.done;l=c.next()){var d=l.value;if(d===s)break;d instanceof u.LiteComment&&d.value.match(/^<!DOCTYPE/)&&(t.type=d.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}switch(e.kind(s)){case`html`:try{for(var f=o(s.children),p=f.next();!p.done;p=f.next()){var d=p.value;switch(e.kind(d)){case`head`:t.head=d;break;case`body`:t.body=d;break}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}t.root=s,e.remove(s),e.parent(t.body)!==s&&e.append(s,t.body),e.parent(t.head)!==s&&e.insert(t.head,t.body);break;case`head`:t.head=e.replace(s,t.head);break;case`body`:t.body=e.replace(s,t.body);break}}},e.prototype.getOnlyChild=function(e,t){var n,r,i=null;try{for(var a=o(e.childNodes(t)),s=a.next();!s.done;s=a.next()){var c=s.value;if(c instanceof l.LiteElement){if(i)return null;i=c}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.serialize=function(e,t,n){var r=this;n===void 0&&(n=!1);var i=this.constructor.SELF_CLOSING,a=this.constructor.CDATA_ATTR,o=e.kind(t),s=e.allAttributes(t).map(function(e){return e.name+`="`+(a[e.name]?e.value:r.protectAttribute(e.value))+`"`}).join(` `),c=this.serializeInner(e,t,n);return`<`+o+(s?` `+s:``)+((!n||c)&&!i[o]?`>${c}</${o}>`:n?`/>`:`>`)},e.prototype.serializeInner=function(e,t,n){var r=this;return n===void 0&&(n=!1),this.constructor.PCDATA.hasOwnProperty(t.kind)?e.childNodes(t).map(function(t){return e.value(t)}).join(``):e.childNodes(t).map(function(t){var i=e.kind(t);return i===`#text`?r.protectHTML(e.value(t)):i===`#comment`?t.value:r.serialize(e,t,n)}).join(``)},e.prototype.protectAttribute=function(e){return typeof e!=`string`&&(e=String(e)),e.replace(/"/g,`&quot;`)},e.prototype.protectHTML=function(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)},e.SELF_CLOSING={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},e.PCDATA={option:!0,textarea:!0,fieldset:!0,title:!0,style:!0,script:!0},e.CDATA_ATTR={style:!0,datafld:!0,datasrc:!0,href:!0,src:!0,longdesc:!0,usemap:!0,cite:!0,datetime:!0,action:!0,axis:!0,profile:!0,content:!0,scheme:!0},e}()})),_=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteWindow=void 0;var t=n(),r=o(),i=c(),a=g();e.LiteWindow=function(){function e(){this.DOMParser=a.LiteParser,this.NodeList=i.LiteList,this.HTMLCollection=i.LiteList,this.HTMLElement=t.LiteElement,this.DocumentFragment=i.LiteList,this.Document=r.LiteDocument,this.document=new r.LiteDocument}return e}()})),v=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.Styles=void 0;var i=[`top`,`right`,`bottom`,`left`],a=[`width`,`style`,`color`];function o(e){for(var t=e.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),n=[];t.length>1;)t.shift(),n.push(t.shift());return n}function s(e){var n,r,i=o(this.styles[e]);i.length===0&&i.push(``),i.length===1&&i.push(i[0]),i.length===2&&i.push(i[0]),i.length===3&&i.push(i[1]);try{for(var a=t(v.connect[e].children),s=a.next();!s.done;s=a.next()){var c=s.value;this.setStyle(this.childName(e,c),i.shift())}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function c(e){var n,r,i=v.connect[e].children,a=[];try{for(var o=t(i),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.styles[e+`-`+c];if(!l){delete this.styles[e];return}a.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a[3]===a[1]&&(a.pop(),a[2]===a[0]&&(a.pop(),a[1]===a[0]&&a.pop())),this.styles[e]=a.join(` `)}function l(e){var n,r;try{for(var i=t(v.connect[e].children),a=i.next();!a.done;a=i.next()){var o=a.value;this.setStyle(this.childName(e,o),this.styles[e])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function u(e){var i,a,o=r([],n(v.connect[e].children),!1),s=this.styles[this.childName(e,o.shift())];try{for(var c=t(o),l=c.next();!l.done;l=c.next()){var u=l.value;if(this.styles[this.childName(e,u)]!==s){delete this.styles[e];return}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}this.styles[e]=s}var d={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function f(e){var n,r,i,a,s={width:``,style:``,color:``};try{for(var c=t(o(this.styles[e])),l=c.next();!l.done;l=c.next()){var u=l.value;u.match(d.width)&&s.width===``?s.width=u:u.match(d.style)&&s.style===``?s.style=u:s.color=u}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var f=t(v.connect[e].children),p=f.next();!p.done;p=f.next()){var m=p.value;this.setStyle(this.childName(e,m),s[m])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}function p(e){var n,r,i=[];try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.styles[this.childName(e,s)];c&&i.push(c)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}i.length?this.styles[e]=i.join(` `):delete this.styles[e]}var m={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:RegExp(`^(?:`+[`normal|none`,`inherit|initial|unset`,`common-ligatures|no-common-ligatures`,`discretionary-ligatures|no-discretionary-ligatures`,`historical-ligatures|no-historical-ligatures`,`contextual|no-contextual`,`(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)`,`small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps`,`lining-nums|oldstyle-nums|proportional-nums|tabular-nums`,`diagonal-fractions|stacked-fractions`,`ordinal|slashed-zero`,`jis78|jis83|jis90|jis04|simplified|traditional`,`full-width|proportional-width`,`ruby`].join(`|`)+`)$`),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:RegExp(`^(?:`+[`normal`,`(?:(?:ultra|extra|semi)-)?condensed`,`(?:(?:semi|extra|ulta)-)?expanded`,`inherit|initial|unset`].join(`|`)+`)$`),size:RegExp(`^(?:`+[`xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller`,`[d.]+%|[d.]+[a-z]+`,`inherit|initial|unset`].join(`|`)+`)(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$`)};function h(e){var r,i,a,s,c=o(this.styles[e]),l={style:``,variant:[],weight:``,stretch:``,size:``,family:``,"line-height":``};try{for(var u=t(c),d=u.next();!d.done;d=u.next()){var f=d.value;l.family=f;try{for(var p=(a=void 0,t(Object.keys(m))),h=p.next();!h.done;h=p.next()){var _=h.value;if((Array.isArray(l[_])||l[_]===``)&&f.match(m[_]))if(_===`size`){var v=n(f.split(/\//),2),y=v[0],b=v[1];l[_]=y,b&&(l[`line-height`]=b)}else l.size===``&&(Array.isArray(l[_])?l[_].push(f):l[_]=f)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}g(e,l),delete this.styles[e]}function g(e,n){var r,i;try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.childName(e,s);if(Array.isArray(n[s])){var l=n[s];l.length&&(this.styles[c]=l.join(` `))}else n[s]!==``&&(this.styles[c]=n[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _(e){}var v=function(){function e(e){e===void 0&&(e=``),this.parse(e)}return Object.defineProperty(e.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=t(Object.keys(this.styles)),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.parentName(o);this.styles[s]||r.push(o+`: `+this.styles[o]+`;`)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(` `)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,n){for(t=this.normalizeName(t),this.setStyle(t,n),e.connect[t]&&!e.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/)&&(t=this.parentName(t),e.connect[t]);)e.connect[t].combine.call(this,t)},e.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:``},e.prototype.setStyle=function(t,n){this.styles[t]=n,e.connect[t]&&e.connect[t].children&&e.connect[t].split.call(this,t),n===``&&delete this.styles[t]},e.prototype.combineChildren=function(n){var r,i,a=this.parentName(n);try{for(var o=t(e.connect[n].children),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.childName(a,c);e.connect[l].combine.call(this,l)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.parentName=function(e){var t=e.replace(/-[^-]*$/,``);return e===t?``:t},e.prototype.childName=function(t,n){return n.match(/-/)?n:(e.connect[t]&&!e.connect[t].combine&&(n+=t.replace(/.*-/,`-`),t=this.parentName(t)),t+`-`+n)},e.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(e){return`-`+e.toLowerCase()})},e.prototype.parse=function(e){e===void 0&&(e=``);var t=this.constructor.pattern;this.styles={};for(var r=e.replace(t.comment,``).split(t.style);r.length>1;){var i=n(r.splice(0,3),3),a=i[0],o=i[1],s=i[2];if(a.match(/[^\s\n]/))return;this.set(o,s)}},e.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},e.connect={padding:{children:i,split:s,combine:c},border:{children:i,split:l,combine:u},"border-top":{children:a,split:f,combine:p},"border-right":{children:a,split:f,combine:p},"border-bottom":{children:a,split:f,combine:p},"border-left":{children:a,split:f,combine:p},"border-width":{children:i,split:s,combine:null},"border-style":{children:i,split:s,combine:null},"border-color":{children:i,split:s,combine:null},font:{children:[`style`,`variant`,`weight`,`stretch`,`line-height`,`size`,`family`],split:h,combine:_}},e}();e.Styles=v})),y=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},c=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},l=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},u=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.liteAdaptor=e.LiteAdaptor=e.LiteBase=void 0;var d=r(),f=a(),p=o(),m=n(),h=s(),y=_(),b=g(),x=v(),S=function(e){t(n,e);function n(){var t=e.call(this)||this;return t.parser=new b.LiteParser,t.window=new y.LiteWindow,t}return n.prototype.parse=function(e,t){return this.parser.parseFromString(e,t,this)},n.prototype.create=function(e,t){return t===void 0&&(t=null),new m.LiteElement(e)},n.prototype.text=function(e){return new h.LiteText(e)},n.prototype.comment=function(e){return new h.LiteComment(e)},n.prototype.createDocument=function(){return new p.LiteDocument},n.prototype.head=function(e){return e.head},n.prototype.body=function(e){return e.body},n.prototype.root=function(e){return e.root},n.prototype.doctype=function(e){return e.type},n.prototype.tags=function(e,t,n){n===void 0&&(n=null);var r=[],i=[];if(n)return i;for(var a=e;a;){var o=a.kind;o!==`#text`&&o!==`#comment`&&(a=a,o===t&&i.push(a),a.children.length&&(r=a.children.concat(r))),a=r.shift()}return i},n.prototype.elementById=function(e,t){for(var n=[],r=e;r;){if(r.kind!==`#text`&&r.kind!==`#comment`){if(r=r,r.attributes.id===t)return r;r.children.length&&(n=r.children.concat(n))}r=n.shift()}return null},n.prototype.elementsByClass=function(e,t){for(var n=[],r=[],i=e;i;)i.kind!==`#text`&&i.kind!==`#comment`&&(i=i,(i.attributes.class||``).trim().split(/ +/).includes(t)&&r.push(i),i.children.length&&(n=i.children.concat(n))),i=n.shift();return r},n.prototype.getElements=function(e,t){var n,r,i=[],a=this.body(t);try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var l=s.value;if(typeof l==`string`)if(l.charAt(0)===`#`){var u=this.elementById(a,l.slice(1));u&&i.push(u)}else l.charAt(0)===`.`?i=i.concat(this.elementsByClass(a,l.slice(1))):l.match(/^[-a-z][-a-z0-9]*$/i)&&(i=i.concat(this.tags(a,l)));else Array.isArray(l)?i=i.concat(l):l instanceof this.window.NodeList||l instanceof this.window.HTMLCollection?i=i.concat(l.nodes):i.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},n.prototype.contains=function(e,t){for(;t&&t!==e;)t=this.parent(t);return!!t},n.prototype.parent=function(e){return e.parent},n.prototype.childIndex=function(e){return e.parent?e.parent.children.findIndex(function(t){return t===e}):-1},n.prototype.append=function(e,t){return t.parent&&this.remove(t),e.children.push(t),t.parent=e,t},n.prototype.insert=function(e,t){if(e.parent&&this.remove(e),t&&t.parent){var n=this.childIndex(t);t.parent.children.splice(n,0,e),e.parent=t.parent}},n.prototype.remove=function(e){var t=this.childIndex(e);return t>=0&&e.parent.children.splice(t,1),e.parent=null,e},n.prototype.replace=function(e,t){var n=this.childIndex(t);return n>=0&&(t.parent.children[n]=e,e.parent=t.parent,t.parent=null),t},n.prototype.clone=function(e){var t=this,n=new m.LiteElement(e.kind);return n.attributes=i({},e.attributes),n.children=e.children.map(function(e){if(e.kind===`#text`)return new h.LiteText(e.value);if(e.kind===`#comment`)return new h.LiteComment(e.value);var r=t.clone(e);return r.parent=n,r}),n},n.prototype.split=function(e,t){var n=new h.LiteText(e.value.slice(t));return e.value=e.value.slice(0,t),e.parent.children.splice(this.childIndex(e)+1,0,n),n.parent=e.parent,n},n.prototype.next=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)+1;return n>=0&&n<t.children.length?t.children[n]:null},n.prototype.previous=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)-1;return n>=0?t.children[n]:null},n.prototype.firstChild=function(e){return e.children[0]},n.prototype.lastChild=function(e){return e.children[e.children.length-1]},n.prototype.childNodes=function(e){return u([],l(e.children),!1)},n.prototype.childNode=function(e,t){return e.children[t]},n.prototype.kind=function(e){return e.kind},n.prototype.value=function(e){return e.kind===`#text`?e.value:e.kind===`#comment`?e.value.replace(/^<!(--)?((?:.|\n)*)\1>$/,`$2`):``},n.prototype.textContent=function(e){var t=this;return e.children.reduce(function(e,n){return e+(n.kind===`#text`?n.value:n.kind===`#comment`?``:t.textContent(n))},``)},n.prototype.innerHTML=function(e){return this.parser.serializeInner(this,e)},n.prototype.outerHTML=function(e){return this.parser.serialize(this,e)},n.prototype.serializeXML=function(e){return this.parser.serialize(this,e,!0)},n.prototype.setAttribute=function(e,t,n,r){r===void 0&&(r=null),typeof n!=`string`&&(n=String(n)),r&&(t=r.replace(/.*\//,``)+`:`+t.replace(/^.*:/,``)),e.attributes[t]=n,t===`style`&&(e.styles=null)},n.prototype.getAttribute=function(e,t){return e.attributes[t]},n.prototype.removeAttribute=function(e,t){delete e.attributes[t]},n.prototype.hasAttribute=function(e,t){return e.attributes.hasOwnProperty(t)},n.prototype.allAttributes=function(e){var t,n,r=e.attributes,i=[];try{for(var a=c(Object.keys(r)),o=a.next();!o.done;o=a.next()){var s=o.value;i.push({name:s,value:r[s]})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},n.prototype.addClass=function(e,t){var n=(e.attributes.class||``).split(/ /);n.find(function(e){return e===t})||(n.push(t),e.attributes.class=n.join(` `))},n.prototype.removeClass=function(e,t){var n=(e.attributes.class||``).split(/ /),r=n.findIndex(function(e){return e===t});r>=0&&(n.splice(r,1),e.attributes.class=n.join(` `))},n.prototype.hasClass=function(e,t){return!!(e.attributes.class||``).split(/ /).find(function(e){return e===t})},n.prototype.setStyle=function(e,t,n){e.styles||=new x.Styles(this.getAttribute(e,`style`)),e.styles.set(t,n),e.attributes.style=e.styles.cssText},n.prototype.getStyle=function(e,t){if(!e.styles){var n=this.getAttribute(e,`style`);if(!n)return``;e.styles=new x.Styles(n)}return e.styles.get(t)},n.prototype.allStyles=function(e){return this.getAttribute(e,`style`)},n.prototype.insertRules=function(e,t){e.children=[this.text(t.join(`
2
2
 
3
3
  `)+`
4
4
 
@@ -54,7 +54,7 @@
54
54
  html, body { margin: 0; height: 100%; overflow: hidden; background: var(--pi-bg); color: var(--pi-text); }
55
55
  body { min-height: 100dvh; }
56
56
  </style>
57
- <script type="module" crossorigin src="./assets/index-Jx8Fnguv.js"></script>
57
+ <script type="module" crossorigin src="./assets/index-a3D73S5c.js"></script>
58
58
  <link rel="modulepreload" crossorigin href="./assets/vendor-editor-core-vyMPzMNA.js">
59
59
  <link rel="modulepreload" crossorigin href="./assets/vendor-editor-languages-DlEQaRIv.js">
60
60
  <link rel="modulepreload" crossorigin href="./assets/vendor-terminal-D8k4UKM2.js">
@@ -0,0 +1,301 @@
1
+ import { createAssistantMessageEventStream, normalizeContext, } from "@earendil-works/pi-ai";
2
+ import { isHttpErrorStatus, readModelHttpErrorStatus, } from "../../shared/modelHttpError.js";
3
+ const MODEL_HTTP_ERROR_WRAPPED = Symbol("pi-webui.modelHttpErrorWrapped");
4
+ const SUPPORTED_FETCH_APIS = new Set([
5
+ "openai-completions",
6
+ "openai-responses",
7
+ "azure-openai-responses",
8
+ "anthropic-messages",
9
+ "mistral-conversations",
10
+ "pi-messages",
11
+ "openai-codex-responses",
12
+ ]);
13
+ const wrappedDelegates = new WeakMap();
14
+ const wrappedRuntimes = new WeakMap();
15
+ /**
16
+ * Wraps one session-agent stream dispatch with invocation-local HTTP observation.
17
+ * The returned stream is live immediately; the forwarding pump owns delegate startup
18
+ * so result-only consumers receive the same final message as event consumers.
19
+ */
20
+ export function withModelHttpErrorStatus(delegate) {
21
+ if (isWrappedDelegate(delegate))
22
+ return delegate;
23
+ const existing = wrappedDelegates.get(delegate);
24
+ if (existing !== undefined)
25
+ return existing;
26
+ const wrapped = (model, context, options) => {
27
+ const output = createAssistantMessageEventStream();
28
+ const capture = shouldCaptureModel(model) ? createCaptureState() : undefined;
29
+ const delegatedOptions = capture === undefined ? options : observedOptions(options, capture);
30
+ void pumpStream(delegate, output, model, context, delegatedOptions, capture);
31
+ return output;
32
+ };
33
+ Object.defineProperty(wrapped, MODEL_HTTP_ERROR_WRAPPED, { value: true, enumerable: false });
34
+ wrappedDelegates.set(delegate, wrapped);
35
+ return wrapped;
36
+ }
37
+ /**
38
+ * Decorates only the runtime's recursive `streamSimple` boundary. Other runtime
39
+ * methods stay bound to the original instance, while a virtual model's recursive
40
+ * physical dispatch re-enters this proxy.
41
+ */
42
+ export function withModelHttpErrorStatusRuntime(modelRuntime) {
43
+ const existing = wrappedRuntimes.get(modelRuntime);
44
+ if (existing !== undefined)
45
+ return existing;
46
+ const decorated = new Proxy(modelRuntime, {
47
+ get(target, property, receiver) {
48
+ if (property === "streamSimple") {
49
+ const original = target.streamSimple.bind(receiver);
50
+ const streamSimple = (model, context, options) => {
51
+ if (!shouldCaptureModel(model)) {
52
+ return original.call(receiver, model, context, options);
53
+ }
54
+ const delegate = (routedModel, routedContext, routedOptions) => original.call(receiver, routedModel, routedContext, routedOptions);
55
+ const transcript = normalizeContext(context);
56
+ const wrapped = withModelHttpErrorStatus(delegate);
57
+ const result = wrapped(model, transcript, options);
58
+ if (result instanceof Promise) {
59
+ const output = createAssistantMessageEventStream();
60
+ void pumpStream(() => result, output, model, transcript, options, undefined);
61
+ return output;
62
+ }
63
+ return result;
64
+ };
65
+ return streamSimple;
66
+ }
67
+ const value = Reflect.get(target, property, target);
68
+ if (typeof value === "function") {
69
+ return (...args) => {
70
+ // Reflect.apply is typed as `any` for a dynamically reflected function.
71
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-return
72
+ return Reflect.apply(value, target, args);
73
+ };
74
+ }
75
+ return value;
76
+ },
77
+ });
78
+ wrappedRuntimes.set(modelRuntime, decorated);
79
+ wrappedRuntimes.set(decorated, decorated);
80
+ return decorated;
81
+ }
82
+ function shouldCaptureModel(model) {
83
+ return SUPPORTED_FETCH_APIS.has(model.api);
84
+ }
85
+ function observedOptions(options, capture) {
86
+ const suppliedFetch = options?.fetch;
87
+ const originalFetch = suppliedFetch ?? globalThis.fetch;
88
+ const useGlobalReceiver = suppliedFetch === undefined;
89
+ const observedFetch = function (input, init) {
90
+ const receiver = useGlobalReceiver ? globalThis : this;
91
+ return capture.observeFetch(originalFetch, receiver, input, init);
92
+ };
93
+ return { ...(options ?? {}), fetch: observedFetch };
94
+ }
95
+ function createCaptureState() {
96
+ let nextAttempt = 0;
97
+ let latestAttempt = 0;
98
+ let activeAttempts = new Set();
99
+ let observation = { kind: "unobserved" };
100
+ let finalized = false;
101
+ let frozenObservation;
102
+ const updateAttempt = (attempt, next) => {
103
+ activeAttempts.delete(attempt);
104
+ if (finalized || observation.kind === "ambiguous")
105
+ return;
106
+ if (attempt !== latestAttempt)
107
+ return;
108
+ observation = next;
109
+ };
110
+ return {
111
+ observeFetch: (fetch, receiver, input, init) => {
112
+ if (finalized)
113
+ return Reflect.apply(fetch, receiver, [input, init]);
114
+ const attempt = ++nextAttempt;
115
+ latestAttempt = attempt;
116
+ if (activeAttempts.size > 0 || observation.kind === "ambiguous") {
117
+ observation = { kind: "ambiguous" };
118
+ }
119
+ else {
120
+ observation = { kind: "pending", attempt };
121
+ }
122
+ activeAttempts.add(attempt);
123
+ let result;
124
+ try {
125
+ result = Reflect.apply(fetch, receiver, [input, init]);
126
+ }
127
+ catch (error) {
128
+ updateAttempt(attempt, { kind: "rejected", attempt });
129
+ throw error;
130
+ }
131
+ return Promise.resolve(result).then((response) => {
132
+ let status;
133
+ try {
134
+ status = response.status;
135
+ }
136
+ catch {
137
+ status = undefined;
138
+ }
139
+ updateAttempt(attempt, { kind: "response", attempt, status });
140
+ return response;
141
+ }, (error) => {
142
+ updateAttempt(attempt, { kind: "rejected", attempt });
143
+ throw error;
144
+ });
145
+ },
146
+ freeze: () => {
147
+ if (frozenObservation !== undefined)
148
+ return frozenObservation;
149
+ finalized = true;
150
+ frozenObservation = observation;
151
+ activeAttempts = new Set();
152
+ return frozenObservation;
153
+ },
154
+ };
155
+ }
156
+ async function pumpStream(delegate, output, model, context, options, capture) {
157
+ let latestPartial;
158
+ let outputEnded = false;
159
+ let frozenObservation;
160
+ const beginFinalization = () => {
161
+ if (frozenObservation !== undefined)
162
+ return frozenObservation;
163
+ frozenObservation = capture?.freeze() ?? { kind: "unobserved" };
164
+ return frozenObservation;
165
+ };
166
+ const publish = (message, observation, escapingError) => {
167
+ if (outputEnded)
168
+ return;
169
+ const final = finalizeMessage(message, observation, escapingError);
170
+ const terminal = terminalEvent(final);
171
+ output.push(terminal);
172
+ output.end(final);
173
+ outputEnded = true;
174
+ };
175
+ try {
176
+ const source = await delegate(model, context, options);
177
+ for await (const event of source) {
178
+ if (event.type === "done" || event.type === "error") {
179
+ const observation = beginFinalization();
180
+ try {
181
+ const result = await source.result();
182
+ publish(result, observation);
183
+ }
184
+ catch (error) {
185
+ publish(syntheticFailure(model, latestPartial ?? terminalSource(event), error, options?.signal), observation, error);
186
+ }
187
+ return;
188
+ }
189
+ latestPartial = event.partial;
190
+ output.push(event);
191
+ }
192
+ const observation = beginFinalization();
193
+ try {
194
+ const result = await source.result();
195
+ publish(result, observation);
196
+ }
197
+ catch (error) {
198
+ publish(syntheticFailure(model, latestPartial, error, options?.signal), observation, error);
199
+ }
200
+ }
201
+ catch (error) {
202
+ const observation = beginFinalization();
203
+ publish(syntheticFailure(model, latestPartial, error, options?.signal), observation, error);
204
+ }
205
+ }
206
+ function terminalSource(event) {
207
+ return event.type === "done" ? event.message : event.error;
208
+ }
209
+ function finalizeMessage(message, observation, escapingError) {
210
+ const mutable = message;
211
+ if (message.stopReason !== "error") {
212
+ Reflect.deleteProperty(mutable, "piWebUiHttpStatus");
213
+ return message;
214
+ }
215
+ let status;
216
+ if (observation.kind === "response") {
217
+ status = isHttpErrorStatus(observation.status) ? observation.status : undefined;
218
+ }
219
+ else if (observation.kind === "unobserved") {
220
+ status = escapingError === undefined
221
+ ? readModelHttpErrorStatus(message)
222
+ : readEscapingErrorStatus(escapingError);
223
+ }
224
+ if (status === undefined)
225
+ Reflect.deleteProperty(mutable, "piWebUiHttpStatus");
226
+ else
227
+ Reflect.set(mutable, "piWebUiHttpStatus", status);
228
+ return message;
229
+ }
230
+ function readEscapingErrorStatus(error) {
231
+ if (!isRecord(error))
232
+ return undefined;
233
+ const directCandidates = [error["statusCode"], error["status"]];
234
+ for (const candidate of directCandidates) {
235
+ if (typeof candidate === "number")
236
+ return isHttpErrorStatus(candidate) ? candidate : undefined;
237
+ }
238
+ const metadata = error["$metadata"];
239
+ if (isRecord(metadata) && typeof metadata["httpStatusCode"] === "number") {
240
+ return isHttpErrorStatus(metadata["httpStatusCode"]) ? metadata["httpStatusCode"] : undefined;
241
+ }
242
+ const response = error["$response"];
243
+ if (isRecord(response) && typeof response["statusCode"] === "number") {
244
+ return isHttpErrorStatus(response["statusCode"]) ? response["statusCode"] : undefined;
245
+ }
246
+ return undefined;
247
+ }
248
+ function syntheticFailure(model, partial, error, signal) {
249
+ const stopReason = signal?.aborted === true ? "aborted" : "error";
250
+ const errorMessage = signal?.aborted === true ? "Request was aborted" : errorMessageFor(error);
251
+ if (partial !== undefined) {
252
+ return { ...partial, stopReason, errorMessage };
253
+ }
254
+ return {
255
+ role: "assistant",
256
+ content: [],
257
+ api: model.api,
258
+ provider: model.provider,
259
+ model: model.id,
260
+ usage: {
261
+ input: 0,
262
+ output: 0,
263
+ cacheRead: 0,
264
+ cacheWrite: 0,
265
+ totalTokens: 0,
266
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },
267
+ },
268
+ stopReason,
269
+ errorMessage,
270
+ timestamp: Date.now(),
271
+ };
272
+ }
273
+ function terminalEvent(message) {
274
+ switch (message.stopReason) {
275
+ case "error":
276
+ return { type: "error", reason: "error", error: message };
277
+ case "aborted":
278
+ return { type: "error", reason: "aborted", error: message };
279
+ case "length":
280
+ return { type: "done", reason: "length", message };
281
+ case "toolUse":
282
+ return { type: "done", reason: "toolUse", message };
283
+ case "deferred":
284
+ return { type: "done", reason: "deferred", message };
285
+ case "pending":
286
+ return { type: "done", reason: "stop", message };
287
+ case "stop":
288
+ default:
289
+ return { type: "done", reason: "stop", message };
290
+ }
291
+ }
292
+ function errorMessageFor(error) {
293
+ return error instanceof Error ? error.message : String(error);
294
+ }
295
+ function isRecord(value) {
296
+ return typeof value === "object" && value !== null && !Array.isArray(value);
297
+ }
298
+ function isWrappedDelegate(delegate) {
299
+ return Reflect.get(delegate, MODEL_HTTP_ERROR_WRAPPED) === true;
300
+ }
301
+ //# sourceMappingURL=modelHttpErrorStream.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modelHttpErrorStream.js","sourceRoot":"","sources":["../../../src/server/sessions/modelHttpErrorStream.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,gBAAgB,GAQjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,wBAAwB,GAAG,MAAM,CAAC,gCAAgC,CAAC,CAAC;AAC1E,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,oBAAoB;IACpB,kBAAkB;IAClB,wBAAwB;IACxB,oBAAoB;IACpB,uBAAuB;IACv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3C,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,wBAAwB,CAAC,KAAK,IAAI,CAAC;AAClE,CAAC"}
@@ -41,6 +41,7 @@ import { RememberCurrentModelPolicyCommand, } from "./rememberCurrentModelPolicy
41
41
  import { StarterModelPolicyPreferenceStore } from "./starterModelPolicyPreferenceStore.js";
42
42
  import { captureModelPolicySettings, modelPolicySettingsPersistence, restoreModelPolicySettings, settleModelPolicySettings, } from "./modelPolicySettingsPersistence.js";
43
43
  import { wrapModelStream } from "../rateLimits/modelRateLimitAdapters.js";
44
+ import { withModelHttpErrorStatusRuntime } from "./modelHttpErrorStream.js";
44
45
  const noopLogger = {
45
46
  info() {
46
47
  /* no-op */
@@ -327,18 +328,19 @@ export function createDefaultRuntimeFactory(modelRuntime, sessionManagers, utili
327
328
  createFromServices: createAgentSessionFromServices,
328
329
  }) {
329
330
  return async ({ cwd, agentDir, sessionManager, sessionStartEvent, initialModel, initialThinkingLevel, delegationToolsEnabled, }) => {
331
+ const statusModelRuntime = withModelHttpErrorStatusRuntime(modelRuntime);
330
332
  const runtimeRefs = {};
331
333
  const services = await sdk.createServices({
332
334
  cwd,
333
335
  agentDir,
334
- modelRuntime,
336
+ modelRuntime: statusModelRuntime,
335
337
  resourceLoaderOptions: {
336
338
  extensionFactories: [
337
339
  createUtilityModelExtension({
338
340
  // Pi's ExtensionContext exposes Model<any>; production candidates still come from ModelRuntime's Model<Api> snapshot.
339
341
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
340
342
  resolver: utilityModelResolver,
341
- modelRuntime,
343
+ modelRuntime: statusModelRuntime,
342
344
  refs: runtimeRefs,
343
345
  logger,
344
346
  }),