vue-editify 0.2.26 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).editify={},e.Vue)}(this,(function(e,t){"use strict";var n=Object.defineProperty,r=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);const a={formatNumber(e){return this.isNumber(e)?e.toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"):e},isNumber:e=>"number"==typeof e&&!isNaN(e),add:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let n=0,r=e.toString(),a=t.toString();try{n+=r.split(".")[1].length}catch(o){}try{n+=a.split(".")[1].length}catch(o){}return Number(r.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,n)})),divide:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=e.toString(),o=t.toString();try{n=a.split(".")[1].length}catch(i){}try{r=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,r-n)}))},o={insert(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if("string"!=typeof t)throw new TypeError("The second argument must be a string");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,n)+t+e.substring(n,e.length)},delete(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!a.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+n,e.length)},replace(e,t,n,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!a.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof r)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+r+e.substring(n,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let n=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(n=n.replace(/\s/g,"")),n}},i={isWindow:e=>e&&e instanceof Window,getElementPoint(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(this.isElement(t)||(t=document.body),!this.isContains(t,e))throw new Error("The second argument and the first argument have no hierarchical relationship");let n=e,r=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)r+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:r,left:a,right:t.offsetWidth-a-n.offsetWidth,bottom:t.offsetHeight-r-n.offsetHeight}},isContains(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e===t||(e.contains?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t)))},isParentNode(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e!==t&&t.parentNode===e},children(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");return[...e.querySelectorAll(t||"*")].filter((t=>t.parentNode===e))},siblings(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!e.parentNode)return[];return[...e.parentNode.querySelectorAll(t||"*")].filter((t=>t.parentNode===e.parentNode&&t!=e))},rem2px(e){if(!a.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return a.mutiply(e,parseFloat(t))},px2rem(e){if(!a.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return a.divide(e,parseFloat(t))},width(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientWidth,n=parseFloat(this.getCssStyle(e,"padding-left")),r=parseFloat(this.getCssStyle(e,"padding-right"));return a.subtract(t,n,r)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,n=parseFloat(this.getCssStyle(e,"padding-top")),r=parseFloat(this.getCssStyle(e,"padding-bottom"));return a.subtract(t,n,r)},removeClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;o.trim(t).split(/\s+/).forEach((e=>{n.remove(e)}))},addClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;o.trim(t).split(/\s+/).forEach((e=>{n.add(e)}))},hasClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;return o.trim(t).split(/\s+/).every((e=>n.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let n=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(n=e),"function"==typeof e&&(t=e);let r=!0;n.addEventListener("scroll",(()=>{if(this.getScrollTop(n)<=0){if(!r)return;"function"==typeof t&&(r=!1,t({state:"top",target:n}))}else{let e={state:"bottom",target:n},o=0;if(o=n==window?window.innerHeight:n.clientHeight,a.add(this.getScrollTop(n),o)+1>=this.getScrollHeight(n)&&o!=this.getScrollHeight(n)){if(!r)return;"function"==typeof t&&(r=!1,t(e))}else r=!0}}))},getScrollWidth(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollWidth:0==document.documentElement.scrollWidth||0==document.body.scrollWidth?document.documentElement.scrollWidth||document.body.scrollWidth:document.documentElement.scrollWidth>document.body.scrollWidth?document.documentElement.scrollWidth:document.body.scrollWidth,t},getScrollHeight(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollHeight:0==document.documentElement.scrollHeight||0==document.body.scrollHeight?document.documentElement.scrollHeight||document.body.scrollHeight:document.documentElement.scrollHeight>document.body.scrollHeight?document.documentElement.scrollHeight:document.body.scrollHeight,t},setScrollTop(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,o=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollTop=document.body.scrollTop=r:n.scrollTop=r,e();else{let i=10,l=a.divide(o,i),s=this.getScrollTop(n),c=a.divide(a.subtract(r,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollTop=document.body.scrollTop=s=a.add(s,c):n.scrollTop=s=a.add(s,c)):(clearInterval(d),e())}),i)}}))},getScrollTop(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollTop:0==document.documentElement.scrollTop||0==document.body.scrollTop?document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,t},getScrollLeft(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollLeft:0==document.documentElement.scrollLeft||0==document.body.scrollLeft?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,t},setScrollLeft(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,o=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=r:n.scrollLeft=r,e();else{let i=10,l=a.divide(o,i),s=this.getScrollLeft(n),c=a.divide(a.subtract(r,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollLeft=document.body.scrollLeft=s=a.add(s,c):n.scrollLeft=s=a.add(s,c)):(clearInterval(d),e())}),i)}}))},getCssStyle(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n="";return n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],n},getCssSelector(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a selector string");if(/^#{1}/.test(e))return{type:"id",value:e.substr(1)};if(/^\./.test(e))return{type:"class",value:e.substr(1)};if(/^\[(.+)\]$/.test(e)){let t="attribute",n="",r=o.trim(e,!0).substring(1,o.trim(e,!0).length-1).split("=");return 1==r.length&&(n=r[0]),2==r.length&&(n={attributeName:r[0],attributeValue:r[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:n}}return{type:"tag",value:e}},getElementBounding(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.getBoundingClientRect();return{top:t.top,bottom:a.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:a.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");const t=document.createElement("template");return t.innerHTML=e,1==t.content.children.length?t.content.children[0]:Array.from(t.content.children)}},l="_dap-datas",s={remove(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[l]||{};null==t||""===t?e[l]={}:(delete n[t],e[l]=n)},has(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");return(e[l]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[l]||{};return null==t||""===t?n:n[t]},set(e,t,n){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let r=e[l]||{};r[t]=n,e[l]=r}},c={matchingText(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=null;if("Chinese"==t&&(n=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(n=/[\u4e00-\u9fa5]/),"email"==t&&(n=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(n=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(n=/^\d+$/),"int-"==t&&(n=/^-\d+$/),"int"==t&&(n=/^-?\d+$/),"pos"==t&&(n=/^\d*\.?\d+$/),"neg"==t&&(n=/^-\d*\.?\d+$/),"number"==t&&(n=/^-?\d*\.?\d+$/),"phone"==t&&(n=/^1[0-9]\d{9}$/),"idCard"==t&&(n=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/),"url"==t&&(n=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/),"hex"==t&&(n=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(n=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/),"rgba"==t&&(n=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/),"QQ"==t&&(n=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(n=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!n)throw new Error("The second parameter is out of scope");return n.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1);if(!n){let e=window.location.hash.split("?");2==e.length&&(n=e[1])}let r=n.match(t);return r?decodeURIComponent(r[2]):null},isEmptyObject(e){return!!this.isObject(e)&&0==Object.keys(e).length},equal(e,t){if(typeof e!=typeof t)return!1;if(this.isObject(e)&&this.isObject(t)){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!=r.length)return!1;let a=n.length,o=!0;for(let i=0;i<a;i++){let r=n[i],a=e[r],l=t[r];if(!this.equal(a,l)){o=!1;break}}return o}return e===t},isObject:e=>!("object"!=typeof e||!e),copyText(e){if(!e||"string"!=typeof e)throw new TypeError("No text to copy is defined");if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(e)},clone(e){if(this.isObject(e)){if(Array.isArray(e))return e.map((e=>this.clone(e)));let t={};for(let n in e)t[n]=this.clone(e[n]);return t}return e}},d=e=>{let t=e.split(/[\s]+/g),n=[];return t.forEach((e=>{let t=e.split("."),r={eventName:t[0]};t.length>1&&(r.guid=t[1]),n.push(r)})),n},u=(e,t,n)=>{let r=s.get(e,"dap-defined-events")||{},a=Object.keys(r),o=a.length;for(let i=0;i<o;i++){let o=a[i];r[o].type==t&&(n?o==t+"."+n&&(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0):(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0))}r=(e=>{let t={};return Object.keys(e).forEach((n=>{e[n]&&(t[n]=e[n])})),t})(r),s.set(e,"dap-defined-events",r)},m={on(e,t,n,r){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!n||"function"!=typeof n)throw new TypeError("The third argument must be a function");c.isObject(r)||(r={});d(t).forEach((t=>{((e,t,n,r,a)=>{let o=s.get(e,"dap-defined-events")||{};n||(n=s.get(e,"dap-event-guid")||0,s.set(e,"dap-event-guid",n+1)),o[n=t+"."+n]&&o[n].type==t&&e.removeEventListener(t,o[n].fn,o[n].options),e.addEventListener(t,r,a),o[n]={type:t,fn:r,options:a},s.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,n.bind(e),r)}))},off(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=s.get(e,"dap-defined-events");if(!n)return;if(!t){let t=Object.keys(n),r=t.length;for(let a=0;a<r;a++){let r=t[a];e.removeEventListener(n[r].type,n[r].fn,n[r].options)}return s.remove(e,"dap-defined-events"),void s.remove(e,"dap-event-guid")}d(t).forEach((t=>{u(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=s.get(e,"dap-defined-events");if(t)return t}},h={getImageUrl(e){if(!(e&&e instanceof File))throw new TypeError("The argument must be a File object");return window.URL.createObjectURL(e)},dataFileToBase64:e=>new Promise(((t,n)=>{e&&e instanceof File||n(new TypeError("The argument must be a File object"));let r=new FileReader;r.readAsDataURL(e),r.onloadend=()=>{let e=r.result;t(e)}})),dataBase64toFile(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.split(","),r=n[0].match(/:(.*?);/)[1],a=atob(n[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:r})},compressImage(e,t){const n={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};c.isObject(t)&&(a.isNumber(t.width)&&(n.width=t.width),a.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(n.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(n.mimeType=t.mimeType),a.isNumber(t.maxSize)&&(n.maxSize=t.maxSize),a.isNumber(t.minSize)&&(n.minSize=t.minSize));const r=(e,t,a)=>{let o=e.toDataURL("image/"+n.mimeType,a),i=this.dataBase64toFile(o,t);if(n.maxSize>0&&i.size>1024*n.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const n=r(e,t,a);o=n.url,i=n.file,a=n.quality}return{file:i,url:o,quality:a}};return new Promise(((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>{let i=o.result,l=new Image;l.src=i,l.onload=()=>{if(n.minSize>0&&e.size<=1024*n.minSize)return void t({file:e,url:i,quality:1,width:l.width,height:l.height});let a=document.createElement("canvas"),o=a.getContext("2d");a.width=n.width||l.width,a.height=n.width?n.width/(l.width/l.height):l.height,o.drawImage(l,0,0,a.width,a.height);let s=e.name.lastIndexOf(".");const c=e.name.substring(0,s)+"."+n.mimeType;let d=r(a,c,n.quality);t({...d,width:a.width,height:a.height})},l.onerror=()=>{a(new Error("Failed to load image file"))}},o.onerror=()=>{a(new Error("Failed to load image file"))}}))}},p={language:()=>window.navigator.browserLanguage||window.navigator.language,device(){const e=window.navigator.userAgent;return{PC:!e.match(/AppleWebKit.*Mobile.*/),Mobile:!!e.match(/AppleWebKit.*Mobile.*/),iPhone:e.includes("iPhone"),Phone:e.includes("Android")&&/(?:Mobile)/.test(e)||e.includes("iPhone")||/(?:Windows Phone)/.test(e),iPad:e.includes("iPad"),Tablet:e.includes("iPad")||e.includes("Android")&&!/(?:Mobile)/.test(e)||e.includes("Firefox")&&/(?:Tablet)/.test(e),WindowsPhone:/(?:Windows Phone)/.test(e)}},browser(){const e=window.navigator.userAgent;return{Edge:!!e.match(/Edg\/([\d.]+)/),weixin:e.includes("MicroMessenger"),QQ:e.includes("QQ"),QQBrowser:e.includes("MQQBrowser"),UC:e.includes("UCBrowser"),Chrome:e.includes("Chrome"),Firefox:e.includes("Firefox"),sougou:e.toLocaleLowerCase().includes("se 2.x")||e.toLocaleLowerCase().includes("metasr")||e.toLocaleLowerCase().includes("sogou"),Safari:e.includes("Safari")&&!e.includes("Chrome")}},browserKernel(){const e=window.navigator.userAgent;return e.includes("Presto")?"opera":e.includes("AppleWebKit")?"webkit":e.includes("Gecko")&&!e.includes("KHTML")?"gecko":""},os(){const e=window.navigator.userAgent;return{Windows:e.includes("Windows"),Windows_CPU:e.toLocaleLowerCase().includes("win64")||e.toLocaleLowerCase().includes("wow64")?"x64":e.toLocaleLowerCase().includes("win32")||e.toLocaleLowerCase().includes("wow32")?"x32":"",Windows_Version:e.includes("Windows NT 6.1")||e.includes("Windows 7")?"Win7":e.includes("Windows NT 6.3")||e.includes("Windows NT 6.2")||e.includes("Windows NT 8")?"Win8":e.includes("Windows NT 10")||e.includes("Windows NT 6.4")?"Win10":"",Mac:e.includes("Macintosh"),Mac_Version:function(){if(e.includes("Macintosh")){const t=e.match(/Mac OS X ([^\s]+)\)/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),ios_Version:function(){if(e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){const t=e.match(/CPU.+OS ([^\s]+) like Mac OS X/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),Android:e.includes("Android"),Android_Version:function(){const t=e.match(/Android ([^\s]+);/);return t&&t[1]?t[1].split(/_|\./).join("."):""}(),Linux:e.includes("Linux"),HarmonyOS:e.includes("HarmonyOS"),Ubuntu:e.includes("Ubuntu")}}},f=function(e){return/^[\uFEFF]+$/g.test(e)},g=function(e,t){return 3==t.nodeType?i.isContains(e,t.parentNode):i.isContains(e,t)},b=function(e,t){if(!e)return null;const n=t=>{let r=null;const a=t.length;for(let o=0;o<a;o++){const a=t[o];if(a&&a.key===e){r=a;break}if(a&&a.hasChildren()){const e=n(a.children);if(e){r=e;break}}}return r};return n(t)},v=class e{constructor(e,t,n,a,o){r(this,"key",function(){let e=s.get(window,"data-alex-editor-key")||0;return e++,s.set(window,"data-alex-editor-key",e),e}()),r(this,"type"),r(this,"parsedom"),r(this,"marks"),r(this,"styles"),r(this,"textContent"),r(this,"children",null),r(this,"parent",null),r(this,"behavior","default"),r(this,"namespace",null),r(this,"locked",!1),r(this,"elm",null),this.type=e,this.parsedom=t,this.marks=n,this.styles=a,this.textContent=o?o.replace(/\r\n/g,"\n"):o}isBlock(){return"block"==this.type}isInblock(){return"inblock"==this.type}isInline(){return"inline"==this.type}isClosed(){return"closed"==this.type}isText(){return"text"==this.type}isBreak(){return this.isClosed()&&"br"==this.parsedom}isEmpty(){return this.isText()?!this.textContent:!!(this.isBlock()||this.isInblock()||this.isInline())&&(!this.hasChildren()||this.children.every((e=>e.isEmpty())))}isSpaceText(){return!this.isEmpty()&&this.isText()&&f(this.textContent)}getUneditableElement(){return this.hasMarks()&&"false"==this.marks.contenteditable?this:this.parent?this.parent.getUneditableElement():null}isEqual(t){return!!e.isElement(t)&&this.key==t.key}isContains(e){return!!this.isEqual(e)||!!e.parent&&this.isContains(e.parent)}isOnlyHasBreak(){if(this.hasChildren()){const e=this.children.filter((e=>!e.isEmpty()));return e.length&&e.every((e=>e.isBreak()))}return!1}isPreStyle(){const e=this.getInblock()||this.getBlock();return"pre"==e.parsedom||(!(!e.hasStyles()||!["pre","pre-wrap"].includes(e.styles["white-space"]))||!!e.parent&&e.parent.isPreStyle())}hasMarks(){return!!this.marks&&(!!c.isObject(this.marks)&&!c.isEmptyObject(this.marks))}hasStyles(){return!!this.styles&&(!!c.isObject(this.styles)&&!c.isEmptyObject(this.styles))}hasChildren(){return!this.isClosed()&&!this.isText()&&(!!Array.isArray(this.children)&&!!this.children.length)}hasContains(e){return this.isContains(e)||e.isContains(this)}clone(t=!0){if("boolean"!=typeof t)throw new Error("The parameter must be a Boolean");let n=new e(this.type,this.parsedom,c.clone(this.marks),c.clone(this.styles),this.textContent);return n.behavior=this.behavior,n.namespace=this.namespace,n.locked=this.locked,t&&this.hasChildren()&&this.children.forEach((e=>{let r=e.clone(t);n.hasChildren()?n.children.push(r):n.children=[r],r.parent=n})),n}convertToBlock(){if(this.isBlock())return;let t=this.clone();this.type="block",this.parsedom=e.BLOCK_NODE,this.marks=null,this.styles=null,this.textContent=null,this.children=[t],t.parent=this}toEmpty(){if(!this.isEmpty())return this.isText()?(this.marks=null,this.styles=null,this.textContent=null,this.elm=null,this.namespace=null,void(this.locked=!1)):this.isClosed()?(this.type="text",this.parsedom=null,this.marks=null,this.styles=null,this.textContent=null,this.elm=null,this.namespace=null,void(this.locked=!1)):void(this.hasChildren()&&this.children.forEach((e=>{e.toEmpty()})))}getBlock(){return this.parent?this.parent.getBlock():this}getInblock(){return this.isInblock()?this:this.parent?this.parent.getInblock():null}getInline(){return this.isInline()?this:this.parent?this.parent.getInline():null}isEqualStyles(e){return!this.hasStyles()&&!e.hasStyles()||!!(this.hasStyles()&&e.hasStyles()&&c.equal(this.styles,e.styles))}isEqualMarks(e){return!this.hasMarks()&&!e.hasMarks()||!!(this.hasMarks()&&e.hasMarks()&&c.equal(this.marks,e.marks))}isFirst(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const n=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(n[0])}return!1}isLast(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const n=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(n[n.length-1])}return!1}__render(){let t=null;this.isText()?(t=this.namespace?document.createElementNS(this.namespace,e.TEXT_NODE):document.createElement(e.TEXT_NODE),t.textContent=this.textContent):(t=this.namespace?document.createElementNS(this.namespace,this.parsedom):document.createElement(this.parsedom),this.hasChildren()&&this.children.forEach((e=>{e.__render(),t.appendChild(e.elm)}))),this.hasMarks()&&Object.keys(this.marks).forEach((e=>{/(^on)|(^style$)|(^face$)/g.test(e)||t.setAttribute(e,this.marks[e])})),this.hasStyles()&&Object.keys(this.styles).forEach((e=>{t.style.setProperty(e,this.styles[e])})),s.set(t,"data-alex-editor-key",this.key),this.elm=t}__fullClone(){let t=new e(this.type,this.parsedom,c.clone(this.marks),c.clone(this.styles),this.textContent);return t.behavior=this.behavior,t.namespace=this.namespace,t.locked=this.locked,t.key=this.key,t.elm=this.elm,this.hasChildren()&&(t.children=this.children.map((e=>{const n=e.__fullClone();return n.parent=t,n}))),t}static isElement(t){return t instanceof e}static flatElements(e){const t=e=>{let n=[];const r=e.length;for(let a=0;a<r;a++)if(e[a]&&(n.push(e[a]),e[a].hasChildren())){const r=t(e[a].children);n.push(...r)}return n};return t(e)}static getSpaceElement(){return new e("text",null,null,null,"\ufeff")}static create(t){let n=null;return"text"==t.type?n=new e(t.type,null,t.marks?t.marks:null,t.styles?t.styles:null,t.textContent?t.textContent:null):(n=new e(t.type,t.parsedom,t.marks?t.marks:null,t.styles?t.styles:null,null),"inblock"==t.type&&t.behavior&&(n.behavior=t.behavior),"closed"!=t.type&&Array.isArray(t.children)&&(n.children=t.children.map((t=>{const r=e.create(t);return r.parent=n,r})))),t.namespace&&(n.namespace=t.namespace),"boolean"==typeof t.locked&&(n.locked=t.locked),n}};r(v,"BLOCK_NODE","p"),r(v,"TEXT_NODE","span"),r(v,"VOID_NODES",["colgroup","col"]),r(v,"EMPTY_NODES",["meta","link","style","script","title","base","noscript","template","annotation"]);let y=v;class w{constructor(e,t){r(this,"anchor"),r(this,"focus"),this.anchor=e,this.focus=t}}class x{constructor(e,t){if(r(this,"element"),r(this,"offset"),this.element=e,this.offset=t,this.element.isText()||this.element.isClosed()){if(y.VOID_NODES.includes(this.element.parsedom))throw new Error("Invisible element cannot be set as focal point")}else 0==this.offset?this.moveToStart(this.element):this.moveToEnd(this.element)}static isPoint(e){return e instanceof x}isEqual(e){return!!x.isPoint(e)&&(this.element.isEqual(e.element)&&this.offset==e.offset)}moveToEnd(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isEmpty())throw new Error("The argument cannot be an empty element");if(e.isText())this.element=e,this.offset=e.textContent.length;else if(e.isClosed()){if(y.VOID_NODES.includes(e.parsedom))throw new Error("Invisible element cannot be set as focal point");this.element=e,this.offset=1}else if(e.hasChildren()){const t=y.flatElements(e.children).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))),n=t.length;if(0==n)throw new Error("There is no element to set the focus");this.moveToEnd(t[n-1])}}moveToStart(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isEmpty())throw new Error("The argument cannot be an empty element");if(e.isText())this.element=e,this.offset=0;else if(e.isClosed()){if(y.VOID_NODES.includes(e.parsedom))throw new Error("Invisible element cannot be set as focal point");this.element=e,this.offset=0}else if(e.hasChildren()){const t=y.flatElements(e.children).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)));if(0==t.length)throw new Error("There is no element to set the focus");this.moveToStart(t[0])}}}class k{constructor(){r(this,"records",[]),r(this,"redoRecords",[])}cloneRange(e,t){if(t){const n=b(t.anchor.element.key,e),r=b(t.focus.element.key,e);if(n&&r){const e=new x(n,t.anchor.offset),a=new x(r,t.focus.offset);return new w(e,a)}}return null}setState(e,t){const n=e.map((e=>e.__fullClone())),r=this.cloneRange(n,t);this.records.push({stack:e.map((e=>e.__fullClone())),range:r}),this.redoRecords=[]}undo(){if(this.records.length>1){const e=this.records.pop();this.redoRecords.push(e);const t=this.records[this.records.length-1],n=t.stack.map((e=>e.__fullClone()));return{stack:n,range:this.cloneRange(n,t.range)}}return null}redo(){if(this.redoRecords.length>0){const e=this.redoRecords.pop();this.records.push(e);const t=e.stack.map((e=>e.__fullClone()));return{stack:t,range:this.cloneRange(t,e.range)}}return null}updateRange(e){const t=this.records[this.records.length-1],n=this.cloneRange(t.stack,e);this.records[this.records.length-1].range=n}}const E=[{parsedom:"p"},{parsedom:"div"},{parsedom:"table"},{parsedom:"ul"},{parsedom:"ol"},{parsedom:"h1"},{parsedom:"h2"},{parsedom:"h3"},{parsedom:"h4"},{parsedom:"h5"},{parsedom:"h6"},{parsedom:"blockquote"},{parsedom:"pre"},{parsedom:"address",parse:!0},{parsedom:"article",parse:!0},{parsedom:"aside",parse:!0},{parsedom:"nav",parse:!0},{parsedom:"section",parse:!0}],S=[{parsedom:"br"},{parsedom:"col"},{parsedom:"img"},{parsedom:"hr"},{parsedom:"video"},{parsedom:"audio"}],T=[{parsedom:"li",block:!0},{parsedom:"tfoot"},{parsedom:"tbody"},{parsedom:"thead"},{parsedom:"tr"},{parsedom:"th"},{parsedom:"td"},{parsedom:"colgroup"}],_=[{parsedom:"span"},{parsedom:"a"},{parsedom:"label"},{parsedom:"code"},{parsedom:"b",parse:{"font-weight":"bold"}},{parsedom:"strong",parse:{"font-weight":"bold"}},{parsedom:"sup",parse:{"vertical-align":"super"}},{parsedom:"sub",parse:{"vertical-align":"sub"}},{parsedom:"i",parse:{"font-style":"italic"}},{parsedom:"u",parse:{"text-decoration-line":"underline"}},{parsedom:"del",parse:{"text-decoration-line":"line-through"}},{parsedom:"abbr",parse:!0},{parsedom:"acronym",parse:!0},{parsedom:"bdo",parse:!0},{parsedom:"font",parse:{"font-family":e=>e.getAttribute("face")||""}}],C=function(e){if(e.hasChildren()){e.children.filter((e=>!e.isEmpty()&&e.isBlock())).forEach((t=>{t.type="inline"==e.type?"inline":"inblock","inblock"==t.type&&(t.behavior="block")}))}},N=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),n=t.filter((e=>e.isInblock()));n.length&&n.length!=t.length&&n.forEach((e=>{e.type="inline"}))}},B=function(e){if(e.isInline()&&e.hasChildren()){e.children.filter((e=>!e.isEmpty()&&e.isInblock())).forEach((e=>{e.type="inline"}))}},M=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),n=t.filter((e=>e.isBreak()));e.isInline()&&n.length?n.forEach((e=>{e.toEmpty()})):t.length>1&&n.length==t.length?(this.range&&e.isContains(this.range.anchor.element)&&this.range.anchor.moveToStart(n[0]),this.range&&e.isContains(this.range.focus.element)&&this.range.focus.moveToStart(n[0]),e.children=[n[0]]):t.length>1&&n.length&&n.forEach((e=>{e.toEmpty()}))}},z=function(e){const t=(e,t)=>{if(e.isEmpty()||t.isEmpty()){if(t.isEmpty()){this.range&&t.isContains(this.range.anchor.element)&&(e.isEmpty()?(this.range.anchor.element=e,this.range.anchor.offset=0):this.range.anchor.moveToEnd(e)),this.range&&t.isContains(this.range.focus.element)&&(e.isEmpty()?(this.range.focus.element=e,this.range.focus.offset=0):this.range.focus.moveToEnd(e));const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}else if(e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&(t.isEmpty()?(this.range.anchor.element=t,this.range.anchor.offset=0):this.range.anchor.moveToStart(t)),this.range&&e.isContains(this.range.focus.element)&&(t.isEmpty()?(this.range.focus.element=t,this.range.focus.offset=0):this.range.focus.moveToStart(t));const n=e.parent.children.findIndex((t=>e.isEqual(t)));e.parent.children.splice(n,1)}}else if(e.isText()){this.range&&t.isEqual(this.range.anchor.element)&&(this.range.anchor.element=e,this.range.anchor.offset=e.textContent.length+this.range.anchor.offset),this.range&&t.isEqual(this.range.focus.element)&&(this.range.focus.element=e,this.range.focus.offset=e.textContent.length+this.range.focus.offset),e.textContent+=t.textContent;const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}else if(e.isInline()){e.children.push(...t.children),e.children.forEach((t=>{t.parent=e})),n(e);const r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,1)}},n=e=>{if(e.hasChildren()&&e.children.length>1){let a=0;for(;e.hasChildren()&&a<=e.children.length-2;)n=e.children[a],r=e.children[a+1],n.locked||r.locked||!(n.isEmpty()||r.isEmpty()||(n.isText()&&r.isText()?n.isEqualStyles(r)&&n.isEqualMarks(r):n.isInline()&&r.isInline()&&n.parsedom==r.parsedom&&n.isEqualMarks(r)&&n.isEqualStyles(r)))?a++:(t(e.children[a],e.children[a+1]),A.apply(this,[e]))}var n,r};n(e)},A=function(e){const t=(e,t)=>{t.isText()?(e.type="text",e.parsedom=null,t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,c.clone(t.marks)):e.marks=c.clone(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,c.clone(t.styles)):e.styles=c.clone(t.styles)),e.textContent=t.textContent,e.children=null,this.range&&t.isContains(this.range.anchor.element)&&(this.range.anchor.element=e),this.range&&t.isContains(this.range.focus.element)&&(this.range.focus.element=e)):(t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,c.clone(t.marks)):e.marks=c.clone(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,c.clone(t.styles)):e.styles=c.clone(t.styles)),t.hasChildren()&&(e.children=[...t.children],e.children.forEach((t=>{t.parent=e}))),n(e))},n=e=>{var n,r;e.hasChildren()&&1==e.children.length&&e.children[0]&&(n=e,r=e.children[0],!n.locked&&!r.locked&&(r.isText()&&n.isInline()?n.parsedom==y.TEXT_NODE:(n.isInline()&&r.isInline()||n.isInblock()&&r.isInblock())&&n.parsedom==r.parsedom))&&(t(e,e.children[0]),e.parent&&z.apply(this,[e.parent]))};n(e)},O=function(e){if(e.isText()&&!e.isEmpty()&&e.textContent.split("").some((e=>f(e)))){let t=e.textContent,n=0;for(;n<t.length;){const r=t.charAt(n);f(r)&&n>0&&f(t.charAt(n-1))?(this.range&&this.range.anchor.element.isEqual(e)&&this.range.anchor.offset>=n+1&&(this.range.anchor.offset-=1),this.range&&this.range.focus.element.isEqual(e)&&this.range.focus.offset>=n+1&&(this.range.focus.offset-=1),t=o.delete(t,n,1)):n++}e.textContent=t}},I=function(e,t){let n="",r="";return t.forEach((e=>{const t=e.element.clone();e.offset&&(t.textContent=t.textContent.substring(e.offset[0],e.offset[1])),t.__render(),n+=t.elm.outerHTML,r+=t.elm.innerText})),e.setData("text/plain",r),e.setData("text/html",n),{html:n,text:r}},R=async function(e,t,n){if(e)if(this.allowPasteHtml){const t=this.parseHtml(e).filter((e=>!e.isEmpty()));if("function"==typeof this.customHtmlPaste)await this.customHtmlPaste.apply(this,[t,e]);else{this.insertElement(t[0]);for(let e=t.length-1;e>=1;e--)this.addElementAfter(t[e],t[0]);this.range.anchor.moveToEnd(t[t.length-1]),this.range.focus.moveToEnd(t[t.length-1]),this.emit("pasteHtml",t,e)}}else t&&("function"==typeof this.customTextPaste?await this.customTextPaste.apply(this,[t]):(this.insertText(t),this.emit("pasteText",t)));else if(t)"function"==typeof this.customTextPaste?await this.customTextPaste.apply(this,[t]):(this.insertText(t),this.emit("pasteText",t));else{let e=n.length;for(let t=0;t<e;t++)if(n[t].type.startsWith("image/"))if("function"==typeof this.customImagePaste)await this.customImagePaste.apply(this,[n[t]]);else{const e=await h.dataFileToBase64(n[t]),r=new y("closed","img",{src:e},null,null);this.insertElement(r),this.emit("pasteImage",e)}else if(n[t].type.startsWith("video/"))if("function"==typeof this.customVideoPaste)await this.customVideoPaste.apply(this,[n[t]]);else{const e=await h.dataFileToBase64(n[t]),r=new y("closed","video",{src:e},null,null);this.insertElement(r),this.emit("pasteVideo",e)}else"function"==typeof this.customFilePaste&&await this.customFilePaste.apply(this,[n[t]])}},L=function(){for(var e;this.__illegalDoms.length>0;){const t=this.__illegalDoms[0];null==(e=t.parentNode)||e.removeChild(t),this.__illegalDoms.splice(0,1)}},D=function(){window.MutationObserver||console.warn("The current browser does not support MutationObserver"),this.__domObserver&&(this.__domObserver.disconnect(),this.__domObserver=null),this.__domObserver=new MutationObserver((e=>{let t=e.length;for(let n=0;n<t;n++)if("childList"==e[n].type){const t=e[n].addedNodes.length;for(let r=0;r<t;r++){const t=e[n].addedNodes[r];if(3==t.nodeType){const e=t.parentNode,n=e?s.get(e,"data-alex-editor-key"):null,r=n?this.getElementByKey(n):null;r&&!r.isText()&&this.__illegalDoms.push(t)}else i.isElement(t)&&!s.get(t,"data-alex-editor-key")&&this.__illegalDoms.push(t)}}})),this.__domObserver.observe(this.$el,{attributes:!1,childList:!0,subtree:!0})},$=function(){this.__domObserver&&(this.__domObserver.disconnect(),this.__domObserver=null)},j=function(){if(0==y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))).length){const e=new y("block",y.BLOCK_NODE,null,null,null),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.stack=[e]}},P=function(e){const t=this.getPreviousElementOfPoint(e),n=this.getNextElementOfPoint(e),r=e.element.getBlock(),a=e.element.getInblock();t&&a&&a.isContains(t)?e.moveToEnd(t):n&&a&&a.isContains(n)?e.moveToStart(n):t&&r.isContains(t)?e.moveToEnd(t):n&&r.isContains(n)?e.moveToStart(n):t?e.moveToEnd(t):n&&e.moveToStart(n)},F=function(e){e.isInblock()&&"default"==e.behavior&&e.hasChildren()&&e.children.forEach((e=>{if(e.isInblock()&&"default"==e.behavior)F.apply(this,[e]);else if(e.toEmpty(),e.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.parent)}}))},q=function(){const e=async e=>{const t=i.getScrollHeight(e),n=i.getScrollWidth(e);if(e.clientHeight<t||e.clientWidth<n){const r=window.getSelection();if(0==r.rangeCount)return;const a=r.getRangeAt(0),o=a.getClientRects();let l=a;0==o.length&&(l=this.range.focus.element.elm);const s=l.getBoundingClientRect(),c=e.getBoundingClientRect();if(e.clientHeight<t)if(s.top<c.top){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.top-n.top})}else if(s.bottom>c.bottom){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.bottom-n.bottom})}if(e.clientWidth<n)if(s.left<c.left){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.left-n.left+20})}else if(s.right>c.right){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.right-n.right+20})}}};if(this.range&&this.range.focus.element.elm){let t=this.range.focus.element.elm;for(;i.isElement(t)&&t!=document.documentElement;)e(t),t=t.parentNode}},H=function(){if(0==y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))).length){const e=new y("block",y.BLOCK_NODE,null,null,null),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.stack=[e],this.range&&(this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t))}},V=function(e,t,n){const r=n.findIndex((t=>t.isEqual(e)));if(!(r<0))if(e.isEmpty())this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]),n.splice(r,1);else if(t.apply(this,[e]),e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]);const t=n.findIndex((t=>t.isEqual(e)));n.splice(t,1)}else if(e.isBlock()||n!==this.stack||e.convertToBlock(),e.hasChildren()&&e.children.forEach((n=>{V.apply(this,[n,t,e.children])})),e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]);const t=n.findIndex((t=>t.isEqual(e)));n.splice(t,1)}},{Mac:U}=p.os(),W=function(){if(this.__isInputChinese)return;if(this.__innerSelectionChange)return;const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0);if(g(this.$el,t.startContainer)&&g(this.$el,t.endContainer)){let e=null,n=null,r=null,a=null;if(3==t.startContainer.nodeType)e=t.startContainer.parentNode,r=t.startOffset;else if(1==t.startContainer.nodeType){const n=Array.from(t.startContainer.childNodes);n.length?(e=n[t.startOffset]?n[t.startOffset]:n[t.startOffset-1],r=n[t.startOffset]?0:1,3==e.nodeType&&(r=0==r?0:e.textContent.length,e=e.parentNode)):(e=t.startContainer,r=0)}if(3==t.endContainer.nodeType)n=t.endContainer.parentNode,a=t.endOffset;else if(1==t.endContainer.nodeType){const e=Array.from(t.endContainer.childNodes);e.length?(n=e[t.endOffset]?e[t.endOffset]:e[t.endOffset-1],a=e[t.endOffset]?0:1,3==n.nodeType&&(a=0==a?0:n.textContent.length,n=n.parentNode)):(n=t.endContainer,a=1)}const o=s.get(e,"data-alex-editor-key"),i=s.get(n,"data-alex-editor-key"),l=this.getElementByKey(o),c=this.getElementByKey(i),d=new x(l,r),u=new x(c,a);this.range?(this.range.anchor=d,this.range.focus=u):this.range=new w(d,u),this.history.updateRange(this.range),this.emit("rangeUpdate",this.range)}}},K=function(e){const t=e;"deleteByCut"!=t.inputType&&"insertFromPaste"!=t.inputType&&"deleteByDrag"!=t.inputType&&"insertFromDrop"!=t.inputType&&(t.preventDefault(),this.disabled||("insertText"==t.inputType&&t.data?(this.insertText(t.data),this.domRender(),this.rangeRender()):"insertParagraph"==t.inputType||"insertLineBreak"==t.inputType?(this.insertParagraph(),this.domRender(),this.rangeRender()):"deleteContentBackward"==t.inputType&&(this.delete(),this.domRender(),this.rangeRender())))},G=function(e){const t=e;t.preventDefault(),this.disabled||("compositionstart"==t.type?(this.__chineseInputTimer&&(clearTimeout(this.__chineseInputTimer),this.__chineseInputTimer=null),this.__isInputChinese=!0):"compositionend"==t.type&&(t.data&&(this.insertText(t.data),this.domRender(),this.rangeRender()),this.__chineseInputTimer=setTimeout((()=>{this.__isInputChinese=!1}),0)))},Z=function(e){if(this.__isInputChinese)return;const t=e;"keydown"==t.type?(!function(e){return U?"z"==e.key.toLocaleLowerCase()&&e.metaKey&&!e.shiftKey&&!e.altKey&&!e.ctrlKey:"z"==e.key.toLocaleLowerCase()&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}(t)?function(e){return U?"z"==e.key.toLocaleLowerCase()&&e.metaKey&&e.shiftKey&&!e.altKey&&!e.ctrlKey:"y"==e.key.toLocaleLowerCase()&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}(t)&&(t.preventDefault(),this.redo()):(t.preventDefault(),this.undo()),this.emit("keydown",this.value,t)):"keyup"==t.type&&this.emit("keyup",this.value,t)},X=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCopy)return;const n=this.getElementsByRange().list;if(t.clipboardData&&n.length){const{text:e,html:r}=I.apply(this,[t.clipboardData,n]);this.emit("copy",e,r)}},Y=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCut)return;const n=this.getElementsByRange().list;if(t.clipboardData&&n.length){const{text:e,html:r}=I.apply(this,[t.clipboardData,n]);this.disabled||(this.delete(),this.domRender(),this.rangeRender()),this.emit("cut",e,r)}},Q=async function(e){const t=e;if(t.preventDefault(),!this.disabled&&this.range&&this.allowPaste&&t.clipboardData){const e=t.clipboardData.getData("text/html"),n=t.clipboardData.getData("text/plain"),r=t.clipboardData.files;await R.apply(this,[e,n,r]),this.domRender(),this.rangeRender()}},J=async function(e){if(e.preventDefault(),"drop"==e.type){if(this.disabled)return;if(!this.range)return;if(!this.allowPaste)return;const t=e;if(t.dataTransfer){const e=t.dataTransfer.getData("text/html"),n=t.dataTransfer.getData("text/plain"),r=t.dataTransfer.files;await R.apply(this,[e,n,r]),this.domRender(),this.rangeRender()}}},ee=function(e){this.disabled||this.emit("focus",this.value,e)},te=function(e){this.disabled||this.emit("blur",this.value,e)},ne=(e,t,n)=>{let r=[];if(e.length&&t.length){let a=0,o=0,i=e.length-1,l=t.length-1;for(;a<=i&&o<=l;){if(t[o])if(t[l])if(e[a].key==t[o].key)r.push(...re(e[a],t[o],n)),a++,o++;else if(e[i].key==t[l].key)r.push(...re(e[i],t[l],n)),i--,l--;else if(e[a].key==t[l].key)r.push({type:"move",newElement:e[a],oldElement:t[l]},...re(e[a],t[l],n)),a++,l--;else if(e[i].key==t[o].key)r.push({type:"move",newElement:e[i],oldElement:t[o]},...re(e[i],t[o],n)),i--,o++;else{let o=t.findIndex((t=>t&&t.key===e[a].key));o>=0?(r.push({type:"move",newElement:e[a],oldElement:t[o]},...re(e[a],t[o],n)),t[o]=void 0):r.push({type:"insert",newElement:e[a]}),a++}else l--;else o++;if(o>l)for(;a<=i;a++)r.push({type:"insert",newElement:e[a]});else if(a>i)for(;o<=l;o++)t[o]&&r.push({type:"remove",oldElement:t[o]})}}else e.length?r=e.map((e=>({type:"insert",newElement:e}))):t.length&&(r=t.map((e=>({type:"remove",oldElement:e}))));return r},re=(e,t,n)=>{const r=[];return n||!e.isEmpty()&&!t.isEmpty()?n||e.type==t.type&&e.locked==t.locked?n&&e.namespace!=t.namespace?r.push({type:"replace",oldElement:t,newElement:e}):e.isText()||e.parsedom==t.parsedom?!n&&e.isInblock()&&e.behavior!=t.behavior||e.hasChildren()&&!t.hasChildren()||t.hasChildren()&&!e.hasChildren()?r.push({type:"replace",oldElement:t,newElement:e}):(e.isText()&&e.textContent!=t.textContent&&r.push({type:"update",oldElement:t,newElement:e,update:"textContent"}),e.isEqualStyles(t)||r.push({type:"update",oldElement:t,newElement:e,update:"styles"}),e.isEqualMarks(t)||r.push({type:"update",oldElement:t,newElement:e,update:"marks"}),e.hasChildren()&&t.hasChildren()&&r.push(...ne(e.children,t.children,n))):r.push({type:"replace",oldElement:t,newElement:e}):r.push({type:"replace",oldElement:t,newElement:e}):r.push({type:"empty",oldElement:t,newElement:e}),r};class ae{constructor(e,t){r(this,"$el"),r(this,"disabled"),r(this,"value"),r(this,"renderRules"),r(this,"allowCopy"),r(this,"allowPaste"),r(this,"allowCut"),r(this,"allowPasteHtml"),r(this,"customTextPaste"),r(this,"customHtmlPaste"),r(this,"customImagePaste"),r(this,"customVideoPaste"),r(this,"customFilePaste"),r(this,"customMerge"),r(this,"customParseNode"),r(this,"extraKeepTags"),r(this,"history",new k),r(this,"stack"),r(this,"range",null),r(this,"__guid",function(){let e=s.get(window,"data-alex-editor-guid")||0;return e++,s.set(window,"data-alex-editor-guid",e),e}()),r(this,"__events",{}),r(this,"__oldStack",[]),r(this,"__isInputChinese",!1),r(this,"__innerSelectionChange",!1),r(this,"__chineseInputTimer",null),r(this,"__domObserver",null),r(this,"__illegalDoms",[]),this.$el=function(e){if("string"==typeof e&&e&&(e=document.body.querySelector(e)),!i.isElement(e))throw new Error("You must specify a dom container to initialize the editor");if(s.get(e,"data-alex-editor-init"))throw new Error("The element node has been initialized to the editor");return s.set(e,"data-alex-editor-init",!0),e}(e);const n=function(e){const t={value:"",disabled:!1,allowCopy:!0,allowPaste:!0,allowCut:!0,allowPasteHtml:!1,extraKeepTags:[],renderRules:[],customTextPaste:null,customHtmlPaste:null,customImagePaste:null,customVideoPaste:null,customFilePaste:null,customMerge:null,customParseNode:null};return c.isObject(e)&&("string"==typeof e.value&&e.value&&(t.value=e.value),"boolean"==typeof e.disabled&&(t.disabled=e.disabled),"boolean"==typeof e.allowCopy&&(t.allowCopy=e.allowCopy),"boolean"==typeof e.allowPaste&&(t.allowPaste=e.allowPaste),"boolean"==typeof e.allowCut&&(t.allowCut=e.allowCut),"boolean"==typeof e.allowPasteHtml&&(t.allowPasteHtml=e.allowPasteHtml),Array.isArray(e.extraKeepTags)&&(t.extraKeepTags=e.extraKeepTags),Array.isArray(e.renderRules)&&(t.renderRules=e.renderRules),"function"==typeof e.customTextPaste&&(t.customTextPaste=e.customTextPaste),"function"==typeof e.customHtmlPaste&&(t.customHtmlPaste=e.customHtmlPaste),"function"==typeof e.customImagePaste&&(t.customImagePaste=e.customImagePaste),"function"==typeof e.customVideoPaste&&(t.customVideoPaste=e.customVideoPaste),"function"==typeof e.customFilePaste&&(t.customFilePaste=e.customFilePaste),"function"==typeof e.customMerge&&(t.customMerge=e.customMerge),"function"==typeof e.customParseNode&&(t.customParseNode=e.customParseNode)),t}(t);this.disabled=n.disabled,this.value=n.value,this.renderRules=n.renderRules,this.allowCopy=n.allowCopy,this.allowPaste=n.allowPaste,this.allowCut=n.allowCut,this.allowPasteHtml=n.allowPasteHtml,this.customTextPaste=n.customTextPaste,this.customHtmlPaste=n.customHtmlPaste,this.customImagePaste=n.customImagePaste,this.customVideoPaste=n.customVideoPaste,this.customFilePaste=n.customFilePaste,this.customMerge=n.customMerge,this.customParseNode=n.customParseNode,this.extraKeepTags=n.extraKeepTags,this.stack=this.parseHtml(this.value),j.apply(this),this.disabled?this.setDisabled():this.setEnabled(),D.apply(this),m.on(document,`selectionchange.alex_editor_${this.__guid}`,W.bind(this)),m.on(this.$el,"beforeinput.alex_editor",K.bind(this)),m.on(this.$el,"compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor",G.bind(this)),m.on(this.$el,"keydown.alex_editor keyup.alex_editor",Z.bind(this)),m.on(this.$el,"cut.alex_editor",Y.bind(this)),m.on(this.$el,"paste.alex_editor",Q.bind(this)),m.on(this.$el,"copy.alex_editor",X.bind(this)),m.on(this.$el,"dragstart.alex_editor drop.alex_editor",J.bind(this)),m.on(this.$el,"focus.alex_editor",ee.bind(this)),m.on(this.$el,"blur.alex_editor",te.bind(this))}initRange(){const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)))[0],t=new x(e,0),n=new x(e,0);this.range=new w(t,n)}delete(){if(this.range){if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.range.anchor.element.getBlock(),n=this.range.anchor.element.getInblock();if(n)if(0==this.range.anchor.offset)if(e){if(n.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();if("block"==n.behavior){const t=e.getBlock(),r=e.getInblock();r?this.merge(n,r):this.merge(n,t)}}else this.emit("deleteInStart",n);else{if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}else this.range.anchor.offset=0,this.range.focus.offset=0;return void this.delete()}if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const t=f(e[this.range.anchor.offset]);if(this.range.anchor.element.textContent=e.substring(0,this.range.anchor.offset)+e.substring(this.range.focus.offset),this.range.focus.offset=this.range.anchor.offset,t)return void this.delete();if(n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const t=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),n.isEmpty()&&(!t||!e)){const e=new y("closed","br",null,null,null);if(this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e),t)return void this.delete()}}}else if(0==this.range.anchor.offset)if(e){if(t.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();{const n=e.getInblock(),r=e.getBlock();n?this.merge(t,n):this.merge(t,r)}}else this.emit("deleteInStart",t);else{if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}else this.range.anchor.offset=0,this.range.focus.offset=0;return void this.delete()}if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const n=f(e[this.range.anchor.offset]);if(this.range.anchor.element.textContent=e.substring(0,this.range.anchor.offset)+e.substring(this.range.focus.offset),this.range.focus.offset=this.range.anchor.offset,n)return void this.delete();if(t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const n=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),t.isEmpty()&&(!n||!e)){const e=new y("closed","br",null,null,null);if(this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e),n)return void this.delete()}}}}else{const e=this.getElementsByRange().list.filter((e=>!y.VOID_NODES.includes(e.element.parsedom))),t=this.range.anchor.element.getInblock(),n=this.range.focus.element.getInblock(),r=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock();t&&n&&t.isEqual(n)?e.forEach((e=>{if(e.offset?e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]):e.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t)}})):t&&n?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)F.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),"block"==n.behavior&&this.merge(n,t)):t?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)F.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),this.merge(a,t)):n?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)F.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),"block"==n.behavior&&this.merge(n,r)):r.isEqual(a)?e.forEach((e=>{if(e.offset?e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]):e.element.toEmpty(),r.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,r)}})):(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)F.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),this.merge(a,r))}this.range.anchor.element.isEmpty()&&P.apply(this,[this.range.anchor]),this.range.focus.element=this.range.anchor.element,this.range.focus.offset=this.range.anchor.offset,H.apply(this),this.emit("deleteComplete")}}insertText(e){if(this.range){if(!e||"string"!=typeof e)throw new Error("The argument must be a string");if(this.range.anchor.isEqual(this.range.focus))if(this.range.anchor.element.isPreStyle()||(e=e.replace(/\s/g,(()=>{const e=document.createElement("span");return e.innerHTML="&nbsp;",e.innerText}))),this.range.anchor.element.isText()){let t=this.range.anchor.element.textContent;this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset)+e.replace(/\r\n/g,"\n")+t.substring(this.range.anchor.offset),this.range.anchor.offset=this.range.anchor.offset+e.length,this.range.focus.offset=this.range.anchor.offset}else{const t=new y("text",null,null,null,e);0==this.range.anchor.offset?this.addElementBefore(t,this.range.anchor.element):this.addElementAfter(t,this.range.anchor.element),this.range.anchor.moveToEnd(t),this.range.focus.moveToEnd(t)}else this.delete(),this.insertText(e)}}insertParagraph(){if(this.range)if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.getNextElementOfPoint(this.range.anchor),n=this.range.anchor.element.getBlock(),r=this.range.anchor.element.getInblock(),a=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(r){if(this.range.anchor.element.isPreStyle()){this.insertText("\n");const e=y.getSpaceElement();this.insertElement(e),this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),this.emit("insertParagraph",r,r)}else if("block"==r.behavior)if(0!=this.range.anchor.offset||e&&r.isContains(e))if(this.range.anchor.offset!=a||t&&r.isContains(t)){const e=r.clone();this.addElementAfter(e,r);const t=y.flatElements(r.children).findIndex((e=>this.range.anchor.element.isEqual(e)));this.range.focus.moveToEnd(r),this.delete();const n=y.flatElements(e.children);this.range.focus.element=n[t],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(e),this.delete(),this.emit("insertParagraph",e,r)}else{const e=r.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementAfter(e,r),this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t),this.emit("insertParagraph",e,r)}else{const e=r.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementBefore(e,r),this.emit("insertParagraph",r,e)}}else if(this.range.anchor.element.isPreStyle()){this.insertText("\n");const e=y.getSpaceElement();this.insertElement(e),this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),this.emit("insertParagraph",n,n)}else if(0!=this.range.anchor.offset||e&&n.isContains(e))if(this.range.anchor.offset!=a||t&&n.isContains(t)){const e=n.clone();this.addElementAfter(e,n);const t=y.flatElements(n.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=this.range.anchor.offset;this.range.focus.moveToEnd(n),this.delete();const a=y.flatElements(e.children);this.range.focus.element=a[t],this.range.focus.offset=r,this.range.anchor.moveToStart(e),this.delete(),this.emit("insertParagraph",e,n)}else{const e=n.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementAfter(e,n),this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t),this.emit("insertParagraph",e,n)}else{const e=n.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementBefore(e,n),this.emit("insertParagraph",n,e)}}else this.delete(),this.insertParagraph()}insertElement(e,t=!0){if(this.range){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(!e.isEmpty())if(this.range.anchor.isEqual(this.range.focus)){const n=this.getPreviousElementOfPoint(this.range.anchor),r=this.getNextElementOfPoint(this.range.anchor),a=this.range.anchor.element.getBlock(),o=this.range.anchor.element.getInblock(),i=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(e.isInblock()&&"block"==e.behavior&&o&&"block"==o.behavior)if(o.isOnlyHasBreak()&&t)this.addElementBefore(e,o),o.toEmpty();else if(0!=this.range.anchor.offset||n&&o.isContains(n))if(this.range.anchor.offset!=i||r&&o.isContains(r)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const n=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementBefore(e,t)}else this.addElementAfter(e,o);else this.addElementBefore(e,o);else if(e.isInblock()&&o)if(o.isOnlyHasBreak())this.addElementTo(e,o,0);else if(0!=this.range.anchor.offset||n&&o.isContains(n))if(this.range.anchor.offset!=i||r&&o.isContains(r)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const n=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementTo(e,t),this.merge(t,o)}else this.addElementTo(e,o,o.children.length);else this.addElementTo(e,o,0);else if(e.isInblock())if(a.isOnlyHasBreak())this.addElementTo(e,a,0);else if(0!=this.range.anchor.offset||n&&a.isContains(n))if(this.range.anchor.offset!=i||r&&a.isContains(r)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const n=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementTo(e,t),this.merge(t,a)}else this.addElementTo(e,a,a.children.length);else this.addElementTo(e,a,0);else if(e.isBlock())if(a.isOnlyHasBreak()&&t)this.addElementBefore(e,a),a.toEmpty();else if(0!=this.range.anchor.offset||n&&a.isContains(n))if(this.range.anchor.offset!=i||r&&a.isContains(r)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const n=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementBefore(e,t)}else this.addElementAfter(e,a);else this.addElementBefore(e,a);else if(this.range.anchor.element.isText()){let t=this.range.anchor.element.textContent,n=this.range.anchor.element.clone();this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset),n.textContent=t.substring(this.range.anchor.offset),this.addElementAfter(n,this.range.anchor.element),this.addElementBefore(e,n)}else 0==this.range.anchor.offset?this.addElementBefore(e,this.range.anchor.element):this.addElementAfter(e,this.range.anchor.element);this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e)}else this.delete(),this.insertElement(e,t)}}domRender(e=!1){this.emit("beforeRender");const t=!this.__oldStack.length,n=[C,N,B,M,A,z,O,...this.renderRules.filter((e=>"function"==typeof e))];if(t||e){this.stack.forEach((e=>{n.forEach((t=>{V.apply(this,[e,t,this.stack])}))})),H.apply(this);const e=document.createDocumentFragment();this.stack.forEach((t=>{t.__render(),e.appendChild(t.elm)})),this.$el.innerHTML="",this.$el.appendChild(e)}else L.apply(this),ne(this.stack,this.__oldStack,!1).forEach((e=>{let t=null;if(e.newElement)t=e.newElement.parent?e.newElement.parent:e.newElement;else if(e.oldElement&&e.oldElement.parent){const n=b(e.oldElement.parent.key,this.stack);t=n||null}t&&n.forEach((e=>{V.apply(this,[t,e,t.parent?t.parent.children:this.stack])}))})),H.apply(this),ne(this.stack,this.__oldStack,!0).forEach((e=>{if("insert"==e.type){e.newElement.__render();const t=this.getPreviousElement(e.newElement),n=e.newElement.parent?e.newElement.parent.elm:this.$el;t?t.elm.nextElementSibling?n.insertBefore(e.newElement.elm,t.elm.nextElementSibling):n.appendChild(e.newElement.elm):n.firstElementChild?n.insertBefore(e.newElement.elm,n.firstElementChild):n.appendChild(e.newElement.elm)}else if("remove"==e.type)e.oldElement.elm.remove();else if("update"==e.type){if("textContent"==e.update)e.newElement.elm.textContent=e.newElement.textContent;else if("styles"==e.update){const{setStyles:t,removeStyles:n}=((e,t)=>{const n={},r={};return e.hasStyles()&&Object.keys(e.styles).forEach((r=>{t.hasStyles()&&t.styles.hasOwnProperty(r)&&t.styles[r]===e.styles[r]||(n[r]=e.styles[r])})),t.hasStyles()&&Object.keys(t.styles).forEach((n=>{e.hasStyles()&&e.styles.hasOwnProperty(n)||(r[n]=t.styles[n])})),{setStyles:n,removeStyles:r}})(e.newElement,e.oldElement);for(let r in n)e.newElement.elm.style.removeProperty(r);for(let r in t)e.newElement.elm.style.setProperty(r,t[r])}else if("marks"==e.update){const{setMarks:t,removeMarks:n}=((e,t)=>{const n={},r={};return e.hasMarks()&&Object.keys(e.marks).forEach((r=>{t.hasMarks()&&t.marks.hasOwnProperty(r)&&t.marks[r]===e.marks[r]||(n[r]=e.marks[r])})),t.hasMarks()&&Object.keys(t.marks).forEach((n=>{e.hasMarks()&&e.marks.hasOwnProperty(n)||(r[n]=t.marks[n])})),{setMarks:n,removeMarks:r}})(e.newElement,e.oldElement);for(let r in n)e.newElement.elm.removeAttribute(r);for(let r in t)/(^on)|(^style$)|(^face$)/g.test(r)||e.newElement.elm.setAttribute(r,t[r])}}else if("replace"==e.type){e.newElement.__render();(e.oldElement.parent?e.oldElement.parent.elm:this.$el).insertBefore(e.newElement.elm,e.oldElement.elm),e.oldElement.elm.remove()}else if("move"==e.type){const t=this.getPreviousElement(e.newElement),n=e.newElement.parent?e.newElement.parent.elm:this.$el;t?t.elm.nextElementSibling?n.insertBefore(e.newElement.elm,t.elm.nextElementSibling):n.appendChild(e.newElement.elm):n.firstElementChild?n.insertBefore(e.newElement.elm,n.firstElementChild):n.appendChild(e.newElement.elm)}}));const r=this.value;this.value=this.$el.innerHTML,this.__oldStack=this.stack.map((e=>e.__fullClone())),(t||r!=this.value)&&(t||this.emit("change",this.value,r),e||this.history.setState(this.stack,this.range)),this.emit("afterRender")}rangeRender(){return new Promise((e=>{if(this.disabled)return e();const t=window.getSelection();if(!t)return e();if(this.range){const e=e=>{let t=null,n=null;if(e.element.isText())t=e.element.elm.childNodes[0],n=e.offset;else{t=e.element.parent.elm;const r=e.element.parent.children.findIndex((t=>e.element.isEqual(t)));n=e.offset+r}return{node:t,offset:n}};this.__innerSelectionChange=!0;const n=e(this.range.anchor),r=e(this.range.focus),a=document.createRange();a.setStart(n.node,n.offset),a.setEnd(r.node,r.offset),t.removeAllRanges(),t.addRange(a)}else t.removeAllRanges();setTimeout((()=>{q.apply(this),this.__innerSelectionChange=!1,this.history.updateRange(this.range),this.emit("rangeUpdate",this.range),e()}),0)}))}parseHtml(e){e||(e="<p><br/></p>");const t=document.createElement("template");t.innerHTML=e;let n=[];return t.content.childNodes.forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);n.push(t)}})),n}parseNode(e){if(!(e instanceof Node))throw new Error("The argument must be an node");if(1!=e.nodeType&&3!=e.nodeType)throw new Error("The argument must be an element node or text node");if(3==e.nodeType)return new y("text",null,null,null,e.textContent);const t=function(e){let t={};const n=e.attributes.length;for(let r=0;r<n;r++){const n=e.attributes[r];/(^on)|(^style$)|(^face$)/g.test(n.nodeName)||(t[n.nodeName]=n.nodeValue)}return t}(e),n=function(e){let t={};const n=e.getAttribute("style");if(n){let e=0,r=0,a=[];for(;e<n.length;)";"==n[e]&&"base64,"!=n.substring(e+1,e+8)&&(a.push(n.substring(r,e)),r=e+1),e==n.length-1&&r<e&&a.push(n.substring(r,e)),e++;a.forEach((e=>{const n=e.indexOf(":"),r=e.substring(0,n).trim(),a=e.substring(n+1).trim();t[r]=a}))}return t}(e),r=e.nodeName.toLocaleLowerCase(),a=e.namespaceURI;if(y.EMPTY_NODES.includes(r))return new y("text",null,null,null,null);if(r==y.TEXT_NODE&&e.childNodes.length&&Array.from(e.childNodes).every((e=>3==e.nodeType)))return new y("text",null,t,n,e.textContent);const o=E.find((e=>e.parsedom==r)),i=T.find((e=>e.parsedom==r)),l=_.find((e=>e.parsedom==r)),s=S.find((e=>e.parsedom==r));let d=null,u={type:"inline",parsedom:r,marks:t,styles:n,behavior:"default",namespace:a};if(o)u.type="block",o.parse&&(u.parsedom=y.BLOCK_NODE);else if(i)u.type="inblock",i.block&&(u.behavior="block");else if(l){if(u.type="inline",l.parse&&(u.parsedom=y.TEXT_NODE,c.isObject(l.parse))){const t=l.parse;for(let n in t)"function"==typeof t[n]?u.styles[n]=t[n].apply(this,[e]):u.styles[n]=t[n]}}else s?u.type="closed":this.extraKeepTags.includes(u.parsedom)||(u.type="inline",u.parsedom=y.TEXT_NODE,u.namespace=null);return d=new y(u.type,u.parsedom,u.marks,u.styles,null),d.behavior=u.behavior,d.namespace=u.namespace,s||Array.from(e.childNodes).forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);t.parent=d,d.hasChildren()?d.children.push(t):d.children=[t]}})),"function"==typeof this.customParseNode&&(d=this.customParseNode.apply(this,[d])),d}merge(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(!e.isBlock()&&!e.isInblock()||!t.isBlock()&&!t.isInblock())throw new Error('Elements that are not "block" or "inblock" cannot be merged');"function"==typeof this.customMerge?this.customMerge.apply(this,[e,t]):(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)}getElementByKey(e){if(!e)throw new Error("You need to specify a key to do the query");return b(e,this.stack)}getPreviousElement(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isBlock()){const t=this.stack.findIndex((t=>e.isEqual(t)));return t<=0?null:this.stack[t-1].isEmpty()?this.getPreviousElement(this.stack[t-1]):this.stack[t-1]}{const t=e.parent.children.findIndex((t=>e.isEqual(t)));return t<=0?null:e.parent.children[t-1].isEmpty()?this.getPreviousElement(e.parent.children[t-1]):e.parent.children[t-1]}}getNextElement(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isBlock()){const t=this.stack.findIndex((t=>e.isEqual(t)));return t>=this.stack.length-1?null:this.stack[t+1].isEmpty()?this.getNextElement(this.stack[t+1]):this.stack[t+1]}{const t=e.parent.children.findIndex((t=>e.isEqual(t)));return t>=e.parent.children.length-1?null:e.parent.children[t+1].isEmpty()?this.getNextElement(e.parent.children[t+1]):e.parent.children[t+1]}}getPreviousElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let n=null;for(let r=e.length-1;r>=0;r--){const a=e[r];if(!a.isEmpty()&&(a.isText()||!y.VOID_NODES.includes(a.parsedom))){if(a.isText()||a.isClosed()){n=a;break}if(n=t(a.children),n)break}}return n},n=e=>{const r=this.getPreviousElement(e);return r?r.isEmpty()||!r.isText()&&y.VOID_NODES.includes(r.parsedom)?n(r):r.isText()||r.isClosed()?r:t(r.children):e.parent?n(e.parent):null};return n(e.element)}getNextElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let n=null;const r=e.length;for(let a=0;a<r;a++){const r=e[a];if(!r.isEmpty()&&(r.isText()||!y.VOID_NODES.includes(r.parsedom))){if(r.isText()||r.isClosed()){n=r;break}if(n=t(r.children),n)break}}return n},n=e=>{const r=this.getNextElement(e);return r?r.isEmpty()||!r.isText()&&y.VOID_NODES.includes(r.parsedom)?n(r):r.isText()||r.isClosed()?r:t(r.children):e.parent?n(e.parent):null};return n(e.element)}getElementsByRange(){if(!this.range)return{list:[],flatList:[]};if(this.range.anchor.isEqual(this.range.focus))return{list:[],flatList:[]};if(this.range.anchor.element.isEqual(this.range.focus.element)){const e=0==this.range.anchor.offset,t=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),n={element:this.range.anchor.element,offset:(!e||!t)&&[this.range.anchor.offset,this.range.focus.offset]};return{list:[n],flatList:[n]}}const e=(()=>{let e=[];const t=0==this.range.anchor.offset,n=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),r=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock(),o=this.stack.findIndex((e=>r.isEqual(e))),i=this.stack.findIndex((e=>a.isEqual(e)));let l=y.flatElements(this.stack.slice(o,i+1));const s=function(e){let t=e.element;for(;t.parent&&e.element.isFirst(t.parent);)t=t.parent;return t}(this.range.anchor),c=l.findIndex((e=>e.isEqual(s||this.range.anchor.element))),d=l.findIndex((e=>e.isEqual(this.range.focus.element)));(c>0||d<l.length-1)&&(l=l.slice(c,d+1));const u=l.length;for(let m=0;m<u;m++)if(this.range.anchor.element.isEqual(l[m]))t?e.push({element:this.range.anchor.element,offset:!1}):this.range.anchor.element.isText()&&this.range.anchor.offset<this.range.anchor.element.textContent.length&&e.push({element:this.range.anchor.element,offset:[this.range.anchor.offset,this.range.anchor.element.textContent.length]});else if(l[m].isContains(this.range.anchor.element)){const r=this.range.anchor.element.isFirst(l[m]),a=l[m].isContains(this.range.focus.element),o=this.range.focus.element.isLast(l[m]);(t&&r&&a&&o&&n||t&&r&&!a)&&e.push({element:l[m],offset:!1})}else if(this.range.focus.element.isEqual(l[m]))n?e.push({element:this.range.focus.element,offset:!1}):this.range.focus.offset>0&&e.push({element:this.range.focus.element,offset:[0,this.range.focus.offset]});else if(l[m].isContains(this.range.focus.element)){this.range.focus.element.isLast(l[m])&&n&&e.push({element:l[m],offset:!1})}else e.push({element:l[m],offset:!1});return e})();return{list:(e=>{let t=[],n=[],r=[];const a=e.length;for(let o=0;o<a;o++)if(e[o].element.isBlock())t.push(e[o]),n.push(e[o].element);else{const a=e[o].element.getBlock();let i=!1;for(let e=n.length-1;e>=0;e--)if(n[e].isEqual(a)){i=!0;break}if(!i){r.some((t=>t.isContains(e[o].element)))||(t.push(e[o]),(e[o].element.isInblock()||e[o].element.isInline())&&r.push(e[o].element))}}return t})(e),flatList:e}}addElementTo(e,t,n=0){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if("number"!=typeof n||isNaN(n)||n<0)throw new Error("The third argument must be an integer not less than 0");t.hasChildren()?n>=t.children.length?t.children.push(e):t.children.splice(n,0,e):t.children=[e],e.parent=t}addElementBefore(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(t.isBlock()){const n=this.stack.findIndex((e=>t.isEqual(e)));this.stack.splice(n,0,e),e.parent=null}else{const n=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,n)}}addElementAfter(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(t.isBlock()){const n=this.stack.findIndex((e=>t.isEqual(e)));n>=this.stack.length-1?this.stack.push(e):this.stack.splice(n+1,0,e),e.parent=null}else{const n=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,n+1)}}collapseToStart(e){let t=!1;if(this.range||(this.initRange(),t=!0),y.isElement(e))this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e);else{const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)));if(0==e.length)throw new Error("There is no element to set the focus");this.range.anchor.moveToStart(e[0]),this.range.focus.moveToStart(e[0])}t&&this.history.updateRange(this.range)}collapseToEnd(e){let t=!1;if(this.range||(this.initRange(),t=!0),y.isElement(e))this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e);else{const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))),t=e.length;if(0==t)throw new Error("There is no element to set the focus");this.range.anchor.moveToEnd(e[t-1]),this.range.focus.moveToEnd(e[t-1])}t&&this.history.updateRange(this.range)}setDisabled(){this.disabled=!0,this.$el.removeAttribute("contenteditable")}setEnabled(){this.disabled=!1,this.$el.setAttribute("contenteditable","true")}undo(){const e=this.history.undo();e&&(this.stack=e.stack,this.range=e.range,this.domRender(!0),this.rangeRender())}redo(){const e=this.history.redo();e&&(this.stack=e.stack,this.range=e.range,this.domRender(!0),this.rangeRender())}emit(e,...t){return!!Array.isArray(this.__events[e])&&(this.__events[e].forEach((e=>{e.apply(this,[...t])})),!0)}on(e,t){this.__events[e]||(this.__events[e]=[]),this.__events[e].push(t)}off(e,t){if(this.__events[e])if(t){const n=this.__events[e].findIndex((e=>e===t));n>-1&&this.__events[e].splice(n,1)}else this.__events[e]=[]}destroy(){$.apply(this),this.setDisabled(),m.off(document,`selectionchange.alex_editor_${this.__guid}`),m.off(this.$el,"beforeinput.alex_editor compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor keydown.alex_editor cut.alex_editor paste.alex_editor copy.alex_editor dragstart.alex_editor drop.alex_editor focus.alex_editor blur.alex_editor")}}console.log("%c alex-editor %c v1.4.40 ","padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;","padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");const oe={formatNumber(e){return this.isNumber(e)?e.toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"):e},isNumber:e=>"number"==typeof e&&!isNaN(e),add:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let n=0,r=e.toString(),a=t.toString();try{n+=r.split(".")[1].length}catch(o){}try{n+=a.split(".")[1].length}catch(o){}return Number(r.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,n)})),divide:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=e.toString(),o=t.toString();try{n=a.split(".")[1].length}catch(i){}try{r=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,r-n)}))},ie={insert(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if("string"!=typeof t)throw new TypeError("The second argument must be a string");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,n)+t+e.substring(n,e.length)},delete(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!oe.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+n,e.length)},replace(e,t,n,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!oe.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof r)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+r+e.substring(n,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let n=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(n=n.replace(/\s/g,"")),n}},le={isWindow:e=>e&&e instanceof Window,getElementPoint(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(this.isElement(t)||(t=document.body),!this.isContains(t,e))throw new Error("The second argument and the first argument have no hierarchical relationship");let n=e,r=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)r+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:r,left:a,right:t.offsetWidth-a-n.offsetWidth,bottom:t.offsetHeight-r-n.offsetHeight}},isContains(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e===t||(e.contains?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t)))},isParentNode(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e!==t&&t.parentNode===e},children(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");return[...e.querySelectorAll(t||"*")].filter((t=>t.parentNode===e))},siblings(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!e.parentNode)return[];return[...e.parentNode.querySelectorAll(t||"*")].filter((t=>t.parentNode===e.parentNode&&t!=e))},rem2px(e){if(!oe.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return oe.mutiply(e,parseFloat(t))},px2rem(e){if(!oe.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return oe.divide(e,parseFloat(t))},width(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientWidth,n=parseFloat(this.getCssStyle(e,"padding-left")),r=parseFloat(this.getCssStyle(e,"padding-right"));return oe.subtract(t,n,r)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,n=parseFloat(this.getCssStyle(e,"padding-top")),r=parseFloat(this.getCssStyle(e,"padding-bottom"));return oe.subtract(t,n,r)},removeClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;ie.trim(t).split(/\s+/).forEach((e=>{n.remove(e)}))},addClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;ie.trim(t).split(/\s+/).forEach((e=>{n.add(e)}))},hasClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;return ie.trim(t).split(/\s+/).every((e=>n.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let n=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(n=e),"function"==typeof e&&(t=e);let r=!0;n.addEventListener("scroll",(()=>{if(this.getScrollTop(n)<=0){if(!r)return;"function"==typeof t&&(r=!1,t({state:"top",target:n}))}else{let e={state:"bottom",target:n},a=0;if(a=n==window?window.innerHeight:n.clientHeight,oe.add(this.getScrollTop(n),a)+1>=this.getScrollHeight(n)&&a!=this.getScrollHeight(n)){if(!r)return;"function"==typeof t&&(r=!1,t(e))}else r=!0}}))},getScrollWidth(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollWidth:0==document.documentElement.scrollWidth||0==document.body.scrollWidth?document.documentElement.scrollWidth||document.body.scrollWidth:document.documentElement.scrollWidth>document.body.scrollWidth?document.documentElement.scrollWidth:document.body.scrollWidth,t},getScrollHeight(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollHeight:0==document.documentElement.scrollHeight||0==document.body.scrollHeight?document.documentElement.scrollHeight||document.body.scrollHeight:document.documentElement.scrollHeight>document.body.scrollHeight?document.documentElement.scrollHeight:document.body.scrollHeight,t},setScrollTop(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,a=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollTop=document.body.scrollTop=r:n.scrollTop=r,e();else{let o=10,i=oe.divide(a,o),l=this.getScrollTop(n),s=oe.divide(oe.subtract(r,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollTop=document.body.scrollTop=l=oe.add(l,s):n.scrollTop=l=oe.add(l,s)):(clearInterval(c),e())}),o)}}))},getScrollTop(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollTop:0==document.documentElement.scrollTop||0==document.body.scrollTop?document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,t},getScrollLeft(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollLeft:0==document.documentElement.scrollLeft||0==document.body.scrollLeft?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,t},setScrollLeft(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,a=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=r:n.scrollLeft=r,e();else{let o=10,i=oe.divide(a,o),l=this.getScrollLeft(n),s=oe.divide(oe.subtract(r,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollLeft=document.body.scrollLeft=l=oe.add(l,s):n.scrollLeft=l=oe.add(l,s)):(clearInterval(c),e())}),o)}}))},getCssStyle(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n="";return n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],n},getCssSelector(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a selector string");if(/^#{1}/.test(e))return{type:"id",value:e.substr(1)};if(/^\./.test(e))return{type:"class",value:e.substr(1)};if(/^\[(.+)\]$/.test(e)){let t="attribute",n="",r=ie.trim(e,!0).substring(1,ie.trim(e,!0).length-1).split("=");return 1==r.length&&(n=r[0]),2==r.length&&(n={attributeName:r[0],attributeValue:r[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:n}}return{type:"tag",value:e}},getElementBounding(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.getBoundingClientRect();return{top:t.top,bottom:oe.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:oe.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");const t=document.createElement("template");return t.innerHTML=e,1==t.content.children.length?t.content.children[0]:Array.from(t.content.children)}},se="_dap-datas",ce={remove(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[se]||{};null==t||""===t?e[se]={}:(delete n[t],e[se]=n)},has(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");return(e[se]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[se]||{};return null==t||""===t?n:n[t]},set(e,t,n){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let r=e[se]||{};r[t]=n,e[se]=r}},de={matchingText(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=null;if("Chinese"==t&&(n=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(n=/[\u4e00-\u9fa5]/),"email"==t&&(n=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(n=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(n=/^\d+$/),"int-"==t&&(n=/^-\d+$/),"int"==t&&(n=/^-?\d+$/),"pos"==t&&(n=/^\d*\.?\d+$/),"neg"==t&&(n=/^-\d*\.?\d+$/),"number"==t&&(n=/^-?\d*\.?\d+$/),"phone"==t&&(n=/^1[0-9]\d{9}$/),"idCard"==t&&(n=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/),"url"==t&&(n=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/),"hex"==t&&(n=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(n=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/),"rgba"==t&&(n=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/),"QQ"==t&&(n=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(n=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!n)throw new Error("The second parameter is out of scope");return n.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1);if(!n){let e=window.location.hash.split("?");2==e.length&&(n=e[1])}let r=n.match(t);return r?decodeURIComponent(r[2]):null},isEmptyObject(e){return!!this.isObject(e)&&0==Object.keys(e).length},equal(e,t){if(typeof e!=typeof t)return!1;if(this.isObject(e)&&this.isObject(t)){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!=r.length)return!1;let a=n.length,o=!0;for(let i=0;i<a;i++){let r=n[i],a=e[r],l=t[r];if(!this.equal(a,l)){o=!1;break}}return o}return e===t},isObject:e=>!("object"!=typeof e||!e),copyText(e){if(!e||"string"!=typeof e)throw new TypeError("No text to copy is defined");if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(e)},clone(e){if(this.isObject(e)){if(Array.isArray(e))return e.map((e=>this.clone(e)));let t={};for(let n in e)t[n]=this.clone(e[n]);return t}return e}},ue=e=>{let t=e.split(/[\s]+/g),n=[];return t.forEach((e=>{let t=e.split("."),r={eventName:t[0]};t.length>1&&(r.guid=t[1]),n.push(r)})),n},me=(e,t,n)=>{let r=ce.get(e,"dap-defined-events")||{},a=Object.keys(r),o=a.length;for(let i=0;i<o;i++){let o=a[i];r[o].type==t&&(n?o==t+"."+n&&(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0):(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0))}r=(e=>{let t={};return Object.keys(e).forEach((n=>{e[n]&&(t[n]=e[n])})),t})(r),ce.set(e,"dap-defined-events",r)},he={on(e,t,n,r){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!n||"function"!=typeof n)throw new TypeError("The third argument must be a function");de.isObject(r)||(r={});ue(t).forEach((t=>{((e,t,n,r,a)=>{let o=ce.get(e,"dap-defined-events")||{};n||(n=ce.get(e,"dap-event-guid")||0,ce.set(e,"dap-event-guid",n+1)),o[n=t+"."+n]&&o[n].type==t&&e.removeEventListener(t,o[n].fn,o[n].options),e.addEventListener(t,r,a),o[n]={type:t,fn:r,options:a},ce.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,n.bind(e),r)}))},off(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=ce.get(e,"dap-defined-events");if(!n)return;if(!t){let t=Object.keys(n),r=t.length;for(let a=0;a<r;a++){let r=t[a];e.removeEventListener(n[r].type,n[r].fn,n[r].options)}return ce.remove(e,"dap-defined-events"),void ce.remove(e,"dap-event-guid")}ue(t).forEach((t=>{me(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=ce.get(e,"dap-defined-events");if(t)return t}},pe={rgb2hsv(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=0,n=0,r=0,a=e[0]>=255?255:e[0],o=e[1]>=255?255:e[1],i=e[2]>=255?255:e[2];a=a<=0?0:a,o=o<=0?0:o,i=i<=0?0:i;let l=Math.max(a,o,i),s=Math.min(a,o,i);return r=l/255,n=0===l?0:1-s/l,l===s?t=0:l===a&&o>=i?t=(o-i)/(l-s)*60+0:l===a&&o<i?t=(o-i)/(l-s)*60+360:l===o?t=(i-a)/(l-s)*60+120:l===i&&(t=(a-o)/(l-s)*60+240),[t,100*n,100*r]},hsv2rgb(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=e[0]>=360||e[0]<=0?0:e[0],n=e[1]>=100?100:e[1];n=n<=0?0:n;let r=e[2]>=100?100:e[2];r=r<=0?0:r,n/=100,r/=100;let a=0,o=0,i=0,l=parseInt(t/60%6+""),s=t/60-l,c=r*(1-n),d=r*(1-s*n),u=r*(1-(1-s)*n);switch(l){case 0:a=r,o=u,i=c;break;case 1:a=d,o=r,i=c;break;case 2:a=c,o=r,i=u;break;case 3:a=c,o=d,i=r;break;case 4:a=u,o=c,i=r;break;case 5:a=r,o=c,i=d}return a=parseInt(255*a+""),o=parseInt(255*o+""),i=parseInt(255*i+""),[a,o,i]},rgb2hex(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+e[2]).toString(16).slice(1)},hex2rgb(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=e.toLowerCase();if(!de.matchingText(t,"hex"))throw new TypeError("The argument must be a hexadecimal color value");if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}let n=[];for(let r=1;r<7;r+=2)n.push(parseInt("0x"+t.slice(r,r+2)));return n}},fe={getImageUrl(e){if(!(e&&e instanceof File))throw new TypeError("The argument must be a File object");return window.URL.createObjectURL(e)},dataFileToBase64:e=>new Promise(((t,n)=>{e&&e instanceof File||n(new TypeError("The argument must be a File object"));let r=new FileReader;r.readAsDataURL(e),r.onloadend=()=>{let e=r.result;t(e)}})),dataBase64toFile(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.split(","),r=n[0].match(/:(.*?);/)[1],a=atob(n[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:r})},compressImage(e,t){const n={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};de.isObject(t)&&(oe.isNumber(t.width)&&(n.width=t.width),oe.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(n.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(n.mimeType=t.mimeType),oe.isNumber(t.maxSize)&&(n.maxSize=t.maxSize),oe.isNumber(t.minSize)&&(n.minSize=t.minSize));const r=(e,t,a)=>{let o=e.toDataURL("image/"+n.mimeType,a),i=this.dataBase64toFile(o,t);if(n.maxSize>0&&i.size>1024*n.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const n=r(e,t,a);o=n.url,i=n.file,a=n.quality}return{file:i,url:o,quality:a}};return new Promise(((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>{let i=o.result,l=new Image;l.src=i,l.onload=()=>{if(n.minSize>0&&e.size<=1024*n.minSize)return void t({file:e,url:i,quality:1,width:l.width,height:l.height});let a=document.createElement("canvas"),o=a.getContext("2d");a.width=n.width||l.width,a.height=n.width?n.width/(l.width/l.height):l.height,o.drawImage(l,0,0,a.width,a.height);let s=e.name.lastIndexOf(".");const c=e.name.substring(0,s)+"."+n.mimeType;let d=r(a,c,n.quality);t({...d,width:a.width,height:a.height})},l.onerror=()=>{a(new Error("Failed to load image file"))}},o.onerror=()=>{a(new Error("Failed to load image file"))}}))}},ge={language:()=>window.navigator.browserLanguage||window.navigator.language,device(){const e=window.navigator.userAgent;return{PC:!e.match(/AppleWebKit.*Mobile.*/),Mobile:!!e.match(/AppleWebKit.*Mobile.*/),iPhone:e.includes("iPhone"),Phone:e.includes("Android")&&/(?:Mobile)/.test(e)||e.includes("iPhone")||/(?:Windows Phone)/.test(e),iPad:e.includes("iPad"),Tablet:e.includes("iPad")||e.includes("Android")&&!/(?:Mobile)/.test(e)||e.includes("Firefox")&&/(?:Tablet)/.test(e),WindowsPhone:/(?:Windows Phone)/.test(e)}},browser(){const e=window.navigator.userAgent;return{Edge:!!e.match(/Edg\/([\d.]+)/),weixin:e.includes("MicroMessenger"),QQ:e.includes("QQ"),QQBrowser:e.includes("MQQBrowser"),UC:e.includes("UCBrowser"),Chrome:e.includes("Chrome"),Firefox:e.includes("Firefox"),sougou:e.toLocaleLowerCase().includes("se 2.x")||e.toLocaleLowerCase().includes("metasr")||e.toLocaleLowerCase().includes("sogou"),Safari:e.includes("Safari")&&!e.includes("Chrome")}},browserKernel(){const e=window.navigator.userAgent;return e.includes("Presto")?"opera":e.includes("AppleWebKit")?"webkit":e.includes("Gecko")&&!e.includes("KHTML")?"gecko":""},os(){const e=window.navigator.userAgent;return{Windows:e.includes("Windows"),Windows_CPU:e.toLocaleLowerCase().includes("win64")||e.toLocaleLowerCase().includes("wow64")?"x64":e.toLocaleLowerCase().includes("win32")||e.toLocaleLowerCase().includes("wow32")?"x32":"",Windows_Version:e.includes("Windows NT 6.1")||e.includes("Windows 7")?"Win7":e.includes("Windows NT 6.3")||e.includes("Windows NT 6.2")||e.includes("Windows NT 8")?"Win8":e.includes("Windows NT 10")||e.includes("Windows NT 6.4")?"Win10":"",Mac:e.includes("Macintosh"),Mac_Version:function(){if(e.includes("Macintosh")){const t=e.match(/Mac OS X ([^\s]+)\)/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),ios_Version:function(){if(e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){const t=e.match(/CPU.+OS ([^\s]+) like Mac OS X/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),Android:e.includes("Android"),Android_Version:function(){const t=e.match(/Android ([^\s]+);/);return t&&t[1]?t[1].split(/_|\./).join("."):""}(),Linux:e.includes("Linux"),HarmonyOS:e.includes("HarmonyOS"),Ubuntu:e.includes("Ubuntu")}}};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ve(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],r=typeof n;"object"!==r&&"function"!==r||Object.isFrozen(n)||ve(n)})),e}class ye{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function we(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function xe(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const ke=e=>!!e.scope;class Ee{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=we(e)}openNode(e){if(!ke(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){ke(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Se=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Te{constructor(){this.rootNode=Se(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Se({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Te._collapse(e)})))}}class _e extends Te{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new Ee(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Ce(e){return e?"string"==typeof e?e:e.source:null}function Ne(e){return ze("(?=",e,")")}function Be(e){return ze("(?:",e,")*")}function Me(e){return ze("(?:",e,")?")}function ze(...e){return e.map((e=>Ce(e))).join("")}function Ae(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>Ce(e))).join("|")+")"}function Oe(e){return new RegExp(e.toString()+"|").exec("").length-1}const Ie=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Re(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=Ce(e),a="";for(;r.length>0;){const e=Ie.exec(r);if(!e){a+=r;break}a+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&n++)}return a})).map((e=>`(${e})`)).join(t)}const Le="[a-zA-Z]\\w*",De="[a-zA-Z_]\\w*",$e="\\b\\d+(\\.\\d+)?",je="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Pe="\\b(0b[01]+)",Fe={begin:"\\\\[\\s\\S]",relevance:0},qe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Fe]},He={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Fe]},Ve=function(e,t,n={}){const r=xe({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=Ae("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ze(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ue=Ve("//","$"),We=Ve("/\\*","\\*/"),Ke=Ve("#","$"),Ge={scope:"number",begin:$e,relevance:0},Ze={scope:"number",begin:je,relevance:0},Xe={scope:"number",begin:Pe,relevance:0},Ye={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Fe,{begin:/\[/,end:/\]/,relevance:0,contains:[Fe]}]},Qe={scope:"title",begin:Le,relevance:0},Je={scope:"title",begin:De,relevance:0},et={begin:"\\.\\s*"+De,relevance:0};var tt=Object.freeze({__proto__:null,APOS_STRING_MODE:qe,BACKSLASH_ESCAPE:Fe,BINARY_NUMBER_MODE:Xe,BINARY_NUMBER_RE:Pe,COMMENT:Ve,C_BLOCK_COMMENT_MODE:We,C_LINE_COMMENT_MODE:Ue,C_NUMBER_MODE:Ze,C_NUMBER_RE:je,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:Ke,IDENT_RE:Le,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:et,NUMBER_MODE:Ge,NUMBER_RE:$e,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:He,REGEXP_MODE:Ye,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ze(t,/.*\b/,e.binary,/\b.*/)),xe({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:Qe,UNDERSCORE_IDENT_RE:De,UNDERSCORE_TITLE_MODE:Je});function nt(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function rt(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function at(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=nt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function ot(e,t){Array.isArray(e.illegal)&&(e.illegal=Ae(...e.illegal))}function it(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function lt(e,t){void 0===e.relevance&&(e.relevance=1)}const st=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ze(n.beforeMatch,Ne(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ct=["of","and","for","in","not","or","if","then","parent","list","value"],dt="keyword";function ut(e,t,n=dt){const r=Object.create(null);return"string"==typeof e?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach((function(n){Object.assign(r,ut(e[n],t,n))})),r;function a(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,mt(n[0],n[1])]}))}}function mt(e,t){return t?Number(t):function(e){return ct.includes(e.toLowerCase())}(e)?0:1}const ht={},pt=e=>{console.error(e)},ft=(e,...t)=>{console.log(`WARN: ${e}`,...t)},gt=(e,t)=>{ht[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ht[`${e}/${t}`]=!0)},bt=new Error;function vt(e,t,{key:n}){let r=0;const a=e[n],o={},i={};for(let l=1;l<=t.length;l++)i[l+r]=a[l],o[l+r]=!0,r+=Oe(t[l-1]);e[n]=i,e[n]._emit=o,e[n]._multi=!0}function yt(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw pt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),bt;if("object"!=typeof e.beginScope||null===e.beginScope)throw pt("beginScope must be object"),bt;vt(e,e.begin,{key:"beginScope"}),e.begin=Re(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw pt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),bt;if("object"!=typeof e.endScope||null===e.endScope)throw pt("endScope must be object"),bt;vt(e,e.end,{key:"endScope"}),e.end=Re(e.end,{joinWith:""})}}(e)}function wt(e){function t(t,n){return new RegExp(Ce(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=Oe(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Re(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=xe(e.classNameAliases||{}),function n(a,o){const i=a;if(a.isCompiled)return i;[rt,it,yt,st].forEach((e=>e(a,o))),e.compilerExtensions.forEach((e=>e(a,o))),a.__beforeBegin=null,[at,ot,lt].forEach((e=>e(a,o))),a.isCompiled=!0;let l=null;return"object"==typeof a.keywords&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),l=a.keywords.$pattern,delete a.keywords.$pattern),l=l||/\w+/,a.keywords&&(a.keywords=ut(a.keywords,e.case_insensitive)),i.keywordPatternRe=t(l,!0),o&&(a.begin||(a.begin=/\B|\b/),i.beginRe=t(i.begin),a.end||a.endsWithParent||(a.end=/\B|\b/),a.end&&(i.endRe=t(i.end)),i.terminatorEnd=Ce(i.end)||"",a.endsWithParent&&o.terminatorEnd&&(i.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(i.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return xe(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(xt(e))return xe(e,{starts:e.starts?xe(e.starts):null});if(Object.isFrozen(e))return xe(e);return e}("self"===e?a:e)}))),a.contains.forEach((function(e){n(e,i)})),a.starts&&n(a.starts,o),i.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(i),i}(e)}function xt(e){return!!e&&(e.endsWithParent||xt(e.starts))}class kt extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const Et=we,St=xe,Tt=Symbol("nomatch"),_t=function(e){const t=Object.create(null),n=Object.create(null),r=[];let a=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:_e};function s(e){return l.noHighlightRe.test(e)}function c(e,t,n){let r="",a="";"object"==typeof t?(r=e,n=t.ignoreIllegals,a=t.language):(gt("10.7.0","highlight(lang, code, ...args) has been deprecated."),gt("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,r=t),void 0===n&&(n=!0);const o={code:r,language:a};v("before:highlight",o);const i=o.result?o.result:d(o.language,o.code,n);return i.code=o.code,v("after:highlight",i),i}function d(e,n,r,i){const s=Object.create(null);function c(){if(!T.keywords)return void C.addText(N);let e=0;T.keywordPatternRe.lastIndex=0;let t=T.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const a=k.case_insensitive?t[0].toLowerCase():t[0],o=(r=a,T.keywords[r]);if(o){const[e,r]=o;if(C.addText(n),n="",s[a]=(s[a]||0)+1,s[a]<=7&&(B+=r),e.startsWith("_"))n+=t[0];else{const n=k.classNameAliases[e]||e;h(t[0],n)}}else n+=t[0];e=T.keywordPatternRe.lastIndex,t=T.keywordPatternRe.exec(N)}var r;n+=N.substring(e),C.addText(n)}function m(){null!=T.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof T.subLanguage){if(!t[T.subLanguage])return void C.addText(N);e=d(T.subLanguage,N,!0,_[T.subLanguage]),_[T.subLanguage]=e._top}else e=u(N,T.subLanguage.length?T.subLanguage:null);T.relevance>0&&(B+=e.relevance),C.__addSublanguage(e._emitter,e.language)}():c(),N=""}function h(e,t){""!==e&&(C.startScope(t),C.addText(e),C.endScope())}function p(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=k.classNameAliases[e[n]]||e[n],a=t[n];r?h(a,r):(N=a,c(),N=""),n++}}function g(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(k.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(h(N,k.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(p(e.beginScope,t),N="")),T=Object.create(e,{parent:{value:T}}),T}function b(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new ye(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return b(e.parent,t,n)}function v(e){return 0===T.matcher.regexIndex?(N+=e[0],1):(A=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),a=b(T,e,r);if(!a)return Tt;const o=T;T.endScope&&T.endScope._wrap?(m(),h(t,T.endScope._wrap)):T.endScope&&T.endScope._multi?(m(),p(T.endScope,e)):o.skip?N+=t:(o.returnEnd||o.excludeEnd||(N+=t),m(),o.excludeEnd&&(N=t));do{T.scope&&C.closeNode(),T.skip||T.subLanguage||(B+=T.relevance),T=T.parent}while(T!==a.parent);return a.starts&&g(a.starts,e),o.returnEnd?0:t.length}let w={};function x(t,o){const i=o&&o[0];if(N+=t,null==i)return m(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===i){if(N+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new ye(n),a=[n.__beforeBegin,n["on:begin"]];for(const o of a)if(o&&(o(e,r),r.isMatchIgnored))return v(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),m(),n.returnBegin||n.excludeBegin||(N=t)),g(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(T.scope||"<unnamed>")+'"');throw e.mode=T,e}if("end"===o.type){const e=y(o);if(e!==Tt)return e}if("illegal"===o.type&&""===i)return 1;if(z>1e5&&z>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return N+=i,i.length}const k=f(e);if(!k)throw pt(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=wt(k);let S="",T=i||E;const _={},C=new l.__emitter(l);!function(){const e=[];for(let t=T;t!==k;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let N="",B=0,M=0,z=0,A=!1;try{if(k.__emitTokens)k.__emitTokens(n,C);else{for(T.matcher.considerAll();;){z++,A?A=!1:T.matcher.considerAll(),T.matcher.lastIndex=M;const e=T.matcher.exec(n);if(!e)break;const t=x(n.substring(M,e.index),e);M=e.index+t}x(n.substring(M))}return C.finalize(),S=C.toHTML(),{language:e,value:S,relevance:B,illegal:!1,_emitter:C,_top:T}}catch(O){if(O.message&&O.message.includes("Illegal"))return{language:e,value:Et(n),illegal:!0,relevance:0,_illegalBy:{message:O.message,index:M,context:n.slice(M-100,M+100),mode:O.mode,resultSoFar:S},_emitter:C};if(a)return{language:e,value:Et(n),illegal:!1,relevance:0,errorRaised:O,_emitter:C,_top:T};throw O}}function u(e,n){n=n||l.languages||Object.keys(t);const r=function(e){const t={value:Et(e),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}(e),a=n.filter(f).filter(b).map((t=>d(t,e,!1)));a.unshift(r);const o=a.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[s,c]=o,u=s;return u.secondBest=c,u}function m(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=l.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(ft(o.replace("{}",n[1])),ft("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>s(e)||f(e)))}(e);if(s(r))return;if(v("before:highlightElement",{el:e,language:r}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),l.throwUnescapedHTML)){throw new kt("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const a=t.textContent,i=r?c(a,{language:r,ignoreIllegals:!0}):u(a);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,r){const a=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${a}`)}(e,r,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),v("after:highlightElement",{el:e,result:i,text:a})}let h=!1;function p(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(l.cssSelector).forEach(m)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:m,highlightBlock:function(e){return gt("10.7.0","highlightBlock will be removed entirely in v12.0"),gt("10.7.0","Please use highlightElement now."),m(e)},configure:function(e){l=St(l,e)},initHighlighting:()=>{p(),gt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),gt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(l){if(pt("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw l;pt(l),o=i}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:St,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},removePlugin:function(e){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.10.0",e.regex={concat:ze,lookahead:Ne,either:Ae,optional:Me,anyNumberOfTimes:Be};for(const y in tt)"object"==typeof tt[y]&&ve(tt[y]);return Object.assign(e,tt),e},Ct=_t({});Ct.newInstance=()=>_t({});var Nt=Ct;Ct.HighlightJS=Ct,Ct.default=Ct;const Bt=be(Nt);const Mt="[A-Za-z$_][0-9A-Za-z$_]*",zt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],At=["true","false","null","undefined","NaN","Infinity"],Ot=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],It=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Rt=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dt=[].concat(Rt,Ot,It);var $t="[0-9](_*[0-9])*",jt=`\\.(${$t})`,Pt="[0-9a-fA-F](_*[0-9a-fA-F])*",Ft={className:"number",variants:[{begin:`(\\b(${$t})((${jt})|\\.)?|(${jt}))[eE][+-]?(${$t})[fFdD]?\\b`},{begin:`\\b(${$t})((${jt})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jt})[fFdD]?\\b`},{begin:`\\b(${$t})[fFdD]\\b`},{begin:`\\b0[xX]((${Pt})\\.?|(${Pt})?\\.(${Pt}))[pP][+-]?(${$t})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Pt})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function qt(e,t,n){return-1===n?"":e.replace(t,(r=>qt(e,t,n-1)))}const Ht="[A-Za-z$_][0-9A-Za-z$_]*",Vt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Ut=["true","false","null","undefined","NaN","Infinity"],Wt=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Kt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Gt=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Zt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Xt=[].concat(Gt,Wt,Kt);const Yt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Qt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Jt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),en=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),tn=["accent-color","align-content","align-items","align-self","alignment-baseline","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-end-end-radius","border-end-start-radius","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","cx","cy","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","empty-cells","enable-background","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","flood-color","flood-opacity","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","kerning","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","marker","marker-end","marker-mid","marker-start","mask","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","speak","speak-as","src","tab-size","table-layout","text-anchor","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-offset","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","vector-effect","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index"].sort().reverse();const nn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],rn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),an=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),on=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ln=["accent-color","align-content","align-items","align-self","alignment-baseline","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-end-end-radius","border-end-start-radius","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","cx","cy","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","empty-cells","enable-background","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","flood-color","flood-opacity","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","kerning","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","marker","marker-end","marker-mid","marker-start","mask","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","speak","speak-as","src","tab-size","table-layout","text-anchor","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-offset","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","vector-effect","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index"].sort().reverse(),sn=an.concat(on).sort().reverse();const cn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video","defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],dn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),un=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),mn=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hn=["accent-color","align-content","align-items","align-self","alignment-baseline","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-end-end-radius","border-end-start-radius","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","cx","cy","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","empty-cells","enable-background","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","flood-color","flood-opacity","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","kerning","justify-content","justify-items","justify-self","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","marker","marker-end","marker-mid","marker-start","mask","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","scale","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","speak","speak-as","src","tab-size","table-layout","text-anchor","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-offset","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","vector-effect","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index"].sort().reverse();function pn(e){return e?"string"==typeof e?e:e.source:null}function fn(e){return gn("(?=",e,")")}function gn(...e){return e.map((e=>pn(e))).join("")}function bn(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>pn(e))).join("|")+")"}const vn=e=>gn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),yn=["Protocol","Type"].map(vn),wn=["init","self"].map(vn),xn=["Any","Self"],kn=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],En=["false","nil","true"],Sn=["assignment","associativity","higherThan","left","lowerThan","none","right"],Tn=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],_n=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Cn=bn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Nn=bn(Cn,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Bn=gn(Cn,Nn,"*"),Mn=bn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),zn=bn(Mn,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),An=gn(Mn,zn,"*"),On=gn(/[A-Z]/,zn,"*"),In=["attached","autoclosure",gn(/convention\(/,bn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gn(/objc\(/,An,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Rn=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var Ln="[0-9](_*[0-9])*",Dn=`\\.(${Ln})`,$n="[0-9a-fA-F](_*[0-9a-fA-F])*",jn={className:"number",variants:[{begin:`(\\b(${Ln})((${Dn})|\\.)?|(${Dn}))[eE][+-]?(${Ln})[fFdD]?\\b`},{begin:`\\b(${Ln})((${Dn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Dn})[fFdD]?\\b`},{begin:`\\b(${Ln})[fFdD]\\b`},{begin:`\\b0[xX]((${$n})\\.?|(${$n})?\\.(${$n}))[pP][+-]?(${Ln})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${$n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};Bt.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),Bt.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),Bt.registerLanguage("javascript",(function(e){const t=e.regex,n=Mt,r="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let a;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Mt,keyword:zt,literal:At,built_in:Dt,"variable.language":Lt},l="[0-9](_?[0-9])*",s=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${s})|\\.)?|(${s}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${s})\\b|\\.)?|(${s})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:i,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,{match:/\$\d+/},d];u.contains=b.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(b)});const v=[].concat(g,u.contains),y=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:i,contains:["self"].concat(v)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},k={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ot,...It]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Rt,"super","import"].map((e=>`${e}\\s*\\(`)),t.concat("(?!",T.join("|"),")")),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0};var T;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:k},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,g,{match:/\$\d+/},d,k,{className:"attr",begin:n+t.lookahead(":"),relevance:0},B,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:a},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}})),Bt.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+qt("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,Ft,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},Ft,o]}})),Bt.registerLanguage("typescript",(function(e){const t=function(e){const t=e.regex,n=Ht,r="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let a;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Ht,keyword:Vt,literal:Ut,built_in:Xt,"variable.language":Zt},l="[0-9](_?[0-9])*",s=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${s})|\\.)?|(${s}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${s})\\b|\\.)?|(${s})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:i,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},p={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,{match:/\$\d+/},d];u.contains=b.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(b)});const v=[].concat(g,u.contains),y=v.concat([{begin:/(\s*)\(/,end:/\)/,keywords:i,contains:["self"].concat(v)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},k={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Wt,...Kt]}},E={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Gt,"super","import"].map((e=>`${e}\\s*\\(`)),t.concat("(?!",T.join("|"),")")),n,t.lookahead(/\s*\(/)),className:"title.function",relevance:0};var T;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:k},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,g,{match:/\$\d+/},d,k,{className:"attr",begin:n+t.lookahead(":"),relevance:0},B,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:a},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},E,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}}(e),n=Ht,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},i={$pattern:Ht,keyword:Vt.concat(["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"]),literal:Ut,built_in:Xt.concat(r),"variable.language":Zt},l={className:"meta",begin:"@"+n},s=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};Object.assign(t.keywords,i),t.exports.PARAMS_CONTAINS.push(l);const c=t.contains.find((e=>"attr"===e.className));return t.exports.PARAMS_CONTAINS.push([t.exports.CLASS_REFERENCE,c]),t.contains=t.contains.concat([l,a,o]),s(t,"shebang",e.SHEBANG()),s(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),t.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t})),Bt.registerLanguage("python",(function(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",o,m,s,e.HASH_COMMENT_MODE]}]};return i.contains=[s,m,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[o,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},s,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,p,s]}]}})),Bt.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},i={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),s="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(i)}),l,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(i),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},u=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],p={keyword:m,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(u),built_in:h},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(s,"+"),t.concat("(?!",f(h).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(r,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:p,contains:[y,o,v,e.C_BLOCK_COMMENT_MODE,c,d,g]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(m).join("\\b|"),"|",f(h).join("\\b|"),"\\b)"),r,t.concat(s,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const k=[y,v,e.C_BLOCK_COMMENT_MODE,c,d,g];return{case_insensitive:!1,keywords:p,contains:[{begin:t.concat(/#\[\s*/,a),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:u,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:u,keyword:["new","array"]},contains:["self",...k]},...k,{scope:"meta",match:a}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,x,v,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:p,contains:["self",o,v,e.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,d]}})),Bt.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Jt.join("|")+")"},{begin:":(:)?("+en.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+tn.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Qt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Yt.join("|")+")\\b"}]}})),Bt.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=sn,r="[\\w-]+",a="("+r+"|@\\{"+r+"\\})",o=[],i=[],l=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:rn.join(" ")},d={begin:"\\(",end:"\\)",contains:i,keywords:c,relevance:0};i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,s("variable","@@?"+r,10),s("variable","@\\{"+r+"\\}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=i.concat({begin:/\{/,end:/\}/,contains:o}),m={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},h={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ln.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:i}}]},p={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:i,relevance:0}},f={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:u}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,s("keyword","all\\b"),s("variable","@\\{"+r+"\\}"),{begin:"\\b("+nn.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,s("selector-tag",a,0),s("selector-id","#"+a),s("selector-class","\\."+a,0),s("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+an.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+on.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:r+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,f,b,h,g,m,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),Bt.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=mn,r=un,a="@[a-z-]+",o={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+cn.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hn.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:dn.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),Bt.registerLanguage("html",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),i=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),s={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,i,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,l,i]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),Bt.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},a={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(r,{contains:[]}),i=e.inherit(a,{contains:[]});r.contains.push(i),a.contains.push(o);let l=[t,n];return[r,a,o,i].forEach((e=>{e.contains=e.contains.concat(l)})),l=l.concat(r,a),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:l},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:l}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,a,{className:"quote",begin:"^>\\s+",contains:l,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}})),Bt.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),Bt.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,bn(...yn,...wn)],className:{2:"keyword"}},o={match:gn(/\./,bn(...kn)),relevance:0},i=kn.filter((e=>"string"==typeof e)).concat(["_|0"]),l={variants:[{className:"keyword",match:bn(...kn.filter((e=>"string"!=typeof e)).concat(xn).map(vn),...wn)}]},s={$pattern:bn(/\b\w+/,/#\w+/),keyword:i.concat(Tn),literal:En},c=[a,o,l],d=[{match:gn(/\./,bn(..._n)),relevance:0},{className:"built_in",match:gn(/\b/,bn(..._n),/(?=\()/)}],u={match:/->/,relevance:0},m=[u,{className:"operator",relevance:0,variants:[{match:Bn},{match:`\\.(\\.|${Nn})+`}]}],h="([0-9]_*)+",p="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${p})(\\.(${p}))?([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:gn(/\\/,e,/[0\\tnr"']/)},{match:gn(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:gn(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:gn(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:gn(e,/"""/),end:gn(/"""/,e),contains:[g(e),b(e),v(e)]}),w=(e="")=>({begin:gn(e,/"/),end:gn(/"/,e),contains:[g(e),v(e)]}),x={className:"string",variants:[y(),y("#"),y("##"),y("###"),w(),w("#"),w("##"),w("###")]},k=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],E={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:k},S=e=>{const t=gn(e,/\//),n=gn(/\//,e);return{begin:t,end:n,contains:[...k,{scope:"comment",begin:`#(?!.*${n})`,end:/$/}]}},T={scope:"regexp",variants:[S("###"),S("##"),S("#"),E]},_={match:gn(/`/,An,/`/)},C=[_,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${zn}+`}],N=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Rn,contains:[...m,f,x]}]}},{scope:"keyword",match:gn(/@/,bn(...In),fn(bn(/\(/,/\s+/)))},{scope:"meta",match:gn(/@/,An)}],B={match:fn(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,zn,"+")},{className:"type",match:On,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gn(/\s+&\s+/,fn(On)),relevance:0}]},M={begin:/</,end:/>/,keywords:s,contains:[...r,...c,...N,u,B]};B.contains.push(M);const z={begin:/\(/,end:/\)/,relevance:0,keywords:s,contains:["self",{match:gn(An,/\s*:/),keywords:"_|0",relevance:0},...r,T,...c,...d,...m,f,x,...C,...N,B]},A={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,B]},O={begin:/\(/,end:/\)/,keywords:s,contains:[{begin:bn(fn(gn(An,/\s*:/)),fn(gn(An,/\s+/,An,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:An}]},...r,...c,...m,f,x,...N,B,z],endsParent:!0,illegal:/["']/},I={match:[/(func|macro)/,/\s+/,bn(_.match,An,Bn)],className:{1:"keyword",3:"title.function"},contains:[A,O,t],illegal:[/\[/,/%/]},R={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[A,O,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,Bn],className:{1:"keyword",3:"title"}},D={begin:[/precedencegroup/,/\s+/,On],className:{1:"keyword",3:"title"},contains:[B],keywords:[...Sn,...En],end:/}/},$={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,An,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:s,contains:[A,...c,{begin:/:/,end:/\{/,keywords:s,contains:[{scope:"title.class.inherited",match:On},...c],relevance:0}]};for(const j of x.variants){const e=j.contains.find((e=>"interpol"===e.label));e.keywords=s;const t=[...c,...d,...m,f,x,...C];e.contains=[...t,{begin:/\(/,end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:s,contains:[...r,I,R,$,L,D,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},T,...c,...d,...m,f,x,...C,...N,B,z]}})),Bt.registerLanguage("dart",(function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];const a=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],o=a.map((e=>`${e}?`));return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:a.concat(o).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[r,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}})),Bt.registerLanguage("nginx",(function(e){const t=e.regex,n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},r={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:r.contains,keywords:{section:"upstream location"}},{className:"section",begin:t.concat(e.UNDERSCORE_IDENT_RE+t.lookahead(/\s+\{/)),relevance:0},{begin:t.lookahead(e.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:r}],relevance:0}],illegal:"[^\\s\\}\\{]"}})),Bt.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),Bt.registerLanguage("http",(function(e){const t="HTTP/([32]|1\\.[01])",n={className:"attribute",begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},r=[n,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+t+" \\d{3})",end:/$/,contains:[{className:"meta",begin:t},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},{begin:"(?=^[A-Z]+ (.*?) "+t+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:t},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},e.inherit(n,{relevance:0})]}})),Bt.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},i={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},s=[e.COMMENT("#","$",{contains:[i]}),e.COMMENT("^=begin","^=end",{contains:[i],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},u="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${u}))?([eE][+-]?(${u})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},p=[d,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:o},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,s),relevance:0}].concat(l,s);c.contains=p,h.contains=p;const f=[{begin:/^\s*=>/,starts:{end:"$",contains:p}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:p}}];return s.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(f).concat(s).concat(p)}})),Bt.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},u=t.optional(a)+e.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,i,n,e.C_BLOCK_COMMENT_MODE,s,l],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:h.concat([{begin:/\(/,end:/\)/,keywords:m,contains:h.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(p,f,h,[c,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:l,keywords:m}}})),Bt.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},u=t.optional(a)+e.IDENT_RE+"\\s*\\(",m={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},p=[h,c,i,n,e.C_BLOCK_COMMENT_MODE,s,l],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:p.concat([{begin:/\(/,end:/\)/,keywords:m,contains:p.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:u,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,s]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,p,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:m,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:m},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),Bt.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},a={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(a,{illegal:/\n/}),i={className:"subst",begin:/\{/,end:/\}/,keywords:t},l=e.inherit(i,{illegal:/\n/}),s={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,l]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},i]},d=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]});i.contains=[c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],l.contains=[d,s,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[{className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",p={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},u,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,m],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},p]}})),Bt.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],i=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],l=o,s=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...l),/\s*\(/),relevance:0,keywords:{built_in:l}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(s,{when:e=>e.length<3}),literal:r,type:a,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...i),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:s.concat(i),literal:r,type:a}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),Bt.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),Bt.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),Bt.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,r]}]};r.contains.push(o);const i={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},s=jn,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},u=d;return u.variants[1].contains=[d],d.variants[1].contains=[u],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,i,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,i,l,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},i,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},s]}})),Bt.registerLanguage("rust",(function(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),a=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,a,t.lookahead(/\s*\(/))},i="([ui](8|16|32|64|128|size)|f(32|64))?",l=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],s=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:s,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:l},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+i},{begin:"\\b0o([0-7_]+)"+i},{begin:"\\b0x([A-Fa-f0-9_]+)"+i},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+i}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:l,type:s}},{className:"punctuation",begin:"->"},o]}}));const Pn=[{label:"Plain Text",value:"plaintext"},{label:"JSON",value:"json"},{label:"JavaScript",value:"javascript"},{label:"Java",value:"java"},{label:"TypeScript",value:"typescript"},{label:"Python",value:"python"},{label:"PHP",value:"php"},{label:"CSS",value:"css"},{label:"Less",value:"less"},{label:"Scss",value:"scss"},{label:"HTML",value:"html"},{label:"Markdown",value:"markdown"},{label:"Objective-C",value:"objectivec"},{label:"Swift",value:"swift"},{label:"Dart",value:"dart"},{label:"Nginx",value:"nginx"},{label:"HTTP",value:"http"},{label:"Go",value:"go"},{label:"Ruby",value:"ruby"},{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"C#",value:"csharp"},{label:"SQL",value:"sql"},{label:"Shell",value:"shell"},{label:"R",value:"r"},{label:"Kotlin",value:"kotlin"},{label:"Rust",value:"rust"}];Bt.configure({cssSelector:"pre",classPrefix:"editify-hljs-",languages:Pn.map((e=>e.value)),ignoreUnescapedHTML:!0});class Fn{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new Fn(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class qn{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new qn(t,Fn.range(this,e))}}class Hn{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,a="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var i=o.lexer.input;n=o.start,r=o.end,n===i.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=i.slice(n,r).replace(/[^]/g,"$&̲");a+=(n>15?"…"+i.slice(n-15,n):i.slice(0,n))+l+(r+15<i.length?i.slice(r,r+15)+"…":i.slice(r))}var s=new Error(a);return s.name="ParseError",s.__proto__=Hn.prototype,s.position=n,null!=n&&null!=r&&(s.length=r-n),s.rawMessage=e,s}}Hn.prototype.__proto__=Error.prototype;var Vn=/([A-Z])/g,Un={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Wn=/[&><"']/g;var Kn=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Gn={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Wn,(e=>Un[e]))},hyphenate:function(e){return e.replace(Vn,"-$1").toLowerCase()},getBaseElem:Kn,isCharacterBox:function(e){var t=Kn(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Zn={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=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Xn(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Yn{constructor(e){for(var t in 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=e||{},Zn)if(Zn.hasOwnProperty(t)){var n=Zn[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Xn(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Hn("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(a){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Gn.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class Qn{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 Jn[er[this.id]]}sub(){return Jn[tr[this.id]]}fracNum(){return Jn[nr[this.id]]}fracDen(){return Jn[rr[this.id]]}cramp(){return Jn[ar[this.id]]}text(){return Jn[or[this.id]]}isTight(){return this.size>=2}}var Jn=[new Qn(0,0,!1),new Qn(1,0,!0),new Qn(2,1,!1),new Qn(3,1,!0),new Qn(4,2,!1),new Qn(5,2,!0),new Qn(6,3,!1),new Qn(7,3,!0)],er=[4,5,4,5,6,7,6,7],tr=[5,5,5,5,7,7,7,7],nr=[2,3,4,5,6,7,6,7],rr=[3,3,5,5,7,7,7,7],ar=[1,1,3,3,5,5,7,7],or=[0,1,2,3,2,3,2,3],ir={DISPLAY:Jn[0],TEXT:Jn[2],SCRIPT:Jn[4],SCRIPTSCRIPT:Jn[6]},lr=[{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]]}];var sr=[];function cr(e){for(var t=0;t<sr.length;t+=2)if(e>=sr[t]&&e<=sr[t+1])return!0;return!1}lr.forEach((e=>e.blocks.forEach((e=>sr.push(...e)))));var dr=80,ur={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class mr{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Gn.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var hr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},pr={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},fr={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function gr(e,t,n){if(!hr[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),a=hr[t][r];if(!a&&e[0]in fr&&(r=fr[e[0]].charCodeAt(0),a=hr[t][r]),a||"text"!==n||cr(r)&&(a=hr[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var br={};var vr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],wr=function(e,t){return t.size<2?e:vr[e-1][t.size-1]};class xr{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||xr.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=yr[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new xr(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:wr(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:yr[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=wr(xr.BASESIZE,e);return this.size===t&&this.textSize===xr.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==xr.BASESIZE?["sizing","reset-size"+this.size,"size"+xr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!br[t=e>=5?0:e>=3?1:2]){var n=br[t]={cssEmPerMu:pr.quad[t]/18};for(var r in pr)pr.hasOwnProperty(r)&&(n[r]=pr[r][t])}return br[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}xr.BASESIZE=6;var kr={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Er={ex:!0,em:!0,mu:!0},Sr=function(e){return"string"!=typeof e&&(e=e.unit),e in kr||e in Er||"ex"===e},Tr=function(e,t){var n;if(e.unit in kr)n=kr[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Hn("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},_r=function(e){return+e.toFixed(4)+"em"},Cr=function(e){return e.filter((e=>e)).join(" ")},Nr=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Br=function(e){var t=document.createElement(e);for(var n in t.className=Cr(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},Mr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Gn.escape(Cr(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Gn.hyphenate(r)+":"+this.style[r]+";");for(var a in n&&(t+=' style="'+Gn.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+Gn.escape(this.attributes[a])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class zr{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Nr.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Gn.contains(this.classes,e)}toNode(){return Br.call(this,"span")}toMarkup(){return Mr.call(this,"span")}}class Ar{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Nr.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Gn.contains(this.classes,e)}toNode(){return Br.call(this,"a")}toMarkup(){return Mr.call(this,"a")}}class Or{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Gn.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+Gn.escape(this.src)+'" alt="'+Gn.escape(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Gn.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Gn.escape(t)+'"'),e+="'/>"}}var Ir={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class Rr{constructor(e,t,n,r,a,o,i,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=a||0,this.width=o||0,this.classes=i||[],this.style=l||{},this.maxFontSize=0;var s=function(e){for(var t=0;t<lr.length;t++)for(var n=lr[t],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(e>=a[0]&&e<=a[1])return n.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ir[this.text])}hasClass(e){return Gn.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=_r(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Cr(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Gn.escape(Cr(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Gn.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Gn.escape(n)+'"');var a=Gn.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a}}class Lr{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Gn.escape(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class Dr{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",ur[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Gn.escape(this.alternate)+'"/>':'<path d="'+Gn.escape(ur[this.pathName])+'"/>'}}class $r{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Gn.escape(this.attributes[t])+'"');return e+="/>"}}function jr(e){if(e instanceof Rr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var Pr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Fr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},qr={math:{},text:{}};function Hr(e,t,n,r,a,o){qr[e][a]={font:t,group:n,replace:r},o&&r&&(qr[e][r]=qr[e][a])}var Vr="math",Ur="text",Wr="main",Kr="ams",Gr="accent-token",Zr="bin",Xr="close",Yr="inner",Qr="mathord",Jr="op-token",ea="open",ta="punct",na="rel",ra="spacing",aa="textord";Hr(Vr,Wr,na,"≡","\\equiv",!0),Hr(Vr,Wr,na,"≺","\\prec",!0),Hr(Vr,Wr,na,"≻","\\succ",!0),Hr(Vr,Wr,na,"∼","\\sim",!0),Hr(Vr,Wr,na,"⊥","\\perp"),Hr(Vr,Wr,na,"⪯","\\preceq",!0),Hr(Vr,Wr,na,"⪰","\\succeq",!0),Hr(Vr,Wr,na,"≃","\\simeq",!0),Hr(Vr,Wr,na,"∣","\\mid",!0),Hr(Vr,Wr,na,"≪","\\ll",!0),Hr(Vr,Wr,na,"≫","\\gg",!0),Hr(Vr,Wr,na,"≍","\\asymp",!0),Hr(Vr,Wr,na,"∥","\\parallel"),Hr(Vr,Wr,na,"⋈","\\bowtie",!0),Hr(Vr,Wr,na,"⌣","\\smile",!0),Hr(Vr,Wr,na,"⊑","\\sqsubseteq",!0),Hr(Vr,Wr,na,"⊒","\\sqsupseteq",!0),Hr(Vr,Wr,na,"≐","\\doteq",!0),Hr(Vr,Wr,na,"⌢","\\frown",!0),Hr(Vr,Wr,na,"∋","\\ni",!0),Hr(Vr,Wr,na,"∝","\\propto",!0),Hr(Vr,Wr,na,"⊢","\\vdash",!0),Hr(Vr,Wr,na,"⊣","\\dashv",!0),Hr(Vr,Wr,na,"∋","\\owns"),Hr(Vr,Wr,ta,".","\\ldotp"),Hr(Vr,Wr,ta,"⋅","\\cdotp"),Hr(Vr,Wr,aa,"#","\\#"),Hr(Ur,Wr,aa,"#","\\#"),Hr(Vr,Wr,aa,"&","\\&"),Hr(Ur,Wr,aa,"&","\\&"),Hr(Vr,Wr,aa,"ℵ","\\aleph",!0),Hr(Vr,Wr,aa,"∀","\\forall",!0),Hr(Vr,Wr,aa,"ℏ","\\hbar",!0),Hr(Vr,Wr,aa,"∃","\\exists",!0),Hr(Vr,Wr,aa,"∇","\\nabla",!0),Hr(Vr,Wr,aa,"♭","\\flat",!0),Hr(Vr,Wr,aa,"ℓ","\\ell",!0),Hr(Vr,Wr,aa,"♮","\\natural",!0),Hr(Vr,Wr,aa,"♣","\\clubsuit",!0),Hr(Vr,Wr,aa,"℘","\\wp",!0),Hr(Vr,Wr,aa,"♯","\\sharp",!0),Hr(Vr,Wr,aa,"♢","\\diamondsuit",!0),Hr(Vr,Wr,aa,"ℜ","\\Re",!0),Hr(Vr,Wr,aa,"♡","\\heartsuit",!0),Hr(Vr,Wr,aa,"ℑ","\\Im",!0),Hr(Vr,Wr,aa,"♠","\\spadesuit",!0),Hr(Vr,Wr,aa,"§","\\S",!0),Hr(Ur,Wr,aa,"§","\\S"),Hr(Vr,Wr,aa,"¶","\\P",!0),Hr(Ur,Wr,aa,"¶","\\P"),Hr(Vr,Wr,aa,"†","\\dag"),Hr(Ur,Wr,aa,"†","\\dag"),Hr(Ur,Wr,aa,"†","\\textdagger"),Hr(Vr,Wr,aa,"‡","\\ddag"),Hr(Ur,Wr,aa,"‡","\\ddag"),Hr(Ur,Wr,aa,"‡","\\textdaggerdbl"),Hr(Vr,Wr,Xr,"⎱","\\rmoustache",!0),Hr(Vr,Wr,ea,"⎰","\\lmoustache",!0),Hr(Vr,Wr,Xr,"⟯","\\rgroup",!0),Hr(Vr,Wr,ea,"⟮","\\lgroup",!0),Hr(Vr,Wr,Zr,"∓","\\mp",!0),Hr(Vr,Wr,Zr,"⊖","\\ominus",!0),Hr(Vr,Wr,Zr,"⊎","\\uplus",!0),Hr(Vr,Wr,Zr,"⊓","\\sqcap",!0),Hr(Vr,Wr,Zr,"∗","\\ast"),Hr(Vr,Wr,Zr,"⊔","\\sqcup",!0),Hr(Vr,Wr,Zr,"◯","\\bigcirc",!0),Hr(Vr,Wr,Zr,"∙","\\bullet",!0),Hr(Vr,Wr,Zr,"‡","\\ddagger"),Hr(Vr,Wr,Zr,"≀","\\wr",!0),Hr(Vr,Wr,Zr,"⨿","\\amalg"),Hr(Vr,Wr,Zr,"&","\\And"),Hr(Vr,Wr,na,"⟵","\\longleftarrow",!0),Hr(Vr,Wr,na,"⇐","\\Leftarrow",!0),Hr(Vr,Wr,na,"⟸","\\Longleftarrow",!0),Hr(Vr,Wr,na,"⟶","\\longrightarrow",!0),Hr(Vr,Wr,na,"⇒","\\Rightarrow",!0),Hr(Vr,Wr,na,"⟹","\\Longrightarrow",!0),Hr(Vr,Wr,na,"↔","\\leftrightarrow",!0),Hr(Vr,Wr,na,"⟷","\\longleftrightarrow",!0),Hr(Vr,Wr,na,"⇔","\\Leftrightarrow",!0),Hr(Vr,Wr,na,"⟺","\\Longleftrightarrow",!0),Hr(Vr,Wr,na,"↦","\\mapsto",!0),Hr(Vr,Wr,na,"⟼","\\longmapsto",!0),Hr(Vr,Wr,na,"↗","\\nearrow",!0),Hr(Vr,Wr,na,"↩","\\hookleftarrow",!0),Hr(Vr,Wr,na,"↪","\\hookrightarrow",!0),Hr(Vr,Wr,na,"↘","\\searrow",!0),Hr(Vr,Wr,na,"↼","\\leftharpoonup",!0),Hr(Vr,Wr,na,"⇀","\\rightharpoonup",!0),Hr(Vr,Wr,na,"↙","\\swarrow",!0),Hr(Vr,Wr,na,"↽","\\leftharpoondown",!0),Hr(Vr,Wr,na,"⇁","\\rightharpoondown",!0),Hr(Vr,Wr,na,"↖","\\nwarrow",!0),Hr(Vr,Wr,na,"⇌","\\rightleftharpoons",!0),Hr(Vr,Kr,na,"≮","\\nless",!0),Hr(Vr,Kr,na,"","\\@nleqslant"),Hr(Vr,Kr,na,"","\\@nleqq"),Hr(Vr,Kr,na,"⪇","\\lneq",!0),Hr(Vr,Kr,na,"≨","\\lneqq",!0),Hr(Vr,Kr,na,"","\\@lvertneqq"),Hr(Vr,Kr,na,"⋦","\\lnsim",!0),Hr(Vr,Kr,na,"⪉","\\lnapprox",!0),Hr(Vr,Kr,na,"⊀","\\nprec",!0),Hr(Vr,Kr,na,"⋠","\\npreceq",!0),Hr(Vr,Kr,na,"⋨","\\precnsim",!0),Hr(Vr,Kr,na,"⪹","\\precnapprox",!0),Hr(Vr,Kr,na,"≁","\\nsim",!0),Hr(Vr,Kr,na,"","\\@nshortmid"),Hr(Vr,Kr,na,"∤","\\nmid",!0),Hr(Vr,Kr,na,"⊬","\\nvdash",!0),Hr(Vr,Kr,na,"⊭","\\nvDash",!0),Hr(Vr,Kr,na,"⋪","\\ntriangleleft"),Hr(Vr,Kr,na,"⋬","\\ntrianglelefteq",!0),Hr(Vr,Kr,na,"⊊","\\subsetneq",!0),Hr(Vr,Kr,na,"","\\@varsubsetneq"),Hr(Vr,Kr,na,"⫋","\\subsetneqq",!0),Hr(Vr,Kr,na,"","\\@varsubsetneqq"),Hr(Vr,Kr,na,"≯","\\ngtr",!0),Hr(Vr,Kr,na,"","\\@ngeqslant"),Hr(Vr,Kr,na,"","\\@ngeqq"),Hr(Vr,Kr,na,"⪈","\\gneq",!0),Hr(Vr,Kr,na,"≩","\\gneqq",!0),Hr(Vr,Kr,na,"","\\@gvertneqq"),Hr(Vr,Kr,na,"⋧","\\gnsim",!0),Hr(Vr,Kr,na,"⪊","\\gnapprox",!0),Hr(Vr,Kr,na,"⊁","\\nsucc",!0),Hr(Vr,Kr,na,"⋡","\\nsucceq",!0),Hr(Vr,Kr,na,"⋩","\\succnsim",!0),Hr(Vr,Kr,na,"⪺","\\succnapprox",!0),Hr(Vr,Kr,na,"≆","\\ncong",!0),Hr(Vr,Kr,na,"","\\@nshortparallel"),Hr(Vr,Kr,na,"∦","\\nparallel",!0),Hr(Vr,Kr,na,"⊯","\\nVDash",!0),Hr(Vr,Kr,na,"⋫","\\ntriangleright"),Hr(Vr,Kr,na,"⋭","\\ntrianglerighteq",!0),Hr(Vr,Kr,na,"","\\@nsupseteqq"),Hr(Vr,Kr,na,"⊋","\\supsetneq",!0),Hr(Vr,Kr,na,"","\\@varsupsetneq"),Hr(Vr,Kr,na,"⫌","\\supsetneqq",!0),Hr(Vr,Kr,na,"","\\@varsupsetneqq"),Hr(Vr,Kr,na,"⊮","\\nVdash",!0),Hr(Vr,Kr,na,"⪵","\\precneqq",!0),Hr(Vr,Kr,na,"⪶","\\succneqq",!0),Hr(Vr,Kr,na,"","\\@nsubseteqq"),Hr(Vr,Kr,Zr,"⊴","\\unlhd"),Hr(Vr,Kr,Zr,"⊵","\\unrhd"),Hr(Vr,Kr,na,"↚","\\nleftarrow",!0),Hr(Vr,Kr,na,"↛","\\nrightarrow",!0),Hr(Vr,Kr,na,"⇍","\\nLeftarrow",!0),Hr(Vr,Kr,na,"⇏","\\nRightarrow",!0),Hr(Vr,Kr,na,"↮","\\nleftrightarrow",!0),Hr(Vr,Kr,na,"⇎","\\nLeftrightarrow",!0),Hr(Vr,Kr,na,"△","\\vartriangle"),Hr(Vr,Kr,aa,"ℏ","\\hslash"),Hr(Vr,Kr,aa,"▽","\\triangledown"),Hr(Vr,Kr,aa,"◊","\\lozenge"),Hr(Vr,Kr,aa,"Ⓢ","\\circledS"),Hr(Vr,Kr,aa,"®","\\circledR"),Hr(Ur,Kr,aa,"®","\\circledR"),Hr(Vr,Kr,aa,"∡","\\measuredangle",!0),Hr(Vr,Kr,aa,"∄","\\nexists"),Hr(Vr,Kr,aa,"℧","\\mho"),Hr(Vr,Kr,aa,"Ⅎ","\\Finv",!0),Hr(Vr,Kr,aa,"⅁","\\Game",!0),Hr(Vr,Kr,aa,"‵","\\backprime"),Hr(Vr,Kr,aa,"▲","\\blacktriangle"),Hr(Vr,Kr,aa,"▼","\\blacktriangledown"),Hr(Vr,Kr,aa,"■","\\blacksquare"),Hr(Vr,Kr,aa,"⧫","\\blacklozenge"),Hr(Vr,Kr,aa,"★","\\bigstar"),Hr(Vr,Kr,aa,"∢","\\sphericalangle",!0),Hr(Vr,Kr,aa,"∁","\\complement",!0),Hr(Vr,Kr,aa,"ð","\\eth",!0),Hr(Ur,Wr,aa,"ð","ð"),Hr(Vr,Kr,aa,"╱","\\diagup"),Hr(Vr,Kr,aa,"╲","\\diagdown"),Hr(Vr,Kr,aa,"□","\\square"),Hr(Vr,Kr,aa,"□","\\Box"),Hr(Vr,Kr,aa,"◊","\\Diamond"),Hr(Vr,Kr,aa,"¥","\\yen",!0),Hr(Ur,Kr,aa,"¥","\\yen",!0),Hr(Vr,Kr,aa,"✓","\\checkmark",!0),Hr(Ur,Kr,aa,"✓","\\checkmark"),Hr(Vr,Kr,aa,"ℶ","\\beth",!0),Hr(Vr,Kr,aa,"ℸ","\\daleth",!0),Hr(Vr,Kr,aa,"ℷ","\\gimel",!0),Hr(Vr,Kr,aa,"ϝ","\\digamma",!0),Hr(Vr,Kr,aa,"ϰ","\\varkappa"),Hr(Vr,Kr,ea,"┌","\\@ulcorner",!0),Hr(Vr,Kr,Xr,"┐","\\@urcorner",!0),Hr(Vr,Kr,ea,"└","\\@llcorner",!0),Hr(Vr,Kr,Xr,"┘","\\@lrcorner",!0),Hr(Vr,Kr,na,"≦","\\leqq",!0),Hr(Vr,Kr,na,"⩽","\\leqslant",!0),Hr(Vr,Kr,na,"⪕","\\eqslantless",!0),Hr(Vr,Kr,na,"≲","\\lesssim",!0),Hr(Vr,Kr,na,"⪅","\\lessapprox",!0),Hr(Vr,Kr,na,"≊","\\approxeq",!0),Hr(Vr,Kr,Zr,"⋖","\\lessdot"),Hr(Vr,Kr,na,"⋘","\\lll",!0),Hr(Vr,Kr,na,"≶","\\lessgtr",!0),Hr(Vr,Kr,na,"⋚","\\lesseqgtr",!0),Hr(Vr,Kr,na,"⪋","\\lesseqqgtr",!0),Hr(Vr,Kr,na,"≑","\\doteqdot"),Hr(Vr,Kr,na,"≓","\\risingdotseq",!0),Hr(Vr,Kr,na,"≒","\\fallingdotseq",!0),Hr(Vr,Kr,na,"∽","\\backsim",!0),Hr(Vr,Kr,na,"⋍","\\backsimeq",!0),Hr(Vr,Kr,na,"⫅","\\subseteqq",!0),Hr(Vr,Kr,na,"⋐","\\Subset",!0),Hr(Vr,Kr,na,"⊏","\\sqsubset",!0),Hr(Vr,Kr,na,"≼","\\preccurlyeq",!0),Hr(Vr,Kr,na,"⋞","\\curlyeqprec",!0),Hr(Vr,Kr,na,"≾","\\precsim",!0),Hr(Vr,Kr,na,"⪷","\\precapprox",!0),Hr(Vr,Kr,na,"⊲","\\vartriangleleft"),Hr(Vr,Kr,na,"⊴","\\trianglelefteq"),Hr(Vr,Kr,na,"⊨","\\vDash",!0),Hr(Vr,Kr,na,"⊪","\\Vvdash",!0),Hr(Vr,Kr,na,"⌣","\\smallsmile"),Hr(Vr,Kr,na,"⌢","\\smallfrown"),Hr(Vr,Kr,na,"≏","\\bumpeq",!0),Hr(Vr,Kr,na,"≎","\\Bumpeq",!0),Hr(Vr,Kr,na,"≧","\\geqq",!0),Hr(Vr,Kr,na,"⩾","\\geqslant",!0),Hr(Vr,Kr,na,"⪖","\\eqslantgtr",!0),Hr(Vr,Kr,na,"≳","\\gtrsim",!0),Hr(Vr,Kr,na,"⪆","\\gtrapprox",!0),Hr(Vr,Kr,Zr,"⋗","\\gtrdot"),Hr(Vr,Kr,na,"⋙","\\ggg",!0),Hr(Vr,Kr,na,"≷","\\gtrless",!0),Hr(Vr,Kr,na,"⋛","\\gtreqless",!0),Hr(Vr,Kr,na,"⪌","\\gtreqqless",!0),Hr(Vr,Kr,na,"≖","\\eqcirc",!0),Hr(Vr,Kr,na,"≗","\\circeq",!0),Hr(Vr,Kr,na,"≜","\\triangleq",!0),Hr(Vr,Kr,na,"∼","\\thicksim"),Hr(Vr,Kr,na,"≈","\\thickapprox"),Hr(Vr,Kr,na,"⫆","\\supseteqq",!0),Hr(Vr,Kr,na,"⋑","\\Supset",!0),Hr(Vr,Kr,na,"⊐","\\sqsupset",!0),Hr(Vr,Kr,na,"≽","\\succcurlyeq",!0),Hr(Vr,Kr,na,"⋟","\\curlyeqsucc",!0),Hr(Vr,Kr,na,"≿","\\succsim",!0),Hr(Vr,Kr,na,"⪸","\\succapprox",!0),Hr(Vr,Kr,na,"⊳","\\vartriangleright"),Hr(Vr,Kr,na,"⊵","\\trianglerighteq"),Hr(Vr,Kr,na,"⊩","\\Vdash",!0),Hr(Vr,Kr,na,"∣","\\shortmid"),Hr(Vr,Kr,na,"∥","\\shortparallel"),Hr(Vr,Kr,na,"≬","\\between",!0),Hr(Vr,Kr,na,"⋔","\\pitchfork",!0),Hr(Vr,Kr,na,"∝","\\varpropto"),Hr(Vr,Kr,na,"◀","\\blacktriangleleft"),Hr(Vr,Kr,na,"∴","\\therefore",!0),Hr(Vr,Kr,na,"∍","\\backepsilon"),Hr(Vr,Kr,na,"▶","\\blacktriangleright"),Hr(Vr,Kr,na,"∵","\\because",!0),Hr(Vr,Kr,na,"⋘","\\llless"),Hr(Vr,Kr,na,"⋙","\\gggtr"),Hr(Vr,Kr,Zr,"⊲","\\lhd"),Hr(Vr,Kr,Zr,"⊳","\\rhd"),Hr(Vr,Kr,na,"≂","\\eqsim",!0),Hr(Vr,Wr,na,"⋈","\\Join"),Hr(Vr,Kr,na,"≑","\\Doteq",!0),Hr(Vr,Kr,Zr,"∔","\\dotplus",!0),Hr(Vr,Kr,Zr,"∖","\\smallsetminus"),Hr(Vr,Kr,Zr,"⋒","\\Cap",!0),Hr(Vr,Kr,Zr,"⋓","\\Cup",!0),Hr(Vr,Kr,Zr,"⩞","\\doublebarwedge",!0),Hr(Vr,Kr,Zr,"⊟","\\boxminus",!0),Hr(Vr,Kr,Zr,"⊞","\\boxplus",!0),Hr(Vr,Kr,Zr,"⋇","\\divideontimes",!0),Hr(Vr,Kr,Zr,"⋉","\\ltimes",!0),Hr(Vr,Kr,Zr,"⋊","\\rtimes",!0),Hr(Vr,Kr,Zr,"⋋","\\leftthreetimes",!0),Hr(Vr,Kr,Zr,"⋌","\\rightthreetimes",!0),Hr(Vr,Kr,Zr,"⋏","\\curlywedge",!0),Hr(Vr,Kr,Zr,"⋎","\\curlyvee",!0),Hr(Vr,Kr,Zr,"⊝","\\circleddash",!0),Hr(Vr,Kr,Zr,"⊛","\\circledast",!0),Hr(Vr,Kr,Zr,"⋅","\\centerdot"),Hr(Vr,Kr,Zr,"⊺","\\intercal",!0),Hr(Vr,Kr,Zr,"⋒","\\doublecap"),Hr(Vr,Kr,Zr,"⋓","\\doublecup"),Hr(Vr,Kr,Zr,"⊠","\\boxtimes",!0),Hr(Vr,Kr,na,"⇢","\\dashrightarrow",!0),Hr(Vr,Kr,na,"⇠","\\dashleftarrow",!0),Hr(Vr,Kr,na,"⇇","\\leftleftarrows",!0),Hr(Vr,Kr,na,"⇆","\\leftrightarrows",!0),Hr(Vr,Kr,na,"⇚","\\Lleftarrow",!0),Hr(Vr,Kr,na,"↞","\\twoheadleftarrow",!0),Hr(Vr,Kr,na,"↢","\\leftarrowtail",!0),Hr(Vr,Kr,na,"↫","\\looparrowleft",!0),Hr(Vr,Kr,na,"⇋","\\leftrightharpoons",!0),Hr(Vr,Kr,na,"↶","\\curvearrowleft",!0),Hr(Vr,Kr,na,"↺","\\circlearrowleft",!0),Hr(Vr,Kr,na,"↰","\\Lsh",!0),Hr(Vr,Kr,na,"⇈","\\upuparrows",!0),Hr(Vr,Kr,na,"↿","\\upharpoonleft",!0),Hr(Vr,Kr,na,"⇃","\\downharpoonleft",!0),Hr(Vr,Wr,na,"⊶","\\origof",!0),Hr(Vr,Wr,na,"⊷","\\imageof",!0),Hr(Vr,Kr,na,"⊸","\\multimap",!0),Hr(Vr,Kr,na,"↭","\\leftrightsquigarrow",!0),Hr(Vr,Kr,na,"⇉","\\rightrightarrows",!0),Hr(Vr,Kr,na,"⇄","\\rightleftarrows",!0),Hr(Vr,Kr,na,"↠","\\twoheadrightarrow",!0),Hr(Vr,Kr,na,"↣","\\rightarrowtail",!0),Hr(Vr,Kr,na,"↬","\\looparrowright",!0),Hr(Vr,Kr,na,"↷","\\curvearrowright",!0),Hr(Vr,Kr,na,"↻","\\circlearrowright",!0),Hr(Vr,Kr,na,"↱","\\Rsh",!0),Hr(Vr,Kr,na,"⇊","\\downdownarrows",!0),Hr(Vr,Kr,na,"↾","\\upharpoonright",!0),Hr(Vr,Kr,na,"⇂","\\downharpoonright",!0),Hr(Vr,Kr,na,"⇝","\\rightsquigarrow",!0),Hr(Vr,Kr,na,"⇝","\\leadsto"),Hr(Vr,Kr,na,"⇛","\\Rrightarrow",!0),Hr(Vr,Kr,na,"↾","\\restriction"),Hr(Vr,Wr,aa,"‘","`"),Hr(Vr,Wr,aa,"$","\\$"),Hr(Ur,Wr,aa,"$","\\$"),Hr(Ur,Wr,aa,"$","\\textdollar"),Hr(Vr,Wr,aa,"%","\\%"),Hr(Ur,Wr,aa,"%","\\%"),Hr(Vr,Wr,aa,"_","\\_"),Hr(Ur,Wr,aa,"_","\\_"),Hr(Ur,Wr,aa,"_","\\textunderscore"),Hr(Vr,Wr,aa,"∠","\\angle",!0),Hr(Vr,Wr,aa,"∞","\\infty",!0),Hr(Vr,Wr,aa,"′","\\prime"),Hr(Vr,Wr,aa,"△","\\triangle"),Hr(Vr,Wr,aa,"Γ","\\Gamma",!0),Hr(Vr,Wr,aa,"Δ","\\Delta",!0),Hr(Vr,Wr,aa,"Θ","\\Theta",!0),Hr(Vr,Wr,aa,"Λ","\\Lambda",!0),Hr(Vr,Wr,aa,"Ξ","\\Xi",!0),Hr(Vr,Wr,aa,"Π","\\Pi",!0),Hr(Vr,Wr,aa,"Σ","\\Sigma",!0),Hr(Vr,Wr,aa,"Υ","\\Upsilon",!0),Hr(Vr,Wr,aa,"Φ","\\Phi",!0),Hr(Vr,Wr,aa,"Ψ","\\Psi",!0),Hr(Vr,Wr,aa,"Ω","\\Omega",!0),Hr(Vr,Wr,aa,"A","Α"),Hr(Vr,Wr,aa,"B","Β"),Hr(Vr,Wr,aa,"E","Ε"),Hr(Vr,Wr,aa,"Z","Ζ"),Hr(Vr,Wr,aa,"H","Η"),Hr(Vr,Wr,aa,"I","Ι"),Hr(Vr,Wr,aa,"K","Κ"),Hr(Vr,Wr,aa,"M","Μ"),Hr(Vr,Wr,aa,"N","Ν"),Hr(Vr,Wr,aa,"O","Ο"),Hr(Vr,Wr,aa,"P","Ρ"),Hr(Vr,Wr,aa,"T","Τ"),Hr(Vr,Wr,aa,"X","Χ"),Hr(Vr,Wr,aa,"¬","\\neg",!0),Hr(Vr,Wr,aa,"¬","\\lnot"),Hr(Vr,Wr,aa,"⊤","\\top"),Hr(Vr,Wr,aa,"⊥","\\bot"),Hr(Vr,Wr,aa,"∅","\\emptyset"),Hr(Vr,Kr,aa,"∅","\\varnothing"),Hr(Vr,Wr,Qr,"α","\\alpha",!0),Hr(Vr,Wr,Qr,"β","\\beta",!0),Hr(Vr,Wr,Qr,"γ","\\gamma",!0),Hr(Vr,Wr,Qr,"δ","\\delta",!0),Hr(Vr,Wr,Qr,"ϵ","\\epsilon",!0),Hr(Vr,Wr,Qr,"ζ","\\zeta",!0),Hr(Vr,Wr,Qr,"η","\\eta",!0),Hr(Vr,Wr,Qr,"θ","\\theta",!0),Hr(Vr,Wr,Qr,"ι","\\iota",!0),Hr(Vr,Wr,Qr,"κ","\\kappa",!0),Hr(Vr,Wr,Qr,"λ","\\lambda",!0),Hr(Vr,Wr,Qr,"μ","\\mu",!0),Hr(Vr,Wr,Qr,"ν","\\nu",!0),Hr(Vr,Wr,Qr,"ξ","\\xi",!0),Hr(Vr,Wr,Qr,"ο","\\omicron",!0),Hr(Vr,Wr,Qr,"π","\\pi",!0),Hr(Vr,Wr,Qr,"ρ","\\rho",!0),Hr(Vr,Wr,Qr,"σ","\\sigma",!0),Hr(Vr,Wr,Qr,"τ","\\tau",!0),Hr(Vr,Wr,Qr,"υ","\\upsilon",!0),Hr(Vr,Wr,Qr,"ϕ","\\phi",!0),Hr(Vr,Wr,Qr,"χ","\\chi",!0),Hr(Vr,Wr,Qr,"ψ","\\psi",!0),Hr(Vr,Wr,Qr,"ω","\\omega",!0),Hr(Vr,Wr,Qr,"ε","\\varepsilon",!0),Hr(Vr,Wr,Qr,"ϑ","\\vartheta",!0),Hr(Vr,Wr,Qr,"ϖ","\\varpi",!0),Hr(Vr,Wr,Qr,"ϱ","\\varrho",!0),Hr(Vr,Wr,Qr,"ς","\\varsigma",!0),Hr(Vr,Wr,Qr,"φ","\\varphi",!0),Hr(Vr,Wr,Zr,"∗","*",!0),Hr(Vr,Wr,Zr,"+","+"),Hr(Vr,Wr,Zr,"−","-",!0),Hr(Vr,Wr,Zr,"⋅","\\cdot",!0),Hr(Vr,Wr,Zr,"∘","\\circ",!0),Hr(Vr,Wr,Zr,"÷","\\div",!0),Hr(Vr,Wr,Zr,"±","\\pm",!0),Hr(Vr,Wr,Zr,"×","\\times",!0),Hr(Vr,Wr,Zr,"∩","\\cap",!0),Hr(Vr,Wr,Zr,"∪","\\cup",!0),Hr(Vr,Wr,Zr,"∖","\\setminus",!0),Hr(Vr,Wr,Zr,"∧","\\land"),Hr(Vr,Wr,Zr,"∨","\\lor"),Hr(Vr,Wr,Zr,"∧","\\wedge",!0),Hr(Vr,Wr,Zr,"∨","\\vee",!0),Hr(Vr,Wr,aa,"√","\\surd"),Hr(Vr,Wr,ea,"⟨","\\langle",!0),Hr(Vr,Wr,ea,"∣","\\lvert"),Hr(Vr,Wr,ea,"∥","\\lVert"),Hr(Vr,Wr,Xr,"?","?"),Hr(Vr,Wr,Xr,"!","!"),Hr(Vr,Wr,Xr,"⟩","\\rangle",!0),Hr(Vr,Wr,Xr,"∣","\\rvert"),Hr(Vr,Wr,Xr,"∥","\\rVert"),Hr(Vr,Wr,na,"=","="),Hr(Vr,Wr,na,":",":"),Hr(Vr,Wr,na,"≈","\\approx",!0),Hr(Vr,Wr,na,"≅","\\cong",!0),Hr(Vr,Wr,na,"≥","\\ge"),Hr(Vr,Wr,na,"≥","\\geq",!0),Hr(Vr,Wr,na,"←","\\gets"),Hr(Vr,Wr,na,">","\\gt",!0),Hr(Vr,Wr,na,"∈","\\in",!0),Hr(Vr,Wr,na,"","\\@not"),Hr(Vr,Wr,na,"⊂","\\subset",!0),Hr(Vr,Wr,na,"⊃","\\supset",!0),Hr(Vr,Wr,na,"⊆","\\subseteq",!0),Hr(Vr,Wr,na,"⊇","\\supseteq",!0),Hr(Vr,Kr,na,"⊈","\\nsubseteq",!0),Hr(Vr,Kr,na,"⊉","\\nsupseteq",!0),Hr(Vr,Wr,na,"⊨","\\models"),Hr(Vr,Wr,na,"←","\\leftarrow",!0),Hr(Vr,Wr,na,"≤","\\le"),Hr(Vr,Wr,na,"≤","\\leq",!0),Hr(Vr,Wr,na,"<","\\lt",!0),Hr(Vr,Wr,na,"→","\\rightarrow",!0),Hr(Vr,Wr,na,"→","\\to"),Hr(Vr,Kr,na,"≱","\\ngeq",!0),Hr(Vr,Kr,na,"≰","\\nleq",!0),Hr(Vr,Wr,ra," ","\\ "),Hr(Vr,Wr,ra," ","\\space"),Hr(Vr,Wr,ra," ","\\nobreakspace"),Hr(Ur,Wr,ra," ","\\ "),Hr(Ur,Wr,ra," "," "),Hr(Ur,Wr,ra," ","\\space"),Hr(Ur,Wr,ra," ","\\nobreakspace"),Hr(Vr,Wr,ra,null,"\\nobreak"),Hr(Vr,Wr,ra,null,"\\allowbreak"),Hr(Vr,Wr,ta,",",","),Hr(Vr,Wr,ta,";",";"),Hr(Vr,Kr,Zr,"⊼","\\barwedge",!0),Hr(Vr,Kr,Zr,"⊻","\\veebar",!0),Hr(Vr,Wr,Zr,"⊙","\\odot",!0),Hr(Vr,Wr,Zr,"⊕","\\oplus",!0),Hr(Vr,Wr,Zr,"⊗","\\otimes",!0),Hr(Vr,Wr,aa,"∂","\\partial",!0),Hr(Vr,Wr,Zr,"⊘","\\oslash",!0),Hr(Vr,Kr,Zr,"⊚","\\circledcirc",!0),Hr(Vr,Kr,Zr,"⊡","\\boxdot",!0),Hr(Vr,Wr,Zr,"△","\\bigtriangleup"),Hr(Vr,Wr,Zr,"▽","\\bigtriangledown"),Hr(Vr,Wr,Zr,"†","\\dagger"),Hr(Vr,Wr,Zr,"⋄","\\diamond"),Hr(Vr,Wr,Zr,"⋆","\\star"),Hr(Vr,Wr,Zr,"◃","\\triangleleft"),Hr(Vr,Wr,Zr,"▹","\\triangleright"),Hr(Vr,Wr,ea,"{","\\{"),Hr(Ur,Wr,aa,"{","\\{"),Hr(Ur,Wr,aa,"{","\\textbraceleft"),Hr(Vr,Wr,Xr,"}","\\}"),Hr(Ur,Wr,aa,"}","\\}"),Hr(Ur,Wr,aa,"}","\\textbraceright"),Hr(Vr,Wr,ea,"{","\\lbrace"),Hr(Vr,Wr,Xr,"}","\\rbrace"),Hr(Vr,Wr,ea,"[","\\lbrack",!0),Hr(Ur,Wr,aa,"[","\\lbrack",!0),Hr(Vr,Wr,Xr,"]","\\rbrack",!0),Hr(Ur,Wr,aa,"]","\\rbrack",!0),Hr(Vr,Wr,ea,"(","\\lparen",!0),Hr(Vr,Wr,Xr,")","\\rparen",!0),Hr(Ur,Wr,aa,"<","\\textless",!0),Hr(Ur,Wr,aa,">","\\textgreater",!0),Hr(Vr,Wr,ea,"⌊","\\lfloor",!0),Hr(Vr,Wr,Xr,"⌋","\\rfloor",!0),Hr(Vr,Wr,ea,"⌈","\\lceil",!0),Hr(Vr,Wr,Xr,"⌉","\\rceil",!0),Hr(Vr,Wr,aa,"\\","\\backslash"),Hr(Vr,Wr,aa,"∣","|"),Hr(Vr,Wr,aa,"∣","\\vert"),Hr(Ur,Wr,aa,"|","\\textbar",!0),Hr(Vr,Wr,aa,"∥","\\|"),Hr(Vr,Wr,aa,"∥","\\Vert"),Hr(Ur,Wr,aa,"∥","\\textbardbl"),Hr(Ur,Wr,aa,"~","\\textasciitilde"),Hr(Ur,Wr,aa,"\\","\\textbackslash"),Hr(Ur,Wr,aa,"^","\\textasciicircum"),Hr(Vr,Wr,na,"↑","\\uparrow",!0),Hr(Vr,Wr,na,"⇑","\\Uparrow",!0),Hr(Vr,Wr,na,"↓","\\downarrow",!0),Hr(Vr,Wr,na,"⇓","\\Downarrow",!0),Hr(Vr,Wr,na,"↕","\\updownarrow",!0),Hr(Vr,Wr,na,"⇕","\\Updownarrow",!0),Hr(Vr,Wr,Jr,"∐","\\coprod"),Hr(Vr,Wr,Jr,"⋁","\\bigvee"),Hr(Vr,Wr,Jr,"⋀","\\bigwedge"),Hr(Vr,Wr,Jr,"⨄","\\biguplus"),Hr(Vr,Wr,Jr,"⋂","\\bigcap"),Hr(Vr,Wr,Jr,"⋃","\\bigcup"),Hr(Vr,Wr,Jr,"∫","\\int"),Hr(Vr,Wr,Jr,"∫","\\intop"),Hr(Vr,Wr,Jr,"∬","\\iint"),Hr(Vr,Wr,Jr,"∭","\\iiint"),Hr(Vr,Wr,Jr,"∏","\\prod"),Hr(Vr,Wr,Jr,"∑","\\sum"),Hr(Vr,Wr,Jr,"⨂","\\bigotimes"),Hr(Vr,Wr,Jr,"⨁","\\bigoplus"),Hr(Vr,Wr,Jr,"⨀","\\bigodot"),Hr(Vr,Wr,Jr,"∮","\\oint"),Hr(Vr,Wr,Jr,"∯","\\oiint"),Hr(Vr,Wr,Jr,"∰","\\oiiint"),Hr(Vr,Wr,Jr,"⨆","\\bigsqcup"),Hr(Vr,Wr,Jr,"∫","\\smallint"),Hr(Ur,Wr,Yr,"…","\\textellipsis"),Hr(Vr,Wr,Yr,"…","\\mathellipsis"),Hr(Ur,Wr,Yr,"…","\\ldots",!0),Hr(Vr,Wr,Yr,"…","\\ldots",!0),Hr(Vr,Wr,Yr,"⋯","\\@cdots",!0),Hr(Vr,Wr,Yr,"⋱","\\ddots",!0),Hr(Vr,Wr,aa,"⋮","\\varvdots"),Hr(Vr,Wr,Gr,"ˊ","\\acute"),Hr(Vr,Wr,Gr,"ˋ","\\grave"),Hr(Vr,Wr,Gr,"¨","\\ddot"),Hr(Vr,Wr,Gr,"~","\\tilde"),Hr(Vr,Wr,Gr,"ˉ","\\bar"),Hr(Vr,Wr,Gr,"˘","\\breve"),Hr(Vr,Wr,Gr,"ˇ","\\check"),Hr(Vr,Wr,Gr,"^","\\hat"),Hr(Vr,Wr,Gr,"⃗","\\vec"),Hr(Vr,Wr,Gr,"˙","\\dot"),Hr(Vr,Wr,Gr,"˚","\\mathring"),Hr(Vr,Wr,Qr,"","\\@imath"),Hr(Vr,Wr,Qr,"","\\@jmath"),Hr(Vr,Wr,aa,"ı","ı"),Hr(Vr,Wr,aa,"ȷ","ȷ"),Hr(Ur,Wr,aa,"ı","\\i",!0),Hr(Ur,Wr,aa,"ȷ","\\j",!0),Hr(Ur,Wr,aa,"ß","\\ss",!0),Hr(Ur,Wr,aa,"æ","\\ae",!0),Hr(Ur,Wr,aa,"œ","\\oe",!0),Hr(Ur,Wr,aa,"ø","\\o",!0),Hr(Ur,Wr,aa,"Æ","\\AE",!0),Hr(Ur,Wr,aa,"Œ","\\OE",!0),Hr(Ur,Wr,aa,"Ø","\\O",!0),Hr(Ur,Wr,Gr,"ˊ","\\'"),Hr(Ur,Wr,Gr,"ˋ","\\`"),Hr(Ur,Wr,Gr,"ˆ","\\^"),Hr(Ur,Wr,Gr,"˜","\\~"),Hr(Ur,Wr,Gr,"ˉ","\\="),Hr(Ur,Wr,Gr,"˘","\\u"),Hr(Ur,Wr,Gr,"˙","\\."),Hr(Ur,Wr,Gr,"¸","\\c"),Hr(Ur,Wr,Gr,"˚","\\r"),Hr(Ur,Wr,Gr,"ˇ","\\v"),Hr(Ur,Wr,Gr,"¨",'\\"'),Hr(Ur,Wr,Gr,"˝","\\H"),Hr(Ur,Wr,Gr,"◯","\\textcircled");var oa={"--":!0,"---":!0,"``":!0,"''":!0};Hr(Ur,Wr,aa,"–","--",!0),Hr(Ur,Wr,aa,"–","\\textendash"),Hr(Ur,Wr,aa,"—","---",!0),Hr(Ur,Wr,aa,"—","\\textemdash"),Hr(Ur,Wr,aa,"‘","`",!0),Hr(Ur,Wr,aa,"‘","\\textquoteleft"),Hr(Ur,Wr,aa,"’","'",!0),Hr(Ur,Wr,aa,"’","\\textquoteright"),Hr(Ur,Wr,aa,"“","``",!0),Hr(Ur,Wr,aa,"“","\\textquotedblleft"),Hr(Ur,Wr,aa,"”","''",!0),Hr(Ur,Wr,aa,"”","\\textquotedblright"),Hr(Vr,Wr,aa,"°","\\degree",!0),Hr(Ur,Wr,aa,"°","\\degree"),Hr(Ur,Wr,aa,"°","\\textdegree",!0),Hr(Vr,Wr,aa,"£","\\pounds"),Hr(Vr,Wr,aa,"£","\\mathsterling",!0),Hr(Ur,Wr,aa,"£","\\pounds"),Hr(Ur,Wr,aa,"£","\\textsterling",!0),Hr(Vr,Kr,aa,"✠","\\maltese"),Hr(Ur,Kr,aa,"✠","\\maltese");for(var ia='0123456789/@."',la=0;la<14;la++){var sa=ia.charAt(la);Hr(Vr,Wr,aa,sa,sa)}for(var ca='0123456789!@*()-=+";:?/.,',da=0;da<25;da++){var ua=ca.charAt(da);Hr(Ur,Wr,aa,ua,ua)}for(var ma="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ha=0;ha<52;ha++){var pa=ma.charAt(ha);Hr(Vr,Wr,Qr,pa,pa),Hr(Ur,Wr,aa,pa,pa)}Hr(Vr,Kr,aa,"C","ℂ"),Hr(Ur,Kr,aa,"C","ℂ"),Hr(Vr,Kr,aa,"H","ℍ"),Hr(Ur,Kr,aa,"H","ℍ"),Hr(Vr,Kr,aa,"N","ℕ"),Hr(Ur,Kr,aa,"N","ℕ"),Hr(Vr,Kr,aa,"P","ℙ"),Hr(Ur,Kr,aa,"P","ℙ"),Hr(Vr,Kr,aa,"Q","ℚ"),Hr(Ur,Kr,aa,"Q","ℚ"),Hr(Vr,Kr,aa,"R","ℝ"),Hr(Ur,Kr,aa,"R","ℝ"),Hr(Vr,Kr,aa,"Z","ℤ"),Hr(Ur,Kr,aa,"Z","ℤ"),Hr(Vr,Wr,Qr,"h","ℎ"),Hr(Ur,Wr,Qr,"h","ℎ");for(var fa="",ga=0;ga<52;ga++){var ba=ma.charAt(ga);Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56320+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56372+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56424+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56580+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56684+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56736+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56788+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56840+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56944+ga)),Hr(Ur,Wr,aa,ba,fa),ga<26&&(Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56632+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56476+ga)),Hr(Ur,Wr,aa,ba,fa))}Hr(Vr,Wr,Qr,"k",fa=String.fromCharCode(55349,56668)),Hr(Ur,Wr,aa,"k",fa);for(var va=0;va<10;va++){var ya=va.toString();Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57294+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57314+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57324+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57334+va)),Hr(Ur,Wr,aa,ya,fa)}for(var wa="ÐÞþ",xa=0;xa<3;xa++){var ka=wa.charAt(xa);Hr(Vr,Wr,Qr,ka,ka),Hr(Ur,Wr,aa,ka,ka)}var Ea=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Sa=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ta=function(e,t,n){return qr[n][e]&&qr[n][e].replace&&(e=qr[n][e].replace),{value:e,metrics:gr(e,t,n)}},_a=function(e,t,n,r,a){var o,i=Ta(e,t,n),l=i.metrics;if(e=i.value,l){var s=l.italic;("text"===n||r&&"mathit"===r.font)&&(s=0),o=new Rr(e,l.height,l.depth,s,l.skew,l.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new Rr(e,0,0,0,0,0,a);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},Ca=(e,t)=>{if(Cr(e.classes)!==Cr(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},Na=function(e){for(var t=0,n=0,r=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ba=function(e,t,n,r){var a=new zr(e,t,n,r);return Na(a),a},Ma=(e,t,n,r)=>new zr(e,t,n,r),za=function(e){var t=new mr(e);return Na(t),t},Aa=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Oa={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ia={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ra={fontMap:Oa,makeSymbol:_a,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Ta(e,"Main-Bold",t).metrics?_a(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===qr[t][e].font?_a(e,"Main-Regular",t,n,r):_a(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ba,makeSvgSpan:Ma,makeLineSpan:function(e,t,n){var r=Ba([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=_r(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var a=new Ar(e,t,n,r);return Na(a),a},makeFragment:za,wrapFragment:function(e,t){return e instanceof mr?Ba([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,a=r,o=1;o<t.length;o++){var i=-t[o].shift-a-t[o].elem.depth,l=i-(t[o-1].elem.height+t[o-1].elem.depth);a+=i,n.push({type:"kern",size:l}),n.push(t[o])}return{children:n,depth:r}}var s;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}s=c}else if("bottom"===e.positionType)s=-e.positionData;else{var m=e.children[0];if("elem"!==m.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-m.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-m.elem.depth}}return{children:e.children,depth:s}}(e),a=0,o=0;o<n.length;o++){var i=n[o];if("elem"===i.type){var l=i.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var s=Ba(["pstrut"],[]);s.style.height=_r(a);for(var c=[],d=r,u=r,m=r,h=0;h<n.length;h++){var p=n[h];if("kern"===p.type)m+=p.size;else{var f=p.elem,g=p.wrapperClasses||[],b=p.wrapperStyle||{},v=Ba(g,[s,f],void 0,b);v.style.top=_r(-a-m-f.depth),p.marginLeft&&(v.style.marginLeft=p.marginLeft),p.marginRight&&(v.style.marginRight=p.marginRight),c.push(v),m+=f.height+f.depth}d=Math.min(d,m),u=Math.max(u,m)}var y,w=Ba(["vlist"],c);if(w.style.height=_r(u),d<0){var x=Ba([],[]),k=Ba(["vlist"],[x]);k.style.height=_r(-d);var E=Ba(["vlist-s"],[new Rr("​")]);y=[Ba(["vlist-r"],[w,E]),Ba(["vlist-r"],[k])]}else y=[Ba(["vlist-r"],[w])];var S=Ba(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,n){var r=e.mode,a=e.text,o=["mord"],i="math"===r||"text"===r&&t.font,l=i?t.font:t.fontFamily,s="",c="";if(55349===a.charCodeAt(0)&&([s,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return[Ea[a][2],Ea[a][r]]}if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return[Sa[o][2],Sa[o][r]]}if(120485===n||120486===n)return[Ea[0][2],Ea[0][r]];if(120486<n&&n<120782)return["",""];throw new Hn("Unsupported character: "+e)}(a,r)),s.length>0)return _a(a,s,r,t,o.concat(c));if(l){var d,u;if("boldsymbol"===l){var m=function(e,t,n,r,a){return"textord"!==a&&Ta(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,r,0,0,n);d=m.fontName,u=[m.fontClass]}else i?(d=Oa[l].fontName,u=[l]):(d=Aa(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Ta(a,d,r).metrics)return _a(a,d,r,t,o.concat(u));if(oa.hasOwnProperty(a)&&"Typewriter"===d.slice(0,10)){for(var h=[],p=0;p<a.length;p++)h.push(_a(a[p],d,r,t,o.concat(u)));return za(h)}}if("mathord"===n)return _a(a,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var f=qr[r][a]&&qr[r][a].font;if("ams"===f){var g=Aa("amsrm",t.fontWeight,t.fontShape);return _a(a,g,r,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var b=Aa(f,t.fontWeight,t.fontShape);return _a(a,b,r,t,o.concat(b,t.fontWeight,t.fontShape))}var v=Aa("textrm",t.fontWeight,t.fontShape);return _a(a,v,r,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=Ba(["mspace"],[],t),r=Tr(e,t);return n.style.marginRight=_r(r),n},staticSvg:function(e,t){var[n,r,a]=Ia[e],o=new Dr(n),i=new Lr([o],{width:_r(r),height:_r(a),style:"width:"+_r(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Ma(["overlay"],[i],t);return l.height=a,l.style.height=_r(a),l.style.width=_r(r),l},svgData:Ia,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Rr&&r instanceof Rr&&Ca(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},La={number:3,unit:"mu"},Da={number:4,unit:"mu"},$a={number:5,unit:"mu"},ja={mord:{mop:La,mbin:Da,mrel:$a,minner:La},mop:{mord:La,mop:La,mrel:$a,minner:La},mbin:{mord:Da,mop:Da,mopen:Da,minner:Da},mrel:{mord:$a,mop:$a,mopen:$a,minner:$a},mopen:{},mclose:{mop:La,mbin:Da,mrel:$a,minner:La},mpunct:{mord:La,mop:La,mrel:$a,mopen:La,mclose:La,mpunct:La,minner:La},minner:{mord:La,mop:La,mbin:Da,mrel:$a,mopen:La,mpunct:La,minner:La}},Pa={mord:{mop:La},mop:{mord:La,mop:La},mbin:{},mrel:{},mopen:{},mclose:{mop:La},mpunct:{},minner:{mop:La}},Fa={},qa={},Ha={};function Va(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:a},s=0;s<n.length;++s)Fa[n[s]]=l;t&&(o&&(qa[t]=o),i&&(Ha[t]=i))}function Ua(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Va({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Wa=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Ka=function(e){return"ordgroup"===e.type?e.body:[e]},Ga=Ra.makeSpan,Za=["leftmost","mbin","mopen","mrel","mop","mpunct"],Xa=["rightmost","mrel","mclose","mpunct"],Ya={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT},Qa={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ja=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=oo(e[o],t);if(i instanceof mr){var l=i.children;a.push(...l)}else a.push(i)}if(Ra.tryCombineChars(a),!n)return a;var s=t;if(1===e.length){var c=e[0];"sizing"===c.type?s=t.havingSize(c.size):"styling"===c.type&&(s=t.havingStyle(Ya[c.style]))}var d=Ga([r[0]||"leftmost"],[],t),u=Ga([r[1]||"rightmost"],[],t),m="root"===n;return eo(a,((e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&Gn.contains(Xa,r)?t.classes[0]="mord":"mbin"===r&&Gn.contains(Za,n)&&(e.classes[0]="mord")}),{node:d},u,m),eo(a,((e,t)=>{var n=ro(t),r=ro(e),a=n&&r?e.hasClass("mtight")?Pa[n][r]:ja[n][r]:null;if(a)return Ra.makeGlue(a,s)}),{node:d},u,m),a},eo=function e(t,n,r,a,o){a&&t.push(a);for(var i=0;i<t.length;i++){var l=t[i],s=to(l);if(s)e(s.children,n,r,null,o);else{var c=!l.hasClass("mspace");if(c){var d=n(l,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),i++))}c?r.node=l:o&&l.hasClass("newline")&&(r.node=Ga(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),i++})(i)}}a&&t.pop()},to=function(e){return e instanceof mr||e instanceof Ar||e instanceof zr&&e.hasClass("enclosing")?e:null},no=function e(t,n){var r=to(t);if(r){var a=r.children;if(a.length){if("right"===n)return e(a[a.length-1],"right");if("left"===n)return e(a[0],"left")}}return t},ro=function(e,t){return e?(t&&(e=no(e,t)),Qa[e.classes[0]]||null):null},ao=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Ga(t.concat(n))},oo=function(e,t,n){if(!e)return Ga();if(qa[e.type]){var r=qa[e.type](e,t);if(n&&t.size!==n.size){r=Ga(t.sizingClasses(n),[r],t);var a=t.sizeMultiplier/n.sizeMultiplier;r.height*=a,r.depth*=a}return r}throw new Hn("Got group of unknown type: '"+e.type+"'")};function io(e,t){var n=Ga(["base"],e,t),r=Ga(["strut"]);return r.style.height=_r(n.height+n.depth),n.depth&&(r.style.verticalAlign=_r(-n.depth)),n.children.unshift(r),n}function lo(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,a=Ja(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(r=a.pop());for(var o,i=[],l=[],s=0;s<a.length;s++)if(l.push(a[s]),a[s].hasClass("mbin")||a[s].hasClass("mrel")||a[s].hasClass("allowbreak")){for(var c=!1;s<a.length-1&&a[s+1].hasClass("mspace")&&!a[s+1].hasClass("newline");)s++,l.push(a[s]),a[s].hasClass("nobreak")&&(c=!0);c||(i.push(io(l,t)),l=[])}else a[s].hasClass("newline")&&(l.pop(),l.length>0&&(i.push(io(l,t)),l=[]),i.push(a[s]));l.length>0&&i.push(io(l,t)),n?((o=io(Ja(n,t,!0))).classes=["tag"],i.push(o)):r&&i.push(r);var d=Ga(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=_r(d.height+d.depth),d.depth&&(u.style.verticalAlign=_r(-d.depth))}return d}function so(e){return new mr(e)}class co{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Cr(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Gn.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Gn.escape(Cr(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class uo{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Gn.escape(this.toText())}toText(){return this.text}}var mo={MathNode:co,TextNode:uo,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",_r(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+_r(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:so},ho=function(e,t,n){return!qr[t][e]||!qr[t][e].replace||55349===e.charCodeAt(0)||oa.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=qr[t][e].replace),new mo.TextNode(e)},po=function(e){return 1===e.length?e[0]:new mo.MathNode("mrow",e)},fo=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var a=e.text;return Gn.contains(["\\imath","\\jmath"],a)?null:(qr[r][a]&&qr[r][a].replace&&(a=qr[r][a].replace),gr(a,Ra.fontMap[n].fontName,r)?Ra.fontMap[n].variant:null)},go=function(e,t,n){if(1===e.length){var r=vo(e[0],t);return n&&r instanceof co&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var a,o=[],i=0;i<e.length;i++){var l=vo(e[i],t);if(l instanceof co&&a instanceof co){if("mtext"===l.type&&"mtext"===a.type&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}if("mn"===l.type&&"mn"===a.type){a.children.push(...l.children);continue}if("mi"===l.type&&1===l.children.length&&"mn"===a.type){var s=l.children[0];if(s instanceof uo&&"."===s.text){a.children.push(...l.children);continue}}else if("mi"===a.type&&1===a.children.length){var c=a.children[0];if(c instanceof uo&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var d=l.children[0];d instanceof uo&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(l),a=l}return o},bo=function(e,t,n){return po(go(e,t,n))},vo=function(e,t){if(!e)return new mo.MathNode("mrow");if(Ha[e.type])return Ha[e.type](e,t);throw new Hn("Got group of unknown type: '"+e.type+"'")};function yo(e,t,n,r,a){var o,i=go(e,n);o=1===i.length&&i[0]instanceof co&&Gn.contains(["mrow","mtable"],i[0].type)?i[0]:new mo.MathNode("mrow",i);var l=new mo.MathNode("annotation",[new mo.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new mo.MathNode("semantics",[o,l]),c=new mo.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=a?"katex":"katex-mathml";return Ra.makeSpan([d],[c])}var wo=function(e){return new xr({style:e.displayMode?ir.DISPLAY:ir.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},xo=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Ra.makeSpan(n,[e])}return e},ko={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Eo={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},So=function(e,t,n,r,a){var o,i=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Ra.makeSpan(["stretchy",t],[],a),"fbox"===t){var l=a.color&&a.getColor();l&&(o.style.borderColor=l)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new $r({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new $r({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Lr(s,{width:"100%",height:_r(i)});o=Ra.makeSvgSpan([],[c],a)}return o.height=i,o.style.height=_r(i),o},To=function(e){var t=new mo.MathNode("mo",[new mo.TextNode(ko[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},_o=function(e,t){var{span:n,minWidth:r,height:a}=function(){var n=4e5,r=e.label.slice(1);if(Gn.contains(["widehat","widecheck","widetilde","utilde"],r)){var a,o,i,l="ordgroup"===(h=e.base).type?h.body.length:1;if(l>5)"widehat"===r||"widecheck"===r?(a=420,n=2364,i=.42,o=r+"4"):(a=312,n=2340,i=.34,o="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][s],a=[0,239,300,360,420][s],i=[0,.24,.3,.3,.36,.42][s],o=r+s):(n=[0,600,1033,2339,2340][s],a=[0,260,286,306,312][s],i=[0,.26,.286,.3,.306,.34][s],o="tilde"+s)}var c=new Dr(o),d=new Lr([c],{width:"100%",height:_r(i),viewBox:"0 0 "+n+" "+a,preserveAspectRatio:"none"});return{span:Ra.makeSvgSpan([],[d],t),minWidth:0,height:i}}var u,m,h,p=[],f=Eo[r],[g,b,v]=f,y=v/1e3,w=g.length;if(1===w)u=["hide-tail"],m=[f[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var k=new Dr(g[x]),E=new Lr([k],{width:"400em",height:_r(y),viewBox:"0 0 "+n+" "+v,preserveAspectRatio:m[x]+" slice"}),S=Ra.makeSvgSpan([u[x]],[E],t);if(1===w)return{span:S,minWidth:b,height:y};S.style.height=_r(y),p.push(S)}return{span:Ra.makeSpan(["stretchy"],p,t),minWidth:b,height:y}}();return n.height=a,n.style.height=_r(a),r>0&&(n.style.minWidth=_r(r)),n};function Co(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function No(e){var t=Bo(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Bo(e){return e&&("atom"===e.type||Fr.hasOwnProperty(e.type))?e:null}var Mo=(e,t)=>{var n,r,a;e&&"supsub"===e.type?(n=(r=Co(e.base,"accent")).base,e.base=n,a=function(e){if(e instanceof zr)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(oo(e,t)),e.base=r):n=(r=Co(e,"accent")).base;var o=oo(n,t.havingCrampedStyle()),i=0;if(r.isShifty&&Gn.isCharacterBox(n)){var l=Gn.getBaseElem(n);i=jr(oo(l,t.havingCrampedStyle())).skew}var s,c="\\c"===r.label,d=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)s=_o(r,t),s=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+_r(2*i)+")",marginLeft:_r(2*i)}:void 0}]},t);else{var u,m;"\\vec"===r.label?(u=Ra.staticSvg("vec",t),m=Ra.svgData.vec[1]):((u=jr(u=Ra.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,m=u.width,c&&(d+=u.depth)),s=Ra.makeSpan(["accent-body"],[u]);var h="\\textcircled"===r.label;h&&(s.classes.push("accent-full"),d=o.height);var p=i;h||(p-=m/2),s.style.left=_r(p),"\\textcircled"===r.label&&(s.style.top=".2em"),s=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:s}]},t)}var f=Ra.makeSpan(["mord","accent"],[s],t);return a?(a.children[0]=f,a.height=Math.max(f.height,a.height),a.classes[0]="mord",a):f},zo=(e,t)=>{var n=e.isStretchy?To(e.label):new mo.MathNode("mo",[ho(e.label,e.mode)]),r=new mo.MathNode("mover",[vo(e.base,t),n]);return r.setAttribute("accent","true"),r},Ao=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));Va({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Wa(t[0]),r=!Ao.test(e.funcName),a=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:Mo,mathmlBuilder:zo}),Va({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Mo,mathmlBuilder:zo}),Va({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{var n=oo(e.base,t),r=_o(e,t),a="\\utilde"===e.label?.12:0,o=Ra.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=To(e.label),r=new mo.MathNode("munder",[vo(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Oo=e=>{var t=new mo.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Va({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,a=t.havingStyle(r.sup()),o=Ra.wrapFragment(oo(e.body,a,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(i+"-arrow-pad"),e.below&&(a=t.havingStyle(r.sub()),(n=Ra.wrapFragment(oo(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var l,s=_o(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,d=-t.fontMetrics().axisHeight-.5*s.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=o.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*s.height+.111;l=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c},{type:"elem",elem:n,shift:u}]},t)}else l=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c}]},t);return l.children[0].children[0].children[1].classes.push("svg-align"),Ra.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var n,r=To(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=Oo(vo(e.body,t));if(e.below){var o=Oo(vo(e.below,t));n=new mo.MathNode("munderover",[r,o,a])}else n=new mo.MathNode("mover",[r,a])}else if(e.below){var i=Oo(vo(e.below,t));n=new mo.MathNode("munder",[r,i])}else n=Oo(),n=new mo.MathNode("mover",[r,n]);return n}});var Io=Ra.makeSpan;function Ro(e,t){var n=Ja(e.body,t,!0);return Io([e.mclass],n,t)}function Lo(e,t){var n,r=go(e.body,t);return"minner"===e.mclass?n=new mo.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new mo.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new mo.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Va({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Ka(a),isCharacterBox:Gn.isCharacterBox(a)}},htmlBuilder:Ro,mathmlBuilder:Lo});var Do=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Va({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Do(t[0]),body:Ka(t[1]),isCharacterBox:Gn.isCharacterBox(t[1])}}}),Va({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:a}=e,o=t[1],i=t[0];n="\\stackrel"!==a?Do(o):"mrel";var l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:Ka(o)},s={type:"supsub",mode:i.mode,base:l,sup:"\\underset"===a?null:i,sub:"\\underset"===a?i:null};return{type:"mclass",mode:r.mode,mclass:n,body:[s],isCharacterBox:Gn.isCharacterBox(s)}},htmlBuilder:Ro,mathmlBuilder:Lo}),Va({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Do(t[0]),body:Ka(t[0])}},htmlBuilder(e,t){var n=Ja(e.body,t,!0),r=Ra.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=go(e.body,t),r=new mo.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var $o={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jo=e=>"textord"===e.type&&"@"===e.text;function Po(e,t,n){var r=$o[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[a],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Va({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ra.wrapFragment(oo(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=_r(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new mo.MathNode("mrow",[vo(e.label,t)]);return(n=new mo.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new mo.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),Va({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ra.wrapFragment(oo(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new mo.MathNode("mrow",[vo(e.fragment,t)])}),Va({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=Co(t[0],"ordgroup").body,a="",o=0;o<r.length;o++){a+=Co(r[o],"textord").text}var i,l=parseInt(a);if(isNaN(l))throw new Hn("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new Hn("\\@char with invalid code point "+a);return l<=65535?i=String.fromCharCode(l):(l-=65536,i=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:n.mode,text:i}}});var Fo=(e,t)=>{var n=Ja(e.body,t.withColor(e.color),!1);return Ra.makeFragment(n)},qo=(e,t)=>{var n=go(e.body,t.withColor(e.color)),r=new mo.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Va({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=Co(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:Ka(a)}},htmlBuilder:Fo,mathmlBuilder:qo}),Va({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,a=Co(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:o}},htmlBuilder:Fo,mathmlBuilder:qo}),Va({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,a="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:a&&Co(a,"size").value}},htmlBuilder(e,t){var n=Ra.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=_r(Tr(e.size,t)))),n},mathmlBuilder(e,t){var n=new mo.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",_r(Tr(e.size,t)))),n}});var Ho={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Vo=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Hn("Expected a control sequence",e);return t},Uo=(e,t,n,r)=>{var a=e.gullet.macros.get(n.text);null==a&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};Va({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Ho[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Ho[r.text]),Co(t.parseFunction(),"internal");throw new Hn("Invalid token after macro prefix",r)}}),Va({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Hn("Expected a control sequence",r);for(var o,i=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Hn('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Hn('Argument number "'+r.text+'" out of order');i++,l.push([])}else{if("EOF"===r.text)throw new Hn("Expected a macro definition");l[i].push(r.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},n===Ho[n]),{type:"internal",mode:t.mode}}}),Va({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vo(t.gullet.popToken());t.gullet.consumeSpaces();var a=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Uo(t,r,a,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Va({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vo(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return Uo(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Wo=function(e,t,n){var r=gr(qr.math[e]&&qr.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Ko=function(e,t,n,r){var a=n.havingBaseStyle(t),o=Ra.makeSpan(r.concat(a.sizingClasses(n)),[e],n),i=a.sizeMultiplier/n.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},Go=function(e,t,n){var r=t.havingBaseStyle(n),a=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=_r(a),e.height-=a,e.depth+=a},Zo=function(e,t,n,r,a,o){var i=function(e,t,n,r){return Ra.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,a,r),l=Ko(Ra.makeSpan(["delimsizing","size"+t],[i],r),ir.TEXT,r,o);return n&&Go(l,r,ir.TEXT),l},Xo=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ra.makeSpan(["delimsizinginner",r],[Ra.makeSpan([],[Ra.makeSymbol(e,t,n)])])}},Yo=function(e,t,n){var r=hr["Size4-Regular"][e.charCodeAt(0)]?hr["Size4-Regular"][e.charCodeAt(0)][4]:hr["Size1-Regular"][e.charCodeAt(0)][4],a=new Dr("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new Lr([a],{width:_r(r),height:_r(t),style:"width:"+_r(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Ra.makeSvgSpan([],[o],n);return i.height=t,i.style.height=_r(t),i.style.width=_r(r),{type:"elem",elem:i}},Qo={type:"kern",size:-.008},Jo=["|","\\lvert","\\rvert","\\vert"],ei=["\\|","\\lVert","\\rVert","\\Vert"],ti=function(e,t,n,r,a,o){var i,l,s,c,d="",u=0;i=s=c=e,l=null;var m="Size1-Regular";"\\uparrow"===e?s=c="⏐":"\\Uparrow"===e?s=c="‖":"\\downarrow"===e?i=s="⏐":"\\Downarrow"===e?i=s="‖":"\\updownarrow"===e?(i="\\uparrow",s="⏐",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",s="‖",c="\\Downarrow"):Gn.contains(Jo,e)?(s="∣",d="vert",u=333):Gn.contains(ei,e)?(s="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",s="⎢",c="⎣",m="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",s="⎥",c="⎦",m="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(s=i="⎢",c="⎣",m="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",s=c="⎢",m="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(s=i="⎥",c="⎦",m="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",s=c="⎥",m="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",s="⎜",c="⎝",m="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",s="⎟",c="⎠",m="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",l="⎨",c="⎩",s="⎪",m="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",l="⎬",c="⎭",s="⎪",m="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",s="⎪",m="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",s="⎪",m="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",s="⎪",m="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",s="⎪",m="Size4-Regular");var h=Wo(i,m,a),p=h.height+h.depth,f=Wo(s,m,a),g=f.height+f.depth,b=Wo(c,m,a),v=b.height+b.depth,y=0,w=1;if(null!==l){var x=Wo(l,m,a);y=x.height+x.depth,w=2}var k=p+v+y,E=k+Math.max(0,Math.ceil((t-k)/(w*g)))*w*g,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var T=E/2-S,_=[];if(d.length>0){var C=E-p-v,N=Math.round(1e3*E),B=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*C)),M=new Dr(d,B),z=(u/1e3).toFixed(3)+"em",A=(N/1e3).toFixed(3)+"em",O=new Lr([M],{width:z,height:A,viewBox:"0 0 "+u+" "+N}),I=Ra.makeSvgSpan([],[O],r);I.height=N/1e3,I.style.width=z,I.style.height=A,_.push({type:"elem",elem:I})}else{if(_.push(Xo(c,m,a)),_.push(Qo),null===l){var R=E-p-v+.016;_.push(Yo(s,R,r))}else{var L=(E-p-v-y)/2+.016;_.push(Yo(s,L,r)),_.push(Qo),_.push(Xo(l,m,a)),_.push(Qo),_.push(Yo(s,L,r))}_.push(Qo),_.push(Xo(i,m,a))}var D=r.havingBaseStyle(ir.TEXT),$=Ra.makeVList({positionType:"bottom",positionData:T,children:_},D);return Ko(Ra.makeSpan(["delimsizing","mult"],[$],D),ir.TEXT,r,o)},ni=.08,ri=function(e,t,n,r,a){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,dr);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,dr,n)}return r}(e,r,n),i=new Dr(e,o),l=new Lr([i],{width:"400em",height:_r(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ra.makeSvgSpan(["hide-tail"],[l],a)},ai=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],oi=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ii=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],li=[0,1.2,1.8,2.4,3],si=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ci=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],di=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ui=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},mi=function(e,t,n,r){for(var a=Math.min(2,3-r.style.size);a<n.length&&"stack"!==n[a].type;a++){var o=Wo(e,ui(n[a]),"math"),i=o.height+o.depth;if("small"===n[a].type&&(i*=r.havingBaseStyle(n[a].style).sizeMultiplier),i>t)return n[a]}return n[n.length-1]},hi=function(e,t,n,r,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=Gn.contains(ii,e)?si:Gn.contains(ai,e)?di:ci;var l=mi(e,t,i,r);return"small"===l.type?function(e,t,n,r,a,o){var i=Ra.makeSymbol(e,"Main-Regular",a,r),l=Ko(i,t,r,o);return n&&Go(l,r,t),l}(e,l.style,n,r,a,o):"large"===l.type?Zo(e,l.size,n,r,a,o):ti(e,t,n,r,a,o)},pi={sqrtImage:function(e,t){var n,r,a=t.havingBaseSizing(),o=mi("\\surd",e*a.sizeMultiplier,di,a),i=a.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,c=0,d=0;return"small"===o.type?(e<1?i=1:e<1.4&&(i=.7),c=(1+l)/i,(n=ri("sqrtMain",s=(1+l+ni)/i,d=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",r=.833/i):"large"===o.type?(d=1080*li[o.size],c=(li[o.size]+l)/i,s=(li[o.size]+l+ni)/i,(n=ri("sqrtSize"+o.size,s,d,l,t)).style.minWidth="1.02em",r=1/i):(s=e+l+ni,c=e+l,d=Math.floor(1e3*e+l)+80,(n=ri("sqrtTall",s,d,l,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=_r(s),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*i}},sizedDelim:function(e,t,n,r,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Gn.contains(ai,e)||Gn.contains(ii,e))return Zo(e,t,!1,n,r,a);if(Gn.contains(oi,e))return ti(e,li[t],!1,n,r,a);throw new Hn("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:li,customSizedDelim:hi,leftRightDelim:function(e,t,n,r,a,o){var i=r.fontMetrics().axisHeight*r.sizeMultiplier,l=5/r.fontMetrics().ptPerEm,s=Math.max(t-i,n+i),c=Math.max(s/500*901,2*s-l);return hi(e,c,!0,r,a,o)}},fi={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},gi=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function bi(e,t){var n=Bo(e);if(n&&Gn.contains(gi,n.text))return n;throw new Hn(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function vi(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Va({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=bi(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:fi[e.funcName].size,mclass:fi[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Ra.makeSpan([e.mclass]):pi.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(ho(e.delim,e.mode));var n=new mo.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=_r(pi.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),Va({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Hn("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:bi(t[0],e).text,color:n}}}),Va({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bi(t[0],e),r=e.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Co(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{vi(e);for(var n,r,a=Ja(e.body,t,!0,["mopen","mclose"]),o=0,i=0,l=!1,s=0;s<a.length;s++)a[s].isMiddle?l=!0:(o=Math.max(a[s].height,o),i=Math.max(a[s].depth,i));if(o*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?ao(t,["mopen"]):pi.leftRightDelim(e.left,o,i,t,e.mode,["mopen"]),a.unshift(n),l)for(var c=1;c<a.length;c++){var d=a[c].isMiddle;d&&(a[c]=pi.leftRightDelim(d.delim,o,i,d.options,e.mode,[]))}if("."===e.right)r=ao(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;r=pi.leftRightDelim(e.right,o,i,u,e.mode,["mclose"])}return a.push(r),Ra.makeSpan(["minner"],a,t)},mathmlBuilder:(e,t)=>{vi(e);var n=go(e.body,t);if("."!==e.left){var r=new mo.MathNode("mo",[ho(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var a=new mo.MathNode("mo",[ho(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),n.push(a)}return po(n)}}),Va({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bi(t[0],e);if(!e.parser.leftrightDepth)throw new Hn("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=ao(t,[]);else{n=pi.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?ho("|","text"):ho(e.delim,e.mode),r=new mo.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var yi=(e,t)=>{var n,r,a,o=Ra.wrapFragment(oo(e.body,t),t),i=e.label.slice(1),l=t.sizeMultiplier,s=0,c=Gn.isCharacterBox(e.body);if("sout"===i)(n=Ra.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===i){var d=Tr({number:.6,unit:"pt"},t),u=Tr({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var m=o.height+o.depth+d+u;o.style.paddingLeft=_r(m/2+d);var h=Math.floor(1e3*m*l),p="M400000 "+(r=h)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",f=new Lr([new Dr("phase",p)],{width:"400em",height:_r(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});(n=Ra.makeSvgSpan(["hide-tail"],[f],t)).style.height=_r(m),s=o.depth+d+u}else{/cancel/.test(i)?c||o.classes.push("cancel-pad"):"angl"===i?o.classes.push("anglpad"):o.classes.push("boxpad");var g=0,b=0,v=0;/box/.test(i)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=g=t.fontMetrics().fboxsep+("colorbox"===i?0:v)):"angl"===i?(g=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-o.depth)):b=g=c?.2:0,n=So(o,i,g,b,t),/fbox|boxed|fcolorbox/.test(i)?(n.style.borderStyle="solid",n.style.borderWidth=_r(v)):"angl"===i&&.049!==v&&(n.style.borderTopWidth=_r(v),n.style.borderRightWidth=_r(v)),s=o.depth+b,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:o,shift:0}]},t);else{var y=/cancel|phase/.test(i)?["svg-align"]:[];a=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!c?Ra.makeSpan(["mord","cancel-lap"],[a],t):Ra.makeSpan(["mord"],[a],t)},wi=(e,t)=>{var n=0,r=new mo.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vo(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Va({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,o=Co(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,o=Co(t[0],"color-token").color,i=Co(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:i,borderColor:o,body:l}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),Va({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var xi={};function ki(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<n.length;++s)xi[n[s]]=l;o&&(qa[t]=o),i&&(Ha[t]=i)}var Ei={};function Si(e,t){Ei[e]=t}function Ti(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var _i=e=>{if(!e.parser.settings.displayMode)throw new Hn("{"+e.envName+"} can be used only in display mode.")};function Ci(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Ni(e,t,n){var{hskipBeforeAndAfter:r,addJot:a,cols:o,arraystretch:i,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:m}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var h=e.gullet.expandMacroAsText("\\arraystretch");if(null==h)i=1;else if(!(i=parseFloat(h))||i<0)throw new Hn("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var p=[],f=[p],g=[],b=[],v=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new qn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(Ti(e));;){var x=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},n&&(x={type:"styling",mode:e.mode,style:n,body:[x]}),p.push(x);var k=e.fetch().text;if("&"===k){if(u&&p.length===u){if(c||l)throw new Hn("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===k){w(),1===p.length&&"styling"===x.type&&0===x.body[0].body.length&&(f.length>1||!d)&&f.pop(),b.length<f.length+1&&b.push([]);break}if("\\\\"!==k)throw new Hn("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var E=void 0;" "!==e.gullet.future().text&&(E=e.parseSizeGroup(!0)),g.push(E?E.value:null),w(),b.push(Ti(e)),p=[],f.push(p),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:i,body:f,cols:o,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:b,colSeparationType:l,tags:v,leqno:m}}function Bi(e){return"d"===e.slice(0,1)?"display":"text"}var Mi=function(e,t){var n,r,a=e.body.length,o=e.hLinesBeforeRow,i=0,l=new Array(a),s=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(ir.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var m="CD"===e.colSeparationType?Tr({number:3,unit:"ex"},t):12*d,h=3*d,p=e.arraystretch*m,f=.7*p,g=.3*p,b=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),s.push({pos:b,isDashed:e[t]})}for(v(o[0]),n=0;n<e.body.length;++n){var y=e.body[n],w=f,x=g;i<y.length&&(i=y.length);var k=new Array(y.length);for(r=0;r<y.length;++r){var E=oo(y[r],t);x<E.depth&&(x=E.depth),w<E.height&&(w=E.height),k[r]=E}var S=e.rowGaps[n],T=0;S&&(T=Tr(S,t))>0&&(x<(T+=g)&&(x=T),T=0),e.addJot&&(x+=h),k.height=w,k.depth=x,b+=w,k.pos=b,b+=x+T,l[n]=k,v(o[n+1])}var _,C,N=b/2+t.fontMetrics().axisHeight,B=e.cols||[],M=[],z=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n<a;++n){var A=l[n],O=A.pos-N,I=e.tags[n],R=void 0;(R=!0===I?Ra.makeSpan(["eqn-num"],[],t):!1===I?Ra.makeSpan([],[],t):Ra.makeSpan([],Ja(I,t,!0),t)).depth=A.depth,R.height=A.height,z.push({type:"elem",elem:R,shift:O})}for(r=0,C=0;r<i||C<B.length;++r,++C){for(var L=B[C]||{},D=!0;"separator"===L.type;){if(D||((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(t.fontMetrics().doubleRuleSep),M.push(_)),"|"!==L.separator&&":"!==L.separator)throw new Hn("Invalid separator type: "+L.separator);var $="|"===L.separator?"solid":"dashed",j=Ra.makeSpan(["vertical-separator"],[],t);j.style.height=_r(b),j.style.borderRightWidth=_r(c),j.style.borderRightStyle=$,j.style.margin="0 "+_r(-c/2);var P=b-N;P&&(j.style.verticalAlign=_r(-P)),M.push(j),L=B[++C]||{},D=!1}if(!(r>=i)){var F=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(F=Gn.deflt(L.pregap,u))&&((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(F),M.push(_));var q=[];for(n=0;n<a;++n){var H=l[n],V=H[r];if(V){var U=H.pos-N;V.depth=H.depth,V.height=H.height,q.push({type:"elem",elem:V,shift:U})}}q=Ra.makeVList({positionType:"individualShift",children:q},t),q=Ra.makeSpan(["col-align-"+(L.align||"c")],[q]),M.push(q),(r<i-1||e.hskipBeforeAndAfter)&&0!==(F=Gn.deflt(L.postgap,u))&&((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(F),M.push(_))}}if(l=Ra.makeSpan(["mtable"],M),s.length>0){for(var W=Ra.makeLineSpan("hline",t,c),K=Ra.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:l,shift:0}];s.length>0;){var Z=s.pop(),X=Z.pos-N;Z.isDashed?G.push({type:"elem",elem:K,shift:X}):G.push({type:"elem",elem:W,shift:X})}l=Ra.makeVList({positionType:"individualShift",children:G},t)}if(0===z.length)return Ra.makeSpan(["mord"],[l],t);var Y=Ra.makeVList({positionType:"individualShift",children:z},t);return Y=Ra.makeSpan(["tag"],[Y],t),Ra.makeFragment([l,Y])},zi={c:"center ",l:"left ",r:"right "},Ai=function(e,t){for(var n=[],r=new mo.MathNode("mtd",[],["mtr-glue"]),a=new mo.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var i=e.body[o],l=[],s=0;s<i.length;s++)l.push(new mo.MathNode("mtd",[vo(i[s],t)]));e.tags&&e.tags[o]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(a):l.push(a)),n.push(new mo.MathNode("mtr",l))}var c=new mo.MathNode("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",_r(d));var u="",m="";if(e.cols&&e.cols.length>0){var h=e.cols,p="",f=!1,g=0,b=h.length;"separator"===h[0].type&&(u+="top ",g=1),"separator"===h[h.length-1].type&&(u+="bottom ",b-=1);for(var v=g;v<b;v++)"align"===h[v].type?(m+=zi[h[v].align],f&&(p+="none "),f=!0):"separator"===h[v].type&&f&&(p+="|"===h[v].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",m.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],w="",x=1;x<y.length;x++)w+=x%2?"0em ":"1em ";c.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var k="",E=e.hLinesBeforeRow;u+=E[0].length>0?"left ":"",u+=E[E.length-1].length>0?"right ":"";for(var S=1;S<E.length-1;S++)k+=0===E[S].length?"none ":E[S][0]?"dashed ":"solid ";return/[sd]/.test(k)&&c.setAttribute("rowlines",k.trim()),""!==u&&(c=new mo.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new mo.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Oi=function(e,t){-1===e.envName.indexOf("ed")&&_i(e);var n,r=[],a=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,i=Ni(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:Ci(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",d=0;d<t[0].body.length;d++){c+=Co(t[0].body[d],"textord").text}n=Number(c),l=2*n}var u=!l;i.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=Co(e[t],"styling");Co(r.body[0],"ordgroup").body.unshift(s)}if(u)l<e.length&&(l=e.length);else{var a=e.length/2;if(n<a)throw new Hn("Too many math in a row: expected "+n+", but got "+a,e[0])}}));for(var m=0;m<l;++m){var h="r",p=0;m%2==1?h="l":m>0&&u&&(p=1),r[m]={type:"align",align:h,pregap:p,postgap:0}}return i.colSeparationType=u?"align":"alignat",i};ki({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(Bo(t[0])?[t[0]]:Co(t[0],"ordgroup").body).map((function(e){var t=No(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Hn("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Ni(e.parser,r,Bi(e.envName))},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,-1==="lcr".indexOf(n))throw new Hn("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var o=Ni(e.parser,r,Bi(e.envName)),i=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Ni(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(Bo(t[0])?[t[0]]:Co(t[0],"ordgroup").body).map((function(e){var t=No(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Hn("Unknown column alignment: "+t,e)}));if(n.length>1)throw new Hn("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=Ni(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Hn("{subarray} can contain only one column");return r},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Ni(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Bi(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Oi,htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Gn.contains(["gather","gather*"],e.envName)&&_i(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ci(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ni(e.parser,t,"display")},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Oi,htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){_i(e);var t={autoTag:Ci(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ni(e.parser,t,"display")},htmlBuilder:Mi,mathmlBuilder:Ai}),ki({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(_i(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Hn("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,a,o=[],i=[o],l=0;l<t.length;l++){for(var s=t[l],c={type:"styling",body:[],mode:"math",style:"display"},d=0;d<s.length;d++)if(jo(s[d])){o.push(c);var u=No(s[d+=1]).text,m=new Array(2);if(m[0]={type:"ordgroup",mode:"math",body:[]},m[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new Hn('Expected one of "<>AV=|." after @',s[d]);for(var h=0;h<2;h++){for(var p=!0,f=d+1;f<s.length;f++){if(a=u,("mathord"===(r=s[f]).type||"atom"===r.type)&&r.text===a){p=!1,d=f;break}if(jo(s[f]))throw new Hn("Missing a "+u+" character to complete a CD arrow.",s[f]);m[h].body.push(s[f])}if(p)throw new Hn("Missing a "+u+" character to complete a CD arrow.",s[d])}}var g={type:"styling",body:[Po(u,m,e)],mode:"math",style:"display"};o.push(g),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(s[d]);l%2==0?o.push(c):o.shift(),o=[],i.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}(e.parser)),htmlBuilder:Mi,mathmlBuilder:Ai}),Si("\\nonumber","\\gdef\\@eqnsw{0}"),Si("\\notag","\\nonumber"),Va({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Hn(e.funcName+" valid only within array environment")}});var Ii=xi;Va({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];if("ordgroup"!==a.type)throw new Hn("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=Co(a.body[i],"textord").text;if("\\begin"===r){if(!Ii.hasOwnProperty(o))throw new Hn("No such environment: "+o,a);var l=Ii[o],{args:s,optArgs:c}=n.parseArguments("\\begin{"+o+"}",l),d={mode:n.mode,envName:o,parser:n},u=l.handler(d,s,c);n.expect("\\end",!1);var m=n.nextToken,h=Co(n.parseFunction(),"environment");if(h.name!==o)throw new Hn("Mismatch: \\begin{"+o+"} matched by \\end{"+h.name+"}",m);return u}return{type:"environment",mode:n.mode,name:o,nameGroup:a}}});var Ri=(e,t)=>{var n=e.font,r=t.withFont(n);return oo(e.body,r)},Li=(e,t)=>{var n=e.font,r=t.withFont(n);return vo(e.body,r)},Di={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Va({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=Wa(t[0]),o=r;return o in Di&&(o=Di[o]),{type:"font",mode:n.mode,font:o.slice(1),body:a}},htmlBuilder:Ri,mathmlBuilder:Li}),Va({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],a=Gn.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Do(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}}),Va({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:a}=e,{mode:o}=n,i=n.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}},htmlBuilder:Ri,mathmlBuilder:Li});var $i=(e,t)=>{var n=t;return"display"===e?n=n.id>=ir.SCRIPT.id?n.text():ir.DISPLAY:"text"===e&&n.size===ir.DISPLAY.size?n=ir.TEXT:"script"===e?n=ir.SCRIPT:"scriptscript"===e&&(n=ir.SCRIPTSCRIPT),n},ji=(e,t)=>{var n,r=$i(e.size,t.style),a=r.fracNum(),o=r.fracDen();n=t.havingStyle(a);var i=oo(e.numer,n,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;i.height=i.height<l?l:i.height,i.depth=i.depth<s?s:i.depth}n=t.havingStyle(o);var c,d,u,m,h,p,f,g,b,v,y=oo(e.denom,n,t);if(e.hasBarLine?(e.barSize?(d=Tr(e.barSize,t),c=Ra.makeLineSpan("frac-line",t,d)):c=Ra.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),r.size===ir.DISPLAY.size||"display"===e.size?(m=t.fontMetrics().num1,h=d>0?3*u:7*u,p=t.fontMetrics().denom1):(d>0?(m=t.fontMetrics().num2,h=u):(m=t.fontMetrics().num3,h=3*u),p=t.fontMetrics().denom2),c){var w=t.fontMetrics().axisHeight;m-i.depth-(w+.5*d)<h&&(m+=h-(m-i.depth-(w+.5*d))),w-.5*d-(y.height-p)<h&&(p+=h-(w-.5*d-(y.height-p)));var x=-(w-.5*d);f=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:c,shift:x},{type:"elem",elem:i,shift:-m}]},t)}else{var k=m-i.depth-(y.height-p);k<h&&(m+=.5*(h-k),p+=.5*(h-k)),f=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:i,shift:-m}]},t)}return n=t.havingStyle(r),f.height*=n.sizeMultiplier/t.sizeMultiplier,f.depth*=n.sizeMultiplier/t.sizeMultiplier,g=r.size===ir.DISPLAY.size?t.fontMetrics().delim1:r.size===ir.SCRIPTSCRIPT.size?t.havingStyle(ir.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,b=null==e.leftDelim?ao(t,["mopen"]):pi.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?Ra.makeSpan([]):null==e.rightDelim?ao(t,["mclose"]):pi.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),Ra.makeSpan(["mord"].concat(n.sizingClasses(t)),[b,Ra.makeSpan(["mfrac"],[f]),v],t)},Pi=(e,t)=>{var n=new mo.MathNode("mfrac",[vo(e.numer,t),vo(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=Tr(e.barSize,t);n.setAttribute("linethickness",_r(r))}}else n.setAttribute("linethickness","0px");var a=$i(e.size,t.style);if(a.size!==t.style.size){n=new mo.MathNode("mstyle",[n]);var o=a.size===ir.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var i=[];if(null!=e.leftDelim){var l=new mo.MathNode("mo",[new mo.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),i.push(l)}if(i.push(n),null!=e.rightDelim){var s=new mo.MathNode("mo",[new mo.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return po(i)}return n};Va({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:a}=e,o=t[0],i=t[1],l=null,s=null,c="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,l="(",s=")";break;case"\\\\bracefrac":n=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":n=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:i,hasBarLine:n,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:ji,mathmlBuilder:Pi}),Va({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Va({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:a}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:a}}});var Fi=["display","text","script","scriptscript"],qi=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Va({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,a=t[4],o=t[5],i=Wa(t[0]),l="atom"===i.type&&"open"===i.family?qi(i.text):null,s=Wa(t[1]),c="atom"===s.type&&"close"===s.family?qi(s.text):null,d=Co(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var m="auto",h=t[3];if("ordgroup"===h.type){if(h.body.length>0){var p=Co(h.body[0],"textord");m=Fi[Number(p.text)]}}else h=Co(h,"textord"),m=Fi[Number(h.text)];return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:n,barSize:u,leftDelim:l,rightDelim:c,size:m}},htmlBuilder:ji,mathmlBuilder:Pi}),Va({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Co(t[0],"size").value,token:a}}}),Va({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Co(t[1],"infix").size),i=t[2],l=o.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ji,mathmlBuilder:Pi});var Hi=(e,t)=>{var n,r,a=t.style;"supsub"===e.type?(n=e.sup?oo(e.sup,t.havingStyle(a.sup()),t):oo(e.sub,t.havingStyle(a.sub()),t),r=Co(e.base,"horizBrace")):r=Co(e,"horizBrace");var o,i=oo(r.base,t.havingBaseStyle(ir.DISPLAY)),l=_o(r,t);if(r.isOver?(o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:l}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=Ra.makeVList({positionType:"bottom",positionData:i.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:i}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var s=Ra.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Ra.makeVList({positionType:"bottom",positionData:s.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return Ra.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)};Va({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Hi,mathmlBuilder:(e,t)=>{var n=To(e.label);return new mo.MathNode(e.isOver?"mover":"munder",[vo(e.base,t),n])}}),Va({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],a=Co(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Ka(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Ja(e.body,t,!1);return Ra.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=bo(e.body,t);return n instanceof co||(n=new co("mrow",[n])),n.setAttribute("href",e.href),n}}),Va({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Co(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var l={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:Ka(l)}}}),Va({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Ka(t[0])}},htmlBuilder(e,t){var n=Ja(e.body,t,!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>new mo.MathNode("mrow",go(e.body,t))}),Va({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:a,token:o}=e,i=Co(t[0],"raw").string,l=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(a){case"\\htmlClass":s.class=i,n={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,n={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,n={command:"\\htmlStyle",style:i};break;case"\\htmlData":for(var c=i.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(2!==u.length)throw new Hn("Error parsing key-value for \\htmlData");s["data-"+u[0].trim()]=u[1].trim()}n={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:s,body:Ka(l)}:r.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=Ja(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var a=Ra.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>bo(e.body,t)}),Va({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Ka(t[0]),mathml:Ka(t[1])}},htmlBuilder:(e,t)=>{var n=Ja(e.html,t,!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>bo(e.mathml,t)});var Vi=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Hn("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Sr(n))throw new Hn("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Va({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},l="";if(n[0])for(var s=Co(n[0],"raw").string.split(","),c=0;c<s.length;c++){var d=s[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":l=u;break;case"width":a=Vi(u);break;case"height":o=Vi(u);break;case"totalheight":i=Vi(u);break;default:throw new Hn("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Co(t[0],"url").url;return""===l&&(l=(l=(l=m).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:r.mode,alt:l,width:a,height:o,totalheight:i,src:m}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=Tr(e.height,t),r=0;e.totalheight.number>0&&(r=Tr(e.totalheight,t)-n);var a=0;e.width.number>0&&(a=Tr(e.width,t));var o={height:_r(n+r)};a>0&&(o.width=_r(a)),r>0&&(o.verticalAlign=_r(-r));var i=new Or(e.src,e.alt,o);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Tr(e.height,t),a=0;if(e.totalheight.number>0&&(a=Tr(e.totalheight,t)-r,n.setAttribute("valign",_r(-a))),n.setAttribute("height",_r(r+a)),e.width.number>0){var o=Tr(e.width,t);n.setAttribute("width",_r(o))}return n.setAttribute("src",e.src),n}}),Va({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=Co(t[0],"size");if(n.settings.strict){var o="m"===r[1],i="mu"===a.value.unit;o?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+a.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder:(e,t)=>Ra.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=Tr(e.dimension,t);return new mo.SpaceNode(n)}}),Va({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Ra.makeSpan([],[oo(e.body,t)]),n=Ra.makeSpan(["inner"],[n],t)):n=Ra.makeSpan(["inner"],[oo(e.body,t)]);var r=Ra.makeSpan(["fix"],[]),a=Ra.makeSpan([e.alignment],[n,r],t),o=Ra.makeSpan(["strut"]);return o.style.height=_r(a.height+a.depth),a.depth&&(o.style.verticalAlign=_r(-a.depth)),a.children.unshift(o),a=Ra.makeSpan(["thinbox"],[a],t),Ra.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mpadded",[vo(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),Va({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,a=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",i=r.parseExpression(!1,o);return r.expect(o),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:i}}}),Va({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Hn("Mismatched "+e.funcName)}});var Ui=(e,t)=>{switch(t.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Va({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Ka(t[0]),text:Ka(t[1]),script:Ka(t[2]),scriptscript:Ka(t[3])}},htmlBuilder:(e,t)=>{var n=Ui(e,t),r=Ja(n,t,!1);return Ra.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Ui(e,t);return bo(n,t)}});var Wi=(e,t,n,r,a,o,i)=>{e=Ra.makeSpan([],[e]);var l,s,c,d=n&&Gn.isCharacterBox(n);if(t){var u=oo(t,r.havingStyle(a.sup()),r);s={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var m=oo(n,r.havingStyle(a.sub()),r);l={elem:m,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-m.height)}}if(s&&l){var h=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;c=Ra.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:_r(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:_r(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var p=e.height-i;c=Ra.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:_r(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else{if(!s)return e;var f=e.depth+i;c=Ra.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:_r(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(l&&0!==o&&!d){var b=Ra.makeSpan(["mspace"],[],r);b.style.marginRight=_r(o),g.unshift(b)}return Ra.makeSpan(["mop","op-limits"],g,r)},Ki=["\\smallint"],Gi=(e,t)=>{var n,r,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,a=Co(e.base,"op"),o=!0):a=Co(e,"op");var i,l=t.style,s=!1;if(l.size===ir.DISPLAY.size&&a.symbol&&!Gn.contains(Ki,a.name)&&(s=!0),a.symbol){var c=s?"Size2-Regular":"Size1-Regular",d="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(d=a.name.slice(1),a.name="oiint"===d?"\\iint":"\\iiint"),i=Ra.makeSymbol(a.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var u=i.italic,m=Ra.staticSvg(d+"Size"+(s?"2":"1"),t);i=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:m,shift:s?.08:0}]},t),a.name="\\"+d,i.classes.unshift("mop"),i.italic=u}}else if(a.body){var h=Ja(a.body,t,!0);1===h.length&&h[0]instanceof Rr?(i=h[0]).classes[0]="mop":i=Ra.makeSpan(["mop"],h,t)}else{for(var p=[],f=1;f<a.name.length;f++)p.push(Ra.mathsym(a.name[f],a.mode,t));i=Ra.makeSpan(["mop"],p,t)}var g=0,b=0;return(i instanceof Rr||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(g=(i.height-i.depth)/2-t.fontMetrics().axisHeight,b=i.italic),o?Wi(i,n,r,t,l,b,g):(g&&(i.style.position="relative",i.style.top=_r(g)),i)},Zi=(e,t)=>{var n;if(e.symbol)n=new co("mo",[ho(e.name,e.mode)]),Gn.contains(Ki,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new co("mo",go(e.body,t));else{n=new co("mi",[new uo(e.name.slice(1))]);var r=new co("mo",[ho("⁡","text")]);n=e.parentIsSupSub?new co("mrow",[n,r]):so([n,r])}return n},Xi={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Va({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=r;return 1===a.length&&(a=Xi[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ka(r)}},htmlBuilder:Gi,mathmlBuilder:Zi});var Yi={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Va({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=Yi[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Gi,mathmlBuilder:Zi});var Qi=(e,t)=>{var n,r,a,o,i=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,a=Co(e.base,"operatorname"),i=!0):a=Co(e,"operatorname"),a.body.length>0){for(var l=a.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),s=Ja(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var d=s[c];d instanceof Rr&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Ra.makeSpan(["mop"],s,t)}else o=Ra.makeSpan(["mop"],[],t);return i?Wi(o,n,r,t,t.style,0,0):o};function Ji(e,t,n){for(var r=Ja(e,t,!1),a=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var i=r[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[i+1]==="reset-size"+t.size&&(r[o].classes[i+1]="reset-size"+n.size),r[o].height*=a,r[o].depth*=a}return Ra.makeFragment(r)}Va({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"operatorname",mode:n.mode,body:Ka(a),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Qi,mathmlBuilder:(e,t)=>{for(var n=go(e.body,t.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var o=n[a];if(o instanceof mo.SpaceNode);else if(o instanceof mo.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var i=o.children[0];1===o.children.length&&i instanceof mo.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var l=n.map((e=>e.toText())).join("");n=[new mo.TextNode(l)]}var s=new mo.MathNode("mi",n);s.setAttribute("mathvariant","normal");var c=new mo.MathNode("mo",[ho("⁡","text")]);return e.parentIsSupSub?new mo.MathNode("mrow",[s,c]):mo.newDocumentFragment([s,c])}}),Si("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ua({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ra.makeFragment(Ja(e.body,t,!1)):Ra.makeSpan(["mord"],Ja(e.body,t,!0),t),mathmlBuilder:(e,t)=>bo(e.body,t,!0)}),Va({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=oo(e.body,t.havingCrampedStyle()),r=Ra.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},t);return Ra.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new mo.MathNode("mo",[new mo.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new mo.MathNode("mover",[vo(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Va({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Ka(r)}},htmlBuilder:(e,t)=>{var n=Ja(e.body,t.withPhantom(),!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=go(e.body,t);return new mo.MathNode("mphantom",n)}}),Va({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan([],[oo(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Ra.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=go(Ka(e.body),t),r=new mo.MathNode("mphantom",n),a=new mo.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),Va({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan(["inner"],[oo(e.body,t.withPhantom())]),r=Ra.makeSpan(["fix"],[]);return Ra.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=go(Ka(e.body),t),r=new mo.MathNode("mphantom",n),a=new mo.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}}),Va({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Co(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){var n=oo(e.body,t),r=Tr(e.dy,t);return Ra.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new mo.MathNode("mpadded",[vo(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Va({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Va({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,a=n[0],o=Co(t[0],"size"),i=Co(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&Co(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var n=Ra.makeSpan(["mord","rule"],[],t),r=Tr(e.width,t),a=Tr(e.height,t),o=e.shift?Tr(e.shift,t):0;return n.style.borderRightWidth=_r(r),n.style.borderTopWidth=_r(a),n.style.bottom=_r(o),n.width=r,n.height=a+o,n.depth=-o,n.maxFontSize=1.125*a*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Tr(e.width,t),r=Tr(e.height,t),a=e.shift?Tr(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new mo.MathNode("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",_r(n)),i.setAttribute("height",_r(r));var l=new mo.MathNode("mpadded",[i]);return a>=0?l.setAttribute("height",_r(a)):(l.setAttribute("height",_r(a)),l.setAttribute("depth",_r(-a))),l.setAttribute("voffset",_r(a)),l}});var el=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Va({type:"sizing",names:el,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:el.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Ji(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=go(e.body,n),a=new mo.MathNode("mstyle",r);return a.setAttribute("mathsize",_r(n.sizeMultiplier)),a}}),Va({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,a=!1,o=!1,i=n[0]&&Co(n[0],"ordgroup");if(i)for(var l="",s=0;s<i.body.length;++s){if("t"===(l=i.body[s].text))a=!0;else{if("b"!==l){a=!1,o=!1;break}o=!0}}else a=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan([],[oo(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var a=0;a<n.children.length;a++)n.children[a].depth=0;var o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mpadded",[vo(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Va({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,a=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:a}},htmlBuilder(e,t){var n=oo(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Ra.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,a=r;t.style.id<ir.TEXT.id&&(a=t.fontMetrics().xHeight);var o=r+a/4,i=n.height+n.depth+o+r,{span:l,ruleWidth:s,advanceWidth:c}=pi.sqrtImage(i,t),d=l.height-s;d>n.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var u=l.height-n.height-o-s;n.style.paddingLeft=_r(c);var m=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var h=t.havingStyle(ir.SCRIPTSCRIPT),p=oo(e.index,h,t),f=.6*(m.height-m.depth),g=Ra.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:p}]},t),b=Ra.makeSpan(["root"],[g]);return Ra.makeSpan(["mord","sqrt"],[b,m],t)}return Ra.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new mo.MathNode("mroot",[vo(n,t),vo(r,t)]):new mo.MathNode("msqrt",[vo(n,t)])}});var tl={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};Va({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!0,n),i=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var n=tl[e.style],r=t.havingStyle(n).withFont("");return Ji(e.body,r,t)},mathmlBuilder(e,t){var n=tl[e.style],r=t.havingStyle(n),a=go(e.body,r),o=new mo.MathNode("mstyle",a),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});Ua({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub)?Gi:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits)?Qi:null:"accent"===n.type?Gn.isCharacterBox(n.base)?Mo:null:"horizBrace"===n.type&&!e.sub===n.isOver?Hi:null:null}(e,t);if(n)return n(e,t);var r,a,o,{base:i,sup:l,sub:s}=e,c=oo(i,t),d=t.fontMetrics(),u=0,m=0,h=i&&Gn.isCharacterBox(i);if(l){var p=t.havingStyle(t.style.sup());r=oo(l,p,t),h||(u=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(s){var f=t.havingStyle(t.style.sub());a=oo(s,f,t),h||(m=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===ir.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var g,b=t.sizeMultiplier,v=_r(.5/d.ptPerEm/b),y=null;if(a){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Rr||w)&&(y=_r(-c.italic))}if(r&&a){u=Math.max(u,o,r.depth+.25*d.xHeight),m=Math.max(m,d.sub2);var x=4*d.defaultRuleThickness;if(u-r.depth-(a.height-m)<x){m=x-(u-r.depth)+a.height;var k=.8*d.xHeight-(u-r.depth);k>0&&(u+=k,m-=k)}var E=[{type:"elem",elem:a,shift:m,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-u,marginRight:v}];g=Ra.makeVList({positionType:"individualShift",children:E},t)}else if(a){m=Math.max(m,d.sub1,a.height-.8*d.xHeight);var S=[{type:"elem",elem:a,marginLeft:y,marginRight:v}];g=Ra.makeVList({positionType:"shift",positionData:m,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,r.depth+.25*d.xHeight),g=Ra.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:v}]},t)}var T=ro(c,"right")||"mord";return Ra.makeSpan([T],[c,Ra.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[vo(e.base,t)];if(e.sub&&o.push(vo(e.sub,t)),e.sup&&o.push(vo(e.sup,t)),r)a=n?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===ir.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===ir.DISPLAY||i.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===ir.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===ir.DISPLAY)?"munder":"msub"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===ir.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===ir.DISPLAY)?"mover":"msup"}return new mo.MathNode(a,o)}}),Ua({type:"atom",htmlBuilder:(e,t)=>Ra.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new mo.MathNode("mo",[ho(e.text,e.mode)]);if("bin"===e.family){var r=fo(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var nl={mi:"italic",mn:"normal",mtext:"normal"};Ua({type:"mathord",htmlBuilder:(e,t)=>Ra.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new mo.MathNode("mi",[ho(e.text,e.mode,t)]),r=fo(e,t)||"italic";return r!==nl[n.type]&&n.setAttribute("mathvariant",r),n}}),Ua({type:"textord",htmlBuilder:(e,t)=>Ra.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=ho(e.text,e.mode,t),a=fo(e,t)||"normal";return n="text"===e.mode?new mo.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new mo.MathNode("mn",[r]):"\\prime"===e.text?new mo.MathNode("mo",[r]):new mo.MathNode("mi",[r]),a!==nl[n.type]&&n.setAttribute("mathvariant",a),n}});var rl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},al={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ua({type:"spacing",htmlBuilder(e,t){if(al.hasOwnProperty(e.text)){var n=al[e.text].className||"";if("text"===e.mode){var r=Ra.makeOrd(e,t,"textord");return r.classes.push(n),r}return Ra.makeSpan(["mspace",n],[Ra.mathsym(e.text,e.mode,t)],t)}if(rl.hasOwnProperty(e.text))return Ra.makeSpan(["mspace",rl[e.text]],[],t);throw new Hn('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!al.hasOwnProperty(e.text)){if(rl.hasOwnProperty(e.text))return new mo.MathNode("mspace");throw new Hn('Unknown type of space "'+e.text+'"')}return new mo.MathNode("mtext",[new mo.TextNode(" ")])}});var ol=()=>{var e=new mo.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ua({type:"tag",mathmlBuilder(e,t){var n=new mo.MathNode("mtable",[new mo.MathNode("mtr",[ol(),new mo.MathNode("mtd",[bo(e.body,t)]),ol(),new mo.MathNode("mtd",[bo(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var il={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ll={"\\textbf":"textbf","\\textmd":"textmd"},sl={"\\textit":"textit","\\textup":"textup"},cl=(e,t)=>{var n=e.font;return n?il[n]?t.withTextFontFamily(il[n]):ll[n]?t.withTextFontWeight(ll[n]):"\\emph"===n?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(sl[n]):t};Va({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"text",mode:n.mode,body:Ka(a),font:r}},htmlBuilder(e,t){var n=cl(e,t),r=Ja(e.body,n,!0);return Ra.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=cl(e,t);return bo(e.body,n)}}),Va({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=oo(e.body,t),r=Ra.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Ra.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new mo.MathNode("mo",[new mo.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new mo.MathNode("munder",[vo(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Va({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=oo(e.body,t),r=t.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return Ra.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new mo.MathNode("mpadded",[vo(e.body,t)],["vcenter"])}),Va({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Hn("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=dl(e),r=[],a=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),r.push(Ra.makeSymbol(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ra.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ra.tryCombineChars(r),a)},mathmlBuilder(e,t){var n=new mo.TextNode(dl(e)),r=new mo.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var dl=e=>e.body.replace(/ /g,e.star?"␣":" "),ul=Fa,ml="[ \r\n\t]",hl="(\\\\[a-zA-Z@]+)"+ml+"*",pl="[̀-ͯ]",fl=new RegExp(pl+"+$"),gl="("+ml+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+pl+"*|[\ud800-\udbff][\udc00-\udfff]"+pl+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+hl+"|\\\\[^\ud800-\udfff])";class bl{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(gl,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new qn("EOF",new Fn(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Hn("Unexpected character: '"+e[t]+"'",new qn(e[t],new Fn(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var a=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(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=a+1,this.lex()}return new qn(r,new Fn(this,t,this.tokenRegex.lastIndex))}}class vl{constructor(e,t){void 0===e&&(e={}),void 0===t&&(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(0===this.undefStack.length)throw new Hn("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var yl=Ei;Si("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Si("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Si("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Si("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Si("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Si("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Si("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var wl={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};Si("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Hn("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=wl[n.text])||r>=t)throw new Hn("Invalid base-"+t+" digit "+n.text);for(var a;null!=(a=wl[e.future().text])&&a<t;)r*=t,r+=a,e.popToken()}return"\\@char{"+r+"}"}));var xl=(e,t,n)=>{var r=e.consumeArg().tokens;if(1!==r.length)throw new Hn("\\newcommand's first argument must be a macro name");var a=r[0].text,o=e.isDefined(a);if(o&&!t)throw new Hn("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!n)throw new Hn("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var i=0;if(1===(r=e.consumeArg().tokens).length&&"["===r[0].text){for(var l="",s=e.expandNextToken();"]"!==s.text&&"EOF"!==s.text;)l+=s.text,s=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Hn("Invalid number of arguments: "+l);i=parseInt(l),r=e.consumeArg().tokens}return e.macros.set(a,{tokens:r,numArgs:i}),""};Si("\\newcommand",(e=>xl(e,!1,!0))),Si("\\renewcommand",(e=>xl(e,!0,!1))),Si("\\providecommand",(e=>xl(e,!0,!0))),Si("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Si("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Si("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ul[n],qr.math[n],qr.text[n]),""})),Si("\\bgroup","{"),Si("\\egroup","}"),Si("~","\\nobreakspace"),Si("\\lq","`"),Si("\\rq","'"),Si("\\aa","\\r a"),Si("\\AA","\\r A"),Si("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Si("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Si("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Si("ℬ","\\mathscr{B}"),Si("ℰ","\\mathscr{E}"),Si("ℱ","\\mathscr{F}"),Si("ℋ","\\mathscr{H}"),Si("ℐ","\\mathscr{I}"),Si("ℒ","\\mathscr{L}"),Si("ℳ","\\mathscr{M}"),Si("ℛ","\\mathscr{R}"),Si("ℭ","\\mathfrak{C}"),Si("ℌ","\\mathfrak{H}"),Si("ℨ","\\mathfrak{Z}"),Si("\\Bbbk","\\Bbb{k}"),Si("·","\\cdotp"),Si("\\llap","\\mathllap{\\textrm{#1}}"),Si("\\rlap","\\mathrlap{\\textrm{#1}}"),Si("\\clap","\\mathclap{\\textrm{#1}}"),Si("\\mathstrut","\\vphantom{(}"),Si("\\underbar","\\underline{\\text{#1}}"),Si("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Si("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Si("\\ne","\\neq"),Si("≠","\\neq"),Si("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Si("∉","\\notin"),Si("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Si("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Si("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Si("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Si("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Si("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Si("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Si("⟂","\\perp"),Si("‼","\\mathclose{!\\mkern-0.8mu!}"),Si("∌","\\notni"),Si("⌜","\\ulcorner"),Si("⌝","\\urcorner"),Si("⌞","\\llcorner"),Si("⌟","\\lrcorner"),Si("©","\\copyright"),Si("®","\\textregistered"),Si("️","\\textregistered"),Si("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Si("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Si("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Si("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Si("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Si("⋮","\\vdots"),Si("\\varGamma","\\mathit{\\Gamma}"),Si("\\varDelta","\\mathit{\\Delta}"),Si("\\varTheta","\\mathit{\\Theta}"),Si("\\varLambda","\\mathit{\\Lambda}"),Si("\\varXi","\\mathit{\\Xi}"),Si("\\varPi","\\mathit{\\Pi}"),Si("\\varSigma","\\mathit{\\Sigma}"),Si("\\varUpsilon","\\mathit{\\Upsilon}"),Si("\\varPhi","\\mathit{\\Phi}"),Si("\\varPsi","\\mathit{\\Psi}"),Si("\\varOmega","\\mathit{\\Omega}"),Si("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Si("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Si("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Si("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Si("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Si("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var kl={",":"\\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"};Si("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in kl?t=kl[n]:("\\not"===n.slice(0,4)||n in qr.math&&Gn.contains(["bin","rel"],qr.math[n].group))&&(t="\\dotsb"),t}));var El={")":!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};Si("\\dotso",(function(e){return e.future().text in El?"\\ldots\\,":"\\ldots"})),Si("\\dotsc",(function(e){var t=e.future().text;return t in El&&","!==t?"\\ldots\\,":"\\ldots"})),Si("\\cdots",(function(e){return e.future().text in El?"\\@cdots\\,":"\\@cdots"})),Si("\\dotsb","\\cdots"),Si("\\dotsm","\\cdots"),Si("\\dotsi","\\!\\cdots"),Si("\\dotsx","\\ldots\\,"),Si("\\DOTSI","\\relax"),Si("\\DOTSB","\\relax"),Si("\\DOTSX","\\relax"),Si("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Si("\\,","\\tmspace+{3mu}{.1667em}"),Si("\\thinspace","\\,"),Si("\\>","\\mskip{4mu}"),Si("\\:","\\tmspace+{4mu}{.2222em}"),Si("\\medspace","\\:"),Si("\\;","\\tmspace+{5mu}{.2777em}"),Si("\\thickspace","\\;"),Si("\\!","\\tmspace-{3mu}{.1667em}"),Si("\\negthinspace","\\!"),Si("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Si("\\negthickspace","\\tmspace-{5mu}{.277em}"),Si("\\enspace","\\kern.5em "),Si("\\enskip","\\hskip.5em\\relax"),Si("\\quad","\\hskip1em\\relax"),Si("\\qquad","\\hskip2em\\relax"),Si("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Si("\\tag@paren","\\tag@literal{({#1})}"),Si("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Hn("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Si("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Si("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Si("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Si("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Si("\\newline","\\\\\\relax"),Si("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Sl=_r(hr["Main-Regular"]["T".charCodeAt(0)][1]-.7*hr["Main-Regular"]["A".charCodeAt(0)][1]);Si("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Sl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Si("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Sl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Si("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Si("\\@hspace","\\hskip #1\\relax"),Si("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Si("\\ordinarycolon",":"),Si("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Si("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Si("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Si("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Si("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Si("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Si("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Si("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Si("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Si("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Si("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Si("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Si("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Si("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Si("∷","\\dblcolon"),Si("∹","\\eqcolon"),Si("≔","\\coloneqq"),Si("≕","\\eqqcolon"),Si("⩴","\\Coloneqq"),Si("\\ratio","\\vcentcolon"),Si("\\coloncolon","\\dblcolon"),Si("\\colonequals","\\coloneqq"),Si("\\coloncolonequals","\\Coloneqq"),Si("\\equalscolon","\\eqqcolon"),Si("\\equalscoloncolon","\\Eqqcolon"),Si("\\colonminus","\\coloneq"),Si("\\coloncolonminus","\\Coloneq"),Si("\\minuscolon","\\eqcolon"),Si("\\minuscoloncolon","\\Eqcolon"),Si("\\coloncolonapprox","\\Colonapprox"),Si("\\coloncolonsim","\\Colonsim"),Si("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Si("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Si("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Si("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Si("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Si("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Si("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Si("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Si("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Si("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Si("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Si("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Si("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Si("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Si("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Si("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Si("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Si("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Si("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Si("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Si("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Si("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Si("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Si("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Si("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Si("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Si("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Si("\\imath","\\html@mathml{\\@imath}{ı}"),Si("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Si("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Si("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Si("⟦","\\llbracket"),Si("⟧","\\rrbracket"),Si("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Si("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Si("⦃","\\lBrace"),Si("⦄","\\rBrace"),Si("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Si("⦵","\\minuso"),Si("\\darr","\\downarrow"),Si("\\dArr","\\Downarrow"),Si("\\Darr","\\Downarrow"),Si("\\lang","\\langle"),Si("\\rang","\\rangle"),Si("\\uarr","\\uparrow"),Si("\\uArr","\\Uparrow"),Si("\\Uarr","\\Uparrow"),Si("\\N","\\mathbb{N}"),Si("\\R","\\mathbb{R}"),Si("\\Z","\\mathbb{Z}"),Si("\\alef","\\aleph"),Si("\\alefsym","\\aleph"),Si("\\Alpha","\\mathrm{A}"),Si("\\Beta","\\mathrm{B}"),Si("\\bull","\\bullet"),Si("\\Chi","\\mathrm{X}"),Si("\\clubs","\\clubsuit"),Si("\\cnums","\\mathbb{C}"),Si("\\Complex","\\mathbb{C}"),Si("\\Dagger","\\ddagger"),Si("\\diamonds","\\diamondsuit"),Si("\\empty","\\emptyset"),Si("\\Epsilon","\\mathrm{E}"),Si("\\Eta","\\mathrm{H}"),Si("\\exist","\\exists"),Si("\\harr","\\leftrightarrow"),Si("\\hArr","\\Leftrightarrow"),Si("\\Harr","\\Leftrightarrow"),Si("\\hearts","\\heartsuit"),Si("\\image","\\Im"),Si("\\infin","\\infty"),Si("\\Iota","\\mathrm{I}"),Si("\\isin","\\in"),Si("\\Kappa","\\mathrm{K}"),Si("\\larr","\\leftarrow"),Si("\\lArr","\\Leftarrow"),Si("\\Larr","\\Leftarrow"),Si("\\lrarr","\\leftrightarrow"),Si("\\lrArr","\\Leftrightarrow"),Si("\\Lrarr","\\Leftrightarrow"),Si("\\Mu","\\mathrm{M}"),Si("\\natnums","\\mathbb{N}"),Si("\\Nu","\\mathrm{N}"),Si("\\Omicron","\\mathrm{O}"),Si("\\plusmn","\\pm"),Si("\\rarr","\\rightarrow"),Si("\\rArr","\\Rightarrow"),Si("\\Rarr","\\Rightarrow"),Si("\\real","\\Re"),Si("\\reals","\\mathbb{R}"),Si("\\Reals","\\mathbb{R}"),Si("\\Rho","\\mathrm{P}"),Si("\\sdot","\\cdot"),Si("\\sect","\\S"),Si("\\spades","\\spadesuit"),Si("\\sub","\\subset"),Si("\\sube","\\subseteq"),Si("\\supe","\\supseteq"),Si("\\Tau","\\mathrm{T}"),Si("\\thetasym","\\vartheta"),Si("\\weierp","\\wp"),Si("\\Zeta","\\mathrm{Z}"),Si("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Si("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Si("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Si("\\bra","\\mathinner{\\langle{#1}|}"),Si("\\ket","\\mathinner{|{#1}\\rangle}"),Si("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Si("\\Bra","\\left\\langle#1\\right|"),Si("\\Ket","\\left|#1\\right\\rangle");var Tl=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var s=t=>n=>{e&&(n.macros.set("|",i),a.length&&n.macros.set("\\|",l));var o=t;!t&&a.length&&("|"===n.future().text&&(n.popToken(),o=!0));return{tokens:o?a:r,numArgs:0}};t.macros.set("|",s(!1)),a.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Si("\\bra@ket",Tl(!1)),Si("\\bra@set",Tl(!0)),Si("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Si("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Si("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Si("\\angln","{\\angl n}"),Si("\\blue","\\textcolor{##6495ed}{#1}"),Si("\\orange","\\textcolor{##ffa500}{#1}"),Si("\\pink","\\textcolor{##ff00af}{#1}"),Si("\\red","\\textcolor{##df0030}{#1}"),Si("\\green","\\textcolor{##28ae7b}{#1}"),Si("\\gray","\\textcolor{gray}{#1}"),Si("\\purple","\\textcolor{##9d38bd}{#1}"),Si("\\blueA","\\textcolor{##ccfaff}{#1}"),Si("\\blueB","\\textcolor{##80f6ff}{#1}"),Si("\\blueC","\\textcolor{##63d9ea}{#1}"),Si("\\blueD","\\textcolor{##11accd}{#1}"),Si("\\blueE","\\textcolor{##0c7f99}{#1}"),Si("\\tealA","\\textcolor{##94fff5}{#1}"),Si("\\tealB","\\textcolor{##26edd5}{#1}"),Si("\\tealC","\\textcolor{##01d1c1}{#1}"),Si("\\tealD","\\textcolor{##01a995}{#1}"),Si("\\tealE","\\textcolor{##208170}{#1}"),Si("\\greenA","\\textcolor{##b6ffb0}{#1}"),Si("\\greenB","\\textcolor{##8af281}{#1}"),Si("\\greenC","\\textcolor{##74cf70}{#1}"),Si("\\greenD","\\textcolor{##1fab54}{#1}"),Si("\\greenE","\\textcolor{##0d923f}{#1}"),Si("\\goldA","\\textcolor{##ffd0a9}{#1}"),Si("\\goldB","\\textcolor{##ffbb71}{#1}"),Si("\\goldC","\\textcolor{##ff9c39}{#1}"),Si("\\goldD","\\textcolor{##e07d10}{#1}"),Si("\\goldE","\\textcolor{##a75a05}{#1}"),Si("\\redA","\\textcolor{##fca9a9}{#1}"),Si("\\redB","\\textcolor{##ff8482}{#1}"),Si("\\redC","\\textcolor{##f9685d}{#1}"),Si("\\redD","\\textcolor{##e84d39}{#1}"),Si("\\redE","\\textcolor{##bc2612}{#1}"),Si("\\maroonA","\\textcolor{##ffbde0}{#1}"),Si("\\maroonB","\\textcolor{##ff92c6}{#1}"),Si("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Si("\\maroonD","\\textcolor{##ca337c}{#1}"),Si("\\maroonE","\\textcolor{##9e034e}{#1}"),Si("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Si("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Si("\\purpleC","\\textcolor{##aa87ff}{#1}"),Si("\\purpleD","\\textcolor{##7854ab}{#1}"),Si("\\purpleE","\\textcolor{##543b78}{#1}"),Si("\\mintA","\\textcolor{##f5f9e8}{#1}"),Si("\\mintB","\\textcolor{##edf2df}{#1}"),Si("\\mintC","\\textcolor{##e0e5cc}{#1}"),Si("\\grayA","\\textcolor{##f6f7f7}{#1}"),Si("\\grayB","\\textcolor{##f0f1f2}{#1}"),Si("\\grayC","\\textcolor{##e3e5e6}{#1}"),Si("\\grayD","\\textcolor{##d6d8da}{#1}"),Si("\\grayE","\\textcolor{##babec2}{#1}"),Si("\\grayF","\\textcolor{##888d93}{#1}"),Si("\\grayG","\\textcolor{##626569}{#1}"),Si("\\grayH","\\textcolor{##3b3e40}{#1}"),Si("\\grayI","\\textcolor{##21242c}{#1}"),Si("\\kaBlue","\\textcolor{##314453}{#1}"),Si("\\kaGreen","\\textcolor{##71B307}{#1}");var _l={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Cl{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 vl(yl,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new bl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new qn("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,a=this.future(),o=0,i=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(-1===--o)throw new Hn("Extra }",r)}else if("EOF"===r.text)throw new Hn("Unexpected end of input in a macro argument, expected '"+(e&&n?e[i]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[i])&&r.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||n);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Hn("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var a=this.popToken();if(n[r]!==a.text)throw new Hn("Use of the macro doesn't match its definition",a)}}for(var o=[],i=0;i<e;i++)o.push(this.consumeArg(t&&t[i+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Hn("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Hn("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var a=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var l=a[i];if("#"===l.text){if(0===i)throw new Hn("Incomplete placeholder at end of macro body",l);if("#"===(l=a[--i]).text)a.splice(i+1,1);else{if(!/^[1-9]$/.test(l.text))throw new Hn("Not a valid argument number",l);a.splice(i,2,...o[+l.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new qn(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var a=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(a+1));)++a;for(var i=new bl(r,this.settings),l=[],s=i.lex();"EOF"!==s.text;)l.push(s),s=i.lex();return l.reverse(),{tokens:l,numArgs:a}}return r}isDefined(e){return this.macros.has(e)||ul.hasOwnProperty(e)||qr.math.hasOwnProperty(e)||qr.text.hasOwnProperty(e)||_l.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:ul.hasOwnProperty(e)&&!ul[e].primitive}}var Nl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Bl=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ml={"́":{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"}},zl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Al{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 Cl(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Hn("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new qn("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==Al.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&ul[r.text]&&ul[r.text].infix)break;var a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&n.push(a)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new Hn("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var a,o,i=e.slice(0,n),l=e.slice(n+1);return a=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[a,e[n],o],[]):this.callFunction(t,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new Hn("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("text"===this.mode)return r;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(r&&"op"===r.type){var o="\\limits"===a.text;r.limits=o,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new Hn("Limit controls must follow a math operator",a);r.alwaysHandleSupSub&&(r.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new Hn("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new Hn("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new Hn("Double superscript",a);var i={type:"textord",mode:this.mode,text:"\\prime"},l=[i];for(this.consume();"'"===this.fetch().text;)l.push(i),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else{if(!Bl[a.text])break;var s=Nl.test(a.text),c=[];for(c.push(new qn(Bl[a.text])),this.consume();;){var d=this.fetch().text;if(!Bl[d])break;if(Nl.test(d)!==s)break;c.unshift(new qn(Bl[d])),this.consume()}var u=this.subparse(c);s?n={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,a=ul[r];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new Hn("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!a.allowedInText)throw new Hn("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new Hn("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:i}=this.parseArguments(r,a);return this.callFunction(r,o,i,n,e)}callFunction(e,t,n,r,a){var o={funcName:e,parser:this,token:r,breakOnTokenText:a},i=ul[e];if(i&&i.handler)return i.handler(o,t,n);throw new Hn("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],a=[],o=0;o<n;o++){var i=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==i||"sqrt"===t.type&&1===o&&null==a[0])&&(i="primitive");var s=this.parseGroupOfType("argument to '"+e+"'",i,l);if(l)a.push(s);else{if(null==s)throw new Hn("Null argument, please report this as a bug");r.push(s)}}return{args:r,optArgs:a}}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":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new Hn("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Hn("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Hn("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,a="";"EOF"!==(r=this.fetch()).text;)a+=r.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),a=r,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(a=n).text,this.consume();if(""===o)throw new Hn("Invalid "+t+": '"+r.text+"'",r);return r.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Hn("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Hn("Invalid size: '"+t.text+"'",t);var a={number:+(r[1]+r[2]),unit:r[3]};if(!Sr(a))throw new Hn("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);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),a=r.text;if("{"===a||"\\begingroup"===a){this.consume();var o="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var i=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:Fn.range(r,l),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!_l.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Hn("Undefined control sequence: "+a,r);n=this.formatUnsupportedCmd(a),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],a=r.text;"-"===a&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:Fn.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Fn.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[n+1].text!==a||(e.splice(n,2,{type:"textord",mode:"text",loc:Fn.range(r,e[n+1]),text:a+a}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Hn("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}zl.hasOwnProperty(t[0])&&!qr[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=zl[t[0]]+t.slice(1));var a,o=fl.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),qr[this.mode][t]){this.settings.strict&&"math"===this.mode&&wa.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,l=qr[this.mode][t].group,s=Fn.range(e);if(Pr.hasOwnProperty(l)){var c=l;i={type:"atom",mode:this.mode,family:c,loc:s,text:t}}else i={type:l,mode:this.mode,loc:s,text:t};a=i}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(cr(t.charCodeAt(0))?"math"===this.mode&&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)),a={type:"textord",mode:"text",loc:Fn.range(e),text:t}}if(this.consume(),o)for(var d=0;d<o[0].length;d++){var u=o[0][d];if(!Ml[u])throw new Hn("Unknown accent ' "+u+"'",e);var m=Ml[u][this.mode]||Ml[u].text;if(!m)throw new Hn("Accent "+u+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:Fn.range(e),label:m,isStretchy:!1,isShifty:!0,base:a}}return a}}Al.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Ol=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Al(e,t);delete n.gullet.macros.current["\\df@tag"];var r=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 Hn("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new qn("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var Il=function(e,t,n){if(n.throwOnError||!(e instanceof Hn))throw e;var r=Ra.makeSpan(["katex-error"],[new Rr(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Rl=function(e,t){var n=new Yn(t);try{return function(e,t,n){var r,a=wo(n);if("mathml"===n.output)return yo(e,t,a,n.displayMode,!0);if("html"===n.output){var o=lo(e,a);r=Ra.makeSpan(["katex"],[o])}else{var i=yo(e,t,a,n.displayMode,!1),l=lo(e,a);r=Ra.makeSpan(["katex"],[i,l])}return xo(r,n)}(Ol(e,n),e,n)}catch(r){return Il(r,e,n)}},Ll=function(e,t){return Rl(e,t).toMarkup()};const Dl=e=>{const t=y.create({type:"closed",parsedom:"br"});e.children=[t],t.parent=e,e.hasMarks()?e.marks["data-editify-merged"]="true":e.marks={"data-editify-merged":"true"}},$l=(e,t)=>({crossRowElement:(()=>{let n=null;const r=t.parent.children.findIndex((e=>e.isEqual(t)));let a=e.getPreviousElement(t.parent),o=1;for(;a;){const t=a.children[r],{rowspan:i}=jl(t);if(!(t.hasMarks()&&t.marks["data-editify-merged"])&&i>o){n=t;break}a=e.getPreviousElement(a),o++}return n})(),crossColumnElement:(()=>{let n=null,r=e.getPreviousElement(t),a=1;for(;r;){const{colspan:t}=jl(r);if(!(r.hasMarks()&&r.marks["data-editify-merged"])&&t>a){n=r;break}r=e.getPreviousElement(r),a++}return n})()}),jl=e=>{let t=1,n=1;if(e.hasMarks()){if(e.marks.rowspan){const n=Number(e.marks.rowspan);t=isNaN(n)?1:n}if(e.marks.colspan){const t=Number(e.marks.colspan);n=isNaN(t)?1:t}}return{rowspan:t,colspan:n}},Pl=e=>{const t=[],n=[];e.forEach(((e,r)=>{e.children.forEach(((e,a)=>{Array.isArray(n[r])?n[r].push(e):n[r]=[e],Array.isArray(t[a])?t[a].push(e):t[a]=[e]}))}));const r=t.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.rowspan){const n=Number(t.marks.rowspan);return e+(isNaN(n)?1:n)}}return e+1}),0))),a=n.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.colspan){const n=Number(t.marks.colspan);return e+(isNaN(n)?1:n)}}return e+1}),0)));return{rowNumber:Math.max(...r),columnNumber:Math.max(...a)}},Fl=(e,t)=>{let n=!0;if(t.parsedom&&(e.isText()||t.parsedom!=e.parsedom)&&(n=!1),t.marks){Object.keys(t.marks).every((n=>!!e.hasMarks()&&(!0===t.marks[n]?e.marks.hasOwnProperty(n):e.marks[n]==t.marks[n])))||(n=!1)}if(t.styles){Object.keys(t.styles).every((n=>!!e.hasStyles()&&(!0===t.styles[n]?e.styles.hasOwnProperty(n):e.styles[n]==t.styles[n])))||(n=!1)}return n},ql=(e,t)=>Fl(e,t)?e:e.parent?ql(e.parent,t):null,Hl=(e,t,n)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return ql(e.range.anchor.element,n);const r=t.list.map((e=>ql(e.element,n)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let a=!0;for(let o=1;o<r.length;o++)if(!r[o].isEqual(r[0])){a=!1;break}return a?r[0]:null},Vl=(e,t=!1)=>Fl(e,{parsedom:"div",marks:{"data-editify-list":t?"ol":"ul"}}),Ul=(e,t)=>ql(e,{parsedom:"div",marks:{"data-editify-list":t?"ol":"ul"}}),Wl=(e,t,n=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Ul(e.range.anchor.element,n):t.list.every((e=>!!Ul(e.element,n)))),Kl=e=>Fl(e,{parsedom:"div",marks:{"data-editify-task":!0}}),Gl=e=>ql(e,{parsedom:"div",marks:{"data-editify-task":!0}}),Zl=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Gl(e.range.anchor.element):t.list.every((e=>!!Gl(e.element)))),Xl=e=>Fl(e,{parsedom:"span",marks:{"data-editify-attachment":!0}}),Yl=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Xl(e.range.anchor.element):t.flatList.some((e=>Xl(e.element)))),Ql=e=>Fl(e,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),Jl=e=>ql(e,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),es=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Jl(e.range.anchor.element):t.flatList.some((e=>!!Jl(e.element)))),ts=e=>Fl(e,{parsedom:"div",marks:{"data-editify-info":!0}}),ns=e=>ql(e,{parsedom:"div",marks:{"data-editify-info":!0}}),rs=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ns(e.range.anchor.element):t.flatList.every((e=>!!ns(e.element)))),as=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ql(e.range.anchor.element,{parsedom:"pre"}):t.flatList.some((e=>!!ql(e.element,{parsedom:"pre"})))),os=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ql(e.range.anchor.element,{parsedom:"table"}):t.flatList.some((e=>!!ql(e.element,{parsedom:"table"})))),is=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ql(e.range.anchor.element,{parsedom:"blockquote"}):t.list.every((e=>!!ql(e.element,{parsedom:"blockquote"})))),ls=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ql(e.range.anchor.element,{parsedom:"a"}):t.flatList.some((e=>!!ql(e.element,{parsedom:"a"})))),ss=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Fl(e.range.anchor.element,{parsedom:"img"}):t.flatList.some((e=>Fl(e.element,{parsedom:"img"})))),cs=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Fl(e.range.anchor.element,{parsedom:"video"}):t.flatList.some((e=>Fl(e.element,{parsedom:"video"})))),ds=(e,t)=>{if(!e.range)return[];let n=t.flatList.length,r=[];for(let a=0;a<n;a++){const o=t.flatList[a];if(o.offset){let t=null;if(0==o.offset[0]&&o.offset[1]<o.element.textContent.length){const n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[1]),n.textContent=n.textContent.substring(o.offset[1]),e.addElementAfter(n,o.element),t=o.element}else if(o.offset[1]==o.element.textContent.length&&o.offset[0]>0){const n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),n.textContent=n.textContent.substring(o.offset[0]),e.addElementAfter(n,o.element),t=n}else if(o.offset[0]>0&&o.offset[1]<o.element.textContent.length){const n=o.element.clone(),r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),n.textContent=n.textContent.substring(o.offset[0],o.offset[1]),r.textContent=r.textContent.substring(o.offset[1]),e.addElementAfter(n,o.element),e.addElementAfter(r,n),t=n}t&&(0==a&&e.range.anchor.moveToStart(t),a==n-1&&e.range.focus.moveToEnd(t),r.push(t))}else r.push(o.element)}return r},us=(e,t,n,r)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasStyles())&&qs(e.range.anchor.element.styles,n,r);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasStyles()&&qs(e.element.styles,n,r)))},ms=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus))if(e.range.anchor.element.isSpaceText())e.range.anchor.element.hasStyles()?Object.assign(e.range.anchor.element.styles,de.clone(n)):e.range.anchor.element.styles=de.clone(n);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),t.hasStyles()?Object.assign(t.styles,de.clone(n)):t.styles=de.clone(n),e.insertElement(t)}else{const t=y.getSpaceElement();t.styles=de.clone(n),e.insertElement(t)}else{ds(e,t).forEach((e=>{e.isText()&&(e.hasStyles()?Object.assign(e.styles,de.clone(n)):e.styles=de.clone(n))}))}},hs=(e,t,n)=>{if(!e.range)return;const r=e=>{if(Array.isArray(n)){if(e.hasStyles()){let t={};Object.keys(e.styles).forEach((r=>{n.includes(r)||(t[r]=e.styles[r])})),e.styles=t}}else e.styles=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())r(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),r(t),e.insertElement(t)}}else{ds(e,t).forEach((e=>{e.isText()&&r(e)}))}},ps=(e,t,n,r)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasMarks())&&qs(e.range.anchor.element.marks,n,r);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasMarks()&&qs(e.element.marks,n,r)))},fs=(e,t,n)=>{if(e.range){if(!de.isObject(n))throw new Error("The argument must be an object");if(e.range.anchor.isEqual(e.range.focus))if(e.range.anchor.element.isSpaceText())e.range.anchor.element.hasMarks()?Object.assign(e.range.anchor.element.marks,de.clone(n)):e.range.anchor.element.marks=de.clone(n);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),t.hasMarks()?Object.assign(t.marks,de.clone(n)):t.marks=de.clone(n),e.insertElement(t)}else{const t=y.getSpaceElement();t.marks=de.clone(n),e.insertElement(t)}else{ds(e,t).forEach((e=>{e.isText()&&(e.hasMarks()?Object.assign(e.marks,de.clone(n)):e.marks=de.clone(n))}))}}},gs=(e,t,n)=>{if(!e.range)return;const r=e=>{if(Array.isArray(n)){if(e.hasMarks()){let t={};Object.keys(e.marks).forEach((r=>{n.includes(r)||(t[r]=e.marks[r])})),e.marks=t}}else e.marks=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())r(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),r(t),e.insertElement(t)}}else{ds(e,t).forEach((e=>{e.isText()&&r(e)}))}},bs=e=>{e.marks=null,e.styles=null,e.parsedom=y.BLOCK_NODE},vs=(e,t=!1)=>{Vl(e,t)||(bs(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-list"]=t?"ol":"ul")},ys=e=>{Kl(e)||(bs(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-task"]="uncheck")},ws=e=>{let t="";return e.flatList.forEach((e=>{e.element.isText()&&(e.offset?t+=e.element.textContent.substring(e.offset[0],e.offset[1]):t+=e.element.textContent||"")})),t},xs=(e,t)=>{const n=e.getPreviousElement(t),r=e.getNextElement(t);if(!n||!n.isSpaceText()){const n=y.getSpaceElement();e.addElementBefore(n,t)}if(!r||!r.isSpaceText()){const n=y.getSpaceElement();e.addElementAfter(n,t)}e.range&&t.isContains(e.range.anchor.element)&&e.range.anchor.moveToEnd(e.getNextElement(t)),e.range&&t.isContains(e.range.focus.element)&&e.range.focus.moveToEnd(e.getNextElement(t))},ks=(e,t,n)=>{if(e.range){if(!["h1","h2","h3","h4","h5","h6","p"].includes(n))throw new Error("The parameter supports only h1-h6 and p");if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),t.parsedom=n}else t.list.forEach((e=>{if(e.element.isBlock())bs(e.element),e.element.parsedom=n;else{const t=e.element.getBlock();bs(t),t.parsedom=n}}))}},Es=(e,t)=>{if(!e.range)return;const n=e=>{if(e.hasStyles())if(e.styles.hasOwnProperty("text-indent")){let t=e.styles["text-indent"];t=t.endsWith("em")?parseFloat(t):0,e.styles["text-indent"]=`${t+2}em`}else e.styles["text-indent"]="2em";else e.styles={"text-indent":"2em"}};if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),r=e.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}))},Ss=(e,t)=>{if(!e.range)return;const n=e=>{if(e.hasStyles()&&e.styles.hasOwnProperty("text-indent")){let t=e.styles["text-indent"];t=t.endsWith("em")?parseFloat(t):0,e.styles["text-indent"]=(t-2>=0?t-2:0)+"em"}};if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),r=e.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}))},Ts=(e,t)=>{if(!e.range)return;const n=is(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),n||(t.parsedom="blockquote")}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{bs(e),n||(e.parsedom="blockquote")}))}},_s=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r?r.hasStyles()?r.styles["text-align"]=n:r.styles={"text-align":n}:t.hasStyles()?t.styles["text-align"]=n:t.styles={"text-align":n}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["text-align"]=n:e.element.styles={"text-align":n};else{const t=e.element.getBlock(),r=e.element.getInblock();r?r.hasStyles()?r.styles["text-align"]=n:r.styles={"text-align":n}:t.hasStyles()?t.styles["text-align"]=n:t.styles={"text-align":n}}}))},Cs=(e,t,n)=>{if(!e.range)return;const r=Wl(e,t,n);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();r?bs(t):vs(t,n)}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{r?bs(e):vs(e,n)}))}},Ns=(e,t)=>{if(!e.range)return;const n=Zl(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();n?bs(t):ys(t)}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{n?bs(e):ys(e)}))}},Bs=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r?r.hasStyles()?r.styles["line-height"]=n:r.styles={"line-height":n}:t.hasStyles()?t.styles["line-height"]=n:t.styles={"line-height":n}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["line-height"]=n:e.element.styles={"line-height":n};else{const t=e.element.getBlock(),r=e.element.getInblock();r?r.hasStyles()?r.styles["line-height"]=n:r.styles={"line-height":n}:t.hasStyles()?t.styles["line-height"]=n:t.styles={"line-height":n}}}))},Ms=(e,t,n,r)=>{if(!e.range)return;t||(t=n);const a={href:n};r&&(a.target="_blank");const o=y.create({type:"inline",parsedom:"a",marks:a,children:[{type:"text",textContent:t}]});e.insertElement(o)},zs=(e,t)=>{if(!e.range)return;const n=y.create({type:"closed",parsedom:"img",marks:{src:t}});e.insertElement(n)},As=(e,t)=>{if(!e.range)return;const n=y.create({type:"closed",parsedom:"video",marks:{src:t}});e.insertElement(n),e.range.anchor.moveToEnd(n),e.range.focus.moveToEnd(n)},Os=(e,t,n)=>{if(!e.range)return;const r=[];for(let i=0;i<t;i++){const e=[];for(let t=0;t<n;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});r.push({type:"inblock",parsedom:"tr",children:e})}const a=y.create({type:"block",parsedom:"table",children:[{type:"inblock",parsedom:"tbody",children:r}]});e.insertElement(a);const o=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(o,a),e.range.anchor.moveToStart(a),e.range.focus.moveToStart(a)},Is=(e,t)=>{if(!e.range)return;const n=Hl(e,t,{parsedom:"pre"});if(n){let t="";y.flatElements(n.children).filter((e=>e.isText())).forEach((e=>{t+=e.textContent}));t.split("\n").forEach((t=>{const r=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"text",textContent:t}]});e.addElementBefore(r,n)})),n.toEmpty()}else if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),t.parsedom="pre";const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(n,t)}else{e.range.anchor.moveToStart(t.list[0].element.getBlock()),e.range.focus.moveToEnd(t.list[t.list.length-1].element.getBlock());const n={};e.getElementsByRange().flatList.filter((e=>e.element.isText())).forEach((e=>{n[`_${e.element.getBlock().key}`]?n[`_${e.element.getBlock().key}`].push(e.element.clone()):n[`_${e.element.getBlock().key}`]=[e.element.clone()]}));const r=y.create({type:"block",parsedom:"pre"});Object.keys(n).forEach(((t,a)=>{if(a>0){const t=y.create({type:"text",textContent:"\n"});r.hasChildren()?e.addElementTo(t,r,r.children.length):e.addElementTo(t,r)}n[t].forEach((t=>{r.hasChildren()?e.addElementTo(t,r,r.children.length):e.addElementTo(t,r)}))})),e.delete(),e.insertElement(r);const a=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(a,r)}},Rs=e=>{if(!e.range)return;const t=y.create({type:"closed",parsedom:"hr"});e.insertElement(t),e.range.anchor.moveToEnd(t),e.range.focus.moveToEnd(t)},Ls=(e,t,n)=>{const r={"data-editify-attachment":t,"data-editify-attachment-name":n},a=y.create({type:"closed",parsedom:"span",marks:r});e.insertElement(a),e.range.anchor.moveToEnd(a),e.range.focus.moveToEnd(a)},Ds=(e,t,n,r)=>{if(!n)return;const a=Hl(e,t,{parsedom:"span",marks:{"data-editify-mathformula":!0}});if(a){a.toEmpty();const t=e.getNextElement(a);e.range.anchor.moveToStart(t),e.range.focus.moveToStart(t)}let o="";try{o=Ll(n,{output:"mathml",throwOnError:!0})}catch(i){o="","function"==typeof r&&r(i)}if(o){const t=`<span data-editify-mathformula="${n}" contenteditable="false">${o}</span>`,r=e.parseHtml(t);e.insertElement(r[0]),e.range.anchor.moveToEnd(r[0]),e.range.focus.moveToEnd(r[0]),e.domRender(),e.rangeRender()}},$s=(e,t)=>{const n=rs(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),n||(t.parsedom="div",t.marks={"data-editify-info":"true"})}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{bs(e),n||(e.parsedom="div",e.marks={"data-editify-info":"true"})}))}},{Mac:js}=ge.os(),Ps={heading:{title:(js?"Command":"Ctrl")+" + [1-7]",define:e=>({h1:"1"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h2:"2"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h3:"3"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h4:"4"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h5:"5"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h6:"6"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),p:"7"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey)}),operation:(e,t,n,r,a)=>{n.value||as(e,t)||os(e,t)||(ks(e,t,a),e.domRender(),e.rangeRender())}},indent:{title:"Tab / Shift + Tab",define:e=>({"indent-increase":!("tab"!=e.key.toLocaleLowerCase()||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey),"indent-decrease":"tab"==e.key.toLocaleLowerCase()&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey}),operation:(e,t,n,r,a)=>{n.value||as(e,t)||os(e,t)||("indent-increase"==a?Es(e,t):"indent-decrease"==a&&Ss(e,t),e.domRender(),e.rangeRender())}},quote:{title:(js?"Command":"Ctrl")+" + E",define:e=>"e"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},separator:{title:"",define:null,operation:null},align:{title:"",define:null,operation:null},orderList:{title:(js?"Command":"Ctrl")+" + O",define:e=>"o"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},unorderList:{title:(js?"Command":"Ctrl")+" + U",define:e=>"u"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},task:{title:(js?"Command":"Ctrl")+" + I",define:e=>"i"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},bold:{title:(js?"Command":"Ctrl")+" + B",define:e=>"b"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},underline:{title:(js?"Command":"Ctrl")+" + G",define:e=>"g"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},italic:{title:(js?"Command":"Ctrl")+" + H",define:e=>"h"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},strikethrough:{title:(js?"Command":"Ctrl")+" + J",define:e=>"j"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},code:{title:(js?"Command":"Ctrl")+" + K",define:e=>"k"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},super:{title:(js?"Command":"Ctrl")+" + L",define:e=>"l"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},sub:{title:(js?"Command":"Ctrl")+" + M",define:e=>"m"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},formatClear:{title:(js?"Command":"Ctrl")+" + Enter",define:e=>"enter"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},fontSize:{title:"",define:null,operation:null},fontFamily:{title:"",define:null,operation:null},lineHeight:{title:"",define:null,operation:null},foreColor:{title:"",define:null,operation:null},backColor:{title:"",define:null,operation:null},link:{title:"",define:null,operation:null},image:{title:"",define:null,operation:null},video:{title:"",define:null,operation:null},table:{title:"",define:null,operation:null},codeBlock:{title:(js?"Command":"Ctrl")+" + P",define:e=>"p"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},sourceView:{title:(js?"Command":"Ctrl")+" + 8",define:e=>"8"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},fullScreen:{title:(js?"Command":"Ctrl")+" + 9",define:e=>"9"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},attachment:{title:"",define:null,operation:null},mathformula:{title:"",define:null,operation:null},infoBlock:{title:(js?"Command":"Ctrl")+" + 0",define:e=>"0"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null}},Fs=(e,t)=>{if(!de.isObject(e)&&de.isObject(t))return null;for(let n in t)de.isObject(t[n])&&!Array.isArray(t[n])&&de.isObject(e[n])&&!Array.isArray(e[n])?e[n]=Fs(e[n],t[n]):e[n]=t[n];return e},qs=(e,t,n)=>{if(null==n||null==n)return e.hasOwnProperty(t);let r=e[t];if(null==r||null==r)return!1;if("string"==typeof n&&(n=n.toLocaleLowerCase()),"string"==typeof r&&(r=r.toLocaleLowerCase()),"string"==typeof n&&n&&(de.matchingText(n,"rgb")||de.matchingText(n,"rgba"))&&(n=ie.trim(n,!0)),"string"==typeof r&&r&&(de.matchingText(r,"rgb")||de.matchingText(r,"rgba"))&&(r=ie.trim(r,!0)),"string"==typeof n&&n&&de.matchingText(n,"hex")){const e=pe.hex2rgb(n);n=`rgb(${e[0]},${e[1]},${e[2]})`}if("string"==typeof r&&r&&de.matchingText(r,"hex")){const e=pe.hex2rgb(r);r=`rgb(${e[0]},${e[1]},${e[2]})`}return r==n},Hs=e=>({heading:[{label:e("text"),value:"p"},{label:e("h1"),value:"h1",style:{fontSize:"26px",fontWeight:"bold"}},{label:e("h2"),value:"h2",style:{fontSize:"24px",fontWeight:"bold"}},{label:e("h3"),value:"h3",style:{fontSize:"22px",fontWeight:"bold"}},{label:e("h4"),value:"h4",style:{fontSize:"20px",fontWeight:"bold"}},{label:e("h5"),value:"h5",style:{fontSize:"18px",fontWeight:"bold"}},{label:e("h6"),value:"h6",style:{fontSize:"16px",fontWeight:"bold"}}],indent:[{label:e("indentIncrease"),value:"indent-increase",icon:"indent-increase"},{label:e("indentDecrease"),value:"indent-decrease",icon:"indent-decrease"}],align:[{label:e("alignLeft"),value:"left",icon:"align-left"},{label:e("alignRight"),value:"right",icon:"align-right"},{label:e("alignCenter"),value:"center",icon:"align-center"},{label:e("alignJustify"),value:"justify",icon:"align-justify"}],fontSize:[{label:e("defaultSize"),value:""},{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"40px",value:"40px"}],fontFamily:[{label:e("defaultFontFamily"),value:""},{label:"黑体",value:"黑体,黑体-简"},{label:"华文仿宋",value:"华文仿宋"},{label:"楷体",value:"楷体,楷体-简"},{label:"华文楷体",value:"华文楷体"},{label:"宋体",value:"宋体,宋体-简"},{label:"Arial",value:"Arial"},{label:"Consolas",value:"Consolas,monospace"}],lineHeight:[{label:e("defaultLineHeight"),value:""},1,1.15,1.5,2,2.5,3],foreColor:["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"],backColor:["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"]}),Vs=(e,t)=>{if(t.isEmpty()||"th"!=t.parsedom||(t.parsedom="td"),t.hasChildren()&&"table"==t.parsedom){t.hasMarks()?Object.assign(t.marks,{"data-editify-element":t.key}):t.marks={"data-editify-element":t.key};const n=y.flatElements(t.children),r=n.filter((e=>"tr"==e.parsedom)),{rowNumber:a,columnNumber:o}=Pl(r);let i=n.find((e=>"colgroup"==e.parsedom));if(i){i.children.forEach((e=>{e.hasMarks()?e.marks.width||(e.marks.width="auto"):e.marks={width:"auto"}}));const t=i.children.length;if(t<o)for(let n=0;n<o-t;n++){const t=y.create({type:"closed",parsedom:"col",marks:{width:"auto"}});e.addElementTo(t,i,i.children.length)}}else{const e=[];for(let t=o-1;t>=0;t--)e.push({type:"closed",parsedom:"col",marks:{width:"auto"}});i=y.create({type:"inblock",parsedom:"colgroup",children:e})}((e,t,n,r)=>{y.flatElements(t).forEach((t=>{if("td"==t.parsedom&&t.hasMarks()){t.marks["data-editify-merged"]&&delete t.marks["data-editify-merged"];const n=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),a=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(n>1){let a=1;for(;a<n&&t.parent.children.length<r;){const n=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(n,t),a++}}if(a>1){let o=t,i=1;for(;i<a&&e.getNextElement(o.parent)&&e.getNextElement(o.parent).children.length<r;){const t=e.getNextElement(o.parent),r=o.parent.children.findIndex((e=>e.isEqual(o))),a=t.children[r];for(let o=0;o<n;o++){const n=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});a?e.addElementBefore(n,a):e.addElementTo(n,t,t.children.length)}o=t.children[r],i++}}}})),t.forEach((t=>{const n=t.children.length;if(n<r)for(let a=0;a<r-n;a++){const n=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});e.addElementTo(n,t,t.children.length)}}));const a=t.length;if(a<n)for(let o=0;o<n-a;o++){const e=[];for(let t=0;t<r;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const n=y.create({type:"inblock",parsedom:"tr",children:e});t.push(n)}})(e,r,a,o),t.children=[];const l=y.create({type:"inblock",parsedom:"tbody"});r.forEach((t=>{const n=l.hasChildren()?l.children.length:0;e.addElementTo(t,l,n)})),e.addElementTo(l,t),e.addElementTo(i,t),((e,t)=>{y.flatElements(t).filter((e=>"td"==e.parsedom)).forEach((t=>{if(t.hasMarks()&&!t.marks["data-editify-merged"]){const n=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),r=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(n>1){let r=t,a=1;for(;a<n;){const t=e.getNextElement(r);if(!t)break;t.hasMarks()?t.marks["data-editify-merged"]="true":t.marks={"data-editify-merged":"true"},r=t,a++}}if(r>1){const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=t,i=1;for(;i<r&&o&&e.getNextElement(o.parent);){const t=e.getNextElement(o.parent);for(let e=a;e<a+n;e++){const n=t.children[e];n&&(n.hasMarks()?n.marks["data-editify-merged"]="true":n.marks={"data-editify-merged":"true"})}o=t.children[a],i++}}}}))})(e,r)}if(!t.isEmpty()&&"td"==t.parsedom&&t.hasMarks()&&t.marks["data-editify-merged"]&&e.range){const n=(t,n)=>{let r=!1,a=e.getPreviousElement(t),o=1;for(;a;){const{colspan:t}=jl(a);if(a.hasMarks()&&!a.marks["data-editify-merged"]&&t>o){r=!0,n(a);break}a=e.getPreviousElement(a),o++}return r},r=(t,n)=>{let r=!1;const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=e.getPreviousElement(t.parent),i=1;for(;o;){const t=o.children[a],{rowspan:l}=jl(t);if(t.hasMarks()&&!t.marks["data-editify-merged"]&&l>i){r=!0,n(t);break}o=e.getPreviousElement(o),i++}return r};if(t.isContains(e.range.anchor.element)){n(t,(t=>{e.range.anchor.moveToEnd(t)}))||r(t,(t=>{e.range.anchor.moveToEnd(t)}))}if(t.isContains(e.range.focus.element)){n(t,(t=>{e.range.focus.moveToEnd(t)}))||r(t,(t=>{e.range.focus.moveToEnd(t)}))}}},Us=(e,t,n,r)=>{if(!t.isEmpty()&&"pre"==t.parsedom){const a={"data-editify-element":t.key};if(t.hasMarks()?Object.assign(t.marks,a):t.marks=a,n&&t.hasChildren()){let n=t.marks["data-editify-hljs"]||"";if(n&&r){r.some((e=>de.isObject(e)?e.value==n:e==n))||(n="")}const a=y.flatElements(t.children).filter((e=>e.isText()&&!e.isEmpty())),o=function(e,t){return t?Bt.highlight(e,{language:t,ignoreIllegals:!0}).value:Bt.highlightAuto(e).value}(a.reduce(((e,t)=>e+t.textContent),""),n);if(o){const n=e.parseHtml(o);t.children=n,n.forEach((e=>{e.parent=t})),((e,t,n,r)=>{if(e.range){if(e.range.anchor.element.getBlock().isEqual(t)){const t=n.findIndex((t=>e.range.anchor.element.isEqual(t))),a=n.filter(((e,n)=>n<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.anchor.offset,o=y.flatElements(r).filter((e=>e.isText()&&!e.isEmpty()));let i=0,l=0;for(;i<o.length;){let t=l+o[i].textContent.length;if(a>=l&&a<=t){e.range.anchor.element=o[i],e.range.anchor.offset=a-l;break}i++,l=t}}if(e.range.focus.element.getBlock().isEqual(t)){const t=n.findIndex((t=>e.range.focus.element.isEqual(t))),a=n.filter(((e,n)=>n<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.focus.offset,o=y.flatElements(r).filter((e=>e.isText()&&!e.isEmpty()));let i=0,l=0;for(;i<o.length;){let t=l+o[i].textContent.length;if(a>=l&&a<=t){e.range.focus.element=o[i],e.range.focus.offset=a-l;break}i++,l=t}}}})(e,t,a,n)}else{const n=y.create({type:"closed",parsedom:"br"});t.children=[n],n.parent=t,e.range&&(e.range.anchor.moveToStart(n),e.range.focus.moveToStart(n))}}}},Ws={textWrapUp:"up feed",textWrapDown:"down feed",insertRowTop:"insert row forward",insertRowBottom:"insert row backward",insertColumnLeft:"insert column forward",insertColumnRight:"insert column backward",deleteRow:"delete rows",deleteColumn:"delete column",mergeCellsLeft:"merge cells to the left",mergeCellsRight:"merge cells to the right",mergeCellsUp:"merge cells up",mergeCellsDown:"merge cells down",deleteTable:"delete table",selectLanguages:"select language",autoRecognize:"auto",linkAddress:"link address",newWindowOpen:"open in new window",removeLink:"remove",viewLink:"view",linkUrlEnterPlaceholder:"please enter the link address",linkTextEnterPlaceholder:"please enter the link text",width30:"set the width to 30%",width50:"set the width to 50%",width100:"set the width to 100%",deleteImage:"delete image",autoplay:"autoplay",disabledAutoplay:"turn off autoplay",loop:"loop",disabledLoop:"close loop",muted:"mute",unmuted:"unmute",controls:"play control",deleteVideo:"delete video",heading:"heading",bold:"bold",h1:"heading 1",h2:"heading 2",h3:"heading 3",h4:"heading 4",h5:"heading 5",h6:"heading 6",text:"paragraph",italic:"italic",orderList:"ordered list",unorderList:"unordered list",strikethrough:"strikethrough",underline:"underline",code:"inline code",super:"superscript",sub:"subscript",fontSize:"font size",fontFamily:"font family",defaultFontFamily:"default",foreColor:"forecolor",defaultColor:"default color",backColor:"backcolor",formatClear:"clear format",defaultSize:"default",totalWordCount:"total word count: ",align:"alignment mode",undo:"undo",redo:"redo",quote:"quote",separator:"separator",lineHeight:"line height",indent:"indent",insertLink:"insert Link",insertImage:"insert Image",remoteImage:"remote",uploadImage:"upload",imageUrlPlaceholder:"please enter the image address",insert:"insert",insertVideo:"insert Video",remoteVideo:"remote",uploadVideo:"upload",videoUrlPlaceholder:"please enter the video address",insertTable:"insert table",inserCodeBlock:"insert code block",sourceView:"code view",task:"task",indentIncrease:"increase indent",indentDecrease:"reduce indent",alignLeft:"align left",alignCenter:"align center",alignRight:"align right",alignJustify:"align justify",defaultLineHeight:"default",auto:"auto",fullScreen:"full screen",confirm:"confirm",insertAttachment:"insert attachment",uploadAttachment:"upload",remoteAttachment:"remote",attachmentNamePlaceholder:"please enter the attachment name",attachmentUrlPlaceholder:"please enter the attachment address",attachmentDownloadTitle:"click to download attachment",attachmentDefaultName:"attachment",insertMathformula:"insert mathematical formula",editMathformula:"edit mathematical formula",mathformulaPlaceholder:"please enter latex syntax",insertInfoBlock:"insert Information Block",decimal:"decimal",lowerRoman:"lower roman",upperRoman:"upper roman",lowerAlpha:"lower alpha",upperAlpha:"upper alpha",lowerGreek:"lower greek",cjkIdeographic:"cjk ideographic",disc:"disc",circle:"circle",square:"square"},Ks={textWrapUp:"向上换行",textWrapDown:"向下换行",insertRowTop:"向前插入行",insertRowBottom:"向后插入行",insertColumnLeft:"向前插入列",insertColumnRight:"向后插入列",deleteRow:"删除行",deleteColumn:"删除列",mergeCellsLeft:"向左合并单元格",mergeCellsRight:"向右合并单元格",mergeCellsUp:"向上合并单元格",mergeCellsDown:"向下合并单元格",deleteTable:"删除表格",selectLanguages:"选择语言",autoRecognize:"自动识别",linkAddress:"链接地址",newWindowOpen:"新窗口打开",removeLink:"移除链接",viewLink:"查看链接",linkUrlEnterPlaceholder:"请输入链接地址",linkTextEnterPlaceholder:"请输入链接文本",width30:"30%宽度",width50:"50%宽度",width100:"100%宽度",deleteImage:"删除图片",autoplay:"自动播放",disabledAutoplay:"关闭自动播放",loop:"循环播放",disabledLoop:"关闭循环播放",muted:"静音",unmuted:"播放声音",controls:"播放控制",deleteVideo:"删除视频",heading:"标题",bold:"粗体",h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题",text:"正文",italic:"斜体",orderList:"有序列表",unorderList:"无序列表",strikethrough:"删除线",underline:"下划线",code:"行内代码",super:"上标",sub:"下标",fontSize:"字号",fontFamily:"字体",defaultFontFamily:"默认字体",foreColor:"前景色",defaultColor:"默认颜色",backColor:"背景色",formatClear:"清除格式",defaultSize:"默认字号",totalWordCount:"总字数:",align:"对齐方式",undo:"撤销",redo:"重做",quote:"引用",separator:"分隔线",lineHeight:"行高",indent:"缩进",insertLink:"插入链接",insertImage:"插入图片",remoteImage:"网络图片",uploadImage:"上传图片",imageUrlPlaceholder:"请输入图片地址",insert:"插入",insertVideo:"插入视频",remoteVideo:"网络视频",uploadVideo:"上传视频",videoUrlPlaceholder:"请输入视频地址",insertTable:"插入表格",inserCodeBlock:"插入代码块",sourceView:"代码视图",task:"待办",indentIncrease:"增加缩进",indentDecrease:"减少缩进",alignLeft:"左对齐",alignCenter:"居中对齐",alignRight:"右对齐",alignJustify:"两端对齐",defaultLineHeight:"默认行高",auto:"自适应",fullScreen:"全屏",confirm:"确定",insertAttachment:"插入附件",uploadAttachment:"上传附件",remoteAttachment:"远程地址",attachmentNamePlaceholder:"请输入附件名称",attachmentUrlPlaceholder:"请输入附件地址",attachmentDownloadTitle:"点击下载附件",attachmentDefaultName:"附件",insertMathformula:"插入数学公式",editMathformula:"编辑数学公式",mathformulaPlaceholder:"请输入LaTex语法",insertInfoBlock:"插入信息块",decimal:"默认数字",lowerRoman:"小写罗马数字",upperRoman:"大写罗马数字",lowerAlpha:"小写英文字母",upperAlpha:"大写英文字母",lowerGreek:"小写希腊字母",cjkIdeographic:"表意数字",disc:"实心圆",circle:"空心圆",square:"实心方块"},Gs={placement:{type:String,default:"top",validator:e=>["top","left","right","bottom"].includes(e)},color:{type:String,default:null},background:{type:String,default:null}},Zs=["data-editify-placement"],Xs=t.defineComponent({name:"Triangle",__name:"triangle",props:Gs,setup(e){const n=e,r=t.computed((()=>"top"==n.placement?{borderBottomColor:n.color||""}:"bottom"==n.placement?{borderTopColor:n.color||""}:"left"==n.placement?{borderRightColor:n.color||""}:"right"==n.placement?{borderLeftColor:n.color||""}:{})),a=t.computed((()=>"top"==n.placement?{borderBottomColor:n.background||""}:"bottom"==n.placement?{borderTopColor:n.background||""}:"left"==n.placement?{borderRightColor:n.background||""}:"right"==n.placement?{borderLeftColor:n.background||""}:{}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"editify-triangle",style:t.normalizeStyle(r.value),"data-editify-placement":e.placement},[t.createElementVNode("div",{class:"editify-triangle-el",style:t.normalizeStyle(a.value)},null,4)],12,Zs))}}),Ys=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Qs=Ys(Xs,[["__scopeId","data-v-c57a8f5f"]]),Js={modelValue:{type:Boolean,default:!1},node:{type:[String,HTMLElement],default:null},scrollNode:{type:[String,HTMLElement],default:null},border:{type:Boolean,default:!1},borderColor:{type:String,default:null},background:{type:String,default:null},color:{type:String,default:null},placement:{type:String,default:"bottom",validator:e=>["top","bottom","top-start","top-end","bottom-start","bottom-end"].includes(e)},showTriangle:{type:Boolean,default:!1},zIndex:{type:Number,default:1},animation:{type:String,default:null,validator:e=>["translate","fade",null].includes(e)},useRange:{type:Boolean,default:!1},insideElements:{type:Array,default:function(){return[]}}},ec=["data-editify-placement"],tc=Ys(t.defineComponent({name:"Layer",__name:"layer",props:Js,emits:["update:modelValue","show","shown","hidden"],setup(e,{expose:n,emit:r}){const a=t.getCurrentInstance(),o=e,i=r,l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.ref(null),u=t.computed((()=>"bottom-start"==l.value||"bottom"==l.value||"bottom-end"==l.value?"top":"top-start"==l.value||"top"==l.value||"top-end"==l.value?"bottom":"left-start"==l.value||"left"==l.value||"left-end"==l.value?"right":"right-start"==l.value||"right"==l.value||"right-end"==l.value?"left":"top")),m=t.computed((()=>({borderColor:o.border&&o.borderColor||"",background:o.background||"",color:o.color||""}))),h=()=>o.node?le.isElement(o.node)?o.node:document.body.querySelector(o.node):null,p=()=>o.scrollNode?le.isElement(o.scrollNode)?o.scrollNode:document.body.querySelector(o.scrollNode):null,f=()=>{l.value=null;const e=window.getSelection();if(e&&e.rangeCount){const n=e.getRangeAt(0).getClientRects();if(n.length){const e=n[0],r=n[n.length-1],a=document.documentElement.clientHeight||window.innerHeight,i=document.documentElement.clientWidth||window.innerWidth,u=le.getElementBounding(p()||document.documentElement);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?e.top>=u.top&&e.top>=c.value.offsetHeight?l.value=o.placement:a-r.bottom>=u.bottom&&a-r.bottom>=c.value.offsetHeight&&(l.value="top"==o.placement?"bottom":"top-start"==o.placement?"bottom-start":"bottom-end"):"bottom"!=o.placement&&"bottom-start"!=o.placement&&"bottom-end"!=o.placement||(a-r.bottom>=u.bottom&&a-r.bottom>=c.value.offsetHeight?l.value=o.placement:e.top>=u.top&&e.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?i-e.right+e.width/2<c.value.offsetWidth/2?l.value="top-end":e.left+e.width/2<c.value.offsetWidth/2&&(l.value="top-start"):"bottom"==l.value?i-r.right+r.width/2<c.value.offsetWidth/2?l.value="bottom-end":r.left+r.width/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"top-start"==l.value?i-e.right+e.width<c.value.offsetWidth&&(i-e.right+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"bottom-start"==l.value?i-r.right+r.width<c.value.offsetWidth&&(i-r.right+r.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"top-end"==l.value?e.left+e.width<c.value.offsetWidth&&(e.left+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom-end"==l.value&&r.left+r.width<c.value.offsetWidth&&(r.left+r.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=e.left+"px",c.value.style.right="auto",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=i-e.right+"px",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=r.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=i-r.right+"px",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=Math.max(u.bottom,0)+"px","top"==o.placement?i-e.right+e.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):e.left+e.width/2<c.value.offsetWidth/2?(c.value.style.left=e.left+"px",c.value.style.right="auto"):(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"bottom"==o.placement?i-r.right+r.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=i-r.right+"px"):r.left+r.width/2<c.value.offsetWidth/2?(c.value.style.left=r.left+"px",c.value.style.right="auto"):(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement?i-e.right+e.width<c.value.offsetWidth?i-e.right+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):(c.value.style.left=e.left+"px",c.value.style.right="auto"):"bottom-start"==o.placement?i-r.right+r.width<c.value.offsetWidth?i-r.right+r.width/2>=c.value.offsetWidth/2?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-r.right+"px"):(c.value.style.left=r.left+"px",c.value.style.right="auto"):"top-end"==o.placement?e.left+e.width<c.value.offsetWidth?e.left+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=e.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):"bottom-end"==o.placement&&(r.left+r.width<c.value.offsetWidth?r.left+r.width/2>=c.value.offsetWidth/2?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=r.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-r.right+"px"))),o.showTriangle&&(()=>{const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0).getClientRects();if(t.length){const e=t[0],n=t[t.length-1];"top"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.width?e.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.width?e.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"bottom"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>n.width?n.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>n.width?n.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=1-d.value.$el.offsetHeight+"px",d.value.$el.style.bottom="auto")}}})()}))}}},g=()=>{const e=h();if(!le.isElement(e))return;l.value=null;const n=le.getElementBounding(e),r=le.getElementBounding(p()||document.documentElement);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?n.top>=r.top&&n.top>=c.value.offsetHeight?l.value=o.placement:n.bottom>=r.bottom&&n.bottom>=c.value.offsetHeight&&(l.value="top"==o.placement?"bottom":"top-start"==o.placement?"bottom-start":"bottom-end"):"bottom"!=o.placement&&"bottom-start"!=o.placement&&"bottom-end"!=o.placement||(n.bottom>=r.bottom&&n.bottom>=c.value.offsetHeight?l.value=o.placement:n.top>=r.top&&n.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?n.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="top-end":n.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="top-start"):"top-start"==l.value?n.right+e.offsetWidth<c.value.offsetWidth&&(n.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"top-end"==l.value?n.left+e.offsetWidth<c.value.offsetWidth&&(n.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom"==l.value?n.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="bottom-end":n.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"bottom-start"==l.value?n.right+e.offsetWidth<c.value.offsetWidth&&(n.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"bottom-end"==l.value&&n.left+e.offsetWidth<c.value.offsetWidth&&(n.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=n.left+"px",c.value.style.right="auto",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=n.right+"px",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=n.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=n.right+"px",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=Math.max(r.bottom,0)+"px","top"==o.placement||"bottom"==o.placement?n.right+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=n.right+"px"):n.left+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left=n.left+"px",c.value.style.right="auto"):(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement||"bottom-start"==o.placement?n.right+e.offsetWidth<c.value.offsetWidth?n.right+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=n.right+"px"):(c.value.style.left=n.left+"px",c.value.style.right="auto"):"top-end"!=o.placement&&"bottom-end"!=o.placement||(n.left+e.offsetWidth<c.value.offsetWidth?n.left+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=n.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=n.right+"px"))),o.showTriangle&&(()=>{const e=h();le.isElement(e)&&("top"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"bottom"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=1-d.value.$el.offsetHeight+"px",d.value.$el.style.bottom="auto"))})()}))},b=()=>{o.useRange?f():g()},v=e=>{b(),i("show",e)},y=()=>{o.modelValue&&i("update:modelValue",!1)},w=e=>{le.isElement(c.value)&&(le.isContains(c.value,e.target)||!o.useRange&&h()&&le.isContains(h(),e.target)||o.insideElements.some((t=>le.isContains(t,e.target)))||o.modelValue&&i("update:modelValue",!1))};return t.watch((()=>o.modelValue),(e=>{e&&t.nextTick((()=>{(()=>{const e=t=>{he.on(t,`scroll.editify_layer_${a.uid}`,(()=>{o.modelValue&&i("update:modelValue",!1)})),t.parentNode&&e(t.parentNode)},t=h()||p();t&&e(t)})()}))}),{immediate:!0}),t.onMounted((()=>{o.modelValue&&b(),he.on(window,`mousedown.editify_layer_${a.uid}`,w),he.on(window,`resize.editify_layer_${a.uid}`,y)})),t.onBeforeUnmount((()=>{(()=>{const e=t=>{he.off(t,`scroll.editify_layer_${a.uid}`),t.parentNode&&e(t.parentNode)},t=h()||p();t&&e(t)})(),he.off(window,`mousedown.editify_layer_${a.uid} resize.editify_layer_${a.uid}`)})),n({setPosition:b,elRef:c}),(e,n)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:e.animation?"editify-layer-"+e.animation:"editify-layer",onEnter:v,onAfterEnter:n[0]||(n[0]=e=>i("shown",e)),onAfterLeave:n[1]||(n[1]=e=>i("hidden",e))},{default:t.withCtx((()=>[e.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"editify-layer","data-editify-placement":l.value||null,style:t.normalizeStyle({zIndex:e.zIndex}),ref_key:"elRef",ref:c},[e.showTriangle?(t.openBlock(),t.createBlock(t.unref(Qs),{key:0,color:e.border&&e.borderColor?e.borderColor:e.background,background:e.background,placement:u.value,ref_key:"triangleRef",ref:d},null,8,["color","background","placement"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"wrapRef",ref:s,class:t.normalizeClass(["editify-layer-wrap",{"editify-border":e.border}]),style:t.normalizeStyle(m.value)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],12,ec)):t.createCommentVNode("",!0)])),_:3},8,["name"])]))}}),[["__scopeId","data-v-7e930b66"]]),nc={content:{type:String,default:""},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},rc={class:"editify-tooltip-content"},ac=Ys(t.defineComponent({name:"Tooltip",__name:"tooltip",props:nc,setup(e){const n=e,r=t.inject("isDark"),a=t.ref(!1),o=t.ref(null),i=()=>{n.disabled||(a.value=!0)},l=()=>{n.disabled||(a.value=!1)};return(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{ref_key:"targetRef",ref:o,class:t.normalizeClass(["editify-tooltip",{"editify-block":e.block}]),onMouseenter:i,onMouseleave:l},[t.renderSlot(e.$slots,"default",{},void 0,!0)],34),t.createVNode(t.unref(tc),{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),node:o.value,border:"","border-color":t.unref(r)?"#e8e8e8":"#1a1a1a",background:t.unref(r)?"#e8e8e8":"#1a1a1a","show-triangle":"",color:t.unref(r)?"#1a1a1a":"#e8e8e8",placement:"bottom",animation:"fade","z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",rc,t.toDisplayString(e.content),1)])),_:1},8,["modelValue","node","border-color","background","color","z-index"])],64))}}),[["__scopeId","data-v-9b9ca2a9"]]),oc={value:{type:String,default:""}},ic=Ys(t.defineComponent({name:"Icon",__name:"icon",props:oc,setup:e=>(e,n)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["editify-icon","editify-icon-"+e.value])},null,2))}),[["__scopeId","data-v-6e00035b"]]),lc={type:{type:String,default:"default",validator:e=>["default","select","display"].includes(e)},name:{type:String,default:""},title:{type:String,default:""},tooltip:{type:Boolean,default:!1},rightBorder:{type:Boolean,default:!1},leftBorder:{type:Boolean,default:!1},color:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},selectConfig:{type:Object,default:null},displayConfig:{type:Object,default:null},hideScroll:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},sc={class:"editify-button"},cc={key:0,class:"editify-button-slot"},dc={key:1},uc={key:1,class:"editify-button-options"},mc=["onClick"],hc={key:1,class:"editify-button-option-flex"},pc=Ys(t.defineComponent({name:"Button",__name:"button",props:lc,emits:["operate","layerShow","layerShown","layerHidden"],setup(e,{expose:n,emit:r}){const a=e,o=r,i=t.ref(!1),l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.computed((()=>{let e=[],t="",n="";return de.isObject(a.selectConfig)&&(Array.isArray(a.selectConfig.options)&&(e=a.selectConfig.options.map((e=>de.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e}))),"number"==typeof a.selectConfig.width&&(t=a.selectConfig.width),"number"==typeof a.selectConfig.maxHeight&&(n=a.selectConfig.maxHeight)),{options:e,width:t,maxHeight:n}})),u=t.computed((()=>{let e=[],t="",n="",r="";if(de.isObject(a.displayConfig)){if("string"!=typeof a.displayConfig.value&&"number"!=typeof a.displayConfig.value||(r=a.displayConfig.value),Array.isArray(a.displayConfig.options)){e=a.displayConfig.options.map((e=>de.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e})),!e.find((e=>e.value==r))&&e[0]&&(r=e[0].value)}"number"==typeof a.displayConfig.width&&(t=a.displayConfig.width),"number"==typeof a.displayConfig.maxHeight&&(n=a.displayConfig.maxHeight)}return{options:e,width:t,maxHeight:n,value:r}})),m=t.computed((()=>"select"==a.type?d.value.options:u.value.options)),h=t.computed((()=>{const e=u.value.options.find((e=>e.value==u.value.value));return e?e.label:""})),p=t.computed((()=>a.color?pe.hex2rgb(a.color):[])),f=t.computed((()=>{if(!a.disabled&&a.color){if(a.active||"down"==l.value)return{color:a.color,backgroundColor:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.15)`};if("hover"==l.value)return{color:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.9)`,backgroundColor:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.05)`}}return{}})),g=()=>{a.disabled||("default"==a.type?o("operate",a.name):i.value=!i.value)};return n({show:i,status:l,layerRef:c,handleClick:g}),(e,n)=>(t.openBlock(),t.createElementBlock("div",sc,[t.createElementVNode("div",{class:t.normalizeClass(["editify-button-wrap",{"editify-right-border":e.rightBorder,"editify-left-border":e.leftBorder}])},[t.createVNode(t.unref(ac),{content:e.title,disabled:!e.tooltip,"z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"btnRef",ref:s,style:t.normalizeStyle(f.value),class:t.normalizeClass(["editify-button-el",{"editify-disabled":e.disabled,"editify-active":e.active}]),onMouseenter:n[0]||(n[0]=e=>l.value="hover"),onMouseleave:n[1]||(n[1]=e=>l.value=null),onMousedown:n[2]||(n[2]=e=>l.value="down"),onMouseup:n[3]||(n[3]=e=>l.value="hover"),onClick:g},["default"==e.type||"select"==e.type?(t.openBlock(),t.createElementBlock("div",cc,[t.renderSlot(e.$slots,"default",{},void 0,!0)])):"display"==e.type?(t.openBlock(),t.createElementBlock("div",dc,t.toDisplayString(h.value),1)):t.createCommentVNode("",!0),"select"==e.type||"display"==e.type?(t.openBlock(),t.createBlock(t.unref(ic),{key:2,value:"caret-down",class:t.normalizeClass(["editify-button-caret",{"editify-rotate":i.value}])},null,8,["class"])):t.createCommentVNode("",!0)],38)])),_:3},8,["content","disabled","z-index"]),t.createVNode(t.unref(tc),{ref_key:"layerRef",ref:c,modelValue:i.value,"onUpdate:modelValue":n[4]||(n[4]=e=>i.value=e),node:s.value,border:"",placement:"bottom-start","z-index":e.zIndex+1,animation:"translate",onShow:n[5]||(n[5]=e=>o("layerShow")),onShown:n[6]||(n[6]=e=>o("layerShown")),onHidden:n[7]||(n[7]=e=>o("layerHidden"))},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-button-layer",style:t.normalizeStyle({width:("select"==e.type?d.value.width:u.value.width)+"px",maxHeight:("select"==e.type?d.value.maxHeight:u.value.maxHeight)+"px",overflow:e.hideScroll?"visible":""})},[e.$slots.layer?t.renderSlot(e.$slots,"layer",{key:0,options:m.value},void 0,!0):(t.openBlock(),t.createElementBlock("div",uc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,(n=>(t.openBlock(),t.createElementBlock("div",{onClick:e=>(e=>{a.disabled||(o("operate",a.name,e.value),i.value=!1)})(n),class:t.normalizeClass(["editify-button-option",{"editify-active":"display"==e.type&&n.value==u.value.value}]),style:t.normalizeStyle(n.style||"")},[e.$slots.option?t.renderSlot(e.$slots,"option",{key:0,item:n},void 0,!0):(t.openBlock(),t.createElementBlock("div",hc,[n.icon?(t.openBlock(),t.createBlock(t.unref(ic),{key:0,value:n.icon},null,8,["value"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(n.label),1)]))],14,mc)))),256))]))],4)])),_:3},8,["modelValue","node","z-index"])],2)]))}}),[["__scopeId","data-v-d56d2e99"]]),fc={color:{type:String,default:""},defaultLaTexContent:{type:String,default:""}},gc={class:"editify-mathformula"},bc={class:"editify-mathformula-label"},vc=["placeholder"],yc={class:"editify-mathformula-footer"},wc=Ys(t.defineComponent({name:"InsertMathformula",__name:"insertMathformula",props:fc,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},s=e=>{e.currentTarget.style.borderColor=""},c=()=>{a("insert",i.value)};return t.watch((()=>r.defaultLaTexContent),(e=>{i.value=e}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createElementBlock("div",gc,[t.createElementVNode("div",bc,t.toDisplayString(r.defaultLaTexContent?t.unref(o)("editMathformula"):t.unref(o)("insertMathformula")),1),t.withDirectives(t.createElementVNode("textarea",{class:"editify-mathformula-textarea","onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e),placeholder:t.unref(o)("mathformulaPlaceholder"),onFocus:l,onBlur:s},null,40,vc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",yc,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:c},t.toDisplayString(t.unref(o)("confirm")),5)])]))}}),[["__scopeId","data-v-ae0ed37b"]]),xc="mathformula",kc=["math","mrow","mi","mo","mn","msup","msub","mfrac","msqrt","mroot","munder","mover","munderover","mtable","mtr","mtd","mtext","mspace","mmultiscripts","menclose","mglyph","maction","maligngroup","malignmark","mprescripts","none","mpadded","ms","mphantom","mstyle","merror","mscarries","mscarry","msline","msgroup","msrow","mscolumn","mstack","mlongdiv","mlabeledtr","mlabeledmultiscripts","semantics","msubsup"],Ec=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"span",marks:{"data-editify-mathformula":!0}});return e&&e.marks["data-editify-mathformula"]||""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:xc,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertMathformula")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!!Hl(r.value,a.value,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),disabled:e.disabled||i.value||as(r.value,a.value)||ls(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"mathformula"}),layer:()=>t.h(wc,{color:e.color,defaultLaTexContent:s.value,onInsert:t=>{Ds(r.value,a.value,t,e.config.handleError),l.value.show=!1}})}):null}}),{name:`_${xc}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Sc={modelValue:{type:Boolean,default:!1},node:{type:[String,Node],default:null},scrollNode:{type:[String,Node],default:null},type:{type:String,default:"text",validator:e=>["text","table","link","codeBlock","image","video","orderList","unorderList"].includes(e)},config:{type:Object,default:null},color:{type:String,default:""},zIndex:{type:Number,default:1}},Tc={disabled:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array],default:!1},label:{type:String,default:null},value:{type:[Object,Number,String,Array],default:""},round:{type:Boolean,default:!1},placement:{type:String,default:"right",validator:e=>["left","right"].includes(e)},color:{type:String,default:"",validator:e=>de.matchingText(e,"hex")}},_c=["data-editify-placement","textContent"],Cc=["value","disabled","checked"],Nc=["data-editify-placement","textContent"],Bc=Ys(t.defineComponent({name:"Checkbox",__name:"checkbox",props:Tc,emits:["update:modelValue","change"],setup(e,{emit:n}){const r=e,a=n,o=t.computed((()=>"boolean"==typeof r.modelValue?r.modelValue:!!Array.isArray(r.modelValue)&&r.modelValue.some((e=>de.equal(e,r.value))))),i=t.computed((()=>{let e={};return r.color&&o.value&&!r.disabled&&(e.backgroundColor=r.color,e.borderColor=r.color),e})),l=e=>{if(Array.isArray(r.modelValue)){let t=[...r.modelValue];e.target.checked&&!o.value?t.push(r.value):o.value&&(t=t.filter((e=>!de.equal(e,r.value)))),a("update:modelValue",t),a("change",t)}else"boolean"==typeof r.modelValue&&(a("update:modelValue",e.target.checked),a("change",e.target.checked))};return(e,n)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["editify-checkbox",{"editify-disabled":e.disabled}])},["left"==e.placement&&e.label?(t.openBlock(),t.createElementBlock("span",{key:0,class:"editify-checkbox-label","data-editify-placement":e.placement,textContent:t.toDisplayString(e.label)},null,8,_c)):t.createCommentVNode("",!0),t.createElementVNode("input",{onChange:l,value:e.value,disabled:e.disabled,checked:o.value,type:"checkbox"},null,40,Cc),t.createElementVNode("span",{class:t.normalizeClass(["editify-checkbox-item",{"editify-reverse":!e.color,"editify-round":e.round,"editify-checked":o.value&&!e.disabled}]),style:t.normalizeStyle(i.value)},[t.createVNode(t.unref(ic),{value:"check",style:t.normalizeStyle({opacity:o.value?"":0})},null,8,["style"])],6),"right"==e.placement&&e.label?(t.openBlock(),t.createElementBlock("span",{key:1,class:"editify-checkbox-label","data-editify-placement":e.placement,textContent:t.toDisplayString(e.label)},null,8,Nc)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-2ba291d8"]]),Mc={color:{type:String,default:""},presetUrl:{type:String,default:""},presetNewOpen:{type:Boolean,default:!1}},zc={class:"editify-link"},Ac={class:"editify-link-label"},Oc=["placeholder"],Ic={class:"editify-link-footer"},Rc={class:"editify-link-operations"},Lc=["href"],Dc=Ys(t.defineComponent({name:"UpdateLink",__name:"updateLink",props:Mc,emits:["remove","modify"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(!1);t.watch((()=>r.presetNewOpen),(e=>{l.value=!!e}),{immediate:!0}),t.watch((()=>r.presetUrl),(e=>{i.value=e||""}),{immediate:!0});const s=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},c=e=>{e.currentTarget.style.borderColor=""},d=()=>{a("remove")},u=()=>{a("modify",i.value,l.value)};return t.onBeforeUnmount((()=>{a("modify",i.value,l.value)})),(e,n)=>(t.openBlock(),t.createElementBlock("div",zc,[t.createElementVNode("div",Ac,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onChange:u,onFocus:s,onBlur:c,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e),type:"url"},null,40,Oc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",Ic,[t.createVNode(t.unref(Bc),{onChange:u,modelValue:l.value,"onUpdate:modelValue":n[1]||(n[1]=e=>l.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Rc,[t.createElementVNode("span",{onClick:d},t.toDisplayString(t.unref(o)("removeLink")),1),t.createElementVNode("a",{href:i.value,target:"_blank",style:t.normalizeStyle({color:e.color||""})},t.toDisplayString(t.unref(o)("viewLink")),13,Lc)])])]))}}),[["__scopeId","data-v-fa40f123"]]),$c={color:{type:String,default:""},presetText:{type:String,default:""}},jc={class:"editify-link"},Pc={class:"editify-link-label"},Fc=["placeholder"],qc=["placeholder"],Hc={class:"editify-link-footer"},Vc={class:"editify-link-operations"},Uc=Ys(t.defineComponent({name:"InsertLink",__name:"insertLink",props:$c,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(""),s=t.ref(!1);t.watch((()=>r.presetText),(e=>{l.value=e||""}),{immediate:!0});const c=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},d=e=>{e.currentTarget.style.borderColor=""},u=()=>{a("insert",l.value,i.value,s.value)};return(e,n)=>(t.openBlock(),t.createElementBlock("div",jc,[t.createElementVNode("div",Pc,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkTextEnterPlaceholder"),"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),type:"text"},null,40,Fc),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":n[1]||(n[1]=e=>i.value=e),type:"url"},null,40,qc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",Hc,[t.createVNode(t.unref(Bc),{modelValue:s.value,"onUpdate:modelValue":n[2]||(n[2]=e=>s.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Vc,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:u},t.toDisplayString(t.unref(o)("insertLink")),5)])])]))}}),[["__scopeId","data-v-c45c005e"]]),Wc="link",Kc=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.computed((()=>{const e=Hl(n.value,r.value,{parsedom:"a"});return e?{url:e.marks.href,newOpen:"_blank"==e.marks.target}:{url:"",newOpen:!1}}));return()=>t.h(Dc,{color:e.color,toolbar:!0,presetNewOpen:a.value.newOpen,presetUrl:a.value.url,onModify:(e,t)=>{if(!e)return;const a=Hl(n.value,r.value,{parsedom:"a"});a&&(a.marks.href=e,t?a.marks.target="_blank":delete a.marks.target,n.value.domRender())},onRemove:()=>{const e=Hl(n.value,r.value,{parsedom:"a"});e&&(e.parsedom=y.TEXT_NODE,delete e.marks.target,delete e.marks.href,delete e.marks["data-editify-element"],n.value.domRender(),n.value.rangeRender())}})}),{name:`_${Wc}`,props:{color:String}}),Gc=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>ws(a.value)));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Wc,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertLink")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||ls(r.value,a.value)||as(r.value,a.value)||Yl(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"link"}),layer:()=>t.h(Uc,{color:e.color,presetText:s.value,onInsert:(e,t,n)=>{t&&(Ms(r.value,e,t,n),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${Wc}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Zc={color:{type:String,default:""},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},Xc={class:"editify-image"},Yc={class:"editify-image-header"},Qc={key:0,class:"editify-image-remote"},Jc=["placeholder"],ed={key:1,class:"editify-image-upload"},td=["multiple"],nd=Ys(t.defineComponent({name:"InsertImage",__name:"insertImage",props:Zc,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:r.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},u=e=>{e.currentTarget.style.borderColor=""},m=()=>{a("insert",[l.value])},h=async e=>{const t=e.currentTarget,n=t.files;if(!n||!n.length)return;let o=[];for(let a=0;a<n.length;a++){const e=n[a],t=c(e);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?r.maxSize&&e.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",e):r.minSize&&e.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",e):o.push(e):"function"==typeof r.handleError&&r.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(o)||[];else for(let t=0;t<o.length;t++){const n=await fe.dataFileToBase64(o[t]);e.push(n)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",Xc,[t.createElementVNode("div",Yc,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-image-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(s.value("upload"))},t.toDisplayString(t.unref(o)("uploadImage")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-image-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(s.value("remote"))},t.toDisplayString(t.unref(o)("remoteImage")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-image-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",Qc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("imageUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Jc),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-image-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:m},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",ed,[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"image/*",onChange:h,type:"file"},null,40,td)]))]))}}),[["__scopeId","data-v-67d2dc3f"]]),rd="image",ad=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=e=>{const t=r.value.range.anchor.element;if(t){const a={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,a):t.styles=a,r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}};return()=>[t.h(pc,{name:"set30Width",title:o("width30"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("30%")},{default:()=>" 30% "}),t.h(pc,{name:"set50Width",title:o("width50"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("50%")},{default:()=>" 50% "}),t.h(pc,{name:"set100Width",title:o("width100"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("100%")},{default:()=>" 100% "}),t.h(pc,{name:"setAutoWidth",title:o("auto"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("auto")},{default:()=>t.h(ic,{value:"auto-width"})}),t.h(pc,{name:"deleteImage",title:o("deleteImage"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>{const e=Hl(r.value,a.value,{parsedom:"img"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())}},{default:()=>t.h(ic,{value:"delete"})})]}),{name:`_${rd}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),od=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:rd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertImage")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"image"}),layer:()=>t.h(nd,{color:e.color,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>{l.value.layerRef.setPosition()},onInsert:e=>{const t=e.filter((e=>!!e));0!=t.length&&(t.forEach((e=>{zs(r.value,e)})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${rd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),id={color:{type:String,default:""},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},ld={class:"editify-video"},sd={class:"editify-video-header"},cd={key:0,class:"editify-video-remote"},dd=["placeholder"],ud={key:1,class:"editify-video-upload"},md=["multiple"],hd=Ys(t.defineComponent({name:"InsertVideo",__name:"insertVideo",props:id,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:r.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},u=e=>{e.currentTarget.style.borderColor=""},m=()=>{a("insert",[l.value])},h=async e=>{const t=e.currentTarget,n=t.files;if(!n||!n.length)return;let o=[];for(let a=0;a<n.length;a++){const e=n[a],t=c(e);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?r.maxSize&&e.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",e):r.minSize&&e.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",e):o.push(e):"function"==typeof r.handleError&&r.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(o)||[];else for(let t=0;t<o.length;t++){const n=await fe.dataFileToBase64(o[t]);e.push(n)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",ld,[t.createElementVNode("div",sd,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-video-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(s.value("upload"))},t.toDisplayString(t.unref(o)("uploadVideo")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-video-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(s.value("remote"))},t.toDisplayString(t.unref(o)("remoteVideo")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-video-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",cd,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("videoUrlPlaceholder"),onBlur:u,onFocus:d},null,40,dd),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-video-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:m},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",ud,[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"video/*",onChange:h,type:"file"},null,40,md)]))]))}}),[["__scopeId","data-v-c4612c63"]]),pd="video",fd=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"video"});return e?{controls:!!e.marks.controls,loop:!!e.marks.loop,autoplay:!!e.marks.autoplay,muted:!!e.marks.muted}:{controls:!1,loop:!1,autoplay:!1,muted:!1}})),l=e=>{const t=r.value.range.anchor.element;if(t){const a={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,a):t.styles=a,r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}},s=e=>{const t=r.value.range.anchor.element;i.value[e]?delete t.marks[e]:t.marks[e]=!0,i.value[e]=!i.value[e],r.value.domRender(),r.value.rangeRender()};return()=>[t.h(pc,{name:"set30Width",title:o("width30"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("30%")},{default:()=>" 30% "}),t.h(pc,{name:"set50Width",title:o("width50"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("50%")},{default:()=>" 50% "}),t.h(pc,{name:"set100Width",title:o("width100"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("100%")},{default:()=>" 100% "}),t.h(pc,{name:"setAutoWidth",title:o("auto"),tooltip:e.tooltip,color:e.color,rightBorder:!0,zIndex:e.zIndex,onOperate:()=>l("auto")},{default:()=>t.h(ic,{value:"auto-width"})}),t.h(pc,{name:"autoplay",title:i.value.autoplay?o("disabledAutoplay"):o("autoplay"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("autoplay")},{default:()=>t.h(ic,{value:i.value.autoplay?"autoplay":"stop"})}),t.h(pc,{name:"loop",title:i.value.loop?o("disabledLoop"):o("loop"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("loop")},{default:()=>t.h(ic,{value:i.value.loop?"loop":"single"})}),t.h(pc,{name:"muted",title:i.value.muted?o("unmuted"):o("muted"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("muted")},{default:()=>t.h(ic,{value:i.value.muted?"muted":"unmuted"})}),t.h(pc,{name:"controls",title:o("controls"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:!0,onOperate:()=>s("controls")},{default:()=>t.h(ic,{value:"controls"})}),t.h(pc,{name:"deleteVideo",title:o("deleteVideo"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>{const e=Hl(r.value,a.value,{parsedom:"video"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())}},{default:()=>t.h(ic,{value:"delete"})})]}),{name:`_${pd}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),gd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:pd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertVideo")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"video"}),layer:()=>t.h(hd,{color:e.color,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>l.value.layerRef.setPosition(),onInsert:e=>{const t=e.filter((e=>!!e));0!=t.length&&(t.forEach((e=>{As(r.value,e)})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),bd={color:{type:String,default:""},maxRows:{type:Number,default:10},maxColumns:{type:Number,default:10}},vd={class:"editify-table"},yd=["onMouseenter","onClick"],wd=[(e=>(t.pushScopeId("data-v-9a40c4f5"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,null,-1)))],xd={class:"editify-table-footer"},kd={key:0},Ed={key:1},Sd=Ys(t.defineComponent({name:"InsertTable",__name:"insertTable",props:bd,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref((()=>{const e=[];for(let t=1;t<=r.maxRows;t++){let n=[];for(let e=1;e<=r.maxColumns;e++)n.push({x:t,y:e,inside:!1});e.push(n)}return e})()),l=t.computed((()=>i.value.flat().filter((e=>e.inside)).sort(((e,t)=>e.x>t.x&&e.y>t.y||e.x>t.x||e.y>t.y?-1:1))[0]));return(e,n)=>(t.openBlock(),t.createElementBlock("div",vd,[t.createElementVNode("table",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(e=>(t.openBlock(),t.createElementBlock("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e,(e=>(t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass({"editify-inside":e.inside}),onMouseenter:t=>(e=>{for(let t in i.value){const n=i.value[t];for(let r in n)n[r].x<=e.x&&n[r].y<=e.y?i.value[t][r].inside=!0:i.value[t][r].inside=!1}})(e),onClick:t=>{var n;a("insert",(n=e).x,n.y)}},wd,42,yd)))),256))])))),256))]),t.createElementVNode("div",xd,[l.value?(t.openBlock(),t.createElementBlock("span",kd,t.toDisplayString(l.value.x)+" x "+t.toDisplayString(l.value.y),1)):(t.openBlock(),t.createElementBlock("span",Ed,t.toDisplayString(t.unref(o)("insertTable")),1))])]))}}),[["__scopeId","data-v-9a40c4f5"]]),Td="table",_d=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.computed((()=>e=>{if(!r.value.range)return!1;const t=ql(r.value.range.focus.element,{parsedom:"td"});if(!t)return!1;if("left"==e){let e=!1;const n=jl(t),a=r.value.getPreviousElement(t);if(a)if(a.hasMarks()&&a.marks["data-editify-merged"]){const{crossColumnElement:t}=$l(r.value,a);if(t){const{rowspan:r}=jl(t);e=r==n.rowspan}}else{const{rowspan:t}=jl(a);e=t==n.rowspan}return e}if("right"==e){let e=!1;const n=jl(t);let a=r.value.getNextElement(t);for(;a;){if(!a.hasMarks()||!a.marks["data-editify-merged"]){const{rowspan:t}=jl(a);e=t==n.rowspan;break}{const{crossColumnElement:e}=$l(r.value,a);if(!e)break;a=r.value.getNextElement(a)}}return e}if("up"==e){let e=!1;const n=jl(t),a=t.parent.children.findIndex((e=>e.isEqual(t))),o=r.value.getPreviousElement(t.parent);if(o){const t=o.children[a];if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossRowElement:a}=$l(r.value,t);if(a){const{colspan:t}=jl(a);e=t==n.colspan}}else{const{colspan:r}=jl(t);e=r==n.colspan}}return e}if("down"==e){let e=!1;const n=jl(t),a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=r.value.getNextElement(t.parent);for(;o;){const t=o.children[a];if(!t.hasMarks()||!t.marks["data-editify-merged"]){const{colspan:r}=jl(t);e=r==n.colspan;break}{const{crossRowElement:e}=$l(r.value,t);if(!e)break;o=r.value.getNextElement(o)}}return e}return!1})),l=(e="up")=>{const t=Hl(r.value,a.value,{parsedom:"table"});if(t){const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?r.value.addElementBefore(n,t):r.value.addElementAfter(n,t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender()}},s=(e="up")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"tr"});if(t){const a=t.parent,{columnNumber:o}=Pl(a.children),i=[];for(let e=0;e<o;e++)i.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const l=y.create({type:"inblock",parsedom:"tr",children:i});"up"==e?r.value.addElementBefore(l,t):r.value.addElementAfter(l,t),r.value.range.anchor.moveToStart(l),r.value.range.focus.moveToStart(l),r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}},c=(e="left")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"td"});if(t){const n=t.parent,a=n.parent,o=a.parent,i=a.children,l=n.children.findIndex((e=>e.isEqual(t)));i.forEach((t=>{const n=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});"left"==e?r.value.addElementTo(n,t,l):r.value.addElementTo(n,t,l+1)}));const s=o.children.find((e=>"colgroup"==e.parsedom)),c=y.create({type:"closed",parsedom:"col"});if("left"==e?r.value.addElementTo(c,s,l):r.value.addElementTo(c,s,l+1),"left"==e){const e=r.value.getPreviousElement(t);r.value.range.anchor.moveToStart(e),r.value.range.focus.moveToStart(e)}else{const e=r.value.getNextElement(t);r.value.range.anchor.moveToStart(e),r.value.range.focus.moveToStart(e)}r.value.domRender(),r.value.rangeRender()}},d=()=>{const e=Hl(r.value,a.value,{parsedom:"table"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())},u=e=>{if(!i.value(e))return;r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"td"});if(t)if("left"==e){const e=jl(t),n=r.value.getPreviousElement(t);if(n)if(n.hasMarks()&&n.marks["data-editify-merged"]){const{crossColumnElement:a}=$l(r.value,n);if(a){const{rowspan:n,colspan:o}=jl(a);n==e.rowspan&&(a.marks.colspan=o+e.colspan,t.children.forEach((e=>{a.children.push(e),e.parent=a})),Dl(t),r.value.range.anchor.moveToEnd(a),r.value.range.focus.moveToEnd(a),r.value.domRender(),r.value.rangeRender())}}else{const{rowspan:a,colspan:o}=jl(n);a==e.rowspan&&(n.hasMarks()?n.marks.colspan=o+e.colspan:n.marks={colspan:o+e.colspan},t.children.forEach((e=>{n.children.push(e),e.parent=n})),Dl(t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender())}}else if("right"==e){const e=jl(t);let n=r.value.getNextElement(t);for(;n;){if(!n.hasMarks()||!n.marks["data-editify-merged"]){const{rowspan:a,colspan:o}=jl(n);a==e.rowspan&&(t.hasMarks()?t.marks.colspan=e.colspan+o:t.marks={colspan:e.colspan+o},n.children.forEach((e=>{t.children.push(e),e.parent=t})),Dl(n),r.value.range.anchor.moveToEnd(t),r.value.range.focus.moveToEnd(t),r.value.domRender(),r.value.rangeRender());break}{const{crossColumnElement:e}=$l(r.value,n);if(!e)break;n=r.value.getNextElement(n)}}}else if("up"==e){const e=jl(t),n=t.parent.children.findIndex((e=>e.isEqual(t))),a=r.value.getPreviousElement(t.parent);if(a){const o=a.children[n];if(o.hasMarks()&&o.marks["data-editify-merged"]){const{crossRowElement:n}=$l(r.value,o);if(n){const{rowspan:a,colspan:o}=jl(n);o==e.colspan&&(n.marks.rowspan=a+e.rowspan,t.children.forEach((e=>{n.children.push(e),e.parent=n})),Dl(t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender())}}else{const{rowspan:n,colspan:a}=jl(o);a==e.colspan&&(o.hasMarks()?o.marks.rowspan=n+e.rowspan:o.marks={rowspan:n+e.rowspan},t.children.forEach((e=>{o.children.push(e),e.parent=o})),Dl(t),r.value.range.anchor.moveToEnd(o),r.value.range.focus.moveToEnd(o),r.value.domRender(),r.value.rangeRender())}}}else if("down"==e){const e=jl(t),n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=r.value.getNextElement(t.parent);for(;a;){const o=a.children[n];if(!o.hasMarks()||!o.marks["data-editify-merged"]){const{rowspan:n,colspan:a}=jl(o);a==e.colspan&&(t.hasMarks()?t.marks.rowspan=e.rowspan+n:t.marks={rowspan:e.rowspan+n},o.children.forEach((e=>{t.children.push(e),e.parent=t})),Dl(o),r.value.range.anchor.moveToEnd(t),r.value.range.focus.moveToEnd(t),r.value.domRender(),r.value.rangeRender());break}{const{crossRowElement:e}=$l(r.value,o);if(!e)break;a=r.value.getNextElement(a)}}}};return()=>[t.h(pc,{name:"textWrapUp",title:o("textWrapUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("up")},{default:()=>t.h(ic,{value:"text-wrap",class:"editify-icon-rotate"})}),t.h(pc,{name:"textWrapDown",title:o("textWrapDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>l("down")},{default:()=>t.h(ic,{value:"text-wrap"})}),t.h(pc,{name:"insertRowTop",title:o("insertRowTop"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("up")},{default:()=>t.h(ic,{value:"insert-row-top"})}),t.h(pc,{name:"insertRowBottom",title:o("insertRowBottom"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("down")},{default:()=>t.h(ic,{value:"insert-row-bottom"})}),t.h(pc,{name:"deleteRow",title:o("deleteRow"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>(()=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const e=Hl(r.value,a.value,{parsedom:"td"});if(e){const t=e.parent;if(1==t.parent.children.length)return void d();const a=t.children.findIndex((t=>t.isEqual(e))),o=r.value.getPreviousElement(t),i=r.value.getNextElement(t);t.children.forEach(((e,n)=>{const a=jl(e);if(e.hasMarks()&&e.marks["data-editify-merged"]){const{crossRowElement:t}=$l(r.value,e);if(t){const{rowspan:e}=jl(t);e-1==1?delete t.marks.rowspan:t.marks.rowspan=e-1}}else if(a.rowspan>1){let e=r.value.getNextElement(t);e&&a.rowspan-1>1&&(e.children[n].hasMarks()?e.children[n].marks.rowspan=a.rowspan-1:e.children[n].marks={rowspan:a.rowspan-1})}})),t.toEmpty(),o?(r.value.range.anchor.moveToEnd(o.children[a]),r.value.range.focus.moveToEnd(o.children[a])):(r.value.range.anchor.moveToEnd(i.children[a]),r.value.range.focus.moveToEnd(i.children[a])),r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}})()},{default:()=>t.h(ic,{value:"delete-row"})}),t.h(pc,{name:"insertColumnLeft",title:o("insertColumnLeft"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>c("left")},{default:()=>t.h(ic,{value:"insert-column-left"})}),t.h(pc,{name:"insertColumnRight",title:o("insertColumnRight"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>c("right")},{default:()=>t.h(ic,{value:"insert-column-right"})}),t.h(pc,{name:"deleteColumn",title:o("deleteColumn"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>(()=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const e=Hl(r.value,a.value,{parsedom:"td"});if(e){const t=e.parent,n=t.parent.children,a=t.parent.parent;if(1==t.children.length)return void d();const o=t.children.findIndex((t=>t.isEqual(e))),i=r.value.getPreviousElement(e),l=r.value.getNextElement(e);n.forEach((e=>{const t=e.children[o],n=jl(t);if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossColumnElement:e}=$l(r.value,t);if(e){const{colspan:t}=jl(e);t-1==1?delete e.marks.colspan:e.marks.colspan=t-1}}else if(n.colspan>1){let e=r.value.getNextElement(t);e&&n.colspan-1>1&&(e.hasMarks()?e.marks.colspan=n.colspan-1:e.marks={colspan:n.colspan-1})}t.toEmpty()})),a.children.find((e=>"colgroup"==e.parsedom)).children[o].toEmpty(),i?(r.value.range.anchor.moveToEnd(i),r.value.range.focus.moveToEnd(i)):(r.value.range.anchor.moveToEnd(l),r.value.range.focus.moveToEnd(l)),r.value.domRender(),r.value.rangeRender()}})()},{default:()=>t.h(ic,{value:"delete-column"})}),t.h(pc,{name:"mergeCellsLeft",title:o("mergeCellsLeft"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("left"),onOperate:()=>u("left")},{default:()=>t.h(ic,{value:"merge-cells-left"})}),t.h(pc,{name:"mergeCellsRight",title:o("mergeCellsRight"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("right"),onOperate:()=>u("right")},{default:()=>t.h(ic,{value:"merge-cells-right"})}),t.h(pc,{name:"mergeCellsUp",title:o("mergeCellsUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("up"),onOperate:()=>u("up")},{default:()=>t.h(ic,{value:"merge-cells-up"})}),t.h(pc,{name:"mergeCellsDown",title:o("mergeCellsDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("down"),onOperate:()=>u("down")},{default:()=>t.h(ic,{value:"merge-cells-down"})}),t.h(pc,{name:"deleteTable",title:o("deleteTable"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:!0,onOperate:()=>d()},{default:()=>t.h(ic,{value:"delete-table"})})]}),{name:`_${Td}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),Cd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Td,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertTable")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||os(r.value,a.value)||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"table"}),layer:()=>t.h(Sd,{color:e.color,maxRows:e.config.maxRows,maxColumns:e.config.maxColumns,onInsert:(e,t)=>{Os(r.value,e,t),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${Td}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Nd="codeBlock",Bd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"pre"});return e&&e.marks["data-editify-hljs"]||""})),s=(e="up")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"pre"});if(t){const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?r.value.addElementBefore(n,t):r.value.addElementAfter(n,t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender()}};return n({btnRef:i}),()=>[t.h(pc,{name:"textWrapUp",title:o("textWrapUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("up")},{default:()=>t.h(ic,{value:"text-wrap",class:"editify-icon-rotate"})}),t.h(pc,{name:"textWrapDown",title:o("textWrapDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("down")},{default:()=>t.h(ic,{value:"text-wrap"})}),e.language.show?t.h(pc,{ref:i,name:"languages",type:"display",title:o("selectLanguages"),leftBorder:e.language.leftBorder,rightBorder:e.language.rightBorder,displayConfig:{options:e.language.options,value:l.value,width:e.language.width,maxHeight:e.language.maxHeight},active:!1,disabled:e.language.disabled,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:(e,t)=>(e=>{const t=Hl(r.value,a.value,{parsedom:"pre"});t&&(Object.assign(t.marks,{"data-editify-hljs":e}),r.value.domRender(),r.value.rangeRender())})(t)},{default:()=>t.h(ic,{value:"text-wrap"})}):null]}),{name:`_${Nd}`,props:{color:String,zIndex:Number,tooltip:Boolean,language:Object}}),Md=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Nd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("inserCodeBlock")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!!Hl(r.value,a.value,{parsedom:"pre"}),disabled:e.disabled||i.value||os(r.value,a.value)||ss(r.value,a.value)||cs(r.value,a.value)||Yl(r.value,a.value)||es(r.value,a.value)||e.config.disabled,onOperate:()=>{Is(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code-block"})}):null}}),{name:`_${Nd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),zd="orderList",Ad=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.inject("$editTrans"),o=t.computed((()=>e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ol"}});return t&&t.marks["data-editify-list-style"]?t.marks["data-editify-list-style"]==e:"decimal"==e})),i=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getPreviousElement(e);r&&Vl(r,!0)&&i(r,t)},l=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getNextElement(e);r&&Vl(r,!0)&&l(r,t)},s=e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ol"}});t.marks["data-editify-list-style"]=e;const a=n.value.getPreviousElement(t),o=n.value.getNextElement(t);a&&Vl(a,!0)&&i(a,e),o&&Vl(o,!0)&&l(o,e),n.value.domRender(),n.value.rangeRender()};return()=>[t.h(pc,{name:"decimal",title:a("decimal"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("decimal"),onOperate:()=>s("decimal")},{default:()=>t.h(ic,{value:"list-decimal",style:{fontSize:"18px"}})}),t.h(pc,{name:"cjk-ideographic",title:a("cjkIdeographic"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("cjk-ideographic"),onOperate:()=>s("cjk-ideographic")},{default:()=>t.h(ic,{value:"list-cjk-ideographic",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-roman",title:a("lowerRoman"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-roman"),onOperate:()=>s("lower-roman")},{default:()=>t.h(ic,{value:"list-lower-roman",style:{fontSize:"18px"}})}),t.h(pc,{name:"upper-roman",title:a("upperRoman"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("upper-roman"),onOperate:()=>s("upper-roman")},{default:()=>t.h(ic,{value:"list-upper-roman",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-alpha",title:a("lowerAlpha"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-alpha"),onOperate:()=>s("lower-alpha")},{default:()=>t.h(ic,{value:"list-lower-alpha",style:{fontSize:"18px"}})}),t.h(pc,{name:"upper-alpha",title:a("upperAlpha"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("upper-alpha"),onOperate:()=>s("upper-alpha")},{default:()=>t.h(ic,{value:"list-upper-alpha",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-greek",title:a("lowerGreek"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-greek"),onOperate:()=>s("lower-greek")},{default:()=>t.h(ic,{value:"list-lower-greek",style:{fontSize:"18px"}})})]}),{name:`_${zd}`,props:{color:String,zIndex:Number,tooltip:Boolean}}),Od=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:zd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("orderList")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Wl(r.value,a.value,!0),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Cs(r.value,a.value,!0),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"list-ordered"})}):null}}),{name:`_${zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Id="unorderList",Rd=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.inject("$editTrans"),o=t.computed((()=>e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});return t&&t.marks["data-editify-list-style"]?t.marks["data-editify-list-style"]==e:"disc"==e})),i=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getPreviousElement(e);r&&Vl(r,!1)&&i(r,t)},l=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getNextElement(e);r&&Vl(r,!1)&&l(r,t)},s=e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});t.marks["data-editify-list-style"]=e;const a=n.value.getPreviousElement(t),o=n.value.getNextElement(t);a&&Vl(a,!1)&&i(a,e),o&&Vl(o,!1)&&l(o,e),n.value.domRender(),n.value.rangeRender()};return()=>[t.h(pc,{name:"disc",title:a("disc"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("disc"),onOperate:()=>s("disc")},{default:()=>t.h(ic,{value:"list-disc",style:{fontSize:"18px"}})}),t.h(pc,{name:"circle",title:a("circle"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("circle"),onOperate:()=>s("circle")},{default:()=>t.h(ic,{value:"list-circle",style:{fontSize:"18px"}})}),t.h(pc,{name:"square",title:a("square"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("square"),onOperate:()=>s("square")},{default:()=>t.h(ic,{value:"list-square",style:{fontSize:"18px"}})})]}),{name:`_${Id}`,props:{color:String,zIndex:Number,tooltip:Boolean}}),Ld=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Id,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("unorderList")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Wl(r.value,a.value,!1),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Cs(r.value,a.value,!1),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"list-unordered"})}):null}}),{name:`_${Id}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Dd="bold",$d=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"font-weight","bold")||us(r.value,a.value,"font-weight","700")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Dd,title:o("bold"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["font-weight"]):ms(r.value,a.value,{"font-weight":"bold"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"bold"})}):null}),{name:`_${Dd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),jd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"font-weight","bold")||us(r.value,a.value,"font-weight","700")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Dd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("bold")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["font-weight"]):ms(r.value,a.value,{"font-weight":"bold"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"bold"})}):null}}),{name:`_${Dd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Pd="italic",Fd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"font-style","italic")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Pd,title:o("italic"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["font-style"]):ms(r.value,a.value,{"font-style":"italic"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"italic"})}):null}),{name:`_${Pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),qd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"font-style","italic")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Pd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("italic")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["font-style"]):ms(r.value,a.value,{"font-style":"italic"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"italic"})}):null}}),{name:`_${Pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Hd="strikethrough",Vd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"text-decoration","line-through")||us(r.value,a.value,"text-decoration-line","line-through")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Hd,title:o("strikethrough"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"line-through"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"strikethrough"})}):null}),{name:`_${Hd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Ud=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"text-decoration","line-through")||us(r.value,a.value,"text-decoration-line","line-through")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Hd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("strikethrough")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"line-through"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"strikethrough"})}):null}}),{name:`_${Hd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Wd="underline",Kd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"text-decoration","underline")||us(r.value,a.value,"text-decoration-line","underline")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Wd,title:o("underline"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"underline"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"underline"})}):null}),{name:`_${Wd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Gd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"text-decoration","underline")||us(r.value,a.value,"text-decoration-line","underline")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Wd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("underline")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"underline"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"underline"})}):null}}),{name:`_${Wd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Zd="code",Xd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>ps(r.value,a.value,"data-editify-code")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Zd,title:o("code"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?gs(r.value,a.value,["data-editify-code"]):fs(r.value,a.value,{"data-editify-code":!0}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code"})}):null}),{name:`_${Zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Yd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>ps(r.value,a.value,"data-editify-code")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Zd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("code")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?gs(r.value,a.value,["data-editify-code"]):fs(r.value,a.value,{"data-editify-code":!0}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code"})}):null}}),{name:`_${Zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Qd="super",Jd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"vertical-align","super")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Qd,title:o("super"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"super"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"superscript"})}):null}),{name:`_${Qd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),eu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"vertical-align","super")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Qd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("super")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"super"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"superscript"})}):null}}),{name:`_${Qd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),tu="sub",nu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"vertical-align","sub")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:tu,title:o("sub"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"sub"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"subscript"})}):null}),{name:`_${tu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),ru=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"vertical-align","sub")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:tu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("sub")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"sub"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"subscript"})}):null}}),{name:`_${tu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),au="fontSize",ou=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-size",e.value):us(r.value,a.value,"font-size",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:au,type:"display",title:o("fontSize"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,displayConfig:{options:e.config.options,value:l.value,width:e.config.width,maxHeight:e.config.maxHeight},onOperate:(e,t)=>{ms(r.value,a.value,{"font-size":t}),r.value.domRender(),r.value.rangeRender()}}):null}),{name:`_${au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),iu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-size",e.value):us(r.value,a.value,"font-size",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:au,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:s.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("fontSize")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1,onOperate:(e,t)=>{ms(r.value,a.value,{"font-size":t}),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),lu="fontFamily",su=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-family",e.value):us(r.value,a.value,"font-family",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:lu,type:"display",title:o("fontFamily"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,displayConfig:{options:e.config.options,value:l.value,width:e.config.width,maxHeight:e.config.maxHeight},onOperate:(e,t)=>{ms(r.value,a.value,{"font-family":t}),r.value.domRender(),r.value.rangeRender()}}):null}),{name:`_${lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),cu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-family",e.value):us(r.value,a.value,"font-family",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:lu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:s.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("fontFamily")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{ms(r.value,a.value,{"font-family":t}),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),du={data:{type:Array,default:function(){return[]}},value:{type:String,default:null},color:{type:String,default:""},tooltip:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},uu={class:"editify-colors"},mu={class:"editify-colors-list"},hu=["onClick"],pu=Ys(t.defineComponent({name:"Colors",__name:"colors",props:du,emits:["change"],setup(e,{emit:n}){const r=n,a=t.inject("$editTrans"),o=e=>{r("change",e.value)};return(e,n)=>(t.openBlock(),t.createElementBlock("div",uu,[t.createElementVNode("div",{class:"editify-colors-header",onClick:n[0]||(n[0]=e=>o({value:""}))},[t.createVNode(t.unref(ic),{value:"remove"}),t.createElementVNode("span",null,t.toDisplayString(t.unref(a)("defaultColor")),1)]),t.createElementVNode("div",mu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(n=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-color",{"editify-active":e.value==n.value}]),style:t.normalizeStyle({borderColor:e.value==n.value&&e.color||""})},[t.createVNode(t.unref(ac),{block:"",content:`${n.label}`,disabled:!e.tooltip,"z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",{onClick:e=>o(n),class:"editify-color-el",style:t.normalizeStyle({background:n.value})},null,12,hu)])),_:2},1032,["content","disabled","z-index"])],6)))),256))])]))}}),[["__scopeId","data-v-c4c4764c"]]),fu="foreColor",gu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"color",e.value):us(r.value,a.value,"color",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:fu,type:"select",title:o("foreColor"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,selectConfig:{options:e.config.options},hideScroll:!0},{default:()=>t.h(ic,{value:"font-color"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,value:l.value,data:n,onChange:e=>{ms(r.value,a.value,{color:e}),i.value.show=!1,r.value.domRender(),r.value.rangeRender()}})}):null}),{name:`_${fu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),bu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"color",e.value):us(r.value,a.value,"color",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:fu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",selectConfig:{options:e.config.options},hideScroll:!0,title:`${o("foreColor")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1},{default:()=>t.h(ic,{value:"font-color"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,zIndex:e.zIndex+2,value:s.value,data:n,onChange:e=>{ms(r.value,a.value,{color:e}),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${fu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),vu="backColor",yu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"background",e.value):us(r.value,a.value,"background",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:vu,type:"select",title:o("backColor"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,selectConfig:{options:e.config.options},hideScroll:!0},{default:()=>t.h(ic,{value:"brush"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,value:l.value,data:n,onChange:e=>{ms(r.value,a.value,{background:e}),i.value.show=!1,r.value.domRender(),r.value.rangeRender()}})}):null}),{name:`_${vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),wu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"background",e.value):us(r.value,a.value,"background",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:vu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",selectConfig:{options:e.config.options},hideScroll:!0,title:`${o("backColor")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"brush"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,zIndex:e.zIndex+2,value:s.value,data:n,onChange:e=>{ms(r.value,a.value,{background:e}),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),xu="formatClear",ku=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null);return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:xu,title:o("formatClear"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,onOperate:()=>{hs(r.value,a.value),gs(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"format-clear"})}):null}),{name:`_${xu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Eu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:xu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("formatClear")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{hs(r.value,a.value),gs(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"format-clear"})}):null}}),{name:`_${xu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Su=Ys(t.defineComponent({name:"Toolbar",__name:"toolbar",props:Sc,emits:["update:modelValue"],setup(e,{expose:n,emit:r}){const a=e,o=r,i=t.ref(null),l=t.ref(null),s=t.shallowRef([$d,Fd,Vd,Kd,Xd,Jd,nu,ou,su,gu,yu,ku]),c=t.ref([]),d=t.computed({get:()=>a.modelValue,set(e){o("update:modelValue",e)}}),u=t.computed((()=>{let e=[];return l.value&&l.value.btnRef&&l.value.btnRef.layerRef&&l.value.btnRef.layerRef.elRef&&e.push(l.value.btnRef.layerRef.elRef),c.value.forEach((t=>{t&&t.btnRef&&t.btnRef.layerRef&&t.btnRef.layerRef.elRef&&e.push(t.btnRef.layerRef.elRef)})),e})),m=t.computed((()=>e=>a.config.text[e.replace("_","")]));return n({layerRef:i}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(tc),{modelValue:d.value,"onUpdate:modelValue":n[3]||(n[3]=e=>d.value=e),ref_key:"layerRef",ref:i,node:e.node,"scroll-node":e.scrollNode,border:"",placement:"bottom-start",useRange:"text"==e.type,"z-index":e.zIndex,"inside-elements":u.value},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-toolbar",style:t.normalizeStyle(e.config.style)},["image"==e.type?(t.openBlock(),t.createBlock(t.unref(ad),{key:0,onResetToolbar:n[0]||(n[0]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"video"==e.type?(t.openBlock(),t.createBlock(t.unref(fd),{key:1,onResetToolbar:n[1]||(n[1]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"codeBlock"==e.type?(t.openBlock(),t.createBlock(t.unref(Bd),{key:2,ref_key:"codeBlockToolbarRef",ref:l,language:e.config.codeBlock.languages,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["language","tooltip","color","z-index"])):"link"==e.type?(t.openBlock(),t.createBlock(t.unref(Kc),{key:3,color:e.color},null,8,["color"])):"table"==e.type?(t.openBlock(),t.createBlock(t.unref(_d),{key:4,onResetToolbar:n[2]||(n[2]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"orderList"==e.type?(t.openBlock(),t.createBlock(t.unref(Ad),{key:5,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"unorderList"==e.type?(t.openBlock(),t.createBlock(t.unref(Rd),{key:6,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"text"==e.type?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:7},t.renderList(s.value,((n,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n),{ref_for:!0,ref:e=>c.value[r]=e,color:e.color,"z-index":e.zIndex+1,config:m.value(n.name),tooltip:e.config.tooltip},null,8,["color","z-index","config","tooltip"])))),256)):t.createCommentVNode("",!0)],4)])),_:1},8,["modelValue","node","scroll-node","useRange","z-index","inside-elements"]))}}),[["__scopeId","data-v-8c767af5"]]),Tu={config:{type:Object,default:null},color:{type:String,default:""},zIndex:{type:Number,default:1}},_u="undo",Cu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.inject("rangeKey"),l=t.ref(null);return n({btnRef:l}),()=>e.config.show?t.h(pc,{ref:l,name:_u,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:a("undo"),leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||o.value||i.value&&r.value.history&&r.value.history.records.length<=1||e.config.disabled,onOperate:()=>r.value.undo()},{default:()=>t.h(ic,{value:"undo"})}):null}),{name:`_${_u}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Nu="redo",Bu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.inject("rangeKey"),l=t.ref(null);return n({btnRef:l}),()=>e.config.show?t.h(pc,{ref:l,name:Nu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:a("redo"),leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||o.value||i.value&&r.value.history&&0==r.value.history.redoRecords.length||e.config.disabled,onOperate:()=>r.value.redo()},{default:()=>t.h(ic,{value:"redo"})}):null}),{name:`_${Nu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Mu="heading",zu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.inject("rangeKey"),s=t.ref(null),c=t.computed((()=>{const t=e.config.options.find((e=>{let t=e;return de.isObject(e)&&(t=e.value),l.value&&r.value.range&&r.value.range.anchor.isEqual(r.value.range.focus)?r.value.range.anchor.element.getBlock().parsedom==t:a.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:s}),()=>{var n,l;return e.config.show?t.h(pc,{ref:s,name:Mu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:c.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("heading")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{ks(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${Mu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Au="indent",Ou=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Au,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",title:`${o("indent")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,selectConfig:{options:e.config.options,width:e.config.width,maxHeight:e.config.maxHeight},leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{"indent-increase"==t?Es(r.value,a.value):"indent-decrease"==t&&Ss(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"indent-increase"})}):null}}),{name:`_${Au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Iu="quote",Ru=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Iu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("quote")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:is(r.value,a.value),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Ts(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"quote"})}):null}}),{name:`_${Iu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Lu="separator",Du=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Lu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("separator")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{Rs(r.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"separator"})}):null}}),{name:`_${Lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),$u="align",ju=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:$u,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",title:`${o("align")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,selectConfig:{options:e.config.options,width:e.config.width,maxHeight:e.config.maxHeight},leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{_s(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"align-left"})}):null}}),{name:`_${$u}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Pu="task",Fu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Pu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("task")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Zl(r.value,a.value),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Ns(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"task"})}):null}}),{name:`_${Pu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),qu="lineHeight",Hu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.inject("rangeKey"),s=t.ref(null),c=t.computed((()=>{const t=e.config.options.find((e=>{let t=e;if(de.isObject(e)&&(t=e.value),l.value&&r.value.range&&r.value.range.anchor.isEqual(r.value.range.focus)){const e=r.value.range.anchor.element.getBlock();return e.hasStyles()&&e.styles["line-height"]==t}return a.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const n=e.element.getBlock(),r=e.element.getInblock();return r?r.hasStyles()&&r.styles["line-height"]==t:n.hasStyles()&&n.styles["line-height"]==t}))}));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:s}),()=>{var n,l;return e.config.show?t.h(pc,{ref:s,name:qu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:c.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("lineHeight")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1,onOperate:(e,t)=>{Bs(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${qu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Vu="sourceView",Uu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.ref(null);return n({btnRef:i}),()=>{var n,l;return e.config.show?t.h(pc,{ref:i,name:Vu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${a("sourceView")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:o.value,disabled:e.disabled||e.config.disabled,onOperate:()=>{o.value=!o.value,o.value||r.value.rangeRender()}},{default:()=>t.h(ic,{value:"source-view"})}):null}}),{name:`_${Vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Wu="fullScreen",Ku=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isFullScreen"),i=t.ref(null);return n({btnRef:i}),()=>{var n,l;return e.config.show?t.h(pc,{ref:i,name:Wu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${a("fullScreen")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:o.value,disabled:e.disabled||e.config.disabled,onOperate:()=>{o.value=!o.value,r.value.rangeRender()}},{default:()=>t.h(ic,{value:"full-screen"})}):null}}),{name:`_${Wu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Gu={color:{type:String,default:""},accept:{type:String,default:null},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},Zu={class:"editify-attachment"},Xu={class:"editify-attachment-header"},Yu={key:0,class:"editify-attachment-remote"},Qu=["placeholder"],Ju=["placeholder"],em={key:1,class:"editify-attachment-upload"},tm=["placeholder"],nm=["multiple","accept"],rm=Ys(t.defineComponent({name:"InsertAttachment",__name:"insertAttachment",props:Gu,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.ref(""),c=t.ref(null),d=t.computed((()=>e=>i.value==e?{color:r.color}:{})),u=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},m=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},h=e=>{e.currentTarget.style.borderColor=""},p=()=>{a("insert",l.value,[s.value])},f=()=>{c.value.click()},g=async()=>{const e=c.value.files;if(!e||!e.length)return;let t=[];for(let n=0;n<e.length;n++){const a=e[n],o=u(a);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==o.toLocaleLowerCase()))?r.maxSize&&a.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",a):r.minSize&&a.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",a):t.push(a):"function"==typeof r.handleError&&r.handleError("suffixError",a)}if(t.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(t)||[];else for(let n=0;n<t.length;n++){const r=await fe.dataFileToBase64(t[n]);e.push(r)}a("insert",l.value,e)}c.value.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",Zu,[t.createElementVNode("div",Xu,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-attachment-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(d.value("upload"))},t.toDisplayString(t.unref(o)("uploadAttachment")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-attachment-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(d.value("remote"))},t.toDisplayString(t.unref(o)("remoteAttachment")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-attachment-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",Yu,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:h,onFocus:m,type:"text"},null,40,Qu),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[3]||(n[3]=e=>s.value=e),placeholder:t.unref(o)("attachmentUrlPlaceholder"),onBlur:h,onFocus:m,type:"url"},null,40,Ju),[[t.vModelText,s.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:p},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",em,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[4]||(n[4]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:h,onFocus:m,type:"text"},null,40,tm),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-btn",onClick:f},[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{ref_key:"fileInputRef",ref:c,multiple:e.multiple,accept:e.accept,onChange:g,type:"file"},null,40,nm)])]))]))}}),[["__scopeId","data-v-cd9a7fcb"]]),am="attachment",om=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:am,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertAttachment")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"attachment"}),layer:()=>t.h(rm,{color:e.color,accept:e.config.accept,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>l.value.layerRef.setPosition(),onInsert:(e,t)=>{0!=(t=t.filter((e=>!!e))).length&&(t.forEach((t=>{Ls(r.value,t,e||o("attachmentDefaultName"))})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${am}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),im="infoBlock",lm=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:im,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("insertInfoBlock")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:rs(r.value,a.value),disabled:e.disabled||i.value||os(r.value,a.value)||as(r.value,a.value)||e.config.disabled,onOperate:()=>{$s(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"info"})}):null}}),{name:`_${im}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),sm=["data-editify-mode"],cm=Ys(t.defineComponent({name:"Menu",__name:"menu",props:Tu,setup(e,{expose:n}){const r=t.getCurrentInstance(),a=e,o=t.inject("isSourceView"),i=t.inject("isFullScreen"),l=t.inject("rangeKey"),s=t.inject("showBorder"),c=t.inject("isDisabled"),d=t.inject("isAutoHeight"),u=t.ref(null),m=t.ref(0),h=t.ref({}),p=t.computed((()=>Object.keys(a.config.sequence).sort(((e,t)=>a.config.sequence[e]>a.config.sequence[t]?1:-1)))),f=t.shallowRef([Cu,Bu,zu,Ou,Ru,Du,ju,Od,Ld,Fu,jd,Gd,qd,Ud,Yd,eu,ru,Eu,iu,cu,Hu,bu,wu,Gc,od,gd,Cd,Md,Uu,Ku,om,Ec,lm]),g=t.computed((()=>e=>f.value.find((t=>t.name==`_${e}`)))),b=t.computed((()=>(i.value||d.value)&&"fixed"==a.config.mode?"default":a.config.mode)),v=t.computed((()=>"fixed"!=b.value&&s.value)),y=t.defineComponent(((e,{expose:n})=>{const r=t.ref(null),o=a.config.extends[e.name];return n({btnRef:r}),()=>{var n,i;return o?t.h(pc,{ref:r,name:e.name,tooltip:a.config.tooltip,color:a.color,zIndex:a.zIndex+1,type:o.type||"default",title:`${o.title||""}${(null==(n=o.shortcut)?void 0:n.title)?`【${null==(i=o.shortcut)?void 0:i.title}】`:""}`,leftBorder:o.leftBorder||!1,rightBorder:o.rightBorder||!1,hideScroll:o.hideScroll||!1,disabled:c.value||!l.value||o.disabled,active:o.active||!1,selectConfig:{width:o.width,maxHeight:o.maxHeight,options:o.options},displayConfig:{width:o.width,maxHeight:o.maxHeight,value:o.value,options:o.options},onLayerShow:()=>{"function"==typeof o.onLayerShow&&o.onLayerShow(e.name,r.value)},onLayerShown:()=>{"function"==typeof o.onLayerShown&&o.onLayerShown(e.name,r.value)},onLayerHidden:()=>{"function"==typeof o.onLayerHidden&&o.onLayerHidden(e.name,r.value)},onOperate:(e,t)=>{"function"==typeof o.onOperate&&o.onOperate(e,t,r.value)}},{default:()=>o.default?o.default(e.name,r.value):null,layer:()=>o.layer?o.layer(e.name,r.value):null,option:()=>o.option?o.option(e.name,r.value):null}):null}}),{props:{name:String}});return t.onMounted((()=>{m.value=u.value.offsetHeight,he.on(window,`resize.editify_menu_${r.uid}`,(()=>{m.value=u.value.offsetHeight}))})),t.onBeforeUnmount((()=>{he.off(window,`resize.editify_menu_${r.uid}`)})),n({height:m,menuItemRefs:h}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"menuRef",ref:u,class:t.normalizeClass(["editify-menu",{"editify-border":v.value,"editify-source":t.unref(o)&&"inner"==b.value,"editify-fullscreen":t.unref(i)}]),"data-editify-mode":b.value,style:t.normalizeStyle({zIndex:e.zIndex,...e.config.style||{}})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(n=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[g.value(n)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.value(n)),{key:0,ref_for:!0,ref:e=>h.value[n]=e,color:e.color,"z-index":e.zIndex+1,config:e.config[n],disabled:t.unref(c)||!t.unref(l),tooltip:e.config.tooltip},null,8,["color","z-index","config","disabled","tooltip"])):(t.openBlock(),t.createBlock(t.unref(y),{key:1,ref_for:!0,ref:e=>h.value[n]=e,name:n},null,8,["name"]))],64)))),256))],14,sm))}}),[["__scopeId","data-v-ab624210"]]),dm={locale:{type:String,default:"zh_CN"},modelValue:{type:String,default:"<p><br></p>"},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowCopy:{type:Boolean,default:!0},allowPaste:{type:Boolean,default:!0},allowCut:{type:Boolean,default:!0},allowPasteHtml:{type:Boolean,default:!1},border:{type:Boolean,default:!1},color:{type:String,default:"#03a8f3",validator:e=>!e||de.matchingText(e,"hex")},videoRatio:{type:Number,default:16/9},toolbar:{type:Object,default:null},showWordLength:{type:Boolean,default:!1},customTextPaste:{type:Function,default:null},customHtmlPaste:{type:Function,default:null},customImagePaste:{type:Function,default:null},customVideoPaste:{type:Function,default:null},customFilePaste:{type:Function,default:null},menu:{type:Object,default:null},pasteKeepMarks:{type:Function,default:null},pasteKeepStyles:{type:Function,default:null},customParseNode:{type:Function,default:null},extraKeepTags:{type:Array,default:function(){return[]}},renderRules:{type:Array,default:function(){return[]}},autoheight:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},zIndex:{type:Number,default:1},offset:{type:Number,default:0}},um=["data-editify-uid"],mm=["data-editify-placeholder"],hm=["value"],pm={class:"editify-footer-words"},fm=Ys(t.defineComponent({name:"editify",__name:"editify",props:dm,emits:["update:modelValue","focus","blur","change","keydown","keyup","insertparagraph","rangeupdate","updateview"],setup(e,{expose:n,emit:r}){const a=t.getCurrentInstance(),o=e,i=r,l=(s=o.locale||"zh_CN",e=>({zh_CN:Ks,en_US:Ws}[s][e]));var s;const c=t.ref(null),d=t.ref(null),u=t.ref(null),m=t.ref(null),h=t.ref(null),p=t.ref(null),f=t.ref(!1),g=t.ref(!1),b=t.ref(0),v=t.ref({flatList:[],list:[]}),w=t.ref(!1),x=t.ref(!1),k=t.ref(null),E=t.ref({element:null,start:0}),S=t.ref({show:!1,node:null,type:"text"}),T=t.computed({set(e){i("update:modelValue",e)},get:()=>o.modelValue||"<p><br></p>"}),_=t.computed((()=>le.string2dom(`<div>${T.value}</div>`).innerText)),C=t.computed((()=>!(!(p.value&&T.value&&1==p.value.stack.length&&"block"==p.value.stack[0].type&&p.value.stack[0].parsedom==y.BLOCK_NODE&&p.value.stack[0].isOnlyHasBreak())||p.value.stack[0].hasStyles()||p.value.stack[0].hasMarks())&&!x.value)),N=t.computed((()=>!g.value&&o.border)),B=t.computed((()=>{return Fs({use:!0,style:void 0,tooltip:!0,codeBlock:{languages:{show:!0,disabled:!1,options:[{label:(e=l)("autoRecognize"),value:""},...Pn],width:120,maxHeight:180,leftBorder:!0,rightBorder:!1}},text:{bold:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},italic:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},underline:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},code:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},super:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},sub:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,disabled:!1,options:Hs(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!1,disabled:!1,options:Hs(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},foreColor:{show:!0,disabled:!1,options:Hs(e).foreColor,leftBorder:!0,rightBorder:!1},backColor:{show:!0,disabled:!1,options:Hs(e).backColor,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1}}},o.toolbar||{});var e})),M=t.computed((()=>{return Fs((e=l,t=o.locale,{use:!0,tooltip:!0,mode:"default",style:void 0,sequence:{undo:0,redo:1,heading:2,indent:3,quote:4,separator:5,align:6,orderList:7,unorderList:8,task:9,bold:10,underline:11,italic:12,strikethrough:13,code:14,super:15,sub:16,formatClear:17,fontSize:18,fontFamily:19,lineHeight:20,foreColor:21,backColor:22,link:23,image:24,video:25,table:26,codeBlock:27,attachment:28,mathformula:29,infoBlock:30,sourceView:31,fullScreen:32},undo:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},redo:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},heading:{show:!0,disabled:!1,options:Hs(e).heading,defaultValue:"p",width:"zh_CN"==t?130:150,maxHeight:"",leftBorder:!0,rightBorder:!1,shortcut:Ps.heading},indent:{show:!0,disabled:!1,options:Hs(e).indent,width:"zh_CN"==t?110:150,maxHeight:"",leftBorder:!1,rightBorder:!1,shortcut:Ps.indent},quote:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.quote},separator:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.separator},align:{show:!0,disabled:!1,options:Hs(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!0,rightBorder:!1,shortcut:Ps.align},orderList:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.orderList},unorderList:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.unorderList},task:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.task},bold:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1,shortcut:Ps.bold},underline:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.underline},italic:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.italic},strikethrough:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.strikethrough},code:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.code},super:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.super},sub:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.sub},formatClear:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.formatClear},fontSize:{show:!0,disabled:!1,options:Hs(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1,shortcut:Ps.fontSize},fontFamily:{show:!0,disabled:!1,options:Hs(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1,shortcut:Ps.fontFamily},lineHeight:{show:!0,disabled:!1,options:Hs(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1,shortcut:Ps.lineHeight},foreColor:{show:!0,disabled:!1,options:Hs(e).foreColor,leftBorder:!0,rightBorder:!1,shortcut:Ps.foreColor},backColor:{show:!0,disabled:!1,options:Hs(e).backColor,leftBorder:!1,rightBorder:!1,shortcut:Ps.backColor},link:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1,shortcut:Ps.link},image:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,allowedFileType:["jpg","png","jpeg","webp","jfif","ico","gif","svg","psd"],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.image},video:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,allowedFileType:["mp4","avi","mpg","wmv","mov","rm","swf","flv"],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.video},table:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,maxRows:10,maxColumns:10,shortcut:Ps.table},codeBlock:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.codeBlock},sourceView:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.sourceView},fullScreen:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.fullScreen},attachment:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,accept:"",allowedFileType:[],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.attachment},mathformula:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,handleError:void 0,shortcut:Ps.mathformula},infoBlock:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.infoBlock},extends:{}}),o.menu||{});var e,t})),z=t.computed((()=>c.value?c.value.height:null)),A=t.computed((()=>o.dark)),O=t.computed((()=>o.disabled)),I=t.computed((()=>o.autoheight)),R=e=>{w.value=!0,T.value=e,t.nextTick((()=>{w.value=!1}))},L=()=>{S.value.show=!1,S.value.node=null},D=()=>{O.value||f.value||(L(),t.nextTick((()=>{const e=Hl(p.value,v.value,{parsedom:"pre"}),t=Hl(p.value,v.value,{parsedom:"img"}),n=Hl(p.value,v.value,{parsedom:"video"});if(t)S.value.type="image",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else if(n)S.value.type="video",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else if(e)S.value.type="codeBlock",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else{if(v.value.flatList.filter((e=>e.element.isText())).length)S.value.type="text",S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else{const e=Hl(p.value,v.value,{parsedom:"table"}),t=Hl(p.value,v.value,{parsedom:"a"}),n=Hl(p.value,v.value,{parsedom:"div",marks:{"data-editify-list":"ol"}}),r=Hl(p.value,v.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});t?(S.value.type="link",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):e?(S.value.type="table",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):n?(S.value.type="orderList",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):r&&(S.value.type="unorderList",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${r.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0)}}})))},$=()=>{p.value=new ae(h.value,{value:T.value,disabled:O.value,renderRules:[e=>{((e,t)=>{"ol"!=t.parsedom&&"ul"!=t.parsedom||!t.hasChildren()||(t.children.forEach((n=>{n.type=t.type,n.parsedom="div",n.hasMarks()?n.marks["data-editify-list"]=t.parsedom:n.marks={"data-editify-list":t.parsedom},n.marks["data-editify-element"]=n.key,e.addElementBefore(n,t)})),t.children=[]),t.isEmpty()||!Vl(t,!0)&&!Vl(t,!1)||(t.marks["data-editify-element"]=t.key)})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"img"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"video"==t.parsedom){const n={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,n):t.marks=n,xs(e,t)}})(p.value,e)},e=>{((e,t)=>{t.isEmpty()||"hr"!=t.parsedom||xs(e,t)})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"a"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"code"==t.parsedom){t.parsedom="span";const e={"data-editify-code":!0};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{Vs(p.value,e)},e=>{var t,n,r,a,o,i,l;Us(p.value,e,!(!(null==(t=B.value)?void 0:t.use)||!(null==(a=null==(r=null==(n=B.value)?void 0:n.codeBlock)?void 0:r.languages)?void 0:a.show)),null==(l=null==(i=null==(o=B.value)?void 0:o.codeBlock)?void 0:i.languages)?void 0:l.options)},e=>{((e,t,n)=>{!t.isEmpty()&&Xl(t)&&(t.marks.title=n("attachmentDownloadTitle"),t.marks["data-editify-attachment-name"]||(t.marks["data-editify-attachment-name"]=n("attachmentDefaultName")),xs(e,t))})(p.value,e,l)},e=>{((e,t)=>{!t.isEmpty()&&Ql(t)&&xs(e,t)})(p.value,e)},e=>{((e,t,n)=>{if(!t.isEmpty()&&ts(t)&&n){const e=pe.hex2rgb(n);t.hasStyles()?(t.styles["background-color"]=`rgba(${e[0]},${e[1]},${e[2]},0.15)`,t.styles.color=n):t.styles={"background-color":`rgba(${e[0]},${e[1]},${e[2]},0.15)`,color:n}}})(p.value,e,o.color)},e=>{((e,t)=>{t.hasChildren()&&t.children.forEach((n=>{if(Vl(n,!0)||Vl(n,!1)||Kl(n)||ts(n)||["blockquote","pre","table","h1","h2","h3","h4","h5","h6","p"].includes(n.parsedom)){const r=n.clone();r.type="block";const a=t.getBlock();e.addElementAfter(r,a),n.toEmpty()}}))})(p.value,e)},...o.renderRules],extraKeepTags:[...kc,...o.extraKeepTags],allowCopy:o.allowCopy,allowPaste:o.allowPaste,allowCut:o.allowCut,allowPasteHtml:o.allowPasteHtml,customTextPaste:o.customTextPaste,customImagePaste:o.customImagePaste,customVideoPaste:o.customVideoPaste,customFilePaste:o.customFilePaste,customHtmlPaste:V,customMerge:U,customParseNode:W}),R(p.value.value),p.value.on("change",X),p.value.on("focus",Q),p.value.on("blur",Y),p.value.on("keydown",K),p.value.on("keyup",G),p.value.on("insertParagraph",J),p.value.on("rangeUpdate",ee),p.value.on("deleteInStart",te),p.value.on("deleteComplete",ne),p.value.on("afterRender",re),p.value.domRender(),!o.autofocus||f.value||O.value||ie()},j=()=>{h.value.querySelectorAll("video").forEach((e=>{e.style.height=e.offsetWidth/o.videoRatio+"px"}))},P=e=>{if(O.value)return;const t=e.target,n=e;if(le.isContains(h.value,t)){const e=ce.get(t,"data-alex-editor-key");if(e){const r=p.value.getElementByKey(e);if(r)if("td"==r.parsedom){const e=r.parent.children.length;if(r.parent.children[e-1].isEqual(r))return;const a=le.getElementBounding(t);n.pageX>=Math.abs(a.left+t.offsetWidth-5)&&n.pageX<=Math.abs(a.left+t.offsetWidth+5)&&(E.value.element=r,E.value.start=n.pageX)}else if(["img","video"].includes(r.parsedom)){const e=le.getElementBounding(t);n.pageX>=Math.abs(e.left+t.offsetWidth-10)&&n.pageX<=Math.abs(e.left+t.offsetWidth)&&(E.value.element=r,E.value.start=n.pageX)}}}((e,t)=>{if(le.isContains(e,t))return!1;const n=e=>!!Array.from(e.classList).some((e=>"editify-layer"==e))||!!e.parentElement&&n(e.parentElement);return!n(t)})(u.value,t)&&!f.value&&(b.value=null)},F=e=>{if(O.value)return;const t=e,n=e.target;if(le.isContains(h.value,n)&&["img","video"].includes(n.tagName.toLocaleLowerCase())){const e=le.getElementBounding(n);t.pageX>=Math.abs(e.left+n.offsetWidth-10)&&t.pageX<=Math.abs(e.left+n.offsetWidth)?n.style.cursor="col-resize":n.style.cursor=""}if(E.value.element)if("td"==E.value.element.parsedom){const e=Hl(p.value,v.value,{parsedom:"table"});if(!e)return;const n=e.children.find((e=>"colgroup"==e.parsedom)),r=E.value.element.parent.children.findIndex((e=>e.isEqual(E.value.element))),a=""+(E.value.element.elm.offsetWidth+t.pageX-E.value.start);n.children[r].marks.width=a,n.children[r].elm.setAttribute("width",a),E.value.start=t.pageX}else if(["img","video"].includes(E.value.element.parsedom)){const e=E.value.element.elm.offsetWidth+t.pageX-E.value.start+"px";E.value.element.hasStyles()?E.value.element.styles.width=e:E.value.element.styles={width:e},E.value.element.elm.style.width=e,"video"==E.value.element.parsedom&&j(),E.value.start=t.pageX}},q=()=>{if(!O.value&&E.value.element)if("td"==E.value.element.parsedom){const e=Hl(p.value,v.value,{parsedom:"table"});if(!e)return;const t=e.children.find((e=>"colgroup"==e.parsedom)),n=E.value.element.parent.children.findIndex((e=>e.isEqual(E.value.element))),r=parseFloat(t.children[n].marks.width);isNaN(r)||(t.children[n].marks.width=`${Number((r/E.value.element.parent.elm.offsetWidth*100).toFixed(2))}%`,p.value.domRender(),p.value.rangeRender()),E.value.element=null,E.value.start=0}else if(["img","video"].includes(E.value.element.parsedom)){const e=parseFloat(E.value.element.styles.width);isNaN(e)||(E.value.element.hasStyles()?E.value.element.styles.width=`${Number((e/le.width(h.value)*100).toFixed(2))}%`:E.value.element.styles={width:`${Number((e/le.width(h.value)*100).toFixed(2))}%`},p.value.domRender(),p.value.rangeRender()),E.value.element=null,E.value.start=0}},H=e=>{if(O.value)return;const t=e.target,n=e;if(le.isContains(h.value,t)){const e=ce.get(t,"data-alex-editor-key");if(e){const r=p.value.getElementByKey(e);if(r&&Kl(r)){const e=le.getElementBounding(t);n.pageX>=Math.abs(e.left)&&n.pageX<=Math.abs(e.left+16)&&n.pageY>=Math.abs(e.top+t.offsetHeight/2-8)&&n.pageY<=Math.abs(e.top+t.offsetHeight/2+8)&&("checked"==r.marks["data-editify-task"]?r.marks["data-editify-task"]="uncheck":r.marks["data-editify-task"]="checked",p.value.range||p.value.initRange(),p.value.range.anchor.moveToEnd(r),p.value.range.focus.moveToEnd(r),p.value.domRender(),p.value.rangeRender())}}}},V=async e=>{if(y.flatElements(e).forEach((e=>{if(!e.isText()){let t={},n={};e.hasMarks()&&(e.marks.contenteditable&&(t.contenteditable=e.marks.contenteditable),e.marks.name&&(t.name=e.marks.name),e.marks.disabled&&(t.disabled=e.marks.disabled),"img"==e.parsedom&&e.marks.alt&&(t.alt=e.marks.alt),["img","video"].includes(e.parsedom)&&e.marks.src&&(t.src=e.marks.src),"video"==e.parsedom&&e.marks.autoplay&&(t.autoplay=e.marks.autoplay),"video"==e.parsedom&&e.marks.loop&&(t.loop=e.marks.loop),"video"==e.parsedom&&e.marks.muted&&(t.muted=e.marks.muted),"video"==e.parsedom&&e.marks.controls&&(t.controls=e.marks.controls),"a"==e.parsedom&&e.marks.href&&(t.href=e.marks.href),"a"==e.parsedom&&e.marks.target&&(t.target=e.marks.target),(Vl(e,!0)||Vl(e,!1))&&(t["data-editify-list"]=e.marks["data-editify-list"],t["data-editify-list-style"]=e.marks["data-editify-list-style"]),e.parsedom==y.TEXT_NODE&&e.marks["data-editify-code"]&&(t["data-editify-code"]=e.marks["data-editify-code"]),Kl(e)&&(t["data-editify-task"]=e.marks["data-editify-task"]),"col"==e.parsedom&&e.marks.width&&(t.width=e.marks.width),["td","th"].includes(e.parsedom)&&e.marks.colspan&&(t.colspan=e.marks.colspan),["td","th"].includes(e.parsedom)&&e.marks.rowspan&&(t.rowspan=e.marks.rowspan),["td","th"].includes(e.parsedom)&&e.marks["data-editify-merged"]&&(t["data-editify-merged"]=e.marks["data-editify-merged"]),Xl(e)&&(t["data-editify-attachment"]=e.marks["data-editify-attachment"],e.marks["data-editify-attachment-name"]&&(t["data-editify-attachment-name"]=e.marks["data-editify-attachment-name"])),Jl(e)&&(t=Fs(t,de.clone(e.marks))),ts(e)&&(t["data-editify-info"]=e.marks["data-editify-info"])),e.hasStyles()&&(["img","video"].includes(e.parsedom)&&e.styles.width&&(n.width=e.styles.width),(e.isBlock()||e.isInblock())&&e.styles["text-indent"]&&(n["text-indent"]=e.styles["text-indent"]),(e.isBlock()||e.isInblock())&&e.styles["text-align"]&&(n["text-align"]=e.styles["text-align"]),(e.isBlock()||e.isInblock())&&e.styles["line-height"]&&(n["line-height"]=e.styles["line-height"]),Jl(e)&&(n=Fs(n,de.clone(e.styles)))),"function"==typeof o.pasteKeepMarks&&(t=Fs(t,o.pasteKeepMarks(e))),"function"==typeof o.pasteKeepStyles&&(n=Fs(n,o.pasteKeepStyles(e))),e.marks=t,e.styles=n}if(e.parsedom&&["tbody","tr","th","td","thead","tfooter","colgroup","col"].includes(e.parsedom)){if(!!!ql(e,{parsedom:"table"})&&(e.toEmpty(),e.parent)){const t=e.parent.children.findIndex((t=>t.isEqual(e)));e.parent.children.splice(t,1)}}})),(e=e.filter((e=>!e.isEmpty()))).length)if("function"==typeof o.customHtmlPaste)await o.customHtmlPaste(e);else{p.value.insertElement(e[0]);for(let t=e.length-1;t>=1;t--)p.value.addElementAfter(e[t],e[0]);p.value.range.anchor.moveToEnd(e[e.length-1]),p.value.range.focus.moveToEnd(e[e.length-1])}},U=(e,t)=>{const n=t.getUneditableElement();n?n.toEmpty():(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)},W=e=>(Xl(e)&&(e.type="closed"),Ql(e)&&y.flatElements(e.children).forEach((e=>{e.locked=!0,e.isText()||e.hasChildren()||(e.type="closed")})),"function"==typeof o.customParseNode&&(e=o.customParseNode(e)),e),K=(e,t)=>{var n;if(O.value)i("keydown",e,t);else{for(let e in M.value)if("extends"==e){const n=M.value[e];Object.keys(n).forEach((e=>{var r;const a=n[e],o=a.shortcut;if(o&&"function"==typeof o.define){const n=o.define(t);!0===n?(t.preventDefault(),a.disabled||("function"==typeof o.operation?o.operation(p.value,v.value,f,g):null==(r=c.value)||r.menuItemRefs[e].btnRef.handleClick())):n&&de.isObject(n)&&Object.keys(n).forEach((r=>{var i;n[r]&&(t.preventDefault(),a.disabled||("function"==typeof o.operation?o.operation(p.value,v.value,f,g,r):null==(i=c.value)||i.menuItemRefs[e].btnRef.handleClick()))}))}}))}else if(!["use","tooltip","mode","style","sequence"].includes(e)){const r=M.value[e];if(de.isObject(r)&&!0===r.show&&de.isObject(r.shortcut)){const a=r.shortcut;if("function"==typeof a.define){const o=a.define(t);!0===o?(t.preventDefault(),r.disabled||("function"==typeof a.operation?a.operation(p.value,v.value,f,g):null==(n=c.value)||n.menuItemRefs[e].btnRef.handleClick())):o&&de.isObject(o)&&Object.keys(o).forEach((n=>{var i;o[n]&&(t.preventDefault(),r.disabled||("function"==typeof a.operation?a.operation(p.value,v.value,f,g,n):null==(i=c.value)||i.menuItemRefs[e].btnRef.handleClick()))}))}}}"tab"!=t.key.toLocaleLowerCase()||t.metaKey||t.shiftKey||t.ctrlKey||t.altKey||!os(p.value,v.value)&&!as(p.value,v.value)||(t.preventDefault(),p.value.insertText(" "),p.value.domRender(),p.value.rangeRender()),i("keydown",e,t)}},G=(e,t)=>{i("keyup",e,t)},Z=e=>{if(O.value||f.value)return;const t=e.target;if("img"==t.nodeName.toLocaleLowerCase()||"video"==t.nodeName.toLocaleLowerCase()){const e=Number(t.getAttribute("data-editify-element"));if(oe.isNumber(e)){const t=p.value.getElementByKey(e);p.value.range||p.value.initRange(),p.value.range.anchor.moveToStart(t),p.value.range.focus.moveToEnd(t),p.value.rangeRender()}}},X=(e,t)=>{R(e),i("change",e,t)},Y=e=>{O.value||(o.border&&o.color&&!g.value&&(m.value.style.borderColor="",m.value.style.boxShadow="",M.value.use&&(c.value.$el.style.borderColor="",c.value.$el.style.boxShadow="")),i("blur",e))},Q=e=>{if(!O.value){if(o.border&&o.color&&!g.value){m.value.style.borderColor=o.color;const e=pe.hex2rgb(o.color);M.value.use&&"inner"==M.value.mode?(m.value.style.boxShadow=`0 8px 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5),8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5), -8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5)`,c.value.$el.style.borderColor=o.color,c.value.$el.style.boxShadow=`0 -8px 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5),8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5), -8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5)`):(M.value.use,m.value.style.boxShadow=`0 0 8px rgba(${e[0]},${e[1]},${e[2]},0.5)`)}i("focus",e)}},J=(e,t)=>{e.isEqual(t)||(t.isBlock()&&e.isBlock()&&t.isOnlyHasBreak()&&e.isOnlyHasBreak()&&t.parsedom!=y.BLOCK_NODE&&(bs(t),p.value.range.anchor.moveToStart(t),p.value.range.focus.moveToStart(t),e.toEmpty()),Kl(e)&&(e.marks["data-editify-task"]="uncheck")),i("insertparagraph",T.value)},ee=()=>{b.value?b.value++:b.value=1,p.value.range&&(v.value=p.value.getElementsByRange(),k.value&&(clearTimeout(k.value),k.value=null),k.value=setTimeout((()=>{B.value.use&&D()}),200),i("rangeupdate"))},te=e=>{e.isBlock()&&bs(e)},ne=()=>{const e=p.value.range.anchor.element.getUneditableElement();e&&e.toEmpty()},re=()=>{j(),h.value.querySelectorAll("span[data-editify-attachment]").forEach((e=>{he.off(e,"click"),he.on(e,"click",(async()=>{const t=e.getAttribute("data-editify-attachment"),n=await fetch(t,{method:"GET"}),r=await n.blob(),a=document.createElement("a");a.setAttribute("target","_blank"),a.setAttribute("href",URL.createObjectURL(r)),a.setAttribute("download",e.getAttribute("data-editify-attachment-name")),a.click()}))})),i("updateview")},ie=()=>{p.value.collapseToEnd(),p.value.rangeRender(),le.setScrollTop({el:h.value,number:le.getScrollHeight(h.value),time:300})};return t.watch((()=>T.value),(e=>{w.value||(p.value.stack=p.value.parseHtml(e),p.value.range=null,p.value.domRender(),p.value.rangeRender(),h.value.blur())})),t.watch((()=>f.value),(e=>{B.value.use&&(e?L():D())})),t.watch((()=>O.value),(e=>{e?p.value.setDisabled():p.value.setEnabled()})),t.watch((()=>A.value),(e=>{e?document.documentElement.setAttribute("data-editify-dark","true"):document.documentElement.removeAttribute("data-editify-dark")}),{immediate:!0}),t.onMounted((()=>{$(),he.on(document.documentElement,`mousedown.editify_${a.uid}`,P),he.on(document.documentElement,`mousemove.editify_${a.uid}`,F),he.on(document.documentElement,`mouseup.editify_${a.uid}`,q),he.on(document.documentElement,`click.editify_${a.uid}`,H),he.on(window,`resize.editify_${a.uid}`,j)})),t.onBeforeUnmount((()=>{he.off(document.documentElement,`mousedown.editify_${a.uid} mousemove.editify_${a.uid} mouseup.editify_${a.uid} click.editify_${a.uid}`),he.off(window,`resize.editify_${a.uid}`),p.value.destroy()})),t.provide("editor",p),t.provide("isSourceView",f),t.provide("isFullScreen",g),t.provide("rangeKey",b),t.provide("dataRangeCaches",v),t.provide("$editTrans",l),t.provide("showBorder",N),t.provide("isDark",A),t.provide("isDisabled",O),t.provide("isAutoHeight",I),n({editor:p,isSourceView:f,isFullScreen:g,rangeKey:b,dataRangeCaches:v,textValue:_,menuHeight:z,collapseToEnd:ie,collapseToStart:()=>{p.value.collapseToStart(),p.value.rangeRender(),t.nextTick((()=>{le.setScrollTop({el:h.value,number:0,time:300})}))}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify",{"editify-fullscreen":g.value,"editify-autoheight":!g.value&&I.value}]),style:t.normalizeStyle({zIndex:e.zIndex,paddingTop:g.value?"":(e.offset||"")+"px"}),ref_key:"elRef",ref:u},[M.value.use&&p.value?(t.openBlock(),t.createBlock(t.unref(cm),{key:0,ref_key:"menuRef",ref:c,config:M.value,color:e.color,"z-index":e.zIndex+1},null,8,["config","color","z-index"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"bodyRef",ref:m,class:t.normalizeClass(["editify-body",{"editify-border":N.value,"editify-menu_inner":M.value.use&&"inner"==M.value.mode}]),"data-editify-uid":t.unref(a).uid},[t.createElementVNode("div",{ref_key:"contentRef",ref:h,class:t.normalizeClass(["editify-content",{"editify-placeholder":C.value,"editify-disabled":O.value}]),onClick:Z,onCompositionstart:n[0]||(n[0]=e=>x.value=!0),onCompositionend:n[1]||(n[1]=e=>x.value=!1),"data-editify-placeholder":e.placeholder,tabindex:"-1"},null,42,mm),f.value?(t.openBlock(),t.createElementBlock("textarea",{key:0,value:T.value,readonly:"",class:"editify-sourceview"},null,8,hm)):t.createCommentVNode("",!0),t.createVNode(t.unref(Su),{ref_key:"toolbarRef",ref:d,modelValue:S.value.show,"onUpdate:modelValue":n[2]||(n[2]=e=>S.value.show=e),node:S.value.node,type:S.value.type,"scroll-node":h.value,config:B.value,color:e.color,"z-index":e.zIndex+10},null,8,["modelValue","node","type","scroll-node","config","color","z-index"])],10,um),e.showWordLength?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["editify-footer",{"editify-fullscreen":g.value&&!f.value}]),style:t.normalizeStyle({zIndex:e.zIndex+1})},[t.createElementVNode("div",pm,t.toDisplayString(t.unref(l)("totalWordCount"))+t.toDisplayString(_.value.length),1)],6)):t.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-c01a8e33"]]),gm=y.prototype.isPreStyle;y.prototype.isPreStyle=function(){return"td"==(this.getInblock()||this.getBlock()).parsedom||gm.apply(this)};const bm=((vm=fm).install=e=>{e.component(vm.name,vm)},vm);var vm;const ym="0.2.26";console.log(`%c vue-editify %c v${ym} `,"padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;","padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;"),e.AlexElement=y,e.Editify=bm,e.addSpaceTextToBothSides=xs,e.default=bm,e.elementIsAttachment=Xl,e.elementIsInfoBlock=ts,e.elementIsList=Vl,e.elementIsMatch=Fl,e.elementIsMathformula=Ql,e.elementIsTask=Kl,e.getInfoBlockByElement=ns,e.getListByElement=Ul,e.getMatchElementByElement=ql,e.getMatchElementByRange=Hl,e.getMathformulaByElement=Jl,e.getRangeText=ws,e.getTaskByElement=Gl,e.hasAttachmentInRange=Yl,e.hasImageInRange=ss,e.hasInfoBlockInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ns(e.range.anchor.element):t.flatList.some((e=>!!ns(e.element)))),e.hasLinkInRange=ls,e.hasListInRange=(e,t,n=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Ul(e.range.anchor.element,n):t.flatList.some((e=>!!Ul(e.element,n)))),e.hasMathformulaInRange=es,e.hasPreInRange=as,e.hasQuoteInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ql(e.range.anchor.element,{parsedom:"blockquote"}):t.flatList.some((e=>!!ql(e.element,{parsedom:"blockquote"})))),e.hasTableInRange=os,e.hasTaskInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Gl(e.range.anchor.element):t.flatList.some((e=>!!Gl(e.element)))),e.hasVideoInRange=cs,e.insertAttachment=Ls,e.insertCodeBlock=Is,e.insertImage=zs,e.insertInfoBlock=$s,e.insertLink=Ms,e.insertMathformula=Ds,e.insertSeparator=Rs,e.insertTable=Os,e.insertVideo=As,e.install=e=>{e.component(bm.name,bm)},e.queryTextMark=ps,e.queryTextStyle=us,e.rangeIsInInfoBlock=rs,e.rangeIsInList=Wl,e.rangeIsInQuote=is,e.rangeIsInTask=Zl,e.removeTextMark=gs,e.removeTextStyle=hs,e.setAlign=_s,e.setHeading=ks,e.setIndentDecrease=Ss,e.setIndentIncrease=Es,e.setLineHeight=Bs,e.setList=Cs,e.setQuote=Ts,e.setTask=Ns,e.setTextMark=fs,e.setTextStyle=ms,e.version=ym,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).editify={},e.Vue)}(this,(function(e,t){"use strict";var n=Object.defineProperty,r=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);const a={formatNumber(e){return this.isNumber(e)?e.toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"):e},isNumber:e=>"number"==typeof e&&!isNaN(e),add:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let n=0,r=e.toString(),a=t.toString();try{n+=r.split(".")[1].length}catch(o){}try{n+=a.split(".")[1].length}catch(o){}return Number(r.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,n)})),divide:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=e.toString(),o=t.toString();try{n=a.split(".")[1].length}catch(i){}try{r=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,r-n)}))},o={insert(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if("string"!=typeof t)throw new TypeError("The second argument must be a string");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,n)+t+e.substring(n,e.length)},delete(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!a.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+n,e.length)},replace(e,t,n,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!a.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!a.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof r)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+r+e.substring(n,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let n=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(n=n.replace(/\s/g,"")),n}},i={isWindow:e=>e&&e instanceof Window,getElementPoint(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(this.isElement(t)||(t=document.body),!this.isContains(t,e))throw new Error("The second argument and the first argument have no hierarchical relationship");let n=e,r=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)r+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:r,left:a,right:t.offsetWidth-a-n.offsetWidth,bottom:t.offsetHeight-r-n.offsetHeight}},isContains(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e===t||(e.contains?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t)))},isParentNode(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e!==t&&t.parentNode===e},children(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");return[...e.querySelectorAll(t||"*")].filter((t=>t.parentNode===e))},siblings(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!e.parentNode)return[];return[...e.parentNode.querySelectorAll(t||"*")].filter((t=>t.parentNode===e.parentNode&&t!=e))},rem2px(e){if(!a.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return a.mutiply(e,parseFloat(t))},px2rem(e){if(!a.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return a.divide(e,parseFloat(t))},width(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientWidth,n=parseFloat(this.getCssStyle(e,"padding-left")),r=parseFloat(this.getCssStyle(e,"padding-right"));return a.subtract(t,n,r)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,n=parseFloat(this.getCssStyle(e,"padding-top")),r=parseFloat(this.getCssStyle(e,"padding-bottom"));return a.subtract(t,n,r)},removeClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;o.trim(t).split(/\s+/).forEach((e=>{n.remove(e)}))},addClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;o.trim(t).split(/\s+/).forEach((e=>{n.add(e)}))},hasClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;return o.trim(t).split(/\s+/).every((e=>n.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let n=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(n=e),"function"==typeof e&&(t=e);let r=!0;n.addEventListener("scroll",(()=>{if(this.getScrollTop(n)<=0){if(!r)return;"function"==typeof t&&(r=!1,t({state:"top",target:n}))}else{let e={state:"bottom",target:n},o=0;if(o=n==window?window.innerHeight:n.clientHeight,a.add(this.getScrollTop(n),o)+1>=this.getScrollHeight(n)&&o!=this.getScrollHeight(n)){if(!r)return;"function"==typeof t&&(r=!1,t(e))}else r=!0}}))},getScrollWidth(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollWidth:0==document.documentElement.scrollWidth||0==document.body.scrollWidth?document.documentElement.scrollWidth||document.body.scrollWidth:document.documentElement.scrollWidth>document.body.scrollWidth?document.documentElement.scrollWidth:document.body.scrollWidth,t},getScrollHeight(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollHeight:0==document.documentElement.scrollHeight||0==document.body.scrollHeight?document.documentElement.scrollHeight||document.body.scrollHeight:document.documentElement.scrollHeight>document.body.scrollHeight?document.documentElement.scrollHeight:document.body.scrollHeight,t},setScrollTop(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,o=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollTop=document.body.scrollTop=r:n.scrollTop=r,e();else{let i=10,l=a.divide(o,i),s=this.getScrollTop(n),c=a.divide(a.subtract(r,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollTop=document.body.scrollTop=s=a.add(s,c):n.scrollTop=s=a.add(s,c)):(clearInterval(d),e())}),i)}}))},getScrollTop(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollTop:0==document.documentElement.scrollTop||0==document.body.scrollTop?document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,t},getScrollLeft(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollLeft:0==document.documentElement.scrollLeft||0==document.body.scrollLeft?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,t},setScrollLeft(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,o=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=r:n.scrollLeft=r,e();else{let i=10,l=a.divide(o,i),s=this.getScrollLeft(n),c=a.divide(a.subtract(r,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollLeft=document.body.scrollLeft=s=a.add(s,c):n.scrollLeft=s=a.add(s,c)):(clearInterval(d),e())}),i)}}))},getCssStyle(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n="";return n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],n},getCssSelector(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a selector string");if(/^#{1}/.test(e))return{type:"id",value:e.substr(1)};if(/^\./.test(e))return{type:"class",value:e.substr(1)};if(/^\[(.+)\]$/.test(e)){let t="attribute",n="",r=o.trim(e,!0).substring(1,o.trim(e,!0).length-1).split("=");return 1==r.length&&(n=r[0]),2==r.length&&(n={attributeName:r[0],attributeValue:r[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:n}}return{type:"tag",value:e}},getElementBounding(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.getBoundingClientRect();return{top:t.top,bottom:a.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:a.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");const t=document.createElement("template");return t.innerHTML=e,1==t.content.children.length?t.content.children[0]:Array.from(t.content.children)}},l="_dap-datas",s={remove(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[l]||{};null==t||""===t?e[l]={}:(delete n[t],e[l]=n)},has(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");return(e[l]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[l]||{};return null==t||""===t?n:n[t]},set(e,t,n){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let r=e[l]||{};r[t]=n,e[l]=r}},c={matchingText(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=null;if("Chinese"==t&&(n=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(n=/[\u4e00-\u9fa5]/),"email"==t&&(n=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(n=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(n=/^\d+$/),"int-"==t&&(n=/^-\d+$/),"int"==t&&(n=/^-?\d+$/),"pos"==t&&(n=/^\d*\.?\d+$/),"neg"==t&&(n=/^-\d*\.?\d+$/),"number"==t&&(n=/^-?\d*\.?\d+$/),"phone"==t&&(n=/^1[0-9]\d{9}$/),"idCard"==t&&(n=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/),"url"==t&&(n=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/),"hex"==t&&(n=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(n=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/),"rgba"==t&&(n=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/),"QQ"==t&&(n=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(n=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!n)throw new Error("The second parameter is out of scope");return n.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1);if(!n){let e=window.location.hash.split("?");2==e.length&&(n=e[1])}let r=n.match(t);return r?decodeURIComponent(r[2]):null},isEmptyObject(e){return!!this.isObject(e)&&0==Object.keys(e).length},equal(e,t){if(typeof e!=typeof t)return!1;if(this.isObject(e)&&this.isObject(t)){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!=r.length)return!1;let a=n.length,o=!0;for(let i=0;i<a;i++){let r=n[i],a=e[r],l=t[r];if(!this.equal(a,l)){o=!1;break}}return o}return e===t},isObject:e=>!("object"!=typeof e||!e),copyText(e){if(!e||"string"!=typeof e)throw new TypeError("No text to copy is defined");if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(e)},clone(e){if(this.isObject(e)){if(Array.isArray(e))return e.map((e=>this.clone(e)));let t={};for(let n in e)t[n]=this.clone(e[n]);return t}return e}},d=e=>{let t=e.split(/[\s]+/g),n=[];return t.forEach((e=>{let t=e.split("."),r={eventName:t[0]};t.length>1&&(r.guid=t[1]),n.push(r)})),n},u=(e,t,n)=>{let r=s.get(e,"dap-defined-events")||{},a=Object.keys(r),o=a.length;for(let i=0;i<o;i++){let o=a[i];r[o].type==t&&(n?o==t+"."+n&&(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0):(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0))}r=(e=>{let t={};return Object.keys(e).forEach((n=>{e[n]&&(t[n]=e[n])})),t})(r),s.set(e,"dap-defined-events",r)},m={on(e,t,n,r){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!n||"function"!=typeof n)throw new TypeError("The third argument must be a function");c.isObject(r)||(r={});d(t).forEach((t=>{((e,t,n,r,a)=>{let o=s.get(e,"dap-defined-events")||{};n||(n=s.get(e,"dap-event-guid")||0,s.set(e,"dap-event-guid",n+1)),o[n=t+"."+n]&&o[n].type==t&&e.removeEventListener(t,o[n].fn,o[n].options),e.addEventListener(t,r,a),o[n]={type:t,fn:r,options:a},s.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,n.bind(e),r)}))},off(e,t){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=s.get(e,"dap-defined-events");if(!n)return;if(!t){let t=Object.keys(n),r=t.length;for(let a=0;a<r;a++){let r=t[a];e.removeEventListener(n[r].type,n[r].fn,n[r].options)}return s.remove(e,"dap-defined-events"),void s.remove(e,"dap-event-guid")}d(t).forEach((t=>{u(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||i.isElement(e)||i.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=s.get(e,"dap-defined-events");if(t)return t}},h={getImageUrl(e){if(!(e&&e instanceof File))throw new TypeError("The argument must be a File object");return window.URL.createObjectURL(e)},dataFileToBase64:e=>new Promise(((t,n)=>{e&&e instanceof File||n(new TypeError("The argument must be a File object"));let r=new FileReader;r.readAsDataURL(e),r.onloadend=()=>{let e=r.result;t(e)}})),dataBase64toFile(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.split(","),r=n[0].match(/:(.*?);/)[1],a=atob(n[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:r})},compressImage(e,t){const n={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};c.isObject(t)&&(a.isNumber(t.width)&&(n.width=t.width),a.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(n.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(n.mimeType=t.mimeType),a.isNumber(t.maxSize)&&(n.maxSize=t.maxSize),a.isNumber(t.minSize)&&(n.minSize=t.minSize));const r=(e,t,a)=>{let o=e.toDataURL("image/"+n.mimeType,a),i=this.dataBase64toFile(o,t);if(n.maxSize>0&&i.size>1024*n.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const n=r(e,t,a);o=n.url,i=n.file,a=n.quality}return{file:i,url:o,quality:a}};return new Promise(((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>{let i=o.result,l=new Image;l.src=i,l.onload=()=>{if(n.minSize>0&&e.size<=1024*n.minSize)return void t({file:e,url:i,quality:1,width:l.width,height:l.height});let a=document.createElement("canvas"),o=a.getContext("2d");a.width=n.width||l.width,a.height=n.width?n.width/(l.width/l.height):l.height,o.drawImage(l,0,0,a.width,a.height);let s=e.name.lastIndexOf(".");const c=e.name.substring(0,s)+"."+n.mimeType;let d=r(a,c,n.quality);t({...d,width:a.width,height:a.height})},l.onerror=()=>{a(new Error("Failed to load image file"))}},o.onerror=()=>{a(new Error("Failed to load image file"))}}))}},p={language:()=>window.navigator.browserLanguage||window.navigator.language,device(){const e=window.navigator.userAgent;return{PC:!e.match(/AppleWebKit.*Mobile.*/),Mobile:!!e.match(/AppleWebKit.*Mobile.*/),iPhone:e.includes("iPhone"),Phone:e.includes("Android")&&/(?:Mobile)/.test(e)||e.includes("iPhone")||/(?:Windows Phone)/.test(e),iPad:e.includes("iPad"),Tablet:e.includes("iPad")||e.includes("Android")&&!/(?:Mobile)/.test(e)||e.includes("Firefox")&&/(?:Tablet)/.test(e),WindowsPhone:/(?:Windows Phone)/.test(e)}},browser(){const e=window.navigator.userAgent;return{Edge:!!e.match(/Edg\/([\d.]+)/),weixin:e.includes("MicroMessenger"),QQ:e.includes("QQ"),QQBrowser:e.includes("MQQBrowser"),UC:e.includes("UCBrowser"),Chrome:e.includes("Chrome"),Firefox:e.includes("Firefox"),sougou:e.toLocaleLowerCase().includes("se 2.x")||e.toLocaleLowerCase().includes("metasr")||e.toLocaleLowerCase().includes("sogou"),Safari:e.includes("Safari")&&!e.includes("Chrome")}},browserKernel(){const e=window.navigator.userAgent;return e.includes("Presto")?"opera":e.includes("AppleWebKit")?"webkit":e.includes("Gecko")&&!e.includes("KHTML")?"gecko":""},os(){const e=window.navigator.userAgent;return{Windows:e.includes("Windows"),Windows_CPU:e.toLocaleLowerCase().includes("win64")||e.toLocaleLowerCase().includes("wow64")?"x64":e.toLocaleLowerCase().includes("win32")||e.toLocaleLowerCase().includes("wow32")?"x32":"",Windows_Version:e.includes("Windows NT 6.1")||e.includes("Windows 7")?"Win7":e.includes("Windows NT 6.3")||e.includes("Windows NT 6.2")||e.includes("Windows NT 8")?"Win8":e.includes("Windows NT 10")||e.includes("Windows NT 6.4")?"Win10":"",Mac:e.includes("Macintosh"),Mac_Version:function(){if(e.includes("Macintosh")){const t=e.match(/Mac OS X ([^\s]+)\)/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),ios_Version:function(){if(e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){const t=e.match(/CPU.+OS ([^\s]+) like Mac OS X/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),Android:e.includes("Android"),Android_Version:function(){const t=e.match(/Android ([^\s]+);/);return t&&t[1]?t[1].split(/_|\./).join("."):""}(),Linux:e.includes("Linux"),HarmonyOS:e.includes("HarmonyOS"),Ubuntu:e.includes("Ubuntu")}}},f=function(e){return/^[\uFEFF]+$/g.test(e)},g=function(e,t){return 3==t.nodeType?i.isContains(e,t.parentNode):i.isContains(e,t)},b=function(e,t){if(!e)return null;const n=t=>{let r=null;const a=t.length;for(let o=0;o<a;o++){const a=t[o];if(a&&a.key===e){r=a;break}if(a&&a.hasChildren()){const e=n(a.children);if(e){r=e;break}}}return r};return n(t)},v=class e{constructor(e,t,n,a,o){r(this,"key",function(){let e=s.get(window,"data-alex-editor-key")||0;return e++,s.set(window,"data-alex-editor-key",e),e}()),r(this,"type"),r(this,"parsedom"),r(this,"marks"),r(this,"styles"),r(this,"textContent"),r(this,"children",null),r(this,"parent",null),r(this,"behavior","default"),r(this,"namespace",null),r(this,"locked",!1),r(this,"elm",null),this.type=e,this.parsedom=t,this.marks=n,this.styles=a,this.textContent=o?o.replace(/\r\n/g,"\n"):o}isBlock(){return"block"==this.type}isInblock(){return"inblock"==this.type}isInline(){return"inline"==this.type}isClosed(){return"closed"==this.type}isText(){return"text"==this.type}isBreak(){return this.isClosed()&&"br"==this.parsedom}isEmpty(){return this.isText()?!this.textContent:!!(this.isBlock()||this.isInblock()||this.isInline())&&(!this.hasChildren()||this.children.every((e=>e.isEmpty())))}isSpaceText(){return!this.isEmpty()&&this.isText()&&f(this.textContent)}getUneditableElement(){return this.hasMarks()&&"false"==this.marks.contenteditable?this:this.parent?this.parent.getUneditableElement():null}isEqual(t){return!!e.isElement(t)&&this.key==t.key}isContains(e){return!!this.isEqual(e)||!!e.parent&&this.isContains(e.parent)}isOnlyHasBreak(){if(this.hasChildren()){const e=this.children.filter((e=>!e.isEmpty()));return e.length&&e.every((e=>e.isBreak()))}return!1}isPreStyle(){const e=this.getInblock()||this.getBlock();return"pre"==e.parsedom||(!(!e.hasStyles()||!["pre","pre-wrap"].includes(e.styles["white-space"]))||!!e.parent&&e.parent.isPreStyle())}hasMarks(){return!!this.marks&&(!!c.isObject(this.marks)&&!c.isEmptyObject(this.marks))}hasStyles(){return!!this.styles&&(!!c.isObject(this.styles)&&!c.isEmptyObject(this.styles))}hasChildren(){return!this.isClosed()&&!this.isText()&&(!!Array.isArray(this.children)&&!!this.children.length)}hasContains(e){return this.isContains(e)||e.isContains(this)}clone(t=!0){if("boolean"!=typeof t)throw new Error("The parameter must be a Boolean");let n=new e(this.type,this.parsedom,c.clone(this.marks),c.clone(this.styles),this.textContent);return n.behavior=this.behavior,n.namespace=this.namespace,n.locked=this.locked,t&&this.hasChildren()&&this.children.forEach((e=>{let r=e.clone(t);n.hasChildren()?n.children.push(r):n.children=[r],r.parent=n})),n}convertToBlock(){if(this.isBlock())return;let t=this.clone();this.type="block",this.parsedom=e.BLOCK_NODE,this.marks=null,this.styles=null,this.textContent=null,this.children=[t],t.parent=this}toEmpty(){if(!this.isEmpty())return this.isText()?(this.marks=null,this.styles=null,this.textContent=null,this.elm=null,this.namespace=null,void(this.locked=!1)):this.isClosed()?(this.type="text",this.parsedom=null,this.marks=null,this.styles=null,this.textContent=null,this.elm=null,this.namespace=null,void(this.locked=!1)):void(this.hasChildren()&&this.children.forEach((e=>{e.toEmpty()})))}getBlock(){return this.parent?this.parent.getBlock():this}getInblock(){return this.isInblock()?this:this.parent?this.parent.getInblock():null}getInline(){return this.isInline()?this:this.parent?this.parent.getInline():null}isEqualStyles(e){return!this.hasStyles()&&!e.hasStyles()||!!(this.hasStyles()&&e.hasStyles()&&c.equal(this.styles,e.styles))}isEqualMarks(e){return!this.hasMarks()&&!e.hasMarks()||!!(this.hasMarks()&&e.hasMarks()&&c.equal(this.marks,e.marks))}isFirst(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const n=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(n[0])}return!1}isLast(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const n=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(n[n.length-1])}return!1}__render(){let t=null;this.isText()?(t=this.namespace?document.createElementNS(this.namespace,e.TEXT_NODE):document.createElement(e.TEXT_NODE),t.textContent=this.textContent):(t=this.namespace?document.createElementNS(this.namespace,this.parsedom):document.createElement(this.parsedom),this.hasChildren()&&this.children.forEach((e=>{e.__render(),t.appendChild(e.elm)}))),this.hasMarks()&&Object.keys(this.marks).forEach((e=>{/(^on)|(^style$)|(^face$)/g.test(e)||t.setAttribute(e,this.marks[e])})),this.hasStyles()&&Object.keys(this.styles).forEach((e=>{t.style.setProperty(e,this.styles[e])})),s.set(t,"data-alex-editor-key",this.key),this.elm=t}__fullClone(){let t=new e(this.type,this.parsedom,c.clone(this.marks),c.clone(this.styles),this.textContent);return t.behavior=this.behavior,t.namespace=this.namespace,t.locked=this.locked,t.key=this.key,t.elm=this.elm,this.hasChildren()&&(t.children=this.children.map((e=>{const n=e.__fullClone();return n.parent=t,n}))),t}static isElement(t){return t instanceof e}static flatElements(e){const t=e=>{let n=[];const r=e.length;for(let a=0;a<r;a++)if(e[a]&&(n.push(e[a]),e[a].hasChildren())){const r=t(e[a].children);n.push(...r)}return n};return t(e)}static getSpaceElement(){return new e("text",null,null,null,"\ufeff")}static create(t){let n=null;return"text"==t.type?n=new e(t.type,null,t.marks?t.marks:null,t.styles?t.styles:null,t.textContent?t.textContent:null):(n=new e(t.type,t.parsedom,t.marks?t.marks:null,t.styles?t.styles:null,null),"inblock"==t.type&&t.behavior&&(n.behavior=t.behavior),"closed"!=t.type&&Array.isArray(t.children)&&(n.children=t.children.map((t=>{const r=e.create(t);return r.parent=n,r})))),t.namespace&&(n.namespace=t.namespace),"boolean"==typeof t.locked&&(n.locked=t.locked),n}};r(v,"BLOCK_NODE","p"),r(v,"TEXT_NODE","span"),r(v,"VOID_NODES",["colgroup","col"]),r(v,"EMPTY_NODES",["meta","link","style","script","title","base","noscript","template","annotation"]);let y=v;class w{constructor(e,t){r(this,"anchor"),r(this,"focus"),this.anchor=e,this.focus=t}}class x{constructor(e,t){if(r(this,"element"),r(this,"offset"),this.element=e,this.offset=t,this.element.isText()||this.element.isClosed()){if(y.VOID_NODES.includes(this.element.parsedom))throw new Error("Invisible element cannot be set as focal point")}else 0==this.offset?this.moveToStart(this.element):this.moveToEnd(this.element)}static isPoint(e){return e instanceof x}isEqual(e){return!!x.isPoint(e)&&(this.element.isEqual(e.element)&&this.offset==e.offset)}moveToEnd(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isEmpty())throw new Error("The argument cannot be an empty element");if(e.isText())this.element=e,this.offset=e.textContent.length;else if(e.isClosed()){if(y.VOID_NODES.includes(e.parsedom))throw new Error("Invisible element cannot be set as focal point");this.element=e,this.offset=1}else if(e.hasChildren()){const t=y.flatElements(e.children).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))),n=t.length;if(0==n)throw new Error("There is no element to set the focus");this.moveToEnd(t[n-1])}}moveToStart(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isEmpty())throw new Error("The argument cannot be an empty element");if(e.isText())this.element=e,this.offset=0;else if(e.isClosed()){if(y.VOID_NODES.includes(e.parsedom))throw new Error("Invisible element cannot be set as focal point");this.element=e,this.offset=0}else if(e.hasChildren()){const t=y.flatElements(e.children).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)));if(0==t.length)throw new Error("There is no element to set the focus");this.moveToStart(t[0])}}}class E{constructor(){r(this,"records",[]),r(this,"redoRecords",[])}cloneRange(e,t){if(t){const n=b(t.anchor.element.key,e),r=b(t.focus.element.key,e);if(n&&r){const e=new x(n,t.anchor.offset),a=new x(r,t.focus.offset);return new w(e,a)}}return null}setState(e,t){const n=e.map((e=>e.__fullClone())),r=this.cloneRange(n,t);this.records.push({stack:e.map((e=>e.__fullClone())),range:r}),this.redoRecords=[]}undo(){if(this.records.length>1){const e=this.records.pop();this.redoRecords.push(e);const t=this.records[this.records.length-1],n=t.stack.map((e=>e.__fullClone()));return{stack:n,range:this.cloneRange(n,t.range)}}return null}redo(){if(this.redoRecords.length>0){const e=this.redoRecords.pop();this.records.push(e);const t=e.stack.map((e=>e.__fullClone()));return{stack:t,range:this.cloneRange(t,e.range)}}return null}updateRange(e){const t=this.records[this.records.length-1],n=this.cloneRange(t.stack,e);this.records[this.records.length-1].range=n}}const k=[{parsedom:"p"},{parsedom:"div"},{parsedom:"table"},{parsedom:"ul"},{parsedom:"ol"},{parsedom:"h1"},{parsedom:"h2"},{parsedom:"h3"},{parsedom:"h4"},{parsedom:"h5"},{parsedom:"h6"},{parsedom:"blockquote"},{parsedom:"pre"},{parsedom:"address",parse:!0},{parsedom:"article",parse:!0},{parsedom:"aside",parse:!0},{parsedom:"nav",parse:!0},{parsedom:"section",parse:!0}],S=[{parsedom:"br"},{parsedom:"col"},{parsedom:"img"},{parsedom:"hr"},{parsedom:"video"},{parsedom:"audio"}],T=[{parsedom:"li",block:!0},{parsedom:"tfoot"},{parsedom:"tbody"},{parsedom:"thead"},{parsedom:"tr"},{parsedom:"th"},{parsedom:"td"},{parsedom:"colgroup"}],_=[{parsedom:"span"},{parsedom:"a"},{parsedom:"label"},{parsedom:"code"},{parsedom:"b",parse:{"font-weight":"bold"}},{parsedom:"strong",parse:{"font-weight":"bold"}},{parsedom:"sup",parse:{"vertical-align":"super"}},{parsedom:"sub",parse:{"vertical-align":"sub"}},{parsedom:"i",parse:{"font-style":"italic"}},{parsedom:"u",parse:{"text-decoration-line":"underline"}},{parsedom:"del",parse:{"text-decoration-line":"line-through"}},{parsedom:"abbr",parse:!0},{parsedom:"acronym",parse:!0},{parsedom:"bdo",parse:!0},{parsedom:"font",parse:{"font-family":e=>e.getAttribute("face")||""}}],C=function(e){if(e.hasChildren()){e.children.filter((e=>!e.isEmpty()&&e.isBlock())).forEach((t=>{t.type="inline"==e.type?"inline":"inblock","inblock"==t.type&&(t.behavior="block")}))}},N=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),n=t.filter((e=>e.isInblock()));n.length&&n.length!=t.length&&n.forEach((e=>{e.type="inline"}))}},B=function(e){if(e.isInline()&&e.hasChildren()){e.children.filter((e=>!e.isEmpty()&&e.isInblock())).forEach((e=>{e.type="inline"}))}},M=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),n=t.filter((e=>e.isBreak()));e.isInline()&&n.length?n.forEach((e=>{e.toEmpty()})):t.length>1&&n.length==t.length?(this.range&&e.isContains(this.range.anchor.element)&&this.range.anchor.moveToStart(n[0]),this.range&&e.isContains(this.range.focus.element)&&this.range.focus.moveToStart(n[0]),e.children=[n[0]]):t.length>1&&n.length&&n.forEach((e=>{e.toEmpty()}))}},z=function(e){const t=(e,t)=>{if(e.isEmpty()||t.isEmpty()){if(t.isEmpty()){this.range&&t.isContains(this.range.anchor.element)&&(e.isEmpty()?(this.range.anchor.element=e,this.range.anchor.offset=0):this.range.anchor.moveToEnd(e)),this.range&&t.isContains(this.range.focus.element)&&(e.isEmpty()?(this.range.focus.element=e,this.range.focus.offset=0):this.range.focus.moveToEnd(e));const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}else if(e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&(t.isEmpty()?(this.range.anchor.element=t,this.range.anchor.offset=0):this.range.anchor.moveToStart(t)),this.range&&e.isContains(this.range.focus.element)&&(t.isEmpty()?(this.range.focus.element=t,this.range.focus.offset=0):this.range.focus.moveToStart(t));const n=e.parent.children.findIndex((t=>e.isEqual(t)));e.parent.children.splice(n,1)}}else if(e.isText()){this.range&&t.isEqual(this.range.anchor.element)&&(this.range.anchor.element=e,this.range.anchor.offset=e.textContent.length+this.range.anchor.offset),this.range&&t.isEqual(this.range.focus.element)&&(this.range.focus.element=e,this.range.focus.offset=e.textContent.length+this.range.focus.offset),e.textContent+=t.textContent;const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}else if(e.isInline()){e.children.push(...t.children),e.children.forEach((t=>{t.parent=e})),n(e);const r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,1)}},n=e=>{if(e.hasChildren()&&e.children.length>1){let a=0;for(;e.hasChildren()&&a<=e.children.length-2;)n=e.children[a],r=e.children[a+1],n.locked||r.locked||!(n.isEmpty()||r.isEmpty()||(n.isText()&&r.isText()?n.isEqualStyles(r)&&n.isEqualMarks(r):n.isInline()&&r.isInline()&&n.parsedom==r.parsedom&&n.isEqualMarks(r)&&n.isEqualStyles(r)))?a++:(t(e.children[a],e.children[a+1]),A.apply(this,[e]))}var n,r};n(e)},A=function(e){const t=(e,t)=>{t.isText()?(e.type="text",e.parsedom=null,t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,c.clone(t.marks)):e.marks=c.clone(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,c.clone(t.styles)):e.styles=c.clone(t.styles)),e.textContent=t.textContent,e.children=null,this.range&&t.isContains(this.range.anchor.element)&&(this.range.anchor.element=e),this.range&&t.isContains(this.range.focus.element)&&(this.range.focus.element=e)):(t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,c.clone(t.marks)):e.marks=c.clone(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,c.clone(t.styles)):e.styles=c.clone(t.styles)),t.hasChildren()&&(e.children=[...t.children],e.children.forEach((t=>{t.parent=e}))),n(e))},n=e=>{var n,r;e.hasChildren()&&1==e.children.length&&e.children[0]&&(n=e,r=e.children[0],!n.locked&&!r.locked&&(r.isText()&&n.isInline()?n.parsedom==y.TEXT_NODE:(n.isInline()&&r.isInline()||n.isInblock()&&r.isInblock())&&n.parsedom==r.parsedom))&&(t(e,e.children[0]),e.parent&&z.apply(this,[e.parent]))};n(e)},O=function(e){if(e.isText()&&!e.isEmpty()&&e.textContent.split("").some((e=>f(e)))){let t=e.textContent,n=0;for(;n<t.length;){const r=t.charAt(n);f(r)&&n>0&&f(t.charAt(n-1))?(this.range&&this.range.anchor.element.isEqual(e)&&this.range.anchor.offset>=n+1&&(this.range.anchor.offset-=1),this.range&&this.range.focus.element.isEqual(e)&&this.range.focus.offset>=n+1&&(this.range.focus.offset-=1),t=o.delete(t,n,1)):n++}e.textContent=t}},I=function(e,t){let n="",r="";return t.forEach((e=>{const t=e.element.clone();e.offset&&(t.textContent=t.textContent.substring(e.offset[0],e.offset[1])),t.__render(),n+=t.elm.outerHTML,r+=t.elm.innerText})),e.setData("text/plain",r),e.setData("text/html",n),{html:n,text:r}},R=async function(e,t,n){if(e)if(this.allowPasteHtml){const t=this.parseHtml(e).filter((e=>!e.isEmpty()));if("function"==typeof this.customHtmlPaste)await this.customHtmlPaste.apply(this,[t,e]);else{this.insertElement(t[0]);for(let e=t.length-1;e>=1;e--)this.addElementAfter(t[e],t[0]);this.range.anchor.moveToEnd(t[t.length-1]),this.range.focus.moveToEnd(t[t.length-1]),this.emit("pasteHtml",t,e)}}else t&&("function"==typeof this.customTextPaste?await this.customTextPaste.apply(this,[t]):(this.insertText(t),this.emit("pasteText",t)));else if(t)"function"==typeof this.customTextPaste?await this.customTextPaste.apply(this,[t]):(this.insertText(t),this.emit("pasteText",t));else{let e=n.length;for(let t=0;t<e;t++)if(n[t].type.startsWith("image/"))if("function"==typeof this.customImagePaste)await this.customImagePaste.apply(this,[n[t]]);else{const e=await h.dataFileToBase64(n[t]),r=new y("closed","img",{src:e},null,null);this.insertElement(r),this.emit("pasteImage",e)}else if(n[t].type.startsWith("video/"))if("function"==typeof this.customVideoPaste)await this.customVideoPaste.apply(this,[n[t]]);else{const e=await h.dataFileToBase64(n[t]),r=new y("closed","video",{src:e},null,null);this.insertElement(r),this.emit("pasteVideo",e)}else"function"==typeof this.customFilePaste&&await this.customFilePaste.apply(this,[n[t]])}},L=function(){for(var e;this.__illegalDoms.length>0;){const t=this.__illegalDoms[0];null==(e=t.parentNode)||e.removeChild(t),this.__illegalDoms.splice(0,1)}},D=function(){window.MutationObserver||console.warn("The current browser does not support MutationObserver"),$.apply(this),this.__domObserver=new MutationObserver((e=>{let t=e.length;for(let n=0;n<t;n++)if("childList"==e[n].type){const t=e[n].addedNodes.length;for(let r=0;r<t;r++){const t=e[n].addedNodes[r];if(3==t.nodeType){const e=t.parentNode,n=e?s.get(e,"data-alex-editor-key"):null,r=n?this.getElementByKey(n):null;r&&!r.isText()&&this.__illegalDoms.push(t)}else i.isElement(t)&&!s.get(t,"data-alex-editor-key")&&this.__illegalDoms.push(t)}}})),this.__domObserver.observe(this.$el,{attributes:!1,childList:!0,subtree:!0})},$=function(){this.__domObserver&&(this.__domObserver.disconnect(),this.__domObserver=null)},j=function(){if(0==y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))).length){const e=new y("block",y.BLOCK_NODE,null,null,null),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.stack=[e]}},P=function(e){const t=this.getPreviousElementOfPoint(e),n=this.getNextElementOfPoint(e),r=e.element.getBlock(),a=e.element.getInblock();t&&a&&a.isContains(t)?e.moveToEnd(t):n&&a&&a.isContains(n)?e.moveToStart(n):t&&r.isContains(t)?e.moveToEnd(t):n&&r.isContains(n)?e.moveToStart(n):t?e.moveToEnd(t):n&&e.moveToStart(n)},q=function(e){e.isInblock()&&"default"==e.behavior&&e.hasChildren()&&e.children.forEach((e=>{if(e.isInblock()&&"default"==e.behavior)q.apply(this,[e]);else if(e.toEmpty(),e.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.parent)}}))},F=function(){const e=async e=>{const t=i.getScrollHeight(e),n=i.getScrollWidth(e);if(e.clientHeight<t||e.clientWidth<n){const r=window.getSelection();if(0==r.rangeCount)return;const a=r.getRangeAt(0),o=a.getClientRects();let l=a;0==o.length&&(l=this.range.focus.element.elm);const s=l.getBoundingClientRect(),c=e.getBoundingClientRect();if(e.clientHeight<t)if(s.top<c.top){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.top-n.top})}else if(s.bottom>c.bottom){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.bottom-n.bottom})}if(e.clientWidth<n)if(s.left<c.left){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.left-n.left+20})}else if(s.right>c.right){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),n=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.right-n.right+20})}}};if(this.range&&this.range.focus.element.elm){let t=this.range.focus.element.elm;for(;i.isElement(t)&&t!=document.documentElement;)e(t),t=t.parentNode}},H=function(){if(0==y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))).length){const e=new y("block",y.BLOCK_NODE,null,null,null),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.stack=[e],this.range&&(this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t))}},V=function(e,t,n){const r=n.findIndex((t=>t.isEqual(e)));if(!(r<0))if(e.isEmpty())this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]),n.splice(r,1);else if(t.apply(this,[e]),e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]);const t=n.findIndex((t=>t.isEqual(e)));n.splice(t,1)}else if(e.isBlock()||n!==this.stack||e.convertToBlock(),e.hasChildren()&&e.children.forEach((n=>{V.apply(this,[n,t,e.children])})),e.isEmpty()){this.range&&e.isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&e.isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]);const t=n.findIndex((t=>t.isEqual(e)));n.splice(t,1)}},{Mac:U}=p.os(),W=function(){if(this.__isInputChinese)return;if(this.__innerSelectionChange)return;const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0);if(g(this.$el,t.startContainer)&&g(this.$el,t.endContainer)){let e=null,n=null,r=null,a=null;if(3==t.startContainer.nodeType)e=t.startContainer.parentNode,r=t.startOffset;else if(1==t.startContainer.nodeType){const n=Array.from(t.startContainer.childNodes);n.length?(e=n[t.startOffset]?n[t.startOffset]:n[t.startOffset-1],r=n[t.startOffset]?0:1,3==e.nodeType&&(r=0==r?0:e.textContent.length,e=e.parentNode)):(e=t.startContainer,r=0)}if(3==t.endContainer.nodeType)n=t.endContainer.parentNode,a=t.endOffset;else if(1==t.endContainer.nodeType){const e=Array.from(t.endContainer.childNodes);e.length?(n=e[t.endOffset]?e[t.endOffset]:e[t.endOffset-1],a=e[t.endOffset]?0:1,3==n.nodeType&&(a=0==a?0:n.textContent.length,n=n.parentNode)):(n=t.endContainer,a=1)}const o=s.get(e,"data-alex-editor-key"),i=s.get(n,"data-alex-editor-key"),l=this.getElementByKey(o),c=this.getElementByKey(i),d=new x(l,r),u=new x(c,a);this.range?(this.range.anchor=d,this.range.focus=u):this.range=new w(d,u),this.history.updateRange(this.range),this.emit("rangeUpdate",this.range)}}},K=function(e){const t=e;"deleteByCut"!=t.inputType&&"insertFromPaste"!=t.inputType&&"deleteByDrag"!=t.inputType&&"insertFromDrop"!=t.inputType&&(t.preventDefault(),this.disabled||("insertText"==t.inputType&&t.data?(this.insertText(t.data),this.domRender(),this.rangeRender()):"insertParagraph"==t.inputType||"insertLineBreak"==t.inputType?(this.insertParagraph(),this.domRender(),this.rangeRender()):"deleteContentBackward"==t.inputType&&(this.delete(),this.domRender(),this.rangeRender())))},G=function(e){const t=e;t.preventDefault(),this.disabled||("compositionstart"==t.type?(this.__chineseInputTimer&&(clearTimeout(this.__chineseInputTimer),this.__chineseInputTimer=null),this.__isInputChinese=!0):"compositionend"==t.type&&(t.data&&(this.insertText(t.data),this.domRender(),this.rangeRender()),this.__chineseInputTimer=setTimeout((()=>{this.__isInputChinese=!1}),0)))},Z=function(e){if(this.__isInputChinese)return;const t=e;"keydown"==t.type?(!function(e){return U?"z"==e.key.toLocaleLowerCase()&&e.metaKey&&!e.shiftKey&&!e.altKey&&!e.ctrlKey:"z"==e.key.toLocaleLowerCase()&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}(t)?function(e){return U?"z"==e.key.toLocaleLowerCase()&&e.metaKey&&e.shiftKey&&!e.altKey&&!e.ctrlKey:"y"==e.key.toLocaleLowerCase()&&e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}(t)&&(t.preventDefault(),this.redo()):(t.preventDefault(),this.undo()),this.emit("keydown",this.value,t)):"keyup"==t.type&&this.emit("keyup",this.value,t)},X=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCopy)return;const n=this.getElementsByRange().list;if(t.clipboardData&&n.length){const{text:e,html:r}=I.apply(this,[t.clipboardData,n]);this.emit("copy",e,r)}},Y=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCut)return;const n=this.getElementsByRange().list;if(t.clipboardData&&n.length){const{text:e,html:r}=I.apply(this,[t.clipboardData,n]);this.disabled||(this.delete(),this.domRender(),this.rangeRender()),this.emit("cut",e,r)}},Q=async function(e){const t=e;if(t.preventDefault(),!this.disabled&&this.range&&this.allowPaste&&t.clipboardData){const e=t.clipboardData.getData("text/html"),n=t.clipboardData.getData("text/plain"),r=t.clipboardData.files;await R.apply(this,[e,n,r]),this.domRender(),this.rangeRender()}},J=async function(e){if(e.preventDefault(),"drop"==e.type){if(this.disabled)return;if(!this.range)return;if(!this.allowPaste)return;const t=e;if(t.dataTransfer){const e=t.dataTransfer.getData("text/html"),n=t.dataTransfer.getData("text/plain"),r=t.dataTransfer.files;await R.apply(this,[e,n,r]),this.domRender(),this.rangeRender()}}},ee=function(e){this.disabled||this.emit("focus",this.value,e)},te=function(e){this.disabled||this.emit("blur",this.value,e)},ne=(e,t,n)=>{let r=[];if(e.length&&t.length){let a=0,o=0,i=e.length-1,l=t.length-1;for(;a<=i&&o<=l;){if(t[o])if(t[l])if(e[a].key==t[o].key)r.push(...re(e[a],t[o],n)),a++,o++;else if(e[i].key==t[l].key)r.push(...re(e[i],t[l],n)),i--,l--;else if(e[a].key==t[l].key)r.push({type:"move",newElement:e[a],oldElement:t[l]},...re(e[a],t[l],n)),a++,l--;else if(e[i].key==t[o].key)r.push({type:"move",newElement:e[i],oldElement:t[o]},...re(e[i],t[o],n)),i--,o++;else{let o=t.findIndex((t=>t&&t.key===e[a].key));o>=0?(r.push({type:"move",newElement:e[a],oldElement:t[o]},...re(e[a],t[o],n)),t[o]=void 0):r.push({type:"insert",newElement:e[a]}),a++}else l--;else o++;if(o>l)for(;a<=i;a++)r.push({type:"insert",newElement:e[a]});else if(a>i)for(;o<=l;o++)t[o]&&r.push({type:"remove",oldElement:t[o]})}}else e.length?r=e.map((e=>({type:"insert",newElement:e}))):t.length&&(r=t.map((e=>({type:"remove",oldElement:e}))));return r},re=(e,t,n)=>{const r=[];return n||!e.isEmpty()&&!t.isEmpty()?n||e.type==t.type&&e.locked==t.locked?n&&e.namespace!=t.namespace?r.push({type:"replace",oldElement:t,newElement:e}):e.isText()||e.parsedom==t.parsedom?!n&&e.isInblock()&&e.behavior!=t.behavior||e.hasChildren()&&!t.hasChildren()||t.hasChildren()&&!e.hasChildren()?r.push({type:"replace",oldElement:t,newElement:e}):(e.isText()&&e.textContent!=t.textContent&&r.push({type:"update",oldElement:t,newElement:e,update:"textContent"}),e.isEqualStyles(t)||r.push({type:"update",oldElement:t,newElement:e,update:"styles"}),e.isEqualMarks(t)||r.push({type:"update",oldElement:t,newElement:e,update:"marks"}),e.hasChildren()&&t.hasChildren()&&r.push(...ne(e.children,t.children,n))):r.push({type:"replace",oldElement:t,newElement:e}):r.push({type:"replace",oldElement:t,newElement:e}):r.push({type:"empty",oldElement:t,newElement:e}),r};class ae{constructor(e,t){r(this,"$el"),r(this,"disabled"),r(this,"value"),r(this,"renderRules"),r(this,"allowCopy"),r(this,"allowPaste"),r(this,"allowCut"),r(this,"allowPasteHtml"),r(this,"customTextPaste"),r(this,"customHtmlPaste"),r(this,"customImagePaste"),r(this,"customVideoPaste"),r(this,"customFilePaste"),r(this,"customMerge"),r(this,"customParseNode"),r(this,"extraKeepTags"),r(this,"history",new E),r(this,"stack"),r(this,"range",null),r(this,"__guid",function(){let e=s.get(window,"data-alex-editor-guid")||0;return e++,s.set(window,"data-alex-editor-guid",e),e}()),r(this,"__events",{}),r(this,"__oldStack",[]),r(this,"__isInputChinese",!1),r(this,"__innerSelectionChange",!1),r(this,"__chineseInputTimer",null),r(this,"__domObserver",null),r(this,"__illegalDoms",[]),this.$el=function(e){if("string"==typeof e&&e&&(e=document.body.querySelector(e)),!i.isElement(e))throw new Error("You must specify a dom container to initialize the editor");if(s.get(e,"data-alex-editor-init"))throw new Error("The element node has been initialized to the editor");return s.set(e,"data-alex-editor-init",!0),e}(e);const n=function(e){const t={value:"",disabled:!1,allowCopy:!0,allowPaste:!0,allowCut:!0,allowPasteHtml:!1,extraKeepTags:[],renderRules:[],customTextPaste:null,customHtmlPaste:null,customImagePaste:null,customVideoPaste:null,customFilePaste:null,customMerge:null,customParseNode:null};return c.isObject(e)&&("string"==typeof e.value&&e.value&&(t.value=e.value),"boolean"==typeof e.disabled&&(t.disabled=e.disabled),"boolean"==typeof e.allowCopy&&(t.allowCopy=e.allowCopy),"boolean"==typeof e.allowPaste&&(t.allowPaste=e.allowPaste),"boolean"==typeof e.allowCut&&(t.allowCut=e.allowCut),"boolean"==typeof e.allowPasteHtml&&(t.allowPasteHtml=e.allowPasteHtml),Array.isArray(e.extraKeepTags)&&(t.extraKeepTags=e.extraKeepTags),Array.isArray(e.renderRules)&&(t.renderRules=e.renderRules),"function"==typeof e.customTextPaste&&(t.customTextPaste=e.customTextPaste),"function"==typeof e.customHtmlPaste&&(t.customHtmlPaste=e.customHtmlPaste),"function"==typeof e.customImagePaste&&(t.customImagePaste=e.customImagePaste),"function"==typeof e.customVideoPaste&&(t.customVideoPaste=e.customVideoPaste),"function"==typeof e.customFilePaste&&(t.customFilePaste=e.customFilePaste),"function"==typeof e.customMerge&&(t.customMerge=e.customMerge),"function"==typeof e.customParseNode&&(t.customParseNode=e.customParseNode)),t}(t);this.disabled=n.disabled,this.value=n.value,this.renderRules=n.renderRules,this.allowCopy=n.allowCopy,this.allowPaste=n.allowPaste,this.allowCut=n.allowCut,this.allowPasteHtml=n.allowPasteHtml,this.customTextPaste=n.customTextPaste,this.customHtmlPaste=n.customHtmlPaste,this.customImagePaste=n.customImagePaste,this.customVideoPaste=n.customVideoPaste,this.customFilePaste=n.customFilePaste,this.customMerge=n.customMerge,this.customParseNode=n.customParseNode,this.extraKeepTags=n.extraKeepTags,this.stack=this.parseHtml(this.value),j.apply(this),this.disabled?this.setDisabled():this.setEnabled(),D.apply(this),m.on(document,`selectionchange.alex_editor_${this.__guid}`,W.bind(this)),m.on(this.$el,"beforeinput.alex_editor",K.bind(this)),m.on(this.$el,"compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor",G.bind(this)),m.on(this.$el,"keydown.alex_editor keyup.alex_editor",Z.bind(this)),m.on(this.$el,"cut.alex_editor",Y.bind(this)),m.on(this.$el,"paste.alex_editor",Q.bind(this)),m.on(this.$el,"copy.alex_editor",X.bind(this)),m.on(this.$el,"dragstart.alex_editor drop.alex_editor",J.bind(this)),m.on(this.$el,"focus.alex_editor",ee.bind(this)),m.on(this.$el,"blur.alex_editor",te.bind(this))}initRange(){const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)))[0],t=new x(e,0),n=new x(e,0);this.range=new w(t,n)}delete(){if(this.range){if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.range.anchor.element.getBlock(),n=this.range.anchor.element.getInblock();if(n)if(0==this.range.anchor.offset)if(e){if(n.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();if("block"==n.behavior){const t=e.getBlock(),r=e.getInblock();r?this.merge(n,r):this.merge(n,t)}}else this.emit("deleteInStart",n);else{if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}else this.range.anchor.offset=0,this.range.focus.offset=0;return void this.delete()}if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const t=f(e[this.range.anchor.offset]);if(this.range.anchor.element.textContent=e.substring(0,this.range.anchor.offset)+e.substring(this.range.focus.offset),this.range.focus.offset=this.range.anchor.offset,t)return void this.delete();if(n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const t=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),n.isEmpty()&&(!t||!e)){const e=new y("closed","br",null,null,null);if(this.addElementTo(e,n),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e),t)return void this.delete()}}}else if(0==this.range.anchor.offset)if(e){if(t.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();{const n=e.getInblock(),r=e.getBlock();n?this.merge(t,n):this.merge(t,r)}}else this.emit("deleteInStart",t);else{if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}else this.range.anchor.offset=0,this.range.focus.offset=0;return void this.delete()}if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const n=f(e[this.range.anchor.offset]);if(this.range.anchor.element.textContent=e.substring(0,this.range.anchor.offset)+e.substring(this.range.focus.offset),this.range.focus.offset=this.range.anchor.offset,n)return void this.delete();if(t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const n=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),t.isEmpty()&&(!n||!e)){const e=new y("closed","br",null,null,null);if(this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e),n)return void this.delete()}}}}else{const e=this.getElementsByRange().list.filter((e=>!y.VOID_NODES.includes(e.element.parsedom))),t=this.range.anchor.element.getInblock(),n=this.range.focus.element.getInblock(),r=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock();t&&n&&t.isEqual(n)?e.forEach((e=>{if(e.offset?e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]):e.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t)}})):t&&n?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)q.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),"block"==n.behavior&&this.merge(n,t)):t?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)q.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),this.merge(a,t)):n?(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)q.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),"block"==n.behavior&&this.merge(n,r)):r.isEqual(a)?e.forEach((e=>{if(e.offset?e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]):e.element.toEmpty(),r.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,r)}})):(e.forEach((e=>{if(e.offset)e.element.textContent=e.element.textContent.substring(0,e.offset[0])+e.element.textContent.substring(e.offset[1]);else if(e.element.isInblock()&&"default"==e.element.behavior)q.apply(this,[e.element]);else if(e.element.toEmpty(),e.element.parent&&(e.element.parent.isInblock()||e.element.parent.isBlock())&&e.element.parent.isEmpty()){const t=new y("closed","br",null,null,null);this.addElementTo(t,e.element.parent)}})),this.merge(a,r))}this.range.anchor.element.isEmpty()&&P.apply(this,[this.range.anchor]),this.range.focus.element=this.range.anchor.element,this.range.focus.offset=this.range.anchor.offset,H.apply(this),this.emit("deleteComplete")}}insertText(e){if(this.range){if(!e||"string"!=typeof e)throw new Error("The argument must be a string");if(this.range.anchor.isEqual(this.range.focus))if(this.range.anchor.element.isPreStyle()||(e=e.replace(/\s/g,(()=>{const e=document.createElement("span");return e.innerHTML="&nbsp;",e.innerText}))),this.range.anchor.element.isText()){let t=this.range.anchor.element.textContent;this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset)+e.replace(/\r\n/g,"\n")+t.substring(this.range.anchor.offset),this.range.anchor.offset=this.range.anchor.offset+e.length,this.range.focus.offset=this.range.anchor.offset}else{const t=new y("text",null,null,null,e);0==this.range.anchor.offset?this.addElementBefore(t,this.range.anchor.element):this.addElementAfter(t,this.range.anchor.element),this.range.anchor.moveToEnd(t),this.range.focus.moveToEnd(t)}else this.delete(),this.insertText(e)}}insertParagraph(){if(this.range)if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.getNextElementOfPoint(this.range.anchor),n=this.range.anchor.element.getBlock(),r=this.range.anchor.element.getInblock(),a=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(r){if(this.range.anchor.element.isPreStyle()){this.insertText("\n");const e=y.getSpaceElement();this.insertElement(e),this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),this.emit("insertParagraph",r,r)}else if("block"==r.behavior)if(0!=this.range.anchor.offset||e&&r.isContains(e))if(this.range.anchor.offset!=a||t&&r.isContains(t)){const e=r.clone();this.addElementAfter(e,r);const t=y.flatElements(r.children).findIndex((e=>this.range.anchor.element.isEqual(e)));this.range.focus.moveToEnd(r),this.delete();const n=y.flatElements(e.children);this.range.focus.element=n[t],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(e),this.delete(),this.emit("insertParagraph",e,r)}else{const e=r.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementAfter(e,r),this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t),this.emit("insertParagraph",e,r)}else{const e=r.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementBefore(e,r),this.emit("insertParagraph",r,e)}}else if(this.range.anchor.element.isPreStyle()){this.insertText("\n");const e=y.getSpaceElement();this.insertElement(e),this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),this.emit("insertParagraph",n,n)}else if(0!=this.range.anchor.offset||e&&n.isContains(e))if(this.range.anchor.offset!=a||t&&n.isContains(t)){const e=n.clone();this.addElementAfter(e,n);const t=y.flatElements(n.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=this.range.anchor.offset;this.range.focus.moveToEnd(n),this.delete();const a=y.flatElements(e.children);this.range.focus.element=a[t],this.range.focus.offset=r,this.range.anchor.moveToStart(e),this.delete(),this.emit("insertParagraph",e,n)}else{const e=n.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementAfter(e,n),this.range.anchor.moveToStart(t),this.range.focus.moveToStart(t),this.emit("insertParagraph",e,n)}else{const e=n.clone(!1),t=new y("closed","br",null,null,null);this.addElementTo(t,e),this.addElementBefore(e,n),this.emit("insertParagraph",n,e)}}else this.delete(),this.insertParagraph()}insertElement(e,t=!0){if(this.range){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(!e.isEmpty())if(this.range.anchor.isEqual(this.range.focus)){const n=this.getPreviousElementOfPoint(this.range.anchor),r=this.getNextElementOfPoint(this.range.anchor),a=this.range.anchor.element.getBlock(),o=this.range.anchor.element.getInblock(),i=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(e.isInblock()&&"block"==e.behavior&&o&&"block"==o.behavior)if(o.isOnlyHasBreak()&&t)this.addElementBefore(e,o),o.toEmpty();else if(0!=this.range.anchor.offset||n&&o.isContains(n))if(this.range.anchor.offset!=i||r&&o.isContains(r)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const n=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementBefore(e,t)}else this.addElementAfter(e,o);else this.addElementBefore(e,o);else if(e.isInblock()&&o)if(o.isOnlyHasBreak())this.addElementTo(e,o,0);else if(0!=this.range.anchor.offset||n&&o.isContains(n))if(this.range.anchor.offset!=i||r&&o.isContains(r)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const n=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementTo(e,t),this.merge(t,o)}else this.addElementTo(e,o,o.children.length);else this.addElementTo(e,o,0);else if(e.isInblock())if(a.isOnlyHasBreak())this.addElementTo(e,a,0);else if(0!=this.range.anchor.offset||n&&a.isContains(n))if(this.range.anchor.offset!=i||r&&a.isContains(r)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const n=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementTo(e,t),this.merge(t,a)}else this.addElementTo(e,a,a.children.length);else this.addElementTo(e,a,0);else if(e.isBlock())if(a.isOnlyHasBreak()&&t)this.addElementBefore(e,a),a.toEmpty();else if(0!=this.range.anchor.offset||n&&a.isContains(n))if(this.range.anchor.offset!=i||r&&a.isContains(r)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const n=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),r=y.flatElements(t.children);this.range.focus.element=r[n],this.range.focus.offset=this.range.anchor.offset,this.range.anchor.moveToStart(t),this.delete(),this.addElementBefore(e,t)}else this.addElementAfter(e,a);else this.addElementBefore(e,a);else if(this.range.anchor.element.isText()){let t=this.range.anchor.element.textContent,n=this.range.anchor.element.clone();this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset),n.textContent=t.substring(this.range.anchor.offset),this.addElementAfter(n,this.range.anchor.element),this.addElementBefore(e,n)}else 0==this.range.anchor.offset?this.addElementBefore(e,this.range.anchor.element):this.addElementAfter(e,this.range.anchor.element);this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e)}else this.delete(),this.insertElement(e,t)}}domRender(e=!1){this.emit("beforeRender");const t=!this.__oldStack.length,n=[C,N,B,M,A,z,O,...this.renderRules.filter((e=>"function"==typeof e))];if(t||e){this.stack.forEach((e=>{n.forEach((t=>{V.apply(this,[e,t,this.stack])}))})),H.apply(this);const e=document.createDocumentFragment();this.stack.forEach((t=>{t.__render(),e.appendChild(t.elm)})),this.$el.innerHTML="",this.$el.appendChild(e)}else L.apply(this),ne(this.stack,this.__oldStack,!1).forEach((e=>{let t=null;if(e.newElement)t=e.newElement.parent?e.newElement.parent:e.newElement;else if(e.oldElement&&e.oldElement.parent){const n=b(e.oldElement.parent.key,this.stack);t=n||null}t&&n.forEach((e=>{V.apply(this,[t,e,t.parent?t.parent.children:this.stack])}))})),H.apply(this),ne(this.stack,this.__oldStack,!0).forEach((e=>{if("insert"==e.type){e.newElement.__render();const t=this.getPreviousElement(e.newElement),n=e.newElement.parent?e.newElement.parent.elm:this.$el;t?t.elm.nextElementSibling?n.insertBefore(e.newElement.elm,t.elm.nextElementSibling):n.appendChild(e.newElement.elm):n.firstElementChild?n.insertBefore(e.newElement.elm,n.firstElementChild):n.appendChild(e.newElement.elm)}else if("remove"==e.type)e.oldElement.elm.remove();else if("update"==e.type){if("textContent"==e.update)e.newElement.elm.textContent=e.newElement.textContent;else if("styles"==e.update){const{setStyles:t,removeStyles:n}=((e,t)=>{const n={},r={};return e.hasStyles()&&Object.keys(e.styles).forEach((r=>{t.hasStyles()&&t.styles.hasOwnProperty(r)&&t.styles[r]===e.styles[r]||(n[r]=e.styles[r])})),t.hasStyles()&&Object.keys(t.styles).forEach((n=>{e.hasStyles()&&e.styles.hasOwnProperty(n)||(r[n]=t.styles[n])})),{setStyles:n,removeStyles:r}})(e.newElement,e.oldElement);for(let r in n)e.newElement.elm.style.removeProperty(r);for(let r in t)e.newElement.elm.style.setProperty(r,t[r])}else if("marks"==e.update){const{setMarks:t,removeMarks:n}=((e,t)=>{const n={},r={};return e.hasMarks()&&Object.keys(e.marks).forEach((r=>{t.hasMarks()&&t.marks.hasOwnProperty(r)&&t.marks[r]===e.marks[r]||(n[r]=e.marks[r])})),t.hasMarks()&&Object.keys(t.marks).forEach((n=>{e.hasMarks()&&e.marks.hasOwnProperty(n)||(r[n]=t.marks[n])})),{setMarks:n,removeMarks:r}})(e.newElement,e.oldElement);for(let r in n)e.newElement.elm.removeAttribute(r);for(let r in t)/(^on)|(^style$)|(^face$)/g.test(r)||e.newElement.elm.setAttribute(r,t[r])}}else if("replace"==e.type){e.newElement.__render();(e.oldElement.parent?e.oldElement.parent.elm:this.$el).insertBefore(e.newElement.elm,e.oldElement.elm),e.oldElement.elm.remove()}else if("move"==e.type){const t=this.getPreviousElement(e.newElement),n=e.newElement.parent?e.newElement.parent.elm:this.$el;t?t.elm.nextElementSibling?n.insertBefore(e.newElement.elm,t.elm.nextElementSibling):n.appendChild(e.newElement.elm):n.firstElementChild?n.insertBefore(e.newElement.elm,n.firstElementChild):n.appendChild(e.newElement.elm)}}));const r=this.value;this.value=this.$el.innerHTML,this.__oldStack=this.stack.map((e=>e.__fullClone())),(t||r!=this.value)&&(t||this.emit("change",this.value,r),e||this.history.setState(this.stack,this.range)),this.emit("afterRender")}rangeRender(){return new Promise((e=>{const t=window.getSelection();if(!t)return e();if(this.range){const e=e=>{let t=null,n=null;if(e.element.isText())t=e.element.elm.childNodes[0],n=e.offset;else{t=e.element.parent.elm;const r=e.element.parent.children.findIndex((t=>e.element.isEqual(t)));n=e.offset+r}return{node:t,offset:n}};this.__innerSelectionChange=!0;const n=e(this.range.anchor),r=e(this.range.focus),a=document.createRange();a.setStart(n.node,n.offset),a.setEnd(r.node,r.offset),t.removeAllRanges(),t.addRange(a)}else t.removeAllRanges();setTimeout((()=>{F.apply(this),this.__innerSelectionChange=!1,this.history.updateRange(this.range),this.emit("rangeUpdate",this.range),e()}),0)}))}parseHtml(e){e||(e="<p><br/></p>");const t=document.createElement("template");t.innerHTML=e;let n=[];return t.content.childNodes.forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);n.push(t)}})),n}parseNode(e){if(!(e instanceof Node))throw new Error("The argument must be an node");if(1!=e.nodeType&&3!=e.nodeType)throw new Error("The argument must be an element node or text node");if(3==e.nodeType)return new y("text",null,null,null,e.textContent);const t=function(e){let t={};const n=e.attributes.length;for(let r=0;r<n;r++){const n=e.attributes[r];/(^on)|(^style$)|(^face$)/g.test(n.nodeName)||(t[n.nodeName]=n.nodeValue)}return t}(e),n=function(e){let t={};const n=e.getAttribute("style");if(n){let e=0,r=0,a=[];for(;e<n.length;)";"==n[e]&&"base64,"!=n.substring(e+1,e+8)&&(a.push(n.substring(r,e)),r=e+1),e==n.length-1&&r<e&&a.push(n.substring(r,e)),e++;a.forEach((e=>{const n=e.indexOf(":"),r=e.substring(0,n).trim(),a=e.substring(n+1).trim();t[r]=a}))}return t}(e),r=e.nodeName.toLocaleLowerCase(),a=e.namespaceURI;if(y.EMPTY_NODES.includes(r))return new y("text",null,null,null,null);if(r==y.TEXT_NODE&&e.childNodes.length&&Array.from(e.childNodes).every((e=>3==e.nodeType)))return new y("text",null,t,n,e.textContent);const o=k.find((e=>e.parsedom==r)),i=T.find((e=>e.parsedom==r)),l=_.find((e=>e.parsedom==r)),s=S.find((e=>e.parsedom==r));let d=null,u={type:"inline",parsedom:r,marks:t,styles:n,behavior:"default",namespace:a};if(o)u.type="block",o.parse&&(u.parsedom=y.BLOCK_NODE);else if(i)u.type="inblock",i.block&&(u.behavior="block");else if(l){if(u.type="inline",l.parse&&(u.parsedom=y.TEXT_NODE,c.isObject(l.parse))){const t=l.parse;for(let n in t)"function"==typeof t[n]?u.styles[n]=t[n].apply(this,[e]):u.styles[n]=t[n]}}else s?u.type="closed":this.extraKeepTags.includes(u.parsedom)||(u.type="inline",u.parsedom=y.TEXT_NODE,u.namespace=null);return d=new y(u.type,u.parsedom,u.marks,u.styles,null),d.behavior=u.behavior,d.namespace=u.namespace,s||Array.from(e.childNodes).forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);t.parent=d,d.hasChildren()?d.children.push(t):d.children=[t]}})),"function"==typeof this.customParseNode&&(d=this.customParseNode.apply(this,[d])),d}merge(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(!e.isBlock()&&!e.isInblock()||!t.isBlock()&&!t.isInblock())throw new Error('Elements that are not "block" or "inblock" cannot be merged');"function"==typeof this.customMerge?this.customMerge.apply(this,[e,t]):(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)}getElementByKey(e){if(!e)throw new Error("You need to specify a key to do the query");return b(e,this.stack)}getPreviousElement(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isBlock()){const t=this.stack.findIndex((t=>e.isEqual(t)));return t<=0?null:this.stack[t-1].isEmpty()?this.getPreviousElement(this.stack[t-1]):this.stack[t-1]}{const t=e.parent.children.findIndex((t=>e.isEqual(t)));return t<=0?null:e.parent.children[t-1].isEmpty()?this.getPreviousElement(e.parent.children[t-1]):e.parent.children[t-1]}}getNextElement(e){if(!y.isElement(e))throw new Error("The argument must be an AlexElement instance");if(e.isBlock()){const t=this.stack.findIndex((t=>e.isEqual(t)));return t>=this.stack.length-1?null:this.stack[t+1].isEmpty()?this.getNextElement(this.stack[t+1]):this.stack[t+1]}{const t=e.parent.children.findIndex((t=>e.isEqual(t)));return t>=e.parent.children.length-1?null:e.parent.children[t+1].isEmpty()?this.getNextElement(e.parent.children[t+1]):e.parent.children[t+1]}}getPreviousElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let n=null;for(let r=e.length-1;r>=0;r--){const a=e[r];if(!a.isEmpty()&&(a.isText()||!y.VOID_NODES.includes(a.parsedom))){if(a.isText()||a.isClosed()){n=a;break}if(n=t(a.children),n)break}}return n},n=e=>{const r=this.getPreviousElement(e);return r?r.isEmpty()||!r.isText()&&y.VOID_NODES.includes(r.parsedom)?n(r):r.isText()||r.isClosed()?r:t(r.children):e.parent?n(e.parent):null};return n(e.element)}getNextElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let n=null;const r=e.length;for(let a=0;a<r;a++){const r=e[a];if(!r.isEmpty()&&(r.isText()||!y.VOID_NODES.includes(r.parsedom))){if(r.isText()||r.isClosed()){n=r;break}if(n=t(r.children),n)break}}return n},n=e=>{const r=this.getNextElement(e);return r?r.isEmpty()||!r.isText()&&y.VOID_NODES.includes(r.parsedom)?n(r):r.isText()||r.isClosed()?r:t(r.children):e.parent?n(e.parent):null};return n(e.element)}getElementsByRange(){if(!this.range)return{list:[],flatList:[]};if(this.range.anchor.isEqual(this.range.focus))return{list:[],flatList:[]};if(this.range.anchor.element.isEqual(this.range.focus.element)){const e=0==this.range.anchor.offset,t=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),n={element:this.range.anchor.element,offset:(!e||!t)&&[this.range.anchor.offset,this.range.focus.offset]};return{list:[n],flatList:[n]}}const e=(()=>{let e=[];const t=0==this.range.anchor.offset,n=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),r=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock(),o=this.stack.findIndex((e=>r.isEqual(e))),i=this.stack.findIndex((e=>a.isEqual(e)));let l=y.flatElements(this.stack.slice(o,i+1));const s=function(e){let t=e.element;for(;t.parent&&e.element.isFirst(t.parent);)t=t.parent;return t}(this.range.anchor),c=l.findIndex((e=>e.isEqual(s||this.range.anchor.element))),d=l.findIndex((e=>e.isEqual(this.range.focus.element)));(c>0||d<l.length-1)&&(l=l.slice(c,d+1));const u=l.length;for(let m=0;m<u;m++)if(this.range.anchor.element.isEqual(l[m]))t?e.push({element:this.range.anchor.element,offset:!1}):this.range.anchor.element.isText()&&this.range.anchor.offset<this.range.anchor.element.textContent.length&&e.push({element:this.range.anchor.element,offset:[this.range.anchor.offset,this.range.anchor.element.textContent.length]});else if(l[m].isContains(this.range.anchor.element)){const r=this.range.anchor.element.isFirst(l[m]),a=l[m].isContains(this.range.focus.element),o=this.range.focus.element.isLast(l[m]);(t&&r&&a&&o&&n||t&&r&&!a)&&e.push({element:l[m],offset:!1})}else if(this.range.focus.element.isEqual(l[m]))n?e.push({element:this.range.focus.element,offset:!1}):this.range.focus.offset>0&&e.push({element:this.range.focus.element,offset:[0,this.range.focus.offset]});else if(l[m].isContains(this.range.focus.element)){this.range.focus.element.isLast(l[m])&&n&&e.push({element:l[m],offset:!1})}else e.push({element:l[m],offset:!1});return e})();return{list:(e=>{let t=[],n=[],r=[];const a=e.length;for(let o=0;o<a;o++)if(e[o].element.isBlock())t.push(e[o]),n.push(e[o].element);else{const a=e[o].element.getBlock();let i=!1;for(let e=n.length-1;e>=0;e--)if(n[e].isEqual(a)){i=!0;break}if(!i){r.some((t=>t.isContains(e[o].element)))||(t.push(e[o]),(e[o].element.isInblock()||e[o].element.isInline())&&r.push(e[o].element))}}return t})(e),flatList:e}}addElementTo(e,t,n=0){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if("number"!=typeof n||isNaN(n)||n<0)throw new Error("The third argument must be an integer not less than 0");t.hasChildren()?n>=t.children.length?t.children.push(e):t.children.splice(n,0,e):t.children=[e],e.parent=t}addElementBefore(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(t.isBlock()){const n=this.stack.findIndex((e=>t.isEqual(e)));this.stack.splice(n,0,e),e.parent=null}else{const n=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,n)}}addElementAfter(e,t){if(!y.isElement(e))throw new Error("The first argument must be an AlexElement instance");if(!y.isElement(t))throw new Error("The second argument must be an AlexElement instance");if(t.isBlock()){const n=this.stack.findIndex((e=>t.isEqual(e)));n>=this.stack.length-1?this.stack.push(e):this.stack.splice(n+1,0,e),e.parent=null}else{const n=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,n+1)}}collapseToStart(e){let t=!1;if(this.range||(this.initRange(),t=!0),y.isElement(e))this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e);else{const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom)));if(0==e.length)throw new Error("There is no element to set the focus");this.range.anchor.moveToStart(e[0]),this.range.focus.moveToStart(e[0])}t&&this.history.updateRange(this.range)}collapseToEnd(e){let t=!1;if(this.range||(this.initRange(),t=!0),y.isElement(e))this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e);else{const e=y.flatElements(this.stack).filter((e=>!e.isEmpty()&&!y.VOID_NODES.includes(e.parsedom))),t=e.length;if(0==t)throw new Error("There is no element to set the focus");this.range.anchor.moveToEnd(e[t-1]),this.range.focus.moveToEnd(e[t-1])}t&&this.history.updateRange(this.range)}setDisabled(){this.disabled=!0,this.$el.removeAttribute("contenteditable")}setEnabled(){this.disabled=!1,this.$el.setAttribute("contenteditable","true")}undo(){const e=this.history.undo();e&&(this.stack=e.stack,this.range=e.range,this.domRender(!0),this.rangeRender())}redo(){const e=this.history.redo();e&&(this.stack=e.stack,this.range=e.range,this.domRender(!0),this.rangeRender())}emit(e,...t){return!!Array.isArray(this.__events[e])&&(this.__events[e].forEach((e=>{e.apply(this,[...t])})),!0)}on(e,t){this.__events[e]||(this.__events[e]=[]),this.__events[e].push(t)}off(e,t){if(this.__events[e])if(t){const n=this.__events[e].findIndex((e=>e===t));n>-1&&this.__events[e].splice(n,1)}else this.__events[e]=[]}destroy(){$.apply(this),this.setDisabled(),m.off(document,`selectionchange.alex_editor_${this.__guid}`),m.off(this.$el,"beforeinput.alex_editor compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor keydown.alex_editor cut.alex_editor paste.alex_editor copy.alex_editor dragstart.alex_editor drop.alex_editor focus.alex_editor blur.alex_editor")}}console.log("%c alex-editor %c v1.5.1 ","padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;","padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;");const oe={formatNumber(e){return this.isNumber(e)?e.toString().replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"):e},isNumber:e=>"number"==typeof e&&!isNaN(e),add:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=0;try{n=e.toString().split(".")[1].length}catch(o){}try{r=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(n,r)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let n=0,r=e.toString(),a=t.toString();try{n+=r.split(".")[1].length}catch(o){}try{n+=a.split(".")[1].length}catch(o){}return Number(r.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,n)})),divide:(...e)=>e.reduce(((e,t)=>{let n=0,r=0,a=e.toString(),o=t.toString();try{n=a.split(".")[1].length}catch(i){}try{r=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,r-n)}))},ie={insert(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if("string"!=typeof t)throw new TypeError("The second argument must be a string");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,n)+t+e.substring(n,e.length)},delete(e,t,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!oe.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+n,e.length)},replace(e,t,n,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!oe.isNumber(t))throw new TypeError("The second argument must be a number");if(t<0)throw new Error("The second argument cannot be less than 0");if(!oe.isNumber(n))throw new TypeError("The third argument must be a number");if(n<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof r)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+r+e.substring(n,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let n=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(n=n.replace(/\s/g,"")),n}},le={isWindow:e=>e&&e instanceof Window,getElementPoint(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(this.isElement(t)||(t=document.body),!this.isContains(t,e))throw new Error("The second argument and the first argument have no hierarchical relationship");let n=e,r=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)r+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:r,left:a,right:t.offsetWidth-a-n.offsetWidth,bottom:t.offsetHeight-r-n.offsetHeight}},isContains(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e===t||(e.contains?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t)))},isParentNode(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!this.isElement(t))throw new TypeError("The second argument must be an element");return e!==t&&t.parentNode===e},children(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");return[...e.querySelectorAll(t||"*")].filter((t=>t.parentNode===e))},siblings(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(t&&"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!e.parentNode)return[];return[...e.parentNode.querySelectorAll(t||"*")].filter((t=>t.parentNode===e.parentNode&&t!=e))},rem2px(e){if(!oe.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return oe.mutiply(e,parseFloat(t))},px2rem(e){if(!oe.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return oe.divide(e,parseFloat(t))},width(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientWidth,n=parseFloat(this.getCssStyle(e,"padding-left")),r=parseFloat(this.getCssStyle(e,"padding-right"));return oe.subtract(t,n,r)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,n=parseFloat(this.getCssStyle(e,"padding-top")),r=parseFloat(this.getCssStyle(e,"padding-bottom"));return oe.subtract(t,n,r)},removeClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;ie.trim(t).split(/\s+/).forEach((e=>{n.remove(e)}))},addClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;ie.trim(t).split(/\s+/).forEach((e=>{n.add(e)}))},hasClass(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.classList;return ie.trim(t).split(/\s+/).every((e=>n.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let n=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(n=e),"function"==typeof e&&(t=e);let r=!0;n.addEventListener("scroll",(()=>{if(this.getScrollTop(n)<=0){if(!r)return;"function"==typeof t&&(r=!1,t({state:"top",target:n}))}else{let e={state:"bottom",target:n},a=0;if(a=n==window?window.innerHeight:n.clientHeight,oe.add(this.getScrollTop(n),a)+1>=this.getScrollHeight(n)&&a!=this.getScrollHeight(n)){if(!r)return;"function"==typeof t&&(r=!1,t(e))}else r=!0}}))},getScrollWidth(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollWidth:0==document.documentElement.scrollWidth||0==document.body.scrollWidth?document.documentElement.scrollWidth||document.body.scrollWidth:document.documentElement.scrollWidth>document.body.scrollWidth?document.documentElement.scrollWidth:document.body.scrollWidth,t},getScrollHeight(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.documentElement&&e!=document.body?e.scrollHeight:0==document.documentElement.scrollHeight||0==document.body.scrollHeight?document.documentElement.scrollHeight||document.body.scrollHeight:document.documentElement.scrollHeight>document.body.scrollHeight?document.documentElement.scrollHeight:document.body.scrollHeight,t},setScrollTop(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,a=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollTop=document.body.scrollTop=r:n.scrollTop=r,e();else{let o=10,i=oe.divide(a,o),l=this.getScrollTop(n),s=oe.divide(oe.subtract(r,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollTop=document.body.scrollTop=l=oe.add(l,s):n.scrollTop=l=oe.add(l,s)):(clearInterval(c),e())}),o)}}))},getScrollTop(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollTop:0==document.documentElement.scrollTop||0==document.body.scrollTop?document.documentElement.scrollTop||document.body.scrollTop:document.documentElement.scrollTop>document.body.scrollTop?document.documentElement.scrollTop:document.body.scrollTop,t},getScrollLeft(e){"string"==typeof e&&e&&(e=document.body.querySelector(e));let t=0;return t=this.isElement(e)&&e!=document.body&&e!=document.documentElement&&e!=window?e.scrollLeft:0==document.documentElement.scrollLeft||0==document.body.scrollLeft?document.documentElement.scrollLeft||document.body.scrollLeft:document.documentElement.scrollLeft>document.body.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,t},setScrollLeft(e){let t=!1,n=e.el;"string"==typeof n&&n&&(n=document.body.querySelector(n));let r=e.number||0,a=e.time||0;return this.isElement(n)&&n!=document.body&&n!=document.documentElement&&n!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=r:n.scrollLeft=r,e();else{let o=10,i=oe.divide(a,o),l=this.getScrollLeft(n),s=oe.divide(oe.subtract(r,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollLeft=document.body.scrollLeft=l=oe.add(l,s):n.scrollLeft=l=oe.add(l,s)):(clearInterval(c),e())}),o)}}))},getCssStyle(e,t){if(!this.isElement(e))throw new TypeError("The first argument must be an element");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n="";return n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],n},getCssSelector(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a selector string");if(/^#{1}/.test(e))return{type:"id",value:e.substr(1)};if(/^\./.test(e))return{type:"class",value:e.substr(1)};if(/^\[(.+)\]$/.test(e)){let t="attribute",n="",r=ie.trim(e,!0).substring(1,ie.trim(e,!0).length-1).split("=");return 1==r.length&&(n=r[0]),2==r.length&&(n={attributeName:r[0],attributeValue:r[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:n}}return{type:"tag",value:e}},getElementBounding(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.getBoundingClientRect();return{top:t.top,bottom:oe.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:oe.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");const t=document.createElement("template");return t.innerHTML=e,1==t.content.children.length?t.content.children[0]:Array.from(t.content.children)}},se="_dap-datas",ce={remove(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[se]||{};null==t||""===t?e[se]={}:(delete n[t],e[se]=n)},has(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");return(e[se]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=e[se]||{};return null==t||""===t?n:n[t]},set(e,t,n){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let r=e[se]||{};r[t]=n,e[se]=r}},de={matchingText(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=null;if("Chinese"==t&&(n=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(n=/[\u4e00-\u9fa5]/),"email"==t&&(n=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(n=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(n=/^\d+$/),"int-"==t&&(n=/^-\d+$/),"int"==t&&(n=/^-?\d+$/),"pos"==t&&(n=/^\d*\.?\d+$/),"neg"==t&&(n=/^-\d*\.?\d+$/),"number"==t&&(n=/^-?\d*\.?\d+$/),"phone"==t&&(n=/^1[0-9]\d{9}$/),"idCard"==t&&(n=/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/),"url"==t&&(n=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(n=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/),"hex"==t&&(n=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(n=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\)$/),"rgba"==t&&(n=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d),\s?(0?\.\d|1(\.0)?|0)\)$/),"QQ"==t&&(n=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(n=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(n=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!n)throw new Error("The second parameter is out of scope");return n.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=window.location.search.substr(1);if(!n){let e=window.location.hash.split("?");2==e.length&&(n=e[1])}let r=n.match(t);return r?decodeURIComponent(r[2]):null},isEmptyObject(e){return!!this.isObject(e)&&0==Object.keys(e).length},equal(e,t){if(typeof e!=typeof t)return!1;if(this.isObject(e)&&this.isObject(t)){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);if(n.length!=r.length)return!1;let a=n.length,o=!0;for(let i=0;i<a;i++){let r=n[i],a=e[r],l=t[r];if(!this.equal(a,l)){o=!1;break}}return o}return e===t},isObject:e=>!("object"!=typeof e||!e),copyText(e){if(!e||"string"!=typeof e)throw new TypeError("No text to copy is defined");if(!navigator.clipboard)throw new Error("navigator.clipboard must be obtained in a secure environment, such as localhost, 127.0.0.1, or https, so the method won't work");return navigator.clipboard.writeText(e)},clone(e){if(this.isObject(e)){if(Array.isArray(e))return e.map((e=>this.clone(e)));let t={};for(let n in e)t[n]=this.clone(e[n]);return t}return e}},ue=e=>{let t=e.split(/[\s]+/g),n=[];return t.forEach((e=>{let t=e.split("."),r={eventName:t[0]};t.length>1&&(r.guid=t[1]),n.push(r)})),n},me=(e,t,n)=>{let r=ce.get(e,"dap-defined-events")||{},a=Object.keys(r),o=a.length;for(let i=0;i<o;i++){let o=a[i];r[o].type==t&&(n?o==t+"."+n&&(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0):(e.removeEventListener(r[o].type,r[o].fn,r[o].options),r[o]=void 0))}r=(e=>{let t={};return Object.keys(e).forEach((n=>{e[n]&&(t[n]=e[n])})),t})(r),ce.set(e,"dap-defined-events",r)},he={on(e,t,n,r){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!n||"function"!=typeof n)throw new TypeError("The third argument must be a function");de.isObject(r)||(r={});ue(t).forEach((t=>{((e,t,n,r,a)=>{let o=ce.get(e,"dap-defined-events")||{};n||(n=ce.get(e,"dap-event-guid")||0,ce.set(e,"dap-event-guid",n+1)),o[n=t+"."+n]&&o[n].type==t&&e.removeEventListener(t,o[n].fn,o[n].options),e.addEventListener(t,r,a),o[n]={type:t,fn:r,options:a},ce.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,n.bind(e),r)}))},off(e,t){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let n=ce.get(e,"dap-defined-events");if(!n)return;if(!t){let t=Object.keys(n),r=t.length;for(let a=0;a<r;a++){let r=t[a];e.removeEventListener(n[r].type,n[r].fn,n[r].options)}return ce.remove(e,"dap-defined-events"),void ce.remove(e,"dap-event-guid")}ue(t).forEach((t=>{me(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||le.isElement(e)||le.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=ce.get(e,"dap-defined-events");if(t)return t}},pe={rgb2hsv(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=0,n=0,r=0,a=e[0]>=255?255:e[0],o=e[1]>=255?255:e[1],i=e[2]>=255?255:e[2];a=a<=0?0:a,o=o<=0?0:o,i=i<=0?0:i;let l=Math.max(a,o,i),s=Math.min(a,o,i);return r=l/255,n=0===l?0:1-s/l,l===s?t=0:l===a&&o>=i?t=(o-i)/(l-s)*60+0:l===a&&o<i?t=(o-i)/(l-s)*60+360:l===o?t=(i-a)/(l-s)*60+120:l===i&&(t=(a-o)/(l-s)*60+240),[t,100*n,100*r]},hsv2rgb(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=e[0]>=360||e[0]<=0?0:e[0],n=e[1]>=100?100:e[1];n=n<=0?0:n;let r=e[2]>=100?100:e[2];r=r<=0?0:r,n/=100,r/=100;let a=0,o=0,i=0,l=parseInt(t/60%6+""),s=t/60-l,c=r*(1-n),d=r*(1-s*n),u=r*(1-(1-s)*n);switch(l){case 0:a=r,o=u,i=c;break;case 1:a=d,o=r,i=c;break;case 2:a=c,o=r,i=u;break;case 3:a=c,o=d,i=r;break;case 4:a=u,o=c,i=r;break;case 5:a=r,o=c,i=d}return a=parseInt(255*a+""),o=parseInt(255*o+""),i=parseInt(255*i+""),[a,o,i]},rgb2hex(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+e[2]).toString(16).slice(1)},hex2rgb(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=e.toLowerCase();if(!de.matchingText(t,"hex"))throw new TypeError("The argument must be a hexadecimal color value");if(4===t.length){let e="#";for(let n=1;n<4;n+=1)e+=t.slice(n,n+1).concat(t.slice(n,n+1));t=e}let n=[];for(let r=1;r<7;r+=2)n.push(parseInt("0x"+t.slice(r,r+2)));return n}},fe={getImageUrl(e){if(!(e&&e instanceof File))throw new TypeError("The argument must be a File object");return window.URL.createObjectURL(e)},dataFileToBase64:e=>new Promise(((t,n)=>{e&&e instanceof File||n(new TypeError("The argument must be a File object"));let r=new FileReader;r.readAsDataURL(e),r.onloadend=()=>{let e=r.result;t(e)}})),dataBase64toFile(e,t){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");let n=e.split(","),r=n[0].match(/:(.*?);/)[1],a=atob(n[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:r})},compressImage(e,t){const n={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};de.isObject(t)&&(oe.isNumber(t.width)&&(n.width=t.width),oe.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(n.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(n.mimeType=t.mimeType),oe.isNumber(t.maxSize)&&(n.maxSize=t.maxSize),oe.isNumber(t.minSize)&&(n.minSize=t.minSize));const r=(e,t,a)=>{let o=e.toDataURL("image/"+n.mimeType,a),i=this.dataBase64toFile(o,t);if(n.maxSize>0&&i.size>1024*n.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const n=r(e,t,a);o=n.url,i=n.file,a=n.quality}return{file:i,url:o,quality:a}};return new Promise(((t,a)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>{let i=o.result,l=new Image;l.src=i,l.onload=()=>{if(n.minSize>0&&e.size<=1024*n.minSize)return void t({file:e,url:i,quality:1,width:l.width,height:l.height});let a=document.createElement("canvas"),o=a.getContext("2d");a.width=n.width||l.width,a.height=n.width?n.width/(l.width/l.height):l.height,o.drawImage(l,0,0,a.width,a.height);let s=e.name.lastIndexOf(".");const c=e.name.substring(0,s)+"."+n.mimeType;let d=r(a,c,n.quality);t({...d,width:a.width,height:a.height})},l.onerror=()=>{a(new Error("Failed to load image file"))}},o.onerror=()=>{a(new Error("Failed to load image file"))}}))}},ge={language:()=>window.navigator.browserLanguage||window.navigator.language,device(){const e=window.navigator.userAgent;return{PC:!e.match(/AppleWebKit.*Mobile.*/),Mobile:!!e.match(/AppleWebKit.*Mobile.*/),iPhone:e.includes("iPhone"),Phone:e.includes("Android")&&/(?:Mobile)/.test(e)||e.includes("iPhone")||/(?:Windows Phone)/.test(e),iPad:e.includes("iPad"),Tablet:e.includes("iPad")||e.includes("Android")&&!/(?:Mobile)/.test(e)||e.includes("Firefox")&&/(?:Tablet)/.test(e),WindowsPhone:/(?:Windows Phone)/.test(e)}},browser(){const e=window.navigator.userAgent;return{Edge:!!e.match(/Edg\/([\d.]+)/),weixin:e.includes("MicroMessenger"),QQ:e.includes("QQ"),QQBrowser:e.includes("MQQBrowser"),UC:e.includes("UCBrowser"),Chrome:e.includes("Chrome"),Firefox:e.includes("Firefox"),sougou:e.toLocaleLowerCase().includes("se 2.x")||e.toLocaleLowerCase().includes("metasr")||e.toLocaleLowerCase().includes("sogou"),Safari:e.includes("Safari")&&!e.includes("Chrome")}},browserKernel(){const e=window.navigator.userAgent;return e.includes("Presto")?"opera":e.includes("AppleWebKit")?"webkit":e.includes("Gecko")&&!e.includes("KHTML")?"gecko":""},os(){const e=window.navigator.userAgent;return{Windows:e.includes("Windows"),Windows_CPU:e.toLocaleLowerCase().includes("win64")||e.toLocaleLowerCase().includes("wow64")?"x64":e.toLocaleLowerCase().includes("win32")||e.toLocaleLowerCase().includes("wow32")?"x32":"",Windows_Version:e.includes("Windows NT 6.1")||e.includes("Windows 7")?"Win7":e.includes("Windows NT 6.3")||e.includes("Windows NT 6.2")||e.includes("Windows NT 8")?"Win8":e.includes("Windows NT 10")||e.includes("Windows NT 6.4")?"Win10":"",Mac:e.includes("Macintosh"),Mac_Version:function(){if(e.includes("Macintosh")){const t=e.match(/Mac OS X ([^\s]+)\)/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),ios:!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),ios_Version:function(){if(e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)){const t=e.match(/CPU.+OS ([^\s]+) like Mac OS X/);if(t&&t[1])return t[1].split(/_|\./).join(".")}return""}(),Android:e.includes("Android"),Android_Version:function(){const t=e.match(/Android ([^\s]+);/);return t&&t[1]?t[1].split(/_|\./).join("."):""}(),Linux:e.includes("Linux"),HarmonyOS:e.includes("HarmonyOS"),Ubuntu:e.includes("Ubuntu")}}};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ve(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((t=>{const n=e[t],r=typeof n;"object"!==r&&"function"!==r||Object.isFrozen(n)||ve(n)})),e}class ye{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function we(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function xe(e,...t){const n=Object.create(null);for(const r in e)n[r]=e[r];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const Ee=e=>!!e.scope;class ke{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=we(e)}openNode(e){if(!Ee(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){Ee(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const Se=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Te{constructor(){this.rootNode=Se(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t=Se({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{Te._collapse(e)})))}}class _e extends Te{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new ke(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Ce(e){return e?"string"==typeof e?e:e.source:null}function Ne(e){return ze("(?=",e,")")}function Be(e){return ze("(?:",e,")*")}function Me(e){return ze("(?:",e,")?")}function ze(...e){return e.map((e=>Ce(e))).join("")}function Ae(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>Ce(e))).join("|")+")"}function Oe(e){return new RegExp(e.toString()+"|").exec("").length-1}const Ie=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Re(e,{joinWith:t}){let n=0;return e.map((e=>{n+=1;const t=n;let r=Ce(e),a="";for(;r.length>0;){const e=Ie.exec(r);if(!e){a+=r;break}a+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&n++)}return a})).map((e=>`(${e})`)).join(t)}const Le="[a-zA-Z]\\w*",De="[a-zA-Z_]\\w*",$e="\\b\\d+(\\.\\d+)?",je="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Pe="\\b(0b[01]+)",qe={begin:"\\\\[\\s\\S]",relevance:0},Fe={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qe]},He={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qe]},Ve=function(e,t,n={}){const r=xe({scope:"comment",begin:e,end:t,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=Ae("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:ze(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Ue=Ve("//","$"),We=Ve("/\\*","\\*/"),Ke=Ve("#","$"),Ge={scope:"number",begin:$e,relevance:0},Ze={scope:"number",begin:je,relevance:0},Xe={scope:"number",begin:Pe,relevance:0},Ye={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[qe,{begin:/\[/,end:/\]/,relevance:0,contains:[qe]}]},Qe={scope:"title",begin:Le,relevance:0},Je={scope:"title",begin:De,relevance:0},et={begin:"\\.\\s*"+De,relevance:0};var tt=Object.freeze({__proto__:null,APOS_STRING_MODE:Fe,BACKSLASH_ESCAPE:qe,BINARY_NUMBER_MODE:Xe,BINARY_NUMBER_RE:Pe,COMMENT:Ve,C_BLOCK_COMMENT_MODE:We,C_LINE_COMMENT_MODE:Ue,C_NUMBER_MODE:Ze,C_NUMBER_RE:je,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})},HASH_COMMENT_MODE:Ke,IDENT_RE:Le,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:et,NUMBER_MODE:Ge,NUMBER_RE:$e,PHRASAL_WORDS_MODE:{begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},QUOTE_STRING_MODE:He,REGEXP_MODE:Ye,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ze(t,/.*\b/,e.binary,/\b.*/)),xe({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:Qe,UNDERSCORE_IDENT_RE:De,UNDERSCORE_TITLE_MODE:Je});function nt(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function rt(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function at(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=nt,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function ot(e,t){Array.isArray(e.illegal)&&(e.illegal=Ae(...e.illegal))}function it(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function lt(e,t){void 0===e.relevance&&(e.relevance=1)}const st=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=n.keywords,e.begin=ze(n.beforeMatch,Ne(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},ct=["of","and","for","in","not","or","if","then","parent","list","value"],dt="keyword";function ut(e,t,n=dt){const r=Object.create(null);return"string"==typeof e?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach((function(n){Object.assign(r,ut(e[n],t,n))})),r;function a(e,n){t&&(n=n.map((e=>e.toLowerCase()))),n.forEach((function(t){const n=t.split("|");r[n[0]]=[e,mt(n[0],n[1])]}))}}function mt(e,t){return t?Number(t):function(e){return ct.includes(e.toLowerCase())}(e)?0:1}const ht={},pt=e=>{console.error(e)},ft=(e,...t)=>{console.log(`WARN: ${e}`,...t)},gt=(e,t)=>{ht[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),ht[`${e}/${t}`]=!0)},bt=new Error;function vt(e,t,{key:n}){let r=0;const a=e[n],o={},i={};for(let l=1;l<=t.length;l++)i[l+r]=a[l],o[l+r]=!0,r+=Oe(t[l-1]);e[n]=i,e[n]._emit=o,e[n]._multi=!0}function yt(e){!function(e){e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope,delete e.scope)}(e),"string"==typeof e.beginScope&&(e.beginScope={_wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope}),function(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw pt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),bt;if("object"!=typeof e.beginScope||null===e.beginScope)throw pt("beginScope must be object"),bt;vt(e,e.begin,{key:"beginScope"}),e.begin=Re(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw pt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),bt;if("object"!=typeof e.endScope||null===e.endScope)throw pt("endScope must be object"),bt;vt(e,e.end,{key:"endScope"}),e.end=Re(e.end,{joinWith:""})}}(e)}function wt(e){function t(t,n){return new RegExp(Ce(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=Oe(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(Re(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=xe(e.classNameAliases||{}),function n(a,o){const i=a;if(a.isCompiled)return i;[rt,it,yt,st].forEach((e=>e(a,o))),e.compilerExtensions.forEach((e=>e(a,o))),a.__beforeBegin=null,[at,ot,lt].forEach((e=>e(a,o))),a.isCompiled=!0;let l=null;return"object"==typeof a.keywords&&a.keywords.$pattern&&(a.keywords=Object.assign({},a.keywords),l=a.keywords.$pattern,delete a.keywords.$pattern),l=l||/\w+/,a.keywords&&(a.keywords=ut(a.keywords,e.case_insensitive)),i.keywordPatternRe=t(l,!0),o&&(a.begin||(a.begin=/\B|\b/),i.beginRe=t(i.begin),a.end||a.endsWithParent||(a.end=/\B|\b/),a.end&&(i.endRe=t(i.end)),i.terminatorEnd=Ce(i.end)||"",a.endsWithParent&&o.terminatorEnd&&(i.terminatorEnd+=(a.end?"|":"")+o.terminatorEnd)),a.illegal&&(i.illegalRe=t(a.illegal)),a.contains||(a.contains=[]),a.contains=[].concat(...a.contains.map((function(e){return function(e){e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map((function(t){return xe(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(xt(e))return xe(e,{starts:e.starts?xe(e.starts):null});if(Object.isFrozen(e))return xe(e);return e}("self"===e?a:e)}))),a.contains.forEach((function(e){n(e,i)})),a.starts&&n(a.starts,o),i.matcher=function(e){const t=new r;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin"}))),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:"end"}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t}(i),i}(e)}function xt(e){return!!e&&(e.endsWithParent||xt(e.starts))}class Et extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const kt=we,St=xe,Tt=Symbol("nomatch"),_t=function(e){const t=Object.create(null),n=Object.create(null),r=[];let a=!0;const o="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:_e};function s(e){return l.noHighlightRe.test(e)}function c(e,t,n){let r="",a="";"object"==typeof t?(r=e,n=t.ignoreIllegals,a=t.language):(gt("10.7.0","highlight(lang, code, ...args) has been deprecated."),gt("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,r=t),void 0===n&&(n=!0);const o={code:r,language:a};v("before:highlight",o);const i=o.result?o.result:d(o.language,o.code,n);return i.code=o.code,v("after:highlight",i),i}function d(e,n,r,i){const s=Object.create(null);function c(){if(!T.keywords)return void C.addText(N);let e=0;T.keywordPatternRe.lastIndex=0;let t=T.keywordPatternRe.exec(N),n="";for(;t;){n+=N.substring(e,t.index);const a=E.case_insensitive?t[0].toLowerCase():t[0],o=(r=a,T.keywords[r]);if(o){const[e,r]=o;if(C.addText(n),n="",s[a]=(s[a]||0)+1,s[a]<=7&&(B+=r),e.startsWith("_"))n+=t[0];else{const n=E.classNameAliases[e]||e;h(t[0],n)}}else n+=t[0];e=T.keywordPatternRe.lastIndex,t=T.keywordPatternRe.exec(N)}var r;n+=N.substring(e),C.addText(n)}function m(){null!=T.subLanguage?function(){if(""===N)return;let e=null;if("string"==typeof T.subLanguage){if(!t[T.subLanguage])return void C.addText(N);e=d(T.subLanguage,N,!0,_[T.subLanguage]),_[T.subLanguage]=e._top}else e=u(N,T.subLanguage.length?T.subLanguage:null);T.relevance>0&&(B+=e.relevance),C.__addSublanguage(e._emitter,e.language)}():c(),N=""}function h(e,t){""!==e&&(C.startScope(t),C.addText(e),C.endScope())}function p(e,t){let n=1;const r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}const r=E.classNameAliases[e[n]]||e[n],a=t[n];r?h(a,r):(N=a,c(),N=""),n++}}function g(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(E.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(h(N,E.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),N=""):e.beginScope._multi&&(p(e.beginScope,t),N="")),T=Object.create(e,{parent:{value:T}}),T}function b(e,t,n){let r=function(e,t){const n=e&&e.exec(t);return n&&0===n.index}(e.endRe,n);if(r){if(e["on:end"]){const n=new ye(e);e["on:end"](t,n),n.isMatchIgnored&&(r=!1)}if(r){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return b(e.parent,t,n)}function v(e){return 0===T.matcher.regexIndex?(N+=e[0],1):(A=!0,0)}function y(e){const t=e[0],r=n.substring(e.index),a=b(T,e,r);if(!a)return Tt;const o=T;T.endScope&&T.endScope._wrap?(m(),h(t,T.endScope._wrap)):T.endScope&&T.endScope._multi?(m(),p(T.endScope,e)):o.skip?N+=t:(o.returnEnd||o.excludeEnd||(N+=t),m(),o.excludeEnd&&(N=t));do{T.scope&&C.closeNode(),T.skip||T.subLanguage||(B+=T.relevance),T=T.parent}while(T!==a.parent);return a.starts&&g(a.starts,e),o.returnEnd?0:t.length}let w={};function x(t,o){const i=o&&o[0];if(N+=t,null==i)return m(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===i){if(N+=n.slice(o.index,o.index+1),!a){const t=new Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=w.rule,t}return 1}if(w=o,"begin"===o.type)return function(e){const t=e[0],n=e.rule,r=new ye(n),a=[n.__beforeBegin,n["on:begin"]];for(const o of a)if(o&&(o(e,r),r.isMatchIgnored))return v(t);return n.skip?N+=t:(n.excludeBegin&&(N+=t),m(),n.returnBegin||n.excludeBegin||(N=t)),g(n,e),n.returnBegin?0:t.length}(o);if("illegal"===o.type&&!r){const e=new Error('Illegal lexeme "'+i+'" for mode "'+(T.scope||"<unnamed>")+'"');throw e.mode=T,e}if("end"===o.type){const e=y(o);if(e!==Tt)return e}if("illegal"===o.type&&""===i)return 1;if(z>1e5&&z>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return N+=i,i.length}const E=f(e);if(!E)throw pt(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const k=wt(E);let S="",T=i||k;const _={},C=new l.__emitter(l);!function(){const e=[];for(let t=T;t!==E;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach((e=>C.openNode(e)))}();let N="",B=0,M=0,z=0,A=!1;try{if(E.__emitTokens)E.__emitTokens(n,C);else{for(T.matcher.considerAll();;){z++,A?A=!1:T.matcher.considerAll(),T.matcher.lastIndex=M;const e=T.matcher.exec(n);if(!e)break;const t=x(n.substring(M,e.index),e);M=e.index+t}x(n.substring(M))}return C.finalize(),S=C.toHTML(),{language:e,value:S,relevance:B,illegal:!1,_emitter:C,_top:T}}catch(O){if(O.message&&O.message.includes("Illegal"))return{language:e,value:kt(n),illegal:!0,relevance:0,_illegalBy:{message:O.message,index:M,context:n.slice(M-100,M+100),mode:O.mode,resultSoFar:S},_emitter:C};if(a)return{language:e,value:kt(n),illegal:!1,relevance:0,errorRaised:O,_emitter:C,_top:T};throw O}}function u(e,n){n=n||l.languages||Object.keys(t);const r=function(e){const t={value:kt(e),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}(e),a=n.filter(f).filter(b).map((t=>d(t,e,!1)));a.unshift(r);const o=a.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(f(e.language).supersetOf===t.language)return 1;if(f(t.language).supersetOf===e.language)return-1}return 0})),[s,c]=o,u=s;return u.secondBest=c,u}function m(e){let t=null;const r=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const n=l.languageDetectRe.exec(t);if(n){const t=f(n[1]);return t||(ft(o.replace("{}",n[1])),ft("Falling back to no-highlight mode for this block.",e)),t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>s(e)||f(e)))}(e);if(s(r))return;if(v("before:highlightElement",{el:e,language:r}),e.dataset.highlighted)return void console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",e);if(e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(e)),l.throwUnescapedHTML)){throw new Et("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const a=t.textContent,i=r?c(a,{language:r,ignoreIllegals:!0}):u(a);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,r){const a=t&&n[t]||r;e.classList.add("hljs"),e.classList.add(`language-${a}`)}(e,r,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),v("after:highlightElement",{el:e,result:i,text:a})}let h=!1;function p(){if("loading"===document.readyState)return void(h=!0);document.querySelectorAll(l.cssSelector).forEach(m)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[n[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{n[e.toLowerCase()]=t}))}function b(e){const t=f(e);return t&&!t.disableAutodetect}function v(e,t){const n=e;r.forEach((function(e){e[n]&&e[n](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){h&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:m,highlightBlock:function(e){return gt("10.7.0","highlightBlock will be removed entirely in v12.0"),gt("10.7.0","Please use highlightElement now."),m(e)},configure:function(e){l=St(l,e)},initHighlighting:()=>{p(),gt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),gt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(n,r){let o=null;try{o=r(e)}catch(l){if(pt("Language definition for '{}' could not be registered.".replace("{}",n)),!a)throw l;pt(l),o=i}o.name||(o.name=n),t[n]=o,o.rawDefinition=r.bind(null,e),o.aliases&&g(o.aliases,{languageName:n})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(n))n[t]===e&&delete n[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:b,inherit:St,addPlugin:function(e){!function(e){e["before:highlightBlock"]&&!e["before:highlightElement"]&&(e["before:highlightElement"]=t=>{e["before:highlightBlock"](Object.assign({block:t.el},t))}),e["after:highlightBlock"]&&!e["after:highlightElement"]&&(e["after:highlightElement"]=t=>{e["after:highlightBlock"](Object.assign({block:t.el},t))})}(e),r.push(e)},removePlugin:function(e){const t=r.indexOf(e);-1!==t&&r.splice(t,1)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.9.0",e.regex={concat:ze,lookahead:Ne,either:Ae,optional:Me,anyNumberOfTimes:Be};for(const y in tt)"object"==typeof tt[y]&&ve(tt[y]);return Object.assign(e,tt),e},Ct=_t({});Ct.newInstance=()=>_t({});var Nt=Ct;Ct.HighlightJS=Ct,Ct.default=Ct;const Bt=be(Nt);const Mt="[A-Za-z$_][0-9A-Za-z$_]*",zt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],At=["true","false","null","undefined","NaN","Infinity"],Ot=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],It=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Rt=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Lt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dt=[].concat(Rt,Ot,It);var $t="[0-9](_*[0-9])*",jt=`\\.(${$t})`,Pt="[0-9a-fA-F](_*[0-9a-fA-F])*",qt={className:"number",variants:[{begin:`(\\b(${$t})((${jt})|\\.)?|(${jt}))[eE][+-]?(${$t})[fFdD]?\\b`},{begin:`\\b(${$t})((${jt})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${jt})[fFdD]?\\b`},{begin:`\\b(${$t})[fFdD]\\b`},{begin:`\\b0[xX]((${Pt})\\.?|(${Pt})?\\.(${Pt}))[pP][+-]?(${$t})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Pt})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function Ft(e,t,n){return-1===n?"":e.replace(t,(r=>Ft(e,t,n-1)))}const Ht="[A-Za-z$_][0-9A-Za-z$_]*",Vt=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Ut=["true","false","null","undefined","NaN","Infinity"],Wt=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Kt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Gt=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Zt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Xt=[].concat(Gt,Wt,Kt);const Yt=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Qt=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],Jt=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],en=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],tn=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();const nn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],rn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],an=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],on=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],ln=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse(),sn=an.concat(on);const cn=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dn=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],un=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"],mn=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],hn=["align-content","align-items","align-self","all","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","content-visibility","counter-increment","counter-reset","cue","cue-after","cue-before","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-smoothing","font-stretch","font-style","font-synthesis","font-variant","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inline-size","isolation","justify-content","left","letter-spacing","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","pause","pause-after","pause-before","perspective","perspective-origin","pointer-events","position","quotes","resize","rest","rest-after","rest-before","right","row-gap","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","speak","speak-as","src","tab-size","table-layout","text-align","text-align-all","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-box","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index"].reverse();function pn(e){return e?"string"==typeof e?e:e.source:null}function fn(e){return gn("(?=",e,")")}function gn(...e){return e.map((e=>pn(e))).join("")}function bn(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>pn(e))).join("|")+")"}const vn=e=>gn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),yn=["Protocol","Type"].map(vn),wn=["init","self"].map(vn),xn=["Any","Self"],En=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],kn=["false","nil","true"],Sn=["assignment","associativity","higherThan","left","lowerThan","none","right"],Tn=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],_n=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],Cn=bn(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Nn=bn(Cn,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Bn=gn(Cn,Nn,"*"),Mn=bn(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),zn=bn(Mn,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),An=gn(Mn,zn,"*"),On=gn(/[A-Z]/,zn,"*"),In=["attached","autoclosure",gn(/convention\(/,bn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gn(/objc\(/,An,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Rn=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var Ln="[0-9](_*[0-9])*",Dn=`\\.(${Ln})`,$n="[0-9a-fA-F](_*[0-9a-fA-F])*",jn={className:"number",variants:[{begin:`(\\b(${Ln})((${Dn})|\\.)?|(${Dn}))[eE][+-]?(${Ln})[fFdD]?\\b`},{begin:`\\b(${Ln})((${Dn})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Dn})[fFdD]?\\b`},{begin:`\\b(${Ln})[fFdD]\\b`},{begin:`\\b0[xX]((${$n})\\.?|(${$n})?\\.(${$n}))[pP][+-]?(${Ln})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${$n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};Bt.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),Bt.registerLanguage("json",(function(e){const t=["true","false","null"],n={scope:"literal",beginKeywords:t.join(" ")};return{name:"JSON",keywords:{literal:t},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),Bt.registerLanguage("javascript",(function(e){const t=e.regex,n=Mt,r="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let a;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Mt,keyword:zt,literal:At,built_in:Dt,"variable.language":Lt},l="[0-9](_?[0-9])*",s=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${s})|\\.)?|(${s}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${s})\\b|\\.)?|(${s})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:i,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},p={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,{match:/\$\d+/},d];u.contains=b.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(b)});const v=[].concat(g,u.contains),y=v.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(v)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ot,...It]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Rt,"super","import"],t.concat("(?!",T.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,g,{match:/\$\d+/},d,E,{className:"attr",begin:n+t.lookahead(":"),relevance:0},B,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:a},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}})),Bt.registerLanguage("java",(function(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+Ft("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},o={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,qt,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},qt,o]}})),Bt.registerLanguage("typescript",(function(e){const t=function(e){const t=e.regex,n=Ht,r="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const n=e[0].length+e.index,r=e.input[n];if("<"===r||","===r)return void t.ignoreMatch();let a;">"===r&&(((e,{after:t})=>{const n="</"+e[0].slice(1);return-1!==e.input.indexOf(n,t)})(e,{after:n})||t.ignoreMatch());const o=e.input.substring(n);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Ht,keyword:Vt,literal:Ut,built_in:Xt,"variable.language":Zt},l="[0-9](_?[0-9])*",s=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${s})|\\.)?|(${s}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${s})\\b|\\.)?|(${s})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{",end:"\\}",keywords:i,contains:[]},m={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},h={begin:"css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"css"}},p={begin:"gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"graphql"}},f={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:n+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},b=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,{match:/\$\d+/},d];u.contains=b.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(b)});const v=[].concat(g,u.contains),y=v.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(v)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,n,/\s+/,/extends/,/\s+/,t.concat(n,"(",t.concat(/\./,n),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,n],scope:{1:"keyword",3:"title.class"}}]},E={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Wt,...Kt]}},k={variants:[{match:[/function/,/\s+/,n,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Gt,"super","import"],t.concat("(?!",T.join("|"),")")),n,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const _={begin:t.concat(/\./,t.lookahead(t.concat(n,/(?![0-9A-Za-z$_(])/))),end:n,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,n,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},N="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,n,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(N)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:i,exports:{PARAMS_CONTAINS:y,CLASS_REFERENCE:E},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),{label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,h,p,f,g,{match:/\$\d+/},d,E,{className:"attr",begin:n+t.lookahead(":"),relevance:0},B,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:N,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:r,end:a},{match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},k,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,e.inherit(e.TITLE_MODE,{begin:n,className:"title.function"})]},{match:/\.\.\./,relevance:0},_,{match:"\\$"+n,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},S,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},x,C,{match:/\$[(.]/}]}}(e),n=Ht,r=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={beginKeywords:"namespace",end:/\{/,excludeEnd:!0,contains:[t.exports.CLASS_REFERENCE]},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:r},contains:[t.exports.CLASS_REFERENCE]},i={$pattern:Ht,keyword:Vt.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:Ut,built_in:Xt.concat(r),"variable.language":Zt},l={className:"meta",begin:"@"+n},s=(e,t,n)=>{const r=e.contains.findIndex((e=>e.label===t));if(-1===r)throw new Error("can not find mode to replace");e.contains.splice(r,1,n)};return Object.assign(t.keywords,i),t.exports.PARAMS_CONTAINS.push(l),t.contains=t.contains.concat([l,a,o]),s(t,"shebang",e.SHEBANG()),s(t,"use_strict",{className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/}),t.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t})),Bt.registerLanguage("python",(function(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},o={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},s={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,o,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,o,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c="[0-9](_?[0-9])*",d=`(\\b(${c}))?\\.(${c})|\\b(${c})\\.`,u=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${c})|(${d}))[eE][+-]?(${c})[jJ]?(?=${u})`},{begin:`(${d})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${c})[jJ](?=${u})`}]},h={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",o,m,s,e.HASH_COMMENT_MODE]}]};return i.contains=[s,m,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[o,m,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},s,h,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,p,s]}]}})),Bt.registerLanguage("php",(function(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o={scope:"variable",match:"\\$+"+r},i={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},l=e.inherit(e.APOS_STRING_MODE,{illegal:null}),s="[ \t\n]",c={scope:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(i)}),l,{begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(i),"on:begin":(e,t)=>{t.data._beginMatch=e[1]||e[2]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}},e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/})]},d={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},u=["false","null","true"],m=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],h=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],p={keyword:m,literal:(e=>{const t=[];return e.forEach((e=>{t.push(e),e.toLowerCase()===e?t.push(e.toUpperCase()):t.push(e.toLowerCase())})),t})(u),built_in:h},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(s,"+"),t.concat("(?!",f(h).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},b=t.concat(r,"\\b(?!\\()"),v={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),b],scope:{1:"title.class",3:"variable.constant"}},{match:[a,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[a,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},y={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:p,contains:[y,o,v,e.C_BLOCK_COMMENT_MODE,c,d,g]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(m).join("\\b|"),"|",f(h).join("\\b|"),"\\b)"),r,t.concat(s,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const E=[y,v,e.C_BLOCK_COMMENT_MODE,c,d,g];return{case_insensitive:!1,keywords:p,contains:[{begin:t.concat(/#\[\s*/,a),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:u,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:u,keyword:["new","array"]},contains:["self",...E]},...E,{scope:"meta",match:a}]},e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},{scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},{scope:"variable.language",match:/\$this\b/},o,x,v,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},g,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:p,contains:["self",o,v,e.C_BLOCK_COMMENT_MODE,c,d]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},c,d]}})),Bt.registerLanguage("css",(function(e){const t=e.regex,n=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),r=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\.[a-zA-Z-][a-zA-Z0-9_-]*",relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Jt.join("|")+")"},{begin:":(:)?("+en.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+tn.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...r,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...r,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Qt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...r,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Yt.join("|")+")\\b"}]}})),Bt.registerLanguage("less",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=sn,r="[\\w-]+",a="("+r+"|@\\{"+r+"\\})",o=[],i=[],l=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},s=function(e,t,n){return{className:e,begin:t,relevance:n}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:rn.join(" ")},d={begin:"\\(",end:"\\)",contains:i,keywords:c,relevance:0};i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l("'"),l('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,d,s("variable","@@?"+r,10),s("variable","@\\{"+r+"\\}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:r+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=i.concat({begin:/\{/,end:/\}/,contains:o}),m={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},h={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ln.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:i}}]},p={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:i,relevance:0}},f={className:"variable",variants:[{begin:"@"+r+"\\s*:",relevance:15},{begin:"@"+r}],starts:{end:"[;}]",returnEnd:!0,contains:u}},g={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,m,s("keyword","all\\b"),s("variable","@\\{"+r+"\\}"),{begin:"\\b("+nn.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,s("selector-tag",a,0),s("selector-id","#"+a),s("selector-class","\\."+a,0),s("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+an.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+on.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},b={begin:r+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,f,b,h,g,m,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),Bt.registerLanguage("scss",(function(e){const t=(e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}))(e),n=mn,r=un,a="@[a-z-]+",o={className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+cn.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hn.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,o,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:a,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:"and or not only",attribute:dn.join(" ")},contains:[{begin:a,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},o,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}})),Bt.registerLanguage("html",(function(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=e.inherit(a,{begin:/\(/,end:/\)/}),i=e.inherit(e.APOS_STRING_MODE,{className:"string"}),l=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),s={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:/[\p{L}0-9._:-]+/u,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[r]},{begin:/'/,end:/'/,contains:[r]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,i,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,l,i]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},r,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[s],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[s],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),Bt.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},n={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.regex.concat(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},r={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},a={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},o=e.inherit(r,{contains:[]}),i=e.inherit(a,{contains:[]});r.contains.push(i),a.contains.push(o);let l=[t,n];return[r,a,o,i].forEach((e=>{e.contains=e.contains.concat(l)})),l=l.concat(r,a),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:l},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:l}]}]},t,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},r,a,{className:"quote",begin:"^>\\s+",contains:l,end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},n,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),Bt.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,n={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:{"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},illegal:"</",contains:[{className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+n.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:n,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),Bt.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],a={match:[/\./,bn(...yn,...wn)],className:{2:"keyword"}},o={match:gn(/\./,bn(...En)),relevance:0},i=En.filter((e=>"string"==typeof e)).concat(["_|0"]),l={variants:[{className:"keyword",match:bn(...En.filter((e=>"string"!=typeof e)).concat(xn).map(vn),...wn)}]},s={$pattern:bn(/\b\w+/,/#\w+/),keyword:i.concat(Tn),literal:kn},c=[a,o,l],d=[{match:gn(/\./,bn(..._n)),relevance:0},{className:"built_in",match:gn(/\b/,bn(..._n),/(?=\()/)}],u={match:/->/,relevance:0},m=[u,{className:"operator",relevance:0,variants:[{match:Bn},{match:`\\.(\\.|${Nn})+`}]}],h="([0-9]_*)+",p="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:`\\b(${h})(\\.(${h}))?([eE][+-]?(${h}))?\\b`},{match:`\\b0x(${p})(\\.(${p}))?([pP][+-]?(${h}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:gn(/\\/,e,/[0\\tnr"']/)},{match:gn(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),b=(e="")=>({className:"subst",match:gn(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),v=(e="")=>({className:"subst",label:"interpol",begin:gn(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:gn(e,/"""/),end:gn(/"""/,e),contains:[g(e),b(e),v(e)]}),w=(e="")=>({begin:gn(e,/"/),end:gn(/"/,e),contains:[g(e),v(e)]}),x={className:"string",variants:[y(),y("#"),y("##"),y("###"),w(),w("#"),w("##"),w("###")]},E=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],k={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:E},S=e=>{const t=gn(e,/\//),n=gn(/\//,e);return{begin:t,end:n,contains:[...E,{scope:"comment",begin:`#(?!.*${n})`,end:/$/}]}},T={scope:"regexp",variants:[S("###"),S("##"),S("#"),k]},_={match:gn(/`/,An,/`/)},C=[_,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${zn}+`}],N=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Rn,contains:[...m,f,x]}]}},{scope:"keyword",match:gn(/@/,bn(...In))},{scope:"meta",match:gn(/@/,An)}],B={match:fn(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,zn,"+")},{className:"type",match:On,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gn(/\s+&\s+/,fn(On)),relevance:0}]},M={begin:/</,end:/>/,keywords:s,contains:[...r,...c,...N,u,B]};B.contains.push(M);const z={begin:/\(/,end:/\)/,relevance:0,keywords:s,contains:["self",{match:gn(An,/\s*:/),keywords:"_|0",relevance:0},...r,T,...c,...d,...m,f,x,...C,...N,B]},A={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,B]},O={begin:/\(/,end:/\)/,keywords:s,contains:[{begin:bn(fn(gn(An,/\s*:/)),fn(gn(An,/\s+/,An,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:An}]},...r,...c,...m,f,x,...N,B,z],endsParent:!0,illegal:/["']/},I={match:[/(func|macro)/,/\s+/,bn(_.match,An,Bn)],className:{1:"keyword",3:"title.function"},contains:[A,O,t],illegal:[/\[/,/%/]},R={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[A,O,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,Bn],className:{1:"keyword",3:"title"}},D={begin:[/precedencegroup/,/\s+/,On],className:{1:"keyword",3:"title"},contains:[B],keywords:[...Sn,...kn],end:/}/};for(const $ of x.variants){const e=$.contains.find((e=>"interpol"===e.label));e.keywords=s;const t=[...c,...d,...m,f,x,...C];e.contains=[...t,{begin:/\(/,end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:s,contains:[...r,I,R,{beginKeywords:"struct protocol class extension enum actor",end:"\\{",excludeEnd:!0,keywords:s,contains:[e.inherit(e.TITLE_MODE,{className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...c]},L,D,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},T,...c,...d,...m,f,x,...C,...N,B,z]}})),Bt.registerLanguage("dart",(function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},n={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},r={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,n]}]};n.contains=[e.C_NUMBER_MODE,r];const a=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],o=a.map((e=>`${e}?`));return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:a.concat(o).concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[r,e.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),e.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}})),Bt.registerLanguage("nginx",(function(e){const t=e.regex,n={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},r={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},n]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:r.contains,keywords:{section:"upstream location"}},{className:"section",begin:t.concat(e.UNDERSCORE_IDENT_RE+t.lookahead(/\s+\{/)),relevance:0},{begin:t.lookahead(e.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:r}],relevance:0}],illegal:"[^\\s\\}\\{]"}})),Bt.registerLanguage("go",(function(e){const t={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:t,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{begin:e.C_NUMBER_RE+"[i]",relevance:1},e.C_NUMBER_MODE]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,illegal:/["']/}]}]}})),Bt.registerLanguage("http",(function(e){const t="HTTP/([32]|1\\.[01])",n={className:"attribute",begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},r=[n,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+t+" \\d{3})",end:/$/,contains:[{className:"meta",begin:t},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},{begin:"(?=^[A-Z]+ (.*?) "+t+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:t},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:r}},e.inherit(n,{relevance:0})]}})),Bt.registerLanguage("ruby",(function(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield","include","extend","prepend","public","private","protected","raise","throw"],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},i={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},s=[e.COMMENT("#","$",{contains:[i]}),e.COMMENT("^=begin","^=end",{contains:[i],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[e.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,c]})]}]},u="[0-9](_?[0-9])*",m={className:"number",relevance:0,variants:[{begin:`\\b([1-9](_?[0-9])*|0)(\\.(${u}))?([eE][+-]?(${u})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},h={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},p=[d,{variants:[{match:[/class\s+/,a,/\s+<\s+/,a]},{match:[/\b(class|module)\s+/,a]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,a],scope:{2:"title.class"},keywords:o},{relevance:0,match:[a,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[h]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},m,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,s),relevance:0}].concat(l,s);c.contains=p,h.contains=p;const f=[{begin:/^\s*=>/,starts:{end:"$",contains:p}},{className:"meta.prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])",starts:{end:"$",keywords:o,contains:p}}];return s.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(f).concat(s).concat(p)}})),Bt.registerLanguage("c",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},u=t.optional(a)+e.IDENT_RE+"\\s*\\(",m={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},h=[c,i,n,e.C_BLOCK_COMMENT_MODE,s,l],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:h.concat([{begin:/\(/,end:/\)/,keywords:m,contains:h.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:m,disableAutodetect:!0,illegal:"</",contains:[].concat(p,f,h,[c,{begin:e.IDENT_RE+"::",keywords:m},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:l,keywords:m}}})),Bt.registerLanguage("cpp",(function(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+t.optional(a)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",i={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},l={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},s={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(l,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},d={className:"title",begin:t.optional(a)+e.IDENT_RE,relevance:0},u=t.optional(a)+e.IDENT_RE+"\\s*\\(",m={type:["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],keyword:["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"]},h={className:"function.dispatch",relevance:0,keywords:{_hint:["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"]},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},p=[h,c,i,n,e.C_BLOCK_COMMENT_MODE,s,l],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:m,contains:p.concat([{begin:/\(/,end:/\)/,keywords:m,contains:p.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:m,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:m,relevance:0},{begin:u,returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[l,s]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:m,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,n,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,h,p,[c,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)",end:">",keywords:m,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:m},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),Bt.registerLanguage("csharp",(function(e){const t={keyword:["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]),built_in:["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],literal:["default","false","null","true"]},n=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),r={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},a={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},o=e.inherit(a,{illegal:/\n/}),i={className:"subst",begin:/\{/,end:/\}/,keywords:t},l=e.inherit(i,{illegal:/\n/}),s={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,l]},c={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},i]},d=e.inherit(c,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]});i.contains=[c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE],l.contains=[d,s,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},m={begin:"<",end:">",contains:[{beginKeywords:"in out"},n]},h=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",p={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},u,r,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},n,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[n,m,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+h+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:t,contains:[{beginKeywords:["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"].join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,m],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,r,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},p]}})),Bt.registerLanguage("sql",(function(e){const t=e.regex,n=e.COMMENT("--","$"),r=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],o=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],i=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],l=o,s=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!o.includes(e))),c={begin:t.concat(/\b/,t.either(...l),/\s*\(/),relevance:0,keywords:{built_in:l}};return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:function(e,{exceptions:t,when:n}={}){const r=n;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:r(e)?`${e}|0`:e))}(s,{when:e=>e.length<3}),literal:r,type:a,built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"]},contains:[{begin:t.either(...i),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:s.concat(i),literal:r,type:a}},{className:"type",begin:t.either("double precision","large object","with timezone","without timezone")},c,{className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},{className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),Bt.registerLanguage("shell",(function(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}})),Bt.registerLanguage("r",(function(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),a=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[a,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[o,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),Bt.registerLanguage("kotlin",(function(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,r]}]};r.contains.push(o);const i={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(o,{className:"string"}),"self"]}]},s=jn,c=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},u=d;return u.variants[1].contains=[d],d.variants[1].contains=[u],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,c,{className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},n,i,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,e.C_LINE_COMMENT_MODE,c],relevance:0},e.C_LINE_COMMENT_MODE,c,i,l,o,e.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},i,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},s]}})),Bt.registerLanguage("rust",(function(e){const t=e.regex,n={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},r="([ui](8|16|32|64|128|size)|f(32|64))?",a=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],o=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:o,keyword:["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","unsafe","unsized","use","virtual","where","while","yield"],literal:["true","false","Some","None","Ok","Err"],built_in:a},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{begin:"\\b0b([01_]+)"+r},{begin:"\\b0o([0-7_]+)"+r},{begin:"\\b0x([A-Fa-f0-9_]+)"+r},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+r}],relevance:0},{begin:[/fn/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,e.UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,e.UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:a,type:o}},{className:"punctuation",begin:"->"},n]}}));const Pn=[{label:"Plain Text",value:"plaintext"},{label:"JSON",value:"json"},{label:"JavaScript",value:"javascript"},{label:"Java",value:"java"},{label:"TypeScript",value:"typescript"},{label:"Python",value:"python"},{label:"PHP",value:"php"},{label:"CSS",value:"css"},{label:"Less",value:"less"},{label:"Scss",value:"scss"},{label:"HTML",value:"html"},{label:"Markdown",value:"markdown"},{label:"Objective-C",value:"objectivec"},{label:"Swift",value:"swift"},{label:"Dart",value:"dart"},{label:"Nginx",value:"nginx"},{label:"HTTP",value:"http"},{label:"Go",value:"go"},{label:"Ruby",value:"ruby"},{label:"C",value:"c"},{label:"C++",value:"cpp"},{label:"C#",value:"csharp"},{label:"SQL",value:"sql"},{label:"Shell",value:"shell"},{label:"R",value:"r"},{label:"Kotlin",value:"kotlin"},{label:"Rust",value:"rust"}];Bt.configure({cssSelector:"pre",classPrefix:"editify-hljs-",languages:Pn.map((e=>e.value)),ignoreUnescapedHTML:!0});class qn{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new qn(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class Fn{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new Fn(t,qn.range(this,e))}}class Hn{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n,r,a="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var i=o.lexer.input;n=o.start,r=o.end,n===i.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var l=i.slice(n,r).replace(/[^]/g,"$&̲");a+=(n>15?"…"+i.slice(n-15,n):i.slice(0,n))+l+(r+15<i.length?i.slice(r,r+15)+"…":i.slice(r))}var s=new Error(a);return s.name="ParseError",s.__proto__=Hn.prototype,s.position=n,null!=n&&null!=r&&(s.length=r-n),s.rawMessage=e,s}}Hn.prototype.__proto__=Error.prototype;var Vn=/([A-Z])/g,Un={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Wn=/[&><"']/g;var Kn=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},Gn={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(Wn,(e=>Un[e]))},hyphenate:function(e){return e.replace(Vn,"-$1").toLowerCase()},getBaseElem:Kn,isCharacterBox:function(e){var t=Kn(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},protocolFromUrl:function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"}},Zn={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=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function Xn(e){if(e.default)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if("string"!=typeof n)return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Yn{constructor(e){for(var t in 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=e||{},Zn)if(Zn.hasOwnProperty(t)){var n=Zn[t];this[t]=void 0!==e[t]?n.processor?n.processor(e[t]):e[t]:Xn(n)}}reportNonstrict(e,t,n){var r=this.strict;if("function"==typeof r&&(r=r(e,t,n)),r&&"ignore"!==r){if(!0===r||"error"===r)throw new Hn("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===r?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){var r=this.strict;if("function"==typeof r)try{r=r(e,t,n)}catch(a){r="error"}return!(!r||"ignore"===r)&&(!0===r||"error"===r||("warn"===r?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+r+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Gn.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var n="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(n)}}class Qn{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 Jn[er[this.id]]}sub(){return Jn[tr[this.id]]}fracNum(){return Jn[nr[this.id]]}fracDen(){return Jn[rr[this.id]]}cramp(){return Jn[ar[this.id]]}text(){return Jn[or[this.id]]}isTight(){return this.size>=2}}var Jn=[new Qn(0,0,!1),new Qn(1,0,!0),new Qn(2,1,!1),new Qn(3,1,!0),new Qn(4,2,!1),new Qn(5,2,!0),new Qn(6,3,!1),new Qn(7,3,!0)],er=[4,5,4,5,6,7,6,7],tr=[5,5,5,5,7,7,7,7],nr=[2,3,4,5,6,7,6,7],rr=[3,3,5,5,7,7,7,7],ar=[1,1,3,3,5,5,7,7],or=[0,1,2,3,2,3,2,3],ir={DISPLAY:Jn[0],TEXT:Jn[2],SCRIPT:Jn[4],SCRIPTSCRIPT:Jn[6]},lr=[{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]]}];var sr=[];function cr(e){for(var t=0;t<sr.length;t+=2)if(e>=sr[t]&&e<=sr[t+1])return!0;return!1}lr.forEach((e=>e.blocks.forEach((e=>sr.push(...e)))));var dr=80,ur={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class mr{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return Gn.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e="",t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map((e=>e.toText())).join("")}}var hr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},pr={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},fr={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function gr(e,t,n){if(!hr[t])throw new Error("Font metrics not found for font: "+t+".");var r=e.charCodeAt(0),a=hr[t][r];if(!a&&e[0]in fr&&(r=fr[e[0]].charCodeAt(0),a=hr[t][r]),a||"text"!==n||cr(r)&&(a=hr[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var br={};var vr=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],yr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],wr=function(e,t){return t.size<2?e:vr[e-1][t.size-1]};class xr{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||xr.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=yr[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new xr(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:wr(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:yr[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=wr(xr.BASESIZE,e);return this.size===t&&this.textSize===xr.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==xr.BASESIZE?["sizing","reset-size"+this.size,"size"+xr.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!br[t=e>=5?0:e>=3?1:2]){var n=br[t]={cssEmPerMu:pr.quad[t]/18};for(var r in pr)pr.hasOwnProperty(r)&&(n[r]=pr[r][t])}return br[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}xr.BASESIZE=6;var Er={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},kr={ex:!0,em:!0,mu:!0},Sr=function(e){return"string"!=typeof e&&(e=e.unit),e in Er||e in kr||"ex"===e},Tr=function(e,t){var n;if(e.unit in Er)n=Er[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var r;if(r=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)n=r.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Hn("Invalid unit: '"+e.unit+"'");n=r.fontMetrics().quad}r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},_r=function(e){return+e.toFixed(4)+"em"},Cr=function(e){return e.filter((e=>e)).join(" ")},Nr=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");var r=t.getColor();r&&(this.style.color=r)}},Br=function(e){var t=document.createElement(e);for(var n in t.className=Cr(this.classes),this.style)this.style.hasOwnProperty(n)&&(t.style[n]=this.style[n]);for(var r in this.attributes)this.attributes.hasOwnProperty(r)&&t.setAttribute(r,this.attributes[r]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},Mr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Gn.escape(Cr(this.classes))+'"');var n="";for(var r in this.style)this.style.hasOwnProperty(r)&&(n+=Gn.hyphenate(r)+":"+this.style[r]+";");for(var a in n&&(t+=' style="'+Gn.escape(n)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+Gn.escape(this.attributes[a])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class zr{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Nr.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Gn.contains(this.classes,e)}toNode(){return Br.call(this,"span")}toMarkup(){return Mr.call(this,"span")}}class Ar{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Nr.call(this,t,r),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Gn.contains(this.classes,e)}toNode(){return Br.call(this,"a")}toMarkup(){return Mr.call(this,"a")}}class Or{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return Gn.contains(this.classes,e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e='<img src="'+Gn.escape(this.src)+'" alt="'+Gn.escape(this.alt)+'"',t="";for(var n in this.style)this.style.hasOwnProperty(n)&&(t+=Gn.hyphenate(n)+":"+this.style[n]+";");return t&&(e+=' style="'+Gn.escape(t)+'"'),e+="'/>"}}var Ir={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class Rr{constructor(e,t,n,r,a,o,i,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=a||0,this.width=o||0,this.classes=i||[],this.style=l||{},this.maxFontSize=0;var s=function(e){for(var t=0;t<lr.length;t++)for(var n=lr[t],r=0;r<n.blocks.length;r++){var a=n.blocks[r];if(e>=a[0]&&e<=a[1])return n.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ir[this.text])}hasClass(e){return Gn.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var n in this.italic>0&&((t=document.createElement("span")).style.marginRight=_r(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=Cr(this.classes)),this.style)this.style.hasOwnProperty(n)&&((t=t||document.createElement("span")).style[n]=this.style[n]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Gn.escape(Cr(this.classes)),t+='"');var n="";for(var r in this.italic>0&&(n+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(r)&&(n+=Gn.hyphenate(r)+":"+this.style[r]+";");n&&(e=!0,t+=' style="'+Gn.escape(n)+'"');var a=Gn.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a}}class Lr{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Gn.escape(this.attributes[t])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>"}}class Dr{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",ur[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Gn.escape(this.alternate)+'"/>':'<path d="'+Gn.escape(ur[this.pathName])+'"/>'}}class $r{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="<line";for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+Gn.escape(this.attributes[t])+'"');return e+="/>"}}function jr(e){if(e instanceof Rr)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var Pr={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qr={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Fr={math:{},text:{}};function Hr(e,t,n,r,a,o){Fr[e][a]={font:t,group:n,replace:r},o&&r&&(Fr[e][r]=Fr[e][a])}var Vr="math",Ur="text",Wr="main",Kr="ams",Gr="accent-token",Zr="bin",Xr="close",Yr="inner",Qr="mathord",Jr="op-token",ea="open",ta="punct",na="rel",ra="spacing",aa="textord";Hr(Vr,Wr,na,"≡","\\equiv",!0),Hr(Vr,Wr,na,"≺","\\prec",!0),Hr(Vr,Wr,na,"≻","\\succ",!0),Hr(Vr,Wr,na,"∼","\\sim",!0),Hr(Vr,Wr,na,"⊥","\\perp"),Hr(Vr,Wr,na,"⪯","\\preceq",!0),Hr(Vr,Wr,na,"⪰","\\succeq",!0),Hr(Vr,Wr,na,"≃","\\simeq",!0),Hr(Vr,Wr,na,"∣","\\mid",!0),Hr(Vr,Wr,na,"≪","\\ll",!0),Hr(Vr,Wr,na,"≫","\\gg",!0),Hr(Vr,Wr,na,"≍","\\asymp",!0),Hr(Vr,Wr,na,"∥","\\parallel"),Hr(Vr,Wr,na,"⋈","\\bowtie",!0),Hr(Vr,Wr,na,"⌣","\\smile",!0),Hr(Vr,Wr,na,"⊑","\\sqsubseteq",!0),Hr(Vr,Wr,na,"⊒","\\sqsupseteq",!0),Hr(Vr,Wr,na,"≐","\\doteq",!0),Hr(Vr,Wr,na,"⌢","\\frown",!0),Hr(Vr,Wr,na,"∋","\\ni",!0),Hr(Vr,Wr,na,"∝","\\propto",!0),Hr(Vr,Wr,na,"⊢","\\vdash",!0),Hr(Vr,Wr,na,"⊣","\\dashv",!0),Hr(Vr,Wr,na,"∋","\\owns"),Hr(Vr,Wr,ta,".","\\ldotp"),Hr(Vr,Wr,ta,"⋅","\\cdotp"),Hr(Vr,Wr,aa,"#","\\#"),Hr(Ur,Wr,aa,"#","\\#"),Hr(Vr,Wr,aa,"&","\\&"),Hr(Ur,Wr,aa,"&","\\&"),Hr(Vr,Wr,aa,"ℵ","\\aleph",!0),Hr(Vr,Wr,aa,"∀","\\forall",!0),Hr(Vr,Wr,aa,"ℏ","\\hbar",!0),Hr(Vr,Wr,aa,"∃","\\exists",!0),Hr(Vr,Wr,aa,"∇","\\nabla",!0),Hr(Vr,Wr,aa,"♭","\\flat",!0),Hr(Vr,Wr,aa,"ℓ","\\ell",!0),Hr(Vr,Wr,aa,"♮","\\natural",!0),Hr(Vr,Wr,aa,"♣","\\clubsuit",!0),Hr(Vr,Wr,aa,"℘","\\wp",!0),Hr(Vr,Wr,aa,"♯","\\sharp",!0),Hr(Vr,Wr,aa,"♢","\\diamondsuit",!0),Hr(Vr,Wr,aa,"ℜ","\\Re",!0),Hr(Vr,Wr,aa,"♡","\\heartsuit",!0),Hr(Vr,Wr,aa,"ℑ","\\Im",!0),Hr(Vr,Wr,aa,"♠","\\spadesuit",!0),Hr(Vr,Wr,aa,"§","\\S",!0),Hr(Ur,Wr,aa,"§","\\S"),Hr(Vr,Wr,aa,"¶","\\P",!0),Hr(Ur,Wr,aa,"¶","\\P"),Hr(Vr,Wr,aa,"†","\\dag"),Hr(Ur,Wr,aa,"†","\\dag"),Hr(Ur,Wr,aa,"†","\\textdagger"),Hr(Vr,Wr,aa,"‡","\\ddag"),Hr(Ur,Wr,aa,"‡","\\ddag"),Hr(Ur,Wr,aa,"‡","\\textdaggerdbl"),Hr(Vr,Wr,Xr,"⎱","\\rmoustache",!0),Hr(Vr,Wr,ea,"⎰","\\lmoustache",!0),Hr(Vr,Wr,Xr,"⟯","\\rgroup",!0),Hr(Vr,Wr,ea,"⟮","\\lgroup",!0),Hr(Vr,Wr,Zr,"∓","\\mp",!0),Hr(Vr,Wr,Zr,"⊖","\\ominus",!0),Hr(Vr,Wr,Zr,"⊎","\\uplus",!0),Hr(Vr,Wr,Zr,"⊓","\\sqcap",!0),Hr(Vr,Wr,Zr,"∗","\\ast"),Hr(Vr,Wr,Zr,"⊔","\\sqcup",!0),Hr(Vr,Wr,Zr,"◯","\\bigcirc",!0),Hr(Vr,Wr,Zr,"∙","\\bullet",!0),Hr(Vr,Wr,Zr,"‡","\\ddagger"),Hr(Vr,Wr,Zr,"≀","\\wr",!0),Hr(Vr,Wr,Zr,"⨿","\\amalg"),Hr(Vr,Wr,Zr,"&","\\And"),Hr(Vr,Wr,na,"⟵","\\longleftarrow",!0),Hr(Vr,Wr,na,"⇐","\\Leftarrow",!0),Hr(Vr,Wr,na,"⟸","\\Longleftarrow",!0),Hr(Vr,Wr,na,"⟶","\\longrightarrow",!0),Hr(Vr,Wr,na,"⇒","\\Rightarrow",!0),Hr(Vr,Wr,na,"⟹","\\Longrightarrow",!0),Hr(Vr,Wr,na,"↔","\\leftrightarrow",!0),Hr(Vr,Wr,na,"⟷","\\longleftrightarrow",!0),Hr(Vr,Wr,na,"⇔","\\Leftrightarrow",!0),Hr(Vr,Wr,na,"⟺","\\Longleftrightarrow",!0),Hr(Vr,Wr,na,"↦","\\mapsto",!0),Hr(Vr,Wr,na,"⟼","\\longmapsto",!0),Hr(Vr,Wr,na,"↗","\\nearrow",!0),Hr(Vr,Wr,na,"↩","\\hookleftarrow",!0),Hr(Vr,Wr,na,"↪","\\hookrightarrow",!0),Hr(Vr,Wr,na,"↘","\\searrow",!0),Hr(Vr,Wr,na,"↼","\\leftharpoonup",!0),Hr(Vr,Wr,na,"⇀","\\rightharpoonup",!0),Hr(Vr,Wr,na,"↙","\\swarrow",!0),Hr(Vr,Wr,na,"↽","\\leftharpoondown",!0),Hr(Vr,Wr,na,"⇁","\\rightharpoondown",!0),Hr(Vr,Wr,na,"↖","\\nwarrow",!0),Hr(Vr,Wr,na,"⇌","\\rightleftharpoons",!0),Hr(Vr,Kr,na,"≮","\\nless",!0),Hr(Vr,Kr,na,"","\\@nleqslant"),Hr(Vr,Kr,na,"","\\@nleqq"),Hr(Vr,Kr,na,"⪇","\\lneq",!0),Hr(Vr,Kr,na,"≨","\\lneqq",!0),Hr(Vr,Kr,na,"","\\@lvertneqq"),Hr(Vr,Kr,na,"⋦","\\lnsim",!0),Hr(Vr,Kr,na,"⪉","\\lnapprox",!0),Hr(Vr,Kr,na,"⊀","\\nprec",!0),Hr(Vr,Kr,na,"⋠","\\npreceq",!0),Hr(Vr,Kr,na,"⋨","\\precnsim",!0),Hr(Vr,Kr,na,"⪹","\\precnapprox",!0),Hr(Vr,Kr,na,"≁","\\nsim",!0),Hr(Vr,Kr,na,"","\\@nshortmid"),Hr(Vr,Kr,na,"∤","\\nmid",!0),Hr(Vr,Kr,na,"⊬","\\nvdash",!0),Hr(Vr,Kr,na,"⊭","\\nvDash",!0),Hr(Vr,Kr,na,"⋪","\\ntriangleleft"),Hr(Vr,Kr,na,"⋬","\\ntrianglelefteq",!0),Hr(Vr,Kr,na,"⊊","\\subsetneq",!0),Hr(Vr,Kr,na,"","\\@varsubsetneq"),Hr(Vr,Kr,na,"⫋","\\subsetneqq",!0),Hr(Vr,Kr,na,"","\\@varsubsetneqq"),Hr(Vr,Kr,na,"≯","\\ngtr",!0),Hr(Vr,Kr,na,"","\\@ngeqslant"),Hr(Vr,Kr,na,"","\\@ngeqq"),Hr(Vr,Kr,na,"⪈","\\gneq",!0),Hr(Vr,Kr,na,"≩","\\gneqq",!0),Hr(Vr,Kr,na,"","\\@gvertneqq"),Hr(Vr,Kr,na,"⋧","\\gnsim",!0),Hr(Vr,Kr,na,"⪊","\\gnapprox",!0),Hr(Vr,Kr,na,"⊁","\\nsucc",!0),Hr(Vr,Kr,na,"⋡","\\nsucceq",!0),Hr(Vr,Kr,na,"⋩","\\succnsim",!0),Hr(Vr,Kr,na,"⪺","\\succnapprox",!0),Hr(Vr,Kr,na,"≆","\\ncong",!0),Hr(Vr,Kr,na,"","\\@nshortparallel"),Hr(Vr,Kr,na,"∦","\\nparallel",!0),Hr(Vr,Kr,na,"⊯","\\nVDash",!0),Hr(Vr,Kr,na,"⋫","\\ntriangleright"),Hr(Vr,Kr,na,"⋭","\\ntrianglerighteq",!0),Hr(Vr,Kr,na,"","\\@nsupseteqq"),Hr(Vr,Kr,na,"⊋","\\supsetneq",!0),Hr(Vr,Kr,na,"","\\@varsupsetneq"),Hr(Vr,Kr,na,"⫌","\\supsetneqq",!0),Hr(Vr,Kr,na,"","\\@varsupsetneqq"),Hr(Vr,Kr,na,"⊮","\\nVdash",!0),Hr(Vr,Kr,na,"⪵","\\precneqq",!0),Hr(Vr,Kr,na,"⪶","\\succneqq",!0),Hr(Vr,Kr,na,"","\\@nsubseteqq"),Hr(Vr,Kr,Zr,"⊴","\\unlhd"),Hr(Vr,Kr,Zr,"⊵","\\unrhd"),Hr(Vr,Kr,na,"↚","\\nleftarrow",!0),Hr(Vr,Kr,na,"↛","\\nrightarrow",!0),Hr(Vr,Kr,na,"⇍","\\nLeftarrow",!0),Hr(Vr,Kr,na,"⇏","\\nRightarrow",!0),Hr(Vr,Kr,na,"↮","\\nleftrightarrow",!0),Hr(Vr,Kr,na,"⇎","\\nLeftrightarrow",!0),Hr(Vr,Kr,na,"△","\\vartriangle"),Hr(Vr,Kr,aa,"ℏ","\\hslash"),Hr(Vr,Kr,aa,"▽","\\triangledown"),Hr(Vr,Kr,aa,"◊","\\lozenge"),Hr(Vr,Kr,aa,"Ⓢ","\\circledS"),Hr(Vr,Kr,aa,"®","\\circledR"),Hr(Ur,Kr,aa,"®","\\circledR"),Hr(Vr,Kr,aa,"∡","\\measuredangle",!0),Hr(Vr,Kr,aa,"∄","\\nexists"),Hr(Vr,Kr,aa,"℧","\\mho"),Hr(Vr,Kr,aa,"Ⅎ","\\Finv",!0),Hr(Vr,Kr,aa,"⅁","\\Game",!0),Hr(Vr,Kr,aa,"‵","\\backprime"),Hr(Vr,Kr,aa,"▲","\\blacktriangle"),Hr(Vr,Kr,aa,"▼","\\blacktriangledown"),Hr(Vr,Kr,aa,"■","\\blacksquare"),Hr(Vr,Kr,aa,"⧫","\\blacklozenge"),Hr(Vr,Kr,aa,"★","\\bigstar"),Hr(Vr,Kr,aa,"∢","\\sphericalangle",!0),Hr(Vr,Kr,aa,"∁","\\complement",!0),Hr(Vr,Kr,aa,"ð","\\eth",!0),Hr(Ur,Wr,aa,"ð","ð"),Hr(Vr,Kr,aa,"╱","\\diagup"),Hr(Vr,Kr,aa,"╲","\\diagdown"),Hr(Vr,Kr,aa,"□","\\square"),Hr(Vr,Kr,aa,"□","\\Box"),Hr(Vr,Kr,aa,"◊","\\Diamond"),Hr(Vr,Kr,aa,"¥","\\yen",!0),Hr(Ur,Kr,aa,"¥","\\yen",!0),Hr(Vr,Kr,aa,"✓","\\checkmark",!0),Hr(Ur,Kr,aa,"✓","\\checkmark"),Hr(Vr,Kr,aa,"ℶ","\\beth",!0),Hr(Vr,Kr,aa,"ℸ","\\daleth",!0),Hr(Vr,Kr,aa,"ℷ","\\gimel",!0),Hr(Vr,Kr,aa,"ϝ","\\digamma",!0),Hr(Vr,Kr,aa,"ϰ","\\varkappa"),Hr(Vr,Kr,ea,"┌","\\@ulcorner",!0),Hr(Vr,Kr,Xr,"┐","\\@urcorner",!0),Hr(Vr,Kr,ea,"└","\\@llcorner",!0),Hr(Vr,Kr,Xr,"┘","\\@lrcorner",!0),Hr(Vr,Kr,na,"≦","\\leqq",!0),Hr(Vr,Kr,na,"⩽","\\leqslant",!0),Hr(Vr,Kr,na,"⪕","\\eqslantless",!0),Hr(Vr,Kr,na,"≲","\\lesssim",!0),Hr(Vr,Kr,na,"⪅","\\lessapprox",!0),Hr(Vr,Kr,na,"≊","\\approxeq",!0),Hr(Vr,Kr,Zr,"⋖","\\lessdot"),Hr(Vr,Kr,na,"⋘","\\lll",!0),Hr(Vr,Kr,na,"≶","\\lessgtr",!0),Hr(Vr,Kr,na,"⋚","\\lesseqgtr",!0),Hr(Vr,Kr,na,"⪋","\\lesseqqgtr",!0),Hr(Vr,Kr,na,"≑","\\doteqdot"),Hr(Vr,Kr,na,"≓","\\risingdotseq",!0),Hr(Vr,Kr,na,"≒","\\fallingdotseq",!0),Hr(Vr,Kr,na,"∽","\\backsim",!0),Hr(Vr,Kr,na,"⋍","\\backsimeq",!0),Hr(Vr,Kr,na,"⫅","\\subseteqq",!0),Hr(Vr,Kr,na,"⋐","\\Subset",!0),Hr(Vr,Kr,na,"⊏","\\sqsubset",!0),Hr(Vr,Kr,na,"≼","\\preccurlyeq",!0),Hr(Vr,Kr,na,"⋞","\\curlyeqprec",!0),Hr(Vr,Kr,na,"≾","\\precsim",!0),Hr(Vr,Kr,na,"⪷","\\precapprox",!0),Hr(Vr,Kr,na,"⊲","\\vartriangleleft"),Hr(Vr,Kr,na,"⊴","\\trianglelefteq"),Hr(Vr,Kr,na,"⊨","\\vDash",!0),Hr(Vr,Kr,na,"⊪","\\Vvdash",!0),Hr(Vr,Kr,na,"⌣","\\smallsmile"),Hr(Vr,Kr,na,"⌢","\\smallfrown"),Hr(Vr,Kr,na,"≏","\\bumpeq",!0),Hr(Vr,Kr,na,"≎","\\Bumpeq",!0),Hr(Vr,Kr,na,"≧","\\geqq",!0),Hr(Vr,Kr,na,"⩾","\\geqslant",!0),Hr(Vr,Kr,na,"⪖","\\eqslantgtr",!0),Hr(Vr,Kr,na,"≳","\\gtrsim",!0),Hr(Vr,Kr,na,"⪆","\\gtrapprox",!0),Hr(Vr,Kr,Zr,"⋗","\\gtrdot"),Hr(Vr,Kr,na,"⋙","\\ggg",!0),Hr(Vr,Kr,na,"≷","\\gtrless",!0),Hr(Vr,Kr,na,"⋛","\\gtreqless",!0),Hr(Vr,Kr,na,"⪌","\\gtreqqless",!0),Hr(Vr,Kr,na,"≖","\\eqcirc",!0),Hr(Vr,Kr,na,"≗","\\circeq",!0),Hr(Vr,Kr,na,"≜","\\triangleq",!0),Hr(Vr,Kr,na,"∼","\\thicksim"),Hr(Vr,Kr,na,"≈","\\thickapprox"),Hr(Vr,Kr,na,"⫆","\\supseteqq",!0),Hr(Vr,Kr,na,"⋑","\\Supset",!0),Hr(Vr,Kr,na,"⊐","\\sqsupset",!0),Hr(Vr,Kr,na,"≽","\\succcurlyeq",!0),Hr(Vr,Kr,na,"⋟","\\curlyeqsucc",!0),Hr(Vr,Kr,na,"≿","\\succsim",!0),Hr(Vr,Kr,na,"⪸","\\succapprox",!0),Hr(Vr,Kr,na,"⊳","\\vartriangleright"),Hr(Vr,Kr,na,"⊵","\\trianglerighteq"),Hr(Vr,Kr,na,"⊩","\\Vdash",!0),Hr(Vr,Kr,na,"∣","\\shortmid"),Hr(Vr,Kr,na,"∥","\\shortparallel"),Hr(Vr,Kr,na,"≬","\\between",!0),Hr(Vr,Kr,na,"⋔","\\pitchfork",!0),Hr(Vr,Kr,na,"∝","\\varpropto"),Hr(Vr,Kr,na,"◀","\\blacktriangleleft"),Hr(Vr,Kr,na,"∴","\\therefore",!0),Hr(Vr,Kr,na,"∍","\\backepsilon"),Hr(Vr,Kr,na,"▶","\\blacktriangleright"),Hr(Vr,Kr,na,"∵","\\because",!0),Hr(Vr,Kr,na,"⋘","\\llless"),Hr(Vr,Kr,na,"⋙","\\gggtr"),Hr(Vr,Kr,Zr,"⊲","\\lhd"),Hr(Vr,Kr,Zr,"⊳","\\rhd"),Hr(Vr,Kr,na,"≂","\\eqsim",!0),Hr(Vr,Wr,na,"⋈","\\Join"),Hr(Vr,Kr,na,"≑","\\Doteq",!0),Hr(Vr,Kr,Zr,"∔","\\dotplus",!0),Hr(Vr,Kr,Zr,"∖","\\smallsetminus"),Hr(Vr,Kr,Zr,"⋒","\\Cap",!0),Hr(Vr,Kr,Zr,"⋓","\\Cup",!0),Hr(Vr,Kr,Zr,"⩞","\\doublebarwedge",!0),Hr(Vr,Kr,Zr,"⊟","\\boxminus",!0),Hr(Vr,Kr,Zr,"⊞","\\boxplus",!0),Hr(Vr,Kr,Zr,"⋇","\\divideontimes",!0),Hr(Vr,Kr,Zr,"⋉","\\ltimes",!0),Hr(Vr,Kr,Zr,"⋊","\\rtimes",!0),Hr(Vr,Kr,Zr,"⋋","\\leftthreetimes",!0),Hr(Vr,Kr,Zr,"⋌","\\rightthreetimes",!0),Hr(Vr,Kr,Zr,"⋏","\\curlywedge",!0),Hr(Vr,Kr,Zr,"⋎","\\curlyvee",!0),Hr(Vr,Kr,Zr,"⊝","\\circleddash",!0),Hr(Vr,Kr,Zr,"⊛","\\circledast",!0),Hr(Vr,Kr,Zr,"⋅","\\centerdot"),Hr(Vr,Kr,Zr,"⊺","\\intercal",!0),Hr(Vr,Kr,Zr,"⋒","\\doublecap"),Hr(Vr,Kr,Zr,"⋓","\\doublecup"),Hr(Vr,Kr,Zr,"⊠","\\boxtimes",!0),Hr(Vr,Kr,na,"⇢","\\dashrightarrow",!0),Hr(Vr,Kr,na,"⇠","\\dashleftarrow",!0),Hr(Vr,Kr,na,"⇇","\\leftleftarrows",!0),Hr(Vr,Kr,na,"⇆","\\leftrightarrows",!0),Hr(Vr,Kr,na,"⇚","\\Lleftarrow",!0),Hr(Vr,Kr,na,"↞","\\twoheadleftarrow",!0),Hr(Vr,Kr,na,"↢","\\leftarrowtail",!0),Hr(Vr,Kr,na,"↫","\\looparrowleft",!0),Hr(Vr,Kr,na,"⇋","\\leftrightharpoons",!0),Hr(Vr,Kr,na,"↶","\\curvearrowleft",!0),Hr(Vr,Kr,na,"↺","\\circlearrowleft",!0),Hr(Vr,Kr,na,"↰","\\Lsh",!0),Hr(Vr,Kr,na,"⇈","\\upuparrows",!0),Hr(Vr,Kr,na,"↿","\\upharpoonleft",!0),Hr(Vr,Kr,na,"⇃","\\downharpoonleft",!0),Hr(Vr,Wr,na,"⊶","\\origof",!0),Hr(Vr,Wr,na,"⊷","\\imageof",!0),Hr(Vr,Kr,na,"⊸","\\multimap",!0),Hr(Vr,Kr,na,"↭","\\leftrightsquigarrow",!0),Hr(Vr,Kr,na,"⇉","\\rightrightarrows",!0),Hr(Vr,Kr,na,"⇄","\\rightleftarrows",!0),Hr(Vr,Kr,na,"↠","\\twoheadrightarrow",!0),Hr(Vr,Kr,na,"↣","\\rightarrowtail",!0),Hr(Vr,Kr,na,"↬","\\looparrowright",!0),Hr(Vr,Kr,na,"↷","\\curvearrowright",!0),Hr(Vr,Kr,na,"↻","\\circlearrowright",!0),Hr(Vr,Kr,na,"↱","\\Rsh",!0),Hr(Vr,Kr,na,"⇊","\\downdownarrows",!0),Hr(Vr,Kr,na,"↾","\\upharpoonright",!0),Hr(Vr,Kr,na,"⇂","\\downharpoonright",!0),Hr(Vr,Kr,na,"⇝","\\rightsquigarrow",!0),Hr(Vr,Kr,na,"⇝","\\leadsto"),Hr(Vr,Kr,na,"⇛","\\Rrightarrow",!0),Hr(Vr,Kr,na,"↾","\\restriction"),Hr(Vr,Wr,aa,"‘","`"),Hr(Vr,Wr,aa,"$","\\$"),Hr(Ur,Wr,aa,"$","\\$"),Hr(Ur,Wr,aa,"$","\\textdollar"),Hr(Vr,Wr,aa,"%","\\%"),Hr(Ur,Wr,aa,"%","\\%"),Hr(Vr,Wr,aa,"_","\\_"),Hr(Ur,Wr,aa,"_","\\_"),Hr(Ur,Wr,aa,"_","\\textunderscore"),Hr(Vr,Wr,aa,"∠","\\angle",!0),Hr(Vr,Wr,aa,"∞","\\infty",!0),Hr(Vr,Wr,aa,"′","\\prime"),Hr(Vr,Wr,aa,"△","\\triangle"),Hr(Vr,Wr,aa,"Γ","\\Gamma",!0),Hr(Vr,Wr,aa,"Δ","\\Delta",!0),Hr(Vr,Wr,aa,"Θ","\\Theta",!0),Hr(Vr,Wr,aa,"Λ","\\Lambda",!0),Hr(Vr,Wr,aa,"Ξ","\\Xi",!0),Hr(Vr,Wr,aa,"Π","\\Pi",!0),Hr(Vr,Wr,aa,"Σ","\\Sigma",!0),Hr(Vr,Wr,aa,"Υ","\\Upsilon",!0),Hr(Vr,Wr,aa,"Φ","\\Phi",!0),Hr(Vr,Wr,aa,"Ψ","\\Psi",!0),Hr(Vr,Wr,aa,"Ω","\\Omega",!0),Hr(Vr,Wr,aa,"A","Α"),Hr(Vr,Wr,aa,"B","Β"),Hr(Vr,Wr,aa,"E","Ε"),Hr(Vr,Wr,aa,"Z","Ζ"),Hr(Vr,Wr,aa,"H","Η"),Hr(Vr,Wr,aa,"I","Ι"),Hr(Vr,Wr,aa,"K","Κ"),Hr(Vr,Wr,aa,"M","Μ"),Hr(Vr,Wr,aa,"N","Ν"),Hr(Vr,Wr,aa,"O","Ο"),Hr(Vr,Wr,aa,"P","Ρ"),Hr(Vr,Wr,aa,"T","Τ"),Hr(Vr,Wr,aa,"X","Χ"),Hr(Vr,Wr,aa,"¬","\\neg",!0),Hr(Vr,Wr,aa,"¬","\\lnot"),Hr(Vr,Wr,aa,"⊤","\\top"),Hr(Vr,Wr,aa,"⊥","\\bot"),Hr(Vr,Wr,aa,"∅","\\emptyset"),Hr(Vr,Kr,aa,"∅","\\varnothing"),Hr(Vr,Wr,Qr,"α","\\alpha",!0),Hr(Vr,Wr,Qr,"β","\\beta",!0),Hr(Vr,Wr,Qr,"γ","\\gamma",!0),Hr(Vr,Wr,Qr,"δ","\\delta",!0),Hr(Vr,Wr,Qr,"ϵ","\\epsilon",!0),Hr(Vr,Wr,Qr,"ζ","\\zeta",!0),Hr(Vr,Wr,Qr,"η","\\eta",!0),Hr(Vr,Wr,Qr,"θ","\\theta",!0),Hr(Vr,Wr,Qr,"ι","\\iota",!0),Hr(Vr,Wr,Qr,"κ","\\kappa",!0),Hr(Vr,Wr,Qr,"λ","\\lambda",!0),Hr(Vr,Wr,Qr,"μ","\\mu",!0),Hr(Vr,Wr,Qr,"ν","\\nu",!0),Hr(Vr,Wr,Qr,"ξ","\\xi",!0),Hr(Vr,Wr,Qr,"ο","\\omicron",!0),Hr(Vr,Wr,Qr,"π","\\pi",!0),Hr(Vr,Wr,Qr,"ρ","\\rho",!0),Hr(Vr,Wr,Qr,"σ","\\sigma",!0),Hr(Vr,Wr,Qr,"τ","\\tau",!0),Hr(Vr,Wr,Qr,"υ","\\upsilon",!0),Hr(Vr,Wr,Qr,"ϕ","\\phi",!0),Hr(Vr,Wr,Qr,"χ","\\chi",!0),Hr(Vr,Wr,Qr,"ψ","\\psi",!0),Hr(Vr,Wr,Qr,"ω","\\omega",!0),Hr(Vr,Wr,Qr,"ε","\\varepsilon",!0),Hr(Vr,Wr,Qr,"ϑ","\\vartheta",!0),Hr(Vr,Wr,Qr,"ϖ","\\varpi",!0),Hr(Vr,Wr,Qr,"ϱ","\\varrho",!0),Hr(Vr,Wr,Qr,"ς","\\varsigma",!0),Hr(Vr,Wr,Qr,"φ","\\varphi",!0),Hr(Vr,Wr,Zr,"∗","*",!0),Hr(Vr,Wr,Zr,"+","+"),Hr(Vr,Wr,Zr,"−","-",!0),Hr(Vr,Wr,Zr,"⋅","\\cdot",!0),Hr(Vr,Wr,Zr,"∘","\\circ",!0),Hr(Vr,Wr,Zr,"÷","\\div",!0),Hr(Vr,Wr,Zr,"±","\\pm",!0),Hr(Vr,Wr,Zr,"×","\\times",!0),Hr(Vr,Wr,Zr,"∩","\\cap",!0),Hr(Vr,Wr,Zr,"∪","\\cup",!0),Hr(Vr,Wr,Zr,"∖","\\setminus",!0),Hr(Vr,Wr,Zr,"∧","\\land"),Hr(Vr,Wr,Zr,"∨","\\lor"),Hr(Vr,Wr,Zr,"∧","\\wedge",!0),Hr(Vr,Wr,Zr,"∨","\\vee",!0),Hr(Vr,Wr,aa,"√","\\surd"),Hr(Vr,Wr,ea,"⟨","\\langle",!0),Hr(Vr,Wr,ea,"∣","\\lvert"),Hr(Vr,Wr,ea,"∥","\\lVert"),Hr(Vr,Wr,Xr,"?","?"),Hr(Vr,Wr,Xr,"!","!"),Hr(Vr,Wr,Xr,"⟩","\\rangle",!0),Hr(Vr,Wr,Xr,"∣","\\rvert"),Hr(Vr,Wr,Xr,"∥","\\rVert"),Hr(Vr,Wr,na,"=","="),Hr(Vr,Wr,na,":",":"),Hr(Vr,Wr,na,"≈","\\approx",!0),Hr(Vr,Wr,na,"≅","\\cong",!0),Hr(Vr,Wr,na,"≥","\\ge"),Hr(Vr,Wr,na,"≥","\\geq",!0),Hr(Vr,Wr,na,"←","\\gets"),Hr(Vr,Wr,na,">","\\gt",!0),Hr(Vr,Wr,na,"∈","\\in",!0),Hr(Vr,Wr,na,"","\\@not"),Hr(Vr,Wr,na,"⊂","\\subset",!0),Hr(Vr,Wr,na,"⊃","\\supset",!0),Hr(Vr,Wr,na,"⊆","\\subseteq",!0),Hr(Vr,Wr,na,"⊇","\\supseteq",!0),Hr(Vr,Kr,na,"⊈","\\nsubseteq",!0),Hr(Vr,Kr,na,"⊉","\\nsupseteq",!0),Hr(Vr,Wr,na,"⊨","\\models"),Hr(Vr,Wr,na,"←","\\leftarrow",!0),Hr(Vr,Wr,na,"≤","\\le"),Hr(Vr,Wr,na,"≤","\\leq",!0),Hr(Vr,Wr,na,"<","\\lt",!0),Hr(Vr,Wr,na,"→","\\rightarrow",!0),Hr(Vr,Wr,na,"→","\\to"),Hr(Vr,Kr,na,"≱","\\ngeq",!0),Hr(Vr,Kr,na,"≰","\\nleq",!0),Hr(Vr,Wr,ra," ","\\ "),Hr(Vr,Wr,ra," ","\\space"),Hr(Vr,Wr,ra," ","\\nobreakspace"),Hr(Ur,Wr,ra," ","\\ "),Hr(Ur,Wr,ra," "," "),Hr(Ur,Wr,ra," ","\\space"),Hr(Ur,Wr,ra," ","\\nobreakspace"),Hr(Vr,Wr,ra,null,"\\nobreak"),Hr(Vr,Wr,ra,null,"\\allowbreak"),Hr(Vr,Wr,ta,",",","),Hr(Vr,Wr,ta,";",";"),Hr(Vr,Kr,Zr,"⊼","\\barwedge",!0),Hr(Vr,Kr,Zr,"⊻","\\veebar",!0),Hr(Vr,Wr,Zr,"⊙","\\odot",!0),Hr(Vr,Wr,Zr,"⊕","\\oplus",!0),Hr(Vr,Wr,Zr,"⊗","\\otimes",!0),Hr(Vr,Wr,aa,"∂","\\partial",!0),Hr(Vr,Wr,Zr,"⊘","\\oslash",!0),Hr(Vr,Kr,Zr,"⊚","\\circledcirc",!0),Hr(Vr,Kr,Zr,"⊡","\\boxdot",!0),Hr(Vr,Wr,Zr,"△","\\bigtriangleup"),Hr(Vr,Wr,Zr,"▽","\\bigtriangledown"),Hr(Vr,Wr,Zr,"†","\\dagger"),Hr(Vr,Wr,Zr,"⋄","\\diamond"),Hr(Vr,Wr,Zr,"⋆","\\star"),Hr(Vr,Wr,Zr,"◃","\\triangleleft"),Hr(Vr,Wr,Zr,"▹","\\triangleright"),Hr(Vr,Wr,ea,"{","\\{"),Hr(Ur,Wr,aa,"{","\\{"),Hr(Ur,Wr,aa,"{","\\textbraceleft"),Hr(Vr,Wr,Xr,"}","\\}"),Hr(Ur,Wr,aa,"}","\\}"),Hr(Ur,Wr,aa,"}","\\textbraceright"),Hr(Vr,Wr,ea,"{","\\lbrace"),Hr(Vr,Wr,Xr,"}","\\rbrace"),Hr(Vr,Wr,ea,"[","\\lbrack",!0),Hr(Ur,Wr,aa,"[","\\lbrack",!0),Hr(Vr,Wr,Xr,"]","\\rbrack",!0),Hr(Ur,Wr,aa,"]","\\rbrack",!0),Hr(Vr,Wr,ea,"(","\\lparen",!0),Hr(Vr,Wr,Xr,")","\\rparen",!0),Hr(Ur,Wr,aa,"<","\\textless",!0),Hr(Ur,Wr,aa,">","\\textgreater",!0),Hr(Vr,Wr,ea,"⌊","\\lfloor",!0),Hr(Vr,Wr,Xr,"⌋","\\rfloor",!0),Hr(Vr,Wr,ea,"⌈","\\lceil",!0),Hr(Vr,Wr,Xr,"⌉","\\rceil",!0),Hr(Vr,Wr,aa,"\\","\\backslash"),Hr(Vr,Wr,aa,"∣","|"),Hr(Vr,Wr,aa,"∣","\\vert"),Hr(Ur,Wr,aa,"|","\\textbar",!0),Hr(Vr,Wr,aa,"∥","\\|"),Hr(Vr,Wr,aa,"∥","\\Vert"),Hr(Ur,Wr,aa,"∥","\\textbardbl"),Hr(Ur,Wr,aa,"~","\\textasciitilde"),Hr(Ur,Wr,aa,"\\","\\textbackslash"),Hr(Ur,Wr,aa,"^","\\textasciicircum"),Hr(Vr,Wr,na,"↑","\\uparrow",!0),Hr(Vr,Wr,na,"⇑","\\Uparrow",!0),Hr(Vr,Wr,na,"↓","\\downarrow",!0),Hr(Vr,Wr,na,"⇓","\\Downarrow",!0),Hr(Vr,Wr,na,"↕","\\updownarrow",!0),Hr(Vr,Wr,na,"⇕","\\Updownarrow",!0),Hr(Vr,Wr,Jr,"∐","\\coprod"),Hr(Vr,Wr,Jr,"⋁","\\bigvee"),Hr(Vr,Wr,Jr,"⋀","\\bigwedge"),Hr(Vr,Wr,Jr,"⨄","\\biguplus"),Hr(Vr,Wr,Jr,"⋂","\\bigcap"),Hr(Vr,Wr,Jr,"⋃","\\bigcup"),Hr(Vr,Wr,Jr,"∫","\\int"),Hr(Vr,Wr,Jr,"∫","\\intop"),Hr(Vr,Wr,Jr,"∬","\\iint"),Hr(Vr,Wr,Jr,"∭","\\iiint"),Hr(Vr,Wr,Jr,"∏","\\prod"),Hr(Vr,Wr,Jr,"∑","\\sum"),Hr(Vr,Wr,Jr,"⨂","\\bigotimes"),Hr(Vr,Wr,Jr,"⨁","\\bigoplus"),Hr(Vr,Wr,Jr,"⨀","\\bigodot"),Hr(Vr,Wr,Jr,"∮","\\oint"),Hr(Vr,Wr,Jr,"∯","\\oiint"),Hr(Vr,Wr,Jr,"∰","\\oiiint"),Hr(Vr,Wr,Jr,"⨆","\\bigsqcup"),Hr(Vr,Wr,Jr,"∫","\\smallint"),Hr(Ur,Wr,Yr,"…","\\textellipsis"),Hr(Vr,Wr,Yr,"…","\\mathellipsis"),Hr(Ur,Wr,Yr,"…","\\ldots",!0),Hr(Vr,Wr,Yr,"…","\\ldots",!0),Hr(Vr,Wr,Yr,"⋯","\\@cdots",!0),Hr(Vr,Wr,Yr,"⋱","\\ddots",!0),Hr(Vr,Wr,aa,"⋮","\\varvdots"),Hr(Vr,Wr,Gr,"ˊ","\\acute"),Hr(Vr,Wr,Gr,"ˋ","\\grave"),Hr(Vr,Wr,Gr,"¨","\\ddot"),Hr(Vr,Wr,Gr,"~","\\tilde"),Hr(Vr,Wr,Gr,"ˉ","\\bar"),Hr(Vr,Wr,Gr,"˘","\\breve"),Hr(Vr,Wr,Gr,"ˇ","\\check"),Hr(Vr,Wr,Gr,"^","\\hat"),Hr(Vr,Wr,Gr,"⃗","\\vec"),Hr(Vr,Wr,Gr,"˙","\\dot"),Hr(Vr,Wr,Gr,"˚","\\mathring"),Hr(Vr,Wr,Qr,"","\\@imath"),Hr(Vr,Wr,Qr,"","\\@jmath"),Hr(Vr,Wr,aa,"ı","ı"),Hr(Vr,Wr,aa,"ȷ","ȷ"),Hr(Ur,Wr,aa,"ı","\\i",!0),Hr(Ur,Wr,aa,"ȷ","\\j",!0),Hr(Ur,Wr,aa,"ß","\\ss",!0),Hr(Ur,Wr,aa,"æ","\\ae",!0),Hr(Ur,Wr,aa,"œ","\\oe",!0),Hr(Ur,Wr,aa,"ø","\\o",!0),Hr(Ur,Wr,aa,"Æ","\\AE",!0),Hr(Ur,Wr,aa,"Œ","\\OE",!0),Hr(Ur,Wr,aa,"Ø","\\O",!0),Hr(Ur,Wr,Gr,"ˊ","\\'"),Hr(Ur,Wr,Gr,"ˋ","\\`"),Hr(Ur,Wr,Gr,"ˆ","\\^"),Hr(Ur,Wr,Gr,"˜","\\~"),Hr(Ur,Wr,Gr,"ˉ","\\="),Hr(Ur,Wr,Gr,"˘","\\u"),Hr(Ur,Wr,Gr,"˙","\\."),Hr(Ur,Wr,Gr,"¸","\\c"),Hr(Ur,Wr,Gr,"˚","\\r"),Hr(Ur,Wr,Gr,"ˇ","\\v"),Hr(Ur,Wr,Gr,"¨",'\\"'),Hr(Ur,Wr,Gr,"˝","\\H"),Hr(Ur,Wr,Gr,"◯","\\textcircled");var oa={"--":!0,"---":!0,"``":!0,"''":!0};Hr(Ur,Wr,aa,"–","--",!0),Hr(Ur,Wr,aa,"–","\\textendash"),Hr(Ur,Wr,aa,"—","---",!0),Hr(Ur,Wr,aa,"—","\\textemdash"),Hr(Ur,Wr,aa,"‘","`",!0),Hr(Ur,Wr,aa,"‘","\\textquoteleft"),Hr(Ur,Wr,aa,"’","'",!0),Hr(Ur,Wr,aa,"’","\\textquoteright"),Hr(Ur,Wr,aa,"“","``",!0),Hr(Ur,Wr,aa,"“","\\textquotedblleft"),Hr(Ur,Wr,aa,"”","''",!0),Hr(Ur,Wr,aa,"”","\\textquotedblright"),Hr(Vr,Wr,aa,"°","\\degree",!0),Hr(Ur,Wr,aa,"°","\\degree"),Hr(Ur,Wr,aa,"°","\\textdegree",!0),Hr(Vr,Wr,aa,"£","\\pounds"),Hr(Vr,Wr,aa,"£","\\mathsterling",!0),Hr(Ur,Wr,aa,"£","\\pounds"),Hr(Ur,Wr,aa,"£","\\textsterling",!0),Hr(Vr,Kr,aa,"✠","\\maltese"),Hr(Ur,Kr,aa,"✠","\\maltese");for(var ia='0123456789/@."',la=0;la<14;la++){var sa=ia.charAt(la);Hr(Vr,Wr,aa,sa,sa)}for(var ca='0123456789!@*()-=+";:?/.,',da=0;da<25;da++){var ua=ca.charAt(da);Hr(Ur,Wr,aa,ua,ua)}for(var ma="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ha=0;ha<52;ha++){var pa=ma.charAt(ha);Hr(Vr,Wr,Qr,pa,pa),Hr(Ur,Wr,aa,pa,pa)}Hr(Vr,Kr,aa,"C","ℂ"),Hr(Ur,Kr,aa,"C","ℂ"),Hr(Vr,Kr,aa,"H","ℍ"),Hr(Ur,Kr,aa,"H","ℍ"),Hr(Vr,Kr,aa,"N","ℕ"),Hr(Ur,Kr,aa,"N","ℕ"),Hr(Vr,Kr,aa,"P","ℙ"),Hr(Ur,Kr,aa,"P","ℙ"),Hr(Vr,Kr,aa,"Q","ℚ"),Hr(Ur,Kr,aa,"Q","ℚ"),Hr(Vr,Kr,aa,"R","ℝ"),Hr(Ur,Kr,aa,"R","ℝ"),Hr(Vr,Kr,aa,"Z","ℤ"),Hr(Ur,Kr,aa,"Z","ℤ"),Hr(Vr,Wr,Qr,"h","ℎ"),Hr(Ur,Wr,Qr,"h","ℎ");for(var fa="",ga=0;ga<52;ga++){var ba=ma.charAt(ga);Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56320+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56372+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56424+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56580+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56684+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56736+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56788+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56840+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56944+ga)),Hr(Ur,Wr,aa,ba,fa),ga<26&&(Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56632+ga)),Hr(Ur,Wr,aa,ba,fa),Hr(Vr,Wr,Qr,ba,fa=String.fromCharCode(55349,56476+ga)),Hr(Ur,Wr,aa,ba,fa))}Hr(Vr,Wr,Qr,"k",fa=String.fromCharCode(55349,56668)),Hr(Ur,Wr,aa,"k",fa);for(var va=0;va<10;va++){var ya=va.toString();Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57294+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57314+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57324+va)),Hr(Ur,Wr,aa,ya,fa),Hr(Vr,Wr,Qr,ya,fa=String.fromCharCode(55349,57334+va)),Hr(Ur,Wr,aa,ya,fa)}for(var wa="ÐÞþ",xa=0;xa<3;xa++){var Ea=wa.charAt(xa);Hr(Vr,Wr,Qr,Ea,Ea),Hr(Ur,Wr,aa,Ea,Ea)}var ka=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Sa=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ta=function(e,t,n){return Fr[n][e]&&Fr[n][e].replace&&(e=Fr[n][e].replace),{value:e,metrics:gr(e,t,n)}},_a=function(e,t,n,r,a){var o,i=Ta(e,t,n),l=i.metrics;if(e=i.value,l){var s=l.italic;("text"===n||r&&"mathit"===r.font)&&(s=0),o=new Rr(e,l.height,l.depth,s,l.skew,l.width,a)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+n+"'"),o=new Rr(e,0,0,0,0,0,a);if(r){o.maxFontSize=r.sizeMultiplier,r.style.isTight()&&o.classes.push("mtight");var c=r.getColor();c&&(o.style.color=c)}return o},Ca=(e,t)=>{if(Cr(e.classes)!==Cr(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var n=e.classes[0];if("mbin"===n||"mord"===n)return!1}for(var r in e.style)if(e.style.hasOwnProperty(r)&&e.style[r]!==t.style[r])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},Na=function(e){for(var t=0,n=0,r=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>r&&(r=o.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},Ba=function(e,t,n,r){var a=new zr(e,t,n,r);return Na(a),a},Ma=(e,t,n,r)=>new zr(e,t,n,r),za=function(e){var t=new mr(e);return Na(t),t},Aa=function(e,t,n){var r="";switch(e){case"amsrm":r="AMS";break;case"textrm":r="Main";break;case"textsf":r="SansSerif";break;case"texttt":r="Typewriter";break;default:r=e}return r+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Oa={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ia={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Ra={fontMap:Oa,makeSymbol:_a,mathsym:function(e,t,n,r){return void 0===r&&(r=[]),"boldsymbol"===n.font&&Ta(e,"Main-Bold",t).metrics?_a(e,"Main-Bold",t,n,r.concat(["mathbf"])):"\\"===e||"main"===Fr[t][e].font?_a(e,"Main-Regular",t,n,r):_a(e,"AMS-Regular",t,n,r.concat(["amsrm"]))},makeSpan:Ba,makeSvgSpan:Ma,makeLineSpan:function(e,t,n){var r=Ba([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=_r(r.height),r.maxFontSize=1,r},makeAnchor:function(e,t,n,r){var a=new Ar(e,t,n,r);return Na(a),a},makeFragment:za,wrapFragment:function(e,t){return e instanceof mr?Ba([],[e],t):e},makeVList:function(e,t){for(var{children:n,depth:r}=function(e){if("individualShift"===e.positionType){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,a=r,o=1;o<t.length;o++){var i=-t[o].shift-a-t[o].elem.depth,l=i-(t[o-1].elem.height+t[o-1].elem.depth);a+=i,n.push({type:"kern",size:l}),n.push(t[o])}return{children:n,depth:r}}var s;if("top"===e.positionType){for(var c=e.positionData,d=0;d<e.children.length;d++){var u=e.children[d];c-="kern"===u.type?u.size:u.elem.height+u.elem.depth}s=c}else if("bottom"===e.positionType)s=-e.positionData;else{var m=e.children[0];if("elem"!==m.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-m.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-m.elem.depth}}return{children:e.children,depth:s}}(e),a=0,o=0;o<n.length;o++){var i=n[o];if("elem"===i.type){var l=i.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var s=Ba(["pstrut"],[]);s.style.height=_r(a);for(var c=[],d=r,u=r,m=r,h=0;h<n.length;h++){var p=n[h];if("kern"===p.type)m+=p.size;else{var f=p.elem,g=p.wrapperClasses||[],b=p.wrapperStyle||{},v=Ba(g,[s,f],void 0,b);v.style.top=_r(-a-m-f.depth),p.marginLeft&&(v.style.marginLeft=p.marginLeft),p.marginRight&&(v.style.marginRight=p.marginRight),c.push(v),m+=f.height+f.depth}d=Math.min(d,m),u=Math.max(u,m)}var y,w=Ba(["vlist"],c);if(w.style.height=_r(u),d<0){var x=Ba([],[]),E=Ba(["vlist"],[x]);E.style.height=_r(-d);var k=Ba(["vlist-s"],[new Rr("​")]);y=[Ba(["vlist-r"],[w,k]),Ba(["vlist-r"],[E])]}else y=[Ba(["vlist-r"],[w])];var S=Ba(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,n){var r=e.mode,a=e.text,o=["mord"],i="math"===r||"text"===r&&t.font,l=i?t.font:t.fontFamily,s="",c="";if(55349===a.charCodeAt(0)&&([s,c]=function(e,t){var n=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,r="math"===t?0:1;if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return[ka[a][2],ka[a][r]]}if(120782<=n&&n<=120831){var o=Math.floor((n-120782)/10);return[Sa[o][2],Sa[o][r]]}if(120485===n||120486===n)return[ka[0][2],ka[0][r]];if(120486<n&&n<120782)return["",""];throw new Hn("Unsupported character: "+e)}(a,r)),s.length>0)return _a(a,s,r,t,o.concat(c));if(l){var d,u;if("boldsymbol"===l){var m=function(e,t,n,r,a){return"textord"!==a&&Ta(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,r,0,0,n);d=m.fontName,u=[m.fontClass]}else i?(d=Oa[l].fontName,u=[l]):(d=Aa(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Ta(a,d,r).metrics)return _a(a,d,r,t,o.concat(u));if(oa.hasOwnProperty(a)&&"Typewriter"===d.slice(0,10)){for(var h=[],p=0;p<a.length;p++)h.push(_a(a[p],d,r,t,o.concat(u)));return za(h)}}if("mathord"===n)return _a(a,"Math-Italic",r,t,o.concat(["mathnormal"]));if("textord"===n){var f=Fr[r][a]&&Fr[r][a].font;if("ams"===f){var g=Aa("amsrm",t.fontWeight,t.fontShape);return _a(a,g,r,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var b=Aa(f,t.fontWeight,t.fontShape);return _a(a,b,r,t,o.concat(b,t.fontWeight,t.fontShape))}var v=Aa("textrm",t.fontWeight,t.fontShape);return _a(a,v,r,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+n+" in makeOrd")},makeGlue:(e,t)=>{var n=Ba(["mspace"],[],t),r=Tr(e,t);return n.style.marginRight=_r(r),n},staticSvg:function(e,t){var[n,r,a]=Ia[e],o=new Dr(n),i=new Lr([o],{width:_r(r),height:_r(a),style:"width:"+_r(r),viewBox:"0 0 "+1e3*r+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Ma(["overlay"],[i],t);return l.height=a,l.style.height=_r(a),l.style.width=_r(r),l},svgData:Ia,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof Rr&&r instanceof Rr&&Ca(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e}},La={number:3,unit:"mu"},Da={number:4,unit:"mu"},$a={number:5,unit:"mu"},ja={mord:{mop:La,mbin:Da,mrel:$a,minner:La},mop:{mord:La,mop:La,mrel:$a,minner:La},mbin:{mord:Da,mop:Da,mopen:Da,minner:Da},mrel:{mord:$a,mop:$a,mopen:$a,minner:$a},mopen:{},mclose:{mop:La,mbin:Da,mrel:$a,minner:La},mpunct:{mord:La,mop:La,mrel:$a,mopen:La,mclose:La,mpunct:La,minner:La},minner:{mord:La,mop:La,mbin:Da,mrel:$a,mopen:La,mpunct:La,minner:La}},Pa={mord:{mop:La},mop:{mord:La,mop:La},mbin:{},mrel:{},mopen:{},mclose:{mop:La},mpunct:{},minner:{mop:La}},qa={},Fa={},Ha={};function Va(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:a},s=0;s<n.length;++s)qa[n[s]]=l;t&&(o&&(Fa[t]=o),i&&(Ha[t]=i))}function Ua(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Va({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:n,mathmlBuilder:r})}var Wa=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Ka=function(e){return"ordgroup"===e.type?e.body:[e]},Ga=Ra.makeSpan,Za=["leftmost","mbin","mopen","mrel","mop","mpunct"],Xa=["rightmost","mrel","mclose","mpunct"],Ya={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT},Qa={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Ja=function(e,t,n,r){void 0===r&&(r=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=oo(e[o],t);if(i instanceof mr){var l=i.children;a.push(...l)}else a.push(i)}if(Ra.tryCombineChars(a),!n)return a;var s=t;if(1===e.length){var c=e[0];"sizing"===c.type?s=t.havingSize(c.size):"styling"===c.type&&(s=t.havingStyle(Ya[c.style]))}var d=Ga([r[0]||"leftmost"],[],t),u=Ga([r[1]||"rightmost"],[],t),m="root"===n;return eo(a,((e,t)=>{var n=t.classes[0],r=e.classes[0];"mbin"===n&&Gn.contains(Xa,r)?t.classes[0]="mord":"mbin"===r&&Gn.contains(Za,n)&&(e.classes[0]="mord")}),{node:d},u,m),eo(a,((e,t)=>{var n=ro(t),r=ro(e),a=n&&r?e.hasClass("mtight")?Pa[n][r]:ja[n][r]:null;if(a)return Ra.makeGlue(a,s)}),{node:d},u,m),a},eo=function e(t,n,r,a,o){a&&t.push(a);for(var i=0;i<t.length;i++){var l=t[i],s=to(l);if(s)e(s.children,n,r,null,o);else{var c=!l.hasClass("mspace");if(c){var d=n(l,r.node);d&&(r.insertAfter?r.insertAfter(d):(t.unshift(d),i++))}c?r.node=l:o&&l.hasClass("newline")&&(r.node=Ga(["leftmost"])),r.insertAfter=(e=>n=>{t.splice(e+1,0,n),i++})(i)}}a&&t.pop()},to=function(e){return e instanceof mr||e instanceof Ar||e instanceof zr&&e.hasClass("enclosing")?e:null},no=function e(t,n){var r=to(t);if(r){var a=r.children;if(a.length){if("right"===n)return e(a[a.length-1],"right");if("left"===n)return e(a[0],"left")}}return t},ro=function(e,t){return e?(t&&(e=no(e,t)),Qa[e.classes[0]]||null):null},ao=function(e,t){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Ga(t.concat(n))},oo=function(e,t,n){if(!e)return Ga();if(Fa[e.type]){var r=Fa[e.type](e,t);if(n&&t.size!==n.size){r=Ga(t.sizingClasses(n),[r],t);var a=t.sizeMultiplier/n.sizeMultiplier;r.height*=a,r.depth*=a}return r}throw new Hn("Got group of unknown type: '"+e.type+"'")};function io(e,t){var n=Ga(["base"],e,t),r=Ga(["strut"]);return r.style.height=_r(n.height+n.depth),n.depth&&(r.style.verticalAlign=_r(-n.depth)),n.children.unshift(r),n}function lo(e,t){var n=null;1===e.length&&"tag"===e[0].type&&(n=e[0].tag,e=e[0].body);var r,a=Ja(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(r=a.pop());for(var o,i=[],l=[],s=0;s<a.length;s++)if(l.push(a[s]),a[s].hasClass("mbin")||a[s].hasClass("mrel")||a[s].hasClass("allowbreak")){for(var c=!1;s<a.length-1&&a[s+1].hasClass("mspace")&&!a[s+1].hasClass("newline");)s++,l.push(a[s]),a[s].hasClass("nobreak")&&(c=!0);c||(i.push(io(l,t)),l=[])}else a[s].hasClass("newline")&&(l.pop(),l.length>0&&(i.push(io(l,t)),l=[]),i.push(a[s]));l.length>0&&i.push(io(l,t)),n?((o=io(Ja(n,t,!0))).classes=["tag"],i.push(o)):r&&i.push(r);var d=Ga(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=_r(d.height+d.depth),d.depth&&(u.style.verticalAlign=_r(-d.depth))}return d}function so(e){return new mr(e)}class co{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Cr(this.classes));for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Gn.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Gn.escape(Cr(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class uo{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Gn.escape(this.toText())}toText(){return this.text}}var mo={MathNode:co,TextNode:uo,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",_r(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+_r(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:so},ho=function(e,t,n){return!Fr[t][e]||!Fr[t][e].replace||55349===e.charCodeAt(0)||oa.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=Fr[t][e].replace),new mo.TextNode(e)},po=function(e){return 1===e.length?e[0]:new mo.MathNode("mrow",e)},fo=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var n=t.font;if(!n||"mathnormal"===n)return null;var r=e.mode;if("mathit"===n)return"italic";if("boldsymbol"===n)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===n)return"bold";if("mathbb"===n)return"double-struck";if("mathfrak"===n)return"fraktur";if("mathscr"===n||"mathcal"===n)return"script";if("mathsf"===n)return"sans-serif";if("mathtt"===n)return"monospace";var a=e.text;return Gn.contains(["\\imath","\\jmath"],a)?null:(Fr[r][a]&&Fr[r][a].replace&&(a=Fr[r][a].replace),gr(a,Ra.fontMap[n].fontName,r)?Ra.fontMap[n].variant:null)},go=function(e,t,n){if(1===e.length){var r=vo(e[0],t);return n&&r instanceof co&&"mo"===r.type&&(r.setAttribute("lspace","0em"),r.setAttribute("rspace","0em")),[r]}for(var a,o=[],i=0;i<e.length;i++){var l=vo(e[i],t);if(l instanceof co&&a instanceof co){if("mtext"===l.type&&"mtext"===a.type&&l.getAttribute("mathvariant")===a.getAttribute("mathvariant")){a.children.push(...l.children);continue}if("mn"===l.type&&"mn"===a.type){a.children.push(...l.children);continue}if("mi"===l.type&&1===l.children.length&&"mn"===a.type){var s=l.children[0];if(s instanceof uo&&"."===s.text){a.children.push(...l.children);continue}}else if("mi"===a.type&&1===a.children.length){var c=a.children[0];if(c instanceof uo&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var d=l.children[0];d instanceof uo&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(l),a=l}return o},bo=function(e,t,n){return po(go(e,t,n))},vo=function(e,t){if(!e)return new mo.MathNode("mrow");if(Ha[e.type])return Ha[e.type](e,t);throw new Hn("Got group of unknown type: '"+e.type+"'")};function yo(e,t,n,r,a){var o,i=go(e,n);o=1===i.length&&i[0]instanceof co&&Gn.contains(["mrow","mtable"],i[0].type)?i[0]:new mo.MathNode("mrow",i);var l=new mo.MathNode("annotation",[new mo.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new mo.MathNode("semantics",[o,l]),c=new mo.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&c.setAttribute("display","block");var d=a?"katex":"katex-mathml";return Ra.makeSpan([d],[c])}var wo=function(e){return new xr({style:e.displayMode?ir.DISPLAY:ir.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},xo=function(e,t){if(t.displayMode){var n=["katex-display"];t.leqno&&n.push("leqno"),t.fleqn&&n.push("fleqn"),e=Ra.makeSpan(n,[e])}return e},Eo={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},ko={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},So=function(e,t,n,r,a){var o,i=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(o=Ra.makeSpan(["stretchy",t],[],a),"fbox"===t){var l=a.color&&a.getColor();l&&(o.style.borderColor=l)}}else{var s=[];/^[bx]cancel$/.test(t)&&s.push(new $r({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new $r({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Lr(s,{width:"100%",height:_r(i)});o=Ra.makeSvgSpan([],[c],a)}return o.height=i,o.style.height=_r(i),o},To=function(e){var t=new mo.MathNode("mo",[new mo.TextNode(Eo[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},_o=function(e,t){var{span:n,minWidth:r,height:a}=function(){var n=4e5,r=e.label.slice(1);if(Gn.contains(["widehat","widecheck","widetilde","utilde"],r)){var a,o,i,l="ordgroup"===(h=e.base).type?h.body.length:1;if(l>5)"widehat"===r||"widecheck"===r?(a=420,n=2364,i=.42,o=r+"4"):(a=312,n=2340,i=.34,o="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][s],a=[0,239,300,360,420][s],i=[0,.24,.3,.3,.36,.42][s],o=r+s):(n=[0,600,1033,2339,2340][s],a=[0,260,286,306,312][s],i=[0,.26,.286,.3,.306,.34][s],o="tilde"+s)}var c=new Dr(o),d=new Lr([c],{width:"100%",height:_r(i),viewBox:"0 0 "+n+" "+a,preserveAspectRatio:"none"});return{span:Ra.makeSvgSpan([],[d],t),minWidth:0,height:i}}var u,m,h,p=[],f=ko[r],[g,b,v]=f,y=v/1e3,w=g.length;if(1===w)u=["hide-tail"],m=[f[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],m=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");u=["brace-left","brace-center","brace-right"],m=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var E=new Dr(g[x]),k=new Lr([E],{width:"400em",height:_r(y),viewBox:"0 0 "+n+" "+v,preserveAspectRatio:m[x]+" slice"}),S=Ra.makeSvgSpan([u[x]],[k],t);if(1===w)return{span:S,minWidth:b,height:y};S.style.height=_r(y),p.push(S)}return{span:Ra.makeSpan(["stretchy"],p,t),minWidth:b,height:y}}();return n.height=a,n.style.height=_r(a),r>0&&(n.style.minWidth=_r(r)),n};function Co(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function No(e){var t=Bo(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Bo(e){return e&&("atom"===e.type||qr.hasOwnProperty(e.type))?e:null}var Mo=(e,t)=>{var n,r,a;e&&"supsub"===e.type?(n=(r=Co(e.base,"accent")).base,e.base=n,a=function(e){if(e instanceof zr)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(oo(e,t)),e.base=r):n=(r=Co(e,"accent")).base;var o=oo(n,t.havingCrampedStyle()),i=0;if(r.isShifty&&Gn.isCharacterBox(n)){var l=Gn.getBaseElem(n);i=jr(oo(l,t.havingCrampedStyle())).skew}var s,c="\\c"===r.label,d=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(r.isStretchy)s=_o(r,t),s=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+_r(2*i)+")",marginLeft:_r(2*i)}:void 0}]},t);else{var u,m;"\\vec"===r.label?(u=Ra.staticSvg("vec",t),m=Ra.svgData.vec[1]):((u=jr(u=Ra.makeOrd({mode:r.mode,text:r.label},t,"textord"))).italic=0,m=u.width,c&&(d+=u.depth)),s=Ra.makeSpan(["accent-body"],[u]);var h="\\textcircled"===r.label;h&&(s.classes.push("accent-full"),d=o.height);var p=i;h||(p-=m/2),s.style.left=_r(p),"\\textcircled"===r.label&&(s.style.top=".2em"),s=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:s}]},t)}var f=Ra.makeSpan(["mord","accent"],[s],t);return a?(a.children[0]=f,a.height=Math.max(f.height,a.height),a.classes[0]="mord",a):f},zo=(e,t)=>{var n=e.isStretchy?To(e.label):new mo.MathNode("mo",[ho(e.label,e.mode)]),r=new mo.MathNode("mover",[vo(e.base,t),n]);return r.setAttribute("accent","true"),r},Ao=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));Va({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var n=Wa(t[0]),r=!Ao.test(e.funcName),a=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:a,base:n}},htmlBuilder:Mo,mathmlBuilder:zo}),Va({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Mo,mathmlBuilder:zo}),Va({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"accentUnder",mode:n.mode,label:r,base:a}},htmlBuilder:(e,t)=>{var n=oo(e.base,t),r=_o(e,t),a="\\utilde"===e.label?.12:0,o=Ra.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var n=To(e.label),r=new mo.MathNode("munder",[vo(e.base,t),n]);return r.setAttribute("accentunder","true"),r}});var Oo=e=>{var t=new mo.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Va({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:a}=e;return{type:"xArrow",mode:r.mode,label:a,body:t[0],below:n[0]}},htmlBuilder(e,t){var n,r=t.style,a=t.havingStyle(r.sup()),o=Ra.wrapFragment(oo(e.body,a,t),t),i="\\x"===e.label.slice(0,2)?"x":"cd";o.classes.push(i+"-arrow-pad"),e.below&&(a=t.havingStyle(r.sub()),(n=Ra.wrapFragment(oo(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var l,s=_o(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,d=-t.fontMetrics().axisHeight-.5*s.height-.111;if((o.depth>.25||"\\xleftequilibrium"===e.label)&&(d-=o.depth),n){var u=-t.fontMetrics().axisHeight+n.height+.5*s.height+.111;l=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c},{type:"elem",elem:n,shift:u}]},t)}else l=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c}]},t);return l.children[0].children[0].children[1].classes.push("svg-align"),Ra.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var n,r=To(e.label);if(r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=Oo(vo(e.body,t));if(e.below){var o=Oo(vo(e.below,t));n=new mo.MathNode("munderover",[r,o,a])}else n=new mo.MathNode("mover",[r,a])}else if(e.below){var i=Oo(vo(e.below,t));n=new mo.MathNode("munder",[r,i])}else n=Oo(),n=new mo.MathNode("mover",[r,n]);return n}});var Io=Ra.makeSpan;function Ro(e,t){var n=Ja(e.body,t,!0);return Io([e.mclass],n,t)}function Lo(e,t){var n,r=go(e.body,t);return"minner"===e.mclass?n=new mo.MathNode("mpadded",r):"mord"===e.mclass?e.isCharacterBox?(n=r[0]).type="mi":n=new mo.MathNode("mi",r):(e.isCharacterBox?(n=r[0]).type="mo":n=new mo.MathNode("mo",r),"mbin"===e.mclass?(n.attributes.lspace="0.22em",n.attributes.rspace="0.22em"):"mpunct"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(n.attributes.lspace="0em",n.attributes.rspace="0em"):"minner"===e.mclass&&(n.attributes.lspace="0.0556em",n.attributes.width="+0.1111em")),n}Va({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"mclass",mode:n.mode,mclass:"m"+r.slice(5),body:Ka(a),isCharacterBox:Gn.isCharacterBox(a)}},htmlBuilder:Ro,mathmlBuilder:Lo});var Do=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};Va({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:"mclass",mode:n.mode,mclass:Do(t[0]),body:Ka(t[1]),isCharacterBox:Gn.isCharacterBox(t[1])}}}),Va({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var n,{parser:r,funcName:a}=e,o=t[1],i=t[0];n="\\stackrel"!==a?Do(o):"mrel";var l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:Ka(o)},s={type:"supsub",mode:i.mode,base:l,sup:"\\underset"===a?null:i,sub:"\\underset"===a?i:null};return{type:"mclass",mode:r.mode,mclass:n,body:[s],isCharacterBox:Gn.isCharacterBox(s)}},htmlBuilder:Ro,mathmlBuilder:Lo}),Va({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"pmb",mode:n.mode,mclass:Do(t[0]),body:Ka(t[0])}},htmlBuilder(e,t){var n=Ja(e.body,t,!0),r=Ra.makeSpan([e.mclass],n,t);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,t){var n=go(e.body,t),r=new mo.MathNode("mstyle",n);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var $o={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jo=e=>"textord"===e.type&&"@"===e.text;function Po(e,t,n){var r=$o[e];switch(r){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return n.callFunction(r,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:r,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[n.callFunction("\\\\cdleft",[t[0]],[]),n.callFunction("\\Big",[a],[]),n.callFunction("\\\\cdright",[t[1]],[])]};return n.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return n.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return n.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Va({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"cdlabel",mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Ra.wrapFragment(oo(e.label,n,t),t);return r.classes.push("cd-label-"+e.side),r.style.bottom=_r(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new mo.MathNode("mrow",[vo(e.label,t)]);return(n=new mo.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new mo.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),Va({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:"cdlabelparent",mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Ra.wrapFragment(oo(e.fragment,t),t);return n.classes.push("cd-vert-arrow"),n},mathmlBuilder:(e,t)=>new mo.MathNode("mrow",[vo(e.fragment,t)])}),Va({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=Co(t[0],"ordgroup").body,a="",o=0;o<r.length;o++){a+=Co(r[o],"textord").text}var i,l=parseInt(a);if(isNaN(l))throw new Hn("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new Hn("\\@char with invalid code point "+a);return l<=65535?i=String.fromCharCode(l):(l-=65536,i=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:n.mode,text:i}}});var qo=(e,t)=>{var n=Ja(e.body,t.withColor(e.color),!1);return Ra.makeFragment(n)},Fo=(e,t)=>{var n=go(e.body,t.withColor(e.color)),r=new mo.MathNode("mstyle",n);return r.setAttribute("mathcolor",e.color),r};Va({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:n}=e,r=Co(t[0],"color-token").color,a=t[1];return{type:"color",mode:n.mode,color:r,body:Ka(a)}},htmlBuilder:qo,mathmlBuilder:Fo}),Va({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,a=Co(t[0],"color-token").color;n.gullet.macros.set("\\current@color",a);var o=n.parseExpression(!0,r);return{type:"color",mode:n.mode,color:a,body:o}},htmlBuilder:qo,mathmlBuilder:Fo}),Va({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,a="["===r.gullet.future().text?r.parseSizeGroup(!0):null,o=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:o,size:a&&Co(a,"size").value}},htmlBuilder(e,t){var n=Ra.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size&&(n.style.marginTop=_r(Tr(e.size,t)))),n},mathmlBuilder(e,t){var n=new mo.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size&&n.setAttribute("height",_r(Tr(e.size,t)))),n}});var Ho={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Vo=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Hn("Expected a control sequence",e);return t},Uo=(e,t,n,r)=>{var a=e.gullet.macros.get(n.text);null==a&&(n.noexpand=!0,a={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,a,r)};Va({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(Ho[r.text])return"\\global"!==n&&"\\\\globallong"!==n||(r.text=Ho[r.text]),Co(t.parseFunction(),"internal");throw new Hn("Invalid token after macro prefix",r)}}),Va({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),a=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Hn("Expected a control sequence",r);for(var o,i=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[i].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Hn('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Hn('Argument number "'+r.text+'" out of order');i++,l.push([])}else{if("EOF"===r.text)throw new Hn("Expected a macro definition");l[i].push(r.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),"\\edef"!==n&&"\\xdef"!==n||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},n===Ho[n]),{type:"internal",mode:t.mode}}}),Va({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vo(t.gullet.popToken());t.gullet.consumeSpaces();var a=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return Uo(t,r,a,"\\\\globallet"===n),{type:"internal",mode:t.mode}}}),Va({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=Vo(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return Uo(t,r,o,"\\\\globalfuture"===n),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Wo=function(e,t,n){var r=gr(Fr.math[e]&&Fr.math[e].replace||e,t,n);if(!r)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return r},Ko=function(e,t,n,r){var a=n.havingBaseStyle(t),o=Ra.makeSpan(r.concat(a.sizingClasses(n)),[e],n),i=a.sizeMultiplier/n.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},Go=function(e,t,n){var r=t.havingBaseStyle(n),a=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=_r(a),e.height-=a,e.depth+=a},Zo=function(e,t,n,r,a,o){var i=function(e,t,n,r){return Ra.makeSymbol(e,"Size"+t+"-Regular",n,r)}(e,t,a,r),l=Ko(Ra.makeSpan(["delimsizing","size"+t],[i],r),ir.TEXT,r,o);return n&&Go(l,r,ir.TEXT),l},Xo=function(e,t,n){var r;return r="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Ra.makeSpan(["delimsizinginner",r],[Ra.makeSpan([],[Ra.makeSymbol(e,t,n)])])}},Yo=function(e,t,n){var r=hr["Size4-Regular"][e.charCodeAt(0)]?hr["Size4-Regular"][e.charCodeAt(0)][4]:hr["Size1-Regular"][e.charCodeAt(0)][4],a=new Dr("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),o=new Lr([a],{width:_r(r),height:_r(t),style:"width:"+_r(r),viewBox:"0 0 "+1e3*r+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Ra.makeSvgSpan([],[o],n);return i.height=t,i.style.height=_r(t),i.style.width=_r(r),{type:"elem",elem:i}},Qo={type:"kern",size:-.008},Jo=["|","\\lvert","\\rvert","\\vert"],ei=["\\|","\\lVert","\\rVert","\\Vert"],ti=function(e,t,n,r,a,o){var i,l,s,c,d="",u=0;i=s=c=e,l=null;var m="Size1-Regular";"\\uparrow"===e?s=c="⏐":"\\Uparrow"===e?s=c="‖":"\\downarrow"===e?i=s="⏐":"\\Downarrow"===e?i=s="‖":"\\updownarrow"===e?(i="\\uparrow",s="⏐",c="\\downarrow"):"\\Updownarrow"===e?(i="\\Uparrow",s="‖",c="\\Downarrow"):Gn.contains(Jo,e)?(s="∣",d="vert",u=333):Gn.contains(ei,e)?(s="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",s="⎢",c="⎣",m="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",s="⎥",c="⎦",m="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(s=i="⎢",c="⎣",m="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",s=c="⎢",m="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(s=i="⎥",c="⎦",m="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",s=c="⎥",m="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",s="⎜",c="⎝",m="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",s="⎟",c="⎠",m="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",l="⎨",c="⎩",s="⎪",m="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",l="⎬",c="⎭",s="⎪",m="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",s="⎪",m="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",s="⎪",m="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",s="⎪",m="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",s="⎪",m="Size4-Regular");var h=Wo(i,m,a),p=h.height+h.depth,f=Wo(s,m,a),g=f.height+f.depth,b=Wo(c,m,a),v=b.height+b.depth,y=0,w=1;if(null!==l){var x=Wo(l,m,a);y=x.height+x.depth,w=2}var E=p+v+y,k=E+Math.max(0,Math.ceil((t-E)/(w*g)))*w*g,S=r.fontMetrics().axisHeight;n&&(S*=r.sizeMultiplier);var T=k/2-S,_=[];if(d.length>0){var C=k-p-v,N=Math.round(1e3*k),B=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(d,Math.round(1e3*C)),M=new Dr(d,B),z=(u/1e3).toFixed(3)+"em",A=(N/1e3).toFixed(3)+"em",O=new Lr([M],{width:z,height:A,viewBox:"0 0 "+u+" "+N}),I=Ra.makeSvgSpan([],[O],r);I.height=N/1e3,I.style.width=z,I.style.height=A,_.push({type:"elem",elem:I})}else{if(_.push(Xo(c,m,a)),_.push(Qo),null===l){var R=k-p-v+.016;_.push(Yo(s,R,r))}else{var L=(k-p-v-y)/2+.016;_.push(Yo(s,L,r)),_.push(Qo),_.push(Xo(l,m,a)),_.push(Qo),_.push(Yo(s,L,r))}_.push(Qo),_.push(Xo(i,m,a))}var D=r.havingBaseStyle(ir.TEXT),$=Ra.makeVList({positionType:"bottom",positionData:T,children:_},D);return Ko(Ra.makeSpan(["delimsizing","mult"],[$],D),ir.TEXT,r,o)},ni=.08,ri=function(e,t,n,r,a){var o=function(e,t,n){t*=1e3;var r="";switch(e){case"sqrtMain":r=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.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\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize1":r=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize2":r=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize3":r=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,dr);break;case"sqrtSize4":r=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,dr);break;case"sqrtTall":r=function(e,t,n){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(n-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,dr,n)}return r}(e,r,n),i=new Dr(e,o),l=new Lr([i],{width:"400em",height:_r(t),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Ra.makeSvgSpan(["hide-tail"],[l],a)},ai=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],oi=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ii=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],li=[0,1.2,1.8,2.4,3],si=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ci=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"stack"}],di=[{type:"small",style:ir.SCRIPTSCRIPT},{type:"small",style:ir.SCRIPT},{type:"small",style:ir.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ui=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},mi=function(e,t,n,r){for(var a=Math.min(2,3-r.style.size);a<n.length&&"stack"!==n[a].type;a++){var o=Wo(e,ui(n[a]),"math"),i=o.height+o.depth;if("small"===n[a].type&&(i*=r.havingBaseStyle(n[a].style).sizeMultiplier),i>t)return n[a]}return n[n.length-1]},hi=function(e,t,n,r,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=Gn.contains(ii,e)?si:Gn.contains(ai,e)?di:ci;var l=mi(e,t,i,r);return"small"===l.type?function(e,t,n,r,a,o){var i=Ra.makeSymbol(e,"Main-Regular",a,r),l=Ko(i,t,r,o);return n&&Go(l,r,t),l}(e,l.style,n,r,a,o):"large"===l.type?Zo(e,l.size,n,r,a,o):ti(e,t,n,r,a,o)},pi={sqrtImage:function(e,t){var n,r,a=t.havingBaseSizing(),o=mi("\\surd",e*a.sizeMultiplier,di,a),i=a.sizeMultiplier,l=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s=0,c=0,d=0;return"small"===o.type?(e<1?i=1:e<1.4&&(i=.7),c=(1+l)/i,(n=ri("sqrtMain",s=(1+l+ni)/i,d=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",r=.833/i):"large"===o.type?(d=1080*li[o.size],c=(li[o.size]+l)/i,s=(li[o.size]+l+ni)/i,(n=ri("sqrtSize"+o.size,s,d,l,t)).style.minWidth="1.02em",r=1/i):(s=e+l+ni,c=e+l,d=Math.floor(1e3*e+l)+80,(n=ri("sqrtTall",s,d,l,t)).style.minWidth="0.742em",r=1.056),n.height=c,n.style.height=_r(s),{span:n,advanceWidth:r,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*i}},sizedDelim:function(e,t,n,r,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Gn.contains(ai,e)||Gn.contains(ii,e))return Zo(e,t,!1,n,r,a);if(Gn.contains(oi,e))return ti(e,li[t],!1,n,r,a);throw new Hn("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:li,customSizedDelim:hi,leftRightDelim:function(e,t,n,r,a,o){var i=r.fontMetrics().axisHeight*r.sizeMultiplier,l=5/r.fontMetrics().ptPerEm,s=Math.max(t-i,n+i),c=Math.max(s/500*901,2*s-l);return hi(e,c,!0,r,a,o)}},fi={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},gi=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function bi(e,t){var n=Bo(e);if(n&&Gn.contains(gi,n.text))return n;throw new Hn(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function vi(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Va({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var n=bi(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:fi[e.funcName].size,mclass:fi[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>"."===e.delim?Ra.makeSpan([e.mclass]):pi.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(ho(e.delim,e.mode));var n=new mo.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?n.setAttribute("fence","true"):n.setAttribute("fence","false"),n.setAttribute("stretchy","true");var r=_r(pi.sizeToMaxHeight[e.size]);return n.setAttribute("minsize",r),n.setAttribute("maxsize",r),n}}),Va({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new Hn("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:bi(t[0],e).text,color:n}}}),Va({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bi(t[0],e),r=e.parser;++r.leftrightDepth;var a=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var o=Co(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:a,left:n.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{vi(e);for(var n,r,a=Ja(e.body,t,!0,["mopen","mclose"]),o=0,i=0,l=!1,s=0;s<a.length;s++)a[s].isMiddle?l=!0:(o=Math.max(a[s].height,o),i=Math.max(a[s].depth,i));if(o*=t.sizeMultiplier,i*=t.sizeMultiplier,n="."===e.left?ao(t,["mopen"]):pi.leftRightDelim(e.left,o,i,t,e.mode,["mopen"]),a.unshift(n),l)for(var c=1;c<a.length;c++){var d=a[c].isMiddle;d&&(a[c]=pi.leftRightDelim(d.delim,o,i,d.options,e.mode,[]))}if("."===e.right)r=ao(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;r=pi.leftRightDelim(e.right,o,i,u,e.mode,["mclose"])}return a.push(r),Ra.makeSpan(["minner"],a,t)},mathmlBuilder:(e,t)=>{vi(e);var n=go(e.body,t);if("."!==e.left){var r=new mo.MathNode("mo",[ho(e.left,e.mode)]);r.setAttribute("fence","true"),n.unshift(r)}if("."!==e.right){var a=new mo.MathNode("mo",[ho(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),n.push(a)}return po(n)}}),Va({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=bi(t[0],e);if(!e.parser.leftrightDepth)throw new Hn("\\middle without preceding \\left",n);return{type:"middle",mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;if("."===e.delim)n=ao(t,[]);else{n=pi.sizedDelim(e.delim,1,t,e.mode,[]);var r={delim:e.delim,options:t};n.isMiddle=r}return n},mathmlBuilder:(e,t)=>{var n="\\vert"===e.delim||"|"===e.delim?ho("|","text"):ho(e.delim,e.mode),r=new mo.MathNode("mo",[n]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var yi=(e,t)=>{var n,r,a,o=Ra.wrapFragment(oo(e.body,t),t),i=e.label.slice(1),l=t.sizeMultiplier,s=0,c=Gn.isCharacterBox(e.body);if("sout"===i)(n=Ra.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===i){var d=Tr({number:.6,unit:"pt"},t),u=Tr({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var m=o.height+o.depth+d+u;o.style.paddingLeft=_r(m/2+d);var h=Math.floor(1e3*m*l),p="M400000 "+(r=h)+" H0 L"+r/2+" 0 l65 45 L145 "+(r-80)+" H400000z",f=new Lr([new Dr("phase",p)],{width:"400em",height:_r(h/1e3),viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});(n=Ra.makeSvgSpan(["hide-tail"],[f],t)).style.height=_r(m),s=o.depth+d+u}else{/cancel/.test(i)?c||o.classes.push("cancel-pad"):"angl"===i?o.classes.push("anglpad"):o.classes.push("boxpad");var g=0,b=0,v=0;/box/.test(i)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=g=t.fontMetrics().fboxsep+("colorbox"===i?0:v)):"angl"===i?(g=4*(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-o.depth)):b=g=c?.2:0,n=So(o,i,g,b,t),/fbox|boxed|fcolorbox/.test(i)?(n.style.borderStyle="solid",n.style.borderWidth=_r(v)):"angl"===i&&.049!==v&&(n.style.borderTopWidth=_r(v),n.style.borderRightWidth=_r(v)),s=o.depth+b,e.backgroundColor&&(n.style.backgroundColor=e.backgroundColor,e.borderColor&&(n.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:s},{type:"elem",elem:o,shift:0}]},t);else{var y=/cancel|phase/.test(i)?["svg-align"]:[];a=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!c?Ra.makeSpan(["mord","cancel-lap"],[a],t):Ra.makeSpan(["mord"],[a],t)},wi=(e,t)=>{var n=0,r=new mo.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vo(e.body,t)]);switch(e.label){case"\\cancel":r.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":r.setAttribute("notation","downdiagonalstrike");break;case"\\phase":r.setAttribute("notation","phasorangle");break;case"\\sout":r.setAttribute("notation","horizontalstrike");break;case"\\fbox":r.setAttribute("notation","box");break;case"\\angl":r.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute("width","+"+2*n+"pt"),r.setAttribute("height","+"+2*n+"pt"),r.setAttribute("lspace",n+"pt"),r.setAttribute("voffset",n+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};Va({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,o=Co(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:r.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,n){var{parser:r,funcName:a}=e,o=Co(t[0],"color-token").color,i=Co(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:r.mode,label:a,backgroundColor:i,borderColor:o,body:l}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\fbox",body:t[0]}}}),Va({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"enclose",mode:n.mode,label:r,body:a}},htmlBuilder:yi,mathmlBuilder:wi}),Va({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"enclose",mode:n.mode,label:"\\angl",body:t[0]}}});var xi={};function Ei(e){for(var{type:t,names:n,props:r,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<n.length;++s)xi[n[s]]=l;o&&(Fa[t]=o),i&&(Ha[t]=i)}var ki={};function Si(e,t){ki[e]=t}function Ti(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for("\\relax"===n&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);"\\hline"===n||"\\hdashline"===n;)e.consume(),t.push("\\hdashline"===n),e.consumeSpaces(),n=e.fetch().text;return t}var _i=e=>{if(!e.parser.settings.displayMode)throw new Hn("{"+e.envName+"} can be used only in display mode.")};function Ci(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function Ni(e,t,n){var{hskipBeforeAndAfter:r,addJot:a,cols:o,arraystretch:i,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:m}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var h=e.gullet.expandMacroAsText("\\arraystretch");if(null==h)i=1;else if(!(i=parseFloat(h))||i<0)throw new Hn("Invalid \\arraystretch: "+h)}e.gullet.beginGroup();var p=[],f=[p],g=[],b=[],v=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){v&&(e.gullet.macros.get("\\df@tag")?(v.push(e.subparse([new Fn("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),b.push(Ti(e));;){var x=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},n&&(x={type:"styling",mode:e.mode,style:n,body:[x]}),p.push(x);var E=e.fetch().text;if("&"===E){if(u&&p.length===u){if(c||l)throw new Hn("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===E){w(),1===p.length&&"styling"===x.type&&0===x.body[0].body.length&&(f.length>1||!d)&&f.pop(),b.length<f.length+1&&b.push([]);break}if("\\\\"!==E)throw new Hn("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var k=void 0;" "!==e.gullet.future().text&&(k=e.parseSizeGroup(!0)),g.push(k?k.value:null),w(),b.push(Ti(e)),p=[],f.push(p),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:i,body:f,cols:o,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:b,colSeparationType:l,tags:v,leqno:m}}function Bi(e){return"d"===e.slice(0,1)?"display":"text"}var Mi=function(e,t){var n,r,a=e.body.length,o=e.hLinesBeforeRow,i=0,l=new Array(a),s=[],c=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,u=5*d;e.colSeparationType&&"small"===e.colSeparationType&&(u=t.havingStyle(ir.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var m="CD"===e.colSeparationType?Tr({number:3,unit:"ex"},t):12*d,h=3*d,p=e.arraystretch*m,f=.7*p,g=.3*p,b=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(b+=.25),s.push({pos:b,isDashed:e[t]})}for(v(o[0]),n=0;n<e.body.length;++n){var y=e.body[n],w=f,x=g;i<y.length&&(i=y.length);var E=new Array(y.length);for(r=0;r<y.length;++r){var k=oo(y[r],t);x<k.depth&&(x=k.depth),w<k.height&&(w=k.height),E[r]=k}var S=e.rowGaps[n],T=0;S&&(T=Tr(S,t))>0&&(x<(T+=g)&&(x=T),T=0),e.addJot&&(x+=h),E.height=w,E.depth=x,b+=w,E.pos=b,b+=x+T,l[n]=E,v(o[n+1])}var _,C,N=b/2+t.fontMetrics().axisHeight,B=e.cols||[],M=[],z=[];if(e.tags&&e.tags.some((e=>e)))for(n=0;n<a;++n){var A=l[n],O=A.pos-N,I=e.tags[n],R=void 0;(R=!0===I?Ra.makeSpan(["eqn-num"],[],t):!1===I?Ra.makeSpan([],[],t):Ra.makeSpan([],Ja(I,t,!0),t)).depth=A.depth,R.height=A.height,z.push({type:"elem",elem:R,shift:O})}for(r=0,C=0;r<i||C<B.length;++r,++C){for(var L=B[C]||{},D=!0;"separator"===L.type;){if(D||((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(t.fontMetrics().doubleRuleSep),M.push(_)),"|"!==L.separator&&":"!==L.separator)throw new Hn("Invalid separator type: "+L.separator);var $="|"===L.separator?"solid":"dashed",j=Ra.makeSpan(["vertical-separator"],[],t);j.style.height=_r(b),j.style.borderRightWidth=_r(c),j.style.borderRightStyle=$,j.style.margin="0 "+_r(-c/2);var P=b-N;P&&(j.style.verticalAlign=_r(-P)),M.push(j),L=B[++C]||{},D=!1}if(!(r>=i)){var q=void 0;(r>0||e.hskipBeforeAndAfter)&&0!==(q=Gn.deflt(L.pregap,u))&&((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(q),M.push(_));var F=[];for(n=0;n<a;++n){var H=l[n],V=H[r];if(V){var U=H.pos-N;V.depth=H.depth,V.height=H.height,F.push({type:"elem",elem:V,shift:U})}}F=Ra.makeVList({positionType:"individualShift",children:F},t),F=Ra.makeSpan(["col-align-"+(L.align||"c")],[F]),M.push(F),(r<i-1||e.hskipBeforeAndAfter)&&0!==(q=Gn.deflt(L.postgap,u))&&((_=Ra.makeSpan(["arraycolsep"],[])).style.width=_r(q),M.push(_))}}if(l=Ra.makeSpan(["mtable"],M),s.length>0){for(var W=Ra.makeLineSpan("hline",t,c),K=Ra.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:l,shift:0}];s.length>0;){var Z=s.pop(),X=Z.pos-N;Z.isDashed?G.push({type:"elem",elem:K,shift:X}):G.push({type:"elem",elem:W,shift:X})}l=Ra.makeVList({positionType:"individualShift",children:G},t)}if(0===z.length)return Ra.makeSpan(["mord"],[l],t);var Y=Ra.makeVList({positionType:"individualShift",children:z},t);return Y=Ra.makeSpan(["tag"],[Y],t),Ra.makeFragment([l,Y])},zi={c:"center ",l:"left ",r:"right "},Ai=function(e,t){for(var n=[],r=new mo.MathNode("mtd",[],["mtr-glue"]),a=new mo.MathNode("mtd",[],["mml-eqn-num"]),o=0;o<e.body.length;o++){for(var i=e.body[o],l=[],s=0;s<i.length;s++)l.push(new mo.MathNode("mtd",[vo(i[s],t)]));e.tags&&e.tags[o]&&(l.unshift(r),l.push(r),e.leqno?l.unshift(a):l.push(a)),n.push(new mo.MathNode("mtr",l))}var c=new mo.MathNode("mtable",n),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",_r(d));var u="",m="";if(e.cols&&e.cols.length>0){var h=e.cols,p="",f=!1,g=0,b=h.length;"separator"===h[0].type&&(u+="top ",g=1),"separator"===h[h.length-1].type&&(u+="bottom ",b-=1);for(var v=g;v<b;v++)"align"===h[v].type?(m+=zi[h[v].align],f&&(p+="none "),f=!0):"separator"===h[v].type&&f&&(p+="|"===h[v].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",m.trim()),/[sd]/.test(p)&&c.setAttribute("columnlines",p.trim())}if("align"===e.colSeparationType){for(var y=e.cols||[],w="",x=1;x<y.length;x++)w+=x%2?"0em ":"1em ";c.setAttribute("columnspacing",w.trim())}else"alignat"===e.colSeparationType||"gather"===e.colSeparationType?c.setAttribute("columnspacing","0em"):"small"===e.colSeparationType?c.setAttribute("columnspacing","0.2778em"):"CD"===e.colSeparationType?c.setAttribute("columnspacing","0.5em"):c.setAttribute("columnspacing","1em");var E="",k=e.hLinesBeforeRow;u+=k[0].length>0?"left ":"",u+=k[k.length-1].length>0?"right ":"";for(var S=1;S<k.length-1;S++)E+=0===k[S].length?"none ":k[S][0]?"dashed ":"solid ";return/[sd]/.test(E)&&c.setAttribute("rowlines",E.trim()),""!==u&&(c=new mo.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new mo.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},Oi=function(e,t){-1===e.envName.indexOf("ed")&&_i(e);var n,r=[],a=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,i=Ni(e.parser,{cols:r,addJot:!0,autoTag:o?void 0:Ci(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:o?2:void 0,leqno:e.parser.settings.leqno},"display"),l=0,s={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",d=0;d<t[0].body.length;d++){c+=Co(t[0].body[d],"textord").text}n=Number(c),l=2*n}var u=!l;i.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var r=Co(e[t],"styling");Co(r.body[0],"ordgroup").body.unshift(s)}if(u)l<e.length&&(l=e.length);else{var a=e.length/2;if(n<a)throw new Hn("Too many math in a row: expected "+n+", but got "+a,e[0])}}));for(var m=0;m<l;++m){var h="r",p=0;m%2==1?h="l":m>0&&u&&(p=1),r[m]={type:"align",align:h,pregap:p,postgap:0}}return i.colSeparationType=u?"align":"alignat",i};Ei({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var n=(Bo(t[0])?[t[0]]:Co(t[0],"ordgroup").body).map((function(e){var t=No(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new Hn("Unknown column alignment: "+t,e)})),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Ni(e.parser,r,Bi(e.envName))},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],n="c",r={hskipBeforeAndAfter:!1,cols:[{type:"align",align:n}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),n=a.fetch().text,-1==="lcr".indexOf(n))throw new Hn("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),r.cols=[{type:"align",align:n}]}}var o=Ni(e.parser,r,Bi(e.envName)),i=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(i).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=Ni(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var n=(Bo(t[0])?[t[0]]:Co(t[0],"ordgroup").body).map((function(e){var t=No(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Hn("Unknown column alignment: "+t,e)}));if(n.length>1)throw new Hn("{subarray} can contain only one column");var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if((r=Ni(e.parser,r,"script")).body.length>0&&r.body[0].length>1)throw new Hn("{subarray} can contain only one column");return r},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=Ni(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Bi(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Oi,htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Gn.contains(["gather","gather*"],e.envName)&&_i(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Ci(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ni(e.parser,t,"display")},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Oi,htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){_i(e);var t={autoTag:Ci(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ni(e.parser,t,"display")},htmlBuilder:Mi,mathmlBuilder:Ai}),Ei({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(_i(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if("&"!==n&&"\\\\"!==n){if("\\end"===n){0===t[t.length-1].length&&t.pop();break}throw new Hn("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var r,a,o=[],i=[o],l=0;l<t.length;l++){for(var s=t[l],c={type:"styling",body:[],mode:"math",style:"display"},d=0;d<s.length;d++)if(jo(s[d])){o.push(c);var u=No(s[d+=1]).text,m=new Array(2);if(m[0]={type:"ordgroup",mode:"math",body:[]},m[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new Hn('Expected one of "<>AV=|." after @',s[d]);for(var h=0;h<2;h++){for(var p=!0,f=d+1;f<s.length;f++){if(a=u,("mathord"===(r=s[f]).type||"atom"===r.type)&&r.text===a){p=!1,d=f;break}if(jo(s[f]))throw new Hn("Missing a "+u+" character to complete a CD arrow.",s[f]);m[h].body.push(s[f])}if(p)throw new Hn("Missing a "+u+" character to complete a CD arrow.",s[d])}}var g={type:"styling",body:[Po(u,m,e)],mode:"math",style:"display"};o.push(g),c={type:"styling",body:[],mode:"math",style:"display"}}else c.body.push(s[d]);l%2==0?o.push(c):o.shift(),o=[],i.push(o)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}(e.parser)),htmlBuilder:Mi,mathmlBuilder:Ai}),Si("\\nonumber","\\gdef\\@eqnsw{0}"),Si("\\notag","\\nonumber"),Va({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Hn(e.funcName+" valid only within array environment")}});var Ii=xi;Va({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];if("ordgroup"!==a.type)throw new Hn("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=Co(a.body[i],"textord").text;if("\\begin"===r){if(!Ii.hasOwnProperty(o))throw new Hn("No such environment: "+o,a);var l=Ii[o],{args:s,optArgs:c}=n.parseArguments("\\begin{"+o+"}",l),d={mode:n.mode,envName:o,parser:n},u=l.handler(d,s,c);n.expect("\\end",!1);var m=n.nextToken,h=Co(n.parseFunction(),"environment");if(h.name!==o)throw new Hn("Mismatch: \\begin{"+o+"} matched by \\end{"+h.name+"}",m);return u}return{type:"environment",mode:n.mode,name:o,nameGroup:a}}});var Ri=(e,t)=>{var n=e.font,r=t.withFont(n);return oo(e.body,r)},Li=(e,t)=>{var n=e.font,r=t.withFont(n);return vo(e.body,r)},Di={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Va({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=Wa(t[0]),o=r;return o in Di&&(o=Di[o]),{type:"font",mode:n.mode,font:o.slice(1),body:a}},htmlBuilder:Ri,mathmlBuilder:Li}),Va({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0],a=Gn.isCharacterBox(r);return{type:"mclass",mode:n.mode,mclass:Do(r),body:[{type:"font",mode:n.mode,font:"boldsymbol",body:r}],isCharacterBox:a}}}),Va({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:a}=e,{mode:o}=n,i=n.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+r.slice(1),body:{type:"ordgroup",mode:n.mode,body:i}}},htmlBuilder:Ri,mathmlBuilder:Li});var $i=(e,t)=>{var n=t;return"display"===e?n=n.id>=ir.SCRIPT.id?n.text():ir.DISPLAY:"text"===e&&n.size===ir.DISPLAY.size?n=ir.TEXT:"script"===e?n=ir.SCRIPT:"scriptscript"===e&&(n=ir.SCRIPTSCRIPT),n},ji=(e,t)=>{var n,r=$i(e.size,t.style),a=r.fracNum(),o=r.fracDen();n=t.havingStyle(a);var i=oo(e.numer,n,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,s=3.5/t.fontMetrics().ptPerEm;i.height=i.height<l?l:i.height,i.depth=i.depth<s?s:i.depth}n=t.havingStyle(o);var c,d,u,m,h,p,f,g,b,v,y=oo(e.denom,n,t);if(e.hasBarLine?(e.barSize?(d=Tr(e.barSize,t),c=Ra.makeLineSpan("frac-line",t,d)):c=Ra.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),r.size===ir.DISPLAY.size||"display"===e.size?(m=t.fontMetrics().num1,h=d>0?3*u:7*u,p=t.fontMetrics().denom1):(d>0?(m=t.fontMetrics().num2,h=u):(m=t.fontMetrics().num3,h=3*u),p=t.fontMetrics().denom2),c){var w=t.fontMetrics().axisHeight;m-i.depth-(w+.5*d)<h&&(m+=h-(m-i.depth-(w+.5*d))),w-.5*d-(y.height-p)<h&&(p+=h-(w-.5*d-(y.height-p)));var x=-(w-.5*d);f=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:c,shift:x},{type:"elem",elem:i,shift:-m}]},t)}else{var E=m-i.depth-(y.height-p);E<h&&(m+=.5*(h-E),p+=.5*(h-E)),f=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:i,shift:-m}]},t)}return n=t.havingStyle(r),f.height*=n.sizeMultiplier/t.sizeMultiplier,f.depth*=n.sizeMultiplier/t.sizeMultiplier,g=r.size===ir.DISPLAY.size?t.fontMetrics().delim1:r.size===ir.SCRIPTSCRIPT.size?t.havingStyle(ir.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,b=null==e.leftDelim?ao(t,["mopen"]):pi.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(r),e.mode,["mopen"]),v=e.continued?Ra.makeSpan([]):null==e.rightDelim?ao(t,["mclose"]):pi.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(r),e.mode,["mclose"]),Ra.makeSpan(["mord"].concat(n.sizingClasses(t)),[b,Ra.makeSpan(["mfrac"],[f]),v],t)},Pi=(e,t)=>{var n=new mo.MathNode("mfrac",[vo(e.numer,t),vo(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var r=Tr(e.barSize,t);n.setAttribute("linethickness",_r(r))}}else n.setAttribute("linethickness","0px");var a=$i(e.size,t.style);if(a.size!==t.style.size){n=new mo.MathNode("mstyle",[n]);var o=a.size===ir.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",o),n.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var i=[];if(null!=e.leftDelim){var l=new mo.MathNode("mo",[new mo.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),i.push(l)}if(i.push(n),null!=e.rightDelim){var s=new mo.MathNode("mo",[new mo.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return po(i)}return n};Va({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var n,{parser:r,funcName:a}=e,o=t[0],i=t[1],l=null,s=null,c="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":n=!0;break;case"\\\\atopfrac":n=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":n=!1,l="(",s=")";break;case"\\\\bracefrac":n=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":n=!1,l="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text"}return{type:"genfrac",mode:r.mode,continued:!1,numer:o,denom:i,hasBarLine:n,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:ji,mathmlBuilder:Pi}),Va({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=t[1];return{type:"genfrac",mode:n.mode,continued:!0,numer:a,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Va({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:n,funcName:r,token:a}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:a}}});var qi=["display","text","script","scriptscript"],Fi=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Va({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var n,{parser:r}=e,a=t[4],o=t[5],i=Wa(t[0]),l="atom"===i.type&&"open"===i.family?Fi(i.text):null,s=Wa(t[1]),c="atom"===s.type&&"close"===s.family?Fi(s.text):null,d=Co(t[2],"size"),u=null;n=!!d.isBlank||(u=d.value).number>0;var m="auto",h=t[3];if("ordgroup"===h.type){if(h.body.length>0){var p=Co(h.body[0],"textord");m=qi[Number(p.text)]}}else h=Co(h,"textord"),m=qi[Number(h.text)];return{type:"genfrac",mode:r.mode,numer:a,denom:o,continued:!1,hasBarLine:n,barSize:u,leftDelim:l,rightDelim:c,size:m}},htmlBuilder:ji,mathmlBuilder:Pi}),Va({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:n,funcName:r,token:a}=e;return{type:"infix",mode:n.mode,replaceWith:"\\\\abovefrac",size:Co(t[0],"size").value,token:a}}}),Va({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(Co(t[1],"infix").size),i=t[2],l=o.number>0;return{type:"genfrac",mode:n.mode,numer:a,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:ji,mathmlBuilder:Pi});var Hi=(e,t)=>{var n,r,a=t.style;"supsub"===e.type?(n=e.sup?oo(e.sup,t.havingStyle(a.sup()),t):oo(e.sub,t.havingStyle(a.sub()),t),r=Co(e.base,"horizBrace")):r=Co(e,"horizBrace");var o,i=oo(r.base,t.havingBaseStyle(ir.DISPLAY)),l=_o(r,t);if(r.isOver?(o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:l}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(o=Ra.makeVList({positionType:"bottom",positionData:i.depth+.1+l.height,children:[{type:"elem",elem:l},{type:"kern",size:.1},{type:"elem",elem:i}]},t)).children[0].children[0].children[0].classes.push("svg-align"),n){var s=Ra.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t);o=r.isOver?Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:n}]},t):Ra.makeVList({positionType:"bottom",positionData:s.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return Ra.makeSpan(["mord",r.isOver?"mover":"munder"],[o],t)};Va({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:"horizBrace",mode:n.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:Hi,mathmlBuilder:(e,t)=>{var n=To(e.label);return new mo.MathNode(e.isOver?"mover":"munder",[vo(e.base,t),n])}}),Va({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],a=Co(t[0],"url").url;return n.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:n.mode,href:a,body:Ka(r)}:n.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=Ja(e.body,t,!1);return Ra.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=bo(e.body,t);return n instanceof co||(n=new co("mrow",[n])),n.setAttribute("href",e.href),n}}),Va({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Co(t[0],"url").url;if(!n.settings.isTrusted({command:"\\url",url:r}))return n.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var l={type:"text",mode:n.mode,font:"\\texttt",body:a};return{type:"href",mode:n.mode,href:r,body:Ka(l)}}}),Va({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:"hbox",mode:n.mode,body:Ka(t[0])}},htmlBuilder(e,t){var n=Ja(e.body,t,!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>new mo.MathNode("mrow",go(e.body,t))}),Va({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var n,{parser:r,funcName:a,token:o}=e,i=Co(t[0],"raw").string,l=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(a){case"\\htmlClass":s.class=i,n={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,n={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,n={command:"\\htmlStyle",style:i};break;case"\\htmlData":for(var c=i.split(","),d=0;d<c.length;d++){var u=c[d].split("=");if(2!==u.length)throw new Hn("Error parsing key-value for \\htmlData");s["data-"+u[0].trim()]=u[1].trim()}n={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(n)?{type:"html",mode:r.mode,attributes:s,body:Ka(l)}:r.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var n=Ja(e.body,t,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var a=Ra.makeSpan(r,n,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>bo(e.body,t)}),Va({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"htmlmathml",mode:n.mode,html:Ka(t[0]),mathml:Ka(t[1])}},htmlBuilder:(e,t)=>{var n=Ja(e.html,t,!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>bo(e.mathml,t)});var Vi=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Hn("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(t[1]+t[2]),unit:t[3]};if(!Sr(n))throw new Hn("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Va({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},l="";if(n[0])for(var s=Co(n[0],"raw").string.split(","),c=0;c<s.length;c++){var d=s[c].split("=");if(2===d.length){var u=d[1].trim();switch(d[0].trim()){case"alt":l=u;break;case"width":a=Vi(u);break;case"height":o=Vi(u);break;case"totalheight":i=Vi(u);break;default:throw new Hn("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var m=Co(t[0],"url").url;return""===l&&(l=(l=(l=m).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),r.settings.isTrusted({command:"\\includegraphics",url:m})?{type:"includegraphics",mode:r.mode,alt:l,width:a,height:o,totalheight:i,src:m}:r.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var n=Tr(e.height,t),r=0;e.totalheight.number>0&&(r=Tr(e.totalheight,t)-n);var a=0;e.width.number>0&&(a=Tr(e.width,t));var o={height:_r(n+r)};a>0&&(o.width=_r(a)),r>0&&(o.verticalAlign=_r(-r));var i=new Or(e.src,e.alt,o);return i.height=n,i.depth=r,i},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);var r=Tr(e.height,t),a=0;if(e.totalheight.number>0&&(a=Tr(e.totalheight,t)-r,n.setAttribute("valign",_r(-a))),n.setAttribute("height",_r(r+a)),e.width.number>0){var o=Tr(e.width,t);n.setAttribute("width",_r(o))}return n.setAttribute("src",e.src),n}}),Va({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=Co(t[0],"size");if(n.settings.strict){var o="m"===r[1],i="mu"===a.value.unit;o?(i||n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" supports only mu units, not "+a.value.unit+" units"),"math"!==n.mode&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" works only in math mode")):i&&n.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+r+" doesn't support mu units")}return{type:"kern",mode:n.mode,dimension:a.value}},htmlBuilder:(e,t)=>Ra.makeGlue(e.dimension,t),mathmlBuilder(e,t){var n=Tr(e.dimension,t);return new mo.SpaceNode(n)}}),Va({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"lap",mode:n.mode,alignment:r.slice(5),body:a}},htmlBuilder:(e,t)=>{var n;"clap"===e.alignment?(n=Ra.makeSpan([],[oo(e.body,t)]),n=Ra.makeSpan(["inner"],[n],t)):n=Ra.makeSpan(["inner"],[oo(e.body,t)]);var r=Ra.makeSpan(["fix"],[]),a=Ra.makeSpan([e.alignment],[n,r],t),o=Ra.makeSpan(["strut"]);return o.style.height=_r(a.height+a.depth),a.depth&&(o.style.verticalAlign=_r(-a.depth)),a.children.unshift(o),a=Ra.makeSpan(["thinbox"],[a],t),Ra.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mpadded",[vo(e.body,t)]);if("rlap"!==e.alignment){var r="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",r+"width")}return n.setAttribute("width","0px"),n}}),Va({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,a=r.mode;r.switchMode("math");var o="\\("===n?"\\)":"$",i=r.parseExpression(!1,o);return r.expect(o),r.switchMode(a),{type:"styling",mode:r.mode,style:"text",body:i}}}),Va({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Hn("Mismatched "+e.funcName)}});var Ui=(e,t)=>{switch(t.style.size){case ir.DISPLAY.size:return e.display;case ir.TEXT.size:return e.text;case ir.SCRIPT.size:return e.script;case ir.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Va({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:"mathchoice",mode:n.mode,display:Ka(t[0]),text:Ka(t[1]),script:Ka(t[2]),scriptscript:Ka(t[3])}},htmlBuilder:(e,t)=>{var n=Ui(e,t),r=Ja(n,t,!1);return Ra.makeFragment(r)},mathmlBuilder:(e,t)=>{var n=Ui(e,t);return bo(n,t)}});var Wi=(e,t,n,r,a,o,i)=>{e=Ra.makeSpan([],[e]);var l,s,c,d=n&&Gn.isCharacterBox(n);if(t){var u=oo(t,r.havingStyle(a.sup()),r);s={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var m=oo(n,r.havingStyle(a.sub()),r);l={elem:m,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-m.height)}}if(s&&l){var h=r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;c=Ra.makeVList({positionType:"bottom",positionData:h,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:_r(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:_r(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}else if(l){var p=e.height-i;c=Ra.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:_r(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},r)}else{if(!s)return e;var f=e.depth+i;c=Ra.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:_r(o)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]},r)}var g=[c];if(l&&0!==o&&!d){var b=Ra.makeSpan(["mspace"],[],r);b.style.marginRight=_r(o),g.unshift(b)}return Ra.makeSpan(["mop","op-limits"],g,r)},Ki=["\\smallint"],Gi=(e,t)=>{var n,r,a,o=!1;"supsub"===e.type?(n=e.sup,r=e.sub,a=Co(e.base,"op"),o=!0):a=Co(e,"op");var i,l=t.style,s=!1;if(l.size===ir.DISPLAY.size&&a.symbol&&!Gn.contains(Ki,a.name)&&(s=!0),a.symbol){var c=s?"Size2-Regular":"Size1-Regular",d="";if("\\oiint"!==a.name&&"\\oiiint"!==a.name||(d=a.name.slice(1),a.name="oiint"===d?"\\iint":"\\iiint"),i=Ra.makeSymbol(a.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var u=i.italic,m=Ra.staticSvg(d+"Size"+(s?"2":"1"),t);i=Ra.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:m,shift:s?.08:0}]},t),a.name="\\"+d,i.classes.unshift("mop"),i.italic=u}}else if(a.body){var h=Ja(a.body,t,!0);1===h.length&&h[0]instanceof Rr?(i=h[0]).classes[0]="mop":i=Ra.makeSpan(["mop"],h,t)}else{for(var p=[],f=1;f<a.name.length;f++)p.push(Ra.mathsym(a.name[f],a.mode,t));i=Ra.makeSpan(["mop"],p,t)}var g=0,b=0;return(i instanceof Rr||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(g=(i.height-i.depth)/2-t.fontMetrics().axisHeight,b=i.italic),o?Wi(i,n,r,t,l,b,g):(g&&(i.style.position="relative",i.style.top=_r(g)),i)},Zi=(e,t)=>{var n;if(e.symbol)n=new co("mo",[ho(e.name,e.mode)]),Gn.contains(Ki,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new co("mo",go(e.body,t));else{n=new co("mi",[new uo(e.name.slice(1))]);var r=new co("mo",[ho("⁡","text")]);n=e.parentIsSupSub?new co("mrow",[n,r]):so([n,r])}return n},Xi={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Va({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=r;return 1===a.length&&(a=Xi[a]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Ka(r)}},htmlBuilder:Gi,mathmlBuilder:Zi});var Yi={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Va({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Gi,mathmlBuilder:Zi}),Va({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e,r=n;return 1===r.length&&(r=Yi[r]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Gi,mathmlBuilder:Zi});var Qi=(e,t)=>{var n,r,a,o,i=!1;if("supsub"===e.type?(n=e.sup,r=e.sub,a=Co(e.base,"operatorname"),i=!0):a=Co(e,"operatorname"),a.body.length>0){for(var l=a.body.map((e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),s=Ja(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var d=s[c];d instanceof Rr&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Ra.makeSpan(["mop"],s,t)}else o=Ra.makeSpan(["mop"],[],t);return i?Wi(o,n,r,t,t.style,0,0):o};function Ji(e,t,n){for(var r=Ja(e,t,!1),a=t.sizeMultiplier/n.sizeMultiplier,o=0;o<r.length;o++){var i=r[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(r[o].classes,t.sizingClasses(n)):r[o].classes[i+1]==="reset-size"+t.size&&(r[o].classes[i+1]="reset-size"+n.size),r[o].height*=a,r[o].depth*=a}return Ra.makeFragment(r)}Va({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,a=t[0];return{type:"operatorname",mode:n.mode,body:Ka(a),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},htmlBuilder:Qi,mathmlBuilder:(e,t)=>{for(var n=go(e.body,t.withFont("mathrm")),r=!0,a=0;a<n.length;a++){var o=n[a];if(o instanceof mo.SpaceNode);else if(o instanceof mo.MathNode)switch(o.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":var i=o.children[0];1===o.children.length&&i instanceof mo.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break;default:r=!1}else r=!1}if(r){var l=n.map((e=>e.toText())).join("");n=[new mo.TextNode(l)]}var s=new mo.MathNode("mi",n);s.setAttribute("mathvariant","normal");var c=new mo.MathNode("mo",[ho("⁡","text")]);return e.parentIsSupSub?new mo.MathNode("mrow",[s,c]):mo.newDocumentFragment([s,c])}}),Si("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Ua({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Ra.makeFragment(Ja(e.body,t,!1)):Ra.makeSpan(["mord"],Ja(e.body,t,!0),t),mathmlBuilder:(e,t)=>bo(e.body,t,!0)}),Va({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:"overline",mode:n.mode,body:r}},htmlBuilder(e,t){var n=oo(e.body,t.havingCrampedStyle()),r=Ra.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r},{type:"kern",size:a}]},t);return Ra.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var n=new mo.MathNode("mo",[new mo.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new mo.MathNode("mover",[vo(e.body,t),n]);return r.setAttribute("accent","true"),r}}),Va({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"phantom",mode:n.mode,body:Ka(r)}},htmlBuilder:(e,t)=>{var n=Ja(e.body,t.withPhantom(),!1);return Ra.makeFragment(n)},mathmlBuilder:(e,t)=>{var n=go(e.body,t);return new mo.MathNode("mphantom",n)}}),Va({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"hphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan([],[oo(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(var r=0;r<n.children.length;r++)n.children[r].height=0,n.children[r].depth=0;return n=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t),Ra.makeSpan(["mord"],[n],t)},mathmlBuilder:(e,t)=>{var n=go(Ka(e.body),t),r=new mo.MathNode("mphantom",n),a=new mo.MathNode("mpadded",[r]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),Va({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:"vphantom",mode:n.mode,body:r}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan(["inner"],[oo(e.body,t.withPhantom())]),r=Ra.makeSpan(["fix"],[]);return Ra.makeSpan(["mord","rlap"],[n,r],t)},mathmlBuilder:(e,t)=>{var n=go(Ka(e.body),t),r=new mo.MathNode("mphantom",n),a=new mo.MathNode("mpadded",[r]);return a.setAttribute("width","0px"),a}}),Va({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Co(t[0],"size").value,a=t[1];return{type:"raisebox",mode:n.mode,dy:r,body:a}},htmlBuilder(e,t){var n=oo(e.body,t),r=Tr(e.dy,t);return Ra.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){var n=new mo.MathNode("mpadded",[vo(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute("voffset",r),n}}),Va({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Va({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var{parser:r}=e,a=n[0],o=Co(t[0],"size"),i=Co(t[1],"size");return{type:"rule",mode:r.mode,shift:a&&Co(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var n=Ra.makeSpan(["mord","rule"],[],t),r=Tr(e.width,t),a=Tr(e.height,t),o=e.shift?Tr(e.shift,t):0;return n.style.borderRightWidth=_r(r),n.style.borderTopWidth=_r(a),n.style.bottom=_r(o),n.width=r,n.height=a+o,n.depth=-o,n.maxFontSize=1.125*a*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Tr(e.width,t),r=Tr(e.height,t),a=e.shift?Tr(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new mo.MathNode("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",_r(n)),i.setAttribute("height",_r(r));var l=new mo.MathNode("mpadded",[i]);return a>=0?l.setAttribute("height",_r(a)):(l.setAttribute("height",_r(a)),l.setAttribute("depth",_r(-a))),l.setAttribute("voffset",_r(a)),l}});var el=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Va({type:"sizing",names:el,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!1,n);return{type:"sizing",mode:a.mode,size:el.indexOf(r)+1,body:o}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Ji(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=go(e.body,n),a=new mo.MathNode("mstyle",r);return a.setAttribute("mathsize",_r(n.sizeMultiplier)),a}}),Va({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,a=!1,o=!1,i=n[0]&&Co(n[0],"ordgroup");if(i)for(var l="",s=0;s<i.body.length;++s){if("t"===(l=i.body[s].text))a=!0;else{if("b"!==l){a=!1,o=!1;break}o=!0}}else a=!0,o=!0;var c=t[0];return{type:"smash",mode:r.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var n=Ra.makeSpan([],[oo(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(var r=0;r<n.children.length;r++)n.children[r].height=0;if(e.smashDepth&&(n.depth=0,n.children))for(var a=0;a<n.children.length;a++)n.children[a].depth=0;var o=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var n=new mo.MathNode("mpadded",[vo(e.body,t)]);return e.smashHeight&&n.setAttribute("height","0px"),e.smashDepth&&n.setAttribute("depth","0px"),n}}),Va({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,a=n[0],o=t[0];return{type:"sqrt",mode:r.mode,body:o,index:a}},htmlBuilder(e,t){var n=oo(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=Ra.wrapFragment(n,t);var r=t.fontMetrics().defaultRuleThickness,a=r;t.style.id<ir.TEXT.id&&(a=t.fontMetrics().xHeight);var o=r+a/4,i=n.height+n.depth+o+r,{span:l,ruleWidth:s,advanceWidth:c}=pi.sqrtImage(i,t),d=l.height-s;d>n.height+n.depth+o&&(o=(o+d-n.height-n.depth)/2);var u=l.height-n.height-o-s;n.style.paddingLeft=_r(c);var m=Ra.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var h=t.havingStyle(ir.SCRIPTSCRIPT),p=oo(e.index,h,t),f=.6*(m.height-m.depth),g=Ra.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:p}]},t),b=Ra.makeSpan(["root"],[g]);return Ra.makeSpan(["mord","sqrt"],[b,m],t)}return Ra.makeSpan(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new mo.MathNode("mroot",[vo(n,t),vo(r,t)]):new mo.MathNode("msqrt",[vo(n,t)])}});var tl={display:ir.DISPLAY,text:ir.TEXT,script:ir.SCRIPT,scriptscript:ir.SCRIPTSCRIPT};Va({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:a}=e,o=a.parseExpression(!0,n),i=r.slice(1,r.length-5);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var n=tl[e.style],r=t.havingStyle(n).withFont("");return Ji(e.body,r,t)},mathmlBuilder(e,t){var n=tl[e.style],r=t.havingStyle(n),a=go(e.body,r),o=new mo.MathNode("mstyle",a),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return o.setAttribute("scriptlevel",i[0]),o.setAttribute("displaystyle",i[1]),o}});Ua({type:"supsub",htmlBuilder(e,t){var n=function(e,t){var n=e.base;return n?"op"===n.type?n.limits&&(t.style.size===ir.DISPLAY.size||n.alwaysHandleSupSub)?Gi:null:"operatorname"===n.type?n.alwaysHandleSupSub&&(t.style.size===ir.DISPLAY.size||n.limits)?Qi:null:"accent"===n.type?Gn.isCharacterBox(n.base)?Mo:null:"horizBrace"===n.type&&!e.sub===n.isOver?Hi:null:null}(e,t);if(n)return n(e,t);var r,a,o,{base:i,sup:l,sub:s}=e,c=oo(i,t),d=t.fontMetrics(),u=0,m=0,h=i&&Gn.isCharacterBox(i);if(l){var p=t.havingStyle(t.style.sup());r=oo(l,p,t),h||(u=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(s){var f=t.havingStyle(t.style.sub());a=oo(s,f,t),h||(m=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===ir.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var g,b=t.sizeMultiplier,v=_r(.5/d.ptPerEm/b),y=null;if(a){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof Rr||w)&&(y=_r(-c.italic))}if(r&&a){u=Math.max(u,o,r.depth+.25*d.xHeight),m=Math.max(m,d.sub2);var x=4*d.defaultRuleThickness;if(u-r.depth-(a.height-m)<x){m=x-(u-r.depth)+a.height;var E=.8*d.xHeight-(u-r.depth);E>0&&(u+=E,m-=E)}var k=[{type:"elem",elem:a,shift:m,marginRight:v,marginLeft:y},{type:"elem",elem:r,shift:-u,marginRight:v}];g=Ra.makeVList({positionType:"individualShift",children:k},t)}else if(a){m=Math.max(m,d.sub1,a.height-.8*d.xHeight);var S=[{type:"elem",elem:a,marginLeft:y,marginRight:v}];g=Ra.makeVList({positionType:"shift",positionData:m,children:S},t)}else{if(!r)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,r.depth+.25*d.xHeight),g=Ra.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:r,marginRight:v}]},t)}var T=ro(c,"right")||"mord";return Ra.makeSpan([T],[c,Ra.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var n,r=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(r=!0,n=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[vo(e.base,t)];if(e.sub&&o.push(vo(e.sub,t)),e.sup&&o.push(vo(e.sup,t)),r)a=n?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===ir.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===ir.DISPLAY||i.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===ir.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===ir.DISPLAY)?"munder":"msub"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===ir.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===ir.DISPLAY)?"mover":"msup"}return new mo.MathNode(a,o)}}),Ua({type:"atom",htmlBuilder:(e,t)=>Ra.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var n=new mo.MathNode("mo",[ho(e.text,e.mode)]);if("bin"===e.family){var r=fo(e,t);"bold-italic"===r&&n.setAttribute("mathvariant",r)}else"punct"===e.family?n.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||n.setAttribute("stretchy","false");return n}});var nl={mi:"italic",mn:"normal",mtext:"normal"};Ua({type:"mathord",htmlBuilder:(e,t)=>Ra.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var n=new mo.MathNode("mi",[ho(e.text,e.mode,t)]),r=fo(e,t)||"italic";return r!==nl[n.type]&&n.setAttribute("mathvariant",r),n}}),Ua({type:"textord",htmlBuilder:(e,t)=>Ra.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var n,r=ho(e.text,e.mode,t),a=fo(e,t)||"normal";return n="text"===e.mode?new mo.MathNode("mtext",[r]):/[0-9]/.test(e.text)?new mo.MathNode("mn",[r]):"\\prime"===e.text?new mo.MathNode("mo",[r]):new mo.MathNode("mi",[r]),a!==nl[n.type]&&n.setAttribute("mathvariant",a),n}});var rl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},al={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ua({type:"spacing",htmlBuilder(e,t){if(al.hasOwnProperty(e.text)){var n=al[e.text].className||"";if("text"===e.mode){var r=Ra.makeOrd(e,t,"textord");return r.classes.push(n),r}return Ra.makeSpan(["mspace",n],[Ra.mathsym(e.text,e.mode,t)],t)}if(rl.hasOwnProperty(e.text))return Ra.makeSpan(["mspace",rl[e.text]],[],t);throw new Hn('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!al.hasOwnProperty(e.text)){if(rl.hasOwnProperty(e.text))return new mo.MathNode("mspace");throw new Hn('Unknown type of space "'+e.text+'"')}return new mo.MathNode("mtext",[new mo.TextNode(" ")])}});var ol=()=>{var e=new mo.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Ua({type:"tag",mathmlBuilder(e,t){var n=new mo.MathNode("mtable",[new mo.MathNode("mtr",[ol(),new mo.MathNode("mtd",[bo(e.body,t)]),ol(),new mo.MathNode("mtd",[bo(e.tag,t)])])]);return n.setAttribute("width","100%"),n}});var il={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ll={"\\textbf":"textbf","\\textmd":"textmd"},sl={"\\textit":"textit","\\textup":"textup"},cl=(e,t)=>{var n=e.font;return n?il[n]?t.withTextFontFamily(il[n]):ll[n]?t.withTextFontWeight(ll[n]):t.withTextFontShape(sl[n]):t};Va({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,a=t[0];return{type:"text",mode:n.mode,body:Ka(a),font:r}},htmlBuilder(e,t){var n=cl(e,t),r=Ja(e.body,n,!0);return Ra.makeSpan(["mord","text"],r,n)},mathmlBuilder(e,t){var n=cl(e,t);return bo(e.body,n)}}),Va({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:"underline",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=oo(e.body,t),r=Ra.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Ra.makeVList({positionType:"top",positionData:n.height,children:[{type:"kern",size:a},{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n}]},t);return Ra.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var n=new mo.MathNode("mo",[new mo.TextNode("‾")]);n.setAttribute("stretchy","true");var r=new mo.MathNode("munder",[vo(e.body,t),n]);return r.setAttribute("accentunder","true"),r}}),Va({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:"vcenter",mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=oo(e.body,t),r=t.fontMetrics().axisHeight,a=.5*(n.height-r-(n.depth+r));return Ra.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:n}]},t)},mathmlBuilder:(e,t)=>new mo.MathNode("mpadded",[vo(e.body,t)],["vcenter"])}),Va({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Hn("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var n=dl(e),r=[],a=t.havingStyle(t.style.text()),o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),r.push(Ra.makeSymbol(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Ra.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Ra.tryCombineChars(r),a)},mathmlBuilder(e,t){var n=new mo.TextNode(dl(e)),r=new mo.MathNode("mtext",[n]);return r.setAttribute("mathvariant","monospace"),r}});var dl=e=>e.body.replace(/ /g,e.star?"␣":" "),ul=qa,ml="[ \r\n\t]",hl="(\\\\[a-zA-Z@]+)"+ml+"*",pl="[̀-ͯ]",fl=new RegExp(pl+"+$"),gl="("+ml+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+pl+"*|[\ud800-\udbff][\udc00-\udfff]"+pl+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+hl+"|\\\\[^\ud800-\udfff])";class bl{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(gl,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Fn("EOF",new qn(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new Hn("Unexpected character: '"+e[t]+"'",new Fn(e[t],new qn(this,t,t+1)));var r=n[6]||n[3]||(n[2]?"\\ ":" ");if(14===this.catcodes[r]){var a=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===a?(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=a+1,this.lex()}return new Fn(r,new qn(this,t,this.tokenRegex.lastIndex))}}class vl{constructor(e,t){void 0===e&&(e={}),void 0===t&&(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(0===this.undefStack.length)throw new Hn("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(void 0===n&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var yl=ki;Si("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Si("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Si("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Si("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Si("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return 1===t[0].length&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Si("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Si("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var wl={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};Si("\\char",(function(e){var t,n=e.popToken(),r="";if("'"===n.text)t=8,n=e.popToken();else if('"'===n.text)t=16,n=e.popToken();else if("`"===n.text)if("\\"===(n=e.popToken()).text[0])r=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new Hn("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(null==(r=wl[n.text])||r>=t)throw new Hn("Invalid base-"+t+" digit "+n.text);for(var a;null!=(a=wl[e.future().text])&&a<t;)r*=t,r+=a,e.popToken()}return"\\@char{"+r+"}"}));var xl=(e,t,n)=>{var r=e.consumeArg().tokens;if(1!==r.length)throw new Hn("\\newcommand's first argument must be a macro name");var a=r[0].text,o=e.isDefined(a);if(o&&!t)throw new Hn("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!n)throw new Hn("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var i=0;if(1===(r=e.consumeArg().tokens).length&&"["===r[0].text){for(var l="",s=e.expandNextToken();"]"!==s.text&&"EOF"!==s.text;)l+=s.text,s=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Hn("Invalid number of arguments: "+l);i=parseInt(l),r=e.consumeArg().tokens}return e.macros.set(a,{tokens:r,numArgs:i}),""};Si("\\newcommand",(e=>xl(e,!1,!0))),Si("\\renewcommand",(e=>xl(e,!0,!1))),Si("\\providecommand",(e=>xl(e,!0,!0))),Si("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Si("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Si("\\show",(e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ul[n],Fr.math[n],Fr.text[n]),""})),Si("\\bgroup","{"),Si("\\egroup","}"),Si("~","\\nobreakspace"),Si("\\lq","`"),Si("\\rq","'"),Si("\\aa","\\r a"),Si("\\AA","\\r A"),Si("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Si("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Si("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Si("ℬ","\\mathscr{B}"),Si("ℰ","\\mathscr{E}"),Si("ℱ","\\mathscr{F}"),Si("ℋ","\\mathscr{H}"),Si("ℐ","\\mathscr{I}"),Si("ℒ","\\mathscr{L}"),Si("ℳ","\\mathscr{M}"),Si("ℛ","\\mathscr{R}"),Si("ℭ","\\mathfrak{C}"),Si("ℌ","\\mathfrak{H}"),Si("ℨ","\\mathfrak{Z}"),Si("\\Bbbk","\\Bbb{k}"),Si("·","\\cdotp"),Si("\\llap","\\mathllap{\\textrm{#1}}"),Si("\\rlap","\\mathrlap{\\textrm{#1}}"),Si("\\clap","\\mathclap{\\textrm{#1}}"),Si("\\mathstrut","\\vphantom{(}"),Si("\\underbar","\\underline{\\text{#1}}"),Si("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Si("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Si("\\ne","\\neq"),Si("≠","\\neq"),Si("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Si("∉","\\notin"),Si("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Si("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Si("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Si("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Si("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Si("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Si("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Si("⟂","\\perp"),Si("‼","\\mathclose{!\\mkern-0.8mu!}"),Si("∌","\\notni"),Si("⌜","\\ulcorner"),Si("⌝","\\urcorner"),Si("⌞","\\llcorner"),Si("⌟","\\lrcorner"),Si("©","\\copyright"),Si("®","\\textregistered"),Si("️","\\textregistered"),Si("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Si("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Si("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Si("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Si("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Si("⋮","\\vdots"),Si("\\varGamma","\\mathit{\\Gamma}"),Si("\\varDelta","\\mathit{\\Delta}"),Si("\\varTheta","\\mathit{\\Theta}"),Si("\\varLambda","\\mathit{\\Lambda}"),Si("\\varXi","\\mathit{\\Xi}"),Si("\\varPi","\\mathit{\\Pi}"),Si("\\varSigma","\\mathit{\\Sigma}"),Si("\\varUpsilon","\\mathit{\\Upsilon}"),Si("\\varPhi","\\mathit{\\Phi}"),Si("\\varPsi","\\mathit{\\Psi}"),Si("\\varOmega","\\mathit{\\Omega}"),Si("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Si("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Si("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Si("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Si("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Si("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var El={",":"\\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"};Si("\\dots",(function(e){var t="\\dotso",n=e.expandAfterFuture().text;return n in El?t=El[n]:("\\not"===n.slice(0,4)||n in Fr.math&&Gn.contains(["bin","rel"],Fr.math[n].group))&&(t="\\dotsb"),t}));var kl={")":!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};Si("\\dotso",(function(e){return e.future().text in kl?"\\ldots\\,":"\\ldots"})),Si("\\dotsc",(function(e){var t=e.future().text;return t in kl&&","!==t?"\\ldots\\,":"\\ldots"})),Si("\\cdots",(function(e){return e.future().text in kl?"\\@cdots\\,":"\\@cdots"})),Si("\\dotsb","\\cdots"),Si("\\dotsm","\\cdots"),Si("\\dotsi","\\!\\cdots"),Si("\\dotsx","\\ldots\\,"),Si("\\DOTSI","\\relax"),Si("\\DOTSB","\\relax"),Si("\\DOTSX","\\relax"),Si("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Si("\\,","\\tmspace+{3mu}{.1667em}"),Si("\\thinspace","\\,"),Si("\\>","\\mskip{4mu}"),Si("\\:","\\tmspace+{4mu}{.2222em}"),Si("\\medspace","\\:"),Si("\\;","\\tmspace+{5mu}{.2777em}"),Si("\\thickspace","\\;"),Si("\\!","\\tmspace-{3mu}{.1667em}"),Si("\\negthinspace","\\!"),Si("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Si("\\negthickspace","\\tmspace-{5mu}{.277em}"),Si("\\enspace","\\kern.5em "),Si("\\enskip","\\hskip.5em\\relax"),Si("\\quad","\\hskip1em\\relax"),Si("\\qquad","\\hskip2em\\relax"),Si("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Si("\\tag@paren","\\tag@literal{({#1})}"),Si("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Hn("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Si("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Si("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Si("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Si("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Si("\\newline","\\\\\\relax"),Si("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Sl=_r(hr["Main-Regular"]["T".charCodeAt(0)][1]-.7*hr["Main-Regular"]["A".charCodeAt(0)][1]);Si("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Sl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Si("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Sl+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Si("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Si("\\@hspace","\\hskip #1\\relax"),Si("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Si("\\ordinarycolon",":"),Si("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Si("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Si("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Si("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Si("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Si("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Si("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Si("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Si("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Si("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Si("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Si("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Si("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Si("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Si("∷","\\dblcolon"),Si("∹","\\eqcolon"),Si("≔","\\coloneqq"),Si("≕","\\eqqcolon"),Si("⩴","\\Coloneqq"),Si("\\ratio","\\vcentcolon"),Si("\\coloncolon","\\dblcolon"),Si("\\colonequals","\\coloneqq"),Si("\\coloncolonequals","\\Coloneqq"),Si("\\equalscolon","\\eqqcolon"),Si("\\equalscoloncolon","\\Eqqcolon"),Si("\\colonminus","\\coloneq"),Si("\\coloncolonminus","\\Coloneq"),Si("\\minuscolon","\\eqcolon"),Si("\\minuscoloncolon","\\Eqcolon"),Si("\\coloncolonapprox","\\Colonapprox"),Si("\\coloncolonsim","\\Colonsim"),Si("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Si("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Si("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Si("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Si("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Si("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Si("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Si("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Si("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Si("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Si("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Si("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Si("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Si("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Si("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Si("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Si("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Si("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Si("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Si("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Si("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Si("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Si("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Si("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Si("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Si("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Si("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Si("\\imath","\\html@mathml{\\@imath}{ı}"),Si("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Si("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Si("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Si("⟦","\\llbracket"),Si("⟧","\\rrbracket"),Si("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Si("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Si("⦃","\\lBrace"),Si("⦄","\\rBrace"),Si("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Si("⦵","\\minuso"),Si("\\darr","\\downarrow"),Si("\\dArr","\\Downarrow"),Si("\\Darr","\\Downarrow"),Si("\\lang","\\langle"),Si("\\rang","\\rangle"),Si("\\uarr","\\uparrow"),Si("\\uArr","\\Uparrow"),Si("\\Uarr","\\Uparrow"),Si("\\N","\\mathbb{N}"),Si("\\R","\\mathbb{R}"),Si("\\Z","\\mathbb{Z}"),Si("\\alef","\\aleph"),Si("\\alefsym","\\aleph"),Si("\\Alpha","\\mathrm{A}"),Si("\\Beta","\\mathrm{B}"),Si("\\bull","\\bullet"),Si("\\Chi","\\mathrm{X}"),Si("\\clubs","\\clubsuit"),Si("\\cnums","\\mathbb{C}"),Si("\\Complex","\\mathbb{C}"),Si("\\Dagger","\\ddagger"),Si("\\diamonds","\\diamondsuit"),Si("\\empty","\\emptyset"),Si("\\Epsilon","\\mathrm{E}"),Si("\\Eta","\\mathrm{H}"),Si("\\exist","\\exists"),Si("\\harr","\\leftrightarrow"),Si("\\hArr","\\Leftrightarrow"),Si("\\Harr","\\Leftrightarrow"),Si("\\hearts","\\heartsuit"),Si("\\image","\\Im"),Si("\\infin","\\infty"),Si("\\Iota","\\mathrm{I}"),Si("\\isin","\\in"),Si("\\Kappa","\\mathrm{K}"),Si("\\larr","\\leftarrow"),Si("\\lArr","\\Leftarrow"),Si("\\Larr","\\Leftarrow"),Si("\\lrarr","\\leftrightarrow"),Si("\\lrArr","\\Leftrightarrow"),Si("\\Lrarr","\\Leftrightarrow"),Si("\\Mu","\\mathrm{M}"),Si("\\natnums","\\mathbb{N}"),Si("\\Nu","\\mathrm{N}"),Si("\\Omicron","\\mathrm{O}"),Si("\\plusmn","\\pm"),Si("\\rarr","\\rightarrow"),Si("\\rArr","\\Rightarrow"),Si("\\Rarr","\\Rightarrow"),Si("\\real","\\Re"),Si("\\reals","\\mathbb{R}"),Si("\\Reals","\\mathbb{R}"),Si("\\Rho","\\mathrm{P}"),Si("\\sdot","\\cdot"),Si("\\sect","\\S"),Si("\\spades","\\spadesuit"),Si("\\sub","\\subset"),Si("\\sube","\\subseteq"),Si("\\supe","\\supseteq"),Si("\\Tau","\\mathrm{T}"),Si("\\thetasym","\\vartheta"),Si("\\weierp","\\wp"),Si("\\Zeta","\\mathrm{Z}"),Si("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Si("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Si("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Si("\\bra","\\mathinner{\\langle{#1}|}"),Si("\\ket","\\mathinner{|{#1}\\rangle}"),Si("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Si("\\Bra","\\left\\langle#1\\right|"),Si("\\Ket","\\left|#1\\right\\rangle");var Tl=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.consumeArg().tokens,i=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var s=t=>n=>{e&&(n.macros.set("|",i),a.length&&n.macros.set("\\|",l));var o=t;!t&&a.length&&("|"===n.future().text&&(n.popToken(),o=!0));return{tokens:o?a:r,numArgs:0}};t.macros.set("|",s(!1)),a.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Si("\\bra@ket",Tl(!1)),Si("\\bra@set",Tl(!0)),Si("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Si("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Si("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Si("\\angln","{\\angl n}"),Si("\\blue","\\textcolor{##6495ed}{#1}"),Si("\\orange","\\textcolor{##ffa500}{#1}"),Si("\\pink","\\textcolor{##ff00af}{#1}"),Si("\\red","\\textcolor{##df0030}{#1}"),Si("\\green","\\textcolor{##28ae7b}{#1}"),Si("\\gray","\\textcolor{gray}{#1}"),Si("\\purple","\\textcolor{##9d38bd}{#1}"),Si("\\blueA","\\textcolor{##ccfaff}{#1}"),Si("\\blueB","\\textcolor{##80f6ff}{#1}"),Si("\\blueC","\\textcolor{##63d9ea}{#1}"),Si("\\blueD","\\textcolor{##11accd}{#1}"),Si("\\blueE","\\textcolor{##0c7f99}{#1}"),Si("\\tealA","\\textcolor{##94fff5}{#1}"),Si("\\tealB","\\textcolor{##26edd5}{#1}"),Si("\\tealC","\\textcolor{##01d1c1}{#1}"),Si("\\tealD","\\textcolor{##01a995}{#1}"),Si("\\tealE","\\textcolor{##208170}{#1}"),Si("\\greenA","\\textcolor{##b6ffb0}{#1}"),Si("\\greenB","\\textcolor{##8af281}{#1}"),Si("\\greenC","\\textcolor{##74cf70}{#1}"),Si("\\greenD","\\textcolor{##1fab54}{#1}"),Si("\\greenE","\\textcolor{##0d923f}{#1}"),Si("\\goldA","\\textcolor{##ffd0a9}{#1}"),Si("\\goldB","\\textcolor{##ffbb71}{#1}"),Si("\\goldC","\\textcolor{##ff9c39}{#1}"),Si("\\goldD","\\textcolor{##e07d10}{#1}"),Si("\\goldE","\\textcolor{##a75a05}{#1}"),Si("\\redA","\\textcolor{##fca9a9}{#1}"),Si("\\redB","\\textcolor{##ff8482}{#1}"),Si("\\redC","\\textcolor{##f9685d}{#1}"),Si("\\redD","\\textcolor{##e84d39}{#1}"),Si("\\redE","\\textcolor{##bc2612}{#1}"),Si("\\maroonA","\\textcolor{##ffbde0}{#1}"),Si("\\maroonB","\\textcolor{##ff92c6}{#1}"),Si("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Si("\\maroonD","\\textcolor{##ca337c}{#1}"),Si("\\maroonE","\\textcolor{##9e034e}{#1}"),Si("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Si("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Si("\\purpleC","\\textcolor{##aa87ff}{#1}"),Si("\\purpleD","\\textcolor{##7854ab}{#1}"),Si("\\purpleE","\\textcolor{##543b78}{#1}"),Si("\\mintA","\\textcolor{##f5f9e8}{#1}"),Si("\\mintB","\\textcolor{##edf2df}{#1}"),Si("\\mintC","\\textcolor{##e0e5cc}{#1}"),Si("\\grayA","\\textcolor{##f6f7f7}{#1}"),Si("\\grayB","\\textcolor{##f0f1f2}{#1}"),Si("\\grayC","\\textcolor{##e3e5e6}{#1}"),Si("\\grayD","\\textcolor{##d6d8da}{#1}"),Si("\\grayE","\\textcolor{##babec2}{#1}"),Si("\\grayF","\\textcolor{##888d93}{#1}"),Si("\\grayG","\\textcolor{##626569}{#1}"),Si("\\grayH","\\textcolor{##3b3e40}{#1}"),Si("\\grayI","\\textcolor{##21242c}{#1}"),Si("\\kaBlue","\\textcolor{##314453}{#1}"),Si("\\kaGreen","\\textcolor{##71B307}{#1}");var _l={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class Cl{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 vl(yl,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new bl(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&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){var t,n,r;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:r,end:n}=this.consumeArg(["]"]))}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new Fn("EOF",n.loc)),this.pushTokens(r),t.range(n,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r,a=this.future(),o=0,i=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++o;else if("}"===r.text){if(-1===--o)throw new Hn("Extra }",r)}else if("EOF"===r.text)throw new Hn("Unexpected end of input in a macro argument, expected '"+(e&&n?e[i]:"}")+"'",r);if(e&&n)if((0===o||1===o&&"{"===e[i])&&r.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||n);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:r}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Hn("The length of delimiters doesn't match the number of args!");for(var n=t[0],r=0;r<n.length;r++){var a=this.popToken();if(n[r]!==a.text)throw new Hn("Use of the macro doesn't match its definition",a)}}for(var o=[],i=0;i<e;i++)o.push(this.consumeArg(t&&t[i+1]).tokens);return o}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Hn("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(null==r||e&&r.unexpandable){if(e&&null==r&&"\\"===n[0]&&!this.isDefined(n))throw new Hn("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);var a=r.tokens,o=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var l=a[i];if("#"===l.text){if(0===i)throw new Hn("Incomplete placeholder at end of macro body",l);if("#"===(l=a[--i]).text)a.splice(i+1,1);else{if(!/^[1-9]$/.test(l.text))throw new Hn("Not a valid argument number",l);a.splice(i,2,...o[+l.text-1])}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Fn(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){var r=this.stack.pop();r.treatAsRelax&&(r.noexpand=!1,r.treatAsRelax=!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map((e=>e.text)).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var n=this.lexer.catcodes[e];if(null!=n&&13!==n)return}var r="function"==typeof t?t(this):t;if("string"==typeof r){var a=0;if(-1!==r.indexOf("#"))for(var o=r.replace(/##/g,"");-1!==o.indexOf("#"+(a+1));)++a;for(var i=new bl(r,this.settings),l=[],s=i.lex();"EOF"!==s.text;)l.push(s),s=i.lex();return l.reverse(),{tokens:l,numArgs:a}}return r}isDefined(e){return this.macros.has(e)||ul.hasOwnProperty(e)||Fr.math.hasOwnProperty(e)||Fr.text.hasOwnProperty(e)||_l.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:ul.hasOwnProperty(e)&&!ul[e].primitive}}var Nl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Bl=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Ml={"́":{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"}},zl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class Al{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 Cl(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new Hn("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(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{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new Fn("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,n}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var r=this.fetch();if(-1!==Al.endOfExpression.indexOf(r.text))break;if(t&&r.text===t)break;if(e&&ul[r.text]&&ul[r.text].infix)break;var a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&n.push(a)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var t,n=-1,r=0;r<e.length;r++)if("infix"===e[r].type){if(-1!==n)throw new Hn("only one infix operator per group",e[r].token);n=r,t=e[r].replaceWith}if(-1!==n&&t){var a,o,i=e.slice(0,n),l=e.slice(n+1);return a=1===i.length&&"ordgroup"===i[0].type?i[0]:{type:"ordgroup",mode:this.mode,body:i},o=1===l.length&&"ordgroup"===l[0].type?l[0]:{type:"ordgroup",mode:this.mode,body:l},["\\\\abovefrac"===t?this.callFunction(t,[a,e[n],o],[]):this.callFunction(t,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r=this.parseGroup(e);if(!r)throw new Hn("Expected group after '"+n+"'",t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:"textord",mode:"text",text:e[n]});var r={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t,n,r=this.parseGroup("atom",e);if("text"===this.mode)return r;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(r&&"op"===r.type){var o="\\limits"===a.text;r.limits=o,r.alwaysHandleSupSub=!0}else{if(!r||"operatorname"!==r.type)throw new Hn("Limit controls must follow a math operator",a);r.alwaysHandleSupSub&&(r.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new Hn("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(n)throw new Hn("Double subscript",a);n=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new Hn("Double superscript",a);var i={type:"textord",mode:this.mode,text:"\\prime"},l=[i];for(this.consume();"'"===this.fetch().text;)l.push(i),this.consume();"^"===this.fetch().text&&l.push(this.handleSupSubscript("superscript")),t={type:"ordgroup",mode:this.mode,body:l}}else{if(!Bl[a.text])break;var s=Nl.test(a.text),c=[];for(c.push(new Fn(Bl[a.text])),this.consume();;){var d=this.fetch().text;if(!Bl[d])break;if(Nl.test(d)!==s)break;c.unshift(new Fn(Bl[d])),this.consume()}var u=this.subparse(c);s?n={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||n?{type:"supsub",mode:this.mode,base:r,sup:t,sub:n}:r}parseFunction(e,t){var n=this.fetch(),r=n.text,a=ul[r];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new Hn("Got function '"+r+"' with no arguments"+(t?" as "+t:""),n);if("text"===this.mode&&!a.allowedInText)throw new Hn("Can't use function '"+r+"' in text mode",n);if("math"===this.mode&&!1===a.allowedInMath)throw new Hn("Can't use function '"+r+"' in math mode",n);var{args:o,optArgs:i}=this.parseArguments(r,a);return this.callFunction(r,o,i,n,e)}callFunction(e,t,n,r,a){var o={funcName:e,parser:this,token:r,breakOnTokenText:a},i=ul[e];if(i&&i.handler)return i.handler(o,t,n);throw new Hn("No function handler for "+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(0===n)return{args:[],optArgs:[]};for(var r=[],a=[],o=0;o<n;o++){var i=t.argTypes&&t.argTypes[o],l=o<t.numOptionalArgs;(t.primitive&&null==i||"sqrt"===t.type&&1===o&&null==a[0])&&(i="primitive");var s=this.parseGroupOfType("argument to '"+e+"'",i,l);if(l)a.push(s);else{if(null==s)throw new Hn("Null argument, please report this as a bug");r.push(s)}}return{args:r,optArgs:a}}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":var r=this.parseArgumentGroup(n,"text");return null!=r?{type:"styling",mode:r.mode,body:[r],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",n);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(n)throw new Hn("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Hn("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Hn("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(null==n)return null;for(var r,a="";"EOF"!==(r=this.fetch()).text;)a+=r.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(e,t){for(var n,r=this.fetch(),a=r,o="";"EOF"!==(n=this.fetch()).text&&e.test(o+n.text);)o+=(a=n).text,this.consume();if(""===o)throw new Hn("Invalid "+t+": '"+r.text+"'",r);return r.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var n=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Hn("Invalid color: '"+t.text+"'",t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r="#"+r),{type:"color-token",mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Hn("Invalid size: '"+t.text+"'",t);var a={number:+(r[1]+r[2]),unit:r[3]};if(!Sr(a))throw new Hn("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);var t=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==t)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(null==n)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var o={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return t&&this.switchMode(r),o}parseGroup(e,t){var n,r=this.fetch(),a=r.text;if("{"===a||"\\begingroup"===a){this.consume();var o="{"===a?"}":"\\endgroup";this.gullet.beginGroup();var i=this.parseExpression(!1,o),l=this.fetch();this.expect(o),this.gullet.endGroup(),n={type:"ordgroup",mode:this.mode,loc:qn.range(r,l),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(n=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!_l.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Hn("Undefined control sequence: "+a,r);n=this.formatUnsupportedCmd(a),this.consume()}return n}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n],a=r.text;"-"===a&&"-"===e[n+1].text&&(n+1<t&&"-"===e[n+2].text?(e.splice(n,3,{type:"textord",mode:"text",loc:qn.range(r,e[n+2]),text:"---"}),t-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:qn.range(r,e[n+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[n+1].text!==a||(e.splice(n,2,{type:"textord",mode:"text",loc:qn.range(r,e[n+1]),text:a+a}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r="*"===n.charAt(0);if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Hn("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:r}}zl.hasOwnProperty(t[0])&&!Fr[this.mode][t[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+t[0]+'" used in math mode',e),t=zl[t[0]]+t.slice(1));var a,o=fl.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),Fr[this.mode][t]){this.settings.strict&&"math"===this.mode&&wa.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,l=Fr[this.mode][t].group,s=qn.range(e);if(Pr.hasOwnProperty(l)){var c=l;i={type:"atom",mode:this.mode,family:c,loc:s,text:t}}else i={type:l,mode:this.mode,loc:s,text:t};a=i}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(cr(t.charCodeAt(0))?"math"===this.mode&&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)),a={type:"textord",mode:"text",loc:qn.range(e),text:t}}if(this.consume(),o)for(var d=0;d<o[0].length;d++){var u=o[0][d];if(!Ml[u])throw new Hn("Unknown accent ' "+u+"'",e);var m=Ml[u][this.mode]||Ml[u].text;if(!m)throw new Hn("Accent "+u+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:qn.range(e),label:m,isStretchy:!1,isShifty:!0,base:a}}return a}}Al.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Ol=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Al(e,t);delete n.gullet.macros.current["\\df@tag"];var r=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 Hn("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:n.subparse([new Fn("\\df@tag")])}]}return r};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."));var Il=function(e,t,n){if(n.throwOnError||!(e instanceof Hn))throw e;var r=Ra.makeSpan(["katex-error"],[new Rr(t)]);return r.setAttribute("title",e.toString()),r.setAttribute("style","color:"+n.errorColor),r},Rl=function(e,t){var n=new Yn(t);try{return function(e,t,n){var r,a=wo(n);if("mathml"===n.output)return yo(e,t,a,n.displayMode,!0);if("html"===n.output){var o=lo(e,a);r=Ra.makeSpan(["katex"],[o])}else{var i=yo(e,t,a,n.displayMode,!1),l=lo(e,a);r=Ra.makeSpan(["katex"],[i,l])}return xo(r,n)}(Ol(e,n),e,n)}catch(r){return Il(r,e,n)}},Ll=function(e,t){return Rl(e,t).toMarkup()};const Dl=e=>{const t=y.create({type:"closed",parsedom:"br"});e.children=[t],t.parent=e,e.hasMarks()?e.marks["data-editify-merged"]="true":e.marks={"data-editify-merged":"true"}},$l=(e,t)=>({crossRowElement:(()=>{let n=null;const r=t.parent.children.findIndex((e=>e.isEqual(t)));let a=e.getPreviousElement(t.parent),o=1;for(;a;){const t=a.children[r],{rowspan:i}=jl(t);if(!(t.hasMarks()&&t.marks["data-editify-merged"])&&i>o){n=t;break}a=e.getPreviousElement(a),o++}return n})(),crossColumnElement:(()=>{let n=null,r=e.getPreviousElement(t),a=1;for(;r;){const{colspan:t}=jl(r);if(!(r.hasMarks()&&r.marks["data-editify-merged"])&&t>a){n=r;break}r=e.getPreviousElement(r),a++}return n})()}),jl=e=>{let t=1,n=1;if(e.hasMarks()){if(e.marks.rowspan){const n=Number(e.marks.rowspan);t=isNaN(n)?1:n}if(e.marks.colspan){const t=Number(e.marks.colspan);n=isNaN(t)?1:t}}return{rowspan:t,colspan:n}},Pl=e=>{const t=[],n=[];e.forEach(((e,r)=>{e.children.forEach(((e,a)=>{Array.isArray(n[r])?n[r].push(e):n[r]=[e],Array.isArray(t[a])?t[a].push(e):t[a]=[e]}))}));const r=t.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.rowspan){const n=Number(t.marks.rowspan);return e+(isNaN(n)?1:n)}}return e+1}),0))),a=n.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.colspan){const n=Number(t.marks.colspan);return e+(isNaN(n)?1:n)}}return e+1}),0)));return{rowNumber:Math.max(...r),columnNumber:Math.max(...a)}},ql=(e,t)=>{let n=!0;if(t.parsedom&&(e.isText()||t.parsedom!=e.parsedom)&&(n=!1),t.marks){Object.keys(t.marks).every((n=>!!e.hasMarks()&&(!0===t.marks[n]?e.marks.hasOwnProperty(n):e.marks[n]==t.marks[n])))||(n=!1)}if(t.styles){Object.keys(t.styles).every((n=>!!e.hasStyles()&&(!0===t.styles[n]?e.styles.hasOwnProperty(n):e.styles[n]==t.styles[n])))||(n=!1)}return n},Fl=(e,t)=>ql(e,t)?e:e.parent?Fl(e.parent,t):null,Hl=(e,t,n)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return Fl(e.range.anchor.element,n);const r=t.list.map((e=>Fl(e.element,n)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let a=!0;for(let o=1;o<r.length;o++)if(!r[o].isEqual(r[0])){a=!1;break}return a?r[0]:null},Vl=(e,t=!1)=>ql(e,{parsedom:"div",marks:{"data-editify-list":t?"ol":"ul"}}),Ul=(e,t)=>Fl(e,{parsedom:"div",marks:{"data-editify-list":t?"ol":"ul"}}),Wl=(e,t,n=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Ul(e.range.anchor.element,n):t.list.every((e=>!!Ul(e.element,n)))),Kl=e=>ql(e,{parsedom:"div",marks:{"data-editify-task":!0}}),Gl=e=>Fl(e,{parsedom:"div",marks:{"data-editify-task":!0}}),Zl=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Gl(e.range.anchor.element):t.list.every((e=>!!Gl(e.element)))),Xl=e=>ql(e,{parsedom:"span",marks:{"data-editify-attachment":!0}}),Yl=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Xl(e.range.anchor.element):t.flatList.some((e=>Xl(e.element)))),Ql=e=>ql(e,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),Jl=e=>Fl(e,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),es=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Jl(e.range.anchor.element):t.flatList.some((e=>!!Jl(e.element)))),ts=e=>ql(e,{parsedom:"div",marks:{"data-editify-info":!0}}),ns=e=>Fl(e,{parsedom:"div",marks:{"data-editify-info":!0}}),rs=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ns(e.range.anchor.element):t.flatList.every((e=>!!ns(e.element)))),as=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Fl(e.range.anchor.element,{parsedom:"pre"}):t.flatList.some((e=>!!Fl(e.element,{parsedom:"pre"})))),os=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Fl(e.range.anchor.element,{parsedom:"table"}):t.flatList.some((e=>!!Fl(e.element,{parsedom:"table"})))),is=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Fl(e.range.anchor.element,{parsedom:"blockquote"}):t.list.every((e=>!!Fl(e.element,{parsedom:"blockquote"})))),ls=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Fl(e.range.anchor.element,{parsedom:"a"}):t.flatList.some((e=>!!Fl(e.element,{parsedom:"a"})))),ss=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?ql(e.range.anchor.element,{parsedom:"img"}):t.flatList.some((e=>ql(e.element,{parsedom:"img"})))),cs=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?ql(e.range.anchor.element,{parsedom:"video"}):t.flatList.some((e=>ql(e.element,{parsedom:"video"})))),ds=(e,t)=>{if(!e.range)return[];let n=t.flatList.length,r=[];for(let a=0;a<n;a++){const o=t.flatList[a];if(o.offset){let t=null;if(0==o.offset[0]&&o.offset[1]<o.element.textContent.length){const n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[1]),n.textContent=n.textContent.substring(o.offset[1]),e.addElementAfter(n,o.element),t=o.element}else if(o.offset[1]==o.element.textContent.length&&o.offset[0]>0){const n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),n.textContent=n.textContent.substring(o.offset[0]),e.addElementAfter(n,o.element),t=n}else if(o.offset[0]>0&&o.offset[1]<o.element.textContent.length){const n=o.element.clone(),r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),n.textContent=n.textContent.substring(o.offset[0],o.offset[1]),r.textContent=r.textContent.substring(o.offset[1]),e.addElementAfter(n,o.element),e.addElementAfter(r,n),t=n}t&&(0==a&&e.range.anchor.moveToStart(t),a==n-1&&e.range.focus.moveToEnd(t),r.push(t))}else r.push(o.element)}return r},us=(e,t,n,r)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasStyles())&&Fs(e.range.anchor.element.styles,n,r);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasStyles()&&Fs(e.element.styles,n,r)))},ms=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus))if(e.range.anchor.element.isSpaceText())e.range.anchor.element.hasStyles()?Object.assign(e.range.anchor.element.styles,de.clone(n)):e.range.anchor.element.styles=de.clone(n);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),t.hasStyles()?Object.assign(t.styles,de.clone(n)):t.styles=de.clone(n),e.insertElement(t)}else{const t=y.getSpaceElement();t.styles=de.clone(n),e.insertElement(t)}else{ds(e,t).forEach((e=>{e.isText()&&(e.hasStyles()?Object.assign(e.styles,de.clone(n)):e.styles=de.clone(n))}))}},hs=(e,t,n)=>{if(!e.range)return;const r=e=>{if(Array.isArray(n)){if(e.hasStyles()){let t={};Object.keys(e.styles).forEach((r=>{n.includes(r)||(t[r]=e.styles[r])})),e.styles=t}}else e.styles=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())r(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),r(t),e.insertElement(t)}}else{ds(e,t).forEach((e=>{e.isText()&&r(e)}))}},ps=(e,t,n,r)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasMarks())&&Fs(e.range.anchor.element.marks,n,r);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasMarks()&&Fs(e.element.marks,n,r)))},fs=(e,t,n)=>{if(e.range){if(!de.isObject(n))throw new Error("The argument must be an object");if(e.range.anchor.isEqual(e.range.focus))if(e.range.anchor.element.isSpaceText())e.range.anchor.element.hasMarks()?Object.assign(e.range.anchor.element.marks,de.clone(n)):e.range.anchor.element.marks=de.clone(n);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),t.hasMarks()?Object.assign(t.marks,de.clone(n)):t.marks=de.clone(n),e.insertElement(t)}else{const t=y.getSpaceElement();t.marks=de.clone(n),e.insertElement(t)}else{ds(e,t).forEach((e=>{e.isText()&&(e.hasMarks()?Object.assign(e.marks,de.clone(n)):e.marks=de.clone(n))}))}}},gs=(e,t,n)=>{if(!e.range)return;const r=e=>{if(Array.isArray(n)){if(e.hasMarks()){let t={};Object.keys(e.marks).forEach((r=>{n.includes(r)||(t[r]=e.marks[r])})),e.marks=t}}else e.marks=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())r(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=de.clone(e.range.anchor.element.styles),t.marks=de.clone(e.range.anchor.element.marks),r(t),e.insertElement(t)}}else{ds(e,t).forEach((e=>{e.isText()&&r(e)}))}},bs=e=>{e.marks=null,e.styles=null,e.parsedom=y.BLOCK_NODE},vs=(e,t=!1)=>{Vl(e,t)||(bs(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-list"]=t?"ol":"ul")},ys=e=>{Kl(e)||(bs(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-task"]="uncheck")},ws=e=>{let t="";return e.flatList.forEach((e=>{e.element.isText()&&(e.offset?t+=e.element.textContent.substring(e.offset[0],e.offset[1]):t+=e.element.textContent||"")})),t},xs=(e,t)=>{const n=e.getPreviousElement(t),r=e.getNextElement(t);if(!n||!n.isSpaceText()){const n=y.getSpaceElement();e.addElementBefore(n,t)}if(!r||!r.isSpaceText()){const n=y.getSpaceElement();e.addElementAfter(n,t)}e.range&&t.isContains(e.range.anchor.element)&&e.range.anchor.moveToEnd(e.getNextElement(t)),e.range&&t.isContains(e.range.focus.element)&&e.range.focus.moveToEnd(e.getNextElement(t))},Es=(e,t,n)=>{if(e.range){if(!["h1","h2","h3","h4","h5","h6","p"].includes(n))throw new Error("The parameter supports only h1-h6 and p");if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),t.parsedom=n}else t.list.forEach((e=>{if(e.element.isBlock())bs(e.element),e.element.parsedom=n;else{const t=e.element.getBlock();bs(t),t.parsedom=n}}))}},ks=(e,t)=>{if(!e.range)return;const n=e=>{if(e.hasStyles())if(e.styles.hasOwnProperty("text-indent")){let t=e.styles["text-indent"];t=t.endsWith("em")?parseFloat(t):0,e.styles["text-indent"]=`${t+2}em`}else e.styles["text-indent"]="2em";else e.styles={"text-indent":"2em"}};if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),r=e.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}))},Ss=(e,t)=>{if(!e.range)return;const n=e=>{if(e.hasStyles()&&e.styles.hasOwnProperty("text-indent")){let t=e.styles["text-indent"];t=t.endsWith("em")?parseFloat(t):0,e.styles["text-indent"]=(t-2>=0?t-2:0)+"em"}};if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),r=e.element.getInblock();r&&"block"==r.behavior&&!r.isPreStyle()?n(r):t.isPreStyle()||n(t)}))},Ts=(e,t)=>{if(!e.range)return;const n=is(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),n||(t.parsedom="blockquote")}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{bs(e),n||(e.parsedom="blockquote")}))}},_s=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r?r.hasStyles()?r.styles["text-align"]=n:r.styles={"text-align":n}:t.hasStyles()?t.styles["text-align"]=n:t.styles={"text-align":n}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["text-align"]=n:e.element.styles={"text-align":n};else{const t=e.element.getBlock(),r=e.element.getInblock();r?r.hasStyles()?r.styles["text-align"]=n:r.styles={"text-align":n}:t.hasStyles()?t.styles["text-align"]=n:t.styles={"text-align":n}}}))},Cs=(e,t,n)=>{if(!e.range)return;const r=Wl(e,t,n);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();r?bs(t):vs(t,n)}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{r?bs(e):vs(e,n)}))}},Ns=(e,t)=>{if(!e.range)return;const n=Zl(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();n?bs(t):ys(t)}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{n?bs(e):ys(e)}))}},Bs=(e,t,n)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),r=e.range.anchor.element.getInblock();r?r.hasStyles()?r.styles["line-height"]=n:r.styles={"line-height":n}:t.hasStyles()?t.styles["line-height"]=n:t.styles={"line-height":n}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["line-height"]=n:e.element.styles={"line-height":n};else{const t=e.element.getBlock(),r=e.element.getInblock();r?r.hasStyles()?r.styles["line-height"]=n:r.styles={"line-height":n}:t.hasStyles()?t.styles["line-height"]=n:t.styles={"line-height":n}}}))},Ms=(e,t,n,r)=>{if(!e.range)return;t||(t=n);const a={href:n};r&&(a.target="_blank");const o=y.create({type:"inline",parsedom:"a",marks:a,children:[{type:"text",textContent:t}]});e.insertElement(o)},zs=(e,t)=>{if(!e.range)return;const n=y.create({type:"closed",parsedom:"img",marks:{src:t}});e.insertElement(n)},As=(e,t)=>{if(!e.range)return;const n=y.create({type:"closed",parsedom:"video",marks:{src:t}});e.insertElement(n),e.range.anchor.moveToEnd(n),e.range.focus.moveToEnd(n)},Os=(e,t,n)=>{if(!e.range)return;const r=[];for(let i=0;i<t;i++){const e=[];for(let t=0;t<n;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});r.push({type:"inblock",parsedom:"tr",children:e})}const a=y.create({type:"block",parsedom:"table",children:[{type:"inblock",parsedom:"tbody",children:r}]});e.insertElement(a);const o=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(o,a),e.range.anchor.moveToStart(a),e.range.focus.moveToStart(a)},Is=(e,t)=>{if(!e.range)return;const n=Hl(e,t,{parsedom:"pre"});if(n){let t="";y.flatElements(n.children).filter((e=>e.isText())).forEach((e=>{t+=e.textContent}));t.split("\n").forEach((t=>{const r=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"text",textContent:t}]});e.addElementBefore(r,n)})),n.toEmpty()}else if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),t.parsedom="pre";const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(n,t)}else{e.range.anchor.moveToStart(t.list[0].element.getBlock()),e.range.focus.moveToEnd(t.list[t.list.length-1].element.getBlock());const n={};e.getElementsByRange().flatList.filter((e=>e.element.isText())).forEach((e=>{n[`_${e.element.getBlock().key}`]?n[`_${e.element.getBlock().key}`].push(e.element.clone()):n[`_${e.element.getBlock().key}`]=[e.element.clone()]}));const r=y.create({type:"block",parsedom:"pre"});Object.keys(n).forEach(((t,a)=>{if(a>0){const t=y.create({type:"text",textContent:"\n"});r.hasChildren()?e.addElementTo(t,r,r.children.length):e.addElementTo(t,r)}n[t].forEach((t=>{r.hasChildren()?e.addElementTo(t,r,r.children.length):e.addElementTo(t,r)}))})),e.delete(),e.insertElement(r);const a=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(a,r)}},Rs=e=>{if(!e.range)return;const t=y.create({type:"closed",parsedom:"hr"});e.insertElement(t),e.range.anchor.moveToEnd(t),e.range.focus.moveToEnd(t)},Ls=(e,t,n)=>{const r={"data-editify-attachment":t,"data-editify-attachment-name":n},a=y.create({type:"closed",parsedom:"span",marks:r});e.insertElement(a),e.range.anchor.moveToEnd(a),e.range.focus.moveToEnd(a)},Ds=(e,t,n,r)=>{if(!n)return;const a=Hl(e,t,{parsedom:"span",marks:{"data-editify-mathformula":!0}});if(a){a.toEmpty();const t=e.getNextElement(a);e.range.anchor.moveToStart(t),e.range.focus.moveToStart(t)}let o="";try{o=Ll(n,{output:"mathml",throwOnError:!0})}catch(i){o="","function"==typeof r&&r(i)}if(o){const t=`<span data-editify-mathformula="${n}" contenteditable="false">${o}</span>`,r=e.parseHtml(t);e.insertElement(r[0]),e.range.anchor.moveToEnd(r[0]),e.range.focus.moveToEnd(r[0]),e.domRender(),e.rangeRender()}},$s=(e,t)=>{const n=rs(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();bs(t),n||(t.parsedom="div",t.marks={"data-editify-info":"true"})}else{let e=[];t.list.forEach((t=>{const n=t.element.getBlock();e.some((e=>n.isEqual(e)))||e.push(n)})),e.forEach((e=>{bs(e),n||(e.parsedom="div",e.marks={"data-editify-info":"true"})}))}},{Mac:js}=ge.os(),Ps={heading:{title:(js?"Command":"Ctrl")+" + [1-7]",define:e=>({h1:"1"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h2:"2"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h3:"3"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h4:"4"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h5:"5"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),h6:"6"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),p:"7"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey)}),operation:(e,t,n,r,a)=>{n.value||as(e,t)||os(e,t)||(Es(e,t,a),e.domRender(),e.rangeRender())}},indent:{title:"Tab / Shift + Tab",define:e=>({"indent-increase":!("tab"!=e.key.toLocaleLowerCase()||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey),"indent-decrease":"tab"==e.key.toLocaleLowerCase()&&e.shiftKey&&!e.metaKey&&!e.ctrlKey&&!e.altKey}),operation:(e,t,n,r,a)=>{n.value||as(e,t)||os(e,t)||("indent-increase"==a?ks(e,t):"indent-decrease"==a&&Ss(e,t),e.domRender(),e.rangeRender())}},quote:{title:(js?"Command":"Ctrl")+" + E",define:e=>"e"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},separator:{title:"",define:null,operation:null},align:{title:"",define:null,operation:null},orderList:{title:(js?"Command":"Ctrl")+" + O",define:e=>"o"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},unorderList:{title:(js?"Command":"Ctrl")+" + U",define:e=>"u"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},task:{title:(js?"Command":"Ctrl")+" + I",define:e=>"i"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},bold:{title:(js?"Command":"Ctrl")+" + B",define:e=>"b"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},underline:{title:(js?"Command":"Ctrl")+" + G",define:e=>"g"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},italic:{title:(js?"Command":"Ctrl")+" + H",define:e=>"h"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},strikethrough:{title:(js?"Command":"Ctrl")+" + J",define:e=>"j"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},code:{title:(js?"Command":"Ctrl")+" + K",define:e=>"k"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},super:{title:(js?"Command":"Ctrl")+" + L",define:e=>"l"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},sub:{title:(js?"Command":"Ctrl")+" + M",define:e=>"m"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},formatClear:{title:(js?"Command":"Ctrl")+" + Enter",define:e=>"enter"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},fontSize:{title:"",define:null,operation:null},fontFamily:{title:"",define:null,operation:null},lineHeight:{title:"",define:null,operation:null},foreColor:{title:"",define:null,operation:null},backColor:{title:"",define:null,operation:null},link:{title:"",define:null,operation:null},image:{title:"",define:null,operation:null},video:{title:"",define:null,operation:null},table:{title:"",define:null,operation:null},codeBlock:{title:(js?"Command":"Ctrl")+" + P",define:e=>"p"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},sourceView:{title:(js?"Command":"Ctrl")+" + 8",define:e=>"8"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},fullScreen:{title:(js?"Command":"Ctrl")+" + 9",define:e=>"9"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null},attachment:{title:"",define:null,operation:null},mathformula:{title:"",define:null,operation:null},infoBlock:{title:(js?"Command":"Ctrl")+" + 0",define:e=>"0"==e.key.toLocaleLowerCase()&&(js?e.metaKey:e.ctrlKey),operation:null}},qs=(e,t)=>{if(!de.isObject(e)&&de.isObject(t))return null;for(let n in t)de.isObject(t[n])&&!Array.isArray(t[n])&&de.isObject(e[n])&&!Array.isArray(e[n])?e[n]=qs(e[n],t[n]):e[n]=t[n];return e},Fs=(e,t,n)=>{if(null==n||null==n)return e.hasOwnProperty(t);let r=e[t];if(null==r||null==r)return!1;if("string"==typeof n&&(n=n.toLocaleLowerCase()),"string"==typeof r&&(r=r.toLocaleLowerCase()),"string"==typeof n&&n&&(de.matchingText(n,"rgb")||de.matchingText(n,"rgba"))&&(n=ie.trim(n,!0)),"string"==typeof r&&r&&(de.matchingText(r,"rgb")||de.matchingText(r,"rgba"))&&(r=ie.trim(r,!0)),"string"==typeof n&&n&&de.matchingText(n,"hex")){const e=pe.hex2rgb(n);n=`rgb(${e[0]},${e[1]},${e[2]})`}if("string"==typeof r&&r&&de.matchingText(r,"hex")){const e=pe.hex2rgb(r);r=`rgb(${e[0]},${e[1]},${e[2]})`}return r==n},Hs=e=>({heading:[{label:e("text"),value:"p"},{label:e("h1"),value:"h1",style:{fontSize:"26px",fontWeight:"bold"}},{label:e("h2"),value:"h2",style:{fontSize:"24px",fontWeight:"bold"}},{label:e("h3"),value:"h3",style:{fontSize:"22px",fontWeight:"bold"}},{label:e("h4"),value:"h4",style:{fontSize:"20px",fontWeight:"bold"}},{label:e("h5"),value:"h5",style:{fontSize:"18px",fontWeight:"bold"}},{label:e("h6"),value:"h6",style:{fontSize:"16px",fontWeight:"bold"}}],indent:[{label:e("indentIncrease"),value:"indent-increase",icon:"indent-increase"},{label:e("indentDecrease"),value:"indent-decrease",icon:"indent-decrease"}],align:[{label:e("alignLeft"),value:"left",icon:"align-left"},{label:e("alignRight"),value:"right",icon:"align-right"},{label:e("alignCenter"),value:"center",icon:"align-center"},{label:e("alignJustify"),value:"justify",icon:"align-justify"}],fontSize:[{label:e("defaultSize"),value:""},{label:"12px",value:"12px"},{label:"14px",value:"14px"},{label:"16px",value:"16px"},{label:"18px",value:"18px"},{label:"20px",value:"20px"},{label:"24px",value:"24px"},{label:"28px",value:"28px"},{label:"32px",value:"32px"},{label:"36px",value:"36px"},{label:"40px",value:"40px"}],fontFamily:[{label:e("defaultFontFamily"),value:""},{label:"黑体",value:"黑体,黑体-简"},{label:"华文仿宋",value:"华文仿宋"},{label:"楷体",value:"楷体,楷体-简"},{label:"华文楷体",value:"华文楷体"},{label:"宋体",value:"宋体,宋体-简"},{label:"Arial",value:"Arial"},{label:"Consolas",value:"Consolas,monospace"}],lineHeight:[{label:e("defaultLineHeight"),value:""},1,1.15,1.5,2,2.5,3],foreColor:["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"],backColor:["#000000","#505050","#808080","#BBBBBB","#CCCCCC","#EEEEEE","#F7F7F7","#FFFFFF","#EC1A0A","#FF9900","#FFFF00","#07C160","#00FFFF","#0B73DE","#9C00FF","#FF00FF","#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE","#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD","#e45649","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5","#CE0000","#E79439","#EFC631","#50a14f","#4A7B8C","#03A8F3","#634AA5","#A54A7B","#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842","#630000","#7B3900","#986801","#295218","#083139","#003163","#21104A","#4A1031"]}),Vs=(e,t)=>{if(t.isEmpty()||"th"!=t.parsedom||(t.parsedom="td"),t.hasChildren()&&"table"==t.parsedom){t.hasMarks()?Object.assign(t.marks,{"data-editify-element":t.key}):t.marks={"data-editify-element":t.key};const n=y.flatElements(t.children),r=n.filter((e=>"tr"==e.parsedom)),{rowNumber:a,columnNumber:o}=Pl(r);let i=n.find((e=>"colgroup"==e.parsedom));if(i){i.children.forEach((e=>{e.hasMarks()?e.marks.width||(e.marks.width="auto"):e.marks={width:"auto"}}));const t=i.children.length;if(t<o)for(let n=0;n<o-t;n++){const t=y.create({type:"closed",parsedom:"col",marks:{width:"auto"}});e.addElementTo(t,i,i.children.length)}}else{const e=[];for(let t=o-1;t>=0;t--)e.push({type:"closed",parsedom:"col",marks:{width:"auto"}});i=y.create({type:"inblock",parsedom:"colgroup",children:e})}((e,t,n,r)=>{y.flatElements(t).forEach((t=>{if("td"==t.parsedom&&t.hasMarks()){t.marks["data-editify-merged"]&&delete t.marks["data-editify-merged"];const n=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),a=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(n>1){let a=1;for(;a<n&&t.parent.children.length<r;){const n=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(n,t),a++}}if(a>1){let o=t,i=1;for(;i<a&&e.getNextElement(o.parent)&&e.getNextElement(o.parent).children.length<r;){const t=e.getNextElement(o.parent),r=o.parent.children.findIndex((e=>e.isEqual(o))),a=t.children[r];for(let o=0;o<n;o++){const n=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});a?e.addElementBefore(n,a):e.addElementTo(n,t,t.children.length)}o=t.children[r],i++}}}})),t.forEach((t=>{const n=t.children.length;if(n<r)for(let a=0;a<r-n;a++){const n=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});e.addElementTo(n,t,t.children.length)}}));const a=t.length;if(a<n)for(let o=0;o<n-a;o++){const e=[];for(let t=0;t<r;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const n=y.create({type:"inblock",parsedom:"tr",children:e});t.push(n)}})(e,r,a,o),t.children=[];const l=y.create({type:"inblock",parsedom:"tbody"});r.forEach((t=>{const n=l.hasChildren()?l.children.length:0;e.addElementTo(t,l,n)})),e.addElementTo(l,t),e.addElementTo(i,t),((e,t)=>{y.flatElements(t).filter((e=>"td"==e.parsedom)).forEach((t=>{if(t.hasMarks()&&!t.marks["data-editify-merged"]){const n=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),r=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(n>1){let r=t,a=1;for(;a<n;){const t=e.getNextElement(r);if(!t)break;t.hasMarks()?t.marks["data-editify-merged"]="true":t.marks={"data-editify-merged":"true"},r=t,a++}}if(r>1){const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=t,i=1;for(;i<r&&o&&e.getNextElement(o.parent);){const t=e.getNextElement(o.parent);for(let e=a;e<a+n;e++){const n=t.children[e];n&&(n.hasMarks()?n.marks["data-editify-merged"]="true":n.marks={"data-editify-merged":"true"})}o=t.children[a],i++}}}}))})(e,r)}if(!t.isEmpty()&&"td"==t.parsedom&&t.hasMarks()&&t.marks["data-editify-merged"]&&e.range){const n=(t,n)=>{let r=!1,a=e.getPreviousElement(t),o=1;for(;a;){const{colspan:t}=jl(a);if(a.hasMarks()&&!a.marks["data-editify-merged"]&&t>o){r=!0,n(a);break}a=e.getPreviousElement(a),o++}return r},r=(t,n)=>{let r=!1;const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=e.getPreviousElement(t.parent),i=1;for(;o;){const t=o.children[a],{rowspan:l}=jl(t);if(t.hasMarks()&&!t.marks["data-editify-merged"]&&l>i){r=!0,n(t);break}o=e.getPreviousElement(o),i++}return r};if(t.isContains(e.range.anchor.element)){n(t,(t=>{e.range.anchor.moveToEnd(t)}))||r(t,(t=>{e.range.anchor.moveToEnd(t)}))}if(t.isContains(e.range.focus.element)){n(t,(t=>{e.range.focus.moveToEnd(t)}))||r(t,(t=>{e.range.focus.moveToEnd(t)}))}}},Us=(e,t,n,r)=>{if(!t.isEmpty()&&"pre"==t.parsedom){const a={"data-editify-element":t.key};if(t.hasMarks()?Object.assign(t.marks,a):t.marks=a,n&&t.hasChildren()){let n=t.marks["data-editify-hljs"]||"";if(n&&r){r.some((e=>de.isObject(e)?e.value==n:e==n))||(n="")}const a=y.flatElements(t.children).filter((e=>e.isText()&&!e.isEmpty())),o=function(e,t){return t?Bt.highlight(e,{language:t,ignoreIllegals:!0}).value:Bt.highlightAuto(e).value}(a.reduce(((e,t)=>e+t.textContent),""),n);if(o){const n=e.parseHtml(o);t.children=n,n.forEach((e=>{e.parent=t})),((e,t,n,r)=>{if(e.range){if(e.range.anchor.element.getBlock().isEqual(t)){const t=n.findIndex((t=>e.range.anchor.element.isEqual(t))),a=n.filter(((e,n)=>n<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.anchor.offset,o=y.flatElements(r).filter((e=>e.isText()&&!e.isEmpty()));let i=0,l=0;for(;i<o.length;){let t=l+o[i].textContent.length;if(a>=l&&a<=t){e.range.anchor.element=o[i],e.range.anchor.offset=a-l;break}i++,l=t}}if(e.range.focus.element.getBlock().isEqual(t)){const t=n.findIndex((t=>e.range.focus.element.isEqual(t))),a=n.filter(((e,n)=>n<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.focus.offset,o=y.flatElements(r).filter((e=>e.isText()&&!e.isEmpty()));let i=0,l=0;for(;i<o.length;){let t=l+o[i].textContent.length;if(a>=l&&a<=t){e.range.focus.element=o[i],e.range.focus.offset=a-l;break}i++,l=t}}}})(e,t,a,n)}else{const n=y.create({type:"closed",parsedom:"br"});t.children=[n],n.parent=t,e.range&&(e.range.anchor.moveToStart(n),e.range.focus.moveToStart(n))}}}},Ws={textWrapUp:"up feed",textWrapDown:"down feed",insertRowTop:"insert row forward",insertRowBottom:"insert row backward",insertColumnLeft:"insert column forward",insertColumnRight:"insert column backward",deleteRow:"delete rows",deleteColumn:"delete column",mergeCellsLeft:"merge cells to the left",mergeCellsRight:"merge cells to the right",mergeCellsUp:"merge cells up",mergeCellsDown:"merge cells down",deleteTable:"delete table",selectLanguages:"select language",autoRecognize:"auto",linkAddress:"link address",newWindowOpen:"open in new window",removeLink:"remove",viewLink:"view",linkUrlEnterPlaceholder:"please enter the link address",linkTextEnterPlaceholder:"please enter the link text",width30:"set the width to 30%",width50:"set the width to 50%",width100:"set the width to 100%",deleteImage:"delete image",autoplay:"autoplay",disabledAutoplay:"turn off autoplay",loop:"loop",disabledLoop:"close loop",muted:"mute",unmuted:"unmute",controls:"play control",deleteVideo:"delete video",heading:"heading",bold:"bold",h1:"heading 1",h2:"heading 2",h3:"heading 3",h4:"heading 4",h5:"heading 5",h6:"heading 6",text:"paragraph",italic:"italic",orderList:"ordered list",unorderList:"unordered list",strikethrough:"strikethrough",underline:"underline",code:"inline code",super:"superscript",sub:"subscript",fontSize:"font size",fontFamily:"font family",defaultFontFamily:"default",foreColor:"forecolor",defaultColor:"default color",backColor:"backcolor",formatClear:"clear format",defaultSize:"default",totalWordCount:"total word count: ",align:"alignment mode",undo:"undo",redo:"redo",quote:"quote",separator:"separator",lineHeight:"line height",indent:"indent",insertLink:"insert Link",insertImage:"insert Image",remoteImage:"remote",uploadImage:"upload",imageUrlPlaceholder:"please enter the image address",insert:"insert",insertVideo:"insert Video",remoteVideo:"remote",uploadVideo:"upload",videoUrlPlaceholder:"please enter the video address",insertTable:"insert table",inserCodeBlock:"insert code block",sourceView:"code view",task:"task",indentIncrease:"increase indent",indentDecrease:"reduce indent",alignLeft:"align left",alignCenter:"align center",alignRight:"align right",alignJustify:"align justify",defaultLineHeight:"default",auto:"auto",fullScreen:"full screen",confirm:"confirm",insertAttachment:"insert attachment",uploadAttachment:"upload",remoteAttachment:"remote",attachmentNamePlaceholder:"please enter the attachment name",attachmentUrlPlaceholder:"please enter the attachment address",attachmentDownloadTitle:"click to download attachment",attachmentDefaultName:"attachment",insertMathformula:"insert mathematical formula",editMathformula:"edit mathematical formula",mathformulaPlaceholder:"please enter latex syntax",insertInfoBlock:"insert Information Block",decimal:"decimal",lowerRoman:"lower roman",upperRoman:"upper roman",lowerAlpha:"lower alpha",upperAlpha:"upper alpha",lowerGreek:"lower greek",cjkIdeographic:"cjk ideographic",disc:"disc",circle:"circle",square:"square"},Ks={textWrapUp:"向上换行",textWrapDown:"向下换行",insertRowTop:"向前插入行",insertRowBottom:"向后插入行",insertColumnLeft:"向前插入列",insertColumnRight:"向后插入列",deleteRow:"删除行",deleteColumn:"删除列",mergeCellsLeft:"向左合并单元格",mergeCellsRight:"向右合并单元格",mergeCellsUp:"向上合并单元格",mergeCellsDown:"向下合并单元格",deleteTable:"删除表格",selectLanguages:"选择语言",autoRecognize:"自动识别",linkAddress:"链接地址",newWindowOpen:"新窗口打开",removeLink:"移除链接",viewLink:"查看链接",linkUrlEnterPlaceholder:"请输入链接地址",linkTextEnterPlaceholder:"请输入链接文本",width30:"30%宽度",width50:"50%宽度",width100:"100%宽度",deleteImage:"删除图片",autoplay:"自动播放",disabledAutoplay:"关闭自动播放",loop:"循环播放",disabledLoop:"关闭循环播放",muted:"静音",unmuted:"播放声音",controls:"播放控制",deleteVideo:"删除视频",heading:"标题",bold:"粗体",h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题",text:"正文",italic:"斜体",orderList:"有序列表",unorderList:"无序列表",strikethrough:"删除线",underline:"下划线",code:"行内代码",super:"上标",sub:"下标",fontSize:"字号",fontFamily:"字体",defaultFontFamily:"默认字体",foreColor:"前景色",defaultColor:"默认颜色",backColor:"背景色",formatClear:"清除格式",defaultSize:"默认字号",totalWordCount:"总字数:",align:"对齐方式",undo:"撤销",redo:"重做",quote:"引用",separator:"分隔线",lineHeight:"行高",indent:"缩进",insertLink:"插入链接",insertImage:"插入图片",remoteImage:"网络图片",uploadImage:"上传图片",imageUrlPlaceholder:"请输入图片地址",insert:"插入",insertVideo:"插入视频",remoteVideo:"网络视频",uploadVideo:"上传视频",videoUrlPlaceholder:"请输入视频地址",insertTable:"插入表格",inserCodeBlock:"插入代码块",sourceView:"代码视图",task:"待办",indentIncrease:"增加缩进",indentDecrease:"减少缩进",alignLeft:"左对齐",alignCenter:"居中对齐",alignRight:"右对齐",alignJustify:"两端对齐",defaultLineHeight:"默认行高",auto:"自适应",fullScreen:"全屏",confirm:"确定",insertAttachment:"插入附件",uploadAttachment:"上传附件",remoteAttachment:"远程地址",attachmentNamePlaceholder:"请输入附件名称",attachmentUrlPlaceholder:"请输入附件地址",attachmentDownloadTitle:"点击下载附件",attachmentDefaultName:"附件",insertMathformula:"插入数学公式",editMathformula:"编辑数学公式",mathformulaPlaceholder:"请输入LaTex语法",insertInfoBlock:"插入信息块",decimal:"默认数字",lowerRoman:"小写罗马数字",upperRoman:"大写罗马数字",lowerAlpha:"小写英文字母",upperAlpha:"大写英文字母",lowerGreek:"小写希腊字母",cjkIdeographic:"表意数字",disc:"实心圆",circle:"空心圆",square:"实心方块"},Gs={placement:{type:String,default:"top",validator:e=>["top","left","right","bottom"].includes(e)},color:{type:String,default:null},background:{type:String,default:null}},Zs=["data-editify-placement"],Xs=t.defineComponent({name:"Triangle",__name:"triangle",props:Gs,setup(e){const n=e,r=t.computed((()=>"top"==n.placement?{borderBottomColor:n.color||""}:"bottom"==n.placement?{borderTopColor:n.color||""}:"left"==n.placement?{borderRightColor:n.color||""}:"right"==n.placement?{borderLeftColor:n.color||""}:{})),a=t.computed((()=>"top"==n.placement?{borderBottomColor:n.background||""}:"bottom"==n.placement?{borderTopColor:n.background||""}:"left"==n.placement?{borderRightColor:n.background||""}:"right"==n.placement?{borderLeftColor:n.background||""}:{}));return(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"editify-triangle",style:t.normalizeStyle(r.value),"data-editify-placement":e.placement},[t.createElementVNode("div",{class:"editify-triangle-el",style:t.normalizeStyle(a.value)},null,4)],12,Zs))}}),Ys=(e,t)=>{const n=e.__vccOpts||e;for(const[r,a]of t)n[r]=a;return n},Qs=Ys(Xs,[["__scopeId","data-v-c57a8f5f"]]),Js={modelValue:{type:Boolean,default:!1},node:{type:[String,HTMLElement],default:null},scrollNode:{type:[String,HTMLElement],default:null},border:{type:Boolean,default:!1},borderColor:{type:String,default:null},background:{type:String,default:null},color:{type:String,default:null},placement:{type:String,default:"bottom",validator:e=>["top","bottom","top-start","top-end","bottom-start","bottom-end"].includes(e)},showTriangle:{type:Boolean,default:!1},zIndex:{type:Number,default:1},animation:{type:String,default:null,validator:e=>["translate","fade",null].includes(e)},useRange:{type:Boolean,default:!1},insideElements:{type:Array,default:function(){return[]}}},ec=["data-editify-placement"],tc=Ys(t.defineComponent({name:"Layer",__name:"layer",props:Js,emits:["update:modelValue","show","shown","hidden"],setup(e,{expose:n,emit:r}){const a=t.getCurrentInstance(),o=e,i=r,l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.ref(null),u=t.computed((()=>"bottom-start"==l.value||"bottom"==l.value||"bottom-end"==l.value?"top":"top-start"==l.value||"top"==l.value||"top-end"==l.value?"bottom":"left-start"==l.value||"left"==l.value||"left-end"==l.value?"right":"right-start"==l.value||"right"==l.value||"right-end"==l.value?"left":"top")),m=t.computed((()=>({borderColor:o.border&&o.borderColor||"",background:o.background||"",color:o.color||""}))),h=()=>o.node?le.isElement(o.node)?o.node:document.body.querySelector(o.node):null,p=()=>o.scrollNode?le.isElement(o.scrollNode)?o.scrollNode:document.body.querySelector(o.scrollNode):null,f=()=>{l.value=null;const e=window.getSelection();if(e&&e.rangeCount){const n=e.getRangeAt(0).getClientRects();if(n.length){const e=n[0],r=n[n.length-1],a=document.documentElement.clientHeight||window.innerHeight,i=document.documentElement.clientWidth||window.innerWidth,u=le.getElementBounding(p()||document.documentElement);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?e.top>=u.top&&e.top>=c.value.offsetHeight?l.value=o.placement:a-r.bottom>=u.bottom&&a-r.bottom>=c.value.offsetHeight&&(l.value="top"==o.placement?"bottom":"top-start"==o.placement?"bottom-start":"bottom-end"):"bottom"!=o.placement&&"bottom-start"!=o.placement&&"bottom-end"!=o.placement||(a-r.bottom>=u.bottom&&a-r.bottom>=c.value.offsetHeight?l.value=o.placement:e.top>=u.top&&e.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?i-e.right+e.width/2<c.value.offsetWidth/2?l.value="top-end":e.left+e.width/2<c.value.offsetWidth/2&&(l.value="top-start"):"bottom"==l.value?i-r.right+r.width/2<c.value.offsetWidth/2?l.value="bottom-end":r.left+r.width/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"top-start"==l.value?i-e.right+e.width<c.value.offsetWidth&&(i-e.right+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"bottom-start"==l.value?i-r.right+r.width<c.value.offsetWidth&&(i-r.right+r.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"top-end"==l.value?e.left+e.width<c.value.offsetWidth&&(e.left+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom-end"==l.value&&r.left+r.width<c.value.offsetWidth&&(r.left+r.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=e.left+"px",c.value.style.right="auto",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=i-e.right+"px",c.value.style.top=e.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=r.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=i-r.right+"px",c.value.style.top="auto",c.value.style.bottom=a-r.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=Math.max(u.bottom,0)+"px","top"==o.placement?i-e.right+e.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):e.left+e.width/2<c.value.offsetWidth/2?(c.value.style.left=e.left+"px",c.value.style.right="auto"):(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"bottom"==o.placement?i-r.right+r.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=i-r.right+"px"):r.left+r.width/2<c.value.offsetWidth/2?(c.value.style.left=r.left+"px",c.value.style.right="auto"):(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement?i-e.right+e.width<c.value.offsetWidth?i-e.right+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):(c.value.style.left=e.left+"px",c.value.style.right="auto"):"bottom-start"==o.placement?i-r.right+r.width<c.value.offsetWidth?i-r.right+r.width/2>=c.value.offsetWidth/2?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-r.right+"px"):(c.value.style.left=r.left+"px",c.value.style.right="auto"):"top-end"==o.placement?e.left+e.width<c.value.offsetWidth?e.left+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=e.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-e.right+"px"):"bottom-end"==o.placement&&(r.left+r.width<c.value.offsetWidth?r.left+r.width/2>=c.value.offsetWidth/2?(c.value.style.left=r.left+r.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=r.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=i-r.right+"px"))),o.showTriangle&&(()=>{const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0).getClientRects();if(t.length){const e=t[0],n=t[t.length-1];"top"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.width?e.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.width?e.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"bottom"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>n.width?n.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>n.width?n.width:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=1-d.value.$el.offsetHeight+"px",d.value.$el.style.bottom="auto")}}})()}))}}},g=()=>{const e=h();if(!le.isElement(e))return;l.value=null;const n=le.getElementBounding(e),r=le.getElementBounding(p()||document.documentElement);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?n.top>=r.top&&n.top>=c.value.offsetHeight?l.value=o.placement:n.bottom>=r.bottom&&n.bottom>=c.value.offsetHeight&&(l.value="top"==o.placement?"bottom":"top-start"==o.placement?"bottom-start":"bottom-end"):"bottom"!=o.placement&&"bottom-start"!=o.placement&&"bottom-end"!=o.placement||(n.bottom>=r.bottom&&n.bottom>=c.value.offsetHeight?l.value=o.placement:n.top>=r.top&&n.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?n.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="top-end":n.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="top-start"):"top-start"==l.value?n.right+e.offsetWidth<c.value.offsetWidth&&(n.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"top-end"==l.value?n.left+e.offsetWidth<c.value.offsetWidth&&(n.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom"==l.value?n.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="bottom-end":n.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"bottom-start"==l.value?n.right+e.offsetWidth<c.value.offsetWidth&&(n.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"bottom-end"==l.value&&n.left+e.offsetWidth<c.value.offsetWidth&&(n.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=n.left+"px",c.value.style.right="auto",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=n.right+"px",c.value.style.top=n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=n.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=n.right+"px",c.value.style.top="auto",c.value.style.bottom=n.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=Math.max(r.bottom,0)+"px","top"==o.placement||"bottom"==o.placement?n.right+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=n.right+"px"):n.left+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left=n.left+"px",c.value.style.right="auto"):(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement||"bottom-start"==o.placement?n.right+e.offsetWidth<c.value.offsetWidth?n.right+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=n.right+"px"):(c.value.style.left=n.left+"px",c.value.style.right="auto"):"top-end"!=o.placement&&"bottom-end"!=o.placement||(n.left+e.offsetWidth<c.value.offsetWidth?n.left+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=n.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=n.right+"px"))),o.showTriangle&&(()=>{const e=h();le.isElement(e)&&("top"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"top-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top=s.value.offsetHeight-1+"px",d.value.$el.style.bottom="auto"):"bottom"==l.value?(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-start"==l.value?(d.value.$el.style.left=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):"bottom-end"==l.value?(d.value.$el.style.left="auto",d.value.$el.style.right=(s.value.offsetWidth>e.offsetWidth?e.offsetWidth:s.value.offsetWidth)/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.top="auto",d.value.$el.style.bottom=s.value.offsetHeight-1+"px"):(d.value.$el.style.left=s.value.offsetWidth/2-d.value.$el.offsetWidth/2+"px",d.value.$el.style.right="auto",d.value.$el.style.top=1-d.value.$el.offsetHeight+"px",d.value.$el.style.bottom="auto"))})()}))},b=()=>{o.useRange?f():g()},v=e=>{b(),i("show",e)},y=()=>{o.modelValue&&i("update:modelValue",!1)},w=e=>{le.isElement(c.value)&&(le.isContains(c.value,e.target)||!o.useRange&&h()&&le.isContains(h(),e.target)||o.insideElements.some((t=>le.isContains(t,e.target)))||o.modelValue&&i("update:modelValue",!1))};return t.watch((()=>o.modelValue),(e=>{e&&t.nextTick((()=>{(()=>{const e=t=>{he.on(t,`scroll.editify_layer_${a.uid}`,(()=>{o.modelValue&&i("update:modelValue",!1)})),t.parentNode&&e(t.parentNode)},t=h()||p();t&&e(t)})()}))}),{immediate:!0}),t.onMounted((()=>{o.modelValue&&b(),he.on(window,`mousedown.editify_layer_${a.uid}`,w),he.on(window,`resize.editify_layer_${a.uid}`,y)})),t.onBeforeUnmount((()=>{(()=>{const e=t=>{he.off(t,`scroll.editify_layer_${a.uid}`),t.parentNode&&e(t.parentNode)},t=h()||p();t&&e(t)})(),he.off(window,`mousedown.editify_layer_${a.uid} resize.editify_layer_${a.uid}`)})),n({setPosition:b,elRef:c}),(e,n)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:e.animation?"editify-layer-"+e.animation:"editify-layer",onEnter:v,onAfterEnter:n[0]||(n[0]=e=>i("shown",e)),onAfterLeave:n[1]||(n[1]=e=>i("hidden",e))},{default:t.withCtx((()=>[e.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"editify-layer","data-editify-placement":l.value||null,style:t.normalizeStyle({zIndex:e.zIndex}),ref_key:"elRef",ref:c},[e.showTriangle?(t.openBlock(),t.createBlock(t.unref(Qs),{key:0,color:e.border&&e.borderColor?e.borderColor:e.background,background:e.background,placement:u.value,ref_key:"triangleRef",ref:d},null,8,["color","background","placement"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"wrapRef",ref:s,class:t.normalizeClass(["editify-layer-wrap",{"editify-border":e.border}]),style:t.normalizeStyle(m.value)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],12,ec)):t.createCommentVNode("",!0)])),_:3},8,["name"])]))}}),[["__scopeId","data-v-7e930b66"]]),nc={content:{type:String,default:""},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},rc={class:"editify-tooltip-content"},ac=Ys(t.defineComponent({name:"Tooltip",__name:"tooltip",props:nc,setup(e){const n=e,r=t.inject("isDark"),a=t.ref(!1),o=t.ref(null),i=()=>{n.disabled||(a.value=!0)},l=()=>{n.disabled||(a.value=!1)};return(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{ref_key:"targetRef",ref:o,class:t.normalizeClass(["editify-tooltip",{"editify-block":e.block}]),onMouseenter:i,onMouseleave:l},[t.renderSlot(e.$slots,"default",{},void 0,!0)],34),t.createVNode(t.unref(tc),{modelValue:a.value,"onUpdate:modelValue":n[0]||(n[0]=e=>a.value=e),node:o.value,border:"","border-color":t.unref(r)?"#e8e8e8":"#1a1a1a",background:t.unref(r)?"#e8e8e8":"#1a1a1a","show-triangle":"",color:t.unref(r)?"#1a1a1a":"#e8e8e8",placement:"bottom",animation:"fade","z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",rc,t.toDisplayString(e.content),1)])),_:1},8,["modelValue","node","border-color","background","color","z-index"])],64))}}),[["__scopeId","data-v-9b9ca2a9"]]),oc={value:{type:String,default:""}},ic=Ys(t.defineComponent({name:"Icon",__name:"icon",props:oc,setup:e=>(e,n)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["editify-icon","editify-icon-"+e.value])},null,2))}),[["__scopeId","data-v-6e00035b"]]),lc={type:{type:String,default:"default",validator:e=>["default","select","display"].includes(e)},name:{type:String,default:""},title:{type:String,default:""},tooltip:{type:Boolean,default:!1},rightBorder:{type:Boolean,default:!1},leftBorder:{type:Boolean,default:!1},color:{type:String,default:""},disabled:{type:Boolean,default:!1},active:{type:Boolean,default:!1},selectConfig:{type:Object,default:null},displayConfig:{type:Object,default:null},hideScroll:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},sc={class:"editify-button"},cc={key:0,class:"editify-button-slot"},dc={key:1},uc={key:1,class:"editify-button-options"},mc=["onClick"],hc={key:1,class:"editify-button-option-flex"},pc=Ys(t.defineComponent({name:"Button",__name:"button",props:lc,emits:["operate","layerShow","layerShown","layerHidden"],setup(e,{expose:n,emit:r}){const a=e,o=r,i=t.ref(!1),l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.computed((()=>{let e=[],t="",n="";return de.isObject(a.selectConfig)&&(Array.isArray(a.selectConfig.options)&&(e=a.selectConfig.options.map((e=>de.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e}))),"number"==typeof a.selectConfig.width&&(t=a.selectConfig.width),"number"==typeof a.selectConfig.maxHeight&&(n=a.selectConfig.maxHeight)),{options:e,width:t,maxHeight:n}})),u=t.computed((()=>{let e=[],t="",n="",r="";if(de.isObject(a.displayConfig)){if("string"!=typeof a.displayConfig.value&&"number"!=typeof a.displayConfig.value||(r=a.displayConfig.value),Array.isArray(a.displayConfig.options)){e=a.displayConfig.options.map((e=>de.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e})),!e.find((e=>e.value==r))&&e[0]&&(r=e[0].value)}"number"==typeof a.displayConfig.width&&(t=a.displayConfig.width),"number"==typeof a.displayConfig.maxHeight&&(n=a.displayConfig.maxHeight)}return{options:e,width:t,maxHeight:n,value:r}})),m=t.computed((()=>"select"==a.type?d.value.options:u.value.options)),h=t.computed((()=>{const e=u.value.options.find((e=>e.value==u.value.value));return e?e.label:""})),p=t.computed((()=>a.color?pe.hex2rgb(a.color):[])),f=t.computed((()=>{if(!a.disabled&&a.color){if(a.active||"down"==l.value)return{color:a.color,backgroundColor:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.15)`};if("hover"==l.value)return{color:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.9)`,backgroundColor:`rgba(${p.value[0]},${p.value[1]},${p.value[2]},0.05)`}}return{}})),g=()=>{a.disabled||("default"==a.type?o("operate",a.name):i.value=!i.value)};return n({show:i,status:l,layerRef:c,handleClick:g}),(e,n)=>(t.openBlock(),t.createElementBlock("div",sc,[t.createElementVNode("div",{class:t.normalizeClass(["editify-button-wrap",{"editify-right-border":e.rightBorder,"editify-left-border":e.leftBorder}])},[t.createVNode(t.unref(ac),{content:e.title,disabled:!e.tooltip,"z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"btnRef",ref:s,style:t.normalizeStyle(f.value),class:t.normalizeClass(["editify-button-el",{"editify-disabled":e.disabled,"editify-active":e.active}]),onMouseenter:n[0]||(n[0]=e=>l.value="hover"),onMouseleave:n[1]||(n[1]=e=>l.value=null),onMousedown:n[2]||(n[2]=e=>l.value="down"),onMouseup:n[3]||(n[3]=e=>l.value="hover"),onClick:g},["default"==e.type||"select"==e.type?(t.openBlock(),t.createElementBlock("div",cc,[t.renderSlot(e.$slots,"default",{},void 0,!0)])):"display"==e.type?(t.openBlock(),t.createElementBlock("div",dc,t.toDisplayString(h.value),1)):t.createCommentVNode("",!0),"select"==e.type||"display"==e.type?(t.openBlock(),t.createBlock(t.unref(ic),{key:2,value:"caret-down",class:t.normalizeClass(["editify-button-caret",{"editify-rotate":i.value}])},null,8,["class"])):t.createCommentVNode("",!0)],38)])),_:3},8,["content","disabled","z-index"]),t.createVNode(t.unref(tc),{ref_key:"layerRef",ref:c,modelValue:i.value,"onUpdate:modelValue":n[4]||(n[4]=e=>i.value=e),node:s.value,border:"",placement:"bottom-start","z-index":e.zIndex+1,animation:"translate",onShow:n[5]||(n[5]=e=>o("layerShow")),onShown:n[6]||(n[6]=e=>o("layerShown")),onHidden:n[7]||(n[7]=e=>o("layerHidden"))},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-button-layer",style:t.normalizeStyle({width:("select"==e.type?d.value.width:u.value.width)+"px",maxHeight:("select"==e.type?d.value.maxHeight:u.value.maxHeight)+"px",overflow:e.hideScroll?"visible":""})},[e.$slots.layer?t.renderSlot(e.$slots,"layer",{key:0,options:m.value},void 0,!0):(t.openBlock(),t.createElementBlock("div",uc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,(n=>(t.openBlock(),t.createElementBlock("div",{onClick:e=>(e=>{a.disabled||(o("operate",a.name,e.value),i.value=!1)})(n),class:t.normalizeClass(["editify-button-option",{"editify-active":"display"==e.type&&n.value==u.value.value}]),style:t.normalizeStyle(n.style||"")},[e.$slots.option?t.renderSlot(e.$slots,"option",{key:0,item:n},void 0,!0):(t.openBlock(),t.createElementBlock("div",hc,[n.icon?(t.openBlock(),t.createBlock(t.unref(ic),{key:0,value:n.icon},null,8,["value"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(n.label),1)]))],14,mc)))),256))]))],4)])),_:3},8,["modelValue","node","z-index"])],2)]))}}),[["__scopeId","data-v-d56d2e99"]]),fc={color:{type:String,default:""},defaultLaTexContent:{type:String,default:""}},gc={class:"editify-mathformula"},bc={class:"editify-mathformula-label"},vc=["placeholder"],yc={class:"editify-mathformula-footer"},wc=Ys(t.defineComponent({name:"InsertMathformula",__name:"insertMathformula",props:fc,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},s=e=>{e.currentTarget.style.borderColor=""},c=()=>{a("insert",i.value)};return t.watch((()=>r.defaultLaTexContent),(e=>{i.value=e}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createElementBlock("div",gc,[t.createElementVNode("div",bc,t.toDisplayString(r.defaultLaTexContent?t.unref(o)("editMathformula"):t.unref(o)("insertMathformula")),1),t.withDirectives(t.createElementVNode("textarea",{class:"editify-mathformula-textarea","onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e),placeholder:t.unref(o)("mathformulaPlaceholder"),onFocus:l,onBlur:s},null,40,vc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",yc,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:c},t.toDisplayString(t.unref(o)("confirm")),5)])]))}}),[["__scopeId","data-v-ae0ed37b"]]),xc="mathformula",Ec=["math","mrow","mi","mo","mn","msup","msub","mfrac","msqrt","mroot","munder","mover","munderover","mtable","mtr","mtd","mtext","mspace","mmultiscripts","menclose","mglyph","maction","maligngroup","malignmark","mprescripts","none","mpadded","ms","mphantom","mstyle","merror","mscarries","mscarry","msline","msgroup","msrow","mscolumn","mstack","mlongdiv","mlabeledtr","mlabeledmultiscripts","semantics","msubsup"],kc=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"span",marks:{"data-editify-mathformula":!0}});return e&&e.marks["data-editify-mathformula"]||""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:xc,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertMathformula")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!!Hl(r.value,a.value,{parsedom:"span",marks:{"data-editify-mathformula":!0}}),disabled:e.disabled||i.value||as(r.value,a.value)||ls(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"mathformula"}),layer:()=>t.h(wc,{color:e.color,defaultLaTexContent:s.value,onInsert:t=>{Ds(r.value,a.value,t,e.config.handleError),l.value.show=!1}})}):null}}),{name:`_${xc}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Sc={modelValue:{type:Boolean,default:!1},node:{type:[String,Node],default:null},scrollNode:{type:[String,Node],default:null},type:{type:String,default:"text",validator:e=>["text","table","link","codeBlock","image","video","orderList","unorderList"].includes(e)},config:{type:Object,default:null},color:{type:String,default:""},zIndex:{type:Number,default:1}},Tc={disabled:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array],default:!1},label:{type:String,default:null},value:{type:[Object,Number,String,Array],default:""},round:{type:Boolean,default:!1},placement:{type:String,default:"right",validator:e=>["left","right"].includes(e)},color:{type:String,default:"",validator:e=>de.matchingText(e,"hex")}},_c=["data-editify-placement","textContent"],Cc=["value","disabled","checked"],Nc=["data-editify-placement","textContent"],Bc=Ys(t.defineComponent({name:"Checkbox",__name:"checkbox",props:Tc,emits:["update:modelValue","change"],setup(e,{emit:n}){const r=e,a=n,o=t.computed((()=>"boolean"==typeof r.modelValue?r.modelValue:!!Array.isArray(r.modelValue)&&r.modelValue.some((e=>de.equal(e,r.value))))),i=t.computed((()=>{let e={};return r.color&&o.value&&!r.disabled&&(e.backgroundColor=r.color,e.borderColor=r.color),e})),l=e=>{if(Array.isArray(r.modelValue)){let t=[...r.modelValue];e.target.checked&&!o.value?t.push(r.value):o.value&&(t=t.filter((e=>!de.equal(e,r.value)))),a("update:modelValue",t),a("change",t)}else"boolean"==typeof r.modelValue&&(a("update:modelValue",e.target.checked),a("change",e.target.checked))};return(e,n)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["editify-checkbox",{"editify-disabled":e.disabled}])},["left"==e.placement&&e.label?(t.openBlock(),t.createElementBlock("span",{key:0,class:"editify-checkbox-label","data-editify-placement":e.placement,textContent:t.toDisplayString(e.label)},null,8,_c)):t.createCommentVNode("",!0),t.createElementVNode("input",{onChange:l,value:e.value,disabled:e.disabled,checked:o.value,type:"checkbox"},null,40,Cc),t.createElementVNode("span",{class:t.normalizeClass(["editify-checkbox-item",{"editify-reverse":!e.color,"editify-round":e.round,"editify-checked":o.value&&!e.disabled}]),style:t.normalizeStyle(i.value)},[t.createVNode(t.unref(ic),{value:"check",style:t.normalizeStyle({opacity:o.value?"":0})},null,8,["style"])],6),"right"==e.placement&&e.label?(t.openBlock(),t.createElementBlock("span",{key:1,class:"editify-checkbox-label","data-editify-placement":e.placement,textContent:t.toDisplayString(e.label)},null,8,Nc)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-2ba291d8"]]),Mc={color:{type:String,default:""},presetUrl:{type:String,default:""},presetNewOpen:{type:Boolean,default:!1}},zc={class:"editify-link"},Ac={class:"editify-link-label"},Oc=["placeholder"],Ic={class:"editify-link-footer"},Rc={class:"editify-link-operations"},Lc=["href"],Dc=Ys(t.defineComponent({name:"UpdateLink",__name:"updateLink",props:Mc,emits:["remove","modify"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(!1);t.watch((()=>r.presetNewOpen),(e=>{l.value=!!e}),{immediate:!0}),t.watch((()=>r.presetUrl),(e=>{i.value=e||""}),{immediate:!0});const s=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},c=e=>{e.currentTarget.style.borderColor=""},d=()=>{a("remove")},u=()=>{a("modify",i.value,l.value)};return t.onBeforeUnmount((()=>{a("modify",i.value,l.value)})),(e,n)=>(t.openBlock(),t.createElementBlock("div",zc,[t.createElementVNode("div",Ac,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onChange:u,onFocus:s,onBlur:c,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":n[0]||(n[0]=e=>i.value=e),type:"url"},null,40,Oc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",Ic,[t.createVNode(t.unref(Bc),{onChange:u,modelValue:l.value,"onUpdate:modelValue":n[1]||(n[1]=e=>l.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Rc,[t.createElementVNode("span",{onClick:d},t.toDisplayString(t.unref(o)("removeLink")),1),t.createElementVNode("a",{href:i.value,target:"_blank",style:t.normalizeStyle({color:e.color||""})},t.toDisplayString(t.unref(o)("viewLink")),13,Lc)])])]))}}),[["__scopeId","data-v-fa40f123"]]),$c={color:{type:String,default:""},presetText:{type:String,default:""}},jc={class:"editify-link"},Pc={class:"editify-link-label"},qc=["placeholder"],Fc=["placeholder"],Hc={class:"editify-link-footer"},Vc={class:"editify-link-operations"},Uc=Ys(t.defineComponent({name:"InsertLink",__name:"insertLink",props:$c,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(""),s=t.ref(!1);t.watch((()=>r.presetText),(e=>{l.value=e||""}),{immediate:!0});const c=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},d=e=>{e.currentTarget.style.borderColor=""},u=()=>{a("insert",l.value,i.value,s.value)};return(e,n)=>(t.openBlock(),t.createElementBlock("div",jc,[t.createElementVNode("div",Pc,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkTextEnterPlaceholder"),"onUpdate:modelValue":n[0]||(n[0]=e=>l.value=e),type:"text"},null,40,qc),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":n[1]||(n[1]=e=>i.value=e),type:"url"},null,40,Fc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",Hc,[t.createVNode(t.unref(Bc),{modelValue:s.value,"onUpdate:modelValue":n[2]||(n[2]=e=>s.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Vc,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:u},t.toDisplayString(t.unref(o)("insertLink")),5)])])]))}}),[["__scopeId","data-v-c45c005e"]]),Wc="link",Kc=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.computed((()=>{const e=Hl(n.value,r.value,{parsedom:"a"});return e?{url:e.marks.href,newOpen:"_blank"==e.marks.target}:{url:"",newOpen:!1}}));return()=>t.h(Dc,{color:e.color,toolbar:!0,presetNewOpen:a.value.newOpen,presetUrl:a.value.url,onModify:(e,t)=>{if(!e)return;const a=Hl(n.value,r.value,{parsedom:"a"});a&&(a.marks.href=e,t?a.marks.target="_blank":delete a.marks.target,n.value.domRender())},onRemove:()=>{const e=Hl(n.value,r.value,{parsedom:"a"});e&&(e.parsedom=y.TEXT_NODE,delete e.marks.target,delete e.marks.href,delete e.marks["data-editify-element"],n.value.domRender(),n.value.rangeRender())}})}),{name:`_${Wc}`,props:{color:String}}),Gc=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>ws(a.value)));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Wc,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertLink")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||ls(r.value,a.value)||as(r.value,a.value)||Yl(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"link"}),layer:()=>t.h(Uc,{color:e.color,presetText:s.value,onInsert:(e,t,n)=>{t&&(Ms(r.value,e,t,n),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${Wc}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Zc={color:{type:String,default:""},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},Xc={class:"editify-image"},Yc={class:"editify-image-header"},Qc={key:0,class:"editify-image-remote"},Jc=["placeholder"],ed={key:1,class:"editify-image-upload"},td=["multiple"],nd=Ys(t.defineComponent({name:"InsertImage",__name:"insertImage",props:Zc,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:r.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},u=e=>{e.currentTarget.style.borderColor=""},m=()=>{a("insert",[l.value])},h=async e=>{const t=e.currentTarget,n=t.files;if(!n||!n.length)return;let o=[];for(let a=0;a<n.length;a++){const e=n[a],t=c(e);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?r.maxSize&&e.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",e):r.minSize&&e.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",e):o.push(e):"function"==typeof r.handleError&&r.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(o)||[];else for(let t=0;t<o.length;t++){const n=await fe.dataFileToBase64(o[t]);e.push(n)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",Xc,[t.createElementVNode("div",Yc,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-image-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(s.value("upload"))},t.toDisplayString(t.unref(o)("uploadImage")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-image-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(s.value("remote"))},t.toDisplayString(t.unref(o)("remoteImage")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-image-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",Qc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("imageUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Jc),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-image-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:m},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",ed,[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"image/*",onChange:h,type:"file"},null,40,td)]))]))}}),[["__scopeId","data-v-67d2dc3f"]]),rd="image",ad=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=e=>{const t=r.value.range.anchor.element;if(t){const a={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,a):t.styles=a,r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}};return()=>[t.h(pc,{name:"set30Width",title:o("width30"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("30%")},{default:()=>" 30% "}),t.h(pc,{name:"set50Width",title:o("width50"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("50%")},{default:()=>" 50% "}),t.h(pc,{name:"set100Width",title:o("width100"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("100%")},{default:()=>" 100% "}),t.h(pc,{name:"setAutoWidth",title:o("auto"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>i("auto")},{default:()=>t.h(ic,{value:"auto-width"})}),t.h(pc,{name:"deleteImage",title:o("deleteImage"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>{const e=Hl(r.value,a.value,{parsedom:"img"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())}},{default:()=>t.h(ic,{value:"delete"})})]}),{name:`_${rd}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),od=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:rd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertImage")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"image"}),layer:()=>t.h(nd,{color:e.color,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>{l.value.layerRef.setPosition()},onInsert:e=>{const t=e.filter((e=>!!e));0!=t.length&&(t.forEach((e=>{zs(r.value,e)})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${rd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),id={color:{type:String,default:""},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},ld={class:"editify-video"},sd={class:"editify-video-header"},cd={key:0,class:"editify-video-remote"},dd=["placeholder"],ud={key:1,class:"editify-video-upload"},md=["multiple"],hd=Ys(t.defineComponent({name:"InsertVideo",__name:"insertVideo",props:id,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:r.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},u=e=>{e.currentTarget.style.borderColor=""},m=()=>{a("insert",[l.value])},h=async e=>{const t=e.currentTarget,n=t.files;if(!n||!n.length)return;let o=[];for(let a=0;a<n.length;a++){const e=n[a],t=c(e);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?r.maxSize&&e.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",e):r.minSize&&e.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",e):o.push(e):"function"==typeof r.handleError&&r.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(o)||[];else for(let t=0;t<o.length;t++){const n=await fe.dataFileToBase64(o[t]);e.push(n)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",ld,[t.createElementVNode("div",sd,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-video-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(s.value("upload"))},t.toDisplayString(t.unref(o)("uploadVideo")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-video-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(s.value("remote"))},t.toDisplayString(t.unref(o)("remoteVideo")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-video-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",cd,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("videoUrlPlaceholder"),onBlur:u,onFocus:d},null,40,dd),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-video-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:m},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",ud,[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"video/*",onChange:h,type:"file"},null,40,md)]))]))}}),[["__scopeId","data-v-c4612c63"]]),pd="video",fd=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"video"});return e?{controls:!!e.marks.controls,loop:!!e.marks.loop,autoplay:!!e.marks.autoplay,muted:!!e.marks.muted}:{controls:!1,loop:!1,autoplay:!1,muted:!1}})),l=e=>{const t=r.value.range.anchor.element;if(t){const a={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,a):t.styles=a,r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}},s=e=>{const t=r.value.range.anchor.element;i.value[e]?delete t.marks[e]:t.marks[e]=!0,i.value[e]=!i.value[e],r.value.domRender(),r.value.rangeRender()};return()=>[t.h(pc,{name:"set30Width",title:o("width30"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("30%")},{default:()=>" 30% "}),t.h(pc,{name:"set50Width",title:o("width50"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("50%")},{default:()=>" 50% "}),t.h(pc,{name:"set100Width",title:o("width100"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("100%")},{default:()=>" 100% "}),t.h(pc,{name:"setAutoWidth",title:o("auto"),tooltip:e.tooltip,color:e.color,rightBorder:!0,zIndex:e.zIndex,onOperate:()=>l("auto")},{default:()=>t.h(ic,{value:"auto-width"})}),t.h(pc,{name:"autoplay",title:i.value.autoplay?o("disabledAutoplay"):o("autoplay"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("autoplay")},{default:()=>t.h(ic,{value:i.value.autoplay?"autoplay":"stop"})}),t.h(pc,{name:"loop",title:i.value.loop?o("disabledLoop"):o("loop"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("loop")},{default:()=>t.h(ic,{value:i.value.loop?"loop":"single"})}),t.h(pc,{name:"muted",title:i.value.muted?o("unmuted"):o("muted"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("muted")},{default:()=>t.h(ic,{value:i.value.muted?"muted":"unmuted"})}),t.h(pc,{name:"controls",title:o("controls"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:!0,onOperate:()=>s("controls")},{default:()=>t.h(ic,{value:"controls"})}),t.h(pc,{name:"deleteVideo",title:o("deleteVideo"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>{const e=Hl(r.value,a.value,{parsedom:"video"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())}},{default:()=>t.h(ic,{value:"delete"})})]}),{name:`_${pd}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),gd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:pd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertVideo")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"video"}),layer:()=>t.h(hd,{color:e.color,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>l.value.layerRef.setPosition(),onInsert:e=>{const t=e.filter((e=>!!e));0!=t.length&&(t.forEach((e=>{As(r.value,e)})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),bd={color:{type:String,default:""},maxRows:{type:Number,default:10},maxColumns:{type:Number,default:10}},vd={class:"editify-table"},yd=["onMouseenter","onClick"],wd=[(e=>(t.pushScopeId("data-v-9a40c4f5"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,null,-1)))],xd={class:"editify-table-footer"},Ed={key:0},kd={key:1},Sd=Ys(t.defineComponent({name:"InsertTable",__name:"insertTable",props:bd,emits:["insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref((()=>{const e=[];for(let t=1;t<=r.maxRows;t++){let n=[];for(let e=1;e<=r.maxColumns;e++)n.push({x:t,y:e,inside:!1});e.push(n)}return e})()),l=t.computed((()=>i.value.flat().filter((e=>e.inside)).sort(((e,t)=>e.x>t.x&&e.y>t.y||e.x>t.x||e.y>t.y?-1:1))[0]));return(e,n)=>(t.openBlock(),t.createElementBlock("div",vd,[t.createElementVNode("table",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(e=>(t.openBlock(),t.createElementBlock("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e,(e=>(t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass({"editify-inside":e.inside}),onMouseenter:t=>(e=>{for(let t in i.value){const n=i.value[t];for(let r in n)n[r].x<=e.x&&n[r].y<=e.y?i.value[t][r].inside=!0:i.value[t][r].inside=!1}})(e),onClick:t=>{var n;a("insert",(n=e).x,n.y)}},wd,42,yd)))),256))])))),256))]),t.createElementVNode("div",xd,[l.value?(t.openBlock(),t.createElementBlock("span",Ed,t.toDisplayString(l.value.x)+" x "+t.toDisplayString(l.value.y),1)):(t.openBlock(),t.createElementBlock("span",kd,t.toDisplayString(t.unref(o)("insertTable")),1))])]))}}),[["__scopeId","data-v-9a40c4f5"]]),Td="table",_d=t.defineComponent(((e,{emit:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.computed((()=>e=>{if(!r.value.range)return!1;const t=Fl(r.value.range.focus.element,{parsedom:"td"});if(!t)return!1;if("left"==e){let e=!1;const n=jl(t),a=r.value.getPreviousElement(t);if(a)if(a.hasMarks()&&a.marks["data-editify-merged"]){const{crossColumnElement:t}=$l(r.value,a);if(t){const{rowspan:r}=jl(t);e=r==n.rowspan}}else{const{rowspan:t}=jl(a);e=t==n.rowspan}return e}if("right"==e){let e=!1;const n=jl(t);let a=r.value.getNextElement(t);for(;a;){if(!a.hasMarks()||!a.marks["data-editify-merged"]){const{rowspan:t}=jl(a);e=t==n.rowspan;break}{const{crossColumnElement:e}=$l(r.value,a);if(!e)break;a=r.value.getNextElement(a)}}return e}if("up"==e){let e=!1;const n=jl(t),a=t.parent.children.findIndex((e=>e.isEqual(t))),o=r.value.getPreviousElement(t.parent);if(o){const t=o.children[a];if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossRowElement:a}=$l(r.value,t);if(a){const{colspan:t}=jl(a);e=t==n.colspan}}else{const{colspan:r}=jl(t);e=r==n.colspan}}return e}if("down"==e){let e=!1;const n=jl(t),a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=r.value.getNextElement(t.parent);for(;o;){const t=o.children[a];if(!t.hasMarks()||!t.marks["data-editify-merged"]){const{colspan:r}=jl(t);e=r==n.colspan;break}{const{crossRowElement:e}=$l(r.value,t);if(!e)break;o=r.value.getNextElement(o)}}return e}return!1})),l=(e="up")=>{const t=Hl(r.value,a.value,{parsedom:"table"});if(t){const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?r.value.addElementBefore(n,t):r.value.addElementAfter(n,t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender()}},s=(e="up")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"td"});if(t){const{rowspan:a}=jl(t);let o=t.parent;const i=o.parent;if("down"==e){let e=1;for(;e<a;)o=r.value.getNextElement(o),e++}const{columnNumber:l}=Pl(i.children),s=[];for(let e=0;e<l;e++)s.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const c=y.create({type:"inblock",parsedom:"tr",children:s});"up"==e?r.value.addElementBefore(c,o):r.value.addElementAfter(c,o),r.value.range.anchor.moveToStart(c),r.value.range.focus.moveToStart(c),r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}},c=(e="left")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"td"});if(t){const n=t.parent,a=n.parent,o=a.parent,i=a.children,l=n.children.findIndex((e=>e.isEqual(t)));i.forEach((t=>{const n=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});"left"==e?r.value.addElementTo(n,t,l):r.value.addElementTo(n,t,l+1)}));const s=o.children.find((e=>"colgroup"==e.parsedom)),c=y.create({type:"closed",parsedom:"col"});if("left"==e?r.value.addElementTo(c,s,l):r.value.addElementTo(c,s,l+1),"left"==e){const e=r.value.getPreviousElement(t);r.value.range.anchor.moveToStart(e),r.value.range.focus.moveToStart(e)}else{const e=r.value.getNextElement(t);r.value.range.anchor.moveToStart(e),r.value.range.focus.moveToStart(e)}r.value.domRender(),r.value.rangeRender()}},d=()=>{const e=Hl(r.value,a.value,{parsedom:"table"});e&&(e.toEmpty(),r.value.domRender(),r.value.rangeRender())},u=e=>{if(!i.value(e))return;r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"td"});if(t)if("left"==e){const e=jl(t),n=r.value.getPreviousElement(t);if(n)if(n.hasMarks()&&n.marks["data-editify-merged"]){const{crossColumnElement:a}=$l(r.value,n);if(a){const{rowspan:n,colspan:o}=jl(a);n==e.rowspan&&(a.marks.colspan=o+e.colspan,t.children.forEach((e=>{a.children.push(e),e.parent=a})),Dl(t),r.value.range.anchor.moveToEnd(a),r.value.range.focus.moveToEnd(a),r.value.domRender(),r.value.rangeRender())}}else{const{rowspan:a,colspan:o}=jl(n);a==e.rowspan&&(n.hasMarks()?n.marks.colspan=o+e.colspan:n.marks={colspan:o+e.colspan},t.children.forEach((e=>{n.children.push(e),e.parent=n})),Dl(t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender())}}else if("right"==e){const e=jl(t);let n=r.value.getNextElement(t);for(;n;){if(!n.hasMarks()||!n.marks["data-editify-merged"]){const{rowspan:a,colspan:o}=jl(n);a==e.rowspan&&(t.hasMarks()?t.marks.colspan=e.colspan+o:t.marks={colspan:e.colspan+o},n.children.forEach((e=>{t.children.push(e),e.parent=t})),Dl(n),r.value.range.anchor.moveToEnd(t),r.value.range.focus.moveToEnd(t),r.value.domRender(),r.value.rangeRender());break}{const{crossColumnElement:e}=$l(r.value,n);if(!e)break;n=r.value.getNextElement(n)}}}else if("up"==e){const e=jl(t),n=t.parent.children.findIndex((e=>e.isEqual(t))),a=r.value.getPreviousElement(t.parent);if(a){const o=a.children[n];if(o.hasMarks()&&o.marks["data-editify-merged"]){const{crossRowElement:n}=$l(r.value,o);if(n){const{rowspan:a,colspan:o}=jl(n);o==e.colspan&&(n.marks.rowspan=a+e.rowspan,t.children.forEach((e=>{n.children.push(e),e.parent=n})),Dl(t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender())}}else{const{rowspan:n,colspan:a}=jl(o);a==e.colspan&&(o.hasMarks()?o.marks.rowspan=n+e.rowspan:o.marks={rowspan:n+e.rowspan},t.children.forEach((e=>{o.children.push(e),e.parent=o})),Dl(t),r.value.range.anchor.moveToEnd(o),r.value.range.focus.moveToEnd(o),r.value.domRender(),r.value.rangeRender())}}}else if("down"==e){const e=jl(t),n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=r.value.getNextElement(t.parent);for(;a;){const o=a.children[n];if(!o.hasMarks()||!o.marks["data-editify-merged"]){const{rowspan:n,colspan:a}=jl(o);a==e.colspan&&(t.hasMarks()?t.marks.rowspan=e.rowspan+n:t.marks={rowspan:e.rowspan+n},o.children.forEach((e=>{t.children.push(e),e.parent=t})),Dl(o),r.value.range.anchor.moveToEnd(t),r.value.range.focus.moveToEnd(t),r.value.domRender(),r.value.rangeRender());break}{const{crossRowElement:e}=$l(r.value,o);if(!e)break;a=r.value.getNextElement(a)}}}};return()=>[t.h(pc,{name:"textWrapUp",title:o("textWrapUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>l("up")},{default:()=>t.h(ic,{value:"text-wrap",class:"editify-icon-rotate"})}),t.h(pc,{name:"textWrapDown",title:o("textWrapDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>l("down")},{default:()=>t.h(ic,{value:"text-wrap"})}),t.h(pc,{name:"insertRowTop",title:o("insertRowTop"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("up")},{default:()=>t.h(ic,{value:"insert-row-top"})}),t.h(pc,{name:"insertRowBottom",title:o("insertRowBottom"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("down")},{default:()=>t.h(ic,{value:"insert-row-bottom"})}),t.h(pc,{name:"deleteRow",title:o("deleteRow"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>(()=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const e=Hl(r.value,a.value,{parsedom:"td"});if(e){const t=e.parent;if(1==t.parent.children.length)return void d();const a=t.children.findIndex((t=>t.isEqual(e))),o=r.value.getPreviousElement(t),i=r.value.getNextElement(t);t.children.forEach(((e,n)=>{const a=jl(e);if(e.hasMarks()&&e.marks["data-editify-merged"]){const{crossRowElement:t}=$l(r.value,e);if(t){const{rowspan:e}=jl(t);e-1==1?delete t.marks.rowspan:t.marks.rowspan=e-1}}else if(a.rowspan>1){let e=r.value.getNextElement(t);e&&a.rowspan-1>1&&(e.children[n].hasMarks()?e.children[n].marks.rowspan=a.rowspan-1:e.children[n].marks={rowspan:a.rowspan-1})}})),t.toEmpty(),o?(r.value.range.anchor.moveToEnd(o.children[a]),r.value.range.focus.moveToEnd(o.children[a])):(r.value.range.anchor.moveToEnd(i.children[a]),r.value.range.focus.moveToEnd(i.children[a])),r.value.domRender(),r.value.rangeRender(),setTimeout((()=>{n("reset-toolbar")}),0)}})()},{default:()=>t.h(ic,{value:"delete-row"})}),t.h(pc,{name:"insertColumnLeft",title:o("insertColumnLeft"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>c("left")},{default:()=>t.h(ic,{value:"insert-column-left"})}),t.h(pc,{name:"insertColumnRight",title:o("insertColumnRight"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>c("right")},{default:()=>t.h(ic,{value:"insert-column-right"})}),t.h(pc,{name:"deleteColumn",title:o("deleteColumn"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,rightBorder:!0,onOperate:()=>(()=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const e=Hl(r.value,a.value,{parsedom:"td"});if(e){const t=e.parent,n=t.parent.children,a=t.parent.parent;if(1==t.children.length)return void d();const o=t.children.findIndex((t=>t.isEqual(e))),i=r.value.getPreviousElement(e),l=r.value.getNextElement(e);n.forEach((e=>{const t=e.children[o],n=jl(t);if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossColumnElement:e}=$l(r.value,t);if(e){const{colspan:t}=jl(e);t-1==1?delete e.marks.colspan:e.marks.colspan=t-1}}else if(n.colspan>1){let e=r.value.getNextElement(t);e&&n.colspan-1>1&&(e.hasMarks()?e.marks.colspan=n.colspan-1:e.marks={colspan:n.colspan-1})}t.toEmpty()})),a.children.find((e=>"colgroup"==e.parsedom)).children[o].toEmpty(),i?(r.value.range.anchor.moveToEnd(i),r.value.range.focus.moveToEnd(i)):(r.value.range.anchor.moveToEnd(l),r.value.range.focus.moveToEnd(l)),r.value.domRender(),r.value.rangeRender()}})()},{default:()=>t.h(ic,{value:"delete-column"})}),t.h(pc,{name:"mergeCellsLeft",title:o("mergeCellsLeft"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("left"),onOperate:()=>u("left")},{default:()=>t.h(ic,{value:"merge-cells-left"})}),t.h(pc,{name:"mergeCellsRight",title:o("mergeCellsRight"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("right"),onOperate:()=>u("right")},{default:()=>t.h(ic,{value:"merge-cells-right"})}),t.h(pc,{name:"mergeCellsUp",title:o("mergeCellsUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("up"),onOperate:()=>u("up")},{default:()=>t.h(ic,{value:"merge-cells-up"})}),t.h(pc,{name:"mergeCellsDown",title:o("mergeCellsDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,disabled:!i.value("down"),onOperate:()=>u("down")},{default:()=>t.h(ic,{value:"merge-cells-down"})}),t.h(pc,{name:"deleteTable",title:o("deleteTable"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:!0,onOperate:()=>d()},{default:()=>t.h(ic,{value:"delete-table"})})]}),{name:`_${Td}`,props:{color:String,zIndex:Number,tooltip:Boolean},emits:["reset-toolbar"]}),Cd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Td,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertTable")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||os(r.value,a.value)||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"table"}),layer:()=>t.h(Sd,{color:e.color,maxRows:e.config.maxRows,maxColumns:e.config.maxColumns,onInsert:(e,t)=>{Os(r.value,e,t),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${Td}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Nd="codeBlock",Bd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const e=Hl(r.value,a.value,{parsedom:"pre"});return e&&e.marks["data-editify-hljs"]||""})),s=(e="up")=>{r.value.range.anchor.isEqual(r.value.range.focus)||(r.value.range.anchor.element=r.value.range.focus.element,r.value.range.anchor.offset=r.value.range.focus.offset);const t=Hl(r.value,a.value,{parsedom:"pre"});if(t){const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?r.value.addElementBefore(n,t):r.value.addElementAfter(n,t),r.value.range.anchor.moveToEnd(n),r.value.range.focus.moveToEnd(n),r.value.domRender(),r.value.rangeRender()}};return n({btnRef:i}),()=>[t.h(pc,{name:"textWrapUp",title:o("textWrapUp"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("up")},{default:()=>t.h(ic,{value:"text-wrap",class:"editify-icon-rotate"})}),t.h(pc,{name:"textWrapDown",title:o("textWrapDown"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:()=>s("down")},{default:()=>t.h(ic,{value:"text-wrap"})}),e.language.show?t.h(pc,{ref:i,name:"languages",type:"display",title:o("selectLanguages"),leftBorder:e.language.leftBorder,rightBorder:e.language.rightBorder,displayConfig:{options:e.language.options,value:l.value,width:e.language.width,maxHeight:e.language.maxHeight},active:!1,disabled:e.language.disabled,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,onOperate:(e,t)=>(e=>{const t=Hl(r.value,a.value,{parsedom:"pre"});t&&(Object.assign(t.marks,{"data-editify-hljs":e}),r.value.domRender(),r.value.rangeRender())})(t)},{default:()=>t.h(ic,{value:"text-wrap"})}):null]}),{name:`_${Nd}`,props:{color:String,zIndex:Number,tooltip:Boolean,language:Object}}),Md=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Nd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("inserCodeBlock")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!!Hl(r.value,a.value,{parsedom:"pre"}),disabled:e.disabled||i.value||os(r.value,a.value)||ss(r.value,a.value)||cs(r.value,a.value)||Yl(r.value,a.value)||es(r.value,a.value)||e.config.disabled,onOperate:()=>{Is(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code-block"})}):null}}),{name:`_${Nd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),zd="orderList",Ad=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.inject("$editTrans"),o=t.computed((()=>e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ol"}});return t&&t.marks["data-editify-list-style"]?t.marks["data-editify-list-style"]==e:"decimal"==e})),i=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getPreviousElement(e);r&&Vl(r,!0)&&i(r,t)},l=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getNextElement(e);r&&Vl(r,!0)&&l(r,t)},s=e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ol"}});t.marks["data-editify-list-style"]=e;const a=n.value.getPreviousElement(t),o=n.value.getNextElement(t);a&&Vl(a,!0)&&i(a,e),o&&Vl(o,!0)&&l(o,e),n.value.domRender(),n.value.rangeRender()};return()=>[t.h(pc,{name:"decimal",title:a("decimal"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("decimal"),onOperate:()=>s("decimal")},{default:()=>t.h(ic,{value:"list-decimal",style:{fontSize:"18px"}})}),t.h(pc,{name:"cjk-ideographic",title:a("cjkIdeographic"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("cjk-ideographic"),onOperate:()=>s("cjk-ideographic")},{default:()=>t.h(ic,{value:"list-cjk-ideographic",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-roman",title:a("lowerRoman"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-roman"),onOperate:()=>s("lower-roman")},{default:()=>t.h(ic,{value:"list-lower-roman",style:{fontSize:"18px"}})}),t.h(pc,{name:"upper-roman",title:a("upperRoman"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("upper-roman"),onOperate:()=>s("upper-roman")},{default:()=>t.h(ic,{value:"list-upper-roman",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-alpha",title:a("lowerAlpha"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-alpha"),onOperate:()=>s("lower-alpha")},{default:()=>t.h(ic,{value:"list-lower-alpha",style:{fontSize:"18px"}})}),t.h(pc,{name:"upper-alpha",title:a("upperAlpha"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("upper-alpha"),onOperate:()=>s("upper-alpha")},{default:()=>t.h(ic,{value:"list-upper-alpha",style:{fontSize:"18px"}})}),t.h(pc,{name:"lower-greek",title:a("lowerGreek"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("lower-greek"),onOperate:()=>s("lower-greek")},{default:()=>t.h(ic,{value:"list-lower-greek",style:{fontSize:"18px"}})})]}),{name:`_${zd}`,props:{color:String,zIndex:Number,tooltip:Boolean}}),Od=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:zd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("orderList")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Wl(r.value,a.value,!0),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Cs(r.value,a.value,!0),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"list-ordered"})}):null}}),{name:`_${zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Id="unorderList",Rd=t.defineComponent((e=>{const n=t.inject("editor"),r=t.inject("dataRangeCaches"),a=t.inject("$editTrans"),o=t.computed((()=>e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});return t&&t.marks["data-editify-list-style"]?t.marks["data-editify-list-style"]==e:"disc"==e})),i=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getPreviousElement(e);r&&Vl(r,!1)&&i(r,t)},l=(e,t)=>{e.marks["data-editify-list-style"]=t;const r=n.value.getNextElement(e);r&&Vl(r,!1)&&l(r,t)},s=e=>{const t=Hl(n.value,r.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});t.marks["data-editify-list-style"]=e;const a=n.value.getPreviousElement(t),o=n.value.getNextElement(t);a&&Vl(a,!1)&&i(a,e),o&&Vl(o,!1)&&l(o,e),n.value.domRender(),n.value.rangeRender()};return()=>[t.h(pc,{name:"disc",title:a("disc"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("disc"),onOperate:()=>s("disc")},{default:()=>t.h(ic,{value:"list-disc",style:{fontSize:"18px"}})}),t.h(pc,{name:"circle",title:a("circle"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("circle"),onOperate:()=>s("circle")},{default:()=>t.h(ic,{value:"list-circle",style:{fontSize:"18px"}})}),t.h(pc,{name:"square",title:a("square"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,active:o.value("square"),onOperate:()=>s("square")},{default:()=>t.h(ic,{value:"list-square",style:{fontSize:"18px"}})})]}),{name:`_${Id}`,props:{color:String,zIndex:Number,tooltip:Boolean}}),Ld=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Id,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("unorderList")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Wl(r.value,a.value,!1),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Cs(r.value,a.value,!1),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"list-unordered"})}):null}}),{name:`_${Id}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Dd="bold",$d=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"font-weight","bold")||us(r.value,a.value,"font-weight","700")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Dd,title:o("bold"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["font-weight"]):ms(r.value,a.value,{"font-weight":"bold"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"bold"})}):null}),{name:`_${Dd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),jd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"font-weight","bold")||us(r.value,a.value,"font-weight","700")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Dd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("bold")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["font-weight"]):ms(r.value,a.value,{"font-weight":"bold"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"bold"})}):null}}),{name:`_${Dd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Pd="italic",qd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"font-style","italic")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Pd,title:o("italic"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["font-style"]):ms(r.value,a.value,{"font-style":"italic"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"italic"})}):null}),{name:`_${Pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Fd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"font-style","italic")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Pd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("italic")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["font-style"]):ms(r.value,a.value,{"font-style":"italic"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"italic"})}):null}}),{name:`_${Pd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Hd="strikethrough",Vd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"text-decoration","line-through")||us(r.value,a.value,"text-decoration-line","line-through")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Hd,title:o("strikethrough"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"line-through"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"strikethrough"})}):null}),{name:`_${Hd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Ud=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"text-decoration","line-through")||us(r.value,a.value,"text-decoration-line","line-through")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Hd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("strikethrough")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"line-through"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"strikethrough"})}):null}}),{name:`_${Hd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Wd="underline",Kd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"text-decoration","underline")||us(r.value,a.value,"text-decoration-line","underline")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Wd,title:o("underline"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"underline"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"underline"})}):null}),{name:`_${Wd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Gd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"text-decoration","underline")||us(r.value,a.value,"text-decoration-line","underline")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Wd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("underline")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["text-decoration","text-decoration-line"]):ms(r.value,a.value,{"text-decoration":"underline"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"underline"})}):null}}),{name:`_${Wd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Zd="code",Xd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>ps(r.value,a.value,"data-editify-code")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Zd,title:o("code"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?gs(r.value,a.value,["data-editify-code"]):fs(r.value,a.value,{"data-editify-code":!0}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code"})}):null}),{name:`_${Zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),Yd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>ps(r.value,a.value,"data-editify-code")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Zd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("code")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?gs(r.value,a.value,["data-editify-code"]):fs(r.value,a.value,{"data-editify-code":!0}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"code"})}):null}}),{name:`_${Zd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Qd="super",Jd=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"vertical-align","super")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:Qd,title:o("super"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"super"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"superscript"})}):null}),{name:`_${Qd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),eu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"vertical-align","super")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:Qd,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("super")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:s.value,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{s.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"super"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"superscript"})}):null}}),{name:`_${Qd}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),tu="sub",nu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>us(r.value,a.value,"vertical-align","sub")));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:tu,title:o("sub"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:l.value,disabled:e.config.disabled,onOperate:()=>{l.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"sub"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"subscript"})}):null}),{name:`_${tu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),ru=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>us(r.value,a.value,"vertical-align","sub")));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:tu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("sub")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:s.value,onOperate:()=>{s.value?hs(r.value,a.value,["vertical-align"]):ms(r.value,a.value,{"vertical-align":"sub"}),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"subscript"})}):null}}),{name:`_${tu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),au="fontSize",ou=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-size",e.value):us(r.value,a.value,"font-size",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:au,type:"display",title:o("fontSize"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,displayConfig:{options:e.config.options,value:l.value,width:e.config.width,maxHeight:e.config.maxHeight},onOperate:(e,t)=>{ms(r.value,a.value,{"font-size":t}),r.value.domRender(),r.value.rangeRender()}}):null}),{name:`_${au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),iu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-size",e.value):us(r.value,a.value,"font-size",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:au,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:s.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("fontSize")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1,onOperate:(e,t)=>{ms(r.value,a.value,{"font-size":t}),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),lu="fontFamily",su=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-family",e.value):us(r.value,a.value,"font-family",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:lu,type:"display",title:o("fontFamily"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,displayConfig:{options:e.config.options,value:l.value,width:e.config.width,maxHeight:e.config.maxHeight},onOperate:(e,t)=>{ms(r.value,a.value,{"font-family":t}),r.value.domRender(),r.value.rangeRender()}}):null}),{name:`_${lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),cu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"font-family",e.value):us(r.value,a.value,"font-family",e)));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:lu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:s.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("fontFamily")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{ms(r.value,a.value,{"font-family":t}),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),du={data:{type:Array,default:function(){return[]}},value:{type:String,default:null},color:{type:String,default:""},tooltip:{type:Boolean,default:!1},zIndex:{type:Number,default:1}},uu={class:"editify-colors"},mu={class:"editify-colors-list"},hu=["onClick"],pu=Ys(t.defineComponent({name:"Colors",__name:"colors",props:du,emits:["change"],setup(e,{emit:n}){const r=n,a=t.inject("$editTrans"),o=e=>{r("change",e.value)};return(e,n)=>(t.openBlock(),t.createElementBlock("div",uu,[t.createElementVNode("div",{class:"editify-colors-header",onClick:n[0]||(n[0]=e=>o({value:""}))},[t.createVNode(t.unref(ic),{value:"remove"}),t.createElementVNode("span",null,t.toDisplayString(t.unref(a)("defaultColor")),1)]),t.createElementVNode("div",mu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(n=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-color",{"editify-active":e.value==n.value}]),style:t.normalizeStyle({borderColor:e.value==n.value&&e.color||""})},[t.createVNode(t.unref(ac),{block:"",content:`${n.label}`,disabled:!e.tooltip,"z-index":e.zIndex},{default:t.withCtx((()=>[t.createElementVNode("div",{onClick:e=>o(n),class:"editify-color-el",style:t.normalizeStyle({background:n.value})},null,12,hu)])),_:2},1032,["content","disabled","z-index"])],6)))),256))])]))}}),[["__scopeId","data-v-c4c4764c"]]),fu="foreColor",gu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"color",e.value):us(r.value,a.value,"color",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:fu,type:"select",title:o("foreColor"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,selectConfig:{options:e.config.options},hideScroll:!0},{default:()=>t.h(ic,{value:"font-color"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,value:l.value,data:n,onChange:e=>{ms(r.value,a.value,{color:e}),i.value.show=!1,r.value.domRender(),r.value.rangeRender()}})}):null}),{name:`_${fu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),bu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"color",e.value):us(r.value,a.value,"color",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:fu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",selectConfig:{options:e.config.options},hideScroll:!0,title:`${o("foreColor")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1},{default:()=>t.h(ic,{value:"font-color"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,zIndex:e.zIndex+2,value:s.value,data:n,onChange:e=>{ms(r.value,a.value,{color:e}),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${fu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),vu="backColor",yu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null),l=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"background",e.value):us(r.value,a.value,"background",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:vu,type:"select",title:o("backColor"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,selectConfig:{options:e.config.options},hideScroll:!0},{default:()=>t.h(ic,{value:"brush"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,value:l.value,data:n,onChange:e=>{ms(r.value,a.value,{background:e}),i.value.show=!1,r.value.domRender(),r.value.rangeRender()}})}):null}),{name:`_${vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),wu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null),s=t.computed((()=>{const t=e.config.options.find((e=>de.isObject(e)?us(r.value,a.value,"background",e.value):us(r.value,a.value,"background",e)));return t?de.isObject(t)?t.value:t:""}));return n({btnRef:l}),()=>{var n,c;return e.config.show?t.h(pc,{ref:l,name:vu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",selectConfig:{options:e.config.options},hideScroll:!0,title:`${o("backColor")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(c=e.config.shortcut)?void 0:c.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"brush"}),layer:({options:n})=>t.h(pu,{tooltip:e.tooltip,color:e.color,zIndex:e.zIndex+2,value:s.value,data:n,onChange:e=>{ms(r.value,a.value,{background:e}),r.value.domRender(),r.value.rangeRender(),l.value.show=!1}})}):null}}),{name:`_${vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),xu="formatClear",Eu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.ref(null);return n({btnRef:i}),()=>e.config.show?t.h(pc,{ref:i,name:xu,title:o("formatClear"),tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.config.disabled,onOperate:()=>{hs(r.value,a.value),gs(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"format-clear"})}):null}),{name:`_${xu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean}}),ku=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:xu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("formatClear")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{hs(r.value,a.value),gs(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"format-clear"})}):null}}),{name:`_${xu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Su=Ys(t.defineComponent({name:"Toolbar",__name:"toolbar",props:Sc,emits:["update:modelValue"],setup(e,{expose:n,emit:r}){const a=e,o=r,i=t.ref(null),l=t.ref(null),s=t.shallowRef([$d,qd,Vd,Kd,Xd,Jd,nu,ou,su,gu,yu,Eu]),c=t.ref([]),d=t.computed({get:()=>a.modelValue,set(e){o("update:modelValue",e)}}),u=t.computed((()=>{let e=[];return l.value&&l.value.btnRef&&l.value.btnRef.layerRef&&l.value.btnRef.layerRef.elRef&&e.push(l.value.btnRef.layerRef.elRef),c.value.forEach((t=>{t&&t.btnRef&&t.btnRef.layerRef&&t.btnRef.layerRef.elRef&&e.push(t.btnRef.layerRef.elRef)})),e})),m=t.computed((()=>e=>a.config.text[e.replace("_","")]));return n({layerRef:i}),(e,n)=>(t.openBlock(),t.createBlock(t.unref(tc),{modelValue:d.value,"onUpdate:modelValue":n[3]||(n[3]=e=>d.value=e),ref_key:"layerRef",ref:i,node:e.node,"scroll-node":e.scrollNode,border:"",placement:"bottom-start",useRange:"text"==e.type,"z-index":e.zIndex,"inside-elements":u.value},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-toolbar",style:t.normalizeStyle(e.config.style)},["image"==e.type?(t.openBlock(),t.createBlock(t.unref(ad),{key:0,onResetToolbar:n[0]||(n[0]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"video"==e.type?(t.openBlock(),t.createBlock(t.unref(fd),{key:1,onResetToolbar:n[1]||(n[1]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"codeBlock"==e.type?(t.openBlock(),t.createBlock(t.unref(Bd),{key:2,ref_key:"codeBlockToolbarRef",ref:l,language:e.config.codeBlock.languages,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["language","tooltip","color","z-index"])):"link"==e.type?(t.openBlock(),t.createBlock(t.unref(Kc),{key:3,color:e.color},null,8,["color"])):"table"==e.type?(t.openBlock(),t.createBlock(t.unref(_d),{key:4,onResetToolbar:n[2]||(n[2]=e=>i.value.setPosition()),tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"orderList"==e.type?(t.openBlock(),t.createBlock(t.unref(Ad),{key:5,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"unorderList"==e.type?(t.openBlock(),t.createBlock(t.unref(Rd),{key:6,tooltip:e.config.tooltip,color:e.color,"z-index":e.zIndex+1},null,8,["tooltip","color","z-index"])):"text"==e.type?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:7},t.renderList(s.value,((n,r)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n),{ref_for:!0,ref:e=>c.value[r]=e,color:e.color,"z-index":e.zIndex+1,config:m.value(n.name),tooltip:e.config.tooltip},null,8,["color","z-index","config","tooltip"])))),256)):t.createCommentVNode("",!0)],4)])),_:1},8,["modelValue","node","scroll-node","useRange","z-index","inside-elements"]))}}),[["__scopeId","data-v-8c767af5"]]),Tu={config:{type:Object,default:null},color:{type:String,default:""},zIndex:{type:Number,default:1}},_u="undo",Cu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.inject("rangeKey"),l=t.ref(null);return n({btnRef:l}),()=>e.config.show?t.h(pc,{ref:l,name:_u,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:a("undo"),leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||o.value||i.value&&r.value.history&&r.value.history.records.length<=1||e.config.disabled,onOperate:()=>r.value.undo()},{default:()=>t.h(ic,{value:"undo"})}):null}),{name:`_${_u}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Nu="redo",Bu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.inject("rangeKey"),l=t.ref(null);return n({btnRef:l}),()=>e.config.show?t.h(pc,{ref:l,name:Nu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:a("redo"),leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||o.value||i.value&&r.value.history&&0==r.value.history.redoRecords.length||e.config.disabled,onOperate:()=>r.value.redo()},{default:()=>t.h(ic,{value:"redo"})}):null}),{name:`_${Nu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Mu="heading",zu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.inject("rangeKey"),s=t.ref(null),c=t.computed((()=>{const t=e.config.options.find((e=>{let t=e;return de.isObject(e)&&(t=e.value),l.value&&r.value.range&&r.value.range.anchor.isEqual(r.value.range.focus)?r.value.range.anchor.element.getBlock().parsedom==t:a.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:s}),()=>{var n,l;return e.config.show?t.h(pc,{ref:s,name:Mu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:c.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("heading")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{Es(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${Mu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Au="indent",Ou=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Au,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",title:`${o("indent")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,selectConfig:{options:e.config.options,width:e.config.width,maxHeight:e.config.maxHeight},leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{"indent-increase"==t?ks(r.value,a.value):"indent-decrease"==t&&Ss(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"indent-increase"})}):null}}),{name:`_${Au}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Iu="quote",Ru=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Iu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("quote")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:is(r.value,a.value),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Ts(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"quote"})}):null}}),{name:`_${Iu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Lu="separator",Du=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Lu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("separator")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:()=>{Rs(r.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"separator"})}):null}}),{name:`_${Lu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),$u="align",ju=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:$u,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",title:`${o("align")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,selectConfig:{options:e.config.options,width:e.config.width,maxHeight:e.config.maxHeight},leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,onOperate:(e,t)=>{_s(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"align-left"})}):null}}),{name:`_${$u}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Pu="task",qu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:Pu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("task")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:Zl(r.value,a.value),disabled:e.disabled||i.value||as(r.value,a.value)||os(r.value,a.value)||e.config.disabled,onOperate:()=>{Ns(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"task"})}):null}}),{name:`_${Pu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Fu="lineHeight",Hu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.inject("rangeKey"),s=t.ref(null),c=t.computed((()=>{const t=e.config.options.find((e=>{let t=e;if(de.isObject(e)&&(t=e.value),l.value&&r.value.range&&r.value.range.anchor.isEqual(r.value.range.focus)){const e=r.value.range.anchor.element.getBlock();return e.hasStyles()&&e.styles["line-height"]==t}return a.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const n=e.element.getBlock(),r=e.element.getInblock();return r?r.hasStyles()&&r.styles["line-height"]==t:n.hasStyles()&&n.styles["line-height"]==t}))}));return t?de.isObject(t)?t.value:t:e.config.defaultValue}));return n({btnRef:s}),()=>{var n,l;return e.config.show?t.h(pc,{ref:s,name:Fu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"display",displayConfig:{options:e.config.options,value:c.value,width:e.config.width,maxHeight:e.config.maxHeight},title:`${o("lineHeight")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,disabled:e.disabled||i.value||as(r.value,a.value)||e.config.disabled,active:!1,onOperate:(e,t)=>{Bs(r.value,a.value,t),r.value.domRender(),r.value.rangeRender()}}):null}}),{name:`_${Fu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Vu="sourceView",Uu=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isSourceView"),i=t.ref(null);return n({btnRef:i}),()=>{var n,l;return e.config.show?t.h(pc,{ref:i,name:Vu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${a("sourceView")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:o.value,disabled:e.disabled||e.config.disabled,onOperate:()=>{o.value=!o.value,o.value||r.value.rangeRender()}},{default:()=>t.h(ic,{value:"source-view"})}):null}}),{name:`_${Vu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Wu="fullScreen",Ku=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("$editTrans"),o=t.inject("isFullScreen"),i=t.ref(null);return n({btnRef:i}),()=>{var n,l;return e.config.show?t.h(pc,{ref:i,name:Wu,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${a("fullScreen")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(l=e.config.shortcut)?void 0:l.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:o.value,disabled:e.disabled||e.config.disabled,onOperate:()=>{o.value=!o.value,r.value.rangeRender()}},{default:()=>t.h(ic,{value:"full-screen"})}):null}}),{name:`_${Wu}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),Gu={color:{type:String,default:""},accept:{type:String,default:null},allowedFileType:{type:Array,default:null},multiple:{type:Boolean,default:!1},maxSize:{type:Number,default:null},minSize:{type:Number,default:null},customUpload:{type:Function,default:null},handleError:{type:Function,default:null}},Zu={class:"editify-attachment"},Xu={class:"editify-attachment-header"},Yu={key:0,class:"editify-attachment-remote"},Qu=["placeholder"],Ju=["placeholder"],em={key:1,class:"editify-attachment-upload"},tm=["placeholder"],nm=["multiple","accept"],rm=Ys(t.defineComponent({name:"InsertAttachment",__name:"insertAttachment",props:Gu,emits:["change","insert"],setup(e,{emit:n}){const r=e,a=n,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.ref(""),c=t.ref(null),d=t.computed((()=>e=>i.value==e?{color:r.color}:{})),u=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},m=e=>{r.color&&(e.currentTarget.style.borderColor=r.color)},h=e=>{e.currentTarget.style.borderColor=""},p=()=>{a("insert",l.value,[s.value])},f=()=>{c.value.click()},g=async()=>{const e=c.value.files;if(!e||!e.length)return;let t=[];for(let n=0;n<e.length;n++){const a=e[n],o=u(a);!(r.allowedFileType&&Array.isArray(r.allowedFileType)&&r.allowedFileType.length)||r.allowedFileType.some((e=>e.toLocaleLowerCase()==o.toLocaleLowerCase()))?r.maxSize&&a.size/1024>r.maxSize?"function"==typeof r.handleError&&r.handleError("maxSizeError",a):r.minSize&&a.size/1024<r.minSize?"function"==typeof r.handleError&&r.handleError("minSizeError",a):t.push(a):"function"==typeof r.handleError&&r.handleError("suffixError",a)}if(t.length){let e=[];if("function"==typeof r.customUpload)e=await r.customUpload(t)||[];else for(let n=0;n<t.length;n++){const r=await fe.dataFileToBase64(t[n]);e.push(r)}a("insert",l.value,e)}c.value.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,n)=>(t.openBlock(),t.createElementBlock("div",Zu,[t.createElementVNode("div",Xu,[t.createElementVNode("div",{onClick:n[0]||(n[0]=e=>i.value="upload"),class:t.normalizeClass(["editify-attachment-header-item",{"editify-active":"upload"==i.value}]),style:t.normalizeStyle(d.value("upload"))},t.toDisplayString(t.unref(o)("uploadAttachment")),7),t.createElementVNode("div",{onClick:n[1]||(n[1]=e=>i.value="remote"),class:t.normalizeClass(["editify-attachment-header-item",{"editify-active":"remote"==i.value}]),style:t.normalizeStyle(d.value("remote"))},t.toDisplayString(t.unref(o)("remoteAttachment")),7),t.createElementVNode("div",{class:t.normalizeClass(["editify-attachment-header-slider","editify-"+i.value]),style:t.normalizeStyle({backgroundColor:e.color||""})},null,6)]),"remote"==i.value?(t.openBlock(),t.createElementBlock("div",Yu,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[2]||(n[2]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:h,onFocus:m,type:"text"},null,40,Qu),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[3]||(n[3]=e=>s.value=e),placeholder:t.unref(o)("attachmentUrlPlaceholder"),onBlur:h,onFocus:m,type:"url"},null,40,Ju),[[t.vModelText,s.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-remote-footer",style:t.normalizeStyle({color:e.color||""})},[t.createElementVNode("span",{onClick:p},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",em,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[4]||(n[4]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:h,onFocus:m,type:"text"},null,40,tm),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-btn",onClick:f},[t.createVNode(t.unref(ic),{value:"upload"}),t.createElementVNode("input",{ref_key:"fileInputRef",ref:c,multiple:e.multiple,accept:e.accept,onChange:g,type:"file"},null,40,nm)])]))]))}}),[["__scopeId","data-v-cd9a7fcb"]]),am="attachment",om=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:am,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,type:"select",hideScroll:!0,title:`${o("insertAttachment")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:!1,disabled:e.disabled||i.value||as(r.value,a.value)||es(r.value,a.value)||e.config.disabled},{default:()=>t.h(ic,{value:"attachment"}),layer:()=>t.h(rm,{color:e.color,accept:e.config.accept,allowedFileType:e.config.allowedFileType,multiple:e.config.multiple,maxSize:e.config.maxSize,minSize:e.config.minSize,customUpload:e.config.customUpload,handleError:e.config.handleError,onChange:()=>l.value.layerRef.setPosition(),onInsert:(e,t)=>{0!=(t=t.filter((e=>!!e))).length&&(t.forEach((t=>{Ls(r.value,t,e||o("attachmentDefaultName"))})),r.value.domRender(),r.value.rangeRender(),l.value.show=!1)}})}):null}}),{name:`_${am}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),im="infoBlock",lm=t.defineComponent(((e,{expose:n})=>{const r=t.inject("editor"),a=t.inject("dataRangeCaches"),o=t.inject("$editTrans"),i=t.inject("isSourceView"),l=t.ref(null);return n({btnRef:l}),()=>{var n,s;return e.config.show?t.h(pc,{ref:l,name:im,tooltip:e.tooltip,color:e.color,zIndex:e.zIndex,title:`${o("insertInfoBlock")}${(null==(n=e.config.shortcut)?void 0:n.title)?`【${null==(s=e.config.shortcut)?void 0:s.title}】`:""}`,leftBorder:e.config.leftBorder,rightBorder:e.config.rightBorder,active:rs(r.value,a.value),disabled:e.disabled||i.value||os(r.value,a.value)||as(r.value,a.value)||e.config.disabled,onOperate:()=>{$s(r.value,a.value),r.value.domRender(),r.value.rangeRender()}},{default:()=>t.h(ic,{value:"info"})}):null}}),{name:`_${im}`,props:{color:String,zIndex:Number,config:Object,tooltip:Boolean,disabled:Boolean}}),sm=["data-editify-mode"],cm=Ys(t.defineComponent({name:"Menu",__name:"menu",props:Tu,setup(e,{expose:n}){const r=t.getCurrentInstance(),a=e,o=t.inject("isSourceView"),i=t.inject("isFullScreen"),l=t.inject("rangeKey"),s=t.inject("showBorder"),c=t.inject("isDisabled"),d=t.inject("isAutoHeight"),u=t.ref(null),m=t.ref(0),h=t.ref({}),p=t.computed((()=>Object.keys(a.config.sequence).sort(((e,t)=>a.config.sequence[e]>a.config.sequence[t]?1:-1)))),f=t.shallowRef([Cu,Bu,zu,Ou,Ru,Du,ju,Od,Ld,qu,jd,Gd,Fd,Ud,Yd,eu,ru,ku,iu,cu,Hu,bu,wu,Gc,od,gd,Cd,Md,Uu,Ku,om,kc,lm]),g=t.computed((()=>e=>f.value.find((t=>t.name==`_${e}`)))),b=t.computed((()=>(i.value||d.value)&&"fixed"==a.config.mode?"default":a.config.mode)),v=t.computed((()=>"fixed"!=b.value&&s.value)),y=t.defineComponent(((e,{expose:n})=>{const r=t.ref(null),o=a.config.extends[e.name];return n({btnRef:r}),()=>{var n,i;return o?t.h(pc,{ref:r,name:e.name,tooltip:a.config.tooltip,color:a.color,zIndex:a.zIndex+1,type:o.type||"default",title:`${o.title||""}${(null==(n=o.shortcut)?void 0:n.title)?`【${null==(i=o.shortcut)?void 0:i.title}】`:""}`,leftBorder:o.leftBorder||!1,rightBorder:o.rightBorder||!1,hideScroll:o.hideScroll||!1,disabled:c.value||!l.value||o.disabled,active:o.active||!1,selectConfig:{width:o.width,maxHeight:o.maxHeight,options:o.options},displayConfig:{width:o.width,maxHeight:o.maxHeight,value:o.value,options:o.options},onLayerShow:()=>{"function"==typeof o.onLayerShow&&o.onLayerShow(e.name,r.value)},onLayerShown:()=>{"function"==typeof o.onLayerShown&&o.onLayerShown(e.name,r.value)},onLayerHidden:()=>{"function"==typeof o.onLayerHidden&&o.onLayerHidden(e.name,r.value)},onOperate:(e,t)=>{"function"==typeof o.onOperate&&o.onOperate(e,t,r.value)}},{default:()=>o.default?o.default(e.name,r.value):null,layer:()=>o.layer?o.layer(e.name,r.value):null,option:()=>o.option?o.option(e.name,r.value):null}):null}}),{props:{name:String}});return t.onMounted((()=>{m.value=u.value.offsetHeight,he.on(window,`resize.editify_menu_${r.uid}`,(()=>{m.value=u.value.offsetHeight}))})),t.onBeforeUnmount((()=>{he.off(window,`resize.editify_menu_${r.uid}`)})),n({height:m,menuItemRefs:h}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"menuRef",ref:u,class:t.normalizeClass(["editify-menu",{"editify-border":v.value,"editify-source":t.unref(o)&&"inner"==b.value,"editify-fullscreen":t.unref(i)}]),"data-editify-mode":b.value,style:t.normalizeStyle({zIndex:e.zIndex,...e.config.style||{}})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(n=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[g.value(n)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.value(n)),{key:0,ref_for:!0,ref:e=>h.value[n]=e,color:e.color,"z-index":e.zIndex+1,config:e.config[n],disabled:t.unref(c)||!t.unref(l),tooltip:e.config.tooltip},null,8,["color","z-index","config","disabled","tooltip"])):(t.openBlock(),t.createBlock(t.unref(y),{key:1,ref_for:!0,ref:e=>h.value[n]=e,name:n},null,8,["name"]))],64)))),256))],14,sm))}}),[["__scopeId","data-v-ab624210"]]),dm={locale:{type:String,default:"zh_CN"},modelValue:{type:String,default:"<p><br></p>"},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},allowCopy:{type:Boolean,default:!0},allowPaste:{type:Boolean,default:!0},allowCut:{type:Boolean,default:!0},allowPasteHtml:{type:Boolean,default:!1},border:{type:Boolean,default:!1},color:{type:String,default:"#03a8f3",validator:e=>!e||de.matchingText(e,"hex")},videoRatio:{type:Number,default:16/9},toolbar:{type:Object,default:null},showWordLength:{type:Boolean,default:!1},customTextPaste:{type:Function,default:null},customHtmlPaste:{type:Function,default:null},customImagePaste:{type:Function,default:null},customVideoPaste:{type:Function,default:null},customFilePaste:{type:Function,default:null},menu:{type:Object,default:null},pasteKeepMarks:{type:Function,default:null},pasteKeepStyles:{type:Function,default:null},customParseNode:{type:Function,default:null},extraKeepTags:{type:Array,default:function(){return[]}},renderRules:{type:Array,default:function(){return[]}},autoheight:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},zIndex:{type:Number,default:1},offset:{type:Number,default:0}},um=["data-editify-uid"],mm=["data-editify-placeholder"],hm=["value"],pm={class:"editify-footer-words"},fm=Ys(t.defineComponent({name:"editify",__name:"editify",props:dm,emits:["update:modelValue","focus","blur","change","keydown","keyup","insertparagraph","rangeupdate","updateview"],setup(e,{expose:n,emit:r}){const a=t.getCurrentInstance(),o=e,i=r,l=(s=o.locale||"zh_CN",e=>({zh_CN:Ks,en_US:Ws}[s][e]));var s;const c=t.ref(null),d=t.ref(null),u=t.ref(null),m=t.ref(null),h=t.ref(null),p=t.ref(null),f=t.ref(!1),g=t.ref(!1),b=t.ref(0),v=t.ref({flatList:[],list:[]}),w=t.ref(!1),x=t.ref(!1),E=t.ref(null),k=t.ref({element:null,start:0}),S=t.ref({show:!1,node:null,type:"text"}),T=t.computed({set(e){i("update:modelValue",e)},get:()=>o.modelValue||"<p><br></p>"}),_=t.computed((()=>le.string2dom(`<div>${T.value}</div>`).innerText)),C=t.computed((()=>!(!(p.value&&T.value&&1==p.value.stack.length&&"block"==p.value.stack[0].type&&p.value.stack[0].parsedom==y.BLOCK_NODE&&p.value.stack[0].isOnlyHasBreak())||p.value.stack[0].hasStyles()||p.value.stack[0].hasMarks())&&!x.value)),N=t.computed((()=>!g.value&&o.border)),B=t.computed((()=>{return qs({use:!0,style:void 0,tooltip:!0,codeBlock:{languages:{show:!0,disabled:!1,options:[{label:(e=l)("autoRecognize"),value:""},...Pn],width:120,maxHeight:180,leftBorder:!0,rightBorder:!1}},text:{bold:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},italic:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},underline:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},code:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},super:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},sub:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,disabled:!1,options:Hs(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!1,disabled:!1,options:Hs(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},foreColor:{show:!0,disabled:!1,options:Hs(e).foreColor,leftBorder:!0,rightBorder:!1},backColor:{show:!0,disabled:!1,options:Hs(e).backColor,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1}}},o.toolbar||{});var e})),M=t.computed((()=>{return qs((e=l,t=o.locale,{use:!0,tooltip:!0,mode:"default",style:void 0,sequence:{undo:0,redo:1,heading:2,indent:3,quote:4,separator:5,align:6,orderList:7,unorderList:8,task:9,bold:10,underline:11,italic:12,strikethrough:13,code:14,super:15,sub:16,formatClear:17,fontSize:18,fontFamily:19,lineHeight:20,foreColor:21,backColor:22,link:23,image:24,video:25,table:26,codeBlock:27,attachment:28,mathformula:29,infoBlock:30,sourceView:31,fullScreen:32},undo:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},redo:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1},heading:{show:!0,disabled:!1,options:Hs(e).heading,defaultValue:"p",width:"zh_CN"==t?130:150,maxHeight:"",leftBorder:!0,rightBorder:!1,shortcut:Ps.heading},indent:{show:!0,disabled:!1,options:Hs(e).indent,width:"zh_CN"==t?110:150,maxHeight:"",leftBorder:!1,rightBorder:!1,shortcut:Ps.indent},quote:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.quote},separator:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.separator},align:{show:!0,disabled:!1,options:Hs(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!0,rightBorder:!1,shortcut:Ps.align},orderList:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.orderList},unorderList:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.unorderList},task:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.task},bold:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1,shortcut:Ps.bold},underline:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.underline},italic:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.italic},strikethrough:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.strikethrough},code:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.code},super:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.super},sub:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.sub},formatClear:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.formatClear},fontSize:{show:!0,disabled:!1,options:Hs(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1,shortcut:Ps.fontSize},fontFamily:{show:!0,disabled:!1,options:Hs(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1,shortcut:Ps.fontFamily},lineHeight:{show:!0,disabled:!1,options:Hs(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1,shortcut:Ps.lineHeight},foreColor:{show:!0,disabled:!1,options:Hs(e).foreColor,leftBorder:!0,rightBorder:!1,shortcut:Ps.foreColor},backColor:{show:!0,disabled:!1,options:Hs(e).backColor,leftBorder:!1,rightBorder:!1,shortcut:Ps.backColor},link:{show:!0,disabled:!1,leftBorder:!0,rightBorder:!1,shortcut:Ps.link},image:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,allowedFileType:["jpg","png","jpeg","webp","jfif","ico","gif","svg","psd"],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.image},video:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,allowedFileType:["mp4","avi","mpg","wmv","mov","rm","swf","flv"],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.video},table:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,maxRows:10,maxColumns:10,shortcut:Ps.table},codeBlock:{show:!0,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.codeBlock},sourceView:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.sourceView},fullScreen:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.fullScreen},attachment:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,accept:"",allowedFileType:[],multiple:!1,maxSize:void 0,minSize:void 0,customUpload:void 0,handleError:void 0,shortcut:Ps.attachment},mathformula:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,handleError:void 0,shortcut:Ps.mathformula},infoBlock:{show:!1,disabled:!1,leftBorder:!1,rightBorder:!1,shortcut:Ps.infoBlock},extends:{}}),o.menu||{});var e,t})),z=t.computed((()=>c.value?c.value.height:null)),A=t.computed((()=>o.dark)),O=t.computed((()=>o.disabled)),I=t.computed((()=>o.autoheight)),R=e=>{w.value=!0,T.value=e,t.nextTick((()=>{w.value=!1}))},L=()=>{S.value.show=!1,S.value.node=null},D=()=>{O.value||f.value||(L(),t.nextTick((()=>{const e=Hl(p.value,v.value,{parsedom:"pre"}),t=Hl(p.value,v.value,{parsedom:"img"}),n=Hl(p.value,v.value,{parsedom:"video"});if(t)S.value.type="image",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else if(n)S.value.type="video",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else if(e)S.value.type="codeBlock",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else{if(v.value.flatList.filter((e=>e.element.isText())).length)S.value.type="text",S.value.show?d.value.layerRef.setPosition():S.value.show=!0;else{const e=Hl(p.value,v.value,{parsedom:"table"}),t=Hl(p.value,v.value,{parsedom:"a"}),n=Hl(p.value,v.value,{parsedom:"div",marks:{"data-editify-list":"ol"}}),r=Hl(p.value,v.value,{parsedom:"div",marks:{"data-editify-list":"ul"}});t?(S.value.type="link",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):e?(S.value.type="table",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):n?(S.value.type="orderList",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0):r&&(S.value.type="unorderList",S.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${r.key}"]`,S.value.show?d.value.layerRef.setPosition():S.value.show=!0)}}})))},$=()=>{p.value=new ae(h.value,{value:T.value,disabled:O.value,renderRules:[e=>{((e,t)=>{"ol"!=t.parsedom&&"ul"!=t.parsedom||!t.hasChildren()||(t.children.forEach((n=>{n.type=t.type,n.parsedom="div",n.hasMarks()?n.marks["data-editify-list"]=t.parsedom:n.marks={"data-editify-list":t.parsedom},n.marks["data-editify-element"]=n.key,e.addElementBefore(n,t)})),t.children=[]),t.isEmpty()||!Vl(t,!0)&&!Vl(t,!1)||(t.marks["data-editify-element"]=t.key)})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"img"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"video"==t.parsedom){const n={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,n):t.marks=n,xs(e,t)}})(p.value,e)},e=>{((e,t)=>{t.isEmpty()||"hr"!=t.parsedom||xs(e,t)})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"a"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{((e,t)=>{if(!t.isEmpty()&&"code"==t.parsedom){t.parsedom="span";const e={"data-editify-code":!0};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(p.value,e)},e=>{Vs(p.value,e)},e=>{var t,n,r,a,o,i,l;Us(p.value,e,!(!(null==(t=B.value)?void 0:t.use)||!(null==(a=null==(r=null==(n=B.value)?void 0:n.codeBlock)?void 0:r.languages)?void 0:a.show)),null==(l=null==(i=null==(o=B.value)?void 0:o.codeBlock)?void 0:i.languages)?void 0:l.options)},e=>{((e,t,n)=>{!t.isEmpty()&&Xl(t)&&(t.marks.title=n("attachmentDownloadTitle"),t.marks["data-editify-attachment-name"]||(t.marks["data-editify-attachment-name"]=n("attachmentDefaultName")),xs(e,t))})(p.value,e,l)},e=>{((e,t)=>{!t.isEmpty()&&Ql(t)&&xs(e,t)})(p.value,e)},e=>{((e,t,n)=>{if(!t.isEmpty()&&ts(t)&&n){const e=pe.hex2rgb(n);t.hasStyles()?(t.styles["background-color"]=`rgba(${e[0]},${e[1]},${e[2]},0.15)`,t.styles.color=n):t.styles={"background-color":`rgba(${e[0]},${e[1]},${e[2]},0.15)`,color:n}}})(p.value,e,o.color)},e=>{((e,t)=>{t.hasChildren()&&t.children.forEach((n=>{if(Vl(n,!0)||Vl(n,!1)||Kl(n)||ts(n)||["blockquote","pre","table","h1","h2","h3","h4","h5","h6","p"].includes(n.parsedom)){const r=n.clone();r.type="block";const a=t.getBlock();e.addElementAfter(r,a),n.toEmpty()}}))})(p.value,e)},...o.renderRules],extraKeepTags:[...Ec,...o.extraKeepTags],allowCopy:o.allowCopy,allowPaste:o.allowPaste,allowCut:o.allowCut,allowPasteHtml:o.allowPasteHtml,customTextPaste:o.customTextPaste,customImagePaste:o.customImagePaste,customVideoPaste:o.customVideoPaste,customFilePaste:o.customFilePaste,customHtmlPaste:V,customMerge:U,customParseNode:W}),R(p.value.value),p.value.on("change",X),p.value.on("focus",Q),p.value.on("blur",Y),p.value.on("keydown",K),p.value.on("keyup",G),p.value.on("insertParagraph",J),p.value.on("rangeUpdate",ee),p.value.on("deleteInStart",te),p.value.on("deleteComplete",ne),p.value.on("afterRender",re),p.value.domRender(),!o.autofocus||f.value||O.value||ie()},j=()=>{h.value.querySelectorAll("video").forEach((e=>{e.style.height=e.offsetWidth/o.videoRatio+"px"}))},P=e=>{if(O.value)return;const t=e.target,n=e;if(le.isContains(h.value,t)){const e=ce.get(t,"data-alex-editor-key");if(e){const r=p.value.getElementByKey(e);if(r)if("td"==r.parsedom){const e=r.parent.children.length;if(r.parent.children[e-1].isEqual(r))return;const a=le.getElementBounding(t);n.pageX>=Math.abs(a.left+t.offsetWidth-5)&&n.pageX<=Math.abs(a.left+t.offsetWidth+5)&&(k.value.element=r,k.value.start=n.pageX)}else if(["img","video"].includes(r.parsedom)){const e=le.getElementBounding(t);n.pageX>=Math.abs(e.left+t.offsetWidth-10)&&n.pageX<=Math.abs(e.left+t.offsetWidth)&&(k.value.element=r,k.value.start=n.pageX)}}}((e,t)=>{if(le.isContains(e,t))return!1;const n=e=>!!Array.from(e.classList).some((e=>"editify-layer"==e))||!!e.parentElement&&n(e.parentElement);return!n(t)})(u.value,t)&&!f.value&&(b.value=null)},q=e=>{if(O.value)return;const t=e,n=e.target;if(le.isContains(h.value,n)&&["img","video"].includes(n.tagName.toLocaleLowerCase())){const e=le.getElementBounding(n);t.pageX>=Math.abs(e.left+n.offsetWidth-10)&&t.pageX<=Math.abs(e.left+n.offsetWidth)?n.style.cursor="col-resize":n.style.cursor=""}if(k.value.element)if("td"==k.value.element.parsedom){const e=Hl(p.value,v.value,{parsedom:"table"});if(!e)return;const n=e.children.find((e=>"colgroup"==e.parsedom)),r=k.value.element.parent.children.findIndex((e=>e.isEqual(k.value.element))),a=""+(k.value.element.elm.offsetWidth+t.pageX-k.value.start);n.children[r].marks.width=a,n.children[r].elm.setAttribute("width",a),k.value.start=t.pageX}else if(["img","video"].includes(k.value.element.parsedom)){const e=k.value.element.elm.offsetWidth+t.pageX-k.value.start+"px";k.value.element.hasStyles()?k.value.element.styles.width=e:k.value.element.styles={width:e},k.value.element.elm.style.width=e,"video"==k.value.element.parsedom&&j(),k.value.start=t.pageX}},F=()=>{if(!O.value&&k.value.element)if("td"==k.value.element.parsedom){const e=Hl(p.value,v.value,{parsedom:"table"});if(!e)return;const t=e.children.find((e=>"colgroup"==e.parsedom)),n=k.value.element.parent.children.findIndex((e=>e.isEqual(k.value.element))),r=parseFloat(t.children[n].marks.width);isNaN(r)||(t.children[n].marks.width=`${Number((r/k.value.element.parent.elm.offsetWidth*100).toFixed(2))}%`,p.value.domRender(),p.value.rangeRender()),k.value.element=null,k.value.start=0}else if(["img","video"].includes(k.value.element.parsedom)){const e=parseFloat(k.value.element.styles.width);isNaN(e)||(k.value.element.hasStyles()?k.value.element.styles.width=`${Number((e/le.width(h.value)*100).toFixed(2))}%`:k.value.element.styles={width:`${Number((e/le.width(h.value)*100).toFixed(2))}%`},p.value.domRender(),p.value.rangeRender()),k.value.element=null,k.value.start=0}},H=e=>{if(O.value)return;const t=e.target,n=e;if(le.isContains(h.value,t)){const e=ce.get(t,"data-alex-editor-key");if(e){const r=p.value.getElementByKey(e);if(r&&Kl(r)){const e=le.getElementBounding(t);n.pageX>=Math.abs(e.left)&&n.pageX<=Math.abs(e.left+16)&&n.pageY>=Math.abs(e.top+t.offsetHeight/2-8)&&n.pageY<=Math.abs(e.top+t.offsetHeight/2+8)&&("checked"==r.marks["data-editify-task"]?r.marks["data-editify-task"]="uncheck":r.marks["data-editify-task"]="checked",p.value.range||p.value.initRange(),p.value.range.anchor.moveToEnd(r),p.value.range.focus.moveToEnd(r),p.value.domRender(),p.value.rangeRender())}}}},V=async e=>{if(y.flatElements(e).forEach((e=>{if(!e.isText()){let t={},n={};e.hasMarks()&&(e.marks.contenteditable&&(t.contenteditable=e.marks.contenteditable),e.marks.name&&(t.name=e.marks.name),e.marks.disabled&&(t.disabled=e.marks.disabled),"img"==e.parsedom&&e.marks.alt&&(t.alt=e.marks.alt),["img","video"].includes(e.parsedom)&&e.marks.src&&(t.src=e.marks.src),"video"==e.parsedom&&e.marks.autoplay&&(t.autoplay=e.marks.autoplay),"video"==e.parsedom&&e.marks.loop&&(t.loop=e.marks.loop),"video"==e.parsedom&&e.marks.muted&&(t.muted=e.marks.muted),"video"==e.parsedom&&e.marks.controls&&(t.controls=e.marks.controls),"a"==e.parsedom&&e.marks.href&&(t.href=e.marks.href),"a"==e.parsedom&&e.marks.target&&(t.target=e.marks.target),(Vl(e,!0)||Vl(e,!1))&&(t["data-editify-list"]=e.marks["data-editify-list"],t["data-editify-list-style"]=e.marks["data-editify-list-style"]),e.parsedom==y.TEXT_NODE&&e.marks["data-editify-code"]&&(t["data-editify-code"]=e.marks["data-editify-code"]),Kl(e)&&(t["data-editify-task"]=e.marks["data-editify-task"]),"col"==e.parsedom&&e.marks.width&&(t.width=e.marks.width),["td","th"].includes(e.parsedom)&&e.marks.colspan&&(t.colspan=e.marks.colspan),["td","th"].includes(e.parsedom)&&e.marks.rowspan&&(t.rowspan=e.marks.rowspan),["td","th"].includes(e.parsedom)&&e.marks["data-editify-merged"]&&(t["data-editify-merged"]=e.marks["data-editify-merged"]),Xl(e)&&(t["data-editify-attachment"]=e.marks["data-editify-attachment"],e.marks["data-editify-attachment-name"]&&(t["data-editify-attachment-name"]=e.marks["data-editify-attachment-name"])),Jl(e)&&(t=qs(t,de.clone(e.marks))),ts(e)&&(t["data-editify-info"]=e.marks["data-editify-info"])),e.hasStyles()&&(["img","video"].includes(e.parsedom)&&e.styles.width&&(n.width=e.styles.width),(e.isBlock()||e.isInblock())&&e.styles["text-indent"]&&(n["text-indent"]=e.styles["text-indent"]),(e.isBlock()||e.isInblock())&&e.styles["text-align"]&&(n["text-align"]=e.styles["text-align"]),(e.isBlock()||e.isInblock())&&e.styles["line-height"]&&(n["line-height"]=e.styles["line-height"]),Jl(e)&&(n=qs(n,de.clone(e.styles)))),"function"==typeof o.pasteKeepMarks&&(t=qs(t,o.pasteKeepMarks(e))),"function"==typeof o.pasteKeepStyles&&(n=qs(n,o.pasteKeepStyles(e))),e.marks=t,e.styles=n}if(e.parsedom&&["tbody","tr","th","td","thead","tfooter","colgroup","col"].includes(e.parsedom)){if(!!!Fl(e,{parsedom:"table"})&&(e.toEmpty(),e.parent)){const t=e.parent.children.findIndex((t=>t.isEqual(e)));e.parent.children.splice(t,1)}}})),(e=e.filter((e=>!e.isEmpty()))).length)if("function"==typeof o.customHtmlPaste)await o.customHtmlPaste(e);else{p.value.insertElement(e[0]);for(let t=e.length-1;t>=1;t--)p.value.addElementAfter(e[t],e[0]);p.value.range.anchor.moveToEnd(e[e.length-1]),p.value.range.focus.moveToEnd(e[e.length-1])}},U=(e,t)=>{const n=t.getUneditableElement();n?n.toEmpty():(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)},W=e=>(Xl(e)&&(e.type="closed"),Ql(e)&&y.flatElements(e.children).forEach((e=>{e.locked=!0,e.isText()||e.hasChildren()||(e.type="closed")})),"function"==typeof o.customParseNode&&(e=o.customParseNode(e)),e),K=(e,t)=>{var n;if(O.value)i("keydown",e,t);else{for(let e in M.value)if("extends"==e){const n=M.value[e];Object.keys(n).forEach((e=>{var r;const a=n[e],o=a.shortcut;if(o&&"function"==typeof o.define){const n=o.define(t);!0===n?(t.preventDefault(),a.disabled||("function"==typeof o.operation?o.operation(p.value,v.value,f,g):null==(r=c.value)||r.menuItemRefs[e].btnRef.handleClick())):n&&de.isObject(n)&&Object.keys(n).forEach((r=>{var i;n[r]&&(t.preventDefault(),a.disabled||("function"==typeof o.operation?o.operation(p.value,v.value,f,g,r):null==(i=c.value)||i.menuItemRefs[e].btnRef.handleClick()))}))}}))}else if(!["use","tooltip","mode","style","sequence"].includes(e)){const r=M.value[e];if(de.isObject(r)&&!0===r.show&&de.isObject(r.shortcut)){const a=r.shortcut;if("function"==typeof a.define){const o=a.define(t);!0===o?(t.preventDefault(),r.disabled||("function"==typeof a.operation?a.operation(p.value,v.value,f,g):null==(n=c.value)||n.menuItemRefs[e].btnRef.handleClick())):o&&de.isObject(o)&&Object.keys(o).forEach((n=>{var i;o[n]&&(t.preventDefault(),r.disabled||("function"==typeof a.operation?a.operation(p.value,v.value,f,g,n):null==(i=c.value)||i.menuItemRefs[e].btnRef.handleClick()))}))}}}"tab"!=t.key.toLocaleLowerCase()||t.metaKey||t.shiftKey||t.ctrlKey||t.altKey||!os(p.value,v.value)&&!as(p.value,v.value)||(t.preventDefault(),p.value.insertText(" "),p.value.domRender(),p.value.rangeRender()),i("keydown",e,t)}},G=(e,t)=>{i("keyup",e,t)},Z=e=>{if(O.value||f.value)return;const t=e.target;if("img"==t.nodeName.toLocaleLowerCase()||"video"==t.nodeName.toLocaleLowerCase()){const e=Number(t.getAttribute("data-editify-element"));if(oe.isNumber(e)){const t=p.value.getElementByKey(e);p.value.range||p.value.initRange(),p.value.range.anchor.moveToStart(t),p.value.range.focus.moveToEnd(t),p.value.rangeRender()}}},X=(e,t)=>{R(e),i("change",e,t)},Y=e=>{O.value||(o.border&&o.color&&!g.value&&(m.value.style.borderColor="",m.value.style.boxShadow="",M.value.use&&(c.value.$el.style.borderColor="",c.value.$el.style.boxShadow="")),i("blur",e))},Q=e=>{if(!O.value){if(o.border&&o.color&&!g.value){m.value.style.borderColor=o.color;const e=pe.hex2rgb(o.color);M.value.use&&"inner"==M.value.mode?(m.value.style.boxShadow=`0 8px 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5),8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5), -8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5)`,c.value.$el.style.borderColor=o.color,c.value.$el.style.boxShadow=`0 -8px 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5),8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5), -8px 0 8px -8px rgba(${e[0]},${e[1]},${e[2]},0.5)`):(M.value.use,m.value.style.boxShadow=`0 0 8px rgba(${e[0]},${e[1]},${e[2]},0.5)`)}i("focus",e)}},J=(e,t)=>{e.isEqual(t)||(t.isBlock()&&e.isBlock()&&t.isOnlyHasBreak()&&e.isOnlyHasBreak()&&t.parsedom!=y.BLOCK_NODE&&(bs(t),p.value.range.anchor.moveToStart(t),p.value.range.focus.moveToStart(t),e.toEmpty()),Kl(e)&&(e.marks["data-editify-task"]="uncheck")),i("insertparagraph",T.value)},ee=()=>{b.value?b.value++:b.value=1,p.value.range&&(v.value=p.value.getElementsByRange(),E.value&&(clearTimeout(E.value),E.value=null),E.value=setTimeout((()=>{B.value.use&&D()}),200),i("rangeupdate"))},te=e=>{e.isBlock()&&bs(e)},ne=()=>{const e=p.value.range.anchor.element.getUneditableElement();e&&e.toEmpty()},re=()=>{j(),h.value.querySelectorAll("span[data-editify-attachment]").forEach((e=>{he.off(e,"click"),he.on(e,"click",(async()=>{const t=e.getAttribute("data-editify-attachment"),n=await fetch(t,{method:"GET"}),r=await n.blob(),a=document.createElement("a");a.setAttribute("target","_blank"),a.setAttribute("href",URL.createObjectURL(r)),a.setAttribute("download",e.getAttribute("data-editify-attachment-name")),a.click()}))})),i("updateview")},ie=()=>{p.value.collapseToEnd(),p.value.rangeRender(),le.setScrollTop({el:h.value,number:le.getScrollHeight(h.value),time:300})};return t.watch((()=>T.value),(e=>{w.value||(p.value.stack=p.value.parseHtml(e),p.value.range=null,p.value.domRender(),p.value.rangeRender(),h.value.blur())})),t.watch((()=>f.value),(e=>{B.value.use&&(e?L():D())})),t.watch((()=>O.value),(e=>{e?p.value.setDisabled():p.value.setEnabled()})),t.watch((()=>A.value),(e=>{e?document.documentElement.setAttribute("data-editify-dark","true"):document.documentElement.removeAttribute("data-editify-dark")}),{immediate:!0}),t.onMounted((()=>{$(),he.on(document.documentElement,`mousedown.editify_${a.uid}`,P),he.on(document.documentElement,`mousemove.editify_${a.uid}`,q),he.on(document.documentElement,`mouseup.editify_${a.uid}`,F),he.on(document.documentElement,`click.editify_${a.uid}`,H),he.on(window,`resize.editify_${a.uid}`,j)})),t.onBeforeUnmount((()=>{he.off(document.documentElement,`mousedown.editify_${a.uid} mousemove.editify_${a.uid} mouseup.editify_${a.uid} click.editify_${a.uid}`),he.off(window,`resize.editify_${a.uid}`),p.value.destroy()})),t.provide("editor",p),t.provide("isSourceView",f),t.provide("isFullScreen",g),t.provide("rangeKey",b),t.provide("dataRangeCaches",v),t.provide("$editTrans",l),t.provide("showBorder",N),t.provide("isDark",A),t.provide("isDisabled",O),t.provide("isAutoHeight",I),n({editor:p,isSourceView:f,isFullScreen:g,rangeKey:b,dataRangeCaches:v,textValue:_,menuHeight:z,collapseToEnd:ie,collapseToStart:()=>{p.value.collapseToStart(),p.value.rangeRender(),t.nextTick((()=>{le.setScrollTop({el:h.value,number:0,time:300})}))}}),(e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify",{"editify-fullscreen":g.value,"editify-autoheight":!g.value&&I.value}]),style:t.normalizeStyle({zIndex:e.zIndex,paddingTop:g.value?"":(e.offset||"")+"px"}),ref_key:"elRef",ref:u},[M.value.use&&p.value?(t.openBlock(),t.createBlock(t.unref(cm),{key:0,ref_key:"menuRef",ref:c,config:M.value,color:e.color,"z-index":e.zIndex+1},null,8,["config","color","z-index"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"bodyRef",ref:m,class:t.normalizeClass(["editify-body",{"editify-border":N.value,"editify-menu_inner":M.value.use&&"inner"==M.value.mode}]),"data-editify-uid":t.unref(a).uid},[t.createElementVNode("div",{ref_key:"contentRef",ref:h,class:t.normalizeClass(["editify-content",{"editify-placeholder":C.value,"editify-disabled":O.value}]),onClick:Z,onCompositionstart:n[0]||(n[0]=e=>x.value=!0),onCompositionend:n[1]||(n[1]=e=>x.value=!1),"data-editify-placeholder":e.placeholder,tabindex:"-1"},null,42,mm),f.value?(t.openBlock(),t.createElementBlock("textarea",{key:0,value:T.value,readonly:"",class:"editify-sourceview"},null,8,hm)):t.createCommentVNode("",!0),t.createVNode(t.unref(Su),{ref_key:"toolbarRef",ref:d,modelValue:S.value.show,"onUpdate:modelValue":n[2]||(n[2]=e=>S.value.show=e),node:S.value.node,type:S.value.type,"scroll-node":h.value,config:B.value,color:e.color,"z-index":e.zIndex+10},null,8,["modelValue","node","type","scroll-node","config","color","z-index"])],10,um),e.showWordLength?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["editify-footer",{"editify-fullscreen":g.value&&!f.value}]),style:t.normalizeStyle({zIndex:e.zIndex+1})},[t.createElementVNode("div",pm,t.toDisplayString(t.unref(l)("totalWordCount"))+t.toDisplayString(_.value.length),1)],6)):t.createCommentVNode("",!0)],6))}}),[["__scopeId","data-v-c01a8e33"]]),gm=y.prototype.isPreStyle;y.prototype.isPreStyle=function(){return"td"==(this.getInblock()||this.getBlock()).parsedom||gm.apply(this)};const bm=((vm=fm).install=e=>{e.component(vm.name,vm)},vm);var vm;const ym="0.2.28";console.log(`%c vue-editify %c v${ym} `,"padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;","padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;"),e.AlexElement=y,e.Editify=bm,e.addSpaceTextToBothSides=xs,e.default=bm,e.elementIsAttachment=Xl,e.elementIsInfoBlock=ts,e.elementIsList=Vl,e.elementIsMatch=ql,e.elementIsMathformula=Ql,e.elementIsTask=Kl,e.getInfoBlockByElement=ns,e.getListByElement=Ul,e.getMatchElementByElement=Fl,e.getMatchElementByRange=Hl,e.getMathformulaByElement=Jl,e.getRangeText=ws,e.getTaskByElement=Gl,e.hasAttachmentInRange=Yl,e.hasImageInRange=ss,e.hasInfoBlockInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!ns(e.range.anchor.element):t.flatList.some((e=>!!ns(e.element)))),e.hasLinkInRange=ls,e.hasListInRange=(e,t,n=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Ul(e.range.anchor.element,n):t.flatList.some((e=>!!Ul(e.element,n)))),e.hasMathformulaInRange=es,e.hasPreInRange=as,e.hasQuoteInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Fl(e.range.anchor.element,{parsedom:"blockquote"}):t.flatList.some((e=>!!Fl(e.element,{parsedom:"blockquote"})))),e.hasTableInRange=os,e.hasTaskInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Gl(e.range.anchor.element):t.flatList.some((e=>!!Gl(e.element)))),e.hasVideoInRange=cs,e.insertAttachment=Ls,e.insertCodeBlock=Is,e.insertImage=zs,e.insertInfoBlock=$s,e.insertLink=Ms,e.insertMathformula=Ds,e.insertSeparator=Rs,e.insertTable=Os,e.insertVideo=As,e.install=e=>{e.component(bm.name,bm)},e.queryTextMark=ps,e.queryTextStyle=us,e.rangeIsInInfoBlock=rs,e.rangeIsInList=Wl,e.rangeIsInQuote=is,e.rangeIsInTask=Zl,e.removeTextMark=gs,e.removeTextStyle=hs,e.setAlign=_s,e.setHeading=Es,e.setIndentDecrease=Ss,e.setIndentIncrease=ks,e.setLineHeight=Bs,e.setList=Cs,e.setQuote=Ts,e.setTask=Ns,e.setTextMark=fs,e.setTextStyle=ms,e.version=ym,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
2
2
  !function(){"use strict";try{if("undefined"!=typeof document){var A=document.createElement("style");A.appendChild(document.createTextNode('.editify-hljs-addition,.editify-hljs-meta,.editify-hljs-string,.editify-hljs-symbol,.editify-hljs-template-tag,.editify-hljs-template-variable,.editify-hljs-deletion,.editify-hljs-variable{color:var(--editify-hljs-color-1)}.editify-hljs-comment,.editify-hljs-quote{color:var(--editify-hljs-color-2)}.editify-hljs-bullet,.editify-hljs-link,.editify-hljs-number,.editify-hljs-regexp,.editify-hljs-attr,.editify-hljs-attribute{color:var(--editify-hljs-color-3)}.editify-hljs-built_in,.editify-hljs-doctag,.editify-hljs-keyword,.editify-hljs-name,.editify-hljs-section,.editify-hljs-strong,.editify-hljs-tag,.editify-hljs-literal,.editify-hljs-type{color:var(--editify-hljs-color-4)}.editify-hljs-title{color:var(--editify-hljs-color-5)}.editify-hljs-selector-tag{color:var(--editify-hljs-color-6)}.editify-hljs-selector-class{color:var(--editify-hljs-color-7)}.editify-hljs-selector-id{color:var(--editify-hljs-color-8)}:root{--editify-font-size: 14px;--editify-font-color: #555;--editify-font-color-light: #888;--editify-font-color-disabled: #bbb;--editify-font-color-dark: #333;--editify-font-color-link: #079457;--editify-font-color-link-dark: #05683d;--editify-border-color: #dfdfdf;--editify-background: #fff;--editify-background-dark: #f7f8fa;--editify-background-darker: #ebedf0;--editify-pre-background: #f2f6fb;--editify-reverse-color: #fff;--editify-reverse-background: #000;--editify-video-background: #000;--editify-hljs-color-1: #54489b;--editify-hljs-color-2: #bbb;--editify-hljs-color-3: #0e9a56;--editify-hljs-color-4: #092d5d;--editify-hljs-color-5: #c45d08;--editify-hljs-color-6: #920606;--editify-hljs-color-7: #c45d08;--editify-hljs-color-8: #0d658d}:root[data-editify-dark]{--editify-font-color: #e8e8e8;--editify-font-color-light: #d8d8d8;--editify-font-color-disabled: #6d6d6d;--editify-font-color-dark: #fff;--editify-border-color: #3e3e3e;--editify-background: #1a1a1a;--editify-background-dark: #222222;--editify-background-darker: #2c2c2c;--editify-pre-background: #242424;--editify-hljs-color-1: #7765dd;--editify-hljs-color-2: #6a737d;--editify-hljs-color-3: #05b05e;--editify-hljs-color-4: #3b8af2;--editify-hljs-color-5: #e88331;--editify-hljs-color-6: #db0000;--editify-hljs-color-7: #d37222;--editify-hljs-color-8: #0793d4}.editify-icon-info:before{content:""}.editify-icon-list-square:before{content:""}.editify-icon-list-circle:before{content:""}.editify-icon-list-disc:before{content:""}.editify-icon-list-cjk-ideographic:before{content:""}.editify-icon-list-lower-roman:before{content:""}.editify-icon-list-lower-greek:before{content:""}.editify-icon-list-upper-roman:before{content:""}.editify-icon-list-decimal:before{content:""}.editify-icon-list-lower-alpha:before{content:""}.editify-icon-list-upper-alpha:before{content:""}.editify-icon-merge-cells-up:before{content:""}.editify-icon-merge-cells-left:before{content:""}.editify-icon-merge-cells-right:before{content:""}.editify-icon-merge-cells-down:before{content:""}.editify-icon-mathformula:before{content:""}.editify-icon-separator:before{content:""}.editify-icon-attachment:before{content:""}.editify-icon-full-screen:before{content:""}.editify-icon-auto-width:before{content:""}.editify-icon-task:before{content:""}.editify-icon-source-view:before{content:""}.editify-icon-upload:before{content:""}.editify-icon-remove:before{content:""}.editify-icon-code:before{content:""}.editify-icon-stop:before{content:""}.editify-icon-loop:before{content:""}.editify-icon-autoplay:before{content:""}.editify-icon-muted:before{content:""}.editify-icon-unmuted:before{content:""}.editify-icon-controls:before{content:""}.editify-icon-video:before{content:""}.editify-icon-single:before{content:""}.editify-icon-rotate:before{content:""}.editify-icon-delete:before{content:""}.editify-icon-image:before{content:""}.editify-icon-brush:before{content:""}.editify-icon-check:before{content:""}.editify-icon-italic:before{content:""}.editify-icon-redo:before{content:""}.editify-icon-undo:before{content:""}.editify-icon-code-block:before{content:""}.editify-icon-table:before{content:""}.editify-icon-delete-table:before{content:""}.editify-icon-align-center:before{content:""}.editify-icon-align-justify:before{content:""}.editify-icon-align-left:before{content:""}.editify-icon-bold:before{content:""}.editify-icon-align-right:before{content:""}.editify-icon-font-color:before{content:""}.editify-icon-format-clear:before{content:""}.editify-icon-indent-increase:before{content:""}.editify-icon-quote:before{content:""}.editify-icon-indent-decrease:before{content:""}.editify-icon-list-ordered:before{content:""}.editify-icon-list-unordered:before{content:""}.editify-icon-link:before{content:""}.editify-icon-subscript:before{content:""}.editify-icon-superscript:before{content:""}.editify-icon-strikethrough:before{content:""}.editify-icon-underline:before{content:""}.editify-icon-text-wrap:before{content:""}.editify-icon-caret-down:before{content:""}.editify-icon-delete-column:before{content:""}.editify-icon-delete-row:before{content:""}.editify-icon-insert-column-left:before{content:""}.editify-icon-insert-column-right:before{content:""}.editify-icon-insert-row-bottom:before{content:""}.editify-icon-insert-row-top:before{content:""}.editify-triangle[data-v-c57a8f5f]{position:relative;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid;border-width:6px}.editify-triangle .editify-triangle-el[data-v-c57a8f5f]{position:absolute;display:inline-block;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px}.editify-triangle[data-editify-placement=top][data-v-c57a8f5f]{border-top:none;border-bottom-color:var(--editify-border-color)}.editify-triangle[data-editify-placement=top] .editify-triangle-el[data-v-c57a8f5f]{border-top:none;border-bottom-color:var(--editify-background);left:1px;top:1.5px;right:auto;bottom:0;margin-left:-6px}.editify-triangle[data-editify-placement=bottom][data-v-c57a8f5f]{border-bottom:none;border-top-color:var(--editify-border-color)}.editify-triangle[data-editify-placement=bottom] .editify-triangle-el[data-v-c57a8f5f]{border-bottom:none;border-top-color:var(--editify-background);left:1px;bottom:1.5px;top:auto;right:auto;margin-left:-6px}.editify-triangle[data-editify-placement=left][data-v-c57a8f5f]{border-left:none;border-right-color:var(--editify-border-color)}.editify-triangle[data-editify-placement=left] .editify-triangle-el[data-v-c57a8f5f]{border-left:none;border-right-color:var(--editify-background);left:1.5px;top:1px;right:auto;bottom:auto;margin-top:-6px}.editify-triangle[data-editify-placement=right][data-v-c57a8f5f]{border-right:none;border-left-color:var(--editify-border-color)}.editify-triangle[data-editify-placement=right] .editify-triangle-el[data-v-c57a8f5f]{border-right:none;border-left-color:var(--editify-background);right:1.5px;top:1px;bottom:auto;left:auto;margin-top:-6px}.editify-layer-fade-enter-from[data-v-7e930b66],.editify-layer-fade-leave-to[data-v-7e930b66]{opacity:0}.editify-layer-fade-enter-active[data-v-7e930b66],.editify-layer-fade-leave-active[data-v-7e930b66]{transition:opacity .3s linear}.editify-layer-translate-enter-from[data-v-7e930b66],.editify-layer-translate-leave-to[data-v-7e930b66]{opacity:0;transform:translateY(20px)}.editify-layer-translate-enter-active[data-v-7e930b66],.editify-layer-translate-leave-active[data-v-7e930b66]{transition:opacity .3s ease-in-out,transform .3s ease-in-out}.editify-layer[data-v-7e930b66]{display:block;position:fixed;padding:0 0 10px;font-size:var(--editify-font-size);color:var(--editify-font-color)}.editify-layer[data-editify-placement=bottom][data-v-7e930b66],.editify-layer[data-editify-placement=bottom-start][data-v-7e930b66],.editify-layer[data-editify-placement=bottom-end][data-v-7e930b66]{padding:10px 0 0}.editify-layer[data-v-7e930b66] .editify-triangle{position:absolute;z-index:1}.editify-layer .editify-layer-wrap[data-v-7e930b66]{display:block;background-color:var(--editify-background);box-shadow:0 2px 10px #0000001a;border-radius:4px}.editify-layer .editify-layer-wrap.editify-border[data-v-7e930b66]{border:1px solid var(--editify-border-color)}.editify-tooltip[data-v-9b9ca2a9]{position:relative;display:inline-block}.editify-tooltip.editify-block[data-v-9b9ca2a9]{display:block}.editify-tooltip-content[data-v-9b9ca2a9]{display:block;padding:4px 6px;font-size:12px;white-space:nowrap}@font-face{font-family:editify-icon;src:url(data:font/woff;base64,d09GRgABAAAAACNcAAsAAAAAOTAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAARAAAAGA8Fk0zY21hcAAAAYgAAAJpAAAGKNPAckpnbHlmAAAD9AAAGrQAAClcwGxy/GhlYWQAAB6oAAAAMQAAADYqPdk7aGhlYQAAHtwAAAAgAAAAJAlvBjpobXR4AAAe/AAAADwAAAEYLlv//WxvY2EAAB84AAAAjgAAAI6ZiY5WbWF4cAAAH8gAAAAfAAAAIAFiAJ1uYW1lAAAf6AAAAUAAAAJnEKM8sHBvc3QAACEoAAACMQAAA65m3tvVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGEJYpzAwMrAwNTJdIaBgaEfQjO+ZjBi5ACKMrAyM2AFAWmuKQwHnjG8EmRu+N/AwMB8h6ERKMyIoogJAIKDDMh4nNXUR0+UURjF8f9Q7DoiiqigiAU7dqwjWBIXbsQuLlz5IQxxAxYsMdGNCSSIifVzuHTtysSVz2NI/Ax67hxj2+rGufkR5mV48s57z7lAM9AoW6QJGj5Q0W9U3utqpX69kTn1602VN3p/nH79T1MQzVGNtmiPzuiOnuiNvqjFUAzHWEzF23gXH+NTfMnW7MiBfJAP83E+yYl8lq8/D05Xp1u+foXfpnT9mHK6PmXyjym1HNGUR5oynpP5/OeUv35V9K1+XSd/rCv1dfWPdY3rWsNaNxjlfn2VKUtYw0I6WMwmVtDFKlpZymrm0s0MZjKL2XqWzTTomTaxnEX0sIw2NrOeDbSwlo2sYx4LqDKfrXrSA2yjl6Mc012d4Ajb2cFOdrGbPeylj33s1w4d4CCHOEyNdjpZqVuZ8Q+eyv/+mld+NJ76/u5ESZuVXEezac+Iqmn3iDbTPhLtph0lOk17S3SZdplYbdpvotsof+8xZYDoNaWB6DPlgqgZZcZpU1aIQaPMO2PKD3HWlCTinClTxHlTuogLVjobF610PC6ZskdcttL7GLLS/Rg2JZMYM2WUmDTKd3pqyi0xZZRn9taUZeKdKdXER1O+iU+mpBNfTJknW03pJztMPSBrVnYyj5i6QfabWkIOmPpCjpiaQ44a5bM3jfLZW6ZekbdNDSPvmLpGjplaR9419Y+8ZyVLed8o9/XA1E7yoamn5CNTY8nHpu6ST0wtJsdNfSYnTM0mJ00dJ5+a2k5OmXpPPrNydudz01lAvjCdCuRL0/lAvjKdFORr05nB50HT6cF01XSOMN1irPwGeo0zSwAAAHicpXoJuBTVnW+dc7q6uvt2V3d1dXXd3pfqquq739srcIW7sMrmwp6g3IsCF0Q2X6IhA1wRjUtwJYmBoGjUYUxkkolG3GYIk5fIRIVRMiHOBw8dv6gkAhNj3jzTXbz/qeq+3Iua73vzuqpOnTpb/c/5b7//qWZsDHNh2MaQW5lGpo3pZpYyDEpzPOLsATmO5GCuPAmVSwW9HekaSeuarhXKpXIpJwflYICzc3aSKxULmkL7SPagmO5BJfpk5+RJKJ+ze5FdDuZztE9Zh+aYGVq29F49m9XvXbrs2MXs0MbBa8vjx5evHXy3nlmU7krFQwG/iFIhj6vF09CYnNA3zucvOOyI1XxuV1SMKUpzRpQaA2T40gGtbGVgzJBmBl/ekQgp7oaMP5Y0tmaf6ihGE51Rt+wLPDIxIrk8ciQT9jc4GcYOa/Oh7Q8EM4ThmAbGy4iMDOuTlxSpdqGUNHKgyPPmD3XhR6uD9Yvg5zfDgT/d/FO4MzDshf9gG0kOxmtkUkw7M4GZzsxirmDmwci5SajQjpS0PRCU0+2oMAnl4ijAI1jkgvY5pV/QXBxN1ZA/7oczrOvhcBucRZpEIppWHFvyec2O4NeqhZHrXn9ciQvQL1mrhsT4d62kwQlFhfZ6kZBIJwQoTEXaCvCq1mJbhLRt/2c4avPnYP4M42F4JsJEmSaQvC6mCPNXAvHaGqRhFn/lacy6L14ebi9QeoCC5V+QR1PHTOXoxTka+8K1NuF24zG6NCbRbfjHFsUM4waaf87aSH9NDgJMDDin1uiewEwCykfRQ9JaoZQLBuwjGV1KFcuSUrusvEoraAMdHtAfSGPlg/o12+N2N/J8g3XrNi68/6vf/O5PxoX/fAelGni+0e3O/pn0338CDnQ9L/NeyWs8bN0bVHW1qg6o6rO6/nea9mcoggpW02AajB/m8Sw7jVxbm4ePkZgwE2fSjMY0gyTmmJI5m35mGjPzkjkVQdjFkYTUxL9+12lFLS/UyoVR5Xgm/kuVrV8r2jqJea4uwG+olhwrFC55xJ/ccwwO/NPmZuNJ68LOA88cMJMDB8j1B4YU41UFbaWpouDfpi1e3cWWyTUjvGplyjCbZcwQ83XmDub+sfNCuYKpPnmOsiKfk/MwvUCwG0lKWld4pOStcuCVAmuQM01dDEEHqpGKbtZJAS6OJGiR1igz5RH+63m5nOckaijTWpEaTtnOBYLQFQypPDIybiCtleP1y/i9qnpFyccnMpmE4iFtdocjmGFt9oj/oMfHN/A+H//jBjUgxCRRCISDl6uZdDYmh/SEEGYLH4CAhNzuZxcUenqyV4W9DXmZtbliDTbOxxGb4ymPz+dp8HpJ/0Ondp3cRbiBcGss1Xp1h5r6agOXCrkFEBc4jaoa5n3qVXIokAo0NbckI3G/M96Y1Hyeq47u8Qa9fCNv/OLA9u1P25oKroZg0ONrkOO86OA4r7PBFaSjBL013fk2u5hc/4Uy99+RM9wzWl9Wd+SIea4twe/GMvwg99tSiURARX57P36mpcV4GK7vtLbiFZW1VTOpVsnrFdMePcnOImtq9Ilgj0pMD7OCWX+JpBS5YhlePcJdjt6A615EKSuCnzSFwz6qCZUY6h1pYa01J5miApKSp4JQLLSgUYIQJ22Vt+qXcaLc3dp6q8XQXzRPawnGmwYfnRn0Sj6v2PoHsA4hnv9ZWAgE0oFsx7RmySdF8jPbSWtjxq+GnwYuU1khM4DTpx7C//hjtUl922ax7q10VosG0tGMQ01NDwahnd/3qBcsSNBrfKxSCfF5YmoiKoaJDcfFWHNTyicFhPj10MBr8rUB1m0vu4t8ubZuEtPBjAc9m89cy9zM3HqplpUmIsUOiiXRuZbz5ppwijntGFKKoGkXFY1YapSXKICgiqenpZrCXVwqoliLHYDyct7UPUsXR61mP7mq8vf1y/iNt1FP+KLxdKLFExOI3qIk1WbQqn28x8O7vd5v+BNsabwr6lN0XRE1URSC0l20rsHnG+gQvX5J5/12vSXd1NralG65nBcE2o307P4ADqIEeLddcDco8Y4o8brdnLMxnordLEOTRnoaWwU+8vGAV8wv6LovF4rFOyL30RrZZ/yRF2KhktsbU7sWdWVit1jFlu48xs4j60ZsGUUM1ONMZuYwK5kNl+iOrnBKOS8rOpfXL8ogrKQleZaN0iVLJhXOuo+WP1LLydbimotezoMVLF9c1DTprByrX6+KM4Nts3pmdvaEu+M/AIlr9HieuX4wpcp8INqUGqf5JMmnaaIkidoRarigyfdzpVJOL5HOaCCaTEbFiL2VlPS/NWt5nszY9b/gwD8rFE6dOrBgwT/UbM0Dp+IhIUZwUooqL5S9vJvf5eN9wpAlkMbOy9Z3tyv+oDZDCwiZdpslyyCnBNZwNzlOVphryDOMmBJScjElobwAhz6X3FHZfA3+VfXQ3q/vfRvH0PQzO3cai41X0bgzTK3/S+QD0lfvj4SUIINzQ+ai62iF8QL0QPvROOPVM6SvspnccW21hHu+B8ON9D89tj+XFxSrfxk/PPqNn9//YfIiWV7vrwL9FE8gRYBDJi+O9Ni7ee/bp42DZ775zRo1lH4M/V+1cUQFSwfYtczpZZnCQ1IWSUrmdEXm8mWZG5iB7kjfhw9W7zt0Zu/D6NEJ89OvrVl5JDW/+zRaiufhCV+uXJiKXEi9K3PVr56ZqW2jY7PmAu3G7wOSCwEe6mIm0vU1dTZl4dGRJ5Af0RSgFkTzqS/I78avBePxYLUAPIez/kTT26R4XLoNcmjCDpqlCZpwW70K/y7eHOflaKOnuhtycKK8dR99MgjWY79tLlkNGIdxIh5cOcQ5pTKahNqxnUMUktGHOH3ggSaIfEbVcnYzKiqPFOFHjB1yKCQn5s9LolangxNDYafxlljURLQlNmf2hEAgZnw5tfCaham2ZLINhZwc5w+HXMYHvXIwKG9btGD+ol70ZEcqtWzbcAeRYbTLei+TE8FgArW6QmHRbncZx0W15IfhAoEJc2bT4RQl1fa1W9pRozMcEjnOabzfu2j+goXDdMhe9ETntuFlqVQnZQ+N754ib5NFYD2aANtBlCFSrzQRgYqnwIAKFO3kSqoFe8AkCFYFBTlgmamBsFrlU1YvFaCRWUsLaGva4BtH3H6/2zjv8gjujFvALUfMu8dlnHcLgvE0PCoeeEQ+aIcTR6DQjQRnrXXnq3634vbzTuO8R/Aff9UjCB7kc/KCB0qrHrO1cc7J++kgR47QYsHjRAKU13X0EMSwvaaOQJFA9YteHNX0MqjLwADZNzBQPXTsGOo9dsw4RHorw2S4Moxn3nP3mjV333NDTZ4vPE4+BXxMbS+V6W7Q1wQKcl32DqSVu0qq3BUEKdC7tDIqiXQZQBtNJJhK8xhWKY5hVSZhuk5oTufPuro6O3/W2dmJZ0PG2AK5TrS9E8Wy1YXou7FsNmasiuQ1SdLyEfw0zWVxqAs6dJkJ7Uk7ddFOxvJs7DX8dHZ8lrauLqz3ey2WrdO+jbxHVoGWZ5hxzGxmEY0nQVgFCAg1vZiy7gIoZRnFEUd41I7K4iQEfsGLZJrwqAPKekCy2RKIX5AG7xpMvNQDwX9JBKHgwPAUNJ2sTI1Po7AWRZWPaZosp7HHH7CtZFMqTdOHeOzeuM6D3Nij8ncI2HcHr6GJvO65w4eFO3jVg93Is26jG3+lmvf4EQE5IKtS5ZTxkBhBYXFv9SExCncyKTVOQdVP2IRo3C2KzqSIviqKBRjz5nWQYHjB7UKXuJNHHg/id4pdwu0wLobx193Mq+hDwb1pg9uP6nZwH9jhAcCeE+geB5Vp0zBRETafwGAA7xB9VsuCic4EmYL1DqwVFc4uceARc+SgPxj0VzshzQRT4xL4WGJcKlhdtw8e97mTje7TNlunzXba3ZhEHwT9xmLaHO2nqbEYmkIX+nTlvuppWoaT+6Cl+wOEWTg/gAEsWi15tlOc5URsqphCLBwKbqr+Bsn4Q+MwmlR5Bt2DIsYb/056qzf8/ma05VN04iPjQUsfKrYg8YHOZwCVMSrEHzqihq2UA74GgN/BACIWv6kMJEAinGD7gNkFymxISjkZWqLpMdZrN/5styOX3cvG7PZ33rGj2f+GPZzi4PCvCdw5B/oKtPDao3b76dN2uHlp63uitU6ogYWOXvad03YvXlqNcw7ihH74Xc6BXZg3bqfD006n34F3xVjW+ISlrtu01efIt4mfzoj67ZuIUjlJ/JVTVt0vSRXiihbqU0dYWcqndIp8rGlSa95DdVQw8SHYtyCpZEKV7aFMJoQWzferef/LgvCyP6/65xvvE3xrOJMJ/1Mog1dXv0ez+PpQ09X+LsX/ij8Pl1rwLzRE9FEmrzbVZWoIZIraHUasWZ2HP/oInT5/ngxUesmhSq/V7hx5hwiAknMmtaCJHUixCO5GEDrEEQI5ozttWtoLDADwlUCmvPXQTTh0gmtw2w4/LsVi0uOHbe4GDmO7/amn7G4fTX3uUXlcqTrsLpbYDsck1CrFDtsI66q+bP9sSzNf8xF1+jSIfa75IhpFHpm7ftRhmnuCMhgDOHhEnShATB4agW8EEzNSbh50o3CkEn92NndzmA2HWewR2HSaFU50tblczqDN78w2N2edflvQ6XK1dW1Rp4ZidsGJubA8Pw6/+XKYw07BHgtNmYE/d97Ge6yPS85Pcj4X4lrXtXLoht6vtLmcDofsdWZXbliZdXplh8PpavvKJ1+aEpZY4vGxAXn+TRs23DRfDrA+D2Gl8OS/f6XuZywb0sBEmATDWMjZgjhqXfwAbFNxpDhtaUhRQmQGTSsHR+X/hI9VOweUnALns0oI76Kl1bUh5RYchfeALF14mvyeLKzhfj94IgWiUgYBXEvBpcClKjINo1KmM86TujtOsYUyIHWq0NR8K2ldK6LDDzzxAL7igScfzEEGHXzkgTlq5dtcRD1xQo2QhRG10owWikI0wH8seb3Sx4DdBRH/4Onab000k4muqfbSG/7WoTDvcexsaG52f9Pp4cN1jPG8bTsZNv1mGGSIKQM1UlcAlLLYVVBBOHhMPQkopgoaUoSoQsgD/G2xyc3Nf/mwhQydd9rtPjnoOO8OKdVXH7xlzpQrbzO2u5tbWpo/Ou8IBn12O9QpoQJ6s9+tV19YRPlxoXrhcbCT/RC1K8xUy99JVHJN+Fmkvi7Ppi7CF2ra2UlYBucWh9RrLpG5qV0s6DziqEsk17VMb26e3lI9Z92xUD0X1fUoFiCtbG+87/S9PjfGxI5YF0Z4lafJDZabfG23bItnJDyzaUazcb/VFW1ontG0RI8Y99MB0IaIHrrpiattCPrZXHa/jxB0o8fLuh1SjJPvXecPcAnTjx8kPyRXMpdBlLeAWQHRNIMAcMIachBCywE5SJXJ5Cw4Jd1UtKKgaHSHPQfQVKN77TKYuprqqeCzU2mJEyS7TNWUVncgMIiyAD4tji8+mg2CpZEG+LTUkhWam9jJGCEMUFMNpsRsyrvugRlzFa8N9zkyKi95oopInJ4moTX9RtwTdPE2goyvoWnGS6gXY9xgD3GwXgj1osMIIU8yAHl4+DnCNt4RYp2wiKgP4dcIQoSbXFz2yhIxu3hOqNFug3ZQ1ymmA53ovY7JsM7wmxhRWRiOON0RX0bp6Se/NDY16v6kw4ZYR8KfldGDxNgW0YSExPmS/mwjuo8YNzZmhZidEOJIinoj2mnJ7D7b98kgyE4nRC7mHm6aR2NwQDsS28FHUpNMfWM7YCQ71zWi5eqYLWmbUhlWutPpboUMKxMUZUKMuMhObZX2IzbITtSv007aPVqYDIO6vTKc7p5Gm0JCBqBxtdfsoeBDkBh57MTXRSJvsWxbBId3Eg+OhTUtbPxkp1LrlO4ejWkGGS/TDPRracCmAfNriwihPaA9MLrYEhbQPgpOcyW9qJGfR+ckjP25wSn9hRk/aaz+Z0ZKpaJlXRDdXNCR8pYTE1f0b7qPtJLpoZjxy7a7r+/qR/M701r1n6JNiLWJiVA0EfC7sj1rF3bdu1FrsHw1KOR7+E0aZYoWigQfDHGSBSWBMk3XndgR4kKu3zhDDjzeGXbyTuSqPsI3eVHZFXIlXDbufhbZ0RsOBFVhJ1Qhr+XrD5FhwEPwJiSBkwWRzkNwQoaHjUPDRu8w6oXa3irT20uYXrP9CYh5dCZJ0RO4oRjSTBdEd19N+QYNkYB5QF2BHDP+pysiju9ZcfWNfVe43YLt6nlXXjNvkxhxoW4nehd1u5Df+wJyB3KTb/rm604X5h68em4yyr7E+xFtEmFG5v8O/hjiYMbcCdQoMwBDgTecWPeDsokqNUtpMcOyLrvRCzDpEEAk9uqFM6d0ZzU6dRRPje9dMIA7f8Q6AA+d5tyccYhlsYP8iGQSuda2lgDndHLzFl07e15nqS4LB8knZAbTyiwBDtDtGhqXpOnk6faYKRhByIN4WzUajVJ0EHTWzNY+JFmNgvKYfnQKtRHPQWQbDotd87sgE4mIWhGytEQrpuLxFD5xScHY5vgBrRhRI13zcndCRosUtTtz87qgBDLZ6eHw9OyXP1t059g+jMuU+3fAD/vMPbEo8LkVtLgbsMtkqsc1F1xHhKIi5dmiIqn5oqJK+SKbAxUBPtBNSRbKdKgLAGvywXwZHmlTsDCPZKJRpfJKOhpNnT97FjV/hJrOnq3+8Cxa6QlvnWRzoPPGv509e9l51GDrvmX1Rx/hxrNkINlUebMpmdRISU1Ue19AL76ID/6fgwdfRE7S9iX1+ed7D2oLW2xuhOmHQqbm6x8npyDmjJhfXeYyVzMLmS8BZi/T7TsTqVPbw1lQ1sS2sg4TsvZMrPtF7GvNnPJTMXeZi9CiKMCERLhoHkCDQsKDrmjANTjoCkRdgwOumJWPueafXMkHAvzKO2lq5GlKboE0GjgXiAUM5hT8kHJy6rlz2wZo3wFznIGB2jiQf2w3NH4ZrlpP3hBomjfHQlNef7264OWXEbN7N/rB6/Cz7PAvyFukPPKNlaHbU+YWVe3eTp6oLB3Cx6utQyM5Uh6qLhtCN9DTHOOXMMb4sWMIoy5zjDHXuFXVa1ehNfSsY5jPoeMzY+BfV1tG7qOJqOHD/eRvyGLGaSI2KonWF9oUCvBYoXsFAMsg4FaFeg04FWd2ShZO43/jOdlZg0VjGtp25e2TouVJ06o/QVOsSvSSPvWKKXr1X4uDs7LkwKKHvjdB+fps4219yhVT9b9C/2fW8Sgl/OhIbswUKP0Pwhg3wAguc68yxYGxRUoDpvvMeL/xo3nrUWkIldb/zbZtxjN0FNR1lDgq/4VKaKLxz8byobot+gH5NVkA41DzTRQRLC2HyooOw3A4M2HDLGPlXLJ0rrHWe916fLdxMIF44yD6W7R7buWJufi1+evX/8Ta0xjLV/9FrqDa3YuEEeaiR7C9+im9jh4dzeC5z6E1Fl3ApH/Bf2LidKeybOI+GqzIlm+YhOQ4liin2pH61yqHm0Upq927tP2KfLPscwQKkY7ZrZH85Ex2Jjpj1u28pv2KQpPsc0qFSPucWt3atlxp1pJ5V21vmtEyvn2cnmtwEFvuyvbM5HwUJaN/tba+xzOWx5+zHmz589bDWH50NKvn/tT4lvX/hmdgvHkwnrWDS79om98UdPObFtgKMB40tb6/EaX+UMyPvLcLP1Zdtie/p1AYGtqzalV+CG57hvbQUnqR+Ko9ULeqUP3F9nABTuO9fLhwFHD8kFFdZdLweo3HXrDlGSYLttykgbO2kPNjPqWTUYVjSXhOykhwJtvakqm2tj64jRR8axQxYSnTlJGg3vhWe287nMYeKdOcCbT1tqP3TZJMPfgO+ZCsBizTweTBFutlc7cXInMTOtAtYM7uxSAX5h9jyiWI0ml8iyEjykgnxalT29OppVu3tk+dOrVvycJFi2+T4df3xuiHqRcbpacafzf1ODxv3boUYhfaiTa5bcnChUtop4sPUy82Qv9Ie1n69jtyBp8HmQCrE8F5J+gsUpwYqEYQs3PaJIB+ZkRIeffds2e3Gm+htq1nz21BbcZbZIeL+CJht22c3RFtCsZzQU/wihsP43PGaZQ0dhm7ID2N1qK11b2umOxwh3lfsC0jpcvdgVldXXW9OkNil74fsf9/BPzhUgLmfNH7QS/+SCYAGsjSaMn8Fq8XKRIuAPCF+EdSU6ZC00/8EmAfCRBOkMTEA9+98/atO95Cfj9XvZO8a8w0jnvdmT2PbV5/3VffmAEg099S2LClZ8vlmxs7BG7duic9vvb+lfeXbh6/XSl4vda7d5FHyVqQlYi5b2KGBEUhL5h/j7KiS4GYYjpu2YZl44ZamqZdvv/yaU0tq8hllZ+TtUb7uIFyeWAcetNoXzADyqHBjAXozcr9Q5Ys7oS5bWCC5ndzRs3XfUoxZf3bB1CAXqYKgwAW46fmqb0qnNUgPjN502Q45508WV1N3q3E0SzjuTVq78xedf3kTd/YNHn9U0/hb6+rrl63ro5fT+GvM5L1DUcK1BAz3Tpsp/s/U8gtHolza21fuu77rqjLmOIgLBbw5gDvaBCynYuX721oQC85Ai6Xy6L7LvIvZFPtaz/E5gBN6HcVcydgFGZhFSGvUur/VU6Wv3HrskxsybY7x7uTsvGsnEzKSDp5Er1gPIdmkY1QNq050LJix+2rcx7dQavJ/5CT6yqfnlxX87/HyW9JCGwZ/YeO9U54Fd1+aIdAt/5KulDUcJBH6NejrNgyuHXL8mZRN5bTZ/QmKlVb8XHSGJeMI8F4cdvmJYnEks3bilBXluLVvwwNoUeOWj73V+Q/SNH8Z1jStFuXQE/zS6HFJstwyQpY0jIFYoDD/iEQA1h1kqZ/PHy4elf/hr6+DTvW9/Wtv2nQ/JFiLFD5L1pPHIHYYHUxnt6/fsf6fjMZHFyOlsNZo+PD/zYdaONFOj4+fBg9109J2EGJ2fT/Ssd3yHPkOsYNltyy4595Zx7eCU7kMwRS2WX6a0P2r79pOQw7OIjm0Zdar+7E+9GW2voAcRZleH+dcqQEYssPH65hod1Ax8ovXg/W/FfCF9BGdlx8KT4Bk91v/LBvY1/fxttGU5YwXxyNmi8ePExW923YvtHin0Xa/wXDxny5eJxjYGRgYADiyTu+lsXz23xl4GZhAIFHx07Nh9H///6vZ53C3AjkcjAwgUQBmw8PKgAAAHicY2BkYGBu+N/AEMNW/P8vAwPrFAagCApwAwCMbgW1eJxjYWBgYAFiNnUEZnUH4rdANieUVgTiYiCWhqhFwbJQOhuLHAyL4ZED4UUg+v9fMPssAbV0wgBMsgiBAAAAAACOALgBOAGSAfYCaAMwA4AEHATOBXAFkAWwBdAF8AYeBngG8AdiB4YH5Ah0CMoI6glOCVwJngmyCgIKlgrKCyILXgvIDHwM3g0kDVINag2kDeQOWg7AD0APYg+ED6YP5BAGECoQThB2ENYQ/hFAEYoR4hIiEmISoBLQEwQTLBNmE54T4hQmFGoUrgAAeJxjYGRgYHBjmMggxAACTEDMBYQMDP/BfAYAH3MCAAB4nIWRPW7CQBCFn8GQBJQoSqQ0aVYpKBLJ/JRIqVCgp6AHs+ZHttdaL0jUOU2OkBPkCOloc4pIedhDA0W82tlv3r6ZHckA7rCHh/K75y7ZwyWzkiu4wKNwlfqTsE9+Fq6hiZ5wnfqrcAMveBNusmPGDp5/xayFd2EPt/gQruAGn8JV6l/CPvlbuIYH/AjXqf8KNzDxroWbaHnhwOqp03M126lVaNLIpO54jvViE0/tqTzRNl+ZVHWDzlEa6VTbY5t8u+g5F6nImkQNeavj2KjMmrUOXbB0Luu325HoQWgSDGChMYVjnENhhh3jCiEMUkRFdGf5mO4FNohZaf91T+i2yKkfcoUuAnTOXCO60sJ5Ok2OLV/rUXV0K27LmoQ0lFrNSWKy4g883K2phNQDLIuqDH20uaITf1DMkPwB2JNvV3icbVLXctswENQmlGxRxTW998r03qvzHRB4ImGBAA0crPjvA5HyjDwTvBC73APudtE51WlX2vn/2sMpnEaCLnpYwzr6SDHAECOMsYFNbGEbO9jFGZzFOZzHBVzEJVzGFVzFNVzHDdzELdzGHdzFPdzHAzzEIzxGhid4imd4jhd4iVd4jTd4i3d4jw/4iE/4jC/4im/4jh/4iV/4jT386STKTO1AK8+ZPwjCUbuXyklN/WafKy93W3Z/lqmcbOFEXSq52ZDazsllzlbCrBKFI5q1RKjrY8WwPZGkqoRelQtdl2JV3hDjilxBmSStfeQ3V6GmKW+tEk4VJZ+Q5HZuBpXgcmpdFbToe6qFE2xdKpiFLCsyPJgGrTMvY78mFYFtNlc5lwkLPxt4G5yk7FDRvBdqbUXec1TZQ0qkzSnxbOtEW1uvLwprLY66VWDK14JpvuvSGnZW++7hwreeV6bQ1HOWBVMvJ01M3WhFQd2JC77sypLkrKdYaCUTR7lNgslturgsm2grZ10WE03DtjRrQRQXJo5smNyoBfvBs5oepS1aWJVMrM4HLW6cSqext0xabd1w4Y+IQJNwG8rk8ahMmWiJ8NQ9CJbpmI3RNWwbpHU5xS7HbW5mCROtzKzvwySaqmoe+BADbfcjz07NiEtnQ1H243Dkopr6TH85m8d3lcr4CLmJbrScMvYYKpMukbPzbWU8OV7+aMbbOUk1E24tuViRTSyzrcYrTMyr0/kHJ1MmJgAAAA==) format("woff"),url(data:font/ttf;base64,AAEAAAALAIAAAwAwR1NVQiCLJXoAAAE4AAAAVE9TLzI8Fk0zAAABjAAAAGBjbWFw08BySgAAAwQAAAYoZ2x5ZsBscvwAAAm8AAApXGhlYWQqPdk7AAAA4AAAADZoaGVhCW8GOgAAALwAAAAkaG10eC5b//0AAAHsAAABGGxvY2GZiY5WAAAJLAAAAI5tYXhwAWIAnQAAARgAAAAgbmFtZRCjPLAAADMYAAACZ3Bvc3Rm3tvVAAA1gAAAA64AAQAAA4D/gABcBnP//QAABZQAAQAAAAAAAAAAAAAAAAAAAEYAAQAAAAEAAJO49XZfDzz1AAsEAAAAAADixsqfAAAAAOLGyp///f9/BZQDgQAAAAgAAgAAAAAAAAABAAAARgCRABIAAAAAAAIAAAAKAAoAAAD/AAAAAAAAAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFsaWdhAAgAAAABAAAAAQAEAAQAAAABAAgAAQAGAAAAAQAAAAQEUgGQAAUAAAKJAswAAACPAokCzAAAAesAMgEIAAACAAUDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFBmRWQAwOYA6hEDgP+AAAAD3ACBAAAAAQAAAAAAAAAAAAAAAAACBAAAAAQAAAAGJwAABicAAAYnAAAFRwAABe0AAAYJAAAF7QAABiEAAAZzAAAGGwAABAAAAAQAAAAEAAAABAAAAAQdAAAEAAAABGsAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQWAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABKIAAAQA//0EAAAABM0AAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAAAAAUAAAADAAAALAAAAAQAAALcAAEAAAAAAdYAAwABAAAALAADAAoAAALcAAQBqgAAAEQAQAAFAATmAOYF5g/mFuYY5h3mIuYn5i/mN+Y+5lvmfOaJ5qHmxObM5t/m5ebt5xPnHOdB543nj+eT55jnnOei56noUuoP6hH//wAA5gDmBeYP5hbmGOYd5iDmJ+Yv5jfmPuZR5nzmieaf5sTmzObf5uXm7ecT5xznPueD54/nkueY55vnn+el6FLqD+oR//8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBEAEQARABEAEQARABEAEgASABIAEgASABcAFwAXABgAGAAYABgAGAAYABgAGAAZgB6AHoAfAB8AH4AhACMAIwAjAAAAAEAFQAjABAAHAAUACoAGwAgAB8AEwAXACEACwAiAAYABwAIAAkACgAFAAIAAwAEABoAEgAnABkAFgArACYAKAARACQAKQAlAAwADgAPAA0ALQBAAEEALgAvAEIAQwBEAEUAPwAwADEAMgAzADQANQA2ADcAOAA5ACwAOgA7ADwAPQA+ABgAHQAeAAABBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAANMAAAAAAAAAEUAAOYAAADmAAAAAAEAAOYFAADmBQAAABUAAOYPAADmDwAAACMAAOYWAADmFgAAABAAAOYYAADmGAAAABwAAOYdAADmHQAAABQAAOYgAADmIAAAACoAAOYhAADmIQAAABsAAOYiAADmIgAAACAAAOYnAADmJwAAAB8AAOYvAADmLwAAABMAAOY3AADmNwAAABcAAOY+AADmPgAAACEAAOZRAADmUQAAAAsAAOZSAADmUgAAACIAAOZTAADmUwAAAAYAAOZUAADmVAAAAAcAAOZVAADmVQAAAAgAAOZWAADmVgAAAAkAAOZXAADmVwAAAAoAAOZYAADmWAAAAAUAAOZZAADmWQAAAAIAAOZaAADmWgAAAAMAAOZbAADmWwAAAAQAAOZ8AADmfAAAABoAAOaJAADmiQAAABIAAOafAADmnwAAACcAAOagAADmoAAAABkAAOahAADmoQAAABYAAObEAADmxAAAACsAAObMAADmzAAAACYAAObfAADm3wAAACgAAOblAADm5QAAABEAAObtAADm7QAAACQAAOcTAADnEwAAACkAAOccAADnHAAAACUAAOc+AADnPgAAAAwAAOc/AADnPwAAAA4AAOdAAADnQAAAAA8AAOdBAADnQQAAAA0AAOeDAADngwAAAC0AAOeEAADnhAAAAEAAAOeFAADnhQAAAEEAAOeGAADnhgAAAC4AAOeHAADnhwAAAC8AAOeIAADniAAAAEIAAOeJAADniQAAAEMAAOeKAADnigAAAEQAAOeLAADniwAAAEUAAOeMAADnjAAAAD8AAOeNAADnjQAAADAAAOePAADnjwAAADEAAOeSAADnkgAAADIAAOeTAADnkwAAADMAAOeYAADnmAAAADQAAOebAADnmwAAADUAAOecAADnnAAAADYAAOefAADnnwAAADcAAOegAADnoAAAADgAAOehAADnoQAAADkAAOeiAADnogAAACwAAOelAADnpQAAADoAAOemAADnpgAAADsAAOenAADnpwAAADwAAOeoAADnqAAAAD0AAOepAADnqQAAAD4AAOhSAADoUgAAABgAAOoPAADqDwAAAB0AAOoRAADqEQAAAB4AAAAAAI4AuAE4AZIB9gJoAzADgAQcBM4FcAWQBbAF0AXwBh4GeAbwB2IHhgfkCHQIygjqCU4JXAmeCbIKAgqWCsoLIgteC8gMfAzeDSQNUg1qDaQN5A5aDsAPQA9iD4QPpg/kEAYQKhBOEHYQ1hD+EUARihHiEiISYhKgEtATBBMsE2YTnhPiFCYUahSuAAAABAAA/4AEAAOBABgALQA7AFwAAAEiBw4BBwYUFx4BFxYyNz4BNzY0Jy4BJyYDIicmJyY0NzY3NjIXFhcWFAcGBwYDMjY1NCYjIgcOARUGFhMiPwE2JiMiBwYHFz4BMzIGDwEGFxYzMjc2NzY3JwYHBgIAaF9cjicoKCeOXF/QX1yOJygoJ45cX2hxYV43OTk3XmHiYV43OTk3XmFXIjEhHhkUEhMBIRkNCisNCxggOkE4EBI0CAYBBSYQDAocEx0jIyokExUYFAOAKCeOXF/QX1yOJygoJ45cX9BfXI4nKPxgOTdeYeJhXjc5OTdeYeJhXjc5AkkvHxkjDAskEh0g/n4opi81HB8wHAwXEBSePRsVCg0XGyQaEgsJAAAGAAD/6QTsAwIAAwAHAAsADwATABcAAAEzFSMVMxUjFTMVIwEhFSEVIRUhFSEVIQEbt7e3t7e3ATECn/1hAp/9YQKf/WEDArd6t3q3Avp6tnq3egAJAAD/4wUYAzIACwAYACEALgA6AEcASwBPAFMAAAEyPgE0LgEjIgYUFhciLgE0PgEyHgEUDgEDMjY0JiIGFBYXIi4BND4BMh4BFA4BAzI+ATQuASMiBhQWFyIuATQ+ATIeARQOARMhFSEVIRUhFSEVIQFoEh4SEh4SGicnGhotGhotNS0aGi0bGyYmNScnGhotGhotNS0aGi0bEh4SEh4SGicnGhotGhotNS0aGi3JAsz9NALM/TQCzP00Ao4SHiMeESY1JyAaLTUtGhotNS0a/tsmNiYmNiYgGi00LhoaLTUtGv7bER8iHxEmNiYhGy00LRsbLDUtGwMtgsOCw4IACQAA/+MFBwMyAAAADQAOABsAHAApAC0AMQA1AAABIxQeATI+ATQuASIOARMjFB4BMj4BNC4BIg4BEyMUHgEyPgE0LgEiDgEBIRUhFSEVIRUhFSEBWGIaLjQtGhotNC4aYmIaLjQtGhotNC4aYmIaLjQtGhotNC4aAUUCzP00Asz9NALM/TQCzxotGhotNS0aGi3+oBotGhotNC4aGi7+oRotGxstNC0bGy0CsYLDgsOCAAAADAAA/8QFBANCAAMABwALABQAHQAhACUAKQAtADEAOgA+AAABIRUhFSEVIRUhFSEDIiY0NjIWFAYDIiY0NjIWFAYnFSE1NxUjNTcVIzU3FSE1NxUjNSUyFhQGIiY0NicVIzUB7AMY/OgDGPzoAxj86EwNDAwYDg4LDQwMGA4OO/7/58vX5vT+//HhASELDg4YDAwo9gNCkNiQ2JABZA4XDg8VD/6YDhcODxUPCyUlaSUlYCUltCcnqSYm9g8VDw4XDgUmJgAAAAASAAD/tAVGA14AAwAHAAsAEAAVABoAHgAiACYAKgAuADIANgA6AD4AQgBGAEoAAAEhFSEVIRUhFSEVIQM1MxUjEzUzFSMTNTMVIwMzFSMVMxUjAzMVIxUzFSMnMxUjEzMVIxUzFSMRMxUjAzMVIxEzFSMnMxUjEzMVIwJKAvv9BQL7/QUC+/0FZS0wAy0wAy0waTQ0NDRoNDQ0NGg0NNA0NDQ0NDRoNDQ0NGg0NNA0NAL1i9CL0IsCtioq/qUqKv6lKioCCa6trgIJrq2urq4DZK5oI/7IIwF+I/7IIyMjAtkiAAAMAAD/iQU3A10AAwAHAAsAFAAsADcASgBfAGgAewCGAJAAAAEhFSEVIRUhFSEVIQEyNCMiBhQWMwciJjQ2MzIXMzUzFRQWOwEVIyInIw4BIzMiJjQ2MzIWFAYjAzUzMjU0JiMiHQEUFjMyNjQmIyc0NjMyFhUUBx4BFRQGIyImJxUjNRciJjQ2MhYUBgMnMxc3MwcVFhQHBiImNTQ3NjcXBgcUFjI2NCcmJxciJjQ2MzIWFAYCCwMs/NQDLPzUAyz81P7rJSUPExUQDh8kJB8jDQMtBggIFiQFBAYbErgNEA4LDhAQDrELJRQRHRUTERQaFkklJCIoHRcZJx8RGgU06AsODhkMDLRVND8/KFEaDwszFwUECh0LBAcQBwMECKYNEBANCw8PA0KT3pTdlAMHYBosHSEsUi8lIXYLByEZDBEOFw4OFw7+/SUaDhAlURcZFCEUKSorIBseEgkeGCAmEA1Rz5sPFg8OGA7+xq6CgqoEKTQKCxYWDRALFx4OEwgHBw8JCwoWDhcODhYPAAAADAAA/5YFWANkAAMABwALABAAFQAaAB4AIgAmACoALgAyAAABIRUhFSEVIRUhFSEDNTMVIxM1MxUjEzUzFSMDMxUjFTMVIwMzFSMVMxUjJzMVIxMzFSMCPwMY/OgDGPzoAxj86GkvMgMvMgMvMmw2NjY2bTc3NzdsNjbZNjYDG5DYkNmQAq0rK/6YKyv+lywsAmX8bP0CZfxs/f39A838AAkAAP+lBUsDagADAAcACwATABwANgA/AGUAbwAAASEVIRUhFSEVIRUhATUHNTczFSMXIiY0NjIWFAYHNDYyFhUUBg8BFTMVIzU3PgE1NCYjIgYVIxciJjQ2MhYUBgM1MzI2NTQmIgYVIzQ2MhYVFAYHFR4BFRQGIiYnMxQWMjY1NCsBFyImNDYzMhYUBgIeAy380wMt/NMDLfzT/tg3OywsgQsODhkMDMYqRisWHilhn0oWDxUQDxMs7A0MDBkODsEaERQUIhQoL0YqFRAVGzNKLgMsGCQSJRqqCw8PCw4QEANIk96U3pMCvrElKSXaBA8WDw4YDtMiKCYcFCIcJAglIUcWFgsOEBIQnw8XDg8WD/7zJRANCw8QDR0lHxwTGgMEAh4THSopIRAVFBEeZA8WDw8WDwAAAAsAAP+dBZQDWwADAAcACwAVAC8AOQBKAFQAXgB3AIEAAAEhFSEVIRUhFSEVIQEyNj0BIwYVFBYVIiY0NjczNTQmIgYHIzQ2MzIWHQEjNSMOATMiJjQ2MzIWFAYDIiYnFSM1MxU+ATMyFhQGIyciFRQWMzI2NCYXIiY0NjMyFhQGAyM0JiMiBhUUMzI2NzMUBiMiJjQ2MzIWFRciJjQ2MzIWFAYCQgNR/K8DUfyvA1H8r/7XDxgnHxAcHiIfKw0dEQMnKyMgJSoEBhugDg0NDgwPD4cSHwU2OQocECMnJyMTJhMTERYViQ4NDQ4LEBBgLxMPEhUnDhIGJysiKSwsKSIrSQ4REQ4MDw8DP5romuiaAyMUDgwGEQwLIx4vHAMPDAwHCRgeIR13FwwPDxgPDxgP/n4RDhvzYA8TM1UxjzIZHR4vG48PGA8PFxD+8g4RHRk2DA8dJTFXMSQdeA8YDw8XEAAADAAA/6EFUwNuAAMABwALABQAGAAhADEAOgBDAE0AZgBwAAABIRUhFSEVIRUhFSEDJyMHIzczFyMnBzMnFyImNDYyFhQGAyM1MzIWFRQGBx4BFRQGIycVMzI2NTQmIwczMjY1NCYrARciJjQ2MzIWFAYDIiY0NjMyFhcjNCYjIgYUFjMyNjczDgEjNyImNDYzMhYUBgIiAzD80AMw/NADMPzQyBNKFi1LP0owPxo7HqsLDw8YDQ2tZGEhJRcOFBwpITgmEBUVECYmExUVEybJDhAQDgsPD6MyNjYyJzYDMBwUHCAgHBMbBiwDNienDhAQDgsODgNIlN+U35QCwTQ03t6uVVWyDxYPDhgO/pHeHhkRHQMCIBUcI7k3Dw4MDpQQDhARaA8WDw8WD/6NPG87LiMSFiZIJhQRJC4EDxcODxYPAAAAAwAA/5oD1ANlAAMABwAOAAATIREhFzUhFQEzETMRMydOA4b8el0Cy/3AnXud2gIdAUfqjY3+WP7IATjqAAAAAAMAAP+7A+gDQQADAAcADgAAAREhERcjETMBFSEVIRUnAWX+ueqNjQGoATj+yOoDQfx6A4Ze/TYCP5x7ndoAAAADAAD/uwPgA0EAAwAHAA4AAAERIREHMxEjARUhFSEVNwKYAUfqjY3+WP7IATjqA0H8egOGXv02Aj+ce53aAAAAAwAA/5gDugNiAAMABwAOAAAlIREhJxUhNQEjESMRIxcDuvx6A4Ze/TYCP516ndrg/rjqjIwBqAE4/sjqAAAAAAIAAP/IBAcDJQAJABcAADcHJzcXEyEVIQM3EwMhFwcnIxcHMzcXB2BIAYYijwK4/Y/A6p2YAZ86VCLMambJIVQ74AFcAlMCOlv8/0UBCgEliSRRy61KJn8AAAAABQAAAAADmgLnAA0AGQAlADEAPQAAEyEyFhQGIyEiLgE0PgETITIWFAYjISImNDYTMzIWFAYrASImNDYhMzIWFAYrASImNDYhMzIWFAYrASImNDaaAswWHh4W/TQOGA4OGA4CzBYeHhb9NBYeHhaDFR4eFYMWHh4BOoQVHh4VhBUeHgE6gxYeHhaDFR4eAuYeKh4OFxwYDf2aHioeHioeATMeKh4eKh4eKh4eKh4eKh4eKh4AAQAA/6gETgNpAEYAAAkBDgEUFhceATY3AT4BLgIGBwEGIiY0NwE+AR4CBgcBDgEiJicuATY3AT4BLgIGBwEGBwYXHgEXFjc2NwE+AS4CBgcCnv6EFxkZFx9UUyABLAkIBxMZGgn+0xM1JhMBfR1NTDoUFB3+WyFWXVYhLSAgLQEZCQcHEhoZCv7oQBcWFhd/V1VUV0ABpS8hIV9/gC8DF/6EFzxAPBcfFhYfASwKGRoTBgYK/tQTJTYSAX0dFBQ6TUwd/lshIyMhLXl4LgEYCRoZEwcHCf7nQFdUVVaAFxYWF0ABpDB/gF8hITAAAAAABAAA/6YD2gNXABQAKQA+AFMAABM1MzI2PQE0JiMhIgYVERQWOwEyNiUzFRQWOwEyNjURNCYjISIGHQEUFgEjNTQmKwEiBhURFBYzITI2PQE0JiUVIyIGHQEUFjMhMjY1ETQmKwEiBofJDBISDP7wCg0RDCQMEQIryREMJAwRDQr+8AwREf6qyREMIw0RDQoBEAwSEgIfyQwREQwBEQkNEQwkDBECMMgSDCMMEg4J/vANERLUyA0REQ0BEAkOEQ0jDBL9DckMEREM/u8JDhIMIw0RyckRDSMMEQ0JAREMEREAAAAAAwAA/8AEAANAAAMABwARAAARMxEjATMRIwEHFzUhFTcnFSFgYAOgYGD9wNDQAUDQ0P7AA0D8gAOA/IACSouKamqKi2sAAAAABQAA/6ID+gNeAAAADAANABkAOwAAAR8BFgcxBi8BJjcxNiUXMRYHAQYnMSY3ATYTIgYdASERITI2NCYjISIOAhURFB4CMyEyPgI9ATQmAU0wwTExMDDBMDAwAkwxMDD+fTAwMDABgjABHSj9VgGZHSgoHf5nGzMmFRUmMxsCqhszJhUoAhkxwTAwMTHBMDAxwTAwMP59MDAxMAGCMP5iKB3MAqooOSgVJjMb/VYbMyYVFSYzG8wdKAAAAAAFAAD/fwPkA2cAFwAkADgATABXAAABMh4BFxEUDgEmJzUhERQOASYnETQ+ATcBHgEHAw4BLgE3Ez4BBx4BDwEXHgEPAQ4BLwEuAT8BPgEFNhYfARYGDwEGJi8BJjY/AScmNhMhIgYHFSE1NCYnA2YhOSIBGiYcAfzzGiYcASA3IgINEhQEZgUhJRQEZgUiwA4CDHFuDQEMAg0lDoYRAhCGDiYBPQ4nDYYQAhGGDiUNAgwBDW5xDAJ1/TMNEgEDDREMA2chNyH+kxMbARoTnf2TExwBGhMDPiE4IwH99QUfE/6KExMJIBMBdhMTNA0lDnduDSUOAg0BDIURMRONDgENDQEOjRMxEYUMAQ0CDiUNbncOJQHpEQxycAwSAQAAAAACAAD/oAPgA2AAHgA6AAABIgYVERQGIyEiJjURNCYiBhURFB4BMyEyPgE1ETQmJTcRFBYyNjURFxYyNjQvAiY1IwcGFQcGFBYyA7gSFhYS/TASFhYkFiE4HwLQHzghFv1uoBYkFqAMIBgM4AQEMAQE4AwYIAHoFhL+WBIWFhIBqBIWFhL+WB84ISE4HwGoEhZQoP3gEhYWEgIgoAwYIAzoAQIFAQIF6AwgGAAAAgAA/8AEAANAAAYACwAACQEFITUhAQUBBQEjAin91wEXAun+wgE+/K0BiwEb/s7bA0D9a+t3AX36Adjt/pIAAAMAAP/8BBYDEAAUACQAOQAAJQcGIicBJjQ3ATYyHwEWFA8BFxYUAQMOAS8BLgE3Ez4BHwEeAQkBBiIvASY0PwEnJjQ/ATYyFwEWFAFHHQUPBv72BgYBCgYPBR0GBuHhBgFM1gINByMIBwLVAw0HIwcIAXX+9gYPBhwGBuDgBgYcBg8GAQoGixwGBgEKBg8FAQsFBR0GDwXh4AYPAlz9HgcIAwkDDQcC4gcIAgoCDv6F/vYGBhwGDwbg4QUPBh0FBf71BQ8AAAAAAQAA/+8DlgMSAAMAABMhESFzAyP83QMS/N4AAAEAAP/HA/0DZAArAAABERQGIyEiJjURNDYzIScmNDYyHwEWFA8BBiImND8BIREhESMiJjQ2OwEyFgP8JBn8ghkkJBkBV1QSJTMSvBERvBIzJRJU/ucDAoEaJCQavxkkAmn9nBokJBoCZBkpUhIxIxK9EjMSvRIlNBJW/hMB7SQzJSkAAAIAAP+gA2gDYAADAAcAABMzESMBMxEjmO3tAeDw8ANg/EADwPxAAAACAAD/7wPhAxEAFQAyAAABERQOASYvASMiJjURNDY7ATc+AR4BATY0LwE3NjQmIg8BJyYiBhQfAQcGFBYyPwEXFjIB2AcLDATCohUdHRWiwgQMCwcCAgYGpqYGDBAGpqYGEAwGpqYGDBAGpqYGEAL8/QgGCgUDBMIdFQEsFR3CBAMFCv28BhAGpqYGEAwGpqYGDBAGpqYGEAwGpqYGAAAABAAA/+8D4QMRABUAJgA/AF0AAAERFA4BJi8BIyImNRE0NjsBNz4BHgETDgEXFhQHBh4BNjc2NCcuARc0JicmJyYOARYXHgEUBgcOAR4BNzY3PgE3JicmJyYOARYXFhcWFxYHBgcGBw4BHgE3Njc+AgHYBwsMBMKiFR0dFaLCBAwLB4oHAgUaGgUCDREFIiIFEdgxLQoKCRYEEgkoKiooCRIEFgkKCi0xfSVFGR0GEQkCBxoXVB4eHh5UFxoHAgkRBh0ZREgCAvz9CAYKBQMEwh0VASwVHcIEAwUK/uQFEAcgVCAHEAoBByxuLAcBa0B1LQoJCAgXDwkoZnBmKAkPFwgICQotdfVaRBoVBQMNEAUUF1RzcHBzVBcUBRANAwUVGkOvvQAAAAADAAD/oAPgA2AACwAbAB8AABciJjQ2MyEyFhQGIyUiJjURNDYzITIWFREUBiMlIREhXBkjIxkDSBkjIxn8uBkjIxkDSBkjIxn89ALQ/TBgIzIjIzIjtCMZApQZIyMZ/WwZI3gCHAAAAAcAAP+qA+sDVgADAAcACwASABkAIwA2AAABJyMXIScjFyMnIxclIxczNTQmISMiBh0BMwMUFjMhMjY1ESEFNDc2MzIfAR4BBg8BBiMiJyY1AcKRpJECT5GlkjKRpJEBuJ6RTSX8lgcbJdjYJRsDVhsl/CoBVhMRHBQO8xUPDxXzDhQcERMCq6qqqqqqqqqqahwkJBxq/UAcJCQcApXAGg4NCI0LKioMjAkNDhoAAAAABAAA/7cEggOAAAAADAAaACYAADczITIVMRQjISI1MTQlFx4BDgImLwEmNDYyJTMRIzU2NzMRMxUhFSsEFyoq++krA2jwCQYGEBcWCPAMGSP9yJJ4TURQg/6CDCorKyrt8AgWFhAGBgjwDCMZNAHSQgwn/blXAAAAA//9/6IEAANCABMAIwBFAAABMh4BFREUDgEjISIuATURND4BMwUhIgYVERQWMyEyNjURNCYFPgIXFh8BHgIXFg8BBg8BBiInJicmNTQnDgEHDgEuAQNjK0cqKkcr/e8rRyoqRysCEf3vHCcnHAIRHCcn/IIYj+COEAwCAgMGAQUKAgECZw0pDAUBAgN5mhcEHiQVAkopSCr+kCtHKipHKwFwKkgpWScb/pAcJyccAXAbJxlzpFIEAQoCAQQKBhIQAwMBbQ0PBQwIFR0HF45uEhQHHwAFAAD/uAOsA1AAPABDAFUAZQB3AAABFjc2Fx4BByMGFRcUFxYGBwYHBiMiJyYjBwYnJicmJyY1ESMmNjc2NzIXFjcmNzY3Nhc7ATIXFhcWFxYHJRUhNSEiFQcRFQYXFhceATc2NzYvAREjIhcRBwYVHgI2NzYvAREjIhcRFQYXFhcWNjc2NzYvAREjIgLgFSsoESopBUMCAQECCRoZJRYhEyghD26RSE4jDwQCQQgkJQ4VDRwjEwMJDSkRLCLOHg0WCg4EAwH+eQFG/rsBQAICAgsGGQcMAgIBAUABwgEBAQ0gFAIBAQFAAcQBAgQOCBkFCQIBAgFBAQLMAwEBAwdDNV+9WRMoWE0ZGAYEAQEBAQIBMBMiFDAB5C9DDAUBAQEBPRslBQICAQMJDBsQJCM/QgPH/nIYJxIgCAQBBQgfEigXAZID/n8bJhEfFQcQIBIoGAGPA/5tGCgRHQYDAwMIIBMnGAGNAAAEAAD/oASjA2EAEwAwADEAPgAAASEiDgEVERQeATMhMj4BNRE0LgETLgEvASYiDwEGIi8BLgEPAQYHMRE0NjMhMhYVESUjFB4BMj4BNC4BIg4BBCP8gCM7IiI7IwOAIzojIzodAwoDjSZnJrAFFgU9J2Mm3QYNJhoDgBsl/L2AIjtGOyIiO0Y7IgNgIzoj/UAjOiMjOiMCwCM6I/4zAgkCYxsb0wUFLRsCGo0DDQIdGiYmGv6zjSM7IiI7RjsiIjsAAAAAAgAA/6AD4ANhAA8AKgAAASYiBwEGFBYzMjc2EzY1NAEmJwYHDgIHBgcGIyImLwEUHgIzMjYnNSYDxBxNH/6oMmFEQjRIsxj98SQVISEcNycREwwHFgghDzcfPWVCco8DLANHGR3+xy2KZDFCAVQwIib9vxwpAQUEEx8ZHB8UEgooP2xWMY5xJgsAAAABAAAAAAPkAtIAFwAAEy4BPwE+AR8BFjY3ATYWHwEWBgcBBiYnJwkCCBkHGQrXCRkIAjkJGgkOCQEK/Z4OKQ8BNwoZCh8KBAeQBQEGAc4IAQkOCRoJ/Z4OAQ8AAAEAAP/AA4ADQAALAAABFSMBMxUhNTMBIzUDgID+wID+QIABQIADQED9AEBAAwBAAAEAAP/YA9oDJwAgAAAJASYOAR0BJgcGBwYHBgcUFjY3Njc2NzYXFRQeATcBNjQD0P7FChsTOT9lUm1BTwwMEQRSU1BdU3ITGwoBOwkB4gE7CgESD7kBDBQyQ3OMzQkKAgeSUk4gHAW7DhIBCgE7CRsAAAAAAQAAAAAD4QLzACUAAAE1NCYjJgcBBhQXARY3PgE9ARYXFhcWFxYXFBYyNjUmJyYnJicmAgAFBQoG/kAGBgHACwUFBVJWSkQ7KCYBCQ4JAR4hOUBVYAIwsAUIBQX+4AcMB/7ABQUCCAOwAyQfMiwtKxQHCQkHU1deTFMwNgAAAAACAAD/uAP1A0gALABZAAATNDYzMjY0JiMiDgEdARQGIyIGFBYzMhYdARQeATMyNjQmIyImPQE0Jic+ATUFIiY9ATQuASMiBhQWMzIWHQEUFhcOAR0BFAYjIgYUFjMyPgE9ATQ2MzI2NCbvNSYTGhoTMVQxNSYTGxsTJjUxVDETGhoTJjUhHh4hAtgmNTFUMRMaGhMmNSEeHiE1JhMaGhMxVDE1JhMbGwKRJjUbJRsxUzKIJjUbJhs1JogyUzEbJRs1JogoRxoaRyhbNSaIMlMxGyUbNSaIKEcaGkcoiCY1GyUbMVMyiCY1GyYbAAoAAP+gA+EDYAAQABQAGAAcACAALAAwADsAPwBDAAABITIWFREUBiMhIiY1ETQ2MxMjFTMFNSMVJTM1IyUVMzUFMjMyNzI2NTY9ASMFMzUjJzUjFRQXFBYzFjM3MzUjBTUjFQICAZ4kHBwj/L0iHBwh8O7uASrtASnu7v2s7gFmDRp+PgQIAfD+1u7uPPABCwQ7eGnt7QIY7gNgICn80ikgICYDNiUf/UC5Abq6Arj5uLi6AQkDLVolt7dAuCZWKwQMAQK3t7e3AAAAAAcAAP+iA94DXgAbAEYASgBOAFIAVgBaAAAlNzYyFhQPARcWFAYiLwEHBiImND8BJyY0NjIXJyMVMzIWFAYrARUzMhYUBiMhIiY1ETQ2MyEyFhURFAYiJj0BIxUUBiImNQEVMzURNSMVEzUjFQEVMzUXMzUjAxphChwUCmFhChQcCmFgCh0UCmFhChQdClTdZg4UFA5miA4UFA7+Mw4UFA4DeA4UFBwU7xQdFP4A3t7e3gEj3UXv739gChQcCmBhChwUCmBgChQcCmFgChwUCqGaFBwUvBQcFBQOA3gOFBQO/hEOFBQOMzMOFBQOAUTNzf1VvLwBAJqaAavNzc3NAAAEAAD/xgPTAzcAAwAHAAsADwAAEyEVIRMhFSEDIRUhEyEVIS4DpPxcaALU/SxoA6T8XGgC1P0sAzdo/V9oAWtoAWtoAAQAAP/HA9MDOQADAAcACwAPAAATIRUhESEVIREhFSERIRUhLgOk/FwDpPxcA6T8XAOk/FwDOGf9XmcBamcBamcAAAAABAAA/8YD0wM3AAMABwALAA8AABMhFSERIRUhESEVIREhFSEuA6T8XALV/SsDpPxcAtX9KwM3aP1faAFraAFraAAAAAADAAD/qAN8A1gACQAZACMAAAEhMj4BNC4BIyEBFA4CIyERITIeAQYHHgElESEyPgE0LgEjAS4BCShEKChEKP73Ak0oS2E1/kYBf1CFPhw3Pkb9swFEKEQoKEQoAbsnRU9EJ/3RNWFLKAOuV5OcOiN7TP7aJ0RPRScAAAAABAAA/8YD0wM3AAMABwALAA8AABMhFSETIRUhAyEVIRMhFSEuA6T8XM8C1f0rzwOk/FzPAtX9KwM3aP1faAFraAFraAADAAD/kgPTA2sABwAKAA4AAAEhByMBMwEjCwIBIRUhAqj+sFNvATZoATZvfH9//q0DpPxcATHPAwj8+AE2AT3+w/5iaAAAAAACAAD/qwPVA1UABwAPAAABAyMTATcBBwE3IychFSEHAiQ6cEv+Zk4DXE7+bA9jbwKK/rgfAQ7+uAGnAZpO/KROAsxUb2+zAAAFAAD/xwPTAzkAAwAHAAsADwASAAATIRUhESEVIQEhFSERIRUhDwERLgOk/FwDpPxcAZ4CBv36Agb9+s/PAzhn/V5nAWpnAWpnTrUBagAAAAIAAAAAA8oC9AAeAD0AADcmJyY1NDc+ATcXBgcGBwYHPgEXHgIVFA4CIy4BJSYnJjU0Nz4BNxcGBwYHBgc+ARceAhUUDgIjLgGAKhMVKCaOXC5PMyoXEAgUNBsvTCwbM0MkKEoB6ioTFSgmjV0uTzQpFxAJFTQbLk0sGzNDJChKbC0yNktZU1GCKUgrOS44JzILCAMEMlAuJEMzHAEgHC0yNktZU1GCKUgrOS44JzILCAMEMlAuJEMzHAEgAAAAAAUAAP/GA9MDNwADAAcACwAPABIAABMhFSERIRUhASEVIREhFSEFNxEuA6T8XAOk/FwBngIG/foCBv36/mLPAzdo/V9oAWtoAWtoTrb+lQAABgAA/60D0wNTAAMADQAZACUAKQAtAAABIRUhJxUzFSM1MzUjNRE1MzUjNTMVIxUzFQMjNTM1IzUzFSM1MxMhFSERIRUhATECof1fmzObNDRoaJtnZzNoaGibm2ibAqH9XwKh/V8DHmebmzQ0ZzT9xoIaNIIaNP7kMxo0zzQB0mj+/WcABgAA/80D0wM5AAMADwAYACQAKAAsAAABIRUhByIuATQ+ATMyFhQGAyImNDYyFhQGAyIuATQ+ATMyFhQGEyEVIREhFSEBMQKh/V+1FSQVFSQVIC0tICEtLUEtLSAVJBUVJBUgLS2VAqH9XwKh/V8DHmcaFSQpJBUtQS3+lS5ALi5ALv6bFSQqJBQtQC4B52j+/WcAAAMAAP+XA+kDaQAXAC8AMwAAJSc3PgEuAgYPASc3Njc2Fx4BFxYHBg8CBgcGJy4BJyY3Nj8BFwcOAR4CNj8BExcBJwM1RUUuIiFcfn4uRUVFQVlWV1iDFxcXF0HORUFZVldYgxcXFxdBRUVFLiIhXH5+LkUiRf6pRdRFRS5+flwhIi5FRUVBFxcXF4NZVlZZQc5FQRcXFxeDWVZWWUFFRUUufn5cISIuRQG+Rf6pRQAAAgAA/+YD6gLwAAsAIwAAGwIzCQEjCwEjCQI+AS4BDgEXByY+AjMyHgEGDwEzFSM1me7ufv7TAS1+7u99AS3+0wOECgMQGxoMBDgGCBwpFh4yFg0WT23CAu/+4AEg/pT+lAEg/uABbAFs/Z0KHRcIDBoOEBYtJBUiNzsUSzExAAACAAAAAAPqAx0ACwAjAAAbAjMJASMLASMJAQU+AS4BDgEXByY+AjMyHgEGDwEzFSM1me7ufv7TAS1+7u99AS3+0wOECgMQGxoMBDgGCBwpFh4yFg0WT23CAuz+4AEg/pT+lAEg/uABbAFsTQodFwgMGg4QFi0kFSI3OxRLMTEAAAIAAP/GA/IDOgAUACgAAAEWFRQGIyInNRYzMjc0Ji8BITUhFSUhJicmNTQ2MzIXFSYjIhUUFhcWAx0TrpmIhX6E0wESEgf9iAPi/kr+1A8MJJuhem9jds5INTMBEis0cH0/fUl6GC8RB25upQ0QLkJmkDZ3OYIjNA8PAAACAAD/lAOfA2wAFwAbAAABERQeATI+ATURMxEUBwYHBiInJicmNREDIRUhATE4X3BfOGgrKUZJqElGKStnAzz8xANs/i44YDc3YDgB0v4uVUhGKSsrKUZIVQHS/JBoAAADAAD/jQPyA3AAFgAaAB4AACUzMj4BNC4BIyE1ITIeARQOASsBFSc3ASEVIQEVITUCplMlQCUlQCX9FgLqQ3JDQ3JDU93d/WkD4vweAUv+tWolQEpAJW9DcodyQ2+mpgKWbv1pbm4AAAEAAAAAA94CewAVAAATITIWFRQHBgcGBwYHBiInAS4BNz4BRAN4DRUHDCYtWmOjChwK/kQIAwUCEQJ6FA4ICxEoMFhinQsLAbsIFAoKCgAAAwAA/4kDygNyABoAHgAiAAABMhYVET4BHgIOAiYvARQGIyEiJjURNDYzBSMRMyUhFSEB0RcgN4eBXyQdWX+IOQwgF/60FyAgFwEV3d0Buf61AUsDcSAX/kYqFCtlhIVpMg0nCBcgIBcDdBcgbvz63W4AAAADAAD/1APZAxkAGQAdACEAAAEyFhURFAYjHgEOAi4CNjchIiY1ETQ2MwEVITURIRUhA54WHh4WKBMrYX59YioTJ/5iFh4eFgHSATb9LALUAxgeFf7JFh41f3pZHx9Zen81HhYBNxUe/ftoaAGezwAABAAA/8sD4wM1AA8AEwAgACwAAAEyFhURFAYjISImNRE0NjMXIxEzATIeARQOASIuATQ+ARcjFSMVNxUzNRc1IwOyFB0dFP7dFB0dFPLCwv2JQnBBQXCEb0FBb3NhYWFhYWEDNR0U/PgUHR0UAwgUHWH9WAJHQm+Eb0JCb4RvQmFhYgFiYgFiAAQAAP/LA+kDNQAPABMAIAAsAAABMhYVERQGIyEiJjURNDYzFyMRMwEyHgEUDgEiLgE0PgEXIxUjFTcVMzUXNSMBcRQdHRT+3RQdHRTzwsIBtUJvQUFvhHBBQXByYWFhYWFhAzUdFPz4FB0dFAMIFB1h/VgCR0JvhG9CQm+Eb0JhYWIBYmIBYgAEAAD/lwO1A2MADAAYACgALAAAATIeARQOASIuATQ+ARcjFSMVMxUzNTM1IwEyFhURFAYjISImNRE0NjMXFSE1AgBCb0JCb4RvQkJvc2JhYWJhYQFTFB0dFPz4FB0dFDACqAF9QXCEb0FBb4RwQWFhYWFhYQKoHRT+3RQdHRQBIxQdYsLCAAAABAAA/5oDtQNmAA8AEwAgACwAAAEyFhURFAYjISImNRE0NjMFIRUhATIeARQOASIuATQ+ARcjFSMVMxUzNTM1IwOEFB0dFPz4FB0dFALY/VgCqP6sQXFBQXGDb0JCb3NiYWFiYWEBHx0U/t0UHBwUASMUHWHCA2lBcIJxQUFwhG9BYWFhYWFhAAAAEgDeAAEAAAAAAAAAEwAAAAEAAAAAAAEACAATAAEAAAAAAAIABwAbAAEAAAAAAAMACAAiAAEAAAAAAAQACAAqAAEAAAAAAAUACwAyAAEAAAAAAAYACAA9AAEAAAAAAAoAKwBFAAEAAAAAAAsAEwBwAAMAAQQJAAAAJgCDAAMAAQQJAAEAEACpAAMAAQQJAAIADgC5AAMAAQQJAAMAEADHAAMAAQQJAAQAEADXAAMAAQQJAAUAFgDnAAMAAQQJAAYAEAD9AAMAAQQJAAoAVgENAAMAAQQJAAsAJgFjQ3JlYXRlZCBieSBpY29uZm9udGljb25mb250UmVndWxhcmljb25mb250aWNvbmZvbnRWZXJzaW9uIDEuMGljb25mb250R2VuZXJhdGVkIGJ5IHN2ZzJ0dGYgZnJvbSBGb250ZWxsbyBwcm9qZWN0Lmh0dHA6Ly9mb250ZWxsby5jb20AQwByAGUAYQB0AGUAZAAgAGIAeQAgAGkAYwBvAG4AZgBvAG4AdABpAGMAbwBuAGYAbwBuAHQAUgBlAGcAdQBsAGEAcgBpAGMAbwBuAGYAbwBuAHQAaQBjAG8AbgBmAG8AbgB0AFYAZQByAHMAaQBvAG4AIAAxAC4AMABpAGMAbwBuAGYAbwBuAHQARwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABzAHYAZwAyAHQAdABmACAAZgByAG8AbQAgAEYAbwBuAHQAZQBsAGwAbwAgAHAAcgBvAGoAZQBjAHQALgBoAHQAdABwADoALwAvAGYAbwBuAHQAZQBsAGwAbwAuAGMAbwBtAAACAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEYBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeAR8BIAEhASIBIwEkASUBJgEnASgBKQEqASsBLAEtAS4BLwEwATEBMgEzATQBNQE2ATcBOAE5AToBOwE8AT0BPgE/AUABQQFCAUMBRAFFAUYBRwAEaW5mbwtsaXN0LXNxdWFyZQtsaXN0LWNpcmNsZQlsaXN0LWRpc2MUbGlzdC1jamstaWRlb2dyYXBoaWMQbGlzdC1sb3dlci1yb21hbhBsaXN0LWxvd2VyLWdyZWVrEGxpc3QtdXBwZXItcm9tYW4MbGlzdC1kZWNpbWFsEGxpc3QtbG93ZXItYWxwaGEQbGlzdC11cHBlci1hbHBoYQ5tZXJnZS1jZWxscy11cBBtZXJnZS1jZWxscy1sZWZ0EW1lcmdlLWNlbGxzLXJpZ2h0EG1lcmdlLWNlbGxzLWRvd24LbWF0aGZvcm11bGEJc2VwYXJhdG9yCmF0dGFjaG1lbnQLZnVsbC1zY3JlZW4KYXV0by13aWR0aAR0YXNrC3NvdXJjZS12aWV3BnVwbG9hZAZyZW1vdmUEY29kZQRzdG9wBGxvb3AIYXV0b3BsYXkFbXV0ZWQHdW5tdXRlZAhjb250cm9scwV2aWRlbwZzaW5nbGUGcm90YXRlBmRlbGV0ZQVpbWFnZQVicnVzaAVjaGVjawZpdGFsaWMEcmVkbwR1bmRvCmNvZGUtYmxvY2sFdGFibGUMZGVsZXRlLXRhYmxlDGFsaWduLWNlbnRlcg1hbGlnbi1qdXN0aWZ5CmFsaWduLWxlZnQEYm9sZAthbGlnbi1yaWdodApmb250LWNvbG9yDGZvcm1hdC1jbGVhcg9pbmRlbnQtaW5jcmVhc2UFcXVvdGUPaW5kZW50LWRlY3JlYXNlDGxpc3Qtb3JkZXJlZA5saXN0LXVub3JkZXJlZARsaW5rCXN1YnNjcmlwdAtzdXBlcnNjcmlwdA1zdHJpa2V0aHJvdWdoCXVuZGVybGluZQl0ZXh0LXdyYXAKY2FyZXQtZG93bg1kZWxldGUtY29sdW1uCmRlbGV0ZS1yb3cSaW5zZXJ0LWNvbHVtbi1sZWZ0E2luc2VydC1jb2x1bW4tcmlnaHQRaW5zZXJ0LXJvdy1ib3R0b20OaW5zZXJ0LXJvdy10b3AAAAAA) format("truetype")}.editify-icon[data-v-6e00035b]{font-family:editify-icon!important;font-size:inherit;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1;vertical-align:middle}.editify-button[data-v-d56d2e99]{display:inline-flex;justify-content:center;align-items:center;position:relative;color:var(--editify-font-color);font-size:var(--editify-font-size)}.editify-button .editify-button-wrap[data-v-d56d2e99]{padding:2px 4px;position:relative}.editify-button .editify-button-wrap.editify-right-border[data-v-d56d2e99]:after{position:absolute;right:0;top:50%;content:"";transform:translateY(-50%);height:18px;width:1px;background-color:var(--editify-border-color)}.editify-button .editify-button-wrap.editify-left-border[data-v-d56d2e99]:before{position:absolute;left:0;top:50%;content:"";transform:translateY(-50%);height:18px;width:1px;background-color:var(--editify-border-color)}.editify-button .editify-button-wrap .editify-button-el[data-v-d56d2e99]{display:inline-flex;justify-content:flex-start;align-items:center;white-space:nowrap;height:28px;line-height:1;transition:all .3s;background-color:var(--editify-background);padding:0 8px;border-radius:2px}.editify-button .editify-button-wrap .editify-button-el .editify-button-slot[data-v-d56d2e99]{display:inline-flex;justify-content:flex-start;align-items:center}.editify-button .editify-button-wrap .editify-button-el .editify-button-caret[data-v-d56d2e99]{margin-left:2px;transform:scale(.6);transition:transform .3s;font-size:var(--editify-font-size)}.editify-button .editify-button-wrap .editify-button-el .editify-button-caret.editify-rotate[data-v-d56d2e99]{transform:scale(.6) rotate(180deg)}.editify-button .editify-button-wrap .editify-button-el[data-v-d56d2e99]:hover{cursor:pointer;background-color:var(--editify-background-dark)}.editify-button .editify-button-wrap .editify-button-el[data-v-d56d2e99]:active,.editify-button .editify-button-wrap .editify-button-el.editify-active[data-v-d56d2e99]{background-color:var(--editify-background-darker)}.editify-button .editify-button-wrap .editify-button-el.editify-disabled[data-v-d56d2e99]{color:var(--editify-font-color-disabled);cursor:not-allowed;background-color:var(--editify-background)}.editify-button-layer[data-v-d56d2e99]{display:block;position:relative;overflow-x:hidden;overflow-y:auto}.editify-button-layer[data-v-d56d2e99]:not(:hover)::-webkit-scrollbar{display:none}.editify-button-layer .editify-button-options[data-v-d56d2e99]{display:block;width:100%;padding:4px 0}.editify-button-layer .editify-button-options .editify-button-option[data-v-d56d2e99]{display:flex;justify-content:flex-start;align-items:center;width:100%;padding:6px 12px;transition:all .3s;opacity:.8;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;box-sizing:border-box}.editify-button-layer .editify-button-options .editify-button-option[data-v-d56d2e99]:hover{opacity:1;cursor:pointer;background-color:var(--editify-background-dark)}.editify-button-layer .editify-button-options .editify-button-option[data-v-d56d2e99]:active,.editify-button-layer .editify-button-options .editify-button-option.editify-active[data-v-d56d2e99]{opacity:1;background-color:var(--editify-background-darker)}.editify-button-layer .editify-button-options .editify-button-option .editify-button-option-flex[data-v-d56d2e99]{display:flex;justify-content:flex-start;align-items:center;width:100%}.editify-button-layer .editify-button-options .editify-button-option .editify-button-option-flex[data-v-d56d2e99] .editify-icon{margin-right:10px}.editify-button-layer .editify-button-options .editify-button-option .editify-button-option-flex span[data-v-d56d2e99]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editify-mathformula[data-v-ae0ed37b]{display:block;width:320px;padding:10px 14px}.editify-mathformula .editify-mathformula-label[data-v-ae0ed37b]{display:block;text-align:left;margin-bottom:10px;font-size:var(--editify-font-size);color:var(--editify-font-color)}.editify-mathformula .editify-mathformula-textarea[data-v-ae0ed37b]{display:block;appearance:none;-webkit-appearance:none;-moz-appearance:none;border:1px solid var(--editify-border-color);width:100%;height:100px;overflow-x:hidden;overflow-y:auto;border-radius:2px;margin:0;padding:6px;font-size:var(--editify-font-size);color:var(--editify-font-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box;resize:none;font-family:Consolas,monospace,Monaco,Andale Mono,Ubuntu Mono}.editify-mathformula .editify-mathformula-textarea[data-v-ae0ed37b]::-webkit-input-placeholder,.editify-mathformula .editify-mathformula-textarea[data-v-ae0ed37b]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-mathformula .editify-mathformula-footer[data-v-ae0ed37b]{display:flex;justify-content:flex-end;align-items:center;width:100%;margin-top:10px}.editify-mathformula .editify-mathformula-footer span[data-v-ae0ed37b]{cursor:pointer;opacity:.8;transition:all .3s;font-size:var(--editify-font-size)}.editify-mathformula .editify-mathformula-footer span[data-v-ae0ed37b]:hover{opacity:1}.editify-checkbox[data-v-2ba291d8]{display:inline-flex;margin:0;padding:0;position:relative;vertical-align:middle;justify-content:flex-start;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:var(--editify-font-size)}.editify-checkbox input[type=checkbox][data-v-2ba291d8]{width:0;height:0;opacity:0;border:none;display:none}.editify-checkbox .editify-checkbox-item[data-v-2ba291d8]{display:inline-flex;display:-webkit-inline-flex;justify-content:center;align-items:center;position:relative;margin:0;padding:1px;border:1px solid var(--editify-border-color);background-color:var(--editify-background);border-radius:2px;color:var(--editify-background);transition:border-color .1s cubic-bezier(.71,-.46,.29,1.46),background-color .1s cubic-bezier(.71,-.46,.29,1.46),color .1s cubic-bezier(.71,-.46,.29,1.46)}.editify-checkbox .editify-checkbox-item.editify-round[data-v-2ba291d8]{border-radius:50%}.editify-checkbox .editify-checkbox-item.editify-checked[data-v-2ba291d8]{background-color:var(--editify-font-color);border-color:var(--editify-font-color)}.editify-checkbox .editify-checkbox-item.editify-checked.editify-reverse[data-v-2ba291d8]{background-color:var(--editify-background);color:var(--editify-font-color-light);border-color:var(--editify-border-color)}.editify-checkbox .editify-checkbox-item[data-v-2ba291d8] .editify-icon{font-size:18px;zoom:50%}.editify-checkbox .editify-checkbox-label[data-v-2ba291d8]{vertical-align:middle;color:var(--editify-font-color);-webkit-user-select:none;user-select:none;line-height:1}.editify-checkbox .editify-checkbox-label[data-editify-placement=left][data-v-2ba291d8]{margin-right:6px}.editify-checkbox .editify-checkbox-label[data-editify-placement=right][data-v-2ba291d8]{margin-left:6px}.editify-checkbox.editify-disabled[data-v-2ba291d8]{cursor:not-allowed}.editify-checkbox.editify-disabled .editify-checkbox-item[data-v-2ba291d8],.editify-checkbox.editify-disabled .editify-checkbox-item.check[data-v-2ba291d8]{background-color:var(--editify-background-darker);border-color:var(--editify-border-color);color:var(--editify-font-color-disabled)}.editify-checkbox.editify-disabled .editify-checkbox-label[data-v-2ba291d8]{color:var(--editify-font-color-disabled)}.editify-link[data-v-fa40f123]{display:block;width:280px;padding:4px}.editify-link .editify-link-label[data-v-fa40f123]{display:block;text-align:left;margin-bottom:10px;font-size:var(--editify-font-size);color:var(--editify-font-color)}.editify-link input[data-v-fa40f123]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0 0 10px;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:all .3s;background-color:transparent;outline:none}.editify-link input[data-v-fa40f123]::-webkit-input-placeholder,.editify-link input[data-v-fa40f123]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-link .editify-link-footer[data-v-fa40f123]{display:flex;justify-content:space-between;align-items:center;width:100%;font-size:var(--editify-font-size);color:var(--editify-font-color-light)}.editify-link .editify-link-footer .editify-link-operations[data-v-fa40f123]{display:flex;justify-content:flex-start;align-items:center}.editify-link .editify-link-footer .editify-link-operations>span[data-v-fa40f123],.editify-link .editify-link-footer .editify-link-operations>a[data-v-fa40f123]{cursor:pointer;opacity:.8;transition:all .3s}.editify-link .editify-link-footer .editify-link-operations>span[data-v-fa40f123]:hover,.editify-link .editify-link-footer .editify-link-operations>a[data-v-fa40f123]:hover{opacity:1}.editify-link .editify-link-footer .editify-link-operations>span[data-v-fa40f123]{margin-right:15px}.editify-link .editify-link-footer .editify-link-operations>a[data-v-fa40f123]{text-decoration:none}.editify-link[data-v-c45c005e]{display:block;width:280px;padding:10px 14px}.editify-link .editify-link-label[data-v-c45c005e]{display:block;text-align:left;margin-bottom:10px;font-size:var(--editify-font-size);color:var(--editify-font-color)}.editify-link input[data-v-c45c005e]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0 0 10px;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box;font-family:inherit}.editify-link input[data-v-c45c005e]::-webkit-input-placeholder,.editify-link input[data-v-c45c005e]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-link .editify-link-footer[data-v-c45c005e]{display:flex;justify-content:space-between;align-items:center;width:100%}.editify-link .editify-link-footer .editify-link-operations[data-v-c45c005e]{display:flex;justify-content:flex-start;align-items:center}.editify-link .editify-link-footer .editify-link-operations>span[data-v-c45c005e]{cursor:pointer;opacity:.8;transition:all .3s;font-size:var(--editify-font-size)}.editify-link .editify-link-footer .editify-link-operations>span[data-v-c45c005e]:hover{opacity:1}.editify-image[data-v-67d2dc3f]{display:block;width:280px;padding:10px 14px}.editify-image .editify-image-header[data-v-67d2dc3f]{display:flex;justify-content:flex-start;align-items:center;width:100%;margin-bottom:20px;position:relative;padding-bottom:6px;-webkit-user-select:none;user-select:none}.editify-image .editify-image-header .editify-image-header-slider[data-v-67d2dc3f]{position:absolute;width:50px;height:2px;border-radius:2px;left:0;bottom:0;transition:left .3s}.editify-image .editify-image-header .editify-image-header-slider.editify-upload[data-v-67d2dc3f]{left:5px}.editify-image .editify-image-header .editify-image-header-slider.editify-remote[data-v-67d2dc3f]{left:85px}.editify-image .editify-image-header .editify-image-header-item[data-v-67d2dc3f]{display:block;text-align:center;font-size:var(--editify-font-size);color:var(--editify-font-color);opacity:.8;transition:all .3s;width:60px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.editify-image .editify-image-header .editify-image-header-item[data-v-67d2dc3f]:hover{opacity:1;cursor:pointer}.editify-image .editify-image-header .editify-image-header-item[data-v-67d2dc3f]:first-child{margin-right:20px}.editify-image .editify-image-header .editify-image-header-item.editify-active[data-v-67d2dc3f]{opacity:1;color:var(--editify-font-color-dark)}.editify-image .editify-image-remote[data-v-67d2dc3f]{display:block;width:100%}.editify-image .editify-image-remote input[data-v-67d2dc3f]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0 0 10px;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box;font-family:inherit}.editify-image .editify-image-remote input[data-v-67d2dc3f]::-webkit-input-placeholder,.editify-image .editify-image-remote input[data-v-67d2dc3f]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-image .editify-image-remote .editify-image-remote-footer[data-v-67d2dc3f]{display:flex;justify-content:flex-end;align-items:center;width:100%;font-size:var(--editify-font-size);opacity:.8;transition:all .3s}.editify-image .editify-image-remote .editify-image-remote-footer[data-v-67d2dc3f]:hover{cursor:pointer;opacity:1}.editify-image .editify-image-upload[data-v-67d2dc3f]{display:flex;justify-content:center;align-items:center;width:100%;padding:15px 0;font-size:36px;opacity:.8;transition:all .3s;position:relative}.editify-image .editify-image-upload[data-v-67d2dc3f]:hover{cursor:pointer;opacity:1}.editify-image .editify-image-upload input[data-v-67d2dc3f]{opacity:0;position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;cursor:pointer}.editify-video[data-v-c4612c63]{display:block;width:280px;padding:10px 14px}.editify-video .editify-video-header[data-v-c4612c63]{display:flex;justify-content:flex-start;align-items:center;width:100%;margin-bottom:20px;position:relative;padding-bottom:6px;-webkit-user-select:none;user-select:none}.editify-video .editify-video-header .editify-video-header-slider[data-v-c4612c63]{position:absolute;width:50px;height:2px;border-radius:2px;left:0;bottom:0;transition:left .3s}.editify-video .editify-video-header .editify-video-header-slider.editify-upload[data-v-c4612c63]{left:5px}.editify-video .editify-video-header .editify-video-header-slider.editify-remote[data-v-c4612c63]{left:85px}.editify-video .editify-video-header .editify-video-header-item[data-v-c4612c63]{display:block;text-align:center;font-size:var(--editify-font-size);color:var(--editify-font-color);opacity:.8;transition:all .3s;width:60px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.editify-video .editify-video-header .editify-video-header-item[data-v-c4612c63]:hover{opacity:1;cursor:pointer}.editify-video .editify-video-header .editify-video-header-item[data-v-c4612c63]:first-child{margin-right:20px}.editify-video .editify-video-header .editify-video-header-item.editify-active[data-v-c4612c63]{opacity:1;color:var(--editify-font-color-dark)}.editify-video .editify-video-remote[data-v-c4612c63]{display:block;width:100%}.editify-video .editify-video-remote input[data-v-c4612c63]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0 0 10px;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box;font-family:inherit}.editify-video .editify-video-remote input[data-v-c4612c63]::-webkit-input-placeholder,.editify-video .editify-video-remote input[data-v-c4612c63]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-video .editify-video-remote .editify-video-remote-footer[data-v-c4612c63]{display:flex;justify-content:flex-end;align-items:center;width:100%;font-size:var(--editify-font-size);opacity:.8;transition:all .3s}.editify-video .editify-video-remote .editify-video-remote-footer[data-v-c4612c63]:hover{cursor:pointer;opacity:1}.editify-video .editify-video-upload[data-v-c4612c63]{display:flex;justify-content:center;align-items:center;width:100%;padding:15px 0;font-size:36px;opacity:.8;transition:all .3s;position:relative}.editify-video .editify-video-upload[data-v-c4612c63]:hover{cursor:pointer;opacity:1}.editify-video .editify-video-upload input[data-v-c4612c63]{opacity:0;position:absolute;left:0;top:0;width:100%;height:100%;z-index:1;cursor:pointer}.editify-table[data-v-9a40c4f5]{display:block;position:relative;padding:10px 10px 32px;box-sizing:border-box}.editify-table table[data-v-9a40c4f5]{border:1px solid var(--editify-border-color);margin:0;padding:0;border-collapse:collapse}.editify-table table tr[data-v-9a40c4f5]{margin:0;padding:0}.editify-table table tr td[data-v-9a40c4f5]{margin:0;padding:0;border:1px solid var(--editify-border-color)}.editify-table table tr td span[data-v-9a40c4f5]{display:block;width:15px;height:15px}.editify-table table tr td[data-v-9a40c4f5]:hover{cursor:pointer}.editify-table table tr td.editify-inside[data-v-9a40c4f5]{background-color:var(--editify-background-darker)}.editify-table .editify-table-footer[data-v-9a40c4f5]{text-align:center;color:var(--editify-font-color-light);line-height:1;font-size:12px;position:absolute;padding:0 10px;bottom:10px;left:0;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.editify-colors[data-v-c4c4764c]{display:block;color:var(--editify-font-color);font-size:var(--editify-font-size);padding:6px 10px;box-sizing:border-box;width:244px}.editify-colors .editify-colors-header[data-v-c4c4764c]{display:flex;justify-content:flex-start;align-items:center;position:relative;padding:6px 10px;transition:all .3s;margin-bottom:10px;opacity:.8}.editify-colors .editify-colors-header[data-v-c4c4764c]:after{content:"";width:100%;height:1px;background-color:var(--editify-background-darker);position:absolute;left:0;bottom:-5px}.editify-colors .editify-colors-header[data-v-c4c4764c] .editify-icon{margin-right:10px}.editify-colors .editify-colors-header[data-v-c4c4764c]:hover{cursor:pointer;background-color:var(--editify-background-dark);opacity:1}.editify-colors .editify-colors-header[data-v-c4c4764c]:active{opacity:1;background-color:var(--editify-background-darker)}.editify-colors .editify-colors-list[data-v-c4c4764c]{display:flex;justify-content:flex-start;flex-wrap:wrap}.editify-colors .editify-colors-list .editify-color[data-v-c4c4764c]{display:block;padding:4px;border:1px solid transparent;border-radius:2px}.editify-colors .editify-colors-list .editify-color.editify-active[data-v-c4c4764c]{border-color:var(--editify-font-color-light)}.editify-colors .editify-colors-list .editify-color .editify-color-el[data-v-c4c4764c]{display:block;width:16px;height:16px;border:1px solid var(--editify-border-color);border-radius:2px;cursor:pointer;transition:all .3s}.editify-colors .editify-colors-list .editify-color .editify-color-el[data-v-c4c4764c]:hover{transform:scale(1.2)}.editify-toolbar[data-v-8c767af5]{display:flex;justify-content:flex-start;align-items:center;padding:4px}[data-v-8c767af5] .editify-icon-rotate{transform:rotate(180deg)}.editify-attachment[data-v-cd9a7fcb]{display:block;width:280px;padding:10px 14px}.editify-attachment .editify-attachment-header[data-v-cd9a7fcb]{display:flex;justify-content:flex-start;align-items:center;width:100%;margin-bottom:10px;position:relative;padding-bottom:6px;-webkit-user-select:none;user-select:none}.editify-attachment .editify-attachment-header .editify-attachment-header-slider[data-v-cd9a7fcb]{position:absolute;width:50px;height:2px;border-radius:2px;left:0;bottom:0;transition:left .3s}.editify-attachment .editify-attachment-header .editify-attachment-header-slider.editify-upload[data-v-cd9a7fcb]{left:5px}.editify-attachment .editify-attachment-header .editify-attachment-header-slider.editify-remote[data-v-cd9a7fcb]{left:85px}.editify-attachment .editify-attachment-header .editify-attachment-header-item[data-v-cd9a7fcb]{display:block;text-align:center;font-size:var(--editify-font-size);color:var(--editify-font-color);opacity:.8;transition:all .3s;width:60px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.editify-attachment .editify-attachment-header .editify-attachment-header-item[data-v-cd9a7fcb]:hover{opacity:1;cursor:pointer}.editify-attachment .editify-attachment-header .editify-attachment-header-item[data-v-cd9a7fcb]:first-child{margin-right:20px}.editify-attachment .editify-attachment-header .editify-attachment-header-item.editify-active[data-v-cd9a7fcb]{opacity:1;color:var(--editify-font-color-dark)}.editify-attachment .editify-attachment-remote[data-v-cd9a7fcb]{display:block;width:100%}.editify-attachment .editify-attachment-remote input[data-v-cd9a7fcb]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0 0 10px;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box}.editify-attachment .editify-attachment-remote input[data-v-cd9a7fcb]::-webkit-input-placeholder,.editify-attachment .editify-attachment-remote input[data-v-cd9a7fcb]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-attachment .editify-attachment-remote .editify-attachment-remote-footer[data-v-cd9a7fcb]{display:flex;justify-content:flex-end;align-items:center;width:100%;font-size:var(--editify-font-size);opacity:.8;transition:all .3s}.editify-attachment .editify-attachment-remote .editify-attachment-remote-footer[data-v-cd9a7fcb]:hover{cursor:pointer;opacity:1}.editify-attachment .editify-attachment-upload[data-v-cd9a7fcb]{display:flex;justify-content:space-between;align-items:flex-end;width:100%;padding:15px 0}.editify-attachment .editify-attachment-upload input[type=text][data-v-cd9a7fcb]{appearance:none;-webkit-appearance:none;-moz-appearance:none;display:block;width:100%;margin:0;padding:4px 2px;border:none;font-size:var(--editify-font-size);color:var(--editify-font-color);border-bottom:1px solid var(--editify-border-color);line-height:1.5;transition:border-color .3s;background-color:transparent;outline:none;box-sizing:border-box;font-family:inherit}.editify-attachment .editify-attachment-upload input[type=text][data-v-cd9a7fcb]::-webkit-input-placeholder,.editify-attachment .editify-attachment-upload input[type=text][data-v-cd9a7fcb]::placeholder{color:var(--editify-font-color-disabled);font-family:inherit;font-size:inherit;vertical-align:middle}.editify-attachment .editify-attachment-upload .editify-attachment-btn[data-v-cd9a7fcb]{position:relative;font-size:20px;line-height:1;opacity:.8;transition:all .3s;color:var(--editify-font-color);border-radius:2px;padding:2px;margin-left:15px}.editify-attachment .editify-attachment-upload .editify-attachment-btn[data-v-cd9a7fcb]:hover{cursor:pointer;opacity:1}.editify-attachment .editify-attachment-upload .editify-attachment-btn input[type=file][data-v-cd9a7fcb]{display:none}.editify-menu[data-v-ab624210]{display:flex;justify-content:flex-start;flex-wrap:wrap;width:100%;background-color:var(--editify-background);position:relative}.editify-menu[data-editify-mode=default][data-v-ab624210]{margin-bottom:10px;padding:6px 10px}.editify-menu[data-editify-mode=default].editify-border[data-v-ab624210]{border:1px solid var(--editify-border-color);border-radius:4px}.editify-menu[data-editify-mode=default].editify-fullscreen[data-v-ab624210]{border-bottom:1px solid var(--editify-border-color)}.editify-menu[data-editify-mode=inner][data-v-ab624210]{padding:10px;margin-bottom:-20px}.editify-menu[data-editify-mode=inner].editify-border[data-v-ab624210]{border:1px solid var(--editify-border-color);border-bottom:none;border-radius:4px 4px 0 0;transition:all .3s}.editify-menu[data-editify-mode=inner][data-v-ab624210]:not(.editify-source):before{position:absolute;content:"";width:calc(100% - 20px);height:1px;background-color:var(--editify-border-color);left:50%;transform:translate(-50%);bottom:0}.editify-menu[data-editify-mode=fixed][data-v-ab624210]{padding:6px 10px;position:fixed;left:0;top:0;width:100%;border-bottom:1px solid var(--editify-border-color);box-shadow:0 0 8px #0000001a}.editify[data-v-c01a8e33]{display:flex;justify-content:flex-start;flex-direction:column;width:100%;height:100%;position:relative;box-sizing:border-box;-webkit-tap-highlight-color:transparent;outline:none;font-family:PingFang SC,Helvetica Neue,Helvetica,Roboto,Segoe UI,Microsoft YaHei,Arial,sans-serif;line-height:1.5}.editify[data-v-c01a8e33] *,.editify[data-v-c01a8e33] *:before,.editify[data-v-c01a8e33] *:after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;outline:none}.editify.editify-fullscreen[data-v-c01a8e33]{position:fixed;left:0;top:0;width:100vw!important;height:100vh!important;background:var(--editify-background)}.editify.editify-fullscreen .editify-body[data-v-c01a8e33]{border-radius:0}.editify.editify-autoheight[data-v-c01a8e33]{height:auto}.editify.editify-autoheight .editify-body[data-v-c01a8e33]{height:auto;flex:none}.editify-body[data-v-c01a8e33]{display:block;width:100%;height:0;flex:1;position:relative;background-color:var(--editify-background);padding:1px;border-radius:4px}.editify-body.editify-border[data-v-c01a8e33]{border:1px solid var(--editify-border-color);transition:all .3s}.editify-body.editify-border.editify-menu_inner[data-v-c01a8e33]{border-top:none;border-radius:0 0 4px 4px}.editify-body.editify-menu_inner[data-v-c01a8e33]{padding-top:21px}.editify-body.editify-menu_inner .editify-sourceview[data-v-c01a8e33]{top:21px;height:calc(100% - 21px)}.editify-body .editify-content[data-v-c01a8e33]{display:block;overflow-x:hidden;overflow-y:auto;width:100%;height:100%;border-radius:inherit;padding:6px 10px;color:var(--editify-font-color-dark);font-size:var(--editify-font-size);position:relative;line-height:1.5;overflow-wrap:break-word}.editify-body .editify-content.editify-placeholder[data-v-c01a8e33]:before{position:absolute;top:0;left:0;display:block;width:100%;content:attr(data-editify-placeholder);font-size:inherit;font-family:inherit;color:var(--editify-font-color-disabled);line-height:inherit;padding:6px 10px;cursor:text;touch-action:none;-webkit-user-select:none;user-select:none}.editify-body .editify-content[data-v-c01a8e33] p,.editify-body .editify-content[data-v-c01a8e33] h1,.editify-body .editify-content[data-v-c01a8e33] h2,.editify-body .editify-content[data-v-c01a8e33] h3,.editify-body .editify-content[data-v-c01a8e33] h4,.editify-body .editify-content[data-v-c01a8e33] h5,.editify-body .editify-content[data-v-c01a8e33] h6{display:block;width:100%;margin:0 0 15px;padding:0}.editify-body .editify-content[data-v-c01a8e33] h1{font-size:32px}.editify-body .editify-content[data-v-c01a8e33] h2{font-size:28px}.editify-body .editify-content[data-v-c01a8e33] h3{font-size:24px}.editify-body .editify-content[data-v-c01a8e33] h4{font-size:20px}.editify-body .editify-content[data-v-c01a8e33] h5{font-size:18px}.editify-body .editify-content[data-v-c01a8e33] h6{font-size:16px}.editify-body .editify-content[data-v-c01a8e33] :not(div[data-editify-list=ol])+div[data-editify-list=ol]{counter-reset:item 0}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol]{margin-bottom:15px}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol]:first-of-type{counter-reset:item 0}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol]:before{counter-increment:item;content:counter(item) ".";margin-right:10px}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=decimal]:before{content:counter(item,decimal) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=decimal-leading-zero]:before{content:counter(item,decimal-leading-zero) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=lower-roman]:before{content:counter(item,lower-roman) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=upper-roman]:before{content:counter(item,upper-roman) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=lower-alpha]:before{content:counter(item,lower-alpha) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=upper-alpha]:before{content:counter(item,upper-alpha) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=lower-greek]:before{content:counter(item,lower-greek) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ol][data-editify-list-style=cjk-ideographic]:before{content:counter(item,cjk-ideographic) "."}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ul]{margin-bottom:15px}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ul]:before{content:counter(item,disc);margin-right:10px}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ul][data-editify-list-style=disc]:before{content:counter(item,disc)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ul][data-editify-list-style=circle]:before{content:counter(item,circle)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-list=ul][data-editify-list-style=square]:before{content:counter(item,square)}.editify-body .editify-content[data-v-c01a8e33] [data-editify-code]{display:inline-block;padding:3px 6px;margin:0 4px;border-radius:4px;line-height:1;font-family:Consolas,monospace,Monaco,Andale Mono,Ubuntu Mono;background-color:var(--editify-pre-background);color:var(--editify-font-color);border:1px solid var(--editify-border-color);text-indent:initial;font-size:var(--editify-font-size);font-weight:400}.editify-body .editify-content[data-v-c01a8e33] a{color:var(--editify-font-color-link);transition:all .3s;text-decoration:none;cursor:text}.editify-body .editify-content[data-v-c01a8e33] a:hover{color:var(--editify-font-color-link-dark);text-decoration:underline}.editify-body .editify-content[data-v-c01a8e33] table{width:100%;border:1px solid var(--editify-border-color);margin:0 0 15px;padding:0;border-collapse:collapse;background-color:var(--editify-background);color:var(--editify-font-color-dark);font-size:var(--editify-font-size)}.editify-body .editify-content[data-v-c01a8e33] table *{margin:0!important}.editify-body .editify-content[data-v-c01a8e33] table tbody,.editify-body .editify-content[data-v-c01a8e33] table tbody tr{margin:0;padding:0}.editify-body .editify-content[data-v-c01a8e33] table tbody tr:first-child{background-color:var(--editify-background-darker)}.editify-body .editify-content[data-v-c01a8e33] table tbody tr:first-child td{font-weight:700;position:relative}.editify-body .editify-content[data-v-c01a8e33] table tbody tr td{margin:0;border:1px solid var(--editify-border-color);padding:6px 10px;position:relative;white-space:pre-wrap;word-break:break-word}.editify-body .editify-content[data-v-c01a8e33] table tbody tr td:not(:last-child):after{position:absolute;right:-5px;top:0;width:10px;height:100%;content:"";z-index:1;cursor:col-resize;-webkit-user-select:none;user-select:none}.editify-body .editify-content[data-v-c01a8e33] table tbody tr td[data-editify-merged]{display:none}.editify-body .editify-content[data-v-c01a8e33] pre{display:block;padding:6px 10px;margin:0 0 15px;font-family:Consolas,monospace,Monaco,Andale Mono,Ubuntu Mono;line-height:1.5;font-size:var(--editify-font-size);color:var(--editify-font-color-dark);background-color:var(--editify-pre-background);border:1px solid var(--editify-border-color);border-radius:4px;overflow:auto;position:relative;transition:all .3s}.editify-body .editify-content[data-v-c01a8e33] img{position:relative;display:inline-block;width:30%;height:auto;border-radius:2px;vertical-align:text-bottom;margin:0;max-width:100%;min-width:100px}.editify-body .editify-content[data-v-c01a8e33] video{position:relative;display:inline-block;width:30%;border-radius:2px;vertical-align:text-bottom;background-color:var(--editify-video-background);object-fit:contain;margin:0;max-width:100%;min-width:100px}.editify-body .editify-content[data-v-c01a8e33] blockquote{display:block;border-left:8px solid var(--editify-background-darker);padding:6px 10px 6px 20px;margin:0 0 15px;line-height:1.5;font-size:var(--editify-font-size);color:var(--editify-font-color-light);border-radius:0}.editify-body .editify-content[data-v-c01a8e33] hr{display:block;width:100%;height:1px;background-color:var(--editify-font-color-disabled);border:none;margin:10px 0}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task]{margin-bottom:15px;position:relative;padding-left:26px;font-size:var(--editify-font-size);color:var(--editify-font-color-dark)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task]:before{display:block;width:14px;height:14px;border-radius:2px;border:1px solid var(--editify-font-color-light);box-sizing:border-box;-webkit-user-select:none;user-select:none;content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);z-index:1;cursor:pointer}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task]:after{display:inline-block;width:10px;height:5px;position:absolute;content:"";left:2px;top:50%;margin-top:-1px;border:2px solid transparent;border-top:none;border-right:none;transform:translateY(-50%) rotate(-45deg);transform-origin:center;z-index:2;cursor:pointer}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task][data-editify-task=checked]{text-decoration:line-through;color:var(--editify-font-color-light)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task][data-editify-task=checked]:before{background-color:var(--editify-font-color-disabled);border-color:var(--editify-font-color-disabled)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-task][data-editify-task=checked]:after{border-color:#fff}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-attachment]{display:inline;color:var(--editify-font-color-link);transition:all .3s;position:relative;margin:0 10px;font-size:14px;vertical-align:baseline}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-attachment]:before{font-family:editify-icon!important;content:"";font-size:inherit}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-attachment]:after{content:attr(data-editify-attachment-name);margin-left:6px;font-size:inherit}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-attachment]:hover{color:var(--editify-font-color-link-dark);cursor:pointer}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-mathformula]{display:inline-block;border:1px dashed var(--editify-border-color);padding:6px 10px;border-radius:4px;margin:0 4px;transition:all .3s;max-width:100%}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-mathformula] .katex,.editify-body .editify-content[data-v-c01a8e33] span[data-editify-mathformula] math{width:100%;overflow:hidden}.editify-body .editify-content[data-v-c01a8e33] span[data-editify-mathformula]:hover{cursor:pointer;background:var(--editify-background-darker)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-info]{display:block;position:relative;width:100%;border-radius:4px;margin-bottom:15px;padding:10px 10px 10px 60px;font-size:var(--editify-font-size);background-color:var(--editify-background-darker);color:var(--editify-font-color-dark)}.editify-body .editify-content[data-v-c01a8e33] div[data-editify-info]:before{position:absolute;left:0;top:50%;height:100%;transform:translateY(-50%);display:flex;justify-content:center;align-items:center;content:"";font-family:editify-icon!important;font-size:1.25em;padding:0 20px}.editify-body .editify-content.editify-disabled[data-v-c01a8e33]{cursor:auto!important}.editify-body .editify-content.editify-disabled.editify-placeholder[data-v-c01a8e33]:before{cursor:auto}.editify-body .editify-content.editify-disabled[data-v-c01a8e33] a{cursor:pointer}.editify-body .editify-content.editify-disabled[data-v-c01a8e33] table td:not(:last-child):after{cursor:auto}.editify-body .editify-content.editify-disabled[data-v-c01a8e33] span[data-editify-mathformula]{display:inline-block;border:none;padding:6px 10px;border-radius:none;margin:0 4px}.editify-body .editify-content.editify-disabled[data-v-c01a8e33] span[data-editify-mathformula]:hover{cursor:auto;background:none}.editify-body .editify-sourceview[data-v-c01a8e33]{display:block;width:100%;height:100%;position:absolute;left:0;top:0;background-color:var(--editify-reverse-background);margin:0;padding:6px 10px;overflow-x:hidden;overflow-y:auto;font-size:var(--editify-font-size);color:var(--editify-reverse-color);font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;resize:none;border:none;border-radius:inherit;overflow-wrap:break-word;z-index:1}.editify-footer[data-v-c01a8e33]{display:flex;justify-content:end;align-items:center;width:100%;padding:10px;position:relative}.editify-footer .editify-footer-words[data-v-c01a8e33]{font-size:var(--editify-font-size);color:var(--editify-font-color-light);line-height:1}.editify-footer.editify-fullscreen[data-v-c01a8e33]{border-top:1px solid var(--editify-border-color)}')),document.head.appendChild(A)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();