vue-editify 0.1.47 → 0.1.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
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 r=Object.defineProperty,n=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);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 r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let r=0,n=e.toString(),a=t.toString();try{r+=n.split(".")[1].length}catch(o){}try{r+=a.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,r)})),divide:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=e.toString(),o=t.toString();try{r=a.split(".")[1].length}catch(i){}try{n=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,n-r)}))},o={insert(e,t,r){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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,r)+t+e.substring(r,e.length)},delete(e,t,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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+r,e.length)},replace(e,t,r,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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof n)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+n+e.substring(r,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let r=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(r=r.replace(/\s/g,"")),r}},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 r=e,n=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)n+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:n,left:a,right:t.offsetWidth-a-r.offsetWidth,bottom:t.offsetHeight-n-r.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,r=parseFloat(this.getCssStyle(e,"padding-left")),n=parseFloat(this.getCssStyle(e,"padding-right"));return a.subtract(t,r,n)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,r=parseFloat(this.getCssStyle(e,"padding-top")),n=parseFloat(this.getCssStyle(e,"padding-bottom"));return a.subtract(t,r,n)},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 r=e.classList;o.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;o.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;return o.trim(t).split(/\s+/).every((e=>r.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let r=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(r=e),"function"==typeof e&&(t=e);let n=!0;r.addEventListener("scroll",(()=>{if(this.getScrollTop(r)<=0){if(!n)return;"function"==typeof t&&(n=!1,t({state:"top",target:r}))}else{let e={state:"bottom",target:r},o=0;if(o=r==window?window.innerHeight:r.clientHeight,a.add(this.getScrollTop(r),o)+1>=this.getScrollHeight(r)&&o!=this.getScrollHeight(r)){if(!n)return;"function"==typeof t&&(n=!1,t(e))}else n=!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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,o=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollTop=document.body.scrollTop=n:r.scrollTop=n,e();else{let i=10,l=a.divide(o,i),s=this.getScrollTop(r),c=a.divide(a.subtract(n,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollTop=document.body.scrollTop=s=a.add(s,c):r.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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,o=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=n:r.scrollLeft=n,e();else{let i=10,l=a.divide(o,i),s=this.getScrollLeft(r),c=a.divide(a.subtract(n,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollLeft=document.body.scrollLeft=s=a.add(s,c):r.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 r="";return r=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],r},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",r="",n=o.trim(e,!0).substring(1,o.trim(e,!0).length-1).split("=");return 1==n.length&&(r=n[0]),2==n.length&&(r={attributeName:n[0],attributeValue:n[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:r}}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,t){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");let r=document.createElement(t||"div");return r.innerHTML=e,1==r.children.length?r.children[0]:Array.from(r.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 r=e[l]||{};null==t||""===t?e[l]={}:(delete r[t],e[l]=r)},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 r=e[l]||{};return null==t||""===t?r:r[t]},set(e,t,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(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let n=e[l]||{};n[t]=r,e[l]=n}},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 r=null;if("Chinese"==t&&(r=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(r=/[\u4e00-\u9fa5]/),"email"==t&&(r=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(r=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(r=/^\d+$/),"int-"==t&&(r=/^-\d+$/),"int"==t&&(r=/^-?\d+$/),"pos"==t&&(r=/^\d*\.?\d+$/),"neg"==t&&(r=/^-\d*\.?\d+$/),"number"==t&&(r=/^-?\d*\.?\d+$/),"phone"==t&&(r=/^1[0-9]\d{9}$/),"idCard"==t&&(r=/^[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&&(r=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(r=/^(?:(?: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&&(r=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(r=/^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&&(r=/^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&&(r=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(r=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(r=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!r)throw new Error("The second parameter is out of scope");return r.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=window.location.search.substr(1);if(!r){let e=window.location.hash.split("?");2==e.length&&(r=e[1])}let n=r.match(t);return n?decodeURIComponent(n[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 r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(r.length!=n.length)return!1;let a=r.length,o=!0;for(let i=0;i<a;i++){let n=r[i],a=e[n],l=t[n];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 r in e)t[r]=this.clone(e[r]);return t}return e}},d=e=>{let t=e.split(/[\s]+/g),r=[];return t.forEach((e=>{let t=e.split("."),n={eventName:t[0]};t.length>1&&(n.guid=t[1]),r.push(n)})),r},u=(e,t,r)=>{let n=s.get(e,"dap-defined-events")||{},a=Object.keys(n),o=a.length;for(let i=0;i<o;i++){let o=a[i];n[o].type==t&&(r?o==t+"."+r&&(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0):(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0))}n=(e=>{let t={};return Object.keys(e).forEach((r=>{e[r]&&(t[r]=e[r])})),t})(n),s.set(e,"dap-defined-events",n)},h={on(e,t,r,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(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!r||"function"!=typeof r)throw new TypeError("The third argument must be a function");c.isObject(n)||(n={});d(t).forEach((t=>{((e,t,r,n,a)=>{let o=s.get(e,"dap-defined-events")||{};r||(r=s.get(e,"dap-event-guid")||0,s.set(e,"dap-event-guid",r+1)),o[r=t+"."+r]&&o[r].type==t&&e.removeEventListener(t,o[r].fn,o[r].options),e.addEventListener(t,n,a),o[r]={type:t,fn:n,options:a},s.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,r.bind(e),n)}))},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 r=s.get(e,"dap-defined-events");if(!r)return;if(!t){let t=Object.keys(r),n=t.length;for(let a=0;a<n;a++){let n=t[a];e.removeEventListener(r[n].type,r[n].fn,r[n].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}},m={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,r)=>{e&&e instanceof File||r(new TypeError("The argument must be a File object"));let n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{let e=n.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 r=e.split(","),n=r[0].match(/:(.*?);/)[1],a=atob(r[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:n})},compressImage(e,t){const r={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};c.isObject(t)&&(a.isNumber(t.width)&&(r.width=t.width),a.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(r.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(r.mimeType=t.mimeType),a.isNumber(t.maxSize)&&(r.maxSize=t.maxSize),a.isNumber(t.minSize)&&(r.minSize=t.minSize));const n=(e,t,a)=>{let o=e.toDataURL("image/"+r.mimeType,a),i=this.dataBase64toFile(o,t);if(r.maxSize>0&&i.size>1024*r.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const r=n(e,t,a);o=r.url,i=r.file,a=r.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(r.minSize>0&&e.size<=1024*r.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=r.width||l.width,a.height=r.width?r.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)+"."+r.mimeType;let d=n(a,c,r.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")}}},g=function(e){return/^[\uFEFF]+$/g.test(e)},f=function(e){return c.isObject(e)||Array.isArray(e)?JSON.parse(JSON.stringify(e)):e},v=function(e,t){return 3==t.nodeType?i.isContains(e,t.parentNode):i.isContains(e,t)},b=class e{constructor(e,t,r,a,o){n(this,"key",function(){let e=s.get(window,"data-alex-editor-key")||0;return e++,s.set(window,"data-alex-editor-key",e),e}()),n(this,"type"),n(this,"parsedom"),n(this,"marks"),n(this,"styles"),n(this,"textContent"),n(this,"children",null),n(this,"parent",null),n(this,"behavior","default"),n(this,"namespace",null),n(this,"locked",!1),n(this,"elm",null),this.type=e,this.parsedom=t,this.marks=r,this.styles=a,this.textContent=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(){if(this.isText())return!this.textContent;if(this.isBlock()||this.isInblock()||this.isInline()){if(!this.hasChildren())return!0;return this.children.every((e=>e.isEmpty()))}return!1}isSpaceText(){return this.isText()&&!this.isEmpty()&&g(this.textContent)}getUneditableElement(){return this.hasMarks()&&"false"==this.marks.contenteditable?this:this.isBlock()?null:this.parent.getUneditableElement()}isEqual(t){return!!e.isElement(t)&&this.key==t.key}isContains(e){return!!this.isEqual(e)||!e.isBlock()&&this.isContains(e.parent)}isOnlyHasBreak(){if(this.hasChildren()){const e=this.children.some((e=>e.isBreak())),t=this.children.every((e=>e.isBreak()||e.isEmpty()));return e&&t}return!1}isPreStyle(){const e=this.getBlock(),t=this.getInblock();return t?"pre"==t.parsedom||(!(!t.hasStyles()||"pre"!=t.styles["white-space"]&&"pre-wrap"!=t.styles["white-space"])||t.parent.isPreStyle()):"pre"==e.parsedom||!(!e.hasStyles()||"pre"!=e.styles["white-space"]&&"pre-wrap"!=e.styles["white-space"])}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 r=new e(this.type,this.parsedom,f(this.marks),f(this.styles),this.textContent);return r.behavior=this.behavior,r.namespace=this.namespace,r.locked=this.locked,t&&this.hasChildren()&&this.children.forEach((e=>{let n=e.clone(t);r.hasChildren()?r.children.push(n):r.children=[n],n.parent=r})),r}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.isBlock()?this:this.parent.getBlock()}getInblock(){return this.isInblock()?this:this.isBlock()?null:this.parent.getInblock()}getInline(){return this.isInline()?this:this.isBlock()?null:this.parent.getInline()}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 r=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(r[0])}return!1}isLast(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const r=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed())),n=r.length;return this.isEqual(r[n-1])}return!1}__render(){let t=null;if(this.isText()){t=this.namespace?document.createElementNS(this.namespace,e.TEXT_NODE):document.createElement(e.TEXT_NODE);const r=document.createTextNode(this.textContent);t.appendChild(r)}else 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,f(this.marks),f(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()&&this.children.forEach((e=>{let r=e.__fullClone();t.hasChildren()?t.children.push(r):t.children=[r],r.parent=t})),t}static isElement(t){return t instanceof e}static flatElements(e){const t=e=>{let r=[];const n=e.length;for(let a=0;a<n;a++)if(e[a]&&(r.push(e[a]),e[a].hasChildren())){const n=t(e[a].children);r.push(...n)}return r};return t(e)}static getSpaceElement(){return new e("text",null,null,null,"\ufeff")}};n(b,"BLOCK_NODE","p"),n(b,"TEXT_NODE","span"),n(b,"VOID_NODES",["colgroup","col"]),n(b,"EMPTY_NODES",["meta","link","style","script","title","base","noscript","template","annotation"]);let y=b;class w{constructor(e,t){n(this,"anchor"),n(this,"focus"),this.anchor=e,this.focus=t}}class x{constructor(e,t){if(n(this,"element"),n(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))),r=t.length;if(0==r)throw new Error("There is no element to set the focus");this.moveToEnd(t[r-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(){n(this,"records",[]),n(this,"current",-1)}push(e,t){this.current<this.records.length-1&&(this.records.length=this.current+1);const r=e.map((e=>e.__fullClone())),n=this.__cloneRange(r,t);this.records.push({stack:r,range:n}),this.current+=1}get(e){let t=this.current;if(-1==e){if(t<=0)return null;t-=1}else if(1==e){if(t>=this.records.length-1)return null;t+=1}const{stack:r,range:n}=this.records[t],a=r.map((e=>e.__fullClone()));return{current:t,stack:a,range:this.__cloneRange(a,n)}}updateCurrentRange(e){const t=this.records[this.current],r=this.__cloneRange(t.stack,e);this.records[this.current].range=r}__cloneRange(e,t){if(t){const r=y.flatElements(e).find((e=>e.key==t.anchor.element.key)),n=y.flatElements(e).find((e=>e.key==t.focus.element.key));if(r&&n){const e=new x(r,t.anchor.offset),a=new x(n,t.focus.offset);return new w(e,a)}}return null}}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"}],B=[{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")}))}},_=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),r=t.filter((e=>e.isInblock()));r.length&&r.length!=t.length&&r.forEach((e=>{e.type="inline"}))}},N=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())),r=t.filter((e=>e.isBreak()));r.length&&r.length==t.length?(this.range&&e.isContains(this.range.anchor.element)&&this.range.anchor.moveToStart(r[0]),this.range&&e.isContains(this.range.focus.element)&&this.range.focus.moveToStart(r[0]),e.children=[r[0]]):r.length&&r.forEach((e=>{e.toEmpty()}))}},A=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 r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,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 r=e.parent.children.findIndex((t=>e.isEqual(t)));e.parent.children.splice(r,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 r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,1)}else if(e.isInline()){e.children.push(...t.children),e.children.forEach((t=>{t.parent=e})),r(e);const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}},r=e=>{if(e.hasChildren()&&e.children.length>1){let a=0;for(;a<=e.children.length-2;)r=e.children[a],n=e.children[a+1],r.locked||n.locked||!(r.isEmpty()||n.isEmpty()||(r.isText()&&n.isText()?r.isEqualStyles(n)&&r.isEqualMarks(n):r.isInline()&&n.isInline()&&r.parsedom==n.parsedom&&r.isEqualMarks(n)&&r.isEqualStyles(n)))?a++:t(e.children[a],e.children[a+1])}var r,n};r(e)},O=function(e){const t=(e,t)=>{t.isText()?(e.type="text",e.parsedom=null,t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,f(t.marks)):e.marks=f(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,f(t.styles)):e.styles=f(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,f(t.marks)):e.marks=f(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,f(t.styles)):e.styles=f(t.styles)),t.hasChildren()&&(e.children=[...t.children],e.children.forEach((t=>{t.parent=e}))),r(e))},r=e=>{var r,n;e.hasChildren()&&1==e.children.length&&e.children[0]&&(r=e,n=e.children[0],!r.locked&&!n.locked&&(n.isText()&&r.isInline()?r.parsedom==y.TEXT_NODE:(r.isInline()&&n.isInline()||r.isInblock()&&n.isInblock())&&r.parsedom==n.parsedom))&&t(e,e.children[0])};r(e)},R=function(e){if(e.isText()){let t=e.textContent,r=0;for(;r<t.length;){const n=t.charAt(r);g(n)&&r>0&&g(t.charAt(r-1))?(this.range&&this.range.anchor.element.isEqual(e)&&this.range.anchor.offset>=r+1&&(this.range.anchor.offset-=1),this.range&&this.range.focus.element.isEqual(e)&&this.range.focus.offset>=r+1&&(this.range.focus.offset-=1),t=o.delete(t,r,1)):r++}e.textContent=t}},{Mac:z}=p.os(),I=function(e,t){let r="",n="";return t.forEach((e=>{const t=e.element.clone();e.offset&&(t.textContent=t.textContent.substring(e.offset[0],e.offset[1])),t.__render(),r+=t.elm.outerHTML,n+=t.elm.innerText})),e.setData("text/plain",n),e.setData("text/html",r),{html:r,text:n}},L=async function(e,t,r){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{for(let e=0;e<t.length;e++)0==e?this.insertElement(t[e]):this.insertElement(t[e],!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=r.length;for(let t=0;t<e;t++)if(r[t].type.startsWith("image/"))if("function"==typeof this.customImagePaste)await this.customImagePaste.apply(this,[r[t]]);else{const e=await m.dataFileToBase64(r[t]),n=new y("closed","img",{src:e},null,null);this.insertElement(n),this.emit("pasteImage",e)}else if(r[t].type.startsWith("video/"))if("function"==typeof this.customVideoPaste)await this.customVideoPaste.apply(this,[r[t]]);else{const e=await m.dataFileToBase64(r[t]),n=new y("closed","video",{src:e},null,null);this.insertElement(n),this.emit("pasteVideo",e)}else"function"==typeof this.customFilePaste&&await this.customFilePaste.apply(this,[r[t]])}},D=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]}},F=function(e){const t=this.getPreviousElementOfPoint(e),r=this.getNextElementOfPoint(e),n=e.element.getBlock(),a=e.element.getInblock();t&&a&&a.isContains(t)?e.moveToEnd(t):r&&a&&a.isContains(r)?e.moveToStart(r):t&&n.isContains(t)?e.moveToEnd(t):r&&n.isContains(r)?e.moveToStart(r):t?e.moveToEnd(t):r&&e.moveToStart(r)},P=function(e){e.isInblock()&&"default"==e.behavior&&e.hasChildren()&&e.children.forEach((e=>{if(e.isInblock())P.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),r=i.getScrollWidth(e);if(e.clientHeight<t||e.clientWidth<r){const n=window.getSelection();if(0==n.rangeCount)return;const a=n.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(),r=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.top-r.top})}else if(s.bottom>c.bottom){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.bottom-r.bottom})}if(e.clientWidth<r)if(s.left<c.left){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.left-r.left+20})}else if(s.right>c.right){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.right-r.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(){if(this.__isInputChinese)return;if(this.__innerSelectionChange)return;const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0);if(v(this.$el,t.startContainer)&&v(this.$el,t.endContainer)){let e=null,r=null,n=null,a=null;if(3==t.startContainer.nodeType)e=t.startContainer.parentNode,n=t.startOffset;else if(1==t.startContainer.nodeType){const r=Array.from(t.startContainer.childNodes);r.length?(e=r[t.startOffset]?r[t.startOffset]:r[t.startOffset-1],n=r[t.startOffset]?0:1,3==e.nodeType&&(n=0==n?0:e.textContent.length,e=e.parentNode)):(e=t.startContainer,n=0)}if(3==t.endContainer.nodeType)r=t.endContainer.parentNode,a=t.endOffset;else if(1==t.endContainer.nodeType){const e=Array.from(t.endContainer.childNodes);e.length?(r=e[t.endOffset]?e[t.endOffset]:e[t.endOffset-1],a=e[t.endOffset]?0:1,3==r.nodeType&&(a=0==a?0:r.textContent.length,r=r.parentNode)):(r=t.endContainer,a=1)}const o=s.get(e,"data-alex-editor-key"),i=s.get(r,"data-alex-editor-key"),l=this.getElementByKey(o),c=this.getElementByKey(i),d=new x(l,n),u=new x(c,a);this.range?(this.range.anchor=d,this.range.focus=u):this.range=new w(d,u),this.history.updateCurrentRange(this.range),this.emit("rangeUpdate",this.range)}}},$=function(e){const t=e;this.disabled||"deleteByCut"!=t.inputType&&"insertFromPaste"!=t.inputType&&"deleteByDrag"!=t.inputType&&"insertFromDrop"!=t.inputType&&(t.preventDefault(),"insertText"==t.inputType&&t.data?(this.insertText(t.data),this.formatElementStack(),this.domRender(),this.rangeRender()):"insertParagraph"==t.inputType||"insertLineBreak"==t.inputType?(this.insertParagraph(),this.formatElementStack(),this.domRender(),this.rangeRender()):"deleteContentBackward"==t.inputType&&(this.delete(),this.formatElementStack(),this.domRender(),this.rangeRender()))},U=function(e){if(this.disabled)return;const t=e;t.preventDefault(),"compositionstart"==t.type?(this.__chineseInputTimer&&(clearTimeout(this.__chineseInputTimer),this.__chineseInputTimer=null),this.__isInputChinese=!0):"compositionend"==t.type&&(t.data&&(this.insertText(t.data),this.formatElementStack(),this.domRender(),this.rangeRender()),this.__chineseInputTimer=setTimeout((()=>{this.__isInputChinese=!1}),0))},j=function(e){if(this.disabled)return;if(this.__isInputChinese)return;const t=e;if("keydown"==t.type){if(function(e){return z?"z"==e.key&&e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:"z"==e.key&&e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}(t)){t.preventDefault();const e=this.history.get(-1);e&&(this.history.current=e.current,this.stack=e.stack,this.range=e.range,this.formatElementStack(),this.domRender(!0),this.rangeRender())}else if(function(e){return z?"z"==e.key&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey:"z"==e.key&&e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}(t)){t.preventDefault();const e=this.history.get(1);e&&(this.history.current=e.current,this.stack=e.stack,this.range=e.range,this.formatElementStack(),this.domRender(!0),this.rangeRender())}this.emit("keydown",this.value,t)}else"keyup"==t.type&&this.emit("keyup",this.value,t)},W=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCopy)return;const r=this.getElementsByRange().list;if(t.clipboardData&&r.length){const{text:e,html:n}=I.apply(this,[t.clipboardData,r]);this.emit("copy",e,n)}},K=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCut)return;const r=this.getElementsByRange().list;if(t.clipboardData&&r.length){const{text:e,html:n}=I.apply(this,[t.clipboardData,r]);this.disabled||(this.delete(),this.formatElementStack(),this.domRender(),this.rangeRender()),this.emit("cut",e,n)}},G=async function(e){const t=e;if(t.preventDefault(),!this.disabled&&this.range&&this.allowPaste&&t.clipboardData){const e=t.clipboardData.getData("text/html"),r=t.clipboardData.getData("text/plain"),n=t.clipboardData.files;await L.apply(this,[e,r,n]),this.formatElementStack(),this.domRender(),this.rangeRender()}},Z=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"),r=t.dataTransfer.getData("text/plain"),n=t.dataTransfer.files;await L.apply(this,[e,r,n]),this.formatElementStack(),this.domRender(),this.rangeRender()}}},X=function(e){this.disabled||this.emit("focus",this.value,e)},Y=function(e){this.disabled||this.emit("blur",this.value,e)};class Q{constructor(e,t){n(this,"$el"),n(this,"disabled"),n(this,"value"),n(this,"renderRules"),n(this,"allowCopy"),n(this,"allowPaste"),n(this,"allowCut"),n(this,"allowPasteHtml"),n(this,"customTextPaste"),n(this,"customHtmlPaste"),n(this,"customImagePaste"),n(this,"customVideoPaste"),n(this,"customFilePaste"),n(this,"customMerge"),n(this,"customParseNode"),n(this,"extraKeepTags"),n(this,"history",new k),n(this,"stack"),n(this,"range",null),n(this,"__guid",function(){let e=s.get(window,"data-alex-editor-guid")||0;return e++,s.set(window,"data-alex-editor-guid",e),e}()),n(this,"__events",{}),n(this,"__firstRender",!0),n(this,"__isInputChinese",!1),n(this,"__innerSelectionChange",!1),n(this,"__chineseInputTimer",null),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 r=function(e){let t={disabled:!1,renderRules:[],value:"",allowCopy:!0,allowPaste:!0,allowCut:!0,allowPasteHtml:!1,customTextPaste:null,customHtmlPaste:null,customImagePaste:null,customVideoPaste:null,customFilePaste:null,customMerge:null,customParseNode:null,extraKeepTags:[]};return c.isObject(e)&&("boolean"==typeof e.disabled&&(t.disabled=e.disabled),Array.isArray(e.renderRules)&&(t.renderRules=e.renderRules),"string"==typeof e.value&&e.value&&(t.value=e.value),"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),"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),Array.isArray(e.extraKeepTags)&&(t.extraKeepTags=e.extraKeepTags)),t}(t);this.disabled=r.disabled,this.value=r.value,this.renderRules=r.renderRules,this.allowCopy=r.allowCopy,this.allowPaste=r.allowPaste,this.allowCut=r.allowCut,this.allowPasteHtml=r.allowPasteHtml,this.customTextPaste=r.customTextPaste,this.customHtmlPaste=r.customHtmlPaste,this.customImagePaste=r.customImagePaste,this.customVideoPaste=r.customVideoPaste,this.customFilePaste=r.customFilePaste,this.customMerge=r.customMerge,this.customParseNode=r.customParseNode,this.extraKeepTags=r.extraKeepTags,this.stack=this.parseHtml(this.value),D.apply(this),this.disabled?this.setDisabled():this.setEnabled(),h.on(document,`selectionchange.alex_editor_${this.__guid}`,V.bind(this)),h.on(this.$el,"beforeinput.alex_editor",$.bind(this)),h.on(this.$el,"compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor",U.bind(this)),h.on(this.$el,"keydown.alex_editor keyup.alex_editor",j.bind(this)),h.on(this.$el,"cut.alex_editor",K.bind(this)),h.on(this.$el,"paste.alex_editor",G.bind(this)),h.on(this.$el,"copy.alex_editor",W.bind(this)),h.on(this.$el,"dragstart.alex_editor drop.alex_editor",Z.bind(this)),h.on(this.$el,"focus.alex_editor",X.bind(this)),h.on(this.$el,"blur.alex_editor",Y.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),r=new x(e,0);this.range=new w(t,r)}delete(){if(!this.disabled&&this.range){if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.range.anchor.element.getBlock(),r=this.range.anchor.element.getInblock();if(r)if(0==this.range.anchor.offset)if(e){if(r.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();if("block"==r.behavior){const t=e.getBlock(),n=e.getInblock();n?"block"==n.behavior&&this.merge(r,n):this.merge(r,t)}}else this.emit("deleteInStart",r);else if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),!r.isEmpty())return this.range.anchor.offset=0,this.range.focus.offset=0,void this.delete();{const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const t=g(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(r.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const t=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),r.isEmpty())if(t&&"default"!=r.behavior){if(!e){const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}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 r=e.getInblock(),n=e.getBlock();r?"block"==r.behavior&&this.merge(t,r):this.merge(t,n)}}else this.emit("deleteInStart",t);else if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),!t.isEmpty())return this.range.anchor.offset=0,this.range.focus.offset=0,void this.delete();{const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const r=g(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,r)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 r=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),t.isEmpty()&&(!r||!e)){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 e=this.getElementsByRange().list.filter((e=>!y.VOID_NODES.includes(e.element.parsedom))),t=this.range.anchor.element.getInblock(),r=this.range.focus.element.getInblock(),n=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock();t&&r&&t.isEqual(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]):e.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t)}})):t&&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)P.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"==t.behavior&&"block"==r.behavior&&this.merge(r,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)P.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"==t.behavior&&this.merge(a,t)):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)P.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"==r.behavior&&this.merge(r,n)):n.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(),n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,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)P.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,n))}this.range.anchor.element.isEmpty()&&F.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.disabled&&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+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.disabled&&this.range)if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.getNextElementOfPoint(this.range.anchor),r=this.range.anchor.element.getBlock(),n=this.range.anchor.element.getInblock(),a=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(n){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("block"==n.behavior)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)));this.range.focus.moveToEnd(n),this.delete();const r=y.flatElements(e.children);this.range.focus.element=r[t],this.range.focus.offset=this.range.anchor.offset,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 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(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))),n=this.range.anchor.offset;this.range.focus.moveToEnd(r),this.delete();const a=y.flatElements(e.children);this.range.focus.element=a[t],this.range.focus.offset=n,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 this.delete(),this.insertParagraph()}insertElement(e,t=!0){if(!this.disabled&&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 r=this.getPreviousElementOfPoint(this.range.anchor),n=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||r&&o.isContains(r))if(this.range.anchor.offset!=i||n&&o.isContains(n)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const r=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&o.isContains(r))if(this.range.anchor.offset!=i||n&&o.isContains(n)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const r=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&a.isContains(r))if(this.range.anchor.offset!=i||n&&a.isContains(n)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const r=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&a.isContains(r))if(this.range.anchor.offset!=i||n&&a.isContains(n)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const r=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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,r=this.range.anchor.element.clone();this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset),r.textContent=t.substring(this.range.anchor.offset),this.addElementAfter(r,this.range.anchor.element),this.addElementBefore(e,r)}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)}}formatElementStack(){const e=(t,r,n)=>{"boolean"!=typeof n&&(n=!1);let a=0;for(;a<t.length;)t[a]?t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&F.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&F.apply(this,[this.range.focus]),t.splice(a,1)):(r.apply(this,[t[a]]),t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&F.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&F.apply(this,[this.range.focus]),t.splice(a,1)):(!t[a].isBlock()&&n&&t[a].convertToBlock(),t[a].hasChildren()&&e(t[a].children,r),t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&F.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&F.apply(this,[this.range.focus]),t.splice(a,1)):a++)):t.splice(a,1)};let t=this.renderRules.filter((e=>"function"==typeof e));[C,_,N,M,O,A,O,R,...t].forEach((t=>{e(this.stack,t,!0)})),H.apply(this)}domRender(e=!1){this.emit("beforeRender");const t=document.createDocumentFragment();this.stack.forEach((e=>{e.__render(),t.appendChild(e.elm)})),this.$el.innerHTML="",this.$el.appendChild(t);const r=this.value;this.value=this.$el.innerHTML,(this.__firstRender||r!=this.value)&&(this.__firstRender||this.emit("change",this.value,r),e||this.history.push(this.stack,this.range)),this.__firstRender&&(this.__firstRender=!1),this.emit("afterRender")}rangeRender(){return new Promise((e=>{if(this.disabled)e();else{if(this.range){const e=e=>{let t=null,r=null;if(e.element.isText())t=e.element.elm.childNodes[0],r=e.offset;else{t=e.element.parent.elm;const n=e.element.parent.children.findIndex((t=>e.element.isEqual(t)));r=e.offset+n}return{node:t,offset:r}};this.__innerSelectionChange=!0;const t=e(this.range.anchor),r=e(this.range.focus),n=window.getSelection();if(n){n.removeAllRanges();const e=document.createRange();e.setStart(t.node,t.offset),e.setEnd(r.node,r.offset),n.addRange(e)}}else{const e=window.getSelection();e&&e.removeAllRanges()}setTimeout((()=>{q.apply(this),this.__innerSelectionChange=!1,this.history.updateCurrentRange(this.range),this.emit("rangeUpdate",this.range),e()}),0)}}))}parseHtml(e){if(!e)throw new Error("You need to give an html content to convert");const t=document.createElement("div");t.innerHTML=e;let r=[];return Array.from(t.childNodes).forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);r.push(t)}})),r}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 r=e.attributes.length;for(let n=0;n<r;n++){const r=e.attributes[n];/(^on)|(^style$)|(^face$)/g.test(r.nodeName)||(t[r.nodeName]=r.nodeValue)}return t}(e),r=function(e){let t={};const r=e.getAttribute("style");if(r){let e=0,n=0,a=[];for(;e<r.length;)";"==r[e]&&"base64,"!=r.substring(e+1,e+8)&&(a.push(r.substring(n,e)),n=e+1),e==r.length-1&&n<e&&a.push(r.substring(n,e)),e++;a.forEach((e=>{const r=e.indexOf(":"),n=e.substring(0,r).trim(),a=e.substring(r+1).trim();t[n]=a}))}return t}(e),n=e.nodeName.toLocaleLowerCase(),a=e.namespaceURI;if(y.EMPTY_NODES.includes(n))return new y("text",null,null,null,null);if(n==y.TEXT_NODE&&e.childNodes.length&&Array.from(e.childNodes).every((e=>3==e.nodeType)))return new y("text",null,t,r,e.textContent);const o=E.find((e=>e.parsedom==n)),i=T.find((e=>e.parsedom==n)),l=B.find((e=>e.parsedom==n)),s=S.find((e=>e.parsedom==n));let d=null,u={type:"inline",parsedom:n,marks:t,styles:r,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 r in t)"function"==typeof t[r]?u.styles[r]=t[r].apply(this,[e]):u.styles[r]=t[r]}}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");const t=r=>{let n=null;const a=r.length;for(let o=0;o<a;o++){const a=r[o];if(a&&a.key===e){n=a;break}if(a&&a.hasChildren()){const e=t(a.children);if(e){n=e;break}}}return n};return t(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 r=null;for(let n=e.length-1;n>=0;n--){const a=e[n];if(!a.isEmpty()){if(a.isText()||a.isClosed()){r=a;break}if(r=t(a.children),r)break}}return r},r=e=>{const n=this.getPreviousElement(e);return n?n.isEmpty()?r(n):n.isText()||n.isClosed()?n:t(n.children):e.parent?r(e.parent):null};return r(e.element)}getNextElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let r=null;const n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!n.isEmpty()&&(n.isText()||!y.VOID_NODES.includes(n.parsedom))){if(n.isText()||n.isClosed()){r=n;break}if(r=t(n.children),r)break}}return r},r=e=>{const n=this.getNextElement(e);return n?n.isEmpty()||!n.isText()&&y.VOID_NODES.includes(n.parsedom)?r(n):n.isText()||n.isClosed()?n:t(n.children):e.parent?r(e.parent):null};return r(e.element)}getElementsByRange(){if(!this.range)return{list:[],flatList:[]};if(this.range.anchor.isEqual(this.range.focus))return{list:[],flatList:[]};const e=(()=>{let e=[];const t=0==this.range.anchor.offset,r=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),n=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock(),o=this.stack.findIndex((e=>n.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)));if((c>0||d<l.length-1)&&(l=l.slice(c,d+1)),this.range.anchor.element.isEqual(this.range.focus.element))e=t&&r?l.map((e=>({element:e,offset:!1}))):[{element:this.range.anchor.element,offset:[this.range.anchor.offset,this.range.focus.offset]}];else{const n=l.length;for(let a=0;a<n;a++)if(this.range.anchor.element.isEqual(l[a]))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[a].isContains(this.range.anchor.element)){const n=this.range.anchor.element.isFirst(l[a]),o=l[a].isContains(this.range.focus.element),i=this.range.focus.element.isLast(l[a]);(t&&n&&o&&i&&r||t&&n&&!o)&&e.push({element:l[a],offset:!1})}else if(this.range.focus.element.isEqual(l[a]))r?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[a].isContains(this.range.focus.element)){this.range.focus.element.isLast(l[a])&&r&&e.push({element:l[a],offset:!1})}else e.push({element:l[a],offset:!1})}return e})();return{list:(e=>{let t=[],r=[],n=[];const a=e.length;for(let o=0;o<a;o++)if(e[o].element.isBlock())t.push(e[o]),r.push(e[o].element);else{const a=e[o].element.getBlock();let i=!1;for(let e=r.length-1;e>=0;e--)if(r[e].isEqual(a)){i=!0;break}if(!i){n.some((t=>t.isContains(e[o].element)))||(t.push(e[o]),(e[o].element.isInblock()||e[o].element.isInline())&&n.push(e[o].element))}}return t})(e),flatList:e}}addElementTo(e,t,r=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 r||isNaN(r)||r<0)throw new Error("The third argument must be an integer not less than 0");t.hasChildren()?r>=t.children.length?t.children.push(e):t.children.splice(r,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 r=this.stack.findIndex((e=>t.isEqual(e)));this.stack.splice(r,0,e),e.parent=null}else{const r=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,r)}}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 r=this.stack.findIndex((e=>t.isEqual(e)));r>=this.stack.length-1?this.stack.push(e):this.stack.splice(r+1,0,e),e.parent=null}else{const r=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,r+1)}}collapseToStart(e){if(this.disabled)return;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.updateCurrentRange(this.range)}collapseToEnd(e){if(this.disabled)return;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.updateCurrentRange(this.range)}setDisabled(){this.disabled=!0,this.$el.removeAttribute("contenteditable")}setEnabled(){this.disabled=!1,this.$el.setAttribute("contenteditable","true")}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)}destroy(){this.setDisabled(),h.off(document,`selectionchange.alex_editor_${this.__guid}`),h.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.9 ","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 J={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 r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let r=0,n=e.toString(),a=t.toString();try{r+=n.split(".")[1].length}catch(o){}try{r+=a.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,r)})),divide:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=e.toString(),o=t.toString();try{r=a.split(".")[1].length}catch(i){}try{n=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,n-r)}))},ee={insert(e,t,r){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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,r)+t+e.substring(r,e.length)},delete(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!J.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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+r,e.length)},replace(e,t,r,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!J.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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof n)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+n+e.substring(r,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let r=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(r=r.replace(/\s/g,"")),r}},te={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 r=e,n=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)n+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:n,left:a,right:t.offsetWidth-a-r.offsetWidth,bottom:t.offsetHeight-n-r.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(!J.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return J.mutiply(e,parseFloat(t))},px2rem(e){if(!J.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return J.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,r=parseFloat(this.getCssStyle(e,"padding-left")),n=parseFloat(this.getCssStyle(e,"padding-right"));return J.subtract(t,r,n)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,r=parseFloat(this.getCssStyle(e,"padding-top")),n=parseFloat(this.getCssStyle(e,"padding-bottom"));return J.subtract(t,r,n)},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 r=e.classList;ee.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;ee.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;return ee.trim(t).split(/\s+/).every((e=>r.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let r=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(r=e),"function"==typeof e&&(t=e);let n=!0;r.addEventListener("scroll",(()=>{if(this.getScrollTop(r)<=0){if(!n)return;"function"==typeof t&&(n=!1,t({state:"top",target:r}))}else{let e={state:"bottom",target:r},a=0;if(a=r==window?window.innerHeight:r.clientHeight,J.add(this.getScrollTop(r),a)+1>=this.getScrollHeight(r)&&a!=this.getScrollHeight(r)){if(!n)return;"function"==typeof t&&(n=!1,t(e))}else n=!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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,a=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollTop=document.body.scrollTop=n:r.scrollTop=n,e();else{let o=10,i=J.divide(a,o),l=this.getScrollTop(r),s=J.divide(J.subtract(n,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollTop=document.body.scrollTop=l=J.add(l,s):r.scrollTop=l=J.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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,a=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=n:r.scrollLeft=n,e();else{let o=10,i=J.divide(a,o),l=this.getScrollLeft(r),s=J.divide(J.subtract(n,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollLeft=document.body.scrollLeft=l=J.add(l,s):r.scrollLeft=l=J.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 r="";return r=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],r},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",r="",n=ee.trim(e,!0).substring(1,ee.trim(e,!0).length-1).split("=");return 1==n.length&&(r=n[0]),2==n.length&&(r={attributeName:n[0],attributeValue:n[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:r}}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:J.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:J.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e,t){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");let r=document.createElement(t||"div");return r.innerHTML=e,1==r.children.length?r.children[0]:Array.from(r.children)}},re="_dap-datas",ne={remove(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=e[re]||{};null==t||""===t?e[re]={}:(delete r[t],e[re]=r)},has(e,t){if(!(e instanceof Document||te.isElement(e)||te.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[re]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=e[re]||{};return null==t||""===t?r:r[t]},set(e,t,r){if(!(e instanceof Document||te.isElement(e)||te.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 n=e[re]||{};n[t]=r,e[re]=n}},ae={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 r=null;if("Chinese"==t&&(r=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(r=/[\u4e00-\u9fa5]/),"email"==t&&(r=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(r=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(r=/^\d+$/),"int-"==t&&(r=/^-\d+$/),"int"==t&&(r=/^-?\d+$/),"pos"==t&&(r=/^\d*\.?\d+$/),"neg"==t&&(r=/^-\d*\.?\d+$/),"number"==t&&(r=/^-?\d*\.?\d+$/),"phone"==t&&(r=/^1[0-9]\d{9}$/),"idCard"==t&&(r=/^[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&&(r=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(r=/^(?:(?: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&&(r=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(r=/^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&&(r=/^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&&(r=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(r=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(r=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!r)throw new Error("The second parameter is out of scope");return r.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=window.location.search.substr(1);if(!r){let e=window.location.hash.split("?");2==e.length&&(r=e[1])}let n=r.match(t);return n?decodeURIComponent(n[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 r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(r.length!=n.length)return!1;let a=r.length,o=!0;for(let i=0;i<a;i++){let n=r[i],a=e[n],l=t[n];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 r in e)t[r]=this.clone(e[r]);return t}return e}},oe=e=>{let t=e.split(/[\s]+/g),r=[];return t.forEach((e=>{let t=e.split("."),n={eventName:t[0]};t.length>1&&(n.guid=t[1]),r.push(n)})),r},ie=(e,t,r)=>{let n=ne.get(e,"dap-defined-events")||{},a=Object.keys(n),o=a.length;for(let i=0;i<o;i++){let o=a[i];n[o].type==t&&(r?o==t+"."+r&&(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0):(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0))}n=(e=>{let t={};return Object.keys(e).forEach((r=>{e[r]&&(t[r]=e[r])})),t})(n),ne.set(e,"dap-defined-events",n)},le={on(e,t,r,n){if(!(e instanceof Document||te.isElement(e)||te.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(!r||"function"!=typeof r)throw new TypeError("The third argument must be a function");ae.isObject(n)||(n={});oe(t).forEach((t=>{((e,t,r,n,a)=>{let o=ne.get(e,"dap-defined-events")||{};r||(r=ne.get(e,"dap-event-guid")||0,ne.set(e,"dap-event-guid",r+1)),o[r=t+"."+r]&&o[r].type==t&&e.removeEventListener(t,o[r].fn,o[r].options),e.addEventListener(t,n,a),o[r]={type:t,fn:n,options:a},ne.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,r.bind(e),n)}))},off(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=ne.get(e,"dap-defined-events");if(!r)return;if(!t){let t=Object.keys(r),n=t.length;for(let a=0;a<n;a++){let n=t[a];e.removeEventListener(r[n].type,r[n].fn,r[n].options)}return ne.remove(e,"dap-defined-events"),void ne.remove(e,"dap-event-guid")}oe(t).forEach((t=>{ie(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=ne.get(e,"dap-defined-events");if(t)return t}},se={rgb2hsv(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=0,r=0,n=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 n=l/255,r=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*r,100*n]},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],r=e[1]>=100?100:e[1];r=r<=0?0:r;let n=e[2]>=100?100:e[2];n=n<=0?0:n,r/=100,n/=100;let a=0,o=0,i=0,l=parseInt(t/60%6+""),s=t/60-l,c=n*(1-r),d=n*(1-s*r),u=n*(1-(1-s)*r);switch(l){case 0:a=n,o=u,i=c;break;case 1:a=d,o=n,i=c;break;case 2:a=c,o=n,i=u;break;case 3:a=c,o=d,i=n;break;case 4:a=u,o=c,i=n;break;case 5:a=n,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(!ae.matchingText(t,"hex"))throw new TypeError("The argument must be a hexadecimal color value");if(4===t.length){let e="#";for(let r=1;r<4;r+=1)e+=t.slice(r,r+1).concat(t.slice(r,r+1));t=e}let r=[];for(let n=1;n<7;n+=2)r.push(parseInt("0x"+t.slice(n,n+2)));return r}},ce={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,r)=>{e&&e instanceof File||r(new TypeError("The argument must be a File object"));let n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{let e=n.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 r=e.split(","),n=r[0].match(/:(.*?);/)[1],a=atob(r[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:n})},compressImage(e,t){const r={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};ae.isObject(t)&&(J.isNumber(t.width)&&(r.width=t.width),J.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(r.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(r.mimeType=t.mimeType),J.isNumber(t.maxSize)&&(r.maxSize=t.maxSize),J.isNumber(t.minSize)&&(r.minSize=t.minSize));const n=(e,t,a)=>{let o=e.toDataURL("image/"+r.mimeType,a),i=this.dataBase64toFile(o,t);if(r.maxSize>0&&i.size>1024*r.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const r=n(e,t,a);o=r.url,i=r.file,a=r.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(r.minSize>0&&e.size<=1024*r.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=r.width||l.width,a.height=r.width?r.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)+"."+r.mimeType;let d=n(a,c,r.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"))}}))}};function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ue(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 r=e[t],n=typeof r;"object"!==n&&"function"!==n||Object.isFrozen(r)||ue(r)})),e}class he{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function me(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function pe(e,...t){const r=Object.create(null);for(const n in e)r[n]=e[n];return t.forEach((function(e){for(const t in e)r[t]=e[t]})),r}const ge=e=>!!e.scope;class fe{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=me(e)}openNode(e){if(!ge(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){ge(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ve=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class be{constructor(){this.rootNode=ve(),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=ve({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=>{be._collapse(e)})))}}class ye extends be{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const r=e.root;t&&(r.scope=`language:${t}`),this.add(r)}toHTML(){return new fe(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function we(e){return e?"string"==typeof e?e:e.source:null}function xe(e){return Se("(?=",e,")")}function ke(e){return Se("(?:",e,")*")}function Ee(e){return Se("(?:",e,")?")}function Se(...e){return e.map((e=>we(e))).join("")}function Te(...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=>we(e))).join("|")+")"}function Be(e){return new RegExp(e.toString()+"|").exec("").length-1}const Ce=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _e(e,{joinWith:t}){let r=0;return e.map((e=>{r+=1;const t=r;let n=we(e),a="";for(;n.length>0;){const e=Ce.exec(n);if(!e){a+=n;break}a+=n.substring(0,e.index),n=n.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&r++)}return a})).map((e=>`(${e})`)).join(t)}const Ne="[a-zA-Z]\\w*",Me="[a-zA-Z_]\\w*",Ae="\\b\\d+(\\.\\d+)?",Oe="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Re="\\b(0b[01]+)",ze={begin:"\\\\[\\s\\S]",relevance:0},Ie={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ze]},Le={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ze]},De=function(e,t,r={}){const n=pe({scope:"comment",begin:e,end:t,contains:[]},r);n.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=Te("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 n.contains.push({begin:Se(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},Fe=De("//","$"),Pe=De("/\\*","\\*/"),qe=De("#","$"),He={scope:"number",begin:Ae,relevance:0},Ve={scope:"number",begin:Oe,relevance:0},$e={scope:"number",begin:Re,relevance:0},Ue={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ze,{begin:/\[/,end:/\]/,relevance:0,contains:[ze]}]},je={scope:"title",begin:Ne,relevance:0},We={scope:"title",begin:Me,relevance:0},Ke={begin:"\\.\\s*"+Me,relevance:0};var Ge=Object.freeze({__proto__:null,APOS_STRING_MODE:Ie,BACKSLASH_ESCAPE:ze,BINARY_NUMBER_MODE:$e,BINARY_NUMBER_RE:Re,COMMENT:De,C_BLOCK_COMMENT_MODE:Pe,C_LINE_COMMENT_MODE:Fe,C_NUMBER_MODE:Ve,C_NUMBER_RE:Oe,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:qe,IDENT_RE:Ne,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:Ke,NUMBER_MODE:He,NUMBER_RE:Ae,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:Le,REGEXP_MODE:Ue,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Se(t,/.*\b/,e.binary,/\b.*/)),pe({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:je,UNDERSCORE_IDENT_RE:Me,UNDERSCORE_TITLE_MODE:We});function Ze(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Xe(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Ye(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ze,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Qe(e,t){Array.isArray(e.illegal)&&(e.illegal=Te(...e.illegal))}function Je(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 et(e,t){void 0===e.relevance&&(e.relevance=1)}const tt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=r.keywords,e.begin=Se(r.beforeMatch,xe(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},rt=["of","and","for","in","not","or","if","then","parent","list","value"],nt="keyword";function at(e,t,r=nt){const n=Object.create(null);return"string"==typeof e?a(r,e.split(" ")):Array.isArray(e)?a(r,e):Object.keys(e).forEach((function(r){Object.assign(n,at(e[r],t,r))})),n;function a(e,r){t&&(r=r.map((e=>e.toLowerCase()))),r.forEach((function(t){const r=t.split("|");n[r[0]]=[e,ot(r[0],r[1])]}))}}function ot(e,t){return t?Number(t):function(e){return rt.includes(e.toLowerCase())}(e)?0:1}const it={},lt=e=>{console.error(e)},st=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ct=(e,t)=>{it[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),it[`${e}/${t}`]=!0)},dt=new Error;function ut(e,t,{key:r}){let n=0;const a=e[r],o={},i={};for(let l=1;l<=t.length;l++)i[l+n]=a[l],o[l+n]=!0,n+=Be(t[l-1]);e[r]=i,e[r]._emit=o,e[r]._multi=!0}function ht(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 lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if("object"!=typeof e.beginScope||null===e.beginScope)throw lt("beginScope must be object"),dt;ut(e,e.begin,{key:"beginScope"}),e.begin=_e(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if("object"!=typeof e.endScope||null===e.endScope)throw lt("endScope must be object"),dt;ut(e,e.end,{key:"endScope"}),e.end=_e(e.end,{joinWith:""})}}(e)}function mt(e){function t(t,r){return new RegExp(we(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(r?"g":""))}class r{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+=Be(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(_e(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const r=t.findIndex(((e,t)=>t>0&&void 0!==e)),n=this.matchIndexes[r];return t.splice(0,r),Object.assign(t,n)}}class n{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 r;return this.rules.slice(e).forEach((([e,r])=>t.addRule(e,r))),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 r=t.exec(e);if(this.resumingScanAtSamePosition())if(r&&r.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,r=t.exec(e)}return r&&(this.regexIndex+=r.position+1,this.regexIndex===this.count&&this.considerAll()),r}}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=pe(e.classNameAliases||{}),function r(a,o){const i=a;if(a.isCompiled)return i;[Xe,Je,ht,tt].forEach((e=>e(a,o))),e.compilerExtensions.forEach((e=>e(a,o))),a.__beforeBegin=null,[Ye,Qe,et].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=at(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=we(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 pe(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(pt(e))return pe(e,{starts:e.starts?pe(e.starts):null});if(Object.isFrozen(e))return pe(e);return e}("self"===e?a:e)}))),a.contains.forEach((function(e){r(e,i)})),a.starts&&r(a.starts,o),i.matcher=function(e){const t=new n;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 pt(e){return!!e&&(e.endsWithParent||pt(e.starts))}class gt extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const ft=me,vt=pe,bt=Symbol("nomatch"),yt=function(e){const t=Object.create(null),r=Object.create(null),n=[];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:ye};function s(e){return l.noHighlightRe.test(e)}function c(e,t,r){let n="",a="";"object"==typeof t?(n=e,r=t.ignoreIllegals,a=t.language):(ct("10.7.0","highlight(lang, code, ...args) has been deprecated."),ct("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,n=t),void 0===r&&(r=!0);const o={code:n,language:a};b("before:highlight",o);const i=o.result?o.result:d(o.language,o.code,r);return i.code=o.code,b("after:highlight",i),i}function d(e,r,n,i){const s=Object.create(null);function c(){if(!T.keywords)return void C.addText(_);let e=0;T.keywordPatternRe.lastIndex=0;let t=T.keywordPatternRe.exec(_),r="";for(;t;){r+=_.substring(e,t.index);const a=k.case_insensitive?t[0].toLowerCase():t[0],o=(n=a,T.keywords[n]);if(o){const[e,n]=o;if(C.addText(r),r="",s[a]=(s[a]||0)+1,s[a]<=7&&(N+=n),e.startsWith("_"))r+=t[0];else{const r=k.classNameAliases[e]||e;m(t[0],r)}}else r+=t[0];e=T.keywordPatternRe.lastIndex,t=T.keywordPatternRe.exec(_)}var n;r+=_.substring(e),C.addText(r)}function h(){null!=T.subLanguage?function(){if(""===_)return;let e=null;if("string"==typeof T.subLanguage){if(!t[T.subLanguage])return void C.addText(_);e=d(T.subLanguage,_,!0,B[T.subLanguage]),B[T.subLanguage]=e._top}else e=u(_,T.subLanguage.length?T.subLanguage:null);T.relevance>0&&(N+=e.relevance),C.__addSublanguage(e._emitter,e.language)}():c(),_=""}function m(e,t){""!==e&&(C.startScope(t),C.addText(e),C.endScope())}function p(e,t){let r=1;const n=t.length-1;for(;r<=n;){if(!e._emit[r]){r++;continue}const n=k.classNameAliases[e[r]]||e[r],a=t[r];n?m(a,n):(_=a,c(),_=""),r++}}function f(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(k.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(_,k.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),_=""):e.beginScope._multi&&(p(e.beginScope,t),_="")),T=Object.create(e,{parent:{value:T}}),T}function v(e,t,r){let n=function(e,t){const r=e&&e.exec(t);return r&&0===r.index}(e.endRe,r);if(n){if(e["on:end"]){const r=new he(e);e["on:end"](t,r),r.isMatchIgnored&&(n=!1)}if(n){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return v(e.parent,t,r)}function b(e){return 0===T.matcher.regexIndex?(_+=e[0],1):(O=!0,0)}function y(e){const t=e[0],n=r.substring(e.index),a=v(T,e,n);if(!a)return bt;const o=T;T.endScope&&T.endScope._wrap?(h(),m(t,T.endScope._wrap)):T.endScope&&T.endScope._multi?(h(),p(T.endScope,e)):o.skip?_+=t:(o.returnEnd||o.excludeEnd||(_+=t),h(),o.excludeEnd&&(_=t));do{T.scope&&C.closeNode(),T.skip||T.subLanguage||(N+=T.relevance),T=T.parent}while(T!==a.parent);return a.starts&&f(a.starts,e),o.returnEnd?0:t.length}let w={};function x(t,o){const i=o&&o[0];if(_+=t,null==i)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===i){if(_+=r.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],r=e.rule,n=new he(r),a=[r.__beforeBegin,r["on:begin"]];for(const o of a)if(o&&(o(e,n),n.isMatchIgnored))return b(t);return r.skip?_+=t:(r.excludeBegin&&(_+=t),h(),r.returnBegin||r.excludeBegin||(_=t)),f(r,e),r.returnBegin?0:t.length}(o);if("illegal"===o.type&&!n){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!==bt)return e}if("illegal"===o.type&&""===i)return 1;if(A>1e5&&A>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return _+=i,i.length}const k=g(e);if(!k)throw lt(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=mt(k);let S="",T=i||E;const B={},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=0,M=0,A=0,O=!1;try{if(k.__emitTokens)k.__emitTokens(r,C);else{for(T.matcher.considerAll();;){A++,O?O=!1:T.matcher.considerAll(),T.matcher.lastIndex=M;const e=T.matcher.exec(r);if(!e)break;const t=x(r.substring(M,e.index),e);M=e.index+t}x(r.substring(M))}return C.finalize(),S=C.toHTML(),{language:e,value:S,relevance:N,illegal:!1,_emitter:C,_top:T}}catch(R){if(R.message&&R.message.includes("Illegal"))return{language:e,value:ft(r),illegal:!0,relevance:0,_illegalBy:{message:R.message,index:M,context:r.slice(M-100,M+100),mode:R.mode,resultSoFar:S},_emitter:C};if(a)return{language:e,value:ft(r),illegal:!1,relevance:0,errorRaised:R,_emitter:C,_top:T};throw R}}function u(e,r){r=r||l.languages||Object.keys(t);const n=function(e){const t={value:ft(e),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}(e),a=r.filter(g).filter(v).map((t=>d(t,e,!1)));a.unshift(n);const o=a.sort(((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(g(e.language).supersetOf===t.language)return 1;if(g(t.language).supersetOf===e.language)return-1}return 0})),[s,c]=o,u=s;return u.secondBest=c,u}function h(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const r=l.languageDetectRe.exec(t);if(r){const t=g(r[1]);return t||(st(o.replace("{}",r[1])),st("Falling back to no-highlight mode for this block.",e)),t?r[1]:"no-highlight"}return t.split(/\s+/).find((e=>s(e)||g(e)))}(e);if(s(n))return;if(b("before:highlightElement",{el:e,language:n}),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 gt("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const a=t.textContent,i=n?c(a,{language:n,ignoreIllegals:!0}):u(a);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const a=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${a}`)}(e,n,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}),b("after:highlightElement",{el:e,result:i,text:a})}let m=!1;function p(){if("loading"===document.readyState)return void(m=!0);document.querySelectorAll(l.cssSelector).forEach(h)}function g(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function f(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function v(e){const t=g(e);return t&&!t.disableAutodetect}function b(e,t){const r=e;n.forEach((function(e){e[r]&&e[r](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){m&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:h,highlightBlock:function(e){return ct("10.7.0","highlightBlock will be removed entirely in v12.0"),ct("10.7.0","Please use highlightElement now."),h(e)},configure:function(e){l=vt(l,e)},initHighlighting:()=>{p(),ct("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),ct("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(r,n){let o=null;try{o=n(e)}catch(l){if(lt("Language definition for '{}' could not be registered.".replace("{}",r)),!a)throw l;lt(l),o=i}o.name||(o.name=r),t[r]=o,o.rawDefinition=n.bind(null,e),o.aliases&&f(o.aliases,{languageName:r})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:g,registerAliases:f,autoDetection:v,inherit:vt,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),n.push(e)},removePlugin:function(e){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.9.0",e.regex={concat:Se,lookahead:xe,either:Te,optional:Ee,anyNumberOfTimes:ke};for(const y in Ge)"object"==typeof Ge[y]&&ue(Ge[y]);return Object.assign(e,Ge),e},wt=yt({});wt.newInstance=()=>yt({});var xt=wt;wt.HighlightJS=wt,wt.default=wt;const kt=de(xt);const Et="[A-Za-z$_][0-9A-Za-z$_]*",St=["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"],Tt=["true","false","null","undefined","NaN","Infinity"],Bt=["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"],Ct=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_t=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Nt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Mt=[].concat(_t,Bt,Ct);var At="[0-9](_*[0-9])*",Ot=`\\.(${At})`,Rt="[0-9a-fA-F](_*[0-9a-fA-F])*",zt={className:"number",variants:[{begin:`(\\b(${At})((${Ot})|\\.)?|(${Ot}))[eE][+-]?(${At})[fFdD]?\\b`},{begin:`\\b(${At})((${Ot})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ot})[fFdD]?\\b`},{begin:`\\b(${At})[fFdD]\\b`},{begin:`\\b0[xX]((${Rt})\\.?|(${Rt})?\\.(${Rt}))[pP][+-]?(${At})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Rt})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function It(e,t,r){return-1===r?"":e.replace(t,(n=>It(e,t,r-1)))}const Lt="[A-Za-z$_][0-9A-Za-z$_]*",Dt=["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"],Ft=["true","false","null","undefined","NaN","Infinity"],Pt=["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"],qt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ht=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Vt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],$t=[].concat(Ht,Pt,qt);const Ut=["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"],jt=["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"],Wt=["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"],Kt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Gt=["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 Zt=["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"],Xt=["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"],Yt=["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"],Qt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Jt=["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(),er=Yt.concat(Qt);const tr=["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"],rr=["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"],nr=["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"],ar=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],or=["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 ir(e){return e?"string"==typeof e?e:e.source:null}function lr(e){return sr("(?=",e,")")}function sr(...e){return e.map((e=>ir(e))).join("")}function cr(...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=>ir(e))).join("|")+")"}const dr=e=>sr(/\b/,e,/\w$/.test(e)?/\b/:/\B/),ur=["Protocol","Type"].map(dr),hr=["init","self"].map(dr),mr=["Any","Self"],pr=["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"],gr=["false","nil","true"],fr=["assignment","associativity","higherThan","left","lowerThan","none","right"],vr=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],br=["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"],yr=cr(/[/=\-+!*%<>&|^~?]/,/[\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]/),wr=cr(yr,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),xr=sr(yr,wr,"*"),kr=cr(/[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]/),Er=cr(kr,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Sr=sr(kr,Er,"*"),Tr=sr(/[A-Z]/,Er,"*"),Br=["attached","autoclosure",sr(/convention\(/,cr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sr(/objc\(/,Sr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Cr=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var _r="[0-9](_*[0-9])*",Nr=`\\.(${_r})`,Mr="[0-9a-fA-F](_*[0-9a-fA-F])*",Ar={className:"number",variants:[{begin:`(\\b(${_r})((${Nr})|\\.)?|(${Nr}))[eE][+-]?(${_r})[fFdD]?\\b`},{begin:`\\b(${_r})((${Nr})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Nr})[fFdD]?\\b`},{begin:`\\b(${_r})[fFdD]\\b`},{begin:`\\b0[xX]((${Mr})\\.?|(${Mr})?\\.(${Mr}))[pP][+-]?(${_r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Mr})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};kt.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),kt.registerLanguage("json",(function(e){const t=["true","false","null"],r={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,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),kt.registerLanguage("javascript",(function(e){const t=e.regex,r=Et,n="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const r=e[0].length+e.index,n=e.input[r];if("<"===n||","===n)return void t.ignoreMatch();let a;">"===n&&(((e,{after:t})=>{const r="</"+e[0].slice(1);return-1!==e.input.indexOf(r,t)})(e,{after:r})||t.ignoreMatch());const o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Et,keyword:St,literal:Tt,built_in:Mt,"variable.language":Nt},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:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},m={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"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,m,p,g,{match:/\$\d+/},d];u.contains=v.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(v)});const b=[].concat(f,u.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],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:{_:[...Bt,...Ct]}},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[..._t,"super","import"],t.concat("(?!",T.join("|"),")")),r,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],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,h,m,p,g,f,{match:/\$\d+/},d,k,{className:"attr",begin:r+t.lookahead(":"),relevance:0},N,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:_,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:n,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:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,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:/\$[(.]/}]}})),kt.registerLanguage("java",(function(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=r+It("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/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:"@"+r,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+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],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:["(?:"+n+"\\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,zt,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},zt,o]}})),kt.registerLanguage("typescript",(function(e){const t=function(e){const t=e.regex,r=Lt,n="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const r=e[0].length+e.index,n=e.input[r];if("<"===n||","===n)return void t.ignoreMatch();let a;">"===n&&(((e,{after:t})=>{const r="</"+e[0].slice(1);return-1!==e.input.indexOf(r,t)})(e,{after:r})||t.ignoreMatch());const o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Lt,keyword:Dt,literal:Ft,built_in:$t,"variable.language":Vt},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:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},m={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"}},g={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,u]},f={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,m,p,g,{match:/\$\d+/},d];u.contains=v.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(v)});const b=[].concat(f,u.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],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:{_:[...Pt,...qt]}},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Ht,"super","import"],t.concat("(?!",T.join("|"),")")),r,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],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,h,m,p,g,f,{match:/\$\d+/},d,k,{className:"attr",begin:r+t.lookahead(":"),relevance:0},N,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[f,e.REGEXP_MODE,{className:"function",begin:_,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:n,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:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,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),r=Lt,n=["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:n},contains:[t.exports.CLASS_REFERENCE]},i={$pattern:Lt,keyword:Dt.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:Ft,built_in:$t.concat(n),"variable.language":Vt},l={className:"meta",begin:"@"+r},s=(e,t,r)=>{const n=e.contains.findIndex((e=>e.label===t));if(-1===n)throw new Error("can not find mode to replace");e.contains.splice(n,1,r)};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})),kt.registerLanguage("python",(function(e){const t=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),n=["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:n,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|${n.join("|")}`,h={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})`}]},m={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,h,s,e.HASH_COMMENT_MODE]}]};return i.contains=[s,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[o,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},s,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,s]}]}})),kt.registerLanguage("php",(function(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,n=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o={scope:"variable",match:"\\$+"+n},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"],h=["__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"],m=["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:h,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:m},g=e=>e.map((e=>e.replace(/\|\d+$/,""))),f={variants:[{match:[/new/,t.concat(s,"+"),t.concat("(?!",g(m).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},v=t.concat(n,"\\b(?!\\()"),b={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),v],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),v],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(n,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:p,contains:[y,o,b,e.C_BLOCK_COMMENT_MODE,c,d,f]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",g(h).join("\\b|"),"|",g(m).join("\\b|"),"\\b)"),n,t.concat(s,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const k=[y,b,e.C_BLOCK_COMMENT_MODE,c,d,f];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,b,{match:[/const/,/\s/,n],scope:{1:"keyword",3:"variable.constant"}},f,{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,b,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]}})),kt.registerLanguage("css",(function(e){const t=e.regex,r=(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=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r.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},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Wt.join("|")+")"},{begin:":(:)?("+Kt.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Gt.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...n,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.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:jt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ut.join("|")+")\\b"}]}})),kt.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),r=er,n="[\\w-]+",a="("+n+"|@\\{"+n+"\\})",o=[],i=[],l=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},s=function(e,t,r){return{className:e,begin:t,relevance:r}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Xt.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","@@?"+n,10),s("variable","@\\{"+n+"\\}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:n+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=i.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},m={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Jt.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}},g={className:"variable",variants:[{begin:"@"+n+"\\s*:",relevance:15},{begin:"@"+n}],starts:{end:"[;}]",returnEnd:!0,contains:u}},f={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h,s("keyword","all\\b"),s("variable","@\\{"+n+"\\}"),{begin:"\\b("+Zt.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:":("+Yt.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Qt.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},v={begin:n+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[f]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,g,v,m,f,h,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),kt.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),r=ar,n=nr,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("+tr.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+or.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:rr.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]}})),kt.registerLanguage("html",(function(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n={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:[n]},{begin:/'/,end:/'/,contains:[n]},{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},n,{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(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),kt.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={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}]},n={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(n,{contains:[]}),i=e.inherit(a,{contains:[]});n.contains.push(i),a.contains.push(o);let l=[t,r];return[n,a,o,i].forEach((e=>{e.contains=e.contains.concat(l)})),l=l.concat(n,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},n,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:"$"},r,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),kt.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,r={$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:"("+r.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:r,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),kt.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,r],a={match:[/\./,cr(...ur,...hr)],className:{2:"keyword"}},o={match:sr(/\./,cr(...pr)),relevance:0},i=pr.filter((e=>"string"==typeof e)).concat(["_|0"]),l={variants:[{className:"keyword",match:cr(...pr.filter((e=>"string"!=typeof e)).concat(mr).map(dr),...hr)}]},s={$pattern:cr(/\b\w+/,/#\w+/),keyword:i.concat(vr),literal:gr},c=[a,o,l],d=[{match:sr(/\./,cr(...br)),relevance:0},{className:"built_in",match:sr(/\b/,cr(...br),/(?=\()/)}],u={match:/->/,relevance:0},h=[u,{className:"operator",relevance:0,variants:[{match:xr},{match:`\\.(\\.|${wr})+`}]}],m="([0-9]_*)+",p="([0-9a-fA-F]_*)+",g={className:"number",relevance:0,variants:[{match:`\\b(${m})(\\.(${m}))?([eE][+-]?(${m}))?\\b`},{match:`\\b0x(${p})(\\.(${p}))?([pP][+-]?(${m}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},f=(e="")=>({className:"subst",variants:[{match:sr(/\\/,e,/[0\\tnr"']/)},{match:sr(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),v=(e="")=>({className:"subst",match:sr(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),b=(e="")=>({className:"subst",label:"interpol",begin:sr(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:sr(e,/"""/),end:sr(/"""/,e),contains:[f(e),v(e),b(e)]}),w=(e="")=>({begin:sr(e,/"/),end:sr(/"/,e),contains:[f(e),b(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=sr(e,/\//),r=sr(/\//,e);return{begin:t,end:r,contains:[...k,{scope:"comment",begin:`#(?!.*${r})`,end:/$/}]}},T={scope:"regexp",variants:[S("###"),S("##"),S("#"),E]},B={match:sr(/`/,Sr,/`/)},C=[B,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Er}+`}],_=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Cr,contains:[...h,g,x]}]}},{scope:"keyword",match:sr(/@/,cr(...Br))},{scope:"meta",match:sr(/@/,Sr)}],N={match:lr(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sr(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Er,"+")},{className:"type",match:Tr,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sr(/\s+&\s+/,lr(Tr)),relevance:0}]},M={begin:/</,end:/>/,keywords:s,contains:[...n,...c,..._,u,N]};N.contains.push(M);const A={begin:/\(/,end:/\)/,relevance:0,keywords:s,contains:["self",{match:sr(Sr,/\s*:/),keywords:"_|0",relevance:0},...n,T,...c,...d,...h,g,x,...C,..._,N]},O={begin:/</,end:/>/,keywords:"repeat each",contains:[...n,N]},R={begin:/\(/,end:/\)/,keywords:s,contains:[{begin:cr(lr(sr(Sr,/\s*:/)),lr(sr(Sr,/\s+/,Sr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Sr}]},...n,...c,...h,g,x,..._,N,A],endsParent:!0,illegal:/["']/},z={match:[/(func|macro)/,/\s+/,cr(B.match,Sr,xr)],className:{1:"keyword",3:"title.function"},contains:[O,R,t],illegal:[/\[/,/%/]},I={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,R,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,xr],className:{1:"keyword",3:"title"}},D={begin:[/precedencegroup/,/\s+/,Tr],className:{1:"keyword",3:"title"},contains:[N],keywords:[...fr,...gr],end:/}/};for(const F of x.variants){const e=F.contains.find((e=>"interpol"===e.label));e.keywords=s;const t=[...c,...d,...h,g,x,...C];e.contains=[...t,{begin:/\(/,end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:s,contains:[...n,z,I,{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:[...n],relevance:0},T,...c,...d,...h,g,x,...C,..._,N,A]}})),kt.registerLanguage("dart",(function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},r={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},n={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,r]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,r]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,r]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,r]}]};r.contains=[e.C_NUMBER_MODE,n];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:[n,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:"=>"}]}})),kt.registerLanguage("nginx",(function(e){const t=e.regex,r={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},n={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,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[r]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],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},r]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:n.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:n}],relevance:0}],illegal:"[^\\s\\}\\{]"}})),kt.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:/["']/}]}]}})),kt.registerLanguage("http",(function(e){const t="HTTP/([32]|1\\.[01])",r={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}}]}},n=[r,{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:n}},{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:n}},e.inherit(r,{relevance:0})]}})),kt.registerLanguage("ruby",(function(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(n,/(::\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])*",h={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"}]},m={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:n,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:r}],relevance:0},h,{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,m.contains=p;const g=[{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(g).concat(s).concat(p)}})),kt.registerLanguage("c",(function(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+n+"|"+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:/<.*?>/},r,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*\\(",h={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"},m=[c,i,r,e.C_BLOCK_COMMENT_MODE,s,l],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:m.concat([{begin:/\(/,end:/\)/,keywords:h,contains:m.concat(["self"]),relevance:0}]),relevance:0},g={begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,r,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(p,g,m,[c,{begin:e.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:l,keywords:h}}})),kt.registerLanguage("cpp",(function(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+n+"|"+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:/<.*?>/},r,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*\\(",h={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"]},m={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=[m,c,i,r,e.C_BLOCK_COMMENT_MODE,s,l],g={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:p.concat([{begin:/\(/,end:/\)/,keywords:h,contains:p.concat(["self"]),relevance:0}]),relevance:0},f={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:h,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:h,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,r,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(g,f,m,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:h,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),kt.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"]},r=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),n={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,n,e.C_BLOCK_COMMENT_MODE],l.contains=[d,s,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},r]},m=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,n,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},r,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[r,h,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:"("+m+"\\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,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,n,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},p]}})),kt.registerLanguage("sql",(function(e){const t=e.regex,r=e.COMMENT("--","$"),n=["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:r}={}){const n=r;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:n(e)?`${e}|0`:e))}(s,{when:e=>e.length<3}),literal:n,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:n,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,r,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),kt.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"}}]}})),kt.registerLanguage("r",(function(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,n=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:r,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:r},{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,n]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,n]},{scope:{1:"punctuation",2:"number"},match:[o,n]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,n]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),kt.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"},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},n={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,n]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,n]}]};n.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=Ar,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+/}]}},r,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]}})),kt.registerLanguage("rust",(function(e){const t=e.regex,r={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},n="([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_]+)"+n},{begin:"\\b0o([0-7_]+)"+n},{begin:"\\b0x([A-Fa-f0-9_]+)"+n},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+n}],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:"->"},r]}})),kt.configure({cssSelector:"pre",classPrefix:"editify-hljs-",ignoreUnescapedHTML:!0});const Or=[{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"}],Rr=(e,t)=>{if(!ae.isObject(e)&&ae.isObject(t))return null;for(let r in t)ae.isObject(t[r])&&!Array.isArray(t[r])&&ae.isObject(e[r])&&!Array.isArray(e[r])?e[r]=Rr(e[r],t[r]):e[r]=t[r];return e},zr=(e,t,r)=>{if(null==r||null==r)return e.hasOwnProperty(t);let n=e[t];if(null==n||null==n)return!1;if("string"==typeof r&&(r=r.toLocaleLowerCase()),"string"==typeof n&&(n=n.toLocaleLowerCase()),"string"==typeof r&&r&&(ae.matchingText(r,"rgb")||ae.matchingText(r,"rgba"))&&(r=ee.trim(r,!0)),"string"==typeof n&&n&&(ae.matchingText(n,"rgb")||ae.matchingText(n,"rgba"))&&(n=ee.trim(n,!0)),"string"==typeof r&&r&&ae.matchingText(r,"hex")){const e=se.hex2rgb(r);r=`rgb(${e[0]},${e[1]},${e[2]})`}if("string"==typeof n&&n&&ae.matchingText(n,"hex")){const e=se.hex2rgb(n);n=`rgb(${e[0]},${e[1]},${e[2]})`}return n==r},Ir=e=>ae.isObject(e)||Array.isArray(e)?JSON.parse(JSON.stringify(e)):e,Lr=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"]}),Dr=e=>{const t=new y("closed","br",null,null,null);e.children=[t],t.parent=e,e.hasMarks()?e.marks["data-editify-merged"]="true":e.marks={"data-editify-merged":"true"}},Fr=(e,t)=>({crossRowElement:(()=>{let r=null;const n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=e.getPreviousElement(t.parent),o=1;for(;a;){const t=a.children[n],{rowspan:i}=Pr(t);if(!(t.hasMarks()&&t.marks["data-editify-merged"])&&i>o){r=t;break}a=e.getPreviousElement(a),o++}return r})(),crossColumnElement:(()=>{let r=null,n=e.getPreviousElement(t),a=1;for(;n;){const{colspan:t}=Pr(n);if(!(n.hasMarks()&&n.marks["data-editify-merged"])&&t>a){r=n;break}n=e.getPreviousElement(n),a++}return r})()}),Pr=e=>{let t=1,r=1;if(e.hasMarks()){if(e.marks.rowspan){const r=Number(e.marks.rowspan);t=isNaN(r)?1:r}if(e.marks.colspan){const t=Number(e.marks.colspan);r=isNaN(t)?1:t}}return{rowspan:t,colspan:r}},qr=e=>{const t=[],r=[];e.forEach(((e,n)=>{e.children.forEach(((e,a)=>{Array.isArray(r[n])?r[n].push(e):r[n]=[e],Array.isArray(t[a])?t[a].push(e):t[a]=[e]}))}));const n=t.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.rowspan){const r=Number(t.marks.rowspan);return e+(isNaN(r)?1:r)}}return e+1}),0))),a=r.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.colspan){const r=Number(t.marks.colspan);return e+(isNaN(r)?1:r)}}return e+1}),0)));return{rowNumber:Math.max(...n),columnNumber:Math.max(...a)}},Hr=(e,t)=>{let r=!0;if(t.parsedom&&(e.isText()||t.parsedom!=e.parsedom)&&(r=!1),t.marks){Object.keys(t.marks).every((r=>e.hasMarks()&&e.marks[r]&&e.marks[r]==t.marks[r]))||(r=!1)}if(t.styles){Object.keys(t.styles).every((r=>e.hasStyles()&&e.styles[r]&&e.styles[r]==t.styles[r]))||(r=!1)}return r},Vr=(e,t)=>e.isBlock()?Hr(e,t)?e:null:Hr(e,t)?e:Vr(e.parent,t),$r=(e,t,r)=>{let n=[];if(!e.range)return n;if(e.range.anchor.element.isEqual(e.range.focus.element)){const t=Vr(e.range.anchor.element,r);return t&&(n=[t]),n}return t.flatList.forEach((e=>{const t=Vr(e.element,r);t&&!n.some((e=>e.isEqual(t)))&&n.push(t)})),n},Ur=(e,t)=>!!Wr(e,t)||!!e.parent&&Ur(e.parent,t),jr=e=>!!Kr(e)||!!e.parent&&jr(e.parent),Wr=(e,t=!1)=>!e.isEmpty()&&("div"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-list"]==(t?"ol":"ul")),Kr=e=>!e.isEmpty()&&("div"==e.parsedom&&e.hasMarks()&&e.marks.hasOwnProperty("data-editify-task")),Gr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"pre"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"pre"})))),Zr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"blockquote"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"blockquote"})))),Xr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"blockquote"}):t.list.every((e=>!!Vr(e.element,{parsedom:"blockquote"})))),Yr=(e,t,r=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Ur(e.range.anchor.element,r):t.list.every((e=>Ur(e.element,r)))),Qr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?jr(e.range.anchor.element):t.list.every((e=>jr(e.element)))),Jr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"a"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"a"})))),en=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"table"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"table"})))),tn=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"img"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"img"})))),rn=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"video"}):t.flatList.some((e=>!!Vr(e.element,{parsedom:"video"})))),nn=(e,t,r,n)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasStyles())&&zr(e.range.anchor.element.styles,r,n);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasStyles()&&zr(e.element.styles,r,n)))},an=(e,t,r,n)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasMarks())&&zr(e.range.anchor.element.marks,r,n);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasMarks()&&zr(e.element.marks,r,n)))},on=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},ln=(e,t)=>{if(!e.range)return[];let r=t.flatList.length,n=[];for(let a=0;a<r;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 r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[1]),r.textContent=r.textContent.substring(o.offset[1]),e.addElementAfter(r,o.element),t=o.element}else if(o.offset[1]==o.element.textContent.length&&o.offset[0]>0){const r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),r.textContent=r.textContent.substring(o.offset[0]),e.addElementAfter(r,o.element),t=r}else if(o.offset[0]>0&&o.offset[1]<o.element.textContent.length){const r=o.element.clone(),n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),r.textContent=r.textContent.substring(o.offset[0],o.offset[1]),n.textContent=n.textContent.substring(o.offset[1]),e.addElementAfter(r,o.element),e.addElementAfter(n,r),t=r}t&&(0==a&&e.range.anchor.moveToStart(t),a==r-1&&e.range.focus.moveToEnd(t),n.push(t))}else n.push(o.element)}return n},sn=e=>{e.marks=null,e.styles=null,e.parsedom=y.BLOCK_NODE},cn=(e,t=!1)=>{Wr(e,t)||(sn(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-list"]=t?"ol":"ul")},dn=e=>{Kr(e)||(sn(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-task"]="uncheck")},un=(e,t,r,n)=>{if(!e.range)return;if(!Lr(r).heading.map((e=>e.value)).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();sn(t),t.parsedom=n}else t.list.forEach((e=>{if(e.element.isBlock())sn(e.element),e.element.parsedom=n;else{const t=e.element.getBlock();sn(t),t.parsedom=n}}))},hn=(e,t)=>{if(!e.range)return;const r=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(),n=e.range.anchor.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),n=e.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}))},mn=(e,t)=>{if(!e.range)return;const r=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(),n=e.range.anchor.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),n=e.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}))},pn=(e,t)=>{if(!e.range)return;const r=Xr(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();sn(t),r||(t.parsedom="blockquote")}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{sn(e),r||(e.parsedom="blockquote")}))}},gn=(e,t,r)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),n=e.range.anchor.element.getInblock();n?n.hasStyles()?n.styles["text-align"]=r:n.styles={"text-align":r}:t.hasStyles()?t.styles["text-align"]=r:t.styles={"text-align":r}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["text-align"]=r:e.element.styles={"text-align":r};else{const t=e.element.getBlock(),n=e.element.getInblock();n?n.hasStyles()?n.styles["text-align"]=r:n.styles={"text-align":r}:t.hasStyles()?t.styles["text-align"]=r:t.styles={"text-align":r}}}))},fn=(e,t,r)=>{if(!e.range)return;const n=Yr(e,t,r);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();n?sn(t):cn(t,r)}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{n?sn(e):cn(e,r)}))}},vn=(e,t)=>{if(!e.range)return;const r=Qr(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();r?sn(t):dn(t)}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{r?sn(e):dn(e)}))}},bn=(e,t,r)=>{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,Ir(r)):e.range.anchor.element.styles=Ir(r);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),t.hasStyles()?Object.assign(t.styles,Ir(r)):t.styles=Ir(r),e.insertElement(t)}else{const t=y.getSpaceElement();t.styles=Ir(r),e.insertElement(t)}else{ln(e,t).forEach((e=>{e.isText()&&(e.hasStyles()?Object.assign(e.styles,Ir(r)):e.styles=Ir(r))}))}},yn=(e,t,r)=>{if(e.range){if(!ae.isObject(r))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,Ir(r)):e.range.anchor.element.marks=Ir(r);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),t.hasMarks()?Object.assign(t.marks,Ir(r)):t.marks=Ir(r),e.insertElement(t)}else{const t=y.getSpaceElement();t.marks=Ir(r),e.insertElement(t)}else{ln(e,t).forEach((e=>{e.isText()&&(e.hasMarks()?Object.assign(e.marks,Ir(r)):e.marks=Ir(r))}))}}},wn=(e,t,r)=>{if(!e.range)return;const n=e=>{if(Array.isArray(r)){if(e.hasStyles()){let t={};Object.keys(e.styles).forEach((n=>{r.includes(n)||(t[n]=e.styles[n])})),e.styles=t}}else e.styles=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())n(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),n(t),e.insertElement(t)}}else{ln(e,t).forEach((e=>{e.isText()&&n(e)}))}},xn=(e,t,r)=>{if(!e.range)return;const n=e=>{if(Array.isArray(r)){if(e.hasMarks()){let t={};Object.keys(e.marks).forEach((n=>{r.includes(n)||(t[n]=e.marks[n])})),e.marks=t}}else e.marks=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())n(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),n(t),e.insertElement(t)}}else{ln(e,t).forEach((e=>{e.isText()&&n(e)}))}},kn=(e,t,r)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),n=e.range.anchor.element.getInblock();n?n.hasStyles()?n.styles["line-height"]=r:n.styles={"line-height":r}:t.hasStyles()?t.styles["line-height"]=r:t.styles={"line-height":r}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["line-height"]=r:e.element.styles={"line-height":r};else{const t=e.element.getBlock(),n=e.element.getInblock();n?n.hasStyles()?n.styles["line-height"]=r:n.styles={"line-height":r}:t.hasStyles()?t.styles["line-height"]=r:t.styles={"line-height":r}}}))},En=(e,t,r,n)=>{if(!e.range)return;t||(t=r);const a={href:r};n&&(a.target="_blank");const o=new y("inline","a",a,null,null),i=new y("text",null,null,null,t);e.addElementTo(i,o),e.insertElement(o)},Sn=(e,t)=>{if(!e.range)return;const r=new y("closed","img",{src:t},null,null);e.insertElement(r)},Tn=(e,t)=>{if(!e.range)return;const r=new y("closed","video",{src:t},null,null);e.insertElement(r),e.range.anchor.moveToEnd(r),e.range.focus.moveToEnd(r)},Bn=(e,t,r)=>{if(!e.range)return;const n=new y("block","table",null,null,null),a=new y("inblock","tbody",null,null,null);e.addElementTo(a,n);for(let l=0;l<t;l++){const t=new y("inblock","tr",null,null,null);for(let n=0;n<r;n++){const r=new y("inblock","td",null,null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,r),e.addElementTo(r,t)}e.addElementTo(t,a)}e.insertElement(n);const o=new y("block",y.BLOCK_NODE,null,null,null),i=new y("closed","br",null,null,null);e.addElementTo(i,o),e.addElementAfter(o,n),e.range.anchor.moveToStart(a),e.range.focus.moveToStart(a)},Cn=(e,t)=>{if(!e.range)return;const r=$r(e,t,{parsedom:"pre"});if(1==r.length){let t="";y.flatElements(r[0].children).filter((e=>e.isText())).forEach((e=>{t+=e.textContent}));t.split("\n").forEach((t=>{const n=new y("block",y.BLOCK_NODE,null,null,null),a=new y("text",null,null,null,t);e.addElementTo(a,n),e.addElementBefore(n,r[0])})),r[0].toEmpty()}else if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();sn(t),t.parsedom="pre";const r=new y("block",y.BLOCK_NODE,null,null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,r),e.addElementAfter(r,t)}else{e.range.anchor.moveToStart(t.list[0].element.getBlock()),e.range.focus.moveToEnd(t.list[t.list.length-1].element.getBlock());const r=t.flatList.filter((e=>e.element.isText())),n={};r.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 a=new y("block","pre",null,null,null);Object.keys(n).forEach(((t,r)=>{if(r>0){const t=new y("text",null,null,null,"\n");a.hasChildren()?e.addElementTo(t,a,a.children.length):e.addElementTo(t,a)}n[t].forEach((t=>{a.hasChildren()?e.addElementTo(t,a,a.children.length):e.addElementTo(t,a)}))})),e.delete(),e.insertElement(a);const o=new y("block",y.BLOCK_NODE,null,null,null),i=new y("closed","br",null,null,null);e.addElementTo(i,o),e.addElementAfter(o,a)}},_n=e=>{if(!e.range)return;const t=new y("closed","hr",null,null,null);e.insertElement(t),e.range.anchor.moveToEnd(t),e.range.focus.moveToEnd(t)},Nn=(e,t)=>{if("table"==t.parsedom){const r={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,r):t.marks=r;const n={"white-space":"pre-wrap","word-break":"break-word"};t.hasStyles()?Object.assign(t.styles,n):t.styles=n;const a=y.flatElements(t.children),o=a.filter((e=>"tr"==e.parsedom)),{rowNumber:i,columnNumber:l}=qr(o);let s=a.find((e=>"colgroup"==e.parsedom));if(s){s.children.forEach((e=>{e.hasMarks()?e.marks.width||(e.marks.width="auto"):e.marks={width:"auto"}}));const t=s.children.length;if(t<l)for(let r=0;r<l-t;r++){const t=new y("closed","col",{width:"auto"},null,null);e.addElementTo(t,s,s.children.length)}}else{s=new y("inblock","colgroup",null,null,null);for(let t=l-1;t>=0;t--){const t=new y("closed","col",{width:"auto"},null,null);e.addElementTo(t,s)}}((e,t,r,n)=>{y.flatElements(t).forEach((t=>{if("td"==t.parsedom&&t.hasMarks()){t.marks["data-editify-merged"]&&delete t.marks["data-editify-merged"];const r=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),a=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(r>1){let a=1;for(;a<r&&t.parent.children.length<n;){const r=new y("inblock","td",{"data-editify-merged":"true"},null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,r),e.addElementAfter(r,t),a++}}if(a>1){let o=t,i=1;for(;i<a&&e.getNextElement(o.parent)&&e.getNextElement(o.parent).children.length<n;){const t=e.getNextElement(o.parent),n=o.parent.children.findIndex((e=>e.isEqual(o))),a=t.children[n];for(let o=0;o<r;o++){const r=new y("inblock","td",{"data-editify-merged":"true"},null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,r),a?e.addElementBefore(r,a):e.addElementTo(r,t,t.children.length)}o=t.children[n],i++}}}})),t.forEach((t=>{const r=t.children.length;if(r<n)for(let a=0;a<n-r;a++){const r=new y("inblock","td",null,null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,r),e.addElementTo(r,t,t.children.length)}}));const a=t.length;if(a<r)for(let o=0;o<r-a;o++){const r=new y("inblock","tr",null,null,null);for(let t=0;t<n;t++){const t=new y("inblock","td",null,null,null),n=new y("closed","br",null,null,null);e.addElementTo(n,t),e.addElementTo(t,r)}t.push(r)}})(e,o,i,l),t.children=[];const c=new y("inblock","tbody",null,null,null);o.forEach((t=>{const r=c.hasChildren()?c.children.length:0;e.addElementTo(t,c,r)})),e.addElementTo(c,t),e.addElementTo(s,t),((e,t)=>{y.flatElements(t).filter((e=>"td"==e.parsedom)).forEach((t=>{if(t.hasMarks()&&!t.marks["data-editify-merged"]){const r=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),n=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(r>1){let n=t,a=1;for(;a<r;){const t=e.getNextElement(n);if(!t)break;t.hasMarks()?t.marks["data-editify-merged"]="true":t.marks={"data-editify-merged":"true"},n=t,a++}}if(n>1){const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=t,i=1;for(;i<n&&o&&e.getNextElement(o.parent);){const t=e.getNextElement(o.parent);for(let e=a;e<a+r;e++){const r=t.children[e];r&&(r.hasMarks()?r.marks["data-editify-merged"]="true":r.marks={"data-editify-merged":"true"})}o=t.children[a],i++}}}}))})(e,o)}},Mn=(e,t,r,n)=>{if("pre"==t.parsedom){const a={"data-editify-element":t.key};if(t.hasMarks()?Object.assign(t.marks,a):t.marks=a,r&&t.hasChildren()){let r=t.marks["data-editify-hljs"]||"";if(r&&n){n.some((e=>ae.isObject(e)?e.value==r:e==r))||(r="")}const a=y.flatElements(t.children).filter((e=>e.isText()&&!e.isEmpty())),o=function(e,t){return t?kt.highlight(e,{language:t,ignoreIllegals:!0}).value:kt.highlightAuto(e).value}(a.reduce(((e,t)=>e+t.textContent),""),r);if(o){const r=e.parseHtml(o);t.children=r,r.forEach((e=>{e.parent=t})),((e,t,r,n)=>{if(e.range){if(e.range.anchor.element.getBlock().isEqual(t)){const t=r.findIndex((t=>e.range.anchor.element.isEqual(t))),a=r.filter(((e,r)=>r<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.anchor.offset,o=y.flatElements(n).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=r.findIndex((t=>e.range.focus.element.isEqual(t))),a=r.filter(((e,r)=>r<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.focus.offset,o=y.flatElements(n).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,r)}else{const r=new y("closed","br",null,null,null);t.children=[r],r.parent=t,e.range&&(e.range.anchor.moveToStart(r),e.range.focus.moveToStart(r))}}}},An={placement:{type:String,default:"top",validator:e=>["top","left","right","bottom"].includes(e)},color:{type:String,default:null},background:{type:String,default:null}},On=["data-editify-placement"],Rn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},zn=Rn(t.defineComponent({name:"Triangle",__name:"triangle",props:An,setup(e){const r=e,n=t.computed((()=>"top"==r.placement?{borderBottomColor:r.color||""}:"bottom"==r.placement?{borderTopColor:r.color||""}:"left"==r.placement?{borderRightColor:r.color||""}:"right"==r.placement?{borderLeftColor:r.color||""}:{})),a=t.computed((()=>"top"==r.placement?{borderBottomColor:r.background||""}:"bottom"==r.placement?{borderTopColor:r.background||""}:"left"==r.placement?{borderRightColor:r.background||""}:"right"==r.placement?{borderLeftColor:r.background||""}:{}));return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"editify-triangle",style:t.normalizeStyle(n.value),"data-editify-placement":e.placement},[t.createElementVNode("div",{class:"editify-triangle-el",style:t.normalizeStyle(a.value)},null,4)],12,On))}}),[["__scopeId","data-v-e1abc967"]]),In={modelValue:{type:Boolean,default:!1},node:{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:10},animation:{type:String,default:null,validator:e=>["translate","fade",null].includes(e)},useRange:{type:Boolean,default:!1}},Ln=["data-editify-placement"],Dn=Rn(t.defineComponent({name:"Layer",__name:"layer",props:In,emits:["update:modelValue","show","shown","hidden"],setup(e,{expose:r,emit:n}){const a=t.getCurrentInstance(),o=e,i=n,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")),h=t.computed((()=>({borderColor:o.border&&o.borderColor||"",background:o.background||"",color:o.color||""}))),m=()=>o.node?te.isElement(o.node)?o.node:document.body.querySelector(o.node):null,p=()=>{l.value=null;const e=window.getSelection();if(e&&e.rangeCount){const r=e.getRangeAt(0).getClientRects();if(r.length){const e=r[0],n=r[r.length-1],a=te.getElementBounding(c.value.offsetParent),i=document.documentElement.clientHeight||window.innerHeight,u=document.documentElement.clientWidth||window.innerWidth;"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?e.top>=0&&e.top>=a.top&&e.top>=c.value.offsetHeight?l.value=o.placement:i-n.bottom>=0&&i-n.bottom>=a.bottom&&i-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||(i-n.bottom>=0&&i-n.bottom>=a.bottom&&i-n.bottom>=c.value.offsetHeight?l.value=o.placement:e.top>=0&&e.top>=a.top&&e.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?u-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?u-n.right+n.width/2<c.value.offsetWidth/2?l.value="bottom-end":n.left+n.width/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"top-start"==l.value?u-e.right+e.width<c.value.offsetWidth&&(u-e.right+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"bottom-start"==l.value?u-n.right+n.width<c.value.offsetWidth&&(u-n.right+n.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&&n.left+n.width<c.value.offsetWidth&&(n.left+n.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=(a.bottom<0?-a.bottom:0)+"px","top"==o.placement?u-e.right+e.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):e.left+e.width/2<c.value.offsetWidth/2?(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"bottom"==o.placement?u-n.right+n.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px"):n.left+n.width/2<c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement?u-e.right+e.width<c.value.offsetWidth?u-e.right+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):"bottom-start"==o.placement?u-n.right+n.width<c.value.offsetWidth?u-n.right+n.width/2>=c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px"):(c.value.style.left=n.left-a.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-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):"bottom-end"==o.placement&&(n.left+n.width<c.value.offsetWidth?n.left+n.width/2>=c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-n.right-a.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],r=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>r.width?r.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>r.width?r.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=m();if(!te.isElement(e))return;l.value=null;const r=te.getElementBounding(e),n=te.getElementBounding(c.value.offsetParent);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?r.top>=0&&r.top>=n.top&&r.top>=c.value.offsetHeight?l.value=o.placement:r.bottom>=0&&r.bottom>=n.bottom&&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||(r.bottom>=0&&r.bottom>=n.bottom&&r.bottom>=c.value.offsetHeight?l.value=o.placement:r.top>=0&&r.top>=n.top&&r.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?r.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="top-end":r.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="top-start"):"top-start"==l.value?r.right+e.offsetWidth<c.value.offsetWidth&&(r.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"top-end"==l.value?r.left+e.offsetWidth<c.value.offsetWidth&&(r.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom"==l.value?r.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="bottom-end":r.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"bottom-start"==l.value?r.right+e.offsetWidth<c.value.offsetWidth&&(r.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"bottom-end"==l.value&&r.left+e.offsetWidth<c.value.offsetWidth&&(r.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=r.top-n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto",c.value.style.top=r.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=r.right-n.right+"px",c.value.style.top=r.top-n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=r.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=r.bottom-n.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=r.bottom-n.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px",c.value.style.top="auto",c.value.style.bottom=r.bottom-n.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=(n.bottom<0?-n.bottom:0)+"px","top"==o.placement||"bottom"==o.placement?r.right+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px"):r.left+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement||"bottom-start"==o.placement?r.right+e.offsetWidth<c.value.offsetWidth?r.right+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=r.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=r.right-n.right+"px"):(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):"top-end"!=o.placement&&"bottom-end"!=o.placement||(r.left+e.offsetWidth<c.value.offsetWidth?r.left+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px"))),o.showTriangle&&(()=>{const e=m();te.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"))})()}))},f=()=>{o.useRange?p():g()},v=e=>{f(),i("show",e)},b=e=>{i("shown",e)},y=e=>{i("hidden",e)},w=()=>{o.modelValue&&i("update:modelValue",!1)},x=e=>{te.isElement(c.value)&&(te.isContains(c.value.offsetParent,e.target)||o.modelValue&&i("update:modelValue",!1))};return t.onMounted((()=>{o.modelValue&&f(),le.on(window,`click.editify_layer_${a.uid}`,x),le.on(window,`resize.editify_layer_${a.uid}`,w)})),t.onBeforeUnmount((()=>{le.off(window,`click.editify_layer_${a.uid} resize.editify_layer_${a.uid}`)})),r({setPosition:f}),(e,r)=>(t.openBlock(),t.createBlock(t.Transition,{name:e.animation?"editify-layer-"+e.animation:"editify-layer",onEnter:v,onAfterEnter:b,onAfterLeave:y},{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(zn,{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(h.value)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],12,Ln)):t.createCommentVNode("",!0)])),_:3},8,["name"]))}}),[["__scopeId","data-v-09578d83"]]),Fn={content:{type:String,default:""},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},Pn={class:"editify-tooltip-content"},qn=Rn(t.defineComponent({name:"Tooltip",__name:"tooltip",props:Fn,setup(e){const r=e,n=t.ref(!1),a=t.ref(null),o=()=>{r.disabled||(n.value=!0)},i=()=>{r.disabled||(n.value=!1)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-tooltip",{"editify-block":e.block}])},[t.createElementVNode("div",{ref_key:"targetRef",ref:a,class:"editify-tooltip-target",onMouseenter:o,onMouseleave:i},[t.renderSlot(e.$slots,"default",{},void 0,!0)],544),t.createVNode(Dn,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=e=>n.value=e),node:a.value,border:"","border-color":"#000",background:"#000","show-triangle":"",color:"#fff",placement:"bottom",animation:"fade","z-index":10},{default:t.withCtx((()=>[t.createElementVNode("div",Pn,t.toDisplayString(e.content),1)])),_:1},8,["modelValue","node"])],2))}}),[["__scopeId","data-v-7b5e30d1"]]),Hn={value:{type:String,default:""}},Vn=Rn(t.defineComponent({name:"Icon",__name:"icon",props:Hn,setup:e=>(e,r)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["editify-icon","editify-icon-"+e.value])},null,2))}),[["__scopeId","data-v-6e00035b"]]),$n={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}},Un={class:"editify-button"},jn={key:0,class:"editify-button-slot"},Wn={key:1},Kn={key:1,class:"editify-button-options"},Gn=["onClick"],Zn={key:1,class:"editify-button-option-flex"},Xn=Rn(t.defineComponent({name:"Button",__name:"button",props:$n,emits:["operate","layerShow","layerShown","layerHidden"],setup(e,{expose:r,emit:n}){const a=e,o=n,i=t.ref(!1),l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.computed((()=>{let e=[],t="",r="";return ae.isObject(a.selectConfig)&&(Array.isArray(a.selectConfig.options)&&(e=a.selectConfig.options.map((e=>ae.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&&(r=a.selectConfig.maxHeight)),{options:e,width:t,maxHeight:r}})),u=t.computed((()=>{let e=[],t="",r="",n="";if(ae.isObject(a.displayConfig)){if("string"!=typeof a.displayConfig.value&&"number"!=typeof a.displayConfig.value||(n=a.displayConfig.value),Array.isArray(a.displayConfig.options)){e=a.displayConfig.options.map((e=>ae.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e})),!e.find((e=>e.value==n))&&e[0]&&(n=e[0].value)}"number"==typeof a.displayConfig.width&&(t=a.displayConfig.width),"number"==typeof a.displayConfig.maxHeight&&(r=a.displayConfig.maxHeight)}return{options:e,width:t,maxHeight:r,value:n}})),h=t.computed((()=>"select"==a.type?d.value.options:u.value.options)),m=t.computed((()=>{const e=u.value.options.find((e=>e.value==u.value.value));return e?e.label:""})),p=t.computed((()=>a.color?se.hex2rgb(a.color):[])),g=t.computed((()=>{if(a.disabled)return{};if(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{}})),f=()=>{a.disabled||("default"==a.type?o("operate",a.name):i.value=!i.value)};return r({show:i,status:l}),(e,r)=>(t.openBlock(),t.createElementBlock("div",Un,[t.createElementVNode("div",{class:t.normalizeClass(["editify-button-wrap",{"editify-right-border":e.rightBorder,"editify-left-border":e.leftBorder}])},[t.createVNode(qn,{content:e.title,disabled:!e.tooltip},{default:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"btnRef",ref:s,style:t.normalizeStyle(g.value),class:t.normalizeClass(["editify-button-el",{"editify-disabled":e.disabled,"editify-active":e.active}]),onMouseenter:r[0]||(r[0]=e=>l.value="hover"),onMouseleave:r[1]||(r[1]=e=>l.value=null),onMousedown:r[2]||(r[2]=e=>l.value="down"),onMouseup:r[3]||(r[3]=e=>l.value="hover"),onClick:f},["default"==e.type||"select"==e.type?(t.openBlock(),t.createElementBlock("div",jn,[t.renderSlot(e.$slots,"default",{},void 0,!0)])):"display"==e.type?(t.openBlock(),t.createElementBlock("div",Wn,t.toDisplayString(m.value),1)):t.createCommentVNode("",!0),"select"==e.type||"display"==e.type?(t.openBlock(),t.createBlock(Vn,{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"]),t.createVNode(Dn,{ref_key:"layerRef",ref:c,modelValue:i.value,"onUpdate:modelValue":r[4]||(r[4]=e=>i.value=e),node:s.value,border:"",fade:"",placement:"bottom-start","z-index":12,animation:"translate",onShow:r[5]||(r[5]=e=>o("layerShow")),onShown:r[6]||(r[6]=e=>o("layerShown")),onHidden:r[7]||(r[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:h.value},void 0,!0):(t.openBlock(),t.createElementBlock("div",Kn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(r=>(t.openBlock(),t.createElementBlock("div",{onClick:e=>(e=>{a.disabled||(o("operate",a.name,e.value),i.value=!1)})(r),class:t.normalizeClass(["editify-button-option",{"editify-active":"display"==e.type&&r.value==u.value.value}]),style:t.normalizeStyle(r.style||"")},[e.$slots.option?t.renderSlot(e.$slots,"option",{key:0,item:r},void 0,!0):(t.openBlock(),t.createElementBlock("div",Zn,[r.icon?(t.openBlock(),t.createBlock(Vn,{key:0,value:r.icon},null,8,["value"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.label),1)]))],14,Gn)))),256))]))],4)])),_:3},8,["modelValue","node"])],2)]))}}),[["__scopeId","data-v-14398008"]]),Yn={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=>ae.matchingText(e,"hex")}},Qn=["data-editify-placement","textContent"],Jn=["value","disabled","checked"],ea=["data-editify-placement","textContent"],ta=Rn(t.defineComponent({name:"Checkbox",__name:"checkbox",props:Yn,emits:["update:modelValue","change"],setup(e,{emit:r}){const n=e,a=r,o=t.computed((()=>"boolean"==typeof n.modelValue?n.modelValue:!!Array.isArray(n.modelValue)&&n.modelValue.some((e=>ae.equal(e,n.value))))),i=t.computed((()=>{let e={};return n.color&&o.value&&!n.disabled&&(e.backgroundColor=n.color,e.borderColor=n.color),e})),l=e=>{if(Array.isArray(n.modelValue)){let t=[...n.modelValue];e.target.checked&&!o.value?t.push(n.value):o.value&&(t=t.filter((e=>!ae.equal(e,n.value)))),a("update:modelValue",t),a("change",t)}else"boolean"==typeof n.modelValue&&(a("update:modelValue",e.target.checked),a("change",e.target.checked))};return(e,r)=>(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,Qn)):t.createCommentVNode("",!0),t.createElementVNode("input",{onChange:l,value:e.value,disabled:e.disabled,checked:o.value,type:"checkbox"},null,40,Jn),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(Vn,{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,ea)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-d99c609b"]]),ra={data:{type:Array,default:function(){return[]}},value:{type:String,default:null},color:{type:String,default:""},tooltip:{type:Boolean,default:!1}},na={class:"editify-colors"},aa={class:"editify-colors-list"},oa=["onClick"],ia=Rn(t.defineComponent({name:"Colors",__name:"colors",props:ra,emits:["change"],setup(e,{emit:r}){const n=r,a=t.inject("$editTrans"),o=e=>{n("change",e.value)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",na,[t.createElementVNode("div",{class:"editify-colors-header",onClick:r[0]||(r[0]=e=>o({value:""}))},[t.createVNode(Vn,{value:"remove"}),t.createElementVNode("span",null,t.toDisplayString(t.unref(a)("defaultColor")),1)]),t.createElementVNode("div",aa,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(r=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-color",{"editify-active":e.value==r.value}]),style:t.normalizeStyle({borderColor:e.value==r.value&&e.color||""})},[t.createVNode(qn,{block:"",content:r.label,disabled:!e.tooltip},{default:t.withCtx((()=>[t.createElementVNode("div",{onClick:e=>o(r),class:"editify-color-el",style:t.normalizeStyle({background:r.value})},null,12,oa)])),_:2},1032,["content","disabled"])],6)))),256))])]))}}),[["__scopeId","data-v-dec8d117"]]),la={modelValue:{type:Boolean,default:!1},node:{type:[String,Node],default:null},type:{type:String,default:"text",validator:e=>["text","table","link","codeBlock","image","video"].includes(e)},config:{type:Object,default:null},color:{type:String,default:""}},sa={key:0,class:"editify-toolbar-link"},ca={class:"editify-toolbar-link-label"},da=["placeholder"],ua={class:"editify-toolbar-link-footer"},ha={class:"editify-toolbar-link-operations"},ma=["href"],pa=Rn(t.defineComponent({name:"Toolbar",__name:"toolbar",props:la,emits:["update:modelValue"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("editor"),i=t.inject("dataRangeCaches"),l=t.inject("$editTrans"),s=t.ref(null),c=t.ref(null),d=t.ref(null),u=t.ref(null),h=t.ref({url:"",newOpen:!1}),m=t.ref({controls:!1,loop:!1,autoplay:!1,muted:!1}),p=t.ref({show:n.config.codeBlock.languages.show,displayConfig:{options:n.config.codeBlock.languages.options,value:"",width:n.config.codeBlock.languages.width,maxHeight:n.config.codeBlock.languages.maxHeight},leftBorder:n.config.codeBlock.languages.leftBorder,rightBorder:n.config.codeBlock.languages.rightBorder,active:!1,disabled:!1}),g=t.ref({show:n.config.text.heading.show,displayConfig:{options:n.config.text.heading.options,value:"",width:n.config.text.heading.width,maxHeight:n.config.text.heading.maxHeight},defaultValue:n.config.text.heading.defaultValue,leftBorder:n.config.text.heading.leftBorder,rightBorder:n.config.text.heading.rightBorder,active:!1,disabled:!1}),f=t.ref({show:n.config.text.align.show,selectConfig:{options:n.config.text.align.options,width:n.config.text.align.width,maxHeight:n.config.text.align.maxHeight},leftBorder:n.config.text.align.leftBorder,rightBorder:n.config.text.align.rightBorder,active:!1,disabled:!1}),v=t.ref({show:n.config.text.orderList.show,leftBorder:n.config.text.orderList.leftBorder,rightBorder:n.config.text.orderList.rightBorder,active:!1,disabled:!1}),b=t.ref({show:n.config.text.unorderList.show,leftBorder:n.config.text.unorderList.leftBorder,rightBorder:n.config.text.unorderList.rightBorder,active:!1,disabled:!1}),w=t.ref({show:n.config.text.task.show,leftBorder:n.config.text.task.leftBorder,rightBorder:n.config.text.task.rightBorder,active:!1,disabled:!1}),x=t.ref({show:n.config.text.bold.show,leftBorder:n.config.text.bold.leftBorder,rightBorder:n.config.text.bold.rightBorder,active:!1,disabled:!1}),k=t.ref({show:n.config.text.italic.show,leftBorder:n.config.text.italic.leftBorder,rightBorder:n.config.text.italic.rightBorder,active:!1,disabled:!1}),E=t.ref({show:n.config.text.strikethrough.show,leftBorder:n.config.text.strikethrough.leftBorder,rightBorder:n.config.text.strikethrough.rightBorder,active:!1,disabled:!1}),S=t.ref({show:n.config.text.underline.show,leftBorder:n.config.text.underline.leftBorder,rightBorder:n.config.text.underline.rightBorder,active:!1,disabled:!1}),T=t.ref({show:n.config.text.code.show,leftBorder:n.config.text.code.leftBorder,rightBorder:n.config.text.code.rightBorder,active:!1,disabled:!1}),B=t.ref({show:n.config.text.super.show,leftBorder:n.config.text.super.leftBorder,rightBorder:n.config.text.super.rightBorder,active:!1,disabled:!1}),C=t.ref({show:n.config.text.sub.show,leftBorder:n.config.text.sub.leftBorder,rightBorder:n.config.text.sub.rightBorder,active:!1,disabled:!1}),_=t.ref({show:n.config.text.fontSize.show,displayConfig:{options:n.config.text.fontSize.options,value:"",width:n.config.text.fontSize.width,maxHeight:n.config.text.fontSize.maxHeight},defaultValue:n.config.text.fontSize.defaultValue,leftBorder:n.config.text.fontSize.leftBorder,rightBorder:n.config.text.fontSize.rightBorder,active:!1,disabled:!1}),N=t.ref({show:n.config.text.fontFamily.show,displayConfig:{options:n.config.text.fontFamily.options,value:"",width:n.config.text.fontFamily.width,maxHeight:n.config.text.fontFamily.maxHeight},defaultValue:n.config.text.fontFamily.defaultValue,leftBorder:n.config.text.fontFamily.leftBorder,rightBorder:n.config.text.fontFamily.rightBorder,active:!1,disabled:!1}),M=t.ref({show:n.config.text.lineHeight.show,displayConfig:{options:n.config.text.lineHeight.options,value:"",width:n.config.text.lineHeight.width,maxHeight:n.config.text.lineHeight.maxHeight},defaultValue:n.config.text.lineHeight.defaultValue,leftBorder:n.config.text.lineHeight.leftBorder,rightBorder:n.config.text.lineHeight.rightBorder,active:!1,disabled:!1}),A=t.ref({show:n.config.text.foreColor.show,selectConfig:{options:n.config.text.foreColor.options},leftBorder:n.config.text.foreColor.leftBorder,rightBorder:n.config.text.foreColor.rightBorder,value:"",active:!1,disabled:!1}),O=t.ref({show:n.config.text.backColor.show,selectConfig:{options:n.config.text.backColor.options},leftBorder:n.config.text.backColor.leftBorder,rightBorder:n.config.text.backColor.rightBorder,value:"",active:!1,disabled:!1}),R=t.ref({show:n.config.text.formatClear.show,leftBorder:n.config.text.formatClear.leftBorder,rightBorder:n.config.text.formatClear.rightBorder,active:!1,disabled:!1}),z=t.computed({get:()=>n.modelValue,set(e){a("update:modelValue",e)}}),I=t.computed((()=>e=>{if(!o.value.range)return!1;const t=Vr(o.value.range.focus.element,{parsedom:"td"});if(!t)return!1;if("left"==e){let e=!1;const r=Pr(t),n=o.value.getPreviousElement(t);if(n)if(n.hasMarks()&&n.marks["data-editify-merged"]){const{crossColumnElement:t}=Fr(o.value,n);if(t){const{rowspan:n}=Pr(t);e=n==r.rowspan}}else{const{rowspan:t}=Pr(n);e=t==r.rowspan}return e}if("right"==e){let e=!1;const r=Pr(t);let n=o.value.getNextElement(t);for(;n;){if(!n.hasMarks()||!n.marks["data-editify-merged"]){const{rowspan:t}=Pr(n);e=t==r.rowspan;break}{const{crossColumnElement:e}=Fr(o.value,n);if(!e)break;n=o.value.getNextElement(n)}}return e}if("up"==e){let e=!1;const r=Pr(t),n=t.parent.children.findIndex((e=>e.isEqual(t))),a=o.value.getPreviousElement(t.parent);if(a){const t=a.children[n];if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossRowElement:n}=Fr(o.value,t);if(n){const{colspan:t}=Pr(n);e=t==r.colspan}}else{const{colspan:n}=Pr(t);e=n==r.colspan}}return e}if("down"==e){let e=!1;const r=Pr(t),n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=o.value.getNextElement(t.parent);for(;a;){const t=a.children[n];if(!t.hasMarks()||!t.marks["data-editify-merged"]){const{colspan:n}=Pr(t);e=n==r.colspan;break}{const{crossRowElement:e}=Fr(o.value,t);if(!e)break;a=o.value.getNextElement(a)}}return e}return!1})),L=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},D=e=>{e.currentTarget.style.borderColor=""},F=()=>{wn(o.value,i.value),xn(o.value,i.value),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},P=e=>{bn(o.value,i.value,{"background-color":e}),u.value.show=!1,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},q=e=>{bn(o.value,i.value,{color:e}),d.value.show=!1,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},H=(e,t)=>{kn(o.value,i.value,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},V=(e,t)=>{bn(o.value,i.value,{"font-family":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},$=(e,t)=>{bn(o.value,i.value,{"font-size":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},U=()=>{nn(o.value,i.value,"vertical-align","super")?wn(o.value,i.value,["vertical-align"]):bn(o.value,i.value,{"vertical-align":"super"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},j=()=>{nn(o.value,i.value,"vertical-align","sub")?wn(o.value,i.value,["vertical-align"]):bn(o.value,i.value,{"vertical-align":"sub"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},W=()=>{an(o.value,i.value,"data-editify-code")?xn(o.value,i.value,["data-editify-code"]):yn(o.value,i.value,{"data-editify-code":!0}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},K=()=>{nn(o.value,i.value,"text-decoration","underline")||nn(o.value,i.value,"text-decoration-line","underline")?wn(o.value,i.value,["text-decoration","text-decoration-line"]):bn(o.value,i.value,{"text-decoration":"underline"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},G=()=>{nn(o.value,i.value,"text-decoration","line-through")||nn(o.value,i.value,"text-decoration-line","line-through")?wn(o.value,i.value,["text-decoration","text-decoration-line"]):bn(o.value,i.value,{"text-decoration":"line-through"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Z=e=>{fn(o.value,i.value,"orderList"==e),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},X=()=>{vn(o.value,i.value),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Y=()=>{nn(o.value,i.value,"font-style","italic")?wn(o.value,i.value,["font-style"]):bn(o.value,i.value,{"font-style":"italic"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Q=()=>{nn(o.value,i.value,"font-weight","bold")||nn(o.value,i.value,"font-weight","700")?wn(o.value,i.value,["font-weight"]):bn(o.value,i.value,{"font-weight":"bold"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},J=(e,t)=>{un(o.value,i.value,l,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},ee=(e,t)=>{gn(o.value,i.value,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},te=e=>{const t=o.value.range.anchor.element;m.value[e]?delete t.marks[e]:t.marks[e]=!0,m.value[e]=!m.value[e],o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},re=e=>{const t=o.value.range.anchor.element;if(t){const r={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,r):t.styles=r,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},ne=()=>{if(!h.value.url)return;const e=$r(o.value,i.value,{parsedom:"a"});1==e.length&&(e[0].marks.href=h.value.url,h.value.newOpen?e[0].marks.target="_blank":delete e[0].marks.target,o.value.formatElementStack(),o.value.domRender())},oe=()=>{const e=$r(o.value,i.value,{parsedom:"a"});1==e.length&&(e[0].parsedom=y.TEXT_NODE,delete e[0].marks.target,delete e[0].marks.href,delete e[0].marks["data-editify-element"],o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},ie=(e,t)=>{const r=$r(o.value,i.value,{parsedom:"pre"});1==r.length&&(Object.assign(r[0].marks,{"data-editify-hljs":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},le=(e="up")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=$r(o.value,i.value,{parsedom:"pre"});if(1==t.length){const r=new y("block",y.BLOCK_NODE,null,null,null),n=new y("closed","br",null,null,null);o.value.addElementTo(n,r),"up"==e?o.value.addElementBefore(r,t[0]):o.value.addElementAfter(r,t[0]),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},se=(e="left")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=$r(o.value,i.value,{parsedom:"td"});if(1==t.length){const r=t[0].parent,n=r.parent,a=n.parent,i=n.children,l=r.children.findIndex((e=>e.isEqual(t[0])));i.forEach((t=>{const r=new y("inblock","td",null,null,null),n=new y("closed","br",null,null,null);o.value.addElementTo(n,r),"left"==e?o.value.addElementTo(r,t,l):o.value.addElementTo(r,t,l+1)}));const s=a.children.find((e=>"colgroup"==e.parsedom)),c=new y("closed","col",null,null,null);if("left"==e?o.value.addElementTo(c,s,l):o.value.addElementTo(c,s,l+1),"left"==e){const e=o.value.getPreviousElement(t[0]);o.value.range.anchor.moveToStart(e),o.value.range.focus.moveToStart(e)}else{const e=o.value.getNextElement(t[0]);o.value.range.anchor.moveToStart(e),o.value.range.focus.moveToStart(e)}o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},ce=(e="up")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=$r(o.value,i.value,{parsedom:"tr"});if(1==t.length){const r=t[0].parent,{columnNumber:n}=qr(r.children),a=new y("inblock","tr",null,null,null);for(let e=0;e<n;e++){const e=new y("inblock","td",null,null,null),t=new y("closed","br",null,null,null);o.value.addElementTo(t,e),o.value.addElementTo(e,a)}"up"==e?o.value.addElementBefore(a,t[0]):o.value.addElementAfter(a,t[0]),o.value.range.anchor.moveToStart(a),o.value.range.focus.moveToStart(a),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},de=(e="up")=>{const t=$r(o.value,i.value,{parsedom:"table"});if(1==t.length){const r=new y("block",y.BLOCK_NODE,null,null,null),n=new y("closed","br",null,null,null);o.value.addElementTo(n,r),"up"==e?o.value.addElementBefore(r,t[0]):o.value.addElementAfter(r,t[0]),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},ue=e=>{const t=$r(o.value,i.value,{parsedom:e});1==t.length&&(t[0].toEmpty(),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},he=()=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const e=$r(o.value,i.value,{parsedom:"td"});if(1==e.length){const t=e[0].parent;if(1==t.parent.children.length)return void ue("table");const r=t.children.findIndex((t=>t.isEqual(e[0]))),n=o.value.getPreviousElement(t),a=o.value.getNextElement(t);t.children.forEach(((e,r)=>{const n=Pr(e);if(e.hasMarks()&&e.marks["data-editify-merged"]){const{crossRowElement:t}=Fr(o.value,e);if(t){const{rowspan:e}=Pr(t);e-1==1?delete t.marks.rowspan:t.marks.rowspan=e-1}}else if(n.rowspan>1){let e=o.value.getNextElement(t);e&&n.rowspan-1>1&&(e.children[r].hasMarks()?e.children[r].marks.rowspan=n.rowspan-1:e.children[r].marks={rowspan:n.rowspan-1})}})),t.toEmpty(),n?(o.value.range.anchor.moveToEnd(n.children[r]),o.value.range.focus.moveToEnd(n.children[r])):(o.value.range.anchor.moveToEnd(a.children[r]),o.value.range.focus.moveToEnd(a.children[r])),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},me=()=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const e=$r(o.value,i.value,{parsedom:"td"});if(1==e.length){const t=e[0].parent,r=t.parent.children,n=t.parent.parent;if(1==t.children.length)return void ue("table");const a=t.children.findIndex((t=>t.isEqual(e[0]))),i=o.value.getPreviousElement(e[0]),l=o.value.getNextElement(e[0]);r.forEach((e=>{const t=e.children[a],r=Pr(t);if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossColumnElement:e}=Fr(o.value,t);if(e){const{colspan:t}=Pr(e);t-1==1?delete e.marks.colspan:e.marks.colspan=t-1}}else if(r.colspan>1){let e=o.value.getNextElement(t);e&&r.colspan-1>1&&(e.hasMarks()?e.marks.colspan=r.colspan-1:e.marks={colspan:r.colspan-1})}t.toEmpty()}));n.children.find((e=>"colgroup"==e.parsedom)).children[a].toEmpty(),i?(o.value.range.anchor.moveToEnd(i),o.value.range.focus.moveToEnd(i)):(o.value.range.anchor.moveToEnd(l),o.value.range.focus.moveToEnd(l)),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},pe=e=>{if(!I.value(e))return;o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=$r(o.value,i.value,{parsedom:"td"});if(1==t.length)if("left"==e){const e=Pr(t[0]),r=o.value.getPreviousElement(t[0]);if(r)if(r.hasMarks()&&r.marks["data-editify-merged"]){const{crossColumnElement:n}=Fr(o.value,r);if(n){const{rowspan:r,colspan:a}=Pr(n);r==e.rowspan&&(n.marks.colspan=a+e.colspan,t[0].children.forEach((e=>{n.children.push(e),e.parent=n})),Dr(t[0]),o.value.range.anchor.moveToEnd(n),o.value.range.focus.moveToEnd(n),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else{const{rowspan:n,colspan:a}=Pr(r);n==e.rowspan&&(r.hasMarks()?r.marks.colspan=a+e.colspan:r.marks={colspan:a+e.colspan},t[0].children.forEach((e=>{r.children.push(e),e.parent=r})),Dr(t[0]),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else if("right"==e){const e=Pr(t[0]);let r=o.value.getNextElement(t[0]);for(;r;){if(!r.hasMarks()||!r.marks["data-editify-merged"]){const{rowspan:n,colspan:a}=Pr(r);n==e.rowspan&&(t[0].hasMarks()?t[0].marks.colspan=e.colspan+a:t[0].marks={colspan:e.colspan+a},r.children.forEach((e=>{t[0].children.push(e),e.parent=t[0]})),Dr(r),o.value.range.anchor.moveToEnd(t[0]),o.value.range.focus.moveToEnd(t[0]),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender());break}{const{crossColumnElement:e}=Fr(o.value,r);if(!e)break;r=o.value.getNextElement(r)}}}else if("up"==e){const e=Pr(t[0]),r=t[0].parent.children.findIndex((e=>e.isEqual(t[0]))),n=o.value.getPreviousElement(t[0].parent);if(n){const a=n.children[r];if(a.hasMarks()&&a.marks["data-editify-merged"]){const{crossRowElement:r}=Fr(o.value,a);if(r){const{rowspan:n,colspan:a}=Pr(r);a==e.colspan&&(r.marks.rowspan=n+e.rowspan,t[0].children.forEach((e=>{r.children.push(e),e.parent=r})),Dr(t[0]),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else{const{rowspan:r,colspan:n}=Pr(a);n==e.colspan&&(a.hasMarks()?a.marks.rowspan=r+e.rowspan:a.marks={rowspan:r+e.rowspan},t[0].children.forEach((e=>{a.children.push(e),e.parent=a})),Dr(t[0]),o.value.range.anchor.moveToEnd(a),o.value.range.focus.moveToEnd(a),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}}else if("down"==e){const e=Pr(t[0]),r=t[0].parent.children.findIndex((e=>e.isEqual(t[0])));let n=o.value.getNextElement(t[0].parent);for(;n;){const a=n.children[r];if(!a.hasMarks()||!a.marks["data-editify-merged"]){const{rowspan:r,colspan:n}=Pr(a);n==e.colspan&&(t[0].hasMarks()?t[0].marks.rowspan=e.rowspan+r:t[0].marks={rowspan:e.rowspan+r},a.children.forEach((e=>{t[0].children.push(e),e.parent=t[0]})),Dr(a),o.value.range.anchor.moveToEnd(t[0]),o.value.range.focus.moveToEnd(t[0]),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender());break}{const{crossRowElement:e}=Fr(o.value,a);if(!e)break;n=o.value.getNextElement(n)}}}},ge=()=>{if("link"==n.type){const e=$r(o.value,i.value,{parsedom:"a"});1==e.length&&(h.value.url=e[0].marks.href,h.value.newOpen="_blank"==e[0].marks.target)}else if("video"==n.type){const e=$r(o.value,i.value,{parsedom:"video"});1==e.length&&(m.value.autoplay=!!e[0].marks.autoplay,m.value.loop=!!e[0].marks.loop,m.value.controls=!!e[0].marks.controls,m.value.muted=!!e[0].marks.muted)}else if("codeBlock"==n.type){const e=$r(o.value,i.value,{parsedom:"pre"});1==e.length&&(p.value.displayConfig.value=e[0].marks["data-editify-hljs"]||"")}else if("text"==n.type){const e=e=>"function"==typeof n.config.extraDisabled&&n.config.extraDisabled(e)||!1,t=g.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),i.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));g.value.displayConfig.value=t?ae.isObject(t)?t.value:t:g.value.defaultValue,g.value.disabled=e("heading"),f.value.disabled=e("align"),v.value.active=Yr(o.value,i.value,!0),v.value.disabled=e("orderList"),b.value.active=Yr(o.value,i.value,!1),b.value.disabled=e("unorderList"),w.value.active=Qr(o.value,i.value),w.value.disabled=e("task"),x.value.active=nn(o.value,i.value,"font-weight","bold")||nn(o.value,i.value,"font-weight","700"),x.value.disabled=e("bold"),k.value.active=nn(o.value,i.value,"font-style","italic"),k.value.disabled=e("italic"),E.value.active=nn(o.value,i.value,"text-decoration","line-through")||nn(o.value,i.value,"text-decoration-line","line-through"),E.value.disabled=e("strikethrough"),S.value.active=nn(o.value,i.value,"text-decoration","underline")||nn(o.value,i.value,"text-decoration-line","underline"),S.value.disabled=e("underline"),T.value.active=an(o.value,i.value,"data-editify-code"),T.value.disabled=e("code"),B.value.active=nn(o.value,i.value,"vertical-align","super"),B.value.disabled=e("super"),C.value.active=nn(o.value,i.value,"vertical-align","sub"),C.value.disabled=e("sub");const r=_.value.displayConfig.options.find((e=>ae.isObject(e)?nn(o.value,i.value,"font-size",e.value):nn(o.value,i.value,"font-size",e)));_.value.displayConfig.value=r?ae.isObject(r)?r.value:r:_.value.defaultValue,_.value.disabled=e("fontSize");const a=N.value.displayConfig.options.find((e=>ae.isObject(e)?nn(o.value,i.value,"font-family",e.value):nn(o.value,i.value,"font-family",e)));N.value.displayConfig.value=a?ae.isObject(a)?a.value:a:N.value.defaultValue,N.value.disabled=e("fontFamily");const l=M.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),i.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const r=e.element.getBlock(),n=e.element.getInblock();return n?n.hasStyles()&&n.styles["line-height"]==t:r.hasStyles()&&r.styles["line-height"]==t}))}));M.value.displayConfig.value=l?ae.isObject(l)?l.value:l:M.value.defaultValue,M.value.disabled=e("lineHeight");const s=A.value.selectConfig.options.find((e=>ae.isObject(e)?nn(o.value,i.value,"color",e.value):nn(o.value,i.value,"color",e)));A.value.value=s?ae.isObject(s)?s.value:s:"",A.value.disabled=e("foreColor");const c=O.value.selectConfig.options.find((e=>ae.isObject(e)?nn(o.value,i.value,"background-color",e.value):nn(o.value,i.value,"background-color",e)));O.value.value=c?ae.isObject(c)?c.value:c:"",O.value.disabled=e("backColor"),R.value.disabled=e("formatClear")}};return(e,r)=>(t.openBlock(),t.createBlock(Dn,{modelValue:z.value,"onUpdate:modelValue":r[25]||(r[25]=e=>z.value=e),ref_key:"layerRef",ref:s,node:e.node,border:"",placement:"bottom-start",onShow:ge,useRange:"text"==e.type,"z-index":10},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-toolbar",ref_key:"toolbarRef",ref:c,style:t.normalizeStyle(e.config.style)},["link"==e.type?(t.openBlock(),t.createElementBlock("div",sa,[t.createElementVNode("div",ca,t.toDisplayString(t.unref(l)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onChange:ne,onFocus:L,onBlur:D,placeholder:t.unref(l)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":r[0]||(r[0]=e=>h.value.url=e),type:"url"},null,40,da),[[t.vModelText,h.value.url,void 0,{trim:!0}]]),t.createElementVNode("div",ua,[t.createVNode(ta,{onChange:ne,modelValue:h.value.newOpen,"onUpdate:modelValue":r[1]||(r[1]=e=>h.value.newOpen=e),label:t.unref(l)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",ha,[t.createElementVNode("span",{onClick:oe},t.toDisplayString(t.unref(l)("removeLink")),1),t.createElementVNode("a",{href:h.value.url,target:"_blank",style:t.normalizeStyle({color:e.color||""})},t.toDisplayString(t.unref(l)("viewLink")),13,ma)])])])):"image"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(Xn,{onOperate:r[2]||(r[2]=e=>re("30%")),name:"set30Width",title:t.unref(l)("width30"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 30% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[3]||(r[3]=e=>re("50%")),name:"set50Width",title:t.unref(l)("width50"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 50% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{rightBorder:"",onOperate:r[4]||(r[4]=e=>re("100%")),name:"set100Width",title:t.unref(l)("width100"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 100% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[5]||(r[5]=e=>re("auto")),name:"setAutoWidth",title:t.unref(l)("auto"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"auto-width"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[6]||(r[6]=e=>ue("img")),name:"deleteImage",title:t.unref(l)("deleteImage"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"delete"})])),_:1},8,["title","tooltip","color"])],64)):"video"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(Xn,{onOperate:r[7]||(r[7]=e=>re("30%")),name:"set30Width",title:t.unref(l)("width30"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 30% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[8]||(r[8]=e=>re("50%")),name:"set50Width",title:t.unref(l)("width50"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 50% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[9]||(r[9]=e=>re("100%")),name:"set100Width",title:t.unref(l)("width100"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 100% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{rightBorder:"",onOperate:r[10]||(r[10]=e=>re("auto")),name:"setAutoWidth",title:t.unref(l)("auto"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"auto-width"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:te,name:"autoplay",title:m.value.autoplay?t.unref(l)("disabledAutoplay"):t.unref(l)("autoplay"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:m.value.autoplay?"autoplay":"stop"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:te,name:"loop",title:m.value.loop?t.unref(l)("disabledLoop"):t.unref(l)("loop"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:m.value.loop?"loop":"single"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:te,name:"muted",title:m.value.muted?t.unref(l)("unmuted"):t.unref(l)("muted"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:m.value.muted?"muted":"unmuted"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{leftBorder:"",onOperate:te,name:"controls",title:t.unref(l)("controls"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"controls"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[11]||(r[11]=e=>ue("video")),name:"deleteVideo",title:t.unref(l)("deleteVideo"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"delete"})])),_:1},8,["title","tooltip","color"])],64)):"table"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createVNode(Xn,{onOperate:r[12]||(r[12]=e=>de("up")),name:"textWrapUp",title:t.unref(l)("textWrapUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"text-wrap",class:"editify-icon-rotate"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[13]||(r[13]=e=>de("down")),rightBorder:"",name:"textWrapDown",title:t.unref(l)("textWrapDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"text-wrap"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[14]||(r[14]=e=>ce("up")),name:"insertRowTop",title:t.unref(l)("insertRowTop"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"insert-row-top"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[15]||(r[15]=e=>ce("down")),name:"insertRowBottom",title:t.unref(l)("insertRowBottom"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"insert-row-bottom"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:he,rightBorder:"",name:"deleteRow",title:t.unref(l)("deleteRow"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"delete-row"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[16]||(r[16]=e=>se("left")),name:"insertColumnLeft",title:t.unref(l)("insertColumnLeft"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"insert-column-left"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[17]||(r[17]=e=>se("right")),name:"insertColumnRight",title:t.unref(l)("insertColumnRight"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"insert-column-right"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:me,rightBorder:"",name:"deleteColumn",title:t.unref(l)("deleteColumn"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"delete-column"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{disabled:!I.value("left"),onOperate:r[18]||(r[18]=e=>pe("left")),rightBorder:"",name:"mergeCellsLeft",title:t.unref(l)("mergeCellsLeft"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"merge-cells-left"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(Xn,{disabled:!I.value("right"),onOperate:r[19]||(r[19]=e=>pe("right")),rightBorder:"",name:"mergeCellsRight",title:t.unref(l)("mergeCellsRight"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"merge-cells-right"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(Xn,{disabled:!I.value("up"),onOperate:r[20]||(r[20]=e=>pe("up")),rightBorder:"",name:"mergeCellsUp",title:t.unref(l)("mergeCellsUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"merge-cells-up"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(Xn,{disabled:!I.value("down"),onOperate:r[21]||(r[21]=e=>pe("down")),rightBorder:"",name:"mergeCellsDown",title:t.unref(l)("mergeCellsDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"merge-cells-down"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[22]||(r[22]=e=>ue("table")),leftBorder:"",name:"deleteTable",title:t.unref(l)("deleteTable"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"delete-table"})])),_:1},8,["title","tooltip","color"])],64)):t.createCommentVNode("",!0),"codeBlock"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(Xn,{onOperate:r[23]||(r[23]=e=>le("up")),name:"textWrapUp",title:t.unref(l)("textWrapUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"text-wrap",class:"editify-icon-rotate"})])),_:1},8,["title","tooltip","color"]),t.createVNode(Xn,{onOperate:r[24]||(r[24]=e=>le("down")),name:"textWrapDown",title:t.unref(l)("textWrapDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"text-wrap"})])),_:1},8,["title","tooltip","color"]),p.value.show?(t.openBlock(),t.createBlock(Xn,{key:0,name:"languages",type:"display",title:t.unref(l)("selectLanguages"),tooltip:e.config.tooltip,leftBorder:p.value.leftBorder,rightBorder:p.value.rightBorder,"display-config":p.value.displayConfig,color:e.color,active:p.value.active,disabled:p.value.disabled,onOperate:ie},null,8,["title","tooltip","leftBorder","rightBorder","display-config","color","active","disabled"])):t.createCommentVNode("",!0)],64)):"text"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[g.value.show?(t.openBlock(),t.createBlock(Xn,{key:0,name:"heading",type:"display",title:t.unref(l)("heading"),tooltip:e.config.tooltip,"display-config":g.value.displayConfig,leftBorder:g.value.leftBorder,rightBorder:g.value.rightBorder,color:e.color,active:g.value.active,disabled:g.value.disabled,onOperate:J},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),f.value.show?(t.openBlock(),t.createBlock(Xn,{key:1,name:"align",type:"select",title:t.unref(l)("align"),tooltip:e.config.tooltip,"select-config":f.value.selectConfig,leftBorder:f.value.leftBorder,rightBorder:f.value.rightBorder,color:e.color,active:f.value.active,disabled:f.value.disabled,onOperate:ee},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"align-left"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),v.value.show?(t.openBlock(),t.createBlock(Xn,{key:2,name:"orderList",title:t.unref(l)("orderList"),tooltip:e.config.tooltip,leftBorder:v.value.leftBorder,rightBorder:v.value.rightBorder,color:e.color,active:v.value.active,disabled:v.value.disabled,onOperate:Z},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"list-ordered"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),b.value.show?(t.openBlock(),t.createBlock(Xn,{key:3,name:"unorderList",title:t.unref(l)("unorderList"),tooltip:e.config.tooltip,leftBorder:b.value.leftBorder,rightBorder:b.value.rightBorder,color:e.color,active:b.value.active,disabled:b.value.disabled,onOperate:Z},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"list-unordered"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),w.value.show?(t.openBlock(),t.createBlock(Xn,{key:4,name:"task",title:t.unref(l)("task"),tooltip:e.config.tooltip,leftBorder:w.value.leftBorder,rightBorder:w.value.rightBorder,color:e.color,active:w.value.active,disabled:w.value.disabled,onOperate:X},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"task"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),x.value.show?(t.openBlock(),t.createBlock(Xn,{key:5,name:"bold",title:t.unref(l)("bold"),tooltip:e.config.tooltip,leftBorder:x.value.leftBorder,rightBorder:x.value.rightBorder,color:e.color,active:x.value.active,disabled:x.value.disabled,onOperate:Q},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"bold"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),k.value.show?(t.openBlock(),t.createBlock(Xn,{key:6,name:"italic",title:t.unref(l)("italic"),tooltip:e.config.tooltip,leftBorder:k.value.leftBorder,rightBorder:k.value.rightBorder,color:e.color,active:k.value.active,disabled:k.value.disabled,onOperate:Y},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"italic"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),E.value.show?(t.openBlock(),t.createBlock(Xn,{key:7,name:"strikethrough",title:t.unref(l)("strikethrough"),tooltip:e.config.tooltip,leftBorder:E.value.leftBorder,rightBorder:E.value.rightBorder,color:e.color,active:E.value.active,disabled:E.value.disabled,onOperate:G},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"strikethrough"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),S.value.show?(t.openBlock(),t.createBlock(Xn,{key:8,name:"underline",title:t.unref(l)("underline"),tooltip:e.config.tooltip,leftBorder:S.value.leftBorder,rightBorder:S.value.rightBorder,color:e.color,active:S.value.active,disabled:S.value.disabled,onOperate:K},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"underline"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),T.value.show?(t.openBlock(),t.createBlock(Xn,{key:9,name:"code",title:t.unref(l)("code"),tooltip:e.config.tooltip,leftBorder:T.value.leftBorder,rightBorder:T.value.rightBorder,color:e.color,active:T.value.active,disabled:T.value.disabled,onOperate:W},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"code"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),B.value.show?(t.openBlock(),t.createBlock(Xn,{key:10,name:"superscript",title:t.unref(l)("superscript"),tooltip:e.config.tooltip,leftBorder:B.value.leftBorder,rightBorder:B.value.rightBorder,color:e.color,active:B.value.active,disabled:B.value.disabled,onOperate:U},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"superscript"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),C.value.show?(t.openBlock(),t.createBlock(Xn,{key:11,name:"subscript",title:t.unref(l)("subscript"),tooltip:e.config.tooltip,leftBorder:C.value.leftBorder,rightBorder:C.value.rightBorder,color:e.color,active:C.value.active,disabled:C.value.disabled,onOperate:j},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"subscript"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),_.value.show?(t.openBlock(),t.createBlock(Xn,{key:12,name:"fontSize",type:"display",title:t.unref(l)("fontSize"),tooltip:e.config.tooltip,"display-config":_.value.displayConfig,leftBorder:_.value.leftBorder,rightBorder:_.value.rightBorder,color:e.color,active:_.value.active,disabled:_.value.disabled,onOperate:$},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),N.value.show?(t.openBlock(),t.createBlock(Xn,{key:13,name:"fontFamily",type:"display",title:t.unref(l)("fontFamily"),tooltip:e.config.tooltip,"display-config":N.value.displayConfig,leftBorder:N.value.leftBorder,rightBorder:N.value.rightBorder,color:e.color,active:N.value.active,disabled:N.value.disabled,onOperate:V},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),M.value.show?(t.openBlock(),t.createBlock(Xn,{key:14,name:"lineHeight",type:"display",title:t.unref(l)("lineHeight"),tooltip:e.config.tooltip,"display-config":M.value.displayConfig,leftBorder:M.value.leftBorder,rightBorder:M.value.rightBorder,color:e.color,active:M.value.active,disabled:M.value.disabled,onOperate:H},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),A.value.show?(t.openBlock(),t.createBlock(Xn,{key:15,name:"foreColor",type:"select",title:t.unref(l)("foreColor"),tooltip:e.config.tooltip,"select-config":A.value.selectConfig,leftBorder:A.value.leftBorder,rightBorder:A.value.rightBorder,color:e.color,active:A.value.active,disabled:A.value.disabled,hideScroll:"",ref_key:"foreColorRef",ref:d},{layer:t.withCtx((({options:r})=>[t.createVNode(ia,{tooltip:e.config.tooltip,color:e.color,value:A.value.value,onChange:q,data:r},null,8,["tooltip","color","value","data"])])),default:t.withCtx((()=>[t.createVNode(Vn,{value:"font-color"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),O.value.show?(t.openBlock(),t.createBlock(Xn,{key:16,name:"backColor",type:"select",title:t.unref(l)("backColor"),tooltip:e.config.tooltip,"select-config":O.value.selectConfig,leftBorder:O.value.leftBorder,rightBorder:O.value.rightBorder,color:e.color,active:O.value.active,disabled:O.value.disabled,hideScroll:"",ref_key:"backColorRef",ref:u},{layer:t.withCtx((({options:r})=>[t.createVNode(ia,{tooltip:e.config.tooltip,color:e.color,value:O.value.value,onChange:P,data:r},null,8,["tooltip","color","value","data"])])),default:t.withCtx((()=>[t.createVNode(Vn,{value:"brush"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),R.value.show?(t.openBlock(),t.createBlock(Xn,{key:17,name:"formatClear",title:t.unref(l)("formatClear"),tooltip:e.config.tooltip,leftBorder:R.value.leftBorder,rightBorder:R.value.rightBorder,color:e.color,active:R.value.active,disabled:R.value.disabled,onOperate:F},{default:t.withCtx((()=>[t.createVNode(Vn,{value:"format-clear"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],4)])),_:1},8,["modelValue","node","useRange"]))}}),[["__scopeId","data-v-c1aa741f"]]),ga={color:{type:String,default:""},text:{type:String,default:""}},fa={class:"editify-link"},va={class:"editify-link-label"},ba=["placeholder"],ya=["placeholder"],wa={class:"editify-link-footer"},xa={class:"editify-link-operations"},ka=Rn(t.defineComponent({name:"InsertLink",__name:"insertLink",props:ga,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(""),s=t.ref(!1);t.watch((()=>n.text),(e=>{l.value=e}),{immediate:!0});const c=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},d=e=>{e.currentTarget.style.borderColor=""},u=()=>{a("insert",l.value,i.value,s.value)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",fa,[t.createElementVNode("div",va,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkTextEnterPlaceholder"),"onUpdate:modelValue":r[0]||(r[0]=e=>l.value=e),type:"text"},null,40,ba),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":r[1]||(r[1]=e=>i.value=e),type:"url"},null,40,ya),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",wa,[t.createVNode(ta,{modelValue:s.value,"onUpdate:modelValue":r[2]||(r[2]=e=>s.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",xa,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:u},t.toDisplayString(t.unref(o)("insertLink")),5)])])]))}}),[["__scopeId","data-v-9f80e392"]]),Ea={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}},Sa={class:"editify-image"},Ta={class:"editify-image-header"},Ba={key:0,class:"editify-image-remote"},Ca=["placeholder"],_a={key:1,class:"editify-image-upload"},Na=["multiple"],Ma=Rn(t.defineComponent({name:"InsertImage",__name:"insertImage",props:Ea,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:n.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},u=e=>{e.currentTarget.style.borderColor=""},h=()=>{a("insert",[l.value])},m=async e=>{const t=e.currentTarget,r=t.files;if(!r||!r.length)return;let o=[];for(let a=0;a<r.length;a++){const e=r[a],t=c(e);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?n.maxSize&&e.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",e):n.minSize&&e.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",e):o.push(e):"function"==typeof n.handleError&&n.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(o)||[];else for(let t=0;t<o.length;t++){const r=await ce.dataFileToBase64(o[t]);e.push(r)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",Sa,[t.createElementVNode("div",Ta,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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",Ba,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("imageUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Ca),[[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:h},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",_a,[t.createVNode(Vn,{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"image/*",onChange:m,type:"file"},null,40,Na)]))]))}}),[["__scopeId","data-v-b63a5bff"]]),Aa={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}},Oa={class:"editify-video"},Ra={class:"editify-video-header"},za={key:0,class:"editify-video-remote"},Ia=["placeholder"],La={key:1,class:"editify-video-upload"},Da=["multiple"],Fa=Rn(t.defineComponent({name:"InsertVideo",__name:"insertVideo",props:Aa,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:n.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},u=e=>{e.currentTarget.style.borderColor=""},h=()=>{a("insert",[l.value])},m=async e=>{const t=e.currentTarget,r=t.files;if(!r||!r.length)return;let o=[];for(let a=0;a<r.length;a++){const e=r[a],t=c(e);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?n.maxSize&&e.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",e):n.minSize&&e.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",e):o.push(e):"function"==typeof n.handleError&&n.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(o)||[];else for(let t=0;t<o.length;t++){const r=await ce.dataFileToBase64(o[t]);e.push(r)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",Oa,[t.createElementVNode("div",Ra,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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",za,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("videoUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Ia),[[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:h},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",La,[t.createVNode(Vn,{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"video/*",onChange:m,type:"file"},null,40,Da)]))]))}}),[["__scopeId","data-v-4383bae9"]]),Pa={color:{type:String,default:""},maxRows:{type:Number,default:10},maxColumns:{type:Number,default:10}},qa={class:"editify-table"},Ha=["onMouseenter","onClick"],Va=[(e=>(t.pushScopeId("data-v-9a40c4f5"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,null,-1)))],$a={class:"editify-table-footer"},Ua={key:0},ja={key:1},Wa=Rn(t.defineComponent({name:"InsertTable",__name:"insertTable",props:Pa,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref((()=>{const e=[];for(let t=1;t<=n.maxRows;t++){let r=[];for(let e=1;e<=n.maxColumns;e++)r.push({x:t,y:e,inside:!1});e.push(r)}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,r)=>(t.openBlock(),t.createElementBlock("div",qa,[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 r=i.value[t];for(let n in r)r[n].x<=e.x&&r[n].y<=e.y?i.value[t][n].inside=!0:i.value[t][n].inside=!1}})(e),onClick:t=>{var r;a("insert",(r=e).x,r.y)}},Va,42,Ha)))),256))])))),256))]),t.createElementVNode("div",$a,[l.value?(t.openBlock(),t.createElementBlock("span",Ua,t.toDisplayString(l.value.x)+" x "+t.toDisplayString(l.value.y),1)):(t.openBlock(),t.createElementBlock("span",ja,t.toDisplayString(t.unref(o)("insertTable")),1))])]))}}),[["__scopeId","data-v-9a40c4f5"]]),Ka={config:{type:Object,default:null},color:{type:String,default:""}},Ga=["data-editify-mode"],Za=Rn(t.defineComponent({name:"Menu",__name:"menu",props:Ka,setup(e,{expose:r}){const n=e,a=t.inject("$editTrans"),o=t.inject("editify"),i=t.inject("isSourceView"),l=t.inject("isFullScreen"),s=t.inject("canUseMenu"),c=t.inject("editor"),d=t.inject("dataRangeCaches"),u=t.inject("showBorder"),h=t.inject("pluginResultList"),m=t.ref({show:n.config.undo.show,leftBorder:n.config.undo.leftBorder,rightBorder:n.config.undo.rightBorder,active:!1,disabled:!1}),p=t.ref({show:n.config.redo.show,leftBorder:n.config.redo.leftBorder,rightBorder:n.config.redo.rightBorder,active:!1,disabled:!1}),g=t.ref({show:n.config.heading.show,displayConfig:{options:n.config.heading.options,value:"",width:n.config.heading.width,maxHeight:n.config.heading.maxHeight},defaultValue:n.config.heading.defaultValue,leftBorder:n.config.heading.leftBorder,rightBorder:n.config.heading.rightBorder,active:!1,disabled:!1}),f=t.ref({show:n.config.indent.show,selectConfig:{options:n.config.indent.options,value:"",width:n.config.indent.width,maxHeight:n.config.indent.maxHeight},leftBorder:n.config.indent.leftBorder,rightBorder:n.config.indent.rightBorder,active:!1,disabled:!1}),v=t.ref({show:n.config.quote.show,leftBorder:n.config.quote.leftBorder,rightBorder:n.config.quote.rightBorder,active:!1,disabled:!1}),b=t.ref({show:n.config.separator.show,leftBorder:n.config.separator.leftBorder,rightBorder:n.config.separator.rightBorder,active:!1,disabled:!1}),y=t.ref({show:n.config.align.show,selectConfig:{options:n.config.align.options,width:n.config.align.width,maxHeight:n.config.align.maxHeight},leftBorder:n.config.align.leftBorder,rightBorder:n.config.align.rightBorder,active:!1,disabled:!1}),w=t.ref({show:n.config.orderList.show,leftBorder:n.config.orderList.leftBorder,rightBorder:n.config.orderList.rightBorder,active:!1,disabled:!1}),x=t.ref({show:n.config.unorderList.show,leftBorder:n.config.unorderList.leftBorder,rightBorder:n.config.unorderList.rightBorder,active:!1,disabled:!1}),k=t.ref({show:n.config.task.show,leftBorder:n.config.task.leftBorder,rightBorder:n.config.task.rightBorder,active:!1,disabled:!1}),E=t.ref({show:n.config.bold.show,leftBorder:n.config.bold.leftBorder,rightBorder:n.config.bold.rightBorder,active:!1,disabled:!1}),S=t.ref({show:n.config.underline.show,leftBorder:n.config.underline.leftBorder,rightBorder:n.config.underline.rightBorder,active:!1,disabled:!1}),T=t.ref({show:n.config.italic.show,leftBorder:n.config.italic.leftBorder,rightBorder:n.config.italic.rightBorder,active:!1,disabled:!1}),B=t.ref({show:n.config.strikethrough.show,leftBorder:n.config.strikethrough.leftBorder,rightBorder:n.config.strikethrough.rightBorder,active:!1,disabled:!1}),C=t.ref({show:n.config.code.show,leftBorder:n.config.code.leftBorder,rightBorder:n.config.code.rightBorder,active:!1,disabled:!1}),_=t.ref({show:n.config.super.show,leftBorder:n.config.super.leftBorder,rightBorder:n.config.super.rightBorder,active:!1,disabled:!1}),N=t.ref({show:n.config.sub.show,leftBorder:n.config.sub.leftBorder,rightBorder:n.config.sub.rightBorder,active:!1,disabled:!1}),M=t.ref({show:n.config.formatClear.show,leftBorder:n.config.formatClear.leftBorder,rightBorder:n.config.formatClear.rightBorder,active:!1,disabled:!1}),A=t.ref({show:n.config.fontSize.show,displayConfig:{options:n.config.fontSize.options,value:"",width:n.config.fontSize.width,maxHeight:n.config.fontSize.maxHeight},defaultValue:n.config.fontSize.defaultValue,leftBorder:n.config.fontSize.leftBorder,rightBorder:n.config.fontSize.rightBorder,active:!1,disabled:!1}),O=t.ref({show:n.config.fontFamily.show,displayConfig:{options:n.config.fontFamily.options,value:"",width:n.config.fontFamily.width,maxHeight:n.config.fontFamily.maxHeight},defaultValue:n.config.fontFamily.defaultValue,leftBorder:n.config.fontFamily.leftBorder,rightBorder:n.config.fontFamily.rightBorder,active:!1,disabled:!1}),R=t.ref({show:n.config.lineHeight.show,displayConfig:{options:n.config.lineHeight.options,value:"",width:n.config.lineHeight.width,maxHeight:n.config.lineHeight.maxHeight},defaultValue:n.config.lineHeight.defaultValue,leftBorder:n.config.lineHeight.leftBorder,rightBorder:n.config.lineHeight.rightBorder,active:!1,disabled:!1}),z=t.ref({show:n.config.foreColor.show,selectConfig:{options:n.config.foreColor.options},leftBorder:n.config.foreColor.leftBorder,rightBorder:n.config.foreColor.rightBorder,value:"",active:!1,disabled:!1}),I=t.ref({show:n.config.backColor.show,selectConfig:{options:n.config.backColor.options},leftBorder:n.config.backColor.leftBorder,rightBorder:n.config.backColor.rightBorder,value:"",active:!1,disabled:!1}),L=t.ref({show:n.config.link.show,leftBorder:n.config.link.leftBorder,rightBorder:n.config.link.rightBorder,active:!1,disabled:!1,text:""}),D=t.ref({show:n.config.image.show,leftBorder:n.config.image.leftBorder,rightBorder:n.config.image.rightBorder,active:!1,disabled:!1,allowedFileType:n.config.image.allowedFileType,multiple:n.config.image.multiple,maxSize:n.config.image.maxSize,minSize:n.config.image.minSize,handleError:n.config.image.handleError,customUpload:n.config.image.customUpload}),F=t.ref({show:n.config.video.show,leftBorder:n.config.video.leftBorder,rightBorder:n.config.video.rightBorder,active:!1,disabled:!1,allowedFileType:n.config.video.allowedFileType,multiple:n.config.video.multiple,maxSize:n.config.video.maxSize,minSize:n.config.video.minSize,handleError:n.config.video.handleError,customUpload:n.config.video.customUpload}),P=t.ref({show:n.config.table.show,leftBorder:n.config.table.leftBorder,rightBorder:n.config.table.rightBorder,active:!1,disabled:!1,maxRows:n.config.table.maxRows,maxColumns:n.config.table.maxColumns}),q=t.ref({show:n.config.codeBlock.show,leftBorder:n.config.codeBlock.leftBorder,rightBorder:n.config.codeBlock.rightBorder,active:!1,disabled:!1}),H=t.ref({show:n.config.sourceView.show,leftBorder:n.config.sourceView.leftBorder,rightBorder:n.config.sourceView.rightBorder,active:!1,disabled:!1}),V=t.ref({show:n.config.fullScreen.show,leftBorder:n.config.fullScreen.leftBorder,rightBorder:n.config.fullScreen.rightBorder,active:!1,disabled:!1}),$=t.computed((()=>o.props.disabled||!s.value)),U=t.computed((()=>{let e={};return h.value.forEach((t=>{t.menu&&(e[t.name]=t.menu.sequence)})),e=Rr(e,n.config.sequence),Object.keys(e).sort(((t,r)=>e[t]>e[r]?1:-1))})),j=t.computed((()=>e=>"sourceView"!=e&&"fullScreen"!=e&&i.value)),W=t.computed((()=>(l.value||o.props.autoheight)&&"fixed"==n.config.mode?"default":n.config.mode)),K=t.computed((()=>"fixed"!=W.value&&u.value)),G=t.computed((()=>{let e={};return h.value.forEach((t=>{t.menu&&(e[t.name]=t.menu.extend)})),Rr(e,n.config.extends)})),Z=(e,t)=>{if(!$.value&&c.value.range)if("undo"==e)o.exposed.undo();else if("redo"==e)o.exposed.redo();else if("heading"==e)un(c.value,d.value,a,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("indent"==e)"indent-increase"==t?hn(c.value,d.value):"indent-decrease"==t&&mn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("quote"==e)pn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("separator"==e)_n(c.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("align"==e)gn(c.value,d.value,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("orderList"==e)fn(c.value,d.value,!0),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("unorderList"==e)fn(c.value,d.value,!1),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("task"==e)vn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("bold"==e)nn(c.value,d.value,"font-weight","bold")||nn(c.value,d.value,"font-weight","700")?wn(c.value,d.value,["font-weight"]):bn(c.value,d.value,{"font-weight":"bold"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("underline"==e)nn(c.value,d.value,"text-decoration","underline")||nn(c.value,d.value,"text-decoration-line","underline")?wn(c.value,d.value,["text-decoration","text-decoration-line"]):bn(c.value,d.value,{"text-decoration":"underline"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("italic"==e)nn(c.value,d.value,"font-style","italic")?wn(c.value,d.value,["font-style"]):bn(c.value,d.value,{"font-style":"italic"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("strikethrough"==e)nn(c.value,d.value,"text-decoration","line-through")||nn(c.value,d.value,"text-decoration-line","line-through")?wn(c.value,d.value,["text-decoration","text-decoration-line"]):bn(c.value,d.value,{"text-decoration":"line-through"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("code"==e)an(c.value,d.value,"data-editify-code")?xn(c.value,d.value,["data-editify-code"]):yn(c.value,d.value,{"data-editify-code":!0}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("super"==e)nn(c.value,d.value,"vertical-align","super")?wn(c.value,d.value,["vertical-align"]):bn(c.value,d.value,{"vertical-align":"super"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("sub"==e)nn(c.value,d.value,"vertical-align","sub")?wn(c.value,d.value,["vertical-align"]):bn(c.value,d.value,{"vertical-align":"sub"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("formatClear"==e)wn(c.value,d.value),xn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("fontSize"==e)bn(c.value,d.value,{"font-size":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("fontFamily"==e)bn(c.value,d.value,{"font-family":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("lineHeight"==e)kn(c.value,d.value,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("foreColor"==e)bn(c.value,d.value,{color:t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("backColor"==e)bn(c.value,d.value,{"background-color":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("link"==e){if(!t.url)return;En(c.value,t.text,t.url,t.newOpen),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else if("image"==e){if(!t)return;const e=t.filter((e=>!!e));if(0==e.length)return;e.forEach((e=>{Sn(c.value,e)})),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else if("video"==e){if(!t)return;const e=t.filter((e=>!!e));if(0==e.length)return;e.forEach((e=>{Tn(c.value,e)})),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else"table"==e?(Bn(c.value,t.row,t.column),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()):"codeBlock"==e?(Cn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()):"sourceView"==e?(i.value=!i.value,H.value.active=i.value,i.value||c.value.rangeRender()):"fullScreen"==e&&(l.value=!l.value,V.value.active=l.value,c.value.rangeRender())},X=t.defineComponent((e=>{const r=t.getCurrentInstance(),o={tooltip:n.config.tooltip,name:e.name};return()=>{if("undo"==o.name&&m.value.show)return t.h(Xn,{...o,title:a("undo"),leftBorder:m.value.leftBorder,rightBorder:m.value.rightBorder,disabled:m.value.disabled||e.disabled||$.value,color:n.color,active:m.value.active,onOperate:Z},(()=>t.h(Vn,{value:"undo"})));if("redo"==o.name&&p.value.show)return t.h(Xn,{...o,title:a("redo"),leftBorder:p.value.leftBorder,rightBorder:p.value.rightBorder,disabled:p.value.disabled||e.disabled||$.value,color:n.color,active:p.value.active,onOperate:Z},(()=>t.h(Vn,{value:"redo"})));if("heading"==o.name&&g.value.show)return t.h(Xn,{...o,type:"display",displayConfig:g.value.displayConfig,title:a("heading"),leftBorder:g.value.leftBorder,rightBorder:g.value.rightBorder,color:n.color,disabled:g.value.disabled||e.disabled||$.value,active:g.value.active,onOperate:Z});if("indent"==o.name&&f.value.show)return t.h(Xn,{...o,type:"select",selectConfig:f.value.selectConfig,title:a("indent"),leftBorder:f.value.leftBorder,rightBorder:f.value.rightBorder,color:n.color,disabled:f.value.disabled||e.disabled||$.value,active:f.value.active,onOperate:Z},(()=>t.h(Vn,{value:"indent-increase"})));if("quote"==o.name&&v.value.show)return t.h(Xn,{...o,title:a("quote"),leftBorder:v.value.leftBorder,rightBorder:v.value.rightBorder,color:n.color,disabled:v.value.disabled||e.disabled||$.value,active:v.value.active,onOperate:Z},(()=>t.h(Vn,{value:"quote"})));if("separator"==o.name&&b.value.show)return t.h(Xn,{...o,title:a("separator"),leftBorder:b.value.leftBorder,rightBorder:b.value.rightBorder,color:n.color,disabled:b.value.disabled||e.disabled||$.value,active:b.value.active,onOperate:Z},(()=>t.h(Vn,{value:"separator"})));if("align"==o.name&&y.value.show)return t.h(Xn,{...o,type:"select",selectConfig:y.value.selectConfig,title:a("align"),leftBorder:y.value.leftBorder,rightBorder:y.value.rightBorder,color:n.color,disabled:y.value.disabled||e.disabled||$.value,active:y.value.active,onOperate:Z},(()=>t.h(Vn,{value:"align-left"})));if("orderList"==o.name&&w.value.show)return t.h(Xn,{...o,title:a("orderList"),leftBorder:w.value.leftBorder,rightBorder:w.value.rightBorder,color:n.color,disabled:w.value.disabled||e.disabled||$.value,active:w.value.active,onOperate:Z},(()=>t.h(Vn,{value:"list-ordered"})));if("unorderList"==o.name&&x.value.show)return t.h(Xn,{...o,title:a("unorderList"),leftBorder:x.value.leftBorder,rightBorder:x.value.rightBorder,color:n.color,disabled:x.value.disabled||e.disabled||$.value,active:x.value.active,onOperate:Z},(()=>t.h(Vn,{value:"list-unordered"})));if("task"==o.name&&k.value.show)return t.h(Xn,{...o,title:a("task"),leftBorder:k.value.leftBorder,rightBorder:k.value.rightBorder,color:n.color,disabled:k.value.disabled||e.disabled||$.value,active:k.value.active,onOperate:Z},(()=>t.h(Vn,{value:"task"})));if("bold"==o.name&&E.value.show)return t.h(Xn,{...o,title:a("bold"),leftBorder:E.value.leftBorder,rightBorder:E.value.rightBorder,color:n.color,disabled:E.value.disabled||e.disabled||$.value,active:E.value.active,onOperate:Z},(()=>t.h(Vn,{value:"bold"})));if("underline"==o.name&&S.value.show)return t.h(Xn,{...o,title:a("underline"),leftBorder:S.value.leftBorder,rightBorder:S.value.rightBorder,color:n.color,disabled:S.value.disabled||e.disabled||$.value,active:S.value.active,onOperate:Z},(()=>t.h(Vn,{value:"underline"})));if("italic"==o.name&&T.value.show)return t.h(Xn,{...o,title:a("italic"),leftBorder:T.value.leftBorder,rightBorder:T.value.rightBorder,color:n.color,disabled:T.value.disabled||e.disabled||$.value,active:T.value.active,onOperate:Z},(()=>t.h(Vn,{value:"italic"})));if("strikethrough"==o.name&&B.value.show)return t.h(Xn,{...o,title:a("strikethrough"),leftBorder:B.value.leftBorder,rightBorder:B.value.rightBorder,color:n.color,disabled:B.value.disabled||e.disabled||$.value,active:B.value.active,onOperate:Z},(()=>t.h(Vn,{value:"strikethrough"})));if("code"==o.name&&C.value.show)return t.h(Xn,{...o,title:a("code"),leftBorder:C.value.leftBorder,rightBorder:C.value.rightBorder,color:n.color,disabled:C.value.disabled||e.disabled||$.value,active:C.value.active,onOperate:Z},(()=>t.h(Vn,{value:"code"})));if("super"==o.name&&_.value.show)return t.h(Xn,{...o,title:a("superscript"),leftBorder:_.value.leftBorder,rightBorder:_.value.rightBorder,color:n.color,disabled:_.value.disabled||e.disabled||$.value,active:_.value.active,onOperate:Z},(()=>t.h(Vn,{value:"superscript"})));if("sub"==o.name&&N.value.show)return t.h(Xn,{...o,title:a("subscript"),leftBorder:N.value.leftBorder,rightBorder:N.value.rightBorder,color:n.color,disabled:N.value.disabled||e.disabled||$.value,active:N.value.active,onOperate:Z},(()=>t.h(Vn,{value:"subscript"})));if("formatClear"==o.name&&M.value.show)return t.h(Xn,{...o,title:a("formatClear"),leftBorder:M.value.leftBorder,rightBorder:M.value.rightBorder,color:n.color,disabled:M.value.disabled||e.disabled||$.value,active:M.value.active,onOperate:Z},(()=>t.h(Vn,{value:"format-clear"})));if("fontSize"==o.name&&A.value.show)return t.h(Xn,{...o,type:"display",displayConfig:A.value.displayConfig,title:a("fontSize"),leftBorder:A.value.leftBorder,rightBorder:A.value.rightBorder,color:n.color,disabled:A.value.disabled||e.disabled||$.value,active:A.value.active,onOperate:Z});if("fontFamily"==o.name&&O.value.show)return t.h(Xn,{...o,type:"display",displayConfig:O.value.displayConfig,title:a("fontFamily"),leftBorder:O.value.leftBorder,rightBorder:O.value.rightBorder,color:n.color,disabled:O.value.disabled||e.disabled||$.value,active:O.value.active,onOperate:Z});if("lineHeight"==o.name&&R.value.show)return t.h(Xn,{...o,type:"display",displayConfig:R.value.displayConfig,title:a("lineHeight"),leftBorder:R.value.leftBorder,rightBorder:R.value.rightBorder,color:n.color,disabled:R.value.disabled||e.disabled||$.value,active:R.value.active,onOperate:Z});if("foreColor"==o.name&&z.value.show)return t.h(Xn,{...o,ref:"btnRef",type:"select",selectConfig:z.value.selectConfig,title:a("foreColor"),leftBorder:z.value.leftBorder,rightBorder:z.value.rightBorder,color:n.color,disabled:z.value.disabled||e.disabled||$.value,active:z.value.active,hideScroll:!0},{default:()=>t.h(Vn,{value:"font-color"}),layer:e=>t.h(ia,{tooltip:n.config.tooltip,value:z.value.value,data:e.options,color:n.color,onChange:e=>{Z("foreColor",e);r.proxy.$refs.btnRef.show=!1}})});if("backColor"==o.name&&I.value.show)return t.h(Xn,{...o,type:"select",ref:"btnRef",selectConfig:I.value.selectConfig,title:a("backColor"),leftBorder:I.value.leftBorder,rightBorder:I.value.rightBorder,color:n.color,disabled:I.value.disabled||e.disabled||$.value,active:I.value.active,onOperate:Z,hideScroll:!0},{default:()=>t.h(Vn,{value:"brush"}),layer:e=>t.h(ia,{tooltip:n.config.tooltip,value:I.value.value,data:e.options,color:n.color,onChange:e=>{Z("backColor",e);r.proxy.$refs.btnRef.show=!1}})});if("link"==o.name&&L.value.show)return t.h(Xn,{...o,type:"select",ref:"btnRef",title:a("insertLink"),leftBorder:L.value.leftBorder,rightBorder:L.value.rightBorder,color:n.color,disabled:L.value.disabled||e.disabled||$.value,active:L.value.active,hideScroll:!0,onLayerShow:()=>{L.value.text=on(d.value)}},{default:()=>t.h(Vn,{value:"link"}),layer:()=>t.h(ka,{color:n.color,text:L.value.text,onInsert:(e,t,n)=>{Z("link",{text:e,url:t,newOpen:n});r.proxy.$refs.btnRef.show=!1}})});if("image"==o.name&&D.value.show)return t.h(Xn,{...o,type:"select",ref:"btnRef",title:a("insertImage"),leftBorder:D.value.leftBorder,rightBorder:D.value.rightBorder,color:n.color,disabled:D.value.disabled||e.disabled||$.value,active:D.value.active,hideScroll:!0},{default:()=>t.h(Vn,{value:"image"}),layer:()=>t.h(Ma,{color:n.color,allowedFileType:D.value.allowedFileType,multiple:D.value.multiple,maxSize:D.value.maxSize,minSize:D.value.minSize,customUpload:D.value.customUpload,handleError:D.value.handleError,onChange:()=>{r.proxy.$refs.btnRef.$refs.layerRef.setPosition()},onInsert:e=>{Z("image",e);r.proxy.$refs.btnRef.show=!1}})});if("video"==o.name&&F.value.show)return t.h(Xn,{...o,type:"select",ref:"btnRef",title:a("insertVideo"),leftBorder:F.value.leftBorder,rightBorder:F.value.rightBorder,color:n.color,disabled:F.value.disabled||e.disabled||$.value,active:F.value.active,hideScroll:!0},{default:()=>t.h(Vn,{value:"video"}),layer:()=>t.h(Fa,{color:n.color,allowedFileType:F.value.allowedFileType,multiple:F.value.multiple,maxSize:F.value.maxSize,minSize:F.value.minSize,customUpload:F.value.customUpload,handleError:F.value.handleError,onChange:()=>{r.proxy.$refs.btnRef.$refs.layerRef.setPosition()},onInsert:e=>{Z("video",e);r.proxy.$refs.btnRef.show=!1}})});if("table"==o.name&&P.value.show)return t.h(Xn,{...o,type:"select",ref:"btnRef",title:a("insertTable"),leftBorder:P.value.leftBorder,rightBorder:P.value.rightBorder,color:n.color,disabled:P.value.disabled||e.disabled||$.value,active:P.value.active,hideScroll:!0},{default:()=>t.h(Vn,{value:"table"}),layer:()=>t.h(Wa,{color:n.color,maxRows:P.value.maxRows,maxColumns:P.value.maxColumns,onInsert:(e,t)=>{Z("table",{row:e,column:t});r.proxy.$refs.btnRef.show=!1}})});if("codeBlock"==o.name&&q.value.show)return t.h(Xn,{...o,title:a("inserCodeBlock"),leftBorder:q.value.leftBorder,rightBorder:q.value.rightBorder,color:n.color,disabled:q.value.disabled||e.disabled||$.value,active:q.value.active,onOperate:Z},(()=>t.h(Vn,{value:"code-block"})));if("sourceView"==o.name&&H.value.show)return t.h(Xn,{...o,title:a("sourceView"),leftBorder:H.value.leftBorder,rightBorder:H.value.rightBorder,color:n.color,disabled:H.value.disabled||e.disabled||$.value,active:H.value.active,onOperate:Z},(()=>t.h(Vn,{value:"source-view"})));if("fullScreen"==o.name&&V.value.show)return t.h(Xn,{...o,title:a("fullScreen"),leftBorder:V.value.leftBorder,rightBorder:V.value.rightBorder,color:n.color,disabled:V.value.disabled||e.disabled||$.value,active:V.value.active,onOperate:Z},(()=>t.h(Vn,{value:"full-screen"})));if(ae.isObject(G.value)){const a=G.value[o.name];if(a)return t.h(Xn,{...o,ref:"btnRef",type:a.type||"default",title:a.title||"",leftBorder:a.leftBorder||!1,rightBorder:a.rightBorder||!1,disabled:a.disabled||e.disabled||$.value,hideScroll:a.hideScroll||!1,active:a.active||!1,selectConfig:{width:a.width,maxHeight:a.maxHeight,options:a.options},displayConfig:{width:a.width,maxHeight:a.maxHeight,value:a.value,options:a.options},color:n.color,onLayerShow:()=>{"function"==typeof a.onLayerShow&&a.onLayerShow(o.name,r.proxy.$refs.btnRef)},onLayerShown:()=>{"function"==typeof a.onLayerShown&&a.onLayerShown(o.name,r.proxy.$refs.btnRef)},onLayerHidden:()=>{"function"==typeof a.onLayerHidden&&a.onLayerHidden(o.name,r.proxy.$refs.btnRef)},onOperate:(e,t)=>{"function"==typeof a.onOperate&&a.onOperate(e,t,r.proxy.$refs.btnRef)}},{default:()=>a.default?a.default(o.name,r.proxy.$refs.btnRef):null,layer:()=>a.layer?a.layer(o.name,r.proxy.$refs.btnRef):null,option:()=>a.option?a.option(o.name,r.proxy.$refs.btnRef):null})}return null}}),{props:{name:String,disabled:Boolean}});return r({handleRangeUpdate:()=>{const e=Gr(c.value,d.value),t=en(c.value,d.value),r=Zr(c.value,d.value),a=Xr(c.value,d.value),o=Jr(c.value,d.value),s=Yr(c.value,d.value,!0),u=Yr(c.value,d.value,!1),b=Qr(c.value,d.value),$=tn(c.value,d.value),U=rn(c.value,d.value),j=e=>{let t=!1,r=h.value.length;for(let n=0;n<r;n++){const r=h.value[n];if(r.menu&&"function"==typeof r.menu.extraDisabled&&(t=r.menu.extraDisabled(e),t))break}return"function"==typeof n.config.extraDisabled?n.config.extraDisabled(e)||t||!1:t||!1};m.value.disabled=!c.value.history.get(-1)||j("undo"),p.value.disabled=!c.value.history.get(1)||j("redo");const W=g.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),c.value.range.anchor.isEqual(c.value.range.focus)?c.value.range.anchor.element.getBlock().parsedom==t:d.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));g.value.displayConfig.value=W?ae.isObject(W)?W.value:W:g.value.defaultValue,g.value.disabled=e||t||j("heading"),f.value.disabled=e||t||j("indent"),v.value.active=a,v.value.disabled=e||t||j("quote"),y.value.disabled=e||j("align"),w.value.active=s,w.value.disabled=e||t||j("orderList"),x.value.active=u,x.value.disabled=e||t||j("unorderList"),k.value.active=b,k.value.disabled=e||t||j("task"),E.value.active=nn(c.value,d.value,"font-weight","bold")||nn(c.value,d.value,"font-weight","700"),E.value.disabled=e||j("bold"),S.value.active=nn(c.value,d.value,"text-decoration","underline")||nn(c.value,d.value,"text-decoration-line","underline"),S.value.disabled=e||j("underline"),T.value.active=nn(c.value,d.value,"font-style","italic"),T.value.disabled=e||j("italic"),B.value.active=nn(c.value,d.value,"text-decoration","line-through")||nn(c.value,d.value,"text-decoration-line","line-through"),B.value.disabled=e||j("strikethrough"),C.value.active=an(c.value,d.value,"data-editify-code"),C.value.disabled=e||j("code"),_.value.active=nn(c.value,d.value,"vertical-align","super"),_.value.disabled=e||j("super"),N.value.active=nn(c.value,d.value,"vertical-align","sub"),N.value.disabled=e||j("sub"),M.value.disabled=e||j("formatClear");const K=A.value.displayConfig.options.find((e=>ae.isObject(e)?nn(c.value,d.value,"font-size",e.value):nn(c.value,d.value,"font-size",e)));A.value.displayConfig.value=K?ae.isObject(K)?K.value:K:A.value.defaultValue,A.value.disabled=e||j("fontSize");const G=O.value.displayConfig.options.find((e=>ae.isObject(e)?nn(c.value,d.value,"font-family",e.value):nn(c.value,d.value,"font-family",e)));O.value.displayConfig.value=G?ae.isObject(G)?G.value:G:O.value.defaultValue,O.value.disabled=e||j("fontFamily");const Z=R.value.displayConfig.options.find((e=>{let t=e;if(ae.isObject(e)&&(t=e.value),c.value.range.anchor.isEqual(c.value.range.focus)){const e=c.value.range.anchor.element.getBlock();return e.hasStyles()&&e.styles["line-height"]==t}return d.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const r=e.element.getBlock(),n=e.element.getInblock();return n?n.hasStyles()&&n.styles["line-height"]==t:r.hasStyles()&&r.styles["line-height"]==t}))}));R.value.displayConfig.value=Z?ae.isObject(Z)?Z.value:Z:R.value.defaultValue,R.value.disabled=e||j("lineHeight");const X=z.value.selectConfig.options.find((e=>ae.isObject(e)?nn(c.value,d.value,"color",e.value):nn(c.value,d.value,"color",e)));z.value.value=X?ae.isObject(X)?X.value:X:"",z.value.disabled=e||j("foreColor");const Y=I.value.selectConfig.options.find((e=>ae.isObject(e)?nn(c.value,d.value,"background-color",e.value):nn(c.value,d.value,"background-color",e)));I.value.value=Y?ae.isObject(Y)?Y.value:Y:"",I.value.disabled=e||j("backColor"),L.value.disabled=o||e||j("link"),D.value.disabled=e||j("image"),F.value.disabled=e||j("video"),P.value.disabled=e||t||r||j("table"),q.value.active=1==$r(c.value,d.value,{parsedom:"pre"}).length,q.value.disabled=t||r||$||U||j("codeBlock"),H.value.active=i.value,V.value.active=l.value}}),(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-menu",{"editify-border":K.value,"editify-source":t.unref(i)&&"inner"==W.value,"editify-fullscreen":t.unref(l)}]),"data-editify-mode":W.value,style:t.normalizeStyle(e.config.style||"")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value,(e=>(t.openBlock(),t.createBlock(t.unref(X),{name:e,disabled:j.value(e)},null,8,["name","disabled"])))),256))],14,Ga))}}),[["__scopeId","data-v-6c75ad6c"]]),Xa={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=>ae.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},tab:{type:Boolean,default:!0},plugins:{type:Array,default:function(){return[]}}},Ya={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",superscript:"Superscript",subscript:"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"},Qa={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:"行内代码",superscript:"上标",subscript:"下标",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语法"},Ja=["data-editify-uid"],eo=["data-editify-placeholder"],to=["value"],ro={class:"editify-footer-words"},no=Rn(t.defineComponent({name:"editify",__name:"editify",props:Xa,emits:["update:modelValue","focus","blur","change","keydown","keyup","insertparagraph","rangeupdate","updateview"],setup(e,{expose:r,emit:n}){const a=t.getCurrentInstance(),o=e,i=n,l=(s=o.locale||"zh_CN",e=>({zh_CN:Qa,en_US:Ya}[s][e]));var s;const c=t.ref(!1),d=t.ref(!1),u=t.ref(null),h=t.ref({element:null,start:0}),m=t.ref({show:!1,node:null,type:"text"}),p=t.ref(null),g=t.ref(null),f=t.ref(null),v=t.ref(null),b=t.ref(null),w=t.ref(null),x=t.ref(null),k=t.ref(!1),E=t.ref(!1),S=t.ref(!1),T=t.ref({flatList:[],list:[]}),B=t.computed({set(e){i("update:modelValue",e)},get:()=>o.modelValue||"<p><br></p>"}),C=t.computed((()=>te.string2dom(`<div>${B.value}</div>`).innerText)),_=t.computed((()=>!(!(x.value&&B.value&&1==x.value.stack.length&&"block"==x.value.stack[0].type&&x.value.stack[0].parsedom==y.BLOCK_NODE&&x.value.stack[0].isOnlyHasBreak())||x.value.stack[0].hasStyles()||x.value.stack[0].hasMarks())&&!d.value)),N=t.computed((()=>!E.value&&o.border)),M=t.computed((()=>{return Rr((e=l,t=o.locale,{use:!0,style:null,tooltip:!0,codeBlock:{languages:{show:!0,options:[{label:e("autoRecognize"),value:""},...Or],width:120,maxHeight:180,leftBorder:!0,rightBorder:!1}},text:{heading:{show:!0,options:Lr(e).heading,defaultValue:"p",width:"en_US"==t?150:130,maxHeight:"",leftBorder:!1,rightBorder:!0},align:{show:!1,options:Lr(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!1,rightBorder:!1},orderList:{show:!1,leftBorder:!1,rightBorder:!1},unorderList:{show:!1,leftBorder:!1,rightBorder:!1},task:{show:!1,leftBorder:!1,rightBorder:!1},bold:{show:!0,leftBorder:!1,rightBorder:!1},italic:{show:!0,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,leftBorder:!1,rightBorder:!1},underline:{show:!0,leftBorder:!1,rightBorder:!1},code:{show:!0,leftBorder:!1,rightBorder:!1},super:{show:!1,leftBorder:!1,rightBorder:!1},sub:{show:!1,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,options:Lr(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!1,options:Lr(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},lineHeight:{show:!1,options:Lr(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1},foreColor:{show:!0,options:Lr(e).foreColor,leftBorder:!1,rightBorder:!1},backColor:{show:!0,options:Lr(e).backColor,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,leftBorder:!0,rightBorder:!1}},extraDisabled:null}),o.toolbar||{});var e,t})),A=t.computed((()=>{const e=[];return o.plugins.forEach((t=>{let r=t(a,l);e.push(r)})),e})),O=t.computed((()=>{return Rr((e=l,t=o.locale,{use:!0,tooltip:!0,mode:"default",extraDisabled:null,style:null,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,sourceView:28,fullScreen:29},undo:{show:!0,leftBorder:!1,rightBorder:!1},redo:{show:!0,leftBorder:!1,rightBorder:!1},heading:{show:!0,options:Lr(e).heading,defaultValue:"p",width:"en_US"==t?150:130,maxHeight:"",leftBorder:!0,rightBorder:!1},indent:{show:!0,options:Lr(e).indent,width:"en_US"==t?150:110,maxHeight:"",leftBorder:!1,rightBorder:!1},quote:{show:!0,leftBorder:!1,rightBorder:!1},separator:{show:!0,leftBorder:!1,rightBorder:!1},align:{show:!0,options:Lr(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!0,rightBorder:!1},orderList:{show:!0,leftBorder:!1,rightBorder:!1},unorderList:{show:!0,leftBorder:!1,rightBorder:!1},task:{show:!0,leftBorder:!1,rightBorder:!1},bold:{show:!0,leftBorder:!0,rightBorder:!1},underline:{show:!0,leftBorder:!1,rightBorder:!1},italic:{show:!0,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,leftBorder:!1,rightBorder:!1},code:{show:!0,leftBorder:!1,rightBorder:!1},super:{show:!0,leftBorder:!1,rightBorder:!1},sub:{show:!0,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,options:Lr(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!0,options:Lr(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},lineHeight:{show:!0,options:Lr(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1},foreColor:{show:!0,options:Lr(e).foreColor,leftBorder:!0,rightBorder:!1},backColor:{show:!0,options:Lr(e).backColor,leftBorder:!1,rightBorder:!1},link:{show:!0,leftBorder:!0,rightBorder:!1},image:{show:!0,leftBorder:!1,rightBorder:!1,allowedFileType:["jpg","png","jpeg","webp","jfif","ico","gif","svg","psd"],multiple:!1,maxSize:null,minSize:null,customUpload:null,handleError:null},video:{show:!0,leftBorder:!1,rightBorder:!1,allowedFileType:["mp4","avi","mpg","wmv","mov","rm","swf","flv"],multiple:!1,maxSize:null,minSize:null,customUpload:null,handleError:null},table:{show:!0,leftBorder:!1,rightBorder:!1,maxRows:10,maxColumns:10},codeBlock:{show:!0,leftBorder:!1,rightBorder:!1},sourceView:{show:!1,leftBorder:!0,rightBorder:!1},fullScreen:{show:!1,leftBorder:!1,rightBorder:!1},extends:{}}),o.menu||{});var e,t})),R=e=>{c.value=!0,B.value=e,t.nextTick((()=>{c.value=!1}))},z=()=>{m.value.show=!1,m.value.node=null},I=()=>{o.disabled||k.value||(z(),t.nextTick((()=>{const e=$r(x.value,T.value,{parsedom:"table"}),t=$r(x.value,T.value,{parsedom:"pre"}),r=$r(x.value,T.value,{parsedom:"a"}),n=$r(x.value,T.value,{parsedom:"img"}),o=$r(x.value,T.value,{parsedom:"video"});if(1==r.length)m.value.type="link",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${r[0].key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(1==n.length)m.value.type="image",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n[0].key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(1==o.length)m.value.type="video",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${o[0].key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(1==e.length)m.value.type="table",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e[0].key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(1==t.length)m.value.type="codeBlock",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t[0].key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else{!T.value.flatList.filter((e=>e.element.isText())).length||en(x.value,T.value)||Gr(x.value,T.value)||Jr(x.value,T.value)||tn(x.value,T.value)||rn(x.value,T.value)||(m.value.type="text",m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0)}})))},L=()=>{let e=[];A.value.forEach((t=>{t.renderRule&&e.push(t.renderRule)}));let t=[...o.extraKeepTags];A.value.forEach((e=>{e.extraKeepTags&&Array.isArray(e.extraKeepTags)&&e.extraKeepTags.forEach((e=>{t.includes(e)||t.push(e)}))})),x.value=new Q(f.value,{value:B.value,disabled:o.disabled,renderRules:[e=>{((e,t)=>{"ol"!=t.parsedom&&"ul"!=t.parsedom||(t.hasChildren()&&t.children.forEach((r=>{const n=r.clone();n.parsedom="div",n.type=t.type,n.hasMarks()?n.marks["data-editify-list"]=t.parsedom:n.marks={"data-editify-list":t.parsedom},e.addElementBefore(n,t)})),t.toEmpty())})(x.value,e)},e=>{((e,t)=>{if(Wr(t,!0)){const r=e.getPreviousElement(t);if(r&&Wr(r,!0)){const e=Number(r.marks["data-editify-value"]);t.marks["data-editify-value"]=e+1}else t.marks["data-editify-value"]=1}})(x.value,e)},e=>{((e,t)=>{if("img"==t.parsedom||"video"==t.parsedom||"a"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}if("video"==t.parsedom||"hr"==t.parsedom){const r=e.getPreviousElement(t),n=e.getNextElement(t);if(!r||!r.isSpaceText()){const r=y.getSpaceElement();e.addElementBefore(r,t)}if(!n||!n.isSpaceText()){const r=y.getSpaceElement();e.addElementAfter(r,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))}if("code"==t.parsedom){t.parsedom="span";const e={"data-editify-code":!0};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(x.value,e)},e=>{var t;x.value,"th"==(t=e).parsedom&&(t.parsedom="td")},e=>{Nn(x.value,e)},e=>{((e,t)=>{if("td"==t.parsedom&&t.hasMarks()&&t.marks["data-editify-merged"]&&e.range){const r=(t,r)=>{let n=!1,a=e.getPreviousElement(t),o=1;for(;a;){const{colspan:t}=Pr(a);if(a.hasMarks()&&!a.marks["data-editify-merged"]&&t>o){n=!0,r(a);break}a=e.getPreviousElement(a),o++}return n},n=(t,r)=>{let n=!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}=Pr(t);if(t.hasMarks()&&!t.marks["data-editify-merged"]&&l>i){n=!0,r(t);break}o=e.getPreviousElement(o),i++}return n};t.isContains(e.range.anchor.element)&&(r(t,(t=>{e.range.anchor.moveToEnd(t)}))||n(t,(t=>{e.range.anchor.moveToEnd(t)}))),t.isContains(e.range.focus.element)&&(r(t,(t=>{e.range.focus.moveToEnd(t)}))||n(t,(t=>{e.range.focus.moveToEnd(t)})))}})(x.value,e)},e=>{var t,r,n,a,o,i,l;Mn(x.value,e,!(!(null==(t=M.value)?void 0:t.use)||!(null==(a=null==(n=null==(r=M.value)?void 0:r.codeBlock)?void 0:n.languages)?void 0:a.show)),null==(l=null==(i=null==(o=M.value)?void 0:o.codeBlock)?void 0:i.languages)?void 0:l.options)},e=>{((e,t)=>{t.hasChildren()&&t.children.forEach((r=>{if(Wr(r,!0)||Wr(r,!1)||Kr(r)||["blockquote","pre","table","h1","h2","h3","h4","h5","h6","p"].includes(r.parsedom)){const n=r.clone();n.type="block";const a=t.getBlock();e.addElementAfter(n,a),r.toEmpty()}}))})(x.value,e)},...e,...o.renderRules],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:$,customParseNode:U,extraKeepTags:t}),R(x.value.value),x.value.on("change",G),x.value.on("focus",X),x.value.on("blur",Z),x.value.on("keydown",j),x.value.on("keyup",W),x.value.on("insertParagraph",Y),x.value.on("rangeUpdate",ee),x.value.on("deleteInStart",re),x.value.on("deleteComplete",ae),x.value.on("afterRender",oe),x.value.formatElementStack(),x.value.domRender(),!o.autofocus||k.value||o.disabled||ie()},D=()=>{f.value.querySelectorAll("video").forEach((e=>{e.style.height=e.offsetWidth/o.videoRatio+"px"}))},F=e=>{if(o.disabled)return;const t=e.target,r=e;if(te.isContains(f.value,t)){const e=ne.get(t,"data-alex-editor-key");if(e){const n=x.value.getElementByKey(e);if(n)if("td"==n.parsedom){const e=n.parent.children.length;if(n.parent.children[e-1].isEqual(n))return;const a=te.getElementBounding(t);r.pageX>=Math.abs(a.left+t.offsetWidth-5)&&r.pageX<=Math.abs(a.left+t.offsetWidth+5)&&(h.value.element=n,h.value.start=r.pageX)}else if(["img","video"].includes(n.parsedom)){const e=te.getElementBounding(t);r.pageX>=Math.abs(e.left+t.offsetWidth-10)&&r.pageX<=Math.abs(e.left+t.offsetWidth)&&(h.value.element=n,h.value.start=r.pageX)}}}te.isContains(w.value,t)||k.value||(S.value=!1)},P=e=>{if(o.disabled)return;const t=e,r=e.target;if(te.isContains(f.value,r)&&["img","video"].includes(r.tagName.toLocaleLowerCase())){const e=te.getElementBounding(r);t.pageX>=Math.abs(e.left+r.offsetWidth-10)&&t.pageX<=Math.abs(e.left+r.offsetWidth)?r.style.cursor="col-resize":r.style.cursor=""}if(h.value.element)if("td"==h.value.element.parsedom){const e=$r(x.value,T.value,{parsedom:"table"});if(1!=e.length)return;const r=e[0].children.find((e=>"colgroup"==e.parsedom)),n=h.value.element.parent.children.findIndex((e=>e.isEqual(h.value.element))),a=""+(h.value.element.elm.offsetWidth+t.pageX-h.value.start);r.children[n].marks.width=a,r.children[n].elm.setAttribute("width",a),h.value.start=t.pageX}else if(["img","video"].includes(h.value.element.parsedom)){const e=h.value.element.elm.offsetWidth+t.pageX-h.value.start+"px";h.value.element.hasStyles()?h.value.element.styles.width=e:h.value.element.styles={width:e},h.value.element.elm.style.width=e,"video"==h.value.element.parsedom&&D(),h.value.start=t.pageX}},q=()=>{if(!o.disabled&&h.value.element)if("td"==h.value.element.parsedom){const e=$r(x.value,T.value,{parsedom:"table"});if(1!=e.length)return;const t=e[0].children.find((e=>"colgroup"==e.parsedom)),r=h.value.element.parent.children.findIndex((e=>e.isEqual(h.value.element))),n=parseFloat(t.children[r].marks.width);isNaN(n)||(t.children[r].marks.width=`${Number((n/h.value.element.parent.elm.offsetWidth*100).toFixed(2))}%`,x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),h.value.element=null,h.value.start=0}else if(["img","video"].includes(h.value.element.parsedom)){const e=parseFloat(h.value.element.styles.width);isNaN(e)||(h.value.element.hasStyles()?h.value.element.styles.width=`${Number((e/te.width(f.value)*100).toFixed(2))}%`:h.value.element.styles={width:`${Number((e/te.width(f.value)*100).toFixed(2))}%`},x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),h.value.element=null,h.value.start=0}},H=e=>{if(o.disabled)return;const t=e.target,r=e;if(te.isContains(f.value,t)){const e=ne.get(t,"data-alex-editor-key");if(e){const n=x.value.getElementByKey(e);if(Kr(n)){const e=te.getElementBounding(t);r.pageX>=Math.abs(e.left)&&r.pageX<=Math.abs(e.left+16)&&r.pageY>=Math.abs(e.top+t.offsetHeight/2-8)&&r.pageY<=Math.abs(e.top+t.offsetHeight/2+8)&&("checked"==n.marks["data-editify-task"]?n.marks["data-editify-task"]="uncheck":n.marks["data-editify-task"]="checked",x.value.range||x.value.initRange(),x.value.range.anchor.moveToEnd(n),x.value.range.focus.moveToEnd(n),x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender())}}}},V=async e=>{if(y.flatElements(e).forEach((e=>{if(!e.isText()){let t={},r={};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),"div"==e.parsedom&&e.marks["data-editify-list"]&&(t["data-editify-list"]=e.marks["data-editify-list"],e.marks["data-editify-value"]&&(t["data-editify-value"]=e.marks["data-editify-value"])),e.parsedom==y.TEXT_NODE&&e.marks["data-editify-code"]&&(t["data-editify-code"]=e.marks["data-editify-code"]),"div"==e.parsedom&&e.marks["data-editify-task"]&&(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"])),e.hasStyles()&&(["img","video"].includes(e.parsedom)&&e.styles.width&&(r.width=e.styles.width),(e.isBlock()||e.isInblock())&&e.styles["text-indent"]&&(r["text-indent"]=e.styles["text-indent"]),(e.isBlock()||e.isInblock())&&e.styles["text-align"]&&(r["text-align"]=e.styles["text-align"]),(e.isBlock()||e.isInblock())&&e.styles["line-height"]&&(r["line-height"]=e.styles["line-height"])),A.value.forEach((n=>{if("function"==typeof n.pasteKeepMarks){const r=n.pasteKeepMarks(e);t=Rr(t,r)}if("function"==typeof n.pasteKeepStyles){const t=n.pasteKeepStyles(e);r=Rr(r,t)}})),"function"==typeof o.pasteKeepMarks&&(t=Rr(t,o.pasteKeepMarks(e))),"function"==typeof o.pasteKeepStyles&&(r=Rr(r,o.pasteKeepStyles(e))),e.marks=t,e.styles=r}})),"function"==typeof o.customHtmlPaste)await o.customHtmlPaste(e);else for(let t=0;t<e.length;t++)0==t?x.value.insertElement(e[t]):x.value.insertElement(e[t],!1)},$=(e,t)=>{const r=t.getUneditableElement();r?r.toEmpty():(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)},U=e=>(A.value.forEach((t=>{t.customParseNode&&(e=t.customParseNode(e))})),"function"==typeof o.customParseNode&&(e=o.customParseNode(e)),e),j=(e,t)=>{o.disabled||("tab"!=t.key.toLocaleLowerCase()||t.metaKey||t.shiftKey||t.ctrlKey||t.altKey||!o.tab||(t.preventDefault(),x.value.insertText(" "),x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),i("keydown",e,t))},W=(e,t)=>{o.disabled||i("keyup",e,t)},K=e=>{if(o.disabled||k.value)return;const t=e.target;if("img"==t.nodeName.toLocaleLowerCase()||"video"==t.nodeName.toLocaleLowerCase()){const e=Number(t.getAttribute("data-editify-element"));if(J.isNumber(e)){const t=x.value.getElementByKey(e);x.value.range||x.value.initRange(),x.value.range.anchor.moveToStart(t),x.value.range.focus.moveToEnd(t),x.value.rangeRender()}}},G=(e,t)=>{o.disabled||(R(e),i("change",e,t))},Z=e=>{o.disabled||(o.border&&o.color&&!E.value&&(g.value.style.borderColor="",g.value.style.boxShadow="",O.value.use&&(p.value.$el.style.borderColor="",p.value.$el.style.boxShadow="")),i("blur",e))},X=e=>{if(!o.disabled){if(o.border&&o.color&&!E.value){g.value.style.borderColor=o.color;const e=se.hex2rgb(o.color);O.value.use&&"inner"==O.value.mode?(g.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)`,p.value.$el.style.borderColor=o.color,p.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)`):(O.value.use,g.value.style.boxShadow=`0 0 8px rgba(${e[0]},${e[1]},${e[2]},0.5)`)}setTimeout((()=>{S.value=!0,i("focus",e)}),0)}},Y=(e,t)=>{e.isEqual(t)||(t.isBlock()&&e.isBlock()&&t.isOnlyHasBreak()&&e.isOnlyHasBreak()&&t.parsedom!=y.BLOCK_NODE&&(sn(t),x.value.range.anchor.moveToStart(t),x.value.range.focus.moveToStart(t),e.toEmpty()),Kr(e)&&(e.marks["data-editify-task"]="uncheck")),i("insertparagraph",B.value)},ee=()=>{o.disabled||(S.value=!!x.value.range,x.value.range&&(T.value=x.value.getElementsByRange(),u.value&&(clearTimeout(u.value),u.value=null),u.value=setTimeout((()=>{(M.value.use||O.value.use)&&(M.value.use&&I(),O.value.use&&p.value.handleRangeUpdate())}),200),i("rangeupdate")))},re=e=>{e.isBlock()&&sn(e)},ae=()=>{const e=x.value.range.anchor.element.getUneditableElement();e&&e.toEmpty()},oe=()=>{D(),A.value.forEach((e=>{e.updateView&&e.updateView()})),i("updateview")},ie=()=>{o.disabled||(x.value.collapseToEnd(),x.value.rangeRender(),te.setScrollTop({el:f.value,number:1e6,time:0}))};return t.watch((()=>B.value),(e=>{c.value||(x.value.stack=x.value.parseHtml(e),x.value.range=null,x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender(),f.value.blur())})),t.watch((()=>k.value),(e=>{M.value.use&&(e?z():I())})),t.watch((()=>o.disabled),(e=>{e?x.value.setDisabled():x.value.setEnabled()})),t.onMounted((()=>{L(),(()=>{const e=t=>{le.on(t,`scroll.editify_${a.uid}`,(()=>{M.value.use&&m.value.show&&z()})),t.parentNode&&e(t.parentNode)};e(f.value)})(),le.on(document.documentElement,`mousedown.editify_${a.uid}`,F),le.on(document.documentElement,`mousemove.editify_${a.uid}`,P),le.on(document.documentElement,`mouseup.editify_${a.uid}`,q),le.on(document.documentElement,`click.editify_${a.uid}`,H),le.on(window,`resize.editify_${a.uid}`,D)})),t.onBeforeUnmount((()=>{(()=>{const e=t=>{le.off(t,`scroll.editify_${a.uid}`),t.parentNode&&e(t.parentNode)};e(f.value)})(),le.off(document.documentElement,`mousedown.editify_${a.uid} mousemove.editify_${a.uid} mouseup.editify_${a.uid} click.editify_${a.uid}`),le.off(window,`resize.editify_${a.uid}`),x.value.destroy()})),t.provide("$editTrans",l),t.provide("editify",a),t.provide("isSourceView",k),t.provide("isFullScreen",E),t.provide("canUseMenu",S),t.provide("editor",x),t.provide("dataRangeCaches",T),t.provide("showBorder",N),t.provide("pluginResultList",A),r({editor:x,isSourceView:k,isFullScreen:E,canUseMenu:S,dataRangeCaches:T,textValue:C,collapseToEnd:ie,collapseToStart:()=>{o.disabled||(x.value.collapseToStart(),x.value.rangeRender(),t.nextTick((()=>{te.setScrollTop({el:f.value,number:0,time:0})})))},undo:()=>{if(o.disabled)return;const e=x.value.history.get(-1);e&&(x.value.history.current=e.current,x.value.stack=e.stack,x.value.range=e.range,x.value.formatElementStack(),x.value.domRender(!0),x.value.rangeRender())},redo:()=>{if(o.disabled)return;const e=x.value.history.get(1);e&&(x.value.history.current=e.current,x.value.stack=e.stack,x.value.range=e.range,x.value.formatElementStack(),x.value.domRender(!0),x.value.rangeRender())}}),(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify",{"editify-fullscreen":E.value,"editify-autoheight":!E.value&&e.autoheight}]),ref_key:"elRef",ref:w},[O.value.use?(t.openBlock(),t.createBlock(Za,{key:0,config:O.value,color:e.color,ref_key:"menuRef",ref:p},null,8,["config","color"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"bodyRef",ref:g,class:t.normalizeClass(["editify-body",{"editify-border":N.value,"editify-menu_inner":O.value.use&&"inner"==O.value.mode}]),"data-editify-uid":t.unref(a).uid},[t.createElementVNode("div",{ref_key:"contentRef",ref:f,class:t.normalizeClass(["editify-content",{"editify-placeholder":_.value,"editify-disabled":e.disabled}]),onClick:K,onCompositionstart:r[0]||(r[0]=e=>d.value=!0),onCompositionend:r[1]||(r[1]=e=>d.value=!1),"data-editify-placeholder":e.placeholder},null,42,eo),k.value?(t.openBlock(),t.createElementBlock("textarea",{key:0,value:B.value,readonly:"",class:"editify-sourceview"},null,8,to)):t.createCommentVNode("",!0),t.createVNode(pa,{ref_key:"toolbarRef",ref:v,modelValue:m.value.show,"onUpdate:modelValue":r[2]||(r[2]=e=>m.value.show=e),node:m.value.node,type:m.value.type,config:M.value,color:e.color},null,8,["modelValue","node","type","config","color"])],10,Ja),e.showWordLength?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["editify-footer",{"editify-fullscreen":E.value&&!k.value}]),ref_key:"footerRef",ref:b},[t.createElementVNode("div",ro,t.toDisplayString(t.unref(l)("totalWordCount"))+t.toDisplayString(C.value.length),1)],2)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b4790a4c"]]),ao={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}},oo={class:"editify-attachment"},io={class:"editify-attachment-header"},lo={key:0,class:"editify-attachment-remote"},so=["placeholder"],co=["placeholder"],uo={key:1,class:"editify-attachment-upload"},ho=["placeholder"],mo=["multiple","accept"],po=Rn(t.defineComponent({name:"InsertAttachment",__name:"insertAttachment",props:ao,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,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:n.color}:{})),u=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},h=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},m=e=>{e.currentTarget.style.borderColor=""},p=()=>{a("insert",l.value,[s.value])},g=()=>{c.value.click()},f=async()=>{const e=c.value.files;if(!e||!e.length)return;let t=[];for(let r=0;r<e.length;r++){const a=e[r],o=u(a);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==o.toLocaleLowerCase()))?n.maxSize&&a.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",a):n.minSize&&a.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",a):t.push(a):"function"==typeof n.handleError&&n.handleError("suffixError",a)}if(t.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(t)||[];else for(let r=0;r<t.length;r++){const n=await ce.dataFileToBase64(t[r]);e.push(n)}a("insert",l.value,e)}c.value.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",oo,[t.createElementVNode("div",io,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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",lo,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:m,onFocus:h,type:"text"},null,40,so),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[3]||(r[3]=e=>s.value=e),placeholder:t.unref(o)("attachmentUrlPlaceholder"),onBlur:m,onFocus:h,type:"url"},null,40,co),[[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",uo,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[4]||(r[4]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:m,onFocus:h,type:"text"},null,40,ho),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-btn",onClick:g},[t.createVNode(Vn,{value:"upload"}),t.createElementVNode("input",{ref_key:"fileInputRef",ref:c,multiple:e.multiple,accept:e.accept,onChange:f,type:"file"},null,40,mo)])]))]))}}),[["__scopeId","data-v-52b1e545"]]);class go{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new go(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class fo{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 fo(t,go.range(this,e))}}class vo{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,a="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var i=o.lexer.input;r=o.start,n=o.end,r===i.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=i.slice(r,n).replace(/[^]/g,"$&̲");a+=(r>15?"…"+i.slice(r-15,r):i.slice(0,r))+l+(n+15<i.length?i.slice(n,n+15)+"…":i.slice(n))}var s=new Error(a);return s.name="ParseError",s.__proto__=vo.prototype,s.position=r,null!=r&&null!=n&&(s.length=n-r),s.rawMessage=e,s}}vo.prototype.__proto__=Error.prototype;var bo=/([A-Z])/g,yo={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},wo=/[&><"']/g;var xo=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},ko={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(wo,(e=>yo[e]))},hyphenate:function(e){return e.replace(bo,"-$1").toLowerCase()},getBaseElem:xo,isCharacterBox:function(e){var t=xo(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"}},Eo={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 So(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class To{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||{},Eo)if(Eo.hasOwnProperty(t)){var r=Eo[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:So(r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new vo("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"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 '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(a){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("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 '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=ko.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class Bo{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return Co[_o[this.id]]}sub(){return Co[No[this.id]]}fracNum(){return Co[Mo[this.id]]}fracDen(){return Co[Ao[this.id]]}cramp(){return Co[Oo[this.id]]}text(){return Co[Ro[this.id]]}isTight(){return this.size>=2}}var Co=[new Bo(0,0,!1),new Bo(1,0,!0),new Bo(2,1,!1),new Bo(3,1,!0),new Bo(4,2,!1),new Bo(5,2,!0),new Bo(6,3,!1),new Bo(7,3,!0)],_o=[4,5,4,5,6,7,6,7],No=[5,5,5,5,7,7,7,7],Mo=[2,3,4,5,6,7,6,7],Ao=[3,3,5,5,7,7,7,7],Oo=[1,1,3,3,5,5,7,7],Ro=[0,1,2,3,2,3,2,3],zo={DISPLAY:Co[0],TEXT:Co[2],SCRIPT:Co[4],SCRIPTSCRIPT:Co[6]},Io=[{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 Lo=[];function Do(e){for(var t=0;t<Lo.length;t+=2)if(e>=Lo[t]&&e<=Lo[t+1])return!0;return!1}Io.forEach((e=>e.blocks.forEach((e=>Lo.push(...e)))));var Fo=80,Po={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 qo{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 ko.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 Ho={"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]}},Vo={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]},$o={"Å":"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 Uo(e,t,r){if(!Ho[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=Ho[t][n];if(!a&&e[0]in $o&&(n=$o[e[0]].charCodeAt(0),a=Ho[t][n]),a||"text"!==r||Do(n)&&(a=Ho[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var jo={};var Wo=[[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]],Ko=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Go=function(e,t){return t.size<2?e:Wo[e-1][t.size-1]};class Zo{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||Zo.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=Ko[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 r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new Zo(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Go(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:Ko[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Go(Zo.BASESIZE,e);return this.size===t&&this.textSize===Zo.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!==Zo.BASESIZE?["sizing","reset-size"+this.size,"size"+Zo.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!jo[t=e>=5?0:e>=3?1:2]){var r=jo[t]={cssEmPerMu:Vo.quad[t]/18};for(var n in Vo)Vo.hasOwnProperty(n)&&(r[n]=Vo[n][t])}return jo[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Zo.BASESIZE=6;var Xo={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},Yo={ex:!0,em:!0,mu:!0},Qo=function(e){return"string"!=typeof e&&(e=e.unit),e in Xo||e in Yo||"ex"===e},Jo=function(e,t){var r;if(e.unit in Xo)r=Xo[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new vo("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},ei=function(e){return+e.toFixed(4)+"em"},ti=function(e){return e.filter((e=>e)).join(" ")},ri=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},ni=function(e){var t=document.createElement(e);for(var r in t.className=ti(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},ai=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+ko.escape(ti(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=ko.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+ko.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+ko.escape(this.attributes[a])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class oi{constructor(e,t,r,n){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,ri.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ko.contains(this.classes,e)}toNode(){return ni.call(this,"span")}toMarkup(){return ai.call(this,"span")}}class ii{constructor(e,t,r,n){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,ri.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return ko.contains(this.classes,e)}toNode(){return ni.call(this,"a")}toMarkup(){return ai.call(this,"a")}}class li{constructor(e,t,r){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=r}hasClass(e){return ko.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="'+ko.escape(this.src)+'" alt="'+ko.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=ko.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+ko.escape(t)+'"'),e+="'/>"}}var si={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class ci{constructor(e,t,r,n,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=r||0,this.italic=n||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<Io.length;t++)for(var r=Io[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=si[this.text])}hasClass(e){return ko.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=ei(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=ti(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=ko.escape(ti(this.classes)),t+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=ko.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+ko.escape(r)+'"');var a=ko.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a}}class di{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 r=0;r<this.children.length;r++)e.appendChild(this.children[r].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+'="'+ko.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}class ui{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",Po[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+ko.escape(this.alternate)+'"/>':'<path d="'+ko.escape(Po[this.pathName])+'"/>'}}class hi{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+'="'+ko.escape(this.attributes[t])+'"');return e+="/>"}}function mi(e){if(e instanceof ci)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var pi={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gi={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fi={math:{},text:{}};function vi(e,t,r,n,a,o){fi[e][a]={font:t,group:r,replace:n},o&&n&&(fi[e][n]=fi[e][a])}var bi="math",yi="text",wi="main",xi="ams",ki="accent-token",Ei="bin",Si="close",Ti="inner",Bi="mathord",Ci="op-token",_i="open",Ni="punct",Mi="rel",Ai="spacing",Oi="textord";vi(bi,wi,Mi,"≡","\\equiv",!0),vi(bi,wi,Mi,"≺","\\prec",!0),vi(bi,wi,Mi,"≻","\\succ",!0),vi(bi,wi,Mi,"∼","\\sim",!0),vi(bi,wi,Mi,"⊥","\\perp"),vi(bi,wi,Mi,"⪯","\\preceq",!0),vi(bi,wi,Mi,"⪰","\\succeq",!0),vi(bi,wi,Mi,"≃","\\simeq",!0),vi(bi,wi,Mi,"∣","\\mid",!0),vi(bi,wi,Mi,"≪","\\ll",!0),vi(bi,wi,Mi,"≫","\\gg",!0),vi(bi,wi,Mi,"≍","\\asymp",!0),vi(bi,wi,Mi,"∥","\\parallel"),vi(bi,wi,Mi,"⋈","\\bowtie",!0),vi(bi,wi,Mi,"⌣","\\smile",!0),vi(bi,wi,Mi,"⊑","\\sqsubseteq",!0),vi(bi,wi,Mi,"⊒","\\sqsupseteq",!0),vi(bi,wi,Mi,"≐","\\doteq",!0),vi(bi,wi,Mi,"⌢","\\frown",!0),vi(bi,wi,Mi,"∋","\\ni",!0),vi(bi,wi,Mi,"∝","\\propto",!0),vi(bi,wi,Mi,"⊢","\\vdash",!0),vi(bi,wi,Mi,"⊣","\\dashv",!0),vi(bi,wi,Mi,"∋","\\owns"),vi(bi,wi,Ni,".","\\ldotp"),vi(bi,wi,Ni,"⋅","\\cdotp"),vi(bi,wi,Oi,"#","\\#"),vi(yi,wi,Oi,"#","\\#"),vi(bi,wi,Oi,"&","\\&"),vi(yi,wi,Oi,"&","\\&"),vi(bi,wi,Oi,"ℵ","\\aleph",!0),vi(bi,wi,Oi,"∀","\\forall",!0),vi(bi,wi,Oi,"ℏ","\\hbar",!0),vi(bi,wi,Oi,"∃","\\exists",!0),vi(bi,wi,Oi,"∇","\\nabla",!0),vi(bi,wi,Oi,"♭","\\flat",!0),vi(bi,wi,Oi,"ℓ","\\ell",!0),vi(bi,wi,Oi,"♮","\\natural",!0),vi(bi,wi,Oi,"♣","\\clubsuit",!0),vi(bi,wi,Oi,"℘","\\wp",!0),vi(bi,wi,Oi,"♯","\\sharp",!0),vi(bi,wi,Oi,"♢","\\diamondsuit",!0),vi(bi,wi,Oi,"ℜ","\\Re",!0),vi(bi,wi,Oi,"♡","\\heartsuit",!0),vi(bi,wi,Oi,"ℑ","\\Im",!0),vi(bi,wi,Oi,"♠","\\spadesuit",!0),vi(bi,wi,Oi,"§","\\S",!0),vi(yi,wi,Oi,"§","\\S"),vi(bi,wi,Oi,"¶","\\P",!0),vi(yi,wi,Oi,"¶","\\P"),vi(bi,wi,Oi,"†","\\dag"),vi(yi,wi,Oi,"†","\\dag"),vi(yi,wi,Oi,"†","\\textdagger"),vi(bi,wi,Oi,"‡","\\ddag"),vi(yi,wi,Oi,"‡","\\ddag"),vi(yi,wi,Oi,"‡","\\textdaggerdbl"),vi(bi,wi,Si,"⎱","\\rmoustache",!0),vi(bi,wi,_i,"⎰","\\lmoustache",!0),vi(bi,wi,Si,"⟯","\\rgroup",!0),vi(bi,wi,_i,"⟮","\\lgroup",!0),vi(bi,wi,Ei,"∓","\\mp",!0),vi(bi,wi,Ei,"⊖","\\ominus",!0),vi(bi,wi,Ei,"⊎","\\uplus",!0),vi(bi,wi,Ei,"⊓","\\sqcap",!0),vi(bi,wi,Ei,"∗","\\ast"),vi(bi,wi,Ei,"⊔","\\sqcup",!0),vi(bi,wi,Ei,"◯","\\bigcirc",!0),vi(bi,wi,Ei,"∙","\\bullet",!0),vi(bi,wi,Ei,"‡","\\ddagger"),vi(bi,wi,Ei,"≀","\\wr",!0),vi(bi,wi,Ei,"⨿","\\amalg"),vi(bi,wi,Ei,"&","\\And"),vi(bi,wi,Mi,"⟵","\\longleftarrow",!0),vi(bi,wi,Mi,"⇐","\\Leftarrow",!0),vi(bi,wi,Mi,"⟸","\\Longleftarrow",!0),vi(bi,wi,Mi,"⟶","\\longrightarrow",!0),vi(bi,wi,Mi,"⇒","\\Rightarrow",!0),vi(bi,wi,Mi,"⟹","\\Longrightarrow",!0),vi(bi,wi,Mi,"↔","\\leftrightarrow",!0),vi(bi,wi,Mi,"⟷","\\longleftrightarrow",!0),vi(bi,wi,Mi,"⇔","\\Leftrightarrow",!0),vi(bi,wi,Mi,"⟺","\\Longleftrightarrow",!0),vi(bi,wi,Mi,"↦","\\mapsto",!0),vi(bi,wi,Mi,"⟼","\\longmapsto",!0),vi(bi,wi,Mi,"↗","\\nearrow",!0),vi(bi,wi,Mi,"↩","\\hookleftarrow",!0),vi(bi,wi,Mi,"↪","\\hookrightarrow",!0),vi(bi,wi,Mi,"↘","\\searrow",!0),vi(bi,wi,Mi,"↼","\\leftharpoonup",!0),vi(bi,wi,Mi,"⇀","\\rightharpoonup",!0),vi(bi,wi,Mi,"↙","\\swarrow",!0),vi(bi,wi,Mi,"↽","\\leftharpoondown",!0),vi(bi,wi,Mi,"⇁","\\rightharpoondown",!0),vi(bi,wi,Mi,"↖","\\nwarrow",!0),vi(bi,wi,Mi,"⇌","\\rightleftharpoons",!0),vi(bi,xi,Mi,"≮","\\nless",!0),vi(bi,xi,Mi,"","\\@nleqslant"),vi(bi,xi,Mi,"","\\@nleqq"),vi(bi,xi,Mi,"⪇","\\lneq",!0),vi(bi,xi,Mi,"≨","\\lneqq",!0),vi(bi,xi,Mi,"","\\@lvertneqq"),vi(bi,xi,Mi,"⋦","\\lnsim",!0),vi(bi,xi,Mi,"⪉","\\lnapprox",!0),vi(bi,xi,Mi,"⊀","\\nprec",!0),vi(bi,xi,Mi,"⋠","\\npreceq",!0),vi(bi,xi,Mi,"⋨","\\precnsim",!0),vi(bi,xi,Mi,"⪹","\\precnapprox",!0),vi(bi,xi,Mi,"≁","\\nsim",!0),vi(bi,xi,Mi,"","\\@nshortmid"),vi(bi,xi,Mi,"∤","\\nmid",!0),vi(bi,xi,Mi,"⊬","\\nvdash",!0),vi(bi,xi,Mi,"⊭","\\nvDash",!0),vi(bi,xi,Mi,"⋪","\\ntriangleleft"),vi(bi,xi,Mi,"⋬","\\ntrianglelefteq",!0),vi(bi,xi,Mi,"⊊","\\subsetneq",!0),vi(bi,xi,Mi,"","\\@varsubsetneq"),vi(bi,xi,Mi,"⫋","\\subsetneqq",!0),vi(bi,xi,Mi,"","\\@varsubsetneqq"),vi(bi,xi,Mi,"≯","\\ngtr",!0),vi(bi,xi,Mi,"","\\@ngeqslant"),vi(bi,xi,Mi,"","\\@ngeqq"),vi(bi,xi,Mi,"⪈","\\gneq",!0),vi(bi,xi,Mi,"≩","\\gneqq",!0),vi(bi,xi,Mi,"","\\@gvertneqq"),vi(bi,xi,Mi,"⋧","\\gnsim",!0),vi(bi,xi,Mi,"⪊","\\gnapprox",!0),vi(bi,xi,Mi,"⊁","\\nsucc",!0),vi(bi,xi,Mi,"⋡","\\nsucceq",!0),vi(bi,xi,Mi,"⋩","\\succnsim",!0),vi(bi,xi,Mi,"⪺","\\succnapprox",!0),vi(bi,xi,Mi,"≆","\\ncong",!0),vi(bi,xi,Mi,"","\\@nshortparallel"),vi(bi,xi,Mi,"∦","\\nparallel",!0),vi(bi,xi,Mi,"⊯","\\nVDash",!0),vi(bi,xi,Mi,"⋫","\\ntriangleright"),vi(bi,xi,Mi,"⋭","\\ntrianglerighteq",!0),vi(bi,xi,Mi,"","\\@nsupseteqq"),vi(bi,xi,Mi,"⊋","\\supsetneq",!0),vi(bi,xi,Mi,"","\\@varsupsetneq"),vi(bi,xi,Mi,"⫌","\\supsetneqq",!0),vi(bi,xi,Mi,"","\\@varsupsetneqq"),vi(bi,xi,Mi,"⊮","\\nVdash",!0),vi(bi,xi,Mi,"⪵","\\precneqq",!0),vi(bi,xi,Mi,"⪶","\\succneqq",!0),vi(bi,xi,Mi,"","\\@nsubseteqq"),vi(bi,xi,Ei,"⊴","\\unlhd"),vi(bi,xi,Ei,"⊵","\\unrhd"),vi(bi,xi,Mi,"↚","\\nleftarrow",!0),vi(bi,xi,Mi,"↛","\\nrightarrow",!0),vi(bi,xi,Mi,"⇍","\\nLeftarrow",!0),vi(bi,xi,Mi,"⇏","\\nRightarrow",!0),vi(bi,xi,Mi,"↮","\\nleftrightarrow",!0),vi(bi,xi,Mi,"⇎","\\nLeftrightarrow",!0),vi(bi,xi,Mi,"△","\\vartriangle"),vi(bi,xi,Oi,"ℏ","\\hslash"),vi(bi,xi,Oi,"▽","\\triangledown"),vi(bi,xi,Oi,"◊","\\lozenge"),vi(bi,xi,Oi,"Ⓢ","\\circledS"),vi(bi,xi,Oi,"®","\\circledR"),vi(yi,xi,Oi,"®","\\circledR"),vi(bi,xi,Oi,"∡","\\measuredangle",!0),vi(bi,xi,Oi,"∄","\\nexists"),vi(bi,xi,Oi,"℧","\\mho"),vi(bi,xi,Oi,"Ⅎ","\\Finv",!0),vi(bi,xi,Oi,"⅁","\\Game",!0),vi(bi,xi,Oi,"‵","\\backprime"),vi(bi,xi,Oi,"▲","\\blacktriangle"),vi(bi,xi,Oi,"▼","\\blacktriangledown"),vi(bi,xi,Oi,"■","\\blacksquare"),vi(bi,xi,Oi,"⧫","\\blacklozenge"),vi(bi,xi,Oi,"★","\\bigstar"),vi(bi,xi,Oi,"∢","\\sphericalangle",!0),vi(bi,xi,Oi,"∁","\\complement",!0),vi(bi,xi,Oi,"ð","\\eth",!0),vi(yi,wi,Oi,"ð","ð"),vi(bi,xi,Oi,"╱","\\diagup"),vi(bi,xi,Oi,"╲","\\diagdown"),vi(bi,xi,Oi,"□","\\square"),vi(bi,xi,Oi,"□","\\Box"),vi(bi,xi,Oi,"◊","\\Diamond"),vi(bi,xi,Oi,"¥","\\yen",!0),vi(yi,xi,Oi,"¥","\\yen",!0),vi(bi,xi,Oi,"✓","\\checkmark",!0),vi(yi,xi,Oi,"✓","\\checkmark"),vi(bi,xi,Oi,"ℶ","\\beth",!0),vi(bi,xi,Oi,"ℸ","\\daleth",!0),vi(bi,xi,Oi,"ℷ","\\gimel",!0),vi(bi,xi,Oi,"ϝ","\\digamma",!0),vi(bi,xi,Oi,"ϰ","\\varkappa"),vi(bi,xi,_i,"┌","\\@ulcorner",!0),vi(bi,xi,Si,"┐","\\@urcorner",!0),vi(bi,xi,_i,"└","\\@llcorner",!0),vi(bi,xi,Si,"┘","\\@lrcorner",!0),vi(bi,xi,Mi,"≦","\\leqq",!0),vi(bi,xi,Mi,"⩽","\\leqslant",!0),vi(bi,xi,Mi,"⪕","\\eqslantless",!0),vi(bi,xi,Mi,"≲","\\lesssim",!0),vi(bi,xi,Mi,"⪅","\\lessapprox",!0),vi(bi,xi,Mi,"≊","\\approxeq",!0),vi(bi,xi,Ei,"⋖","\\lessdot"),vi(bi,xi,Mi,"⋘","\\lll",!0),vi(bi,xi,Mi,"≶","\\lessgtr",!0),vi(bi,xi,Mi,"⋚","\\lesseqgtr",!0),vi(bi,xi,Mi,"⪋","\\lesseqqgtr",!0),vi(bi,xi,Mi,"≑","\\doteqdot"),vi(bi,xi,Mi,"≓","\\risingdotseq",!0),vi(bi,xi,Mi,"≒","\\fallingdotseq",!0),vi(bi,xi,Mi,"∽","\\backsim",!0),vi(bi,xi,Mi,"⋍","\\backsimeq",!0),vi(bi,xi,Mi,"⫅","\\subseteqq",!0),vi(bi,xi,Mi,"⋐","\\Subset",!0),vi(bi,xi,Mi,"⊏","\\sqsubset",!0),vi(bi,xi,Mi,"≼","\\preccurlyeq",!0),vi(bi,xi,Mi,"⋞","\\curlyeqprec",!0),vi(bi,xi,Mi,"≾","\\precsim",!0),vi(bi,xi,Mi,"⪷","\\precapprox",!0),vi(bi,xi,Mi,"⊲","\\vartriangleleft"),vi(bi,xi,Mi,"⊴","\\trianglelefteq"),vi(bi,xi,Mi,"⊨","\\vDash",!0),vi(bi,xi,Mi,"⊪","\\Vvdash",!0),vi(bi,xi,Mi,"⌣","\\smallsmile"),vi(bi,xi,Mi,"⌢","\\smallfrown"),vi(bi,xi,Mi,"≏","\\bumpeq",!0),vi(bi,xi,Mi,"≎","\\Bumpeq",!0),vi(bi,xi,Mi,"≧","\\geqq",!0),vi(bi,xi,Mi,"⩾","\\geqslant",!0),vi(bi,xi,Mi,"⪖","\\eqslantgtr",!0),vi(bi,xi,Mi,"≳","\\gtrsim",!0),vi(bi,xi,Mi,"⪆","\\gtrapprox",!0),vi(bi,xi,Ei,"⋗","\\gtrdot"),vi(bi,xi,Mi,"⋙","\\ggg",!0),vi(bi,xi,Mi,"≷","\\gtrless",!0),vi(bi,xi,Mi,"⋛","\\gtreqless",!0),vi(bi,xi,Mi,"⪌","\\gtreqqless",!0),vi(bi,xi,Mi,"≖","\\eqcirc",!0),vi(bi,xi,Mi,"≗","\\circeq",!0),vi(bi,xi,Mi,"≜","\\triangleq",!0),vi(bi,xi,Mi,"∼","\\thicksim"),vi(bi,xi,Mi,"≈","\\thickapprox"),vi(bi,xi,Mi,"⫆","\\supseteqq",!0),vi(bi,xi,Mi,"⋑","\\Supset",!0),vi(bi,xi,Mi,"⊐","\\sqsupset",!0),vi(bi,xi,Mi,"≽","\\succcurlyeq",!0),vi(bi,xi,Mi,"⋟","\\curlyeqsucc",!0),vi(bi,xi,Mi,"≿","\\succsim",!0),vi(bi,xi,Mi,"⪸","\\succapprox",!0),vi(bi,xi,Mi,"⊳","\\vartriangleright"),vi(bi,xi,Mi,"⊵","\\trianglerighteq"),vi(bi,xi,Mi,"⊩","\\Vdash",!0),vi(bi,xi,Mi,"∣","\\shortmid"),vi(bi,xi,Mi,"∥","\\shortparallel"),vi(bi,xi,Mi,"≬","\\between",!0),vi(bi,xi,Mi,"⋔","\\pitchfork",!0),vi(bi,xi,Mi,"∝","\\varpropto"),vi(bi,xi,Mi,"◀","\\blacktriangleleft"),vi(bi,xi,Mi,"∴","\\therefore",!0),vi(bi,xi,Mi,"∍","\\backepsilon"),vi(bi,xi,Mi,"▶","\\blacktriangleright"),vi(bi,xi,Mi,"∵","\\because",!0),vi(bi,xi,Mi,"⋘","\\llless"),vi(bi,xi,Mi,"⋙","\\gggtr"),vi(bi,xi,Ei,"⊲","\\lhd"),vi(bi,xi,Ei,"⊳","\\rhd"),vi(bi,xi,Mi,"≂","\\eqsim",!0),vi(bi,wi,Mi,"⋈","\\Join"),vi(bi,xi,Mi,"≑","\\Doteq",!0),vi(bi,xi,Ei,"∔","\\dotplus",!0),vi(bi,xi,Ei,"∖","\\smallsetminus"),vi(bi,xi,Ei,"⋒","\\Cap",!0),vi(bi,xi,Ei,"⋓","\\Cup",!0),vi(bi,xi,Ei,"⩞","\\doublebarwedge",!0),vi(bi,xi,Ei,"⊟","\\boxminus",!0),vi(bi,xi,Ei,"⊞","\\boxplus",!0),vi(bi,xi,Ei,"⋇","\\divideontimes",!0),vi(bi,xi,Ei,"⋉","\\ltimes",!0),vi(bi,xi,Ei,"⋊","\\rtimes",!0),vi(bi,xi,Ei,"⋋","\\leftthreetimes",!0),vi(bi,xi,Ei,"⋌","\\rightthreetimes",!0),vi(bi,xi,Ei,"⋏","\\curlywedge",!0),vi(bi,xi,Ei,"⋎","\\curlyvee",!0),vi(bi,xi,Ei,"⊝","\\circleddash",!0),vi(bi,xi,Ei,"⊛","\\circledast",!0),vi(bi,xi,Ei,"⋅","\\centerdot"),vi(bi,xi,Ei,"⊺","\\intercal",!0),vi(bi,xi,Ei,"⋒","\\doublecap"),vi(bi,xi,Ei,"⋓","\\doublecup"),vi(bi,xi,Ei,"⊠","\\boxtimes",!0),vi(bi,xi,Mi,"⇢","\\dashrightarrow",!0),vi(bi,xi,Mi,"⇠","\\dashleftarrow",!0),vi(bi,xi,Mi,"⇇","\\leftleftarrows",!0),vi(bi,xi,Mi,"⇆","\\leftrightarrows",!0),vi(bi,xi,Mi,"⇚","\\Lleftarrow",!0),vi(bi,xi,Mi,"↞","\\twoheadleftarrow",!0),vi(bi,xi,Mi,"↢","\\leftarrowtail",!0),vi(bi,xi,Mi,"↫","\\looparrowleft",!0),vi(bi,xi,Mi,"⇋","\\leftrightharpoons",!0),vi(bi,xi,Mi,"↶","\\curvearrowleft",!0),vi(bi,xi,Mi,"↺","\\circlearrowleft",!0),vi(bi,xi,Mi,"↰","\\Lsh",!0),vi(bi,xi,Mi,"⇈","\\upuparrows",!0),vi(bi,xi,Mi,"↿","\\upharpoonleft",!0),vi(bi,xi,Mi,"⇃","\\downharpoonleft",!0),vi(bi,wi,Mi,"⊶","\\origof",!0),vi(bi,wi,Mi,"⊷","\\imageof",!0),vi(bi,xi,Mi,"⊸","\\multimap",!0),vi(bi,xi,Mi,"↭","\\leftrightsquigarrow",!0),vi(bi,xi,Mi,"⇉","\\rightrightarrows",!0),vi(bi,xi,Mi,"⇄","\\rightleftarrows",!0),vi(bi,xi,Mi,"↠","\\twoheadrightarrow",!0),vi(bi,xi,Mi,"↣","\\rightarrowtail",!0),vi(bi,xi,Mi,"↬","\\looparrowright",!0),vi(bi,xi,Mi,"↷","\\curvearrowright",!0),vi(bi,xi,Mi,"↻","\\circlearrowright",!0),vi(bi,xi,Mi,"↱","\\Rsh",!0),vi(bi,xi,Mi,"⇊","\\downdownarrows",!0),vi(bi,xi,Mi,"↾","\\upharpoonright",!0),vi(bi,xi,Mi,"⇂","\\downharpoonright",!0),vi(bi,xi,Mi,"⇝","\\rightsquigarrow",!0),vi(bi,xi,Mi,"⇝","\\leadsto"),vi(bi,xi,Mi,"⇛","\\Rrightarrow",!0),vi(bi,xi,Mi,"↾","\\restriction"),vi(bi,wi,Oi,"‘","`"),vi(bi,wi,Oi,"$","\\$"),vi(yi,wi,Oi,"$","\\$"),vi(yi,wi,Oi,"$","\\textdollar"),vi(bi,wi,Oi,"%","\\%"),vi(yi,wi,Oi,"%","\\%"),vi(bi,wi,Oi,"_","\\_"),vi(yi,wi,Oi,"_","\\_"),vi(yi,wi,Oi,"_","\\textunderscore"),vi(bi,wi,Oi,"∠","\\angle",!0),vi(bi,wi,Oi,"∞","\\infty",!0),vi(bi,wi,Oi,"′","\\prime"),vi(bi,wi,Oi,"△","\\triangle"),vi(bi,wi,Oi,"Γ","\\Gamma",!0),vi(bi,wi,Oi,"Δ","\\Delta",!0),vi(bi,wi,Oi,"Θ","\\Theta",!0),vi(bi,wi,Oi,"Λ","\\Lambda",!0),vi(bi,wi,Oi,"Ξ","\\Xi",!0),vi(bi,wi,Oi,"Π","\\Pi",!0),vi(bi,wi,Oi,"Σ","\\Sigma",!0),vi(bi,wi,Oi,"Υ","\\Upsilon",!0),vi(bi,wi,Oi,"Φ","\\Phi",!0),vi(bi,wi,Oi,"Ψ","\\Psi",!0),vi(bi,wi,Oi,"Ω","\\Omega",!0),vi(bi,wi,Oi,"A","Α"),vi(bi,wi,Oi,"B","Β"),vi(bi,wi,Oi,"E","Ε"),vi(bi,wi,Oi,"Z","Ζ"),vi(bi,wi,Oi,"H","Η"),vi(bi,wi,Oi,"I","Ι"),vi(bi,wi,Oi,"K","Κ"),vi(bi,wi,Oi,"M","Μ"),vi(bi,wi,Oi,"N","Ν"),vi(bi,wi,Oi,"O","Ο"),vi(bi,wi,Oi,"P","Ρ"),vi(bi,wi,Oi,"T","Τ"),vi(bi,wi,Oi,"X","Χ"),vi(bi,wi,Oi,"¬","\\neg",!0),vi(bi,wi,Oi,"¬","\\lnot"),vi(bi,wi,Oi,"⊤","\\top"),vi(bi,wi,Oi,"⊥","\\bot"),vi(bi,wi,Oi,"∅","\\emptyset"),vi(bi,xi,Oi,"∅","\\varnothing"),vi(bi,wi,Bi,"α","\\alpha",!0),vi(bi,wi,Bi,"β","\\beta",!0),vi(bi,wi,Bi,"γ","\\gamma",!0),vi(bi,wi,Bi,"δ","\\delta",!0),vi(bi,wi,Bi,"ϵ","\\epsilon",!0),vi(bi,wi,Bi,"ζ","\\zeta",!0),vi(bi,wi,Bi,"η","\\eta",!0),vi(bi,wi,Bi,"θ","\\theta",!0),vi(bi,wi,Bi,"ι","\\iota",!0),vi(bi,wi,Bi,"κ","\\kappa",!0),vi(bi,wi,Bi,"λ","\\lambda",!0),vi(bi,wi,Bi,"μ","\\mu",!0),vi(bi,wi,Bi,"ν","\\nu",!0),vi(bi,wi,Bi,"ξ","\\xi",!0),vi(bi,wi,Bi,"ο","\\omicron",!0),vi(bi,wi,Bi,"π","\\pi",!0),vi(bi,wi,Bi,"ρ","\\rho",!0),vi(bi,wi,Bi,"σ","\\sigma",!0),vi(bi,wi,Bi,"τ","\\tau",!0),vi(bi,wi,Bi,"υ","\\upsilon",!0),vi(bi,wi,Bi,"ϕ","\\phi",!0),vi(bi,wi,Bi,"χ","\\chi",!0),vi(bi,wi,Bi,"ψ","\\psi",!0),vi(bi,wi,Bi,"ω","\\omega",!0),vi(bi,wi,Bi,"ε","\\varepsilon",!0),vi(bi,wi,Bi,"ϑ","\\vartheta",!0),vi(bi,wi,Bi,"ϖ","\\varpi",!0),vi(bi,wi,Bi,"ϱ","\\varrho",!0),vi(bi,wi,Bi,"ς","\\varsigma",!0),vi(bi,wi,Bi,"φ","\\varphi",!0),vi(bi,wi,Ei,"∗","*",!0),vi(bi,wi,Ei,"+","+"),vi(bi,wi,Ei,"−","-",!0),vi(bi,wi,Ei,"⋅","\\cdot",!0),vi(bi,wi,Ei,"∘","\\circ",!0),vi(bi,wi,Ei,"÷","\\div",!0),vi(bi,wi,Ei,"±","\\pm",!0),vi(bi,wi,Ei,"×","\\times",!0),vi(bi,wi,Ei,"∩","\\cap",!0),vi(bi,wi,Ei,"∪","\\cup",!0),vi(bi,wi,Ei,"∖","\\setminus",!0),vi(bi,wi,Ei,"∧","\\land"),vi(bi,wi,Ei,"∨","\\lor"),vi(bi,wi,Ei,"∧","\\wedge",!0),vi(bi,wi,Ei,"∨","\\vee",!0),vi(bi,wi,Oi,"√","\\surd"),vi(bi,wi,_i,"⟨","\\langle",!0),vi(bi,wi,_i,"∣","\\lvert"),vi(bi,wi,_i,"∥","\\lVert"),vi(bi,wi,Si,"?","?"),vi(bi,wi,Si,"!","!"),vi(bi,wi,Si,"⟩","\\rangle",!0),vi(bi,wi,Si,"∣","\\rvert"),vi(bi,wi,Si,"∥","\\rVert"),vi(bi,wi,Mi,"=","="),vi(bi,wi,Mi,":",":"),vi(bi,wi,Mi,"≈","\\approx",!0),vi(bi,wi,Mi,"≅","\\cong",!0),vi(bi,wi,Mi,"≥","\\ge"),vi(bi,wi,Mi,"≥","\\geq",!0),vi(bi,wi,Mi,"←","\\gets"),vi(bi,wi,Mi,">","\\gt",!0),vi(bi,wi,Mi,"∈","\\in",!0),vi(bi,wi,Mi,"","\\@not"),vi(bi,wi,Mi,"⊂","\\subset",!0),vi(bi,wi,Mi,"⊃","\\supset",!0),vi(bi,wi,Mi,"⊆","\\subseteq",!0),vi(bi,wi,Mi,"⊇","\\supseteq",!0),vi(bi,xi,Mi,"⊈","\\nsubseteq",!0),vi(bi,xi,Mi,"⊉","\\nsupseteq",!0),vi(bi,wi,Mi,"⊨","\\models"),vi(bi,wi,Mi,"←","\\leftarrow",!0),vi(bi,wi,Mi,"≤","\\le"),vi(bi,wi,Mi,"≤","\\leq",!0),vi(bi,wi,Mi,"<","\\lt",!0),vi(bi,wi,Mi,"→","\\rightarrow",!0),vi(bi,wi,Mi,"→","\\to"),vi(bi,xi,Mi,"≱","\\ngeq",!0),vi(bi,xi,Mi,"≰","\\nleq",!0),vi(bi,wi,Ai," ","\\ "),vi(bi,wi,Ai," ","\\space"),vi(bi,wi,Ai," ","\\nobreakspace"),vi(yi,wi,Ai," ","\\ "),vi(yi,wi,Ai," "," "),vi(yi,wi,Ai," ","\\space"),vi(yi,wi,Ai," ","\\nobreakspace"),vi(bi,wi,Ai,null,"\\nobreak"),vi(bi,wi,Ai,null,"\\allowbreak"),vi(bi,wi,Ni,",",","),vi(bi,wi,Ni,";",";"),vi(bi,xi,Ei,"⊼","\\barwedge",!0),vi(bi,xi,Ei,"⊻","\\veebar",!0),vi(bi,wi,Ei,"⊙","\\odot",!0),vi(bi,wi,Ei,"⊕","\\oplus",!0),vi(bi,wi,Ei,"⊗","\\otimes",!0),vi(bi,wi,Oi,"∂","\\partial",!0),vi(bi,wi,Ei,"⊘","\\oslash",!0),vi(bi,xi,Ei,"⊚","\\circledcirc",!0),vi(bi,xi,Ei,"⊡","\\boxdot",!0),vi(bi,wi,Ei,"△","\\bigtriangleup"),vi(bi,wi,Ei,"▽","\\bigtriangledown"),vi(bi,wi,Ei,"†","\\dagger"),vi(bi,wi,Ei,"⋄","\\diamond"),vi(bi,wi,Ei,"⋆","\\star"),vi(bi,wi,Ei,"◃","\\triangleleft"),vi(bi,wi,Ei,"▹","\\triangleright"),vi(bi,wi,_i,"{","\\{"),vi(yi,wi,Oi,"{","\\{"),vi(yi,wi,Oi,"{","\\textbraceleft"),vi(bi,wi,Si,"}","\\}"),vi(yi,wi,Oi,"}","\\}"),vi(yi,wi,Oi,"}","\\textbraceright"),vi(bi,wi,_i,"{","\\lbrace"),vi(bi,wi,Si,"}","\\rbrace"),vi(bi,wi,_i,"[","\\lbrack",!0),vi(yi,wi,Oi,"[","\\lbrack",!0),vi(bi,wi,Si,"]","\\rbrack",!0),vi(yi,wi,Oi,"]","\\rbrack",!0),vi(bi,wi,_i,"(","\\lparen",!0),vi(bi,wi,Si,")","\\rparen",!0),vi(yi,wi,Oi,"<","\\textless",!0),vi(yi,wi,Oi,">","\\textgreater",!0),vi(bi,wi,_i,"⌊","\\lfloor",!0),vi(bi,wi,Si,"⌋","\\rfloor",!0),vi(bi,wi,_i,"⌈","\\lceil",!0),vi(bi,wi,Si,"⌉","\\rceil",!0),vi(bi,wi,Oi,"\\","\\backslash"),vi(bi,wi,Oi,"∣","|"),vi(bi,wi,Oi,"∣","\\vert"),vi(yi,wi,Oi,"|","\\textbar",!0),vi(bi,wi,Oi,"∥","\\|"),vi(bi,wi,Oi,"∥","\\Vert"),vi(yi,wi,Oi,"∥","\\textbardbl"),vi(yi,wi,Oi,"~","\\textasciitilde"),vi(yi,wi,Oi,"\\","\\textbackslash"),vi(yi,wi,Oi,"^","\\textasciicircum"),vi(bi,wi,Mi,"↑","\\uparrow",!0),vi(bi,wi,Mi,"⇑","\\Uparrow",!0),vi(bi,wi,Mi,"↓","\\downarrow",!0),vi(bi,wi,Mi,"⇓","\\Downarrow",!0),vi(bi,wi,Mi,"↕","\\updownarrow",!0),vi(bi,wi,Mi,"⇕","\\Updownarrow",!0),vi(bi,wi,Ci,"∐","\\coprod"),vi(bi,wi,Ci,"⋁","\\bigvee"),vi(bi,wi,Ci,"⋀","\\bigwedge"),vi(bi,wi,Ci,"⨄","\\biguplus"),vi(bi,wi,Ci,"⋂","\\bigcap"),vi(bi,wi,Ci,"⋃","\\bigcup"),vi(bi,wi,Ci,"∫","\\int"),vi(bi,wi,Ci,"∫","\\intop"),vi(bi,wi,Ci,"∬","\\iint"),vi(bi,wi,Ci,"∭","\\iiint"),vi(bi,wi,Ci,"∏","\\prod"),vi(bi,wi,Ci,"∑","\\sum"),vi(bi,wi,Ci,"⨂","\\bigotimes"),vi(bi,wi,Ci,"⨁","\\bigoplus"),vi(bi,wi,Ci,"⨀","\\bigodot"),vi(bi,wi,Ci,"∮","\\oint"),vi(bi,wi,Ci,"∯","\\oiint"),vi(bi,wi,Ci,"∰","\\oiiint"),vi(bi,wi,Ci,"⨆","\\bigsqcup"),vi(bi,wi,Ci,"∫","\\smallint"),vi(yi,wi,Ti,"…","\\textellipsis"),vi(bi,wi,Ti,"…","\\mathellipsis"),vi(yi,wi,Ti,"…","\\ldots",!0),vi(bi,wi,Ti,"…","\\ldots",!0),vi(bi,wi,Ti,"⋯","\\@cdots",!0),vi(bi,wi,Ti,"⋱","\\ddots",!0),vi(bi,wi,Oi,"⋮","\\varvdots"),vi(bi,wi,ki,"ˊ","\\acute"),vi(bi,wi,ki,"ˋ","\\grave"),vi(bi,wi,ki,"¨","\\ddot"),vi(bi,wi,ki,"~","\\tilde"),vi(bi,wi,ki,"ˉ","\\bar"),vi(bi,wi,ki,"˘","\\breve"),vi(bi,wi,ki,"ˇ","\\check"),vi(bi,wi,ki,"^","\\hat"),vi(bi,wi,ki,"⃗","\\vec"),vi(bi,wi,ki,"˙","\\dot"),vi(bi,wi,ki,"˚","\\mathring"),vi(bi,wi,Bi,"","\\@imath"),vi(bi,wi,Bi,"","\\@jmath"),vi(bi,wi,Oi,"ı","ı"),vi(bi,wi,Oi,"ȷ","ȷ"),vi(yi,wi,Oi,"ı","\\i",!0),vi(yi,wi,Oi,"ȷ","\\j",!0),vi(yi,wi,Oi,"ß","\\ss",!0),vi(yi,wi,Oi,"æ","\\ae",!0),vi(yi,wi,Oi,"œ","\\oe",!0),vi(yi,wi,Oi,"ø","\\o",!0),vi(yi,wi,Oi,"Æ","\\AE",!0),vi(yi,wi,Oi,"Œ","\\OE",!0),vi(yi,wi,Oi,"Ø","\\O",!0),vi(yi,wi,ki,"ˊ","\\'"),vi(yi,wi,ki,"ˋ","\\`"),vi(yi,wi,ki,"ˆ","\\^"),vi(yi,wi,ki,"˜","\\~"),vi(yi,wi,ki,"ˉ","\\="),vi(yi,wi,ki,"˘","\\u"),vi(yi,wi,ki,"˙","\\."),vi(yi,wi,ki,"¸","\\c"),vi(yi,wi,ki,"˚","\\r"),vi(yi,wi,ki,"ˇ","\\v"),vi(yi,wi,ki,"¨",'\\"'),vi(yi,wi,ki,"˝","\\H"),vi(yi,wi,ki,"◯","\\textcircled");var Ri={"--":!0,"---":!0,"``":!0,"''":!0};vi(yi,wi,Oi,"–","--",!0),vi(yi,wi,Oi,"–","\\textendash"),vi(yi,wi,Oi,"—","---",!0),vi(yi,wi,Oi,"—","\\textemdash"),vi(yi,wi,Oi,"‘","`",!0),vi(yi,wi,Oi,"‘","\\textquoteleft"),vi(yi,wi,Oi,"’","'",!0),vi(yi,wi,Oi,"’","\\textquoteright"),vi(yi,wi,Oi,"“","``",!0),vi(yi,wi,Oi,"“","\\textquotedblleft"),vi(yi,wi,Oi,"”","''",!0),vi(yi,wi,Oi,"”","\\textquotedblright"),vi(bi,wi,Oi,"°","\\degree",!0),vi(yi,wi,Oi,"°","\\degree"),vi(yi,wi,Oi,"°","\\textdegree",!0),vi(bi,wi,Oi,"£","\\pounds"),vi(bi,wi,Oi,"£","\\mathsterling",!0),vi(yi,wi,Oi,"£","\\pounds"),vi(yi,wi,Oi,"£","\\textsterling",!0),vi(bi,xi,Oi,"✠","\\maltese"),vi(yi,xi,Oi,"✠","\\maltese");for(var zi='0123456789/@."',Ii=0;Ii<14;Ii++){var Li=zi.charAt(Ii);vi(bi,wi,Oi,Li,Li)}for(var Di='0123456789!@*()-=+";:?/.,',Fi=0;Fi<25;Fi++){var Pi=Di.charAt(Fi);vi(yi,wi,Oi,Pi,Pi)}for(var qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Hi=0;Hi<52;Hi++){var Vi=qi.charAt(Hi);vi(bi,wi,Bi,Vi,Vi),vi(yi,wi,Oi,Vi,Vi)}vi(bi,xi,Oi,"C","ℂ"),vi(yi,xi,Oi,"C","ℂ"),vi(bi,xi,Oi,"H","ℍ"),vi(yi,xi,Oi,"H","ℍ"),vi(bi,xi,Oi,"N","ℕ"),vi(yi,xi,Oi,"N","ℕ"),vi(bi,xi,Oi,"P","ℙ"),vi(yi,xi,Oi,"P","ℙ"),vi(bi,xi,Oi,"Q","ℚ"),vi(yi,xi,Oi,"Q","ℚ"),vi(bi,xi,Oi,"R","ℝ"),vi(yi,xi,Oi,"R","ℝ"),vi(bi,xi,Oi,"Z","ℤ"),vi(yi,xi,Oi,"Z","ℤ"),vi(bi,wi,Bi,"h","ℎ"),vi(yi,wi,Bi,"h","ℎ");for(var $i="",Ui=0;Ui<52;Ui++){var ji=qi.charAt(Ui);vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56320+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56372+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56424+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56580+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56684+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56736+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56788+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56840+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56944+Ui)),vi(yi,wi,Oi,ji,$i),Ui<26&&(vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56632+Ui)),vi(yi,wi,Oi,ji,$i),vi(bi,wi,Bi,ji,$i=String.fromCharCode(55349,56476+Ui)),vi(yi,wi,Oi,ji,$i))}vi(bi,wi,Bi,"k",$i=String.fromCharCode(55349,56668)),vi(yi,wi,Oi,"k",$i);for(var Wi=0;Wi<10;Wi++){var Ki=Wi.toString();vi(bi,wi,Bi,Ki,$i=String.fromCharCode(55349,57294+Wi)),vi(yi,wi,Oi,Ki,$i),vi(bi,wi,Bi,Ki,$i=String.fromCharCode(55349,57314+Wi)),vi(yi,wi,Oi,Ki,$i),vi(bi,wi,Bi,Ki,$i=String.fromCharCode(55349,57324+Wi)),vi(yi,wi,Oi,Ki,$i),vi(bi,wi,Bi,Ki,$i=String.fromCharCode(55349,57334+Wi)),vi(yi,wi,Oi,Ki,$i)}for(var Gi="ÐÞþ",Zi=0;Zi<3;Zi++){var Xi=Gi.charAt(Zi);vi(bi,wi,Bi,Xi,Xi),vi(yi,wi,Oi,Xi,Xi)}var Yi=[["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"]],Qi=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ji=function(e,t,r){return fi[r][e]&&fi[r][e].replace&&(e=fi[r][e].replace),{value:e,metrics:Uo(e,t,r)}},el=function(e,t,r,n,a){var o,i=Ji(e,t,r),l=i.metrics;if(e=i.value,l){var s=l.italic;("text"===r||n&&"mathit"===n.font)&&(s=0),o=new ci(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 '"+r+"'"),o=new ci(e,0,0,0,0,0,a);if(n){o.maxFontSize=n.sizeMultiplier,n.style.isTight()&&o.classes.push("mtight");var c=n.getColor();c&&(o.style.color=c)}return o},tl=(e,t)=>{if(ti(e.classes)!==ti(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},rl=function(e){for(var t=0,r=0,n=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},nl=function(e,t,r,n){var a=new oi(e,t,r,n);return rl(a),a},al=(e,t,r,n)=>new oi(e,t,r,n),ol=function(e){var t=new qo(e);return rl(t),t},il=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},ll={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"}},sl={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},cl={fontMap:ll,makeSymbol:el,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&Ji(e,"Main-Bold",t).metrics?el(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===fi[t][e].font?el(e,"Main-Regular",t,r,n):el(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:nl,makeSvgSpan:al,makeLineSpan:function(e,t,r){var n=nl([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=ei(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new ii(e,t,r,n);return rl(a),a},makeFragment:ol,wrapFragment:function(e,t){return e instanceof qo?nl([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:n}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,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,r.push({type:"kern",size:l}),r.push(t[o])}return{children:r,depth:n}}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 h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-h.elem.depth}}return{children:e.children,depth:s}}(e),a=0,o=0;o<r.length;o++){var i=r[o];if("elem"===i.type){var l=i.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var s=nl(["pstrut"],[]);s.style.height=ei(a);for(var c=[],d=n,u=n,h=n,m=0;m<r.length;m++){var p=r[m];if("kern"===p.type)h+=p.size;else{var g=p.elem,f=p.wrapperClasses||[],v=p.wrapperStyle||{},b=nl(f,[s,g],void 0,v);b.style.top=ei(-a-h-g.depth),p.marginLeft&&(b.style.marginLeft=p.marginLeft),p.marginRight&&(b.style.marginRight=p.marginRight),c.push(b),h+=g.height+g.depth}d=Math.min(d,h),u=Math.max(u,h)}var y,w=nl(["vlist"],c);if(w.style.height=ei(u),d<0){var x=nl([],[]),k=nl(["vlist"],[x]);k.style.height=ei(-d);var E=nl(["vlist-s"],[new ci("​")]);y=[nl(["vlist-r"],[w,E]),nl(["vlist-r"],[k])]}else y=[nl(["vlist-r"],[w])];var S=nl(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,r){var n=e.mode,a=e.text,o=["mord"],i="math"===n||"text"===n&&t.font,l=i?t.font:t.fontFamily,s="",c="";if(55349===a.charCodeAt(0)&&([s,c]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,n="math"===t?0:1;if(119808<=r&&r<120484){var a=Math.floor((r-119808)/26);return[Yi[a][2],Yi[a][n]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Qi[o][2],Qi[o][n]]}if(120485===r||120486===r)return[Yi[0][2],Yi[0][n]];if(120486<r&&r<120782)return["",""];throw new vo("Unsupported character: "+e)}(a,n)),s.length>0)return el(a,s,n,t,o.concat(c));if(l){var d,u;if("boldsymbol"===l){var h=function(e,t,r,n,a){return"textord"!==a&&Ji(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,n,0,0,r);d=h.fontName,u=[h.fontClass]}else i?(d=ll[l].fontName,u=[l]):(d=il(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Ji(a,d,n).metrics)return el(a,d,n,t,o.concat(u));if(Ri.hasOwnProperty(a)&&"Typewriter"===d.slice(0,10)){for(var m=[],p=0;p<a.length;p++)m.push(el(a[p],d,n,t,o.concat(u)));return ol(m)}}if("mathord"===r)return el(a,"Math-Italic",n,t,o.concat(["mathnormal"]));if("textord"===r){var g=fi[n][a]&&fi[n][a].font;if("ams"===g){var f=il("amsrm",t.fontWeight,t.fontShape);return el(a,f,n,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==g&&g){var v=il(g,t.fontWeight,t.fontShape);return el(a,v,n,t,o.concat(v,t.fontWeight,t.fontShape))}var b=il("textrm",t.fontWeight,t.fontShape);return el(a,b,n,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{var r=nl(["mspace"],[],t),n=Jo(e,t);return r.style.marginRight=ei(n),r},staticSvg:function(e,t){var[r,n,a]=sl[e],o=new ui(r),i=new di([o],{width:ei(n),height:ei(a),style:"width:"+ei(n),viewBox:"0 0 "+1e3*n+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=al(["overlay"],[i],t);return l.height=a,l.style.height=ei(a),l.style.width=ei(n),l},svgData:sl,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof ci&&n instanceof ci&&tl(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}},dl={number:3,unit:"mu"},ul={number:4,unit:"mu"},hl={number:5,unit:"mu"},ml={mord:{mop:dl,mbin:ul,mrel:hl,minner:dl},mop:{mord:dl,mop:dl,mrel:hl,minner:dl},mbin:{mord:ul,mop:ul,mopen:ul,minner:ul},mrel:{mord:hl,mop:hl,mopen:hl,minner:hl},mopen:{},mclose:{mop:dl,mbin:ul,mrel:hl,minner:dl},mpunct:{mord:dl,mop:dl,mrel:hl,mopen:dl,mclose:dl,mpunct:dl,minner:dl},minner:{mord:dl,mop:dl,mbin:ul,mrel:hl,mopen:dl,mpunct:dl,minner:dl}},pl={mord:{mop:dl},mop:{mord:dl,mop:dl},mbin:{},mrel:{},mopen:{},mclose:{mop:dl},mpunct:{},minner:{mop:dl}},gl={},fl={},vl={};function bl(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},s=0;s<r.length;++s)gl[r[s]]=l;t&&(o&&(fl[t]=o),i&&(vl[t]=i))}function yl(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;bl({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var wl=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},xl=function(e){return"ordgroup"===e.type?e.body:[e]},kl=cl.makeSpan,El=["leftmost","mbin","mopen","mrel","mop","mpunct"],Sl=["rightmost","mrel","mclose","mpunct"],Tl={display:zo.DISPLAY,text:zo.TEXT,script:zo.SCRIPT,scriptscript:zo.SCRIPTSCRIPT},Bl={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Cl=function(e,t,r,n){void 0===n&&(n=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=Rl(e[o],t);if(i instanceof qo){var l=i.children;a.push(...l)}else a.push(i)}if(cl.tryCombineChars(a),!r)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(Tl[c.style]))}var d=kl([n[0]||"leftmost"],[],t),u=kl([n[1]||"rightmost"],[],t),h="root"===r;return _l(a,((e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&ko.contains(Sl,n)?t.classes[0]="mord":"mbin"===n&&ko.contains(El,r)&&(e.classes[0]="mord")}),{node:d},u,h),_l(a,((e,t)=>{var r=Al(t),n=Al(e),a=r&&n?e.hasClass("mtight")?pl[r][n]:ml[r][n]:null;if(a)return cl.makeGlue(a,s)}),{node:d},u,h),a},_l=function e(t,r,n,a,o){a&&t.push(a);for(var i=0;i<t.length;i++){var l=t[i],s=Nl(l);if(s)e(s.children,r,n,null,o);else{var c=!l.hasClass("mspace");if(c){var d=r(l,n.node);d&&(n.insertAfter?n.insertAfter(d):(t.unshift(d),i++))}c?n.node=l:o&&l.hasClass("newline")&&(n.node=kl(["leftmost"])),n.insertAfter=(e=>r=>{t.splice(e+1,0,r),i++})(i)}}a&&t.pop()},Nl=function(e){return e instanceof qo||e instanceof ii||e instanceof oi&&e.hasClass("enclosing")?e:null},Ml=function e(t,r){var n=Nl(t);if(n){var a=n.children;if(a.length){if("right"===r)return e(a[a.length-1],"right");if("left"===r)return e(a[0],"left")}}return t},Al=function(e,t){return e?(t&&(e=Ml(e,t)),Bl[e.classes[0]]||null):null},Ol=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return kl(t.concat(r))},Rl=function(e,t,r){if(!e)return kl();if(fl[e.type]){var n=fl[e.type](e,t);if(r&&t.size!==r.size){n=kl(t.sizingClasses(r),[n],t);var a=t.sizeMultiplier/r.sizeMultiplier;n.height*=a,n.depth*=a}return n}throw new vo("Got group of unknown type: '"+e.type+"'")};function zl(e,t){var r=kl(["base"],e,t),n=kl(["strut"]);return n.style.height=ei(r.height+r.depth),r.depth&&(n.style.verticalAlign=ei(-r.depth)),r.children.unshift(n),r}function Il(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var n,a=Cl(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=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(zl(l,t)),l=[])}else a[s].hasClass("newline")&&(l.pop(),l.length>0&&(i.push(zl(l,t)),l=[]),i.push(a[s]));l.length>0&&i.push(zl(l,t)),r?((o=zl(Cl(r,t,!0))).classes=["tag"],i.push(o)):n&&i.push(n);var d=kl(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=ei(d.height+d.depth),d.depth&&(u.style.verticalAlign=ei(-d.depth))}return d}function Ll(e){return new qo(e)}class Dl{constructor(e,t,r){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=r||[]}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=ti(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=ko.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+ko.escape(ti(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class Fl{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ko.escape(this.toText())}toText(){return this.text}}var Pl={MathNode:Dl,TextNode:Fl,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",ei(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ei(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Ll},ql=function(e,t,r){return!fi[t][e]||!fi[t][e].replace||55349===e.charCodeAt(0)||Ri.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=fi[t][e].replace),new Pl.TextNode(e)},Hl=function(e){return 1===e.length?e[0]:new Pl.MathNode("mrow",e)},Vl=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 r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return ko.contains(["\\imath","\\jmath"],a)?null:(fi[n][a]&&fi[n][a].replace&&(a=fi[n][a].replace),Uo(a,cl.fontMap[r].fontName,n)?cl.fontMap[r].variant:null)},$l=function(e,t,r){if(1===e.length){var n=jl(e[0],t);return r&&n instanceof Dl&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,o=[],i=0;i<e.length;i++){var l=jl(e[i],t);if(l instanceof Dl&&a instanceof Dl){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 Fl&&"."===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 Fl&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var d=l.children[0];d instanceof Fl&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(l),a=l}return o},Ul=function(e,t,r){return Hl($l(e,t,r))},jl=function(e,t){if(!e)return new Pl.MathNode("mrow");if(vl[e.type])return vl[e.type](e,t);throw new vo("Got group of unknown type: '"+e.type+"'")};function Wl(e,t,r,n,a){var o,i=$l(e,r);o=1===i.length&&i[0]instanceof Dl&&ko.contains(["mrow","mtable"],i[0].type)?i[0]:new Pl.MathNode("mrow",i);var l=new Pl.MathNode("annotation",[new Pl.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new Pl.MathNode("semantics",[o,l]),c=new Pl.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=a?"katex":"katex-mathml";return cl.makeSpan([d],[c])}var Kl=function(e){return new Zo({style:e.displayMode?zo.DISPLAY:zo.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Gl=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=cl.makeSpan(r,[e])}return e},Zl={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":"="},Xl={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]},Yl=function(e,t,r,n,a){var o,i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(o=cl.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 hi({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new hi({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new di(s,{width:"100%",height:ei(i)});o=cl.makeSvgSpan([],[c],a)}return o.height=i,o.style.height=ei(i),o},Ql=function(e){var t=new Pl.MathNode("mo",[new Pl.TextNode(Zl[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Jl=function(e,t){var{span:r,minWidth:n,height:a}=function(){var r=4e5,n=e.label.slice(1);if(ko.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,o,i,l="ordgroup"===(m=e.base).type?m.body.length:1;if(l>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,i=.42,o=n+"4"):(a=312,r=2340,i=.34,o="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][s],a=[0,239,300,360,420][s],i=[0,.24,.3,.3,.36,.42][s],o=n+s):(r=[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 ui(o),d=new di([c],{width:"100%",height:ei(i),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:cl.makeSvgSpan([],[d],t),minWidth:0,height:i}}var u,h,m,p=[],g=Xl[n],[f,v,b]=g,y=b/1e3,w=f.length;if(1===w)u=["hide-tail"],h=[g[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],h=["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"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var k=new ui(f[x]),E=new di([k],{width:"400em",height:ei(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:h[x]+" slice"}),S=cl.makeSvgSpan([u[x]],[E],t);if(1===w)return{span:S,minWidth:v,height:y};S.style.height=ei(y),p.push(S)}return{span:cl.makeSpan(["stretchy"],p,t),minWidth:v,height:y}}();return r.height=a,r.style.height=ei(a),n>0&&(r.style.minWidth=ei(n)),r};function es(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 ts(e){var t=rs(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 rs(e){return e&&("atom"===e.type||gi.hasOwnProperty(e.type))?e:null}var ns=(e,t)=>{var r,n,a;e&&"supsub"===e.type?(r=(n=es(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof oi)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Rl(e,t)),e.base=n):r=(n=es(e,"accent")).base;var o=Rl(r,t.havingCrampedStyle()),i=0;if(n.isShifty&&ko.isCharacterBox(r)){var l=ko.getBaseElem(r);i=mi(Rl(l,t.havingCrampedStyle())).skew}var s,c="\\c"===n.label,d=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(n.isStretchy)s=Jl(n,t),s=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ei(2*i)+")",marginLeft:ei(2*i)}:void 0}]},t);else{var u,h;"\\vec"===n.label?(u=cl.staticSvg("vec",t),h=cl.svgData.vec[1]):((u=mi(u=cl.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,h=u.width,c&&(d+=u.depth)),s=cl.makeSpan(["accent-body"],[u]);var m="\\textcircled"===n.label;m&&(s.classes.push("accent-full"),d=o.height);var p=i;m||(p-=h/2),s.style.left=ei(p),"\\textcircled"===n.label&&(s.style.top=".2em"),s=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:s}]},t)}var g=cl.makeSpan(["mord","accent"],[s],t);return a?(a.children[0]=g,a.height=Math.max(g.height,a.height),a.classes[0]="mord",a):g},as=(e,t)=>{var r=e.isStretchy?Ql(e.label):new Pl.MathNode("mo",[ql(e.label,e.mode)]),n=new Pl.MathNode("mover",[jl(e.base,t),r]);return n.setAttribute("accent","true"),n},os=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));bl({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 r=wl(t[0]),n=!os.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:ns,mathmlBuilder:as}),bl({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ns,mathmlBuilder:as}),bl({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=Rl(e.base,t),n=Jl(e,t),a="\\utilde"===e.label?.12:0,o=cl.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return cl.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var r=Ql(e.label),n=new Pl.MathNode("munder",[jl(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var is=e=>{var t=new Pl.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};bl({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,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),o=cl.wrapFragment(Rl(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(n.sub()),(r=cl.wrapFragment(Rl(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var l,s=Jl(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),r){var u=-t.fontMetrics().axisHeight+r.height+.5*s.height+.111;l=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c},{type:"elem",elem:r,shift:u}]},t)}else l=cl.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"),cl.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var r,n=Ql(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=is(jl(e.body,t));if(e.below){var o=is(jl(e.below,t));r=new Pl.MathNode("munderover",[n,o,a])}else r=new Pl.MathNode("mover",[n,a])}else if(e.below){var i=is(jl(e.below,t));r=new Pl.MathNode("munder",[n,i])}else r=is(),r=new Pl.MathNode("mover",[n,r]);return r}});var ls=cl.makeSpan;function ss(e,t){var r=Cl(e.body,t,!0);return ls([e.mclass],r,t)}function cs(e,t){var r,n=$l(e.body,t);return"minner"===e.mclass?r=new Pl.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0]).type="mi":r=new Pl.MathNode("mi",n):(e.isCharacterBox?(r=n[0]).type="mo":r=new Pl.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}bl({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:xl(a),isCharacterBox:ko.isCharacterBox(a)}},htmlBuilder:ss,mathmlBuilder:cs});var ds=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};bl({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:ds(t[0]),body:xl(t[1]),isCharacterBox:ko.isCharacterBox(t[1])}}}),bl({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:n,funcName:a}=e,o=t[1],i=t[0];r="\\stackrel"!==a?ds(o):"mrel";var l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:xl(o)},s={type:"supsub",mode:i.mode,base:l,sup:"\\underset"===a?null:i,sub:"\\underset"===a?i:null};return{type:"mclass",mode:n.mode,mclass:r,body:[s],isCharacterBox:ko.isCharacterBox(s)}},htmlBuilder:ss,mathmlBuilder:cs}),bl({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:ds(t[0]),body:xl(t[0])}},htmlBuilder(e,t){var r=Cl(e.body,t,!0),n=cl.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=$l(e.body,t),n=new Pl.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var us={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},hs=e=>"textord"===e.type&&"@"===e.text;function ms(e,t,r){var n=us[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}bl({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=cl.wrapFragment(Rl(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=ei(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Pl.MathNode("mrow",[jl(e.label,t)]);return(r=new Pl.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Pl.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),bl({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=cl.wrapFragment(Rl(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Pl.MathNode("mrow",[jl(e.fragment,t)])}),bl({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=es(t[0],"ordgroup").body,a="",o=0;o<n.length;o++){a+=es(n[o],"textord").text}var i,l=parseInt(a);if(isNaN(l))throw new vo("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new vo("\\@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:r.mode,text:i}}});var ps=(e,t)=>{var r=Cl(e.body,t.withColor(e.color),!1);return cl.makeFragment(r)},gs=(e,t)=>{var r=$l(e.body,t.withColor(e.color)),n=new Pl.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};bl({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=es(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:xl(a)}},htmlBuilder:ps,mathmlBuilder:gs}),bl({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=es(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var o=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:o}},htmlBuilder:ps,mathmlBuilder:gs}),bl({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a="["===n.gullet.future().text?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:a&&es(a,"size").value}},htmlBuilder(e,t){var r=cl.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=ei(Jo(e.size,t)))),r},mathmlBuilder(e,t){var r=new Pl.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",ei(Jo(e.size,t)))),r}});var fs={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},vs=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new vo("Expected a control sequence",e);return t},bs=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};bl({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(fs[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=fs[n.text]),es(t.parseFunction(),"internal");throw new vo("Invalid token after macro prefix",n)}}),bl({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new vo("Expected a control sequence",n);for(var o,i=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new vo('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new vo('Argument number "'+n.text+'" out of order');i++,l.push([])}else{if("EOF"===n.text)throw new vo("Expected a macro definition");l[i].push(n.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},r===fs[r]),{type:"internal",mode:t.mode}}}),bl({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=vs(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 bs(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),bl({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=vs(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return bs(t,n,o,"\\\\globalfuture"===r),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var ys=function(e,t,r){var n=Uo(fi.math[e]&&fi.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},ws=function(e,t,r,n){var a=r.havingBaseStyle(t),o=cl.makeSpan(n.concat(a.sizingClasses(r)),[e],r),i=a.sizeMultiplier/r.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},xs=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ei(a),e.height-=a,e.depth+=a},ks=function(e,t,r,n,a,o){var i=function(e,t,r,n){return cl.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),l=ws(cl.makeSpan(["delimsizing","size"+t],[i],n),zo.TEXT,n,o);return r&&xs(l,n,zo.TEXT),l},Es=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:cl.makeSpan(["delimsizinginner",n],[cl.makeSpan([],[cl.makeSymbol(e,t,r)])])}},Ss=function(e,t,r){var n=Ho["Size4-Regular"][e.charCodeAt(0)]?Ho["Size4-Regular"][e.charCodeAt(0)][4]:Ho["Size1-Regular"][e.charCodeAt(0)][4],a=new ui("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 di([a],{width:ei(n),height:ei(t),style:"width:"+ei(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=cl.makeSvgSpan([],[o],r);return i.height=t,i.style.height=ei(t),i.style.width=ei(n),{type:"elem",elem:i}},Ts={type:"kern",size:-.008},Bs=["|","\\lvert","\\rvert","\\vert"],Cs=["\\|","\\lVert","\\rVert","\\Vert"],_s=function(e,t,r,n,a,o){var i,l,s,c,d="",u=0;i=s=c=e,l=null;var h="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"):ko.contains(Bs,e)?(s="∣",d="vert",u=333):ko.contains(Cs,e)?(s="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",s="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",s="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(s=i="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",s=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(s=i="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",s=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",s="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",s="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",l="⎨",c="⎩",s="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",l="⎬",c="⎭",s="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",s="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",s="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",s="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",s="⎪",h="Size4-Regular");var m=ys(i,h,a),p=m.height+m.depth,g=ys(s,h,a),f=g.height+g.depth,v=ys(c,h,a),b=v.height+v.depth,y=0,w=1;if(null!==l){var x=ys(l,h,a);y=x.height+x.depth,w=2}var k=p+b+y,E=k+Math.max(0,Math.ceil((t-k)/(w*f)))*w*f,S=n.fontMetrics().axisHeight;r&&(S*=n.sizeMultiplier);var T=E/2-S,B=[];if(d.length>0){var C=E-p-b,_=Math.round(1e3*E),N=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 ui(d,N),A=(u/1e3).toFixed(3)+"em",O=(_/1e3).toFixed(3)+"em",R=new di([M],{width:A,height:O,viewBox:"0 0 "+u+" "+_}),z=cl.makeSvgSpan([],[R],n);z.height=_/1e3,z.style.width=A,z.style.height=O,B.push({type:"elem",elem:z})}else{if(B.push(Es(c,h,a)),B.push(Ts),null===l){var I=E-p-b+.016;B.push(Ss(s,I,n))}else{var L=(E-p-b-y)/2+.016;B.push(Ss(s,L,n)),B.push(Ts),B.push(Es(l,h,a)),B.push(Ts),B.push(Ss(s,L,n))}B.push(Ts),B.push(Es(i,h,a))}var D=n.havingBaseStyle(zo.TEXT),F=cl.makeVList({positionType:"bottom",positionData:T,children:B},D);return ws(cl.makeSpan(["delimsizing","mult"],[F],D),zo.TEXT,n,o)},Ns=.08,Ms=function(e,t,r,n,a){var o=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=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,Fo);break;case"sqrtSize1":n=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,Fo);break;case"sqrtSize2":n=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,Fo);break;case"sqrtSize3":n=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,Fo);break;case"sqrtSize4":n=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,Fo);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-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,Fo,r)}return n}(e,n,r),i=new ui(e,o),l=new di([i],{width:"400em",height:ei(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return cl.makeSvgSpan(["hide-tail"],[l],a)},As=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Os=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Rs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],zs=[0,1.2,1.8,2.4,3],Is=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ls=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"stack"}],Ds=[{type:"small",style:zo.SCRIPTSCRIPT},{type:"small",style:zo.SCRIPT},{type:"small",style:zo.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Fs=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.")},Ps=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);a<r.length&&"stack"!==r[a].type;a++){var o=ys(e,Fs(r[a]),"math"),i=o.height+o.depth;if("small"===r[a].type&&(i*=n.havingBaseStyle(r[a].style).sizeMultiplier),i>t)return r[a]}return r[r.length-1]},qs=function(e,t,r,n,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=ko.contains(Rs,e)?Is:ko.contains(As,e)?Ds:Ls;var l=Ps(e,t,i,n);return"small"===l.type?function(e,t,r,n,a,o){var i=cl.makeSymbol(e,"Main-Regular",a,n),l=ws(i,t,n,o);return r&&xs(l,n,t),l}(e,l.style,r,n,a,o):"large"===l.type?ks(e,l.size,r,n,a,o):_s(e,t,r,n,a,o)},Hs={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),o=Ps("\\surd",e*a.sizeMultiplier,Ds,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,(r=Ms("sqrtMain",s=(1+l+Ns)/i,d=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",n=.833/i):"large"===o.type?(d=1080*zs[o.size],c=(zs[o.size]+l)/i,s=(zs[o.size]+l+Ns)/i,(r=Ms("sqrtSize"+o.size,s,d,l,t)).style.minWidth="1.02em",n=1/i):(s=e+l+Ns,c=e+l,d=Math.floor(1e3*e+l)+80,(r=Ms("sqrtTall",s,d,l,t)).style.minWidth="0.742em",n=1.056),r.height=c,r.style.height=ei(s),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*i}},sizedDelim:function(e,t,r,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),ko.contains(As,e)||ko.contains(Rs,e))return ks(e,t,!1,r,n,a);if(ko.contains(Os,e))return _s(e,zs[t],!1,r,n,a);throw new vo("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:zs,customSizedDelim:qs,leftRightDelim:function(e,t,r,n,a,o){var i=n.fontMetrics().axisHeight*n.sizeMultiplier,l=5/n.fontMetrics().ptPerEm,s=Math.max(t-i,r+i),c=Math.max(s/500*901,2*s-l);return qs(e,c,!0,n,a,o)}},Vs={"\\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}},$s=["(","\\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 Us(e,t){var r=rs(e);if(r&&ko.contains($s,r.text))return r;throw new vo(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function js(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}bl({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 r=Us(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Vs[e.funcName].size,mclass:Vs[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?cl.makeSpan([e.mclass]):Hs.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(ql(e.delim,e.mode));var r=new Pl.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ei(Hs.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),bl({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new vo("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Us(t[0],e).text,color:r}}}),bl({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Us(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=es(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{js(e);for(var r,n,a=Cl(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,r="."===e.left?Ol(t,["mopen"]):Hs.leftRightDelim(e.left,o,i,t,e.mode,["mopen"]),a.unshift(r),l)for(var c=1;c<a.length;c++){var d=a[c].isMiddle;d&&(a[c]=Hs.leftRightDelim(d.delim,o,i,d.options,e.mode,[]))}if("."===e.right)n=Ol(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;n=Hs.leftRightDelim(e.right,o,i,u,e.mode,["mclose"])}return a.push(n),cl.makeSpan(["minner"],a,t)},mathmlBuilder:(e,t)=>{js(e);var r=$l(e.body,t);if("."!==e.left){var n=new Pl.MathNode("mo",[ql(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==e.right){var a=new Pl.MathNode("mo",[ql(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return Hl(r)}}),bl({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Us(t[0],e);if(!e.parser.leftrightDepth)throw new vo("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=Ol(t,[]);else{r=Hs.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?ql("|","text"):ql(e.delim,e.mode),n=new Pl.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var Ws=(e,t)=>{var r,n,a,o=cl.wrapFragment(Rl(e.body,t),t),i=e.label.slice(1),l=t.sizeMultiplier,s=0,c=ko.isCharacterBox(e.body);if("sout"===i)(r=cl.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===i){var d=Jo({number:.6,unit:"pt"},t),u=Jo({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var h=o.height+o.depth+d+u;o.style.paddingLeft=ei(h/2+d);var m=Math.floor(1e3*h*l),p="M400000 "+(n=m)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",g=new di([new ui("phase",p)],{width:"400em",height:ei(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});(r=cl.makeSvgSpan(["hide-tail"],[g],t)).style.height=ei(h),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 f=0,v=0,b=0;/box/.test(i)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),v=f=t.fontMetrics().fboxsep+("colorbox"===i?0:b)):"angl"===i?(f=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),v=Math.max(0,.25-o.depth)):v=f=c?.2:0,r=Yl(o,i,f,v,t),/fbox|boxed|fcolorbox/.test(i)?(r.style.borderStyle="solid",r.style.borderWidth=ei(b)):"angl"===i&&.049!==b&&(r.style.borderTopWidth=ei(b),r.style.borderRightWidth=ei(b)),s=o.depth+v,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)a=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:s},{type:"elem",elem:o,shift:0}]},t);else{var y=/cancel|phase/.test(i)?["svg-align"]:[];a=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!c?cl.makeSpan(["mord","cancel-lap"],[a],t):cl.makeSpan(["mord"],[a],t)},Ks=(e,t)=>{var r=0,n=new Pl.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[jl(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};bl({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,o=es(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:Ws,mathmlBuilder:Ks}),bl({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,o=es(t[0],"color-token").color,i=es(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,borderColor:o,body:l}},htmlBuilder:Ws,mathmlBuilder:Ks}),bl({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),bl({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:Ws,mathmlBuilder:Ks}),bl({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Gs={};function Zs(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<r.length;++s)Gs[r[s]]=l;o&&(fl[t]=o),i&&(vl[t]=i)}var Xs={};function Ys(e,t){Xs[e]=t}function Qs(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var Js=e=>{if(!e.parser.settings.displayMode)throw new vo("{"+e.envName+"} can be used only in display mode.")};function ec(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function tc(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:o,arraystretch:i,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var m=e.gullet.expandMacroAsText("\\arraystretch");if(null==m)i=1;else if(!(i=parseFloat(m))||i<0)throw new vo("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var p=[],g=[p],f=[],v=[],b=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new fo("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),v.push(Qs(e));;){var x=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},r&&(x={type:"styling",mode:e.mode,style:r,body:[x]}),p.push(x);var k=e.fetch().text;if("&"===k){if(u&&p.length===u){if(c||l)throw new vo("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&&(g.length>1||!d)&&g.pop(),v.length<g.length+1&&v.push([]);break}if("\\\\"!==k)throw new vo("Expected & or \\\\ or \\cr or \\end",e.nextToken);e.consume();var E=void 0;" "!==e.gullet.future().text&&(E=e.parseSizeGroup(!0)),f.push(E?E.value:null),w(),v.push(Qs(e)),p=[],g.push(p),y()}}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:a,arraystretch:i,body:g,cols:o,rowGaps:f,hskipBeforeAndAfter:n,hLinesBeforeRow:v,colSeparationType:l,tags:b,leqno:h}}function rc(e){return"d"===e.slice(0,1)?"display":"text"}var nc=function(e,t){var r,n,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(zo.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?Jo({number:3,unit:"ex"},t):12*d,m=3*d,p=e.arraystretch*h,g=.7*p,f=.3*p,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),s.push({pos:v,isDashed:e[t]})}for(b(o[0]),r=0;r<e.body.length;++r){var y=e.body[r],w=g,x=f;i<y.length&&(i=y.length);var k=new Array(y.length);for(n=0;n<y.length;++n){var E=Rl(y[n],t);x<E.depth&&(x=E.depth),w<E.height&&(w=E.height),k[n]=E}var S=e.rowGaps[r],T=0;S&&(T=Jo(S,t))>0&&(x<(T+=f)&&(x=T),T=0),e.addJot&&(x+=m),k.height=w,k.depth=x,v+=w,k.pos=v,v+=x+T,l[r]=k,b(o[r+1])}var B,C,_=v/2+t.fontMetrics().axisHeight,N=e.cols||[],M=[],A=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<a;++r){var O=l[r],R=O.pos-_,z=e.tags[r],I=void 0;(I=!0===z?cl.makeSpan(["eqn-num"],[],t):!1===z?cl.makeSpan([],[],t):cl.makeSpan([],Cl(z,t,!0),t)).depth=O.depth,I.height=O.height,A.push({type:"elem",elem:I,shift:R})}for(n=0,C=0;n<i||C<N.length;++n,++C){for(var L=N[C]||{},D=!0;"separator"===L.type;){if(D||((B=cl.makeSpan(["arraycolsep"],[])).style.width=ei(t.fontMetrics().doubleRuleSep),M.push(B)),"|"!==L.separator&&":"!==L.separator)throw new vo("Invalid separator type: "+L.separator);var F="|"===L.separator?"solid":"dashed",P=cl.makeSpan(["vertical-separator"],[],t);P.style.height=ei(v),P.style.borderRightWidth=ei(c),P.style.borderRightStyle=F,P.style.margin="0 "+ei(-c/2);var q=v-_;q&&(P.style.verticalAlign=ei(-q)),M.push(P),L=N[++C]||{},D=!1}if(!(n>=i)){var H=void 0;(n>0||e.hskipBeforeAndAfter)&&0!==(H=ko.deflt(L.pregap,u))&&((B=cl.makeSpan(["arraycolsep"],[])).style.width=ei(H),M.push(B));var V=[];for(r=0;r<a;++r){var $=l[r],U=$[n];if(U){var j=$.pos-_;U.depth=$.depth,U.height=$.height,V.push({type:"elem",elem:U,shift:j})}}V=cl.makeVList({positionType:"individualShift",children:V},t),V=cl.makeSpan(["col-align-"+(L.align||"c")],[V]),M.push(V),(n<i-1||e.hskipBeforeAndAfter)&&0!==(H=ko.deflt(L.postgap,u))&&((B=cl.makeSpan(["arraycolsep"],[])).style.width=ei(H),M.push(B))}}if(l=cl.makeSpan(["mtable"],M),s.length>0){for(var W=cl.makeLineSpan("hline",t,c),K=cl.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:l,shift:0}];s.length>0;){var Z=s.pop(),X=Z.pos-_;Z.isDashed?G.push({type:"elem",elem:K,shift:X}):G.push({type:"elem",elem:W,shift:X})}l=cl.makeVList({positionType:"individualShift",children:G},t)}if(0===A.length)return cl.makeSpan(["mord"],[l],t);var Y=cl.makeVList({positionType:"individualShift",children:A},t);return Y=cl.makeSpan(["tag"],[Y],t),cl.makeFragment([l,Y])},ac={c:"center ",l:"left ",r:"right "},oc=function(e,t){for(var r=[],n=new Pl.MathNode("mtd",[],["mtr-glue"]),a=new Pl.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 Pl.MathNode("mtd",[jl(i[s],t)]));e.tags&&e.tags[o]&&(l.unshift(n),l.push(n),e.leqno?l.unshift(a):l.push(a)),r.push(new Pl.MathNode("mtr",l))}var c=new Pl.MathNode("mtable",r),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",ei(d));var u="",h="";if(e.cols&&e.cols.length>0){var m=e.cols,p="",g=!1,f=0,v=m.length;"separator"===m[0].type&&(u+="top ",f=1),"separator"===m[m.length-1].type&&(u+="bottom ",v-=1);for(var b=f;b<v;b++)"align"===m[b].type?(h+=ac[m[b].align],g&&(p+="none "),g=!0):"separator"===m[b].type&&g&&(p+="|"===m[b].separator?"solid ":"dashed ",g=!1);c.setAttribute("columnalign",h.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 Pl.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new Pl.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},ic=function(e,t){-1===e.envName.indexOf("ed")&&Js(e);var r,n=[],a=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,i=tc(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:ec(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+=es(t[0].body[d],"textord").text}r=Number(c),l=2*r}var u=!l;i.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var n=es(e[t],"styling");es(n.body[0],"ordgroup").body.unshift(s)}if(u)l<e.length&&(l=e.length);else{var a=e.length/2;if(r<a)throw new vo("Too many math in a row: expected "+r+", but got "+a,e[0])}}));for(var h=0;h<l;++h){var m="r",p=0;h%2==1?m="l":h>0&&u&&(p=1),n[h]={type:"align",align:m,pregap:p,postgap:0}}return i.colSeparationType=u?"align":"alignat",i};Zs({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(rs(t[0])?[t[0]]:es(t[0],"ordgroup").body).map((function(e){var t=ts(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 vo("Unknown column alignment: "+t,e)})),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return tc(e.parser,n,rc(e.envName))},htmlBuilder:nc,mathmlBuilder:oc}),Zs({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("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,-1==="lcr".indexOf(r))throw new vo("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var o=tc(e.parser,n,rc(e.envName)),i=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=tc(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(rs(t[0])?[t[0]]:es(t[0],"ordgroup").body).map((function(e){var t=ts(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new vo("Unknown column alignment: "+t,e)}));if(r.length>1)throw new vo("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=tc(e.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new vo("{subarray} can contain only one column");return n},htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=tc(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},rc(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:nc,mathmlBuilder:oc}),Zs({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ic,htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){ko.contains(["gather","gather*"],e.envName)&&Js(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ec(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return tc(e.parser,t,"display")},htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ic,htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Js(e);var t={autoTag:ec(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return tc(e.parser,t,"display")},htmlBuilder:nc,mathmlBuilder:oc}),Zs({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(Js(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 r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new vo("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,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(hs(s[d])){o.push(c);var u=ts(s[d+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new vo('Expected one of "<>AV=|." after @',s[d]);for(var m=0;m<2;m++){for(var p=!0,g=d+1;g<s.length;g++){if(a=u,("mathord"===(n=s[g]).type||"atom"===n.type)&&n.text===a){p=!1,d=g;break}if(hs(s[g]))throw new vo("Missing a "+u+" character to complete a CD arrow.",s[g]);h[m].body.push(s[g])}if(p)throw new vo("Missing a "+u+" character to complete a CD arrow.",s[d])}}var f={type:"styling",body:[ms(u,h,e)],mode:"math",style:"display"};o.push(f),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:nc,mathmlBuilder:oc}),Ys("\\nonumber","\\gdef\\@eqnsw{0}"),Ys("\\notag","\\nonumber"),bl({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new vo(e.funcName+" valid only within array environment")}});var lc=Gs;bl({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if("ordgroup"!==a.type)throw new vo("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=es(a.body[i],"textord").text;if("\\begin"===n){if(!lc.hasOwnProperty(o))throw new vo("No such environment: "+o,a);var l=lc[o],{args:s,optArgs:c}=r.parseArguments("\\begin{"+o+"}",l),d={mode:r.mode,envName:o,parser:r},u=l.handler(d,s,c);r.expect("\\end",!1);var h=r.nextToken,m=es(r.parseFunction(),"environment");if(m.name!==o)throw new vo("Mismatch: \\begin{"+o+"} matched by \\end{"+m.name+"}",h);return u}return{type:"environment",mode:r.mode,name:o,nameGroup:a}}});var sc=(e,t)=>{var r=e.font,n=t.withFont(r);return Rl(e.body,n)},cc=(e,t)=>{var r=e.font,n=t.withFont(r);return jl(e.body,n)},dc={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};bl({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:r,funcName:n}=e,a=wl(t[0]),o=n;return o in dc&&(o=dc[o]),{type:"font",mode:r.mode,font:o.slice(1),body:a}},htmlBuilder:sc,mathmlBuilder:cc}),bl({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],a=ko.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:ds(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}}),bl({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:o}=r,i=r.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:sc,mathmlBuilder:cc});var uc=(e,t)=>{var r=t;return"display"===e?r=r.id>=zo.SCRIPT.id?r.text():zo.DISPLAY:"text"===e&&r.size===zo.DISPLAY.size?r=zo.TEXT:"script"===e?r=zo.SCRIPT:"scriptscript"===e&&(r=zo.SCRIPTSCRIPT),r},hc=(e,t)=>{var r,n=uc(e.size,t.style),a=n.fracNum(),o=n.fracDen();r=t.havingStyle(a);var i=Rl(e.numer,r,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}r=t.havingStyle(o);var c,d,u,h,m,p,g,f,v,b,y=Rl(e.denom,r,t);if(e.hasBarLine?(e.barSize?(d=Jo(e.barSize,t),c=cl.makeLineSpan("frac-line",t,d)):c=cl.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),n.size===zo.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,m=d>0?3*u:7*u,p=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,m=u):(h=t.fontMetrics().num3,m=3*u),p=t.fontMetrics().denom2),c){var w=t.fontMetrics().axisHeight;h-i.depth-(w+.5*d)<m&&(h+=m-(h-i.depth-(w+.5*d))),w-.5*d-(y.height-p)<m&&(p+=m-(w-.5*d-(y.height-p)));var x=-(w-.5*d);g=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:c,shift:x},{type:"elem",elem:i,shift:-h}]},t)}else{var k=h-i.depth-(y.height-p);k<m&&(h+=.5*(m-k),p+=.5*(m-k)),g=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:i,shift:-h}]},t)}return r=t.havingStyle(n),g.height*=r.sizeMultiplier/t.sizeMultiplier,g.depth*=r.sizeMultiplier/t.sizeMultiplier,f=n.size===zo.DISPLAY.size?t.fontMetrics().delim1:n.size===zo.SCRIPTSCRIPT.size?t.havingStyle(zo.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Ol(t,["mopen"]):Hs.customSizedDelim(e.leftDelim,f,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?cl.makeSpan([]):null==e.rightDelim?Ol(t,["mclose"]):Hs.customSizedDelim(e.rightDelim,f,!0,t.havingStyle(n),e.mode,["mclose"]),cl.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,cl.makeSpan(["mfrac"],[g]),b],t)},mc=(e,t)=>{var r=new Pl.MathNode("mfrac",[jl(e.numer,t),jl(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=Jo(e.barSize,t);r.setAttribute("linethickness",ei(n))}}else r.setAttribute("linethickness","0px");var a=uc(e.size,t.style);if(a.size!==t.style.size){r=new Pl.MathNode("mstyle",[r]);var o=a.size===zo.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",o),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var i=[];if(null!=e.leftDelim){var l=new Pl.MathNode("mo",[new Pl.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),i.push(l)}if(i.push(r),null!=e.rightDelim){var s=new Pl.MathNode("mo",[new Pl.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return Hl(i)}return r};bl({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:n,funcName:a}=e,o=t[0],i=t[1],l=null,s=null,c="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,l="(",s=")";break;case"\\\\bracefrac":r=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":r=!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:n.mode,continued:!1,numer:o,denom:i,hasBarLine:r,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:hc,mathmlBuilder:mc}),bl({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],o=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:a,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),bl({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:n,token:a}=e;switch(n){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:r.mode,replaceWith:t,token:a}}});var pc=["display","text","script","scriptscript"],gc=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};bl({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:n}=e,a=t[4],o=t[5],i=wl(t[0]),l="atom"===i.type&&"open"===i.family?gc(i.text):null,s=wl(t[1]),c="atom"===s.type&&"close"===s.family?gc(s.text):null,d=es(t[2],"size"),u=null;r=!!d.isBlank||(u=d.value).number>0;var h="auto",m=t[3];if("ordgroup"===m.type){if(m.body.length>0){var p=es(m.body[0],"textord");h=pc[Number(p.text)]}}else m=es(m,"textord"),h=pc[Number(m.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:o,continued:!1,hasBarLine:r,barSize:u,leftDelim:l,rightDelim:c,size:h}},htmlBuilder:hc,mathmlBuilder:mc}),bl({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:es(t[0],"size").value,token:a}}}),bl({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(es(t[1],"infix").size),i=t[2],l=o.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:hc,mathmlBuilder:mc});var fc=(e,t)=>{var r,n,a=t.style;"supsub"===e.type?(r=e.sup?Rl(e.sup,t.havingStyle(a.sup()),t):Rl(e.sub,t.havingStyle(a.sub()),t),n=es(e.base,"horizBrace")):n=es(e,"horizBrace");var o,i=Rl(n.base,t.havingBaseStyle(zo.DISPLAY)),l=Jl(n,t);if(n.isOver?(o=cl.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=cl.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"),r){var s=cl.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t);o=n.isOver?cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:r}]},t):cl.makeVList({positionType:"bottom",positionData:s.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return cl.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t)};bl({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:fc,mathmlBuilder:(e,t)=>{var r=Ql(e.label);return new Pl.MathNode(e.isOver?"mover":"munder",[jl(e.base,t),r])}}),bl({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=es(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:xl(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Cl(e.body,t,!1);return cl.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Ul(e.body,t);return r instanceof Dl||(r=new Dl("mrow",[r])),r.setAttribute("href",e.href),r}}),bl({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=es(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var l={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:xl(l)}}}),bl({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:xl(t[0])}},htmlBuilder(e,t){var r=Cl(e.body,t,!1);return cl.makeFragment(r)},mathmlBuilder:(e,t)=>new Pl.MathNode("mrow",$l(e.body,t))}),bl({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:a,token:o}=e,i=es(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(a){case"\\htmlClass":s.class=i,r={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,r={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,r={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 vo("Error parsing key-value for \\htmlData");s["data-"+u[0].trim()]=u[1].trim()}r={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(r)?{type:"html",mode:n.mode,attributes:s,body:xl(l)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var r=Cl(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=cl.makeSpan(n,r,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>Ul(e.body,t)}),bl({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:xl(t[0]),mathml:xl(t[1])}},htmlBuilder:(e,t)=>{var r=Cl(e.html,t,!1);return cl.makeFragment(r)},mathmlBuilder:(e,t)=>Ul(e.mathml,t)});var vc=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 vo("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Qo(r))throw new vo("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};bl({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},l="";if(r[0])for(var s=es(r[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=vc(u);break;case"height":o=vc(u);break;case"totalheight":i=vc(u);break;default:throw new vo("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=es(t[0],"url").url;return""===l&&(l=(l=(l=h).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:n.mode,alt:l,width:a,height:o,totalheight:i,src:h}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=Jo(e.height,t),n=0;e.totalheight.number>0&&(n=Jo(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=Jo(e.width,t));var o={height:ei(r+n)};a>0&&(o.width=ei(a)),n>0&&(o.verticalAlign=ei(-n));var i=new li(e.src,e.alt,o);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{var r=new Pl.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=Jo(e.height,t),a=0;if(e.totalheight.number>0&&(a=Jo(e.totalheight,t)-n,r.setAttribute("valign",ei(-a))),r.setAttribute("height",ei(n+a)),e.width.number>0){var o=Jo(e.width,t);r.setAttribute("width",ei(o))}return r.setAttribute("src",e.src),r}}),bl({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=es(t[0],"size");if(r.settings.strict){var o="m"===n[1],i="mu"===a.value.unit;o?(i||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):i&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:(e,t)=>cl.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=Jo(e.dimension,t);return new Pl.SpaceNode(r)}}),bl({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=cl.makeSpan([],[Rl(e.body,t)]),r=cl.makeSpan(["inner"],[r],t)):r=cl.makeSpan(["inner"],[Rl(e.body,t)]);var n=cl.makeSpan(["fix"],[]),a=cl.makeSpan([e.alignment],[r,n],t),o=cl.makeSpan(["strut"]);return o.style.height=ei(a.height+a.depth),a.depth&&(o.style.verticalAlign=ei(-a.depth)),a.children.unshift(o),a=cl.makeSpan(["thinbox"],[a],t),cl.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new Pl.MathNode("mpadded",[jl(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),bl({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var o="\\("===r?"\\)":"$",i=n.parseExpression(!1,o);return n.expect(o),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:i}}}),bl({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new vo("Mismatched "+e.funcName)}});var bc=(e,t)=>{switch(t.style.size){case zo.DISPLAY.size:return e.display;case zo.TEXT.size:return e.text;case zo.SCRIPT.size:return e.script;case zo.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};bl({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:xl(t[0]),text:xl(t[1]),script:xl(t[2]),scriptscript:xl(t[3])}},htmlBuilder:(e,t)=>{var r=bc(e,t),n=Cl(r,t,!1);return cl.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=bc(e,t);return Ul(r,t)}});var yc=(e,t,r,n,a,o,i)=>{e=cl.makeSpan([],[e]);var l,s,c,d=r&&ko.isCharacterBox(r);if(t){var u=Rl(t,n.havingStyle(a.sup()),n);s={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var h=Rl(r,n.havingStyle(a.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}if(s&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;c=cl.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ei(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:ei(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=e.height-i;c=cl.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ei(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else{if(!s)return e;var g=e.depth+i;c=cl.makeVList({positionType:"bottom",positionData:g,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:ei(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var f=[c];if(l&&0!==o&&!d){var v=cl.makeSpan(["mspace"],[],n);v.style.marginRight=ei(o),f.unshift(v)}return cl.makeSpan(["mop","op-limits"],f,n)},wc=["\\smallint"],xc=(e,t)=>{var r,n,a,o=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=es(e.base,"op"),o=!0):a=es(e,"op");var i,l=t.style,s=!1;if(l.size===zo.DISPLAY.size&&a.symbol&&!ko.contains(wc,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=cl.makeSymbol(a.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var u=i.italic,h=cl.staticSvg(d+"Size"+(s?"2":"1"),t);i=cl.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},t),a.name="\\"+d,i.classes.unshift("mop"),i.italic=u}}else if(a.body){var m=Cl(a.body,t,!0);1===m.length&&m[0]instanceof ci?(i=m[0]).classes[0]="mop":i=cl.makeSpan(["mop"],m,t)}else{for(var p=[],g=1;g<a.name.length;g++)p.push(cl.mathsym(a.name[g],a.mode,t));i=cl.makeSpan(["mop"],p,t)}var f=0,v=0;return(i instanceof ci||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(f=(i.height-i.depth)/2-t.fontMetrics().axisHeight,v=i.italic),o?yc(i,r,n,t,l,v,f):(f&&(i.style.position="relative",i.style.top=ei(f)),i)},kc=(e,t)=>{var r;if(e.symbol)r=new Dl("mo",[ql(e.name,e.mode)]),ko.contains(wc,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Dl("mo",$l(e.body,t));else{r=new Dl("mi",[new Fl(e.name.slice(1))]);var n=new Dl("mo",[ql("⁡","text")]);r=e.parentIsSupSub?new Dl("mrow",[r,n]):Ll([r,n])}return r},Ec={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};bl({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:r,funcName:n}=e,a=n;return 1===a.length&&(a=Ec[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:xc,mathmlBuilder:kc}),bl({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xl(n)}},htmlBuilder:xc,mathmlBuilder:kc});var Sc={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};bl({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:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xc,mathmlBuilder:kc}),bl({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:xc,mathmlBuilder:kc}),bl({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=Sc[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:xc,mathmlBuilder:kc});var Tc=(e,t)=>{var r,n,a,o,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=es(e.base,"operatorname"),i=!0):a=es(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=Cl(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var d=s[c];d instanceof ci&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=cl.makeSpan(["mop"],s,t)}else o=cl.makeSpan(["mop"],[],t);return i?yc(o,r,n,t,t.style,0,0):o};function Bc(e,t,r){for(var n=Cl(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,o=0;o<n.length;o++){var i=n[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(n[o].classes,t.sizingClasses(r)):n[o].classes[i+1]==="reset-size"+t.size&&(n[o].classes[i+1]="reset-size"+r.size),n[o].height*=a,n[o].depth*=a}return cl.makeFragment(n)}bl({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:xl(a),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Tc,mathmlBuilder:(e,t)=>{for(var r=$l(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var o=r[a];if(o instanceof Pl.SpaceNode);else if(o instanceof Pl.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 Pl.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var l=r.map((e=>e.toText())).join("");r=[new Pl.TextNode(l)]}var s=new Pl.MathNode("mi",r);s.setAttribute("mathvariant","normal");var c=new Pl.MathNode("mo",[ql("⁡","text")]);return e.parentIsSupSub?new Pl.MathNode("mrow",[s,c]):Pl.newDocumentFragment([s,c])}}),Ys("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),yl({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?cl.makeFragment(Cl(e.body,t,!1)):cl.makeSpan(["mord"],Cl(e.body,t,!0),t),mathmlBuilder:(e,t)=>Ul(e.body,t,!0)}),bl({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Rl(e.body,t.havingCrampedStyle()),n=cl.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,o=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return cl.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var r=new Pl.MathNode("mo",[new Pl.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Pl.MathNode("mover",[jl(e.body,t),r]);return n.setAttribute("accent","true"),n}}),bl({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:xl(n)}},htmlBuilder:(e,t)=>{var r=Cl(e.body,t.withPhantom(),!1);return cl.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=$l(e.body,t);return new Pl.MathNode("mphantom",r)}}),bl({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=cl.makeSpan([],[Rl(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),cl.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=$l(xl(e.body),t),n=new Pl.MathNode("mphantom",r),a=new Pl.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),bl({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=cl.makeSpan(["inner"],[Rl(e.body,t.withPhantom())]),n=cl.makeSpan(["fix"],[]);return cl.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=$l(xl(e.body),t),n=new Pl.MathNode("mphantom",r),a=new Pl.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}}),bl({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=es(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=Rl(e.body,t),n=Jo(e.dy,t);return cl.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new Pl.MathNode("mpadded",[jl(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),bl({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),bl({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],o=es(t[0],"size"),i=es(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&es(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var r=cl.makeSpan(["mord","rule"],[],t),n=Jo(e.width,t),a=Jo(e.height,t),o=e.shift?Jo(e.shift,t):0;return r.style.borderRightWidth=ei(n),r.style.borderTopWidth=ei(a),r.style.bottom=ei(o),r.width=n,r.height=a+o,r.depth=-o,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Jo(e.width,t),n=Jo(e.height,t),a=e.shift?Jo(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new Pl.MathNode("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",ei(r)),i.setAttribute("height",ei(n));var l=new Pl.MathNode("mpadded",[i]);return a>=0?l.setAttribute("height",ei(a)):(l.setAttribute("height",ei(a)),l.setAttribute("depth",ei(-a))),l.setAttribute("voffset",ei(a)),l}});var Cc=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];bl({type:"sizing",names:Cc,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,o=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:Cc.indexOf(n)+1,body:o}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Bc(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=$l(e.body,r),a=new Pl.MathNode("mstyle",n);return a.setAttribute("mathsize",ei(r.sizeMultiplier)),a}}),bl({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,o=!1,i=r[0]&&es(r[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:n.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var r=cl.makeSpan([],[Rl(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var o=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return cl.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var r=new Pl.MathNode("mpadded",[jl(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),bl({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],o=t[0];return{type:"sqrt",mode:n.mode,body:o,index:a}},htmlBuilder(e,t){var r=Rl(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=cl.wrapFragment(r,t);var n=t.fontMetrics().defaultRuleThickness,a=n;t.style.id<zo.TEXT.id&&(a=t.fontMetrics().xHeight);var o=n+a/4,i=r.height+r.depth+o+n,{span:l,ruleWidth:s,advanceWidth:c}=Hs.sqrtImage(i,t),d=l.height-s;d>r.height+r.depth+o&&(o=(o+d-r.height-r.depth)/2);var u=l.height-r.height-o-s;r.style.paddingLeft=ei(c);var h=cl.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var m=t.havingStyle(zo.SCRIPTSCRIPT),p=Rl(e.index,m,t),g=.6*(h.height-h.depth),f=cl.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:p}]},t),v=cl.makeSpan(["root"],[f]);return cl.makeSpan(["mord","sqrt"],[v,h],t)}return cl.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Pl.MathNode("mroot",[jl(r,t),jl(n,t)]):new Pl.MathNode("msqrt",[jl(r,t)])}});var _c={display:zo.DISPLAY,text:zo.TEXT,script:zo.SCRIPT,scriptscript:zo.SCRIPTSCRIPT};bl({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,o=a.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var r=_c[e.style],n=t.havingStyle(r).withFont("");return Bc(e.body,n,t)},mathmlBuilder(e,t){var r=_c[e.style],n=t.havingStyle(r),a=$l(e.body,n),o=new Pl.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}});yl({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===zo.DISPLAY.size||r.alwaysHandleSupSub)?xc:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===zo.DISPLAY.size||r.limits)?Tc:null:"accent"===r.type?ko.isCharacterBox(r.base)?ns:null:"horizBrace"===r.type&&!e.sub===r.isOver?fc:null:null}(e,t);if(r)return r(e,t);var n,a,o,{base:i,sup:l,sub:s}=e,c=Rl(i,t),d=t.fontMetrics(),u=0,h=0,m=i&&ko.isCharacterBox(i);if(l){var p=t.havingStyle(t.style.sup());n=Rl(l,p,t),m||(u=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(s){var g=t.havingStyle(t.style.sub());a=Rl(s,g,t),m||(h=c.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}o=t.style===zo.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var f,v=t.sizeMultiplier,b=ei(.5/d.ptPerEm/v),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 ci||w)&&(y=ei(-c.italic))}if(n&&a){u=Math.max(u,o,n.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var x=4*d.defaultRuleThickness;if(u-n.depth-(a.height-h)<x){h=x-(u-n.depth)+a.height;var k=.8*d.xHeight-(u-n.depth);k>0&&(u+=k,h-=k)}var E=[{type:"elem",elem:a,shift:h,marginRight:b,marginLeft:y},{type:"elem",elem:n,shift:-u,marginRight:b}];f=cl.makeVList({positionType:"individualShift",children:E},t)}else if(a){h=Math.max(h,d.sub1,a.height-.8*d.xHeight);var S=[{type:"elem",elem:a,marginLeft:y,marginRight:b}];f=cl.makeVList({positionType:"shift",positionData:h,children:S},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,n.depth+.25*d.xHeight),f=cl.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:b}]},t)}var T=Al(c,"right")||"mord";return cl.makeSpan([T],[c,cl.makeSpan(["msupsub"],[f])],t)},mathmlBuilder(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[jl(e.base,t)];if(e.sub&&o.push(jl(e.sub,t)),e.sup&&o.push(jl(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===zo.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===zo.DISPLAY||i.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===zo.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===zo.DISPLAY)?"munder":"msub"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===zo.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===zo.DISPLAY)?"mover":"msup"}return new Pl.MathNode(a,o)}}),yl({type:"atom",htmlBuilder:(e,t)=>cl.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Pl.MathNode("mo",[ql(e.text,e.mode)]);if("bin"===e.family){var n=Vl(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Nc={mi:"italic",mn:"normal",mtext:"normal"};yl({type:"mathord",htmlBuilder:(e,t)=>cl.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new Pl.MathNode("mi",[ql(e.text,e.mode,t)]),n=Vl(e,t)||"italic";return n!==Nc[r.type]&&r.setAttribute("mathvariant",n),r}}),yl({type:"textord",htmlBuilder:(e,t)=>cl.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,n=ql(e.text,e.mode,t),a=Vl(e,t)||"normal";return r="text"===e.mode?new Pl.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Pl.MathNode("mn",[n]):"\\prime"===e.text?new Pl.MathNode("mo",[n]):new Pl.MathNode("mi",[n]),a!==Nc[r.type]&&r.setAttribute("mathvariant",a),r}});var Mc={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ac={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};yl({type:"spacing",htmlBuilder(e,t){if(Ac.hasOwnProperty(e.text)){var r=Ac[e.text].className||"";if("text"===e.mode){var n=cl.makeOrd(e,t,"textord");return n.classes.push(r),n}return cl.makeSpan(["mspace",r],[cl.mathsym(e.text,e.mode,t)],t)}if(Mc.hasOwnProperty(e.text))return cl.makeSpan(["mspace",Mc[e.text]],[],t);throw new vo('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Ac.hasOwnProperty(e.text)){if(Mc.hasOwnProperty(e.text))return new Pl.MathNode("mspace");throw new vo('Unknown type of space "'+e.text+'"')}return new Pl.MathNode("mtext",[new Pl.TextNode(" ")])}});var Oc=()=>{var e=new Pl.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};yl({type:"tag",mathmlBuilder(e,t){var r=new Pl.MathNode("mtable",[new Pl.MathNode("mtr",[Oc(),new Pl.MathNode("mtd",[Ul(e.body,t)]),Oc(),new Pl.MathNode("mtd",[Ul(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Rc={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},zc={"\\textbf":"textbf","\\textmd":"textmd"},Ic={"\\textit":"textit","\\textup":"textup"},Lc=(e,t)=>{var r=e.font;return r?Rc[r]?t.withTextFontFamily(Rc[r]):zc[r]?t.withTextFontWeight(zc[r]):t.withTextFontShape(Ic[r]):t};bl({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:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:xl(a),font:n}},htmlBuilder(e,t){var r=Lc(e,t),n=Cl(e.body,r,!0);return cl.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Lc(e,t);return Ul(e.body,r)}}),bl({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Rl(e.body,t),n=cl.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,o=cl.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return cl.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var r=new Pl.MathNode("mo",[new Pl.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new Pl.MathNode("munder",[jl(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),bl({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Rl(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return cl.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new Pl.MathNode("mpadded",[jl(e.body,t)],["vcenter"])}),bl({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new vo("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Dc(e),n=[],a=t.havingStyle(t.style.text()),o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),n.push(cl.makeSymbol(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return cl.makeSpan(["mord","text"].concat(a.sizingClasses(t)),cl.tryCombineChars(n),a)},mathmlBuilder(e,t){var r=new Pl.TextNode(Dc(e)),n=new Pl.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Dc=e=>e.body.replace(/ /g,e.star?"␣":" "),Fc=gl,Pc="[ \r\n\t]",qc="(\\\\[a-zA-Z@]+)"+Pc+"*",Hc="[̀-ͯ]",Vc=new RegExp(Hc+"+$"),$c="("+Pc+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+Hc+"*|[\ud800-\udbff][\udc00-\udfff]"+Hc+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+qc+"|\\\\[^\ud800-\udfff])";class Uc{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($c,"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 fo("EOF",new go(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new vo("Unexpected character: '"+e[t]+"'",new fo(e[t],new go(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){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 fo(n,new go(this,t,this.tokenRegex.lastIndex))}}class jc{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 vo("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,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][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 Wc=Xs;Ys("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Ys("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Ys("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Ys("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Ys("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Ys("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ys("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Kc={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};Ys("\\char",(function(e){var t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new vo("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Kc[r.text])||n>=t)throw new vo("Invalid base-"+t+" digit "+r.text);for(var a;null!=(a=Kc[e.future().text])&&a<t;)n*=t,n+=a,e.popToken()}return"\\@char{"+n+"}"}));var Gc=(e,t,r)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new vo("\\newcommand's first argument must be a macro name");var a=n[0].text,o=e.isDefined(a);if(o&&!t)throw new vo("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!r)throw new vo("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var i=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[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 vo("Invalid number of arguments: "+l);i=parseInt(l),n=e.consumeArg().tokens}return e.macros.set(a,{tokens:n,numArgs:i}),""};Ys("\\newcommand",(e=>Gc(e,!1,!0))),Ys("\\renewcommand",(e=>Gc(e,!0,!1))),Ys("\\providecommand",(e=>Gc(e,!0,!0))),Ys("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),Ys("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),Ys("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Fc[r],fi.math[r],fi.text[r]),""})),Ys("\\bgroup","{"),Ys("\\egroup","}"),Ys("~","\\nobreakspace"),Ys("\\lq","`"),Ys("\\rq","'"),Ys("\\aa","\\r a"),Ys("\\AA","\\r A"),Ys("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Ys("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ys("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Ys("ℬ","\\mathscr{B}"),Ys("ℰ","\\mathscr{E}"),Ys("ℱ","\\mathscr{F}"),Ys("ℋ","\\mathscr{H}"),Ys("ℐ","\\mathscr{I}"),Ys("ℒ","\\mathscr{L}"),Ys("ℳ","\\mathscr{M}"),Ys("ℛ","\\mathscr{R}"),Ys("ℭ","\\mathfrak{C}"),Ys("ℌ","\\mathfrak{H}"),Ys("ℨ","\\mathfrak{Z}"),Ys("\\Bbbk","\\Bbb{k}"),Ys("·","\\cdotp"),Ys("\\llap","\\mathllap{\\textrm{#1}}"),Ys("\\rlap","\\mathrlap{\\textrm{#1}}"),Ys("\\clap","\\mathclap{\\textrm{#1}}"),Ys("\\mathstrut","\\vphantom{(}"),Ys("\\underbar","\\underline{\\text{#1}}"),Ys("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Ys("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Ys("\\ne","\\neq"),Ys("≠","\\neq"),Ys("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Ys("∉","\\notin"),Ys("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Ys("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Ys("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Ys("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Ys("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Ys("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Ys("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Ys("⟂","\\perp"),Ys("‼","\\mathclose{!\\mkern-0.8mu!}"),Ys("∌","\\notni"),Ys("⌜","\\ulcorner"),Ys("⌝","\\urcorner"),Ys("⌞","\\llcorner"),Ys("⌟","\\lrcorner"),Ys("©","\\copyright"),Ys("®","\\textregistered"),Ys("️","\\textregistered"),Ys("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Ys("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Ys("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Ys("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Ys("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Ys("⋮","\\vdots"),Ys("\\varGamma","\\mathit{\\Gamma}"),Ys("\\varDelta","\\mathit{\\Delta}"),Ys("\\varTheta","\\mathit{\\Theta}"),Ys("\\varLambda","\\mathit{\\Lambda}"),Ys("\\varXi","\\mathit{\\Xi}"),Ys("\\varPi","\\mathit{\\Pi}"),Ys("\\varSigma","\\mathit{\\Sigma}"),Ys("\\varUpsilon","\\mathit{\\Upsilon}"),Ys("\\varPhi","\\mathit{\\Phi}"),Ys("\\varPsi","\\mathit{\\Psi}"),Ys("\\varOmega","\\mathit{\\Omega}"),Ys("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ys("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Ys("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ys("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ys("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ys("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Zc={",":"\\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"};Ys("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Zc?t=Zc[r]:("\\not"===r.slice(0,4)||r in fi.math&&ko.contains(["bin","rel"],fi.math[r].group))&&(t="\\dotsb"),t}));var Xc={")":!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};Ys("\\dotso",(function(e){return e.future().text in Xc?"\\ldots\\,":"\\ldots"})),Ys("\\dotsc",(function(e){var t=e.future().text;return t in Xc&&","!==t?"\\ldots\\,":"\\ldots"})),Ys("\\cdots",(function(e){return e.future().text in Xc?"\\@cdots\\,":"\\@cdots"})),Ys("\\dotsb","\\cdots"),Ys("\\dotsm","\\cdots"),Ys("\\dotsi","\\!\\cdots"),Ys("\\dotsx","\\ldots\\,"),Ys("\\DOTSI","\\relax"),Ys("\\DOTSB","\\relax"),Ys("\\DOTSX","\\relax"),Ys("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ys("\\,","\\tmspace+{3mu}{.1667em}"),Ys("\\thinspace","\\,"),Ys("\\>","\\mskip{4mu}"),Ys("\\:","\\tmspace+{4mu}{.2222em}"),Ys("\\medspace","\\:"),Ys("\\;","\\tmspace+{5mu}{.2777em}"),Ys("\\thickspace","\\;"),Ys("\\!","\\tmspace-{3mu}{.1667em}"),Ys("\\negthinspace","\\!"),Ys("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ys("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ys("\\enspace","\\kern.5em "),Ys("\\enskip","\\hskip.5em\\relax"),Ys("\\quad","\\hskip1em\\relax"),Ys("\\qquad","\\hskip2em\\relax"),Ys("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ys("\\tag@paren","\\tag@literal{({#1})}"),Ys("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new vo("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Ys("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ys("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ys("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ys("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ys("\\newline","\\\\\\relax"),Ys("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Yc=ei(Ho["Main-Regular"]["T".charCodeAt(0)][1]-.7*Ho["Main-Regular"]["A".charCodeAt(0)][1]);Ys("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Yc+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Ys("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Yc+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Ys("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ys("\\@hspace","\\hskip #1\\relax"),Ys("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ys("\\ordinarycolon",":"),Ys("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ys("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ys("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ys("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ys("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ys("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ys("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ys("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ys("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ys("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ys("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ys("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ys("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ys("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ys("∷","\\dblcolon"),Ys("∹","\\eqcolon"),Ys("≔","\\coloneqq"),Ys("≕","\\eqqcolon"),Ys("⩴","\\Coloneqq"),Ys("\\ratio","\\vcentcolon"),Ys("\\coloncolon","\\dblcolon"),Ys("\\colonequals","\\coloneqq"),Ys("\\coloncolonequals","\\Coloneqq"),Ys("\\equalscolon","\\eqqcolon"),Ys("\\equalscoloncolon","\\Eqqcolon"),Ys("\\colonminus","\\coloneq"),Ys("\\coloncolonminus","\\Coloneq"),Ys("\\minuscolon","\\eqcolon"),Ys("\\minuscoloncolon","\\Eqcolon"),Ys("\\coloncolonapprox","\\Colonapprox"),Ys("\\coloncolonsim","\\Colonsim"),Ys("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ys("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ys("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ys("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ys("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Ys("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ys("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ys("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ys("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ys("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ys("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ys("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ys("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ys("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Ys("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Ys("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Ys("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Ys("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Ys("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Ys("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Ys("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Ys("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Ys("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Ys("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Ys("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Ys("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Ys("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Ys("\\imath","\\html@mathml{\\@imath}{ı}"),Ys("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Ys("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Ys("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Ys("⟦","\\llbracket"),Ys("⟧","\\rrbracket"),Ys("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Ys("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Ys("⦃","\\lBrace"),Ys("⦄","\\rBrace"),Ys("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Ys("⦵","\\minuso"),Ys("\\darr","\\downarrow"),Ys("\\dArr","\\Downarrow"),Ys("\\Darr","\\Downarrow"),Ys("\\lang","\\langle"),Ys("\\rang","\\rangle"),Ys("\\uarr","\\uparrow"),Ys("\\uArr","\\Uparrow"),Ys("\\Uarr","\\Uparrow"),Ys("\\N","\\mathbb{N}"),Ys("\\R","\\mathbb{R}"),Ys("\\Z","\\mathbb{Z}"),Ys("\\alef","\\aleph"),Ys("\\alefsym","\\aleph"),Ys("\\Alpha","\\mathrm{A}"),Ys("\\Beta","\\mathrm{B}"),Ys("\\bull","\\bullet"),Ys("\\Chi","\\mathrm{X}"),Ys("\\clubs","\\clubsuit"),Ys("\\cnums","\\mathbb{C}"),Ys("\\Complex","\\mathbb{C}"),Ys("\\Dagger","\\ddagger"),Ys("\\diamonds","\\diamondsuit"),Ys("\\empty","\\emptyset"),Ys("\\Epsilon","\\mathrm{E}"),Ys("\\Eta","\\mathrm{H}"),Ys("\\exist","\\exists"),Ys("\\harr","\\leftrightarrow"),Ys("\\hArr","\\Leftrightarrow"),Ys("\\Harr","\\Leftrightarrow"),Ys("\\hearts","\\heartsuit"),Ys("\\image","\\Im"),Ys("\\infin","\\infty"),Ys("\\Iota","\\mathrm{I}"),Ys("\\isin","\\in"),Ys("\\Kappa","\\mathrm{K}"),Ys("\\larr","\\leftarrow"),Ys("\\lArr","\\Leftarrow"),Ys("\\Larr","\\Leftarrow"),Ys("\\lrarr","\\leftrightarrow"),Ys("\\lrArr","\\Leftrightarrow"),Ys("\\Lrarr","\\Leftrightarrow"),Ys("\\Mu","\\mathrm{M}"),Ys("\\natnums","\\mathbb{N}"),Ys("\\Nu","\\mathrm{N}"),Ys("\\Omicron","\\mathrm{O}"),Ys("\\plusmn","\\pm"),Ys("\\rarr","\\rightarrow"),Ys("\\rArr","\\Rightarrow"),Ys("\\Rarr","\\Rightarrow"),Ys("\\real","\\Re"),Ys("\\reals","\\mathbb{R}"),Ys("\\Reals","\\mathbb{R}"),Ys("\\Rho","\\mathrm{P}"),Ys("\\sdot","\\cdot"),Ys("\\sect","\\S"),Ys("\\spades","\\spadesuit"),Ys("\\sub","\\subset"),Ys("\\sube","\\subseteq"),Ys("\\supe","\\supseteq"),Ys("\\Tau","\\mathrm{T}"),Ys("\\thetasym","\\vartheta"),Ys("\\weierp","\\wp"),Ys("\\Zeta","\\mathrm{Z}"),Ys("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ys("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ys("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ys("\\bra","\\mathinner{\\langle{#1}|}"),Ys("\\ket","\\mathinner{|{#1}\\rangle}"),Ys("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ys("\\Bra","\\left\\langle#1\\right|"),Ys("\\Ket","\\left|#1\\right\\rangle");var Qc=e=>t=>{var r=t.consumeArg().tokens,n=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=>r=>{e&&(r.macros.set("|",i),a.length&&r.macros.set("\\|",l));var o=t;!t&&a.length&&("|"===r.future().text&&(r.popToken(),o=!0));return{tokens:o?a:n,numArgs:0}};t.macros.set("|",s(!1)),a.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};Ys("\\bra@ket",Qc(!1)),Ys("\\bra@set",Qc(!0)),Ys("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Ys("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Ys("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Ys("\\angln","{\\angl n}"),Ys("\\blue","\\textcolor{##6495ed}{#1}"),Ys("\\orange","\\textcolor{##ffa500}{#1}"),Ys("\\pink","\\textcolor{##ff00af}{#1}"),Ys("\\red","\\textcolor{##df0030}{#1}"),Ys("\\green","\\textcolor{##28ae7b}{#1}"),Ys("\\gray","\\textcolor{gray}{#1}"),Ys("\\purple","\\textcolor{##9d38bd}{#1}"),Ys("\\blueA","\\textcolor{##ccfaff}{#1}"),Ys("\\blueB","\\textcolor{##80f6ff}{#1}"),Ys("\\blueC","\\textcolor{##63d9ea}{#1}"),Ys("\\blueD","\\textcolor{##11accd}{#1}"),Ys("\\blueE","\\textcolor{##0c7f99}{#1}"),Ys("\\tealA","\\textcolor{##94fff5}{#1}"),Ys("\\tealB","\\textcolor{##26edd5}{#1}"),Ys("\\tealC","\\textcolor{##01d1c1}{#1}"),Ys("\\tealD","\\textcolor{##01a995}{#1}"),Ys("\\tealE","\\textcolor{##208170}{#1}"),Ys("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ys("\\greenB","\\textcolor{##8af281}{#1}"),Ys("\\greenC","\\textcolor{##74cf70}{#1}"),Ys("\\greenD","\\textcolor{##1fab54}{#1}"),Ys("\\greenE","\\textcolor{##0d923f}{#1}"),Ys("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ys("\\goldB","\\textcolor{##ffbb71}{#1}"),Ys("\\goldC","\\textcolor{##ff9c39}{#1}"),Ys("\\goldD","\\textcolor{##e07d10}{#1}"),Ys("\\goldE","\\textcolor{##a75a05}{#1}"),Ys("\\redA","\\textcolor{##fca9a9}{#1}"),Ys("\\redB","\\textcolor{##ff8482}{#1}"),Ys("\\redC","\\textcolor{##f9685d}{#1}"),Ys("\\redD","\\textcolor{##e84d39}{#1}"),Ys("\\redE","\\textcolor{##bc2612}{#1}"),Ys("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ys("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ys("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ys("\\maroonD","\\textcolor{##ca337c}{#1}"),Ys("\\maroonE","\\textcolor{##9e034e}{#1}"),Ys("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ys("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ys("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ys("\\purpleD","\\textcolor{##7854ab}{#1}"),Ys("\\purpleE","\\textcolor{##543b78}{#1}"),Ys("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ys("\\mintB","\\textcolor{##edf2df}{#1}"),Ys("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ys("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ys("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ys("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ys("\\grayD","\\textcolor{##d6d8da}{#1}"),Ys("\\grayE","\\textcolor{##babec2}{#1}"),Ys("\\grayF","\\textcolor{##888d93}{#1}"),Ys("\\grayG","\\textcolor{##626569}{#1}"),Ys("\\grayH","\\textcolor{##3b3e40}{#1}"),Ys("\\grayI","\\textcolor{##21242c}{#1}"),Ys("\\kaBlue","\\textcolor{##314453}{#1}"),Ys("\\kaGreen","\\textcolor{##71B307}{#1}");var Jc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class ed{constructor(e,t,r){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 jc(Wc,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Uc(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,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new fo("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,a=this.future(),o=0,i=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new vo("Extra }",n)}else if("EOF"===n.text)throw new vo("Unexpected end of input in a macro argument, expected '"+(e&&r?e[i]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[i])&&n.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||r);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new vo("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var a=this.popToken();if(r[n]!==a.text)throw new vo("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 vo("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new vo("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var l=a[i];if("#"===l.text){if(0===i)throw new vo("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 vo("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 fo(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}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 r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var o=n.replace(/##/g,"");-1!==o.indexOf("#"+(a+1));)++a;for(var i=new Uc(n,this.settings),l=[],s=i.lex();"EOF"!==s.text;)l.push(s),s=i.lex();return l.reverse(),{tokens:l,numArgs:a}}return n}isDefined(e){return this.macros.has(e)||Fc.hasOwnProperty(e)||fi.math.hasOwnProperty(e)||fi.text.hasOwnProperty(e)||Jc.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Fc.hasOwnProperty(e)&&!Fc[e].primitive}}var td=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,rd=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),nd={"́":{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"}},ad={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class od{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 ed(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 vo("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 fo("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==od.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&Fc[n.text]&&Fc[n.text].infix)break;var a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&r.push(a)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n<e.length;n++)if("infix"===e[n].type){if(-1!==r)throw new vo("only one infix operator per group",e[n].token);r=n,t=e[n].replaceWith}if(-1!==r&&t){var a,o,i=e.slice(0,r),l=e.slice(r+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[r],o],[]):this.callFunction(t,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new vo("Expected group after '"+r+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,r,n=this.parseGroup("atom",e);if("text"===this.mode)return n;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(n&&"op"===n.type){var o="\\limits"===a.text;n.limits=o,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new vo("Limit controls must follow a math operator",a);n.alwaysHandleSupSub&&(n.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new vo("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(r)throw new vo("Double subscript",a);r=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new vo("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(!rd[a.text])break;var s=td.test(a.text),c=[];for(c.push(new fo(rd[a.text])),this.consume();;){var d=this.fetch().text;if(!rd[d])break;if(td.test(d)!==s)break;c.unshift(new fo(rd[d])),this.consume()}var u=this.subparse(c);s?r={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||r?{type:"supsub",mode:this.mode,base:n,sup:t,sub:r}:n}parseFunction(e,t){var r=this.fetch(),n=r.text,a=Fc[n];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new vo("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!a.allowedInText)throw new vo("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new vo("Can't use function '"+n+"' in math mode",r);var{args:o,optArgs:i}=this.parseArguments(n,a);return this.callFunction(n,o,i,r,e)}callFunction(e,t,r,n,a){var o={funcName:e,parser:this,token:n,breakOnTokenText:a},i=Fc[e];if(i&&i.handler)return i.handler(o,t,r);throw new vo("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],a=[],o=0;o<r;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 vo("Null argument, please report this as a bug");n.push(s)}}return{args:n,optArgs:a}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",r);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(r)throw new vo("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new vo("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new vo("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var n,a="";"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(e,t){for(var r,n=this.fetch(),a=n,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(a=r).text,this.consume();if(""===o)throw new vo("Invalid "+t+": '"+n.text+"'",n);return n.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new vo("Invalid color: '"+t.text+"'",t);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,r=!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",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new vo("Invalid size: '"+t.text+"'",t);var a={number:+(n[1]+n[2]),unit:n[3]};if(!Qo(a))throw new vo("Invalid unit: '"+a.unit+"'",t);return{type:"size",mode:this.mode,value:a,isBlank:r}}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 r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var n=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:r.loc,body:a};return t&&this.switchMode(n),o}parseGroup(e,t){var r,n=this.fetch(),a=n.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(),r={type:"ordgroup",mode:this.mode,loc:go.range(n,l),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!Jc.hasOwnProperty(a)){if(this.settings.throwOnError)throw new vo("Undefined control sequence: "+a,n);r=this.formatUnsupportedCmd(a),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:go.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:go.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:go.range(n,e[r+1]),text:a+a}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new vo("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}ad.hasOwnProperty(t[0])&&!fi[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=ad[t[0]]+t.slice(1));var a,o=Vc.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),fi[this.mode][t]){this.settings.strict&&"math"===this.mode&&Gi.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,l=fi[this.mode][t].group,s=go.range(e);if(pi.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&&(Do(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:go.range(e),text:t}}if(this.consume(),o)for(var d=0;d<o[0].length;d++){var u=o[0][d];if(!nd[u])throw new vo("Unknown accent ' "+u+"'",e);var h=nd[u][this.mode]||nd[u].text;if(!h)throw new vo("Accent "+u+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:go.range(e),label:h,isStretchy:!1,isShifty:!0,base:a}}return a}}od.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var id=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new od(e,t);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new vo("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new fo("\\df@tag")])}]}return n};"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 ld=function(e,t,r){if(r.throwOnError||!(e instanceof vo))throw e;var n=cl.makeSpan(["katex-error"],[new ci(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+r.errorColor),n},sd=function(e,t){var r=new To(t);try{return function(e,t,r){var n,a=Kl(r);if("mathml"===r.output)return Wl(e,t,a,r.displayMode,!0);if("html"===r.output){var o=Il(e,a);n=cl.makeSpan(["katex"],[o])}else{var i=Wl(e,t,a,r.displayMode,!1),l=Il(e,a);n=cl.makeSpan(["katex"],[i,l])}return Gl(n,r)}(id(e,r),e,r)}catch(n){return ld(n,e,r)}},cd=function(e,t){return sd(e,t).toMarkup()};const dd={color:{type:String,default:""},defaultLaTexContent:{type:String,default:""}},ud={class:"editify-mathformula"},hd={class:"editify-mathformula-label"},md=["placeholder"],pd={class:"editify-mathformula-footer"},gd=Rn(t.defineComponent({name:"InsertMathformula",__name:"insertMathformula",props:dd,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref(""),l=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},s=e=>{e.currentTarget.style.borderColor=""},c=()=>{a("insert",i.value)};return t.watch((()=>n.defaultLaTexContent),(e=>{i.value=e}),{immediate:!0}),(e,r)=>(t.openBlock(),t.createElementBlock("div",ud,[t.createElementVNode("div",hd,t.toDisplayString(n.defaultLaTexContent?t.unref(o)("editMathformula"):t.unref(o)("insertMathformula")),1),t.withDirectives(t.createElementVNode("textarea",{class:"editify-mathformula-textarea","onUpdate:modelValue":r[0]||(r[0]=e=>i.value=e),placeholder:t.unref(o)("mathformulaPlaceholder"),onFocus:l,onBlur:s},null,40,md),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",pd,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:c},t.toDisplayString(t.unref(o)("confirm")),5)])]))}}),[["__scopeId","data-v-980bdb1d"]]),fd=e=>"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"],vd=e=>!!fd(e)||!!e.parent&&vd(e.parent),bd=e=>fd(e)?e:e.parent?bd(e.parent):null,yd=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?vd(e.range.anchor.element):t.flatList.some((e=>vd(e.element)))),wd=(e,t)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return bd(e.range.anchor.element);const r=t.list.map((e=>bd(e.element)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let n=!0;for(let a=1;a<r.length;a++)if(!r[a].isEqual(r[0])){n=!1;break}return n?r[0]:null},xd=e=>!e.isEmpty()&&("span"==e.parsedom&&"closed"==e.type&&e.hasMarks()&&e.marks["data-editify-attachment"]),kd=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?xd(e.range.anchor.element):t.flatList.some((e=>xd(e.element)))),Ed=e=>{e.component(no.name,no)},Sd="0.1.47";console.log(`%c vue-editify %c v${Sd} `,"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=no,e.attachment=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;return r.exposed.editor.value&&(a=yd(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Gr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Jr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Zr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)),{name:"attachment",menu:{sequence:e.sequence||100,extraDisabled:e=>("link"==e||"quote"==e||"codeBlock"==e)&&kd(r.exposed.editor.value,r.exposed.dataRangeCaches.value),extend:{type:"select",title:e.title||n("insertAttachment"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!1,disabled:a||e.disabled,default:()=>t.h(Vn,{value:"attachment"}),layer:(a,o)=>t.h(po,{color:r.props.color,accept:e.accept,allowedFileType:e.allowedFileType||[],multiple:!!e.multiple,maxSize:e.maxSize,minSize:e.minSize,customUpload:e.customUpload,handleError:e.handleError,onChange:()=>{o.$refs.layerRef.setPosition()},onInsert:(e,t)=>{if((t=t.filter((e=>!!e))).length){const a=r.exposed.editor.value;t.forEach((t=>{const r={"data-editify-attachment":t,"data-editify-attachment-name":e||n("attachmentDefaultName")},o=new y("closed","span",r,null,null);a.insertElement(o),a.range.anchor.moveToEnd(o),a.range.focus.moveToEnd(o)})),a.formatElementStack(),a.domRender(),a.rangeRender()}o.show=!1}})}},updateView:()=>{const e=r.exposed.editor.value;y.flatElements(e.stack).forEach((e=>{"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-attachment"]&&(le.off(e.elm,"click"),le.on(e.elm,"click",(async()=>{const t=e.marks["data-editify-attachment"],r=await fetch(t,{method:"GET"}),n=await r.blob(),a=document.createElement("a");a.setAttribute("target","_blank"),a.setAttribute("href",URL.createObjectURL(n)),a.setAttribute("download",e.marks["data-editify-attachment-name"]),a.click()})))}))},customParseNode:e=>(e.hasMarks()&&e.marks["data-editify-attachment"]&&"span"==e.parsedom&&(e.type="closed"),e),pasteKeepMarks:e=>{const t={};return"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-attachment"]&&(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"])),t},renderRule:e=>{if(e.hasMarks()&&e.marks["data-editify-attachment"]){e.marks.title=n("attachmentDownloadTitle"),e.marks["data-editify-attachment-name"]||(e.marks["data-editify-attachment-name"]=n("attachmentDefaultName"));const t=r.exposed.editor.value,a=t.getPreviousElement(e),o=t.getNextElement(e);if(!a||!a.isSpaceText()){const r=y.getSpaceElement();t.addElementBefore(r,e)}if(!o||!o.isSpaceText()){const r=y.getSpaceElement();t.addElementAfter(r,e)}t.range&&e.isContains(t.range.anchor.element)&&t.range.anchor.moveToEnd(t.getNextElement(e)),t.range&&e.isContains(t.range.focus.element)&&t.range.focus.moveToEnd(t.getNextElement(e))}}}}},e.default=Ed,e.elementIsInList=Ur,e.elementIsInTask=jr,e.elementIsMatch=Hr,e.getMatchElementByElement=Vr,e.getMatchElementsByRange=$r,e.getMathformulaElement=bd,e.getMathformulaElementByRange=wd,e.getRangeText=on,e.hasAttachmentInRange=kd,e.hasImageInRange=tn,e.hasLinkInRange=Jr,e.hasListInRange=(e,t,r=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Ur(e.range.anchor.element,r):t.flatList.some((e=>Ur(e.element,r)))),e.hasMathformulaInRange=yd,e.hasPreInRange=Gr,e.hasQuoteInRange=Zr,e.hasTableInRange=en,e.hasTaskInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?jr(e.range.anchor.element):t.flatList.some((e=>jr(e.element)))),e.hasVideoInRange=rn,e.insertCodeBlock=Cn,e.insertImage=Sn,e.insertLink=En,e.insertSeparator=_n,e.insertTable=Bn,e.insertVideo=Tn,e.install=Ed,e.isAttachment=xd,e.isList=Wr,e.isMathformula=fd,e.isRangeInList=Yr,e.isRangeInPre=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!Vr(e.range.anchor.element,{parsedom:"pre"}):t.list.every((e=>!!Vr(e.element,{parsedom:"pre"})))),e.isRangeInQuote=Xr,e.isRangeInTask=Qr,e.isTask=Kr,e.isUnderMathformula=vd,e.mathformula=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;r.exposed.editor.value&&(a=Gr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Jr(r.exposed.editor.value,r.exposed.dataRangeCaches.value));let o="";return{name:"mathformula",menu:{sequence:e.sequence||101,extraDisabled:e=>("link"==e||"image"==e||"video"==e||"table"==e||"codeBlock"==e)&&yd(r.exposed.editor.value,r.exposed.dataRangeCaches.value),extend:{type:"select",title:e.title||n("insertMathformula"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!!r.exposed.editor.value&&yd(r.exposed.editor.value,r.exposed.dataRangeCaches.value),disabled:a||e.disabled,onLayerShow(){const e=wd(r.exposed.editor.value,r.exposed.dataRangeCaches.value);e&&(o=e.marks["data-editify-mathformula"]||"")},default:()=>t.h(Vn,{value:"mathformula"}),layer:(n,a)=>t.h(gd,{color:r.props.color,defaultLaTexContent:o,onInsert:t=>{if(t){const a=r.exposed.editor.value,o=wd(r.exposed.editor.value,r.exposed.dataRangeCaches.value);o&&(o.toEmpty(),a.range.anchor.moveToStart(a.getNextElement(o)),a.range.focus.moveToStart(a.getNextElement(o)));let i="";try{i=cd(t,{output:"mathml",throwOnError:!0})}catch(n){i="","function"==typeof e.handleError&&e.handleError(n)}if(i){const e=`<span data-editify-mathformula="${t}" contenteditable="false">${i}</span>`,r=a.parseHtml(e);a.insertElement(r[0]),a.range.anchor.moveToEnd(r[0]),a.range.focus.moveToEnd(r[0]),a.formatElementStack(),a.domRender(),a.rangeRender()}}a.show=!1}})}},extraKeepTags:["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"],pasteKeepMarks:e=>{let t={};return(fd(e)||vd(e))&&(t=Ir(e.marks)),t},pasteKeepStyles:e=>{let t={};return(fd(e)||vd(e))&&(t=Ir(e.styles)),t},customParseNode:e=>("span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"]&&y.flatElements(e.children).forEach((e=>{e.locked=!0,e.isText()||e.hasChildren()||(e.type="closed")})),e),renderRule:e=>{if("span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"]){const t=r.exposed.editor.value,n=t.getPreviousElement(e),a=t.getNextElement(e);if(!n||!n.isSpaceText()){const r=y.getSpaceElement();t.addElementBefore(r,e)}if(!a||!a.isSpaceText()){const r=y.getSpaceElement();t.addElementAfter(r,e)}t.range&&e.isContains(t.range.anchor.element)&&t.range.anchor.moveToEnd(t.getNextElement(e)),t.range&&e.isContains(t.range.focus.element)&&t.range.focus.moveToEnd(t.getNextElement(e))}}}}},e.queryTextMark=an,e.queryTextStyle=nn,e.removeTextMark=xn,e.removeTextStyle=wn,e.setAlign=gn,e.setIndentDecrease=mn,e.setIndentIncrease=hn,e.setLineHeight=kn,e.setList=fn,e.setQuote=pn,e.setTask=vn,e.setTextMark=yn,e.setTextStyle=bn,e.version=Sd,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 r=Object.defineProperty,n=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);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 r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let r=0,n=e.toString(),a=t.toString();try{r+=n.split(".")[1].length}catch(o){}try{r+=a.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,r)})),divide:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=e.toString(),o=t.toString();try{r=a.split(".")[1].length}catch(i){}try{n=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,n-r)}))},o={insert(e,t,r){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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,r)+t+e.substring(r,e.length)},delete(e,t,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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+r,e.length)},replace(e,t,r,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(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof n)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+n+e.substring(r,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let r=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(r=r.replace(/\s/g,"")),r}},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 r=e,n=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)n+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:n,left:a,right:t.offsetWidth-a-r.offsetWidth,bottom:t.offsetHeight-n-r.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,r=parseFloat(this.getCssStyle(e,"padding-left")),n=parseFloat(this.getCssStyle(e,"padding-right"));return a.subtract(t,r,n)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,r=parseFloat(this.getCssStyle(e,"padding-top")),n=parseFloat(this.getCssStyle(e,"padding-bottom"));return a.subtract(t,r,n)},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 r=e.classList;o.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;o.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;return o.trim(t).split(/\s+/).every((e=>r.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let r=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(r=e),"function"==typeof e&&(t=e);let n=!0;r.addEventListener("scroll",(()=>{if(this.getScrollTop(r)<=0){if(!n)return;"function"==typeof t&&(n=!1,t({state:"top",target:r}))}else{let e={state:"bottom",target:r},o=0;if(o=r==window?window.innerHeight:r.clientHeight,a.add(this.getScrollTop(r),o)+1>=this.getScrollHeight(r)&&o!=this.getScrollHeight(r)){if(!n)return;"function"==typeof t&&(n=!1,t(e))}else n=!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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,o=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollTop=document.body.scrollTop=n:r.scrollTop=n,e();else{let i=10,l=a.divide(o,i),s=this.getScrollTop(r),c=a.divide(a.subtract(n,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollTop=document.body.scrollTop=s=a.add(s,c):r.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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,o=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(o<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=n:r.scrollLeft=n,e();else{let i=10,l=a.divide(o,i),s=this.getScrollLeft(r),c=a.divide(a.subtract(n,s),l),d=setInterval((()=>{l>0?(l--,t?document.documentElement.scrollLeft=document.body.scrollLeft=s=a.add(s,c):r.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 r="";return r=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],r},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",r="",n=o.trim(e,!0).substring(1,o.trim(e,!0).length-1).split("=");return 1==n.length&&(r=n[0]),2==n.length&&(r={attributeName:n[0],attributeValue:n[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:r}}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,t){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");let r=document.createElement(t||"div");return r.innerHTML=e,1==r.children.length?r.children[0]:Array.from(r.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 r=e[l]||{};null==t||""===t?e[l]={}:(delete r[t],e[l]=r)},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 r=e[l]||{};return null==t||""===t?r:r[t]},set(e,t,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(null==t||""===t)throw new TypeError("The second parameter must be a unique key");let n=e[l]||{};n[t]=r,e[l]=n}},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 r=null;if("Chinese"==t&&(r=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(r=/[\u4e00-\u9fa5]/),"email"==t&&(r=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(r=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(r=/^\d+$/),"int-"==t&&(r=/^-\d+$/),"int"==t&&(r=/^-?\d+$/),"pos"==t&&(r=/^\d*\.?\d+$/),"neg"==t&&(r=/^-\d*\.?\d+$/),"number"==t&&(r=/^-?\d*\.?\d+$/),"phone"==t&&(r=/^1[0-9]\d{9}$/),"idCard"==t&&(r=/^[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&&(r=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(r=/^(?:(?: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&&(r=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(r=/^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&&(r=/^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&&(r=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(r=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(r=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!r)throw new Error("The second parameter is out of scope");return r.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=window.location.search.substr(1);if(!r){let e=window.location.hash.split("?");2==e.length&&(r=e[1])}let n=r.match(t);return n?decodeURIComponent(n[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 r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(r.length!=n.length)return!1;let a=r.length,o=!0;for(let i=0;i<a;i++){let n=r[i],a=e[n],l=t[n];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 r in e)t[r]=this.clone(e[r]);return t}return e}},d=e=>{let t=e.split(/[\s]+/g),r=[];return t.forEach((e=>{let t=e.split("."),n={eventName:t[0]};t.length>1&&(n.guid=t[1]),r.push(n)})),r},u=(e,t,r)=>{let n=s.get(e,"dap-defined-events")||{},a=Object.keys(n),o=a.length;for(let i=0;i<o;i++){let o=a[i];n[o].type==t&&(r?o==t+"."+r&&(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0):(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0))}n=(e=>{let t={};return Object.keys(e).forEach((r=>{e[r]&&(t[r]=e[r])})),t})(n),s.set(e,"dap-defined-events",n)},h={on(e,t,r,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(!t||"string"!=typeof t)throw new TypeError("The second argument must be a string");if(!r||"function"!=typeof r)throw new TypeError("The third argument must be a function");c.isObject(n)||(n={});d(t).forEach((t=>{((e,t,r,n,a)=>{let o=s.get(e,"dap-defined-events")||{};r||(r=s.get(e,"dap-event-guid")||0,s.set(e,"dap-event-guid",r+1)),o[r=t+"."+r]&&o[r].type==t&&e.removeEventListener(t,o[r].fn,o[r].options),e.addEventListener(t,n,a),o[r]={type:t,fn:n,options:a},s.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,r.bind(e),n)}))},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 r=s.get(e,"dap-defined-events");if(!r)return;if(!t){let t=Object.keys(r),n=t.length;for(let a=0;a<n;a++){let n=t[a];e.removeEventListener(r[n].type,r[n].fn,r[n].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}},m={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,r)=>{e&&e instanceof File||r(new TypeError("The argument must be a File object"));let n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{let e=n.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 r=e.split(","),n=r[0].match(/:(.*?);/)[1],a=atob(r[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:n})},compressImage(e,t){const r={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};c.isObject(t)&&(a.isNumber(t.width)&&(r.width=t.width),a.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(r.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(r.mimeType=t.mimeType),a.isNumber(t.maxSize)&&(r.maxSize=t.maxSize),a.isNumber(t.minSize)&&(r.minSize=t.minSize));const n=(e,t,a)=>{let o=e.toDataURL("image/"+r.mimeType,a),i=this.dataBase64toFile(o,t);if(r.maxSize>0&&i.size>1024*r.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const r=n(e,t,a);o=r.url,i=r.file,a=r.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(r.minSize>0&&e.size<=1024*r.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=r.width||l.width,a.height=r.width?r.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)+"."+r.mimeType;let d=n(a,c,r.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){return c.isObject(e)||Array.isArray(e)?JSON.parse(JSON.stringify(e)):e},v=function(e,t){return 3==t.nodeType?i.isContains(e,t.parentNode):i.isContains(e,t)},b=class e{constructor(e,t,r,a,o){n(this,"key",function(){let e=s.get(window,"data-alex-editor-key")||0;return e++,s.set(window,"data-alex-editor-key",e),e}()),n(this,"type"),n(this,"parsedom"),n(this,"marks"),n(this,"styles"),n(this,"textContent"),n(this,"children",null),n(this,"parent",null),n(this,"behavior","default"),n(this,"namespace",null),n(this,"locked",!1),n(this,"elm",null),this.type=e,this.parsedom=t,this.marks=r,this.styles=a,this.textContent=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(){if(this.isText())return!this.textContent;if(this.isBlock()||this.isInblock()||this.isInline()){if(!this.hasChildren())return!0;return this.children.every((e=>e.isEmpty()))}return!1}isSpaceText(){return this.isText()&&!this.isEmpty()&&f(this.textContent)}getUneditableElement(){return this.hasMarks()&&"false"==this.marks.contenteditable?this:this.isBlock()?null:this.parent.getUneditableElement()}isEqual(t){return!!e.isElement(t)&&this.key==t.key}isContains(e){return!!this.isEqual(e)||!e.isBlock()&&this.isContains(e.parent)}isOnlyHasBreak(){if(this.hasChildren()){const e=this.children.some((e=>e.isBreak())),t=this.children.every((e=>e.isBreak()||e.isEmpty()));return e&&t}return!1}isPreStyle(){const e=this.getBlock(),t=this.getInblock();return t?"pre"==t.parsedom||(!(!t.hasStyles()||"pre"!=t.styles["white-space"]&&"pre-wrap"!=t.styles["white-space"])||t.parent.isPreStyle()):"pre"==e.parsedom||!(!e.hasStyles()||"pre"!=e.styles["white-space"]&&"pre-wrap"!=e.styles["white-space"])}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 r=new e(this.type,this.parsedom,g(this.marks),g(this.styles),this.textContent);return r.behavior=this.behavior,r.namespace=this.namespace,r.locked=this.locked,t&&this.hasChildren()&&this.children.forEach((e=>{let n=e.clone(t);r.hasChildren()?r.children.push(n):r.children=[n],n.parent=r})),r}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.isBlock()?this:this.parent.getBlock()}getInblock(){return this.isInblock()?this:this.isBlock()?null:this.parent.getInblock()}getInline(){return this.isInline()?this:this.isBlock()?null:this.parent.getInline()}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 r=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed()));return this.isEqual(r[0])}return!1}isLast(t){if(!this.isText()&&!this.isClosed())return!1;if(t.isEqual(this))return!1;if(t.isContains(this)){const r=e.flatElements(t.children).filter((e=>e.isText()||e.isClosed())),n=r.length;return this.isEqual(r[n-1])}return!1}__render(){let t=null;if(this.isText()){t=this.namespace?document.createElementNS(this.namespace,e.TEXT_NODE):document.createElement(e.TEXT_NODE);const r=document.createTextNode(this.textContent);t.appendChild(r)}else 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,g(this.marks),g(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()&&this.children.forEach((e=>{let r=e.__fullClone();t.hasChildren()?t.children.push(r):t.children=[r],r.parent=t})),t}static isElement(t){return t instanceof e}static flatElements(e){const t=e=>{let r=[];const n=e.length;for(let a=0;a<n;a++)if(e[a]&&(r.push(e[a]),e[a].hasChildren())){const n=t(e[a].children);r.push(...n)}return r};return t(e)}static getSpaceElement(){return new e("text",null,null,null,"\ufeff")}static create(t){let r=null;return"text"==t.type?r=new e(t.type,null,t.marks?t.marks:null,t.styles?t.styles:null,t.textcontent?t.textcontent:null):(r=new e(t.type,t.parsedom,t.marks?t.marks:null,t.styles?t.styles:null,null),"inblock"==t.type&&t.behavior&&(r.behavior=t.behavior),"closed"!=t.type&&Array.isArray(t.children)&&(r.children=t.children.map((t=>{const n=e.create(t);return n.parent=r,n})))),t.namespace&&(r.namespace=t.namespace),"boolean"==typeof t.locked&&(r.locked=t.locked),r}};n(b,"BLOCK_NODE","p"),n(b,"TEXT_NODE","span"),n(b,"VOID_NODES",["colgroup","col"]),n(b,"EMPTY_NODES",["meta","link","style","script","title","base","noscript","template","annotation"]);let y=b;class w{constructor(e,t){n(this,"anchor"),n(this,"focus"),this.anchor=e,this.focus=t}}class x{constructor(e,t){if(n(this,"element"),n(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))),r=t.length;if(0==r)throw new Error("There is no element to set the focus");this.moveToEnd(t[r-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(){n(this,"records",[]),n(this,"current",-1)}push(e,t){this.current<this.records.length-1&&(this.records.length=this.current+1);const r=e.map((e=>e.__fullClone())),n=this.__cloneRange(r,t);this.records.push({stack:r,range:n}),this.current+=1}get(e){let t=this.current;if(-1==e){if(t<=0)return null;t-=1}else if(1==e){if(t>=this.records.length-1)return null;t+=1}const{stack:r,range:n}=this.records[t],a=r.map((e=>e.__fullClone()));return{current:t,stack:a,range:this.__cloneRange(a,n)}}updateCurrentRange(e){const t=this.records[this.current],r=this.__cloneRange(t.stack,e);this.records[this.current].range=r}__cloneRange(e,t){if(t){const r=y.flatElements(e).find((e=>e.key==t.anchor.element.key)),n=y.flatElements(e).find((e=>e.key==t.focus.element.key));if(r&&n){const e=new x(r,t.anchor.offset),a=new x(n,t.focus.offset);return new w(e,a)}}return null}}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"}],B=[{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")}))}},_=function(e){if(e.hasChildren()){const t=e.children.filter((e=>!e.isEmpty())),r=t.filter((e=>e.isInblock()));r.length&&r.length!=t.length&&r.forEach((e=>{e.type="inline"}))}},N=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())),r=t.filter((e=>e.isBreak()));r.length&&r.length==t.length?(this.range&&e.isContains(this.range.anchor.element)&&this.range.anchor.moveToStart(r[0]),this.range&&e.isContains(this.range.focus.element)&&this.range.focus.moveToStart(r[0]),e.children=[r[0]]):r.length&&r.forEach((e=>{e.toEmpty()}))}},A=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 r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,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 r=e.parent.children.findIndex((t=>e.isEqual(t)));e.parent.children.splice(r,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 r=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(r,1)}else if(e.isInline()){e.children.push(...t.children),e.children.forEach((t=>{t.parent=e})),r(e);const n=t.parent.children.findIndex((e=>t.isEqual(e)));t.parent.children.splice(n,1)}},r=e=>{if(e.hasChildren()&&e.children.length>1){let a=0;for(;a<=e.children.length-2;)r=e.children[a],n=e.children[a+1],r.locked||n.locked||!(r.isEmpty()||n.isEmpty()||(r.isText()&&n.isText()?r.isEqualStyles(n)&&r.isEqualMarks(n):r.isInline()&&n.isInline()&&r.parsedom==n.parsedom&&r.isEqualMarks(n)&&r.isEqualStyles(n)))?a++:t(e.children[a],e.children[a+1])}var r,n};r(e)},O=function(e){const t=(e,t)=>{t.isText()?(e.type="text",e.parsedom=null,t.hasMarks()&&(e.hasMarks()?Object.assign(e.marks,g(t.marks)):e.marks=g(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,g(t.styles)):e.styles=g(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,g(t.marks)):e.marks=g(t.marks)),t.hasStyles()&&(e.hasStyles()?Object.assign(e.styles,g(t.styles)):e.styles=g(t.styles)),t.hasChildren()&&(e.children=[...t.children],e.children.forEach((t=>{t.parent=e}))),r(e))},r=e=>{var r,n;e.hasChildren()&&1==e.children.length&&e.children[0]&&(r=e,n=e.children[0],!r.locked&&!n.locked&&(n.isText()&&r.isInline()?r.parsedom==y.TEXT_NODE:(r.isInline()&&n.isInline()||r.isInblock()&&n.isInblock())&&r.parsedom==n.parsedom))&&t(e,e.children[0])};r(e)},R=function(e){if(e.isText()){let t=e.textContent,r=0;for(;r<t.length;){const n=t.charAt(r);f(n)&&r>0&&f(t.charAt(r-1))?(this.range&&this.range.anchor.element.isEqual(e)&&this.range.anchor.offset>=r+1&&(this.range.anchor.offset-=1),this.range&&this.range.focus.element.isEqual(e)&&this.range.focus.offset>=r+1&&(this.range.focus.offset-=1),t=o.delete(t,r,1)):r++}e.textContent=t}},{Mac:z}=p.os(),I=function(e,t){let r="",n="";return t.forEach((e=>{const t=e.element.clone();e.offset&&(t.textContent=t.textContent.substring(e.offset[0],e.offset[1])),t.__render(),r+=t.elm.outerHTML,n+=t.elm.innerText})),e.setData("text/plain",n),e.setData("text/html",r),{html:r,text:n}},L=async function(e,t,r){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{for(let e=0;e<t.length;e++)0==e?this.insertElement(t[e]):this.insertElement(t[e],!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=r.length;for(let t=0;t<e;t++)if(r[t].type.startsWith("image/"))if("function"==typeof this.customImagePaste)await this.customImagePaste.apply(this,[r[t]]);else{const e=await m.dataFileToBase64(r[t]),n=new y("closed","img",{src:e},null,null);this.insertElement(n),this.emit("pasteImage",e)}else if(r[t].type.startsWith("video/"))if("function"==typeof this.customVideoPaste)await this.customVideoPaste.apply(this,[r[t]]);else{const e=await m.dataFileToBase64(r[t]),n=new y("closed","video",{src:e},null,null);this.insertElement(n),this.emit("pasteVideo",e)}else"function"==typeof this.customFilePaste&&await this.customFilePaste.apply(this,[r[t]])}},D=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),r=this.getNextElementOfPoint(e),n=e.element.getBlock(),a=e.element.getInblock();t&&a&&a.isContains(t)?e.moveToEnd(t):r&&a&&a.isContains(r)?e.moveToStart(r):t&&n.isContains(t)?e.moveToEnd(t):r&&n.isContains(r)?e.moveToStart(r):t?e.moveToEnd(t):r&&e.moveToStart(r)},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),r=i.getScrollWidth(e);if(e.clientHeight<t||e.clientWidth<r){const n=window.getSelection();if(0==n.rangeCount)return;const a=n.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(),r=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.top-r.top})}else if(s.bottom>c.bottom){await i.setScrollTop({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollTop({el:e,number:t.bottom-r.bottom})}if(e.clientWidth<r)if(s.left<c.left){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.left-r.left+20})}else if(s.right>c.right){await i.setScrollLeft({el:e,number:0});const t=l.getBoundingClientRect(),r=e.getBoundingClientRect();i.setScrollLeft({el:e,number:t.right-r.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))}},$=function(){if(this.__isInputChinese)return;if(this.__innerSelectionChange)return;const e=window.getSelection();if(e&&e.rangeCount){const t=e.getRangeAt(0);if(v(this.$el,t.startContainer)&&v(this.$el,t.endContainer)){let e=null,r=null,n=null,a=null;if(3==t.startContainer.nodeType)e=t.startContainer.parentNode,n=t.startOffset;else if(1==t.startContainer.nodeType){const r=Array.from(t.startContainer.childNodes);r.length?(e=r[t.startOffset]?r[t.startOffset]:r[t.startOffset-1],n=r[t.startOffset]?0:1,3==e.nodeType&&(n=0==n?0:e.textContent.length,e=e.parentNode)):(e=t.startContainer,n=0)}if(3==t.endContainer.nodeType)r=t.endContainer.parentNode,a=t.endOffset;else if(1==t.endContainer.nodeType){const e=Array.from(t.endContainer.childNodes);e.length?(r=e[t.endOffset]?e[t.endOffset]:e[t.endOffset-1],a=e[t.endOffset]?0:1,3==r.nodeType&&(a=0==a?0:r.textContent.length,r=r.parentNode)):(r=t.endContainer,a=1)}const o=s.get(e,"data-alex-editor-key"),i=s.get(r,"data-alex-editor-key"),l=this.getElementByKey(o),c=this.getElementByKey(i),d=new x(l,n),u=new x(c,a);this.range?(this.range.anchor=d,this.range.focus=u):this.range=new w(d,u),this.history.updateCurrentRange(this.range),this.emit("rangeUpdate",this.range)}}},V=function(e){const t=e;this.disabled||"deleteByCut"!=t.inputType&&"insertFromPaste"!=t.inputType&&"deleteByDrag"!=t.inputType&&"insertFromDrop"!=t.inputType&&(t.preventDefault(),"insertText"==t.inputType&&t.data?(this.insertText(t.data),this.formatElementStack(),this.domRender(),this.rangeRender()):"insertParagraph"==t.inputType||"insertLineBreak"==t.inputType?(this.insertParagraph(),this.formatElementStack(),this.domRender(),this.rangeRender()):"deleteContentBackward"==t.inputType&&(this.delete(),this.formatElementStack(),this.domRender(),this.rangeRender()))},U=function(e){if(this.disabled)return;const t=e;t.preventDefault(),"compositionstart"==t.type?(this.__chineseInputTimer&&(clearTimeout(this.__chineseInputTimer),this.__chineseInputTimer=null),this.__isInputChinese=!0):"compositionend"==t.type&&(t.data&&(this.insertText(t.data),this.formatElementStack(),this.domRender(),this.rangeRender()),this.__chineseInputTimer=setTimeout((()=>{this.__isInputChinese=!1}),0))},j=function(e){if(this.disabled)return;if(this.__isInputChinese)return;const t=e;if("keydown"==t.type){if(function(e){return z?"z"==e.key&&e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:"z"==e.key&&e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}(t)){t.preventDefault();const e=this.history.get(-1);e&&(this.history.current=e.current,this.stack=e.stack,this.range=e.range,this.formatElementStack(),this.domRender(!0),this.rangeRender())}else if(function(e){return z?"z"==e.key&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey:"z"==e.key&&e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey}(t)){t.preventDefault();const e=this.history.get(1);e&&(this.history.current=e.current,this.stack=e.stack,this.range=e.range,this.formatElementStack(),this.domRender(!0),this.rangeRender())}this.emit("keydown",this.value,t)}else"keyup"==t.type&&this.emit("keyup",this.value,t)},W=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCopy)return;const r=this.getElementsByRange().list;if(t.clipboardData&&r.length){const{text:e,html:n}=I.apply(this,[t.clipboardData,r]);this.emit("copy",e,n)}},K=async function(e){const t=e;if(t.preventDefault(),!this.range)return;if(!this.allowCut)return;const r=this.getElementsByRange().list;if(t.clipboardData&&r.length){const{text:e,html:n}=I.apply(this,[t.clipboardData,r]);this.disabled||(this.delete(),this.formatElementStack(),this.domRender(),this.rangeRender()),this.emit("cut",e,n)}},G=async function(e){const t=e;if(t.preventDefault(),!this.disabled&&this.range&&this.allowPaste&&t.clipboardData){const e=t.clipboardData.getData("text/html"),r=t.clipboardData.getData("text/plain"),n=t.clipboardData.files;await L.apply(this,[e,r,n]),this.formatElementStack(),this.domRender(),this.rangeRender()}},Z=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"),r=t.dataTransfer.getData("text/plain"),n=t.dataTransfer.files;await L.apply(this,[e,r,n]),this.formatElementStack(),this.domRender(),this.rangeRender()}}},X=function(e){this.disabled||this.emit("focus",this.value,e)},Y=function(e){this.disabled||this.emit("blur",this.value,e)};class Q{constructor(e,t){n(this,"$el"),n(this,"disabled"),n(this,"value"),n(this,"renderRules"),n(this,"allowCopy"),n(this,"allowPaste"),n(this,"allowCut"),n(this,"allowPasteHtml"),n(this,"customTextPaste"),n(this,"customHtmlPaste"),n(this,"customImagePaste"),n(this,"customVideoPaste"),n(this,"customFilePaste"),n(this,"customMerge"),n(this,"customParseNode"),n(this,"extraKeepTags"),n(this,"history",new k),n(this,"stack"),n(this,"range",null),n(this,"__guid",function(){let e=s.get(window,"data-alex-editor-guid")||0;return e++,s.set(window,"data-alex-editor-guid",e),e}()),n(this,"__events",{}),n(this,"__firstRender",!0),n(this,"__isInputChinese",!1),n(this,"__innerSelectionChange",!1),n(this,"__chineseInputTimer",null),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 r=function(e){let t={disabled:!1,renderRules:[],value:"",allowCopy:!0,allowPaste:!0,allowCut:!0,allowPasteHtml:!1,customTextPaste:null,customHtmlPaste:null,customImagePaste:null,customVideoPaste:null,customFilePaste:null,customMerge:null,customParseNode:null,extraKeepTags:[]};return c.isObject(e)&&("boolean"==typeof e.disabled&&(t.disabled=e.disabled),Array.isArray(e.renderRules)&&(t.renderRules=e.renderRules),"string"==typeof e.value&&e.value&&(t.value=e.value),"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),"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),Array.isArray(e.extraKeepTags)&&(t.extraKeepTags=e.extraKeepTags)),t}(t);this.disabled=r.disabled,this.value=r.value,this.renderRules=r.renderRules,this.allowCopy=r.allowCopy,this.allowPaste=r.allowPaste,this.allowCut=r.allowCut,this.allowPasteHtml=r.allowPasteHtml,this.customTextPaste=r.customTextPaste,this.customHtmlPaste=r.customHtmlPaste,this.customImagePaste=r.customImagePaste,this.customVideoPaste=r.customVideoPaste,this.customFilePaste=r.customFilePaste,this.customMerge=r.customMerge,this.customParseNode=r.customParseNode,this.extraKeepTags=r.extraKeepTags,this.stack=this.parseHtml(this.value),D.apply(this),this.disabled?this.setDisabled():this.setEnabled(),h.on(document,`selectionchange.alex_editor_${this.__guid}`,$.bind(this)),h.on(this.$el,"beforeinput.alex_editor",V.bind(this)),h.on(this.$el,"compositionstart.alex_editor compositionupdate.alex_editor compositionend.alex_editor",U.bind(this)),h.on(this.$el,"keydown.alex_editor keyup.alex_editor",j.bind(this)),h.on(this.$el,"cut.alex_editor",K.bind(this)),h.on(this.$el,"paste.alex_editor",G.bind(this)),h.on(this.$el,"copy.alex_editor",W.bind(this)),h.on(this.$el,"dragstart.alex_editor drop.alex_editor",Z.bind(this)),h.on(this.$el,"focus.alex_editor",X.bind(this)),h.on(this.$el,"blur.alex_editor",Y.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),r=new x(e,0);this.range=new w(t,r)}delete(){if(!this.disabled&&this.range){if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.range.anchor.element.getBlock(),r=this.range.anchor.element.getInblock();if(r)if(0==this.range.anchor.offset)if(e){if(r.isContains(e))return this.range.anchor.moveToEnd(e),this.range.focus.moveToEnd(e),void this.delete();if("block"==r.behavior){const t=e.getBlock(),n=e.getInblock();n?"block"==n.behavior&&this.merge(r,n):this.merge(r,t)}}else this.emit("deleteInStart",r);else if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),!r.isEmpty())return this.range.anchor.offset=0,this.range.focus.offset=0,void this.delete();{const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else 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(r.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const t=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),r.isEmpty())if(t&&"default"!=r.behavior){if(!e){const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else{const e=new y("closed","br",null,null,null);this.addElementTo(e,r),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}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 r=e.getInblock(),n=e.getBlock();r?"block"==r.behavior&&this.merge(t,r):this.merge(t,n)}}else this.emit("deleteInStart",t);else if(this.range.anchor.element.isSpaceText()){if(this.range.anchor.element.toEmpty(),!t.isEmpty())return this.range.anchor.offset=0,this.range.focus.offset=0,void this.delete();{const e=new y("closed","br",null,null,null);this.addElementTo(e,t),this.range.anchor.moveToStart(e),this.range.focus.moveToStart(e)}}else if(this.range.anchor.element.isText()){const e=this.range.anchor.element.textContent;this.range.anchor.offset-=1;const r=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,r)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 r=this.range.anchor.element.isBreak();if(this.range.anchor.element.toEmpty(),t.isEmpty()&&(!r||!e)){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 e=this.getElementsByRange().list.filter((e=>!y.VOID_NODES.includes(e.element.parsedom))),t=this.range.anchor.element.getInblock(),r=this.range.focus.element.getInblock(),n=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock();t&&r&&t.isEqual(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]):e.element.toEmpty(),t.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,t)}})):t&&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)}})),"block"==t.behavior&&"block"==r.behavior&&this.merge(r,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)}})),"block"==t.behavior&&this.merge(a,t)):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)}})),"block"==r.behavior&&this.merge(r,n)):n.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(),n.isEmpty()){const e=new y("closed","br",null,null,null);this.addElementTo(e,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)}})),this.merge(a,n))}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.disabled&&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+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.disabled&&this.range)if(this.range.anchor.isEqual(this.range.focus)){const e=this.getPreviousElementOfPoint(this.range.anchor),t=this.getNextElementOfPoint(this.range.anchor),r=this.range.anchor.element.getBlock(),n=this.range.anchor.element.getInblock(),a=this.range.anchor.element.isText()?this.range.anchor.element.textContent.length:1;if(n){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("block"==n.behavior)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)));this.range.focus.moveToEnd(n),this.delete();const r=y.flatElements(e.children);this.range.focus.element=r[t],this.range.focus.offset=this.range.anchor.offset,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 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(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))),n=this.range.anchor.offset;this.range.focus.moveToEnd(r),this.delete();const a=y.flatElements(e.children);this.range.focus.element=a[t],this.range.focus.offset=n,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 this.delete(),this.insertParagraph()}insertElement(e,t=!0){if(!this.disabled&&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 r=this.getPreviousElementOfPoint(this.range.anchor),n=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||r&&o.isContains(r))if(this.range.anchor.offset!=i||n&&o.isContains(n)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const r=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&o.isContains(r))if(this.range.anchor.offset!=i||n&&o.isContains(n)){const t=o.clone();this.addElementAfter(t,o),this.range.focus.moveToEnd(o),this.delete();const r=y.flatElements(o.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&a.isContains(r))if(this.range.anchor.offset!=i||n&&a.isContains(n)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const r=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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||r&&a.isContains(r))if(this.range.anchor.offset!=i||n&&a.isContains(n)){const t=a.clone();this.addElementAfter(t,a),this.range.focus.moveToEnd(a),this.delete();const r=y.flatElements(a.children).findIndex((e=>this.range.anchor.element.isEqual(e))),n=y.flatElements(t.children);this.range.focus.element=n[r],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,r=this.range.anchor.element.clone();this.range.anchor.element.textContent=t.substring(0,this.range.anchor.offset),r.textContent=t.substring(this.range.anchor.offset),this.addElementAfter(r,this.range.anchor.element),this.addElementBefore(e,r)}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)}}formatElementStack(){const e=(t,r,n)=>{"boolean"!=typeof n&&(n=!1);let a=0;for(;a<t.length;)t[a]?t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]),t.splice(a,1)):(r.apply(this,[t[a]]),t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]),t.splice(a,1)):(!t[a].isBlock()&&n&&t[a].convertToBlock(),t[a].hasChildren()&&e(t[a].children,r),t[a].isEmpty()?(this.range&&t[a].isContains(this.range.anchor.element)&&P.apply(this,[this.range.anchor]),this.range&&t[a].isContains(this.range.focus.element)&&P.apply(this,[this.range.focus]),t.splice(a,1)):a++)):t.splice(a,1)};let t=this.renderRules.filter((e=>"function"==typeof e));[C,_,N,M,O,A,O,R,...t].forEach((t=>{e(this.stack,t,!0)})),H.apply(this)}domRender(e=!1){this.emit("beforeRender");const t=document.createDocumentFragment();this.stack.forEach((e=>{e.__render(),t.appendChild(e.elm)})),this.$el.innerHTML="",this.$el.appendChild(t);const r=this.value;this.value=this.$el.innerHTML,(this.__firstRender||r!=this.value)&&(this.__firstRender||this.emit("change",this.value,r),e||this.history.push(this.stack,this.range)),this.__firstRender&&(this.__firstRender=!1),this.emit("afterRender")}rangeRender(){return new Promise((e=>{if(this.disabled)e();else{if(this.range){const e=e=>{let t=null,r=null;if(e.element.isText())t=e.element.elm.childNodes[0],r=e.offset;else{t=e.element.parent.elm;const n=e.element.parent.children.findIndex((t=>e.element.isEqual(t)));r=e.offset+n}return{node:t,offset:r}};this.__innerSelectionChange=!0;const t=e(this.range.anchor),r=e(this.range.focus),n=window.getSelection();if(n){n.removeAllRanges();const e=document.createRange();e.setStart(t.node,t.offset),e.setEnd(r.node,r.offset),n.addRange(e)}}else{const e=window.getSelection();e&&e.removeAllRanges()}setTimeout((()=>{q.apply(this),this.__innerSelectionChange=!1,this.history.updateCurrentRange(this.range),this.emit("rangeUpdate",this.range),e()}),0)}}))}parseHtml(e){if(!e)throw new Error("You need to give an html content to convert");const t=document.createElement("div");t.innerHTML=e;let r=[];return Array.from(t.childNodes).forEach((e=>{if(1==e.nodeType||3==e.nodeType){const t=this.parseNode(e);r.push(t)}})),r}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 r=e.attributes.length;for(let n=0;n<r;n++){const r=e.attributes[n];/(^on)|(^style$)|(^face$)/g.test(r.nodeName)||(t[r.nodeName]=r.nodeValue)}return t}(e),r=function(e){let t={};const r=e.getAttribute("style");if(r){let e=0,n=0,a=[];for(;e<r.length;)";"==r[e]&&"base64,"!=r.substring(e+1,e+8)&&(a.push(r.substring(n,e)),n=e+1),e==r.length-1&&n<e&&a.push(r.substring(n,e)),e++;a.forEach((e=>{const r=e.indexOf(":"),n=e.substring(0,r).trim(),a=e.substring(r+1).trim();t[n]=a}))}return t}(e),n=e.nodeName.toLocaleLowerCase(),a=e.namespaceURI;if(y.EMPTY_NODES.includes(n))return new y("text",null,null,null,null);if(n==y.TEXT_NODE&&e.childNodes.length&&Array.from(e.childNodes).every((e=>3==e.nodeType)))return new y("text",null,t,r,e.textContent);const o=E.find((e=>e.parsedom==n)),i=T.find((e=>e.parsedom==n)),l=B.find((e=>e.parsedom==n)),s=S.find((e=>e.parsedom==n));let d=null,u={type:"inline",parsedom:n,marks:t,styles:r,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 r in t)"function"==typeof t[r]?u.styles[r]=t[r].apply(this,[e]):u.styles[r]=t[r]}}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");const t=r=>{let n=null;const a=r.length;for(let o=0;o<a;o++){const a=r[o];if(a&&a.key===e){n=a;break}if(a&&a.hasChildren()){const e=t(a.children);if(e){n=e;break}}}return n};return t(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 r=null;for(let n=e.length-1;n>=0;n--){const a=e[n];if(!a.isEmpty()){if(a.isText()||a.isClosed()){r=a;break}if(r=t(a.children),r)break}}return r},r=e=>{const n=this.getPreviousElement(e);return n?n.isEmpty()?r(n):n.isText()||n.isClosed()?n:t(n.children):e.parent?r(e.parent):null};return r(e.element)}getNextElementOfPoint(e){if(!x.isPoint(e))throw new Error("The argument must be an AlexPoint instance");const t=e=>{let r=null;const n=e.length;for(let a=0;a<n;a++){const n=e[a];if(!n.isEmpty()&&(n.isText()||!y.VOID_NODES.includes(n.parsedom))){if(n.isText()||n.isClosed()){r=n;break}if(r=t(n.children),r)break}}return r},r=e=>{const n=this.getNextElement(e);return n?n.isEmpty()||!n.isText()&&y.VOID_NODES.includes(n.parsedom)?r(n):n.isText()||n.isClosed()?n:t(n.children):e.parent?r(e.parent):null};return r(e.element)}getElementsByRange(){if(!this.range)return{list:[],flatList:[]};if(this.range.anchor.isEqual(this.range.focus))return{list:[],flatList:[]};const e=(()=>{let e=[];const t=0==this.range.anchor.offset,r=this.range.focus.offset==(this.range.focus.element.isText()?this.range.focus.element.textContent.length:1),n=this.range.anchor.element.getBlock(),a=this.range.focus.element.getBlock(),o=this.stack.findIndex((e=>n.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)));if((c>0||d<l.length-1)&&(l=l.slice(c,d+1)),this.range.anchor.element.isEqual(this.range.focus.element))e=t&&r?l.map((e=>({element:e,offset:!1}))):[{element:this.range.anchor.element,offset:[this.range.anchor.offset,this.range.focus.offset]}];else{const n=l.length;for(let a=0;a<n;a++)if(this.range.anchor.element.isEqual(l[a]))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[a].isContains(this.range.anchor.element)){const n=this.range.anchor.element.isFirst(l[a]),o=l[a].isContains(this.range.focus.element),i=this.range.focus.element.isLast(l[a]);(t&&n&&o&&i&&r||t&&n&&!o)&&e.push({element:l[a],offset:!1})}else if(this.range.focus.element.isEqual(l[a]))r?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[a].isContains(this.range.focus.element)){this.range.focus.element.isLast(l[a])&&r&&e.push({element:l[a],offset:!1})}else e.push({element:l[a],offset:!1})}return e})();return{list:(e=>{let t=[],r=[],n=[];const a=e.length;for(let o=0;o<a;o++)if(e[o].element.isBlock())t.push(e[o]),r.push(e[o].element);else{const a=e[o].element.getBlock();let i=!1;for(let e=r.length-1;e>=0;e--)if(r[e].isEqual(a)){i=!0;break}if(!i){n.some((t=>t.isContains(e[o].element)))||(t.push(e[o]),(e[o].element.isInblock()||e[o].element.isInline())&&n.push(e[o].element))}}return t})(e),flatList:e}}addElementTo(e,t,r=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 r||isNaN(r)||r<0)throw new Error("The third argument must be an integer not less than 0");t.hasChildren()?r>=t.children.length?t.children.push(e):t.children.splice(r,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 r=this.stack.findIndex((e=>t.isEqual(e)));this.stack.splice(r,0,e),e.parent=null}else{const r=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,r)}}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 r=this.stack.findIndex((e=>t.isEqual(e)));r>=this.stack.length-1?this.stack.push(e):this.stack.splice(r+1,0,e),e.parent=null}else{const r=t.parent.children.findIndex((e=>t.isEqual(e)));this.addElementTo(e,t.parent,r+1)}}collapseToStart(e){if(this.disabled)return;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.updateCurrentRange(this.range)}collapseToEnd(e){if(this.disabled)return;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.updateCurrentRange(this.range)}setDisabled(){this.disabled=!0,this.$el.removeAttribute("contenteditable")}setEnabled(){this.disabled=!1,this.$el.setAttribute("contenteditable","true")}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)}destroy(){this.setDisabled(),h.off(document,`selectionchange.alex_editor_${this.__guid}`),h.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.11 ","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 J={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 r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a+t*a)/a})),subtract:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=0;try{r=e.toString().split(".")[1].length}catch(o){}try{n=t.toString().split(".")[1].length}catch(o){}return a=Math.pow(10,Math.max(r,n)),(e*a-t*a)/a})),mutiply:(...e)=>e.reduce(((e,t)=>{let r=0,n=e.toString(),a=t.toString();try{r+=n.split(".")[1].length}catch(o){}try{r+=a.split(".")[1].length}catch(o){}return Number(n.replace(".",""))*Number(a.replace(".",""))/Math.pow(10,r)})),divide:(...e)=>e.reduce(((e,t)=>{let r=0,n=0,a=e.toString(),o=t.toString();try{r=a.split(".")[1].length}catch(i){}try{n=o.split(".")[1].length}catch(i){}return Number(a.replace(".",""))/Number(o.replace(".",""))*Math.pow(10,n-r)}))},ee={insert(e,t,r){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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,r)+t+e.substring(r,e.length)},delete(e,t,r){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!J.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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");return e.substring(0,t)+e.substring(t+r,e.length)},replace(e,t,r,n){if(!e||"string"!=typeof e)throw new TypeError("The first argument must be a string");if(!J.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(!J.isNumber(r))throw new TypeError("The third argument must be a number");if(r<0)throw new Error("The third argument cannot be less than 0");if("string"!=typeof n)throw new TypeError("The fourth argument must be a string");return e.substring(0,t)+n+e.substring(r,e.length)},trim(e,t){if("string"!=typeof e)throw new TypeError("The first argument must be a string");let r=e.replace(/(^\s+)|(\s+$)/g,"");return t&&(r=r.replace(/\s/g,"")),r}},te={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 r=e,n=0,a=0;for(;this.isElement(e)&&this.isContains(t,e)&&t!==e;)n+=e.offsetTop,a+=e.offsetLeft,e=e.offsetParent;return{top:n,left:a,right:t.offsetWidth-a-r.offsetWidth,bottom:t.offsetHeight-n-r.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(!J.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return J.mutiply(e,parseFloat(t))},px2rem(e){if(!J.isNumber(e))throw new TypeError("The argument must be a number");let t=this.getCssStyle(document.documentElement,"font-size");return J.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,r=parseFloat(this.getCssStyle(e,"padding-left")),n=parseFloat(this.getCssStyle(e,"padding-right"));return J.subtract(t,r,n)},height(e){"string"==typeof e&&e&&(e=document.body.querySelector(e)),this.isElement(e)||(e=document.body);let t=e.clientHeight,r=parseFloat(this.getCssStyle(e,"padding-top")),n=parseFloat(this.getCssStyle(e,"padding-bottom"));return J.subtract(t,r,n)},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 r=e.classList;ee.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;ee.trim(t).split(/\s+/).forEach((e=>{r.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 r=e.classList;return ee.trim(t).split(/\s+/).every((e=>r.contains(e)))},scrollTopBottomTrigger(e,t){"string"==typeof e&&e&&(e=document.body.querySelector(e));let r=window;this.isElement(e)&&e!=document.body&&e!=document.documentElement&&(r=e),"function"==typeof e&&(t=e);let n=!0;r.addEventListener("scroll",(()=>{if(this.getScrollTop(r)<=0){if(!n)return;"function"==typeof t&&(n=!1,t({state:"top",target:r}))}else{let e={state:"bottom",target:r},a=0;if(a=r==window?window.innerHeight:r.clientHeight,J.add(this.getScrollTop(r),a)+1>=this.getScrollHeight(r)&&a!=this.getScrollHeight(r)){if(!n)return;"function"==typeof t&&(n=!1,t(e))}else n=!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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,a=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollTop=document.body.scrollTop=n:r.scrollTop=n,e();else{let o=10,i=J.divide(a,o),l=this.getScrollTop(r),s=J.divide(J.subtract(n,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollTop=document.body.scrollTop=l=J.add(l,s):r.scrollTop=l=J.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,r=e.el;"string"==typeof r&&r&&(r=document.body.querySelector(r));let n=e.number||0,a=e.time||0;return this.isElement(r)&&r!=document.body&&r!=document.documentElement&&r!=window||(t=!0),new Promise((e=>{if(a<=0)t?document.documentElement.scrollLeft=document.body.scrollLeft=n:r.scrollLeft=n,e();else{let o=10,i=J.divide(a,o),l=this.getScrollLeft(r),s=J.divide(J.subtract(n,l),i),c=setInterval((()=>{i>0?(i--,t?document.documentElement.scrollLeft=document.body.scrollLeft=l=J.add(l,s):r.scrollLeft=l=J.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 r="";return r=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(e)[t]:e.currentStyle[t],r},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",r="",n=ee.trim(e,!0).substring(1,ee.trim(e,!0).length-1).split("=");return 1==n.length&&(r=n[0]),2==n.length&&(r={attributeName:n[0],attributeValue:n[1].replace(/\'/g,"").replace(/\"/g,"")}),{type:t,value:r}}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:J.subtract(document.documentElement.clientHeight||window.innerHeight,t.bottom),left:t.left,right:J.subtract(document.documentElement.clientWidth||window.innerWidth,t.right)}},isElement:e=>e&&e instanceof Node&&1===e.nodeType,string2dom(e,t){if(!e||"string"!=typeof e)throw new TypeError("The argument must be an HTML string");let r=document.createElement(t||"div");return r.innerHTML=e,1==r.children.length?r.children[0]:Array.from(r.children)}},re="_dap-datas",ne={remove(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=e[re]||{};null==t||""===t?e[re]={}:(delete r[t],e[re]=r)},has(e,t){if(!(e instanceof Document||te.isElement(e)||te.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[re]||{}).hasOwnProperty(t)},get(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=e[re]||{};return null==t||""===t?r:r[t]},set(e,t,r){if(!(e instanceof Document||te.isElement(e)||te.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 n=e[re]||{};n[t]=r,e[re]=n}},ae={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 r=null;if("Chinese"==t&&(r=/^[\u4e00-\u9fa5]+$/),"chinese"==t&&(r=/[\u4e00-\u9fa5]/),"email"==t&&(r=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),"username"==t&&(r=/^[a-zA-Z0-9_]{4,16}$/),"int+"==t&&(r=/^\d+$/),"int-"==t&&(r=/^-\d+$/),"int"==t&&(r=/^-?\d+$/),"pos"==t&&(r=/^\d*\.?\d+$/),"neg"==t&&(r=/^-\d*\.?\d+$/),"number"==t&&(r=/^-?\d*\.?\d+$/),"phone"==t&&(r=/^1[0-9]\d{9}$/),"idCard"==t&&(r=/^[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&&(r=/^(https?|ftp):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/),"IPv4"==t&&(r=/^(?:(?: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&&(r=/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/),"rgb"==t&&(r=/^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&&(r=/^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&&(r=/^[1-9][0-9]{4,10}$/),"weixin"==t&&(r=/^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/),"plate"==t&&(r=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/),!r)throw new Error("The second parameter is out of scope");return r.test(e)},getUrlParams(e){if(!e||"string"!=typeof e)throw new TypeError("The argument must be a string");let t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),r=window.location.search.substr(1);if(!r){let e=window.location.hash.split("?");2==e.length&&(r=e[1])}let n=r.match(t);return n?decodeURIComponent(n[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 r=Object.getOwnPropertyNames(e),n=Object.getOwnPropertyNames(t);if(r.length!=n.length)return!1;let a=r.length,o=!0;for(let i=0;i<a;i++){let n=r[i],a=e[n],l=t[n];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 r in e)t[r]=this.clone(e[r]);return t}return e}},oe=e=>{let t=e.split(/[\s]+/g),r=[];return t.forEach((e=>{let t=e.split("."),n={eventName:t[0]};t.length>1&&(n.guid=t[1]),r.push(n)})),r},ie=(e,t,r)=>{let n=ne.get(e,"dap-defined-events")||{},a=Object.keys(n),o=a.length;for(let i=0;i<o;i++){let o=a[i];n[o].type==t&&(r?o==t+"."+r&&(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0):(e.removeEventListener(n[o].type,n[o].fn,n[o].options),n[o]=void 0))}n=(e=>{let t={};return Object.keys(e).forEach((r=>{e[r]&&(t[r]=e[r])})),t})(n),ne.set(e,"dap-defined-events",n)},le={on(e,t,r,n){if(!(e instanceof Document||te.isElement(e)||te.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(!r||"function"!=typeof r)throw new TypeError("The third argument must be a function");ae.isObject(n)||(n={});oe(t).forEach((t=>{((e,t,r,n,a)=>{let o=ne.get(e,"dap-defined-events")||{};r||(r=ne.get(e,"dap-event-guid")||0,ne.set(e,"dap-event-guid",r+1)),o[r=t+"."+r]&&o[r].type==t&&e.removeEventListener(t,o[r].fn,o[r].options),e.addEventListener(t,n,a),o[r]={type:t,fn:n,options:a},ne.set(e,"dap-defined-events",o)})(e,t.eventName,t.guid,r.bind(e),n)}))},off(e,t){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let r=ne.get(e,"dap-defined-events");if(!r)return;if(!t){let t=Object.keys(r),n=t.length;for(let a=0;a<n;a++){let n=t[a];e.removeEventListener(r[n].type,r[n].fn,r[n].options)}return ne.remove(e,"dap-defined-events"),void ne.remove(e,"dap-event-guid")}oe(t).forEach((t=>{ie(e,t.eventName,t.guid)}))},get(e){if(!(e instanceof Document||te.isElement(e)||te.isWindow(e)))throw new TypeError("The first argument must be an element node or window or document");let t=ne.get(e,"dap-defined-events");if(t)return t}},se={rgb2hsv(e){if(!Array.isArray(e)||3!=e.length)throw new TypeError("Invalid argument");let t=0,r=0,n=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 n=l/255,r=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*r,100*n]},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],r=e[1]>=100?100:e[1];r=r<=0?0:r;let n=e[2]>=100?100:e[2];n=n<=0?0:n,r/=100,n/=100;let a=0,o=0,i=0,l=parseInt(t/60%6+""),s=t/60-l,c=n*(1-r),d=n*(1-s*r),u=n*(1-(1-s)*r);switch(l){case 0:a=n,o=u,i=c;break;case 1:a=d,o=n,i=c;break;case 2:a=c,o=n,i=u;break;case 3:a=c,o=d,i=n;break;case 4:a=u,o=c,i=n;break;case 5:a=n,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(!ae.matchingText(t,"hex"))throw new TypeError("The argument must be a hexadecimal color value");if(4===t.length){let e="#";for(let r=1;r<4;r+=1)e+=t.slice(r,r+1).concat(t.slice(r,r+1));t=e}let r=[];for(let n=1;n<7;n+=2)r.push(parseInt("0x"+t.slice(n,n+2)));return r}},ce={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,r)=>{e&&e instanceof File||r(new TypeError("The argument must be a File object"));let n=new FileReader;n.readAsDataURL(e),n.onloadend=()=>{let e=n.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 r=e.split(","),n=r[0].match(/:(.*?);/)[1],a=atob(r[1]),o=a.length,i=new Uint8Array(o);for(;o--;)i[o]=a.charCodeAt(o);return new File([i],t,{type:n})},compressImage(e,t){const r={width:void 0,quality:.8,mimeType:"jpeg",maxSize:0,minSize:0};ae.isObject(t)&&(J.isNumber(t.width)&&(r.width=t.width),J.isNumber(t.quality)&&t.quality>=0&&t.quality<=1&&(r.quality=t.quality),"jpeg"!=t.mimeType&&"webp"!=t.mimeType||(r.mimeType=t.mimeType),J.isNumber(t.maxSize)&&(r.maxSize=t.maxSize),J.isNumber(t.minSize)&&(r.minSize=t.minSize));const n=(e,t,a)=>{let o=e.toDataURL("image/"+r.mimeType,a),i=this.dataBase64toFile(o,t);if(r.maxSize>0&&i.size>1024*r.maxSize){a=a<=0?0:Number((a-.01).toFixed(2));const r=n(e,t,a);o=r.url,i=r.file,a=r.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(r.minSize>0&&e.size<=1024*r.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=r.width||l.width,a.height=r.width?r.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)+"."+r.mimeType;let d=n(a,c,r.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"))}}))}};function de(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ue(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 r=e[t],n=typeof r;"object"!==n&&"function"!==n||Object.isFrozen(r)||ue(r)})),e}class he{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function me(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function pe(e,...t){const r=Object.create(null);for(const n in e)r[n]=e[n];return t.forEach((function(e){for(const t in e)r[t]=e[t]})),r}const fe=e=>!!e.scope;class ge{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=me(e)}openNode(e){if(!fe(e))return;const t=((e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const r=e.split(".");return[`${t}${r.shift()}`,...r.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){fe(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}const ve=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class be{constructor(){this.rootNode=ve(),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=ve({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=>{be._collapse(e)})))}}class ye extends be{constructor(e){super(),this.options=e}addText(e){""!==e&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){const r=e.root;t&&(r.scope=`language:${t}`),this.add(r)}toHTML(){return new ge(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function we(e){return e?"string"==typeof e?e:e.source:null}function xe(e){return Se("(?=",e,")")}function ke(e){return Se("(?:",e,")*")}function Ee(e){return Se("(?:",e,")?")}function Se(...e){return e.map((e=>we(e))).join("")}function Te(...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=>we(e))).join("|")+")"}function Be(e){return new RegExp(e.toString()+"|").exec("").length-1}const Ce=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _e(e,{joinWith:t}){let r=0;return e.map((e=>{r+=1;const t=r;let n=we(e),a="";for(;n.length>0;){const e=Ce.exec(n);if(!e){a+=n;break}a+=n.substring(0,e.index),n=n.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?a+="\\"+String(Number(e[1])+t):(a+=e[0],"("===e[0]&&r++)}return a})).map((e=>`(${e})`)).join(t)}const Ne="[a-zA-Z]\\w*",Me="[a-zA-Z_]\\w*",Ae="\\b\\d+(\\.\\d+)?",Oe="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Re="\\b(0b[01]+)",ze={begin:"\\\\[\\s\\S]",relevance:0},Ie={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ze]},Le={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ze]},De=function(e,t,r={}){const n=pe({scope:"comment",begin:e,end:t,contains:[]},r);n.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=Te("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 n.contains.push({begin:Se(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),n},Pe=De("//","$"),Fe=De("/\\*","\\*/"),qe=De("#","$"),He={scope:"number",begin:Ae,relevance:0},$e={scope:"number",begin:Oe,relevance:0},Ve={scope:"number",begin:Re,relevance:0},Ue={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ze,{begin:/\[/,end:/\]/,relevance:0,contains:[ze]}]},je={scope:"title",begin:Ne,relevance:0},We={scope:"title",begin:Me,relevance:0},Ke={begin:"\\.\\s*"+Me,relevance:0};var Ge=Object.freeze({__proto__:null,APOS_STRING_MODE:Ie,BACKSLASH_ESCAPE:ze,BINARY_NUMBER_MODE:Ve,BINARY_NUMBER_RE:Re,COMMENT:De,C_BLOCK_COMMENT_MODE:Fe,C_LINE_COMMENT_MODE:Pe,C_NUMBER_MODE:$e,C_NUMBER_RE:Oe,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:qe,IDENT_RE:Ne,MATCH_NOTHING_RE:/\b\B/,METHOD_GUARD:Ke,NUMBER_MODE:He,NUMBER_RE:Ae,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:Le,REGEXP_MODE:Ue,RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG:(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Se(t,/.*\b/,e.binary,/\b.*/)),pe({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{0!==e.index&&t.ignoreMatch()}},e)},TITLE_MODE:je,UNDERSCORE_IDENT_RE:Me,UNDERSCORE_TITLE_MODE:We});function Ze(e,t){"."===e.input[e.index-1]&&t.ignoreMatch()}function Xe(e,t){void 0!==e.className&&(e.scope=e.className,delete e.className)}function Ye(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Ze,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,void 0===e.relevance&&(e.relevance=0))}function Qe(e,t){Array.isArray(e.illegal)&&(e.illegal=Te(...e.illegal))}function Je(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 et(e,t){void 0===e.relevance&&(e.relevance=1)}const tt=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const r=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t]})),e.keywords=r.keywords,e.begin=Se(r.beforeMatch,xe(r.begin)),e.starts={relevance:0,contains:[Object.assign(r,{endsParent:!0})]},e.relevance=0,delete r.beforeMatch},rt=["of","and","for","in","not","or","if","then","parent","list","value"],nt="keyword";function at(e,t,r=nt){const n=Object.create(null);return"string"==typeof e?a(r,e.split(" ")):Array.isArray(e)?a(r,e):Object.keys(e).forEach((function(r){Object.assign(n,at(e[r],t,r))})),n;function a(e,r){t&&(r=r.map((e=>e.toLowerCase()))),r.forEach((function(t){const r=t.split("|");n[r[0]]=[e,ot(r[0],r[1])]}))}}function ot(e,t){return t?Number(t):function(e){return rt.includes(e.toLowerCase())}(e)?0:1}const it={},lt=e=>{console.error(e)},st=(e,...t)=>{console.log(`WARN: ${e}`,...t)},ct=(e,t)=>{it[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),it[`${e}/${t}`]=!0)},dt=new Error;function ut(e,t,{key:r}){let n=0;const a=e[r],o={},i={};for(let l=1;l<=t.length;l++)i[l+n]=a[l],o[l+n]=!0,n+=Be(t[l-1]);e[r]=i,e[r]._emit=o,e[r]._multi=!0}function ht(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 lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),dt;if("object"!=typeof e.beginScope||null===e.beginScope)throw lt("beginScope must be object"),dt;ut(e,e.begin,{key:"beginScope"}),e.begin=_e(e.begin,{joinWith:""})}}(e),function(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),dt;if("object"!=typeof e.endScope||null===e.endScope)throw lt("endScope must be object"),dt;ut(e,e.end,{key:"endScope"}),e.end=_e(e.end,{joinWith:""})}}(e)}function mt(e){function t(t,r){return new RegExp(we(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(r?"g":""))}class r{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+=Be(e)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const e=this.regexes.map((e=>e[1]));this.matcherRe=t(_e(e,{joinWith:"|"}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e);if(!t)return null;const r=t.findIndex(((e,t)=>t>0&&void 0!==e)),n=this.matchIndexes[r];return t.splice(0,r),Object.assign(t,n)}}class n{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 r;return this.rules.slice(e).forEach((([e,r])=>t.addRule(e,r))),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 r=t.exec(e);if(this.resumingScanAtSamePosition())if(r&&r.index===this.lastIndex);else{const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,r=t.exec(e)}return r&&(this.regexIndex+=r.position+1,this.regexIndex===this.count&&this.considerAll()),r}}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=pe(e.classNameAliases||{}),function r(a,o){const i=a;if(a.isCompiled)return i;[Xe,Je,ht,tt].forEach((e=>e(a,o))),e.compilerExtensions.forEach((e=>e(a,o))),a.__beforeBegin=null,[Ye,Qe,et].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=at(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=we(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 pe(e,{variants:null},t)})));if(e.cachedVariants)return e.cachedVariants;if(pt(e))return pe(e,{starts:e.starts?pe(e.starts):null});if(Object.isFrozen(e))return pe(e);return e}("self"===e?a:e)}))),a.contains.forEach((function(e){r(e,i)})),a.starts&&r(a.starts,o),i.matcher=function(e){const t=new n;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 pt(e){return!!e&&(e.endsWithParent||pt(e.starts))}class ft extends Error{constructor(e,t){super(e),this.name="HTMLInjectionError",this.html=t}}const gt=me,vt=pe,bt=Symbol("nomatch"),yt=function(e){const t=Object.create(null),r=Object.create(null),n=[];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:ye};function s(e){return l.noHighlightRe.test(e)}function c(e,t,r){let n="",a="";"object"==typeof t?(n=e,r=t.ignoreIllegals,a=t.language):(ct("10.7.0","highlight(lang, code, ...args) has been deprecated."),ct("10.7.0","Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"),a=e,n=t),void 0===r&&(r=!0);const o={code:n,language:a};b("before:highlight",o);const i=o.result?o.result:d(o.language,o.code,r);return i.code=o.code,b("after:highlight",i),i}function d(e,r,n,i){const s=Object.create(null);function c(){if(!T.keywords)return void C.addText(_);let e=0;T.keywordPatternRe.lastIndex=0;let t=T.keywordPatternRe.exec(_),r="";for(;t;){r+=_.substring(e,t.index);const a=k.case_insensitive?t[0].toLowerCase():t[0],o=(n=a,T.keywords[n]);if(o){const[e,n]=o;if(C.addText(r),r="",s[a]=(s[a]||0)+1,s[a]<=7&&(N+=n),e.startsWith("_"))r+=t[0];else{const r=k.classNameAliases[e]||e;m(t[0],r)}}else r+=t[0];e=T.keywordPatternRe.lastIndex,t=T.keywordPatternRe.exec(_)}var n;r+=_.substring(e),C.addText(r)}function h(){null!=T.subLanguage?function(){if(""===_)return;let e=null;if("string"==typeof T.subLanguage){if(!t[T.subLanguage])return void C.addText(_);e=d(T.subLanguage,_,!0,B[T.subLanguage]),B[T.subLanguage]=e._top}else e=u(_,T.subLanguage.length?T.subLanguage:null);T.relevance>0&&(N+=e.relevance),C.__addSublanguage(e._emitter,e.language)}():c(),_=""}function m(e,t){""!==e&&(C.startScope(t),C.addText(e),C.endScope())}function p(e,t){let r=1;const n=t.length-1;for(;r<=n;){if(!e._emit[r]){r++;continue}const n=k.classNameAliases[e[r]]||e[r],a=t[r];n?m(a,n):(_=a,c(),_=""),r++}}function g(e,t){return e.scope&&"string"==typeof e.scope&&C.openNode(k.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(m(_,k.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),_=""):e.beginScope._multi&&(p(e.beginScope,t),_="")),T=Object.create(e,{parent:{value:T}}),T}function v(e,t,r){let n=function(e,t){const r=e&&e.exec(t);return r&&0===r.index}(e.endRe,r);if(n){if(e["on:end"]){const r=new he(e);e["on:end"](t,r),r.isMatchIgnored&&(n=!1)}if(n){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return v(e.parent,t,r)}function b(e){return 0===T.matcher.regexIndex?(_+=e[0],1):(O=!0,0)}function y(e){const t=e[0],n=r.substring(e.index),a=v(T,e,n);if(!a)return bt;const o=T;T.endScope&&T.endScope._wrap?(h(),m(t,T.endScope._wrap)):T.endScope&&T.endScope._multi?(h(),p(T.endScope,e)):o.skip?_+=t:(o.returnEnd||o.excludeEnd||(_+=t),h(),o.excludeEnd&&(_=t));do{T.scope&&C.closeNode(),T.skip||T.subLanguage||(N+=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(_+=t,null==i)return h(),0;if("begin"===w.type&&"end"===o.type&&w.index===o.index&&""===i){if(_+=r.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],r=e.rule,n=new he(r),a=[r.__beforeBegin,r["on:begin"]];for(const o of a)if(o&&(o(e,n),n.isMatchIgnored))return b(t);return r.skip?_+=t:(r.excludeBegin&&(_+=t),h(),r.returnBegin||r.excludeBegin||(_=t)),g(r,e),r.returnBegin?0:t.length}(o);if("illegal"===o.type&&!n){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!==bt)return e}if("illegal"===o.type&&""===i)return 1;if(A>1e5&&A>3*o.index){throw new Error("potential infinite loop, way more iterations than matches")}return _+=i,i.length}const k=f(e);if(!k)throw lt(o.replace("{}",e)),new Error('Unknown language: "'+e+'"');const E=mt(k);let S="",T=i||E;const B={},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=0,M=0,A=0,O=!1;try{if(k.__emitTokens)k.__emitTokens(r,C);else{for(T.matcher.considerAll();;){A++,O?O=!1:T.matcher.considerAll(),T.matcher.lastIndex=M;const e=T.matcher.exec(r);if(!e)break;const t=x(r.substring(M,e.index),e);M=e.index+t}x(r.substring(M))}return C.finalize(),S=C.toHTML(),{language:e,value:S,relevance:N,illegal:!1,_emitter:C,_top:T}}catch(R){if(R.message&&R.message.includes("Illegal"))return{language:e,value:gt(r),illegal:!0,relevance:0,_illegalBy:{message:R.message,index:M,context:r.slice(M-100,M+100),mode:R.mode,resultSoFar:S},_emitter:C};if(a)return{language:e,value:gt(r),illegal:!1,relevance:0,errorRaised:R,_emitter:C,_top:T};throw R}}function u(e,r){r=r||l.languages||Object.keys(t);const n=function(e){const t={value:gt(e),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}(e),a=r.filter(f).filter(v).map((t=>d(t,e,!1)));a.unshift(n);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 h(e){let t=null;const n=function(e){let t=e.className+" ";t+=e.parentNode?e.parentNode.className:"";const r=l.languageDetectRe.exec(t);if(r){const t=f(r[1]);return t||(st(o.replace("{}",r[1])),st("Falling back to no-highlight mode for this block.",e)),t?r[1]:"no-highlight"}return t.split(/\s+/).find((e=>s(e)||f(e)))}(e);if(s(n))return;if(b("before:highlightElement",{el:e,language:n}),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 ft("One of your code blocks includes unescaped HTML.",e.innerHTML)}t=e;const a=t.textContent,i=n?c(a,{language:n,ignoreIllegals:!0}):u(a);e.innerHTML=i.value,e.dataset.highlighted="yes",function(e,t,n){const a=t&&r[t]||n;e.classList.add("hljs"),e.classList.add(`language-${a}`)}(e,n,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}),b("after:highlightElement",{el:e,result:i,text:a})}let m=!1;function p(){if("loading"===document.readyState)return void(m=!0);document.querySelectorAll(l.cssSelector).forEach(h)}function f(e){return e=(e||"").toLowerCase(),t[e]||t[r[e]]}function g(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{r[e.toLowerCase()]=t}))}function v(e){const t=f(e);return t&&!t.disableAutodetect}function b(e,t){const r=e;n.forEach((function(e){e[r]&&e[r](t)}))}"undefined"!=typeof window&&window.addEventListener&&window.addEventListener("DOMContentLoaded",(function(){m&&p()}),!1),Object.assign(e,{highlight:c,highlightAuto:u,highlightAll:p,highlightElement:h,highlightBlock:function(e){return ct("10.7.0","highlightBlock will be removed entirely in v12.0"),ct("10.7.0","Please use highlightElement now."),h(e)},configure:function(e){l=vt(l,e)},initHighlighting:()=>{p(),ct("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")},initHighlightingOnLoad:function(){p(),ct("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")},registerLanguage:function(r,n){let o=null;try{o=n(e)}catch(l){if(lt("Language definition for '{}' could not be registered.".replace("{}",r)),!a)throw l;lt(l),o=i}o.name||(o.name=r),t[r]=o,o.rawDefinition=n.bind(null,e),o.aliases&&g(o.aliases,{languageName:r})},unregisterLanguage:function(e){delete t[e];for(const t of Object.keys(r))r[t]===e&&delete r[t]},listLanguages:function(){return Object.keys(t)},getLanguage:f,registerAliases:g,autoDetection:v,inherit:vt,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),n.push(e)},removePlugin:function(e){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString="11.9.0",e.regex={concat:Se,lookahead:xe,either:Te,optional:Ee,anyNumberOfTimes:ke};for(const y in Ge)"object"==typeof Ge[y]&&ue(Ge[y]);return Object.assign(e,Ge),e},wt=yt({});wt.newInstance=()=>yt({});var xt=wt;wt.HighlightJS=wt,wt.default=wt;const kt=de(xt);const Et="[A-Za-z$_][0-9A-Za-z$_]*",St=["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"],Tt=["true","false","null","undefined","NaN","Infinity"],Bt=["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"],Ct=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],_t=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Nt=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Mt=[].concat(_t,Bt,Ct);var At="[0-9](_*[0-9])*",Ot=`\\.(${At})`,Rt="[0-9a-fA-F](_*[0-9a-fA-F])*",zt={className:"number",variants:[{begin:`(\\b(${At})((${Ot})|\\.)?|(${Ot}))[eE][+-]?(${At})[fFdD]?\\b`},{begin:`\\b(${At})((${Ot})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Ot})[fFdD]?\\b`},{begin:`\\b(${At})[fFdD]\\b`},{begin:`\\b0[xX]((${Rt})\\.?|(${Rt})?\\.(${Rt}))[pP][+-]?(${At})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Rt})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function It(e,t,r){return-1===r?"":e.replace(t,(n=>It(e,t,r-1)))}const Lt="[A-Za-z$_][0-9A-Za-z$_]*",Dt=["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"],Pt=["true","false","null","undefined","NaN","Infinity"],Ft=["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"],qt=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ht=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$t=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Vt=[].concat(Ht,Ft,qt);const Ut=["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"],jt=["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"],Wt=["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"],Kt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Gt=["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 Zt=["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"],Xt=["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"],Yt=["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"],Qt=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],Jt=["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(),er=Yt.concat(Qt);const tr=["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"],rr=["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"],nr=["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"],ar=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"],or=["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 ir(e){return e?"string"==typeof e?e:e.source:null}function lr(e){return sr("(?=",e,")")}function sr(...e){return e.map((e=>ir(e))).join("")}function cr(...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=>ir(e))).join("|")+")"}const dr=e=>sr(/\b/,e,/\w$/.test(e)?/\b/:/\B/),ur=["Protocol","Type"].map(dr),hr=["init","self"].map(dr),mr=["Any","Self"],pr=["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"],fr=["false","nil","true"],gr=["assignment","associativity","higherThan","left","lowerThan","none","right"],vr=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],br=["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"],yr=cr(/[/=\-+!*%<>&|^~?]/,/[\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]/),wr=cr(yr,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),xr=sr(yr,wr,"*"),kr=cr(/[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]/),Er=cr(kr,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Sr=sr(kr,Er,"*"),Tr=sr(/[A-Z]/,Er,"*"),Br=["attached","autoclosure",sr(/convention\(/,cr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",sr(/objc\(/,Sr,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Cr=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];var _r="[0-9](_*[0-9])*",Nr=`\\.(${_r})`,Mr="[0-9a-fA-F](_*[0-9a-fA-F])*",Ar={className:"number",variants:[{begin:`(\\b(${_r})((${Nr})|\\.)?|(${Nr}))[eE][+-]?(${_r})[fFdD]?\\b`},{begin:`\\b(${_r})((${Nr})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Nr})[fFdD]?\\b`},{begin:`\\b(${_r})[fFdD]\\b`},{begin:`\\b0[xX]((${Mr})\\.?|(${Mr})?\\.(${Mr}))[pP][+-]?(${_r})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Mr})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};kt.registerLanguage("plaintext",(function(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}})),kt.registerLanguage("json",(function(e){const t=["true","false","null"],r={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,r,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}})),kt.registerLanguage("javascript",(function(e){const t=e.regex,r=Et,n="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const r=e[0].length+e.index,n=e.input[r];if("<"===n||","===n)return void t.ignoreMatch();let a;">"===n&&(((e,{after:t})=>{const r="</"+e[0].slice(1);return-1!==e.input.indexOf(r,t)})(e,{after:r})||t.ignoreMatch());const o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Et,keyword:St,literal:Tt,built_in:Mt,"variable.language":Nt},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:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},m={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,m,p,f,{match:/\$\d+/},d];u.contains=v.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(v)});const b=[].concat(g,u.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],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:{_:[...Bt,...Ct]}},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[..._t,"super","import"],t.concat("(?!",T.join("|"),")")),r,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],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,h,m,p,f,g,{match:/\$\d+/},d,k,{className:"attr",begin:r+t.lookahead(":"),relevance:0},N,{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:_,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:n,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:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,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:/\$[(.]/}]}})),kt.registerLanguage("java",(function(e){const t=e.regex,r="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=r+It("(?:<"+r+"~~~(?:\\s*,\\s*"+r+"~~~)*>)?",/~~~/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:"@"+r,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+/,r],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,r),/\s+/,r,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,r],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:["(?:"+n+"\\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,zt,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},zt,o]}})),kt.registerLanguage("typescript",(function(e){const t=function(e){const t=e.regex,r=Lt,n="<>",a="</>",o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,t)=>{const r=e[0].length+e.index,n=e.input[r];if("<"===n||","===n)return void t.ignoreMatch();let a;">"===n&&(((e,{after:t})=>{const r="</"+e[0].slice(1);return-1!==e.input.indexOf(r,t)})(e,{after:r})||t.ignoreMatch());const o=e.input.substring(r);((a=o.match(/^\s*=/))||(a=o.match(/^\s+extends\s+/))&&0===a.index)&&t.ignoreMatch()}},i={$pattern:Lt,keyword:Dt,literal:Pt,built_in:Vt,"variable.language":$t},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:[]},h={begin:"html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},m={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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},v=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,m,p,f,{match:/\$\d+/},d];u.contains=v.concat({begin:/\{/,end:/\}/,keywords:i,contains:["self"].concat(v)});const b=[].concat(g,u.contains),y=b.concat([{begin:/\(/,end:/\)/,keywords:i,contains:["self"].concat(b)}]),w={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:y},x={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],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:{_:[...Ft,...qt]}},E={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},S={match:t.concat(/\b/,(T=[...Ht,"super","import"],t.concat("(?!",T.join("|"),")")),r,t.lookahead(/\(/)),className:"title.function",relevance:0};var T;const B={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},C={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},_="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",N={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(_)],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,h,m,p,f,g,{match:/\$\d+/},d,k,{className:"attr",begin:r+t.lookahead(":"),relevance:0},N,{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:_,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:n,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:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},B,{match:"\\$"+r,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),r=Lt,n=["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:n},contains:[t.exports.CLASS_REFERENCE]},i={$pattern:Lt,keyword:Dt.concat(["type","namespace","interface","public","private","protected","implements","declare","abstract","readonly","enum","override"]),literal:Pt,built_in:Vt.concat(n),"variable.language":$t},l={className:"meta",begin:"@"+r},s=(e,t,r)=>{const n=e.contains.findIndex((e=>e.label===t));if(-1===n)throw new Error("can not find mode to replace");e.contains.splice(n,1,r)};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})),kt.registerLanguage("python",(function(e){const t=e.regex,r=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),n=["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:n,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|${n.join("|")}`,h={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})`}]},m={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,h,s,e.HASH_COMMENT_MODE]}]};return i.contains=[s,h,o],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[o,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},s,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,r,/\s*/,/\(\s*/,r,/\s*\)/]},{match:[/\bclass/,/\s+/,r]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,s]}]}})),kt.registerLanguage("php",(function(e){const t=e.regex,r=/(?![A-Za-z0-9])(?![$])/,n=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,r),a=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,r),o={scope:"variable",match:"\\$+"+n},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"],h=["__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"],m=["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:h,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:m},f=e=>e.map((e=>e.replace(/\|\d+$/,""))),g={variants:[{match:[/new/,t.concat(s,"+"),t.concat("(?!",f(m).join("\\b|"),"\\b)"),a],scope:{1:"keyword",4:"title.class"}}]},v=t.concat(n,"\\b(?!\\()"),b={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),v],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[a,t.concat(/::/,t.lookahead(/(?!class\b)/)),v],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(n,t.lookahead(":"),t.lookahead(/(?!::)/))},w={relevance:0,begin:/\(/,end:/\)/,keywords:p,contains:[y,o,b,e.C_BLOCK_COMMENT_MODE,c,d,g]},x={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",f(h).join("\\b|"),"|",f(m).join("\\b|"),"\\b)"),n,t.concat(s,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(x);const k=[y,b,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,b,{match:[/const/,/\s/,n],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,b,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]}})),kt.registerLanguage("css",(function(e){const t=e.regex,r=(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=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[r.BLOCK_COMMENT,{begin:/-(webkit|moz|ms|o)-(?=[a-z])/},r.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},r.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Wt.join("|")+")"},{begin:":(:)?("+Kt.join("|")+")"}]},r.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Gt.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[r.BLOCK_COMMENT,r.HEXCOLOR,r.IMPORTANT,r.CSS_NUMBER_MODE,...n,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...n,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},r.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:jt.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...n,r.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Ut.join("|")+")\\b"}]}})),kt.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),r=er,n="[\\w-]+",a="("+n+"|@\\{"+n+"\\})",o=[],i=[],l=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},s=function(e,t,r){return{className:e,begin:t,relevance:r}},c={$pattern:/[a-z-]+/,keyword:"and or not only",attribute:Xt.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","@@?"+n,10),s("variable","@\\{"+n+"\\}"),s("built_in","~?`[^`]*?`"),{className:"attribute",begin:n+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const u=i.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},m={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Jt.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:"@"+n+"\\s*:",relevance:15},{begin:"@"+n}],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,h,s("keyword","all\\b"),s("variable","@\\{"+n+"\\}"),{begin:"\\b("+Zt.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:":("+Yt.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Qt.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:u},{begin:"!important"},t.FUNCTION_DISPATCH]},v={begin:n+`:(:)?(${r.join("|")})`,returnBegin:!0,contains:[g]};return o.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,p,f,v,m,g,h,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:o}})),kt.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),r=ar,n=nr,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("+tr.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+n.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+r.join("|")+")"},o,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+or.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:rr.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]}})),kt.registerLanguage("html",(function(e){const t=e.regex,r=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),n={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:[n]},{begin:/'/,end:/'/,contains:[n]},{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},n,{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(r,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:r,relevance:0,starts:s}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(r,/>/))),contains:[{className:"name",begin:r,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}})),kt.registerLanguage("markdown",(function(e){const t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={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}]},n={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(n,{contains:[]}),i=e.inherit(a,{contains:[]});n.contains.push(i),a.contains.push(o);let l=[t,r];return[n,a,o,i].forEach((e=>{e.contains=e.contains.concat(l)})),l=l.concat(n,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},n,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:"$"},r,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}})),kt.registerLanguage("objectivec",(function(e){const t=/[a-zA-Z@][a-zA-Z0-9_]*/,r={$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:"("+r.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:r,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}})),kt.registerLanguage("swift",(function(e){const t={match:/\s+/,relevance:0},r=e.COMMENT("/\\*","\\*/",{contains:["self"]}),n=[e.C_LINE_COMMENT_MODE,r],a={match:[/\./,cr(...ur,...hr)],className:{2:"keyword"}},o={match:sr(/\./,cr(...pr)),relevance:0},i=pr.filter((e=>"string"==typeof e)).concat(["_|0"]),l={variants:[{className:"keyword",match:cr(...pr.filter((e=>"string"!=typeof e)).concat(mr).map(dr),...hr)}]},s={$pattern:cr(/\b\w+/,/#\w+/),keyword:i.concat(vr),literal:fr},c=[a,o,l],d=[{match:sr(/\./,cr(...br)),relevance:0},{className:"built_in",match:sr(/\b/,cr(...br),/(?=\()/)}],u={match:/->/,relevance:0},h=[u,{className:"operator",relevance:0,variants:[{match:xr},{match:`\\.(\\.|${wr})+`}]}],m="([0-9]_*)+",p="([0-9a-fA-F]_*)+",f={className:"number",relevance:0,variants:[{match:`\\b(${m})(\\.(${m}))?([eE][+-]?(${m}))?\\b`},{match:`\\b0x(${p})(\\.(${p}))?([pP][+-]?(${m}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},g=(e="")=>({className:"subst",variants:[{match:sr(/\\/,e,/[0\\tnr"']/)},{match:sr(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),v=(e="")=>({className:"subst",match:sr(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),b=(e="")=>({className:"subst",label:"interpol",begin:sr(/\\/,e,/\(/),end:/\)/}),y=(e="")=>({begin:sr(e,/"""/),end:sr(/"""/,e),contains:[g(e),v(e),b(e)]}),w=(e="")=>({begin:sr(e,/"/),end:sr(/"/,e),contains:[g(e),b(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=sr(e,/\//),r=sr(/\//,e);return{begin:t,end:r,contains:[...k,{scope:"comment",begin:`#(?!.*${r})`,end:/$/}]}},T={scope:"regexp",variants:[S("###"),S("##"),S("#"),E]},B={match:sr(/`/,Sr,/`/)},C=[B,{className:"variable",match:/\$\d+/},{className:"variable",match:`\\$${Er}+`}],_=[{match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Cr,contains:[...h,f,x]}]}},{scope:"keyword",match:sr(/@/,cr(...Br))},{scope:"meta",match:sr(/@/,Sr)}],N={match:lr(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:sr(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Er,"+")},{className:"type",match:Tr,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:sr(/\s+&\s+/,lr(Tr)),relevance:0}]},M={begin:/</,end:/>/,keywords:s,contains:[...n,...c,..._,u,N]};N.contains.push(M);const A={begin:/\(/,end:/\)/,relevance:0,keywords:s,contains:["self",{match:sr(Sr,/\s*:/),keywords:"_|0",relevance:0},...n,T,...c,...d,...h,f,x,...C,..._,N]},O={begin:/</,end:/>/,keywords:"repeat each",contains:[...n,N]},R={begin:/\(/,end:/\)/,keywords:s,contains:[{begin:cr(lr(sr(Sr,/\s*:/)),lr(sr(Sr,/\s+/,Sr,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Sr}]},...n,...c,...h,f,x,..._,N,A],endsParent:!0,illegal:/["']/},z={match:[/(func|macro)/,/\s+/,cr(B.match,Sr,xr)],className:{1:"keyword",3:"title.function"},contains:[O,R,t],illegal:[/\[/,/%/]},I={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[O,R,t],illegal:/\[|%/},L={match:[/operator/,/\s+/,xr],className:{1:"keyword",3:"title"}},D={begin:[/precedencegroup/,/\s+/,Tr],className:{1:"keyword",3:"title"},contains:[N],keywords:[...gr,...fr],end:/}/};for(const P of x.variants){const e=P.contains.find((e=>"interpol"===e.label));e.keywords=s;const t=[...c,...d,...h,f,x,...C];e.contains=[...t,{begin:/\(/,end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:s,contains:[...n,z,I,{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:[...n],relevance:0},T,...c,...d,...h,f,x,...C,..._,N,A]}})),kt.registerLanguage("dart",(function(e){const t={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},r={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},n={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,r]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t,r]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,r]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t,r]}]};r.contains=[e.C_NUMBER_MODE,n];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:[n,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:"=>"}]}})),kt.registerLanguage("nginx",(function(e){const t=e.regex,r={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:t.concat(/[$@]/,e.UNDERSCORE_IDENT_RE)}]},n={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,r],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[r]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,r],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},r]};return{name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:n.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:n}],relevance:0}],illegal:"[^\\s\\}\\{]"}})),kt.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:/["']/}]}]}})),kt.registerLanguage("http",(function(e){const t="HTTP/([32]|1\\.[01])",r={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}}]}},n=[r,{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:n}},{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:n}},e.inherit(r,{relevance:0})]}})),kt.registerLanguage("ruby",(function(e){const t=e.regex,r="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",n=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),a=t.concat(n,/(::\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])*",h={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"}]},m={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:n,scope:"title.class"},{match:[/def/,/\s+/,r],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:r}],relevance:0},h,{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,m.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)}})),kt.registerLanguage("c",(function(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="("+n+"|"+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:/<.*?>/},r,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*\\(",h={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"},m=[c,i,r,e.C_BLOCK_COMMENT_MODE,s,l],p={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:m.concat([{begin:/\(/,end:/\)/,keywords:h,contains:m.concat(["self"]),relevance:0}]),relevance:0},f={begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:h,relevance:0},{begin:u,returnBegin:!0,contains:[e.inherit(d,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,r,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:h,disableAutodetect:!0,illegal:"</",contains:[].concat(p,f,m,[c,{begin:e.IDENT_RE+"::",keywords:h},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:c,strings:l,keywords:h}}})),kt.registerLanguage("cpp",(function(e){const t=e.regex,r=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),n="decltype\\(auto\\)",a="[a-zA-Z_]\\w*::",o="(?!struct)("+n+"|"+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:/<.*?>/},r,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*\\(",h={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"]},m={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=[m,c,i,r,e.C_BLOCK_COMMENT_MODE,s,l],f={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:h,contains:p.concat([{begin:/\(/,end:/\)/,keywords:h,contains:p.concat(["self"]),relevance:0}]),relevance:0},g={className:"function",begin:"("+o+"[\\*&\\s]+)+"+u,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:h,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:n,keywords:h,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:h,relevance:0,contains:[r,e.C_BLOCK_COMMENT_MODE,l,s,i,{begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,s,i]}]},i,r,e.C_BLOCK_COMMENT_MODE,c]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:h,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(f,g,m,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:h,contains:["self",i]},{begin:e.IDENT_RE+"::",keywords:h},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}})),kt.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"]},r=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),n={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,n,e.C_BLOCK_COMMENT_MODE],l.contains=[d,s,o,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,n,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const u={variants:[c,s,a,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},h={begin:"<",end:">",contains:[{beginKeywords:"in out"},r]},m=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,n,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},r,h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[r,h,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:"("+m+"\\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,h],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[u,n,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},p]}})),kt.registerLanguage("sql",(function(e){const t=e.regex,r=e.COMMENT("--","$"),n=["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:r}={}){const n=r;return t=t||[],e.map((e=>e.match(/\|\d+$/)||t.includes(e)?e:n(e)?`${e}|0`:e))}(s,{when:e=>e.length<3}),literal:n,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:n,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,r,{className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}})),kt.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"}}]}})),kt.registerLanguage("r",(function(e){const t=e.regex,r=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,n=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:r,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:r},{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,n]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,n]},{scope:{1:"punctuation",2:"number"},match:[o,n]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,n]}]},{scope:{3:"operator"},match:[r,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:a},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}})),kt.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"},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},n={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,n]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,n]}]};n.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=Ar,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+/}]}},r,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]}})),kt.registerLanguage("rust",(function(e){const t=e.regex,r={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,e.IDENT_RE,t.lookahead(/\s*\(/))},n="([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_]+)"+n},{begin:"\\b0o([0-7_]+)"+n},{begin:"\\b0x([A-Fa-f0-9_]+)"+n},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+n}],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:"->"},r]}})),kt.configure({cssSelector:"pre",classPrefix:"editify-hljs-",ignoreUnescapedHTML:!0});const Or=[{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"}],Rr=(e,t)=>{if(!ae.isObject(e)&&ae.isObject(t))return null;for(let r in t)ae.isObject(t[r])&&!Array.isArray(t[r])&&ae.isObject(e[r])&&!Array.isArray(e[r])?e[r]=Rr(e[r],t[r]):e[r]=t[r];return e},zr=(e,t,r)=>{if(null==r||null==r)return e.hasOwnProperty(t);let n=e[t];if(null==n||null==n)return!1;if("string"==typeof r&&(r=r.toLocaleLowerCase()),"string"==typeof n&&(n=n.toLocaleLowerCase()),"string"==typeof r&&r&&(ae.matchingText(r,"rgb")||ae.matchingText(r,"rgba"))&&(r=ee.trim(r,!0)),"string"==typeof n&&n&&(ae.matchingText(n,"rgb")||ae.matchingText(n,"rgba"))&&(n=ee.trim(n,!0)),"string"==typeof r&&r&&ae.matchingText(r,"hex")){const e=se.hex2rgb(r);r=`rgb(${e[0]},${e[1]},${e[2]})`}if("string"==typeof n&&n&&ae.matchingText(n,"hex")){const e=se.hex2rgb(n);n=`rgb(${e[0]},${e[1]},${e[2]})`}return n==r},Ir=e=>ae.isObject(e)||Array.isArray(e)?JSON.parse(JSON.stringify(e)):e,Lr=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"]}),Dr=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"}},Pr=(e,t)=>({crossRowElement:(()=>{let r=null;const n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=e.getPreviousElement(t.parent),o=1;for(;a;){const t=a.children[n],{rowspan:i}=Fr(t);if(!(t.hasMarks()&&t.marks["data-editify-merged"])&&i>o){r=t;break}a=e.getPreviousElement(a),o++}return r})(),crossColumnElement:(()=>{let r=null,n=e.getPreviousElement(t),a=1;for(;n;){const{colspan:t}=Fr(n);if(!(n.hasMarks()&&n.marks["data-editify-merged"])&&t>a){r=n;break}n=e.getPreviousElement(n),a++}return r})()}),Fr=e=>{let t=1,r=1;if(e.hasMarks()){if(e.marks.rowspan){const r=Number(e.marks.rowspan);t=isNaN(r)?1:r}if(e.marks.colspan){const t=Number(e.marks.colspan);r=isNaN(t)?1:t}}return{rowspan:t,colspan:r}},qr=e=>{const t=[],r=[];e.forEach(((e,n)=>{e.children.forEach(((e,a)=>{Array.isArray(r[n])?r[n].push(e):r[n]=[e],Array.isArray(t[a])?t[a].push(e):t[a]=[e]}))}));const n=t.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.rowspan){const r=Number(t.marks.rowspan);return e+(isNaN(r)?1:r)}}return e+1}),0))),a=r.map((e=>e.reduce(((e,t)=>{if(t.hasMarks()){if(t.marks["data-editify-merged"])return e+0;if(t.marks.colspan){const r=Number(t.marks.colspan);return e+(isNaN(r)?1:r)}}return e+1}),0)));return{rowNumber:Math.max(...n),columnNumber:Math.max(...a)}},Hr=(e,t)=>{let r=!0;if(t.parsedom&&(e.isText()||t.parsedom!=e.parsedom)&&(r=!1),t.marks){Object.keys(t.marks).every((r=>!!e.hasMarks()&&(!0===t.marks[r]?e.marks.hasOwnProperty(r):e.marks[r]==t.marks[r])))||(r=!1)}if(t.styles){Object.keys(t.styles).every((r=>!!e.hasStyles()&&(!0===t.styles[r]?e.styles.hasOwnProperty(r):e.styles[r]==t.styles[r])))||(r=!1)}return r},$r=(e,t)=>e.isBlock()?Hr(e,t)?e:null:Hr(e,t)?e:$r(e.parent,t),Vr=(e,t,r)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return $r(e.range.anchor.element,r);const n=t.list.map((e=>$r(e.element,r)));if(n.some((e=>null==e)))return null;if(1==n.length)return n[0];let a=!0;for(let o=1;o<n.length;o++)if(!n[o].isEqual(n[0])){a=!1;break}return a?n[0]:null},Ur=(e,t=!1)=>!e.isEmpty()&&("div"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-list"]==(t?"ol":"ul")),jr=e=>!e.isEmpty()&&("div"==e.parsedom&&e.hasMarks()&&e.marks.hasOwnProperty("data-editify-task")),Wr=(e,t)=>!!Ur(e,t)||!!e.parent&&Wr(e.parent,t),Kr=e=>!!jr(e)||!!e.parent&&Kr(e.parent),Gr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"pre"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"pre"})))),Zr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"a"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"a"})))),Xr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"table"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"table"})))),Yr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"img"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"img"})))),Qr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"video"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"video"})))),Jr=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"blockquote"}):t.list.every((e=>!!$r(e.element,{parsedom:"blockquote"})))),en=(e,t,r=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Wr(e.range.anchor.element,r):t.list.every((e=>Wr(e.element,r)))),tn=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Kr(e.range.anchor.element):t.list.every((e=>Kr(e.element)))),rn=(e,t,r,n)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasStyles())&&zr(e.range.anchor.element.styles,r,n);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasStyles()&&zr(e.element.styles,r,n)))},nn=(e,t,r,n)=>{if(!e.range)return!1;if(e.range.anchor.isEqual(e.range.focus))return!(!e.range.anchor.element.isText()||!e.range.anchor.element.hasMarks())&&zr(e.range.anchor.element.marks,r,n);let a=t.flatList.filter((e=>e.element.isText()));return 0!=a.length&&a.every((e=>!!e.element.hasMarks()&&zr(e.element.marks,r,n)))},an=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},on=(e,t)=>{if(!e.range)return[];let r=t.flatList.length,n=[];for(let a=0;a<r;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 r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[1]),r.textContent=r.textContent.substring(o.offset[1]),e.addElementAfter(r,o.element),t=o.element}else if(o.offset[1]==o.element.textContent.length&&o.offset[0]>0){const r=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),r.textContent=r.textContent.substring(o.offset[0]),e.addElementAfter(r,o.element),t=r}else if(o.offset[0]>0&&o.offset[1]<o.element.textContent.length){const r=o.element.clone(),n=o.element.clone();o.element.textContent=o.element.textContent.substring(0,o.offset[0]),r.textContent=r.textContent.substring(o.offset[0],o.offset[1]),n.textContent=n.textContent.substring(o.offset[1]),e.addElementAfter(r,o.element),e.addElementAfter(n,r),t=r}t&&(0==a&&e.range.anchor.moveToStart(t),a==r-1&&e.range.focus.moveToEnd(t),n.push(t))}else n.push(o.element)}return n},ln=e=>{e.marks=null,e.styles=null,e.parsedom=y.BLOCK_NODE},sn=(e,t=!1)=>{Ur(e,t)||(ln(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-list"]=t?"ol":"ul")},cn=e=>{jr(e)||(ln(e),e.parsedom="div",e.hasMarks()||(e.marks={}),e.marks["data-editify-task"]="uncheck")},dn=(e,t,r,n)=>{if(!e.range)return;if(!Lr(r).heading.map((e=>e.value)).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();ln(t),t.parsedom=n}else t.list.forEach((e=>{if(e.element.isBlock())ln(e.element),e.element.parsedom=n;else{const t=e.element.getBlock();ln(t),t.parsedom=n}}))},un=(e,t)=>{if(!e.range)return;const r=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(),n=e.range.anchor.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),n=e.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}))},hn=(e,t)=>{if(!e.range)return;const r=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(),n=e.range.anchor.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}else t.list.forEach((e=>{const t=e.element.getBlock(),n=e.element.getInblock();n&&"block"==n.behavior&&!n.isPreStyle()?r(n):t.isPreStyle()||r(t)}))},mn=(e,t)=>{if(!e.range)return;const r=Jr(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();ln(t),r||(t.parsedom="blockquote")}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{ln(e),r||(e.parsedom="blockquote")}))}},pn=(e,t,r)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),n=e.range.anchor.element.getInblock();n?n.hasStyles()?n.styles["text-align"]=r:n.styles={"text-align":r}:t.hasStyles()?t.styles["text-align"]=r:t.styles={"text-align":r}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["text-align"]=r:e.element.styles={"text-align":r};else{const t=e.element.getBlock(),n=e.element.getInblock();n?n.hasStyles()?n.styles["text-align"]=r:n.styles={"text-align":r}:t.hasStyles()?t.styles["text-align"]=r:t.styles={"text-align":r}}}))},fn=(e,t,r)=>{if(!e.range)return;const n=en(e,t,r);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();n?ln(t):sn(t,r)}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{n?ln(e):sn(e,r)}))}},gn=(e,t)=>{if(!e.range)return;const r=tn(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();r?ln(t):cn(t)}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{r?ln(e):cn(e)}))}},vn=(e,t,r)=>{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,Ir(r)):e.range.anchor.element.styles=Ir(r);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),t.hasStyles()?Object.assign(t.styles,Ir(r)):t.styles=Ir(r),e.insertElement(t)}else{const t=y.getSpaceElement();t.styles=Ir(r),e.insertElement(t)}else{on(e,t).forEach((e=>{e.isText()&&(e.hasStyles()?Object.assign(e.styles,Ir(r)):e.styles=Ir(r))}))}},bn=(e,t,r)=>{if(e.range){if(!ae.isObject(r))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,Ir(r)):e.range.anchor.element.marks=Ir(r);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),t.hasMarks()?Object.assign(t.marks,Ir(r)):t.marks=Ir(r),e.insertElement(t)}else{const t=y.getSpaceElement();t.marks=Ir(r),e.insertElement(t)}else{on(e,t).forEach((e=>{e.isText()&&(e.hasMarks()?Object.assign(e.marks,Ir(r)):e.marks=Ir(r))}))}}},yn=(e,t,r)=>{if(!e.range)return;const n=e=>{if(Array.isArray(r)){if(e.hasStyles()){let t={};Object.keys(e.styles).forEach((n=>{r.includes(n)||(t[n]=e.styles[n])})),e.styles=t}}else e.styles=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())n(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),n(t),e.insertElement(t)}}else{on(e,t).forEach((e=>{e.isText()&&n(e)}))}},wn=(e,t,r)=>{if(!e.range)return;const n=e=>{if(Array.isArray(r)){if(e.hasMarks()){let t={};Object.keys(e.marks).forEach((n=>{r.includes(n)||(t[n]=e.marks[n])})),e.marks=t}}else e.marks=null};if(e.range.anchor.isEqual(e.range.focus)){if(e.range.anchor.element.isSpaceText())n(e.range.anchor.element);else if(e.range.anchor.element.isText()){const t=y.getSpaceElement();t.styles=Ir(e.range.anchor.element.styles),t.marks=Ir(e.range.anchor.element.marks),n(t),e.insertElement(t)}}else{on(e,t).forEach((e=>{e.isText()&&n(e)}))}},xn=(e,t,r)=>{if(e.range)if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock(),n=e.range.anchor.element.getInblock();n?n.hasStyles()?n.styles["line-height"]=r:n.styles={"line-height":r}:t.hasStyles()?t.styles["line-height"]=r:t.styles={"line-height":r}}else t.list.forEach((e=>{if(e.element.isBlock()||e.element.isInblock())e.element.hasStyles()?e.element.styles["line-height"]=r:e.element.styles={"line-height":r};else{const t=e.element.getBlock(),n=e.element.getInblock();n?n.hasStyles()?n.styles["line-height"]=r:n.styles={"line-height":r}:t.hasStyles()?t.styles["line-height"]=r:t.styles={"line-height":r}}}))},kn=(e,t,r,n)=>{if(!e.range)return;t||(t=r);const a={href:r};n&&(a.target="_blank");const o=y.create({type:"inline",parsedom:"a",marks:a,children:[{type:"text",textcontent:t}]});e.insertElement(o)},En=(e,t)=>{if(!e.range)return;const r=y.create({type:"closed",parsedom:"img",marks:{src:t}});e.insertElement(r)},Sn=(e,t)=>{if(!e.range)return;const r=y.create({type:"closed",parsedom:"video",marks:{src:t}});e.insertElement(r),e.range.anchor.moveToEnd(r),e.range.focus.moveToEnd(r)},Tn=(e,t,r)=>{if(!e.range)return;const n=[];for(let i=0;i<t;i++){const e=[];for(let t=0;t<r;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});n.push({type:"inblock",parsedom:"tr",children:e})}const a=y.create({type:"block",parsedom:"table",children:[{type:"inblock",parsedom:"tbody",children:n}]});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)},Bn=(e,t)=>{if(!e.range)return;const r=Vr(e,t,{parsedom:"pre"});if(r){let t="";y.flatElements(r.children).filter((e=>e.isText())).forEach((e=>{t+=e.textContent}));t.split("\n").forEach((t=>{const n=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"text",textcontent:t}]});e.addElementBefore(n,r)})),r.toEmpty()}else if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();ln(t),t.parsedom="pre";const r=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(r,t)}else{e.range.anchor.moveToStart(t.list[0].element.getBlock()),e.range.focus.moveToEnd(t.list[t.list.length-1].element.getBlock());const r=t.flatList.filter((e=>e.element.isText())),n={};r.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 a=y.create({type:"block",parsedom:"pre"});Object.keys(n).forEach(((t,r)=>{if(r>0){const t=y.create({type:"text",textcontent:"\n"});a.hasChildren()?e.addElementTo(t,a,a.children.length):e.addElementTo(t,a)}n[t].forEach((t=>{a.hasChildren()?e.addElementTo(t,a,a.children.length):e.addElementTo(t,a)}))})),e.delete(),e.insertElement(a);const o=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(o,a)}},Cn=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)},_n={value:{type:String,default:""}},Nn=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},Mn=Nn(t.defineComponent({name:"Icon",__name:"icon",props:_n,setup:e=>(e,r)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass(["editify-icon","editify-icon-"+e.value])},null,2))}),[["__scopeId","data-v-6e00035b"]]);class An{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new An(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class On{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 On(t,An.range(this,e))}}class Rn{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,a="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var i=o.lexer.input;r=o.start,n=o.end,r===i.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=i.slice(r,n).replace(/[^]/g,"$&̲");a+=(r>15?"…"+i.slice(r-15,r):i.slice(0,r))+l+(n+15<i.length?i.slice(n,n+15)+"…":i.slice(n))}var s=new Error(a);return s.name="ParseError",s.__proto__=Rn.prototype,s.position=r,null!=r&&null!=n&&(s.length=n-r),s.rawMessage=e,s}}Rn.prototype.__proto__=Error.prototype;var zn=/([A-Z])/g,In={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},Ln=/[&><"']/g;var Dn=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},Pn={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(Ln,(e=>In[e]))},hyphenate:function(e){return e.replace(zn,"-$1").toLowerCase()},getBaseElem:Dn,isCharacterBox:function(e){var t=Dn(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"}},Fn={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 qn(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Hn{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||{},Fn)if(Fn.hasOwnProperty(t)){var r=Fn[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:qn(r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new Rn("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"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 '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch(a){n="error"}return!(!n||"ignore"===n)&&(!0===n||"error"===n||("warn"===n?("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 '"+n+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=Pn.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class $n{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return Vn[Un[this.id]]}sub(){return Vn[jn[this.id]]}fracNum(){return Vn[Wn[this.id]]}fracDen(){return Vn[Kn[this.id]]}cramp(){return Vn[Gn[this.id]]}text(){return Vn[Zn[this.id]]}isTight(){return this.size>=2}}var Vn=[new $n(0,0,!1),new $n(1,0,!0),new $n(2,1,!1),new $n(3,1,!0),new $n(4,2,!1),new $n(5,2,!0),new $n(6,3,!1),new $n(7,3,!0)],Un=[4,5,4,5,6,7,6,7],jn=[5,5,5,5,7,7,7,7],Wn=[2,3,4,5,6,7,6,7],Kn=[3,3,5,5,7,7,7,7],Gn=[1,1,3,3,5,5,7,7],Zn=[0,1,2,3,2,3,2,3],Xn={DISPLAY:Vn[0],TEXT:Vn[2],SCRIPT:Vn[4],SCRIPTSCRIPT:Vn[6]},Yn=[{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 Qn=[];function Jn(e){for(var t=0;t<Qn.length;t+=2)if(e>=Qn[t]&&e<=Qn[t+1])return!0;return!1}Yn.forEach((e=>e.blocks.forEach((e=>Qn.push(...e)))));var ea=80,ta={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 ra{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 Pn.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 na={"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]}},aa={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]},oa={"Å":"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 ia(e,t,r){if(!na[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),a=na[t][n];if(!a&&e[0]in oa&&(n=oa[e[0]].charCodeAt(0),a=na[t][n]),a||"text"!==r||Jn(n)&&(a=na[t][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}var la={};var sa=[[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]],ca=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],da=function(e,t){return t.size<2?e:sa[e-1][t.size-1]};class ua{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||ua.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=ca[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 r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new ua(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:da(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:ca[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=da(ua.BASESIZE,e);return this.size===t&&this.textSize===ua.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!==ua.BASESIZE?["sizing","reset-size"+this.size,"size"+ua.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!la[t=e>=5?0:e>=3?1:2]){var r=la[t]={cssEmPerMu:aa.quad[t]/18};for(var n in aa)aa.hasOwnProperty(n)&&(r[n]=aa[n][t])}return la[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ua.BASESIZE=6;var ha={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},ma={ex:!0,em:!0,mu:!0},pa=function(e){return"string"!=typeof e&&(e=e.unit),e in ha||e in ma||"ex"===e},fa=function(e,t){var r;if(e.unit in ha)r=ha[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new Rn("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},ga=function(e){return+e.toFixed(4)+"em"},va=function(e){return e.filter((e=>e)).join(" ")},ba=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},ya=function(e){var t=document.createElement(e);for(var r in t.className=va(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)t.appendChild(this.children[a].toNode());return t},wa=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+Pn.escape(va(this.classes))+'"');var r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Pn.hyphenate(n)+":"+this.style[n]+";");for(var a in r&&(t+=' style="'+Pn.escape(r)+'"'),this.attributes)this.attributes.hasOwnProperty(a)&&(t+=" "+a+'="'+Pn.escape(this.attributes[a])+'"');t+=">";for(var o=0;o<this.children.length;o++)t+=this.children[o].toMarkup();return t+="</"+e+">"};class xa{constructor(e,t,r,n){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,ba.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Pn.contains(this.classes,e)}toNode(){return ya.call(this,"span")}toMarkup(){return wa.call(this,"span")}}class ka{constructor(e,t,r,n){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,ba.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return Pn.contains(this.classes,e)}toNode(){return ya.call(this,"a")}toMarkup(){return wa.call(this,"a")}}class Ea{constructor(e,t,r){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=r}hasClass(e){return Pn.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="'+Pn.escape(this.src)+'" alt="'+Pn.escape(this.alt)+'"',t="";for(var r in this.style)this.style.hasOwnProperty(r)&&(t+=Pn.hyphenate(r)+":"+this.style[r]+";");return t&&(e+=' style="'+Pn.escape(t)+'"'),e+="'/>"}}var Sa={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class Ta{constructor(e,t,r,n,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=r||0,this.italic=n||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<Yn.length;t++)for(var r=Yn[t],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(e>=a[0]&&e<=a[1])return r.name}return null}(this.text.charCodeAt(0));s&&this.classes.push(s+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Sa[this.text])}hasClass(e){return Pn.contains(this.classes,e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=ga(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=va(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="<span";this.classes.length&&(e=!0,t+=' class="',t+=Pn.escape(va(this.classes)),t+='"');var r="";for(var n in this.italic>0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(r+=Pn.hyphenate(n)+":"+this.style[n]+";");r&&(e=!0,t+=' style="'+Pn.escape(r)+'"');var a=Pn.escape(this.text);return e?(t+=">",t+=a,t+="</span>"):a}}class Ba{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 r=0;r<this.children.length;r++)e.appendChild(this.children[r].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+'="'+Pn.escape(this.attributes[t])+'"');e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</svg>"}}class Ca{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",ta[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+Pn.escape(this.alternate)+'"/>':'<path d="'+Pn.escape(ta[this.pathName])+'"/>'}}class _a{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+'="'+Pn.escape(this.attributes[t])+'"');return e+="/>"}}function Na(e){if(e instanceof Ta)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var Ma={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Aa={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Oa={math:{},text:{}};function Ra(e,t,r,n,a,o){Oa[e][a]={font:t,group:r,replace:n},o&&n&&(Oa[e][n]=Oa[e][a])}var za="math",Ia="text",La="main",Da="ams",Pa="accent-token",Fa="bin",qa="close",Ha="inner",$a="mathord",Va="op-token",Ua="open",ja="punct",Wa="rel",Ka="spacing",Ga="textord";Ra(za,La,Wa,"≡","\\equiv",!0),Ra(za,La,Wa,"≺","\\prec",!0),Ra(za,La,Wa,"≻","\\succ",!0),Ra(za,La,Wa,"∼","\\sim",!0),Ra(za,La,Wa,"⊥","\\perp"),Ra(za,La,Wa,"⪯","\\preceq",!0),Ra(za,La,Wa,"⪰","\\succeq",!0),Ra(za,La,Wa,"≃","\\simeq",!0),Ra(za,La,Wa,"∣","\\mid",!0),Ra(za,La,Wa,"≪","\\ll",!0),Ra(za,La,Wa,"≫","\\gg",!0),Ra(za,La,Wa,"≍","\\asymp",!0),Ra(za,La,Wa,"∥","\\parallel"),Ra(za,La,Wa,"⋈","\\bowtie",!0),Ra(za,La,Wa,"⌣","\\smile",!0),Ra(za,La,Wa,"⊑","\\sqsubseteq",!0),Ra(za,La,Wa,"⊒","\\sqsupseteq",!0),Ra(za,La,Wa,"≐","\\doteq",!0),Ra(za,La,Wa,"⌢","\\frown",!0),Ra(za,La,Wa,"∋","\\ni",!0),Ra(za,La,Wa,"∝","\\propto",!0),Ra(za,La,Wa,"⊢","\\vdash",!0),Ra(za,La,Wa,"⊣","\\dashv",!0),Ra(za,La,Wa,"∋","\\owns"),Ra(za,La,ja,".","\\ldotp"),Ra(za,La,ja,"⋅","\\cdotp"),Ra(za,La,Ga,"#","\\#"),Ra(Ia,La,Ga,"#","\\#"),Ra(za,La,Ga,"&","\\&"),Ra(Ia,La,Ga,"&","\\&"),Ra(za,La,Ga,"ℵ","\\aleph",!0),Ra(za,La,Ga,"∀","\\forall",!0),Ra(za,La,Ga,"ℏ","\\hbar",!0),Ra(za,La,Ga,"∃","\\exists",!0),Ra(za,La,Ga,"∇","\\nabla",!0),Ra(za,La,Ga,"♭","\\flat",!0),Ra(za,La,Ga,"ℓ","\\ell",!0),Ra(za,La,Ga,"♮","\\natural",!0),Ra(za,La,Ga,"♣","\\clubsuit",!0),Ra(za,La,Ga,"℘","\\wp",!0),Ra(za,La,Ga,"♯","\\sharp",!0),Ra(za,La,Ga,"♢","\\diamondsuit",!0),Ra(za,La,Ga,"ℜ","\\Re",!0),Ra(za,La,Ga,"♡","\\heartsuit",!0),Ra(za,La,Ga,"ℑ","\\Im",!0),Ra(za,La,Ga,"♠","\\spadesuit",!0),Ra(za,La,Ga,"§","\\S",!0),Ra(Ia,La,Ga,"§","\\S"),Ra(za,La,Ga,"¶","\\P",!0),Ra(Ia,La,Ga,"¶","\\P"),Ra(za,La,Ga,"†","\\dag"),Ra(Ia,La,Ga,"†","\\dag"),Ra(Ia,La,Ga,"†","\\textdagger"),Ra(za,La,Ga,"‡","\\ddag"),Ra(Ia,La,Ga,"‡","\\ddag"),Ra(Ia,La,Ga,"‡","\\textdaggerdbl"),Ra(za,La,qa,"⎱","\\rmoustache",!0),Ra(za,La,Ua,"⎰","\\lmoustache",!0),Ra(za,La,qa,"⟯","\\rgroup",!0),Ra(za,La,Ua,"⟮","\\lgroup",!0),Ra(za,La,Fa,"∓","\\mp",!0),Ra(za,La,Fa,"⊖","\\ominus",!0),Ra(za,La,Fa,"⊎","\\uplus",!0),Ra(za,La,Fa,"⊓","\\sqcap",!0),Ra(za,La,Fa,"∗","\\ast"),Ra(za,La,Fa,"⊔","\\sqcup",!0),Ra(za,La,Fa,"◯","\\bigcirc",!0),Ra(za,La,Fa,"∙","\\bullet",!0),Ra(za,La,Fa,"‡","\\ddagger"),Ra(za,La,Fa,"≀","\\wr",!0),Ra(za,La,Fa,"⨿","\\amalg"),Ra(za,La,Fa,"&","\\And"),Ra(za,La,Wa,"⟵","\\longleftarrow",!0),Ra(za,La,Wa,"⇐","\\Leftarrow",!0),Ra(za,La,Wa,"⟸","\\Longleftarrow",!0),Ra(za,La,Wa,"⟶","\\longrightarrow",!0),Ra(za,La,Wa,"⇒","\\Rightarrow",!0),Ra(za,La,Wa,"⟹","\\Longrightarrow",!0),Ra(za,La,Wa,"↔","\\leftrightarrow",!0),Ra(za,La,Wa,"⟷","\\longleftrightarrow",!0),Ra(za,La,Wa,"⇔","\\Leftrightarrow",!0),Ra(za,La,Wa,"⟺","\\Longleftrightarrow",!0),Ra(za,La,Wa,"↦","\\mapsto",!0),Ra(za,La,Wa,"⟼","\\longmapsto",!0),Ra(za,La,Wa,"↗","\\nearrow",!0),Ra(za,La,Wa,"↩","\\hookleftarrow",!0),Ra(za,La,Wa,"↪","\\hookrightarrow",!0),Ra(za,La,Wa,"↘","\\searrow",!0),Ra(za,La,Wa,"↼","\\leftharpoonup",!0),Ra(za,La,Wa,"⇀","\\rightharpoonup",!0),Ra(za,La,Wa,"↙","\\swarrow",!0),Ra(za,La,Wa,"↽","\\leftharpoondown",!0),Ra(za,La,Wa,"⇁","\\rightharpoondown",!0),Ra(za,La,Wa,"↖","\\nwarrow",!0),Ra(za,La,Wa,"⇌","\\rightleftharpoons",!0),Ra(za,Da,Wa,"≮","\\nless",!0),Ra(za,Da,Wa,"","\\@nleqslant"),Ra(za,Da,Wa,"","\\@nleqq"),Ra(za,Da,Wa,"⪇","\\lneq",!0),Ra(za,Da,Wa,"≨","\\lneqq",!0),Ra(za,Da,Wa,"","\\@lvertneqq"),Ra(za,Da,Wa,"⋦","\\lnsim",!0),Ra(za,Da,Wa,"⪉","\\lnapprox",!0),Ra(za,Da,Wa,"⊀","\\nprec",!0),Ra(za,Da,Wa,"⋠","\\npreceq",!0),Ra(za,Da,Wa,"⋨","\\precnsim",!0),Ra(za,Da,Wa,"⪹","\\precnapprox",!0),Ra(za,Da,Wa,"≁","\\nsim",!0),Ra(za,Da,Wa,"","\\@nshortmid"),Ra(za,Da,Wa,"∤","\\nmid",!0),Ra(za,Da,Wa,"⊬","\\nvdash",!0),Ra(za,Da,Wa,"⊭","\\nvDash",!0),Ra(za,Da,Wa,"⋪","\\ntriangleleft"),Ra(za,Da,Wa,"⋬","\\ntrianglelefteq",!0),Ra(za,Da,Wa,"⊊","\\subsetneq",!0),Ra(za,Da,Wa,"","\\@varsubsetneq"),Ra(za,Da,Wa,"⫋","\\subsetneqq",!0),Ra(za,Da,Wa,"","\\@varsubsetneqq"),Ra(za,Da,Wa,"≯","\\ngtr",!0),Ra(za,Da,Wa,"","\\@ngeqslant"),Ra(za,Da,Wa,"","\\@ngeqq"),Ra(za,Da,Wa,"⪈","\\gneq",!0),Ra(za,Da,Wa,"≩","\\gneqq",!0),Ra(za,Da,Wa,"","\\@gvertneqq"),Ra(za,Da,Wa,"⋧","\\gnsim",!0),Ra(za,Da,Wa,"⪊","\\gnapprox",!0),Ra(za,Da,Wa,"⊁","\\nsucc",!0),Ra(za,Da,Wa,"⋡","\\nsucceq",!0),Ra(za,Da,Wa,"⋩","\\succnsim",!0),Ra(za,Da,Wa,"⪺","\\succnapprox",!0),Ra(za,Da,Wa,"≆","\\ncong",!0),Ra(za,Da,Wa,"","\\@nshortparallel"),Ra(za,Da,Wa,"∦","\\nparallel",!0),Ra(za,Da,Wa,"⊯","\\nVDash",!0),Ra(za,Da,Wa,"⋫","\\ntriangleright"),Ra(za,Da,Wa,"⋭","\\ntrianglerighteq",!0),Ra(za,Da,Wa,"","\\@nsupseteqq"),Ra(za,Da,Wa,"⊋","\\supsetneq",!0),Ra(za,Da,Wa,"","\\@varsupsetneq"),Ra(za,Da,Wa,"⫌","\\supsetneqq",!0),Ra(za,Da,Wa,"","\\@varsupsetneqq"),Ra(za,Da,Wa,"⊮","\\nVdash",!0),Ra(za,Da,Wa,"⪵","\\precneqq",!0),Ra(za,Da,Wa,"⪶","\\succneqq",!0),Ra(za,Da,Wa,"","\\@nsubseteqq"),Ra(za,Da,Fa,"⊴","\\unlhd"),Ra(za,Da,Fa,"⊵","\\unrhd"),Ra(za,Da,Wa,"↚","\\nleftarrow",!0),Ra(za,Da,Wa,"↛","\\nrightarrow",!0),Ra(za,Da,Wa,"⇍","\\nLeftarrow",!0),Ra(za,Da,Wa,"⇏","\\nRightarrow",!0),Ra(za,Da,Wa,"↮","\\nleftrightarrow",!0),Ra(za,Da,Wa,"⇎","\\nLeftrightarrow",!0),Ra(za,Da,Wa,"△","\\vartriangle"),Ra(za,Da,Ga,"ℏ","\\hslash"),Ra(za,Da,Ga,"▽","\\triangledown"),Ra(za,Da,Ga,"◊","\\lozenge"),Ra(za,Da,Ga,"Ⓢ","\\circledS"),Ra(za,Da,Ga,"®","\\circledR"),Ra(Ia,Da,Ga,"®","\\circledR"),Ra(za,Da,Ga,"∡","\\measuredangle",!0),Ra(za,Da,Ga,"∄","\\nexists"),Ra(za,Da,Ga,"℧","\\mho"),Ra(za,Da,Ga,"Ⅎ","\\Finv",!0),Ra(za,Da,Ga,"⅁","\\Game",!0),Ra(za,Da,Ga,"‵","\\backprime"),Ra(za,Da,Ga,"▲","\\blacktriangle"),Ra(za,Da,Ga,"▼","\\blacktriangledown"),Ra(za,Da,Ga,"■","\\blacksquare"),Ra(za,Da,Ga,"⧫","\\blacklozenge"),Ra(za,Da,Ga,"★","\\bigstar"),Ra(za,Da,Ga,"∢","\\sphericalangle",!0),Ra(za,Da,Ga,"∁","\\complement",!0),Ra(za,Da,Ga,"ð","\\eth",!0),Ra(Ia,La,Ga,"ð","ð"),Ra(za,Da,Ga,"╱","\\diagup"),Ra(za,Da,Ga,"╲","\\diagdown"),Ra(za,Da,Ga,"□","\\square"),Ra(za,Da,Ga,"□","\\Box"),Ra(za,Da,Ga,"◊","\\Diamond"),Ra(za,Da,Ga,"¥","\\yen",!0),Ra(Ia,Da,Ga,"¥","\\yen",!0),Ra(za,Da,Ga,"✓","\\checkmark",!0),Ra(Ia,Da,Ga,"✓","\\checkmark"),Ra(za,Da,Ga,"ℶ","\\beth",!0),Ra(za,Da,Ga,"ℸ","\\daleth",!0),Ra(za,Da,Ga,"ℷ","\\gimel",!0),Ra(za,Da,Ga,"ϝ","\\digamma",!0),Ra(za,Da,Ga,"ϰ","\\varkappa"),Ra(za,Da,Ua,"┌","\\@ulcorner",!0),Ra(za,Da,qa,"┐","\\@urcorner",!0),Ra(za,Da,Ua,"└","\\@llcorner",!0),Ra(za,Da,qa,"┘","\\@lrcorner",!0),Ra(za,Da,Wa,"≦","\\leqq",!0),Ra(za,Da,Wa,"⩽","\\leqslant",!0),Ra(za,Da,Wa,"⪕","\\eqslantless",!0),Ra(za,Da,Wa,"≲","\\lesssim",!0),Ra(za,Da,Wa,"⪅","\\lessapprox",!0),Ra(za,Da,Wa,"≊","\\approxeq",!0),Ra(za,Da,Fa,"⋖","\\lessdot"),Ra(za,Da,Wa,"⋘","\\lll",!0),Ra(za,Da,Wa,"≶","\\lessgtr",!0),Ra(za,Da,Wa,"⋚","\\lesseqgtr",!0),Ra(za,Da,Wa,"⪋","\\lesseqqgtr",!0),Ra(za,Da,Wa,"≑","\\doteqdot"),Ra(za,Da,Wa,"≓","\\risingdotseq",!0),Ra(za,Da,Wa,"≒","\\fallingdotseq",!0),Ra(za,Da,Wa,"∽","\\backsim",!0),Ra(za,Da,Wa,"⋍","\\backsimeq",!0),Ra(za,Da,Wa,"⫅","\\subseteqq",!0),Ra(za,Da,Wa,"⋐","\\Subset",!0),Ra(za,Da,Wa,"⊏","\\sqsubset",!0),Ra(za,Da,Wa,"≼","\\preccurlyeq",!0),Ra(za,Da,Wa,"⋞","\\curlyeqprec",!0),Ra(za,Da,Wa,"≾","\\precsim",!0),Ra(za,Da,Wa,"⪷","\\precapprox",!0),Ra(za,Da,Wa,"⊲","\\vartriangleleft"),Ra(za,Da,Wa,"⊴","\\trianglelefteq"),Ra(za,Da,Wa,"⊨","\\vDash",!0),Ra(za,Da,Wa,"⊪","\\Vvdash",!0),Ra(za,Da,Wa,"⌣","\\smallsmile"),Ra(za,Da,Wa,"⌢","\\smallfrown"),Ra(za,Da,Wa,"≏","\\bumpeq",!0),Ra(za,Da,Wa,"≎","\\Bumpeq",!0),Ra(za,Da,Wa,"≧","\\geqq",!0),Ra(za,Da,Wa,"⩾","\\geqslant",!0),Ra(za,Da,Wa,"⪖","\\eqslantgtr",!0),Ra(za,Da,Wa,"≳","\\gtrsim",!0),Ra(za,Da,Wa,"⪆","\\gtrapprox",!0),Ra(za,Da,Fa,"⋗","\\gtrdot"),Ra(za,Da,Wa,"⋙","\\ggg",!0),Ra(za,Da,Wa,"≷","\\gtrless",!0),Ra(za,Da,Wa,"⋛","\\gtreqless",!0),Ra(za,Da,Wa,"⪌","\\gtreqqless",!0),Ra(za,Da,Wa,"≖","\\eqcirc",!0),Ra(za,Da,Wa,"≗","\\circeq",!0),Ra(za,Da,Wa,"≜","\\triangleq",!0),Ra(za,Da,Wa,"∼","\\thicksim"),Ra(za,Da,Wa,"≈","\\thickapprox"),Ra(za,Da,Wa,"⫆","\\supseteqq",!0),Ra(za,Da,Wa,"⋑","\\Supset",!0),Ra(za,Da,Wa,"⊐","\\sqsupset",!0),Ra(za,Da,Wa,"≽","\\succcurlyeq",!0),Ra(za,Da,Wa,"⋟","\\curlyeqsucc",!0),Ra(za,Da,Wa,"≿","\\succsim",!0),Ra(za,Da,Wa,"⪸","\\succapprox",!0),Ra(za,Da,Wa,"⊳","\\vartriangleright"),Ra(za,Da,Wa,"⊵","\\trianglerighteq"),Ra(za,Da,Wa,"⊩","\\Vdash",!0),Ra(za,Da,Wa,"∣","\\shortmid"),Ra(za,Da,Wa,"∥","\\shortparallel"),Ra(za,Da,Wa,"≬","\\between",!0),Ra(za,Da,Wa,"⋔","\\pitchfork",!0),Ra(za,Da,Wa,"∝","\\varpropto"),Ra(za,Da,Wa,"◀","\\blacktriangleleft"),Ra(za,Da,Wa,"∴","\\therefore",!0),Ra(za,Da,Wa,"∍","\\backepsilon"),Ra(za,Da,Wa,"▶","\\blacktriangleright"),Ra(za,Da,Wa,"∵","\\because",!0),Ra(za,Da,Wa,"⋘","\\llless"),Ra(za,Da,Wa,"⋙","\\gggtr"),Ra(za,Da,Fa,"⊲","\\lhd"),Ra(za,Da,Fa,"⊳","\\rhd"),Ra(za,Da,Wa,"≂","\\eqsim",!0),Ra(za,La,Wa,"⋈","\\Join"),Ra(za,Da,Wa,"≑","\\Doteq",!0),Ra(za,Da,Fa,"∔","\\dotplus",!0),Ra(za,Da,Fa,"∖","\\smallsetminus"),Ra(za,Da,Fa,"⋒","\\Cap",!0),Ra(za,Da,Fa,"⋓","\\Cup",!0),Ra(za,Da,Fa,"⩞","\\doublebarwedge",!0),Ra(za,Da,Fa,"⊟","\\boxminus",!0),Ra(za,Da,Fa,"⊞","\\boxplus",!0),Ra(za,Da,Fa,"⋇","\\divideontimes",!0),Ra(za,Da,Fa,"⋉","\\ltimes",!0),Ra(za,Da,Fa,"⋊","\\rtimes",!0),Ra(za,Da,Fa,"⋋","\\leftthreetimes",!0),Ra(za,Da,Fa,"⋌","\\rightthreetimes",!0),Ra(za,Da,Fa,"⋏","\\curlywedge",!0),Ra(za,Da,Fa,"⋎","\\curlyvee",!0),Ra(za,Da,Fa,"⊝","\\circleddash",!0),Ra(za,Da,Fa,"⊛","\\circledast",!0),Ra(za,Da,Fa,"⋅","\\centerdot"),Ra(za,Da,Fa,"⊺","\\intercal",!0),Ra(za,Da,Fa,"⋒","\\doublecap"),Ra(za,Da,Fa,"⋓","\\doublecup"),Ra(za,Da,Fa,"⊠","\\boxtimes",!0),Ra(za,Da,Wa,"⇢","\\dashrightarrow",!0),Ra(za,Da,Wa,"⇠","\\dashleftarrow",!0),Ra(za,Da,Wa,"⇇","\\leftleftarrows",!0),Ra(za,Da,Wa,"⇆","\\leftrightarrows",!0),Ra(za,Da,Wa,"⇚","\\Lleftarrow",!0),Ra(za,Da,Wa,"↞","\\twoheadleftarrow",!0),Ra(za,Da,Wa,"↢","\\leftarrowtail",!0),Ra(za,Da,Wa,"↫","\\looparrowleft",!0),Ra(za,Da,Wa,"⇋","\\leftrightharpoons",!0),Ra(za,Da,Wa,"↶","\\curvearrowleft",!0),Ra(za,Da,Wa,"↺","\\circlearrowleft",!0),Ra(za,Da,Wa,"↰","\\Lsh",!0),Ra(za,Da,Wa,"⇈","\\upuparrows",!0),Ra(za,Da,Wa,"↿","\\upharpoonleft",!0),Ra(za,Da,Wa,"⇃","\\downharpoonleft",!0),Ra(za,La,Wa,"⊶","\\origof",!0),Ra(za,La,Wa,"⊷","\\imageof",!0),Ra(za,Da,Wa,"⊸","\\multimap",!0),Ra(za,Da,Wa,"↭","\\leftrightsquigarrow",!0),Ra(za,Da,Wa,"⇉","\\rightrightarrows",!0),Ra(za,Da,Wa,"⇄","\\rightleftarrows",!0),Ra(za,Da,Wa,"↠","\\twoheadrightarrow",!0),Ra(za,Da,Wa,"↣","\\rightarrowtail",!0),Ra(za,Da,Wa,"↬","\\looparrowright",!0),Ra(za,Da,Wa,"↷","\\curvearrowright",!0),Ra(za,Da,Wa,"↻","\\circlearrowright",!0),Ra(za,Da,Wa,"↱","\\Rsh",!0),Ra(za,Da,Wa,"⇊","\\downdownarrows",!0),Ra(za,Da,Wa,"↾","\\upharpoonright",!0),Ra(za,Da,Wa,"⇂","\\downharpoonright",!0),Ra(za,Da,Wa,"⇝","\\rightsquigarrow",!0),Ra(za,Da,Wa,"⇝","\\leadsto"),Ra(za,Da,Wa,"⇛","\\Rrightarrow",!0),Ra(za,Da,Wa,"↾","\\restriction"),Ra(za,La,Ga,"‘","`"),Ra(za,La,Ga,"$","\\$"),Ra(Ia,La,Ga,"$","\\$"),Ra(Ia,La,Ga,"$","\\textdollar"),Ra(za,La,Ga,"%","\\%"),Ra(Ia,La,Ga,"%","\\%"),Ra(za,La,Ga,"_","\\_"),Ra(Ia,La,Ga,"_","\\_"),Ra(Ia,La,Ga,"_","\\textunderscore"),Ra(za,La,Ga,"∠","\\angle",!0),Ra(za,La,Ga,"∞","\\infty",!0),Ra(za,La,Ga,"′","\\prime"),Ra(za,La,Ga,"△","\\triangle"),Ra(za,La,Ga,"Γ","\\Gamma",!0),Ra(za,La,Ga,"Δ","\\Delta",!0),Ra(za,La,Ga,"Θ","\\Theta",!0),Ra(za,La,Ga,"Λ","\\Lambda",!0),Ra(za,La,Ga,"Ξ","\\Xi",!0),Ra(za,La,Ga,"Π","\\Pi",!0),Ra(za,La,Ga,"Σ","\\Sigma",!0),Ra(za,La,Ga,"Υ","\\Upsilon",!0),Ra(za,La,Ga,"Φ","\\Phi",!0),Ra(za,La,Ga,"Ψ","\\Psi",!0),Ra(za,La,Ga,"Ω","\\Omega",!0),Ra(za,La,Ga,"A","Α"),Ra(za,La,Ga,"B","Β"),Ra(za,La,Ga,"E","Ε"),Ra(za,La,Ga,"Z","Ζ"),Ra(za,La,Ga,"H","Η"),Ra(za,La,Ga,"I","Ι"),Ra(za,La,Ga,"K","Κ"),Ra(za,La,Ga,"M","Μ"),Ra(za,La,Ga,"N","Ν"),Ra(za,La,Ga,"O","Ο"),Ra(za,La,Ga,"P","Ρ"),Ra(za,La,Ga,"T","Τ"),Ra(za,La,Ga,"X","Χ"),Ra(za,La,Ga,"¬","\\neg",!0),Ra(za,La,Ga,"¬","\\lnot"),Ra(za,La,Ga,"⊤","\\top"),Ra(za,La,Ga,"⊥","\\bot"),Ra(za,La,Ga,"∅","\\emptyset"),Ra(za,Da,Ga,"∅","\\varnothing"),Ra(za,La,$a,"α","\\alpha",!0),Ra(za,La,$a,"β","\\beta",!0),Ra(za,La,$a,"γ","\\gamma",!0),Ra(za,La,$a,"δ","\\delta",!0),Ra(za,La,$a,"ϵ","\\epsilon",!0),Ra(za,La,$a,"ζ","\\zeta",!0),Ra(za,La,$a,"η","\\eta",!0),Ra(za,La,$a,"θ","\\theta",!0),Ra(za,La,$a,"ι","\\iota",!0),Ra(za,La,$a,"κ","\\kappa",!0),Ra(za,La,$a,"λ","\\lambda",!0),Ra(za,La,$a,"μ","\\mu",!0),Ra(za,La,$a,"ν","\\nu",!0),Ra(za,La,$a,"ξ","\\xi",!0),Ra(za,La,$a,"ο","\\omicron",!0),Ra(za,La,$a,"π","\\pi",!0),Ra(za,La,$a,"ρ","\\rho",!0),Ra(za,La,$a,"σ","\\sigma",!0),Ra(za,La,$a,"τ","\\tau",!0),Ra(za,La,$a,"υ","\\upsilon",!0),Ra(za,La,$a,"ϕ","\\phi",!0),Ra(za,La,$a,"χ","\\chi",!0),Ra(za,La,$a,"ψ","\\psi",!0),Ra(za,La,$a,"ω","\\omega",!0),Ra(za,La,$a,"ε","\\varepsilon",!0),Ra(za,La,$a,"ϑ","\\vartheta",!0),Ra(za,La,$a,"ϖ","\\varpi",!0),Ra(za,La,$a,"ϱ","\\varrho",!0),Ra(za,La,$a,"ς","\\varsigma",!0),Ra(za,La,$a,"φ","\\varphi",!0),Ra(za,La,Fa,"∗","*",!0),Ra(za,La,Fa,"+","+"),Ra(za,La,Fa,"−","-",!0),Ra(za,La,Fa,"⋅","\\cdot",!0),Ra(za,La,Fa,"∘","\\circ",!0),Ra(za,La,Fa,"÷","\\div",!0),Ra(za,La,Fa,"±","\\pm",!0),Ra(za,La,Fa,"×","\\times",!0),Ra(za,La,Fa,"∩","\\cap",!0),Ra(za,La,Fa,"∪","\\cup",!0),Ra(za,La,Fa,"∖","\\setminus",!0),Ra(za,La,Fa,"∧","\\land"),Ra(za,La,Fa,"∨","\\lor"),Ra(za,La,Fa,"∧","\\wedge",!0),Ra(za,La,Fa,"∨","\\vee",!0),Ra(za,La,Ga,"√","\\surd"),Ra(za,La,Ua,"⟨","\\langle",!0),Ra(za,La,Ua,"∣","\\lvert"),Ra(za,La,Ua,"∥","\\lVert"),Ra(za,La,qa,"?","?"),Ra(za,La,qa,"!","!"),Ra(za,La,qa,"⟩","\\rangle",!0),Ra(za,La,qa,"∣","\\rvert"),Ra(za,La,qa,"∥","\\rVert"),Ra(za,La,Wa,"=","="),Ra(za,La,Wa,":",":"),Ra(za,La,Wa,"≈","\\approx",!0),Ra(za,La,Wa,"≅","\\cong",!0),Ra(za,La,Wa,"≥","\\ge"),Ra(za,La,Wa,"≥","\\geq",!0),Ra(za,La,Wa,"←","\\gets"),Ra(za,La,Wa,">","\\gt",!0),Ra(za,La,Wa,"∈","\\in",!0),Ra(za,La,Wa,"","\\@not"),Ra(za,La,Wa,"⊂","\\subset",!0),Ra(za,La,Wa,"⊃","\\supset",!0),Ra(za,La,Wa,"⊆","\\subseteq",!0),Ra(za,La,Wa,"⊇","\\supseteq",!0),Ra(za,Da,Wa,"⊈","\\nsubseteq",!0),Ra(za,Da,Wa,"⊉","\\nsupseteq",!0),Ra(za,La,Wa,"⊨","\\models"),Ra(za,La,Wa,"←","\\leftarrow",!0),Ra(za,La,Wa,"≤","\\le"),Ra(za,La,Wa,"≤","\\leq",!0),Ra(za,La,Wa,"<","\\lt",!0),Ra(za,La,Wa,"→","\\rightarrow",!0),Ra(za,La,Wa,"→","\\to"),Ra(za,Da,Wa,"≱","\\ngeq",!0),Ra(za,Da,Wa,"≰","\\nleq",!0),Ra(za,La,Ka," ","\\ "),Ra(za,La,Ka," ","\\space"),Ra(za,La,Ka," ","\\nobreakspace"),Ra(Ia,La,Ka," ","\\ "),Ra(Ia,La,Ka," "," "),Ra(Ia,La,Ka," ","\\space"),Ra(Ia,La,Ka," ","\\nobreakspace"),Ra(za,La,Ka,null,"\\nobreak"),Ra(za,La,Ka,null,"\\allowbreak"),Ra(za,La,ja,",",","),Ra(za,La,ja,";",";"),Ra(za,Da,Fa,"⊼","\\barwedge",!0),Ra(za,Da,Fa,"⊻","\\veebar",!0),Ra(za,La,Fa,"⊙","\\odot",!0),Ra(za,La,Fa,"⊕","\\oplus",!0),Ra(za,La,Fa,"⊗","\\otimes",!0),Ra(za,La,Ga,"∂","\\partial",!0),Ra(za,La,Fa,"⊘","\\oslash",!0),Ra(za,Da,Fa,"⊚","\\circledcirc",!0),Ra(za,Da,Fa,"⊡","\\boxdot",!0),Ra(za,La,Fa,"△","\\bigtriangleup"),Ra(za,La,Fa,"▽","\\bigtriangledown"),Ra(za,La,Fa,"†","\\dagger"),Ra(za,La,Fa,"⋄","\\diamond"),Ra(za,La,Fa,"⋆","\\star"),Ra(za,La,Fa,"◃","\\triangleleft"),Ra(za,La,Fa,"▹","\\triangleright"),Ra(za,La,Ua,"{","\\{"),Ra(Ia,La,Ga,"{","\\{"),Ra(Ia,La,Ga,"{","\\textbraceleft"),Ra(za,La,qa,"}","\\}"),Ra(Ia,La,Ga,"}","\\}"),Ra(Ia,La,Ga,"}","\\textbraceright"),Ra(za,La,Ua,"{","\\lbrace"),Ra(za,La,qa,"}","\\rbrace"),Ra(za,La,Ua,"[","\\lbrack",!0),Ra(Ia,La,Ga,"[","\\lbrack",!0),Ra(za,La,qa,"]","\\rbrack",!0),Ra(Ia,La,Ga,"]","\\rbrack",!0),Ra(za,La,Ua,"(","\\lparen",!0),Ra(za,La,qa,")","\\rparen",!0),Ra(Ia,La,Ga,"<","\\textless",!0),Ra(Ia,La,Ga,">","\\textgreater",!0),Ra(za,La,Ua,"⌊","\\lfloor",!0),Ra(za,La,qa,"⌋","\\rfloor",!0),Ra(za,La,Ua,"⌈","\\lceil",!0),Ra(za,La,qa,"⌉","\\rceil",!0),Ra(za,La,Ga,"\\","\\backslash"),Ra(za,La,Ga,"∣","|"),Ra(za,La,Ga,"∣","\\vert"),Ra(Ia,La,Ga,"|","\\textbar",!0),Ra(za,La,Ga,"∥","\\|"),Ra(za,La,Ga,"∥","\\Vert"),Ra(Ia,La,Ga,"∥","\\textbardbl"),Ra(Ia,La,Ga,"~","\\textasciitilde"),Ra(Ia,La,Ga,"\\","\\textbackslash"),Ra(Ia,La,Ga,"^","\\textasciicircum"),Ra(za,La,Wa,"↑","\\uparrow",!0),Ra(za,La,Wa,"⇑","\\Uparrow",!0),Ra(za,La,Wa,"↓","\\downarrow",!0),Ra(za,La,Wa,"⇓","\\Downarrow",!0),Ra(za,La,Wa,"↕","\\updownarrow",!0),Ra(za,La,Wa,"⇕","\\Updownarrow",!0),Ra(za,La,Va,"∐","\\coprod"),Ra(za,La,Va,"⋁","\\bigvee"),Ra(za,La,Va,"⋀","\\bigwedge"),Ra(za,La,Va,"⨄","\\biguplus"),Ra(za,La,Va,"⋂","\\bigcap"),Ra(za,La,Va,"⋃","\\bigcup"),Ra(za,La,Va,"∫","\\int"),Ra(za,La,Va,"∫","\\intop"),Ra(za,La,Va,"∬","\\iint"),Ra(za,La,Va,"∭","\\iiint"),Ra(za,La,Va,"∏","\\prod"),Ra(za,La,Va,"∑","\\sum"),Ra(za,La,Va,"⨂","\\bigotimes"),Ra(za,La,Va,"⨁","\\bigoplus"),Ra(za,La,Va,"⨀","\\bigodot"),Ra(za,La,Va,"∮","\\oint"),Ra(za,La,Va,"∯","\\oiint"),Ra(za,La,Va,"∰","\\oiiint"),Ra(za,La,Va,"⨆","\\bigsqcup"),Ra(za,La,Va,"∫","\\smallint"),Ra(Ia,La,Ha,"…","\\textellipsis"),Ra(za,La,Ha,"…","\\mathellipsis"),Ra(Ia,La,Ha,"…","\\ldots",!0),Ra(za,La,Ha,"…","\\ldots",!0),Ra(za,La,Ha,"⋯","\\@cdots",!0),Ra(za,La,Ha,"⋱","\\ddots",!0),Ra(za,La,Ga,"⋮","\\varvdots"),Ra(za,La,Pa,"ˊ","\\acute"),Ra(za,La,Pa,"ˋ","\\grave"),Ra(za,La,Pa,"¨","\\ddot"),Ra(za,La,Pa,"~","\\tilde"),Ra(za,La,Pa,"ˉ","\\bar"),Ra(za,La,Pa,"˘","\\breve"),Ra(za,La,Pa,"ˇ","\\check"),Ra(za,La,Pa,"^","\\hat"),Ra(za,La,Pa,"⃗","\\vec"),Ra(za,La,Pa,"˙","\\dot"),Ra(za,La,Pa,"˚","\\mathring"),Ra(za,La,$a,"","\\@imath"),Ra(za,La,$a,"","\\@jmath"),Ra(za,La,Ga,"ı","ı"),Ra(za,La,Ga,"ȷ","ȷ"),Ra(Ia,La,Ga,"ı","\\i",!0),Ra(Ia,La,Ga,"ȷ","\\j",!0),Ra(Ia,La,Ga,"ß","\\ss",!0),Ra(Ia,La,Ga,"æ","\\ae",!0),Ra(Ia,La,Ga,"œ","\\oe",!0),Ra(Ia,La,Ga,"ø","\\o",!0),Ra(Ia,La,Ga,"Æ","\\AE",!0),Ra(Ia,La,Ga,"Œ","\\OE",!0),Ra(Ia,La,Ga,"Ø","\\O",!0),Ra(Ia,La,Pa,"ˊ","\\'"),Ra(Ia,La,Pa,"ˋ","\\`"),Ra(Ia,La,Pa,"ˆ","\\^"),Ra(Ia,La,Pa,"˜","\\~"),Ra(Ia,La,Pa,"ˉ","\\="),Ra(Ia,La,Pa,"˘","\\u"),Ra(Ia,La,Pa,"˙","\\."),Ra(Ia,La,Pa,"¸","\\c"),Ra(Ia,La,Pa,"˚","\\r"),Ra(Ia,La,Pa,"ˇ","\\v"),Ra(Ia,La,Pa,"¨",'\\"'),Ra(Ia,La,Pa,"˝","\\H"),Ra(Ia,La,Pa,"◯","\\textcircled");var Za={"--":!0,"---":!0,"``":!0,"''":!0};Ra(Ia,La,Ga,"–","--",!0),Ra(Ia,La,Ga,"–","\\textendash"),Ra(Ia,La,Ga,"—","---",!0),Ra(Ia,La,Ga,"—","\\textemdash"),Ra(Ia,La,Ga,"‘","`",!0),Ra(Ia,La,Ga,"‘","\\textquoteleft"),Ra(Ia,La,Ga,"’","'",!0),Ra(Ia,La,Ga,"’","\\textquoteright"),Ra(Ia,La,Ga,"“","``",!0),Ra(Ia,La,Ga,"“","\\textquotedblleft"),Ra(Ia,La,Ga,"”","''",!0),Ra(Ia,La,Ga,"”","\\textquotedblright"),Ra(za,La,Ga,"°","\\degree",!0),Ra(Ia,La,Ga,"°","\\degree"),Ra(Ia,La,Ga,"°","\\textdegree",!0),Ra(za,La,Ga,"£","\\pounds"),Ra(za,La,Ga,"£","\\mathsterling",!0),Ra(Ia,La,Ga,"£","\\pounds"),Ra(Ia,La,Ga,"£","\\textsterling",!0),Ra(za,Da,Ga,"✠","\\maltese"),Ra(Ia,Da,Ga,"✠","\\maltese");for(var Xa='0123456789/@."',Ya=0;Ya<14;Ya++){var Qa=Xa.charAt(Ya);Ra(za,La,Ga,Qa,Qa)}for(var Ja='0123456789!@*()-=+";:?/.,',eo=0;eo<25;eo++){var to=Ja.charAt(eo);Ra(Ia,La,Ga,to,to)}for(var ro="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",no=0;no<52;no++){var ao=ro.charAt(no);Ra(za,La,$a,ao,ao),Ra(Ia,La,Ga,ao,ao)}Ra(za,Da,Ga,"C","ℂ"),Ra(Ia,Da,Ga,"C","ℂ"),Ra(za,Da,Ga,"H","ℍ"),Ra(Ia,Da,Ga,"H","ℍ"),Ra(za,Da,Ga,"N","ℕ"),Ra(Ia,Da,Ga,"N","ℕ"),Ra(za,Da,Ga,"P","ℙ"),Ra(Ia,Da,Ga,"P","ℙ"),Ra(za,Da,Ga,"Q","ℚ"),Ra(Ia,Da,Ga,"Q","ℚ"),Ra(za,Da,Ga,"R","ℝ"),Ra(Ia,Da,Ga,"R","ℝ"),Ra(za,Da,Ga,"Z","ℤ"),Ra(Ia,Da,Ga,"Z","ℤ"),Ra(za,La,$a,"h","ℎ"),Ra(Ia,La,$a,"h","ℎ");for(var oo="",io=0;io<52;io++){var lo=ro.charAt(io);Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56320+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56372+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56424+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56580+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56684+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56736+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56788+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56840+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56944+io)),Ra(Ia,La,Ga,lo,oo),io<26&&(Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56632+io)),Ra(Ia,La,Ga,lo,oo),Ra(za,La,$a,lo,oo=String.fromCharCode(55349,56476+io)),Ra(Ia,La,Ga,lo,oo))}Ra(za,La,$a,"k",oo=String.fromCharCode(55349,56668)),Ra(Ia,La,Ga,"k",oo);for(var so=0;so<10;so++){var co=so.toString();Ra(za,La,$a,co,oo=String.fromCharCode(55349,57294+so)),Ra(Ia,La,Ga,co,oo),Ra(za,La,$a,co,oo=String.fromCharCode(55349,57314+so)),Ra(Ia,La,Ga,co,oo),Ra(za,La,$a,co,oo=String.fromCharCode(55349,57324+so)),Ra(Ia,La,Ga,co,oo),Ra(za,La,$a,co,oo=String.fromCharCode(55349,57334+so)),Ra(Ia,La,Ga,co,oo)}for(var uo="ÐÞþ",ho=0;ho<3;ho++){var mo=uo.charAt(ho);Ra(za,La,$a,mo,mo),Ra(Ia,La,Ga,mo,mo)}var po=[["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"]],fo=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],go=function(e,t,r){return Oa[r][e]&&Oa[r][e].replace&&(e=Oa[r][e].replace),{value:e,metrics:ia(e,t,r)}},vo=function(e,t,r,n,a){var o,i=go(e,t,r),l=i.metrics;if(e=i.value,l){var s=l.italic;("text"===r||n&&"mathit"===n.font)&&(s=0),o=new Ta(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 '"+r+"'"),o=new Ta(e,0,0,0,0,0,a);if(n){o.maxFontSize=n.sizeMultiplier,n.style.isTight()&&o.classes.push("mtight");var c=n.getColor();c&&(o.style.color=c)}return o},bo=(e,t)=>{if(va(e.classes)!==va(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var a in t.style)if(t.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;return!0},yo=function(e){for(var t=0,r=0,n=0,a=0;a<e.children.length;a++){var o=e.children[a];o.height>t&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=n},wo=function(e,t,r,n){var a=new xa(e,t,r,n);return yo(a),a},xo=(e,t,r,n)=>new xa(e,t,r,n),ko=function(e){var t=new ra(e);return yo(t),t},Eo=function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},So={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"}},To={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Bo={fontMap:So,makeSymbol:vo,mathsym:function(e,t,r,n){return void 0===n&&(n=[]),"boldsymbol"===r.font&&go(e,"Main-Bold",t).metrics?vo(e,"Main-Bold",t,r,n.concat(["mathbf"])):"\\"===e||"main"===Oa[t][e].font?vo(e,"Main-Regular",t,r,n):vo(e,"AMS-Regular",t,r,n.concat(["amsrm"]))},makeSpan:wo,makeSvgSpan:xo,makeLineSpan:function(e,t,r){var n=wo([e],[],t);return n.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=ga(n.height),n.maxFontSize=1,n},makeAnchor:function(e,t,r,n){var a=new ka(e,t,r,n);return yo(a),a},makeFragment:ko,wrapFragment:function(e,t){return e instanceof ra?wo([],[e],t):e},makeVList:function(e,t){for(var{children:r,depth:n}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,a=n,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,r.push({type:"kern",size:l}),r.push(t[o])}return{children:r,depth:n}}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 h=e.children[0];if("elem"!==h.type)throw new Error('First child must have type "elem".');if("shift"===e.positionType)s=-h.elem.depth-e.positionData;else{if("firstBaseline"!==e.positionType)throw new Error("Invalid positionType "+e.positionType+".");s=-h.elem.depth}}return{children:e.children,depth:s}}(e),a=0,o=0;o<r.length;o++){var i=r[o];if("elem"===i.type){var l=i.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var s=wo(["pstrut"],[]);s.style.height=ga(a);for(var c=[],d=n,u=n,h=n,m=0;m<r.length;m++){var p=r[m];if("kern"===p.type)h+=p.size;else{var f=p.elem,g=p.wrapperClasses||[],v=p.wrapperStyle||{},b=wo(g,[s,f],void 0,v);b.style.top=ga(-a-h-f.depth),p.marginLeft&&(b.style.marginLeft=p.marginLeft),p.marginRight&&(b.style.marginRight=p.marginRight),c.push(b),h+=f.height+f.depth}d=Math.min(d,h),u=Math.max(u,h)}var y,w=wo(["vlist"],c);if(w.style.height=ga(u),d<0){var x=wo([],[]),k=wo(["vlist"],[x]);k.style.height=ga(-d);var E=wo(["vlist-s"],[new Ta("​")]);y=[wo(["vlist-r"],[w,E]),wo(["vlist-r"],[k])]}else y=[wo(["vlist-r"],[w])];var S=wo(["vlist-t"],y);return 2===y.length&&S.classes.push("vlist-t2"),S.height=u,S.depth=-d,S},makeOrd:function(e,t,r){var n=e.mode,a=e.text,o=["mord"],i="math"===n||"text"===n&&t.font,l=i?t.font:t.fontFamily,s="",c="";if(55349===a.charCodeAt(0)&&([s,c]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,n="math"===t?0:1;if(119808<=r&&r<120484){var a=Math.floor((r-119808)/26);return[po[a][2],po[a][n]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[fo[o][2],fo[o][n]]}if(120485===r||120486===r)return[po[0][2],po[0][n]];if(120486<r&&r<120782)return["",""];throw new Rn("Unsupported character: "+e)}(a,n)),s.length>0)return vo(a,s,n,t,o.concat(c));if(l){var d,u;if("boldsymbol"===l){var h=function(e,t,r,n,a){return"textord"!==a&&go(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(a,n,0,0,r);d=h.fontName,u=[h.fontClass]}else i?(d=So[l].fontName,u=[l]):(d=Eo(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(go(a,d,n).metrics)return vo(a,d,n,t,o.concat(u));if(Za.hasOwnProperty(a)&&"Typewriter"===d.slice(0,10)){for(var m=[],p=0;p<a.length;p++)m.push(vo(a[p],d,n,t,o.concat(u)));return ko(m)}}if("mathord"===r)return vo(a,"Math-Italic",n,t,o.concat(["mathnormal"]));if("textord"===r){var f=Oa[n][a]&&Oa[n][a].font;if("ams"===f){var g=Eo("amsrm",t.fontWeight,t.fontShape);return vo(a,g,n,t,o.concat("amsrm",t.fontWeight,t.fontShape))}if("main"!==f&&f){var v=Eo(f,t.fontWeight,t.fontShape);return vo(a,v,n,t,o.concat(v,t.fontWeight,t.fontShape))}var b=Eo("textrm",t.fontWeight,t.fontShape);return vo(a,b,n,t,o.concat(t.fontWeight,t.fontShape))}throw new Error("unexpected type: "+r+" in makeOrd")},makeGlue:(e,t)=>{var r=wo(["mspace"],[],t),n=fa(e,t);return r.style.marginRight=ga(n),r},staticSvg:function(e,t){var[r,n,a]=To[e],o=new Ca(r),i=new Ba([o],{width:ga(n),height:ga(a),style:"width:"+ga(n),viewBox:"0 0 "+1e3*n+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=xo(["overlay"],[i],t);return l.height=a,l.style.height=ga(a),l.style.width=ga(n),l},svgData:To,tryCombineChars:e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof Ta&&n instanceof Ta&&bo(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e}},Co={number:3,unit:"mu"},_o={number:4,unit:"mu"},No={number:5,unit:"mu"},Mo={mord:{mop:Co,mbin:_o,mrel:No,minner:Co},mop:{mord:Co,mop:Co,mrel:No,minner:Co},mbin:{mord:_o,mop:_o,mopen:_o,minner:_o},mrel:{mord:No,mop:No,mopen:No,minner:No},mopen:{},mclose:{mop:Co,mbin:_o,mrel:No,minner:Co},mpunct:{mord:Co,mop:Co,mrel:No,mopen:Co,mclose:Co,mpunct:Co,minner:Co},minner:{mord:Co,mop:Co,mbin:_o,mrel:No,mopen:Co,mpunct:Co,minner:Co}},Ao={mord:{mop:Co},mop:{mord:Co,mop:Co},mbin:{},mrel:{},mopen:{},mclose:{mop:Co},mpunct:{},minner:{mop:Co}},Oo={},Ro={},zo={};function Io(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},s=0;s<r.length;++s)Oo[r[s]]=l;t&&(o&&(Ro[t]=o),i&&(zo[t]=i))}function Lo(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;Io({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var Do=function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},Po=function(e){return"ordgroup"===e.type?e.body:[e]},Fo=Bo.makeSpan,qo=["leftmost","mbin","mopen","mrel","mop","mpunct"],Ho=["rightmost","mrel","mclose","mpunct"],$o={display:Xn.DISPLAY,text:Xn.TEXT,script:Xn.SCRIPT,scriptscript:Xn.SCRIPTSCRIPT},Vo={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Uo=function(e,t,r,n){void 0===n&&(n=[null,null]);for(var a=[],o=0;o<e.length;o++){var i=Xo(e[o],t);if(i instanceof ra){var l=i.children;a.push(...l)}else a.push(i)}if(Bo.tryCombineChars(a),!r)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($o[c.style]))}var d=Fo([n[0]||"leftmost"],[],t),u=Fo([n[1]||"rightmost"],[],t),h="root"===r;return jo(a,((e,t)=>{var r=t.classes[0],n=e.classes[0];"mbin"===r&&Pn.contains(Ho,n)?t.classes[0]="mord":"mbin"===n&&Pn.contains(qo,r)&&(e.classes[0]="mord")}),{node:d},u,h),jo(a,((e,t)=>{var r=Go(t),n=Go(e),a=r&&n?e.hasClass("mtight")?Ao[r][n]:Mo[r][n]:null;if(a)return Bo.makeGlue(a,s)}),{node:d},u,h),a},jo=function e(t,r,n,a,o){a&&t.push(a);for(var i=0;i<t.length;i++){var l=t[i],s=Wo(l);if(s)e(s.children,r,n,null,o);else{var c=!l.hasClass("mspace");if(c){var d=r(l,n.node);d&&(n.insertAfter?n.insertAfter(d):(t.unshift(d),i++))}c?n.node=l:o&&l.hasClass("newline")&&(n.node=Fo(["leftmost"])),n.insertAfter=(e=>r=>{t.splice(e+1,0,r),i++})(i)}}a&&t.pop()},Wo=function(e){return e instanceof ra||e instanceof ka||e instanceof xa&&e.hasClass("enclosing")?e:null},Ko=function e(t,r){var n=Wo(t);if(n){var a=n.children;if(a.length){if("right"===r)return e(a[a.length-1],"right");if("left"===r)return e(a[0],"left")}}return t},Go=function(e,t){return e?(t&&(e=Ko(e,t)),Vo[e.classes[0]]||null):null},Zo=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Fo(t.concat(r))},Xo=function(e,t,r){if(!e)return Fo();if(Ro[e.type]){var n=Ro[e.type](e,t);if(r&&t.size!==r.size){n=Fo(t.sizingClasses(r),[n],t);var a=t.sizeMultiplier/r.sizeMultiplier;n.height*=a,n.depth*=a}return n}throw new Rn("Got group of unknown type: '"+e.type+"'")};function Yo(e,t){var r=Fo(["base"],e,t),n=Fo(["strut"]);return n.style.height=ga(r.height+r.depth),r.depth&&(n.style.verticalAlign=ga(-r.depth)),r.children.unshift(n),r}function Qo(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var n,a=Uo(e,t,"root");2===a.length&&a[1].hasClass("tag")&&(n=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(Yo(l,t)),l=[])}else a[s].hasClass("newline")&&(l.pop(),l.length>0&&(i.push(Yo(l,t)),l=[]),i.push(a[s]));l.length>0&&i.push(Yo(l,t)),r?((o=Yo(Uo(r,t,!0))).classes=["tag"],i.push(o)):n&&i.push(n);var d=Fo(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),o){var u=o.children[0];u.style.height=ga(d.height+d.depth),d.depth&&(u.style.verticalAlign=ga(-d.depth))}return d}function Jo(e){return new ra(e)}class ei{constructor(e,t,r){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=r||[]}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=va(this.classes));for(var r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){var e="<"+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="',e+=Pn.escape(this.attributes[t]),e+='"');this.classes.length>0&&(e+=' class ="'+Pn.escape(va(this.classes))+'"'),e+=">";for(var r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e+="</"+this.type+">"}toText(){return this.children.map((e=>e.toText())).join("")}}class ti{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Pn.escape(this.toText())}toText(){return this.text}}var ri={MathNode:ei,TextNode:ti,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",ga(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+ga(this.width)+'"/>'}toText(){return this.character?this.character:" "}},newDocumentFragment:Jo},ni=function(e,t,r){return!Oa[t][e]||!Oa[t][e].replace||55349===e.charCodeAt(0)||Za.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=Oa[t][e].replace),new ri.TextNode(e)},ai=function(e){return 1===e.length?e[0]:new ri.MathNode("mrow",e)},oi=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 r=t.font;if(!r||"mathnormal"===r)return null;var n=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var a=e.text;return Pn.contains(["\\imath","\\jmath"],a)?null:(Oa[n][a]&&Oa[n][a].replace&&(a=Oa[n][a].replace),ia(a,Bo.fontMap[r].fontName,n)?Bo.fontMap[r].variant:null)},ii=function(e,t,r){if(1===e.length){var n=si(e[0],t);return r&&n instanceof ei&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var a,o=[],i=0;i<e.length;i++){var l=si(e[i],t);if(l instanceof ei&&a instanceof ei){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 ti&&"."===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 ti&&"̸"===c.text&&("mo"===l.type||"mi"===l.type||"mn"===l.type)){var d=l.children[0];d instanceof ti&&d.text.length>0&&(d.text=d.text.slice(0,1)+"̸"+d.text.slice(1),o.pop())}}}o.push(l),a=l}return o},li=function(e,t,r){return ai(ii(e,t,r))},si=function(e,t){if(!e)return new ri.MathNode("mrow");if(zo[e.type])return zo[e.type](e,t);throw new Rn("Got group of unknown type: '"+e.type+"'")};function ci(e,t,r,n,a){var o,i=ii(e,r);o=1===i.length&&i[0]instanceof ei&&Pn.contains(["mrow","mtable"],i[0].type)?i[0]:new ri.MathNode("mrow",i);var l=new ri.MathNode("annotation",[new ri.TextNode(t)]);l.setAttribute("encoding","application/x-tex");var s=new ri.MathNode("semantics",[o,l]),c=new ri.MathNode("math",[s]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var d=a?"katex":"katex-mathml";return Bo.makeSpan([d],[c])}var di=function(e){return new ua({style:e.displayMode?Xn.DISPLAY:Xn.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},ui=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Bo.makeSpan(r,[e])}return e},hi={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":"="},mi={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]},pi=function(e,t,r,n,a){var o,i=e.height+e.depth+r+n;if(/fbox|color|angl/.test(t)){if(o=Bo.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 _a({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&s.push(new _a({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var c=new Ba(s,{width:"100%",height:ga(i)});o=Bo.makeSvgSpan([],[c],a)}return o.height=i,o.style.height=ga(i),o},fi=function(e){var t=new ri.MathNode("mo",[new ri.TextNode(hi[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},gi=function(e,t){var{span:r,minWidth:n,height:a}=function(){var r=4e5,n=e.label.slice(1);if(Pn.contains(["widehat","widecheck","widetilde","utilde"],n)){var a,o,i,l="ordgroup"===(m=e.base).type?m.body.length:1;if(l>5)"widehat"===n||"widecheck"===n?(a=420,r=2364,i=.42,o=n+"4"):(a=312,r=2340,i=.34,o="tilde4");else{var s=[1,1,2,2,3,3][l];"widehat"===n||"widecheck"===n?(r=[0,1062,2364,2364,2364][s],a=[0,239,300,360,420][s],i=[0,.24,.3,.3,.36,.42][s],o=n+s):(r=[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 Ca(o),d=new Ba([c],{width:"100%",height:ga(i),viewBox:"0 0 "+r+" "+a,preserveAspectRatio:"none"});return{span:Bo.makeSvgSpan([],[d],t),minWidth:0,height:i}}var u,h,m,p=[],f=mi[n],[g,v,b]=f,y=b/1e3,w=g.length;if(1===w)u=["hide-tail"],h=[f[3]];else if(2===w)u=["halfarrow-left","halfarrow-right"],h=["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"],h=["xMinYMin","xMidYMin","xMaxYMin"]}for(var x=0;x<w;x++){var k=new Ca(g[x]),E=new Ba([k],{width:"400em",height:ga(y),viewBox:"0 0 "+r+" "+b,preserveAspectRatio:h[x]+" slice"}),S=Bo.makeSvgSpan([u[x]],[E],t);if(1===w)return{span:S,minWidth:v,height:y};S.style.height=ga(y),p.push(S)}return{span:Bo.makeSpan(["stretchy"],p,t),minWidth:v,height:y}}();return r.height=a,r.style.height=ga(a),n>0&&(r.style.minWidth=ga(n)),r};function vi(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 bi(e){var t=yi(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 yi(e){return e&&("atom"===e.type||Aa.hasOwnProperty(e.type))?e:null}var wi=(e,t)=>{var r,n,a;e&&"supsub"===e.type?(r=(n=vi(e.base,"accent")).base,e.base=r,a=function(e){if(e instanceof xa)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}(Xo(e,t)),e.base=n):r=(n=vi(e,"accent")).base;var o=Xo(r,t.havingCrampedStyle()),i=0;if(n.isShifty&&Pn.isCharacterBox(r)){var l=Pn.getBaseElem(r);i=Na(Xo(l,t.havingCrampedStyle())).skew}var s,c="\\c"===n.label,d=c?o.height+o.depth:Math.min(o.height,t.fontMetrics().xHeight);if(n.isStretchy)s=gi(n,t),s=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"elem",elem:s,wrapperClasses:["svg-align"],wrapperStyle:i>0?{width:"calc(100% - "+ga(2*i)+")",marginLeft:ga(2*i)}:void 0}]},t);else{var u,h;"\\vec"===n.label?(u=Bo.staticSvg("vec",t),h=Bo.svgData.vec[1]):((u=Na(u=Bo.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,h=u.width,c&&(d+=u.depth)),s=Bo.makeSpan(["accent-body"],[u]);var m="\\textcircled"===n.label;m&&(s.classes.push("accent-full"),d=o.height);var p=i;m||(p-=h/2),s.style.left=ga(p),"\\textcircled"===n.label&&(s.style.top=".2em"),s=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:-d},{type:"elem",elem:s}]},t)}var f=Bo.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},xi=(e,t)=>{var r=e.isStretchy?fi(e.label):new ri.MathNode("mo",[ni(e.label,e.mode)]),n=new ri.MathNode("mover",[si(e.base,t),r]);return n.setAttribute("accent","true"),n},ki=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((e=>"\\"+e)).join("|"));Io({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 r=Do(t[0]),n=!ki.test(e.funcName),a=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:a,base:r}},htmlBuilder:wi,mathmlBuilder:xi}),Io({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:wi,mathmlBuilder:xi}),Io({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},htmlBuilder:(e,t)=>{var r=Xo(e.base,t),n=gi(e,t),a="\\utilde"===e.label?.12:0,o=Bo.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]},t);return Bo.makeSpan(["mord","accentunder"],[o],t)},mathmlBuilder:(e,t)=>{var r=fi(e.label),n=new ri.MathNode("munder",[si(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var Ei=e=>{var t=new ri.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Io({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,r){var{parser:n,funcName:a}=e;return{type:"xArrow",mode:n.mode,label:a,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,n=t.style,a=t.havingStyle(n.sup()),o=Bo.wrapFragment(Xo(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(n.sub()),(r=Bo.wrapFragment(Xo(e.below,a,t),t)).classes.push(i+"-arrow-pad"));var l,s=gi(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),r){var u=-t.fontMetrics().axisHeight+r.height+.5*s.height+.111;l=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d},{type:"elem",elem:s,shift:c},{type:"elem",elem:r,shift:u}]},t)}else l=Bo.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"),Bo.makeSpan(["mrel","x-arrow"],[l],t)},mathmlBuilder(e,t){var r,n=fi(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var a=Ei(si(e.body,t));if(e.below){var o=Ei(si(e.below,t));r=new ri.MathNode("munderover",[n,o,a])}else r=new ri.MathNode("mover",[n,a])}else if(e.below){var i=Ei(si(e.below,t));r=new ri.MathNode("munder",[n,i])}else r=Ei(),r=new ri.MathNode("mover",[n,r]);return r}});var Si=Bo.makeSpan;function Ti(e,t){var r=Uo(e.body,t,!0);return Si([e.mclass],r,t)}function Bi(e,t){var r,n=ii(e.body,t);return"minner"===e.mclass?r=new ri.MathNode("mpadded",n):"mord"===e.mclass?e.isCharacterBox?(r=n[0]).type="mi":r=new ri.MathNode("mi",n):(e.isCharacterBox?(r=n[0]).type="mo":r=new ri.MathNode("mo",n),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Io({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Po(a),isCharacterBox:Pn.isCharacterBox(a)}},htmlBuilder:Ti,mathmlBuilder:Bi});var Ci=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};Io({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:Ci(t[0]),body:Po(t[1]),isCharacterBox:Pn.isCharacterBox(t[1])}}}),Io({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:n,funcName:a}=e,o=t[1],i=t[0];r="\\stackrel"!==a?Ci(o):"mrel";var l={type:"op",mode:o.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==a,body:Po(o)},s={type:"supsub",mode:i.mode,base:l,sup:"\\underset"===a?null:i,sub:"\\underset"===a?i:null};return{type:"mclass",mode:n.mode,mclass:r,body:[s],isCharacterBox:Pn.isCharacterBox(s)}},htmlBuilder:Ti,mathmlBuilder:Bi}),Io({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:Ci(t[0]),body:Po(t[0])}},htmlBuilder(e,t){var r=Uo(e.body,t,!0),n=Bo.makeSpan([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=ii(e.body,t),n=new ri.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var _i={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ni=e=>"textord"===e.type&&"@"===e.text;function Mi(e,t,r){var n=_i[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var a={type:"atom",text:n,mode:"math",family:"rel"},o={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[a],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[o],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}Io({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Bo.wrapFragment(Xo(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=ga(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new ri.MathNode("mrow",[si(e.label,t)]);return(r=new ri.MathNode("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new ri.MathNode("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Io({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Bo.wrapFragment(Xo(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new ri.MathNode("mrow",[si(e.fragment,t)])}),Io({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=vi(t[0],"ordgroup").body,a="",o=0;o<n.length;o++){a+=vi(n[o],"textord").text}var i,l=parseInt(a);if(isNaN(l))throw new Rn("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new Rn("\\@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:r.mode,text:i}}});var Ai=(e,t)=>{var r=Uo(e.body,t.withColor(e.color),!1);return Bo.makeFragment(r)},Oi=(e,t)=>{var r=ii(e.body,t.withColor(e.color)),n=new ri.MathNode("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Io({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=vi(t[0],"color-token").color,a=t[1];return{type:"color",mode:r.mode,color:n,body:Po(a)}},htmlBuilder:Ai,mathmlBuilder:Oi}),Io({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,a=vi(t[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var o=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:o}},htmlBuilder:Ai,mathmlBuilder:Oi}),Io({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,a="["===n.gullet.future().text?n.parseSizeGroup(!0):null,o=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:o,size:a&&vi(a,"size").value}},htmlBuilder(e,t){var r=Bo.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=ga(fa(e.size,t)))),r},mathmlBuilder(e,t){var r=new ri.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",ga(fa(e.size,t)))),r}});var Ri={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},zi=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Rn("Expected a control sequence",e);return t},Ii=(e,t,r,n)=>{var a=e.gullet.macros.get(r.text);null==a&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,a,n)};Io({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(Ri[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=Ri[n.text]),vi(t.parseFunction(),"internal");throw new Rn("Invalid token after macro prefix",n)}}),Io({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new Rn("Expected a control sequence",n);for(var o,i=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[i].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Rn('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new Rn('Argument number "'+n.text+'" out of order');i++,l.push([])}else{if("EOF"===n.text)throw new Rn("Expected a macro definition");l[i].push(n.text)}var{tokens:s}=t.gullet.consumeArg();return o&&s.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(s=t.gullet.expandTokens(s)).reverse(),t.gullet.macros.set(a,{tokens:s,numArgs:i,delimiters:l},r===Ri[r]),{type:"internal",mode:t.mode}}}),Io({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=zi(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 Ii(t,n,a,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),Io({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=zi(t.gullet.popToken()),a=t.gullet.popToken(),o=t.gullet.popToken();return Ii(t,n,o,"\\\\globalfuture"===r),t.gullet.pushToken(o),t.gullet.pushToken(a),{type:"internal",mode:t.mode}}});var Li=function(e,t,r){var n=ia(Oa.math[e]&&Oa.math[e].replace||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},Di=function(e,t,r,n){var a=r.havingBaseStyle(t),o=Bo.makeSpan(n.concat(a.sizingClasses(r)),[e],r),i=a.sizeMultiplier/r.sizeMultiplier;return o.height*=i,o.depth*=i,o.maxFontSize=a.sizeMultiplier,o},Pi=function(e,t,r){var n=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=ga(a),e.height-=a,e.depth+=a},Fi=function(e,t,r,n,a,o){var i=function(e,t,r,n){return Bo.makeSymbol(e,"Size"+t+"-Regular",r,n)}(e,t,a,n),l=Di(Bo.makeSpan(["delimsizing","size"+t],[i],n),Xn.TEXT,n,o);return r&&Pi(l,n,Xn.TEXT),l},qi=function(e,t,r){var n;return n="Size1-Regular"===t?"delim-size1":"delim-size4",{type:"elem",elem:Bo.makeSpan(["delimsizinginner",n],[Bo.makeSpan([],[Bo.makeSymbol(e,t,r)])])}},Hi=function(e,t,r){var n=na["Size4-Regular"][e.charCodeAt(0)]?na["Size4-Regular"][e.charCodeAt(0)][4]:na["Size1-Regular"][e.charCodeAt(0)][4],a=new Ca("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 Ba([a],{width:ga(n),height:ga(t),style:"width:"+ga(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),i=Bo.makeSvgSpan([],[o],r);return i.height=t,i.style.height=ga(t),i.style.width=ga(n),{type:"elem",elem:i}},$i={type:"kern",size:-.008},Vi=["|","\\lvert","\\rvert","\\vert"],Ui=["\\|","\\lVert","\\rVert","\\Vert"],ji=function(e,t,r,n,a,o){var i,l,s,c,d="",u=0;i=s=c=e,l=null;var h="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"):Pn.contains(Vi,e)?(s="∣",d="vert",u=333):Pn.contains(Ui,e)?(s="∥",d="doublevert",u=556):"["===e||"\\lbrack"===e?(i="⎡",s="⎢",c="⎣",h="Size4-Regular",d="lbrack",u=667):"]"===e||"\\rbrack"===e?(i="⎤",s="⎥",c="⎦",h="Size4-Regular",d="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(s=i="⎢",c="⎣",h="Size4-Regular",d="lfloor",u=667):"\\lceil"===e||"⌈"===e?(i="⎡",s=c="⎢",h="Size4-Regular",d="lceil",u=667):"\\rfloor"===e||"⌋"===e?(s=i="⎥",c="⎦",h="Size4-Regular",d="rfloor",u=667):"\\rceil"===e||"⌉"===e?(i="⎤",s=c="⎥",h="Size4-Regular",d="rceil",u=667):"("===e||"\\lparen"===e?(i="⎛",s="⎜",c="⎝",h="Size4-Regular",d="lparen",u=875):")"===e||"\\rparen"===e?(i="⎞",s="⎟",c="⎠",h="Size4-Regular",d="rparen",u=875):"\\{"===e||"\\lbrace"===e?(i="⎧",l="⎨",c="⎩",s="⎪",h="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(i="⎫",l="⎬",c="⎭",s="⎪",h="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(i="⎧",c="⎩",s="⎪",h="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(i="⎫",c="⎭",s="⎪",h="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(i="⎧",c="⎭",s="⎪",h="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(i="⎫",c="⎩",s="⎪",h="Size4-Regular");var m=Li(i,h,a),p=m.height+m.depth,f=Li(s,h,a),g=f.height+f.depth,v=Li(c,h,a),b=v.height+v.depth,y=0,w=1;if(null!==l){var x=Li(l,h,a);y=x.height+x.depth,w=2}var k=p+b+y,E=k+Math.max(0,Math.ceil((t-k)/(w*g)))*w*g,S=n.fontMetrics().axisHeight;r&&(S*=n.sizeMultiplier);var T=E/2-S,B=[];if(d.length>0){var C=E-p-b,_=Math.round(1e3*E),N=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 Ca(d,N),A=(u/1e3).toFixed(3)+"em",O=(_/1e3).toFixed(3)+"em",R=new Ba([M],{width:A,height:O,viewBox:"0 0 "+u+" "+_}),z=Bo.makeSvgSpan([],[R],n);z.height=_/1e3,z.style.width=A,z.style.height=O,B.push({type:"elem",elem:z})}else{if(B.push(qi(c,h,a)),B.push($i),null===l){var I=E-p-b+.016;B.push(Hi(s,I,n))}else{var L=(E-p-b-y)/2+.016;B.push(Hi(s,L,n)),B.push($i),B.push(qi(l,h,a)),B.push($i),B.push(Hi(s,L,n))}B.push($i),B.push(qi(i,h,a))}var D=n.havingBaseStyle(Xn.TEXT),P=Bo.makeVList({positionType:"bottom",positionData:T,children:B},D);return Di(Bo.makeSpan(["delimsizing","mult"],[P],D),Xn.TEXT,n,o)},Wi=.08,Ki=function(e,t,r,n,a){var o=function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=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,ea);break;case"sqrtSize1":n=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,ea);break;case"sqrtSize2":n=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,ea);break;case"sqrtSize3":n=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,ea);break;case"sqrtSize4":n=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,ea);break;case"sqrtTall":n=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-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,ea,r)}return n}(e,n,r),i=new Ca(e,o),l=new Ba([i],{width:"400em",height:ga(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Bo.makeSvgSpan(["hide-tail"],[l],a)},Gi=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],Zi=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Xi=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Yi=[0,1.2,1.8,2.4,3],Qi=[{type:"small",style:Xn.SCRIPTSCRIPT},{type:"small",style:Xn.SCRIPT},{type:"small",style:Xn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ji=[{type:"small",style:Xn.SCRIPTSCRIPT},{type:"small",style:Xn.SCRIPT},{type:"small",style:Xn.TEXT},{type:"stack"}],el=[{type:"small",style:Xn.SCRIPTSCRIPT},{type:"small",style:Xn.SCRIPT},{type:"small",style:Xn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],tl=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.")},rl=function(e,t,r,n){for(var a=Math.min(2,3-n.style.size);a<r.length&&"stack"!==r[a].type;a++){var o=Li(e,tl(r[a]),"math"),i=o.height+o.depth;if("small"===r[a].type&&(i*=n.havingBaseStyle(r[a].style).sizeMultiplier),i>t)return r[a]}return r[r.length-1]},nl=function(e,t,r,n,a,o){var i;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),i=Pn.contains(Xi,e)?Qi:Pn.contains(Gi,e)?el:Ji;var l=rl(e,t,i,n);return"small"===l.type?function(e,t,r,n,a,o){var i=Bo.makeSymbol(e,"Main-Regular",a,n),l=Di(i,t,n,o);return r&&Pi(l,n,t),l}(e,l.style,r,n,a,o):"large"===l.type?Fi(e,l.size,r,n,a,o):ji(e,t,r,n,a,o)},al={sqrtImage:function(e,t){var r,n,a=t.havingBaseSizing(),o=rl("\\surd",e*a.sizeMultiplier,el,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,(r=Ki("sqrtMain",s=(1+l+Wi)/i,d=1e3+1e3*l+80,l,t)).style.minWidth="0.853em",n=.833/i):"large"===o.type?(d=1080*Yi[o.size],c=(Yi[o.size]+l)/i,s=(Yi[o.size]+l+Wi)/i,(r=Ki("sqrtSize"+o.size,s,d,l,t)).style.minWidth="1.02em",n=1/i):(s=e+l+Wi,c=e+l,d=Math.floor(1e3*e+l)+80,(r=Ki("sqrtTall",s,d,l,t)).style.minWidth="0.742em",n=1.056),r.height=c,r.style.height=ga(s),{span:r,advanceWidth:n,ruleWidth:(t.fontMetrics().sqrtRuleThickness+l)*i}},sizedDelim:function(e,t,r,n,a){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Pn.contains(Gi,e)||Pn.contains(Xi,e))return Fi(e,t,!1,r,n,a);if(Pn.contains(Zi,e))return ji(e,Yi[t],!1,r,n,a);throw new Rn("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:Yi,customSizedDelim:nl,leftRightDelim:function(e,t,r,n,a,o){var i=n.fontMetrics().axisHeight*n.sizeMultiplier,l=5/n.fontMetrics().ptPerEm,s=Math.max(t-i,r+i),c=Math.max(s/500*901,2*s-l);return nl(e,c,!0,n,a,o)}},ol={"\\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}},il=["(","\\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 ll(e,t){var r=yi(e);if(r&&Pn.contains(il,r.text))return r;throw new Rn(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function sl(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Io({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 r=ll(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:ol[e.funcName].size,mclass:ol[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Bo.makeSpan([e.mclass]):al.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(ni(e.delim,e.mode));var r=new ri.MathNode("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=ga(al.sizeToMaxHeight[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}}),Io({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new Rn("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:ll(t[0],e).text,color:r}}}),Io({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=ll(t[0],e),n=e.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var o=vi(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:o.delim,rightColor:o.color}},htmlBuilder:(e,t)=>{sl(e);for(var r,n,a=Uo(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,r="."===e.left?Zo(t,["mopen"]):al.leftRightDelim(e.left,o,i,t,e.mode,["mopen"]),a.unshift(r),l)for(var c=1;c<a.length;c++){var d=a[c].isMiddle;d&&(a[c]=al.leftRightDelim(d.delim,o,i,d.options,e.mode,[]))}if("."===e.right)n=Zo(t,["mclose"]);else{var u=e.rightColor?t.withColor(e.rightColor):t;n=al.leftRightDelim(e.right,o,i,u,e.mode,["mclose"])}return a.push(n),Bo.makeSpan(["minner"],a,t)},mathmlBuilder:(e,t)=>{sl(e);var r=ii(e.body,t);if("."!==e.left){var n=new ri.MathNode("mo",[ni(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if("."!==e.right){var a=new ri.MathNode("mo",[ni(e.right,e.mode)]);a.setAttribute("fence","true"),e.rightColor&&a.setAttribute("mathcolor",e.rightColor),r.push(a)}return ai(r)}}),Io({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=ll(t[0],e);if(!e.parser.leftrightDepth)throw new Rn("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=Zo(t,[]);else{r=al.sizedDelim(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?ni("|","text"):ni(e.delim,e.mode),n=new ri.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var cl=(e,t)=>{var r,n,a,o=Bo.wrapFragment(Xo(e.body,t),t),i=e.label.slice(1),l=t.sizeMultiplier,s=0,c=Pn.isCharacterBox(e.body);if("sout"===i)(r=Bo.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/l,s=-.5*t.fontMetrics().xHeight;else if("phase"===i){var d=fa({number:.6,unit:"pt"},t),u=fa({number:.35,unit:"ex"},t);l/=t.havingBaseSizing().sizeMultiplier;var h=o.height+o.depth+d+u;o.style.paddingLeft=ga(h/2+d);var m=Math.floor(1e3*h*l),p="M400000 "+(n=m)+" H0 L"+n/2+" 0 l65 45 L145 "+(n-80)+" H400000z",f=new Ba([new Ca("phase",p)],{width:"400em",height:ga(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});(r=Bo.makeSvgSpan(["hide-tail"],[f],t)).style.height=ga(h),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,v=0,b=0;/box/.test(i)?(b=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),v=g=t.fontMetrics().fboxsep+("colorbox"===i?0:b)):"angl"===i?(g=4*(b=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),v=Math.max(0,.25-o.depth)):v=g=c?.2:0,r=pi(o,i,g,v,t),/fbox|boxed|fcolorbox/.test(i)?(r.style.borderStyle="solid",r.style.borderWidth=ga(b)):"angl"===i&&.049!==b&&(r.style.borderTopWidth=ga(b),r.style.borderRightWidth=ga(b)),s=o.depth+v,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)a=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:s},{type:"elem",elem:o,shift:0}]},t);else{var y=/cancel|phase/.test(i)?["svg-align"]:[];a=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:s,wrapperClasses:y}]},t)}return/cancel/.test(i)&&(a.height=o.height,a.depth=o.depth),/cancel/.test(i)&&!c?Bo.makeSpan(["mord","cancel-lap"],[a],t):Bo.makeSpan(["mord"],[a],t)},dl=(e,t)=>{var r=0,n=new ri.MathNode(e.label.indexOf("colorbox")>-1?"mpadded":"menclose",[si(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var a=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+a+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Io({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,o=vi(t[0],"color-token").color,i=t[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:o,body:i}},htmlBuilder:cl,mathmlBuilder:dl}),Io({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:a}=e,o=vi(t[0],"color-token").color,i=vi(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,borderColor:o,body:l}},htmlBuilder:cl,mathmlBuilder:dl}),Io({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),Io({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:cl,mathmlBuilder:dl}),Io({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var ul={};function hl(e){for(var{type:t,names:r,props:n,handler:a,htmlBuilder:o,mathmlBuilder:i}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},s=0;s<r.length;++s)ul[r[s]]=l;o&&(Ro[t]=o),i&&(zo[t]=i)}var ml={};function pl(e,t){ml[e]=t}function fl(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for("\\relax"===r&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);"\\hline"===r||"\\hdashline"===r;)e.consume(),t.push("\\hdashline"===r),e.consumeSpaces(),r=e.fetch().text;return t}var gl=e=>{if(!e.parser.settings.displayMode)throw new Rn("{"+e.envName+"} can be used only in display mode.")};function vl(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function bl(e,t,r){var{hskipBeforeAndAfter:n,addJot:a,cols:o,arraystretch:i,colSeparationType:l,autoTag:s,singleRow:c,emptySingleRow:d,maxNumCols:u,leqno:h}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!i){var m=e.gullet.expandMacroAsText("\\arraystretch");if(null==m)i=1;else if(!(i=parseFloat(m))||i<0)throw new Rn("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var p=[],f=[p],g=[],v=[],b=null!=s?[]:void 0;function y(){s&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){b&&(e.gullet.macros.get("\\df@tag")?(b.push(e.subparse([new On("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):b.push(Boolean(s)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(y(),v.push(fl(e));;){var x=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),x={type:"ordgroup",mode:e.mode,body:x},r&&(x={type:"styling",mode:e.mode,style:r,body:[x]}),p.push(x);var k=e.fetch().text;if("&"===k){if(u&&p.length===u){if(c||l)throw new Rn("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(),v.length<f.length+1&&v.push([]);break}if("\\\\"!==k)throw new Rn("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(),v.push(fl(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:n,hLinesBeforeRow:v,colSeparationType:l,tags:b,leqno:h}}function yl(e){return"d"===e.slice(0,1)?"display":"text"}var wl=function(e,t){var r,n,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(Xn.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778);var h="CD"===e.colSeparationType?fa({number:3,unit:"ex"},t):12*d,m=3*d,p=e.arraystretch*h,f=.7*p,g=.3*p,v=0;function b(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),s.push({pos:v,isDashed:e[t]})}for(b(o[0]),r=0;r<e.body.length;++r){var y=e.body[r],w=f,x=g;i<y.length&&(i=y.length);var k=new Array(y.length);for(n=0;n<y.length;++n){var E=Xo(y[n],t);x<E.depth&&(x=E.depth),w<E.height&&(w=E.height),k[n]=E}var S=e.rowGaps[r],T=0;S&&(T=fa(S,t))>0&&(x<(T+=g)&&(x=T),T=0),e.addJot&&(x+=m),k.height=w,k.depth=x,v+=w,k.pos=v,v+=x+T,l[r]=k,b(o[r+1])}var B,C,_=v/2+t.fontMetrics().axisHeight,N=e.cols||[],M=[],A=[];if(e.tags&&e.tags.some((e=>e)))for(r=0;r<a;++r){var O=l[r],R=O.pos-_,z=e.tags[r],I=void 0;(I=!0===z?Bo.makeSpan(["eqn-num"],[],t):!1===z?Bo.makeSpan([],[],t):Bo.makeSpan([],Uo(z,t,!0),t)).depth=O.depth,I.height=O.height,A.push({type:"elem",elem:I,shift:R})}for(n=0,C=0;n<i||C<N.length;++n,++C){for(var L=N[C]||{},D=!0;"separator"===L.type;){if(D||((B=Bo.makeSpan(["arraycolsep"],[])).style.width=ga(t.fontMetrics().doubleRuleSep),M.push(B)),"|"!==L.separator&&":"!==L.separator)throw new Rn("Invalid separator type: "+L.separator);var P="|"===L.separator?"solid":"dashed",F=Bo.makeSpan(["vertical-separator"],[],t);F.style.height=ga(v),F.style.borderRightWidth=ga(c),F.style.borderRightStyle=P,F.style.margin="0 "+ga(-c/2);var q=v-_;q&&(F.style.verticalAlign=ga(-q)),M.push(F),L=N[++C]||{},D=!1}if(!(n>=i)){var H=void 0;(n>0||e.hskipBeforeAndAfter)&&0!==(H=Pn.deflt(L.pregap,u))&&((B=Bo.makeSpan(["arraycolsep"],[])).style.width=ga(H),M.push(B));var $=[];for(r=0;r<a;++r){var V=l[r],U=V[n];if(U){var j=V.pos-_;U.depth=V.depth,U.height=V.height,$.push({type:"elem",elem:U,shift:j})}}$=Bo.makeVList({positionType:"individualShift",children:$},t),$=Bo.makeSpan(["col-align-"+(L.align||"c")],[$]),M.push($),(n<i-1||e.hskipBeforeAndAfter)&&0!==(H=Pn.deflt(L.postgap,u))&&((B=Bo.makeSpan(["arraycolsep"],[])).style.width=ga(H),M.push(B))}}if(l=Bo.makeSpan(["mtable"],M),s.length>0){for(var W=Bo.makeLineSpan("hline",t,c),K=Bo.makeLineSpan("hdashline",t,c),G=[{type:"elem",elem:l,shift:0}];s.length>0;){var Z=s.pop(),X=Z.pos-_;Z.isDashed?G.push({type:"elem",elem:K,shift:X}):G.push({type:"elem",elem:W,shift:X})}l=Bo.makeVList({positionType:"individualShift",children:G},t)}if(0===A.length)return Bo.makeSpan(["mord"],[l],t);var Y=Bo.makeVList({positionType:"individualShift",children:A},t);return Y=Bo.makeSpan(["tag"],[Y],t),Bo.makeFragment([l,Y])},xl={c:"center ",l:"left ",r:"right "},kl=function(e,t){for(var r=[],n=new ri.MathNode("mtd",[],["mtr-glue"]),a=new ri.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 ri.MathNode("mtd",[si(i[s],t)]));e.tags&&e.tags[o]&&(l.unshift(n),l.push(n),e.leqno?l.unshift(a):l.push(a)),r.push(new ri.MathNode("mtr",l))}var c=new ri.MathNode("mtable",r),d=.5===e.arraystretch?.1:.16+e.arraystretch-1+(e.addJot?.09:0);c.setAttribute("rowspacing",ga(d));var u="",h="";if(e.cols&&e.cols.length>0){var m=e.cols,p="",f=!1,g=0,v=m.length;"separator"===m[0].type&&(u+="top ",g=1),"separator"===m[m.length-1].type&&(u+="bottom ",v-=1);for(var b=g;b<v;b++)"align"===m[b].type?(h+=xl[m[b].align],f&&(p+="none "),f=!0):"separator"===m[b].type&&f&&(p+="|"===m[b].separator?"solid ":"dashed ",f=!1);c.setAttribute("columnalign",h.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 ri.MathNode("menclose",[c])).setAttribute("notation",u.trim()),e.arraystretch&&e.arraystretch<1&&(c=new ri.MathNode("mstyle",[c])).setAttribute("scriptlevel","1"),c},El=function(e,t){-1===e.envName.indexOf("ed")&&gl(e);var r,n=[],a=e.envName.indexOf("at")>-1?"alignat":"align",o="split"===e.envName,i=bl(e.parser,{cols:n,addJot:!0,autoTag:o?void 0:vl(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+=vi(t[0].body[d],"textord").text}r=Number(c),l=2*r}var u=!l;i.body.forEach((function(e){for(var t=1;t<e.length;t+=2){var n=vi(e[t],"styling");vi(n.body[0],"ordgroup").body.unshift(s)}if(u)l<e.length&&(l=e.length);else{var a=e.length/2;if(r<a)throw new Rn("Too many math in a row: expected "+r+", but got "+a,e[0])}}));for(var h=0;h<l;++h){var m="r",p=0;h%2==1?m="l":h>0&&u&&(p=1),n[h]={type:"align",align:m,pregap:p,postgap:0}}return i.colSeparationType=u?"align":"alignat",i};hl({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(yi(t[0])?[t[0]]:vi(t[0],"ordgroup").body).map((function(e){var t=bi(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 Rn("Unknown column alignment: "+t,e)})),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return bl(e.parser,n,yl(e.envName))},htmlBuilder:wl,mathmlBuilder:kl}),hl({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("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var a=e.parser;if(a.consumeSpaces(),"["===a.fetch().text){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,-1==="lcr".indexOf(r))throw new Rn("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var o=bl(e.parser,n,yl(e.envName)),i=Math.max(0,...o.body.map((e=>e.length)));return o.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=bl(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(yi(t[0])?[t[0]]:vi(t[0],"ordgroup").body).map((function(e){var t=bi(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new Rn("Unknown column alignment: "+t,e)}));if(r.length>1)throw new Rn("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((n=bl(e.parser,n,"script")).body.length>0&&n.body[0].length>1)throw new Rn("{subarray} can contain only one column");return n},htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=bl(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},yl(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:wl,mathmlBuilder:kl}),hl({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:El,htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Pn.contains(["gather","gather*"],e.envName)&&gl(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:vl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return bl(e.parser,t,"display")},htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:El,htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){gl(e);var t={autoTag:vl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return bl(e.parser,t,"display")},htmlBuilder:wl,mathmlBuilder:kl}),hl({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(gl(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 r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new Rn("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n,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(Ni(s[d])){o.push(c);var u=bi(s[d+=1]).text,h=new Array(2);if(h[0]={type:"ordgroup",mode:"math",body:[]},h[1]={type:"ordgroup",mode:"math",body:[]},"=|.".indexOf(u)>-1);else{if(!("<>AV".indexOf(u)>-1))throw new Rn('Expected one of "<>AV=|." after @',s[d]);for(var m=0;m<2;m++){for(var p=!0,f=d+1;f<s.length;f++){if(a=u,("mathord"===(n=s[f]).type||"atom"===n.type)&&n.text===a){p=!1,d=f;break}if(Ni(s[f]))throw new Rn("Missing a "+u+" character to complete a CD arrow.",s[f]);h[m].body.push(s[f])}if(p)throw new Rn("Missing a "+u+" character to complete a CD arrow.",s[d])}}var g={type:"styling",body:[Mi(u,h,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:wl,mathmlBuilder:kl}),pl("\\nonumber","\\gdef\\@eqnsw{0}"),pl("\\notag","\\nonumber"),Io({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Rn(e.funcName+" valid only within array environment")}});var Sl=ul;Io({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,a=t[0];if("ordgroup"!==a.type)throw new Rn("Invalid environment name",a);for(var o="",i=0;i<a.body.length;++i)o+=vi(a.body[i],"textord").text;if("\\begin"===n){if(!Sl.hasOwnProperty(o))throw new Rn("No such environment: "+o,a);var l=Sl[o],{args:s,optArgs:c}=r.parseArguments("\\begin{"+o+"}",l),d={mode:r.mode,envName:o,parser:r},u=l.handler(d,s,c);r.expect("\\end",!1);var h=r.nextToken,m=vi(r.parseFunction(),"environment");if(m.name!==o)throw new Rn("Mismatch: \\begin{"+o+"} matched by \\end{"+m.name+"}",h);return u}return{type:"environment",mode:r.mode,name:o,nameGroup:a}}});var Tl=(e,t)=>{var r=e.font,n=t.withFont(r);return Xo(e.body,n)},Bl=(e,t)=>{var r=e.font,n=t.withFont(r);return si(e.body,n)},Cl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Io({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:r,funcName:n}=e,a=Do(t[0]),o=n;return o in Cl&&(o=Cl[o]),{type:"font",mode:r.mode,font:o.slice(1),body:a}},htmlBuilder:Tl,mathmlBuilder:Bl}),Io({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0],a=Pn.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:Ci(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:a}}}),Io({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:a}=e,{mode:o}=r,i=r.parseExpression(!0,a);return{type:"font",mode:o,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:i}}},htmlBuilder:Tl,mathmlBuilder:Bl});var _l=(e,t)=>{var r=t;return"display"===e?r=r.id>=Xn.SCRIPT.id?r.text():Xn.DISPLAY:"text"===e&&r.size===Xn.DISPLAY.size?r=Xn.TEXT:"script"===e?r=Xn.SCRIPT:"scriptscript"===e&&(r=Xn.SCRIPTSCRIPT),r},Nl=(e,t)=>{var r,n=_l(e.size,t.style),a=n.fracNum(),o=n.fracDen();r=t.havingStyle(a);var i=Xo(e.numer,r,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}r=t.havingStyle(o);var c,d,u,h,m,p,f,g,v,b,y=Xo(e.denom,r,t);if(e.hasBarLine?(e.barSize?(d=fa(e.barSize,t),c=Bo.makeLineSpan("frac-line",t,d)):c=Bo.makeLineSpan("frac-line",t),d=c.height,u=c.height):(c=null,d=0,u=t.fontMetrics().defaultRuleThickness),n.size===Xn.DISPLAY.size||"display"===e.size?(h=t.fontMetrics().num1,m=d>0?3*u:7*u,p=t.fontMetrics().denom1):(d>0?(h=t.fontMetrics().num2,m=u):(h=t.fontMetrics().num3,m=3*u),p=t.fontMetrics().denom2),c){var w=t.fontMetrics().axisHeight;h-i.depth-(w+.5*d)<m&&(h+=m-(h-i.depth-(w+.5*d))),w-.5*d-(y.height-p)<m&&(p+=m-(w-.5*d-(y.height-p)));var x=-(w-.5*d);f=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:c,shift:x},{type:"elem",elem:i,shift:-h}]},t)}else{var k=h-i.depth-(y.height-p);k<m&&(h+=.5*(m-k),p+=.5*(m-k)),f=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:y,shift:p},{type:"elem",elem:i,shift:-h}]},t)}return r=t.havingStyle(n),f.height*=r.sizeMultiplier/t.sizeMultiplier,f.depth*=r.sizeMultiplier/t.sizeMultiplier,g=n.size===Xn.DISPLAY.size?t.fontMetrics().delim1:n.size===Xn.SCRIPTSCRIPT.size?t.havingStyle(Xn.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,v=null==e.leftDelim?Zo(t,["mopen"]):al.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(n),e.mode,["mopen"]),b=e.continued?Bo.makeSpan([]):null==e.rightDelim?Zo(t,["mclose"]):al.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(n),e.mode,["mclose"]),Bo.makeSpan(["mord"].concat(r.sizingClasses(t)),[v,Bo.makeSpan(["mfrac"],[f]),b],t)},Ml=(e,t)=>{var r=new ri.MathNode("mfrac",[si(e.numer,t),si(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var n=fa(e.barSize,t);r.setAttribute("linethickness",ga(n))}}else r.setAttribute("linethickness","0px");var a=_l(e.size,t.style);if(a.size!==t.style.size){r=new ri.MathNode("mstyle",[r]);var o=a.size===Xn.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",o),r.setAttribute("scriptlevel","0")}if(null!=e.leftDelim||null!=e.rightDelim){var i=[];if(null!=e.leftDelim){var l=new ri.MathNode("mo",[new ri.TextNode(e.leftDelim.replace("\\",""))]);l.setAttribute("fence","true"),i.push(l)}if(i.push(r),null!=e.rightDelim){var s=new ri.MathNode("mo",[new ri.TextNode(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return ai(i)}return r};Io({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:n,funcName:a}=e,o=t[0],i=t[1],l=null,s=null,c="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,l="(",s=")";break;case"\\\\bracefrac":r=!1,l="\\{",s="\\}";break;case"\\\\brackfrac":r=!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:n.mode,continued:!1,numer:o,denom:i,hasBarLine:r,leftDelim:l,rightDelim:s,size:c,barSize:null}},htmlBuilder:Nl,mathmlBuilder:Ml}),Io({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],o=t[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:a,denom:o,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),Io({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:n,token:a}=e;switch(n){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:r.mode,replaceWith:t,token:a}}});var Al=["display","text","script","scriptscript"],Ol=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};Io({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:n}=e,a=t[4],o=t[5],i=Do(t[0]),l="atom"===i.type&&"open"===i.family?Ol(i.text):null,s=Do(t[1]),c="atom"===s.type&&"close"===s.family?Ol(s.text):null,d=vi(t[2],"size"),u=null;r=!!d.isBlank||(u=d.value).number>0;var h="auto",m=t[3];if("ordgroup"===m.type){if(m.body.length>0){var p=vi(m.body[0],"textord");h=Al[Number(p.text)]}}else m=vi(m,"textord"),h=Al[Number(m.text)];return{type:"genfrac",mode:n.mode,numer:a,denom:o,continued:!1,hasBarLine:r,barSize:u,leftDelim:l,rightDelim:c,size:h}},htmlBuilder:Nl,mathmlBuilder:Ml}),Io({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:a}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:vi(t[0],"size").value,token:a}}}),Io({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0],o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}(vi(t[1],"infix").size),i=t[2],l=o.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:i,continued:!1,hasBarLine:l,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Nl,mathmlBuilder:Ml});var Rl=(e,t)=>{var r,n,a=t.style;"supsub"===e.type?(r=e.sup?Xo(e.sup,t.havingStyle(a.sup()),t):Xo(e.sub,t.havingStyle(a.sub()),t),n=vi(e.base,"horizBrace")):n=vi(e,"horizBrace");var o,i=Xo(n.base,t.havingBaseStyle(Xn.DISPLAY)),l=gi(n,t);if(n.isOver?(o=Bo.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=Bo.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"),r){var s=Bo.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t);o=n.isOver?Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Bo.makeVList({positionType:"bottom",positionData:s.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:s}]},t)}return Bo.makeSpan(["mord",n.isOver?"mover":"munder"],[o],t)};Io({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:Rl,mathmlBuilder:(e,t)=>{var r=fi(e.label);return new ri.MathNode(e.isOver?"mover":"munder",[si(e.base,t),r])}}),Io({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],a=vi(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Po(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Uo(e.body,t,!1);return Bo.makeAnchor(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=li(e.body,t);return r instanceof ei||(r=new ei("mrow",[r])),r.setAttribute("href",e.href),r}}),Io({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=vi(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],o=0;o<n.length;o++){var i=n[o];"~"===i&&(i="\\textasciitilde"),a.push({type:"textord",mode:"text",text:i})}var l={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:Po(l)}}}),Io({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:Po(t[0])}},htmlBuilder(e,t){var r=Uo(e.body,t,!1);return Bo.makeFragment(r)},mathmlBuilder:(e,t)=>new ri.MathNode("mrow",ii(e.body,t))}),Io({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:a,token:o}=e,i=vi(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var s={};switch(a){case"\\htmlClass":s.class=i,r={command:"\\htmlClass",class:i};break;case"\\htmlId":s.id=i,r={command:"\\htmlId",id:i};break;case"\\htmlStyle":s.style=i,r={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 Rn("Error parsing key-value for \\htmlData");s["data-"+u[0].trim()]=u[1].trim()}r={command:"\\htmlData",attributes:s};break;default:throw new Error("Unrecognized html command")}return n.settings.isTrusted(r)?{type:"html",mode:n.mode,attributes:s,body:Po(l)}:n.formatUnsupportedCmd(a)},htmlBuilder:(e,t)=>{var r=Uo(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var a=Bo.makeSpan(n,r,t);for(var o in e.attributes)"class"!==o&&e.attributes.hasOwnProperty(o)&&a.setAttribute(o,e.attributes[o]);return a},mathmlBuilder:(e,t)=>li(e.body,t)}),Io({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Po(t[0]),mathml:Po(t[1])}},htmlBuilder:(e,t)=>{var r=Uo(e.html,t,!1);return Bo.makeFragment(r)},mathmlBuilder:(e,t)=>li(e.mathml,t)});var zl=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 Rn("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!pa(r))throw new Rn("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};Io({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,a={number:0,unit:"em"},o={number:.9,unit:"em"},i={number:0,unit:"em"},l="";if(r[0])for(var s=vi(r[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=zl(u);break;case"height":o=zl(u);break;case"totalheight":i=zl(u);break;default:throw new Rn("Invalid key: '"+d[0]+"' in \\includegraphics.")}}}var h=vi(t[0],"url").url;return""===l&&(l=(l=(l=h).replace(/^.*[\\/]/,"")).substring(0,l.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:h})?{type:"includegraphics",mode:n.mode,alt:l,width:a,height:o,totalheight:i,src:h}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=fa(e.height,t),n=0;e.totalheight.number>0&&(n=fa(e.totalheight,t)-r);var a=0;e.width.number>0&&(a=fa(e.width,t));var o={height:ga(r+n)};a>0&&(o.width=ga(a)),n>0&&(o.verticalAlign=ga(-n));var i=new Ea(e.src,e.alt,o);return i.height=r,i.depth=n,i},mathmlBuilder:(e,t)=>{var r=new ri.MathNode("mglyph",[]);r.setAttribute("alt",e.alt);var n=fa(e.height,t),a=0;if(e.totalheight.number>0&&(a=fa(e.totalheight,t)-n,r.setAttribute("valign",ga(-a))),r.setAttribute("height",ga(n+a)),e.width.number>0){var o=fa(e.width,t);r.setAttribute("width",ga(o))}return r.setAttribute("src",e.src),r}}),Io({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,a=vi(t[0],"size");if(r.settings.strict){var o="m"===n[1],i="mu"===a.value.unit;o?(i||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+a.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):i&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder:(e,t)=>Bo.makeGlue(e.dimension,t),mathmlBuilder(e,t){var r=fa(e.dimension,t);return new ri.SpaceNode(r)}}),Io({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=Bo.makeSpan([],[Xo(e.body,t)]),r=Bo.makeSpan(["inner"],[r],t)):r=Bo.makeSpan(["inner"],[Xo(e.body,t)]);var n=Bo.makeSpan(["fix"],[]),a=Bo.makeSpan([e.alignment],[r,n],t),o=Bo.makeSpan(["strut"]);return o.style.height=ga(a.height+a.depth),a.depth&&(o.style.verticalAlign=ga(-a.depth)),a.children.unshift(o),a=Bo.makeSpan(["thinbox"],[a],t),Bo.makeSpan(["mord","vbox"],[a],t)},mathmlBuilder:(e,t)=>{var r=new ri.MathNode("mpadded",[si(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),Io({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,a=n.mode;n.switchMode("math");var o="\\("===r?"\\)":"$",i=n.parseExpression(!1,o);return n.expect(o),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",body:i}}}),Io({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Rn("Mismatched "+e.funcName)}});var Il=(e,t)=>{switch(t.style.size){case Xn.DISPLAY.size:return e.display;case Xn.TEXT.size:return e.text;case Xn.SCRIPT.size:return e.script;case Xn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Io({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Po(t[0]),text:Po(t[1]),script:Po(t[2]),scriptscript:Po(t[3])}},htmlBuilder:(e,t)=>{var r=Il(e,t),n=Uo(r,t,!1);return Bo.makeFragment(n)},mathmlBuilder:(e,t)=>{var r=Il(e,t);return li(r,t)}});var Ll=(e,t,r,n,a,o,i)=>{e=Bo.makeSpan([],[e]);var l,s,c,d=r&&Pn.isCharacterBox(r);if(t){var u=Xo(t,n.havingStyle(a.sup()),n);s={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var h=Xo(r,n.havingStyle(a.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}if(s&&l){var m=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+i;c=Bo.makeVList({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ga(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:ga(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=e.height-i;c=Bo.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:ga(-o)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else{if(!s)return e;var f=e.depth+i;c=Bo.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:s.kern},{type:"elem",elem:s.elem,marginLeft:ga(o)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}var g=[c];if(l&&0!==o&&!d){var v=Bo.makeSpan(["mspace"],[],n);v.style.marginRight=ga(o),g.unshift(v)}return Bo.makeSpan(["mop","op-limits"],g,n)},Dl=["\\smallint"],Pl=(e,t)=>{var r,n,a,o=!1;"supsub"===e.type?(r=e.sup,n=e.sub,a=vi(e.base,"op"),o=!0):a=vi(e,"op");var i,l=t.style,s=!1;if(l.size===Xn.DISPLAY.size&&a.symbol&&!Pn.contains(Dl,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=Bo.makeSymbol(a.name,c,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),d.length>0){var u=i.italic,h=Bo.staticSvg(d+"Size"+(s?"2":"1"),t);i=Bo.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:h,shift:s?.08:0}]},t),a.name="\\"+d,i.classes.unshift("mop"),i.italic=u}}else if(a.body){var m=Uo(a.body,t,!0);1===m.length&&m[0]instanceof Ta?(i=m[0]).classes[0]="mop":i=Bo.makeSpan(["mop"],m,t)}else{for(var p=[],f=1;f<a.name.length;f++)p.push(Bo.mathsym(a.name[f],a.mode,t));i=Bo.makeSpan(["mop"],p,t)}var g=0,v=0;return(i instanceof Ta||"\\oiint"===a.name||"\\oiiint"===a.name)&&!a.suppressBaseShift&&(g=(i.height-i.depth)/2-t.fontMetrics().axisHeight,v=i.italic),o?Ll(i,r,n,t,l,v,g):(g&&(i.style.position="relative",i.style.top=ga(g)),i)},Fl=(e,t)=>{var r;if(e.symbol)r=new ei("mo",[ni(e.name,e.mode)]),Pn.contains(Dl,e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new ei("mo",ii(e.body,t));else{r=new ei("mi",[new ti(e.name.slice(1))]);var n=new ei("mo",[ni("⁡","text")]);r=e.parentIsSupSub?new ei("mrow",[r,n]):Jo([r,n])}return r},ql={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Io({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:r,funcName:n}=e,a=n;return 1===a.length&&(a=ql[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:Pl,mathmlBuilder:Fl}),Io({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Po(n)}},htmlBuilder:Pl,mathmlBuilder:Fl});var Hl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Io({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:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Pl,mathmlBuilder:Fl}),Io({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Pl,mathmlBuilder:Fl}),Io({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e,n=r;return 1===n.length&&(n=Hl[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Pl,mathmlBuilder:Fl});var $l=(e,t)=>{var r,n,a,o,i=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,a=vi(e.base,"operatorname"),i=!0):a=vi(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=Uo(l,t.withFont("mathrm"),!0),c=0;c<s.length;c++){var d=s[c];d instanceof Ta&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}o=Bo.makeSpan(["mop"],s,t)}else o=Bo.makeSpan(["mop"],[],t);return i?Ll(o,r,n,t,t.style,0,0):o};function Vl(e,t,r){for(var n=Uo(e,t,!1),a=t.sizeMultiplier/r.sizeMultiplier,o=0;o<n.length;o++){var i=n[o].classes.indexOf("sizing");i<0?Array.prototype.push.apply(n[o].classes,t.sizingClasses(r)):n[o].classes[i+1]==="reset-size"+t.size&&(n[o].classes[i+1]="reset-size"+r.size),n[o].height*=a,n[o].depth*=a}return Bo.makeFragment(n)}Io({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,a=t[0];return{type:"operatorname",mode:r.mode,body:Po(a),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:$l,mathmlBuilder:(e,t)=>{for(var r=ii(e.body,t.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var o=r[a];if(o instanceof ri.SpaceNode);else if(o instanceof ri.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 ri.TextNode?i.text=i.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break;default:n=!1}else n=!1}if(n){var l=r.map((e=>e.toText())).join("");r=[new ri.TextNode(l)]}var s=new ri.MathNode("mi",r);s.setAttribute("mathvariant","normal");var c=new ri.MathNode("mo",[ni("⁡","text")]);return e.parentIsSupSub?new ri.MathNode("mrow",[s,c]):ri.newDocumentFragment([s,c])}}),pl("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Lo({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?Bo.makeFragment(Uo(e.body,t,!1)):Bo.makeSpan(["mord"],Uo(e.body,t,!0),t),mathmlBuilder:(e,t)=>li(e.body,t,!0)}),Io({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=Xo(e.body,t.havingCrampedStyle()),n=Bo.makeLineSpan("overline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]},t);return Bo.makeSpan(["mord","overline"],[o],t)},mathmlBuilder(e,t){var r=new ri.MathNode("mo",[new ri.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ri.MathNode("mover",[si(e.body,t),r]);return n.setAttribute("accent","true"),n}}),Io({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Po(n)}},htmlBuilder:(e,t)=>{var r=Uo(e.body,t.withPhantom(),!1);return Bo.makeFragment(r)},mathmlBuilder:(e,t)=>{var r=ii(e.body,t);return new ri.MathNode("mphantom",r)}}),Io({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Bo.makeSpan([],[Xo(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t),Bo.makeSpan(["mord"],[r],t)},mathmlBuilder:(e,t)=>{var r=ii(Po(e.body),t),n=new ri.MathNode("mphantom",r),a=new ri.MathNode("mpadded",[n]);return a.setAttribute("height","0px"),a.setAttribute("depth","0px"),a}}),Io({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Bo.makeSpan(["inner"],[Xo(e.body,t.withPhantom())]),n=Bo.makeSpan(["fix"],[]);return Bo.makeSpan(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=ii(Po(e.body),t),n=new ri.MathNode("mphantom",r),a=new ri.MathNode("mpadded",[n]);return a.setAttribute("width","0px"),a}}),Io({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=vi(t[0],"size").value,a=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(e,t){var r=Xo(e.body,t),n=fa(e.dy,t);return Bo.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){var r=new ri.MathNode("mpadded",[si(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),Io({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Io({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,a=r[0],o=vi(t[0],"size"),i=vi(t[1],"size");return{type:"rule",mode:n.mode,shift:a&&vi(a,"size").value,width:o.value,height:i.value}},htmlBuilder(e,t){var r=Bo.makeSpan(["mord","rule"],[],t),n=fa(e.width,t),a=fa(e.height,t),o=e.shift?fa(e.shift,t):0;return r.style.borderRightWidth=ga(n),r.style.borderTopWidth=ga(a),r.style.bottom=ga(o),r.width=n,r.height=a+o,r.depth=-o,r.maxFontSize=1.125*a*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=fa(e.width,t),n=fa(e.height,t),a=e.shift?fa(e.shift,t):0,o=t.color&&t.getColor()||"black",i=new ri.MathNode("mspace");i.setAttribute("mathbackground",o),i.setAttribute("width",ga(r)),i.setAttribute("height",ga(n));var l=new ri.MathNode("mpadded",[i]);return a>=0?l.setAttribute("height",ga(a)):(l.setAttribute("height",ga(a)),l.setAttribute("depth",ga(-a))),l.setAttribute("voffset",ga(a)),l}});var Ul=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];Io({type:"sizing",names:Ul,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:a}=e,o=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:Ul.indexOf(n)+1,body:o}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Vl(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=ii(e.body,r),a=new ri.MathNode("mstyle",n);return a.setAttribute("mathsize",ga(r.sizeMultiplier)),a}}),Io({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,a=!1,o=!1,i=r[0]&&vi(r[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:n.mode,body:c,smashHeight:a,smashDepth:o}},htmlBuilder:(e,t)=>{var r=Bo.makeSpan([],[Xo(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(e.smashDepth&&(r.depth=0,r.children))for(var a=0;a<r.children.length;a++)r.children[a].depth=0;var o=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},t);return Bo.makeSpan(["mord"],[o],t)},mathmlBuilder:(e,t)=>{var r=new ri.MathNode("mpadded",[si(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Io({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,a=r[0],o=t[0];return{type:"sqrt",mode:n.mode,body:o,index:a}},htmlBuilder(e,t){var r=Xo(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Bo.wrapFragment(r,t);var n=t.fontMetrics().defaultRuleThickness,a=n;t.style.id<Xn.TEXT.id&&(a=t.fontMetrics().xHeight);var o=n+a/4,i=r.height+r.depth+o+n,{span:l,ruleWidth:s,advanceWidth:c}=al.sqrtImage(i,t),d=l.height-s;d>r.height+r.depth+o&&(o=(o+d-r.height-r.depth)/2);var u=l.height-r.height-o-s;r.style.paddingLeft=ga(c);var h=Bo.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+u)},{type:"elem",elem:l},{type:"kern",size:s}]},t);if(e.index){var m=t.havingStyle(Xn.SCRIPTSCRIPT),p=Xo(e.index,m,t),f=.6*(h.height-h.depth),g=Bo.makeVList({positionType:"shift",positionData:-f,children:[{type:"elem",elem:p}]},t),v=Bo.makeSpan(["root"],[g]);return Bo.makeSpan(["mord","sqrt"],[v,h],t)}return Bo.makeSpan(["mord","sqrt"],[h],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new ri.MathNode("mroot",[si(r,t),si(n,t)]):new ri.MathNode("msqrt",[si(r,t)])}});var jl={display:Xn.DISPLAY,text:Xn.TEXT,script:Xn.SCRIPT,scriptscript:Xn.SCRIPTSCRIPT};Io({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:a}=e,o=a.parseExpression(!0,r),i=n.slice(1,n.length-5);return{type:"styling",mode:a.mode,style:i,body:o}},htmlBuilder(e,t){var r=jl[e.style],n=t.havingStyle(r).withFont("");return Vl(e.body,n,t)},mathmlBuilder(e,t){var r=jl[e.style],n=t.havingStyle(r),a=ii(e.body,n),o=new ri.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}});Lo({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===Xn.DISPLAY.size||r.alwaysHandleSupSub)?Pl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===Xn.DISPLAY.size||r.limits)?$l:null:"accent"===r.type?Pn.isCharacterBox(r.base)?wi:null:"horizBrace"===r.type&&!e.sub===r.isOver?Rl:null:null}(e,t);if(r)return r(e,t);var n,a,o,{base:i,sup:l,sub:s}=e,c=Xo(i,t),d=t.fontMetrics(),u=0,h=0,m=i&&Pn.isCharacterBox(i);if(l){var p=t.havingStyle(t.style.sup());n=Xo(l,p,t),m||(u=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(s){var f=t.havingStyle(t.style.sub());a=Xo(s,f,t),m||(h=c.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}o=t.style===Xn.DISPLAY?d.sup1:t.style.cramped?d.sup3:d.sup2;var g,v=t.sizeMultiplier,b=ga(.5/d.ptPerEm/v),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 Ta||w)&&(y=ga(-c.italic))}if(n&&a){u=Math.max(u,o,n.depth+.25*d.xHeight),h=Math.max(h,d.sub2);var x=4*d.defaultRuleThickness;if(u-n.depth-(a.height-h)<x){h=x-(u-n.depth)+a.height;var k=.8*d.xHeight-(u-n.depth);k>0&&(u+=k,h-=k)}var E=[{type:"elem",elem:a,shift:h,marginRight:b,marginLeft:y},{type:"elem",elem:n,shift:-u,marginRight:b}];g=Bo.makeVList({positionType:"individualShift",children:E},t)}else if(a){h=Math.max(h,d.sub1,a.height-.8*d.xHeight);var S=[{type:"elem",elem:a,marginLeft:y,marginRight:b}];g=Bo.makeVList({positionType:"shift",positionData:h,children:S},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");u=Math.max(u,o,n.depth+.25*d.xHeight),g=Bo.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:n,marginRight:b}]},t)}var T=Go(c,"right")||"mord";return Bo.makeSpan([T],[c,Bo.makeSpan(["msupsub"],[g])],t)},mathmlBuilder(e,t){var r,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var a,o=[si(e.base,t)];if(e.sub&&o.push(si(e.sub,t)),e.sup&&o.push(si(e.sup,t)),n)a=r?"mover":"munder";else if(e.sub)if(e.sup){var i=e.base;a=i&&"op"===i.type&&i.limits&&t.style===Xn.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===Xn.DISPLAY||i.limits)?"munderover":"msubsup"}else{var l=e.base;a=l&&"op"===l.type&&l.limits&&(t.style===Xn.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===Xn.DISPLAY)?"munder":"msub"}else{var s=e.base;a=s&&"op"===s.type&&s.limits&&(t.style===Xn.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===Xn.DISPLAY)?"mover":"msup"}return new ri.MathNode(a,o)}}),Lo({type:"atom",htmlBuilder:(e,t)=>Bo.mathsym(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new ri.MathNode("mo",[ni(e.text,e.mode)]);if("bin"===e.family){var n=oi(e,t);"bold-italic"===n&&r.setAttribute("mathvariant",n)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Wl={mi:"italic",mn:"normal",mtext:"normal"};Lo({type:"mathord",htmlBuilder:(e,t)=>Bo.makeOrd(e,t,"mathord"),mathmlBuilder(e,t){var r=new ri.MathNode("mi",[ni(e.text,e.mode,t)]),n=oi(e,t)||"italic";return n!==Wl[r.type]&&r.setAttribute("mathvariant",n),r}}),Lo({type:"textord",htmlBuilder:(e,t)=>Bo.makeOrd(e,t,"textord"),mathmlBuilder(e,t){var r,n=ni(e.text,e.mode,t),a=oi(e,t)||"normal";return r="text"===e.mode?new ri.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new ri.MathNode("mn",[n]):"\\prime"===e.text?new ri.MathNode("mo",[n]):new ri.MathNode("mi",[n]),a!==Wl[r.type]&&r.setAttribute("mathvariant",a),r}});var Kl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Gl={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Lo({type:"spacing",htmlBuilder(e,t){if(Gl.hasOwnProperty(e.text)){var r=Gl[e.text].className||"";if("text"===e.mode){var n=Bo.makeOrd(e,t,"textord");return n.classes.push(r),n}return Bo.makeSpan(["mspace",r],[Bo.mathsym(e.text,e.mode,t)],t)}if(Kl.hasOwnProperty(e.text))return Bo.makeSpan(["mspace",Kl[e.text]],[],t);throw new Rn('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Gl.hasOwnProperty(e.text)){if(Kl.hasOwnProperty(e.text))return new ri.MathNode("mspace");throw new Rn('Unknown type of space "'+e.text+'"')}return new ri.MathNode("mtext",[new ri.TextNode(" ")])}});var Zl=()=>{var e=new ri.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};Lo({type:"tag",mathmlBuilder(e,t){var r=new ri.MathNode("mtable",[new ri.MathNode("mtr",[Zl(),new ri.MathNode("mtd",[li(e.body,t)]),Zl(),new ri.MathNode("mtd",[li(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Xl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Yl={"\\textbf":"textbf","\\textmd":"textmd"},Ql={"\\textit":"textit","\\textup":"textup"},Jl=(e,t)=>{var r=e.font;return r?Xl[r]?t.withTextFontFamily(Xl[r]):Yl[r]?t.withTextFontWeight(Yl[r]):t.withTextFontShape(Ql[r]):t};Io({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:r,funcName:n}=e,a=t[0];return{type:"text",mode:r.mode,body:Po(a),font:n}},htmlBuilder(e,t){var r=Jl(e,t),n=Uo(e.body,r,!0);return Bo.makeSpan(["mord","text"],n,r)},mathmlBuilder(e,t){var r=Jl(e,t);return li(e.body,r)}}),Io({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Xo(e.body,t),n=Bo.makeLineSpan("underline-line",t),a=t.fontMetrics().defaultRuleThickness,o=Bo.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]},t);return Bo.makeSpan(["mord","underline"],[o],t)},mathmlBuilder(e,t){var r=new ri.MathNode("mo",[new ri.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ri.MathNode("munder",[si(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),Io({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Xo(e.body,t),n=t.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Bo.makeVList({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]},t)},mathmlBuilder:(e,t)=>new ri.MathNode("mpadded",[si(e.body,t)],["vcenter"])}),Io({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Rn("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=es(e),n=[],a=t.havingStyle(t.style.text()),o=0;o<r.length;o++){var i=r[o];"~"===i&&(i="\\textasciitilde"),n.push(Bo.makeSymbol(i,"Typewriter-Regular",e.mode,a,["mord","texttt"]))}return Bo.makeSpan(["mord","text"].concat(a.sizingClasses(t)),Bo.tryCombineChars(n),a)},mathmlBuilder(e,t){var r=new ri.TextNode(es(e)),n=new ri.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var es=e=>e.body.replace(/ /g,e.star?"␣":" "),ts=Oo,rs="[ \r\n\t]",ns="(\\\\[a-zA-Z@]+)"+rs+"*",as="[̀-ͯ]",os=new RegExp(as+"+$"),is="("+rs+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿]"+as+"*|[\ud800-\udbff][\udc00-\udfff]"+as+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+ns+"|\\\\[^\ud800-\udfff])";class ls{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(is,"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 On("EOF",new An(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new Rn("Unexpected character: '"+e[t]+"'",new On(e[t],new An(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){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 On(n,new An(this,t,this.tokenRegex.lastIndex))}}class ss{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 Rn("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,r){if(void 0===r&&(r=!1),r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][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 cs=ml;pl("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),pl("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),pl("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),pl("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),pl("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),pl("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),pl("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var ds={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};pl("\\char",(function(e){var t,r=e.popToken(),n="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new Rn("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=ds[r.text])||n>=t)throw new Rn("Invalid base-"+t+" digit "+r.text);for(var a;null!=(a=ds[e.future().text])&&a<t;)n*=t,n+=a,e.popToken()}return"\\@char{"+n+"}"}));var us=(e,t,r)=>{var n=e.consumeArg().tokens;if(1!==n.length)throw new Rn("\\newcommand's first argument must be a macro name");var a=n[0].text,o=e.isDefined(a);if(o&&!t)throw new Rn("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!o&&!r)throw new Rn("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var i=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[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 Rn("Invalid number of arguments: "+l);i=parseInt(l),n=e.consumeArg().tokens}return e.macros.set(a,{tokens:n,numArgs:i}),""};pl("\\newcommand",(e=>us(e,!1,!0))),pl("\\renewcommand",(e=>us(e,!0,!1))),pl("\\providecommand",(e=>us(e,!0,!0))),pl("\\message",(e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map((e=>e.text)).join("")),""})),pl("\\errmessage",(e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map((e=>e.text)).join("")),""})),pl("\\show",(e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),ts[r],Oa.math[r],Oa.text[r]),""})),pl("\\bgroup","{"),pl("\\egroup","}"),pl("~","\\nobreakspace"),pl("\\lq","`"),pl("\\rq","'"),pl("\\aa","\\r a"),pl("\\AA","\\r A"),pl("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),pl("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),pl("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),pl("ℬ","\\mathscr{B}"),pl("ℰ","\\mathscr{E}"),pl("ℱ","\\mathscr{F}"),pl("ℋ","\\mathscr{H}"),pl("ℐ","\\mathscr{I}"),pl("ℒ","\\mathscr{L}"),pl("ℳ","\\mathscr{M}"),pl("ℛ","\\mathscr{R}"),pl("ℭ","\\mathfrak{C}"),pl("ℌ","\\mathfrak{H}"),pl("ℨ","\\mathfrak{Z}"),pl("\\Bbbk","\\Bbb{k}"),pl("·","\\cdotp"),pl("\\llap","\\mathllap{\\textrm{#1}}"),pl("\\rlap","\\mathrlap{\\textrm{#1}}"),pl("\\clap","\\mathclap{\\textrm{#1}}"),pl("\\mathstrut","\\vphantom{(}"),pl("\\underbar","\\underline{\\text{#1}}"),pl("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),pl("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),pl("\\ne","\\neq"),pl("≠","\\neq"),pl("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),pl("∉","\\notin"),pl("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),pl("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),pl("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),pl("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),pl("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),pl("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),pl("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),pl("⟂","\\perp"),pl("‼","\\mathclose{!\\mkern-0.8mu!}"),pl("∌","\\notni"),pl("⌜","\\ulcorner"),pl("⌝","\\urcorner"),pl("⌞","\\llcorner"),pl("⌟","\\lrcorner"),pl("©","\\copyright"),pl("®","\\textregistered"),pl("️","\\textregistered"),pl("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),pl("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),pl("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),pl("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),pl("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),pl("⋮","\\vdots"),pl("\\varGamma","\\mathit{\\Gamma}"),pl("\\varDelta","\\mathit{\\Delta}"),pl("\\varTheta","\\mathit{\\Theta}"),pl("\\varLambda","\\mathit{\\Lambda}"),pl("\\varXi","\\mathit{\\Xi}"),pl("\\varPi","\\mathit{\\Pi}"),pl("\\varSigma","\\mathit{\\Sigma}"),pl("\\varUpsilon","\\mathit{\\Upsilon}"),pl("\\varPhi","\\mathit{\\Phi}"),pl("\\varPsi","\\mathit{\\Psi}"),pl("\\varOmega","\\mathit{\\Omega}"),pl("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),pl("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),pl("\\boxed","\\fbox{$\\displaystyle{#1}$}"),pl("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),pl("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),pl("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var hs={",":"\\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"};pl("\\dots",(function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in hs?t=hs[r]:("\\not"===r.slice(0,4)||r in Oa.math&&Pn.contains(["bin","rel"],Oa.math[r].group))&&(t="\\dotsb"),t}));var ms={")":!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};pl("\\dotso",(function(e){return e.future().text in ms?"\\ldots\\,":"\\ldots"})),pl("\\dotsc",(function(e){var t=e.future().text;return t in ms&&","!==t?"\\ldots\\,":"\\ldots"})),pl("\\cdots",(function(e){return e.future().text in ms?"\\@cdots\\,":"\\@cdots"})),pl("\\dotsb","\\cdots"),pl("\\dotsm","\\cdots"),pl("\\dotsi","\\!\\cdots"),pl("\\dotsx","\\ldots\\,"),pl("\\DOTSI","\\relax"),pl("\\DOTSB","\\relax"),pl("\\DOTSX","\\relax"),pl("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),pl("\\,","\\tmspace+{3mu}{.1667em}"),pl("\\thinspace","\\,"),pl("\\>","\\mskip{4mu}"),pl("\\:","\\tmspace+{4mu}{.2222em}"),pl("\\medspace","\\:"),pl("\\;","\\tmspace+{5mu}{.2777em}"),pl("\\thickspace","\\;"),pl("\\!","\\tmspace-{3mu}{.1667em}"),pl("\\negthinspace","\\!"),pl("\\negmedspace","\\tmspace-{4mu}{.2222em}"),pl("\\negthickspace","\\tmspace-{5mu}{.277em}"),pl("\\enspace","\\kern.5em "),pl("\\enskip","\\hskip.5em\\relax"),pl("\\quad","\\hskip1em\\relax"),pl("\\qquad","\\hskip2em\\relax"),pl("\\tag","\\@ifstar\\tag@literal\\tag@paren"),pl("\\tag@paren","\\tag@literal{({#1})}"),pl("\\tag@literal",(e=>{if(e.macros.get("\\df@tag"))throw new Rn("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),pl("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),pl("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),pl("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),pl("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),pl("\\newline","\\\\\\relax"),pl("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ps=ga(na["Main-Regular"]["T".charCodeAt(0)][1]-.7*na["Main-Regular"]["A".charCodeAt(0)][1]);pl("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+ps+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),pl("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ps+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),pl("\\hspace","\\@ifstar\\@hspacer\\@hspace"),pl("\\@hspace","\\hskip #1\\relax"),pl("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),pl("\\ordinarycolon",":"),pl("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),pl("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),pl("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),pl("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),pl("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),pl("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),pl("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),pl("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),pl("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),pl("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),pl("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),pl("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),pl("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),pl("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),pl("∷","\\dblcolon"),pl("∹","\\eqcolon"),pl("≔","\\coloneqq"),pl("≕","\\eqqcolon"),pl("⩴","\\Coloneqq"),pl("\\ratio","\\vcentcolon"),pl("\\coloncolon","\\dblcolon"),pl("\\colonequals","\\coloneqq"),pl("\\coloncolonequals","\\Coloneqq"),pl("\\equalscolon","\\eqqcolon"),pl("\\equalscoloncolon","\\Eqqcolon"),pl("\\colonminus","\\coloneq"),pl("\\coloncolonminus","\\Coloneq"),pl("\\minuscolon","\\eqcolon"),pl("\\minuscoloncolon","\\Eqcolon"),pl("\\coloncolonapprox","\\Colonapprox"),pl("\\coloncolonsim","\\Colonsim"),pl("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pl("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pl("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pl("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pl("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),pl("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),pl("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),pl("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),pl("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),pl("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),pl("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),pl("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),pl("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),pl("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),pl("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),pl("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),pl("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),pl("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),pl("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),pl("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),pl("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),pl("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),pl("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),pl("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),pl("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),pl("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),pl("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),pl("\\imath","\\html@mathml{\\@imath}{ı}"),pl("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),pl("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),pl("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),pl("⟦","\\llbracket"),pl("⟧","\\rrbracket"),pl("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),pl("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),pl("⦃","\\lBrace"),pl("⦄","\\rBrace"),pl("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),pl("⦵","\\minuso"),pl("\\darr","\\downarrow"),pl("\\dArr","\\Downarrow"),pl("\\Darr","\\Downarrow"),pl("\\lang","\\langle"),pl("\\rang","\\rangle"),pl("\\uarr","\\uparrow"),pl("\\uArr","\\Uparrow"),pl("\\Uarr","\\Uparrow"),pl("\\N","\\mathbb{N}"),pl("\\R","\\mathbb{R}"),pl("\\Z","\\mathbb{Z}"),pl("\\alef","\\aleph"),pl("\\alefsym","\\aleph"),pl("\\Alpha","\\mathrm{A}"),pl("\\Beta","\\mathrm{B}"),pl("\\bull","\\bullet"),pl("\\Chi","\\mathrm{X}"),pl("\\clubs","\\clubsuit"),pl("\\cnums","\\mathbb{C}"),pl("\\Complex","\\mathbb{C}"),pl("\\Dagger","\\ddagger"),pl("\\diamonds","\\diamondsuit"),pl("\\empty","\\emptyset"),pl("\\Epsilon","\\mathrm{E}"),pl("\\Eta","\\mathrm{H}"),pl("\\exist","\\exists"),pl("\\harr","\\leftrightarrow"),pl("\\hArr","\\Leftrightarrow"),pl("\\Harr","\\Leftrightarrow"),pl("\\hearts","\\heartsuit"),pl("\\image","\\Im"),pl("\\infin","\\infty"),pl("\\Iota","\\mathrm{I}"),pl("\\isin","\\in"),pl("\\Kappa","\\mathrm{K}"),pl("\\larr","\\leftarrow"),pl("\\lArr","\\Leftarrow"),pl("\\Larr","\\Leftarrow"),pl("\\lrarr","\\leftrightarrow"),pl("\\lrArr","\\Leftrightarrow"),pl("\\Lrarr","\\Leftrightarrow"),pl("\\Mu","\\mathrm{M}"),pl("\\natnums","\\mathbb{N}"),pl("\\Nu","\\mathrm{N}"),pl("\\Omicron","\\mathrm{O}"),pl("\\plusmn","\\pm"),pl("\\rarr","\\rightarrow"),pl("\\rArr","\\Rightarrow"),pl("\\Rarr","\\Rightarrow"),pl("\\real","\\Re"),pl("\\reals","\\mathbb{R}"),pl("\\Reals","\\mathbb{R}"),pl("\\Rho","\\mathrm{P}"),pl("\\sdot","\\cdot"),pl("\\sect","\\S"),pl("\\spades","\\spadesuit"),pl("\\sub","\\subset"),pl("\\sube","\\subseteq"),pl("\\supe","\\supseteq"),pl("\\Tau","\\mathrm{T}"),pl("\\thetasym","\\vartheta"),pl("\\weierp","\\wp"),pl("\\Zeta","\\mathrm{Z}"),pl("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),pl("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),pl("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),pl("\\bra","\\mathinner{\\langle{#1}|}"),pl("\\ket","\\mathinner{|{#1}\\rangle}"),pl("\\braket","\\mathinner{\\langle{#1}\\rangle}"),pl("\\Bra","\\left\\langle#1\\right|"),pl("\\Ket","\\left|#1\\right\\rangle");var fs=e=>t=>{var r=t.consumeArg().tokens,n=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=>r=>{e&&(r.macros.set("|",i),a.length&&r.macros.set("\\|",l));var o=t;!t&&a.length&&("|"===r.future().text&&(r.popToken(),o=!0));return{tokens:o?a:n,numArgs:0}};t.macros.set("|",s(!1)),a.length&&t.macros.set("\\|",s(!0));var c=t.consumeArg().tokens,d=t.expandTokens([...o,...c,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}};pl("\\bra@ket",fs(!1)),pl("\\bra@set",fs(!0)),pl("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),pl("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),pl("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),pl("\\angln","{\\angl n}"),pl("\\blue","\\textcolor{##6495ed}{#1}"),pl("\\orange","\\textcolor{##ffa500}{#1}"),pl("\\pink","\\textcolor{##ff00af}{#1}"),pl("\\red","\\textcolor{##df0030}{#1}"),pl("\\green","\\textcolor{##28ae7b}{#1}"),pl("\\gray","\\textcolor{gray}{#1}"),pl("\\purple","\\textcolor{##9d38bd}{#1}"),pl("\\blueA","\\textcolor{##ccfaff}{#1}"),pl("\\blueB","\\textcolor{##80f6ff}{#1}"),pl("\\blueC","\\textcolor{##63d9ea}{#1}"),pl("\\blueD","\\textcolor{##11accd}{#1}"),pl("\\blueE","\\textcolor{##0c7f99}{#1}"),pl("\\tealA","\\textcolor{##94fff5}{#1}"),pl("\\tealB","\\textcolor{##26edd5}{#1}"),pl("\\tealC","\\textcolor{##01d1c1}{#1}"),pl("\\tealD","\\textcolor{##01a995}{#1}"),pl("\\tealE","\\textcolor{##208170}{#1}"),pl("\\greenA","\\textcolor{##b6ffb0}{#1}"),pl("\\greenB","\\textcolor{##8af281}{#1}"),pl("\\greenC","\\textcolor{##74cf70}{#1}"),pl("\\greenD","\\textcolor{##1fab54}{#1}"),pl("\\greenE","\\textcolor{##0d923f}{#1}"),pl("\\goldA","\\textcolor{##ffd0a9}{#1}"),pl("\\goldB","\\textcolor{##ffbb71}{#1}"),pl("\\goldC","\\textcolor{##ff9c39}{#1}"),pl("\\goldD","\\textcolor{##e07d10}{#1}"),pl("\\goldE","\\textcolor{##a75a05}{#1}"),pl("\\redA","\\textcolor{##fca9a9}{#1}"),pl("\\redB","\\textcolor{##ff8482}{#1}"),pl("\\redC","\\textcolor{##f9685d}{#1}"),pl("\\redD","\\textcolor{##e84d39}{#1}"),pl("\\redE","\\textcolor{##bc2612}{#1}"),pl("\\maroonA","\\textcolor{##ffbde0}{#1}"),pl("\\maroonB","\\textcolor{##ff92c6}{#1}"),pl("\\maroonC","\\textcolor{##ed5fa6}{#1}"),pl("\\maroonD","\\textcolor{##ca337c}{#1}"),pl("\\maroonE","\\textcolor{##9e034e}{#1}"),pl("\\purpleA","\\textcolor{##ddd7ff}{#1}"),pl("\\purpleB","\\textcolor{##c6b9fc}{#1}"),pl("\\purpleC","\\textcolor{##aa87ff}{#1}"),pl("\\purpleD","\\textcolor{##7854ab}{#1}"),pl("\\purpleE","\\textcolor{##543b78}{#1}"),pl("\\mintA","\\textcolor{##f5f9e8}{#1}"),pl("\\mintB","\\textcolor{##edf2df}{#1}"),pl("\\mintC","\\textcolor{##e0e5cc}{#1}"),pl("\\grayA","\\textcolor{##f6f7f7}{#1}"),pl("\\grayB","\\textcolor{##f0f1f2}{#1}"),pl("\\grayC","\\textcolor{##e3e5e6}{#1}"),pl("\\grayD","\\textcolor{##d6d8da}{#1}"),pl("\\grayE","\\textcolor{##babec2}{#1}"),pl("\\grayF","\\textcolor{##888d93}{#1}"),pl("\\grayG","\\textcolor{##626569}{#1}"),pl("\\grayH","\\textcolor{##3b3e40}{#1}"),pl("\\grayI","\\textcolor{##21242c}{#1}"),pl("\\kaBlue","\\textcolor{##314453}{#1}"),pl("\\kaGreen","\\textcolor{##71B307}{#1}");var gs={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class vs{constructor(e,t,r){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 ss(cs,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new ls(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,r,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:n,end:r}=this.consumeArg(["]"]))}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new On("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,a=this.future(),o=0,i=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new Rn("Extra }",n)}else if("EOF"===n.text)throw new Rn("Unexpected end of input in a macro argument, expected '"+(e&&r?e[i]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[i])&&n.text===e[i]){if(++i===e.length){t.splice(-i,i);break}}else i=0}while(0!==o||r);return"{"===a.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:a,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Rn("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;n<r.length;n++){var a=this.popToken();if(r[n]!==a.text)throw new Rn("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 Rn("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new Rn("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var i=(a=a.slice()).length-1;i>=0;--i){var l=a[i];if("#"===l.text){if(0===i)throw new Rn("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 Rn("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 On(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}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 r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var n="function"==typeof t?t(this):t;if("string"==typeof n){var a=0;if(-1!==n.indexOf("#"))for(var o=n.replace(/##/g,"");-1!==o.indexOf("#"+(a+1));)++a;for(var i=new ls(n,this.settings),l=[],s=i.lex();"EOF"!==s.text;)l.push(s),s=i.lex();return l.reverse(),{tokens:l,numArgs:a}}return n}isDefined(e){return this.macros.has(e)||ts.hasOwnProperty(e)||Oa.math.hasOwnProperty(e)||Oa.text.hasOwnProperty(e)||gs.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:ts.hasOwnProperty(e)&&!ts[e].primitive}}var bs=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ys=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),ws={"́":{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"}},xs={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class ks{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 vs(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 Rn("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 On("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==ks.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&ts[n.text]&&ts[n.text].infix)break;var a=this.parseAtom(t);if(!a)break;"internal"!==a.type&&r.push(a)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n<e.length;n++)if("infix"===e[n].type){if(-1!==r)throw new Rn("only one infix operator per group",e[n].token);r=n,t=e[n].replaceWith}if(-1!==r&&t){var a,o,i=e.slice(0,r),l=e.slice(r+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[r],o],[]):this.callFunction(t,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),r=t.text;this.consume(),this.consumeSpaces();var n=this.parseGroup(e);if(!n)throw new Rn("Expected group after '"+r+"'",t);return n}formatUnsupportedCmd(e){for(var t=[],r=0;r<e.length;r++)t.push({type:"textord",mode:"text",text:e[r]});var n={type:"text",mode:this.mode,body:t};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[n]}}parseAtom(e){var t,r,n=this.parseGroup("atom",e);if("text"===this.mode)return n;for(;;){this.consumeSpaces();var a=this.fetch();if("\\limits"===a.text||"\\nolimits"===a.text){if(n&&"op"===n.type){var o="\\limits"===a.text;n.limits=o,n.alwaysHandleSupSub=!0}else{if(!n||"operatorname"!==n.type)throw new Rn("Limit controls must follow a math operator",a);n.alwaysHandleSupSub&&(n.limits="\\limits"===a.text)}this.consume()}else if("^"===a.text){if(t)throw new Rn("Double superscript",a);t=this.handleSupSubscript("superscript")}else if("_"===a.text){if(r)throw new Rn("Double subscript",a);r=this.handleSupSubscript("subscript")}else if("'"===a.text){if(t)throw new Rn("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(!ys[a.text])break;var s=bs.test(a.text),c=[];for(c.push(new On(ys[a.text])),this.consume();;){var d=this.fetch().text;if(!ys[d])break;if(bs.test(d)!==s)break;c.unshift(new On(ys[d])),this.consume()}var u=this.subparse(c);s?r={type:"ordgroup",mode:"math",body:u}:t={type:"ordgroup",mode:"math",body:u}}}return t||r?{type:"supsub",mode:this.mode,base:n,sup:t,sub:r}:n}parseFunction(e,t){var r=this.fetch(),n=r.text,a=ts[n];if(!a)return null;if(this.consume(),t&&"atom"!==t&&!a.allowedInArgument)throw new Rn("Got function '"+n+"' with no arguments"+(t?" as "+t:""),r);if("text"===this.mode&&!a.allowedInText)throw new Rn("Can't use function '"+n+"' in text mode",r);if("math"===this.mode&&!1===a.allowedInMath)throw new Rn("Can't use function '"+n+"' in math mode",r);var{args:o,optArgs:i}=this.parseArguments(n,a);return this.callFunction(n,o,i,r,e)}callFunction(e,t,r,n,a){var o={funcName:e,parser:this,token:n,breakOnTokenText:a},i=ts[e];if(i&&i.handler)return i.handler(o,t,r);throw new Rn("No function handler for "+e)}parseArguments(e,t){var r=t.numArgs+t.numOptionalArgs;if(0===r)return{args:[],optArgs:[]};for(var n=[],a=[],o=0;o<r;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 Rn("Null argument, please report this as a bug");n.push(s)}}return{args:n,optArgs:a}}parseGroupOfType(e,t,r){switch(t){case"color":return this.parseColorGroup(r);case"size":return this.parseSizeGroup(r);case"url":return this.parseUrlGroup(r);case"math":case"text":return this.parseArgumentGroup(r,t);case"hbox":var n=this.parseArgumentGroup(r,"text");return null!=n?{type:"styling",mode:n.mode,body:[n],style:"text"}:null;case"raw":var a=this.parseStringGroup("raw",r);return null!=a?{type:"raw",mode:"text",string:a.text}:null;case"primitive":if(r)throw new Rn("A primitive argument cannot be optional");var o=this.parseGroup(e);if(null==o)throw new Rn("Expected group as "+e,this.fetch());return o;case"original":case null:case void 0:return this.parseArgumentGroup(r);default:throw new Rn("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){var r=this.gullet.scanArgument(t);if(null==r)return null;for(var n,a="";"EOF"!==(n=this.fetch()).text;)a+=n.text,this.consume();return this.consume(),r.text=a,r}parseRegexGroup(e,t){for(var r,n=this.fetch(),a=n,o="";"EOF"!==(r=this.fetch()).text&&e.test(o+r.text);)o+=(a=r).text,this.consume();if(""===o)throw new Rn("Invalid "+t+": '"+n.text+"'",n);return n.range(a,o)}parseColorGroup(e){var t=this.parseStringGroup("color",e);if(null==t)return null;var r=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!r)throw new Rn("Invalid color: '"+t.text+"'",t);var n=r[0];return/^[0-9a-f]{6}$/i.test(n)&&(n="#"+n),{type:"color-token",mode:this.mode,color:n}}parseSizeGroup(e){var t,r=!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",r=!0);var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!n)throw new Rn("Invalid size: '"+t.text+"'",t);var a={number:+(n[1]+n[2]),unit:n[3]};if(!pa(a))throw new Rn("Invalid unit: '"+a.unit+"'",t);return{type:"size",mode:this.mode,value:a,isBlank:r}}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 r=t.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:r}}parseArgumentGroup(e,t){var r=this.gullet.scanArgument(e);if(null==r)return null;var n=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:r.loc,body:a};return t&&this.switchMode(n),o}parseGroup(e,t){var r,n=this.fetch(),a=n.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(),r={type:"ordgroup",mode:this.mode,loc:An.range(n,l),body:i,semisimple:"\\begingroup"===a||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===a[0]&&!gs.hasOwnProperty(a)){if(this.settings.throwOnError)throw new Rn("Undefined control sequence: "+a,n);r=this.formatUnsupportedCmd(a),this.consume()}return r}formLigatures(e){for(var t=e.length-1,r=0;r<t;++r){var n=e[r],a=n.text;"-"===a&&"-"===e[r+1].text&&(r+1<t&&"-"===e[r+2].text?(e.splice(r,3,{type:"textord",mode:"text",loc:An.range(n,e[r+2]),text:"---"}),t-=2):(e.splice(r,2,{type:"textord",mode:"text",loc:An.range(n,e[r+1]),text:"--"}),t-=1)),"'"!==a&&"`"!==a||e[r+1].text!==a||(e.splice(r,2,{type:"textord",mode:"text",loc:An.range(n,e[r+1]),text:a+a}),t-=1)}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var r=t.slice(5),n="*"===r.charAt(0);if(n&&(r=r.slice(1)),r.length<2||r.charAt(0)!==r.slice(-1))throw new Rn("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:r=r.slice(1,-1),star:n}}xs.hasOwnProperty(t[0])&&!Oa[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=xs[t[0]]+t.slice(1));var a,o=os.exec(t);if(o&&("i"===(t=t.substring(0,o.index))?t="ı":"j"===t&&(t="ȷ")),Oa[this.mode][t]){this.settings.strict&&"math"===this.mode&&uo.indexOf(t)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var i,l=Oa[this.mode][t].group,s=An.range(e);if(Ma.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&&(Jn(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:An.range(e),text:t}}if(this.consume(),o)for(var d=0;d<o[0].length;d++){var u=o[0][d];if(!ws[u])throw new Rn("Unknown accent ' "+u+"'",e);var h=ws[u][this.mode]||ws[u].text;if(!h)throw new Rn("Accent "+u+" unsupported in "+this.mode+" mode",e);a={type:"accent",mode:this.mode,loc:An.range(e),label:h,isStretchy:!1,isShifty:!0,base:a}}return a}}ks.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var Es=function(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var r=new ks(e,t);delete r.gullet.macros.current["\\df@tag"];var n=r.parse();if(delete r.gullet.macros.current["\\current@color"],delete r.gullet.macros.current["\\color"],r.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new Rn("\\tag works only in display equations");n=[{type:"tag",mode:"text",body:n,tag:r.subparse([new On("\\df@tag")])}]}return n};"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 Ss=function(e,t,r){if(r.throwOnError||!(e instanceof Rn))throw e;var n=Bo.makeSpan(["katex-error"],[new Ta(t)]);return n.setAttribute("title",e.toString()),n.setAttribute("style","color:"+r.errorColor),n},Ts=function(e,t){var r=new Hn(t);try{return function(e,t,r){var n,a=di(r);if("mathml"===r.output)return ci(e,t,a,r.displayMode,!0);if("html"===r.output){var o=Qo(e,a);n=Bo.makeSpan(["katex"],[o])}else{var i=ci(e,t,a,r.displayMode,!1),l=Qo(e,a);n=Bo.makeSpan(["katex"],[i,l])}return ui(n,r)}(Es(e,r),e,r)}catch(n){return Ss(n,e,r)}},Bs=function(e,t){return Ts(e,t).toMarkup()};const Cs={color:{type:String,default:""},defaultLaTexContent:{type:String,default:""}},_s={class:"editify-mathformula"},Ns={class:"editify-mathformula-label"},Ms=["placeholder"],As={class:"editify-mathformula-footer"},Os=Nn(t.defineComponent({name:"InsertMathformula",__name:"insertMathformula",props:Cs,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref(""),l=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},s=e=>{e.currentTarget.style.borderColor=""},c=()=>{a("insert",i.value)};return t.watch((()=>n.defaultLaTexContent),(e=>{i.value=e}),{immediate:!0}),(e,r)=>(t.openBlock(),t.createElementBlock("div",_s,[t.createElementVNode("div",Ns,t.toDisplayString(n.defaultLaTexContent?t.unref(o)("editMathformula"):t.unref(o)("insertMathformula")),1),t.withDirectives(t.createElementVNode("textarea",{class:"editify-mathformula-textarea","onUpdate:modelValue":r[0]||(r[0]=e=>i.value=e),placeholder:t.unref(o)("mathformulaPlaceholder"),onFocus:l,onBlur:s},null,40,Ms),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",As,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:c},t.toDisplayString(t.unref(o)("confirm")),5)])]))}}),[["__scopeId","data-v-980bdb1d"]]),Rs=e=>"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"],zs=e=>!!Rs(e)||!!e.parent&&zs(e.parent),Is=e=>Rs(e)?e:e.parent?Is(e.parent):null,Ls=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?zs(e.range.anchor.element):t.flatList.some((e=>zs(e.element)))),Ds=(e,t)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return Is(e.range.anchor.element);const r=t.list.map((e=>Is(e.element)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let n=!0;for(let a=1;a<r.length;a++)if(!r[a].isEqual(r[0])){n=!1;break}return n?r[0]:null},Ps=e=>"div"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-panel"],Fs=e=>!!Ps(e)||!!e.parent&&Fs(e.parent),qs=e=>Ps(e)?e:e.parent?qs(e.parent):null,Hs=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Fs(e.range.anchor.element):t.flatList.some((e=>Fs(e.element)))),$s=e=>"div"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-info"],Vs=e=>!!$s(e)||!!e.parent&&Vs(e.parent),Us=e=>$s(e)?e:e.parent?Us(e.parent):null,js=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Vs(e.range.anchor.element):t.flatList.every((e=>Vs(e.element)))),Ws=(e,t)=>{if("table"==t.parsedom){const r={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,r):t.marks=r;const n={"white-space":"pre-wrap","word-break":"break-word"};t.hasStyles()?Object.assign(t.styles,n):t.styles=n;const a=y.flatElements(t.children),o=a.filter((e=>"tr"==e.parsedom)),{rowNumber:i,columnNumber:l}=qr(o);let s=a.find((e=>"colgroup"==e.parsedom));if(s){s.children.forEach((e=>{e.hasMarks()?e.marks.width||(e.marks.width="auto"):e.marks={width:"auto"}}));const t=s.children.length;if(t<l)for(let r=0;r<l-t;r++){const t=y.create({type:"closed",parsedom:"col",marks:{width:"auto"}});e.addElementTo(t,s,s.children.length)}}else{const e=[];for(let t=l-1;t>=0;t--)e.push({type:"closed",parsedom:"col",marks:{width:"auto"}});s=y.create({type:"inblock",parsedom:"colgroup",children:e})}((e,t,r,n)=>{y.flatElements(t).forEach((t=>{if("td"==t.parsedom&&t.hasMarks()){t.marks["data-editify-merged"]&&delete t.marks["data-editify-merged"];const r=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),a=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(r>1){let a=1;for(;a<r&&t.parent.children.length<n;){const r=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});e.addElementAfter(r,t),a++}}if(a>1){let o=t,i=1;for(;i<a&&e.getNextElement(o.parent)&&e.getNextElement(o.parent).children.length<n;){const t=e.getNextElement(o.parent),n=o.parent.children.findIndex((e=>e.isEqual(o))),a=t.children[n];for(let o=0;o<r;o++){const r=y.create({type:"inblock",parsedom:"td",marks:{"data-editify-merged":"true"},children:[{type:"closed",parsedom:"br"}]});a?e.addElementBefore(r,a):e.addElementTo(r,t,t.children.length)}o=t.children[n],i++}}}})),t.forEach((t=>{const r=t.children.length;if(r<n)for(let a=0;a<n-r;a++){const r=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});e.addElementTo(r,t,t.children.length)}}));const a=t.length;if(a<r)for(let o=0;o<r-a;o++){const e=[];for(let t=0;t<n;t++)e.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const r=y.create({type:"inblock",parsedom:"tr",children:e});t.push(r)}})(e,o,i,l),t.children=[];const c=y.create({type:"inblock",parsedom:"tbody"});o.forEach((t=>{const r=c.hasChildren()?c.children.length:0;e.addElementTo(t,c,r)})),e.addElementTo(c,t),e.addElementTo(s,t),((e,t)=>{y.flatElements(t).filter((e=>"td"==e.parsedom)).forEach((t=>{if(t.hasMarks()&&!t.marks["data-editify-merged"]){const r=isNaN(Number(t.marks.colspan))?1:Number(t.marks.colspan),n=isNaN(Number(t.marks.rowspan))?1:Number(t.marks.rowspan);if(r>1){let n=t,a=1;for(;a<r;){const t=e.getNextElement(n);if(!t)break;t.hasMarks()?t.marks["data-editify-merged"]="true":t.marks={"data-editify-merged":"true"},n=t,a++}}if(n>1){const a=t.parent.children.findIndex((e=>e.isEqual(t)));let o=t,i=1;for(;i<n&&o&&e.getNextElement(o.parent);){const t=e.getNextElement(o.parent);for(let e=a;e<a+r;e++){const r=t.children[e];r&&(r.hasMarks()?r.marks["data-editify-merged"]="true":r.marks={"data-editify-merged":"true"})}o=t.children[a],i++}}}}))})(e,o)}},Ks=(e,t,r,n)=>{if("pre"==t.parsedom){const a={"data-editify-element":t.key};if(t.hasMarks()?Object.assign(t.marks,a):t.marks=a,r&&t.hasChildren()){let r=t.marks["data-editify-hljs"]||"";if(r&&n){n.some((e=>ae.isObject(e)?e.value==r:e==r))||(r="")}const a=y.flatElements(t.children).filter((e=>e.isText()&&!e.isEmpty())),o=function(e,t){return t?kt.highlight(e,{language:t,ignoreIllegals:!0}).value:kt.highlightAuto(e).value}(a.reduce(((e,t)=>e+t.textContent),""),r);if(o){const r=e.parseHtml(o);t.children=r,r.forEach((e=>{e.parent=t})),((e,t,r,n)=>{if(e.range){if(e.range.anchor.element.getBlock().isEqual(t)){const t=r.findIndex((t=>e.range.anchor.element.isEqual(t))),a=r.filter(((e,r)=>r<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.anchor.offset,o=y.flatElements(n).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=r.findIndex((t=>e.range.focus.element.isEqual(t))),a=r.filter(((e,r)=>r<t)).reduce(((e,t)=>e+t.textContent.length),0)+e.range.focus.offset,o=y.flatElements(n).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,r)}else{const r=y.create({type:"closed",parsedom:"br"});t.children=[r],r.parent=t,e.range&&(e.range.anchor.moveToStart(r),e.range.focus.moveToStart(r))}}}},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=Nn(t.defineComponent({name:"Triangle",__name:"triangle",props:Gs,setup(e){const r=e,n=t.computed((()=>"top"==r.placement?{borderBottomColor:r.color||""}:"bottom"==r.placement?{borderTopColor:r.color||""}:"left"==r.placement?{borderRightColor:r.color||""}:"right"==r.placement?{borderLeftColor:r.color||""}:{})),a=t.computed((()=>"top"==r.placement?{borderBottomColor:r.background||""}:"bottom"==r.placement?{borderTopColor:r.background||""}:"left"==r.placement?{borderRightColor:r.background||""}:"right"==r.placement?{borderLeftColor:r.background||""}:{}));return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"editify-triangle",style:t.normalizeStyle(n.value),"data-editify-placement":e.placement},[t.createElementVNode("div",{class:"editify-triangle-el",style:t.normalizeStyle(a.value)},null,4)],12,Zs))}}),[["__scopeId","data-v-e1abc967"]]),Ys={modelValue:{type:Boolean,default:!1},node:{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:10},animation:{type:String,default:null,validator:e=>["translate","fade",null].includes(e)},useRange:{type:Boolean,default:!1}},Qs=["data-editify-placement"],Js=Nn(t.defineComponent({name:"Layer",__name:"layer",props:Ys,emits:["update:modelValue","show","shown","hidden"],setup(e,{expose:r,emit:n}){const a=t.getCurrentInstance(),o=e,i=n,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")),h=t.computed((()=>({borderColor:o.border&&o.borderColor||"",background:o.background||"",color:o.color||""}))),m=()=>o.node?te.isElement(o.node)?o.node:document.body.querySelector(o.node):null,p=()=>{l.value=null;const e=window.getSelection();if(e&&e.rangeCount){const r=e.getRangeAt(0).getClientRects();if(r.length){const e=r[0],n=r[r.length-1],a=te.getElementBounding(c.value.offsetParent),i=document.documentElement.clientHeight||window.innerHeight,u=document.documentElement.clientWidth||window.innerWidth;"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?e.top>=0&&e.top>=a.top&&e.top>=c.value.offsetHeight?l.value=o.placement:i-n.bottom>=0&&i-n.bottom>=a.bottom&&i-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||(i-n.bottom>=0&&i-n.bottom>=a.bottom&&i-n.bottom>=c.value.offsetHeight?l.value=o.placement:e.top>=0&&e.top>=a.top&&e.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?u-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?u-n.right+n.width/2<c.value.offsetWidth/2?l.value="bottom-end":n.left+n.width/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"top-start"==l.value?u-e.right+e.width<c.value.offsetWidth&&(u-e.right+e.width/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"bottom-start"==l.value?u-n.right+n.width<c.value.offsetWidth&&(u-n.right+n.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&&n.left+n.width<c.value.offsetWidth&&(n.left+n.width/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-end"==l.value?(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px",c.value.style.top=e.top-a.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px",c.value.style.top="auto",c.value.style.bottom=i-n.bottom-a.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=(a.bottom<0?-a.bottom:0)+"px","top"==o.placement?u-e.right+e.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):e.left+e.width/2<c.value.offsetWidth/2?(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"bottom"==o.placement?u-n.right+n.width/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px"):n.left+n.width/2<c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement?u-e.right+e.width<c.value.offsetWidth?u-e.right+e.width/2>=c.value.offsetWidth/2?(c.value.style.left=e.left-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):"bottom-start"==o.placement?u-n.right+n.width<c.value.offsetWidth?u-n.right+n.width/2>=c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-n.right-a.right+"px"):(c.value.style.left=n.left-a.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-a.left+e.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=e.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-e.right-a.right+"px"):"bottom-end"==o.placement&&(n.left+n.width<c.value.offsetWidth?n.left+n.width/2>=c.value.offsetWidth/2?(c.value.style.left=n.left-a.left+n.width/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=n.left-a.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=u-n.right-a.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],r=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>r.width?r.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>r.width?r.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")}}})()}))}}},f=()=>{const e=m();if(!te.isElement(e))return;l.value=null;const r=te.getElementBounding(e),n=te.getElementBounding(c.value.offsetParent);"top"==o.placement||"top-start"==o.placement||"top-end"==o.placement?r.top>=0&&r.top>=n.top&&r.top>=c.value.offsetHeight?l.value=o.placement:r.bottom>=0&&r.bottom>=n.bottom&&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||(r.bottom>=0&&r.bottom>=n.bottom&&r.bottom>=c.value.offsetHeight?l.value=o.placement:r.top>=0&&r.top>=n.top&&r.top>=c.value.offsetHeight&&(l.value="bottom"==o.placement?"top":"bottom-start"==o.placement?"top-start":"top-end")),"top"==l.value?r.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="top-end":r.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="top-start"):"top-start"==l.value?r.right+e.offsetWidth<c.value.offsetWidth&&(r.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-end"):"top-end"==l.value?r.left+e.offsetWidth<c.value.offsetWidth&&(r.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="top":l.value="top-start"):"bottom"==l.value?r.right+e.offsetWidth/2<c.value.offsetWidth/2?l.value="bottom-end":r.left+e.offsetWidth/2<c.value.offsetWidth/2&&(l.value="bottom-start"):"bottom-start"==l.value?r.right+e.offsetWidth<c.value.offsetWidth&&(r.right+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-end"):"bottom-end"==l.value&&r.left+e.offsetWidth<c.value.offsetWidth&&(r.left+e.offsetWidth/2>=c.value.offsetWidth/2?l.value="bottom":l.value="bottom-start"),t.nextTick((()=>{"top"==l.value?(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto",c.value.style.top=r.top-n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"top-start"==l.value?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto",c.value.style.top=r.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=r.right-n.right+"px",c.value.style.top=r.top-n.top-c.value.offsetHeight+"px",c.value.style.bottom="auto"):"bottom"==l.value?(c.value.style.left=r.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=r.bottom-n.bottom-c.value.offsetHeight+"px"):"bottom-start"==l.value?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto",c.value.style.top="auto",c.value.style.bottom=r.bottom-n.bottom-c.value.offsetHeight+"px"):"bottom-end"==l.value?(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px",c.value.style.top="auto",c.value.style.bottom=r.bottom-n.bottom-c.value.offsetHeight+"px"):(c.value.style.top="auto",c.value.style.bottom=(n.bottom<0?-n.bottom:0)+"px","top"==o.placement||"bottom"==o.placement?r.right+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px"):r.left+e.offsetWidth/2<c.value.offsetWidth/2?(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):"top-start"==o.placement||"bottom-start"==o.placement?r.right+e.offsetWidth<c.value.offsetWidth?r.right+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=r.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=r.right-n.right+"px"):(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):"top-end"!=o.placement&&"bottom-end"!=o.placement||(r.left+e.offsetWidth<c.value.offsetWidth?r.left+e.offsetWidth/2>=c.value.offsetWidth/2?(c.value.style.left=r.left-n.left+e.offsetWidth/2-c.value.offsetWidth/2+"px",c.value.style.right="auto"):(c.value.style.left=r.left-n.left+"px",c.value.style.right="auto"):(c.value.style.left="auto",c.value.style.right=r.right-n.right+"px"))),o.showTriangle&&(()=>{const e=m();te.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"))})()}))},g=()=>{o.useRange?p():f()},v=e=>{g(),i("show",e)},b=e=>{i("shown",e)},y=e=>{i("hidden",e)},w=()=>{o.modelValue&&i("update:modelValue",!1)},x=e=>{te.isElement(c.value)&&(te.isContains(c.value.offsetParent,e.target)||o.modelValue&&i("update:modelValue",!1))};return t.onMounted((()=>{o.modelValue&&g(),le.on(window,`click.editify_layer_${a.uid}`,x),le.on(window,`resize.editify_layer_${a.uid}`,w)})),t.onBeforeUnmount((()=>{le.off(window,`click.editify_layer_${a.uid} resize.editify_layer_${a.uid}`)})),r({setPosition:g}),(e,r)=>(t.openBlock(),t.createBlock(t.Transition,{name:e.animation?"editify-layer-"+e.animation:"editify-layer",onEnter:v,onAfterEnter:b,onAfterLeave:y},{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(Xs,{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(h.value)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],6)],12,Qs)):t.createCommentVNode("",!0)])),_:3},8,["name"]))}}),[["__scopeId","data-v-09578d83"]]),ec={content:{type:String,default:""},disabled:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},tc={class:"editify-tooltip-content"},rc=Nn(t.defineComponent({name:"Tooltip",__name:"tooltip",props:ec,setup(e){const r=e,n=t.ref(!1),a=t.ref(null),o=()=>{r.disabled||(n.value=!0)},i=()=>{r.disabled||(n.value=!1)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-tooltip",{"editify-block":e.block}])},[t.createElementVNode("div",{ref_key:"targetRef",ref:a,class:"editify-tooltip-target",onMouseenter:o,onMouseleave:i},[t.renderSlot(e.$slots,"default",{},void 0,!0)],544),t.createVNode(Js,{modelValue:n.value,"onUpdate:modelValue":r[0]||(r[0]=e=>n.value=e),node:a.value,border:"","border-color":"#000",background:"#000","show-triangle":"",color:"#fff",placement:"bottom",animation:"fade","z-index":10},{default:t.withCtx((()=>[t.createElementVNode("div",tc,t.toDisplayString(e.content),1)])),_:1},8,["modelValue","node"])],2))}}),[["__scopeId","data-v-7b5e30d1"]]),nc={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}},ac={class:"editify-button"},oc={key:0,class:"editify-button-slot"},ic={key:1},lc={key:1,class:"editify-button-options"},sc=["onClick"],cc={key:1,class:"editify-button-option-flex"},dc=Nn(t.defineComponent({name:"Button",__name:"button",props:nc,emits:["operate","layerShow","layerShown","layerHidden"],setup(e,{expose:r,emit:n}){const a=e,o=n,i=t.ref(!1),l=t.ref(null),s=t.ref(null),c=t.ref(null),d=t.computed((()=>{let e=[],t="",r="";return ae.isObject(a.selectConfig)&&(Array.isArray(a.selectConfig.options)&&(e=a.selectConfig.options.map((e=>ae.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&&(r=a.selectConfig.maxHeight)),{options:e,width:t,maxHeight:r}})),u=t.computed((()=>{let e=[],t="",r="",n="";if(ae.isObject(a.displayConfig)){if("string"!=typeof a.displayConfig.value&&"number"!=typeof a.displayConfig.value||(n=a.displayConfig.value),Array.isArray(a.displayConfig.options)){e=a.displayConfig.options.map((e=>ae.isObject(e)?{label:e.label,value:e.value,icon:e.icon,style:e.style}:{label:e,value:e})),!e.find((e=>e.value==n))&&e[0]&&(n=e[0].value)}"number"==typeof a.displayConfig.width&&(t=a.displayConfig.width),"number"==typeof a.displayConfig.maxHeight&&(r=a.displayConfig.maxHeight)}return{options:e,width:t,maxHeight:r,value:n}})),h=t.computed((()=>"select"==a.type?d.value.options:u.value.options)),m=t.computed((()=>{const e=u.value.options.find((e=>e.value==u.value.value));return e?e.label:""})),p=t.computed((()=>a.color?se.hex2rgb(a.color):[])),f=t.computed((()=>{if(a.disabled)return{};if(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 r({show:i,status:l}),(e,r)=>(t.openBlock(),t.createElementBlock("div",ac,[t.createElementVNode("div",{class:t.normalizeClass(["editify-button-wrap",{"editify-right-border":e.rightBorder,"editify-left-border":e.leftBorder}])},[t.createVNode(rc,{content:e.title,disabled:!e.tooltip},{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:r[0]||(r[0]=e=>l.value="hover"),onMouseleave:r[1]||(r[1]=e=>l.value=null),onMousedown:r[2]||(r[2]=e=>l.value="down"),onMouseup:r[3]||(r[3]=e=>l.value="hover"),onClick:g},["default"==e.type||"select"==e.type?(t.openBlock(),t.createElementBlock("div",oc,[t.renderSlot(e.$slots,"default",{},void 0,!0)])):"display"==e.type?(t.openBlock(),t.createElementBlock("div",ic,t.toDisplayString(m.value),1)):t.createCommentVNode("",!0),"select"==e.type||"display"==e.type?(t.openBlock(),t.createBlock(Mn,{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"]),t.createVNode(Js,{ref_key:"layerRef",ref:c,modelValue:i.value,"onUpdate:modelValue":r[4]||(r[4]=e=>i.value=e),node:s.value,border:"",fade:"",placement:"bottom-start","z-index":12,animation:"translate",onShow:r[5]||(r[5]=e=>o("layerShow")),onShown:r[6]||(r[6]=e=>o("layerShown")),onHidden:r[7]||(r[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:h.value},void 0,!0):(t.openBlock(),t.createElementBlock("div",lc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,(r=>(t.openBlock(),t.createElementBlock("div",{onClick:e=>(e=>{a.disabled||(o("operate",a.name,e.value),i.value=!1)})(r),class:t.normalizeClass(["editify-button-option",{"editify-active":"display"==e.type&&r.value==u.value.value}]),style:t.normalizeStyle(r.style||"")},[e.$slots.option?t.renderSlot(e.$slots,"option",{key:0,item:r},void 0,!0):(t.openBlock(),t.createElementBlock("div",cc,[r.icon?(t.openBlock(),t.createBlock(Mn,{key:0,value:r.icon},null,8,["value"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.label),1)]))],14,sc)))),256))]))],4)])),_:3},8,["modelValue","node"])],2)]))}}),[["__scopeId","data-v-14398008"]]),uc={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=>ae.matchingText(e,"hex")}},hc=["data-editify-placement","textContent"],mc=["value","disabled","checked"],pc=["data-editify-placement","textContent"],fc=Nn(t.defineComponent({name:"Checkbox",__name:"checkbox",props:uc,emits:["update:modelValue","change"],setup(e,{emit:r}){const n=e,a=r,o=t.computed((()=>"boolean"==typeof n.modelValue?n.modelValue:!!Array.isArray(n.modelValue)&&n.modelValue.some((e=>ae.equal(e,n.value))))),i=t.computed((()=>{let e={};return n.color&&o.value&&!n.disabled&&(e.backgroundColor=n.color,e.borderColor=n.color),e})),l=e=>{if(Array.isArray(n.modelValue)){let t=[...n.modelValue];e.target.checked&&!o.value?t.push(n.value):o.value&&(t=t.filter((e=>!ae.equal(e,n.value)))),a("update:modelValue",t),a("change",t)}else"boolean"==typeof n.modelValue&&(a("update:modelValue",e.target.checked),a("change",e.target.checked))};return(e,r)=>(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,hc)):t.createCommentVNode("",!0),t.createElementVNode("input",{onChange:l,value:e.value,disabled:e.disabled,checked:o.value,type:"checkbox"},null,40,mc),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(Mn,{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,pc)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-d99c609b"]]),gc={data:{type:Array,default:function(){return[]}},value:{type:String,default:null},color:{type:String,default:""},tooltip:{type:Boolean,default:!1}},vc={class:"editify-colors"},bc={class:"editify-colors-list"},yc=["onClick"],wc=Nn(t.defineComponent({name:"Colors",__name:"colors",props:gc,emits:["change"],setup(e,{emit:r}){const n=r,a=t.inject("$editTrans"),o=e=>{n("change",e.value)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",vc,[t.createElementVNode("div",{class:"editify-colors-header",onClick:r[0]||(r[0]=e=>o({value:""}))},[t.createVNode(Mn,{value:"remove"}),t.createElementVNode("span",null,t.toDisplayString(t.unref(a)("defaultColor")),1)]),t.createElementVNode("div",bc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(r=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-color",{"editify-active":e.value==r.value}]),style:t.normalizeStyle({borderColor:e.value==r.value&&e.color||""})},[t.createVNode(rc,{block:"",content:r.label,disabled:!e.tooltip},{default:t.withCtx((()=>[t.createElementVNode("div",{onClick:e=>o(r),class:"editify-color-el",style:t.normalizeStyle({background:r.value})},null,12,yc)])),_:2},1032,["content","disabled"])],6)))),256))])]))}}),[["__scopeId","data-v-dec8d117"]]),xc={modelValue:{type:Boolean,default:!1},node:{type:[String,Node],default:null},type:{type:String,default:"text",validator:e=>["text","table","link","codeBlock","image","video"].includes(e)},config:{type:Object,default:null},color:{type:String,default:""}},kc={key:0,class:"editify-toolbar-link"},Ec={class:"editify-toolbar-link-label"},Sc=["placeholder"],Tc={class:"editify-toolbar-link-footer"},Bc={class:"editify-toolbar-link-operations"},Cc=["href"],_c=Nn(t.defineComponent({name:"Toolbar",__name:"toolbar",props:xc,emits:["update:modelValue"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("editor"),i=t.inject("dataRangeCaches"),l=t.inject("$editTrans"),s=t.ref(null),c=t.ref(null),d=t.ref(null),u=t.ref(null),h=t.ref({url:"",newOpen:!1}),m=t.ref({controls:!1,loop:!1,autoplay:!1,muted:!1}),p=t.ref({show:n.config.codeBlock.languages.show,displayConfig:{options:n.config.codeBlock.languages.options,value:"",width:n.config.codeBlock.languages.width,maxHeight:n.config.codeBlock.languages.maxHeight},leftBorder:n.config.codeBlock.languages.leftBorder,rightBorder:n.config.codeBlock.languages.rightBorder,active:!1,disabled:!1}),f=t.ref({show:n.config.text.heading.show,displayConfig:{options:n.config.text.heading.options,value:"",width:n.config.text.heading.width,maxHeight:n.config.text.heading.maxHeight},defaultValue:n.config.text.heading.defaultValue,leftBorder:n.config.text.heading.leftBorder,rightBorder:n.config.text.heading.rightBorder,active:!1,disabled:!1}),g=t.ref({show:n.config.text.align.show,selectConfig:{options:n.config.text.align.options,width:n.config.text.align.width,maxHeight:n.config.text.align.maxHeight},leftBorder:n.config.text.align.leftBorder,rightBorder:n.config.text.align.rightBorder,active:!1,disabled:!1}),v=t.ref({show:n.config.text.orderList.show,leftBorder:n.config.text.orderList.leftBorder,rightBorder:n.config.text.orderList.rightBorder,active:!1,disabled:!1}),b=t.ref({show:n.config.text.unorderList.show,leftBorder:n.config.text.unorderList.leftBorder,rightBorder:n.config.text.unorderList.rightBorder,active:!1,disabled:!1}),w=t.ref({show:n.config.text.task.show,leftBorder:n.config.text.task.leftBorder,rightBorder:n.config.text.task.rightBorder,active:!1,disabled:!1}),x=t.ref({show:n.config.text.bold.show,leftBorder:n.config.text.bold.leftBorder,rightBorder:n.config.text.bold.rightBorder,active:!1,disabled:!1}),k=t.ref({show:n.config.text.italic.show,leftBorder:n.config.text.italic.leftBorder,rightBorder:n.config.text.italic.rightBorder,active:!1,disabled:!1}),E=t.ref({show:n.config.text.strikethrough.show,leftBorder:n.config.text.strikethrough.leftBorder,rightBorder:n.config.text.strikethrough.rightBorder,active:!1,disabled:!1}),S=t.ref({show:n.config.text.underline.show,leftBorder:n.config.text.underline.leftBorder,rightBorder:n.config.text.underline.rightBorder,active:!1,disabled:!1}),T=t.ref({show:n.config.text.code.show,leftBorder:n.config.text.code.leftBorder,rightBorder:n.config.text.code.rightBorder,active:!1,disabled:!1}),B=t.ref({show:n.config.text.super.show,leftBorder:n.config.text.super.leftBorder,rightBorder:n.config.text.super.rightBorder,active:!1,disabled:!1}),C=t.ref({show:n.config.text.sub.show,leftBorder:n.config.text.sub.leftBorder,rightBorder:n.config.text.sub.rightBorder,active:!1,disabled:!1}),_=t.ref({show:n.config.text.fontSize.show,displayConfig:{options:n.config.text.fontSize.options,value:"",width:n.config.text.fontSize.width,maxHeight:n.config.text.fontSize.maxHeight},defaultValue:n.config.text.fontSize.defaultValue,leftBorder:n.config.text.fontSize.leftBorder,rightBorder:n.config.text.fontSize.rightBorder,active:!1,disabled:!1}),N=t.ref({show:n.config.text.fontFamily.show,displayConfig:{options:n.config.text.fontFamily.options,value:"",width:n.config.text.fontFamily.width,maxHeight:n.config.text.fontFamily.maxHeight},defaultValue:n.config.text.fontFamily.defaultValue,leftBorder:n.config.text.fontFamily.leftBorder,rightBorder:n.config.text.fontFamily.rightBorder,active:!1,disabled:!1}),M=t.ref({show:n.config.text.lineHeight.show,displayConfig:{options:n.config.text.lineHeight.options,value:"",width:n.config.text.lineHeight.width,maxHeight:n.config.text.lineHeight.maxHeight},defaultValue:n.config.text.lineHeight.defaultValue,leftBorder:n.config.text.lineHeight.leftBorder,rightBorder:n.config.text.lineHeight.rightBorder,active:!1,disabled:!1}),A=t.ref({show:n.config.text.foreColor.show,selectConfig:{options:n.config.text.foreColor.options},leftBorder:n.config.text.foreColor.leftBorder,rightBorder:n.config.text.foreColor.rightBorder,value:"",active:!1,disabled:!1}),O=t.ref({show:n.config.text.backColor.show,selectConfig:{options:n.config.text.backColor.options},leftBorder:n.config.text.backColor.leftBorder,rightBorder:n.config.text.backColor.rightBorder,value:"",active:!1,disabled:!1}),R=t.ref({show:n.config.text.formatClear.show,leftBorder:n.config.text.formatClear.leftBorder,rightBorder:n.config.text.formatClear.rightBorder,active:!1,disabled:!1}),z=t.computed({get:()=>n.modelValue,set(e){a("update:modelValue",e)}}),I=t.computed((()=>e=>{if(!o.value.range)return!1;const t=$r(o.value.range.focus.element,{parsedom:"td"});if(!t)return!1;if("left"==e){let e=!1;const r=Fr(t),n=o.value.getPreviousElement(t);if(n)if(n.hasMarks()&&n.marks["data-editify-merged"]){const{crossColumnElement:t}=Pr(o.value,n);if(t){const{rowspan:n}=Fr(t);e=n==r.rowspan}}else{const{rowspan:t}=Fr(n);e=t==r.rowspan}return e}if("right"==e){let e=!1;const r=Fr(t);let n=o.value.getNextElement(t);for(;n;){if(!n.hasMarks()||!n.marks["data-editify-merged"]){const{rowspan:t}=Fr(n);e=t==r.rowspan;break}{const{crossColumnElement:e}=Pr(o.value,n);if(!e)break;n=o.value.getNextElement(n)}}return e}if("up"==e){let e=!1;const r=Fr(t),n=t.parent.children.findIndex((e=>e.isEqual(t))),a=o.value.getPreviousElement(t.parent);if(a){const t=a.children[n];if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossRowElement:n}=Pr(o.value,t);if(n){const{colspan:t}=Fr(n);e=t==r.colspan}}else{const{colspan:n}=Fr(t);e=n==r.colspan}}return e}if("down"==e){let e=!1;const r=Fr(t),n=t.parent.children.findIndex((e=>e.isEqual(t)));let a=o.value.getNextElement(t.parent);for(;a;){const t=a.children[n];if(!t.hasMarks()||!t.marks["data-editify-merged"]){const{colspan:n}=Fr(t);e=n==r.colspan;break}{const{crossRowElement:e}=Pr(o.value,t);if(!e)break;a=o.value.getNextElement(a)}}return e}return!1})),L=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},D=e=>{e.currentTarget.style.borderColor=""},P=()=>{yn(o.value,i.value),wn(o.value,i.value),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},F=e=>{vn(o.value,i.value,{"background-color":e}),u.value.show=!1,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},q=e=>{vn(o.value,i.value,{color:e}),d.value.show=!1,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},H=(e,t)=>{xn(o.value,i.value,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},$=(e,t)=>{vn(o.value,i.value,{"font-family":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},V=(e,t)=>{vn(o.value,i.value,{"font-size":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},U=()=>{rn(o.value,i.value,"vertical-align","super")?yn(o.value,i.value,["vertical-align"]):vn(o.value,i.value,{"vertical-align":"super"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},j=()=>{rn(o.value,i.value,"vertical-align","sub")?yn(o.value,i.value,["vertical-align"]):vn(o.value,i.value,{"vertical-align":"sub"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},W=()=>{nn(o.value,i.value,"data-editify-code")?wn(o.value,i.value,["data-editify-code"]):bn(o.value,i.value,{"data-editify-code":!0}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},K=()=>{rn(o.value,i.value,"text-decoration","underline")||rn(o.value,i.value,"text-decoration-line","underline")?yn(o.value,i.value,["text-decoration","text-decoration-line"]):vn(o.value,i.value,{"text-decoration":"underline"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},G=()=>{rn(o.value,i.value,"text-decoration","line-through")||rn(o.value,i.value,"text-decoration-line","line-through")?yn(o.value,i.value,["text-decoration","text-decoration-line"]):vn(o.value,i.value,{"text-decoration":"line-through"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Z=e=>{fn(o.value,i.value,"orderList"==e),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},X=()=>{gn(o.value,i.value),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Y=()=>{rn(o.value,i.value,"font-style","italic")?yn(o.value,i.value,["font-style"]):vn(o.value,i.value,{"font-style":"italic"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},Q=()=>{rn(o.value,i.value,"font-weight","bold")||rn(o.value,i.value,"font-weight","700")?yn(o.value,i.value,["font-weight"]):vn(o.value,i.value,{"font-weight":"bold"}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},J=(e,t)=>{dn(o.value,i.value,l,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},ee=(e,t)=>{pn(o.value,i.value,t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},te=e=>{const t=o.value.range.anchor.element;m.value[e]?delete t.marks[e]:t.marks[e]=!0,m.value[e]=!m.value[e],o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()},re=e=>{const t=o.value.range.anchor.element;if(t){const r={width:e};t.hasStyles()?t.styles=Object.assign(t.styles,r):t.styles=r,o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},ne=()=>{if(!h.value.url)return;const e=Vr(o.value,i.value,{parsedom:"a"});e&&(e.marks.href=h.value.url,h.value.newOpen?e.marks.target="_blank":delete e.marks.target,o.value.formatElementStack(),o.value.domRender())},oe=()=>{const e=Vr(o.value,i.value,{parsedom:"a"});e&&(e.parsedom=y.TEXT_NODE,delete e.marks.target,delete e.marks.href,delete e.marks["data-editify-element"],o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},ie=(e,t)=>{const r=Vr(o.value,i.value,{parsedom:"pre"});r&&(Object.assign(r.marks,{"data-editify-hljs":t}),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},le=(e="up")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=Vr(o.value,i.value,{parsedom:"pre"});if(t){const r=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?o.value.addElementBefore(r,t):o.value.addElementAfter(r,t),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},se=(e="left")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=Vr(o.value,i.value,{parsedom:"td"});if(t){const r=t.parent,n=r.parent,a=n.parent,i=n.children,l=r.children.findIndex((e=>e.isEqual(t)));i.forEach((t=>{const r=y.create({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});"left"==e?o.value.addElementTo(r,t,l):o.value.addElementTo(r,t,l+1)}));const s=a.children.find((e=>"colgroup"==e.parsedom)),c=y.create({type:"closed",parsedom:"col"});if("left"==e?o.value.addElementTo(c,s,l):o.value.addElementTo(c,s,l+1),"left"==e){const e=o.value.getPreviousElement(t);o.value.range.anchor.moveToStart(e),o.value.range.focus.moveToStart(e)}else{const e=o.value.getNextElement(t);o.value.range.anchor.moveToStart(e),o.value.range.focus.moveToStart(e)}o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},ce=(e="up")=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=Vr(o.value,i.value,{parsedom:"tr"});if(t){const r=t.parent,{columnNumber:n}=qr(r.children),a=[];for(let e=0;e<n;e++)a.push({type:"inblock",parsedom:"td",children:[{type:"closed",parsedom:"br"}]});const i=y.create({type:"inblock",parsedom:"tr",children:a});"up"==e?o.value.addElementBefore(i,t):o.value.addElementAfter(i,t),o.value.range.anchor.moveToStart(i),o.value.range.focus.moveToStart(i),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},de=(e="up")=>{const t=Vr(o.value,i.value,{parsedom:"table"});if(t){const r=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});"up"==e?o.value.addElementBefore(r,t):o.value.addElementAfter(r,t),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},ue=e=>{const t=Vr(o.value,i.value,{parsedom:e});t&&(t.toEmpty(),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())},he=()=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const e=Vr(o.value,i.value,{parsedom:"td"});if(e){const t=e.parent;if(1==t.parent.children.length)return void ue("table");const r=t.children.findIndex((t=>t.isEqual(e))),n=o.value.getPreviousElement(t),a=o.value.getNextElement(t);t.children.forEach(((e,r)=>{const n=Fr(e);if(e.hasMarks()&&e.marks["data-editify-merged"]){const{crossRowElement:t}=Pr(o.value,e);if(t){const{rowspan:e}=Fr(t);e-1==1?delete t.marks.rowspan:t.marks.rowspan=e-1}}else if(n.rowspan>1){let e=o.value.getNextElement(t);e&&n.rowspan-1>1&&(e.children[r].hasMarks()?e.children[r].marks.rowspan=n.rowspan-1:e.children[r].marks={rowspan:n.rowspan-1})}})),t.toEmpty(),n?(o.value.range.anchor.moveToEnd(n.children[r]),o.value.range.focus.moveToEnd(n.children[r])):(o.value.range.anchor.moveToEnd(a.children[r]),o.value.range.focus.moveToEnd(a.children[r])),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender(),setTimeout((()=>{s.value.setPosition()}),0)}},me=()=>{o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const e=Vr(o.value,i.value,{parsedom:"td"});if(e){const t=e.parent,r=t.parent.children,n=t.parent.parent;if(1==t.children.length)return void ue("table");const a=t.children.findIndex((t=>t.isEqual(e))),i=o.value.getPreviousElement(e),l=o.value.getNextElement(e);r.forEach((e=>{const t=e.children[a],r=Fr(t);if(t.hasMarks()&&t.marks["data-editify-merged"]){const{crossColumnElement:e}=Pr(o.value,t);if(e){const{colspan:t}=Fr(e);t-1==1?delete e.marks.colspan:e.marks.colspan=t-1}}else if(r.colspan>1){let e=o.value.getNextElement(t);e&&r.colspan-1>1&&(e.hasMarks()?e.marks.colspan=r.colspan-1:e.marks={colspan:r.colspan-1})}t.toEmpty()}));n.children.find((e=>"colgroup"==e.parsedom)).children[a].toEmpty(),i?(o.value.range.anchor.moveToEnd(i),o.value.range.focus.moveToEnd(i)):(o.value.range.anchor.moveToEnd(l),o.value.range.focus.moveToEnd(l)),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender()}},pe=e=>{if(!I.value(e))return;o.value.range.anchor.isEqual(o.value.range.focus)||(o.value.range.anchor.element=o.value.range.focus.element,o.value.range.anchor.offset=o.value.range.focus.offset);const t=Vr(o.value,i.value,{parsedom:"td"});if(t)if("left"==e){const e=Fr(t),r=o.value.getPreviousElement(t);if(r)if(r.hasMarks()&&r.marks["data-editify-merged"]){const{crossColumnElement:n}=Pr(o.value,r);if(n){const{rowspan:r,colspan:a}=Fr(n);r==e.rowspan&&(n.marks.colspan=a+e.colspan,t.children.forEach((e=>{n.children.push(e),e.parent=n})),Dr(t),o.value.range.anchor.moveToEnd(n),o.value.range.focus.moveToEnd(n),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else{const{rowspan:n,colspan:a}=Fr(r);n==e.rowspan&&(r.hasMarks()?r.marks.colspan=a+e.colspan:r.marks={colspan:a+e.colspan},t.children.forEach((e=>{r.children.push(e),e.parent=r})),Dr(t),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else if("right"==e){const e=Fr(t);let r=o.value.getNextElement(t);for(;r;){if(!r.hasMarks()||!r.marks["data-editify-merged"]){const{rowspan:n,colspan:a}=Fr(r);n==e.rowspan&&(t.hasMarks()?t.marks.colspan=e.colspan+a:t.marks={colspan:e.colspan+a},r.children.forEach((e=>{t.children.push(e),e.parent=t})),Dr(r),o.value.range.anchor.moveToEnd(t),o.value.range.focus.moveToEnd(t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender());break}{const{crossColumnElement:e}=Pr(o.value,r);if(!e)break;r=o.value.getNextElement(r)}}}else if("up"==e){const e=Fr(t),r=t.parent.children.findIndex((e=>e.isEqual(t))),n=o.value.getPreviousElement(t.parent);if(n){const a=n.children[r];if(a.hasMarks()&&a.marks["data-editify-merged"]){const{crossRowElement:r}=Pr(o.value,a);if(r){const{rowspan:n,colspan:a}=Fr(r);a==e.colspan&&(r.marks.rowspan=n+e.rowspan,t.children.forEach((e=>{r.children.push(e),e.parent=r})),Dr(t),o.value.range.anchor.moveToEnd(r),o.value.range.focus.moveToEnd(r),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}else{const{rowspan:r,colspan:n}=Fr(a);n==e.colspan&&(a.hasMarks()?a.marks.rowspan=r+e.rowspan:a.marks={rowspan:r+e.rowspan},t.children.forEach((e=>{a.children.push(e),e.parent=a})),Dr(t),o.value.range.anchor.moveToEnd(a),o.value.range.focus.moveToEnd(a),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender())}}}else if("down"==e){const e=Fr(t),r=t.parent.children.findIndex((e=>e.isEqual(t)));let n=o.value.getNextElement(t.parent);for(;n;){const a=n.children[r];if(!a.hasMarks()||!a.marks["data-editify-merged"]){const{rowspan:r,colspan:n}=Fr(a);n==e.colspan&&(t.hasMarks()?t.marks.rowspan=e.rowspan+r:t.marks={rowspan:e.rowspan+r},a.children.forEach((e=>{t.children.push(e),e.parent=t})),Dr(a),o.value.range.anchor.moveToEnd(t),o.value.range.focus.moveToEnd(t),o.value.formatElementStack(),o.value.domRender(),o.value.rangeRender());break}{const{crossRowElement:e}=Pr(o.value,a);if(!e)break;n=o.value.getNextElement(n)}}}},fe=()=>{if("link"==n.type){const e=Vr(o.value,i.value,{parsedom:"a"});e&&(h.value.url=e.marks.href,h.value.newOpen="_blank"==e.marks.target)}else if("video"==n.type){const e=Vr(o.value,i.value,{parsedom:"video"});e&&(m.value.autoplay=!!e.marks.autoplay,m.value.loop=!!e.marks.loop,m.value.controls=!!e.marks.controls,m.value.muted=!!e.marks.muted)}else if("codeBlock"==n.type){const e=Vr(o.value,i.value,{parsedom:"pre"});e&&(p.value.displayConfig.value=e.marks["data-editify-hljs"]||"")}else if("text"==n.type){const e=e=>"function"==typeof n.config.extraDisabled&&n.config.extraDisabled(e)||!1,t=f.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),i.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));f.value.displayConfig.value=t?ae.isObject(t)?t.value:t:f.value.defaultValue,f.value.disabled=e("heading"),g.value.disabled=e("align"),v.value.active=en(o.value,i.value,!0),v.value.disabled=e("orderList"),b.value.active=en(o.value,i.value,!1),b.value.disabled=e("unorderList"),w.value.active=tn(o.value,i.value),w.value.disabled=e("task"),x.value.active=rn(o.value,i.value,"font-weight","bold")||rn(o.value,i.value,"font-weight","700"),x.value.disabled=e("bold"),k.value.active=rn(o.value,i.value,"font-style","italic"),k.value.disabled=e("italic"),E.value.active=rn(o.value,i.value,"text-decoration","line-through")||rn(o.value,i.value,"text-decoration-line","line-through"),E.value.disabled=e("strikethrough"),S.value.active=rn(o.value,i.value,"text-decoration","underline")||rn(o.value,i.value,"text-decoration-line","underline"),S.value.disabled=e("underline"),T.value.active=nn(o.value,i.value,"data-editify-code"),T.value.disabled=e("code"),B.value.active=rn(o.value,i.value,"vertical-align","super"),B.value.disabled=e("super"),C.value.active=rn(o.value,i.value,"vertical-align","sub"),C.value.disabled=e("sub");const r=_.value.displayConfig.options.find((e=>ae.isObject(e)?rn(o.value,i.value,"font-size",e.value):rn(o.value,i.value,"font-size",e)));_.value.displayConfig.value=r?ae.isObject(r)?r.value:r:_.value.defaultValue,_.value.disabled=e("fontSize");const a=N.value.displayConfig.options.find((e=>ae.isObject(e)?rn(o.value,i.value,"font-family",e.value):rn(o.value,i.value,"font-family",e)));N.value.displayConfig.value=a?ae.isObject(a)?a.value:a:N.value.defaultValue,N.value.disabled=e("fontFamily");const l=M.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),i.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const r=e.element.getBlock(),n=e.element.getInblock();return n?n.hasStyles()&&n.styles["line-height"]==t:r.hasStyles()&&r.styles["line-height"]==t}))}));M.value.displayConfig.value=l?ae.isObject(l)?l.value:l:M.value.defaultValue,M.value.disabled=e("lineHeight");const s=A.value.selectConfig.options.find((e=>ae.isObject(e)?rn(o.value,i.value,"color",e.value):rn(o.value,i.value,"color",e)));A.value.value=s?ae.isObject(s)?s.value:s:"",A.value.disabled=e("foreColor");const c=O.value.selectConfig.options.find((e=>ae.isObject(e)?rn(o.value,i.value,"background-color",e.value):rn(o.value,i.value,"background-color",e)));O.value.value=c?ae.isObject(c)?c.value:c:"",O.value.disabled=e("backColor"),R.value.disabled=e("formatClear")}};return(e,r)=>(t.openBlock(),t.createBlock(Js,{modelValue:z.value,"onUpdate:modelValue":r[25]||(r[25]=e=>z.value=e),ref_key:"layerRef",ref:s,node:e.node,border:"",placement:"bottom-start",onShow:fe,useRange:"text"==e.type,"z-index":10},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"editify-toolbar",ref_key:"toolbarRef",ref:c,style:t.normalizeStyle(e.config.style)},["link"==e.type?(t.openBlock(),t.createElementBlock("div",kc,[t.createElementVNode("div",Ec,t.toDisplayString(t.unref(l)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onChange:ne,onFocus:L,onBlur:D,placeholder:t.unref(l)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":r[0]||(r[0]=e=>h.value.url=e),type:"url"},null,40,Sc),[[t.vModelText,h.value.url,void 0,{trim:!0}]]),t.createElementVNode("div",Tc,[t.createVNode(fc,{onChange:ne,modelValue:h.value.newOpen,"onUpdate:modelValue":r[1]||(r[1]=e=>h.value.newOpen=e),label:t.unref(l)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Bc,[t.createElementVNode("span",{onClick:oe},t.toDisplayString(t.unref(l)("removeLink")),1),t.createElementVNode("a",{href:h.value.url,target:"_blank",style:t.normalizeStyle({color:e.color||""})},t.toDisplayString(t.unref(l)("viewLink")),13,Cc)])])])):"image"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(dc,{onOperate:r[2]||(r[2]=e=>re("30%")),name:"set30Width",title:t.unref(l)("width30"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 30% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[3]||(r[3]=e=>re("50%")),name:"set50Width",title:t.unref(l)("width50"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 50% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{rightBorder:"",onOperate:r[4]||(r[4]=e=>re("100%")),name:"set100Width",title:t.unref(l)("width100"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 100% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[5]||(r[5]=e=>re("auto")),name:"setAutoWidth",title:t.unref(l)("auto"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"auto-width"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[6]||(r[6]=e=>ue("img")),name:"deleteImage",title:t.unref(l)("deleteImage"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"delete"})])),_:1},8,["title","tooltip","color"])],64)):"video"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(dc,{onOperate:r[7]||(r[7]=e=>re("30%")),name:"set30Width",title:t.unref(l)("width30"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 30% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[8]||(r[8]=e=>re("50%")),name:"set50Width",title:t.unref(l)("width50"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 50% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[9]||(r[9]=e=>re("100%")),name:"set100Width",title:t.unref(l)("width100"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createTextVNode(" 100% ")])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{rightBorder:"",onOperate:r[10]||(r[10]=e=>re("auto")),name:"setAutoWidth",title:t.unref(l)("auto"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"auto-width"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:te,name:"autoplay",title:m.value.autoplay?t.unref(l)("disabledAutoplay"):t.unref(l)("autoplay"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:m.value.autoplay?"autoplay":"stop"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:te,name:"loop",title:m.value.loop?t.unref(l)("disabledLoop"):t.unref(l)("loop"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:m.value.loop?"loop":"single"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:te,name:"muted",title:m.value.muted?t.unref(l)("unmuted"):t.unref(l)("muted"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:m.value.muted?"muted":"unmuted"},null,8,["value"])])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{leftBorder:"",onOperate:te,name:"controls",title:t.unref(l)("controls"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"controls"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[11]||(r[11]=e=>ue("video")),name:"deleteVideo",title:t.unref(l)("deleteVideo"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"delete"})])),_:1},8,["title","tooltip","color"])],64)):"table"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createVNode(dc,{onOperate:r[12]||(r[12]=e=>de("up")),name:"textWrapUp",title:t.unref(l)("textWrapUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"text-wrap",class:"editify-icon-rotate"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[13]||(r[13]=e=>de("down")),rightBorder:"",name:"textWrapDown",title:t.unref(l)("textWrapDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"text-wrap"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[14]||(r[14]=e=>ce("up")),name:"insertRowTop",title:t.unref(l)("insertRowTop"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"insert-row-top"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[15]||(r[15]=e=>ce("down")),name:"insertRowBottom",title:t.unref(l)("insertRowBottom"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"insert-row-bottom"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:he,rightBorder:"",name:"deleteRow",title:t.unref(l)("deleteRow"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"delete-row"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[16]||(r[16]=e=>se("left")),name:"insertColumnLeft",title:t.unref(l)("insertColumnLeft"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"insert-column-left"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[17]||(r[17]=e=>se("right")),name:"insertColumnRight",title:t.unref(l)("insertColumnRight"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"insert-column-right"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:me,rightBorder:"",name:"deleteColumn",title:t.unref(l)("deleteColumn"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"delete-column"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{disabled:!I.value("left"),onOperate:r[18]||(r[18]=e=>pe("left")),rightBorder:"",name:"mergeCellsLeft",title:t.unref(l)("mergeCellsLeft"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"merge-cells-left"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(dc,{disabled:!I.value("right"),onOperate:r[19]||(r[19]=e=>pe("right")),rightBorder:"",name:"mergeCellsRight",title:t.unref(l)("mergeCellsRight"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"merge-cells-right"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(dc,{disabled:!I.value("up"),onOperate:r[20]||(r[20]=e=>pe("up")),rightBorder:"",name:"mergeCellsUp",title:t.unref(l)("mergeCellsUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"merge-cells-up"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(dc,{disabled:!I.value("down"),onOperate:r[21]||(r[21]=e=>pe("down")),rightBorder:"",name:"mergeCellsDown",title:t.unref(l)("mergeCellsDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"merge-cells-down"})])),_:1},8,["disabled","title","tooltip","color"]),t.createVNode(dc,{onOperate:r[22]||(r[22]=e=>ue("table")),leftBorder:"",name:"deleteTable",title:t.unref(l)("deleteTable"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"delete-table"})])),_:1},8,["title","tooltip","color"])],64)):t.createCommentVNode("",!0),"codeBlock"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(dc,{onOperate:r[23]||(r[23]=e=>le("up")),name:"textWrapUp",title:t.unref(l)("textWrapUp"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"text-wrap",class:"editify-icon-rotate"})])),_:1},8,["title","tooltip","color"]),t.createVNode(dc,{onOperate:r[24]||(r[24]=e=>le("down")),name:"textWrapDown",title:t.unref(l)("textWrapDown"),tooltip:e.config.tooltip,color:e.color},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"text-wrap"})])),_:1},8,["title","tooltip","color"]),p.value.show?(t.openBlock(),t.createBlock(dc,{key:0,name:"languages",type:"display",title:t.unref(l)("selectLanguages"),tooltip:e.config.tooltip,leftBorder:p.value.leftBorder,rightBorder:p.value.rightBorder,"display-config":p.value.displayConfig,color:e.color,active:p.value.active,disabled:p.value.disabled,onOperate:ie},null,8,["title","tooltip","leftBorder","rightBorder","display-config","color","active","disabled"])):t.createCommentVNode("",!0)],64)):"text"==e.type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[f.value.show?(t.openBlock(),t.createBlock(dc,{key:0,name:"heading",type:"display",title:t.unref(l)("heading"),tooltip:e.config.tooltip,"display-config":f.value.displayConfig,leftBorder:f.value.leftBorder,rightBorder:f.value.rightBorder,color:e.color,active:f.value.active,disabled:f.value.disabled,onOperate:J},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),g.value.show?(t.openBlock(),t.createBlock(dc,{key:1,name:"align",type:"select",title:t.unref(l)("align"),tooltip:e.config.tooltip,"select-config":g.value.selectConfig,leftBorder:g.value.leftBorder,rightBorder:g.value.rightBorder,color:e.color,active:g.value.active,disabled:g.value.disabled,onOperate:ee},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"align-left"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),v.value.show?(t.openBlock(),t.createBlock(dc,{key:2,name:"orderList",title:t.unref(l)("orderList"),tooltip:e.config.tooltip,leftBorder:v.value.leftBorder,rightBorder:v.value.rightBorder,color:e.color,active:v.value.active,disabled:v.value.disabled,onOperate:Z},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"list-ordered"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),b.value.show?(t.openBlock(),t.createBlock(dc,{key:3,name:"unorderList",title:t.unref(l)("unorderList"),tooltip:e.config.tooltip,leftBorder:b.value.leftBorder,rightBorder:b.value.rightBorder,color:e.color,active:b.value.active,disabled:b.value.disabled,onOperate:Z},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"list-unordered"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),w.value.show?(t.openBlock(),t.createBlock(dc,{key:4,name:"task",title:t.unref(l)("task"),tooltip:e.config.tooltip,leftBorder:w.value.leftBorder,rightBorder:w.value.rightBorder,color:e.color,active:w.value.active,disabled:w.value.disabled,onOperate:X},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"task"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),x.value.show?(t.openBlock(),t.createBlock(dc,{key:5,name:"bold",title:t.unref(l)("bold"),tooltip:e.config.tooltip,leftBorder:x.value.leftBorder,rightBorder:x.value.rightBorder,color:e.color,active:x.value.active,disabled:x.value.disabled,onOperate:Q},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"bold"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),k.value.show?(t.openBlock(),t.createBlock(dc,{key:6,name:"italic",title:t.unref(l)("italic"),tooltip:e.config.tooltip,leftBorder:k.value.leftBorder,rightBorder:k.value.rightBorder,color:e.color,active:k.value.active,disabled:k.value.disabled,onOperate:Y},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"italic"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),E.value.show?(t.openBlock(),t.createBlock(dc,{key:7,name:"strikethrough",title:t.unref(l)("strikethrough"),tooltip:e.config.tooltip,leftBorder:E.value.leftBorder,rightBorder:E.value.rightBorder,color:e.color,active:E.value.active,disabled:E.value.disabled,onOperate:G},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"strikethrough"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),S.value.show?(t.openBlock(),t.createBlock(dc,{key:8,name:"underline",title:t.unref(l)("underline"),tooltip:e.config.tooltip,leftBorder:S.value.leftBorder,rightBorder:S.value.rightBorder,color:e.color,active:S.value.active,disabled:S.value.disabled,onOperate:K},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"underline"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),T.value.show?(t.openBlock(),t.createBlock(dc,{key:9,name:"code",title:t.unref(l)("code"),tooltip:e.config.tooltip,leftBorder:T.value.leftBorder,rightBorder:T.value.rightBorder,color:e.color,active:T.value.active,disabled:T.value.disabled,onOperate:W},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"code"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),B.value.show?(t.openBlock(),t.createBlock(dc,{key:10,name:"superscript",title:t.unref(l)("superscript"),tooltip:e.config.tooltip,leftBorder:B.value.leftBorder,rightBorder:B.value.rightBorder,color:e.color,active:B.value.active,disabled:B.value.disabled,onOperate:U},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"superscript"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),C.value.show?(t.openBlock(),t.createBlock(dc,{key:11,name:"subscript",title:t.unref(l)("subscript"),tooltip:e.config.tooltip,leftBorder:C.value.leftBorder,rightBorder:C.value.rightBorder,color:e.color,active:C.value.active,disabled:C.value.disabled,onOperate:j},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"subscript"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),_.value.show?(t.openBlock(),t.createBlock(dc,{key:12,name:"fontSize",type:"display",title:t.unref(l)("fontSize"),tooltip:e.config.tooltip,"display-config":_.value.displayConfig,leftBorder:_.value.leftBorder,rightBorder:_.value.rightBorder,color:e.color,active:_.value.active,disabled:_.value.disabled,onOperate:V},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),N.value.show?(t.openBlock(),t.createBlock(dc,{key:13,name:"fontFamily",type:"display",title:t.unref(l)("fontFamily"),tooltip:e.config.tooltip,"display-config":N.value.displayConfig,leftBorder:N.value.leftBorder,rightBorder:N.value.rightBorder,color:e.color,active:N.value.active,disabled:N.value.disabled,onOperate:$},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),M.value.show?(t.openBlock(),t.createBlock(dc,{key:14,name:"lineHeight",type:"display",title:t.unref(l)("lineHeight"),tooltip:e.config.tooltip,"display-config":M.value.displayConfig,leftBorder:M.value.leftBorder,rightBorder:M.value.rightBorder,color:e.color,active:M.value.active,disabled:M.value.disabled,onOperate:H},null,8,["title","tooltip","display-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),A.value.show?(t.openBlock(),t.createBlock(dc,{key:15,name:"foreColor",type:"select",title:t.unref(l)("foreColor"),tooltip:e.config.tooltip,"select-config":A.value.selectConfig,leftBorder:A.value.leftBorder,rightBorder:A.value.rightBorder,color:e.color,active:A.value.active,disabled:A.value.disabled,hideScroll:"",ref_key:"foreColorRef",ref:d},{layer:t.withCtx((({options:r})=>[t.createVNode(wc,{tooltip:e.config.tooltip,color:e.color,value:A.value.value,onChange:q,data:r},null,8,["tooltip","color","value","data"])])),default:t.withCtx((()=>[t.createVNode(Mn,{value:"font-color"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),O.value.show?(t.openBlock(),t.createBlock(dc,{key:16,name:"backColor",type:"select",title:t.unref(l)("backColor"),tooltip:e.config.tooltip,"select-config":O.value.selectConfig,leftBorder:O.value.leftBorder,rightBorder:O.value.rightBorder,color:e.color,active:O.value.active,disabled:O.value.disabled,hideScroll:"",ref_key:"backColorRef",ref:u},{layer:t.withCtx((({options:r})=>[t.createVNode(wc,{tooltip:e.config.tooltip,color:e.color,value:O.value.value,onChange:F,data:r},null,8,["tooltip","color","value","data"])])),default:t.withCtx((()=>[t.createVNode(Mn,{value:"brush"})])),_:1},8,["title","tooltip","select-config","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0),R.value.show?(t.openBlock(),t.createBlock(dc,{key:17,name:"formatClear",title:t.unref(l)("formatClear"),tooltip:e.config.tooltip,leftBorder:R.value.leftBorder,rightBorder:R.value.rightBorder,color:e.color,active:R.value.active,disabled:R.value.disabled,onOperate:P},{default:t.withCtx((()=>[t.createVNode(Mn,{value:"format-clear"})])),_:1},8,["title","tooltip","leftBorder","rightBorder","color","active","disabled"])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)],4)])),_:1},8,["modelValue","node","useRange"]))}}),[["__scopeId","data-v-59a49d88"]]),Nc={color:{type:String,default:""},text:{type:String,default:""}},Mc={class:"editify-link"},Ac={class:"editify-link-label"},Oc=["placeholder"],Rc=["placeholder"],zc={class:"editify-link-footer"},Ic={class:"editify-link-operations"},Lc=Nn(t.defineComponent({name:"InsertLink",__name:"insertLink",props:Nc,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref(""),l=t.ref(""),s=t.ref(!1);t.watch((()=>n.text),(e=>{l.value=e}),{immediate:!0});const c=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},d=e=>{e.currentTarget.style.borderColor=""},u=()=>{a("insert",l.value,i.value,s.value)};return(e,r)=>(t.openBlock(),t.createElementBlock("div",Mc,[t.createElementVNode("div",Ac,t.toDisplayString(t.unref(o)("linkAddress")),1),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkTextEnterPlaceholder"),"onUpdate:modelValue":r[0]||(r[0]=e=>l.value=e),type:"text"},null,40,Oc),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{onFocus:c,onBlur:d,placeholder:t.unref(o)("linkUrlEnterPlaceholder"),"onUpdate:modelValue":r[1]||(r[1]=e=>i.value=e),type:"url"},null,40,Rc),[[t.vModelText,i.value,void 0,{trim:!0}]]),t.createElementVNode("div",zc,[t.createVNode(fc,{modelValue:s.value,"onUpdate:modelValue":r[2]||(r[2]=e=>s.value=e),label:t.unref(o)("newWindowOpen"),color:e.color,size:10},null,8,["modelValue","label","color"]),t.createElementVNode("div",Ic,[t.createElementVNode("span",{style:t.normalizeStyle({color:e.color||""}),onClick:u},t.toDisplayString(t.unref(o)("insertLink")),5)])])]))}}),[["__scopeId","data-v-9f80e392"]]),Dc={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}},Pc={class:"editify-image"},Fc={class:"editify-image-header"},qc={key:0,class:"editify-image-remote"},Hc=["placeholder"],$c={key:1,class:"editify-image-upload"},Vc=["multiple"],Uc=Nn(t.defineComponent({name:"InsertImage",__name:"insertImage",props:Dc,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:n.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},u=e=>{e.currentTarget.style.borderColor=""},h=()=>{a("insert",[l.value])},m=async e=>{const t=e.currentTarget,r=t.files;if(!r||!r.length)return;let o=[];for(let a=0;a<r.length;a++){const e=r[a],t=c(e);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?n.maxSize&&e.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",e):n.minSize&&e.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",e):o.push(e):"function"==typeof n.handleError&&n.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(o)||[];else for(let t=0;t<o.length;t++){const r=await ce.dataFileToBase64(o[t]);e.push(r)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",Pc,[t.createElementVNode("div",Fc,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("imageUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Hc),[[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:h},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",$c,[t.createVNode(Mn,{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"image/*",onChange:m,type:"file"},null,40,Vc)]))]))}}),[["__scopeId","data-v-b63a5bff"]]),jc={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}},Wc={class:"editify-video"},Kc={class:"editify-video-header"},Gc={key:0,class:"editify-video-remote"},Zc=["placeholder"],Xc={key:1,class:"editify-video-upload"},Yc=["multiple"],Qc=Nn(t.defineComponent({name:"InsertVideo",__name:"insertVideo",props:jc,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref("upload"),l=t.ref(""),s=t.computed((()=>e=>i.value==e?{color:n.color}:{})),c=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},d=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},u=e=>{e.currentTarget.style.borderColor=""},h=()=>{a("insert",[l.value])},m=async e=>{const t=e.currentTarget,r=t.files;if(!r||!r.length)return;let o=[];for(let a=0;a<r.length;a++){const e=r[a],t=c(e);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==t.toLocaleLowerCase()))?n.maxSize&&e.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",e):n.minSize&&e.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",e):o.push(e):"function"==typeof n.handleError&&n.handleError("suffixError",e)}if(o.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(o)||[];else for(let t=0;t<o.length;t++){const r=await ce.dataFileToBase64(o[t]);e.push(r)}a("insert",e)}t.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",Wc,[t.createElementVNode("div",Kc,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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",Gc,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("videoUrlPlaceholder"),onBlur:u,onFocus:d},null,40,Zc),[[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:h},t.toDisplayString(t.unref(o)("insert")),1)],4)])):(t.openBlock(),t.createElementBlock("div",Xc,[t.createVNode(Mn,{value:"upload"}),t.createElementVNode("input",{multiple:e.multiple,accept:"video/*",onChange:m,type:"file"},null,40,Yc)]))]))}}),[["__scopeId","data-v-4383bae9"]]),Jc={color:{type:String,default:""},maxRows:{type:Number,default:10},maxColumns:{type:Number,default:10}},ed={class:"editify-table"},td=["onMouseenter","onClick"],rd=[(e=>(t.pushScopeId("data-v-9a40c4f5"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("span",null,null,-1)))],nd={class:"editify-table-footer"},ad={key:0},od={key:1},id=Nn(t.defineComponent({name:"InsertTable",__name:"insertTable",props:Jc,emits:["insert"],setup(e,{emit:r}){const n=e,a=r,o=t.inject("$editTrans"),i=t.ref((()=>{const e=[];for(let t=1;t<=n.maxRows;t++){let r=[];for(let e=1;e<=n.maxColumns;e++)r.push({x:t,y:e,inside:!1});e.push(r)}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,r)=>(t.openBlock(),t.createElementBlock("div",ed,[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 r=i.value[t];for(let n in r)r[n].x<=e.x&&r[n].y<=e.y?i.value[t][n].inside=!0:i.value[t][n].inside=!1}})(e),onClick:t=>{var r;a("insert",(r=e).x,r.y)}},rd,42,td)))),256))])))),256))]),t.createElementVNode("div",nd,[l.value?(t.openBlock(),t.createElementBlock("span",ad,t.toDisplayString(l.value.x)+" x "+t.toDisplayString(l.value.y),1)):(t.openBlock(),t.createElementBlock("span",od,t.toDisplayString(t.unref(o)("insertTable")),1))])]))}}),[["__scopeId","data-v-9a40c4f5"]]),ld={config:{type:Object,default:null},color:{type:String,default:""}},sd=["data-editify-mode"],cd=Nn(t.defineComponent({name:"Menu",__name:"menu",props:ld,setup(e,{expose:r}){const n=e,a=t.inject("$editTrans"),o=t.inject("editify"),i=t.inject("isSourceView"),l=t.inject("isFullScreen"),s=t.inject("canUseMenu"),c=t.inject("editor"),d=t.inject("dataRangeCaches"),u=t.inject("showBorder"),h=t.inject("pluginResultList"),m=t.ref({show:n.config.undo.show,leftBorder:n.config.undo.leftBorder,rightBorder:n.config.undo.rightBorder,active:!1,disabled:!1}),p=t.ref({show:n.config.redo.show,leftBorder:n.config.redo.leftBorder,rightBorder:n.config.redo.rightBorder,active:!1,disabled:!1}),f=t.ref({show:n.config.heading.show,displayConfig:{options:n.config.heading.options,value:"",width:n.config.heading.width,maxHeight:n.config.heading.maxHeight},defaultValue:n.config.heading.defaultValue,leftBorder:n.config.heading.leftBorder,rightBorder:n.config.heading.rightBorder,active:!1,disabled:!1}),g=t.ref({show:n.config.indent.show,selectConfig:{options:n.config.indent.options,value:"",width:n.config.indent.width,maxHeight:n.config.indent.maxHeight},leftBorder:n.config.indent.leftBorder,rightBorder:n.config.indent.rightBorder,active:!1,disabled:!1}),v=t.ref({show:n.config.quote.show,leftBorder:n.config.quote.leftBorder,rightBorder:n.config.quote.rightBorder,active:!1,disabled:!1}),b=t.ref({show:n.config.separator.show,leftBorder:n.config.separator.leftBorder,rightBorder:n.config.separator.rightBorder,active:!1,disabled:!1}),y=t.ref({show:n.config.align.show,selectConfig:{options:n.config.align.options,width:n.config.align.width,maxHeight:n.config.align.maxHeight},leftBorder:n.config.align.leftBorder,rightBorder:n.config.align.rightBorder,active:!1,disabled:!1}),w=t.ref({show:n.config.orderList.show,leftBorder:n.config.orderList.leftBorder,rightBorder:n.config.orderList.rightBorder,active:!1,disabled:!1}),x=t.ref({show:n.config.unorderList.show,leftBorder:n.config.unorderList.leftBorder,rightBorder:n.config.unorderList.rightBorder,active:!1,disabled:!1}),k=t.ref({show:n.config.task.show,leftBorder:n.config.task.leftBorder,rightBorder:n.config.task.rightBorder,active:!1,disabled:!1}),E=t.ref({show:n.config.bold.show,leftBorder:n.config.bold.leftBorder,rightBorder:n.config.bold.rightBorder,active:!1,disabled:!1}),S=t.ref({show:n.config.underline.show,leftBorder:n.config.underline.leftBorder,rightBorder:n.config.underline.rightBorder,active:!1,disabled:!1}),T=t.ref({show:n.config.italic.show,leftBorder:n.config.italic.leftBorder,rightBorder:n.config.italic.rightBorder,active:!1,disabled:!1}),B=t.ref({show:n.config.strikethrough.show,leftBorder:n.config.strikethrough.leftBorder,rightBorder:n.config.strikethrough.rightBorder,active:!1,disabled:!1}),C=t.ref({show:n.config.code.show,leftBorder:n.config.code.leftBorder,rightBorder:n.config.code.rightBorder,active:!1,disabled:!1}),_=t.ref({show:n.config.super.show,leftBorder:n.config.super.leftBorder,rightBorder:n.config.super.rightBorder,active:!1,disabled:!1}),N=t.ref({show:n.config.sub.show,leftBorder:n.config.sub.leftBorder,rightBorder:n.config.sub.rightBorder,active:!1,disabled:!1}),M=t.ref({show:n.config.formatClear.show,leftBorder:n.config.formatClear.leftBorder,rightBorder:n.config.formatClear.rightBorder,active:!1,disabled:!1}),A=t.ref({show:n.config.fontSize.show,displayConfig:{options:n.config.fontSize.options,value:"",width:n.config.fontSize.width,maxHeight:n.config.fontSize.maxHeight},defaultValue:n.config.fontSize.defaultValue,leftBorder:n.config.fontSize.leftBorder,rightBorder:n.config.fontSize.rightBorder,active:!1,disabled:!1}),O=t.ref({show:n.config.fontFamily.show,displayConfig:{options:n.config.fontFamily.options,value:"",width:n.config.fontFamily.width,maxHeight:n.config.fontFamily.maxHeight},defaultValue:n.config.fontFamily.defaultValue,leftBorder:n.config.fontFamily.leftBorder,rightBorder:n.config.fontFamily.rightBorder,active:!1,disabled:!1}),R=t.ref({show:n.config.lineHeight.show,displayConfig:{options:n.config.lineHeight.options,value:"",width:n.config.lineHeight.width,maxHeight:n.config.lineHeight.maxHeight},defaultValue:n.config.lineHeight.defaultValue,leftBorder:n.config.lineHeight.leftBorder,rightBorder:n.config.lineHeight.rightBorder,active:!1,disabled:!1}),z=t.ref({show:n.config.foreColor.show,selectConfig:{options:n.config.foreColor.options},leftBorder:n.config.foreColor.leftBorder,rightBorder:n.config.foreColor.rightBorder,value:"",active:!1,disabled:!1}),I=t.ref({show:n.config.backColor.show,selectConfig:{options:n.config.backColor.options},leftBorder:n.config.backColor.leftBorder,rightBorder:n.config.backColor.rightBorder,value:"",active:!1,disabled:!1}),L=t.ref({show:n.config.link.show,leftBorder:n.config.link.leftBorder,rightBorder:n.config.link.rightBorder,active:!1,disabled:!1,text:""}),D=t.ref({show:n.config.image.show,leftBorder:n.config.image.leftBorder,rightBorder:n.config.image.rightBorder,active:!1,disabled:!1,allowedFileType:n.config.image.allowedFileType,multiple:n.config.image.multiple,maxSize:n.config.image.maxSize,minSize:n.config.image.minSize,handleError:n.config.image.handleError,customUpload:n.config.image.customUpload}),P=t.ref({show:n.config.video.show,leftBorder:n.config.video.leftBorder,rightBorder:n.config.video.rightBorder,active:!1,disabled:!1,allowedFileType:n.config.video.allowedFileType,multiple:n.config.video.multiple,maxSize:n.config.video.maxSize,minSize:n.config.video.minSize,handleError:n.config.video.handleError,customUpload:n.config.video.customUpload}),F=t.ref({show:n.config.table.show,leftBorder:n.config.table.leftBorder,rightBorder:n.config.table.rightBorder,active:!1,disabled:!1,maxRows:n.config.table.maxRows,maxColumns:n.config.table.maxColumns}),q=t.ref({show:n.config.codeBlock.show,leftBorder:n.config.codeBlock.leftBorder,rightBorder:n.config.codeBlock.rightBorder,active:!1,disabled:!1}),H=t.ref({show:n.config.sourceView.show,leftBorder:n.config.sourceView.leftBorder,rightBorder:n.config.sourceView.rightBorder,active:!1,disabled:!1}),$=t.ref({show:n.config.fullScreen.show,leftBorder:n.config.fullScreen.leftBorder,rightBorder:n.config.fullScreen.rightBorder,active:!1,disabled:!1}),V=t.computed((()=>o.props.disabled||!s.value)),U=t.computed((()=>{let e={};return h.value.forEach((t=>{t.menu&&(e[t.name]=t.menu.sequence)})),e=Rr(e,n.config.sequence),Object.keys(e).sort(((t,r)=>e[t]>e[r]?1:-1))})),j=t.computed((()=>e=>"sourceView"!=e&&"fullScreen"!=e&&i.value)),W=t.computed((()=>(l.value||o.props.autoheight)&&"fixed"==n.config.mode?"default":n.config.mode)),K=t.computed((()=>"fixed"!=W.value&&u.value)),G=t.computed((()=>{let e={};return h.value.forEach((t=>{t.menu&&(e[t.name]=t.menu.extend)})),Rr(e,n.config.extends)})),Z=(e,t)=>{if(!V.value&&c.value.range)if("undo"==e)o.exposed.undo();else if("redo"==e)o.exposed.redo();else if("heading"==e)dn(c.value,d.value,a,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("indent"==e)"indent-increase"==t?un(c.value,d.value):"indent-decrease"==t&&hn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("quote"==e)mn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("separator"==e)Cn(c.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("align"==e)pn(c.value,d.value,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("orderList"==e)fn(c.value,d.value,!0),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("unorderList"==e)fn(c.value,d.value,!1),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("task"==e)gn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("bold"==e)rn(c.value,d.value,"font-weight","bold")||rn(c.value,d.value,"font-weight","700")?yn(c.value,d.value,["font-weight"]):vn(c.value,d.value,{"font-weight":"bold"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("underline"==e)rn(c.value,d.value,"text-decoration","underline")||rn(c.value,d.value,"text-decoration-line","underline")?yn(c.value,d.value,["text-decoration","text-decoration-line"]):vn(c.value,d.value,{"text-decoration":"underline"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("italic"==e)rn(c.value,d.value,"font-style","italic")?yn(c.value,d.value,["font-style"]):vn(c.value,d.value,{"font-style":"italic"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("strikethrough"==e)rn(c.value,d.value,"text-decoration","line-through")||rn(c.value,d.value,"text-decoration-line","line-through")?yn(c.value,d.value,["text-decoration","text-decoration-line"]):vn(c.value,d.value,{"text-decoration":"line-through"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("code"==e)nn(c.value,d.value,"data-editify-code")?wn(c.value,d.value,["data-editify-code"]):bn(c.value,d.value,{"data-editify-code":!0}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("super"==e)rn(c.value,d.value,"vertical-align","super")?yn(c.value,d.value,["vertical-align"]):vn(c.value,d.value,{"vertical-align":"super"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("sub"==e)rn(c.value,d.value,"vertical-align","sub")?yn(c.value,d.value,["vertical-align"]):vn(c.value,d.value,{"vertical-align":"sub"}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("formatClear"==e)yn(c.value,d.value),wn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("fontSize"==e)vn(c.value,d.value,{"font-size":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("fontFamily"==e)vn(c.value,d.value,{"font-family":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("lineHeight"==e)xn(c.value,d.value,t),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("foreColor"==e)vn(c.value,d.value,{color:t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("backColor"==e)vn(c.value,d.value,{"background-color":t}),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender();else if("link"==e){if(!t.url)return;kn(c.value,t.text,t.url,t.newOpen),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else if("image"==e){if(!t)return;const e=t.filter((e=>!!e));if(0==e.length)return;e.forEach((e=>{En(c.value,e)})),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else if("video"==e){if(!t)return;const e=t.filter((e=>!!e));if(0==e.length)return;e.forEach((e=>{Sn(c.value,e)})),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()}else"table"==e?(Tn(c.value,t.row,t.column),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()):"codeBlock"==e?(Bn(c.value,d.value),c.value.formatElementStack(),c.value.domRender(),c.value.rangeRender()):"sourceView"==e?(i.value=!i.value,H.value.active=i.value,i.value||c.value.rangeRender()):"fullScreen"==e&&(l.value=!l.value,$.value.active=l.value,c.value.rangeRender())},X=t.defineComponent((e=>{const r=t.getCurrentInstance(),o={tooltip:n.config.tooltip,name:e.name};return()=>{if("undo"==o.name&&m.value.show)return t.h(dc,{...o,title:a("undo"),leftBorder:m.value.leftBorder,rightBorder:m.value.rightBorder,disabled:m.value.disabled||e.disabled||V.value,color:n.color,active:m.value.active,onOperate:Z},(()=>t.h(Mn,{value:"undo"})));if("redo"==o.name&&p.value.show)return t.h(dc,{...o,title:a("redo"),leftBorder:p.value.leftBorder,rightBorder:p.value.rightBorder,disabled:p.value.disabled||e.disabled||V.value,color:n.color,active:p.value.active,onOperate:Z},(()=>t.h(Mn,{value:"redo"})));if("heading"==o.name&&f.value.show)return t.h(dc,{...o,type:"display",displayConfig:f.value.displayConfig,title:a("heading"),leftBorder:f.value.leftBorder,rightBorder:f.value.rightBorder,color:n.color,disabled:f.value.disabled||e.disabled||V.value,active:f.value.active,onOperate:Z});if("indent"==o.name&&g.value.show)return t.h(dc,{...o,type:"select",selectConfig:g.value.selectConfig,title:a("indent"),leftBorder:g.value.leftBorder,rightBorder:g.value.rightBorder,color:n.color,disabled:g.value.disabled||e.disabled||V.value,active:g.value.active,onOperate:Z},(()=>t.h(Mn,{value:"indent-increase"})));if("quote"==o.name&&v.value.show)return t.h(dc,{...o,title:a("quote"),leftBorder:v.value.leftBorder,rightBorder:v.value.rightBorder,color:n.color,disabled:v.value.disabled||e.disabled||V.value,active:v.value.active,onOperate:Z},(()=>t.h(Mn,{value:"quote"})));if("separator"==o.name&&b.value.show)return t.h(dc,{...o,title:a("separator"),leftBorder:b.value.leftBorder,rightBorder:b.value.rightBorder,color:n.color,disabled:b.value.disabled||e.disabled||V.value,active:b.value.active,onOperate:Z},(()=>t.h(Mn,{value:"separator"})));if("align"==o.name&&y.value.show)return t.h(dc,{...o,type:"select",selectConfig:y.value.selectConfig,title:a("align"),leftBorder:y.value.leftBorder,rightBorder:y.value.rightBorder,color:n.color,disabled:y.value.disabled||e.disabled||V.value,active:y.value.active,onOperate:Z},(()=>t.h(Mn,{value:"align-left"})));if("orderList"==o.name&&w.value.show)return t.h(dc,{...o,title:a("orderList"),leftBorder:w.value.leftBorder,rightBorder:w.value.rightBorder,color:n.color,disabled:w.value.disabled||e.disabled||V.value,active:w.value.active,onOperate:Z},(()=>t.h(Mn,{value:"list-ordered"})));if("unorderList"==o.name&&x.value.show)return t.h(dc,{...o,title:a("unorderList"),leftBorder:x.value.leftBorder,rightBorder:x.value.rightBorder,color:n.color,disabled:x.value.disabled||e.disabled||V.value,active:x.value.active,onOperate:Z},(()=>t.h(Mn,{value:"list-unordered"})));if("task"==o.name&&k.value.show)return t.h(dc,{...o,title:a("task"),leftBorder:k.value.leftBorder,rightBorder:k.value.rightBorder,color:n.color,disabled:k.value.disabled||e.disabled||V.value,active:k.value.active,onOperate:Z},(()=>t.h(Mn,{value:"task"})));if("bold"==o.name&&E.value.show)return t.h(dc,{...o,title:a("bold"),leftBorder:E.value.leftBorder,rightBorder:E.value.rightBorder,color:n.color,disabled:E.value.disabled||e.disabled||V.value,active:E.value.active,onOperate:Z},(()=>t.h(Mn,{value:"bold"})));if("underline"==o.name&&S.value.show)return t.h(dc,{...o,title:a("underline"),leftBorder:S.value.leftBorder,rightBorder:S.value.rightBorder,color:n.color,disabled:S.value.disabled||e.disabled||V.value,active:S.value.active,onOperate:Z},(()=>t.h(Mn,{value:"underline"})));if("italic"==o.name&&T.value.show)return t.h(dc,{...o,title:a("italic"),leftBorder:T.value.leftBorder,rightBorder:T.value.rightBorder,color:n.color,disabled:T.value.disabled||e.disabled||V.value,active:T.value.active,onOperate:Z},(()=>t.h(Mn,{value:"italic"})));if("strikethrough"==o.name&&B.value.show)return t.h(dc,{...o,title:a("strikethrough"),leftBorder:B.value.leftBorder,rightBorder:B.value.rightBorder,color:n.color,disabled:B.value.disabled||e.disabled||V.value,active:B.value.active,onOperate:Z},(()=>t.h(Mn,{value:"strikethrough"})));if("code"==o.name&&C.value.show)return t.h(dc,{...o,title:a("code"),leftBorder:C.value.leftBorder,rightBorder:C.value.rightBorder,color:n.color,disabled:C.value.disabled||e.disabled||V.value,active:C.value.active,onOperate:Z},(()=>t.h(Mn,{value:"code"})));if("super"==o.name&&_.value.show)return t.h(dc,{...o,title:a("superscript"),leftBorder:_.value.leftBorder,rightBorder:_.value.rightBorder,color:n.color,disabled:_.value.disabled||e.disabled||V.value,active:_.value.active,onOperate:Z},(()=>t.h(Mn,{value:"superscript"})));if("sub"==o.name&&N.value.show)return t.h(dc,{...o,title:a("subscript"),leftBorder:N.value.leftBorder,rightBorder:N.value.rightBorder,color:n.color,disabled:N.value.disabled||e.disabled||V.value,active:N.value.active,onOperate:Z},(()=>t.h(Mn,{value:"subscript"})));if("formatClear"==o.name&&M.value.show)return t.h(dc,{...o,title:a("formatClear"),leftBorder:M.value.leftBorder,rightBorder:M.value.rightBorder,color:n.color,disabled:M.value.disabled||e.disabled||V.value,active:M.value.active,onOperate:Z},(()=>t.h(Mn,{value:"format-clear"})));if("fontSize"==o.name&&A.value.show)return t.h(dc,{...o,type:"display",displayConfig:A.value.displayConfig,title:a("fontSize"),leftBorder:A.value.leftBorder,rightBorder:A.value.rightBorder,color:n.color,disabled:A.value.disabled||e.disabled||V.value,active:A.value.active,onOperate:Z});if("fontFamily"==o.name&&O.value.show)return t.h(dc,{...o,type:"display",displayConfig:O.value.displayConfig,title:a("fontFamily"),leftBorder:O.value.leftBorder,rightBorder:O.value.rightBorder,color:n.color,disabled:O.value.disabled||e.disabled||V.value,active:O.value.active,onOperate:Z});if("lineHeight"==o.name&&R.value.show)return t.h(dc,{...o,type:"display",displayConfig:R.value.displayConfig,title:a("lineHeight"),leftBorder:R.value.leftBorder,rightBorder:R.value.rightBorder,color:n.color,disabled:R.value.disabled||e.disabled||V.value,active:R.value.active,onOperate:Z});if("foreColor"==o.name&&z.value.show)return t.h(dc,{...o,ref:"btnRef",type:"select",selectConfig:z.value.selectConfig,title:a("foreColor"),leftBorder:z.value.leftBorder,rightBorder:z.value.rightBorder,color:n.color,disabled:z.value.disabled||e.disabled||V.value,active:z.value.active,hideScroll:!0},{default:()=>t.h(Mn,{value:"font-color"}),layer:e=>t.h(wc,{tooltip:n.config.tooltip,value:z.value.value,data:e.options,color:n.color,onChange:e=>{Z("foreColor",e);r.proxy.$refs.btnRef.show=!1}})});if("backColor"==o.name&&I.value.show)return t.h(dc,{...o,type:"select",ref:"btnRef",selectConfig:I.value.selectConfig,title:a("backColor"),leftBorder:I.value.leftBorder,rightBorder:I.value.rightBorder,color:n.color,disabled:I.value.disabled||e.disabled||V.value,active:I.value.active,onOperate:Z,hideScroll:!0},{default:()=>t.h(Mn,{value:"brush"}),layer:e=>t.h(wc,{tooltip:n.config.tooltip,value:I.value.value,data:e.options,color:n.color,onChange:e=>{Z("backColor",e);r.proxy.$refs.btnRef.show=!1}})});if("link"==o.name&&L.value.show)return t.h(dc,{...o,type:"select",ref:"btnRef",title:a("insertLink"),leftBorder:L.value.leftBorder,rightBorder:L.value.rightBorder,color:n.color,disabled:L.value.disabled||e.disabled||V.value,active:L.value.active,hideScroll:!0,onLayerShow:()=>{L.value.text=an(d.value)}},{default:()=>t.h(Mn,{value:"link"}),layer:()=>t.h(Lc,{color:n.color,text:L.value.text,onInsert:(e,t,n)=>{Z("link",{text:e,url:t,newOpen:n});r.proxy.$refs.btnRef.show=!1}})});if("image"==o.name&&D.value.show)return t.h(dc,{...o,type:"select",ref:"btnRef",title:a("insertImage"),leftBorder:D.value.leftBorder,rightBorder:D.value.rightBorder,color:n.color,disabled:D.value.disabled||e.disabled||V.value,active:D.value.active,hideScroll:!0},{default:()=>t.h(Mn,{value:"image"}),layer:()=>t.h(Uc,{color:n.color,allowedFileType:D.value.allowedFileType,multiple:D.value.multiple,maxSize:D.value.maxSize,minSize:D.value.minSize,customUpload:D.value.customUpload,handleError:D.value.handleError,onChange:()=>{r.proxy.$refs.btnRef.$refs.layerRef.setPosition()},onInsert:e=>{Z("image",e);r.proxy.$refs.btnRef.show=!1}})});if("video"==o.name&&P.value.show)return t.h(dc,{...o,type:"select",ref:"btnRef",title:a("insertVideo"),leftBorder:P.value.leftBorder,rightBorder:P.value.rightBorder,color:n.color,disabled:P.value.disabled||e.disabled||V.value,active:P.value.active,hideScroll:!0},{default:()=>t.h(Mn,{value:"video"}),layer:()=>t.h(Qc,{color:n.color,allowedFileType:P.value.allowedFileType,multiple:P.value.multiple,maxSize:P.value.maxSize,minSize:P.value.minSize,customUpload:P.value.customUpload,handleError:P.value.handleError,onChange:()=>{r.proxy.$refs.btnRef.$refs.layerRef.setPosition()},onInsert:e=>{Z("video",e);r.proxy.$refs.btnRef.show=!1}})});if("table"==o.name&&F.value.show)return t.h(dc,{...o,type:"select",ref:"btnRef",title:a("insertTable"),leftBorder:F.value.leftBorder,rightBorder:F.value.rightBorder,color:n.color,disabled:F.value.disabled||e.disabled||V.value,active:F.value.active,hideScroll:!0},{default:()=>t.h(Mn,{value:"table"}),layer:()=>t.h(id,{color:n.color,maxRows:F.value.maxRows,maxColumns:F.value.maxColumns,onInsert:(e,t)=>{Z("table",{row:e,column:t});r.proxy.$refs.btnRef.show=!1}})});if("codeBlock"==o.name&&q.value.show)return t.h(dc,{...o,title:a("inserCodeBlock"),leftBorder:q.value.leftBorder,rightBorder:q.value.rightBorder,color:n.color,disabled:q.value.disabled||e.disabled||V.value,active:q.value.active,onOperate:Z},(()=>t.h(Mn,{value:"code-block"})));if("sourceView"==o.name&&H.value.show)return t.h(dc,{...o,title:a("sourceView"),leftBorder:H.value.leftBorder,rightBorder:H.value.rightBorder,color:n.color,disabled:H.value.disabled||e.disabled||V.value,active:H.value.active,onOperate:Z},(()=>t.h(Mn,{value:"source-view"})));if("fullScreen"==o.name&&$.value.show)return t.h(dc,{...o,title:a("fullScreen"),leftBorder:$.value.leftBorder,rightBorder:$.value.rightBorder,color:n.color,disabled:$.value.disabled||e.disabled||V.value,active:$.value.active,onOperate:Z},(()=>t.h(Mn,{value:"full-screen"})));if(ae.isObject(G.value)){const a=G.value[o.name];if(a)return t.h(dc,{...o,ref:"btnRef",type:a.type||"default",title:a.title||"",leftBorder:a.leftBorder||!1,rightBorder:a.rightBorder||!1,disabled:a.disabled||e.disabled||V.value,hideScroll:a.hideScroll||!1,active:a.active||!1,selectConfig:{width:a.width,maxHeight:a.maxHeight,options:a.options},displayConfig:{width:a.width,maxHeight:a.maxHeight,value:a.value,options:a.options},color:n.color,onLayerShow:()=>{"function"==typeof a.onLayerShow&&a.onLayerShow(o.name,r.proxy.$refs.btnRef)},onLayerShown:()=>{"function"==typeof a.onLayerShown&&a.onLayerShown(o.name,r.proxy.$refs.btnRef)},onLayerHidden:()=>{"function"==typeof a.onLayerHidden&&a.onLayerHidden(o.name,r.proxy.$refs.btnRef)},onOperate:(e,t)=>{"function"==typeof a.onOperate&&a.onOperate(e,t,r.proxy.$refs.btnRef)}},{default:()=>a.default?a.default(o.name,r.proxy.$refs.btnRef):null,layer:()=>a.layer?a.layer(o.name,r.proxy.$refs.btnRef):null,option:()=>a.option?a.option(o.name,r.proxy.$refs.btnRef):null})}return null}}),{props:{name:String,disabled:Boolean}});return r({handleRangeUpdate:()=>{const e=Gr(c.value,d.value),t=Xr(c.value,d.value),r=Zr(c.value,d.value),a=Yr(c.value,d.value),o=Qr(c.value,d.value),s=Jr(c.value,d.value),u=en(c.value,d.value,!0),V=en(c.value,d.value,!1),U=tn(c.value,d.value),j=e=>{let t=!1,r=h.value.length;for(let n=0;n<r;n++){const r=h.value[n];if(r.menu&&"function"==typeof r.menu.extraDisabled&&(t=r.menu.extraDisabled(e),t))break}return"function"==typeof n.config.extraDisabled?n.config.extraDisabled(e)||t||!1:t||!1};m.value.disabled=!c.value.history.get(-1)||j("undo"),p.value.disabled=!c.value.history.get(1)||j("redo");const W=f.value.displayConfig.options.find((e=>{let t=e;return ae.isObject(e)&&(t=e.value),c.value.range.anchor.isEqual(c.value.range.focus)?c.value.range.anchor.element.getBlock().parsedom==t:d.value.list.every((e=>e.element.isBlock()?e.element.parsedom==t:e.element.getBlock().parsedom==t))}));f.value.displayConfig.value=W?ae.isObject(W)?W.value:W:f.value.defaultValue,f.value.disabled=e||t||j("heading"),g.value.disabled=e||t||j("indent"),v.value.active=s,v.value.disabled=e||t||j("quote"),b.value.disabled=e||j("separator"),y.value.disabled=e||j("align"),w.value.active=u,w.value.disabled=e||t||j("orderList"),x.value.active=V,x.value.disabled=e||t||j("unorderList"),k.value.active=U,k.value.disabled=e||t||j("task"),E.value.active=rn(c.value,d.value,"font-weight","bold")||rn(c.value,d.value,"font-weight","700"),E.value.disabled=e||j("bold"),S.value.active=rn(c.value,d.value,"text-decoration","underline")||rn(c.value,d.value,"text-decoration-line","underline"),S.value.disabled=e||j("underline"),T.value.active=rn(c.value,d.value,"font-style","italic"),T.value.disabled=e||j("italic"),B.value.active=rn(c.value,d.value,"text-decoration","line-through")||rn(c.value,d.value,"text-decoration-line","line-through"),B.value.disabled=e||j("strikethrough"),C.value.active=nn(c.value,d.value,"data-editify-code"),C.value.disabled=e||j("code"),_.value.active=rn(c.value,d.value,"vertical-align","super"),_.value.disabled=e||j("super"),N.value.active=rn(c.value,d.value,"vertical-align","sub"),N.value.disabled=e||j("sub"),M.value.disabled=e||j("formatClear");const K=A.value.displayConfig.options.find((e=>ae.isObject(e)?rn(c.value,d.value,"font-size",e.value):rn(c.value,d.value,"font-size",e)));A.value.displayConfig.value=K?ae.isObject(K)?K.value:K:A.value.defaultValue,A.value.disabled=e||j("fontSize");const G=O.value.displayConfig.options.find((e=>ae.isObject(e)?rn(c.value,d.value,"font-family",e.value):rn(c.value,d.value,"font-family",e)));O.value.displayConfig.value=G?ae.isObject(G)?G.value:G:O.value.defaultValue,O.value.disabled=e||j("fontFamily");const Z=R.value.displayConfig.options.find((e=>{let t=e;if(ae.isObject(e)&&(t=e.value),c.value.range.anchor.isEqual(c.value.range.focus)){const e=c.value.range.anchor.element.getBlock();return e.hasStyles()&&e.styles["line-height"]==t}return d.value.list.every((e=>{if(e.element.isBlock()||e.element.isInblock())return e.element.hasStyles()&&e.element.styles["line-height"]==t;const r=e.element.getBlock(),n=e.element.getInblock();return n?n.hasStyles()&&n.styles["line-height"]==t:r.hasStyles()&&r.styles["line-height"]==t}))}));R.value.displayConfig.value=Z?ae.isObject(Z)?Z.value:Z:R.value.defaultValue,R.value.disabled=e||j("lineHeight");const X=z.value.selectConfig.options.find((e=>ae.isObject(e)?rn(c.value,d.value,"color",e.value):rn(c.value,d.value,"color",e)));z.value.value=X?ae.isObject(X)?X.value:X:"",z.value.disabled=e||j("foreColor");const Y=I.value.selectConfig.options.find((e=>ae.isObject(e)?rn(c.value,d.value,"background-color",e.value):rn(c.value,d.value,"background-color",e)));I.value.value=Y?ae.isObject(Y)?Y.value:Y:"",I.value.disabled=e||j("backColor"),L.value.disabled=r||e||j("link"),D.value.disabled=e||j("image"),P.value.disabled=e||j("video"),F.value.disabled=e||t||j("table"),q.value.active=!!Vr(c.value,d.value,{parsedom:"pre"}),q.value.disabled=t||a||o||j("codeBlock"),H.value.active=i.value,$.value.active=l.value}}),(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify-menu",{"editify-border":K.value,"editify-source":t.unref(i)&&"inner"==W.value,"editify-fullscreen":t.unref(l)}]),"data-editify-mode":W.value,style:t.normalizeStyle(e.config.style||"")},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.value,(e=>(t.openBlock(),t.createBlock(t.unref(X),{name:e,disabled:j.value(e)},null,8,["name","disabled"])))),256))],14,sd))}}),[["__scopeId","data-v-d645af8d"]]),dd={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=>ae.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},tab:{type:Boolean,default:!0},plugins:{type:Array,default:function(){return[]}}},ud={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",superscript:"Superscript",subscript:"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",insertPanel:"Insert Panel",panelTitle:"Here is the title",panelContent:"Here is the content",insertInfoBlock:"Insert Information Block"},hd={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:"行内代码",superscript:"上标",subscript:"下标",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语法",insertPanel:"插入面板",panelTitle:"这里是标题",panelContent:"这里是内容",insertInfoBlock:"插入信息块"},md=["data-editify-uid"],pd=["data-editify-placeholder"],fd=["value"],gd={class:"editify-footer-words"},vd=Nn(t.defineComponent({name:"editify",__name:"editify",props:dd,emits:["update:modelValue","focus","blur","change","keydown","keyup","insertparagraph","rangeupdate","updateview"],setup(e,{expose:r,emit:n}){const a=t.getCurrentInstance(),o=e,i=n,l=(s=o.locale||"zh_CN",e=>({zh_CN:hd,en_US:ud}[s][e]));var s;const c=t.ref(!1),d=t.ref(!1),u=t.ref(null),h=t.ref({element:null,start:0}),m=t.ref({show:!1,node:null,type:"text"}),p=t.ref(null),f=t.ref(null),g=t.ref(null),v=t.ref(null),b=t.ref(null),w=t.ref(null),x=t.ref(null),k=t.ref(!1),E=t.ref(!1),S=t.ref(!1),T=t.ref({flatList:[],list:[]}),B=t.computed({set(e){i("update:modelValue",e)},get:()=>o.modelValue||"<p><br></p>"}),C=t.computed((()=>te.string2dom(`<div>${B.value}</div>`).innerText)),_=t.computed((()=>!(!(x.value&&B.value&&1==x.value.stack.length&&"block"==x.value.stack[0].type&&x.value.stack[0].parsedom==y.BLOCK_NODE&&x.value.stack[0].isOnlyHasBreak())||x.value.stack[0].hasStyles()||x.value.stack[0].hasMarks())&&!d.value)),N=t.computed((()=>!E.value&&o.border)),M=t.computed((()=>{return Rr((e=l,t=o.locale,{use:!0,style:null,tooltip:!0,codeBlock:{languages:{show:!0,options:[{label:e("autoRecognize"),value:""},...Or],width:120,maxHeight:180,leftBorder:!0,rightBorder:!1}},text:{heading:{show:!0,options:Lr(e).heading,defaultValue:"p",width:"en_US"==t?150:130,maxHeight:"",leftBorder:!1,rightBorder:!0},align:{show:!1,options:Lr(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!1,rightBorder:!1},orderList:{show:!1,leftBorder:!1,rightBorder:!1},unorderList:{show:!1,leftBorder:!1,rightBorder:!1},task:{show:!1,leftBorder:!1,rightBorder:!1},bold:{show:!0,leftBorder:!1,rightBorder:!1},italic:{show:!0,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,leftBorder:!1,rightBorder:!1},underline:{show:!0,leftBorder:!1,rightBorder:!1},code:{show:!0,leftBorder:!1,rightBorder:!1},super:{show:!1,leftBorder:!1,rightBorder:!1},sub:{show:!1,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,options:Lr(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!1,options:Lr(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},lineHeight:{show:!1,options:Lr(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1},foreColor:{show:!0,options:Lr(e).foreColor,leftBorder:!1,rightBorder:!1},backColor:{show:!0,options:Lr(e).backColor,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,leftBorder:!0,rightBorder:!1}},extraDisabled:null}),o.toolbar||{});var e,t})),A=t.computed((()=>{const e=[];return o.plugins.forEach((t=>{let r=t(a,l);e.push(r)})),e})),O=t.computed((()=>{return Rr((e=l,t=o.locale,{use:!0,tooltip:!0,mode:"default",extraDisabled:null,style:null,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,sourceView:28,fullScreen:29},undo:{show:!0,leftBorder:!1,rightBorder:!1},redo:{show:!0,leftBorder:!1,rightBorder:!1},heading:{show:!0,options:Lr(e).heading,defaultValue:"p",width:"en_US"==t?150:130,maxHeight:"",leftBorder:!0,rightBorder:!1},indent:{show:!0,options:Lr(e).indent,width:"en_US"==t?150:110,maxHeight:"",leftBorder:!1,rightBorder:!1},quote:{show:!0,leftBorder:!1,rightBorder:!1},separator:{show:!0,leftBorder:!1,rightBorder:!1},align:{show:!0,options:Lr(e).align,width:"zh_CN"==t?110:130,maxHeight:"",leftBorder:!0,rightBorder:!1},orderList:{show:!0,leftBorder:!1,rightBorder:!1},unorderList:{show:!0,leftBorder:!1,rightBorder:!1},task:{show:!0,leftBorder:!1,rightBorder:!1},bold:{show:!0,leftBorder:!0,rightBorder:!1},underline:{show:!0,leftBorder:!1,rightBorder:!1},italic:{show:!0,leftBorder:!1,rightBorder:!1},strikethrough:{show:!0,leftBorder:!1,rightBorder:!1},code:{show:!0,leftBorder:!1,rightBorder:!1},super:{show:!0,leftBorder:!1,rightBorder:!1},sub:{show:!0,leftBorder:!1,rightBorder:!1},formatClear:{show:!0,leftBorder:!1,rightBorder:!1},fontSize:{show:!0,options:Lr(e).fontSize,defaultValue:"",width:100,maxHeight:200,leftBorder:!0,rightBorder:!1},fontFamily:{show:!0,options:Lr(e).fontFamily,defaultValue:"",width:100,maxHeight:200,leftBorder:!1,rightBorder:!1},lineHeight:{show:!0,options:Lr(e).lineHeight,defaultValue:"",width:90,maxHeight:"",leftBorder:!1,rightBorder:!1},foreColor:{show:!0,options:Lr(e).foreColor,leftBorder:!0,rightBorder:!1},backColor:{show:!0,options:Lr(e).backColor,leftBorder:!1,rightBorder:!1},link:{show:!0,leftBorder:!0,rightBorder:!1},image:{show:!0,leftBorder:!1,rightBorder:!1,allowedFileType:["jpg","png","jpeg","webp","jfif","ico","gif","svg","psd"],multiple:!1,maxSize:null,minSize:null,customUpload:null,handleError:null},video:{show:!0,leftBorder:!1,rightBorder:!1,allowedFileType:["mp4","avi","mpg","wmv","mov","rm","swf","flv"],multiple:!1,maxSize:null,minSize:null,customUpload:null,handleError:null},table:{show:!0,leftBorder:!1,rightBorder:!1,maxRows:10,maxColumns:10},codeBlock:{show:!0,leftBorder:!1,rightBorder:!1},sourceView:{show:!1,leftBorder:!0,rightBorder:!1},fullScreen:{show:!1,leftBorder:!1,rightBorder:!1},extends:{}}),o.menu||{});var e,t})),R=e=>{c.value=!0,B.value=e,t.nextTick((()=>{c.value=!1}))},z=()=>{m.value.show=!1,m.value.node=null},I=()=>{o.disabled||k.value||(z(),t.nextTick((()=>{const e=Vr(x.value,T.value,{parsedom:"table"}),t=Vr(x.value,T.value,{parsedom:"pre"}),r=Vr(x.value,T.value,{parsedom:"a"}),n=Vr(x.value,T.value,{parsedom:"img"}),o=Vr(x.value,T.value,{parsedom:"video"});if(r)m.value.type="link",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${r.key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(n)m.value.type="image",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${n.key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(o)m.value.type="video",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${o.key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(e)m.value.type="table",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${e.key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else if(t)m.value.type="codeBlock",m.value.node=`[data-editify-uid="${a.uid}"] [data-editify-element="${t.key}"]`,m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0;else{!T.value.flatList.filter((e=>e.element.isText())).length||Xr(x.value,T.value)||Gr(x.value,T.value)||Zr(x.value,T.value)||Yr(x.value,T.value)||Qr(x.value,T.value)||(m.value.type="text",m.value.show?v.value.$refs.layerRef.setPosition():m.value.show=!0)}})))},L=()=>{let e=[];A.value.forEach((t=>{t.renderRule&&e.push(t.renderRule)}));let t=[...o.extraKeepTags];A.value.forEach((e=>{e.extraKeepTags&&Array.isArray(e.extraKeepTags)&&e.extraKeepTags.forEach((e=>{t.includes(e)||t.push(e)}))})),x.value=new Q(g.value,{value:B.value,disabled:o.disabled,renderRules:[e=>{((e,t)=>{"ol"!=t.parsedom&&"ul"!=t.parsedom||(t.hasChildren()&&t.children.forEach((r=>{const n=r.clone();n.parsedom="div",n.type=t.type,n.hasMarks()?n.marks["data-editify-list"]=t.parsedom:n.marks={"data-editify-list":t.parsedom},e.addElementBefore(n,t)})),t.toEmpty())})(x.value,e)},e=>{((e,t)=>{if(Ur(t,!0)){const r=e.getPreviousElement(t);if(r&&Ur(r,!0)){const e=Number(r.marks["data-editify-value"]);t.marks["data-editify-value"]=e+1}else t.marks["data-editify-value"]=1}})(x.value,e)},e=>{((e,t)=>{if("img"==t.parsedom||"video"==t.parsedom||"a"==t.parsedom){const e={"data-editify-element":t.key};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}if("video"==t.parsedom||"hr"==t.parsedom){const r=e.getPreviousElement(t),n=e.getNextElement(t);if(!r||!r.isSpaceText()){const r=y.getSpaceElement();e.addElementBefore(r,t)}if(!n||!n.isSpaceText()){const r=y.getSpaceElement();e.addElementAfter(r,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))}if("code"==t.parsedom){t.parsedom="span";const e={"data-editify-code":!0};t.hasMarks()?Object.assign(t.marks,e):t.marks=e}})(x.value,e)},e=>{var t;x.value,"th"==(t=e).parsedom&&(t.parsedom="td")},e=>{Ws(x.value,e)},e=>{((e,t)=>{if("td"==t.parsedom&&t.hasMarks()&&t.marks["data-editify-merged"]&&e.range){const r=(t,r)=>{let n=!1,a=e.getPreviousElement(t),o=1;for(;a;){const{colspan:t}=Fr(a);if(a.hasMarks()&&!a.marks["data-editify-merged"]&&t>o){n=!0,r(a);break}a=e.getPreviousElement(a),o++}return n},n=(t,r)=>{let n=!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}=Fr(t);if(t.hasMarks()&&!t.marks["data-editify-merged"]&&l>i){n=!0,r(t);break}o=e.getPreviousElement(o),i++}return n};t.isContains(e.range.anchor.element)&&(r(t,(t=>{e.range.anchor.moveToEnd(t)}))||n(t,(t=>{e.range.anchor.moveToEnd(t)}))),t.isContains(e.range.focus.element)&&(r(t,(t=>{e.range.focus.moveToEnd(t)}))||n(t,(t=>{e.range.focus.moveToEnd(t)})))}})(x.value,e)},e=>{var t,r,n,a,o,i,l;Ks(x.value,e,!(!(null==(t=M.value)?void 0:t.use)||!(null==(a=null==(n=null==(r=M.value)?void 0:r.codeBlock)?void 0:n.languages)?void 0:a.show)),null==(l=null==(i=null==(o=M.value)?void 0:o.codeBlock)?void 0:i.languages)?void 0:l.options)},e=>{((e,t)=>{t.hasChildren()&&t.children.forEach((r=>{if(Ur(r,!0)||Ur(r,!1)||jr(r)||["blockquote","pre","table","h1","h2","h3","h4","h5","h6","p"].includes(r.parsedom)||Ps(r)||$s(r)){const n=r.clone();n.type="block";const a=t.getBlock();e.addElementAfter(n,a),r.toEmpty()}}))})(x.value,e)},...e,...o.renderRules],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:$,customMerge:V,customParseNode:U,extraKeepTags:t}),R(x.value.value),x.value.on("change",G),x.value.on("focus",X),x.value.on("blur",Z),x.value.on("keydown",j),x.value.on("keyup",W),x.value.on("insertParagraph",Y),x.value.on("rangeUpdate",ee),x.value.on("deleteInStart",re),x.value.on("deleteComplete",ae),x.value.on("afterRender",oe),x.value.formatElementStack(),x.value.domRender(),!o.autofocus||k.value||o.disabled||ie()},D=()=>{g.value.querySelectorAll("video").forEach((e=>{e.style.height=e.offsetWidth/o.videoRatio+"px"}))},P=e=>{if(o.disabled)return;const t=e.target,r=e;if(te.isContains(g.value,t)){const e=ne.get(t,"data-alex-editor-key");if(e){const n=x.value.getElementByKey(e);if(n)if("td"==n.parsedom){const e=n.parent.children.length;if(n.parent.children[e-1].isEqual(n))return;const a=te.getElementBounding(t);r.pageX>=Math.abs(a.left+t.offsetWidth-5)&&r.pageX<=Math.abs(a.left+t.offsetWidth+5)&&(h.value.element=n,h.value.start=r.pageX)}else if(["img","video"].includes(n.parsedom)){const e=te.getElementBounding(t);r.pageX>=Math.abs(e.left+t.offsetWidth-10)&&r.pageX<=Math.abs(e.left+t.offsetWidth)&&(h.value.element=n,h.value.start=r.pageX)}}}te.isContains(w.value,t)||k.value||(S.value=!1)},F=e=>{if(o.disabled)return;const t=e,r=e.target;if(te.isContains(g.value,r)&&["img","video"].includes(r.tagName.toLocaleLowerCase())){const e=te.getElementBounding(r);t.pageX>=Math.abs(e.left+r.offsetWidth-10)&&t.pageX<=Math.abs(e.left+r.offsetWidth)?r.style.cursor="col-resize":r.style.cursor=""}if(h.value.element)if("td"==h.value.element.parsedom){const e=Vr(x.value,T.value,{parsedom:"table"});if(!e)return;const r=e.children.find((e=>"colgroup"==e.parsedom)),n=h.value.element.parent.children.findIndex((e=>e.isEqual(h.value.element))),a=""+(h.value.element.elm.offsetWidth+t.pageX-h.value.start);r.children[n].marks.width=a,r.children[n].elm.setAttribute("width",a),h.value.start=t.pageX}else if(["img","video"].includes(h.value.element.parsedom)){const e=h.value.element.elm.offsetWidth+t.pageX-h.value.start+"px";h.value.element.hasStyles()?h.value.element.styles.width=e:h.value.element.styles={width:e},h.value.element.elm.style.width=e,"video"==h.value.element.parsedom&&D(),h.value.start=t.pageX}},q=()=>{if(!o.disabled&&h.value.element)if("td"==h.value.element.parsedom){const e=Vr(x.value,T.value,{parsedom:"table"});if(!e)return;const t=e.children.find((e=>"colgroup"==e.parsedom)),r=h.value.element.parent.children.findIndex((e=>e.isEqual(h.value.element))),n=parseFloat(t.children[r].marks.width);isNaN(n)||(t.children[r].marks.width=`${Number((n/h.value.element.parent.elm.offsetWidth*100).toFixed(2))}%`,x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),h.value.element=null,h.value.start=0}else if(["img","video"].includes(h.value.element.parsedom)){const e=parseFloat(h.value.element.styles.width);isNaN(e)||(h.value.element.hasStyles()?h.value.element.styles.width=`${Number((e/te.width(g.value)*100).toFixed(2))}%`:h.value.element.styles={width:`${Number((e/te.width(g.value)*100).toFixed(2))}%`},x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),h.value.element=null,h.value.start=0}},H=e=>{if(o.disabled)return;const t=e.target,r=e;if(te.isContains(g.value,t)){const e=ne.get(t,"data-alex-editor-key");if(e){const n=x.value.getElementByKey(e);if(jr(n)){const e=te.getElementBounding(t);r.pageX>=Math.abs(e.left)&&r.pageX<=Math.abs(e.left+16)&&r.pageY>=Math.abs(e.top+t.offsetHeight/2-8)&&r.pageY<=Math.abs(e.top+t.offsetHeight/2+8)&&("checked"==n.marks["data-editify-task"]?n.marks["data-editify-task"]="uncheck":n.marks["data-editify-task"]="checked",x.value.range||x.value.initRange(),x.value.range.anchor.moveToEnd(n),x.value.range.focus.moveToEnd(n),x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender())}}}},$=async e=>{if(y.flatElements(e).forEach((e=>{if(!e.isText()){let t={},r={};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),"div"==e.parsedom&&e.marks["data-editify-list"]&&(t["data-editify-list"]=e.marks["data-editify-list"],e.marks["data-editify-value"]&&(t["data-editify-value"]=e.marks["data-editify-value"])),e.parsedom==y.TEXT_NODE&&e.marks["data-editify-code"]&&(t["data-editify-code"]=e.marks["data-editify-code"]),"div"==e.parsedom&&e.marks["data-editify-task"]&&(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"])),e.hasStyles()&&(["img","video"].includes(e.parsedom)&&e.styles.width&&(r.width=e.styles.width),(e.isBlock()||e.isInblock())&&e.styles["text-indent"]&&(r["text-indent"]=e.styles["text-indent"]),(e.isBlock()||e.isInblock())&&e.styles["text-align"]&&(r["text-align"]=e.styles["text-align"]),(e.isBlock()||e.isInblock())&&e.styles["line-height"]&&(r["line-height"]=e.styles["line-height"])),A.value.forEach((n=>{if("function"==typeof n.pasteKeepMarks){const r=n.pasteKeepMarks(e);t=Rr(t,r)}if("function"==typeof n.pasteKeepStyles){const t=n.pasteKeepStyles(e);r=Rr(r,t)}})),"function"==typeof o.pasteKeepMarks&&(t=Rr(t,o.pasteKeepMarks(e))),"function"==typeof o.pasteKeepStyles&&(r=Rr(r,o.pasteKeepStyles(e))),e.marks=t,e.styles=r}})),"function"==typeof o.customHtmlPaste)await o.customHtmlPaste(e);else{x.value.insertElement(e[0]);for(let t=e.length-1;t>=1;t--)x.value.addElementAfter(e[t],e[0]);x.value.range.anchor.moveToEnd(e[e.length-1]),x.value.range.focus.moveToEnd(e[e.length-1])}},V=(e,t)=>{const r=t.getUneditableElement();r?r.toEmpty():(t.children.push(...e.children),t.children.forEach((e=>{e.parent=t})),e.children=null)},U=e=>(A.value.forEach((t=>{t.customParseNode&&(e=t.customParseNode(e))})),"function"==typeof o.customParseNode&&(e=o.customParseNode(e)),e),j=(e,t)=>{o.disabled||("tab"!=t.key.toLocaleLowerCase()||t.metaKey||t.shiftKey||t.ctrlKey||t.altKey||!o.tab||(t.preventDefault(),x.value.insertText(" "),x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender()),i("keydown",e,t))},W=(e,t)=>{o.disabled||i("keyup",e,t)},K=e=>{if(o.disabled||k.value)return;const t=e.target;if("img"==t.nodeName.toLocaleLowerCase()||"video"==t.nodeName.toLocaleLowerCase()){const e=Number(t.getAttribute("data-editify-element"));if(J.isNumber(e)){const t=x.value.getElementByKey(e);x.value.range||x.value.initRange(),x.value.range.anchor.moveToStart(t),x.value.range.focus.moveToEnd(t),x.value.rangeRender()}}},G=(e,t)=>{o.disabled||(R(e),i("change",e,t))},Z=e=>{o.disabled||(o.border&&o.color&&!E.value&&(f.value.style.borderColor="",f.value.style.boxShadow="",O.value.use&&(p.value.$el.style.borderColor="",p.value.$el.style.boxShadow="")),i("blur",e))},X=e=>{if(!o.disabled){if(o.border&&o.color&&!E.value){f.value.style.borderColor=o.color;const e=se.hex2rgb(o.color);O.value.use&&"inner"==O.value.mode?(f.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)`,p.value.$el.style.borderColor=o.color,p.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)`):(O.value.use,f.value.style.boxShadow=`0 0 8px rgba(${e[0]},${e[1]},${e[2]},0.5)`)}setTimeout((()=>{S.value=!0,i("focus",e)}),0)}},Y=(e,t)=>{e.isEqual(t)||(t.isBlock()&&e.isBlock()&&t.isOnlyHasBreak()&&e.isOnlyHasBreak()&&t.parsedom!=y.BLOCK_NODE&&(ln(t),x.value.range.anchor.moveToStart(t),x.value.range.focus.moveToStart(t),e.toEmpty()),jr(e)&&(e.marks["data-editify-task"]="uncheck")),i("insertparagraph",B.value)},ee=()=>{o.disabled||(S.value=!!x.value.range,x.value.range&&(T.value=x.value.getElementsByRange(),u.value&&(clearTimeout(u.value),u.value=null),u.value=setTimeout((()=>{(M.value.use||O.value.use)&&(M.value.use&&I(),O.value.use&&p.value.handleRangeUpdate())}),200),i("rangeupdate")))},re=e=>{e.isBlock()&&ln(e)},ae=()=>{const e=x.value.range.anchor.element.getUneditableElement();e&&e.toEmpty()},oe=()=>{D(),A.value.forEach((e=>{e.updateView&&e.updateView()})),i("updateview")},ie=()=>{o.disabled||(x.value.collapseToEnd(),x.value.rangeRender(),te.setScrollTop({el:g.value,number:1e6,time:0}))};return t.watch((()=>B.value),(e=>{c.value||(x.value.stack=x.value.parseHtml(e),x.value.range=null,x.value.formatElementStack(),x.value.domRender(),x.value.rangeRender(),g.value.blur())})),t.watch((()=>k.value),(e=>{M.value.use&&(e?z():I())})),t.watch((()=>o.disabled),(e=>{e?x.value.setDisabled():x.value.setEnabled()})),t.onMounted((()=>{L(),(()=>{const e=t=>{le.on(t,`scroll.editify_${a.uid}`,(()=>{M.value.use&&m.value.show&&z()})),t.parentNode&&e(t.parentNode)};e(g.value)})(),le.on(document.documentElement,`mousedown.editify_${a.uid}`,P),le.on(document.documentElement,`mousemove.editify_${a.uid}`,F),le.on(document.documentElement,`mouseup.editify_${a.uid}`,q),le.on(document.documentElement,`click.editify_${a.uid}`,H),le.on(window,`resize.editify_${a.uid}`,D)})),t.onBeforeUnmount((()=>{(()=>{const e=t=>{le.off(t,`scroll.editify_${a.uid}`),t.parentNode&&e(t.parentNode)};e(g.value)})(),le.off(document.documentElement,`mousedown.editify_${a.uid} mousemove.editify_${a.uid} mouseup.editify_${a.uid} click.editify_${a.uid}`),le.off(window,`resize.editify_${a.uid}`),x.value.destroy()})),t.provide("$editTrans",l),t.provide("editify",a),t.provide("isSourceView",k),t.provide("isFullScreen",E),t.provide("canUseMenu",S),t.provide("editor",x),t.provide("dataRangeCaches",T),t.provide("showBorder",N),t.provide("pluginResultList",A),r({editor:x,isSourceView:k,isFullScreen:E,canUseMenu:S,dataRangeCaches:T,textValue:C,collapseToEnd:ie,collapseToStart:()=>{o.disabled||(x.value.collapseToStart(),x.value.rangeRender(),t.nextTick((()=>{te.setScrollTop({el:g.value,number:0,time:0})})))},undo:()=>{if(o.disabled)return;const e=x.value.history.get(-1);e&&(x.value.history.current=e.current,x.value.stack=e.stack,x.value.range=e.range,x.value.formatElementStack(),x.value.domRender(!0),x.value.rangeRender())},redo:()=>{if(o.disabled)return;const e=x.value.history.get(1);e&&(x.value.history.current=e.current,x.value.stack=e.stack,x.value.range=e.range,x.value.formatElementStack(),x.value.domRender(!0),x.value.rangeRender())}}),(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["editify",{"editify-fullscreen":E.value,"editify-autoheight":!E.value&&e.autoheight}]),ref_key:"elRef",ref:w},[O.value.use?(t.openBlock(),t.createBlock(cd,{key:0,config:O.value,color:e.color,ref_key:"menuRef",ref:p},null,8,["config","color"])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:t.normalizeClass(["editify-body",{"editify-border":N.value,"editify-menu_inner":O.value.use&&"inner"==O.value.mode}]),"data-editify-uid":t.unref(a).uid},[t.createElementVNode("div",{ref_key:"contentRef",ref:g,class:t.normalizeClass(["editify-content",{"editify-placeholder":_.value,"editify-disabled":e.disabled}]),onClick:K,onCompositionstart:r[0]||(r[0]=e=>d.value=!0),onCompositionend:r[1]||(r[1]=e=>d.value=!1),"data-editify-placeholder":e.placeholder},null,42,pd),k.value?(t.openBlock(),t.createElementBlock("textarea",{key:0,value:B.value,readonly:"",class:"editify-sourceview"},null,8,fd)):t.createCommentVNode("",!0),t.createVNode(_c,{ref_key:"toolbarRef",ref:v,modelValue:m.value.show,"onUpdate:modelValue":r[2]||(r[2]=e=>m.value.show=e),node:m.value.node,type:m.value.type,config:M.value,color:e.color},null,8,["modelValue","node","type","config","color"])],10,md),e.showWordLength?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["editify-footer",{"editify-fullscreen":E.value&&!k.value}]),ref_key:"footerRef",ref:b},[t.createElementVNode("div",gd,t.toDisplayString(t.unref(l)("totalWordCount"))+t.toDisplayString(C.value.length),1)],2)):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-0e45fdf3"]]),bd={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}},yd={class:"editify-attachment"},wd={class:"editify-attachment-header"},xd={key:0,class:"editify-attachment-remote"},kd=["placeholder"],Ed=["placeholder"],Sd={key:1,class:"editify-attachment-upload"},Td=["placeholder"],Bd=["multiple","accept"],Cd=Nn(t.defineComponent({name:"InsertAttachment",__name:"insertAttachment",props:bd,emits:["change","insert"],setup(e,{emit:r}){const n=e,a=r,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:n.color}:{})),u=e=>{const t=e.name.lastIndexOf(".");return t<=0?"":e.name.substring(t+1)},h=e=>{n.color&&(e.currentTarget.style.borderColor=n.color)},m=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 r=0;r<e.length;r++){const a=e[r],o=u(a);!(n.allowedFileType&&Array.isArray(n.allowedFileType)&&n.allowedFileType.length)||n.allowedFileType.some((e=>e.toLocaleLowerCase()==o.toLocaleLowerCase()))?n.maxSize&&a.size/1024>n.maxSize?"function"==typeof n.handleError&&n.handleError("maxSizeError",a):n.minSize&&a.size/1024<n.minSize?"function"==typeof n.handleError&&n.handleError("minSizeError",a):t.push(a):"function"==typeof n.handleError&&n.handleError("suffixError",a)}if(t.length){let e=[];if("function"==typeof n.customUpload)e=await n.customUpload(t)||[];else for(let r=0;r<t.length;r++){const n=await ce.dataFileToBase64(t[r]);e.push(n)}a("insert",l.value,e)}c.value.value=""};return t.watch((()=>i.value),(()=>{a("change")})),(e,r)=>(t.openBlock(),t.createElementBlock("div",yd,[t.createElementVNode("div",wd,[t.createElementVNode("div",{onClick:r[0]||(r[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:r[1]||(r[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",xd,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[2]||(r[2]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:m,onFocus:h,type:"text"},null,40,kd),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[3]||(r[3]=e=>s.value=e),placeholder:t.unref(o)("attachmentUrlPlaceholder"),onBlur:m,onFocus:h,type:"url"},null,40,Ed),[[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",Sd,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[4]||(r[4]=e=>l.value=e),placeholder:t.unref(o)("attachmentNamePlaceholder"),onBlur:m,onFocus:h,type:"text"},null,40,Td),[[t.vModelText,l.value,void 0,{trim:!0}]]),t.createElementVNode("div",{class:"editify-attachment-btn",onClick:f},[t.createVNode(Mn,{value:"upload"}),t.createElementVNode("input",{ref_key:"fileInputRef",ref:c,multiple:e.multiple,accept:e.accept,onChange:g,type:"file"},null,40,Bd)])]))]))}}),[["__scopeId","data-v-52b1e545"]]),_d=e=>!e.isEmpty()&&("span"==e.parsedom&&"closed"==e.type&&e.hasMarks()&&e.marks["data-editify-attachment"]),Nd=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?_d(e.range.anchor.element):t.flatList.some((e=>_d(e.element)))),Md=e=>{e.component(vd.name,vd)},Ad="0.1.48";console.log(`%c vue-editify %c v${Ad} `,"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=vd,e.attachment=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;return r.exposed.editor.value&&(a=Ls(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Gr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)),{name:"attachment",menu:{sequence:e.sequence||100,extraDisabled:e=>("link"==e||"codeBlock"==e)&&Nd(r.exposed.editor.value,r.exposed.dataRangeCaches.value),extend:{type:"select",title:e.title||n("insertAttachment"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!1,disabled:a||e.disabled,default:()=>t.h(Mn,{value:"attachment"}),layer:(a,o)=>t.h(Cd,{color:r.props.color,accept:e.accept,allowedFileType:e.allowedFileType||[],multiple:!!e.multiple,maxSize:e.maxSize,minSize:e.minSize,customUpload:e.customUpload,handleError:e.handleError,onChange:()=>{o.$refs.layerRef.setPosition()},onInsert:(e,t)=>{if((t=t.filter((e=>!!e))).length){const a=r.exposed.editor.value;t.forEach((t=>{const r={"data-editify-attachment":t,"data-editify-attachment-name":e||n("attachmentDefaultName")},o=y.create({type:"closed",parsedom:"span",marks:r});a.insertElement(o),a.range.anchor.moveToEnd(o),a.range.focus.moveToEnd(o)})),a.formatElementStack(),a.domRender(),a.rangeRender()}o.show=!1}})}},updateView:()=>{const e=r.exposed.editor.value;y.flatElements(e.stack).forEach((e=>{"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-attachment"]&&(le.off(e.elm,"click"),le.on(e.elm,"click",(async()=>{const t=e.marks["data-editify-attachment"],r=await fetch(t,{method:"GET"}),n=await r.blob(),a=document.createElement("a");a.setAttribute("target","_blank"),a.setAttribute("href",URL.createObjectURL(n)),a.setAttribute("download",e.marks["data-editify-attachment-name"]),a.click()})))}))},customParseNode:e=>(e.hasMarks()&&e.marks["data-editify-attachment"]&&"span"==e.parsedom&&(e.type="closed"),e),pasteKeepMarks:e=>{const t={};return"span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-attachment"]&&(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"])),t},renderRule:e=>{if(e.hasMarks()&&e.marks["data-editify-attachment"]){e.marks.title=n("attachmentDownloadTitle"),e.marks["data-editify-attachment-name"]||(e.marks["data-editify-attachment-name"]=n("attachmentDefaultName"));const t=r.exposed.editor.value,a=t.getPreviousElement(e),o=t.getNextElement(e);if(!a||!a.isSpaceText()){const r=y.getSpaceElement();t.addElementBefore(r,e)}if(!o||!o.isSpaceText()){const r=y.getSpaceElement();t.addElementAfter(r,e)}t.range&&e.isContains(t.range.anchor.element)&&t.range.anchor.moveToEnd(t.getNextElement(e)),t.range&&e.isContains(t.range.focus.element)&&t.range.focus.moveToEnd(t.getNextElement(e))}}}}},e.default=Md,e.elementIsInList=Wr,e.elementIsInTask=Kr,e.elementIsMatch=Hr,e.getInfoBlockElement=Us,e.getInfoBlockElementByRange=(e,t)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return Us(e.range.anchor.element);const r=t.list.map((e=>Us(e.element)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let n=!0;for(let a=1;a<r.length;a++)if(!r[a].isEqual(r[0])){n=!1;break}return n?r[0]:null},e.getMatchElementByElement=$r,e.getMatchElementByRange=Vr,e.getMathformulaElement=Is,e.getMathformulaElementByRange=Ds,e.getPanelElement=qs,e.getPanelElementByRange=(e,t)=>{if(!e.range)return null;if(e.range.anchor.element.isEqual(e.range.focus.element))return qs(e.range.anchor.element);const r=t.list.map((e=>qs(e.element)));if(r.some((e=>null==e)))return null;if(1==r.length)return r[0];let n=!0;for(let a=1;a<r.length;a++)if(!r[a].isEqual(r[0])){n=!1;break}return n?r[0]:null},e.getRangeText=an,e.hasAttachmentInRange=Nd,e.hasImageInRange=Yr,e.hasInfoBlockInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Vs(e.range.anchor.element):t.flatList.some((e=>Vs(e.element)))),e.hasLinkInRange=Zr,e.hasListInRange=(e,t,r=!1)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Wr(e.range.anchor.element,r):t.flatList.some((e=>Wr(e.element,r)))),e.hasMathformulaInRange=Ls,e.hasPanelInRange=Hs,e.hasPreInRange=Gr,e.hasQuoteInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?!!$r(e.range.anchor.element,{parsedom:"blockquote"}):t.flatList.some((e=>!!$r(e.element,{parsedom:"blockquote"})))),e.hasTableInRange=Xr,e.hasTaskInRange=(e,t)=>!!e.range&&(e.range.anchor.isEqual(e.range.focus)?Kr(e.range.anchor.element):t.flatList.some((e=>Kr(e.element)))),e.hasVideoInRange=Qr,e.infoBlock=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;return r.exposed.editor.value&&(a=Xr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Gr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Hs(r.exposed.editor.value,r.exposed.dataRangeCaches.value)),{name:"infoBlock",menu:{sequence:e.sequence||103,extend:{type:"default",title:e.title||n("insertInfoBlock"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!!r.exposed.editor.value&&js(r.exposed.editor.value,r.exposed.dataRangeCaches.value),disabled:a||e.disabled,default:()=>t.h(Mn,{value:"info"}),onOperate:()=>{const e=r.exposed.editor.value,t=r.exposed.dataRangeCaches.value,n=js(e,t);if(e.range.anchor.isEqual(e.range.focus)){const t=e.range.anchor.element.getBlock();ln(t),n||(t.parsedom="div",t.marks={"data-editify-info":"true"})}else{let e=[];t.list.forEach((t=>{const r=t.element.getBlock();e.some((e=>r.isEqual(e)))||e.push(r)})),e.forEach((e=>{ln(e),n||(e.parsedom="div",e.marks={"data-editify-info":"true"})}))}e.formatElementStack(),e.domRender(),e.rangeRender()}}},pasteKeepMarks:e=>$s(e)?{"data-editify-info":"true"}:{},renderRule:e=>{if($s(e)){const t=se.hex2rgb(r.props.color);e.hasStyles()?(e.styles["background-color"]=`rgba(${t[0]},${t[1]},${t[2]},0.15)`,e.styles.color=r.props.color):e.styles={"background-color":`rgba(${t[0]},${t[1]},${t[2]},0.15)`,color:r.props.color}}}}}},e.insertCodeBlock=Bn,e.insertImage=En,e.insertLink=kn,e.insertSeparator=Cn,e.insertTable=Tn,e.insertVideo=Sn,e.install=Md,e.isAttachment=_d,e.isInfoBlock=$s,e.isList=Ur,e.isMathformula=Rs,e.isPanel=Ps,e.isRangeInList=en,e.isRangeInQuote=Jr,e.isRangeInTask=tn,e.isTask=jr,e.isUnderInfoBlock=Vs,e.isUnderMathformula=zs,e.isUnderPanel=Fs,e.mathformula=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;r.exposed.editor.value&&(a=Gr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Zr(r.exposed.editor.value,r.exposed.dataRangeCaches.value));let o="";return{name:"mathformula",menu:{sequence:e.sequence||101,extraDisabled:e=>("link"==e||"image"==e||"video"==e||"table"==e||"codeBlock"==e)&&Ls(r.exposed.editor.value,r.exposed.dataRangeCaches.value),extend:{type:"select",title:e.title||n("insertMathformula"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!!r.exposed.editor.value&&!!Ds(r.exposed.editor.value,r.exposed.dataRangeCaches.value),disabled:a||e.disabled,onLayerShow(){const e=Ds(r.exposed.editor.value,r.exposed.dataRangeCaches.value);e&&(o=e.marks["data-editify-mathformula"]||"")},default:()=>t.h(Mn,{value:"mathformula"}),layer:(n,a)=>t.h(Os,{color:r.props.color,defaultLaTexContent:o,onInsert:t=>{if(t){const a=r.exposed.editor.value,o=Ds(r.exposed.editor.value,r.exposed.dataRangeCaches.value);o&&(o.toEmpty(),a.range.anchor.moveToStart(a.getNextElement(o)),a.range.focus.moveToStart(a.getNextElement(o)));let i="";try{i=Bs(t,{output:"mathml",throwOnError:!0})}catch(n){i="","function"==typeof e.handleError&&e.handleError(n)}if(i){const e=`<span data-editify-mathformula="${t}" contenteditable="false">${i}</span>`,r=a.parseHtml(e);a.insertElement(r[0]),a.range.anchor.moveToEnd(r[0]),a.range.focus.moveToEnd(r[0]),a.formatElementStack(),a.domRender(),a.rangeRender()}}a.show=!1}})}},extraKeepTags:["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"],pasteKeepMarks:e=>{let t={};return(Rs(e)||zs(e))&&(t=Ir(e.marks)),t},pasteKeepStyles:e=>{let t={};return(Rs(e)||zs(e))&&(t=Ir(e.styles)),t},customParseNode:e=>("span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"]&&y.flatElements(e.children).forEach((e=>{e.locked=!0,e.isText()||e.hasChildren()||(e.type="closed")})),e),renderRule:e=>{if("span"==e.parsedom&&e.hasMarks()&&e.marks["data-editify-mathformula"]){const t=r.exposed.editor.value,n=t.getPreviousElement(e),a=t.getNextElement(e);if(!n||!n.isSpaceText()){const r=y.getSpaceElement();t.addElementBefore(r,e)}if(!a||!a.isSpaceText()){const r=y.getSpaceElement();t.addElementAfter(r,e)}t.range&&e.isContains(t.range.anchor.element)&&t.range.anchor.moveToEnd(t.getNextElement(e)),t.range&&e.isContains(t.range.focus.element)&&t.range.focus.moveToEnd(t.getNextElement(e))}}}}},e.panel=e=>{ae.isObject(e)||(e={});return(r,n)=>{let a=!1;return r.exposed.editor.value&&(a=Hs(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Xr(r.exposed.editor.value,r.exposed.dataRangeCaches.value)||Ls(r.exposed.editor.value,r.exposed.dataRangeCaches.value)),{name:"panel",menu:{sequence:e.sequence||102,extraDisabled:e=>("orderList"==e||"unorderList"==e||"task"==e||"quote"==e||"codeBlock"==e||"table"==e||"heading"==e)&&Hs(r.exposed.editor.value,r.exposed.dataRangeCaches.value),extend:{type:"default",title:e.title||n("insertPanel"),leftBorder:e.leftBorder,rightBorder:e.rightBorder,hideScroll:!0,active:!1,disabled:a||e.disabled,default:()=>t.h(Mn,{value:"panel"}),onOperate:()=>{const e=y.create({type:"block",parsedom:"div",marks:{"data-editify-panel":"true"},children:[{type:"inblock",parsedom:"div",behavior:"block",children:[{type:"text",textcontent:n("panelTitle")}]},{type:"inblock",parsedom:"div",behavior:"block",children:[{type:"text",textcontent:n("panelContent")}]}]}),t=r.exposed.editor.value;t.insertElement(e);const a=y.create({type:"block",parsedom:y.BLOCK_NODE,children:[{type:"closed",parsedom:"br"}]});t.addElementAfter(a,e),t.range.anchor.moveToEnd(e.children[0]),t.range.focus.moveToEnd(e.children[0]),t.formatElementStack(),t.domRender(),t.rangeRender()}}},pasteKeepMarks:e=>Ps(e)?{"data-editify-panel":"true"}:{}}}},e.queryTextMark=nn,e.queryTextStyle=rn,e.removeTextMark=wn,e.removeTextStyle=yn,e.setAlign=pn,e.setIndentDecrease=hn,e.setIndentIncrease=un,e.setLineHeight=xn,e.setList=fn,e.setQuote=mn,e.setTask=gn,e.setTextMark=bn,e.setTextStyle=vn,e.version=Ad,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));