isorite 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/dist/main.js +460 -99
  3. package/docs/setup-for-agents.md +5 -1
  4. package/docs/setup.md +18 -4
  5. package/package.json +1 -1
  6. package/web/_app/immutable/assets/{0.DNvf5eFW.css → 0.LEIHnkPh.css} +1 -1
  7. package/web/_app/immutable/chunks/{DG2llOXe.js → 2DHY0Dzh.js} +3 -3
  8. package/web/_app/immutable/chunks/{C1xA2mdF.js → BQRMn_tl.js} +1 -1
  9. package/web/_app/immutable/chunks/C-352d8F.js +1 -0
  10. package/web/_app/immutable/chunks/{B9vLu37F.js → CHxNLteG.js} +1 -1
  11. package/web/_app/immutable/chunks/Cf6h5DpS.js +20 -0
  12. package/web/_app/immutable/chunks/D4A7-5k0.js +1 -0
  13. package/web/_app/immutable/chunks/Dijhflxl.js +1 -0
  14. package/web/_app/immutable/chunks/Ps0IPbdL.js +1 -0
  15. package/web/_app/immutable/chunks/{D4Jg9Smi.js → ZRnI3PpK.js} +1 -1
  16. package/web/_app/immutable/chunks/nhmVyQdD.js +3 -0
  17. package/web/_app/immutable/chunks/rTqzqD6j.js +1 -0
  18. package/web/_app/immutable/chunks/y24aTX4O.js +1 -0
  19. package/web/_app/immutable/entry/app.BQ0r6jSu.js +2 -0
  20. package/web/_app/immutable/entry/start.CIQiYrSU.js +1 -0
  21. package/web/_app/immutable/nodes/0.zPrOkn79.js +26 -0
  22. package/web/_app/immutable/nodes/1.DfBkOAo2.js +1 -0
  23. package/web/_app/immutable/nodes/2.fp8Y5joG.js +1 -0
  24. package/web/_app/immutable/nodes/3.Do9cwxjS.js +1 -0
  25. package/web/_app/immutable/nodes/4.CGd6gzGJ.js +2 -0
  26. package/web/_app/immutable/nodes/5.Dtac-HK8.js +5 -0
  27. package/web/_app/immutable/nodes/6._-kZkWYe.js +1 -0
  28. package/web/_app/immutable/nodes/7.BdTE6U4H.js +1 -0
  29. package/web/_app/version.json +1 -1
  30. package/web/index.html +17 -17
  31. package/web/_app/immutable/chunks/-7PsQOY4.js +0 -3
  32. package/web/_app/immutable/chunks/BAVeNK5c.js +0 -20
  33. package/web/_app/immutable/chunks/CQqNkDRK.js +0 -1
  34. package/web/_app/immutable/chunks/Cs9sQ8Oa.js +0 -1
  35. package/web/_app/immutable/chunks/DqVFJWdL.js +0 -1
  36. package/web/_app/immutable/chunks/HCrXwzvD.js +0 -1
  37. package/web/_app/immutable/chunks/MjV3DsQW.js +0 -1
  38. package/web/_app/immutable/chunks/uID4v_1K.js +0 -1
  39. package/web/_app/immutable/entry/app.CR9ubCCo.js +0 -2
  40. package/web/_app/immutable/entry/start.D4DOZCP6.js +0 -1
  41. package/web/_app/immutable/nodes/0.BYXv43VP.js +0 -26
  42. package/web/_app/immutable/nodes/1.DGP71l35.js +0 -1
  43. package/web/_app/immutable/nodes/2.CxspTYRG.js +0 -1
  44. package/web/_app/immutable/nodes/3.ZTzs6oEI.js +0 -1
  45. package/web/_app/immutable/nodes/4.CeIGu2c2.js +0 -2
  46. package/web/_app/immutable/nodes/5.k1DmYkGm.js +0 -5
  47. package/web/_app/immutable/nodes/6.Q0yGno8p.js +0 -1
  48. package/web/_app/immutable/nodes/7.BJRu312o.js +0 -1
@@ -1,4 +1,4 @@
1
- import{J as e,P as t,X as n,Y as r,dt as i,ft as a,pt as o}from"./-7PsQOY4.js";import{t as s}from"./MjV3DsQW.js";import{i as c}from"./C1xA2mdF.js";var l=Symbol.for(`yaml.alias`),u=Symbol.for(`yaml.document`),d=Symbol.for(`yaml.map`),f=Symbol.for(`yaml.pair`),p=Symbol.for(`yaml.scalar`),m=Symbol.for(`yaml.seq`),h=Symbol.for(`yaml.node.type`),g=e=>!!e&&typeof e==`object`&&e[h]===l,_=e=>!!e&&typeof e==`object`&&e[h]===u,v=e=>!!e&&typeof e==`object`&&e[h]===d,y=e=>!!e&&typeof e==`object`&&e[h]===f,b=e=>!!e&&typeof e==`object`&&e[h]===p,ee=e=>!!e&&typeof e==`object`&&e[h]===m;function x(e){if(e&&typeof e==`object`)switch(e[h]){case d:case m:return!0}return!1}function S(e){if(e&&typeof e==`object`)switch(e[h]){case l:case d:case p:case m:return!0}return!1}var te=e=>(b(e)||x(e))&&!!e.anchor,C=Symbol(`break visit`),w=Symbol(`skip children`),ne=Symbol(`remove node`);function re(e,t){let n=ae(t);_(e)?ie(null,e.contents,n,Object.freeze([e]))===ne&&(e.contents=null):ie(null,e,n,Object.freeze([]))}re.BREAK=C,re.SKIP=w,re.REMOVE=ne;function ie(e,t,n,r){let i=oe(e,t,n,r);if(S(i)||y(i))return se(e,r,i),ie(e,i,n,r);if(typeof i!=`symbol`){if(x(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ie(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===C)return C;else i===ne&&(t.items.splice(e,1),--e)}}else if(y(t)){r=Object.freeze(r.concat(t));let e=ie(`key`,t.key,n,r);if(e===C)return C;e===ne&&(t.key=null);let i=ie(`value`,t.value,n,r);if(i===C)return C;i===ne&&(t.value=null)}}return i}function ae(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function oe(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(v(t))return n.Map?.(e,t,r);if(ee(t))return n.Seq?.(e,t,r);if(y(t))return n.Pair?.(e,t,r);if(b(t))return n.Scalar?.(e,t,r);if(g(t))return n.Alias?.(e,t,r)}function se(e,t,n){let r=t[t.length-1];if(x(r))r.items[e]=n;else if(y(r))e===`key`?r.key=n:r.value=n;else if(_(r))r.contents=n;else{let e=g(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ce={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},le=e=>e.replace(/[!,[\]{}]/g,e=>ce[e]),ue=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+le(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&S(e.contents)){let t={};re(e.contents,(e,n)=>{S(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
1
+ import{I as e,Q as t,X as n,Z as r,gt as i,ht as a,mt as o}from"./nhmVyQdD.js";import{t as s}from"./Dijhflxl.js";import{i as c}from"./BQRMn_tl.js";var l=Symbol.for(`yaml.alias`),u=Symbol.for(`yaml.document`),d=Symbol.for(`yaml.map`),f=Symbol.for(`yaml.pair`),p=Symbol.for(`yaml.scalar`),m=Symbol.for(`yaml.seq`),h=Symbol.for(`yaml.node.type`),g=e=>!!e&&typeof e==`object`&&e[h]===l,_=e=>!!e&&typeof e==`object`&&e[h]===u,v=e=>!!e&&typeof e==`object`&&e[h]===d,y=e=>!!e&&typeof e==`object`&&e[h]===f,b=e=>!!e&&typeof e==`object`&&e[h]===p,ee=e=>!!e&&typeof e==`object`&&e[h]===m;function x(e){if(e&&typeof e==`object`)switch(e[h]){case d:case m:return!0}return!1}function S(e){if(e&&typeof e==`object`)switch(e[h]){case l:case d:case p:case m:return!0}return!1}var te=e=>(b(e)||x(e))&&!!e.anchor,C=Symbol(`break visit`),w=Symbol(`skip children`),ne=Symbol(`remove node`);function re(e,t){let n=ae(t);_(e)?ie(null,e.contents,n,Object.freeze([e]))===ne&&(e.contents=null):ie(null,e,n,Object.freeze([]))}re.BREAK=C,re.SKIP=w,re.REMOVE=ne;function ie(e,t,n,r){let i=oe(e,t,n,r);if(S(i)||y(i))return se(e,r,i),ie(e,i,n,r);if(typeof i!=`symbol`){if(x(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=ie(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===C)return C;else i===ne&&(t.items.splice(e,1),--e)}}else if(y(t)){r=Object.freeze(r.concat(t));let e=ie(`key`,t.key,n,r);if(e===C)return C;e===ne&&(t.key=null);let i=ie(`value`,t.value,n,r);if(i===C)return C;i===ne&&(t.value=null)}}return i}function ae(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function oe(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(v(t))return n.Map?.(e,t,r);if(ee(t))return n.Seq?.(e,t,r);if(y(t))return n.Pair?.(e,t,r);if(b(t))return n.Scalar?.(e,t,r);if(g(t))return n.Alias?.(e,t,r)}function se(e,t,n){let r=t[t.length-1];if(x(r))r.items[e]=n;else if(y(r))e===`key`?r.key=n:r.value=n;else if(_(r))r.contents=n;else{let e=g(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ce={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},le=e=>e.replace(/[!,[\]{}]/g,e=>ce[e]),ue=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+le(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&S(e.contents)){let t={};re(e.contents,(e,n)=>{S(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
2
2
  `)}};ue.defaultYaml={explicit:!1,version:`1.2`},ue.defaultTags={"!!":`tag:yaml.org,2002:`};function de(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function fe(e){let t=new Set;return re(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function pe(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function me(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=fe(e);let a=pe(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(b(t.node)||x(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function he(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=he(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=he(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=he(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=he(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function ge(e,t,n){if(Array.isArray(e))return e.map((e,t)=>ge(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!te(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var _e=class{constructor(e){Object.defineProperty(this,h,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!_(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=ge(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?he(i,{"":o},``,o):o}},ve=class extends _e{constructor(e){super(l),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],re(e,{Node:(e,t)=>{(g(t)||te(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(ge(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=ye(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(de(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function ye(e,t,n){if(g(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(x(t)){let r=0;for(let i of t.items){let t=ye(e,i,n);t>r&&(r=t)}return r}if(y(t)){let r=ye(e,t.key,n),i=ye(e,t.value,n);return Math.max(r,i)}return 1}var be=e=>!e||typeof e!=`function`&&typeof e!=`object`,T=class extends _e{constructor(e){super(p),this.value=e}toJSON(e,t){return t?.keep?this.value:ge(this.value,e,t)}toString(){return String(this.value)}};T.BLOCK_FOLDED=`BLOCK_FOLDED`,T.BLOCK_LITERAL=`BLOCK_LITERAL`,T.PLAIN=`PLAIN`,T.QUOTE_DOUBLE=`QUOTE_DOUBLE`,T.QUOTE_SINGLE=`QUOTE_SINGLE`;var xe=`tag:yaml.org,2002:`;function Se(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function E(e,t,n){if(_(e)&&(e=e.contents),S(e))return e;if(y(e)){let t=n.schema[d].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new ve(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=xe+t.slice(2));let l=Se(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new T(e);return c&&(c.node=t),t}l=e instanceof Map?o[d]:Symbol.iterator in Object(e)?o[m]:o[d]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new T(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function Ce(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return E(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var we=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Te=class extends _e{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>S(t)||y(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(we(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(x(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,Ce(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(x(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&b(i)?i.value:i:x(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!y(t))return!1;let n=t.value;return n==null||e&&b(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return x(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(x(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,Ce(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Ee=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function De(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Oe=(e,t,n)=>e.endsWith(`
3
3
  `)?De(n,t):n.includes(`
4
4
  `)?`
@@ -148,7 +148,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
148
148
  `),c.push(...hc(e))});let l=c.map(()=>e),u=[],d=0,f=0;for(let e of uc(i,c)){for(;d<e.at;)u.push([f,d]),d++,f++;d+=e.del.length,f+=e.ins.length}for(;d<i.length&&f<c.length;)u.push([f,d]),d++,f++;if(u.filter(([e])=>/[\p{L}\p{N}]/u.test(c[e])).length*2>=(e=>e.filter(e=>/[\p{L}\p{N}]/u.test(e)).length)(c))for(let[e,t]of u)l[e]=a[t];let p={t:[],w:[]},m=[];c.forEach((e,t)=>{e===`
149
149
  `?(m.push(p),p={t:[],w:[]}):(p.t.push(e),p.w.push(l[t]))}),t.ins.length&&m.push(p),o.push(...m),s=t.at+t.del.length}o.push(...n.slice(s)),n=o,r=dc(r,a.hunks)}return(n??[]).map(e=>{let t=[],n=0;return e.t.forEach((r,i)=>{let a=e.w[i],o=t.at(-1);o&&o.who===a&&o.to===n?o.to+=r.length:t.push({from:n,to:n+r.length,who:a}),n+=r.length}),t})}var _c=(e,t)=>mc(e,t)?.text??null;function vc(e){let t=new Map,n=(e,n)=>{let r=t.get(e);if(!r)return;let i=r.form===`rewrite`&&n!==void 0?(r.open??[]).filter(e=>e!==n):[];r.form===`rewrite`&&i.length?t.set(e,{...r,open:i}):t.delete(e)};for(let r of e)if(r.kind===`proposal`)t.set(r.id,r.form===`rewrite`?{...r,open:r.regions.map((e,t)=>t)}:r);else if(r.kind===`discard`)n(r.proposal,r.region);else if(r.kind===`change`&&r.proposal&&r.why===`keep`)n(r.proposal,r.region);else if(r.kind===`revise`){let e=t.get(r.proposal);if(!e)continue;e.form===`insert`&&r.text!==void 0&&t.set(e.id,{...e,text:r.text}),e.form===`rewrite`&&r.regions&&t.set(e.id,{...e,regions:e.regions.map((e,t)=>({old:e.old,new:r.regions[t]??e.new}))})}return[...t.values()]}function yc(e,t){if(!t.text)return null;let n=-1;for(let r=0;r<=t.nth&&(n=e.indexOf(t.text,n+1),!(n<0));r++);if(n<0){let r=e.indexOf(t.text);if(r<0||e.indexOf(t.text,r+1)>=0)return null;n=r}return{from:n,to:n+t.text.length}}function bc(e,t,n){let r=e.slice(t,n),i=0;for(let n=e.indexOf(r);n>=0&&n<t;n=e.indexOf(r,n+1))i++;return{text:r,nth:i}}function xc(e,t){if(t.form===`rewrite`)return{form:`rewrite`,regions:t.regions.map(t=>yc(e,t.old))};let n=ac(e),r=t.after?sc(n,t.after):-1,i=t.before?sc(n,t.before):-1;if(r>=0)return{form:`insert`,line:n[r].to};if(i>=0)return{form:`insert`,line:n[i].from};if(!t.after&&!t.before){if(n.length)return{form:`insert`,line:n[n.length-1].to};let t=e.split(`
150
150
  `),r=t.length;for(;r>0&&!t[r-1].trim();)r--;return{form:`insert`,line:r}}return!t.after&&n.length?{form:`insert`,line:n[0].from}:null}function Sc(e,t){let n=ac(e),r=-1;for(let e=0;e<n.length;e++)n[e].from<t&&(r=e);return{form:`insert`,after:r>=0?oc(n,r):null,before:r+1<n.length?oc(n,r+1):null}}function Cc(e){let t=[],n=new Map,r=new Map;for(let i of e){let e={ids:[i.id],at:i.at,session:i.session,who:i.who};if(i.kind===`proposal`){let a={...e,what:`offered`,asked:i.asked};n.set(i.id,a),r.set(i.id,i.asked),t.push(a)}else if(i.kind===`discard`){let e=n.get(i.proposal);e&&(e.what=`discarded`,e.ids.push(i.id))}else if(i.kind===`change`){let r=i.proposal?n.get(i.proposal):void 0;if(i.why===`keep`&&r){r.what=`kept`,r.ids.push(i.id),r.at=i.at;continue}let a=t[t.length-1];if(i.why===`edit`&&a&&a.what===`edited`&&a.who===i.who&&a.session===i.session){a.ids.push(i.id),a.at=i.at;continue}let o=i.why===`start`?i.who===`external`?`found`:`wrote`:i.why===`edit`?`edited`:i.why===`restore`?`restored`:i.why===`keep`?`kept`:i.why===`move`?`moved`:`changed elsewhere`;t.push({...e,what:o,...i.asked?{asked:i.asked}:{}})}}return t}function wc(e,t){let n=0;for(let r of e){if(t<r.at)break;if(t<r.at+r.del.length)return null;n+=r.ins.length-r.del.length}return t+n}function Tc(e){if(e.why===`start`||!e.hunks.length&&e.before===null)return(e.text??``).split(`
151
- `).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function Ec(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!pc(t))continue;let e=new Set;for(let n of r){let r=wc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of Tc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function Dc(e,t){let n=e.edges.some(([,,e])=>e>=rc.requires)?rc.requires:rc.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=rc.uses?a:o).add(c===t?l:c),u>=rc.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}var Oc={opencode:`OpenCode`,"claude-code":`Claude Code`,pi:`Pi`};function kc(e){let t=e?.startsWith(`agent:`)?e.slice(6):e?.includes(`:`)?``:e??``;return t?Oc[t]??t:``}var Ac=e=>e.kind===`passage`?`passage:${e.id}:${e.text}`:`${e.kind}:${e.id}`,jc=new class{#e=n([]);get parts(){return t(this.#e)}set parts(e){r(this.#e,e)}#t=n(``);get fresh(){return t(this.#t)}set fresh(e){r(this.#t,e,!0)}#n=n(null);get carrying(){return t(this.#n)}set carrying(e){r(this.#n,e)}has(e,t){return this.parts.some(n=>n.kind===e&&n.id===t)}add(e){return!this.parts.some(t=>Ac(t)===Ac(e))&&(this.parts=[...this.parts,e],this.fresh=Ac(e),c.focus!==`iso`&&c.unseen++,!0)}remove(e){e.kind===`understanding`?this.unwant(e.id):this.parts=this.parts.filter(t=>Ac(t)!==Ac(e))}toggle(e){return this.parts.some(t=>Ac(t)===Ac(e))?(this.remove(e),!1):(this.add(e),!0)}clear(){this.parts=[]}#r=n([]);get notWanted(){return t(this.#r)}set notWanted(e){r(this.#r,e)}get modeParts(){return(c.understanding&&s.open&&!s.open.startsWith(`@`)?[s.open]:[]).filter(e=>!this.notWanted.includes(e)).map(e=>({kind:`understanding`,id:e,title:s.listing.notes.find(t=>t.id===e)?.title??e}))}get sent(){return[...this.parts,...this.modeParts]}unwant(e){this.notWanted=[...this.notWanted,e]}modeChanged(){this.notWanted=[]}keyOf=Ac};c.onMode=()=>jc.modeChanged();var Mc=[`low`,`mid`,`max`],Nc=(e,t,n)=>{try{let r=JSON.parse(localStorage.getItem(e)??`null`);return n(r)?r:t}catch{return t}},Pc=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},Fc=new class{#e=n(e(Nc(`isorite.tier.v2`,`mid`,e=>Mc.includes(e))));get tier(){return t(this.#e)}set tier(e){r(this.#e,e,!0)}#t=n(e(Nc(`isorite.context`,{},e=>typeof e==`object`&&!!e)));get choices(){return t(this.#t)}set choices(e){r(this.#t,e,!0)}of(e){return this.choices[e]??{}}toggle(e,t){let n=this.of(e),r=n.off??[];this.set(e,{...n,off:r.includes(t)?r.filter(e=>e!==t):[...r,t]})}setLookup(e,t){this.set(e,{...this.of(e),lookup:t})}setTier(e){this.tier=e,Pc(`isorite.tier.v2`,e)}set(e,t){let n={...t.off?.length?{off:t.off}:{},...t.lookup===!1?{lookup:!1}:{}},r={...this.choices};Object.keys(n).length?r[e]=n:delete r[e],this.choices=r,Pc(`isorite.context`,r)}},Ic=new class{#e=n(null);get elsewhere(){return t(this.#e)}set elsewhere(e){r(this.#e,e)}#t=n(``);get onAtlas(){return t(this.#t)}set onAtlas(e){r(this.#t,e,!0)}set(e,t){t?this.elsewhere={...t,from:e}:this.elsewhere?.from===e&&(this.elsewhere=null)}};function Lc(e){let t=/^#\/n\/([^?#]+)/.exec(e);if(!t)return null;let n=decodeURIComponent(t[1]);return n.endsWith(`/`)?{id:n.slice(0,-1),folder:!0}:{id:n,folder:!1}}var Rc=i(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.katex=r():n.katex=r()})(typeof self<`u`?self:e,function(){return(function(){var e={};(function(){e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}})(),(function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var t={};e.d(t,{default:function(){return ma}});class n extends Error{constructor(e,t){let r=`KaTeX parse error: `+e,i,a,o=t&&t.loc;if(o&&o.start<=o.end){let e=o.lexer.input;i=o.start,a=o.end,i===e.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;let t=e.slice(i,a).replace(/[^]/g,`$&̲`),n;n=i>15?`…`+e.slice(i-15,i):e.slice(0,i);let s;s=a+15<e.length?e.slice(a,a+15)+`…`:e.slice(a),r+=n+t+s}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,n.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=e}}var r=n;let i=/([A-Z])/g,a=e=>e.replace(i,`-$1`).toLowerCase(),o={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},s=/[&><"']/g,c=e=>String(e).replace(s,e=>o[e]),l=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?l(e.body[0]):e:e.type===`font`?l(e.body):e,u=new Set([`mathord`,`textord`,`atom`]),d=e=>u.has(l(e).type),f=e=>{let t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},p={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function m(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function h(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:m(Array.isArray(e.type)?e.type[0]:e.type)}function g(e,t,n,r){let i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?h(r):a?a(i):i}class _{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(let t of Object.keys(p)){let n=p[t];n&&g(this,t,e,n)}}reportNonstrict(e,t,n){let i=this.strict;if(typeof i==`function`&&(i=i(e,t,n)),i&&i!==`ignore`){if(i===!0||i===`error`)throw new r(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);i===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+i+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){let r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){let t=f(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}}class v{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return y[b[this.id]]}sub(){return y[ee[this.id]]}fracNum(){return y[x[this.id]]}fracDen(){return y[S[this.id]]}cramp(){return y[te[this.id]]}text(){return y[C[this.id]]}isTight(){return this.size>=2}}let y=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],b=[4,5,4,5,6,7,6,7],ee=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],S=[3,3,5,5,7,7,7,7],te=[1,1,3,3,5,5,7,7],C=[0,1,2,3,2,3,2,3];var w={DISPLAY:y[0],TEXT:y[2],SCRIPT:y[4],SCRIPTSCRIPT:y[6]};let ne=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function re(e){for(let t=0;t<ne.length;t++){let n=ne[t];for(let t=0;t<n.blocks.length;t++){let r=n.blocks[t];if(e>=r[0]&&e<=r[1])return n.name}}return null}let ie=[];ne.forEach(e=>e.blocks.forEach(e=>ie.push(...e)));function ae(e){for(let t=0;t<ie.length;t+=2)if(e>=ie[t]&&e<=ie[t+1])return!0;return!1}let oe=e=>e+` `+e,se=function(e,t){return`M95,`+(622+e+t)+`
151
+ `).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function Ec(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!pc(t))continue;let e=new Set;for(let n of r){let r=wc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of Tc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function Dc(e,t){let n=e.edges.some(([,,e])=>e>=rc.requires)?rc.requires:rc.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=rc.uses?a:o).add(c===t?l:c),u>=rc.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}var Oc={opencode:`OpenCode`,"claude-code":`Claude Code`,pi:`Pi`};function kc(e){let t=e?.startsWith(`agent:`)?e.slice(6):e?.includes(`:`)?``:e??``;return t?Oc[t]??t:``}var Ac=e=>e.kind===`passage`?`passage:${e.id}:${e.text}`:`${e.kind}:${e.id}`,jc=new class{#e=t([]);get parts(){return e(this.#e)}set parts(e){r(this.#e,e)}#t=t(``);get fresh(){return e(this.#t)}set fresh(e){r(this.#t,e,!0)}#n=t(null);get carrying(){return e(this.#n)}set carrying(e){r(this.#n,e)}has(e,t){return this.parts.some(n=>n.kind===e&&n.id===t)}add(e){return!this.parts.some(t=>Ac(t)===Ac(e))&&(this.parts=[...this.parts,e],this.fresh=Ac(e),c.focus!==`iso`&&c.unseen++,!0)}remove(e){e.kind===`understanding`?this.unwant(e.id):this.parts=this.parts.filter(t=>Ac(t)!==Ac(e))}toggle(e){return this.parts.some(t=>Ac(t)===Ac(e))?(this.remove(e),!1):(this.add(e),!0)}clear(){this.parts=[]}#r=t([]);get notWanted(){return e(this.#r)}set notWanted(e){r(this.#r,e)}get modeParts(){return(c.understanding&&s.open&&!s.open.startsWith(`@`)?[s.open]:[]).filter(e=>!this.notWanted.includes(e)).map(e=>({kind:`understanding`,id:e,title:s.listing.notes.find(t=>t.id===e)?.title??e}))}get sent(){return[...this.parts,...this.modeParts]}unwant(e){this.notWanted=[...this.notWanted,e]}modeChanged(){this.notWanted=[]}keyOf=Ac};c.onMode=()=>jc.modeChanged();var Mc=[`low`,`mid`,`max`],Nc=(e,t,n)=>{try{let r=JSON.parse(localStorage.getItem(e)??`null`);return n(r)?r:t}catch{return t}},Pc=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}},Fc=new class{#e=t(n(Nc(`isorite.tier.v2`,`mid`,e=>Mc.includes(e))));get tier(){return e(this.#e)}set tier(e){r(this.#e,e,!0)}#t=t(n(Nc(`isorite.context`,{},e=>typeof e==`object`&&!!e)));get choices(){return e(this.#t)}set choices(e){r(this.#t,e,!0)}of(e){return this.choices[e]??{}}toggle(e,t){let n=this.of(e),r=n.off??[];this.set(e,{...n,off:r.includes(t)?r.filter(e=>e!==t):[...r,t]})}setLookup(e,t){this.set(e,{...this.of(e),lookup:t})}setTier(e){this.tier=e,Pc(`isorite.tier.v2`,e)}set(e,t){let n={...t.off?.length?{off:t.off}:{},...t.lookup===!1?{lookup:!1}:{}},r={...this.choices};Object.keys(n).length?r[e]=n:delete r[e],this.choices=r,Pc(`isorite.context`,r)}},Ic=new class{#e=t(null);get elsewhere(){return e(this.#e)}set elsewhere(e){r(this.#e,e)}#t=t(``);get onAtlas(){return e(this.#t)}set onAtlas(e){r(this.#t,e,!0)}set(e,t){t?this.elsewhere={...t,from:e}:this.elsewhere?.from===e&&(this.elsewhere=null)}};function Lc(e){let t=/^#\/n\/([^?#]+)/.exec(e);if(!t)return null;let n=decodeURIComponent(t[1]);return n.endsWith(`/`)?{id:n.slice(0,-1),folder:!0}:{id:n,folder:!1}}var Rc=o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.katex=r():n.katex=r()})(typeof self<`u`?self:e,function(){return(function(){var e={};(function(){e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}})(),(function(){e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var t={};e.d(t,{default:function(){return ma}});class n extends Error{constructor(e,t){let r=`KaTeX parse error: `+e,i,a,o=t&&t.loc;if(o&&o.start<=o.end){let e=o.lexer.input;i=o.start,a=o.end,i===e.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;let t=e.slice(i,a).replace(/[^]/g,`$&̲`),n;n=i>15?`…`+e.slice(i-15,i):e.slice(0,i);let s;s=a+15<e.length?e.slice(a,a+15)+`…`:e.slice(a),r+=n+t+s}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,n.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=e}}var r=n;let i=/([A-Z])/g,a=e=>e.replace(i,`-$1`).toLowerCase(),o={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},s=/[&><"']/g,c=e=>String(e).replace(s,e=>o[e]),l=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?l(e.body[0]):e:e.type===`font`?l(e.body):e,u=new Set([`mathord`,`textord`,`atom`]),d=e=>u.has(l(e).type),f=e=>{let t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},p={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function m(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function h(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:m(Array.isArray(e.type)?e.type[0]:e.type)}function g(e,t,n,r){let i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?h(r):a?a(i):i}class _{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(let t of Object.keys(p)){let n=p[t];n&&g(this,t,e,n)}}reportNonstrict(e,t,n){let i=this.strict;if(typeof i==`function`&&(i=i(e,t,n)),i&&i!==`ignore`){if(i===!0||i===`error`)throw new r(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);i===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+i+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){let r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){let t=f(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}}class v{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return y[b[this.id]]}sub(){return y[ee[this.id]]}fracNum(){return y[x[this.id]]}fracDen(){return y[S[this.id]]}cramp(){return y[te[this.id]]}text(){return y[C[this.id]]}isTight(){return this.size>=2}}let y=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],b=[4,5,4,5,6,7,6,7],ee=[5,5,5,5,7,7,7,7],x=[2,3,4,5,6,7,6,7],S=[3,3,5,5,7,7,7,7],te=[1,1,3,3,5,5,7,7],C=[0,1,2,3,2,3,2,3];var w={DISPLAY:y[0],TEXT:y[2],SCRIPT:y[4],SCRIPTSCRIPT:y[6]};let ne=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function re(e){for(let t=0;t<ne.length;t++){let n=ne[t];for(let t=0;t<n.blocks.length;t++){let r=n.blocks[t];if(e>=r[0]&&e<=r[1])return n.name}}return null}let ie=[];ne.forEach(e=>e.blocks.forEach(e=>ie.push(...e)));function ae(e){for(let t=0;t<ie.length;t+=2)if(e>=ie[t]&&e<=ie[t+1])return!0;return!1}let oe=e=>e+` `+e,se=function(e,t){return`M95,`+(622+e+t)+`
152
152
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
153
153
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
154
154
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -405,7 +405,7 @@ l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
405
405
  ?)[ \r ]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*`+`|[\ud800-\udbff][\udc00-\udfff]`+`[̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r
406
406
  ]*`+(`|`+Hi+`)`);class Gi{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Wi,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){let e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Xr(`EOF`,new Yr(this,t,t));let n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new r(`Unexpected character: '`+e[t]+`'`,new Xr(e[t],new Yr(this,t,t+1)));let i=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[i]===14){let t=e.indexOf(`
407
407
  `,this.tokenRegex.lastIndex);return t===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=t+1,this.lex()}return new Xr(i,new Yr(this,t,this.tokenRegex.lastIndex))}}class Ki{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new r(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);let e=this.undefStack.pop();for(let t of Object.keys(e))e[t]===void 0?delete this.current[t]:this.current[t]=e[t]}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return Object.prototype.hasOwnProperty.call(this.current,e)||Object.prototype.hasOwnProperty.call(this.builtins,e)}get(e){if(Object.prototype.hasOwnProperty.call(this.current,e))return this.current[e];if(Object.prototype.hasOwnProperty.call(this.builtins,e))return this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(let t=0;t<this.undefStack.length;t++)delete this.undefStack[t][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{let t=this.undefStack[this.undefStack.length-1];t&&!Object.prototype.hasOwnProperty.call(t,e)&&(t[e]=Object.prototype.hasOwnProperty.call(this.current,e)?this.current[e]:void 0)}t==null?delete this.current[e]:this.current[e]=t}}var qi=Jr;L(`\\noexpand`,function(e){let t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),L(`\\expandafter`,function(e){let t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),L(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),L(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),L(`\\@ifnextchar`,function(e){let t=e.consumeArgs(3);e.consumeSpaces();let n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),L(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),L(`\\TextOrMath`,function(e){let t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});let Ji={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};L(`\\char`,function(e){let t=e.popToken(),n,i=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)i=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new r("\\char` missing argument");else i=t.text.charCodeAt(0)}else n=10;if(n){if(i=Ji[t.text],i==null||i>=n)throw new r(`Invalid base-`+n+` digit `+t.text);let a;for(;(a=Ji[e.future().text])!=null&&a<n;)i*=n,i+=a,e.popToken()}return`\\@char{`+i+`}`});let Yi=(e,t,n,i)=>{let a=e.consumeArg().tokens;if(a.length!==1)throw new r(`\\newcommand's first argument must be a macro name`);let o=a[0].text,s=e.isDefined(o);if(s&&!t)throw new r(`\\newcommand{`+o+`} attempting to redefine `+(o+`; use \\renewcommand`));if(!s&&!n)throw new r(`\\renewcommand{`+o+`} when command `+o+` does not yet exist; use \\newcommand`);let c=0;if(a=e.consumeArg().tokens,a.length===1&&a[0].text===`[`){let t=``,n=e.expandNextToken();for(;n.text!==`]`&&n.text!==`EOF`;)t+=n.text,n=e.expandNextToken();if(!t.match(/^\s*[0-9]+\s*$/))throw new r(`Invalid number of arguments: `+t);c=parseInt(t),a=e.consumeArg().tokens}return s&&i||e.macros.set(o,{tokens:a,numArgs:c}),``};L(`\\newcommand`,e=>Yi(e,!1,!0,!1)),L(`\\renewcommand`,e=>Yi(e,!0,!1,!1)),L(`\\providecommand`,e=>Yi(e,!0,!0,!0)),L(`\\message`,e=>{let t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),L(`\\errmessage`,e=>{let t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),L(`\\show`,e=>{let t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),Vi[n],Je.math[n],Je.text[n]),``}),L(`\\bgroup`,`{`),L(`\\egroup`,`}`),L(`~`,`\\nobreakspace`),L(`\\lq`,"`"),L(`\\rq`,`'`),L(`\\aa`,`\\r a`),L(`\\AA`,`\\r A`),L(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),L(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),L(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),L(`ℬ`,`\\mathscr{B}`),L(`ℰ`,`\\mathscr{E}`),L(`ℱ`,`\\mathscr{F}`),L(`ℋ`,`\\mathscr{H}`),L(`ℐ`,`\\mathscr{I}`),L(`ℒ`,`\\mathscr{L}`),L(`ℳ`,`\\mathscr{M}`),L(`ℛ`,`\\mathscr{R}`),L(`ℭ`,`\\mathfrak{C}`),L(`ℌ`,`\\mathfrak{H}`),L(`ℨ`,`\\mathfrak{Z}`),L(`\\Bbbk`,`\\Bbb{k}`),L(`\\llap`,`\\mathllap{\\textrm{#1}}`),L(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),L(`\\clap`,`\\mathclap{\\textrm{#1}}`),L(`\\mathstrut`,`\\vphantom{(}`),L(`\\underbar`,`\\underline{\\text{#1}}`),L(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),L(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),L(`\\ne`,`\\neq`),L(`≠`,`\\neq`),L(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),L(`∉`,`\\notin`),L(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),L(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),L(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),L(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),L(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),L(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),L(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),L(`⟂`,`\\perp`),L(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),L(`∌`,`\\notni`),L(`⌜`,`\\ulcorner`),L(`⌝`,`\\urcorner`),L(`⌞`,`\\llcorner`),L(`⌟`,`\\lrcorner`),L(`©`,`\\copyright`),L(`®`,`\\textregistered`),L(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),L(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),L(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),L(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),L(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),L(`⋮`,`\\vdots`),L(`\\varGamma`,`\\mathit{\\Gamma}`),L(`\\varDelta`,`\\mathit{\\Delta}`),L(`\\varTheta`,`\\mathit{\\Theta}`),L(`\\varLambda`,`\\mathit{\\Lambda}`),L(`\\varXi`,`\\mathit{\\Xi}`),L(`\\varPi`,`\\mathit{\\Pi}`),L(`\\varSigma`,`\\mathit{\\Sigma}`),L(`\\varUpsilon`,`\\mathit{\\Upsilon}`),L(`\\varPhi`,`\\mathit{\\Phi}`),L(`\\varPsi`,`\\mathit{\\Psi}`),L(`\\varOmega`,`\\mathit{\\Omega}`),L(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),L(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),L(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),L(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),L(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),L(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),L(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),L(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);let Xi={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},Zi=new Set([`bin`,`rel`]);L(`\\dots`,function(e){let t=`\\dotso`,n=e.expandAfterFuture().text;return n in Xi?t=Xi[n]:(n.slice(0,4)===`\\not`||n in Je.math&&Zi.has(Je.math[n].group))&&(t=`\\dotsb`),t});let Qi={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};L(`\\dotso`,function(e){return e.future().text in Qi?`\\ldots\\,`:`\\ldots`}),L(`\\dotsc`,function(e){let t=e.future().text;return t in Qi&&t!==`,`?`\\ldots\\,`:`\\ldots`}),L(`\\cdots`,function(e){return e.future().text in Qi?`\\@cdots\\,`:`\\@cdots`}),L(`\\dotsb`,`\\cdots`),L(`\\dotsm`,`\\cdots`),L(`\\dotsi`,`\\!\\cdots`),L(`\\dotsx`,`\\ldots\\,`),L(`\\DOTSI`,`\\relax`),L(`\\DOTSB`,`\\relax`),L(`\\DOTSX`,`\\relax`),L(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),L(`\\,`,`\\tmspace+{3mu}{.1667em}`),L(`\\thinspace`,`\\,`),L(`\\>`,`\\mskip{4mu}`),L(`\\:`,`\\tmspace+{4mu}{.2222em}`),L(`\\medspace`,`\\:`),L(`\\;`,`\\tmspace+{5mu}{.2777em}`),L(`\\thickspace`,`\\;`),L(`\\!`,`\\tmspace-{3mu}{.1667em}`),L(`\\negthinspace`,`\\!`),L(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),L(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),L(`\\enspace`,`\\kern.5em `),L(`\\enskip`,`\\hskip.5em\\relax`),L(`\\quad`,`\\hskip1em\\relax`),L(`\\qquad`,`\\hskip2em\\relax`),L(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),L(`\\tag@paren`,`\\tag@literal{({#1})}`),L(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new r(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),L(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),L(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),L(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),L(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),L(`\\newline`,`\\\\\\relax`),L(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);let $i=E(Be[`Main-Regular`][84][1]-.7*Be[`Main-Regular`][65][1]);L(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+$i+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),L(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+$i+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),L(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),L(`\\@hspace`,`\\hskip #1\\relax`),L(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),L(`\\ordinarycolon`,`:`),L(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),L(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),L(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),L(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),L(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),L(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),L(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),L(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),L(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),L(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),L(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),L(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),L(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),L(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),L(`∷`,`\\dblcolon`),L(`∹`,`\\eqcolon`),L(`≔`,`\\coloneqq`),L(`≕`,`\\eqqcolon`),L(`⩴`,`\\Coloneqq`),L(`\\ratio`,`\\vcentcolon`),L(`\\coloncolon`,`\\dblcolon`),L(`\\colonequals`,`\\coloneqq`),L(`\\coloncolonequals`,`\\Coloneqq`),L(`\\equalscolon`,`\\eqqcolon`),L(`\\equalscoloncolon`,`\\Eqqcolon`),L(`\\colonminus`,`\\coloneq`),L(`\\coloncolonminus`,`\\Coloneq`),L(`\\minuscolon`,`\\eqcolon`),L(`\\minuscoloncolon`,`\\Eqcolon`),L(`\\coloncolonapprox`,`\\Colonapprox`),L(`\\coloncolonsim`,`\\Colonsim`),L(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),L(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),L(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),L(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),L(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),L(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),L(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),L(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),L(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),L(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),L(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),L(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),L(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),L(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),L(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),L(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),L(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),L(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),L(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),L(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),L(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),L(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),L(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),L(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),L(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),L(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),L(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),L(`\\imath`,`\\html@mathml{\\@imath}{ı}`),L(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),L(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),L(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),L(`⟦`,`\\llbracket`),L(`⟧`,`\\rrbracket`),L(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),L(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),L(`↤`,`\\mapsfrom`),L(`\\mapsfrom`,"\\html@mathml{\\mathrel{\\mathreflectbox{\\mapsto}}}{\\mathrel{\\char`↤}}"),L(`⦃`,`\\lBrace`),L(`⦄`,`\\rBrace`),L(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),L(`⦵`,`\\minuso`),L(`\\darr`,`\\downarrow`),L(`\\dArr`,`\\Downarrow`),L(`\\Darr`,`\\Downarrow`),L(`\\lang`,`\\langle`),L(`\\rang`,`\\rangle`),L(`\\uarr`,`\\uparrow`),L(`\\uArr`,`\\Uparrow`),L(`\\Uarr`,`\\Uparrow`),L(`\\N`,`\\mathbb{N}`),L(`\\R`,`\\mathbb{R}`),L(`\\Z`,`\\mathbb{Z}`),L(`\\alef`,`\\aleph`),L(`\\alefsym`,`\\aleph`),L(`\\Alpha`,`\\mathrm{A}`),L(`\\Beta`,`\\mathrm{B}`),L(`\\bull`,`\\bullet`),L(`\\Chi`,`\\mathrm{X}`),L(`\\clubs`,`\\clubsuit`),L(`\\cnums`,`\\mathbb{C}`),L(`\\Complex`,`\\mathbb{C}`),L(`\\Dagger`,`\\ddagger`),L(`\\diamonds`,`\\diamondsuit`),L(`\\empty`,`\\emptyset`),L(`\\Epsilon`,`\\mathrm{E}`),L(`\\Eta`,`\\mathrm{H}`),L(`\\exist`,`\\exists`),L(`\\harr`,`\\leftrightarrow`),L(`\\hArr`,`\\Leftrightarrow`),L(`\\Harr`,`\\Leftrightarrow`),L(`\\hearts`,`\\heartsuit`),L(`\\image`,`\\Im`),L(`\\infin`,`\\infty`),L(`\\Iota`,`\\mathrm{I}`),L(`\\isin`,`\\in`),L(`\\Kappa`,`\\mathrm{K}`),L(`\\larr`,`\\leftarrow`),L(`\\lArr`,`\\Leftarrow`),L(`\\Larr`,`\\Leftarrow`),L(`\\lrarr`,`\\leftrightarrow`),L(`\\lrArr`,`\\Leftrightarrow`),L(`\\Lrarr`,`\\Leftrightarrow`),L(`\\Mu`,`\\mathrm{M}`),L(`\\natnums`,`\\mathbb{N}`),L(`\\Nu`,`\\mathrm{N}`),L(`\\Omicron`,`\\mathrm{O}`),L(`\\plusmn`,`\\pm`),L(`\\rarr`,`\\rightarrow`),L(`\\rArr`,`\\Rightarrow`),L(`\\Rarr`,`\\Rightarrow`),L(`\\real`,`\\Re`),L(`\\reals`,`\\mathbb{R}`),L(`\\Reals`,`\\mathbb{R}`),L(`\\Rho`,`\\mathrm{P}`),L(`\\sdot`,`\\cdot`),L(`\\sect`,`\\S`),L(`\\spades`,`\\spadesuit`),L(`\\sub`,`\\subset`),L(`\\sube`,`\\subseteq`),L(`\\supe`,`\\supseteq`),L(`\\Tau`,`\\mathrm{T}`),L(`\\thetasym`,`\\vartheta`),L(`\\weierp`,`\\wp`),L(`\\Zeta`,`\\mathrm{Z}`),L(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),L(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),L(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),L(`\\bra`,`\\mathinner{\\langle{#1}|}`),L(`\\ket`,`\\mathinner{|{#1}\\rangle}`),L(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),L(`\\Bra`,`\\left\\langle#1\\right|`),L(`\\Ket`,`\\left|#1\\right\\rangle`);let ea=e=>t=>{let n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();let c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));let a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));let l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};L(`\\bra@ket`,ea(!1)),L(`\\bra@set`,ea(!0)),L(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),L(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),L(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),L(`\\angln`,`{\\angl n}`),L(`\\blue`,`\\textcolor{##6495ed}{#1}`),L(`\\orange`,`\\textcolor{##ffa500}{#1}`),L(`\\pink`,`\\textcolor{##ff00af}{#1}`),L(`\\red`,`\\textcolor{##df0030}{#1}`),L(`\\green`,`\\textcolor{##28ae7b}{#1}`),L(`\\gray`,`\\textcolor{gray}{#1}`),L(`\\purple`,`\\textcolor{##9d38bd}{#1}`),L(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),L(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),L(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),L(`\\blueD`,`\\textcolor{##11accd}{#1}`),L(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),L(`\\tealA`,`\\textcolor{##94fff5}{#1}`),L(`\\tealB`,`\\textcolor{##26edd5}{#1}`),L(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),L(`\\tealD`,`\\textcolor{##01a995}{#1}`),L(`\\tealE`,`\\textcolor{##208170}{#1}`),L(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),L(`\\greenB`,`\\textcolor{##8af281}{#1}`),L(`\\greenC`,`\\textcolor{##74cf70}{#1}`),L(`\\greenD`,`\\textcolor{##1fab54}{#1}`),L(`\\greenE`,`\\textcolor{##0d923f}{#1}`),L(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),L(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),L(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),L(`\\goldD`,`\\textcolor{##e07d10}{#1}`),L(`\\goldE`,`\\textcolor{##a75a05}{#1}`),L(`\\redA`,`\\textcolor{##fca9a9}{#1}`),L(`\\redB`,`\\textcolor{##ff8482}{#1}`),L(`\\redC`,`\\textcolor{##f9685d}{#1}`),L(`\\redD`,`\\textcolor{##e84d39}{#1}`),L(`\\redE`,`\\textcolor{##bc2612}{#1}`),L(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),L(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),L(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),L(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),L(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),L(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),L(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),L(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),L(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),L(`\\purpleE`,`\\textcolor{##543b78}{#1}`),L(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),L(`\\mintB`,`\\textcolor{##edf2df}{#1}`),L(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),L(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),L(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),L(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),L(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),L(`\\grayE`,`\\textcolor{##babec2}{#1}`),L(`\\grayF`,`\\textcolor{##888d93}{#1}`),L(`\\grayG`,`\\textcolor{##626569}{#1}`),L(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),L(`\\grayI`,`\\textcolor{##21242c}{#1}`),L(`\\kaBlue`,`\\textcolor{##314453}{#1}`),L(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);let ta={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class na{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Ki(qi,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Gi(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken();var i=this.consumeArg([`]`]);r=i.tokens,n=i.end}else{var a=this.consumeArg();r=a.tokens,t=a.start,n=a.end}return this.pushToken(new Xr(`EOF`,n.loc)),this.pushTokens(r),new Xr(``,Yr.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){let t=[],n=e&&e.length>0;n||this.consumeSpaces();let i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),t.push(a),a.text===`{`)++o;else if(a.text===`}`){if(--o,o===-1)throw new r(`Extra }`,a)}else if(a.text===`EOF`)throw new r(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[s]:`}`)+`'`,a);if(e&&n){if((o===0||o===1&&e[s]===`{`)&&a.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}}while(o!==0||n);return i.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new r(`The length of delimiters doesn't match the number of args!`);let n=t[0];for(let e=0;e<n.length;e++){let t=this.popToken();if(n[e]!==t.text)throw new r(`Use of the macro doesn't match its definition`,t)}}let n=[];for(let r=0;r<e;r++)n.push(this.consumeArg(t&&t[r+1]).tokens);return n}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new r(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){let t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]===`\\`&&!this.isDefined(n))throw new r(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);let a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(let e=a.length-1;e>=0;--e){let t=a[e];if(t.text===`#`){if(e===0)throw new r(`Incomplete placeholder at end of macro body`,t);if(t=a[--e],t.text===`#`)a.splice(e+1,1);else if(/^[1-9]$/.test(t.text))a.splice(e,2,...o[t.text-1]);else throw new r(`Not a valid argument number`,t)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){let e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Xr(e)]):void 0}expandTokens(e){let t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){let e=this.stack.pop();e.treatAsRelax&&=(e.noexpand=!1,!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){let t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){let t=this.macros.get(e);if(t==null)return t;if(e.length===1){let t=this.lexer.catcodes[e];if(t!=null&&t!==13)return}let n=typeof t==`function`?t(this):t;if(typeof n==`string`){let e=0;if(n.includes(`#`)){let t=n.replace(/##/g,``);for(;t.includes(`#`+(e+1));)++e}let t=new Gi(n,this.settings),r=[],i=t.lex();for(;i.text!==`EOF`;)r.push(i),i=t.lex();return r.reverse(),{tokens:r,numArgs:e}}return n}isDefined(e){return this.macros.has(e)||Object.prototype.hasOwnProperty.call(Vi,e)||Object.prototype.hasOwnProperty.call(Je.math,e)||Object.prototype.hasOwnProperty.call(Je.text,e)||Object.prototype.hasOwnProperty.call(ta,e)}isExpandable(e){let t=this.macros.get(e);return t==null?Object.prototype.hasOwnProperty.call(Vi,e)&&!Vi[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}}let ra=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ia=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),aa={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},oa={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`};class sa{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new na(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new r(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{let e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){let t=this.nextToken;this.consume(),this.gullet.pushToken(new Xr(`}`)),this.gullet.pushTokens(e);let n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(e,t){let n=[];for(;;){this.mode===`math`&&this.consumeSpaces();let r=this.fetch();if(sa.endOfExpression.has(r.text)||t&&r.text===t||e&&Vi[r.text]&&Vi[r.text].infix)break;let i=this.parseAtom(t);if(!i)break;i.type!==`internal`&&n.push(i)}return this.mode===`text`&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){let t=-1,n;for(let i=0;i<e.length;i++){let a=e[i];if(a.type===`infix`){if(t!==-1)throw new r(`only one infix operator per group`,a.token);t=i,n=a.replaceWith}}if(t!==-1&&n){let r,i,a=e.slice(0,t),o=e.slice(t+1);r=a.length===1&&a[0].type===`ordgroup`?a[0]:{type:`ordgroup`,mode:this.mode,body:a},i=o.length===1&&o[0].type===`ordgroup`?o[0]:{type:`ordgroup`,mode:this.mode,body:o};let s;return s=n===`\\\\abovefrac`?this.callFunction(n,[r,e[t],i],[]):this.callFunction(n,[r,i],[]),[s]}return e}handleSupSubscript(e){let t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();let i;do i=this.parseGroup(e);while(i?.type===`internal`);if(!i)throw new r(`Expected group after '`+n+`'`,t);return i}formatUnsupportedCmd(e){let t=[];for(let n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});let n={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){let t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;let n,i;for(;;){this.consumeSpaces();let e=this.fetch();if(e.text===`\\limits`||e.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=e.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=e.text===`\\limits`);else throw new r(`Limit controls must follow a math operator`,e);this.consume()}else if(e.text===`^`){if(n)throw new r(`Double superscript`,e);n=this.handleSupSubscript(`superscript`)}else if(e.text===`_`){if(i)throw new r(`Double subscript`,e);i=this.handleSupSubscript(`subscript`)}else if(e.text===`'`){if(n)throw new r(`Double superscript`,e);let t={type:`textord`,mode:this.mode,text:`\\prime`},i=[t];for(this.consume();this.fetch().text===`'`;)i.push(t),this.consume();this.fetch().text===`^`&&i.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:i}}else if(ia[e.text]){let t=ra.test(e.text),r=[];for(r.push(new Xr(ia[e.text])),this.consume();;){let e=this.fetch().text;if(!ia[e]||ra.test(e)!==t)break;r.unshift(new Xr(ia[e])),this.consume()}let a=this.subparse(r);t?i={type:`ordgroup`,mode:`math`,body:a}:n={type:`ordgroup`,mode:`math`,body:a}}else break}return n&&i?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:i}:n?{type:`supsub`,mode:this.mode,base:t,sup:n}:i?{type:`supsub`,mode:this.mode,base:t,sub:i}:t}parseFunction(e,t){let n=this.fetch(),i=n.text,a=Vi[i];if(!a)return null;if(this.consume(),t&&t!==`atom`&&!a.allowedInArgument)throw new r(`Got function '`+i+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!a.allowedInText)throw new r(`Can't use function '`+i+`' in text mode`,n);if(this.mode===`math`&&a.allowedInMath===!1)throw new r(`Can't use function '`+i+`' in math mode`,n);let o=this.parseArguments(i,a),s=o.args,c=o.optArgs;return this.callFunction(i,s,c,n,e)}callFunction(e,t,n,i,a){let o={funcName:e,parser:this,token:i,breakOnTokenText:a},s=Vi[e];if(s&&s.handler)return s.handler(o,t,n);throw new r(`No function handler for `+e)}parseArguments(e,t){let n=t.numOptionalArgs??0,i=t.numArgs+n;if(i===0)return{args:[],optArgs:[]};let a=[],o=[];for(let s=0;s<i;s++){let i=t.argTypes?.[s],c=s<n;(`primitive`in t&&t.primitive&&i==null||t.type===`sqrt`&&s===1&&o[0]==null)&&(i=`primitive`);let l=this.parseGroupOfType(`argument to '`+e+`'`,i,c);if(c)o.push(l);else if(l!=null)a.push(l);else throw new r(`Null argument, please report this as a bug`)}return{args:a,optArgs:o}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:{let e=this.parseArgumentGroup(n,`text`);return e==null?null:{type:`styling`,mode:e.mode,body:[e],style:`text`,resetFont:!0}}case`raw`:{let e=this.parseStringGroup(n);return e==null?null:{type:`raw`,mode:`text`,string:e.text}}case`primitive`:{if(n)throw new r(`A primitive argument cannot be optional`);let t=this.parseGroup(e);if(t==null)throw new r(`Expected group as `+e,this.fetch());return t}case`original`:case void 0:return this.parseArgumentGroup(n);default:throw new r(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e){let t=this.gullet.scanArgument(e);if(t==null)return null;let n=``,r;for(;(r=this.fetch()).text!==`EOF`;)n+=r.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){let n=this.fetch(),i=n,a=``,o;for(;(o=this.fetch()).text!==`EOF`&&e.test(a+o.text);)i=o,a+=i.text,this.consume();if(a===``)throw new r(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(i,a)}parseColorGroup(e){let t=this.parseStringGroup(e);if(t==null)return null;let n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new r(`Invalid color: '`+t.text+`'`,t);let i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i=`#`+i),{type:`color-token`,mode:this.mode,color:i}}parseSizeGroup(e){let t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);let i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!i)throw new r(`Invalid size: '`+t.text+`'`,t);let a={number:+(i[1]+i[2]),unit:i[3]};if(!xe(a))throw new r(`Invalid unit: '`+a.unit+`'`,t);return{type:`size`,mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);let t=this.parseStringGroup(e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;let n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){let n=this.gullet.scanArgument(e);if(n==null)return null;let r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();let i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();let a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){let n=this.fetch(),i=n.text,a;if(i===`{`||i===`\\begingroup`){this.consume();let e=i===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();let t=this.parseExpression(!1,e),r=this.fetch();this.expect(e),this.gullet.endGroup(),a={type:`ordgroup`,mode:this.mode,loc:Yr.range(n,r),body:t,semisimple:i===`\\begingroup`||void 0}}else if(a=this.parseFunction(t,e)||this.parseSymbol(),a==null&&i[0]===`\\`&&!Object.prototype.hasOwnProperty.call(ta,i)){if(this.settings.throwOnError)throw new r(`Undefined control sequence: `+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){let t=e.length-1;for(let n=0;n<t;++n){let r=e[n];if(r.type!==`textord`)continue;let i=r.text,a=e[n+1];if(a&&a.type===`textord`){if(i===`-`&&a.text===`-`){let i=e[n+2];n+1<t&&i&&i.type===`textord`&&i.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:Yr.range(r,i),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:Yr.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:Yr.range(r,a),text:i+i}),--t)}}}parseSymbol(){let e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();let e=t.slice(5),n=e.charAt(0)===`*`;if(n&&(e=e.slice(1)),e.length<2||e.charAt(0)!==e.slice(-1))throw new r(`\\verb assertion failed --
408
- please report what input caused this bug`);return e=e.slice(1,-1),{type:`verb`,mode:`text`,body:e,star:n}}Object.prototype.hasOwnProperty.call(oa,t[0])&&!Je[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=oa[t[0]]+t.slice(1));let n=Ui.exec(t);n&&(t=t.substring(0,n.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));let i;if(Je[this.mode][t]){this.settings.strict&&this.mode===`math`&&it.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);let n=Je[this.mode][t].group,r=Yr.range(e),a;a=Wn(n)?{type:`atom`,mode:this.mode,family:n,loc:r,text:t}:{type:n,mode:this.mode,loc:r,text:t},i=a}else if(t.charCodeAt(0)>=128)this.settings.strict&&(ae(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),i={type:`textord`,mode:`text`,loc:Yr.range(e),text:t};else return null;if(this.consume(),n)for(let t=0;t<n[0].length;t++){let a=n[0][t];if(!aa[a])throw new r(`Unknown accent ' `+a+`'`,e);let o=aa[a][this.mode]||aa[a].text;if(!o)throw new r(`Accent `+a+` unsupported in `+this.mode+` mode`,e);i={type:`accent`,mode:this.mode,loc:Yr.range(e),label:o,isStretchy:!1,isShifty:!0,base:i}}return i}}sa.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var ca=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);let n=new sa(e,t);delete n.gullet.macros.current[`\\df@tag`];let i=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new r(`\\tag works only in display equations`);i=[{type:`tag`,mode:`text`,body:i,tag:n.subparse([new Xr(`\\df@tag`)])}]}return i};let la=function(e,t,n){t.textContent=``;let r=pa(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),la=function(){throw new r(`KaTeX doesn't work in quirks mode.`)});let ua=function(e,t){return pa(e,t).toMarkup()},da=function(e,t){return ca(e,new _(t))},fa=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;let i=P([`katex-error`],[new Ne(t)]);return i.setAttribute(`title`,e.toString()),i.setAttribute(`style`,`color:`+n.errorColor),i},pa=function(e,t){let n=new _(t);try{let t=ca(e,n);return Mn(t,e,n)}catch(t){return fa(t,e,n)}};var ma={version:`0.18.10`,render:la,renderToString:ua,ParseError:r,SETTINGS_SCHEMA:p,__parse:da,__renderToDomTree:pa,__renderToHTMLTree:function(e,t){let n=new _(t);try{let t=ca(e,n);return Nn(t,e,n)}catch(t){return fa(t,e,n)}},__setFontMetrics:Ue,__defineSymbol:D,__defineFunction:F,__defineMacro:L,__domTree:{Span:ke,Anchor:Ae,SymbolNode:Ne,SvgNode:Pe,PathNode:Fe,LineNode:Ie}};return t=t.default,t})()})})),zc=o(i(((e,t)=>{function n(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}function r(e,i){let a=r.mergeDelimiters(i&&i.delimiters),o=i&&i.outerSpace||!1,s=i&&i.katexOptions||{};s.throwOnError=s.throwOnError||!1,s.macros=s.macros||i&&i.macros,r.katex||=i&&typeof i.engine==`object`?i.engine:typeof t==`object`?Rc():{renderToString(){return`No math renderer found.`}};for(let t of a.inline)o&&`outerSpace`in t&&(t.outerSpace=!0),e.inline.ruler.before(`escape`,t.name,r.inline(t)),e.renderer.rules[t.name]=(e,n)=>t.tmpl.replace(/\$1/,r.render(e[n].content,!!t.displayMode,s));for(let t of a.block)e.block.ruler.before(`fence`,t.name,r.block(t)),e.renderer.rules[t.name]=(e,i)=>t.tmpl.replace(/\$2/,n(e[i].info)).replace(/\$1/,r.render(e[i].content,!0,s))}r.mergeDelimiters=function(e){let t=Array.isArray(e)?e:typeof e==`string`?[e]:[`dollars`],n={inline:[],block:[]};for(let e of t)e in r.rules&&(n.inline.push(...r.rules[e].inline),n.block.push(...r.rules[e].block));return n},r.inline=e=>function(t,n){let r=t.pos,i=t.src,a=i.startsWith(e.tag,e.rex.lastIndex=r)&&(!e.pre||e.pre(i,e.outerSpace,r))&&e.rex.exec(i),o=!!a&&r<e.rex.lastIndex&&(!e.post||e.post(i,e.outerSpace,e.rex.lastIndex-1));if(o){if(!n){let n=t.push(e.name,`math`,0);n.content=a[1],n.markup=e.tag}t.pos=e.rex.lastIndex}return o},r.block=e=>function(t,n,r,i){let a=t.bMarks[n]+t.tShift[n],o=t.src,s=o.startsWith(e.tag,e.rex.lastIndex=a)&&(!e.pre||e.pre(o,!1,a))&&e.rex.exec(o),c=!!s&&a<e.rex.lastIndex&&(!e.post||e.post(o,!1,e.rex.lastIndex-1));if(c&&!i){let i=e.rex.lastIndex-1,a;for(a=n;a<r&&!(i>=t.bMarks[a]+t.tShift[a]&&i<=t.eMarks[a]);a++);let o=t.lineMax,c=t.parentType;t.lineMax=a,t.parentType=`math`,c===`blockquote`&&(s[1]=s[1].replace(/(\n*?^(?:\s*>)+)/gm,``));let l=t.push(e.name,`math`,0);l.block=!0,l.tag=e.tag,l.markup=``,l.content=s[1],l.info=s[s.length-1],l.map=[n,a+1],t.parentType=c,t.lineMax=o,t.line=a+1}return c},r.render=function(e,t,i){i.displayMode=t;let a;try{a=r.katex.renderToString(e,i)}catch(t){a=n(`${e}:${t.message}`)}return a},r.use=function(e){return r.katex=e,r},r.inlineRuleNames=[`math_inline`,`math_inline_double`],r.blockRuleNames=[`math_block`,`math_block_eqno`],r.$_pre=(e,t,n)=>{let r=n>0&&e[n-1].charCodeAt(0);return t?!r||r===32:!r||r!==92&&(r<48||r>57)},r.$_post=(e,t,n)=>{let r=e[n+1]&&e[n+1].charCodeAt(0);return t?!r||r===32||r===46||r===44||r===59:!r||r<48||r>57},r.rules={brackets:{inline:[{name:`math_inline`,rex:/\\\((.+?)\\\)/gy,tmpl:`<eq>$1</eq>`,tag:`\\(`}],block:[{name:`math_block_eqno`,rex:/\\\[(((?!\\\]|\\\[)[\s\S])+?)\\\]\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\[`},{name:`math_block`,rex:/\\\[([\s\S]+?)\\\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\[`}]},doxygen:{inline:[{name:`math_inline`,rex:/\\f\$(.+?)\\f\$/gy,tmpl:`<eq>$1</eq>`,tag:`\\f$`}],block:[{name:`math_block_eqno`,rex:/\\f\[([^]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\f[`},{name:`math_block`,rex:/\\f\[([^]+?)\\f\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\f[`}]},gitlab:{inline:[{name:`math_inline`,rex:/\$`(.+?)`\$/gy,tmpl:`<eq>$1</eq>`,tag:"$`"}],block:[{name:`math_block_eqno`,rex:/`{3}math\s*([^`]+?)\s*?`{3}\s*\(([^)\r\n]+?)\)/gm,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s*([^`]*?)\s*`{3}/gm,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},julia:{inline:[{name:`math_inline`,rex:/`{2}([^`]+?)`{2}/gy,tmpl:`<eq>$1</eq>`,tag:"``"},{name:`math_inline`,rex:/\$((?:\S?)|(?:\S.*?\S))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,spaceEnclosed:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},kramdown:{inline:[{name:`math_inline`,rex:/\${2}(.+?)\${2}/gy,tmpl:`<eq>$1</eq>`,tag:`$$`}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]+?)\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]+?)\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]},beg_end:{inline:[],block:[{name:`math_block`,rex:/(\\(?:begin)\{([a-z]+)\}[\s\S]+?\\(?:end)\{\2\})/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\`}]},dollars:{inline:[{name:`math_inline_double`,rex:/\${2}([^$]*?[^\\])\${2}/gy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`,displayMode:!0,pre:r.$_pre,post:r.$_post},{name:`math_inline`,rex:/\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,outerSpace:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]*?[^\\])\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]*?[^\\])\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]}},typeof t==`object`&&t.exports&&(t.exports=r)}))(),1),R=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},Bc=/([A-Z])/g,Vc=e=>e.replace(Bc,`-$1`).toLowerCase(),Hc={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Uc=/[&><"']/g,Wc=e=>String(e).replace(Uc,e=>Hc[e]),Gc=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?Gc(e.body[0]):e:e.type===`font`?Gc(e.body):e,Kc=new Set([`mathord`,`textord`,`atom`]),qc=e=>Kc.has(Gc(e).type),Jc=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Yc={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Xc(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Zc(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:Xc(Array.isArray(e.type)?e.type[0]:e.type)}function Qc(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?Zc(r):a?a(i):i}var $c=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Yc)){var n=Yc[t];n&&Qc(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new R(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=Jc(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},el=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ll[ul[this.id]]}sub(){return ll[dl[this.id]]}fracNum(){return ll[fl[this.id]]}fracDen(){return ll[pl[this.id]]}cramp(){return ll[ml[this.id]]}text(){return ll[hl[this.id]]}isTight(){return this.size>=2}},tl=0,nl=1,rl=2,il=3,al=4,ol=5,sl=6,cl=7,ll=[new el(tl,0,!1),new el(nl,0,!0),new el(rl,1,!1),new el(il,1,!0),new el(al,2,!1),new el(ol,2,!0),new el(sl,3,!1),new el(cl,3,!0)],ul=[al,ol,al,ol,sl,cl,sl,cl],dl=[ol,ol,ol,ol,cl,cl,cl,cl],fl=[rl,il,al,ol,sl,cl,sl,cl],pl=[il,il,ol,ol,cl,cl,cl,cl],ml=[nl,nl,il,il,ol,ol,cl,cl],hl=[tl,nl,rl,il,rl,il,rl,il],gl={DISPLAY:ll[tl],TEXT:ll[rl],SCRIPT:ll[al],SCRIPTSCRIPT:ll[sl]},_l=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function vl(e){for(var t=0;t<_l.length;t++)for(var n=_l[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var yl=[];_l.forEach(e=>e.blocks.forEach(e=>yl.push(...e)));function bl(e){for(var t=0;t<yl.length;t+=2)if(e>=yl[t]&&e<=yl[t+1])return!0;return!1}var xl=e=>e+` `+e,Sl=80,Cl=function(e,t){return`M95,`+(622+e+t)+`
408
+ please report what input caused this bug`);return e=e.slice(1,-1),{type:`verb`,mode:`text`,body:e,star:n}}Object.prototype.hasOwnProperty.call(oa,t[0])&&!Je[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=oa[t[0]]+t.slice(1));let n=Ui.exec(t);n&&(t=t.substring(0,n.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));let i;if(Je[this.mode][t]){this.settings.strict&&this.mode===`math`&&it.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);let n=Je[this.mode][t].group,r=Yr.range(e),a;a=Wn(n)?{type:`atom`,mode:this.mode,family:n,loc:r,text:t}:{type:n,mode:this.mode,loc:r,text:t},i=a}else if(t.charCodeAt(0)>=128)this.settings.strict&&(ae(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),i={type:`textord`,mode:`text`,loc:Yr.range(e),text:t};else return null;if(this.consume(),n)for(let t=0;t<n[0].length;t++){let a=n[0][t];if(!aa[a])throw new r(`Unknown accent ' `+a+`'`,e);let o=aa[a][this.mode]||aa[a].text;if(!o)throw new r(`Accent `+a+` unsupported in `+this.mode+` mode`,e);i={type:`accent`,mode:this.mode,loc:Yr.range(e),label:o,isStretchy:!1,isShifty:!0,base:i}}return i}}sa.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]);var ca=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);let n=new sa(e,t);delete n.gullet.macros.current[`\\df@tag`];let i=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new r(`\\tag works only in display equations`);i=[{type:`tag`,mode:`text`,body:i,tag:n.subparse([new Xr(`\\df@tag`)])}]}return i};let la=function(e,t,n){t.textContent=``;let r=pa(e,n).toNode();t.appendChild(r)};typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),la=function(){throw new r(`KaTeX doesn't work in quirks mode.`)});let ua=function(e,t){return pa(e,t).toMarkup()},da=function(e,t){return ca(e,new _(t))},fa=function(e,t,n){if(n.throwOnError||!(e instanceof r))throw e;let i=P([`katex-error`],[new Ne(t)]);return i.setAttribute(`title`,e.toString()),i.setAttribute(`style`,`color:`+n.errorColor),i},pa=function(e,t){let n=new _(t);try{let t=ca(e,n);return Mn(t,e,n)}catch(t){return fa(t,e,n)}};var ma={version:`0.18.10`,render:la,renderToString:ua,ParseError:r,SETTINGS_SCHEMA:p,__parse:da,__renderToDomTree:pa,__renderToHTMLTree:function(e,t){let n=new _(t);try{let t=ca(e,n);return Nn(t,e,n)}catch(t){return fa(t,e,n)}},__setFontMetrics:Ue,__defineSymbol:D,__defineFunction:F,__defineMacro:L,__domTree:{Span:ke,Anchor:Ae,SymbolNode:Ne,SvgNode:Pe,PathNode:Fe,LineNode:Ie}};return t=t.default,t})()})})),zc=i(o(((e,t)=>{function n(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#039;`)}function r(e,i){let a=r.mergeDelimiters(i&&i.delimiters),o=i&&i.outerSpace||!1,s=i&&i.katexOptions||{};s.throwOnError=s.throwOnError||!1,s.macros=s.macros||i&&i.macros,r.katex||=i&&typeof i.engine==`object`?i.engine:typeof t==`object`?Rc():{renderToString(){return`No math renderer found.`}};for(let t of a.inline)o&&`outerSpace`in t&&(t.outerSpace=!0),e.inline.ruler.before(`escape`,t.name,r.inline(t)),e.renderer.rules[t.name]=(e,n)=>t.tmpl.replace(/\$1/,r.render(e[n].content,!!t.displayMode,s));for(let t of a.block)e.block.ruler.before(`fence`,t.name,r.block(t)),e.renderer.rules[t.name]=(e,i)=>t.tmpl.replace(/\$2/,n(e[i].info)).replace(/\$1/,r.render(e[i].content,!0,s))}r.mergeDelimiters=function(e){let t=Array.isArray(e)?e:typeof e==`string`?[e]:[`dollars`],n={inline:[],block:[]};for(let e of t)e in r.rules&&(n.inline.push(...r.rules[e].inline),n.block.push(...r.rules[e].block));return n},r.inline=e=>function(t,n){let r=t.pos,i=t.src,a=i.startsWith(e.tag,e.rex.lastIndex=r)&&(!e.pre||e.pre(i,e.outerSpace,r))&&e.rex.exec(i),o=!!a&&r<e.rex.lastIndex&&(!e.post||e.post(i,e.outerSpace,e.rex.lastIndex-1));if(o){if(!n){let n=t.push(e.name,`math`,0);n.content=a[1],n.markup=e.tag}t.pos=e.rex.lastIndex}return o},r.block=e=>function(t,n,r,i){let a=t.bMarks[n]+t.tShift[n],o=t.src,s=o.startsWith(e.tag,e.rex.lastIndex=a)&&(!e.pre||e.pre(o,!1,a))&&e.rex.exec(o),c=!!s&&a<e.rex.lastIndex&&(!e.post||e.post(o,!1,e.rex.lastIndex-1));if(c&&!i){let i=e.rex.lastIndex-1,a;for(a=n;a<r&&!(i>=t.bMarks[a]+t.tShift[a]&&i<=t.eMarks[a]);a++);let o=t.lineMax,c=t.parentType;t.lineMax=a,t.parentType=`math`,c===`blockquote`&&(s[1]=s[1].replace(/(\n*?^(?:\s*>)+)/gm,``));let l=t.push(e.name,`math`,0);l.block=!0,l.tag=e.tag,l.markup=``,l.content=s[1],l.info=s[s.length-1],l.map=[n,a+1],t.parentType=c,t.lineMax=o,t.line=a+1}return c},r.render=function(e,t,i){i.displayMode=t;let a;try{a=r.katex.renderToString(e,i)}catch(t){a=n(`${e}:${t.message}`)}return a},r.use=function(e){return r.katex=e,r},r.inlineRuleNames=[`math_inline`,`math_inline_double`],r.blockRuleNames=[`math_block`,`math_block_eqno`],r.$_pre=(e,t,n)=>{let r=n>0&&e[n-1].charCodeAt(0);return t?!r||r===32:!r||r!==92&&(r<48||r>57)},r.$_post=(e,t,n)=>{let r=e[n+1]&&e[n+1].charCodeAt(0);return t?!r||r===32||r===46||r===44||r===59:!r||r<48||r>57},r.rules={brackets:{inline:[{name:`math_inline`,rex:/\\\((.+?)\\\)/gy,tmpl:`<eq>$1</eq>`,tag:`\\(`}],block:[{name:`math_block_eqno`,rex:/\\\[(((?!\\\]|\\\[)[\s\S])+?)\\\]\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\[`},{name:`math_block`,rex:/\\\[([\s\S]+?)\\\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\[`}]},doxygen:{inline:[{name:`math_inline`,rex:/\\f\$(.+?)\\f\$/gy,tmpl:`<eq>$1</eq>`,tag:`\\f$`}],block:[{name:`math_block_eqno`,rex:/\\f\[([^]+?)\\f\]\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`\\f[`},{name:`math_block`,rex:/\\f\[([^]+?)\\f\]/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\f[`}]},gitlab:{inline:[{name:`math_inline`,rex:/\$`(.+?)`\$/gy,tmpl:`<eq>$1</eq>`,tag:"$`"}],block:[{name:`math_block_eqno`,rex:/`{3}math\s*([^`]+?)\s*?`{3}\s*\(([^)\r\n]+?)\)/gm,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s*([^`]*?)\s*`{3}/gm,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},julia:{inline:[{name:`math_inline`,rex:/`{2}([^`]+?)`{2}/gy,tmpl:`<eq>$1</eq>`,tag:"``"},{name:`math_inline`,rex:/\$((?:\S?)|(?:\S.*?\S))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,spaceEnclosed:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}\s*?\(([^)$\r\n]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:"```math"},{name:`math_block`,rex:/`{3}math\s+?([^`]+?)\s+?`{3}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:"```math"}]},kramdown:{inline:[{name:`math_inline`,rex:/\${2}(.+?)\${2}/gy,tmpl:`<eq>$1</eq>`,tag:`$$`}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]+?)\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]+?)\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]},beg_end:{inline:[],block:[{name:`math_block`,rex:/(\\(?:begin)\{([a-z]+)\}[\s\S]+?\\(?:end)\{\2\})/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`\\`}]},dollars:{inline:[{name:`math_inline_double`,rex:/\${2}([^$]*?[^\\])\${2}/gy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`,displayMode:!0,pre:r.$_pre,post:r.$_post},{name:`math_inline`,rex:/\$((?:[^\s\\])|(?:\S.*?[^\s\\]))\$/gy,tmpl:`<eq>$1</eq>`,tag:`$`,outerSpace:!1,pre:r.$_pre,post:r.$_post}],block:[{name:`math_block_eqno`,rex:/\${2}([^$]*?[^\\])\${2}\s*?\(([^)\s]+?)\)/gmy,tmpl:`<section class="eqno"><eqn>$1</eqn><span>($2)</span></section>`,tag:`$$`},{name:`math_block`,rex:/\${2}([^$]*?[^\\])\${2}/gmy,tmpl:`<section><eqn>$1</eqn></section>`,tag:`$$`}]}},typeof t==`object`&&t.exports&&(t.exports=r)}))(),1),R=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=l+c+u}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},Bc=/([A-Z])/g,Vc=e=>e.replace(Bc,`-$1`).toLowerCase(),Hc={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Uc=/[&><"']/g,Wc=e=>String(e).replace(Uc,e=>Hc[e]),Gc=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?Gc(e.body[0]):e:e.type===`font`?Gc(e.body):e,Kc=new Set([`mathord`,`textord`,`atom`]),qc=e=>Kc.has(Gc(e).type),Jc=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},Yc={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function Xc(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Zc(e){return Object.prototype.hasOwnProperty.call(e,`default`)&&e.default!==void 0?e.default:Xc(Array.isArray(e.type)?e.type[0]:e.type)}function Qc(e,t,n,r){var i=Object.prototype.hasOwnProperty.call(n,t)?n[t]:void 0,a=Object.prototype.hasOwnProperty.call(r,`processor`)?r.processor:void 0;e[t]=i===void 0?Zc(r):a?a(i):i}var $c=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(Yc)){var n=Yc[t];n&&Qc(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),r&&r!==`ignore`){if(r===!0||r===`error`)throw new R(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=Jc(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},el=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return ll[ul[this.id]]}sub(){return ll[dl[this.id]]}fracNum(){return ll[fl[this.id]]}fracDen(){return ll[pl[this.id]]}cramp(){return ll[ml[this.id]]}text(){return ll[hl[this.id]]}isTight(){return this.size>=2}},tl=0,nl=1,rl=2,il=3,al=4,ol=5,sl=6,cl=7,ll=[new el(tl,0,!1),new el(nl,0,!0),new el(rl,1,!1),new el(il,1,!0),new el(al,2,!1),new el(ol,2,!0),new el(sl,3,!1),new el(cl,3,!0)],ul=[al,ol,al,ol,sl,cl,sl,cl],dl=[ol,ol,ol,ol,cl,cl,cl,cl],fl=[rl,il,al,ol,sl,cl,sl,cl],pl=[il,il,ol,ol,cl,cl,cl,cl],ml=[nl,nl,il,il,ol,ol,cl,cl],hl=[tl,nl,rl,il,rl,il,rl,il],gl={DISPLAY:ll[tl],TEXT:ll[rl],SCRIPT:ll[al],SCRIPTSCRIPT:ll[sl]},_l=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function vl(e){for(var t=0;t<_l.length;t++)for(var n=_l[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}var yl=[];_l.forEach(e=>e.blocks.forEach(e=>yl.push(...e)));function bl(e){for(var t=0;t<yl.length;t+=2)if(e>=yl[t]&&e<=yl[t+1])return!0;return!1}var xl=e=>e+` `+e,Sl=80,Cl=function(e,t){return`M95,`+(622+e+t)+`
409
409
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
410
410
  c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
411
411
  c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
@@ -1 +1 @@
1
- import{J as e,P as t,X as n,Y as r}from"./-7PsQOY4.js";import{o as i,t as a}from"./HCrXwzvD.js";import{r as o}from"./MjV3DsQW.js";var s=(e,t)=>{try{return localStorage.getItem(e)??t}catch{return t}},c=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},l=(e,t)=>{try{return{...t,...JSON.parse(s(e,`{}`))}}catch{return t}},u=[`note`,`atlas`,`iso`],d=[`cols`,`stack`,`one`],f={note:[`provenance`,`timeline`],atlas:[`questions`,`problems`,`web`,`code`,`context`],iso:[`notes`,`files`,`run`]},p={provenance:!1,timeline:!1,questions:!0,problems:!0,web:!1,code:!1,context:!1,notes:!1,files:!1,run:!1},m={note:1.25,atlas:1,iso:1.05},h={min:.4,max:3},g=new class{#e=n(e(d.includes(s(`isorite.layout`,``))?s(`isorite.layout`,``):`cols`));get layout(){return t(this.#e)}set layout(e){r(this.#e,e,!0)}#t=n(e(l(`isorite.show`,{note:!0,atlas:!0,iso:!0})));get show(){return t(this.#t)}set show(e){r(this.#t,e,!0)}#n=n(e(l(`isorite.widths`,m)));get widths(){return t(this.#n)}set widths(e){r(this.#n,e,!0)}#r=n(e(l(`isorite.switches`,p)));get on(){return t(this.#r)}set on(e){r(this.#r,e,!0)}#i=n(s(`isorite.understanding`,``)===`1`);get understanding(){return t(this.#i)}set understanding(e){r(this.#i,e,!0)}#a=n(`note`);get focus(){return t(this.#a)}set focus(e){r(this.#a,e,!0)}#o=n(!1);get narrow(){return t(this.#o)}set narrow(e){r(this.#o,e,!0)}#s=n(0);get unseen(){return t(this.#s)}set unseen(e){r(this.#s,e,!0)}#c=n(!1);get tree(){return t(this.#c)}set tree(e){r(this.#c,e,!0)}#l=n(``);get fresh(){return t(this.#l)}set fresh(e){r(this.#l,e,!0)}#u=n(null);get settings(){return t(this.#u)}set settings(e){r(this.#u,e,!0)}#d=n(e(s(`isorite.last`,``)));get last(){return t(this.#d)}set last(e){r(this.#d,e,!0)}get standing(){if(this.narrow)return[...u];let e=u.filter(e=>this.show[e]);return this.layout===`one`?[e.includes(this.focus)?this.focus:e[0]??`note`]:e}setLayout(e){this.layout=e,c(`isorite.layout`,e)}nextLayout(){this.setLayout(d[(d.indexOf(this.layout)+1)%d.length])}toggle(e){this.show[e]&&u.filter(e=>this.show[e]).length===1||(this.show[e]=!this.show[e],c(`isorite.show`,JSON.stringify(this.show)),!this.show[e]&&this.focus===e&&(this.focus=u.find(e=>this.show[e])))}setWidth(e,t){this.widths[e]=Math.min(h.max,Math.max(h.min,t)),c(`isorite.widths`,JSON.stringify(this.widths))}to(e){!this.narrow&&!this.show[e]&&this.toggle(e),this.focus=e,e===`iso`&&(this.unseen=0),this.scroll?.(e)}scroll=null;step(e){let t=this.narrow?[...u]:u.filter(e=>this.show[e]),n=t.indexOf(this.focus);this.to(t[(n+e+t.length)%t.length])}flip(e,t=!this.on[e]){this.on[e]=t,c(`isorite.switches`,JSON.stringify(this.on)),(e===`notes`||e===`files`||e===`run`)&&this.onMode?.()}showUnderstanding(e=!this.understanding){this.understanding=e,c(`isorite.understanding`,e?`1`:``),this.onMode?.()}busy(e){let t=typeof document>`u`?null:document.activeElement;return!!t&&!!t.closest(`[data-pane="${e}"]`)&&(t.matches(`input, textarea, [contenteditable=true]`)||!!t.closest(`.cm-editor`))}#f=n(!1);get terminal(){return t(this.#f)}set terminal(e){r(this.#f,e,!0)}setTerminal(e){this.terminal=e}get mode(){return this.terminal&&(this.on.files||this.on.run)?`build`:this.on.notes?`write`:`ask`}onMode=null;setLast(e){e&&!e.startsWith(`@`)&&(this.last=e,c(`isorite.last`,e))}async open(e,t=this.narrow){await a(o(e)),t&&this.to(`note`)}async home(){await a(i(`/notes`))}};export{g as i,u as n,f as r,d as t};
1
+ import{I as e,Q as t,X as n,Z as r}from"./nhmVyQdD.js";import{o as i,t as a}from"./D4A7-5k0.js";import{r as o}from"./Dijhflxl.js";var s=(e,t)=>{try{return localStorage.getItem(e)??t}catch{return t}},c=(e,t)=>{try{localStorage.setItem(e,t)}catch{}},l=(e,t)=>{try{return{...t,...JSON.parse(s(e,`{}`))}}catch{return t}},u=[`note`,`atlas`,`iso`],d=[`cols`,`stack`,`one`],f={note:[`provenance`,`timeline`],atlas:[`questions`,`problems`,`web`,`code`,`context`],iso:[`notes`,`files`,`run`]},p={provenance:!1,timeline:!1,questions:!0,problems:!0,web:!1,code:!1,context:!1,notes:!1,files:!1,run:!1},m={note:1.25,atlas:1,iso:1.05},h={min:.4,max:3},g=new class{#e=t(n(d.includes(s(`isorite.layout`,``))?s(`isorite.layout`,``):`cols`));get layout(){return e(this.#e)}set layout(e){r(this.#e,e,!0)}#t=t(n(l(`isorite.show`,{note:!0,atlas:!0,iso:!0})));get show(){return e(this.#t)}set show(e){r(this.#t,e,!0)}#n=t(n(l(`isorite.widths`,m)));get widths(){return e(this.#n)}set widths(e){r(this.#n,e,!0)}#r=t(n(l(`isorite.switches`,p)));get on(){return e(this.#r)}set on(e){r(this.#r,e,!0)}#i=t(s(`isorite.understanding`,``)===`1`);get understanding(){return e(this.#i)}set understanding(e){r(this.#i,e,!0)}#a=t(`note`);get focus(){return e(this.#a)}set focus(e){r(this.#a,e,!0)}#o=t(!1);get narrow(){return e(this.#o)}set narrow(e){r(this.#o,e,!0)}#s=t(0);get unseen(){return e(this.#s)}set unseen(e){r(this.#s,e,!0)}#c=t(!1);get tree(){return e(this.#c)}set tree(e){r(this.#c,e,!0)}#l=t(``);get fresh(){return e(this.#l)}set fresh(e){r(this.#l,e,!0)}#u=t(null);get settings(){return e(this.#u)}set settings(e){r(this.#u,e,!0)}#d=t(n(s(`isorite.last`,``)));get last(){return e(this.#d)}set last(e){r(this.#d,e,!0)}get standing(){if(this.narrow)return[...u];let e=u.filter(e=>this.show[e]);return this.layout===`one`?[e.includes(this.focus)?this.focus:e[0]??`note`]:e}setLayout(e){this.layout=e,c(`isorite.layout`,e)}nextLayout(){this.setLayout(d[(d.indexOf(this.layout)+1)%d.length])}toggle(e){this.show[e]&&u.filter(e=>this.show[e]).length===1||(this.show[e]=!this.show[e],c(`isorite.show`,JSON.stringify(this.show)),!this.show[e]&&this.focus===e&&(this.focus=u.find(e=>this.show[e])))}setWidth(e,t){this.widths[e]=Math.min(h.max,Math.max(h.min,t)),c(`isorite.widths`,JSON.stringify(this.widths))}to(e){!this.narrow&&!this.show[e]&&this.toggle(e),this.focus=e,e===`iso`&&(this.unseen=0),this.scroll?.(e)}scroll=null;step(e){let t=this.narrow?[...u]:u.filter(e=>this.show[e]),n=t.indexOf(this.focus);this.to(t[(n+e+t.length)%t.length])}flip(e,t=!this.on[e]){this.on[e]=t,c(`isorite.switches`,JSON.stringify(this.on)),(e===`notes`||e===`files`||e===`run`)&&this.onMode?.()}showUnderstanding(e=!this.understanding){this.understanding=e,c(`isorite.understanding`,e?`1`:``),this.onMode?.()}busy(e){let t=typeof document>`u`?null:document.activeElement;return!!t&&!!t.closest(`[data-pane="${e}"]`)&&(t.matches(`input, textarea, [contenteditable=true]`)||!!t.closest(`.cm-editor`))}#f=t(!1);get terminal(){return e(this.#f)}set terminal(e){r(this.#f,e,!0)}setTerminal(e){this.terminal=e}get mode(){return this.terminal&&(this.on.files||this.on.run)?`build`:this.on.notes?`write`:`ask`}onMode=null;setLast(e){e&&!e.startsWith(`@`)&&(this.last=e,c(`isorite.last`,e))}async open(e,t=this.narrow){await a(o(e)),t&&this.to(`note`)}async home(){await a(i(`/notes`))}};export{g as i,u as n,f as r,d as t};
@@ -0,0 +1 @@
1
+ import{A as e,E as t,F as n,I as r,J as i,K as a,N as o,O as s,P as c,Q as l,V as u,Y as d,Z as f,at as p,d as m,et as h,f as g,h as _,i as v,it as y,u as b,ut as x,w as S,x as C}from"./nhmVyQdD.js";import"./xihTtKlq.js";import{t as w}from"./Dijhflxl.js";var T=e(`<li role="option"><button type="button" tabindex="-1" class="svelte-35e6rs"><span class="dir svelte-35e6rs"> </span><span class="detail svelte-35e6rs"> </span></button></li>`),E=e(`<ul class="suggest svelte-35e6rs" role="listbox" aria-label="folders"></ul>`),D=e(`<span class="field-wrap svelte-35e6rs"><input autocomplete="off" spellcheck="false" role="combobox" aria-autocomplete="list"/> <!></span>`);function O(e,o){p(o,!0);let O=v(o,`value`,15,``),k=v(o,`placeholder`,3,``),A=v(o,`id`,3,`folder`),j=v(o,`quiet`,3,!1),M=l(!1),N=l(0),P=h(()=>O().trim().replace(/^\/+|\/+$/g,``).toLowerCase()),F=e=>w.listing.notes.filter(t=>t.dir===e).length,I=h(()=>{let e=w.listing.dirs.filter(e=>e.toLowerCase().includes(r(P))),t=e=>e.split(`/`).at(-1).toLowerCase().startsWith(r(P))?0:e.toLowerCase().startsWith(r(P))?1:2,n=e.sort((e,n)=>t(e)-t(n)||e.localeCompare(n)).map(e=>({dir:e,made:!1}));return r(P)&&!w.listing.dirs.some(e=>e.toLowerCase()===r(P))&&n.push({dir:O().trim().replace(/^\/+|\/+$/g,``),made:!0}),n.slice(0,8)});function L(e){O(e),f(M,!1),o.onpick?.(e)}function R(e){if(r(M)&&r(I).length){if(e.key===`ArrowDown`){f(N,(r(N)+1)%r(I).length),e.preventDefault();return}if(e.key===`ArrowUp`){f(N,(r(N)-1+r(I).length)%r(I).length),e.preventDefault();return}if((e.key===`Enter`||e.key===`Tab`)&&r(I)[r(N)]&&(e.key===`Enter`||r(P))){e.key===`Enter`&&e.preventDefault(),L(r(I)[r(N)].dir);return}if(e.key===`Escape`){f(M,!1),e.stopPropagation();return}}o.onkeydown?.(e)}var z=D(),B=a(z);m(B);let V;var H=d(B,2),U=e=>{var o=E();C(o,23,()=>r(I),e=>e.dir+e.made,(e,o,l)=>{var p=T();let m;var h=a(p),v=a(h),y=i(v,!0),b=d(v),S=i(b,!0);x(h),x(p),u(e=>{g(p,`id`,`${A()??``}-opt-${r(l)??``}`),g(p,`aria-selected`,r(l)===r(N)),m=_(p,1,`svelte-35e6rs`,null,m,{at:r(l)===r(N)}),t(y,r(o).dir),t(S,e)},[()=>r(o).made?`new folder`:`${F(r(o).dir)} ${F(r(o).dir)===1?`note`:`notes`}`]),c(`mousedown`,h,e=>e.preventDefault()),c(`click`,h,()=>L(r(o).dir)),n(`mouseenter`,h,()=>f(N,r(l),!0)),s(e,p)}),x(o),u(()=>g(o,`id`,`${A()??``}-list`)),s(e,o)};S(H,e=>{r(M)&&r(I).length&&e(U)}),x(z),u(()=>{g(B,`id`,A()),V=_(B,1,`mono svelte-35e6rs`,null,V,{field:!j(),quiet:j()}),g(B,`placeholder`,k()),g(B,`aria-label`,o.label),g(B,`aria-expanded`,r(M)&&r(I).length>0),g(B,`aria-controls`,`${A()??``}-list`),g(B,`aria-activedescendant`,r(M)&&r(I)[r(N)]?`${A()}-opt-${r(N)}`:void 0)}),n(`focus`,B,()=>{f(M,!0),f(N,0)}),c(`input`,B,()=>{f(M,!0),f(N,0)}),n(`blur`,B,()=>setTimeout(()=>f(M,!1),120)),c(`keydown`,B,R),b(B,O),s(e,z),y()}o([`input`,`keydown`,`mousedown`,`click`]);export{O as t};
@@ -1 +1 @@
1
- import{J as e,P as t,X as n,Y as r}from"./-7PsQOY4.js";var i=new class{#e=n(e(typeof document>`u`?``:document.documentElement.dataset.ground??``));get chosen(){return t(this.#e)}set chosen(e){r(this.#e,e,!0)}choose(e){this.chosen=e,e?document.documentElement.dataset.ground=e:delete document.documentElement.dataset.ground;try{e?localStorage.setItem(`isorite.ground`,e):localStorage.removeItem(`isorite.ground`)}catch{}}},a=[[``,`the system's`],[`lapis`,`lapis`],[`quartz`,`quartz`]];export{i as n,a as t};
1
+ import{I as e,Q as t,X as n,Z as r}from"./nhmVyQdD.js";var i=new class{#e=t(n(typeof document>`u`?``:document.documentElement.dataset.ground??``));get chosen(){return e(this.#e)}set chosen(e){r(this.#e,e,!0)}choose(e){this.chosen=e,e?document.documentElement.dataset.ground=e:delete document.documentElement.dataset.ground;try{e?localStorage.setItem(`isorite.ground`,e):localStorage.removeItem(`isorite.ground`)}catch{}}},a=[[``,`the system's`],[`lapis`,`lapis`],[`quartz`,`quartz`]];export{i as n,a as t};