From 44842d4e7705956c7e8273dfccf680f28be83d41 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Thu, 6 Aug 2026 15:02:40 -0700 Subject: [PATCH] fix: handle navigation inside the app --- public/asset-manifest.json | 2 +- public/partials/explorer.htm | 8 ++++---- public/partials/header.htm | 2 +- public/partials/status.htm | 8 ++++---- public/script/app.js | 28 ++++++++++++++++++++++++++++ public/script/vendor.min.js | 2 +- 6 files changed, 39 insertions(+), 11 deletions(-) diff --git a/public/asset-manifest.json b/public/asset-manifest.json index f05dcfe..0c62ee7 100644 --- a/public/asset-manifest.json +++ b/public/asset-manifest.json @@ -1,6 +1,6 @@ { "core.min.js": "core.6332b3c288.min.js", - "vendor.min.js": "vendor.2c4b28d9af.min.js", + "vendor.min.js": "vendor.c40cb91530.min.js", "mermaid.min.js": "mermaid.f848a72d16.min.js", "all.min.css": "all.b704319d9c.min.css" } \ No newline at end of file diff --git a/public/partials/explorer.htm b/public/partials/explorer.htm index b33c911..679f909 100644 --- a/public/partials/explorer.htm +++ b/public/partials/explorer.htm @@ -118,7 +118,7 @@ Website Default settings - Logout diff --git a/public/partials/status.htm b/public/partials/status.htm index dd0765e..887f450 100644 --- a/public/partials/status.htm +++ b/public/partials/status.htm @@ -64,19 +64,19 @@
Repository
GitHub Page
- + Go to anonymized repository - + Go to anonymized GitHub page
diff --git a/public/script/app.js b/public/script/app.js index 096aa00..4b52978 100644 --- a/public/script/app.js +++ b/public/script/app.js @@ -159,6 +159,34 @@ angular $locationProvider.html5Mode(true); }, ]) + // Paths served by express, not by the Angular router. html5Mode makes + // Angular swallow every same-origin anchor click and resolve it against the + // route table, so a link to /w// — the one an anonymized README + // points at for the repository's GitHub Page — fell through to .otherwise() + // and rendered the 404 partial. Reloading worked because that bypassed + // Angular and reached the server. Give these URLs back to the browser as a + // real navigation. + .run([ + "$rootScope", + "$window", + function ($rootScope, $window) { + const serverPaths = /^\/(w|api|github)(\/|$)/; + $rootScope.$on("$locationChangeStart", function (event, next) { + let url; + try { + url = new URL(next, $window.location.href); + } catch (e) { + return; + } + if (url.origin !== $window.location.origin) return; + if (!serverPaths.test(url.pathname)) return; + // Reverts $location to the previous URL so the address bar stays + // consistent until the browser leaves the page. + event.preventDefault(); + $window.location.assign(url.href); + }); + }, + ]) .filter("humanFileSize", function () { return humanFileSize; }) diff --git a/public/script/vendor.min.js b/public/script/vendor.min.js index eb98f6e..dcd41b7 100644 --- a/public/script/vendor.min.js +++ b/public/script/vendor.min.js @@ -1,2 +1,2 @@ function markedMermaid(e){return{extensions:[{name:"mermaid",level:"block",start(e){return e.match(/^```mermaid/m)?.index},tokenizer(e,t){e=/^```mermaid\n([\s\S]*?)\n```/.exec(e);if(e)return{type:"mermaid",raw:e[0],text:e[1].trim()}},renderer(e){const t="mermaid-"+Math.random().toString(36).substr(2,9);e=`
${e.text}
`;return"undefined"==typeof mermaid&&"function"==typeof window.loadMermaid&&window.loadMermaid(),setTimeout(()=>{if("undefined"!=typeof mermaid){window.mermaidInitialized||(mermaid.initialize({startOnLoad:!1,theme:"default",securityLevel:"strict"}),window.mermaidInitialized=!0);try{var e=document.getElementById(t);e&&!e.getAttribute("data-processed")&&(mermaid.init(void 0,e),e.setAttribute("data-processed","true"))}catch(e){console.error("Mermaid rendering error:",e)}}},100),e}}]}}!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=e.pdfjsLib=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],()=>e.pdfjsLib=t()):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=e.pdfjsLib=t():e["pdfjs-dist/build/pdf"]=e.pdfjsLib=t()}(globalThis,()=>(()=>{"use strict";var __webpack_modules__=[,(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VerbosityLevel=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.RenderingIntentFlag=t.PromiseCapability=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.PageActionEventType=t.OPS=t.MissingPDFException=t.MAX_IMAGE_SIZE_TO_CACHE=t.LINE_FACTOR=t.LINE_DESCENT_FACTOR=t.InvalidPDFException=t.ImageKind=t.IDENTITY_MATRIX=t.FormatError=t.FeatureTest=t.FONT_IDENTITY_MATRIX=t.DocumentActionEventType=t.CMapCompressionType=t.BaseException=t.BASELINE_FACTOR=t.AnnotationType=t.AnnotationReplyType=t.AnnotationPrefix=t.AnnotationMode=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationEditorType=t.AnnotationEditorPrefix=t.AnnotationEditorParamsType=t.AnnotationBorderStyleType=t.AnnotationActionEventType=t.AbortException=void 0,t.assert=function(e,t){e||s(t)},t.bytesToString=h,t.createValidAbsoluteUrl=function(e){let t=1=n.INFOS&&console.log("Info: "+e)},t.isArrayBuffer=function(e){return"object"==typeof e&&void 0!==e?.byteLength},t.isArrayEqual=function(i,n){if(i.length!==n.length)return!1;for(let e=0,t=i.length;et?t.normalize("NFKC"):g.get(i))},t.objectFromMap=function(e){var t,i,n=Object.create(null);for([t,i]of e)n[t]=i;return n},t.objectSize=function(e){return Object.keys(e).length},t.setVerbosityLevel=function(e){Number.isInteger(e)&&(r=e)},t.shadow=a,t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=c,t.stringToPDFString=function(i){if("ï"<=i[0]){let e;if("þ"===i[0]&&"ÿ"===i[1]?e="utf-16be":"ÿ"===i[0]&&"þ"===i[1]?e="utf-16le":"ï"===i[0]&&"»"===i[1]&&"¿"===i[2]&&(e="utf-8"),e)try{var t=new TextDecoder(e,{fatal:!0}),n=c(i);return t.decode(n)}catch(i){o(`stringToPDFString: "${i}".`)}}var r=[];for(let e=0,t=i.length;e=n.WARNINGS&&console.log("Warning: "+e)}function s(e){throw new Error(e)}function a(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!(3e.toString(16).padStart(2,"0")),u=(t.Util=class{static makeHexColor(e,t,i){return"#"+d[e]+d[t]+d[i]}static scaleMinMax(e,t){let i;e[0]?(e[0]<0&&(i=t[0],t[0]=t[1],t[1]=i),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(i=t[2],t[2]=t[3],t[3]=i),t[2]*=e[3],t[3]*=e[3]):(i=t[0],t[0]=t[2],t[2]=i,i=t[1],t[1]=t[3],t[3]=i,e[1]<0&&(i=t[2],t[2]=t[3],t[3]=i),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(i=t[0],t[0]=t[1],t[1]=i),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}static applyInverseTransform(e,t){var i=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/i,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/i]}static getAxialAlignedBoundingBox(e,t){var i=this.applyTransform(e,t),n=this.applyTransform(e.slice(2,4),t),r=this.applyTransform([e[0],e[3]],t),e=this.applyTransform([e[2],e[1]],t);return[Math.min(i[0],n[0],r[0],e[0]),Math.min(i[1],n[1],r[1],e[1]),Math.max(i[0],n[0],r[0],e[0]),Math.max(i[1],n[1],r[1],e[1])]}static inverseTransform(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e){var t=[e[0],e[2],e[1],e[3]],i=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],r=e[2]*t[0]+e[3]*t[2],e=e[2]*t[1]+e[3]*t[3],t=(i+e)/2,i=Math.sqrt((i+e)**2-4*(i*e-r*n))/2,e=t-i||1;return[Math.sqrt(t+i||1),Math.sqrt(e)]}static normalizeRect(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}static intersect(e,t){var i,n=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));return r{this.resolve=e=>{this.#t=!0,t(e)},this.reject=e=>{this.#t=!0,i(e)}})}get settled(){return this.#t}};let m=null,g=null;t.AnnotationPrefix="pdfjs_internal_id_"},(e,t,i)=>{function n(e,t){var i={};i[e]=l(e,t,d),s({global:!0,constructor:!0,arity:1,forced:d},i)}function r(e,t){var i;c&&c[e]&&((i={})[e]=l(h+"."+e,t,d),s({target:h,stat:!0,constructor:!0,arity:1,forced:d},i))}var s=i(3),o=i(4),a=i(69),l=i(70),h="WebAssembly",c=o[h],d=7!==Error("e",{cause:7}).cause;n("Error",function(t){return function(e){return a(t,this,arguments)}}),n("EvalError",function(t){return function(e){return a(t,this,arguments)}}),n("RangeError",function(t){return function(e){return a(t,this,arguments)}}),n("ReferenceError",function(t){return function(e){return a(t,this,arguments)}}),n("SyntaxError",function(t){return function(e){return a(t,this,arguments)}}),n("TypeError",function(t){return function(e){return a(t,this,arguments)}}),n("URIError",function(t){return function(e){return a(t,this,arguments)}}),r("CompileError",function(t){return function(e){return a(t,this,arguments)}}),r("LinkError",function(t){return function(e){return a(t,this,arguments)}}),r("RuntimeError",function(t){return function(e){return a(t,this,arguments)}})},(e,t,i)=>{var h=i(4),c=i(5).f,d=i(44),u=i(48),p=i(38),m=i(56),g=i(68);e.exports=function(e,t){var i,n,r,s,o=e.target,a=e.global,l=e.stat;if(i=a?h:l?h[o]||p(o,{}):(h[o]||{}).prototype)for(n in t){if(r=t[n],s=e.dontCallGetSet?(s=c(i,n))&&s.value:i[n],!g(a?n:o+(l?".":"#")+n,e.forced)&&void 0!==s){if(typeof r==typeof s)continue;m(r,s)}(e.sham||s&&s.sham)&&d(r,"sham",!0),u(i,n,r,e)}}},function(e){function t(e){return e&&e.Math===Math&&e}e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(e,t,i)=>{var n=i(6),r=i(8),s=i(10),o=i(11),a=i(12),l=i(18),h=i(39),c=i(42),d=Object.getOwnPropertyDescriptor;t.f=n?d:function(e,t){if(e=a(e),t=l(t),c)try{return d(e,t)}catch(e){}if(h(e,t))return o(!r(s.f,e,t),e[t])}},(e,t,i)=>{i=i(7);e.exports=!i(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,i)=>{var i=i(9),n=Function.prototype.call;e.exports=i?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,i)=>{i=i(7);e.exports=!i(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},(e,t)=>{var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,r=n&&!i.call({1:2},1);t.f=r?function(e){e=n(this,e);return!!e&&e.enumerable}:i},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,i)=>{var n=i(13),r=i(16);e.exports=function(e){return n(r(e))}},(e,t,i)=>{var n=i(14),r=i(7),s=i(15),o=Object,a=n("".split);e.exports=r(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?a(e,""):o(e)}:o},(e,t,i)=>{var i=i(9),n=Function.prototype,r=n.call,n=i&&n.bind.bind(r,r);e.exports=i?n:function(e){return function(){return r.apply(e,arguments)}}},(e,t,i)=>{var i=i(14),n=i({}.toString),r=i("".slice);e.exports=function(e){return r(n(e),8,-1)}},(e,t,i)=>{var n=i(17),r=TypeError;e.exports=function(e){if(n(e))throw r("Can't call method on "+e);return e}},e=>{e.exports=function(e){return null==e}},(e,t,i)=>{var n=i(19),r=i(23);e.exports=function(e){e=n(e,"string");return r(e)?e:e+""}},(e,t,i)=>{var n=i(8),r=i(20),s=i(23),o=i(30),a=i(33),i=i(34),l=TypeError,h=i("toPrimitive");e.exports=function(e,t){if(!r(e)||s(e))return e;var i=o(e,h);if(i){if(i=n(i,e,t=void 0===t?"default":t),!r(i)||s(i))return i;throw l("Can't convert object to primitive value")}return a(e,t=void 0===t?"number":t)}},(e,t,i)=>{var n=i(21),i=i(22),r=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===r}:function(e){return"object"==typeof e?null!==e:n(e)}},(e,t,i)=>{var i=i(22),n=i.all;e.exports=i.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all;e.exports={all:t,IS_HTMLDDA:void 0===t&&void 0!==t}},(e,t,i)=>{var n=i(24),r=i(21),s=i(25),i=i(26),o=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return r(t)&&s(t.prototype,o(e))}},(e,t,i)=>{var n=i(4),r=i(21);e.exports=function(e,t){return arguments.length<2?(i=n[e],r(i)?i:void 0):n[e]&&n[e][t];var i}},(e,t,i)=>{i=i(14);e.exports=i({}.isPrototypeOf)},(e,t,i)=>{i=i(27);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,i)=>{var n=i(28),r=i(7),s=i(4).String;e.exports=!!Object.getOwnPropertySymbols&&!r(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},(e,t,i)=>{var n,r,s=i(4),i=i(29),o=s.process,s=s.Deno,o=o&&o.versions||s&&s.version,s=o&&o.v8;!(r=s?0<(n=s.split("."))[0]&&n[0]<4?1:+(n[0]+n[1]):r)&&i&&(!(n=i.match(/Edge\/(\d+)/))||74<=n[1])&&(n=i.match(/Chrome\/(\d+)/))&&(r=+n[1]),e.exports=r},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,i)=>{var n=i(31),r=i(17);e.exports=function(e,t){e=e[t];return r(e)?void 0:n(e)}},(e,t,i)=>{var n=i(21),r=i(32),s=TypeError;e.exports=function(e){if(n(e))return e;throw s(r(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,i)=>{var r=i(8),s=i(21),o=i(20),a=TypeError;e.exports=function(e,t){var i,n;if("string"===t&&s(i=e.toString)&&!o(n=r(i,e)))return n;if(s(i=e.valueOf)&&!o(n=r(i,e)))return n;if("string"!==t&&s(i=e.toString)&&!o(n=r(i,e)))return n;throw a("Can't convert object to primitive value")}},(e,t,i)=>{var n=i(4),r=i(35),s=i(39),o=i(41),a=i(27),i=i(26),l=n.Symbol,h=r("wks"),c=i?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return s(h,e)||(h[e]=a&&s(l,e)?l[e]:c("Symbol."+e)),h[e]}},(e,t,i)=>{var n=i(36),r=i(37);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,i)=>{var n=i(4),i=i(38),r="__core-js_shared__",n=n[r]||i(r,{});e.exports=n},(e,t,i)=>{var n=i(4),r=Object.defineProperty;e.exports=function(t,i){try{r(n,t,{value:i,configurable:!0,writable:!0})}catch(e){n[t]=i}return i}},(e,t,i)=>{var n=i(14),r=i(40),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(r(e),t)}},(e,t,i)=>{var n=i(16),r=Object;e.exports=function(e){return r(n(e))}},(e,t,i)=>{var i=i(14),n=0,r=Math.random(),s=i(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++n+r,36)}},(e,t,i)=>{var n=i(6),r=i(7),s=i(43);e.exports=!n&&!r(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},(e,t,i)=>{var n=i(4),i=i(20),r=n.document,s=i(r)&&i(r.createElement);e.exports=function(e){return s?r.createElement(e):{}}},(e,t,i)=>{var n=i(6),r=i(45),s=i(11);e.exports=n?function(e,t,i){return r.f(e,t,s(1,i))}:function(e,t,i){return e[t]=i,e}},(e,t,i)=>{var n=i(6),r=i(42),s=i(46),o=i(47),a=i(18),l=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",p="writable";t.f=n?s?function(e,t,i){var n;return o(e),t=a(t),o(i),"function"==typeof e&&"prototype"===t&&"value"in i&&p in i&&!i[p]&&(n=c(e,t))&&n[p]&&(e[t]=i.value,i={configurable:(u in i?i:n)[u],enumerable:(d in i?i:n)[d],writable:!1}),h(e,t,i)}:h:function(e,t,i){if(o(e),t=a(t),o(i),r)try{return h(e,t,i)}catch(e){}if("get"in i||"set"in i)throw l("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},(e,t,i)=>{var n=i(6),i=i(7);e.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},(e,t,i)=>{var n=i(20),r=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw s(r(e)+" is not an object")}},(e,t,i)=>{var o=i(21),a=i(45),l=i(49),h=i(38);e.exports=function(e,t,i,n){var r=(n=n||{}).enumerable,s=void 0!==n.name?n.name:t;if(o(i)&&l(i,s,n),n.global)r?e[t]=i:h(t,i);else{try{n.unsafe?e[t]&&(r=!0):delete e[t]}catch(e){}r?e[t]=i:a.f(e,t,{value:i,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}},(e,t,i)=>{var n=i(14),r=i(7),s=i(21),o=i(39),a=i(6),l=i(50).CONFIGURABLE,h=i(51),i=i(52),c=i.enforce,d=i.get,u=String,p=Object.defineProperty,m=n("".slice),g=n("".replace),f=n([].join),v=a&&!r(function(){return 8!==p(function(){},"length",{value:8}).length}),y=String(String).split("String"),i=e.exports=function(e,t,i){"Symbol("===m(u(t),0,7)&&(t="["+g(u(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),i&&i.getter&&(t="get "+t),i&&i.setter&&(t="set "+t),(!o(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),v&&i&&o(i,"arity")&&e.length!==i.arity&&p(e,"length",{value:i.arity});try{i&&o(i,"constructor")&&i.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}i=c(e);return o(i,"source")||(i.source=f(y,"string"==typeof t?t:"")),e};Function.prototype.toString=i(function(){return s(this)&&d(this).source||h(this)},"toString")},(e,t,i)=>{var n=i(6),i=i(39),r=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,i=i(r,"name"),o=i&&"something"===function(){}.name,n=i&&(!n||s(r,"name").configurable);e.exports={EXISTS:i,PROPER:o,CONFIGURABLE:n}},(e,t,i)=>{var n=i(14),r=i(21),i=i(37),s=n(Function.toString);r(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},(e,t,i)=>{var n,r,s,o,a=i(53),l=i(4),h=i(20),c=i(44),d=i(39),u=i(37),p=i(54),i=i(55),m="Object already initialized",g=l.TypeError,l=l.WeakMap,f=a||u.state?((s=u.state||(u.state=new l)).get=s.get,s.has=s.has,s.set=s.set,n=function(e,t){if(s.has(e))throw g(m);return t.facade=e,s.set(e,t),t},r=function(e){return s.get(e)||{}},function(e){return s.has(e)}):(i[o=p("state")]=!0,n=function(e,t){if(d(e,o))throw g(m);return t.facade=e,c(e,o,t),t},r=function(e){return d(e,o)?e[o]:{}},function(e){return d(e,o)});e.exports={set:n,get:r,has:f,enforce:function(e){return f(e)?r(e):n(e,{})},getterFor:function(t){return function(e){if(h(e)&&(e=r(e)).type===t)return e;throw g("Incompatible receiver, "+t+" required")}}}},(e,t,i)=>{var n=i(4),i=i(21),n=n.WeakMap;e.exports=i(n)&&/native code/.test(String(n))},(e,t,i)=>{var n=i(35),r=i(41),s=n("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},e=>{e.exports={}},(e,t,i)=>{var l=i(39),h=i(57),c=i(5),d=i(45);e.exports=function(e,t,i){for(var n=h(t),r=d.f,s=c.f,o=0;o{var n=i(24),r=i(14),s=i(58),o=i(67),a=i(47),l=r([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=s.f(a(e)),i=o.f;return i?l(t,i(e)):t}},(e,t,i)=>{var n=i(59),r=i(66).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,r)}},(e,t,i)=>{var n=i(14),o=i(39),a=i(12),l=i(60).indexOf,h=i(55),c=n([].push);e.exports=function(e,t){var i,n=a(e),r=0,s=[];for(i in n)!o(h,i)&&o(n,i)&&c(s,i);for(;t.length>r;)!o(n,i=t[r++])||~l(s,i)||c(s,i);return s}},(e,t,i)=>{function n(a){return function(e,t,i){var n,r=l(e),s=c(r),o=h(i,s);if(a&&t!=t){for(;o{var n=i(62),r=Math.max,s=Math.min;e.exports=function(e,t){e=n(e);return e<0?r(e+t,0):s(e,t)}},(e,t,i)=>{var n=i(63);e.exports=function(e){e=+e;return e!=e||0==e?0:n(e)}},e=>{var t=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){e=+e;return(0{var n=i(65);e.exports=function(e){return n(e.length)}},(e,t,i)=>{var n=i(62),r=Math.min;e.exports=function(e){return 0{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,i)=>{function n(e,t){return(e=l[a(e)])===c||e!==h&&(s(t)?r(t):!!t)}var r=i(7),s=i(21),o=/#|\.prototype\./,a=n.normalize=function(e){return String(e).replace(o,".").toLowerCase()},l=n.data={},h=n.NATIVE="N",c=n.POLYFILL="P";e.exports=n},(e,t,i)=>{var i=i(9),n=Function.prototype,r=n.apply,s=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(r):function(){return s.apply(r,arguments)})},(e,t,i)=>{var d=i(24),u=i(39),p=i(44),m=i(25),g=i(71),f=i(56),v=i(74),y=i(75),b=i(76),w=i(80),x=i(81),S=i(6),A=i(36);e.exports=function(e,t,i,n){var r="stackTraceLimit",s=n?2:1,o=e.split("."),a=o[o.length-1],l=d.apply(null,o);if(l){var h=l.prototype;if(!A&&u(h,"cause")&&delete h.cause,!i)return l;var o=d("Error"),c=t(function(e,t){t=b(n?t:e,void 0),e=n?new l(e):new l;return void 0!==t&&p(e,"message",t),x(e,c,e.stack,2),this&&m(h,this)&&y(e,this,c),s{var r=i(72),s=i(47),o=i(73);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i,n=!1,e={};try{(i=r(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(i){}return function(e,t){return s(e),o(t),n?i(e,t):e.__proto__=t,e}}():void 0)},(e,t,i)=>{var n=i(14),r=i(31);e.exports=function(e,t,i){try{return n(r(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}}},(e,t,i)=>{var n=i(21),r=String,s=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw s("Can't set "+r(e)+" as a prototype")}},(e,t,i)=>{var n=i(45).f;e.exports=function(e,t,i){i in e||n(e,i,{configurable:!0,get:function(){return t[i]},set:function(e){t[i]=e}})}},(e,t,i)=>{var n=i(21),r=i(20),s=i(71);e.exports=function(e,t,i){return s&&n(t=t.constructor)&&t!==i&&r(t=t.prototype)&&t!==i.prototype&&s(e,t),e}},(e,t,i)=>{var n=i(77);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},(e,t,i)=>{var n=i(78),r=String;e.exports=function(e){if("Symbol"===n(e))throw TypeError("Cannot convert a Symbol value to a string");return r(e)}},(e,t,i)=>{var n=i(79),r=i(21),s=i(15),o=i(34)("toStringTag"),a=Object,l="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=a(e),o))?t:l?s(e):"Object"===(t=s(e))&&r(e.callee)?"Arguments":t}},(e,t,i)=>{var n={};n[i(34)("toStringTag")]="z",e.exports="[object z]"===String(n)},(e,t,i)=>{var n=i(20),r=i(44);e.exports=function(e,t){n(t)&&"cause"in t&&r(e,"cause",t.cause)}},(e,t,i)=>{var r=i(44),s=i(82),o=i(83),a=Error.captureStackTrace;e.exports=function(e,t,i,n){o&&(a?a(e,t):r(e,"stack",s(i,n)))}},(e,t,i)=>{var i=i(14),n=Error,r=i("".replace),i=String(n("zxcasd").stack),s=/\n\s*at [^:]*:[^\n]*/,o=s.test(i);e.exports=function(e,t){if(o&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=r(e,s,"");return e}},(e,t,i)=>{var n=i(7),r=i(11);e.exports=!n(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",r(1,7)),7!==e.stack)})},(e,t,i)=>{var n=i(48),r=i(14),d=i(77),u=i(85),i=URLSearchParams,s=i.prototype,p=r(s.append),m=r(s.delete),g=r(s.forEach),f=r([].push),r=new i("a=1&a=2&b=3");r.delete("a",1),r.delete("b",void 0),r+""!="a=2"&&n(s,"delete",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return m(this,e);var n=[];g(this,function(e,t){f(n,{key:t,value:e})}),u(t,1);for(var r,s=d(e),o=d(i),a=0,l=0,h=!1,c=n.length;a{var i=TypeError;e.exports=function(e,t){if(e{var n=i(48),r=i(14),o=i(77),a=i(85),i=URLSearchParams,s=i.prototype,l=r(s.getAll),h=r(s.has),r=new i("a=1");!r.has("a",2)&&r.has("a",void 0)||n(s,"has",function(e){var t=arguments.length,i=t<2?void 0:arguments[1];if(t&&void 0===i)return h(this,e);var n=l(this,e);a(t,1);for(var r=o(i),s=0;s{var n=i(6),r=i(14),i=i(88),s=URLSearchParams.prototype,o=r(s.forEach);!n||"size"in s||i(s,"size",{get:function(){var e=0;return o(this,function(){e++}),e},configurable:!0,enumerable:!0})},(e,t,i)=>{var n=i(49),r=i(45);e.exports=function(e,t,i){return i.get&&n(i.get,t,{getter:!0}),i.set&&n(i.set,t,{setter:!0}),r.f(e,t,i)}},(e,t,i)=>{var n=i(3),s=i(40),o=i(64),a=i(90),l=i(92);n({target:"Array",proto:!0,arity:1,forced:i(7)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=s(this),i=o(t),n=arguments.length;l(i+n);for(var r=0;r{var n=i(6),r=i(91),s=TypeError,o=Object.getOwnPropertyDescriptor,i=n&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=i?function(e,t){if(r(e)&&!o(e,"length").writable)throw s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},(e,t,i)=>{var n=i(15);e.exports=Array.isArray||function(e){return"Array"===n(e)}},e=>{var t=TypeError;e.exports=function(e){if(9007199254740991{var n=i(94),r=i(98).findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,1{function n(e){var t,e=w(e);if(u(e))return(t=_(e))&&p(t,L)?t[L]:n(e)}function r(e){return!!u(e)&&(e=m(e),p(F,e)||p(P,e))}var s,o,a,l=i(95),h=i(6),c=i(4),d=i(21),u=i(20),p=i(39),m=i(78),g=i(32),f=i(44),v=i(48),y=i(88),b=i(25),w=i(96),x=i(71),S=i(34),A=i(41),i=i(52),k=i.enforce,_=i.get,i=c.Int8Array,C=i&&i.prototype,T=c.Uint8ClampedArray,T=T&&T.prototype,E=i&&w(i),M=C&&w(C),i=Object.prototype,R=c.TypeError,S=S("toStringTag"),$=A("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",I=l&&!!x&&"Opera"!==m(c.opera),A=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},P={BigInt64Array:8,BigUint64Array:8};for(s in F)(a=(o=c[s])&&o.prototype)?k(a)[L]=o:I=!1;for(s in P)(a=(o=c[s])&&o.prototype)&&(k(a)[L]=o);if((!I||!d(E)||E===Function.prototype)&&(E=function(){throw R("Incorrect invocation")},I))for(s in F)c[s]&&x(c[s],E);if((!I||!M||M===i)&&(M=E.prototype,I))for(s in F)c[s]&&x(c[s].prototype,M);if(I&&w(T)!==M&&x(T,M),h&&!p(M,S))for(s in y(M,S,{configurable:A=!0,get:function(){return u(this)?this[$]:void 0}}),F)c[s]&&f(c[s],$,s);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:I,TYPED_ARRAY_TAG:A&&$,aTypedArray:function(e){if(r(e))return e;throw R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!d(e)||x&&!b(E,e))throw R(g(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,i,n){if(h){if(i)for(var r in F){r=c[r];if(r&&p(r.prototype,e))try{delete r.prototype[e]}catch(i){try{r.prototype[e]=t}catch(e){}}}M[e]&&!i||v(M,e,!i&&I&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(h){if(x){if(i)for(n in F)if((r=c[n])&&p(r,e))try{delete r[e]}catch(e){}if(E[e]&&!i)return;try{return v(E,e,!i&&I&&E[e]||t)}catch(e){}}for(n in F)!(r=c[n])||r[e]&&!i||v(r,e,t)}},getTypedArrayConstructor:n,isView:function(e){return!!u(e)&&("DataView"===(e=m(e))||p(F,e)||p(P,e))},isTypedArray:r,TypedArray:E,TypedArrayPrototype:M}},e=>{e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},(e,t,i)=>{var n=i(39),r=i(21),s=i(40),o=i(54),i=i(97),a=o("IE_PROTO"),l=Object,h=l.prototype;e.exports=i?l.getPrototypeOf:function(e){var t,e=s(e);return n(e,a)?e[a]:(t=e.constructor,r(t)&&e instanceof t?t.prototype:e instanceof l?h:null)}},(e,t,i)=>{i=i(7);e.exports=!i(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},(e,t,i)=>{function n(l){var h=1===l;return function(e,t,i){for(var n,r=u(e),s=d(r),o=c(t,i),a=p(s);0{var n=i(100),r=i(31),s=i(9),o=n(n.bind);e.exports=function(e,t){return r(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},(e,t,i)=>{var n=i(15),r=i(14);e.exports=function(e){if("Function"===n(e))return r(e)}},(e,t,i)=>{var n=i(94),r=i(98).findLastIndex,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLastIndex",function(e){return r(s(this),e,1{var n=i(4),s=i(8),r=i(94),o=i(64),a=i(103),l=i(40),i=i(7),h=n.RangeError,c=n.Int8Array,n=c&&c.prototype,d=n&&n.set,u=r.aTypedArray,n=r.exportTypedArrayMethod,p=!i(function(){var e=new Uint8ClampedArray(2);return s(d,e,{length:1,0:3},1),3!==e[1]}),r=p&&r.NATIVE_ARRAY_BUFFER_VIEWS&&i(function(){var e=new c(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]});n("set",function(e){u(this);var t=a(1{var n=i(104),r=RangeError;e.exports=function(e,t){e=n(e);if(e%t)throw r("Wrong offset");return e}},(e,t,i)=>{var n=i(62),r=RangeError;e.exports=function(e){e=n(e);if(e<0)throw r("The argument can't be less than 0");return e}},(e,t,i)=>{var n=i(106),i=i(94),r=i.aTypedArray,s=i.exportTypedArrayMethod,o=i.getTypedArrayConstructor;s("toReversed",function(){return n(r(this),o(this))})},(e,t,i)=>{var s=i(64);e.exports=function(e,t){for(var i=s(e),n=new t(i),r=0;r{var n=i(94),r=i(14),s=i(31),o=i(108),a=n.aTypedArray,l=n.getTypedArrayConstructor,i=n.exportTypedArrayMethod,h=r(n.TypedArrayPrototype.sort);i("toSorted",function(e){void 0!==e&&s(e);var t=a(this),t=o(l(t),t);return h(t,e)})},(e,t,i)=>{var s=i(64);e.exports=function(e,t){for(var i=0,n=s(t),r=new e(n);i{var n=i(110),r=i(94),s=i(111),o=i(62),a=i(112),l=r.aTypedArray,h=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("with",function(e,t){var i=l(this),e=o(e),t=s(i)?a(t):+t;return n(i,h(i),e,t)},!!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}())},(e,t,i)=>{var l=i(64),h=i(62),c=RangeError;e.exports=function(e,t,i,n){var r=l(e),i=h(i),s=i<0?r+i:i;if(r<=s||s<0)throw c("Incorrect index");for(var o=new t(r),a=0;a{var n=i(78);e.exports=function(e){e=n(e);return"BigInt64Array"===e||"BigUint64Array"===e}},(e,t,i)=>{var n=i(19),r=TypeError;e.exports=function(e){e=n(e,"number");if("number"==typeof e)throw r("Can't convert number to bigint");return BigInt(e)}},(e,t,i)=>{var n=i(6),r=i(88),s=i(114),i=ArrayBuffer.prototype;!n||"detached"in i||r(i,"detached",{configurable:!0,get:function(){return s(this)}})},(e,t,i)=>{var n=i(14),r=i(115),s=n(ArrayBuffer.prototype.slice);e.exports=function(e){if(0!==r(e))return!1;try{return s(e,0,0),!1}catch(e){return!0}}},(e,t,i)=>{var n=i(72),r=i(15),s=TypeError;e.exports=n(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!==r(e))throw s("ArrayBuffer expected");return e.byteLength}},(e,t,i)=>{var n=i(3),r=i(117);r&&n({target:"ArrayBuffer",proto:!0},{transfer:function(){return r(this,arguments.length?arguments[0]:void 0,!0)}})},(e,t,i)=>{var n=i(4),r=i(14),s=i(72),h=i(118),c=i(114),d=i(115),i=i(119),u=n.TypeError,p=n.structuredClone,m=n.ArrayBuffer,g=n.DataView,f=Math.min,n=m.prototype,o=g.prototype,v=r(n.slice),y=s(n,"resizable","get"),b=s(n,"maxByteLength","get"),w=r(o.getInt8),x=r(o.setInt8);e.exports=i&&function(e,t,i){var n=d(e),t=void 0===t?n:h(t),r=!y||!y(e);if(c(e))throw u("ArrayBuffer is detached");e=p(e,{transfer:[e]});if(n===t&&(i||r))return e;if(t<=n&&(!i||r))return v(e,0,t);for(var i=i&&!r&&b?{maxByteLength:b(e)}:void 0,r=new m(t,i),s=new g(e),o=new g(r),a=f(t,n),l=0;l{var n=i(62),r=i(65),s=RangeError;e.exports=function(e){if(void 0===e)return 0;var e=n(e),t=r(e);if(e!==t)throw s("Wrong length or index");return t}},(e,t,i)=>{var n=i(4),r=i(7),s=i(28),o=i(120),a=i(121),l=i(122),h=n.structuredClone;e.exports=!!h&&!r(function(){var e,t;return!(a&&92{var n=i(121),i=i(122);e.exports=!n&&!i&&"object"==typeof window&&"object"==typeof document},e=>{e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},(e,t,i)=>{var n=i(4),i=i(15);e.exports="process"===i(n.process)},(e,t,i)=>{var n=i(3),r=i(117);r&&n({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return r(this,arguments.length?arguments[0]:void 0,!1)}})},(__unused_webpack_module,exports,__w_pdfjs_require__)=>{Object.defineProperty(exports,"__esModule",{value:!0}),exports.RenderTask=exports.PDFWorkerUtil=exports.PDFWorker=exports.PDFPageProxy=exports.PDFDocumentProxy=exports.PDFDocumentLoadingTask=exports.PDFDataRangeTransport=exports.LoopbackPort=exports.DefaultStandardFontDataFactory=exports.DefaultFilterFactory=exports.DefaultCanvasFactory=exports.DefaultCMapReaderFactory=void 0,Object.defineProperty(exports,"SVGGraphics",{enumerable:!0,get:function(){return _displaySvg.SVGGraphics}}),exports.build=void 0,exports.getDocument=getDocument,exports.version=void 0,__w_pdfjs_require__(84),__w_pdfjs_require__(86),__w_pdfjs_require__(87),__w_pdfjs_require__(2),__w_pdfjs_require__(93),__w_pdfjs_require__(101),__w_pdfjs_require__(102),__w_pdfjs_require__(105),__w_pdfjs_require__(107),__w_pdfjs_require__(109),__w_pdfjs_require__(113),__w_pdfjs_require__(116),__w_pdfjs_require__(123),__w_pdfjs_require__(89),__w_pdfjs_require__(125),__w_pdfjs_require__(136),__w_pdfjs_require__(138),__w_pdfjs_require__(141),__w_pdfjs_require__(143),__w_pdfjs_require__(145),__w_pdfjs_require__(147),__w_pdfjs_require__(149),__w_pdfjs_require__(152);var _util=__w_pdfjs_require__(1),_annotation_storage=__w_pdfjs_require__(163),_display_utils=__w_pdfjs_require__(168),_font_loader=__w_pdfjs_require__(171),_displayNode_utils=__w_pdfjs_require__(172),_canvas=__w_pdfjs_require__(173),_worker_options=__w_pdfjs_require__(176),_message_handler=__w_pdfjs_require__(177),_metadata=__w_pdfjs_require__(178),_optional_content_config=__w_pdfjs_require__(179),_transport_stream=__w_pdfjs_require__(180),_displayFetch_stream=__w_pdfjs_require__(181),_displayNetwork=__w_pdfjs_require__(184),_displayNode_stream=__w_pdfjs_require__(185),_displaySvg=__w_pdfjs_require__(186),_xfa_text=__w_pdfjs_require__(194);const DEFAULT_RANGE_CHUNK_SIZE=65536,RENDERING_CANCELLED_TIMEOUT=100,DELAYED_CLEANUP_TIMEOUT=5e3,DefaultCanvasFactory=_util.isNodeJS?_displayNode_utils.NodeCanvasFactory:_display_utils.DOMCanvasFactory,DefaultCMapReaderFactory=(exports.DefaultCanvasFactory=DefaultCanvasFactory,_util.isNodeJS?_displayNode_utils.NodeCMapReaderFactory:_display_utils.DOMCMapReaderFactory),DefaultFilterFactory=(exports.DefaultCMapReaderFactory=DefaultCMapReaderFactory,_util.isNodeJS?_displayNode_utils.NodeFilterFactory:_display_utils.DOMFilterFactory),DefaultStandardFontDataFactory=(exports.DefaultFilterFactory=DefaultFilterFactory,_util.isNodeJS?_displayNode_utils.NodeStandardFontDataFactory:_display_utils.DOMStandardFontDataFactory);function getDocument(e){if("string"==typeof e||e instanceof URL?e={url:e}:(0,_util.isArrayBuffer)(e)&&(e={data:e}),"object"!=typeof e)throw new Error("Invalid parameter in getDocument, need parameter object.");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");const i=new PDFDocumentLoadingTask,n=i["docId"],r=e.url?getUrlProp(e.url):null,s=e.data?getDataProp(e.data):null,o=e.httpHeaders||null,a=!0===e.withCredentials,t=e.password??null,l=e.range instanceof PDFDataRangeTransport?e.range:null,h=Number.isInteger(e.rangeChunkSize)&&0{for(const e of this._progressListeners)e(t,i)})}onDataProgressiveRead(t){this._readyCapability.promise.then(()=>{for(const e of this._progressiveReadListeners)e(t)})}onDataProgressiveDone(){this._readyCapability.promise.then(()=>{for(const e of this._progressiveDoneListeners)e()})}transportReady(){this._readyCapability.resolve()}requestDataRange(e,t){(0,_util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}exports.PDFDataRangeTransport=PDFDataRangeTransport;class PDFDocumentProxy{constructor(e,t){this._pdfInfo=e,this._transport=t,Object.defineProperty(this,"getJavaScript",{value:()=>((0,_display_utils.deprecated)("`PDFDocumentProxy.getJavaScript`, please use `PDFDocumentProxy.getJSActions` instead."),this.getJSActions().then(e=>{if(!e)return e;var t=[];for(const i in e)t.push(...e[i]);return t}))})}get annotationStorage(){return this._transport.annotationStorage}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(e){return this._transport.getPage(e)}getPageIndex(e){return this._transport.getPageIndex(e)}getDestinations(){return this._transport.getDestinations()}getDestination(e){return this._transport.getDestination(e)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig(){return this._transport.getOptionalContentConfig()}getPermissions(){return this._transport.getPermissions()}getMetadata(){return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(){return this._transport.startCleanup(0{d.renderTasks.delete(m),(this._maybeCleanupAfterRender||u)&&(this.#i=!0),this.#s(!u),e?(m.capability.reject(e),this._abortOperatorList({intentState:d,reason:e instanceof Error?e:new Error(e)})):m.capability.resolve(),this._stats?.timeEnd("Rendering"),this._stats?.timeEnd("Overall")}),m=new InternalRenderTask({callback:p,params:{canvasContext:t,viewport:i,transform:s,background:o},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap:l,operatorList:d.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!u,pdfBug:this._pdfBug,pageColors:h});(d.renderTasks||=new Set).add(m);e=m.task;return Promise.all([d.displayReadyCapability.promise,a]).then(e=>{var[e,t]=e;this.destroyed?p():(this._stats?.time("Rendering"),m.initializeGraphics({transparency:e,optionalContentConfig:t}),m.operatorListChanged())}).catch(p),e}getOperatorList(){var{intent:e="display",annotationMode:t=_util.AnnotationMode.ENABLE,printAnnotationStorage:i=null}=0e.items.length})}getTextContent(){var e=0_xfa_text.XfaText.textContent(e));const i=this.streamTextContent(e);return new Promise(function(n,e){const t=i.getReader(),r={items:[],styles:Object.create(null)};!function i(){t.read().then(function(e){var{value:e,done:t}=e;t?n(r):(Object.assign(r.styles,e.styles),r.items.push(...e.items),i())},e)}()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;var e=[];for(const t of this._intentStates.values())if(this._abortOperatorList({intentState:t,reason:new Error("Page was destroyed."),force:!0}),!t.opListReadCapability)for(const i of t.renderTasks)e.push(i.completed),i.cancel();return this.objs.clear(),this.#i=!1,this.#r(),Promise.all(e)}cleanup(){var e=0{this.#n=null,this.#s(!1)},DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(0{s.read().then(e=>{var{value:e,done:t}=e;t?o.streamReader=null:this._transport.destroyed||(this._renderPageChunk(e,o),a())},e=>{if(o.streamReader=null,!this._transport.destroyed){if(o.operatorList){o.operatorList.lastChunk=!0;for(const e of o.renderTasks)e.operatorListChanged();this.#s(!0)}if(o.displayReadyCapability)o.displayReadyCapability.reject(e);else{if(!o.opListReadCapability)throw e;o.opListReadCapability.reject(e)}}})});a()}_abortOperatorList(e){let{intentState:t,reason:i,force:n=!1}=e;if(t.streamReader){if(t.streamReaderCancelTimeout&&(clearTimeout(t.streamReaderCancelTimeout),t.streamReaderCancelTimeout=null),!n){if(0{t.streamReaderCancelTimeout=null,this._abortOperatorList({intentState:t,reason:i,force:!0})},e))}}if(t.streamReader.cancel(new _util.AbortException(i.message)).catch(()=>{}),t.streamReader=null,!this._transport.destroyed){for(const[e,i]of this._intentStates)if(i===t){this._intentStates.delete(e);break}this.cleanup()}}}get stats(){return this._stats}}exports.PDFPageProxy=PDFPageProxy;class LoopbackPort{#a=new Set;#o=Promise.resolve();postMessage(e,t){const i={data:structuredClone(e,null)};this.#o.then(()=>{for(const e of this.#a)e.call(this,i)})}addEventListener(e,t){this.#a.add(t)}removeEventListener(e,t){this.#a.delete(t)}terminate(){this.#a.clear()}}exports.LoopbackPort=LoopbackPort;const PDFWorkerUtil={isWorkerDisabled:!1,fallbackWorkerSrc:null,fakeWorkerId:0};if(exports.PDFWorkerUtil=PDFWorkerUtil,_util.isNodeJS&&"function"==typeof require)PDFWorkerUtil.isWorkerDisabled=!0,PDFWorkerUtil.fallbackWorkerSrc="./pdf.worker.js";else if("object"==typeof document){const t=document?.currentScript?.src;t&&(PDFWorkerUtil.fallbackWorkerSrc=t.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2"))}PDFWorkerUtil.isSameOrigin=function(e,t){let i;try{if(!(i=new URL(e)).origin||"null"===i.origin)return!1}catch{return!1}e=new URL(t,i);return i.origin===e.origin},PDFWorkerUtil.createCDNWrapper=function(e){return URL.createObjectURL(new Blob([`importScripts("${e}");`]))};class PDFWorker{static#l;constructor(){var{name:e=null,port:t=null,verbosity:i=(0,_util.getVerbosityLevel)()}=0{t.removeEventListener("error",r),i.destroy(),t.terminate(),this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):this._setupFakeWorker()},r=()=>{this._webWorker||n()},s=(t.addEventListener("error",r),i.on("test",e=>{t.removeEventListener("error",r),this.destroyed?n():e?(this._messageHandler=i,this._port=t,this._webWorker=t,this._readyCapability.resolve(),i.send("configure",{verbosity:this.verbosity})):(this._setupFakeWorker(),i.destroy(),t.terminate())}),i.on("ready",e=>{if(t.removeEventListener("error",r),this.destroyed)n();else try{s()}catch{this._setupFakeWorker()}}),()=>{var e=new Uint8Array;i.send("test",e,[e.buffer])});return void s()}catch{(0,_util.info)("The worker has been disabled.")}}this._setupFakeWorker()}_setupFakeWorker(){PDFWorkerUtil.isWorkerDisabled||((0,_util.warn)("Setting up fake worker."),PDFWorkerUtil.isWorkerDisabled=!0),PDFWorker._setupFakeWorkerGlobal.then(e=>{var t,i,n;this.destroyed?this._readyCapability.reject(new Error("Worker was destroyed")):(t=new LoopbackPort,this._port=t,i="fake"+PDFWorkerUtil.fakeWorkerId++,n=new _message_handler.MessageHandler(i+"_worker",i,t),e.setup(n,t),e=new _message_handler.MessageHandler(i,i+"_worker",t),this._messageHandler=e,this._readyCapability.resolve(),e.send("configure",{verbosity:this.verbosity}))}).catch(e=>{this._readyCapability.reject(new Error(`Setting up fake worker failed: "${e.message}".`))})}destroy(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),PDFWorker.#l?.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}static fromPort(e){if(!e?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");var t=this.#l?.get(e.port);if(t){if(t._pendingDestroy)throw new Error("PDFWorker.fromPort - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return t}return new PDFWorker(e)}static get workerSrc(){if(_worker_options.GlobalWorkerOptions.workerSrc)return _worker_options.GlobalWorkerOptions.workerSrc;if(null!==PDFWorkerUtil.fallbackWorkerSrc)return _util.isNodeJS||(0,_display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'),PDFWorkerUtil.fallbackWorkerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _mainThreadWorkerMessageHandler(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}}static get _setupFakeWorkerGlobal(){const loader=async()=>{const mainWorkerMessageHandler=this._mainThreadWorkerMessageHandler;if(mainWorkerMessageHandler)return mainWorkerMessageHandler;if(_util.isNodeJS&&"function"==typeof require){const worker=eval("require")(this.workerSrc);return worker.WorkerMessageHandler}return await(0,_display_utils.loadScript)(this.workerSrc),window.pdfjsWorker.WorkerMessageHandler};return(0,_util.shadow)(this,"_setupFakeWorkerGlobal",loader())}}exports.PDFWorker=PDFWorker;class WorkerTransport{#c=new Map;#h=new Map;#d=new Map;#u=null;constructor(e,t,i,n,r){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new PDFObjects,this.fontLoader=new _font_loader.FontLoader({ownerDocument:n.ownerDocument,styleElement:n.styleElement}),this._params=n,this.canvasFactory=r.canvasFactory,this.filterFactory=r.filterFactory,this.cMapReaderFactory=r.cMapReaderFactory,this.standardFontDataFactory=r.standardFontDataFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=i,this._fullReader=null,this._lastProgress=null,this.downloadInfoCapability=new _util.PromiseCapability,this.setupMessageHandler()}#p(e){var t=1{this.commonObjs.clear(),this.fontLoader.clear(),this.#c.clear(),this.filterFactory.destroy(),this._networkStream?.cancelAllRequests(new _util.AbortException("Worker was terminated.")),this.messageHandler&&(this.messageHandler.destroy(),this.messageHandler=null),this.destroyCapability.resolve()},this.destroyCapability.reject)}return this.destroyCapability.promise}setupMessageHandler(){const{messageHandler:o,loadingTask:n}=this;o.on("GetReader",(e,i)=>{(0,_util.assert)(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=e=>{this._lastProgress={loaded:e.loaded,total:e.total}},i.onPull=()=>{this._fullReader.read().then(function(e){var{value:e,done:t}=e;t?i.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(e),1,[e]))}).catch(e=>{i.error(e)})},i.onCancel=e=>{this._fullReader.cancel(e),i.ready.catch(e=>{if(!this.destroyed)throw e})}}),o.on("ReaderHeadersReady",e=>{const t=new _util.PromiseCapability,i=this._fullReader;return i.headersReady.then(()=>{i.isStreamingSupported&&i.isRangeSupported||(this._lastProgress&&n.onProgress?.(this._lastProgress),i.onProgress=e=>{n.onProgress?.({loaded:e.loaded,total:e.total})}),t.resolve({isStreamingSupported:i.isStreamingSupported,isRangeSupported:i.isRangeSupported,contentLength:i.contentLength})},t.reject),t.promise}),o.on("GetRangeReader",(e,i)=>{(0,_util.assert)(this._networkStream,"GetRangeReader - no `IPDFStream` instance available.");const t=this._networkStream.getRangeReader(e.begin,e.end);t?(i.onPull=()=>{t.read().then(function(e){var{value:e,done:t}=e;t?i.close():((0,_util.assert)(e instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),i.enqueue(new Uint8Array(e),1,[e]))}).catch(e=>{i.error(e)})},i.onCancel=e=>{t.cancel(e),i.ready.catch(e=>{if(!this.destroyed)throw e})}):i.close()}),o.on("GetDoc",e=>{e=e.pdfInfo;this._numPages=e.numPages,this._htmlForXfa=e.htmlForXfa,delete e.htmlForXfa,n._capability.resolve(new PDFDocumentProxy(e,this))}),o.on("DocException",function(e){let t;switch(e.name){case"PasswordException":t=new _util.PasswordException(e.message,e.code);break;case"InvalidPDFException":t=new _util.InvalidPDFException(e.message);break;case"MissingPDFException":t=new _util.MissingPDFException(e.message);break;case"UnexpectedResponseException":t=new _util.UnexpectedResponseException(e.message,e.status);break;case"UnknownErrorException":t=new _util.UnknownErrorException(e.message,e.details);break;default:(0,_util.unreachable)("DocException - expected a valid Error.")}n._capability.reject(t)}),o.on("PasswordRequest",e=>{if(this.#u=new _util.PromiseCapability,n.onPassword){var t=e=>{e instanceof Error?this.#u.reject(e):this.#u.resolve({password:e})};try{n.onPassword(t,e.code)}catch(e){this.#u.reject(e)}}else this.#u.reject(new _util.PasswordException(e.message,e.code));return this.#u.promise}),o.on("DataLoaded",e=>{n.onProgress?.({loaded:e.length,total:e.length}),this.downloadInfoCapability.resolve(e)}),o.on("StartRenderPage",e=>{this.destroyed||this.#h.get(e.pageIndex)._startRenderPage(e.transparency,e.cacheKey)}),o.on("commonobj",e=>{let[t,i,n]=e;if(!this.destroyed&&!this.commonObjs.has(t))switch(i){case"Font":const e=this._params;if("error"in n){const o=n.error;(0,_util.warn)("Error during font loading: "+o),this.commonObjs.resolve(t,o)}else{const r=e.pdfBug&&globalThis.FontInspector?.enabled?(e,t)=>globalThis.FontInspector.fontAdded(e,t):null,s=new _font_loader.FontFaceObject(n,{isEvalSupported:e.isEvalSupported,disableFontFace:e.disableFontFace,ignoreErrors:e.ignoreErrors,inspectFont:r});this.fontLoader.bind(s).catch(e=>o.sendWithPromise("FontFallback",{id:t})).finally(()=>{!e.fontExtraProperties&&s.data&&(s.data=null),this.commonObjs.resolve(t,s)})}break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(t,n);break;default:throw new Error("Got unknown common object type "+i)}}),o.on("obj",e=>{let[t,i,n,r]=e;if(!this.destroyed){var s=this.#h.get(i);if(!s.objs.has(t))switch(n){case"Image":if(s.objs.resolve(t,r),r){let e;if(r.bitmap){const{width:t,height:i}=r;e=t*i*4}else e=r.data?.length||0;e>_util.MAX_IMAGE_SIZE_TO_CACHE&&(s._maybeCleanupAfterRender=!0)}break;case"Pattern":s.objs.resolve(t,r);break;default:throw new Error("Got unknown object type "+n)}}}),o.on("DocProgress",e=>{this.destroyed||n.onProgress?.({loaded:e.loaded,total:e.total})}),o.on("FetchBuiltInCMap",e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.cMapReaderFactory?this.cMapReaderFactory.fetch(e):Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter."))),o.on("FetchStandardFontData",e=>this.destroyed?Promise.reject(new Error("Worker was destroyed.")):this.standardFontDataFactory?this.standardFontDataFactory.fetch(e):Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")))}getData(){return this.messageHandler.sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&(0,_util.warn)("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");var{map:e,transfers:t}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:e,filename:this._fullReader?.filename??null},t).finally(()=>{this.annotationStorage.resetModified()})}getPage(e){if(!Number.isInteger(e)||e<=0||e>this._numPages)return Promise.reject(new Error("Invalid page request."));const t=e-1,i=this.#d.get(t);return i||(e=this.messageHandler.sendWithPromise("GetPage",{pageIndex:t}).then(e=>{if(this.destroyed)throw new Error("Transport destroyed");e=new PDFPageProxy(t,e,this,this._params.pdfBug);return this.#h.set(t,e),e}),this.#d.set(t,e),e)}getPageIndex(e){return"object"!=typeof e||null===e||!Number.isInteger(e.num)||e.num<0||!Number.isInteger(e.gen)||e.gen<0?Promise.reject(new Error("Invalid pageIndex request.")):this.messageHandler.sendWithPromise("GetPageIndex",{num:e.num,gen:e.gen})}getAnnotations(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})}getFieldObjects(){return this.#p("GetFieldObjects")}hasJSActions(){return this.#p("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(e){return"string"!=typeof e?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:e})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#p("GetDocJSActions")}getPageJSActions(e){return this.messageHandler.sendWithPromise("GetPageJSActions",{pageIndex:e})}getStructTree(e){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex:e})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(){return this.messageHandler.sendWithPromise("GetOptionalContentConfig",null).then(e=>new _optional_content_config.OptionalContentConfig(e))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){var e="GetMetadata",t=this.#c.get(e);return t||(t=this.messageHandler.sendWithPromise(e,null).then(e=>({info:e[0],metadata:e[1]?new _metadata.Metadata(e[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null})),this.#c.set(e,t),t)}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(){let e=0t(i.data)),null}const i=this.#f[e];if(i?.capability.settled)return i.data;throw new Error(`Requesting object that isn't resolved yet ${e}.`)}has(e){return this.#f[e]?.capability.settled||!1}resolve(e){var t=1{this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk)&&(this.gfx.endDrawing(),InternalRenderTask.#b.delete(this._canvas),this.callback()))}}const version="3.11.174",build=(exports.version=version,"ce8716743");exports.build=build},(e,t,i)=>{var n=i(3),r=i(126);n({target:"Set",proto:!0,real:!0,forced:!i(135)("difference")},{difference:r})},(e,t,i)=>{var r=i(127),n=i(128),s=i(129),o=i(132),a=i(133),l=i(130),h=i(131),c=n.has,d=n.remove;e.exports=function(e){var t=r(this),i=a(e),n=s(t);return o(t)<=i.size?l(t,function(e){i.includes(e)&&d(n,e)}):h(i.getIterator(),function(e){c(t,e)&&d(n,e)}),n}},(e,t,i)=>{var n=i(128).has;e.exports=function(e){return n(e),e}},(e,t,i)=>{var i=i(14),n=Set.prototype;e.exports={Set:Set,add:i(n.add),has:i(n.has),remove:i(n.delete),proto:n}},(e,t,i)=>{var n=i(128),r=i(130),s=n.Set,o=n.add;e.exports=function(e){var t=new s;return r(e,function(e){o(t,e)}),t}},(e,t,i)=>{var n=i(14),r=i(131),i=i(128),s=i.Set,i=i.proto,o=n(i.forEach),a=n(i.keys),l=a(new s).next;e.exports=function(e,t,i){return i?r({iterator:a(e),next:l},t):o(e,t)}},(e,t,i)=>{var o=i(8);e.exports=function(e,t,i){for(var n,r=i?e:e.iterator,s=e.next;!(n=o(s,r)).done;)if(void 0!==(n=t(n.value)))return n}},(e,t,i)=>{var n=i(72),i=i(128);e.exports=n(i.proto,"size","get")||function(e){return e.size}},(e,t,i)=>{function n(e,t,i,n){this.set=e,this.size=t,this.has=i,this.keys=n}var r=i(31),s=i(47),o=i(8),a=i(62),l=i(134),h="Invalid size",c=RangeError,d=TypeError,u=Math.max;n.prototype={getIterator:function(){return l(s(o(this.keys,this.set)))},includes:function(e){return o(this.has,this.set,e)}},e.exports=function(e){s(e);var t=+e.size;if(t!=t)throw d(h);t=a(t);if(t<0)throw c(h);return new n(e,u(t,0),r(e.has),r(e.keys))}},e=>{e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},(e,t,i)=>{function n(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}}var r=i(24);e.exports=function(e){var t=r("Set");try{(new t)[e](n(0));try{return(new t)[e](n(-1)),!1}catch(e){return!0}}catch(e){return!1}}},(e,t,i)=>{var n=i(3),r=i(7),s=i(137);n({target:"Set",proto:!0,real:!0,forced:!i(135)("intersection")||r(function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))})},{intersection:s})},(e,t,i)=>{var r=i(127),n=i(128),s=i(132),o=i(133),a=i(130),l=i(131),h=n.Set,c=n.add,d=n.has;e.exports=function(e){var t=r(this),i=o(e),n=new h;return s(t)>i.size?l(i.getIterator(),function(e){d(t,e)&&c(n,e)}):a(t,function(e){i.includes(e)&&c(n,e)}),n}},(e,t,i)=>{var n=i(3),r=i(139);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isDisjointFrom")},{isDisjointFrom:r})},(e,t,i)=>{var r=i(127),s=i(128).has,o=i(132),a=i(133),l=i(130),h=i(131),c=i(140);e.exports=function(e){var t,i=r(this),n=a(e);return o(i)<=n.size?!1!==l(i,function(e){if(n.includes(e))return!1},!0):(t=n.getIterator(),!1!==h(t,function(e){if(s(i,e))return c(t,"normal",!1)}))}},(e,t,i)=>{var s=i(8),o=i(47),a=i(30);e.exports=function(e,t,i){var n,r;o(e);try{if(!(n=a(e,"return"))){if("throw"===t)throw i;return i}n=s(n,e)}catch(e){r=!0,n=e}if("throw"===t)throw i;if(r)throw n;return o(n),i}},(e,t,i)=>{var n=i(3),r=i(142);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isSubsetOf")},{isSubsetOf:r})},(e,t,i)=>{var n=i(127),r=i(132),s=i(130),o=i(133);e.exports=function(e){var t=n(this),i=o(e);return!(r(t)>i.size)&&!1!==s(t,function(e){if(!i.includes(e))return!1},!0)}},(e,t,i)=>{var n=i(3),r=i(144);n({target:"Set",proto:!0,real:!0,forced:!i(135)("isSupersetOf")},{isSupersetOf:r})},(e,t,i)=>{var n=i(127),r=i(128).has,s=i(132),o=i(133),a=i(131),l=i(140);e.exports=function(e){var t,i=n(this),e=o(e);return!(s(i){var n=i(3),r=i(146);n({target:"Set",proto:!0,real:!0,forced:!i(135)("symmetricDifference")},{symmetricDifference:r})},(e,t,i)=>{var n=i(127),r=i(128),s=i(129),o=i(133),a=i(131),l=r.add,h=r.has,c=r.remove;e.exports=function(e){var t=n(this),e=o(e).getIterator(),i=s(t);return a(e,function(e){(h(t,e)?c:l)(i,e)}),i}},(e,t,i)=>{var n=i(3),r=i(148);n({target:"Set",proto:!0,real:!0,forced:!i(135)("union")},{union:r})},(e,t,i)=>{var n=i(127),r=i(128).add,s=i(129),o=i(133),a=i(131);e.exports=function(e){var t=n(this),e=o(e).getIterator(),i=s(t);return a(e,function(e){r(i,e)}),i}},(e,t,i)=>{function n(){d(this,w);var e=p((t=arguments.length)<1?void 0:arguments[0]),t=p(t<2?void 0:arguments[1],"Error"),t=new b(e,t);return(e=y(e)).name=v,h(t,"stack",l(1,g(e.stack,1))),u(t,this,n),t}var r,s=i(3),o=i(4),a=i(24),l=i(11),h=i(45).f,c=i(39),d=i(150),u=i(75),p=i(76),m=i(151),g=i(82),f=i(6),i=i(36),v="DOMException",y=a("Error"),b=a(v),w=n.prototype=b.prototype,x="stack"in y(v),S="stack"in new b(1,2),f=b&&f&&Object.getOwnPropertyDescriptor(o,v),o=!(!f||f.writable&&f.configurable),f=x&&!o&&!S,A=(s({global:!0,constructor:!0,forced:i||f},{DOMException:f?n:b}),a(v)),x=A.prototype;if(x.constructor!==A)for(var k in i||h(x,"constructor",l(1,A)),m)!c(m,k)||c(A,r=(k=m[k]).s)||h(A,r,l(6,k.c))},(e,t,i)=>{var n=i(25),r=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw r("Incorrect invocation")}},e=>{e.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},(l,h,e)=>{function t(n){return!s(function(){var e=new v.Set([7]),t=n(e),i=n(C(7));return t===e||!t.has(7)||"object"!=typeof i||7!=+i})&&n}function i(i,n){return!s(function(){var e=new n,t=i({a:e,b:e});return!(t&&t.a===t.b&&t.a instanceof n&&t.a.stack===e.stack)})}function u(e){throw new E("Uncloneable type: "+e,I)}function p(e,t){return D||O(t),D(e)}function m(e,t,i,n,r){var s=v[t];return w(s)||O(t),new s(N(e.buffer,r),i,n)}function g(e,t,i){this.object=e,this.type=t,this.metadata=i}function f(e,i,n){if(W(e)&&u("Symbol"),!w(e))return e;if(i){if(R(i,e))return $(i,e)}else i=new M;var t,r,s,o,a,l,h,c,d=S(e);switch(d){case"Array":s=Q(k(e));break;case"Object":s={};break;case"Map":s=new M;break;case"Set":s=new he;break;case"RegExp":s=new RegExp(e.source,K(e));break;case"Error":switch(r=e.name){case"AggregateError":s=y("AggregateError")([]);break;case"EvalError":s=Z();break;case"RangeError":s=ee();break;case"ReferenceError":s=te();break;case"SyntaxError":s=ie();break;case"TypeError":s=ne();break;case"URIError":s=re();break;case"CompileError":s=oe();break;case"LinkError":s=ae();break;case"RuntimeError":s=le();break;default:s=T()}break;case"DOMException":s=new E(e.message,e.name);break;case"ArrayBuffer":case"SharedArrayBuffer":s=n?new g(e,d):N(e,i,d);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":l="DataView"===d?e.byteLength:e.length,s=n?new g(e,d,{offset:e.byteOffset,length:l}):m(e,d,e.byteOffset,l,i);break;case"DOMQuad":try{s=new DOMQuad(f(e.p1,i,n),f(e.p2,i,n),f(e.p3,i,n),f(e.p4,i,n))}catch(i){s=p(e,d)}break;case"File":if(D)try{s=D(e),S(s)!==d&&(s=void 0)}catch(e){}if(!s)try{s=new File([e],e.name,e)}catch(e){}s||O(d);break;case"FileList":if(o=function(){var t;try{t=new v.DataTransfer}catch(e){try{t=new v.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(a=0,l=k(e);a{function n(){}function r(e){if(!l(e))return!1;try{return p(n,u,e),!0}catch(e){return!1}}function s(e){if(!l(e))return!1;switch(h(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return f||!!g(m,d(e))}catch(e){return!0}}var o=i(14),a=i(7),l=i(21),h=i(78),c=i(24),d=i(51),u=[],p=c("Reflect","construct"),m=/^\s*(?:class|function)\b/,g=o(m.exec),f=!m.exec(n);s.sham=!0,e.exports=!p||a(function(){var e;return r(r.call)||!r(Object)||!r(function(){e=!0})||e})?s:r},(e,t,i)=>{function v(e,t){this.stopped=e,this.result=t}var y=i(99),b=i(8),w=i(47),x=i(32),S=i(155),A=i(64),k=i(25),_=i(157),C=i(158),T=i(140),E=TypeError,M=v.prototype;e.exports=function(e,t,i){function n(e){return s&&T(s,"normal",e),new v(!0,e)}function r(e){return u?(w(e),g?f(e[0],e[1],n):f(e[0],e[1])):g?f(e,n):f(e)}var s,o,a,l,h,c,d=i&&i.that,u=!(!i||!i.AS_ENTRIES),p=!(!i||!i.IS_RECORD),m=!(!i||!i.IS_ITERATOR),g=!(!i||!i.INTERRUPTED),f=y(t,d);if(p)s=e.iterator;else if(m)s=e;else{if(!(i=C(e)))throw E(x(e)+" is not iterable");if(S(i)){for(o=0,a=A(e);o{var n=i(34),r=i(156),s=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[s]===e)}},e=>{e.exports={}},(e,t,i)=>{var n=i(8),r=i(31),s=i(47),o=i(32),a=i(158),l=TypeError;e.exports=function(e,t){t=arguments.length<2?a(e):t;if(r(t))return s(n(t,e));throw l(o(e)+" is not iterable")}},(e,t,i)=>{var n=i(78),r=i(30),s=i(17),o=i(156),a=i(34)("iterator");e.exports=function(e){if(!s(e))return r(e,a)||r(e,"@@iterator")||o[n(e)]}},(e,t,i)=>{var n=i(18),r=i(45),s=i(11);e.exports=function(e,t,i){t=n(t);t in e?r.f(e,t,s(0,i)):e[t]=i}},(e,t,i)=>{var n=i(8),r=i(39),s=i(25),o=i(161),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||r(e,"flags")||!s(a,e)?t:n(o,e)}},(e,t,i)=>{var n=i(47);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},(e,t,i)=>{var i=i(14),n=Map.prototype;e.exports={Map:Map,set:i(n.set),get:i(n.get),has:i(n.has),remove:i(n.delete),proto:n}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SerializableEmpty=t.PrintAnnotationStorage=t.AnnotationStorage=void 0,i(89),i(149),i(152);var n=i(1),s=i(164),o=i(170);const a=Object.freeze({map:null,hash:"",transfers:void 0});t.SerializableEmpty=a;class r{#v=!1;#y=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(e,t){e=this.#y.get(e);return void 0===e?t:Object.assign(t,e)}getRawValue(e){return this.#y.get(e)}remove(e){if(this.#y.delete(e),0===this.#y.size&&this.resetModified(),"function"==typeof this.onAnnotationEditor){for(const e of this.#y.values())if(e instanceof s.AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(e,t){var i=this.#y.get(e);let n=!1;if(void 0!==i)for(const[e,s]of Object.entries(t))i[e]!==s&&(n=!0,i[e]=s);else n=!0,this.#y.set(e,t);n&&this.#_(),t instanceof s.AnnotationEditor&&"function"==typeof this.onAnnotationEditor&&this.onAnnotationEditor(t.constructor._type)}has(e){return this.#y.has(e)}getAll(){return 0{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditor=void 0,i(89),i(2);var n=i(165),f=i(1),r=i(168);class T{#S="";#E=!1;#x=null;#w=null;#C=null;#T=!1;#P=null;#k=this.focusin.bind(this);#M=this.focusout.bind(this);#F=!1;#R=!1;#D=!1;_initialOptions=Object.create(null);_uiManager=null;_focusEventsAllowed=!0;_l10nPromise=null;#I=!1;#O=T._zIndex++;static _borderLineWidth=-1;static _colorManager=new n.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(e){this.constructor===T&&(0,f.unreachable)("Cannot initialize AnnotationEditor."),this.parent=e.parent,this.id=e.id,this.width=this.height=null,this.pageIndex=e.parent.pageIndex,this.name=e.name,this.div=null,this._uiManager=e.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=e.isCentered,this._structTreeParentId=null;var{rotation:t,rawDims:{pageWidth:i,pageHeight:n,pageX:r,pageY:s}}=this.parent.viewport,[t,i]=(this.rotation=t,this.pageRotation=(360+t-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[i,n],this.pageTranslation=[r,s],this.parentDimensions);this.x=e.x/t,this.y=e.y/i,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}static get _defaultLineColor(){return(0,f.shadow)(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(e){var t=new s({id:e.parent.getNextId(),parent:e.parent,uiManager:e._uiManager});t.annotationElementId=e.annotationElementId,t.deleted=!0,t._uiManager.addToAnnotationStorage(t)}static initialize(t){var e=1[e,t.get(e)])),e?.strings)for(const i of e.strings)T._l10nPromise.set(i,t.get(i));if(-1===T._borderLineWidth){const i=getComputedStyle(document.documentElement);T._borderLineWidth=parseFloat(i.getPropertyValue("--outline-width"))||0}}static updateDefaultParams(e,t){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(e){return!1}static paste(e,t){(0,f.unreachable)("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#I}set _isDraggable(e){this.#I=e,this.div?.classList.toggle("draggable",e)}center(){var[e,t]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*t/(2*e),this.y+=this.width*e/(2*t);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*t/(2*e),this.y-=this.width*e/(2*t);break;default:this.x-=this.width/2,this.y-=this.height/2}this.fixAndSetPosition()}addCommands(e){this._uiManager.addCommands(e)}get currentLayer(){return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#O}setParent(e){null!==e&&(this.pageIndex=e.pageIndex,this.pageDimensions=e.pageDimensions),this.parent=e}focusin(e){this._focusEventsAllowed&&(this.#F?this.#F=!1:this.parent.setSelected(this))}focusout(e){this._focusEventsAllowed&&this.isAttachedToDOM&&!e.relatedTarget?.closest("#"+this.id)&&(e.preventDefault(),!this.parent?.isMultipleSelection)&&this.commitOrRemove()}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(e,t,i,n){var[r,s]=this.parentDimensions;[i,n]=this.screenToPageTranslation(i,n),this.x=(e+i)/r,this.y=(t+n)/s,this.fixAndSetPosition()}#L(e,t,i){var[e,n]=e;[t,i]=this.screenToPageTranslation(t,i),this.x+=t/e,this.y+=i/n,this.fixAndSetPosition()}translate(e,t){this.#L(this.parentDimensions,e,t)}translateInPage(e,t){this.#L(this.pageDimensions,e,t),this.div.scrollIntoView({block:"nearest"})}drag(e,t){var[i,n]=this.parentDimensions;if(this.x+=e/i,this.y+=t/n,this.parent&&(this.x<0||1{this._isDraggable=a,window.removeEventListener("pointerup",g),window.removeEventListener("blur",g),window.removeEventListener("pointermove",o,l),this.parent.div.style.cursor=p,this.div.style.cursor=m;const i=this.x,n=this.y,r=this.width,s=this.height;i===h&&n===c&&r===d&&s===u||this.addCommands({cmd:()=>{this.width=r,this.height=s,this.x=i,this.y=n;var[e,t]=this.parentDimensions;this.setDims(e*r,t*s),this.fixAndSetPosition()},undo:()=>{this.width=d,this.height=u,this.x=h,this.y=c;var[e,t]=this.parentDimensions;this.setDims(e*d,t*u),this.fixAndSetPosition()},mustExec:!0})});window.addEventListener("pointerup",g),window.addEventListener("blur",g)}}#W(e,t){const[i,n]=this.parentDimensions,r=this.x,s=this.y,o=this.width,a=this.height,l=T.MIN_SIZE/i,h=T.MIN_SIZE/n,c=e=>Math.round(1e4*e)/1e4,d=this.#j(this.rotation),u=(e,t)=>[d[0]*e+d[2]*t,d[1]*e+d[3]*t],p=this.#j(360-this.rotation);let m,g,f=!1,v=!1;switch(e){case"topLeft":f=!0,m=(e,t)=>[0,0],g=(e,t)=>[e,t];break;case"topMiddle":m=(e,t)=>[e/2,0],g=(e,t)=>[e/2,t];break;case"topRight":f=!0,m=(e,t)=>[e,0],g=(e,t)=>[0,t];break;case"middleRight":v=!0,m=(e,t)=>[e,t/2],g=(e,t)=>[0,t/2];break;case"bottomRight":f=!0,m=(e,t)=>[e,t],g=(e,t)=>[0,0];break;case"bottomMiddle":m=(e,t)=>[e/2,t],g=(e,t)=>[e/2,0];break;case"bottomLeft":f=!0,m=(e,t)=>[0,t],g=(e,t)=>[e,0];break;case"middleLeft":v=!0,m=(e,t)=>[0,t/2],g=(e,t)=>[e,t/2]}var y=m(o,a),b=g(o,a),e=u(...b),w=c(r+e[0]),x=c(s+e[1]);let S=1,A=1,[k,_]=this.screenToPageTranslation(t.movementX,t.movementY);if([k,_]=[p[0]*(t=k/i)+p[2]*(C=_/n),p[1]*t+p[3]*C],f){const e=Math.hypot(o,a);S=A=Math.max(Math.min(Math.hypot(b[0]-y[0]-k,b[1]-y[1]-_)/e,1/o,1/a),l/o,h/a)}else v?S=Math.max(l,Math.min(1,Math.abs(b[0]-y[0]-k)))/o:A=Math.max(h,Math.min(1,Math.abs(b[1]-y[1]-_)))/a;var t=c(o*S),C=c(a*A),b=w-(e=u(...g(t,C)))[0],y=x-e[1];this.width=t,this.height=C,this.x=b,this.y=y,this.setDims(i*t,n*C),this.fixAndSetPosition()}async addAltTextButton(){if(!this.#x){const t=this.#x=document.createElement("button"),e=(t.className="altText",await T._l10nPromise.get("editor_alt_text_button_label"));if(t.textContent=e,t.setAttribute("aria-label",e),t.tabIndex="0",t.addEventListener("contextmenu",r.noContextMenu),t.addEventListener("pointerdown",e=>e.stopPropagation()),t.addEventListener("click",e=>{e.preventDefault(),this._uiManager.editAltText(this)},{capture:!0}),t.addEventListener("keydown",e=>{e.target===t&&"Enter"===e.key&&(e.preventDefault(),this._uiManager.editAltText(this))}),this.#H(),this.div.append(t),!T.SMALL_EDITOR_SIZE){const e=40;T.SMALL_EDITOR_SIZE=Math.min(128,Math.round(1.4*t.getBoundingClientRect().width))}}}async#H(){const t=this.#x;if(t)if(this.#S||this.#E){T._l10nPromise.get("editor_alt_text_edit_button_label").then(e=>{t.setAttribute("aria-label",e)});let e=this.#w;if(!e){this.#w=e=document.createElement("span"),e.className="tooltip",e.setAttribute("role","tooltip");var i=e.id="alt-text-tooltip-"+this.id;t.setAttribute("aria-describedby",i);t.addEventListener("mouseenter",()=>{this.#C=setTimeout(()=>{this.#C=null,this.#w.classList.add("show"),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"alt_text_tooltip"}}})},100)}),t.addEventListener("mouseleave",()=>{clearTimeout(this.#C),this.#C=null,this.#w?.classList.remove("show")})}t.classList.add("done"),e.innerText=this.#E?await T._l10nPromise.get("editor_alt_text_decorative_tooltip"):this.#S,e.parentNode||t.append(e)}else t.classList.remove("done"),this.#w?.remove()}getClientDimensions(){return this.div.getBoundingClientRect()}get altTextData(){return{altText:this.#S,decorative:this.#E}}set altTextData(e){var{altText:e,decorative:t}=e;this.#S===e&&this.#E===t||(this.#S=e,this.#E=t,this.#H())}render(){this.div=document.createElement("div"),this.div.setAttribute("data-editor-rotation",(360-this.rotation)%360),this.div.className=this.name,this.div.setAttribute("id",this.id),this.div.setAttribute("tabIndex",0),this.setInForeground(),this.div.addEventListener("focusin",this.#k),this.div.addEventListener("focusout",this.#M);var[e,t]=this.parentDimensions,[e,t]=(this.parentRotation%180!=0&&(this.div.style.maxWidth=(100*t/e).toFixed(2)+"%",this.div.style.maxHeight=(100*e/t).toFixed(2)+"%"),this.getInitialTranslation());return this.translate(e,t),(0,n.bindEvents)(this,this.div,["pointerdown"]),this.div}pointerdown(e){var t=f.FeatureTest.platform["isMac"];0!==e.button||e.ctrlKey&&t?e.preventDefault():(this.#F=!0,this.#q(e))}#q(i){if(this._isDraggable){const n=this._uiManager.isSelected(this);this._uiManager.setUpDragSession();let e,t;n&&(e={passive:!0,capture:!0},t=e=>{var[e,t]=this.screenToPageTranslation(e.movementX,e.movementY);this._uiManager.dragSelectedEditors(e,t)},window.addEventListener("pointermove",t,e));const r=()=>{if(window.removeEventListener("pointerup",r),window.removeEventListener("blur",r),n&&window.removeEventListener("pointermove",t,e),this.#F=!1,!this._uiManager.endDragSession()){const n=f.FeatureTest.platform["isMac"];i.ctrlKey&&!n||i.shiftKey||i.metaKey&&n?this.parent.toggleSelected(this):this.parent.setSelected(this)}};window.addEventListener("pointerup",r),window.addEventListener("blur",r)}}moveInDOM(){this.parent?.moveEditorInDOM(this)}_setParentAndPosition(e,t,i){e.changeParent(this),this.x=t,this.y=i,this.fixAndSetPosition()}getRect(e,t){var i=this.parentScale,[n,r]=this.pageDimensions,[s,o]=this.pageTranslation,a=e/i,l=t/i,h=this.x*n,c=this.y*r,d=this.width*n,u=this.height*r;switch(this.rotation){case 0:return[h+a+s,r-c-l-u+o,h+a+d+s,r-c-l+o];case 90:return[h+l+s,r-c+a+o,h+l+u+s,r-c+a+d+o];case 180:return[h-a-d+s,r-c+l+o,h-a+s,r-c+l+u+o];case 270:return[h-l-u+s,r-c-a-d+o,h-l+s,r-c-a+o];default:throw new Error("Invalid rotation")}}getRectInCurrentCoords(e,t){var[i,n,r,s]=e,o=r-i,a=s-n;switch(this.rotation){case 0:return[i,t-s,o,a];case 90:return[i,t-n,a,o];case 180:return[r,t-n,o,a];case 270:return[r,t-s,a,o];default:throw new Error("Invalid rotation")}}onceAdded(){}isEmpty(){return!1}enableEditMode(){this.#D=!0}disableEditMode(){this.#D=!1}isInEditMode(){return this.#D}shouldGetKeyboardEvents(){return!1}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}rebuild(){this.div?.addEventListener("focusin",this.#k),this.div?.addEventListener("focusout",this.#M)}serialize(){(0,f.unreachable)("An editor must be serializable")}static deserialize(e,t,i){var t=new this.prototype.constructor({parent:t,id:t.getNextId(),uiManager:i}),[i,n]=(t.rotation=e.rotation,t.pageDimensions),[e,r,s,o]=t.getRectInCurrentCoords(e.rect,n);return t.x=e/i,t.y=r/n,t.width=s/i,t.height=o/n,t}remove(){this.div.removeEventListener("focusin",this.#k),this.div.removeEventListener("focusout",this.#M),this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#x?.remove(),this.#x=null,this.#w=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#U(),this.#P.classList.remove("hidden"))}select(){this.makeResizable(),this.div?.classList.add("selectedEditor")}unselect(){this.#P?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus()}updateParams(e,t){}disableEditing(){this.#x&&(this.#x.hidden=!0)}enableEditing(){this.#x&&(this.#x.hidden=!1)}enterInEditMode(){}get contentDiv(){return this.div}get isEditing(){return this.#R}set isEditing(e){this.#R=e,this.parent&&(e?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(e,t){this.#T=!0;var i=this.div["style"];i.aspectRatio=e/t,i.height="auto"}static get MIN_SIZE(){return 16}}class s extends(t.AnnotationEditor=T){constructor(e){super(e),this.annotationElementId=e.annotationElementId,this.deleted=!0}serialize(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KeyboardManager=t.CommandManager=t.ColorManager=t.AnnotationEditorUIManager=void 0,t.bindEvents=function(e,t,i){for(const n of i)t.addEventListener(n,e[n].bind(e))},t.opacityToHex=function(e){return Math.round(Math.min(255,Math.max(1,255*e))).toString(16).padStart(2,"0")},i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2),i(89),i(125),i(136),i(138),i(141),i(143),i(145),i(147),i(166);var s=i(1),o=i(168);class n{#G=0;getId(){return""+s.AnnotationEditorPrefix+this.#G++}}class a{#V=(0,s.getUuid)();#G=0;#$=null;static get _isSVGFittingCanvas(){const e=new OffscreenCanvas(1,3).getContext("2d"),t=new Image;t.src='data:image/svg+xml;charset=UTF-8,';var i=t.decode().then(()=>(e.drawImage(t,0,0,1,1,0,0,1,3),0===new Uint32Array(e.getImageData(0,0,1,1).data.buffer)[0]));return(0,s.shadow)(this,"_isSVGFittingCanvas",i)}async#X(e,i){this.#$||=new Map;let n=this.#$.get(e);if(null===n)return null;if(n?.bitmap)n.refCounter+=1;else{try{n||={bitmap:null,id:`image_${this.#V}_`+this.#G++,refCounter:0,isSvg:!1};let e;if("string"==typeof i){n.url=i;var t=await fetch(i);if(!t.ok)throw new Error(t.statusText);e=await t.blob()}else e=n.file=i;if("image/svg+xml"===e.type){const i=a._isSVGFittingCanvas,r=new FileReader,s=new Image,o=new Promise((e,t)=>{s.onload=()=>{n.bitmap=s,n.isSvg=!0,e()},r.onload=async()=>{var e=n.svgUrl=r.result;s.src=await i?e+"#svgView(preserveAspectRatio(none))":e},s.onerror=r.onerror=t});r.readAsDataURL(e),await o}else n.bitmap=await createImageBitmap(e);n.refCounter=1}catch(e){console.error(e),n=null}this.#$.set(e,n),n&&this.#$.set(n.id,n)}return n}async getFromFile(e){var{lastModified:t,name:i,size:n,type:r}=e;return this.#X(t+`_${i}_${n}_`+r,e)}async getFromUrl(e){return this.#X(e,e)}async getFromId(e){this.#$||=new Map;e=this.#$.get(e);return e?e.bitmap?(e.refCounter+=1,e):e.file?this.getFromFile(e.file):this.getFromUrl(e.url):null}getSvgUrl(e){e=this.#$.get(e);return e?.isSvg?e.svgUrl:null}deleteId(e){this.#$||=new Map;e=this.#$.get(e);e&&(--e.refCounter,0===e.refCounter)&&(e.bitmap=null)}isValidId(e){return e.startsWith(`image_${this.#V}_`)}}class r{#K=[];#Y=!1;#J;#Q=-1;constructor(){this.#J=0e===i[t]))return h._colorsMapping.get(e);return i}getHexCode(e){var t=this._colors.get(e);return t?s.Util.makeHexColor(...t):e}}t.ColorManager=h;class c{#tt=null;#et=new Map;#nt=new Map;#it=null;#rt=null;#st=new r;#at=0;#ot=new Set;#lt=null;#ct=null;#ht=new Set;#dt=null;#ut=new n;#pt=!1;#ft=!1;#gt=null;#mt=s.AnnotationEditorType.NONE;#bt=new Set;#vt=null;#yt=this.blur.bind(this);#_t=this.focus.bind(this);#At=this.copy.bind(this);#St=this.cut.bind(this);#Et=this.paste.bind(this);#xt=this.keydown.bind(this);#wt=this.onEditingAction.bind(this);#Ct=this.onPageChanging.bind(this);#Tt=this.onScaleChanging.bind(this);#Pt=this.onRotationChanging.bind(this);#kt={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1};#Mt=[0,0];#Ft=null;#Rt=null;#Dt=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){var e=c.prototype,t=e=>{var t=document["activeElement"];return t&&e.#Rt.contains(t)&&e.hasSomethingToControl()},i=this.TRANSLATE_SMALL,n=this.TRANSLATE_BIG;return(0,s.shadow)(this,"_keyboardManager",new l([[["ctrl+a","mac+meta+a"],e.selectAll],[["ctrl+z","mac+meta+z"],e.undo],[["ctrl+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],e.redo],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],e.delete],[["Escape","mac+Escape"],e.unselectAll],[["ArrowLeft","mac+ArrowLeft"],e.translateSelectedEditors,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e.translateSelectedEditors,{args:[-n,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e.translateSelectedEditors,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e.translateSelectedEditors,{args:[n,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e.translateSelectedEditors,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e.translateSelectedEditors,{args:[0,-n],checker:t}],[["ArrowDown","mac+ArrowDown"],e.translateSelectedEditors,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e.translateSelectedEditors,{args:[0,n],checker:t}]]))}constructor(e,t,i,n,r,s){this.#Rt=e,this.#Dt=t,this.#it=i,this._eventBus=n,this._eventBus._on("editingaction",this.#wt),this._eventBus._on("pagechanging",this.#Ct),this._eventBus._on("scalechanging",this.#Tt),this._eventBus._on("rotationchanging",this.#Pt),this.#rt=r.annotationStorage,this.#dt=r.filterFactory,this.#vt=s,this.viewParameters={realScale:o.PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0}}destroy(){this.#It(),this.#Ot(),this._eventBus._off("editingaction",this.#wt),this._eventBus._off("pagechanging",this.#Ct),this._eventBus._off("scalechanging",this.#Tt),this._eventBus._off("rotationchanging",this.#Pt);for(const e of this.#nt.values())e.destroy();this.#nt.clear(),this.#et.clear(),this.#ht.clear(),this.#tt=null,this.#bt.clear(),this.#st.destroy(),this.#it.destroy()}get hcmFilter(){return(0,s.shadow)(this,"hcmFilter",this.#vt?this.#dt.addHCMFilter(this.#vt.foreground,this.#vt.background):"none")}get direction(){return(0,s.shadow)(this,"direction",getComputedStyle(this.#Rt).direction)}editAltText(e){this.#it?.editAltText(this,e)}onPageChanging(e){e=e.pageNumber;this.#at=e-1}focusMainContainer(){this.#Rt.focus()}findParent(e,t){for(const o of this.#nt.values()){var{x:i,y:n,width:r,height:s}=o.div.getBoundingClientRect();if(i<=e&&e<=i+r&&n<=t&&t<=n+s)return o}return null}disableUserSelect(){this.#Dt.classList.toggle("noUserSelect",0{e._focusEventsAllowed=!0},{once:!0}),t.focus()}}#Nt(){window.addEventListener("keydown",this.#xt,{capture:!0})}#It(){window.removeEventListener("keydown",this.#xt,{capture:!0})}#Bt(){document.addEventListener("copy",this.#At),document.addEventListener("cut",this.#St),document.addEventListener("paste",this.#Et)}#jt(){document.removeEventListener("copy",this.#At),document.removeEventListener("cut",this.#St),document.removeEventListener("paste",this.#Et)}addEditListeners(){this.#Nt(),this.#Bt()}removeEditListeners(){this.#It(),this.#jt()}copy(e){if(e.preventDefault(),this.#tt?.commitOrRemove(),this.hasSelection){var t=[];for(const e of this.#bt){var i=e.serialize(!0);i&&t.push(i)}0!==t.length&&e.clipboardData.setData("application/pdfjs",JSON.stringify(t))}}cut(e){this.copy(e),this.delete()}paste(t){t.preventDefault();const e=t["clipboardData"];for(const t of e.items)for(const e of this.#ct)if(e.isHandlingMimeForPasting(t.type))return void e.paste(t,this.currentLayer);let i=e.getData("application/pdfjs");if(i){try{i=JSON.parse(i)}catch(t){return void(0,s.warn)(`paste: "${t.message}".`)}if(Array.isArray(i)){this.unselectAll();var n=this.currentLayer;try{const t=[];for(const e of i){const i=n.deserialize(e);if(!i)return;t.push(i)}this.addCommands({cmd:()=>{for(const e of t)this.#Ut(e);this.#zt(t)},undo:()=>{for(const e of t)e.remove()},mustExec:!0})}catch(t){(0,s.warn)(`paste: "${t.message}".`)}}}}keydown(e){this.getActive()?.shouldGetKeyboardEvents()||c._keyboardManager.exec(this,e)}onEditingAction(e){["undo","redo","delete","selectAll"].includes(e.name)&&this[e.name]()}#Wt(e){Object.entries(e).some(e=>{var[e,t]=e;return this.#kt[e]!==t})&&this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#kt,e)})}#Ht(e){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details:e})}setEditingState(e){e?(this.#Lt(),this.#Nt(),this.#Bt(),this.#Wt({isEditing:this.#mt!==s.AnnotationEditorType.NONE,isEmpty:this.#qt(),hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:this.#st.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#Ot(),this.#It(),this.#jt(),this.#Wt({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(e){if(!this.#ct){this.#ct=e;for(const e of this.#ct)this.#Ht(e.defaultPropertiesToUpdate)}}getId(){return this.#ut.getId()}get currentLayer(){return this.#nt.get(this.#at)}getLayer(e){return this.#nt.get(e)}get currentPageIndex(){return this.#at}addLayer(e){this.#nt.set(e.pageIndex,e),this.#pt?e.enable():e.disable()}removeLayer(e){this.#nt.delete(e.pageIndex)}updateMode(e){let t=1{for(const e of t)e.remove()},undo:()=>{for(const e of t)this.#Ut(e)},mustExec:!0})}}commitOrRemove(){this.#tt?.commitOrRemove()}hasSomethingToControl(){return this.#tt||this.hasSelection}#zt(e){this.#bt.clear();for(const t of e)t.isEmpty()||(this.#bt.add(t),t.select());this.#Wt({hasSelectedEditor:!0})}selectAll(){for(const e of this.#bt)e.commit();this.#zt(this.#et.values())}unselectAll(){if(this.#tt)this.#tt.commitOrRemove();else if(this.hasSelection){for(const e of this.#bt)e.unselect();this.#bt.clear(),this.#Wt({hasSelectedEditor:!1})}}translateSelectedEditors(e,t){if(2{this.#Ft=null,this.#Mt[0]=this.#Mt[1]=0,this.addCommands({cmd:()=>{for(const e of r)this.#et.has(e.id)&&e.translateInPage(i,n)},undo:()=>{for(const e of r)this.#et.has(e.id)&&e.translateInPage(-i,-n)},mustExec:!1})},1e3);for(const i of r)i.translateInPage(e,t)}}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#lt=new Map;for(const e of this.#bt)this.#lt.set(e,{savedX:e.x,savedY:e.y,savedPageIndex:e.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#lt)return!1;this.disableUserSelect(!1);const r=this.#lt;this.#lt=null;let e=!1;for(var[{x:t,y:i,pageIndex:n},s]of r)s.newX=t,s.newY=i,s.newPageIndex=n,e||=t!==s.savedX||i!==s.savedY||n!==s.savedPageIndex;if(!e)return!1;const o=(e,t,i,n)=>{var r;this.#et.has(e.id)&&((r=this.#nt.get(n))?e._setParentAndPosition(r,t,i):(e.pageIndex=n,e.x=t,e.y=i))};return this.addCommands({cmd:()=>{for(var[e,{newX:t,newY:i,newPageIndex:n}]of r)o(e,t,i,n)},undo:()=>{for(var[e,{savedX:t,savedY:i,savedPageIndex:n}]of r)o(e,t,i,n)},mustExec:!0}),!0}dragSelectedEditors(e,t){if(this.#lt)for(const i of this.#lt.keys())i.drag(e,t)}rebuild(e){var t;null===e.parent?(t=this.getLayer(e.pageIndex))?(t.changeParent(e),t.addOrRebuild(e)):(this.addEditor(e),this.addToAnnotationStorage(e),e.rebuild()):e.parent.addOrRebuild(e)}isActive(e){return this.#tt===e}getActive(){return this.#tt}getMode(){return this.#mt}get imageManager(){return(0,s.shadow)(this,"imageManager",new a)}}t.AnnotationEditorUIManager=c},(e,D,t)=>{function m(e,t,i,n){var r,s,o,a,l,h=e[t],c=n&&h===n.value,d=c&&"string"==typeof n.source?{source:n.source}:{};if(v(h)){var u=y(h),p=c?n.nodes:u?[]:{};if(u)for(r=p.length,o=w(h),a=0;a{var n=i(14),o=i(39),a=SyntaxError,l=parseInt,h=String.fromCharCode,c=n("".charAt),d=n("".slice),u=n(/./.exec),p={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},m=/^[\da-f]{4}$/i,g=/^[\u0000-\u001F]$/;e.exports=function(e,t){for(var i=!0,n="";t{Object.defineProperty(t,"__esModule",{value:!0}),t.StatTimer=t.RenderingCancelledException=t.PixelsPerInch=t.PageViewport=t.PDFDateString=t.DOMStandardFontDataFactory=t.DOMSVGFactory=t.DOMFilterFactory=t.DOMCanvasFactory=t.DOMCMapReaderFactory=void 0,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getColorValues=function(e){var t=document.createElement("span");t.style.visibility="hidden",document.body.append(t);for(const n of e.keys()){t.style.color=n;var i=window.getComputedStyle(t).color;e.set(n,y(i))}t.remove()},t.getCurrentTransform=function(e){var{a:e,b:t,c:i,d:n,e:r,f:s}=e.getTransform();return[e,t,i,n,r,s]},t.getCurrentTransformInverse=function(e){var{a:e,b:t,c:i,d:n,e:r,f:s}=e.getTransform().invertSelf();return[e,t,i,n,r,s]},t.getFilenameFromUrl=function(e){return 1{const i=document.createElement("script");i.src=n,i.onload=function(e){r&&i.remove(),t(e)},i.onerror=function(){e(new Error("Cannot load script at: "+i.src))},(document.head||document.documentElement).append(i)})},t.noContextMenu=function(e){e.preventDefault()},t.setLayerDimensions=function(e,t){let i=2{var i=s[e]/255,n=o[e]/255,r=new Array(t+1);for(let e=0;e<=t;e++)r[e]=i+e/t*(n-i);return r.join(",")});this.#re(i(0,5),i(1,5),i(2,5),t),this.#Qt=`url(#${e})`}}return this.#Qt}addHighlightHCMFilter(i,n,r,s){var o=i+`-${n}-${r}-`+s;if(this.#te!==o&&(this.#te=o,this.#ee="none",this.#Zt?.remove(),i)&&n){var[o,i]=[i,n].map(this.#se.bind(this));let l=Math.round(.2126*o[0]+.7152*o[1]+.0722*o[2]),h=Math.round(.2126*i[0]+.7152*i[1]+.0722*i[2]),[e,t]=[r,s].map(this.#se.bind(this));h{var n=new Array(256),r=(h-l)/i,s=e/255,o=(t-e)/(255*i);let a=0;for(let e=0;e<=i;e++){const t=Math.round(l+e*r),i=s+e*o;for(let e=a;e<=t;e++)n[e]=i;a=t+1}for(let e=a;e<256;e++)n[e]=n[a-1];return n.join(",")},o=`g_${this.#e}_hcm_highlight_filter`,i=this.#Zt=this.#ie(o);this.#ae(i),this.#re(n(e[0],t[0],5),n(e[1],t[1],5),n(e[2],t[2],5),i),this.#ee=`url(#${o})`}return this.#ee}destroy(){0{const i=new XMLHttpRequest;i.open("GET",n,!0),r&&(i.responseType="arraybuffer"),i.onreadystatechange=()=>{if(i.readyState===XMLHttpRequest.DONE){if(200===i.status||0===i.status){let e;if(r&&i.response?e=new Uint8Array(i.response):!r&&i.responseText&&(e=(0,d.stringToBytes)(i.responseText)),e)return void t(e)}e(new Error(i.statusText))}},i.send(null)})}t.DOMCanvasFactory=a;class h extends n.BaseCMapReaderFactory{_fetchData(e,t){return l(e,this.isCompressed).then(e=>({cMapData:e,compressionType:t}))}}t.DOMCMapReaderFactory=h;class c extends n.BaseStandardFontDataFactory{_fetchData(e){return l(e,!0)}}t.DOMStandardFontDataFactory=c;class u extends n.BaseSVGFactory{_createSVG(e){return document.createElementNS(s,e)}}t.DOMSVGFactory=u;class p{constructor(e){let{viewBox:t,scale:i,rotation:n,offsetX:r=0,offsetY:s=0,dontFlip:o=!1}=e;this.viewBox=t,this.scale=i,this.rotation=n,this.offsetX=r,this.offsetY=s;var e=(t[2]+t[0])/2,a=(t[3]+t[1])/2;let l,h,c,d,u,p,m,g;switch((n%=360)<0&&(n+=360),n){case 180:l=-1,h=0,c=0,d=1;break;case 90:l=0,h=1,c=1,d=0;break;case 270:l=0,h=-1,c=-1,d=0;break;case 0:l=1,h=0,c=0,d=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}o&&(c=-c,d=-d),g=0===l?(u=Math.abs(a-t[1])*i+r,p=Math.abs(e-t[0])*i+s,m=(t[3]-t[1])*i,(t[2]-t[0])*i):(u=Math.abs(e-t[0])*i+r,p=Math.abs(a-t[1])*i+s,m=(t[2]-t[0])*i,(t[3]-t[1])*i),this.transform=[l*i,h*i,c*i,d*i,u-l*i*e-c*i*a,p-h*i*e-d*i*a],this.width=m,this.height=g}get rawDims(){var e=this["viewBox"];return(0,d.shadow)(this,"rawDims",{pageWidth:e[2]-e[0],pageHeight:e[3]-e[1],pageX:e[0],pageY:e[1]})}clone(){var{scale:e=this.scale,rotation:t=this.rotation,offsetX:i=this.offsetX,offsetY:n=this.offsetY,dontFlip:r=!1}=0>16,(65280&t)>>8,255&t]:e.startsWith("rgb(")?e.slice(4,-1).split(",").map(e=>parseInt(e)):e.startsWith("rgba(")?e.slice(5,-1).split(",").map(e=>parseInt(e)).slice(0,3):((0,d.warn)(`Not a valid color format: "${e}"`),[0,0,0])}t.PDFDateString=class{static toDateObject(e){if(!e||"string"!=typeof e)return null;e=(v||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?")).exec(e);if(!e)return null;var t=parseInt(e[1],10),i=1<=(i=parseInt(e[2],10))&&i<=12?i-1:0,n=1<=(n=parseInt(e[3],10))&&n<=31?n:1;let r=parseInt(e[4],10),s=(r=0<=r&&r<=23?r:0,parseInt(e[5],10));s=0<=s&&s<=59?s:0;var o=0<=(o=parseInt(e[6],10))&&o<=59?o:0,a=e[7]||"Z",l=0<=(l=parseInt(e[8],10))&&l<=23?l:0,e=0<=(e=parseInt(e[9],10)||0)&&e<=59?e:0;return"-"===a?(r+=l,s+=e):"+"===a&&(r-=l,s-=e),new Date(Date.UTC(t,i,n,r,s,o))}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStandardFontDataFactory=t.BaseSVGFactory=t.BaseFilterFactory=t.BaseCanvasFactory=t.BaseCMapReaderFactory=void 0,i(2);var n=i(1);t.BaseFilterFactory=class r{constructor(){this.constructor===r&&(0,n.unreachable)("Cannot initialize BaseFilterFactory.")}addFilter(e){return"none"}addHCMFilter(e,t){return"none"}addHighlightHCMFilter(e,t,i,n){return"none"}destroy(){}};t.BaseCanvasFactory=class s{constructor(){this.constructor===s&&(0,n.unreachable)("Cannot initialize BaseCanvasFactory.")}create(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");return{canvas:e=this._createCanvas(e,t),context:e.getContext("2d")}}reset(e,t,i){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||i<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=i}destroy(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}_createCanvas(e,t){(0,n.unreachable)("Abstract method `_createCanvas` called.")}};t.BaseCMapReaderFactory=class o{constructor(e){var{baseUrl:e=null,isCompressed:t=!0}=e;this.constructor===o&&(0,n.unreachable)("Cannot initialize BaseCMapReaderFactory."),this.baseUrl=e,this.isCompressed=t}async fetch(e){if(e=e.name,!this.baseUrl)throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');if(!e)throw new Error("CMap name must be specified.");const t=this.baseUrl+e+(this.isCompressed?".bcmap":""),i=this.isCompressed?n.CMapCompressionType.BINARY:n.CMapCompressionType.NONE;return this._fetchData(t,i).catch(e=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: `+t)})}_fetchData(e,t){(0,n.unreachable)("Abstract method `_fetchData` called.")}};t.BaseStandardFontDataFactory=class a{constructor(e){var{baseUrl:e=null}=e;this.constructor===a&&(0,n.unreachable)("Cannot initialize BaseStandardFontDataFactory."),this.baseUrl=e}async fetch(e){if(e=e.filename,!this.baseUrl)throw new Error('The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.');if(!e)throw new Error("Font filename must be specified.");const t=""+this.baseUrl+e;return this._fetchData(t).catch(e=>{throw new Error("Unable to load font data at: "+t)})}_fetchData(e){(0,n.unreachable)("Abstract method `_fetchData` called.")}};t.BaseSVGFactory=class l{constructor(){this.constructor===l&&(0,n.unreachable)("Cannot initialize BaseSVGFactory.")}create(e,t){var i=2{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash3_64=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2);var u=i(1);const n=3285377520,p=4294901760,m=65535;t.MurmurHash3_64=class{constructor(e){this.h1=e?4294967295&e:n,this.h2=e?4294967295&e:n}update(i){let n,r;if("string"==typeof i){n=new Uint8Array(2*i.length);for(let e=r=0,t=i.length;e>>8,n[r++]=255&s)}}else{if(!(0,u.isArrayBuffer)(i))throw new Error("Wrong data format in MurmurHash3_64_update. Input must be a string or array.");n=i.slice(),r=n.byteLength}const s=r>>2,e=r-4*s,t=new Uint32Array(n.buffer,0,s);let o=0,a,l=this.h1,h=this.h2;var c=3432918353,d=461845907;for(let e=0;e>>17)*d&p|13715*o&m,l=5*(l=(l^=o)<<13|l>>>19)+3864292196):(a=(a=(a=(a=t[e])*c&p|11601*a&m)<<15|a>>>17)*d&p|13715*a&m,h=5*(h=(h^=a)<<13|h>>>19)+3864292196);switch(o=0,e){case 3:o^=n[4*s+2]<<16;case 2:o^=n[4*s+1]<<8;case 1:o=(o=(o=(o^=n[4*s])*c&p|11601*o&m)<<15|o>>>17)*d&p|13715*o&m,1&s?l^=o:h^=o}this.h1=l,this.h2=h}hexdigest(){var e=this.h1,t=this.h2,e=3981806797*(e^=t>>>1)&p|36045*e&m;return e=444984403*(e^=(t=4283543511*t&p|(2950163797*(t<<16|e>>>16)&p)>>>16)>>>1)&p|60499*e&m,((e^=(t=3301882366*t&p|(3120437893*(t<<16|e>>>16)&p)>>>16)>>>1)>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0,i(125),i(136),i(138),i(141),i(143),i(145),i(147),i(89),i(149);var p=i(1);t.FontLoader=class{#le=new Set;constructor(e){var{ownerDocument:e=globalThis.document}=e;this._document=e,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(e){this.nativeFontFaces.add(e),this._document.fonts.add(e)}removeNativeFontFace(e){this.nativeFontFaces.delete(e),this._document.fonts.delete(e)}insertRule(e){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));var t=this.styleElement.sheet;t.insertRule(e,t.cssRules.length)}clear(){for(const e of this.nativeFontFaces)this._document.fonts.delete(e);this.nativeFontFaces.clear(),this.#le.clear(),this.styleElement&&(this.styleElement.remove(),this.styleElement=null)}async loadSystemFont(e){if(e&&!this.#le.has(e.loadedName))if((0,p.assert)(!this.disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){var{loadedName:t,src:i,style:n}=e,i=new FontFace(t,i,n);this.addNativeFontFace(i);try{await i.load(),this.#le.add(t)}catch{(0,p.warn)(`Cannot load system font: ${e.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(i)}}else(0,p.unreachable)("Not implemented: loadSystemFont without the Font Loading API.")}async bind(t){if(!(t.attached||t.missingFile&&!t.systemFontInfo))if(t.attached=!0,t.systemFontInfo)await this.loadSystemFont(t.systemFontInfo);else if(this.isFontLoadingAPISupported){const i=t.createNativeFontFace();if(i){this.addNativeFontFace(i);try{await i.loaded}catch(e){throw(0,p.warn)(`Failed to load font '${i.family}': '${e}'.`),t.disableFontFace=!0,e}}}else{const i=t.createFontFaceRule();i&&(this.insertRule(i),this.isSyncFontLoadingSupported||await new Promise(e=>{e=this._queueLoadingCallback(e);this._prepareFontLoadEvent(t,e)}))}}get isFontLoadingAPISupported(){var e=!!this._document?.fonts;return(0,p.shadow)(this,"isFontLoadingAPISupported",e)}get isSyncFontLoadingSupported(){let e=!1;return(p.isNodeJS||"undefined"!=typeof navigator&&/Mozilla\/5.0.*?rv:\d+.*? Gecko/.test(navigator.userAgent))&&(e=!0),(0,p.shadow)(this,"isSyncFontLoadingSupported",e)}_queueLoadingCallback(e){const t=this["loadingRequests"],i={done:!1,complete:function(){for((0,p.assert)(!i.done,"completeRequest() cannot be called twice."),i.done=!0;0{u.remove(),t.complete()})}},t.FontFaceObject=class{constructor(e,t){var{isEvalSupported:t=!0,disableFontFace:i=!1,ignoreErrors:n=!1,inspectFont:r=null}=t;this.compiledGlyphs=Object.create(null);for(const t in e)this[t]=e[t];this.isEvalSupported=!1!==t,this.disableFontFace=!0===i,this.ignoreErrors=!0===n,this._inspectFont=r}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let e;var t;return e=this.cssFontInfo?(t={weight:this.cssFontInfo.fontWeight},this.cssFontInfo.italicAngle&&(t.style=`oblique ${this.cssFontInfo.italicAngle}deg`),new FontFace(this.cssFontInfo.fontFamily,this.data,t)):new FontFace(this.loadedName,this.data,{}),this._inspectFont?.(this),e}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;var t=(0,p.bytesToString)(this.data),t=`url(data:${this.mimetype};base64,${btoa(t)});`;let i;if(this.cssFontInfo){let e=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(e+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),i=`@font-face {font-family:"${this.cssFontInfo.fontFamily}";${e}src:${t}}`}else i=`@font-face {font-family:"${this.loadedName}";src:${t}}`;return this._inspectFont?.(this,t),i}getPathGenerator(e,t){if(void 0!==this.compiledGlyphs[t])return this.compiledGlyphs[t];let n;try{n=e.get(this.loadedName+"_path_"+t)}catch(e){if(this.ignoreErrors)return(0,p.warn)(`getPathGenerator - ignoring character: "${e}".`),this.compiledGlyphs[t]=function(e,t){};throw e}if(this.isEvalSupported&&p.FeatureTest.isEvalSupported){const e=[];for(const t of n){const n=void 0!==t.args?t.args.join(","):"";e.push("c.",t.cmd,"(",n,");\n")}return this.compiledGlyphs[t]=new Function("c","size",e.join(""))}return this.compiledGlyphs[t]=function(e,t){for(const i of n)"scale"===i.cmd&&(i.args=[t,-t]),e[i.cmd].apply(e,i.args)}}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStandardFontDataFactory=t.NodeFilterFactory=t.NodeCanvasFactory=t.NodeCMapReaderFactory=void 0,i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var n=i(169),i=i(1);if(!globalThis.DOMMatrix&&i.isNodeJS)try{globalThis.DOMMatrix=require("canvas").DOMMatrix}catch(e){(0,i.warn)(`Cannot polyfill \`DOMMatrix\`, rendering may be broken: "${e}".`)}if(!globalThis.Path2D&&i.isNodeJS)try{var r=require("canvas")["CanvasRenderingContext2D"],s=require("path2d-polyfill")["polyfillPath2D"];globalThis.CanvasRenderingContext2D=r,s(globalThis)}catch(e){(0,i.warn)(`Cannot polyfill \`Path2D\`, rendering may be broken: "${e}".`)}function o(e){return new Promise((i,n)=>{require("fs").readFile(e,(e,t)=>{!e&&t?i(new Uint8Array(t)):n(new Error(e))})})}class a extends n.BaseFilterFactory{}t.NodeFilterFactory=a;class l extends n.BaseCanvasFactory{_createCanvas(e,t){return require("canvas").createCanvas(e,t)}}t.NodeCanvasFactory=l;class h extends n.BaseCMapReaderFactory{_fetchData(e,t){return o(e).then(e=>({cMapData:e,compressionType:t}))}}t.NodeCMapReaderFactory=h;class c extends n.BaseStandardFontDataFactory{_fetchData(e){return o(e)}}t.NodeStandardFontDataFactory=c},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0,i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var w=i(1),R=i(168),x=i(174),d=i(175);const u=4096;class h{constructor(e){this.canvasFactory=e,this.cache=Object.create(null)}getCanvas(e,t,i){let n;return void 0!==this.cache[e]?(n=this.cache[e],this.canvasFactory.reset(n,t,i)):(n=this.canvasFactory.create(t,i),this.cache[e]=n),n}delete(e){delete this.cache[e]}clear(){for(const t in this.cache){var e=this.cache[t];this.canvasFactory.destroy(e),delete this.cache[t]}}}function v(e,t,i,n,r,s,o,a,l,h){var[c,d,u,p,m,g]=(0,R.getCurrentTransform)(e);if(0===d&&0===u){const R=o*c+m,f=Math.round(R),v=a*p+g,y=Math.round(v),b=(o+l)*c+m,w=Math.abs(Math.round(b)-f)||1,x=(a+h)*p+g,S=Math.abs(Math.round(x)-y)||1;e.setTransform(Math.sign(c),0,0,Math.sign(p),f,y),e.drawImage(t,i,n,r,s,0,0,w,S),void e.setTransform(c,d,u,p,m,g)}else if(0===c&&0===p){const R=a*u+m,A=Math.round(R),k=o*d+g,_=Math.round(k),C=(a+h)*u+m,T=Math.abs(Math.round(C)-A)||1,E=(o+l)*d+g,M=Math.abs(Math.round(E)-_)||1;e.setTransform(0,Math.sign(d),Math.sign(u),0,A,_),e.drawImage(t,i,n,r,s,0,0,M,T),void e.setTransform(c,d,u,p,m,g)}else e.drawImage(t,i,n,r,s,o,a,l,h),Math.hypot(c,d),Math.hypot(u,p)}class p{constructor(e,t){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=w.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=w.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=w.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.transferMaps="none",this.startNewPathAndClipBox([0,0,e,t])}clone(){var e=Object.create(this);return e.clipBox=this.clipBox.slice(),e}setCurrentPoint(e,t){this.x=e,this.y=t}updatePathMinMax(e,t,i){[t,i]=w.Util.applyTransform([t,i],e),this.minX=Math.min(this.minX,t),this.minY=Math.min(this.minY,i),this.maxX=Math.max(this.maxX,t),this.maxY=Math.max(this.maxY,i)}updateRectMinMax(e,t){var i=w.Util.applyTransform(t,e),t=w.Util.applyTransform(t.slice(2),e);this.minX=Math.min(this.minX,i[0],t[0]),this.minY=Math.min(this.minY,i[1],t[1]),this.maxX=Math.max(this.maxX,i[0],t[0]),this.maxY=Math.max(this.maxY,i[1],t[1])}updateScalingPathMinMax(e,t){w.Util.scaleMinMax(e,t),this.minX=Math.min(this.minX,t[0]),this.maxX=Math.max(this.maxX,t[1]),this.minY=Math.min(this.minY,t[2]),this.maxY=Math.max(this.maxY,t[3])}updateCurvePathMinMax(e,t,i,n,r,s,o,a,l,h){t=w.Util.bezierBoundingBox(t,i,n,r,s,o,a,l);h?(h[0]=Math.min(h[0],t[0],t[2]),h[1]=Math.max(h[1],t[0],t[2]),h[2]=Math.min(h[2],t[1],t[3]),h[3]=Math.max(h[3],t[1],t[3])):this.updateRectMinMax(e,t)}getPathBoundingBox(){let e=0>2),e=c.length,f=d+7>>3,v=4294967295,y=w.FeatureTest.isLittleEndian?4278190080:255;for(t=0;tf?d:8*o-7,p=-8&u;let t=0,i=0;for(;e>=1}for(;n=p&&(s=u,e=d*s),n=0,i=e;i--;)h[n++]=l[r++],h[n++]=l[r++],h[n++]=l[r++],h[n++]=255;o.putImageData(g,0,16*t)}}}}function y(i,e){if(e.bitmap)i.drawImage(e.bitmap,0,0);else{const s=e.height,o=e.width,a=s%16,l=(s-a)/16,h=0==a?l:1+l,c=i.createImageData(o,16);let t=0;var n=e.data,r=c.data;for(let e=0;e>8]>>8:i[e]*r>>16}}function b(e,t){var e=w.Util.singularValueDecompose2dScale(e),i=(e[0]=Math.fround(e[0]),e[1]=Math.fround(e[1]),Math.fround((globalThis.devicePixelRatio||1)*R.PixelsPerInch.PDF_TO_CSS_UNITS));return void 0!==t?t:e[0]<=i||e[1]<=i}const n=["butt","round","square"],r=["miter","round","bevel"],s={},a={};class l{constructor(e,t,i,n,r,s,o,a){var{optionalContentConfig:s,markedContentStack:l=null}=s;this.ctx=e,this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=i,this.canvasFactory=n,this.filterFactory=r,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=l||[],this.optionalContentConfig=s,this.cachedCanvases=new h(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=o,this.viewportScale=1,this.outputScaleX=1,this.outputScaleY=1,this.pageColors=a,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(e){var t=1h)return i(),o;c=0}}}#ce(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#ce(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const e of this._cachedBitmapsMap.values()){for(const t of e.values())"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement&&(t.width=t.height=0);e.clear()}this._cachedBitmapsMap.clear(),this.#he()}#he(){var e,t;this.pageColors&&"none"!==(e=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background))&&(t=this.ctx.filter,this.ctx.filter=e,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.filter=t)}_scaleImage(i,e){var t=i.width,n=i.height;let r,s,o=Math.max(Math.hypot(e[0],e[1]),1),a=Math.max(Math.hypot(e[2],e[3]),1),l=t,h=n,c="prescale1";for(;2{n.save=n.__originalSave,n.restore=n.__originalRestore,n.rotate=n.__originalRotate,n.scale=n.__originalScale,n.translate=n.__originalTranslate,n.transform=n.__originalTransform,n.setTransform=n.__originalSetTransform,n.resetTransform=n.__originalResetTransform,n.clip=n.__originalClip,n.moveTo=n.__originalMoveTo,n.lineTo=n.__originalLineTo,n.bezierCurveTo=n.__originalBezierCurveTo,n.rect=n.__originalRect,n.closePath=n.__originalClosePath,n.beginPath=n.__originalBeginPath,delete n._removeMirroring},n.save=function(){o.save(),this.__originalSave()},n.restore=function(){o.restore(),this.__originalRestore()},n.translate=function(e,t){o.translate(e,t),this.__originalTranslate(e,t)},n.scale=function(e,t){o.scale(e,t),this.__originalScale(e,t)},n.transform=function(e,t,i,n,r,s){o.transform(e,t,i,n,r,s),this.__originalTransform(e,t,i,n,r,s)},n.setTransform=function(e,t,i,n,r,s){o.setTransform(e,t,i,n,r,s),this.__originalSetTransform(e,t,i,n,r,s)},n.resetTransform=function(){o.resetTransform(),this.__originalResetTransform()},n.rotate=function(e){o.rotate(e),this.__originalRotate(e)},n.clip=function(e){o.clip(e),this.__originalClip(e)},n.moveTo=function(e,t){o.moveTo(e,t),this.__originalMoveTo(e,t)},n.lineTo=function(e,t){o.lineTo(e,t),this.__originalLineTo(e,t)},n.bezierCurveTo=function(e,t,i,n,r,s){o.bezierCurveTo(e,t,i,n,r,s),this.__originalBezierCurveTo(e,t,i,n,r,s)},n.rect=function(e,t,i,n){o.rect(e,t,i,n),this.__originalRect(e,t,i,n)},n.closePath=function(){o.closePath(),this.__originalClosePath()},n.beginPath=function(){o.beginPath(),this.__originalBeginPath()},this.setGState([["BM","source-over"],["ca",1],["CA",1]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode called while not in smask mode");this.ctx._removeMirroring(),m(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(e){if(this.current.activeSMask){e?(e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.ceil(e[2]),e[3]=Math.ceil(e[3])):e=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];var t=this.current.activeSMask,i=this.suspendedCtx,n=this.ctx,r=(e=e)[0],s=e[1],o=e[2]-r,e=e[3]-s;if(0!=o&&0!=e){var a,l=t.context,h=n,c=o,d=e,o=t.subtype,u=t.backdrop,p=t.transferMap,m=r,g=s,f=t.offsetX,v=t.offsetY,y=!!u,b=y?u[0]:0,w=y?u[1]:0,x=y?u[2]:0,S="Luminosity"===o?L:$,A=Math.min(d,Math.ceil(1048576/c));for(let e=0;e>8,k[e-2]=k[e-2]*R+C*a>>8,k[e-1]=k[e-1]*R+T*a>>8)}}S(E.data,M.data,p),h.putImageData(M,m,e+g)}i.save(),i.globalAlpha=1,i.globalCompositeOperation="source-over",i.setTransform(1,0,0,1,0,0),i.drawImage(n.canvas,0,0),i.restore()}this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}}save(){(this.inSMaskMode?(m(this.ctx,this.suspendedCtx),this.suspendedCtx):this.ctx).save();var e=this.current;this.stateStack.push(e),this.current=e.clone()}restore(){0===this.stateStack.length&&this.inSMaskMode&&this.endSMaskMode(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.inSMaskMode?(this.suspendedCtx.restore(),m(this.suspendedCtx,this.ctx)):this.ctx.restore(),this.checkSMaskState(),this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null)}transform(e,t,i,n,r,s){this.ctx.transform(e,t,i,n,r,s),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(n,r,s){var o=this.ctx,a=this.current;let l,h,c=a.x,d=a.y;var u=(0,R.getCurrentTransform)(o),p=0===u[0]&&0===u[3]||0===u[1]&&0===u[2],m=p?s.slice(0):null;for(let e=0,t=0,i=n.length;enew l(e,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})},n)):this._getPattern(e[1],e[2])}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments)}setFillColorN(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(e,t,i){e=w.Util.makeHexColor(e,t,i);this.ctx.strokeStyle=e,this.current.strokeColor=e}setFillRGBColor(e,t,i){e=w.Util.makeHexColor(e,t,i);this.ctx.fillStyle=e,this.current.fillColor=e,this.current.patternFill=!1}_getPattern(e){let t,i=1u&&(i=e/u,e=u),t>u&&(n=t/u,t=u),this.current.startNewPathAndClipBox([0,0,e,t]),"groupAt"+this.groupLevel);s.smask&&(r+="_smask_"+this.smaskCounter++%2);var l=this.cachedCanvases.getCanvas(r,e,t),d=l.context;d.scale(1/i,1/n),d.translate(-h,-c),d.transform(...a),s.smask?this.smaskStack.push({canvas:l.canvas,context:d,offsetX:h,offsetY:c,scaleX:i,scaleY:n,subtype:s.smask.subtype,backdrop:s.smask.backdrop,transferMap:s.smask.transferMap||null,startTransformInverse:null}):(o.setTransform(1,0,0,1,0,0),o.translate(h,c),o.scale(i,n),o.save()),m(o,d),this.ctx=d,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(o),this.groupLevel++}}endGroup(e){if(this.contentVisible){this.groupLevel--;const t=this.ctx,i=this.groupStack.pop();if(this.ctx=i,this.ctx.imageSmoothingEnabled=!1,e.smask)this.tempSMask=this.smaskStack.pop(),this.restore();else{this.ctx.restore();const e=(0,R.getCurrentTransform)(this.ctx),i=(this.restore(),this.ctx.save(),this.ctx.setTransform(...e),w.Util.getAxialAlignedBoundingBox([0,0,t.canvas.width,t.canvas.height],e));this.ctx.drawImage(t.canvas,0,0),this.ctx.restore(),this.compose(i)}}}beginAnnotation(e,t,i,n,r){if(this.#ce(),g(this.ctx),this.ctx.save(),this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),Array.isArray(t)&&4===t.length){const n=t[2]-t[0],a=t[3]-t[1];if(r&&this.annotationCanvasMap){(i=i.slice())[4]-=t[0],i[5]-=t[1],(t=t.slice())[0]=t[1]=0,t[2]=n,t[3]=a;const[r,l]=w.Util.singularValueDecompose2dScale((0,R.getCurrentTransform)(this.ctx)),h=this["viewportScale"],c=Math.ceil(n*this.outputScaleX*h),d=Math.ceil(a*this.outputScaleY*h);this.annotationCanvas=this.canvasFactory.create(c,d);var{canvas:s,context:o}=this.annotationCanvas;this.annotationCanvasMap.set(e,s),this.annotationCanvas.savedCtx=this.ctx,this.ctx=o,this.ctx.save(),this.ctx.setTransform(r,0,0,-l,0,a*l),g(this.ctx)}else g(this.ctx),this.ctx.rect(t[0],t[1],n,a),this.ctx.clip(),this.endPath()}this.current=new p(this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...i),this.transform(...n)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#he(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(e){var t,i;this.contentVisible&&(t=e.count,(e=this.getObject(e.data,e)).count=t,t=this.ctx,(i=this.processingType3)&&(void 0===i.compiled&&(i.compiled=function(e){const{width:i,height:n}=e;if(1e3>=1}let u=0;for((d=0)!==c[d]&&(l[0]=1,++u),t=1;t>2)+(c[d+1]?4:0)+(c[d-h+1]?8:0),r[e]&&(l[a+t]=r[e],++u),d++;if(c[d-h]!==c[d]&&(l[a+t]=c[d]?2:4,++u),1e3>4,l[t]&=e>>2|e<<2),m.lineTo(t%s,t/s|0),l[t]||--u}while(r!==t);--o}}return c=null,l=null,function(e){e.save(),e.scale(1/i,-1/n),e.translate(0,-n),e.fill(m),e.beginPath(),e.restore()}}(e)),i.compiled)?i.compiled(t):(e=(i=this._createMaskCanvas(e)).canvas,t.save(),t.setTransform(1,0,0,1,0,0),t.drawImage(e,i.offsetX,i.offsetY),t.restore(),this.compose()))}paintImageMaskXObjectRepeat(e,i){var n=2e/t)),e.lineDashOffset/=t}e.stroke(),t&&e.restore()}}isContentVisible(){for(let e=this.markedContentStack.length-1;0<=e;e--)if(!this.markedContentStack[e].visible)return!1;return!0}}t.CanvasGraphics=l;for(const e in w.OPS)void 0!==l.prototype[e]&&(l.prototype[w.OPS[e]]=l.prototype[e])},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.PathType=void 0,t.getShadingPattern=function(e){switch(e[0]){case"RadialAxial":return new r(e);case"Mesh":return new s(e);case"Dummy":return new o}throw new Error("Unknown IR type: "+e[0])},i(2);var v=i(1),y=i(168);const h={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function c(e,t){var i,n,r;t&&(i=t[2]-t[0],n=t[3]-t[1],(r=new Path2D).rect(t[0],t[1],i,n),e.clip(r))}t.PathType=h;class n{constructor(){this.constructor===n&&(0,v.unreachable)("Cannot initialize BaseShadingPattern.")}getPattern(){(0,v.unreachable)("Abstract method `getPattern` called.")}}class r extends n{constructor(e){super(),this._type=e[1],this._bbox=e[2],this._colorStops=e[3],this._p0=e[4],this._p1=e[5],this._r0=e[6],this._r1=e[7],this.matrix=null}_createGradient(e){let t;"axial"===this._type?t=e.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):"radial"===this._type&&(t=e.createRadialGradient(this._p0[0],this._p0[1],this._r0,this._p1[0],this._p1[1],this._r1));for(const e of this._colorStops)t.addColorStop(e[0],e[1]);return t}getPattern(e,t,i,n){let r;if(n===h.STROKE||n===h.FILL){const h=t.current.getClippedPathBoundingBox(n,(0,y.getCurrentTransform)(e))||[0,0,0,0],s=Math.ceil(h[2]-h[0])||1,o=Math.ceil(h[3]-h[1])||1,a=t.cachedCanvases.getCanvas("pattern",s,o,!0),l=a.context;l.clearRect(0,0,l.canvas.width,l.canvas.height),l.beginPath(),l.rect(0,0,l.canvas.width,l.canvas.height),l.translate(-h[0],-h[1]),i=v.Util.transform(i,[1,0,0,1,h[0],h[1]]),l.transform(...t.baseTransform),this.matrix&&l.transform(...this.matrix),c(l,this._bbox),l.fillStyle=this._createGradient(l),l.fill(),r=e.createPattern(a.canvas,"no-repeat");n=new DOMMatrix(i);r.setTransform(n)}else c(e,this._bbox),r=this._createGradient(e);return r}}function b(t,d,u,p,e,i,m,g){var n=d.coords,f=d.colors,v=t.data,y=4*t.width;let r;n[u+1]>n[p+1]&&(r=u,u=p,p=r,r=i,i=m,m=r),n[p+1]>n[e+1]&&(r=p,p=e,e=r,r=m,m=g,g=r),n[u+1]>n[p+1]&&(r=u,u=p,p=r,r=i,i=m,m=r);var b=(n[u]+d.offsetX)*d.scaleX,w=(n[u+1]+d.offsetY)*d.scaleY,x=(n[p]+d.offsetX)*d.scaleX,S=(n[p+1]+d.offsetY)*d.scaleY,A=(n[e]+d.offsetX)*d.scaleX,k=(n[e+1]+d.offsetY)*d.scaleY;if(!(k<=w)){var _=f[i],C=f[i+1],T=f[i+2],E=f[m],M=f[m+1],R=f[m+2],$=f[g],L=f[g+1],I=f[g+2],t=Math.round(w),F=Math.round(k);let n,r,s,o,a,l,h,c;for(let e=t;e<=F;e++){if(ek?1:S==k?0:(S-e)/(S-k);n=x-(x-A)*P,r=E-(E-$)*P,s=M-(M-L)*P,o=R-(R-I)*P}let t;a=b-(b-A)*(t=ek?1:(w-e)/(w-k)),l=_-(_-$)*t,h=C-(C-L)*t,c=T-(T-I)*t;const u=Math.round(Math.min(n,a)),p=Math.round(Math.max(n,a));let i=y*e+4*u;for(let e=u;e<=p;e++)(t=(n-e)/(n-a))<0?t=0:1=t?n=t:i=n/e,{scale:i,size:n}}clipBbox(e,t,i,n,r){e.ctx.rect(t,i,n-t,r-i),e.current.updateRectMinMax((0,y.getCurrentTransform)(e.ctx),[t,i,n,r]),e.clip(),e.endPath()}setFillAndStrokeStyleToContext(e,t,i){var n=e.ctx,r=e.current;switch(t){case 1:const e=this.ctx;n.fillStyle=e.fillStyle,n.strokeStyle=e.strokeStyle,r.fillColor=e.fillStyle,r.strokeColor=e.strokeStyle;break;case 2:var s=v.Util.makeHexColor(i[0],i[1],i[2]);n.fillStyle=s,n.strokeStyle=s,r.fillColor=s,r.strokeColor=s;break;default:throw new v.FormatError("Unsupported paint type: "+t)}}getPattern(e,t,i,n){let r=i,s=(n!==h.SHADING&&(r=v.Util.transform(r,t.baseTransform),this.matrix)&&(r=v.Util.transform(r,this.matrix)),i=this.createPatternCanvas(t),new DOMMatrix(r));return s=(s=s.translate(i.offsetX,i.offsetY)).scale(1/i.scaleX,1/i.scaleY),(n=e.createPattern(i.canvas,"repeat")).setTransform(s),n}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.convertBlackAndWhiteToRGBA=n,t.convertToRGBA=function(t){switch(t.kind){case m.ImageKind.GRAYSCALE_1BPP:return n(t);case m.ImageKind.RGB_24BPP:{var o=t;let{src:i,srcPos:e=0,dest:n,destPos:r=0}=o,s=0;var a=i.length>>2,l=new Uint32Array(i.buffer,e,a);if(m.FeatureTest.isLittleEndian){for(;s>>24|e<<8|4278190080,n[r+2]=e>>>16|t<<16|4278190080,n[r+3]=t>>>8|4278190080}for(let e=4*s,t=i.length;e>>8|255,n[r+2]=e<<16|t>>>16|255,n[r+3]=t<<8|255}for(let e=4*s,t=i.length;e>3,d=7&e,u=i.length;r=new Uint32Array(r.buffer);let p=0;for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalWorkerOptions=void 0;var i=Object.create(null);(t.GlobalWorkerOptions=i).workerPort=null,i.workerSrc=""},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MessageHandler=void 0,i(2);var h=i(1);function c(e){switch(e instanceof Error||"object"==typeof e&&null!==e||(0,h.unreachable)('wrapReason: Expected "reason" to be a (possibly cloned) Error.'),e.name){case"AbortException":return new h.AbortException(e.message);case"MissingPDFException":return new h.MissingPDFException(e.message);case"PasswordException":return new h.PasswordException(e.message,e.code);case"UnexpectedResponseException":return new h.UnexpectedResponseException(e.message,e.status);case"UnknownErrorException":return new h.UnknownErrorException(e.message,e.details);default:return new h.UnknownErrorException(e.message,e.toString())}}t.MessageHandler=class{constructor(e,t,s){this.sourceName=e,this.targetName=t,this.comObj=s,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),this._onComObjOnMessage=t=>{const i=t.data;if(i.targetName===this.sourceName)if(i.stream)this.#de(i);else if(i.callback){const t=i.callbackId,s=this.callbackCapabilities[t];if(!s)throw new Error("Cannot resolve callback "+t);if(delete this.callbackCapabilities[t],1===i.callback)s.resolve(i.data);else{if(2!==i.callback)throw new Error("Unexpected callback case");s.reject(c(i.reason))}}else{const n=this.actionHandler[i.action];if(!n)throw new Error("Unknown action from worker: "+i.action);if(i.callbackId){const t=this.sourceName,r=i.sourceName;new Promise(function(e){e(n(i.data))}).then(function(e){s.postMessage({sourceName:t,targetName:r,callback:1,callbackId:i.callbackId,data:e})},function(e){s.postMessage({sourceName:t,targetName:r,callback:2,callbackId:i.callbackId,reason:c(e)})})}else i.streamId?this.#ue(i):n(i.data)}},s.addEventListener("message",this._onComObjOnMessage)}on(e,t){var i=this.actionHandler;if(i[e])throw new Error(`There is already an actionName called "${e}"`);i[e]=t}send(e,t,i){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},i)}sendWithPromise(e,t,i){var n=this.callbackId++,r=new h.PromiseCapability;this.callbackCapabilities[n]=r;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:n,data:t},i)}catch(e){r.reject(e)}return r.promise}sendWithStream(i,n,e,r){const s=this.streamId++,o=this.sourceName,a=this.targetName,l=this.comObj;return new ReadableStream({start:e=>{var t=new h.PromiseCapability;return this.streamControllers[s]={controller:e,startCall:t,pullCall:null,cancelCall:null,isClosed:!1},l.postMessage({sourceName:o,targetName:a,action:i,streamId:s,data:n,desiredSize:e.desiredSize},r),t.promise},pull:e=>{var t=new h.PromiseCapability;return this.streamControllers[s].pullCall=t,l.postMessage({sourceName:o,targetName:a,stream:6,streamId:s,desiredSize:e.desiredSize}),t.promise},cancel:e=>{(0,h.assert)(e instanceof Error,"cancel must have a valid reason");var t=new h.PromiseCapability;return this.streamControllers[s].cancelCall=t,this.streamControllers[s].isClosed=!0,l.postMessage({sourceName:o,targetName:a,stream:1,streamId:s,reason:c(e)}),t.promise}},e)}#ue(t){const r=t.streamId,s=this.sourceName,o=t.sourceName,a=this.comObj,e=this,i=this.actionHandler[t.action],n={enqueue(e){var t,i=1{Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var n=i(1);t.Metadata=class{#fe;#ge;constructor(e){var{parsedData:e,rawData:t}=e;this.#fe=e,this.#ge=t}getRaw(){return this.#ge}get(e){return this.#fe.get(e)??null}getAll(){return(0,n.objectFromMap)(this.#fe)}has(e){return this.#fe.has(e)}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionalContentConfig=void 0;var s=i(1),n=i(170);const r=Symbol("INTERNAL");class o{#me=!0;constructor(e,t){this.name=e,this.intent=t}get visible(){return this.#me}_setVisible(e,t){e!==r&&(0,s.unreachable)("Internal method `_setVisible` called."),this.#me=t}}t.OptionalContentConfig=class{#be=null;#ve=new Map;#ye=null;#_e=null;constructor(e){if(this.name=null,(this.creator=null)!==e){this.name=e.name,this.creator=e.creator,this.#_e=e.order;for(const t of e.groups)this.#ve.set(t.id,new o(t.name,t.intent));if("OFF"===e.baseState)for(const e of this.#ve.values())e._setVisible(r,!1);for(const i of e.on)this.#ve.get(i)._setVisible(r,!0);for(const n of e.off)this.#ve.get(n)._setVisible(r,!1);this.#ye=this.getHash()}}#Ae(i){const n=i.length;if(n<2)return!0;var r=i[0];for(let t=1;t{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var a=i(1),r=i(168);t.PDFDataTransportStream=class{constructor(e,t){var{length:e,initialData:i,progressiveDone:n=!1,contentDispositionFilename:r=null,disableRange:s=!1,disableStream:o=!1}=e;if((0,a.assert)(t,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'),this._queuedChunks=[],this._progressiveDone=n,this._contentDispositionFilename=r,0{this._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener((e,t)=>{this._onProgress({loaded:e,total:t})}),this._pdfDataRangeTransport.addProgressiveReadListener(e=>{this._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),this._pdfDataRangeTransport.transportReady()}_onReceiveData(e){let{begin:t,chunk:i}=e;const n=(i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i:new Uint8Array(i)).buffer;if(void 0===t)this._fullRequestReader?this._fullRequestReader._enqueue(n):this._queuedChunks.push(n);else{const e=this._rangeReaders.some(function(e){return e._begin===t&&(e._enqueue(n),!0)});(0,a.assert)(e,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(e){void 0===e.total?this._rangeReaders[0]?.onProgress?.({loaded:e.loaded}):this._fullRequestReader?.onProgress?.({loaded:e.loaded,total:e.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(e){e=this._rangeReaders.indexOf(e);0<=e&&this._rangeReaders.splice(e,1)}getFullReader(){(0,a.assert)(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");var e=this._queuedChunks;return this._queuedChunks=null,new n(this,e,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(e,t){var i;return t<=this._progressiveDataLength?null:(i=new s(this,e,t),this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(i),i)}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeReaders.slice(0))t.cancel(e);this._pdfDataRangeTransport.abort()}};class n{constructor(e,t){var i=2{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0,i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89);var s=i(1),o=i(182);function a(e,t,i){return{method:"GET",headers:e,signal:i.signal,mode:"cors",credentials:t?"include":"same-origin",redirect:"follow"}}function l(e){var t=new Headers;for(const n in e){var i=e[n];void 0!==i&&t.append(n,i)}return t}function n(e){return e instanceof Uint8Array?e.buffer:e instanceof ArrayBuffer?e:((0,s.warn)("getArrayBuffer - unexpected data format: "+e),new Uint8Array(e).buffer)}t.PDFFetchStream=class{constructor(e){this.source=e,this.isHttp=/^https?:/i.test(e.url),this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new r(this),this._fullRequestReader}getRangeReader(e,t){return t<=this._progressiveDataLength?null:(e=new h(this,e,t),this._rangeRequestReaders.push(e),e)}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class r{constructor(e){this._stream=e,this._reader=null,this._loaded=0,this._filename=null;e=e.source;this._withCredentials=e.withCredentials||!1,this._contentLength=e.length,this._headersCapability=new s.PromiseCapability,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._headers=l(this._stream.httpHeaders);const r=e.url;fetch(r,a(this._headers,this._withCredentials,this._abortController)).then(t=>{if(!(0,o.validateResponseStatus)(t.status))throw(0,o.createResponseStatusError)(t.status,r);this._reader=t.body.getReader(),this._headersCapability.resolve();var e=e=>t.headers.get(e),{allowRangeRequests:i,suggestedLength:n}=(0,o.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:this._stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=i,this._contentLength=n||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(e),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new s.AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._headersCapability.promise;var{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:n(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}class h{constructor(e,t,i){this._stream=e,this._reader=null,this._loaded=0;e=e.source;this._withCredentials=e.withCredentials||!1,this._readCapability=new s.PromiseCapability,this._isStreamingSupported=!e.disableStream,this._abortController=new AbortController,this._headers=l(this._stream.httpHeaders),this._headers.append("Range",`bytes=${t}-`+(i-1));const n=e.url;fetch(n,a(this._headers,this._withCredentials,this._abortController)).then(e=>{if(!(0,o.validateResponseStatus)(e.status))throw(0,o.createResponseStatusError)(e.status,n);this._readCapability.resolve(),this._reader=e.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;var{value:e,done:t}=await this._reader.read();return t?{value:e,done:t}:(this._loaded+=e.byteLength,this.onProgress?.({loaded:this._loaded}),{value:n(e),done:!1})}cancel(e){this._reader?.cancel(e),this._abortController.abort()}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createResponseStatusError=function(e,t){return 404===e||0===e&&t.startsWith("file:")?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException(`Unexpected server response (${e}) while retrieving PDF "${t}".`,e)},t.extractFilenameFromHeader=function(t){t=t("Content-Disposition");if(t){let e=(0,r.getFilenameFromContentDispositionHeader)(t);if(e.includes("%"))try{e=decodeURIComponent(e)}catch{}if((0,s.isPdfFile)(e))return e}return null},t.validateRangeRequestCapabilities=function(e){var{getResponseHeader:e,isHttp:t,rangeChunkSize:i,disableRange:n}=e,r={allowRangeRequests:!1,suggestedLength:void 0},s=parseInt(e("Content-Length"),10);return!Number.isInteger(s)||(r.suggestedLength=s)<=2*i||!n&&t&&"bytes"===e("Accept-Ranges")&&"identity"===(e("Content-Encoding")||"identity")&&(r.allowRangeRequests=!0),r},t.validateResponseStatus=function(e){return 200===e||206===e};var n=i(1),r=i(183),s=i(168)},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getFilenameFromContentDispositionHeader=function(e){let r=!0,t=a("filename\\*","i").exec(e);var i;return t?(i=l(t=t[1]),n(i=o(i=h(i=unescape(i))))):(t=function(e){for(var n=[],t=a("filename\\*((?!0\\d)\\d+)(\\*?)","ig");null!==(i=t.exec(e));){var[,i,r,s]=i;if((i=parseInt(i,10))in n){if(0===i)break}else n[i]=[r,s]}var o=[];for(let i=0;i{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNetworkStream=void 0,i(89);var s=i(1),o=i(182);class n{constructor(e){var t=1t.getResponseHeader(e),{allowRangeRequests:n,suggestedLength:r}=(0,o.validateRangeRequestCapabilities)({getResponseHeader:i,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});n&&(this._isRangeSupported=!0),this._contentLength=r||this._contentLength,this._filename=(0,o.extractFilenameFromHeader)(i),this._isRangeSupported&&this._manager.abortRequest(e),this._headersReceivedCapability.resolve()}_onDone(e){if(e&&(0{Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0,i(89),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var r=i(1),s=i(182);const o=/^file:\/\/\/[a-zA-Z]:\//;t.PDFNodeStream=class{constructor(e){this.source=e,this.url=function(e){var t=require("url"),i=t.parse(e);if("file:"!==i.protocol&&!i.host){if(/^[a-z]:[/\\]/i.test(e))return t.parse("file:///"+e);i.host||(i.protocol="file:")}return i}(e.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol,this.httpHeaders=this.isHttp&&e.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return(0,r.assert)(!this._fullRequestReader,"PDFNodeStream.getFullReader can only be called once."),this._fullRequestReader=new(this.isFsUrl?d:h)(this),this._fullRequestReader}getRangeReader(e,t){return t<=this._progressiveDataLength?null:(e=new(this.isFsUrl?u:c)(this,e,t),this._rangeRequestReaders.push(e),e)}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}};class n{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null;e=e.source;this._contentLength=e.length,this._loaded=0,this._filename=null,this._disableRange=e.disableRange||!1,this._rangeChunkSize=e.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!e.disableStream,this._isRangeSupported=!e.disableRange,this._readableStream=null,this._readCapability=new r.PromiseCapability,this._headersCapability=new r.PromiseCapability}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;var e=this._readableStream.read();return null===e?(this._readCapability=new r.PromiseCapability,this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){(this._readableStream=e).on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new r.AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class a{constructor(e){this._url=e.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=new r.PromiseCapability;e=e.source;this._isStreamingSupported=!e.disableStream}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;var e=this._readableStream.read();return null===e?(this._readCapability=new r.PromiseCapability,this.read()):(this._loaded+=e.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(e).buffer,done:!1})}cancel(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}_error(e){this._storedError=e,this._readCapability.resolve()}_setReadableStream(e){(this._readableStream=e).on("readable",()=>{this._readCapability.resolve()}),e.on("end",()=>{e.destroy(),this._done=!0,this._readCapability.resolve()}),e.on("error",e=>{this._error(e)}),this._storedError&&this._readableStream.destroy(this._storedError)}}function l(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}class h extends n{constructor(n){super(n);var e,t=e=>{if(404===e.statusCode){const n=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=n,void this._headersCapability.reject(n)}else{this._headersCapability.resolve(),this._setReadableStream(e);var e=e=>this._readableStream.headers[e.toLowerCase()],{allowRangeRequests:t,suggestedLength:i}=(0,s.validateRangeRequestCapabilities)({getResponseHeader:e,isHttp:n.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=t,this._contentLength=i||this._contentLength,this._filename=(0,s.extractFilenameFromHeader)(e)}};this._request=null,"http:"===this._url.protocol?(e=require("http"),this._request=e.request(l(this._url,n.httpHeaders),t)):(e=require("https"),this._request=e.request(l(this._url,n.httpHeaders),t)),this._request.on("error",e=>{this._storedError=e,this._headersCapability.reject(e)}),this._request.end()}}class c extends a{constructor(e,t,i){super(e),this._httpHeaders={};for(const t in e.httpHeaders){const i=e.httpHeaders[t];void 0!==i&&(this._httpHeaders[t]=i)}this._httpHeaders.Range=`bytes=${t}-`+(i-1);t=e=>{if(404!==e.statusCode)this._setReadableStream(e);else{const e=new r.MissingPDFException(`Missing PDF "${this._url}".`);this._storedError=e}};if(this._request=null,"http:"===this._url.protocol){const e=require("http");this._request=e.request(l(this._url,this._httpHeaders),t)}else{const e=require("https");this._request=e.request(l(this._url,this._httpHeaders),t)}this._request.on("error",e=>{this._storedError=e}),this._request.end()}}class d extends n{constructor(e){super(e);let i=decodeURIComponent(this._url.path);o.test(this._url.href)&&(i=i.replace(/^\//,""));const n=require("fs");n.lstat(i,(e,t)=>{e?("ENOENT"===e.code&&(e=new r.MissingPDFException(`Missing PDF "${i}".`)),this._storedError=e,this._headersCapability.reject(e)):(this._contentLength=t.size,this._setReadableStream(n.createReadStream(i)),this._headersCapability.resolve())})}}class u extends a{constructor(e,t,i){super(e);let n=decodeURIComponent(this._url.path);o.test(this._url.href)&&(n=n.replace(/^\//,""));e=require("fs");this._setReadableStream(e.createReadStream(n,{start:t,end:i-1}))}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0,i(84),i(86),i(87),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(2),i(89),i(187);var n=i(168),v=i(1);function y(i){var e=1>2]+n[(3&s)<<4|o>>4]+n[e+1>6:64]+n[e+2>1&2147483647:t>>1&2147483647;o[e]=t}function g(e,t,i,n){var r=n,s=t.length,s=(i[r]=s>>24&255,i[r+1]=s>>16&255,i[r+2]=s>>8&255,i[r+3]=255&s,i[r+=4]=255&e.charCodeAt(0),i[r+1]=255&e.charCodeAt(1),i[r+2]=255&e.charCodeAt(2),i[r+3]=255&e.charCodeAt(3),i.set(t,r+=4),function(t,i,n){let r=-1;for(let e=i;e>>8^o[i]}return-1^r}(i,n+4,r+=t.length));i[r]=s>>24&255,i[r+1]=s>>16&255,i[r+2]=s>>8&255,i[r+3]=255&s}function f(e){let t=e.length;var i=65535,n=Math.ceil(t/i),r=new Uint8Array(2+t+5*n+4);let s=0,o=(r[s++]=120,r[s++]=156,0);for(;t>i;)r[s++]=0,r[s++]=255,r[s++]=255,r[s++]=0,r[s++]=0,r.set(e.subarray(o,o+i),s),s+=i,o+=i,t-=i;r[s++]=1,r[s++]=255&t,r[s++]=t>>8&255,r[s++]=255&~t,r[s++]=(65535&~t)>>8&255,r.set(e.subarray(o),s),s+=e.length-o;n=function(t,i,n){let r=1,s=0;for(let e=i;e>24&255,r[s++]=n>>16&255,r[s++]=n>>8&255,r[s++]=255&n,r}return function(s,o,a){{var l=s,h=(s=void 0===s.kind?v.ImageKind.GRAYSCALE_1BPP:s.kind,l.width),c=l.height;let e,t,i;var d=l.data;switch(s){case v.ImageKind.GRAYSCALE_1BPP:t=0,e=1,i=h+7>>3;break;case v.ImageKind.RGB_24BPP:t=2,e=8,i=3*h;break;case v.ImageKind.RGBA_32BPP:t=6,e=8,i=4*h;break;default:throw new Error("invalid format")}var u=new Uint8Array((1+i)*c);let n=0,r=0;for(let e=0;e>24&255,h>>16&255,h>>8&255,255&h,c>>24&255,c>>16&255,c>>8&255,255&c,e,t,0,0,0]),s=function(e){if(v.isNodeJS)try{var t=8<=parseInt(process.versions.node)?e:Buffer.from(e),i=require("zlib").deflateSync(t,{level:9});return i instanceof Uint8Array?i:new Uint8Array(i)}catch(e){(0,v.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return f(e)}(u),a=m.length+36+l.length+s.length,a=new Uint8Array(a),p=0;return a.set(m,0),g("IHDR",l,a,p+=m.length),g("IDATA",s,a,p+=12+l.length),p+=12+s.length,g("IEND",new Uint8Array(0),a,p),y(a,"image/png",o)}}}();class a{constructor(){this.fontSizeScale=1,this.fontWeight="normal",this.fontSize=0,this.textMatrix=v.IDENTITY_MATRIX,this.fontMatrix=v.FONT_IDENTITY_MATRIX,this.leading=0,this.textRenderingMode=v.TextRenderingMode.FILL,this.textMatrixScale=1,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}clone(){return Object.create(this)}setCurrentPoint(e,t){this.x=e,this.y=t}}function b(e){if(Number.isInteger(e))return e.toString();var t=e.toFixed(10);let i=t.length-1;if("0"!==t[i])return t;for(;"0"===t[--i];);return t.substring(0,"."===t[i]?i:i+1)}function w(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":`scale(${b(e[0])} ${b(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${b(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${b(e[4])} ${b(e[5])})`;return`matrix(${b(e[0])} ${b(e[1])} ${b(e[2])} ${b(e[3])} ${b(e[4])} ${b(e[5])})`}let l=0,h=0,m=0;t.SVGGraphics=class{constructor(e,t){var i=2{i.get(n,e)});this.current.dependencies.push(r)}return Promise.all(this.current.dependencies)}transform(e,t,i,n,r,s){this.transformMatrix=v.Util.transform(this.transformMatrix,[e,t,i,n,r,s]),this.tgrp=null}getSVG(e,t){this.viewport=t;const i=this._initialize(t);return this.loadDependencies(e).then(()=>(this.transformMatrix=v.IDENTITY_MATRIX,this.executeOpTree(this.convertOpList(e)),i))}convertOpList(t){var i=this._operatorIdMapping,n=t.argsArray,r=t.fnArray,s=[];for(let e=0,t=r.length;e{var n=i(3),r=i(188),i=i(193);n({target:"Array",proto:!0},{group:function(e){return r(this,e,1{var p=i(99),n=i(14),m=i(13),g=i(40),f=i(18),v=i(64),y=i(189),b=i(108),w=Array,x=n([].push);e.exports=function(e,t,i,n){for(var r,s,o,a=g(e),l=m(a),h=p(t,i),c=y(null),d=v(l),u=0;u{function n(){}function r(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}var s,o=i(47),a=i(190),l=i(66),h=i(55),c=i(192),d=i(43),i=i(54),u="prototype",p="script",m=i("IE_PROTO"),g=function(e){return"<"+p+">"+e+""},f=function(){try{s=new ActiveXObject("htmlfile")}catch(i){}var e,t;f="undefined"==typeof document||document.domain&&s?r(s):(e=d("iframe"),t="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F);for(var i=l.length;i--;)delete f[u][l[i]];return f()};h[m]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(n[u]=o(e),i=new n,n[u]=null,i[m]=e):i=f(),void 0===t?i:a.f(i,t)}},(e,t,i)=>{var n=i(6),r=i(46),a=i(45),l=i(47),h=i(12),c=i(191);t.f=n&&!r?Object.defineProperties:function(e,t){l(e);for(var i,n=h(t),r=c(t),s=r.length,o=0;o{var n=i(59),r=i(66);e.exports=Object.keys||function(e){return n(e,r)}},(e,t,i)=>{i=i(24);e.exports=i("document","documentElement")},(e,t,i)=>{var n=i(34),r=i(189),i=i(45).f,s=n("unscopables"),o=Array.prototype;void 0===o[s]&&i(o,s,{configurable:!0,value:r(null)}),e.exports=function(e){o[s][e]=!0}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0,i(89);class s{static textContent(e){const r=[],t={items:r,styles:Object.create(null)};return function t(i){if(i){let e=null;var n=i.name;if("#text"===n)e=i.value;else{if(!s.shouldBuildText(n))return;i?.attributes?.textContent?e=i.attributes.textContent:i.value&&(e=i.value)}if(null!==e&&r.push({str:e}),i.children)for(const r of i.children)t(r)}}(e),t}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=s},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,l.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);var{container:t,viewport:i}=e,t=getComputedStyle(t),n=t.getPropertyValue("visibility"),t=parseFloat(t.getPropertyValue("--scale-factor")),n=("visible"===n&&(!t||1e-5{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new m.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new m.AbortException("TextLayer task cancelled."))}_processItems(e,r){for(const p of e)if(void 0!==p.str){this._textContentItemsStr.push(p.str);{s=void 0;o=void 0;a=void 0;l=void 0;h=void 0;c=void 0;d=void 0;u=void 0;var s=this;var o=p;var a=r;var l=document.createElement("span"),h={angle:0,canvasWidth:0,hasText:""!==o.str,hasEOL:o.hasEOL,fontSize:0},c=(s._textDivs.push(l),m.Util.transform(s._transform,o.transform));let e=Math.atan2(c[1],c[0]);var a=a[o.fontName],d=(a.vertical&&(e+=Math.PI/2),Math.hypot(c[2],c[3])),u=d*function(e,t){var i=g.get(e);if(i)return i;i=f(30,t),i.font="30px "+e,t=i.measureText("");let n=t.fontBoundingBoxAscent,r=Math.abs(t.fontBoundingBoxDescent);if(n){const t=n/(n+r);return g.set(e,t),i.canvas.width=i.canvas.height=0,t}i.strokeStyle="red",i.clearRect(0,0,30,30),i.strokeText("g",0,0);let s=i.getImageData(0,0,30,30).data;r=0;for(let e=s.length-1-3;0<=e;e-=4)if(0{this._reader.read().then(e=>{var{value:e,done:t}=e;t?i.resolve():(Object.assign(n,e.styles),this._processItems(e.items,n),r())},i.reject)};this._reader=this._textContentSource.getReader(),r()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:n,styles:e}=this._textContentSource;this._processItems(n,e),i.resolve()}}i.promise.then(()=>{n=null;var e=this;if(!e._canceled){const t=e._textDivs,i=e._capability;if(!(1e5{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0,i(125),i(136),i(138),i(141),i(143),i(145),i(147);var n=i(1),r=i(164),l=i(197),h=i(202),s=i(168),c=i(203);class d{#Se;#Ee=!1;#xe=null;#we=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#Te=new Map;#Pe=!1;#ke=!1;#Me=!1;#Fe;static _initialized=!1;constructor(e){var{uiManager:e,pageIndex:t,div:i,accessibilityManager:n,annotationLayer:r,viewport:s,l10n:o}=e,a=[l.FreeTextEditor,h.InkEditor,c.StampEditor];if(!d._initialized){d._initialized=!0;for(const e of a)e.initialize(o)}e.registerEditorTypes(a),this.#Fe=e,this.pageIndex=t,this.div=i,this.#Se=n,this.#xe=r,this.viewport=s,this.#Fe.addLayer(this)}get isEmpty(){return 0===this.#Te.size}updateToolbar(e){this.#Fe.updateToolbar(e)}updateMode(){var e=0{this.#Fe.focusMainContainer()},0),e.div.remove(),e.isAttachedToDOM=!1,this.#ke||this.addInkEditorIfNeeded(!1)}changeParent(e){e.parent!==this&&(e.annotationElementId&&(this.#Fe.addDeletedAnnotationElement(e.annotationElementId),r.AnnotationEditor.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div)&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div))}add(e){var t;this.changeParent(e),this.#Fe.addEditor(e),this.attach(e),e.isAttachedToDOM||(t=e.render(),this.div.append(t),e.isAttachedToDOM=!0),e.fixAndSetPosition(),e.onceAdded(),this.#Fe.addToAnnotationStorage(e)}moveEditorInDOM(e){if(e.isAttachedToDOM){const t=document["activeElement"];e.div.contains(t)&&(e._focusEventsAllowed=!1,setTimeout(()=>{e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0}),t.focus())},0)),e._structTreeParentId=this.#Se?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#Fe.getId()}#Ie(e){switch(this.#Fe.getMode()){case n.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(e);case n.AnnotationEditorType.INK:return new h.InkEditor(e);case n.AnnotationEditorType.STAMP:return new c.StampEditor(e)}return null}pasteEditor(e,t){this.#Fe.updateToolbar(e),this.#Fe.updateMode(e);var{offsetX:e,offsetY:i}=this.#Oe(),n=this.getNextId(),n=this.#Ie({parent:this,id:n,x:e,y:i,uiManager:this.#Fe,isCentered:!0,...t});n&&this.add(n)}deserialize(e){switch(e.annotationType??e.annotationEditorType){case n.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(e,this,this.#Fe);case n.AnnotationEditorType.INK:return h.InkEditor.deserialize(e,this,this.#Fe);case n.AnnotationEditorType.STAMP:return c.StampEditor.deserialize(e,this,this.#Fe)}return null}#De(e,t){var i=this.getNextId(),i=this.#Ie({parent:this,id:i,x:e.offsetX,y:e.offsetY,uiManager:this.#Fe,isCentered:t});return i&&this.add(i),i}#Oe(){var{x:e,y:t,width:i,height:n}=this.div.getBoundingClientRect(),r=Math.max(0,e),s=Math.max(0,t),r=(r+Math.min(window.innerWidth,e+i))/2-e,i=(s+Math.min(window.innerHeight,t+n))/2-t,[e,s]=this.viewport.rotation%180==0?[r,i]:[i,r];return{offsetX:e,offsetY:s}}addNewEditor(){this.#De(this.#Oe(),!0)}setSelected(e){this.#Fe.setSelected(e)}toggleSelected(e){this.#Fe.toggleSelected(e)}isSelected(e){return this.#Fe.isSelected(e)}unselect(e){this.#Fe.unselect(e)}pointerup(e){var t=n.FeatureTest.platform["isMac"];0!==e.button||e.ctrlKey&&t||e.target!==this.div||!this.#Pe||(this.#Pe=!1,this.#Ee?this.#Fe.getMode()!==n.AnnotationEditorType.STAMP?this.#De(e,!1):this.#Fe.unselectAll():this.#Ee=!0)}pointerdown(e){var t;this.#Pe?this.#Pe=!1:(t=n.FeatureTest.platform.isMac,0!==e.button||e.ctrlKey&&t||e.target===this.div&&(this.#Pe=!0,t=this.#Fe.getActive(),this.#Ee=!t||t.isEmpty()))}findNewParent(e,t,i){t=this.#Fe.findParent(t,i);return null!==t&&t!==this&&(t.changeParent(e),!0)}destroy(){this.#Fe.getActive()?.parent===this&&(this.#Fe.commitOrRemove(),this.#Fe.setActiveEditor(null));for(const e of this.#Te.values())this.#Se?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#Te.clear(),this.#Fe.removeLayer(this)}#Re(){this.#ke=!0;for(const e of this.#Te.values())e.isEmpty()&&e.remove();this.#ke=!1}render(e){e=e.viewport;this.viewport=e,(0,s.setLayerDimensions)(this.div,e);for(const e of this.#Fe.getEditors(this.pageIndex))this.add(e);this.updateMode()}update(e){e=e.viewport;this.#Fe.commitOrRemove(),this.viewport=e,(0,s.setLayerDimensions)(this.div,{rotation:e.rotation}),this.updateMode()}get pageDimensions(){var{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}}t.AnnotationEditorLayer=d},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0,i(89);var h=i(1),u=i(165),n=i(164),c=i(198);class r extends n.AnnotationEditor{#Le=this.editorDivBlur.bind(this);#Ne=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#je=this.editorDivKeydown.bind(this);#Ue;#ze="";#We=this.id+"-editor";#He;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){var e=r.prototype,t=e=>e.isEmpty(),i=u.AnnotationEditorUIManager.TRANSLATE_SMALL,n=u.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,h.shadow)(this,"_keyboardManager",new u.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-n,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[n,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-n],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,n],checker:t}]]))}static _type="freetext";constructor(e){super({...e,name:"freeTextEditor"}),this.#Ue=e.color||r._defaultColor||n.AnnotationEditor._defaultLineColor,this.#He=e.fontSize||r._defaultFontSize}static initialize(e){n.AnnotationEditor.initialize(e,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});e=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(e.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case h.AnnotationEditorParamsType.FREETEXT_SIZE:r._defaultFontSize=t;break;case h.AnnotationEditorParamsType.FREETEXT_COLOR:r._defaultColor=t}}updateParams(e,t){switch(e){case h.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Ge(t);break;case h.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ve(t)}}static get defaultPropertiesToUpdate(){return[[h.AnnotationEditorParamsType.FREETEXT_SIZE,r._defaultFontSize],[h.AnnotationEditorParamsType.FREETEXT_COLOR,r._defaultColor||n.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[h.AnnotationEditorParamsType.FREETEXT_SIZE,this.#He],[h.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Ge(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#He)*this.parentScale),this.#He=e,this.#$e()},i=this.#He;this.addCommands({cmd:()=>{t(e)},undo:()=>{t(i)},mustExec:!0,type:h.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ve(e){const t=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=e},undo:()=>{this.#Ue=this.editorDiv.style.color=t},mustExec:!0,type:h.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){var e=this.parentScale;return[-r._internalPadding*e,-(r._internalPadding+this.#He)*e]}rebuild(){this.parent&&(super.rebuild(),null===this.div||this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(h.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#je),this.editorDiv.addEventListener("focus",this.#Ne),this.editorDiv.addEventListener("blur",this.#Le),this.editorDiv.addEventListener("input",this.#Be))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#We),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#je),this.editorDiv.removeEventListener("focus",this.#Ne),this.editorDiv.removeEventListener("blur",this.#Le),this.editorDiv.removeEventListener("input",this.#Be),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv)&&this.editorDiv.focus()}onceAdded(){this.width?this.#Xe():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#Ke(){var e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;var t=[];for(const i of e)t.push(i.innerText.replace(/\r\n?|\n/,""));return t.join("\n")}#$e(){const[e,t]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,n=t.style.display;t.style.display="hidden",e.div.append(this.div),i=t.getBoundingClientRect(),t.remove(),t.style.display=n}this.rotation%180==this.parentRotation%180?(this.width=i.width/e,this.height=i.height/t):(this.width=i.height/e,this.height=i.width/t),this.fixAndSetPosition()}commit(){if(this.isInEditMode()){super.commit(),this.disableEditMode();const e=this.#ze,t=this.#ze=this.#Ke().trimEnd();if(e!==t){const i=e=>{(this.#ze=e)?(this.#Ye(),this._uiManager.rebuild(this),this.#$e()):this.remove()};this.addCommands({cmd:()=>{i(t)},undo:()=>{i(e)},mustExec:!1}),this.#$e()}}}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){r._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(!this.div){let r,s;this.width&&(r=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#We),this.enableEditing(),n.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(e=>this.editorDiv?.setAttribute("aria-label",e)),n.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(e=>this.editorDiv?.setAttribute("default-content",e)),this.editorDiv.contentEditable=!0;const c=this.editorDiv["style"];if(c.fontSize=`calc(${this.#He}px * var(--scale-factor))`,c.color=this.#Ue,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,u.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[c,d]=this.parentDimensions;if(this.annotationElementId){const u=this.#qe["position"];let[e,t]=this.getInitialTranslation();[e,t]=this.pageTranslationToScreen(e,t);var[o,a]=this.pageDimensions,[l,h]=this.pageTranslation;let i,n;switch(this.rotation){case 0:i=r+(u[0]-l)/o,n=s+this.height-(u[1]-h)/a;break;case 90:i=r+(u[0]-l)/o,n=s-(u[1]-h)/a,[e,t]=[t,-e];break;case 180:i=r-this.width+(u[0]-l)/o,n=s-(u[1]-h)/a,[e,t]=[-e,-t];break;case 270:i=r+(u[0]-l-this.height*a)/o,n=s+(u[1]-h-this.width*o)/a,[e,t]=[-t,e]}this.setAt(i*c,n*d,e,t)}else this.setAt(r*c,s*d,this.width*c,this.height*d);this.#Ye(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0}return this.div}#Ye(){if(this.editorDiv.replaceChildren(),this.#ze)for(const t of this.#ze.split("\n")){var e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(e,t,i){let n=null;if(e instanceof c.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:t,fontColor:i},rect:r,rotation:c,id:s},textContent:o,textPosition:a,parent:{page:{pageNumber:l}}}=e;if(!o||0===o.length)return null;n=e={annotationType:h.AnnotationEditorType.FREETEXT,color:Array.from(i),fontSize:t,value:o.join("\n"),position:a,pageIndex:l-1,rect:r,rotation:c,id:s,deleted:!1}}const r=super.deserialize(e,t,i);return r.#He=e.fontSize,r.#Ue=h.Util.makeHexColor(...e.color),r.#ze=e.value,r.annotationElementId=e.id||null,r.#qe=n,r}serialize(){var e=01<=Math.abs(e-r[t]))||e.color.some((e,t)=>e!==n[t])||e.pageIndex!==s}#Xe(){var e=0this.#Xe(!0),0))}}t.FreeTextEditor=r},(D,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StampAnnotationElement=e.InkAnnotationElement=e.FreeTextAnnotationElement=e.AnnotationLayer=void 0,t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147);var u=t(1),d=t(168),s=t(163),r=t(199),o=t(200),p=t(201);const m=new WeakSet;function g(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class a{static create(e){switch(e.data.annotationType){case u.AnnotationType.LINK:return new i(e);case u.AnnotationType.TEXT:return new l(e);case u.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new h(e);case"Btn":return new(e.data.radioButton?y:e.data.checkBox?v:b)(e);case"Ch":return new w(e);case"Sig":return new c(e)}return new f(e);case u.AnnotationType.POPUP:return new x(e);case u.AnnotationType.FREETEXT:return new A(e);case u.AnnotationType.LINE:return new k(e);case u.AnnotationType.SQUARE:return new _(e);case u.AnnotationType.CIRCLE:return new C(e);case u.AnnotationType.POLYLINE:return new T(e);case u.AnnotationType.CARET:return new M(e);case u.AnnotationType.INK:return new R(e);case u.AnnotationType.POLYGON:return new E(e);case u.AnnotationType.HIGHLIGHT:return new $(e);case u.AnnotationType.UNDERLINE:return new L(e);case u.AnnotationType.SQUIGGLY:return new I(e);case u.AnnotationType.STRIKEOUT:return new F(e);case u.AnnotationType.STAMP:return new P(e);case u.AnnotationType.FILEATTACHMENT:return new O(e);default:return new n(e)}}}class n{#Qe=!1;constructor(e){var{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}=1{var e=i.detail[e],n=e[0],e=e.slice(1);i.target.style[t]=r.ColorConverters[n+"_HTML"](e),this.annotationStorage.setValue(this.data.id,{[t]:r.ColorConverters[n+"_rgb"](e)})};return(0,u.shadow)(this,"_commonActions",{display:e=>{var e=e.detail["display"],t=e%2==1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:t,noPrint:1===e||2===e})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{e=e.detail.hidden;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{e=e.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(e,t){var i=this._commonActions;for(const n of Object.keys(t.detail))(e[n]||i[n])?.(t)}_setDefaultPropertiesFromJS(e){if(this.enableScripting){var t=this.annotationStorage.getRawValue(this.data.id);if(t){var i,n,r=this._commonActions;for([i,n]of Object.entries(t)){var s=r[i];s&&(s({detail:{[i]:n},target:e}),delete t[i])}}}}_createQuadrilaterals(){if(this.container){const t=this.data["quadPoints"];if(t){const[i,n,r,s]=this.data.rect;if(1===t.length){const[,{x:o,y:e},{x:a,y:l}]=t[0];if(r===o&&s===e&&i===a&&n===l)return}const o=this.container["style"];let e;if(this.#Qe){const{borderColor:t,borderWidth:i}=o;o.borderWidth=0,e=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const a=r-i,l=s-n,h=this["svgFactory"],c=h.createElement("svg"),d=(c.classList.add("quadrilateralsContainer"),c.setAttribute("width",0),c.setAttribute("height",0),h.createElement("defs")),u=(c.append(d),h.createElement("clipPath")),p="clippath_"+this.data.id;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(const[,{x:n,y:r},{x:o,y:c}]of t){const t=h.createElement("rect"),d=(o-i)/a,p=(s-r)/l,m=(n-o)/a,g=(r-c)/l;t.setAttribute("x",d),t.setAttribute("y",p),t.setAttribute("width",m),t.setAttribute("height",g),u.append(t),e?.push(``)}this.#Qe&&(e.push("')"),o.backgroundImage=e.join("")),this.container.append(c),this.container.style.clipPath=`url(#${p})`}}}_createPopup(){var{container:e,data:t}=this,e=(e.setAttribute("aria-haspopup","dialog"),new x({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:"popup_"+t.id,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(e.render())}render(){(0,u.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){var t=1{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}}class i extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!!(1(t&&this.linkService.goToDestination(t),!1),!t&&""!==t||this.#tn()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#tn()}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,t.content,t.filename),!1),this.#tn()}#Ze(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#tn()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){var n=i.get(r);n&&(e[n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#tn()}_bindResetFormAction(e,o){const a=e.onclick;a||(e.href=this.linkService.getAnchorUrl("")),this.#tn(),this._fieldObjects?e.onclick=()=>{a?.();const{fields:e,refs:t,include:i}=o,n=[];if(0!==e.length||0!==t.length){const o=new Set(t);for(const a of e){const e=this._fieldObjects[a]||[];for(const{id:a}of e)o.add(a)}for(const e of Object.values(this._fieldObjects))for(const a of e)o.has(a.id)===i&&n.push(a)}else for(const e of Object.values(this._fieldObjects))n.push(...e);var r=this.annotationStorage,s=[];for(const e of n){const o=e["id"];switch(s.push(o),e.type){case"text":{const a=e.defaultValue||"";r.setValue(o,{value:a});break}case"checkbox":case"radiobutton":{const a=e.defaultValue===e.exportValues;r.setValue(o,{value:a});break}case"combobox":case"listbox":{const a=e.defaultValue||"";r.setValue(o,{value:a});break}default:continue}const a=document.querySelector(`[data-element-id="${o}"]`);a&&(m.has(a)?a.dispatchEvent(new Event("resetform")):(0,u.warn)("_bindResetFormAction - element not allowed: "+o))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:s,name:"ResetForm"}}),!1}:((0,u.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),a||(e.onclick=()=>!1))}}class l extends n{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");var e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class f extends n{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&("CANVAS"===e.previousSibling?.nodeName&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){var{isWin:t,isMac:i}=u.FeatureTest.platform;return t&&e.ctrlKey||i&&e.metaKey}_setEventListener(e,t,i,n,r){i.includes("mouse")?e.addEventListener(i,e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(i,e=>{if("blur"===i){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===i){if(t.focused)return;t.focused=!0}r&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e)}})})}_setEventListeners(e,t,i,n){for(var[r,s]of i)"Action"!==s&&!this.data.actions?.[s]||("Focus"!==s&&"Blur"!==s||(t||={focused:!1}),this._setEventListener(e,t,r,s,n),"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":u.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],i=this.data.defaultAppearanceData["fontColor"],n=this.data.defaultAppearanceData.fontSize||9,r=e.style;let s;var o=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(u.LINE_FACTOR*n))||1);s=Math.min(n,o(t/u.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(n,o(e/u.LINE_FACTOR))}r.fontSize=`calc(${s}px * var(--scale-factor))`,r.color=u.Util.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(r.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class h extends f{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,i,n){var r=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=i),r.setValue(s.id,{[n]:i})}render(){const n=this.annotationStorage,l=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){var s=n.getValue(l,{value:this.data.fieldValue});let e=s.value||"";var o=n.getValue(l,{charLimit:this.data.maxLen}).charLimit;o&&e.length>o&&(e=e.slice(0,o));let t=s.formattedValue||this.data.textContent?.join("\n")||null;t&&this.data.comb&&(t=t.replaceAll(/\s+/g,""));const h={userValue:e,formattedValue:t,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?((r=document.createElement("textarea")).textContent=t??e,this.data.doNotScroll&&(r.style.overflowY="hidden")):((r=document.createElement("input")).type="text",r.setAttribute("value",t??e),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),m.add(r),r.setAttribute("data-element-id",l),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=1e3,this._setRequired(r,this.data.required),o&&(r.maxLength=o),r.addEventListener("input",e=>{n.setValue(l,{value:e.target.value}),this.setPropertyOnSiblings(r,"value",e.target.value,"value"),h.formattedValue=null}),r.addEventListener("resetform",e=>{var t=this.data.defaultFieldValue??"";r.value=h.userValue=t,h.formattedValue=null});let i=e=>{var t=h["formattedValue"];null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",e=>{h.focused||(e=e["target"],h.userValue&&(e.value=h.userValue),h.lastCommittedValue=e.value,h.commitKey=1,h.focused=!0)}),r.addEventListener("updatefromsandbox",e=>{this.showElementAndHideCanvas(e.target),this._dispatchEventFromSandbox({value(e){h.userValue=e.detail.value??"",n.setValue(l,{value:h.userValue.toString()}),e.target.value=h.userValue},formattedValue(e){var t=e.detail["formattedValue"];null!=(h.formattedValue=t)&&e.target!==document.activeElement&&(e.target.value=t),n.setValue(l,{formattedValue:t})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:t=>{var i=t.detail["charLimit"],t=t["target"];if(0===i)t.removeAttribute("maxLength");else{t.setAttribute("maxLength",i);let e=h.userValue;!e||e.length<=i||(e=e.slice(0,i),t.value=h.userValue=e,n.setValue(l,{value:e}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:e,willCommit:!0,commitKey:1,selStart:t.selectionStart,selEnd:t.selectionEnd}}))}}},e)}),r.addEventListener("keydown",e=>{let t=-(h.commitKey=1);var i;"Escape"===e.key?t=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(h.commitKey=3):t=2,-1!==t&&(i=e.target.value,h.lastCommittedValue!==i)&&(h.lastCommittedValue=i,h.userValue=i,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:i,willCommit:!0,commitKey:t,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});const a=i;i=null,r.addEventListener("blur",e=>{var t;h.focused&&e.relatedTarget&&(h.focused=!1,t=e.target["value"],h.userValue=t,h.lastCommittedValue!==t&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:t,willCommit:!0,commitKey:h.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),a(e))}),this.data.actions?.Keystroke&&r.addEventListener("beforeinput",e=>{h.lastCommittedValue=null;var{data:t,target:i}=e,{value:n,selectionStart:r,selectionEnd:s}=i;let o=r,a=s;switch(e.inputType){case"deleteWordBackward":{const e=n.substring(0,r).match(/\w*[^\w]*$/);e&&(o-=e[0].length);break}case"deleteWordForward":{const e=n.substring(r).match(/^[^\w]*\w*/);e&&(a+=e[0].length);break}case"deleteContentBackward":r===s&&--o;break;case"deleteContentForward":r===s&&(a+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:n,change:t||"",willCommit:!1,selStart:o,selEnd:a}})}),this._setEventListeners(r,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.value)}if(i&&r.addEventListener("blur",i),this.data.comb){const n=(this.data.rect[2]-this.data.rect[0])/o;r.classList.add("comb"),r.style.letterSpacing=`calc(${n}px * var(--scale-factor) - 1ch)`}}else(r=document.createElement("div")).textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class c extends f{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class v extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const n=this.annotationStorage,r=this.data,s=r.id;let e=n.getValue(s,{value:r.exportValue===r.fieldValue}).value;"string"==typeof e&&(e="Off"!==e,n.setValue(s,{value:e})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var t=document.createElement("input");return m.add(t),t.setAttribute("data-element-id",s),t.disabled=r.readOnly,this._setRequired(t,this.data.required),t.type="checkbox",t.name=r.fieldName,e&&t.setAttribute("checked",!0),t.setAttribute("exportValue",r.exportValue),t.tabIndex=1e3,t.addEventListener("change",e=>{var{name:t,checked:i}=e.target;for(const e of this._getElementsByName(t,s)){const s=i&&e.exportValue===r.exportValue;e.domElement&&(e.domElement.checked=s),n.setValue(e.id,{value:s})}n.setValue(s,{value:i})}),t.addEventListener("resetform",e=>{var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue}),this.enableScripting&&this.hasJSActions&&(t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value(e){e.target.checked="Off"!==e.detail.value,n.setValue(s,{value:e.target.checked})}},e)}),this._setEventListeners(t,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)),this._setBackgroundColor(t),this._setDefaultPropertiesFromJS(t),this.container.append(t),this.container}}class y extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const i=this.annotationStorage,n=this.data,r=n.id;let s=i.getValue(r,{value:n.fieldValue===n.buttonValue}).value;"string"==typeof s&&(s=s!==n.buttonValue,i.setValue(r,{value:s}));var e=document.createElement("input");if(m.add(e),e.setAttribute("data-element-id",r),e.disabled=n.readOnly,this._setRequired(e,this.data.required),e.type="radio",e.name=n.fieldName,s&&e.setAttribute("checked",!0),e.tabIndex=1e3,e.addEventListener("change",e=>{var{name:t,checked:e}=e.target;for(const e of this._getElementsByName(t,r))i.setValue(e.id,{value:!1});i.setValue(r,{value:e})}),e.addEventListener("resetform",e=>{var t=n.defaultFieldValue;e.target.checked=null!=t&&t===n.buttonValue}),this.enableScripting&&this.hasJSActions){const s=n.buttonValue;e.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value:e=>{var t=s===e.detail.value;for(const s of this._getElementsByName(e.target.name)){const e=t&&s.id===r;s.domElement&&(s.domElement.checked=e),i.setValue(s.id,{value:e})}}},e)}),this._setEventListeners(e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)}return this._setBackgroundColor(e),this._setDefaultPropertiesFromJS(e),this.container.append(e),this.container}}class b extends i{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){var e=super.render(),t=(e.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(e.title=this.data.alternativeText),e.lastChild);return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({},e)})),e}}class w extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const s=this.annotationStorage,o=this.data.id,e=s.getValue(o,{value:this.data.fieldValue}),a=document.createElement("select");m.add(a),a.setAttribute("data-element-id",o),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=1e3;let t=this.data.combo&&0{var t=this.data.defaultFieldValue;for(const e of a.options)e.selected=e.value===t});for(const s of this.data.options){const o=document.createElement("option");o.textContent=s.displayValue,o.value=s.exportValue,e.value.includes(s.exportValue)&&(o.setAttribute("selected",!0),t=!1),a.append(o)}let i=null;if(t){const s=document.createElement("option");s.value=" ",s.setAttribute("hidden",!0),s.setAttribute("selected",!0),a.prepend(s),i=()=>{s.remove(),a.removeEventListener("input",i),i=null},a.addEventListener("input",i)}const l=e=>{const t=e?"value":"textContent",{options:i,multiple:n}=a;return n?Array.prototype.filter.call(i,e=>e.selected).map(e=>e[t]):-1===i.selectedIndex?null:i[i.selectedIndex][t]};let h=l(!1);const c=e=>{e=e.target.options;return Array.prototype.map.call(e,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value(e){i?.();var e=e.detail.value,t=new Set(Array.isArray(e)?e:[e]);for(const s of a.options)s.selected=t.has(s.value);s.setValue(o,{value:l(!0)}),h=l(!1)},multipleSelection(e){a.multiple=!0},remove(e){var t=a.options,i=e.detail.remove;t[i].selected=!1,a.remove(i),0e.selected)&&(t[0].selected=!0),s.setValue(o,{value:l(!0),items:c(e)}),h=l(!1)},clear(e){for(;0!==a.length;)a.remove(0);s.setValue(o,{value:null,items:[]}),h=l(!1)},insert(e){var{index:t,displayValue:i,exportValue:n}=e.detail.insert,t=a.children[t],r=document.createElement("option");r.textContent=i,r.value=n,t?t.before(r):a.append(r),s.setValue(o,{value:l(!0),items:c(e)}),h=l(!1)},items(e){const t=e.detail["items"];for(;0!==a.length;)a.remove(0);for(const s of t){const{displayValue:o,exportValue:e}=s,t=document.createElement("option");t.textContent=o,t.value=e,a.append(t)}0{var t=l(!0);s.setValue(o,{value:t}),e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:o,name:"Keystroke",value:h,changeEx:t,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(a,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],e=>e.target.value)):a.addEventListener("input",function(e){s.setValue(o,{value:l(!0)})}),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class x extends n{constructor(e){var{data:t,elements:i}=e;super(e,{isRenderable:n._hasPopupData(t)}),this.elements=i}render(){this.container.classList.add("popupAnnotation");var e=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const i of this.elements)i.popup=e,t.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(e=>""+u.AnnotationPrefix+e).join(",")),this.container}}class S{#en=null;#nn=this.#in.bind(this);#rn=this.#sn.bind(this);#an=this.#on.bind(this);#ln=this.#cn.bind(this);#Ue=null;#Rt=null;#hn=null;#dn=null;#un=null;#pn=null;#fn=!1;#gn=null;#mn=null;#bn=null;#vn=null;#yn=!1;constructor(e){var{container:e,color:t,elements:i,titleObj:n,modificationDate:r,contentsObj:s,richText:o,parent:a,rect:l,parentRect:h,open:c}=e,e=(this.#Rt=e,this.#vn=n,this.#hn=s,this.#bn=o,this.#un=a,this.#Ue=t,this.#mn=l,this.#pn=h,this.#dn=i,d.PDFDateString.toDateObject(r));e&&(this.#en=a.l10n.get("annotation_date_string",{date:e.toLocaleDateString(),time:e.toLocaleTimeString()})),this.trigger=i.flatMap(e=>e.getElementsToTriggerPopup());for(const e of this.trigger)e.addEventListener("click",this.#ln),e.addEventListener("mouseenter",this.#an),e.addEventListener("mouseleave",this.#rn),e.classList.add("popupTriggerArea");for(const e of i)e.container?.addEventListener("keydown",this.#nn);this.#Rt.hidden=!0,c&&this.#cn()}render(){if(!this.#gn){const{page:{view:s},viewport:{rawDims:{pageWidth:o,pageHeight:a,pageX:l,pageY:h}}}=this.#un,c=this.#gn=document.createElement("div");if(c.className="popup",this.#Ue){const s=c.style.outlineColor=u.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))c.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`;else{const s=.7;c.style.backgroundColor=u.Util.makeHexColor(...this.#Ue.map(e=>Math.floor(.7*(255-e)+e)))}}var i=document.createElement("span"),n=(i.className="header",document.createElement("h1"));if(i.append(n),{dir:n.dir,str:n.textContent}=this.#vn,c.append(i),this.#en){const s=document.createElement("span");s.classList.add("popupDate"),this.#en.then(e=>{s.textContent=e}),i.append(s)}n=this.#hn,i=this.#bn;if(!i?.str||n?.str&&n.str!==i.str){const s=this._formatContents(n);c.append(s)}else p.XfaLayer.render({xfaHtml:i.html,intent:"richText",div:c}),c.lastChild.classList.add("richText","popupContent");let e=!!this.#pn,t=e?this.#pn:this.#mn;for(const s of this.#dn)if(!t||null!==u.Util.intersect(s.data.rect,t)){t=s.data.rect,e=!0;break}var n=u.Util.normalizeRect([t[0],s[3]-t[1]+s[1],t[2],s[3]-t[3]+s[1]]),i=e?t[2]-t[0]+5:0,i=n[0]+i,n=n[1],r=this.#Rt["style"];r.left=100*(i-l)/o+"%",r.top=100*(n-h)/a+"%",this.#Rt.append(c)}}_formatContents(e){let{str:t,dir:i}=e;var n=document.createElement("p"),r=(n.classList.add("popupContent"),n.dir=i,t.split(/(?:\r\n?|\n)/));for(let e=0,t=r.length;e{"Enter"===e.key&&(n?e.metaKey:e.ctrlKey)&&this.#Cn()}),!t.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return this.#wn}addHighlightArea(){this.container.classList.add("highlightArea")}#Cn(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}e.AnnotationLayer=class{#Se=null;#Tn=null;#Pn=new Map;constructor(e){var{div:e,accessibilityManager:t,annotationCanvasMap:i,l10n:n,page:r,viewport:s}=e;this.div=e,this.#Se=t,this.#Tn=i,this.l10n=n,this.page=r,this.viewport=s,this.zIndex=0,this.l10n||=o.NullL10n}#kn(e,t){var i=e.firstChild||e;i.id=""+u.AnnotationPrefix+t,this.div.append(e),this.#Se?.moveElementInDOM(this.div,e,i,!1)}async render(e){const t=e["annotations"],i=this.div;(0,d.setLayerDimensions)(i,this.viewport);var n=new Map,r={data:null,layer:i,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new d.DOMSVGFactory,annotationStorage:e.annotationStorage||new s.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const e of t)if(!e.noHTML){const t=e.annotationType===u.AnnotationType.POPUP;if(t){const t=n.get(e.id);if(!t)continue;r.elements=t}else{const{width:t,height:i}=g(e.rect);if(t<=0||i<=0)continue}r.data=e;const i=a.create(r);if(i.isRenderable){if(!t&&e.popupRef){const t=n.get(e.popupRef);t?t.push(i):n.set(e.popupRef,[i])}0{function i(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function r(e){return Math.max(0,Math.min(255,255*e))}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){var[e,t,i,n]=e;return["G",1-Math.min(1,.3*e+.59*i+.11*t+n)]}static G_CMYK(e){var[e]=e;return["CMYK",0,0,0,1-e]}static G_RGB(e){var[e]=e;return["RGB",e,e,e]}static G_rgb(e){var[e]=e;return[e=r(e),e,e]}static G_HTML(e){var[e]=e,e=i(e);return"#"+e+e+e}static RGB_G(e){var[e,t,i]=e;return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(r)}static RGB_HTML(e){return"#"+e.map(i).join("")}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(e){var[e,t,i,n]=e;return["RGB",1-Math.min(1,e+n),1-Math.min(1,i+n),1-Math.min(1,t+n)]}static CMYK_rgb(e){var[e,t,i,n]=e;return[r(1-Math.min(1,e+n)),r(1-Math.min(1,i+n)),r(1-Math.min(1,t+n))]}static CMYK_HTML(e){e=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(e){var[e,t,i]=e,e=1-e,t=1-t,i=1-i;return["CMYK",e,t,i,Math.min(e,t,i)]}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=n;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative",print_progress_percent:"{{progress}}%"};function n(e,t){switch(e){case"find_match_count":e=`find_match_count[${1===t.total?"one":"other"}]`;break;case"find_match_count_limit":e=`find_match_count_limit[${1===t.limit?"one":"other"}]`}return i[e]||""}t.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(e){var i,t=1t in i?i[t]:"{{"+t+"}}"):e},async translate(e){}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0,i(89);var d=i(194);t.XfaLayer=class{static setupStorage(e,t,i,n,r){var s=n.getValue(t,{value:null});switch(i.name){case"textarea":null!==s.value&&(e.textContent=s.value),"print"!==r&&e.addEventListener("input",e=>{n.setValue(t,{value:e.target.value})});break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(s.value===i.attributes.xfaOn?e.setAttribute("checked",!0):s.value===i.attributes.xfaOff&&e.removeAttribute("checked"),"print"===r)break;e.addEventListener("change",e=>{n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(null!==s.value&&e.setAttribute("value",s.value),"print"===r)break;e.addEventListener("input",e=>{n.setValue(t,{value:e.target.value})})}break;case"select":if(null!==s.value){e.setAttribute("value",s.value);for(const e of i.children)e.attributes.value===s.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",e=>{e=e.target.options,e=-1===e.selectedIndex?"":e[e.selectedIndex].value;n.setValue(t,{value:e})})}}static setAttributes(e){let{html:t,element:i,storage:n=null,intent:r,linkService:s}=e;var o=i["attributes"],a=t instanceof HTMLAnchorElement;"radio"===o.type&&(o.name=o.name+"-"+r);for(const[e,i]of Object.entries(o))if(null!=i)switch(e){case"class":i.length&&t.setAttribute(e,i.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",i);break;case"style":Object.assign(t.style,i);break;case"textContent":t.textContent=i;break;default:a&&("href"===e||"newWindow"===e)||t.setAttribute(e,i)}a&&s.addLinkAttributes(t,o.href,o.newWindow),n&&o.dataId&&this.setupStorage(t,o.dataId,i,n)}static render(e){const t=e.annotationStorage,i=e.linkService,n=e.xfaHtml,r=e.intent||"display",s=document.createElement(n.name),o=(n.attributes&&this.setAttributes({html:s,element:n,intent:r,linkService:i}),[[n,-1,s]]),a=e.div;if(a.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;a.style.transform=t}"richText"!==r&&a.setAttribute("class","xfaLayer xfaFont");for(var l=[];0{Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,i(89),i(2);var g=i(1),f=i(164),v=i(198),n=i(168),o=i(165);class y extends f.AnnotationEditor{#Fn=0;#Rn=0;#Dn=this.canvasPointermove.bind(this);#In=this.canvasPointerleave.bind(this);#On=this.canvasPointerup.bind(this);#Ln=this.canvasPointerdown.bind(this);#Nn=new Path2D;#Bn=!1;#jn=!1;#Un=!1;#zn=null;#Wn=0;#Hn=0;#qn=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e){f.AnnotationEditor.initialize(e,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(e,t){switch(e){case g.AnnotationEditorParamsType.INK_THICKNESS:y._defaultThickness=t;break;case g.AnnotationEditorParamsType.INK_COLOR:y._defaultColor=t;break;case g.AnnotationEditorParamsType.INK_OPACITY:y._defaultOpacity=t/100}}updateParams(e,t){switch(e){case g.AnnotationEditorParamsType.INK_THICKNESS:this.#Gn(t);break;case g.AnnotationEditorParamsType.INK_COLOR:this.#Ve(t);break;case g.AnnotationEditorParamsType.INK_OPACITY:this.#Vn(t)}}static get defaultPropertiesToUpdate(){return[[g.AnnotationEditorParamsType.INK_THICKNESS,y._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,y._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*y._defaultOpacity)]]}get propertiesToUpdate(){return[[g.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||y._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,this.color||y._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??y._defaultOpacity))]]}#Gn(e){const t=this.thickness;this.addCommands({cmd:()=>{this.thickness=e,this.#$n()},undo:()=>{this.thickness=t,this.#$n()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ve(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,this.#Xn()},undo:()=>{this.color=t,this.#Xn()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Vn(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,this.#Xn()},undo:()=>{this.opacity=t,this.#Xn()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div)&&(this.canvas||(this.#Kn(),this.#Yn()),this.isAttachedToDOM||(this.parent.add(this),this.#Jn()),this.#$n())}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#zn.disconnect(),this.#zn=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){var[e,t]=this.parentDimensions,e=this.width*e,t=this.height*t;this.setDimensions(e,t)}enableEditMode(){this.#Bn||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#Ln))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Ln))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qn(){var{parentRotation:e,parentDimensions:[t,i]}=this;switch(e){case 90:return[0,i,i,t];case 180:return[t,i,t,i];case 270:return[t,0,i,t];default:return[0,0,t,i]}}#Zn(){var{ctx:e,color:t,opacity:i,thickness:n,parentScale:r,scaleFactor:s}=this;e.lineWidth=n*r/s,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=""+t+(0,o.opacityToHex)(i)}#ti(e,t){this.canvas.addEventListener("contextmenu",n.noContextMenu),this.canvas.addEventListener("pointerleave",this.#In),this.canvas.addEventListener("pointermove",this.#Dn),this.canvas.addEventListener("pointerup",this.#On),this.canvas.removeEventListener("pointerdown",this.#Ln),this.isEditing=!0,this.#Un||(this.#Un=!0,this.#Jn(),this.thickness||=y._defaultThickness,this.color||=y._defaultColor||f.AnnotationEditor._defaultLineColor,this.opacity??=y._defaultOpacity),this.currentPath.push([e,t]),this.#jn=!1,this.#Zn(),this.#qn=()=>{this.#ei(),this.#qn&&window.requestAnimationFrame(this.#qn)},window.requestAnimationFrame(this.#qn)}#ni(t,i){var[n,e]=this.currentPath.at(-1);if(!(1{this.allRawPaths.push(r),this.paths.push(i),this.bezierPath2D.push(n),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Kn(),this.#Yn()),this.#$n())},mustExec:!0})}#ei(){if(this.#jn){this.#jn=!1;Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map(e=>e[0]),i=e.map(e=>e[1]),n=(Math.min(...t),Math.max(...t),Math.min(...i),Math.max(...i),this)["ctx"];n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);for(const r of this.bezierPath2D)n.stroke(r);n.stroke(this.#Nn),n.restore()}}#ii(e,t,i,n,r,s,o){t=(t+n)/2,i=(i+r)/2,s=(n+s)/2,o=(r+o)/2;e.bezierCurveTo(t+2*(n-t)/3,i+2*(r-i)/3,s+2*(n-s)/3,o+2*(r-o)/3,s,o)}#ai(){var e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];var t=[];let i,[n,r]=e[0];for(i=1;i{this.canvas.removeEventListener("contextmenu",n.noContextMenu)},10),this.#si(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#Kn(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",f.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(e=>this.canvas?.setAttribute("aria-label",e)),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Yn(){this.#zn=new ResizeObserver(e=>{e=e[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)}),this.#zn.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bn}render(){if(!this.div){let e,t;this.width&&(e=this.x,t=this.y),super.render(),f.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(e=>this.div?.setAttribute("aria-label",e));const[i,n,r,s]=this.#Qn();if(this.setAt(i,n,0,0),this.setDims(r,s),this.#Kn(),this.width){const[i,n]=this.parentDimensions;this.setAspectRatio(this.width*i,this.height*n),this.setAt(e*i,t*n,this.width*i,this.height*n),this.#Un=!0,this.#Jn(),this.setDims(this.width*i,this.height*n),this.#Xn(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();this.#Yn()}return this.div}#Jn(){var e,t;this.#Un&&([e,t]=this.parentDimensions,this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#oi())}setDimensions(e,t){var i=Math.round(e),n=Math.round(t);this.#Wn===i&&this.#Hn===n||(this.#Wn=i,this.#Hn=n,this.canvas.style.visibility="hidden",[i,n]=this.parentDimensions,this.width=e/i,this.height=t/n,this.fixAndSetPosition(),this.#Bn&&this.#ci(e,t),this.#Jn(),this.#Xn(),this.canvas.style.visibility="visible",this.fixDims())}#ci(e,t){var i=this.#hi(),e=(e-i)/this.#Rn,t=(t-i)/this.#Fn;this.scaleFactor=Math.min(e,t)}#oi(){var e=this.#hi()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#di(i){var n=new Path2D;for(let e=0,t=i.length;e{Object.defineProperty(t,"__esModule",{value:!0}),t.StampEditor=void 0,i(149),i(152);var s=i(1),n=i(164),o=i(168),a=i(198);class r extends n.AnnotationEditor{#mi=null;#bi=null;#vi=null;#yi=null;#_i=null;#Ai=null;#zn=null;#Si=null;#Ei=!1;#xi=!1;static _type="stamp";constructor(e){super({...e,name:"stampEditor"}),this.#yi=e.bitmapUrl,this.#_i=e.bitmapFile}static initialize(e){n.AnnotationEditor.initialize(e)}static get supportedTypes(){return(0,s.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(e=>"image/"+e))}static get supportedTypesStr(){return(0,s.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(s.AnnotationEditorType.STAMP,{bitmapFile:e.getAsFile()})}#wi(e){var t=1this.#wi(e,!0)).finally(()=>this.#Ci());else if(this.#yi){const t=this.#yi;this.#yi=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromUrl(t).then(e=>this.#wi(e)).finally(()=>this.#Ci()))}else if(this.#_i){const t=this.#_i;this.#_i=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromFile(t).then(e=>this.#wi(e)).finally(()=>this.#Ci()))}else{const t=document.createElement("input");t.type="file",t.accept=r.supportedTypesStr,this.#vi=new Promise(e=>{t.addEventListener("change",async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this.#wi(e)}else this.remove();e()}),t.addEventListener("cancel",()=>{this.remove(),e()})}).finally(()=>this.#Ci()),t.click()}}remove(){this.#bi&&(this.#mi=null,this._uiManager.imageManager.deleteId(this.#bi),this.#Ai?.remove(),this.#Ai=null,this.#zn?.disconnect(),this.#zn=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#bi&&this.#Ti(),this.isAttachedToDOM||this.parent.add(this))):this.#bi&&this.#Ti()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#vi||this.#mi||this.#yi||this.#_i)}get isResizable(){return!0}render(){if(!this.div){let e,t;var i,n;this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.#mi?this.#Kn():this.#Ti(),this.width&&([i,n]=this.parentDimensions,this.setAt(e*i,t*n,this.width*i,this.height*n))}return this.div}#Kn(){const e=this["div"];let{width:t,height:i}=this.#mi;var[n,r]=this.pageDimensions;if(this.width)t=this.width*n,i=this.height*r;else if(t>.75*n||i>.75*r){const e=Math.min(.75*n/t,.75*r/i);t*=e,i*=e}var[s,o]=this.parentDimensions,s=(this.setDims(t*s/n,i*o/r),this._uiManager.enableWaiting(!1),this.#Ai=document.createElement("canvas"));e.append(s),e.hidden=!1,this.#Pi(t,i),this.#Yn(),this.#xi||(this.parent.addUndoableEditor(this),this.#xi=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#ki(e,t){var[i,n]=this.parentDimensions;this.width=e/i,this.height=t/n,this.setDims(e,t),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),(this._initialOptions=null)!==this.#Si&&clearTimeout(this.#Si),this.#Si=setTimeout(()=>{this.#Si=null,this.#Pi(e,t)},200)}#Mi(e,t){const{width:i,height:n}=this.#mi;let r=i,s=n,o=this.#mi;for(;r>2*e||s>2*t;){const i=r,n=s;r>2*e&&(r=16384<=r?Math.floor(r/2)-1:Math.ceil(r/2)),s>2*t&&(s=16384<=s?Math.floor(s/2)-1:Math.ceil(s/2));var a=new OffscreenCanvas(r,s);a.getContext("2d").drawImage(o,0,0,i,n,0,0,r,s),o=a.transferToImageBitmap()}return o}#Pi(e,t){e=Math.ceil(e),t=Math.ceil(t);var i,n=this.#Ai;!n||n.width===e&&n.height===t||(n.width=e,n.height=t,i=this.#Ei?this.#mi:this.#Mi(e,t),(n=n.getContext("2d")).filter=this._uiManager.hcmFilter,n.drawImage(i,0,0,i.width,i.height,0,0,e,t))}#Fi(e){if(e){if(this.#Ei){const e=this._uiManager.imageManager.getSvgUrl(this.#bi);if(e)return e}const e=document.createElement("canvas");return{width:e.width,height:e.height}=this.#mi,e.getContext("2d").drawImage(this.#mi,0,0),e.toDataURL()}if(this.#Ei){const[e,t]=this.pageDimensions,i=Math.round(this.width*e*o.PixelsPerInch.PDF_TO_CSS_UNITS),n=Math.round(this.height*t*o.PixelsPerInch.PDF_TO_CSS_UNITS),r=new OffscreenCanvas(i,n);return r.getContext("2d").drawImage(this.#mi,0,0,this.#mi.width,this.#mi.height,0,0,i,n),r.transferToImageBitmap()}return structuredClone(this.#mi)}#Yn(){this.#zn=new ResizeObserver(e=>{e=e[0].contentRect;e.width&&e.height&&this.#ki(e.width,e.height)}),this.#zn.observe(this.div)}static deserialize(e,t,i){var n,r,s,o;return e instanceof a.StampAnnotationElement?null:(t=super.deserialize(e,t,i),{rect:e,bitmapUrl:n,bitmapId:o,isSvg:r,accessibilityData:s}=e,[i,o]=(o&&i.imageManager.isValidId(o)?t.#bi=o:t.#yi=n,t.#Ei=r,t.pageDimensions),t.width=(e[2]-e[0])/i,t.height=(e[3]-e[1])/o,s&&(t.altTextData=s),t)}serialize(){let e=0e.area&&(e.area=n,e.serialized.bitmap.close(),e.serialized.bitmap=this.#Fi(!1))}}else t.stamps.set(this.#bi,{area:n,serialized:i}),i.bitmap=this.#Fi(!1)}}return i}}t.StampEditor=r}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];return void 0!==t||(t=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e].call(t.exports,t,t.exports,__w_pdfjs_require__)),t.exports}var __webpack_exports__={};return(()=>{var e=__webpack_exports__,t=(Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return s.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return o.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"DOMSVGFactory",{enumerable:!0,get:function(){return n.DOMSVGFactory}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"ImageKind",{enumerable:!0,get:function(){return t.ImageKind}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return i.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return h.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return n.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"noContextMenu",{enumerable:!0,get:function(){return n.noContextMenu}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return r.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return n.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return r.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return i.version}}),__w_pdfjs_require__(1)),i=__w_pdfjs_require__(124),n=__w_pdfjs_require__(168),r=__w_pdfjs_require__(195),s=__w_pdfjs_require__(196),o=__w_pdfjs_require__(165),a=__w_pdfjs_require__(198),l=__w_pdfjs_require__(176),h=__w_pdfjs_require__(201)})(),__webpack_exports__})()),angular.module("ngPDFViewer",[]).directive("pdfviewer",["$window",function(I){const F=[.5,.75,1,1.25,1.5,2,3];return{restrict:"E",scope:{src:"@"},link:function(e,t){t=t[0];t.classList.add("pdf-viewer");let s=null,o=[],n=!1,i=null,r=1,a=1,l=0,h=0,c=612/792,d=0;const u=document.createElement("div"),p=(u.className="pdf-toolbar",document.createElement("div"));function m(e,t,i){var n=document.createElement("button");return n.type="button",n.className="pdf-toolbar-btn",n.title=t,n.setAttribute("aria-label",t),n.innerHTML='',n.addEventListener("click",i),n}p.className="pdf-pages",p.tabIndex=0,p.setAttribute("aria-label","PDF pages"),t.appendChild(u),t.appendChild(p);const g=m("fa-chevron-up","Previous page",function(){_(a-1)}),f=m("fa-chevron-down","Next page",function(){_(a+1)}),v=document.createElement("input"),y=(v.type="text",v.className="pdf-toolbar-page",v.setAttribute("aria-label","Page number"),v.title="Page number — type a page and press Enter",v.addEventListener("keydown",function(e){"Enter"===e.key&&(_(parseInt(v.value,10)),v.blur())}),v.addEventListener("blur",function(){v.value=String(a)}),document.createElement("span")),b=(y.className="pdf-toolbar-count",m("fa-search-minus","Zoom out",function(){$(F[Math.max(0,S()-1)])})),w=m("fa-search-plus","Zoom in",function(){$(F[Math.min(F.length-1,S()+1)])}),x=document.createElement("button");x.type="button",x.className="pdf-toolbar-btn pdf-toolbar-zoom",x.title="Reset zoom to fit the width",x.setAttribute("aria-label","Reset zoom to fit the width"),x.addEventListener("click",function(){$(1)}),u.appendChild(g),u.appendChild(f);t=document.createElement("span"),t.className="pdf-toolbar-group",t.appendChild(v),t.appendChild(y),u.appendChild(t),t=document.createElement("span");function S(){let t=0;for(let e=0;e=e,x.textContent=Math.round(100*r)+"%",b.disabled=0===S(),w.disabled=S()===F.length-1}function k(e){e=o[e-1];e&&(p.scrollTop+=e.getBoundingClientRect().top-p.getBoundingClientRect().top)}function _(e){s&&!isNaN(e)&&(e=Math.min(Math.max(1,e),s.numPages),o[e-1])&&(k(e),a=e,l=e,h=Date.now()+800,A(),E())}function C(){d++,i&&(clearTimeout(i),i=null),s&&(s.destroy(),s=null),o=[],a=1,p.innerHTML="",A()}function T(){var e=Math.max(120,p.clientWidth-24);return Math.round(Math.min(e,1e3)*r)}function E(){if(s){const a=d;var e=p.getBoundingClientRect();const i=e.top-400,n=e.top+p.clientHeight+400;o.forEach(function(o,e){var t;o.dataset.state||(t=o.getBoundingClientRect()).top>n||t.bottom'),i.srcdoc=e+t}}s.classList.add("html-doc"),r.$watch("content",t),r.$watch("baseUrl",t),r.$watch("allowScripts",t)}}}]),!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){"use strict";var D={d:function(e,t){for(var i in t)D.o(t,i)&&!D.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};D.d(t,{default:function(){return _n}});class O{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let i,n,r="KaTeX parse error: "+e;var s=t&&t.loc;if(s&&s.start<=s.end){const e=s.lexer.input,t=(i=s.start,n=s.end,i===e.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ",e.slice(i,n).replace(/[^]/g,"$&̲"));var s=15":">","<":"<",'"':""","'":"'"},H=/[&><"']/g;var C={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(H,e=>z[e])},hyphenate:function(e){return e.replace(B,"-$1").toLowerCase()},getBaseElem:N,isCharacterBox:function(e){e=N(e);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return e?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};const U={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class W{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const i in U){var t;U.hasOwnProperty(i)&&(t=U[i],this[i]=void 0!==e[i]?t.processor?t.processor(e[i]):e[i]:function(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(t))}}reportNonstrict(e,t,i){let n=this.strict;if((n="function"==typeof n?n(e,t,i):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new _("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"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,i){let n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){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+"]"):"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){const t=C.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class q{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return V[j[this.id]]}sub(){return V[G[this.id]]}fracNum(){return V[K[this.id]]}fracDen(){return V[X[this.id]]}cramp(){return V[Y[this.id]]}text(){return V[Q[this.id]]}isTight(){return 2<=this.size}}const V=[new q(0,0,!1),new q(1,0,!0),new q(2,1,!1),new q(3,1,!0),new q(4,2,!1),new q(5,2,!0),new q(6,3,!1),new q(7,3,!0)],j=[4,5,4,5,6,7,6,7],G=[5,5,5,5,7,7,7,7],K=[2,3,4,5,6,7,6,7],X=[3,3,5,5,7,7,7,7],Y=[1,1,3,3,5,5,7,7],Q=[0,1,2,3,2,3,2,3];var T={DISPLAY:V[0],TEXT:V[2],SCRIPT:V[4],SCRIPTSCRIPT:V[6]};const J=[{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]]}],Z=[];function ee(t){for(let e=0;e=Z[e]&&t<=Z[e+1])return 1}J.forEach(e=>e.blocks.forEach(e=>Z.push(...e)));const te={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 ie{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 C.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;ee.toText()).join("")}}var ne={"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]}};const re={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]},se={"Å":"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 oe(e,t,i){if(!ne[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),r=ne[t][n];if(!r&&e[0]in se&&(n=se[e[0]].charCodeAt(0),r=ne[t][n]),r||"text"!==i||ee(n)&&(r=ne[t][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}function ae(e,t){return t.size<2?e:he[e-1][t.size-1]}const le={},he=[[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]],ce=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class de{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||de.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=ce[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(const i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new de(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ae(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:ce[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=ae(de.BASESIZE,e);return this.size===t&&this.textSize===de.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let 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!==de.BASESIZE?["sizing","reset-size"+this.size,"size"+de.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t=5<=e?0:3<=e?1:2;if(!le[t]){const e=le[t]={cssEmPerMu:re.quad[t]/18};for(const i in re)re.hasOwnProperty(i)&&(e[i]=re[i][t])}return le[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}de.BASESIZE=6;var ue=de;function pe(e){return(e="string"!=typeof e?e.unit:e)in ye||e in be||"ex"===e}function E(e,t){let i;if(e.unit in ye)i=ye[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new _("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)}function me(e){return e.filter(e=>e).join(" ")}function ge(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}}function fe(e){var t=document.createElement(e);t.className=me(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e"}const ye={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},be={ex:!0,em:!0,mu:!0},M=function(e){return+e.toFixed(4)+"em"};class we{constructor(e,t,i,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,ge.call(this,e,i,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return C.contains(this.classes,e)}toNode(){return fe.call(this,"span")}toMarkup(){return ve.call(this,"span")}}class xe{constructor(e,t,i,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,ge.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return C.contains(this.classes,e)}toNode(){return fe.call(this,"a")}toMarkup(){return ve.call(this,"a")}}class Se{constructor(e,t,i){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=i}hasClass(e){return C.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=''+C.escape(this.alt)+'=n[0]&&t<=n[1])return i.name}}return null}(this.text.charCodeAt(0));e&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Ae[this.text])}hasClass(e){return C.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0")+n+"":n}}class ke{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e':''}}class Ce{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="","\\gt",!0),i(n,s,p,"∈","\\in",!0),i(n,s,p,"","\\@not"),i(n,s,p,"⊂","\\subset",!0),i(n,s,p,"⊃","\\supset",!0),i(n,s,p,"⊆","\\subseteq",!0),i(n,s,p,"⊇","\\supseteq",!0),i(n,e,p,"⊈","\\nsubseteq",!0),i(n,e,p,"⊉","\\nsupseteq",!0),i(n,s,p,"⊨","\\models"),i(n,s,p,"←","\\leftarrow",!0),i(n,s,p,"≤","\\le"),i(n,s,p,"≤","\\leq",!0),i(n,s,p,"<","\\lt",!0),i(n,s,p,"→","\\rightarrow",!0),i(n,s,p,"→","\\to"),i(n,e,p,"≱","\\ngeq",!0),i(n,e,p,"≰","\\nleq",!0),i(n,s,g," ","\\ "),i(n,s,g," ","\\space"),i(n,s,g," ","\\nobreakspace"),i(r,s,g," ","\\ "),i(r,s,g," "," "),i(r,s,g," ","\\space"),i(r,s,g," ","\\nobreakspace"),i(n,s,g,null,"\\nobreak"),i(n,s,g,null,"\\allowbreak"),i(n,s,Le,",",","),i(n,s,Le,";",";"),i(n,e,a,"⊼","\\barwedge",!0),i(n,e,a,"⊻","\\veebar",!0),i(n,s,a,"⊙","\\odot",!0),i(n,s,a,"⊕","\\oplus",!0),i(n,s,a,"⊗","\\otimes",!0),i(n,s,f,"∂","\\partial",!0),i(n,s,a,"⊘","\\oslash",!0),i(n,e,a,"⊚","\\circledcirc",!0),i(n,e,a,"⊡","\\boxdot",!0),i(n,s,a,"△","\\bigtriangleup"),i(n,s,a,"▽","\\bigtriangledown"),i(n,s,a,"†","\\dagger"),i(n,s,a,"⋄","\\diamond"),i(n,s,a,"⋆","\\star"),i(n,s,a,"◃","\\triangleleft"),i(n,s,a,"▹","\\triangleright"),i(n,s,u,"{","\\{"),i(r,s,f,"{","\\{"),i(r,s,f,"{","\\textbraceleft"),i(n,s,l,"}","\\}"),i(r,s,f,"}","\\}"),i(r,s,f,"}","\\textbraceright"),i(n,s,u,"{","\\lbrace"),i(n,s,l,"}","\\rbrace"),i(n,s,u,"[","\\lbrack",!0),i(r,s,f,"[","\\lbrack",!0),i(n,s,l,"]","\\rbrack",!0),i(r,s,f,"]","\\rbrack",!0),i(n,s,u,"(","\\lparen",!0),i(n,s,l,")","\\rparen",!0),i(r,s,f,"<","\\textless",!0),i(r,s,f,">","\\textgreater",!0),i(n,s,u,"⌊","\\lfloor",!0),i(n,s,l,"⌋","\\rfloor",!0),i(n,s,u,"⌈","\\lceil",!0),i(n,s,l,"⌉","\\rceil",!0),i(n,s,f,"\\","\\backslash"),i(n,s,f,"∣","|"),i(n,s,f,"∣","\\vert"),i(r,s,f,"|","\\textbar",!0),i(n,s,f,"∥","\\|"),i(n,s,f,"∥","\\Vert"),i(r,s,f,"∥","\\textbardbl"),i(r,s,f,"~","\\textasciitilde"),i(r,s,f,"\\","\\textbackslash"),i(r,s,f,"^","\\textasciicircum"),i(n,s,p,"↑","\\uparrow",!0),i(n,s,p,"⇑","\\Uparrow",!0),i(n,s,p,"↓","\\downarrow",!0),i(n,s,p,"⇓","\\Downarrow",!0),i(n,s,p,"↕","\\updownarrow",!0),i(n,s,p,"⇕","\\Updownarrow",!0),i(n,s,c,"∐","\\coprod"),i(n,s,c,"⋁","\\bigvee"),i(n,s,c,"⋀","\\bigwedge"),i(n,s,c,"⨄","\\biguplus"),i(n,s,c,"⋂","\\bigcap"),i(n,s,c,"⋃","\\bigcup"),i(n,s,c,"∫","\\int"),i(n,s,c,"∫","\\intop"),i(n,s,c,"∬","\\iint"),i(n,s,c,"∭","\\iiint"),i(n,s,c,"∏","\\prod"),i(n,s,c,"∑","\\sum"),i(n,s,c,"⨂","\\bigotimes"),i(n,s,c,"⨁","\\bigoplus"),i(n,s,c,"⨀","\\bigodot"),i(n,s,c,"∮","\\oint"),i(n,s,c,"∯","\\oiint"),i(n,s,c,"∰","\\oiiint"),i(n,s,c,"⨆","\\bigsqcup"),i(n,s,c,"∫","\\smallint"),i(r,s,$e,"…","\\textellipsis"),i(n,s,$e,"…","\\mathellipsis"),i(r,s,$e,"…","\\ldots",!0),i(n,s,$e,"…","\\ldots",!0),i(n,s,$e,"⋯","\\@cdots",!0),i(n,s,$e,"⋱","\\ddots",!0),i(n,s,f,"⋮","\\varvdots"),i(n,s,o,"ˊ","\\acute"),i(n,s,o,"ˋ","\\grave"),i(n,s,o,"¨","\\ddot"),i(n,s,o,"~","\\tilde"),i(n,s,o,"ˉ","\\bar"),i(n,s,o,"˘","\\breve"),i(n,s,o,"ˇ","\\check"),i(n,s,o,"^","\\hat"),i(n,s,o,"⃗","\\vec"),i(n,s,o,"˙","\\dot"),i(n,s,o,"˚","\\mathring"),i(n,s,h,"","\\@imath"),i(n,s,h,"","\\@jmath"),i(n,s,f,"ı","ı"),i(n,s,f,"ȷ","ȷ"),i(r,s,f,"ı","\\i",!0),i(r,s,f,"ȷ","\\j",!0),i(r,s,f,"ß","\\ss",!0),i(r,s,f,"æ","\\ae",!0),i(r,s,f,"œ","\\oe",!0),i(r,s,f,"ø","\\o",!0),i(r,s,f,"Æ","\\AE",!0),i(r,s,f,"Œ","\\OE",!0),i(r,s,f,"Ø","\\O",!0),i(r,s,o,"ˊ","\\'"),i(r,s,o,"ˋ","\\`"),i(r,s,o,"ˆ","\\^"),i(r,s,o,"˜","\\~"),i(r,s,o,"ˉ","\\="),i(r,s,o,"˘","\\u"),i(r,s,o,"˙","\\."),i(r,s,o,"¸","\\c"),i(r,s,o,"˚","\\r"),i(r,s,o,"ˇ","\\v"),i(r,s,o,"¨",'\\"'),i(r,s,o,"˝","\\H"),i(r,s,o,"◯","\\textcircled");const Ie={"--":!0,"---":!0,"``":!0,"''":!0};i(r,s,f,"–","--",!0),i(r,s,f,"–","\\textendash"),i(r,s,f,"—","---",!0),i(r,s,f,"—","\\textemdash"),i(r,s,f,"‘","`",!0),i(r,s,f,"‘","\\textquoteleft"),i(r,s,f,"’","'",!0),i(r,s,f,"’","\\textquoteright"),i(r,s,f,"“","``",!0),i(r,s,f,"“","\\textquotedblleft"),i(r,s,f,"”","''",!0),i(r,s,f,"”","\\textquotedblright"),i(n,s,f,"°","\\degree",!0),i(r,s,f,"°","\\degree"),i(r,s,f,"°","\\textdegree",!0),i(n,s,f,"£","\\pounds"),i(n,s,f,"£","\\mathsterling",!0),i(r,s,f,"£","\\pounds"),i(r,s,f,"£","\\textsterling",!0),i(n,e,f,"✠","\\maltese"),i(r,e,f,"✠","\\maltese");var Fe='0123456789/@."';for(let e=0;ei&&(i=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}t.height=i,t.depth=n,t.maxFontSize=r}function y(e,t,i,n){return e=new we(e,t,i,n),Be(e),e}function ze(e){return e=new ie(e),Be(e),e}function He(e,t,i){let 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"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}const Ue=[["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"]],We=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],qe=(e,t,i,n)=>new we(e,t,i,n),Ve={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"}},je={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var R={fontMap:Ve,makeSymbol:Ne,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&Oe(e,"Main-Bold",t).metrics?Ne(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===d[t][e].font?Ne(e,"Main-Regular",t,i,n):Ne(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},makeSpan:y,makeSvgSpan:qe,makeLineSpan:function(e,t,i){e=y([e],[],t);return e.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=M(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,i,n){e=new xe(e,t,i,n);return Be(e),e},makeFragment:ze,wrapFragment:function(e,t){return e instanceof ie?y([],[e],t):e},makeVList:function(t,i){const{children:n,depth:r}=function(i){if("individualShift"===i.positionType){const s=i.children,a=[s[0]],l=-s[0].shift-s[0].elem.depth;let t=l;for(let e=1;e{var i=y(["mspace"],[],t),e=E(e,t);return i.style.marginRight=M(e),i},staticSvg:function(e,t){var[e,i,n]=je[e],e=new _e(e),e=new ke([e],{width:M(i),height:M(n),style:"width:"+M(i),viewBox:"0 0 "+1e3*i+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),e=qe(["overlay"],[e],t);return e.height=n,e.style.height=M(n),e.style.width=M(i),e},svgData:je,tryCombineChars:t=>{for(let e=0;e{if(me(e.classes)!==me(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const i in e.style)if(e.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;for(const n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0})(i,n)&&(i.text+=n.text,i.height=Math.max(i.height,n.height),i.depth=Math.max(i.depth,n.depth),i.italic=n.italic,t.splice(e+1,1),e--)}return t}};const b={number:3,unit:"mu"},Ge={number:4,unit:"mu"},Ke={number:5,unit:"mu"},Xe={mord:{mop:b,mbin:Ge,mrel:Ke,minner:b},mop:{mord:b,mop:b,mrel:Ke,minner:b},mbin:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mrel:{mord:Ke,mop:Ke,mopen:Ke,minner:Ke},mopen:{},mclose:{mop:b,mbin:Ge,mrel:Ke,minner:b},mpunct:{mord:b,mop:b,mrel:Ke,mopen:b,mclose:b,mpunct:b,minner:b},minner:{mord:b,mop:b,mbin:Ge,mrel:Ke,mopen:b,mpunct:b,minner:b}},Ye={mord:{mop:b},mop:{mord:b,mop:b},mbin:{},mrel:{},mopen:{},mclose:{mop:b},mpunct:{},minner:{mop:b}},Qe={},Je={},Ze={};function w(e){var{type:e,names:t,props:i,handler:n,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:i.numArgs,argTypes:i.argTypes,allowedInArgument:!!i.allowedInArgument,allowedInText:!!i.allowedInText,allowedInMath:void 0===i.allowedInMath||i.allowedInMath,numOptionalArgs:i.numOptionalArgs||0,infix:!!i.infix,primitive:!!i.primitive,handler:n};for(let e=0;e{var i=t.classes[0],n=e.classes[0];"mbin"===i&&C.contains(st,n)?t.classes[0]="mord":"mbin"===n&&C.contains(rt,i)&&(e.classes[0]="mord")},{node:o},r,e),lt(s,(e,t)=>{var t=dt(t),i=dt(e),e=t&&i?(e.hasClass("mtight")?Ye:Xe)[t][i]:null;if(e)return R.makeGlue(e,n)},{node:o},r,e)}return s}function it(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),nt(t.concat(e))}const nt=R.makeSpan,rt=["leftmost","mbin","mopen","mrel","mop","mpunct"],st=["rightmost","mrel","mclose","mpunct"],ot={display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT},at={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lt=function(i,e,t,n,r){n&&i.push(n);let s=0;for(;se=>{i.splice(t+1,0,e),s++})(s)}}n&&i.pop()},ht=function(e){return e instanceof ie||e instanceof xe||e instanceof we&&e.hasClass("enclosing")?e:null},ct=function(e,t){var i=ht(e);if(i){const e=i.children;if(e.length){if("right"===t)return ct(e[e.length-1],"right");if("left"===t)return ct(e[0],"left")}}return e},dt=function(e,t){return e&&(t&&(e=ct(e,t)),at[e.classes[0]])||null},L=function(t,i,n){if(!t)return nt();if(Je[t.type]){let e=Je[t.type](t,i);if(n&&i.size!==n.size){e=nt(i.sizingClasses(n),[e],i);const t=i.sizeMultiplier/n.sizeMultiplier;e.height*=t,e.depth*=t}return e}throw new _("Got group of unknown type: '"+t.type+"'")};function ut(e,t){e=nt(["base"],e,t),t=nt(["strut"]);return t.style.height=M(e.height+e.depth),e.depth&&(t.style.verticalAlign=M(-e.depth)),e.children.unshift(t),e}function pt(e,i){let t=null;1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body);var n=$(e,i,"root");let r;2===n.length&&n[1].hasClass("tag")&&(r=n.pop());var s=[];let o,a=[];for(let t=0;t"}toText(){return this.children.map(e=>e.toText()).join("")}}class gt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}var A={MathNode:S,TextNode:gt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",M(this.width)),e)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},newDocumentFragment:mt};function ft(e,t,i){return!d[t][e]||!d[t][e].replace||55349===e.charCodeAt(0)||Ie.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=d[t][e].replace),new A.TextNode(e)}function vt(e){return 1===e.length?e[0]:new A.MathNode("mrow",e)}function yt(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";if(!(t=t.font)||"mathnormal"===t)return null;var i=e.mode;if("mathit"===t)return"italic";if("boldsymbol"===t)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===t)return"bold";if("mathbb"===t)return"double-struck";if("mathfrak"===t)return"fraktur";if("mathscr"===t||"mathcal"===t)return"script";if("mathsf"===t)return"sans-serif";if("mathtt"===t)return"monospace";let n=e.text;return!C.contains(["\\imath","\\jmath"],n)&&oe(n=d[i][n]&&d[i][n].replace?d[i][n].replace:n,R.fontMap[t].fontName,i)?R.fontMap[t].variant:null}function k(t,i,e){if(1===t.length){const n=I(t[0],i);return e&&n instanceof S&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let r;for(let e=0;e{let e,s,o;n&&"supsub"===n.type?(s=F(n.base,"accent"),e=s.base,n.base=e,o=function(e){if(e instanceof we)return e;throw new Error("Expected span but got "+String(e)+".")}(L(n,r)),n.base=s):(s=F(n,"accent"),e=s.base);n=L(e,r.havingCrampedStyle());let a=0;if(s.isShifty&&C.isCharacterBox(e)){const n=C.getBaseElem(e);a=Te(L(n,r.havingCrampedStyle())).skew}var l="\\c"===s.label;let h,c=l?n.height+n.depth:Math.min(n.height,r.fontMetrics().xHeight);if(s.isStretchy)h=Ct(s,r),h=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0{var i=e.isStretchy?_t(e.label):new A.MathNode("mo",[ft(e.label,e.mode)]),e=new A.MathNode("mover",[I(e.base,t),i]);return e.setAttribute("accent","true"),e},$t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),Lt=(w({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 t=tt(t[0]),i=!$t.test(e.funcName),n=!i||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:i,isShifty:n,base:t}},htmlBuilder:Mt,mathmlBuilder:Rt}),w({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let i=e.parser.mode;return"math"===i&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),i="text"),{type:"accent",mode:i,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Mt,mathmlBuilder:Rt}),w({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:i}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:i,base:t}},htmlBuilder:(e,t)=>{var i=L(e.base,t),n=Ct(e,t),e="\\utilde"===e.label?.12:0,n=R.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:i}]},t);return R.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var i=_t(e.label),e=new A.MathNode("munder",[I(e.base,t),i]);return e.setAttribute("accentunder","true"),e}}),e=>{e=new A.MathNode("mpadded",e?[e]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),It=(w({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,i){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:i[0]}},htmlBuilder(e,t){var i=t.style,n=t.havingStyle(i.sup()),r=R.wrapFragment(L(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let o;r.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(i.sub()),(o=R.wrapFragment(L(e.below,n,t),t)).classes.push(s+"-arrow-pad"));i=Ct(e,t),n=-t.fontMetrics().axisHeight+.5*i.height;let a,l=-t.fontMetrics().axisHeight-.5*i.height-.111;if((.25{e="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family},Ot=(w({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){e=e.parser;return{type:"mclass",mode:e.mode,mclass:Dt(t[0]),body:x(t[1]),isCharacterBox:C.isCharacterBox(t[1])}}}),w({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:i}=e,n=t[1],t=t[0],r="\\stackrel"!==i?Dt(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:x(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===i?null:t,sub:"\\underset"===i?t:null};return{type:"mclass",mode:e.mode,mclass:r,body:[n],isCharacterBox:C.isCharacterBox(n)}},htmlBuilder:Ft,mathmlBuilder:Pt}),w({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"pmb",mode:e.mode,mclass:Dt(t[0]),body:x(t[0])}},htmlBuilder(e,t){var i=$(e.body,t,!0),e=R.makeSpan([e.mclass],i,t);return e.style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){e=k(e.body,t),t=new A.MathNode("mstyle",e);return t.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),Nt=e=>"textord"===e.type&&"@"===e.text;w({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:i}=e;return{type:"cdlabel",mode:e.mode,side:i.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),i=R.wrapFragment(L(e.label,i,t),t);return i.classes.push("cd-label-"+e.side),i.style.bottom=M(.8-i.depth),i.height=0,i.depth=0,i},mathmlBuilder(e,t){let i=new A.MathNode("mrow",[I(e.label,t)]);return(i=new A.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new A.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),w({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){e=e.parser;return{type:"cdlabelparent",mode:e.mode,fragment:t[0]}},htmlBuilder(e,t){e=R.wrapFragment(L(e.fragment,t),t);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new A.MathNode("mrow",[I(e.fragment,t)])}}),w({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e["parser"],i=F(t[0],"ordgroup").body;let n="";for(let e=0;e>10),56320+(1023&s))),{type:"textord",mode:e.mode,text:r}}});g=(e,t)=>{t=$(e.body,t.withColor(e.color),!1);return R.makeFragment(t)},Le=(e,t)=>{t=k(e.body,t.withColor(e.color)),t=new A.MathNode("mstyle",t);return t.setAttribute("mathcolor",e.color),t};w({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e["parser"],i=F(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:i,body:x(t)}},htmlBuilder:g,mathmlBuilder:Le}),w({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:i}=e,t=F(t[0],"color-token").color,i=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,i));return{type:"color",mode:e.mode,color:t,body:i}},htmlBuilder:g,mathmlBuilder:Le}),w({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var e=e["parser"],n="["===e.gullet.future().text?e.parseSizeGroup(!0):null,r=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:r,size:n&&F(n,"size").value}},htmlBuilder(e,t){var i=R.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size)&&(i.style.marginTop=M(E(e.size,t))),i},mathmlBuilder(e,t){var i=new A.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size)&&i.setAttribute("height",M(E(e.size,t))),i}});function Bt(e,t,i){if(i=oe(d.math[e]&&d.math[e].replace||e,t,i))return i;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function zt(e,t,i,n){return t=i.havingBaseStyle(t),n=R.makeSpan(n.concat(t.sizingClasses(i)),[e],i),e=t.sizeMultiplier/i.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n}function Ht(e,t,i){i=t.havingBaseStyle(i),i=(1-t.sizeMultiplier/i.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=M(i),e.height-=i,e.depth+=i}function Ut(e,t,i,n,r,s){return e=R.makeSymbol(e,"Size"+t+"-Regular",r,n),r=zt(R.makeSpan(["delimsizing","size"+t],[e],n),T.TEXT,n,s),i&&Ht(r,n,T.TEXT),r}function Wt(e,t,i){return{type:"elem",elem:R.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[R.makeSpan([],[R.makeSymbol(e,t,i)])])}}function qt(e,t,i){var n=(ne["Size4-Regular"][e.charCodeAt(0)]?ne["Size4-Regular"]:ne["Size1-Regular"])[e.charCodeAt(0)][4],e=new _e("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))),e=new ke([e],{width:M(n),height:M(t),style:"width:"+M(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=R.makeSvgSpan([],[e],i)).height=t,e.style.height=M(t),e.style.width=M(n),{type:"elem",elem:e}}function Vt(e,t,i,n,r,s){let o,a,l,h,c="",d=0,u=(o=l=h=e,a=null,"Size1-Regular");"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):C.contains(Zt,e)?(l="∣",c="vert",d=333):C.contains(ei,e)?(l="∥",c="doublevert",d=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",u="Size4-Regular",c="lbrack",d=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",u="Size4-Regular",c="rbrack",d=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",u="Size4-Regular",c="lfloor",d=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",u="Size4-Regular",c="lceil",d=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",u="Size4-Regular",c="rfloor",d=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",u="Size4-Regular",c="rceil",d=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",u="Size4-Regular",c="lparen",d=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",u="Size4-Regular",c="rparen",d=875):"\\{"===e||"\\lbrace"===e?(o="⎧",a="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",a="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",u="Size4-Regular");var e=Bt(o,u,r),p=e.height+e.depth,e=Bt(l,u,r),e=e.height+e.depth,m=(m=Bt(h,u,r)).height+m.depth;let g=0,f=1;if(null!==a){const e=Bt(a,u,r);g=e.height+e.depth,f=2}var v=(v=p+m+g)+Math.max(0,Math.ceil((t-v)/(f*e)))*f*e;let y=n.fontMetrics().axisHeight;i&&(y*=n.sizeMultiplier);var t=v/2-y,b=[];if(0n)return r[t]}return r[r.length-1]}function Kt(e,t,i,n,r,s){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),d=C.contains(ni,e)?si:C.contains(ti,e)?ai:oi;var o,a,l,h,c,d=Gt(e,t,d,n);return"small"===d.type?(o=e,a=d.style,l=i,h=n,c=s,o=R.makeSymbol(o,"Main-Regular",r,h),o=zt(o,a,h,c),l&&Ht(o,h,a),o):"large"===d.type?Ut(e,d.size,i,n,r,s):Vt(e,t,i,n,r,s)}const Xt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Yt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new _("Expected a control sequence",e);return t},Qt=(e,t,i,n)=>{let r=e.gullet.macros.get(i.text);null==r&&(i.noexpand=!0,r={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,r,n)},Jt=(w({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,i=(e.consumeSpaces(),e.fetch());if(Xt[i.text])return"\\global"!==t&&"\\\\globallong"!==t||(i.text=Xt[i.text]),F(e.parseFunction(),"internal");throw new _("Invalid token after macro prefix",i)}}),w({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:i}=e,n=t.gullet.popToken();e=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new _("Expected a control sequence",n);let r,s=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),o[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new _('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new _('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if("EOF"===n.text)throw new _("Expected a macro definition");o[s].push(n.text)}let a=t.gullet.consumeArg()["tokens"];return r&&a.unshift(r),"\\edef"!==i&&"\\xdef"!==i||(a=t.gullet.expandTokens(a)).reverse(),t.gullet.macros.set(e,{tokens:a,numArgs:s,delimiters:o},i===Xt[i]),{type:"internal",mode:t.mode}}}),w({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,i=Yt(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Qt(e,i,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),w({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,i=Yt(e.gullet.popToken()),n=e.gullet.popToken(),r=e.gullet.popToken();return Qt(e,i,r,"\\\\globalfuture"===t),e.gullet.pushToken(r),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Zt=["|","\\lvert","\\rvert","\\vert"],ei=["\\|","\\lVert","\\rVert","\\Vert"],ti=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ii=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ni=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ri=[0,1.2,1.8,2.4,3],si=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],oi=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"stack"}],ai=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var li={sqrtImage:function(e,t){var i=t.havingBaseSizing(),n=Gt("\\surd",e*i.sizeMultiplier,ai,i);let r=i.sizeMultiplier;i=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let s,o,a=0,l=0,h=0;return o="small"===n.type?(h=1e3+1e3*i+80,e<1?r=1:e<1.4&&(r=.7),a=(1+i+.08)/r,l=(1+i)/r,(s=jt("sqrtMain",a,h,i,t)).style.minWidth="0.853em",.833/r):"large"===n.type?(h=1080*ri[n.size],l=(ri[n.size]+i)/r,a=(ri[n.size]+i+.08)/r,(s=jt("sqrtSize"+n.size,a,h,i,t)).style.minWidth="1.02em",1/r):(a=e+i+.08,l=e+i,h=Math.floor(1e3*e+i)+80,(s=jt("sqrtTall",a,h,i,t)).style.minWidth="0.742em",1.056),s.height=l,s.style.height=M(a),{span:s,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+i)*r}},sizedDelim:function(e,t,i,n,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),C.contains(ti,e)||C.contains(ni,e))return Ut(e,t,!1,i,n,r);if(C.contains(ii,e))return Vt(e,ri[t],!1,i,n,r);throw new _("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:ri,customSizedDelim:Kt,leftRightDelim:function(e,t,i,n,r,s){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,t=Math.max(t-o,i+o),i=Math.max(t/500*901,2*t-a);return Kt(e,i,!0,n,r,s)}};const hi={"\\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}},ci=["(","\\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 di(e,t){var i=Et(e);if(i&&C.contains(ci,i.text))return i;throw new _(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function ui(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}w({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)=>{t=di(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hi[e.funcName].size,mclass:hi[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,t)=>"."===e.delim?R.makeSpan([e.mclass]):li.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(ft(e.delim,e.mode)),new A.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),M(li.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),w({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new _("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:di(t[0],e).text,color:i}}}),w({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=di(t[0],e),e=e.parser,i=(++e.leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),F(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:i,left:t.text,right:n.delim,rightColor:n.color}},htmlBuilder:(t,e)=>{ui(t);const i=$(t.body,e,!0,["mopen","mclose"]);let n,r,s=0,o=0,a=!1;for(let e=0;e{ui(e);var i=k(e.body,t);if("."!==e.left){const t=new A.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),i.unshift(t)}if("."!==e.right){const t=new A.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),i.push(t)}return vt(i)}}),w({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{t=di(t[0],e);if(e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new _("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let i;return"."===e.delim?i=it(t,[]):(i=li.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},i.isMiddle=e),i},mathmlBuilder:(e,t)=>{e="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),e=new A.MathNode("mo",[e]);return e.setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e}});a=(n,r)=>{const s=R.wrapFragment(L(n.body,r),r),o=n.label.slice(1);let a,e=r.sizeMultiplier,l=0;const h=C.isCharacterBox(n.body);if("sout"===o)(a=R.makeSpan(["stretchy","sout"])).height=r.fontMetrics().defaultRuleThickness/e,l=-.5*r.fontMetrics().xHeight;else if("phase"===o){const n=E({number:.6,unit:"pt"},r),o=E({number:.35,unit:"ex"},r),h=(e/=r.havingBaseSizing().sizeMultiplier,s.height+s.depth+n+o),C=(s.style.paddingLeft=M(h/2+n),Math.floor(1e3*h*e)),t="M400000 "+C+" H0 L"+C/2+" 0 l65 45 L145 "+(C-80)+" H400000z",i=new ke([new _e("phase",t)],{width:"400em",height:M(C/1e3),viewBox:"0 0 400000 "+C,preserveAspectRatio:"xMinYMin slice"});(a=R.makeSvgSpan(["hide-tail"],[i],r)).style.height=M(h),l=s.depth+n+o}else{/cancel/.test(o)?h||s.classes.push("cancel-pad"):"angl"===o?s.classes.push("anglpad"):s.classes.push("boxpad");let e=0,t=0,i=0;t=/box/.test(o)?(i=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),e=r.fontMetrics().fboxsep+("colorbox"===o?0:i)):"angl"===o?(i=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),e=4*i,Math.max(0,.25-s.depth)):e=h?.2:0,a=function(e,t,i,n,r){let s;n=e.height+e.depth+i+n;if(/fbox|color|angl/.test(t)){if(s=R.makeSpan(["stretchy",t],[],r),"fbox"===t){const e=r.color&&r.getColor();e&&(s.style.borderColor=e)}}else{const e=[],i=(/^[bx]cancel$/.test(t)&&e.push(new Ce({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Ce({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),new ke(e,{width:"100%",height:M(n)}));s=R.makeSvgSpan([],[i],r)}return s.height=n,s.style.height=M(n),s}(s,o,e,t,r),/fbox|boxed|fcolorbox/.test(o)?(a.style.borderStyle="solid",a.style.borderWidth=M(i)):"angl"===o&&.049!==i&&(a.style.borderTopWidth=M(i),a.style.borderRightWidth=M(i)),l=s.depth+t,n.backgroundColor&&(a.style.backgroundColor=n.backgroundColor,n.borderColor)&&(a.style.borderColor=n.borderColor)}let t;if(n.backgroundColor)t=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:0}]},r);else{const n=/cancel|phase/.test(o)?["svg-align"]:[];t=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:n}]},r)}return/cancel/.test(o)&&(t.height=s.height,t.depth=s.depth),/cancel/.test(o)&&!h?R.makeSpan(["mord","cancel-lap"],[t],r):R.makeSpan(["mord"],[t],r)},u=(e,t)=>{let i=0;var n=new A.MathNode(-1{if(!e.parser.settings.displayMode)throw new _("{"+e.envName+"} can be used only in display mode.")};function wi(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function xi(t,e,i){let{hskipBeforeAndAfter:n,addJot:r,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:u}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){const e=t.gullet.expandMacroAsText("\\arraystretch");if(null==e)o=1;else if(!(o=parseFloat(e))||o<0)throw new _("Invalid \\arraystretch: "+e)}t.gullet.beginGroup();let p=[];const m=[p],g=[],f=[],v=null!=l?[]:void 0;function y(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function b(){v&&(t.gullet.macros.get("\\df@tag")?(v.push(t.subparse([new vi("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(y(),f.push(yi(t));;){let e=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),e={type:"ordgroup",mode:t.mode,body:e},i&&(e={type:"styling",mode:t.mode,style:i,body:[e]}),p.push(e);const n=t.fetch().text;if("&"===n){if(d&&p.length===d){if(h||a)throw new _("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===n){b(),1===p.length&&"styling"===e.type&&0===e.body[0].body.length&&(1e))for(s=0;s=h)){(0e.length));return n.cols=new Array(r).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:Ai,mathmlBuilder:ki}),mi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){e=xi(e.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Ai,mathmlBuilder:ki}),mi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){t=(Et(t[0])?[t[0]]:F(t[0],"ordgroup").body).map(function(e){var t=Tt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new _("Unknown column alignment: "+t,e)});if(1AV".indexOf(h)))throw new _('Expected one of "<>AV=|." after @',a[n]);for(let i=0;i<2;i++){let t=!0;for(let e=n+1;e{var i=e.font,t=t.withFont(i);return L(e.body,t)},$i=(e,t)=>{var i=e.font,t=t.withFont(i);return I(e.body,t)},Li={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Ii=(w({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:e,funcName:i}=e,t=tt(t[0]);let n=i;return n in Li&&(n=Li[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:Ri,mathmlBuilder:$i}),w({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e["parser"],t=t[0],i=C.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Dt(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:i}}}),w({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:i,breakOnTokenText:n}=e,r=e["mode"],n=e.parseExpression(!0,n);return{type:"font",mode:r,font:"math"+i.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},htmlBuilder:Ri,mathmlBuilder:$i}),(e,t)=>{let i=t;return"display"===e?i=i.id>=T.SCRIPT.id?i.text():T.DISPLAY:"text"===e&&i.size===T.DISPLAY.size?i=T.TEXT:"script"===e?i=T.SCRIPT:"scriptscript"===e&&(i=T.SCRIPTSCRIPT),i}),Fi=(e,t)=>{const i=Ii(e.size,t.style),n=i.fracNum(),r=i.fracDen();var s=t.havingStyle(n),o=L(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,i=3.5/t.fontMetrics().ptPerEm;o.height=o.height{let i=new A.MathNode("mfrac",[I(e.numer,t),I(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=E(e.barSize,t);i.setAttribute("linethickness",M(n))}}else i.setAttribute("linethickness","0px");const n=Ii(e.size,t.style);if(n.size!==t.style.size){i=new A.MathNode("mstyle",[i]);const e=n.size===T.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",e),i.setAttribute("scriptlevel","0")}if(null==e.leftDelim&&null==e.rightDelim)return i;{const t=[];if(null!=e.leftDelim){const i=new A.MathNode("mo",[new A.TextNode(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}if(t.push(i),null!=e.rightDelim){const i=new A.MathNode("mo",[new A.TextNode(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}return vt(t)}},Di=(w({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:i}=e,n=t[0],t=t[1];let r,s=null,o=null,a="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",o=")";break;case"\\\\bracefrac":r=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":r=!1,s="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":a="display";break;case"\\tfrac":case"\\tbinom":a="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:r,leftDelim:s,rightDelim:o,size:a,barSize:null}},htmlBuilder:Fi,mathmlBuilder:Pi}),w({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e["parser"],i=t[0],t=t[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:i,denom:t,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),w({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:i,funcName:n,token:r}=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:i.mode,replaceWith:t,token:r}}}),["display","text","script","scriptscript"]),Oi=(w({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e["parser"],i=t[4],n=t[5],r=tt(t[0]),r="atom"===r.type&&"open"===r.family?Ei(r.text):null,s=tt(t[1]),s="atom"===s.type&&"close"===s.family?Ei(s.text):null,o=F(t[2],"size");let a,l=null,h=(a=!!o.isBlank||0<(l=o.value).number,"auto"),c=t[3];if("ordgroup"===c.type){if(0{var e=e["parser"],i=t[0],n=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(F(t[1],"infix").size),t=t[2],r=0{var i=t.style;let n,r;r="supsub"===e.type?(n=e.sup?L(e.sup,t.havingStyle(i.sup()),t):L(e.sub,t.havingStyle(i.sub()),t),F(e.base,"horizBrace")):F(e,"horizBrace");i=L(r.base,t.havingBaseStyle(T.DISPLAY)),e=Ct(r,t);let s;if((r.isOver?(s=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(s=R.makeVList({positionType:"bottom",positionData:i.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:i}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),n){const e=R.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t);s=r.isOver?R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):R.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return R.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t)}),Ni=(w({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:i}=e;return{type:"horizBrace",mode:e.mode,label:i,isOver:/^\\over/.test(i),base:t[0]}},htmlBuilder:Oi,mathmlBuilder:(e,t)=>{var i=_t(e.label);return new A.MathNode(e.isOver?"mover":"munder",[I(e.base,t),i])}}),w({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],i=t[1],t=F(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:x(i)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=$(e.body,t,!1);return R.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{let i=bt(e.body,t);return(i=i instanceof S?i:new S("mrow",[i])).setAttribute("href",e.href),i}}),w({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],i=F(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:i}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t{let{parser:i,funcName:n}=t;var r=F(e[0],"raw").string,t=e[1];let s;i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(n){case"\\htmlClass":o.class=r,s={command:"\\htmlClass",class:r};break;case"\\htmlId":o.id=r,s={command:"\\htmlId",id:r};break;case"\\htmlStyle":o.style=r,s={command:"\\htmlStyle",style:r};break;case"\\htmlData":{const t=r.split(",");for(let e=0;e{var i=$(e.body,t,!1),n=["enclosing"],r=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),R.makeSpan(n,i,t));for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&r.setAttribute(t,e.attributes[t]);return r},mathmlBuilder:(e,t)=>bt(e.body,t)}),w({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{e=e.parser;return{type:"htmlmathml",mode:e.mode,html:x(t[0]),mathml:x(t[1])}},htmlBuilder:(e,t)=>{e=$(e.html,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>bt(e.mathml,t)}),w({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,i)=>{let n=t["parser"],r={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(i[0]){const t=F(i[0],"raw").string.split(",");for(let e=0;e{var i=E(e.height,t);let n=0,r=(0{var i=new A.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);const n=E(e.height,t);let r=0;if(0{var{parser:e,funcName:i}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:i.slice(5),body:t}},htmlBuilder:(e,t)=>{let i;i="clap"===e.alignment?(i=R.makeSpan([],[L(e.body,t)]),R.makeSpan(["inner"],[i],t)):R.makeSpan(["inner"],[L(e.body,t)]);var n=R.makeSpan(["fix"],[]);let r=R.makeSpan([e.alignment],[i,n],t);e=R.makeSpan(["strut"]);return e.style.height=M(r.height+r.depth),r.depth&&(e.style.verticalAlign=M(-r.depth)),r.children.unshift(e),r=R.makeSpan(["thinbox"],[r],t),R.makeSpan(["mord","vbox"],[r],t)},mathmlBuilder:(e,t)=>{var i=new A.MathNode("mpadded",[I(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",t+"width")}return i.setAttribute("width","0px"),i}}),w({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:i}=e,n=i.mode,e=(i.switchMode("math"),"\\("===e?"\\)":"$"),r=i.parseExpression(!1,e);return i.expect(e),i.switchMode(n),{type:"styling",mode:i.mode,style:"text",body:r}}}),w({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new _("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case T.DISPLAY.size:return e.display;case T.TEXT.size:return e.text;case T.SCRIPT.size:return e.script;case T.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Bi=(w({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{e=e.parser;return{type:"mathchoice",mode:e.mode,display:x(t[0]),text:x(t[1]),script:x(t[2]),scriptscript:x(t[3])}},htmlBuilder:(e,t)=>{e=Ni(e,t),e=$(e,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=Ni(e,t);return bt(e,t)}}),(e,t,i,n,r,s,o)=>{e=R.makeSpan([],[e]);var a=i&&C.isCharacterBox(i);let l,h,c;if(t){const e=L(t,n.havingStyle(r.sup()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(i){const e=L(i,n.havingStyle(r.sub()),n);l={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(h&&l){const t=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;c=R.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:M(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:M(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){const t=e.height-o;c=R.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:M(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;{const t=e.depth+o;c=R.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:M(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}t=[c];if(l&&0!==s&&!a){const e=R.makeSpan(["mspace"],[],n);e.style.marginRight=M(s),t.unshift(e)}return R.makeSpan(["mop","op-limits"],t,n)}),zi=["\\smallint"],Hi=(t,i)=>{let e,n,r,s=!1;"supsub"===t.type?(e=t.sup,n=t.sub,r=F(t.base,"op"),s=!0):r=F(t,"op");t=i.style;let o,a=!1;if(t.size===T.DISPLAY.size&&r.symbol&&!C.contains(zi,r.name)&&(a=!0),r.symbol){const t=a?"Size2-Regular":"Size1-Regular";let e="";if("\\oiint"!==r.name&&"\\oiiint"!==r.name||(e=r.name.slice(1),r.name="oiint"===e?"\\iint":"\\iiint"),o=R.makeSymbol(r.name,t,"math",i,["mop","op-symbol",a?"large-op":"small-op"]),0{let i;if(e.symbol)i=new S("mo",[ft(e.name,e.mode)]),C.contains(zi,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new S("mo",k(e.body,t));else{i=new S("mi",[new gt(e.name.slice(1))]);const t=new S("mo",[ft("⁡","text")]);i=e.parentIsSupSub?new S("mrow",[i,t]):mt([i,t])}return i},Wi={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},qi=(w({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:i,funcName:n}=e,r=n;return 1===r.length&&(r=Wi[r]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:x(t)}},htmlBuilder:Hi,mathmlBuilder:Ui}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),Vi=(w({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:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:i}=e,n=i;return 1===n.length&&(n=qi[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Hi,mathmlBuilder:Ui}),(e,t)=>{let i,n,r,s,o=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,r=F(e.base,"operatorname"),o=!0):r=F(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),i=$(e,t.withFont("mathrm"),!0);for(let e=0;e{var{parser:e,funcName:i}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:x(t),alwaysHandleSupSub:"\\operatornamewithlimits"===i,limits:!1,parentIsSupSub:!1}},htmlBuilder:Vi,mathmlBuilder:(t,i)=>{let n=k(t.body,i.withFont("mathrm")),r=!0;for(let e=0;ee.toText()).join("");n=[new A.TextNode(t)]}var i=new A.MathNode("mi",n),e=(i.setAttribute("mathvariant","normal"),new A.MathNode("mo",[ft("⁡","text")]));return t.parentIsSupSub?new A.MathNode("mrow",[i,e]):A.newDocumentFragment([i,e])}}),P("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),et({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?R.makeFragment($(e.body,t,!1)):R.makeSpan(["mord"],$(e.body,t,!0),t)},mathmlBuilder(e,t){return bt(e.body,t,!0)}}),w({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){e=e.parser,t=t[0];return{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=L(e.body,t.havingCrampedStyle()),i=R.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:i},{type:"kern",size:n}]},t);return R.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var i=new A.MathNode("mo",[new A.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new A.MathNode("mover",[I(e.body,t),i]));return e.setAttribute("accent","true"),e}}),w({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"phantom",mode:e.mode,body:x(t)}},htmlBuilder:(e,t)=>{e=$(e.body,t.withPhantom(),!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=k(e.body,t);return new A.MathNode("mphantom",e)}}),w({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"hphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{let i=R.makeSpan([],[L(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(let e=0;e{e=k(x(e.body),t),t=new A.MathNode("mphantom",e),e=new A.MathNode("mpadded",[t]);return e.setAttribute("height","0px"),e.setAttribute("depth","0px"),e}}),w({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"vphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{var e=R.makeSpan(["inner"],[L(e.body,t.withPhantom())]),i=R.makeSpan(["fix"],[]);return R.makeSpan(["mord","rlap"],[e,i],t)},mathmlBuilder:(e,t)=>{e=k(x(e.body),t),t=new A.MathNode("mphantom",e),e=new A.MathNode("mpadded",[t]);return e.setAttribute("width","0px"),e}}),w({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e["parser"],i=F(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:i,body:t}},htmlBuilder(e,t){var i=L(e.body,t),e=E(e.dy,t);return R.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){t=new A.MathNode("mpadded",[I(e.body,t)]),e=e.dy.number+e.dy.unit;return t.setAttribute("voffset",e),t}}),w({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){e=e.parser;return{type:"internal",mode:e.mode}}}),w({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,i){var e=e["parser"],i=i[0],n=F(t[0],"size"),t=F(t[1],"size");return{type:"rule",mode:e.mode,shift:i&&F(i,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var i=R.makeSpan(["mord","rule"],[],t),n=E(e.width,t),r=E(e.height,t),e=e.shift?E(e.shift,t):0;return i.style.borderRightWidth=M(n),i.style.borderTopWidth=M(r),i.style.bottom=M(e),i.width=n,i.height=r+e,i.depth=-e,i.maxFontSize=1.125*r*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=E(e.width,t),n=E(e.height,t),e=e.shift?E(e.shift,t):0,t=t.color&&t.getColor()||"black",r=new A.MathNode("mspace"),t=(r.setAttribute("mathbackground",t),r.setAttribute("width",M(i)),r.setAttribute("height",M(n)),new A.MathNode("mpadded",[r]));return 0<=e?t.setAttribute("height",M(e)):(t.setAttribute("height",M(e)),t.setAttribute("depth",M(-e))),t.setAttribute("voffset",M(e)),t}});const Gi=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ki=(w({type:"sizing",names:Gi,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:i,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:Gi.indexOf(i)+1,body:e}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return ji(e.body,i,t)},mathmlBuilder:(e,t)=>{t=t.havingSize(e.size),e=k(e.body,t),e=new A.MathNode("mstyle",e);return e.setAttribute("mathsize",M(t.sizeMultiplier)),e}}),w({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{let n=e["parser"],r=!1,s=!1;var o=i[0]&&F(i[0],"ordgroup");if(o){var a;for(let e=0;e{var i=R.makeSpan([],[L(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(let e=0;e{t=new A.MathNode("mpadded",[I(e.body,t)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}}),w({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){e=e.parser,i=i[0],t=t[0];return{type:"sqrt",mode:e.mode,body:t,index:i}},htmlBuilder(e,t){let i=L(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=R.wrapFragment(i,t);const n=t.fontMetrics().defaultRuleThickness;let r=n,s=(t.style.idi.height+i.depth+s&&(s=(s+c-i.height-i.depth)/2);var d=a.height-i.height-s-l,d=(i.style.paddingLeft=M(h),R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:a},{type:"kern",size:l}]},t));if(e.index){const i=t.havingStyle(T.SCRIPTSCRIPT),n=L(e.index,i,t),r=.6*(d.height-d.depth),s=R.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t),o=R.makeSpan(["root"],[s]);return R.makeSpan(["mord","sqrt"],[o,d],t)}return R.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder(e,t){var{body:e,index:i}=e;return i?new A.MathNode("mroot",[I(e,t),I(i,t)]):new A.MathNode("msqrt",[I(e,t)])}}),{display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT}),Xi=(w({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:i,parser:n}=e,e=n.parseExpression(!0,e),i=i.slice(1,i.length-5);return{type:"styling",mode:n.mode,style:i,body:e}},htmlBuilder(e,t){var i=Ki[e.style],i=t.havingStyle(i).withFont("");return ji(e.body,i,t)},mathmlBuilder(e,t){var i=Ki[e.style],t=t.havingStyle(i),i=k(e.body,t),t=new A.MathNode("mstyle",i),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",i[0]),t.setAttribute("displaystyle",i[1]),t}}),et({type:"supsub",htmlBuilder(e,t){n=t;const i=(s=(r=e).base)?"op"===s.type?s.limits&&(n.style.size===T.DISPLAY.size||s.alwaysHandleSupSub)?Hi:null:"operatorname"===s.type?s.alwaysHandleSupSub&&(n.style.size===T.DISPLAY.size||s.limits)?Vi:null:"accent"===s.type?C.isCharacterBox(s.base)?Mt:null:"horizBrace"===s.type&&!r.sub===s.isOver?Oi:null:null;if(i)return i(e,t);var{base:n,sup:r,sub:s}=e,o=L(n,t);let a,l;var h=t.fontMetrics();let c=0,d=0;n=n&&C.isCharacterBox(n);if(r){const e=t.havingStyle(t.style.sup());a=L(r,e,t),n||(c=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());l=L(s,e,t),n||(d=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}r=t.style===T.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2,s=t.sizeMultiplier,n=M(.5/h.ptPerEm/s);let u,p=null;if(l){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(o instanceof m||t)&&(p=M(-o.italic))}if(a&&l){c=Math.max(c,r,a.depth+.25*h.xHeight),d=Math.max(d,h.sub2);const e=4*h.defaultRuleThickness;if(c-a.depth-(l.height-d){var e=new A.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),Zi=(et({type:"tag",mathmlBuilder(e,t){e=new A.MathNode("mtable",[new A.MathNode("mtr",[Ji(),new A.MathNode("mtd",[bt(e.body,t)]),Ji(),new A.MathNode("mtd",[bt(e.tag,t)])])]);return e.setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),en={"\\textbf":"textbf","\\textmd":"textmd"},tn={"\\textit":"textit","\\textup":"textup"},nn=(e,t)=>{e=e.font;return e?Zi[e]?t.withTextFontFamily(Zi[e]):en[e]?t.withTextFontWeight(en[e]):t.withTextFontShape(tn[e]):t},rn=(w({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:e,funcName:i}=e,t=t[0];return{type:"text",mode:e.mode,body:x(t),font:i}},htmlBuilder(e,t){t=nn(e,t),e=$(e.body,t,!0);return R.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){t=nn(e,t);return bt(e.body,t)}}),w({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"underline",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=L(e.body,t),i=R.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=R.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return R.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var i=new A.MathNode("mo",[new A.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new A.MathNode("munder",[I(e.body,t),i]));return e.setAttribute("accentunder","true"),e}}),w({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"vcenter",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=L(e.body,t),i=t.fontMetrics().axisHeight,i=.5*(e.height-i-(e.depth+i));return R.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new A.MathNode("mpadded",[I(e.body,t)],["vcenter"])}}),w({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new _("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){var n=rn(i),r=[],s=e.havingStyle(e.style.text());for(let t=0;te.body.replace(/ /g,e.star?"␣":" "));var sn=Qe;const on=new RegExp("[̀-ͯ]+$");class an{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("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new vi("EOF",new fi(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new _("Unexpected character: '"+e[t]+"'",new vi(e[t],new fi(this,t,t+1)));i=i[6]||i[3]||(i[2]?"\\ ":" ");if(14!==this.catcodes[i])return new vi(i,new fi(this,t,this.tokenRegex.lastIndex));{const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}}}class ln{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 _("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0=t)throw new _("Invalid base-"+t+" digit "+i.text);for(var r;null!=(r=cn[e.future().text])&&r{let n=i.consumeArg().tokens;if(1!==n.length)throw new _("\\newcommand's first argument must be a macro name");var r=n[0].text,s=i.isDefined(r);if(s&&!e)throw new _("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!t)throw new _("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");let o=0;if(1===(n=i.consumeArg().tokens).length&&"["===n[0].text){let e="",t=i.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=i.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new _("Invalid number of arguments: "+e);o=parseInt(e),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:o}),""}),un=(P("\\newcommand",e=>dn(e,!1,!0)),P("\\renewcommand",e=>dn(e,!0,!1)),P("\\providecommand",e=>dn(e,!0,!0)),P("\\message",e=>{e=e.consumeArgs(1)[0];return console.log(e.reverse().map(e=>e.text).join("")),""}),P("\\errmessage",e=>{e=e.consumeArgs(1)[0];return console.error(e.reverse().map(e=>e.text).join("")),""}),P("\\show",e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),sn[i],d.math[i],d.text[i]),""}),P("\\bgroup","{"),P("\\egroup","}"),P("~","\\nobreakspace"),P("\\lq","`"),P("\\rq","'"),P("\\aa","\\r a"),P("\\AA","\\r A"),P("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),P("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),P("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),P("ℬ","\\mathscr{B}"),P("ℰ","\\mathscr{E}"),P("ℱ","\\mathscr{F}"),P("ℋ","\\mathscr{H}"),P("ℐ","\\mathscr{I}"),P("ℒ","\\mathscr{L}"),P("ℳ","\\mathscr{M}"),P("ℛ","\\mathscr{R}"),P("ℭ","\\mathfrak{C}"),P("ℌ","\\mathfrak{H}"),P("ℨ","\\mathfrak{Z}"),P("\\Bbbk","\\Bbb{k}"),P("·","\\cdotp"),P("\\llap","\\mathllap{\\textrm{#1}}"),P("\\rlap","\\mathrlap{\\textrm{#1}}"),P("\\clap","\\mathclap{\\textrm{#1}}"),P("\\mathstrut","\\vphantom{(}"),P("\\underbar","\\underline{\\text{#1}}"),P("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),P("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),P("\\ne","\\neq"),P("≠","\\neq"),P("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),P("∉","\\notin"),P("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),P("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),P("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),P("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),P("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),P("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),P("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),P("⟂","\\perp"),P("‼","\\mathclose{!\\mkern-0.8mu!}"),P("∌","\\notni"),P("⌜","\\ulcorner"),P("⌝","\\urcorner"),P("⌞","\\llcorner"),P("⌟","\\lrcorner"),P("©","\\copyright"),P("®","\\textregistered"),P("️","\\textregistered"),P("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),P("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),P("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),P("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),P("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),P("⋮","\\vdots"),P("\\varGamma","\\mathit{\\Gamma}"),P("\\varDelta","\\mathit{\\Delta}"),P("\\varTheta","\\mathit{\\Theta}"),P("\\varLambda","\\mathit{\\Lambda}"),P("\\varXi","\\mathit{\\Xi}"),P("\\varPi","\\mathit{\\Pi}"),P("\\varSigma","\\mathit{\\Sigma}"),P("\\varUpsilon","\\mathit{\\Upsilon}"),P("\\varPhi","\\mathit{\\Phi}"),P("\\varPsi","\\mathit{\\Psi}"),P("\\varOmega","\\mathit{\\Omega}"),P("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),P("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),P("\\boxed","\\fbox{$\\displaystyle{#1}$}"),P("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),P("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),P("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),{",":"\\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"}),pn=(P("\\dots",function(e){let t="\\dotso";e=e.expandAfterFuture().text;return e in un?t=un[e]:("\\not"===e.slice(0,4)||e in d.math&&C.contains(["bin","rel"],d.math[e].group))&&(t="\\dotsb"),t}),{")":!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});P("\\dotso",function(e){return e.future().text in pn?"\\ldots\\,":"\\ldots"}),P("\\dotsc",function(e){e=e.future().text;return e in pn&&","!==e?"\\ldots\\,":"\\ldots"}),P("\\cdots",function(e){return e.future().text in pn?"\\@cdots\\,":"\\@cdots"}),P("\\dotsb","\\cdots"),P("\\dotsm","\\cdots"),P("\\dotsi","\\!\\cdots"),P("\\dotsx","\\ldots\\,"),P("\\DOTSI","\\relax"),P("\\DOTSB","\\relax"),P("\\DOTSX","\\relax"),P("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),P("\\,","\\tmspace+{3mu}{.1667em}"),P("\\thinspace","\\,"),P("\\>","\\mskip{4mu}"),P("\\:","\\tmspace+{4mu}{.2222em}"),P("\\medspace","\\:"),P("\\;","\\tmspace+{5mu}{.2777em}"),P("\\thickspace","\\;"),P("\\!","\\tmspace-{3mu}{.1667em}"),P("\\negthinspace","\\!"),P("\\negmedspace","\\tmspace-{4mu}{.2222em}"),P("\\negthickspace","\\tmspace-{5mu}{.277em}"),P("\\enspace","\\kern.5em "),P("\\enskip","\\hskip.5em\\relax"),P("\\quad","\\hskip1em\\relax"),P("\\qquad","\\hskip2em\\relax"),P("\\tag","\\@ifstar\\tag@literal\\tag@paren"),P("\\tag@paren","\\tag@literal{({#1})}"),P("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new _("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),P("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),P("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),P("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),P("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),P("\\newline","\\\\\\relax"),P("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");l=M(ne["Main-Regular"]["T".charCodeAt(0)][1]-.7*ne["Main-Regular"]["A".charCodeAt(0)][1]),P("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),P("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),P("\\hspace","\\@ifstar\\@hspacer\\@hspace"),P("\\@hspace","\\hskip #1\\relax"),P("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),P("\\ordinarycolon",":"),P("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),P("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),P("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),P("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),P("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),P("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),P("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),P("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),P("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),P("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),P("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),P("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),P("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),P("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),P("∷","\\dblcolon"),P("∹","\\eqcolon"),P("≔","\\coloneqq"),P("≕","\\eqqcolon"),P("⩴","\\Coloneqq"),P("\\ratio","\\vcentcolon"),P("\\coloncolon","\\dblcolon"),P("\\colonequals","\\coloneqq"),P("\\coloncolonequals","\\Coloneqq"),P("\\equalscolon","\\eqqcolon"),P("\\equalscoloncolon","\\Eqqcolon"),P("\\colonminus","\\coloneq"),P("\\coloncolonminus","\\Coloneq"),P("\\minuscolon","\\eqcolon"),P("\\minuscoloncolon","\\Eqcolon"),P("\\coloncolonapprox","\\Colonapprox"),P("\\coloncolonsim","\\Colonsim"),P("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),P("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),P("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),P("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),P("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),P("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),P("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),P("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),P("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),P("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),P("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),P("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),P("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),P("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),P("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),P("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),P("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),P("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),P("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),P("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),P("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),P("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),P("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),P("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),P("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),P("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),P("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),P("\\imath","\\html@mathml{\\@imath}{ı}"),P("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),P("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),P("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),P("⟦","\\llbracket"),P("⟧","\\rrbracket"),P("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),P("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),P("⦃","\\lBrace"),P("⦄","\\rBrace"),P("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),P("⦵","\\minuso"),P("\\darr","\\downarrow"),P("\\dArr","\\Downarrow"),P("\\Darr","\\Downarrow"),P("\\lang","\\langle"),P("\\rang","\\rangle"),P("\\uarr","\\uparrow"),P("\\uArr","\\Uparrow"),P("\\Uarr","\\Uparrow"),P("\\N","\\mathbb{N}"),P("\\R","\\mathbb{R}"),P("\\Z","\\mathbb{Z}"),P("\\alef","\\aleph"),P("\\alefsym","\\aleph"),P("\\Alpha","\\mathrm{A}"),P("\\Beta","\\mathrm{B}"),P("\\bull","\\bullet"),P("\\Chi","\\mathrm{X}"),P("\\clubs","\\clubsuit"),P("\\cnums","\\mathbb{C}"),P("\\Complex","\\mathbb{C}"),P("\\Dagger","\\ddagger"),P("\\diamonds","\\diamondsuit"),P("\\empty","\\emptyset"),P("\\Epsilon","\\mathrm{E}"),P("\\Eta","\\mathrm{H}"),P("\\exist","\\exists"),P("\\harr","\\leftrightarrow"),P("\\hArr","\\Leftrightarrow"),P("\\Harr","\\Leftrightarrow"),P("\\hearts","\\heartsuit"),P("\\image","\\Im"),P("\\infin","\\infty"),P("\\Iota","\\mathrm{I}"),P("\\isin","\\in"),P("\\Kappa","\\mathrm{K}"),P("\\larr","\\leftarrow"),P("\\lArr","\\Leftarrow"),P("\\Larr","\\Leftarrow"),P("\\lrarr","\\leftrightarrow"),P("\\lrArr","\\Leftrightarrow"),P("\\Lrarr","\\Leftrightarrow"),P("\\Mu","\\mathrm{M}"),P("\\natnums","\\mathbb{N}"),P("\\Nu","\\mathrm{N}"),P("\\Omicron","\\mathrm{O}"),P("\\plusmn","\\pm"),P("\\rarr","\\rightarrow"),P("\\rArr","\\Rightarrow"),P("\\Rarr","\\Rightarrow"),P("\\real","\\Re"),P("\\reals","\\mathbb{R}"),P("\\Reals","\\mathbb{R}"),P("\\Rho","\\mathrm{P}"),P("\\sdot","\\cdot"),P("\\sect","\\S"),P("\\spades","\\spadesuit"),P("\\sub","\\subset"),P("\\sube","\\subseteq"),P("\\supe","\\supseteq"),P("\\Tau","\\mathrm{T}"),P("\\thetasym","\\vartheta"),P("\\weierp","\\wp"),P("\\Zeta","\\mathrm{Z}"),P("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),P("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),P("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),P("\\bra","\\mathinner{\\langle{#1}|}"),P("\\ket","\\mathinner{|{#1}\\rangle}"),P("\\braket","\\mathinner{\\langle{#1}\\rangle}"),P("\\Bra","\\left\\langle#1\\right|"),P("\\Ket","\\left|#1\\right\\rangle"),p=l=>e=>{const t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var a=i=>e=>{l&&(e.macros.set("|",s),r.length)&&e.macros.set("\\|",o);let t=i;return!i&&r.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?r:n,numArgs:0}},a=(e.macros.set("|",a(!1)),r.length&&e.macros.set("\\|",a(!0)),e.consumeArg().tokens),a=e.expandTokens([...i,...a,...t]);return e.macros.endGroup(),{tokens:a.reverse(),numArgs:0}};P("\\bra@ket",p(!1)),P("\\bra@set",p(!0)),P("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),P("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),P("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),P("\\angln","{\\angl n}"),P("\\blue","\\textcolor{##6495ed}{#1}"),P("\\orange","\\textcolor{##ffa500}{#1}"),P("\\pink","\\textcolor{##ff00af}{#1}"),P("\\red","\\textcolor{##df0030}{#1}"),P("\\green","\\textcolor{##28ae7b}{#1}"),P("\\gray","\\textcolor{gray}{#1}"),P("\\purple","\\textcolor{##9d38bd}{#1}"),P("\\blueA","\\textcolor{##ccfaff}{#1}"),P("\\blueB","\\textcolor{##80f6ff}{#1}"),P("\\blueC","\\textcolor{##63d9ea}{#1}"),P("\\blueD","\\textcolor{##11accd}{#1}"),P("\\blueE","\\textcolor{##0c7f99}{#1}"),P("\\tealA","\\textcolor{##94fff5}{#1}"),P("\\tealB","\\textcolor{##26edd5}{#1}"),P("\\tealC","\\textcolor{##01d1c1}{#1}"),P("\\tealD","\\textcolor{##01a995}{#1}"),P("\\tealE","\\textcolor{##208170}{#1}"),P("\\greenA","\\textcolor{##b6ffb0}{#1}"),P("\\greenB","\\textcolor{##8af281}{#1}"),P("\\greenC","\\textcolor{##74cf70}{#1}"),P("\\greenD","\\textcolor{##1fab54}{#1}"),P("\\greenE","\\textcolor{##0d923f}{#1}"),P("\\goldA","\\textcolor{##ffd0a9}{#1}"),P("\\goldB","\\textcolor{##ffbb71}{#1}"),P("\\goldC","\\textcolor{##ff9c39}{#1}"),P("\\goldD","\\textcolor{##e07d10}{#1}"),P("\\goldE","\\textcolor{##a75a05}{#1}"),P("\\redA","\\textcolor{##fca9a9}{#1}"),P("\\redB","\\textcolor{##ff8482}{#1}"),P("\\redC","\\textcolor{##f9685d}{#1}"),P("\\redD","\\textcolor{##e84d39}{#1}"),P("\\redE","\\textcolor{##bc2612}{#1}"),P("\\maroonA","\\textcolor{##ffbde0}{#1}"),P("\\maroonB","\\textcolor{##ff92c6}{#1}"),P("\\maroonC","\\textcolor{##ed5fa6}{#1}"),P("\\maroonD","\\textcolor{##ca337c}{#1}"),P("\\maroonE","\\textcolor{##9e034e}{#1}"),P("\\purpleA","\\textcolor{##ddd7ff}{#1}"),P("\\purpleB","\\textcolor{##c6b9fc}{#1}"),P("\\purpleC","\\textcolor{##aa87ff}{#1}"),P("\\purpleD","\\textcolor{##7854ab}{#1}"),P("\\purpleE","\\textcolor{##543b78}{#1}"),P("\\mintA","\\textcolor{##f5f9e8}{#1}"),P("\\mintB","\\textcolor{##edf2df}{#1}"),P("\\mintC","\\textcolor{##e0e5cc}{#1}"),P("\\grayA","\\textcolor{##f6f7f7}{#1}"),P("\\grayB","\\textcolor{##f0f1f2}{#1}"),P("\\grayC","\\textcolor{##e3e5e6}{#1}"),P("\\grayD","\\textcolor{##d6d8da}{#1}"),P("\\grayE","\\textcolor{##babec2}{#1}"),P("\\grayF","\\textcolor{##888d93}{#1}"),P("\\grayG","\\textcolor{##626569}{#1}"),P("\\grayH","\\textcolor{##3b3e40}{#1}"),P("\\grayI","\\textcolor{##21242c}{#1}"),P("\\kaBlue","\\textcolor{##314453}{#1}"),P("\\kaGreen","\\textcolor{##71B307}{#1}");const mn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gn{constructor(e,t,i){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 ln(hn,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new an(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){let t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:i}=this.consumeArg(["]"])}else({tokens:n,start:t,end:i}=this.consumeArg());return this.pushToken(new vi("EOF",i.loc)),this.pushTokens(n),t.range(i,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],i=e&&0this.settings.maxExpand)throw new _("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,n=t.noexpand?null:this._getExpansion(i);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===i[0]&&!this.isDefined(i))throw new _("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);let r=n.tokens;var s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(let e=(r=r.slice()).length-1;0<=e;--e){var o=r[e];if("#"===o.text){if(0===e)throw new _("Incomplete placeholder at end of macro body",o);if("#"===(o=r[--e]).text)r.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new _("Not a valid argument number",o);r.splice(e,2,...s[+o.text-1])}}}return this.pushTokens(r),r.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new vi(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){e=this.expandMacro(e);return e&&e.map(e=>e.text).join("")}_getExpansion(i){const n=this.macros.get(i);if(null==n)return n;if(1===i.length){const n=this.lexer.catcodes[i];if(null!=n&&13!==n)return}i="function"==typeof n?n(this):n;if("string"!=typeof i)return i;{let e=0;if(-1!==i.indexOf("#")){const n=i.replace(/##/g,"");for(;-1!==n.indexOf("#"+(e+1));)++e}const n=new an(i,this.settings),r=[];let t=n.lex();for(;"EOF"!==t.text;)r.push(t),t=n.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||sn.hasOwnProperty(e)||d.math.hasOwnProperty(e)||d.text.hasOwnProperty(e)||mn.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:sn.hasOwnProperty(e)&&!sn[e].primitive}}const fn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,vn=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),yn={"́":{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"}},bn={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class wn{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 gn(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 _("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,e=(this.consume(),this.gullet.pushToken(new vi("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==wn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&sn[n.text]&&sn[n.text].infix)break;n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&i.push(n)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(t){let i,n=-1;for(let e=0;ee.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;-1!==(i=t.search(r));){0t.startsWith(e.left));if(-1===(i=function(e,t,i){let n=i,r=0;for(var s=e.length;n-1===r.indexOf(" "+e+" "))&&h(o,s)}}};var s=function(e,t){if(!e)throw new Error("No element provided to render");var i={};for(const e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);i.delimiters=i.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],i.ignoredTags=i.ignoredTags||["script","noscript","style","textarea","pre","code","option"],i.ignoredClasses=i.ignoredClasses||[],i.errorCallback=i.errorCallback||console.error,i.macros=i.macros||{},h(e,i)}}return e.default}()}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).markedKatex=t(e.katex)}(this,function(n){"use strict";const r=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,i=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function t(t,i){return e=>n.renderToString(e.text,{...t,displayMode:e.displayMode})+(i?"\n":"")}return function(e={}){return{extensions:[{name:"inlineKatex",level:"inline",start(e){let t,i=e;for(;i;){if(-1===(t=i.indexOf("$")))return;if((0===t||" "===i.charAt(t-1))&&i.substring(t).match(r))return t;i=i.substring(t+1).replace(/^\$+/,"")}},tokenizer(e,t){e=e.match(r);if(e)return{type:"inlineKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!1)},{name:"blockKatex",level:"block",tokenizer(e,t){e=e.match(i);if(e)return{type:"blockKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!0)}]}}}),"undefined"!=typeof window&&(window.markedMermaid=markedMermaid),"undefined"!=typeof module&&module.exports&&(module.exports=markedMermaid),!function(){function e(e){return e}function t(i){return function(e){var t=h("img",["image-output"]);return t.src="data:image/"+i+";base64,"+d(e).replace(/\n/g,""),t}}function i(){var t=this,e=u.display_priority.filter(function(e){return(t.raw.data||t.raw)[e]})[0];return e&&u.display[e]?u.display[e](t.raw[e]||t.raw.data[e]):h("div",["empty-output"])}function n(){var e=h("pre",["pyerr"]),t=this.raw.traceback.join("\n");return e.innerHTML=u.highlighter(u.ansi(c(t)),e),e}var r,s,o,a=this,l=void 0!==a.window,h=(s=(l?a:(r=new(require("jsdom").JSDOM)).window).document,function(e,t){e=s.createElement(e);return e.className=(t||[]).map(function(e){return u.prefix+e}).join(" "),e}),c=function(e){return e.replace(//g,">")},d=function(e){return e.join?e.map(d).join(""):e},u={prefix:"nb-",markdown:(o=a.marked||"function"==typeof require&&require("marked"))&&o.parse||e,ansi:(o=a.ansi_up||"function"==typeof require&&require("ansi_up"))&&o.ansi_to_html||e,sanitizer:(o=a.DOMPurify||"function"==typeof require&&require("dompurify"),(l?o&&o.sanitize:o(r.window).sanitize)||e),highlighter:e,VERSION:"0.7.0",Input:function(e,t){this.raw=e,this.cell=t}},p=(u.Input.prototype.render=function(){var e,t,i,n;return this.raw.length?(e=h("div",["input"]),"number"==typeof(n=this.cell).number&&e.setAttribute("data-prompt-number",this.cell.number),t=h("pre"),i=h("code"),n=n.worksheet.notebook.metadata,n=this.cell.raw.language||n.language||n.kernelspec&&n.kernelspec.language||n.language_info&&n.language_info.name,i.setAttribute("data-language",n),i.className="lang-"+n,i.innerHTML=u.highlighter(c(d(this.raw)),t,i,n),t.appendChild(i),e.appendChild(t),this.el=e):h("div")},u.display={},u.display.text=function(e){var t=h("pre",["text-output"]);return t.innerHTML=u.highlighter(u.ansi(d(e)),t),t},u.display["text/plain"]=u.display.text,u.display.html=function(e){var t=h("div",["html-output"]);return t.innerHTML=u.sanitizer(d(e)),t},u.display["text/html"]=u.display.html,u.display.marked=function(e){return u.display.html(u.markdown(d(e)))},u.display["text/markdown"]=u.display.marked,u.display.svg=function(e){var t=h("div",["svg-output"]);return t.innerHTML=d(e),t},u.display["text/svg+xml"]=u.display.svg,u.display["image/svg+xml"]=u.display.svg,u.display.latex=function(e){var t=h("div",["latex-output"]);return t.innerHTML=d(e),t},u.display["text/latex"]=u.display.latex,u.display.javascript=function(e){var t=h("script");return t.innerHTML=d(e),t},u.display["application/javascript"]=u.display.javascript,u.display.png=t("png"),u.display["image/png"]=u.display.png,u.display.jpeg=t("jpeg"),u.display["image/jpeg"]=u.display.jpeg,u.display_priority=["png","image/png","jpeg","image/jpeg","svg","image/svg+xml","text/svg+xml","html","text/html","text/markdown","latex","text/latex","javascript","application/javascript","text","text/plain"],u.Output=function(e,t){this.raw=e,this.cell=t,this.type=e.output_type},u.Output.prototype.renderers={display_data:i,execute_result:i,pyout:i,pyerr:n,error:n,stream:function(){var e=h("pre",[this.raw.stream||this.raw.name]),t=d(this.raw.text);return e.innerHTML=u.highlighter(u.ansi(c(t)),e),e}},u.Output.prototype.render=function(){var e=h("div",["output"]),t=("number"==typeof this.cell.number&&e.setAttribute("data-prompt-number",this.cell.number),this.renderers[this.type].call(this));return e.appendChild(t),this.el=e},u.coalesceStreams=function(e){var t,i;return e.length?(t=e[0],i=[t],e.slice(1).forEach(function(e){"stream"===e.raw.output_type&&"stream"===t.raw.output_type&&e.raw.stream===t.raw.stream&&e.raw.name===t.raw.name?t.raw.text=t.raw.text.concat(e.raw.text):(i.push(e),t=e)}),i):e},[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!(u.Cell=function(e,t){var i=this;i.raw=e,i.worksheet=t,i.type=e.cell_type,"code"===i.type&&(i.number=-1")))):e.innerHTML=u.sanitizer(u.markdown(t)),e},heading:function(){var e=h("h"+this.raw.level,["cell","heading-cell"]);return e.innerHTML=u.sanitizer(d(this.raw.source)),e},raw:function(){var e=h("div",["cell","raw-cell"]);return e.innerHTML=c(d(this.raw.source)),e},code:function(){var t=h("div",["cell","code-cell"]);t.appendChild(this.input.render()),this.outputs.forEach(function(e){t.appendChild(e.render())});return t}},u.Cell.prototype.render=function(){var e=this.renderers[this.type].call(this);return this.el=e},u.Worksheet=function(e,t){var i=this;this.raw=e,this.notebook=t,this.cells=e.cells.map(function(e){return new u.Cell(e,i)}),this.render=function(){var t=h("div",["worksheet"]);return i.cells.forEach(function(e){t.appendChild(e.render())}),this.el=t}},u.Notebook=function(e,t){var i=this,t=(this.raw=e,this.config=t,this.metadata=e.metadata||{}),t=(this.title=t.title||t.name,e.worksheets||[{cells:e.cells}]);this.worksheets=t.map(function(e){return new u.Worksheet(e,i)}),this.sheet=this.worksheets[0]},u.Notebook.prototype.render=function(){var t=h("div",["notebook"]);return this.worksheets.forEach(function(e){t.appendChild(e.render())}),this.el=t},u.parse=function(e,t){return new u.Notebook(e,t)},"function"==typeof define&&define.amd&&define(function(){return u}),"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=u:exports).nb=u:a.nb=u}.call(this);var Org=function(){var e={},n={rules:{},define:function(t,e){this.rules[t]=e,this["is"+t.substring(0,1).toUpperCase()+t.substring(1)]=function(e){return this.rules[t].exec(e)}}};function r(){}function s(e){this.stream=e,this.tokenStack=[]}function o(e,t){if(this.type=e,this.children=[],t)for(var i=0,n=t.length;i";return void 0!==this.value?e+=" "+this.value:this.children&&(e+="\n"+this.children.map(function(e,t){return"#"+t+" "+e.toString()}).join("\n").split("\n").map(function(e){return" "+e}).join("\n")),e}};var u={types:{},define:function(i,n){var e="create"+(this.types[i]=i).substring(0,1).toUpperCase()+i.substring(1),r="function"==typeof n;this[e]=function(e,t){e=new o(i,e);return r&&n(e,t||{}),e}}};function a(e){this.sequences=e.split(/\r?\n/),this.totalLines=this.sequences.length,this.lineNumber=0}function l(){this.inlineParser=new t}function t(){this.preEmphasis=" \t\\('\"",this.postEmphasis="- \t.,:!?;'\"\\)",this.borderForbidden=" \t\r\n,\"'",this.bodyRegexp="[\\s\\S]*?",this.markers="*/_=~+",this.emphasisPattern=this.buildEmphasisPattern(),this.linkPattern=/\[\[([^\]]*)\](?:\[([^\]]*)\])?\]/g}function i(){}function h(e,t){this.initialize(e,t),this.result=this.convert()}return u.define("text",function(e,t){e.value=t.value}),u.define("header",function(e,t){e.level=t.level}),u.define("orderedList"),u.define("unorderedList"),u.define("definitionList"),u.define("listElement"),u.define("paragraph"),u.define("preformatted"),u.define("table"),u.define("tableRow"),u.define("tableCell"),u.define("horizontalRule"),u.define("directive"),u.define("inlineContainer"),u.define("bold"),u.define("italic"),u.define("underline"),u.define("code"),u.define("verbatim"),u.define("dashed"),u.define("link",function(e,t){e.src=t.src}),void 0!==e&&(e.Node=u),a.prototype.peekNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber]:null},a.prototype.getNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber++]:null},a.prototype.hasNext=function(){return this.lineNumbere)){if(0<(l=s.level-i))for(var o,a=0;a]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/i,linkURL:function(e){var t=this;return e.replace(this.urlPattern,function(e){return e.indexOf("://")<0&&(e="http://"+e),t.makeLink(e)})},makeLink:function(e){throw"Implement makeLink"},makeSubscripts:function(e){return"{}"===this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_{([^}]*)}/g,this.makeSubscript):this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_([^_]*)\b/g,this.makeSubscript):e},makeSubscript:function(e,t,i){throw"Implement makeSubscript"},imageExtensionPattern:new RegExp("("+["bmp","png","jpeg","jpg","gif","tiff","tif","xbm","xpm","pbm","pgm","ppm"].join("|")+")$","i")},void 0!==e&&(e.Converter=i),h.prototype={__proto__:i.prototype,convert:function(){var e=this.orgDocument.title?this.convertNode(this.orgDocument.title):this.untitled,t=this.tag("h1",e),i=this.convertNodes(this.orgDocument.nodes,!0),n=this.computeToc(this.documentOptions.toc),r=this.tocToHTML(n);return{title:e,titleHTML:t,contentHTML:i,tocHTML:r,toc:n,toString:function(){return t+r+"\n"+i}}},tocToHTML:function(e){function a(e){for(var t="",i=0;i":[">",null],'"':[""",null],"'":["'",null],"->":["➔",function(e,t){return this.exportOptions.translateSymbolArrow&&!t}]},replaceRegexp:null,escapeSpecialChars:function(i,n){this.replaceRegexp||(this.replaceRegexp=new RegExp(Object.keys(this.replaceMap).join("|"),"g"));var r=this.replaceMap,s=this;return i.replace(this.replaceRegexp,function(e){var t;if(r[e])return"function"!=typeof(t=r[e][1])||t.call(s,i,n)?r[e][0]:e;throw"escapeSpecialChars: Invalid match"})},postProcess:function(e,t,i){return t=this.exportOptions.exportFromLineNumber&&"number"==typeof e.fromLineNumber?this.inlineTag("div",t,{"data-line-number":e.fromLineNumber}):t},makeLink:function(e){return''+decodeURIComponent(e)+""},makeSubscript:function(e,t,i){return''+t+''+i+""},attributesObjectToString:function(e){var t,i="";for(t in e)e.hasOwnProperty(t)&&(i+=" "+t+'="'+e[t]+'"');return i},inlineTag:function(e,t,i,n){var r="<"+e;return n&&(r+=" "+n),r+=this.attributesObjectToString(i=i||{}),null===t?r+"/>":r+">"+t+""},tag:function(e,t,i,n){return this.inlineTag(e,t,i,n)+"\n"}},void 0!==e&&(e.ConverterHTML=h),e}();(function(){function l(e,i){var t,n;return i=o(e,i),(e=r.modules[i])||("function"==typeof(e=r.payloads[i])&&(t={id:i,uri:"",exports:n={},packaged:!0},n=e(function(e,t){return s(i,e,t)},n,t)||t.exports,r.modules[i]=n,delete r.payloads[i]),e=r.modules[i]=n||e),e}var e,t,i=function(){return this}(),r=(i||"undefined"==typeof window||(i=window),function(e,t,i){"string"!=typeof e?r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(i=t),r.modules[e]||(r.payloads[e]=i,r.modules[e]=null))}),s=(r.modules={},r.payloads={},function(e,t,i){if("string"==typeof t){var n=l(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,o=t.length;s ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){var i,n;return this.end.row>t?i={row:t+1,column:0}:this.end.rowt?n={row:t+1,column:0}:this.start.row>=1)&&(e+=e);return i};var n=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,i={};for(t in e)i[t]=e[t];return i},t.copyArray=function(e){for(var t=[],i=0,n=e.length;iDate.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,i){"use strict";var N=e("../lib/event"),B=e("../lib/useragent"),z=e("../lib/dom"),H=e("../lib/lang"),U=e("../clipboard"),W=B.isChrome<18,q=B.isIE,V=63e+1?t.length:n,n+=r.length+1,r=r+"\n"+t):Y&&0=f.length&&e.value===f&&f&&e.selectionEnd!==y}),x=null,S=(this.setInputHandler=function(e){x=e},!(this.getInputHandler=function(){return x})),A=function(e,t){if(S=S&&!1,p)return w(),e&&d.onPaste(e),p=!1,"";for(var i=u.selectionStart,n=u.selectionEnd,r=v,s=f.length-y,o=e,a=e.length-i,l=e.length-n,h=0;0v-1&&f[f.length-h]==e[e.length-h];)h++,s--;a-=h-1,l-=h-1;var c=o.length-h+1;return c<0&&(r=-c,c=0),o=o.slice(0,c),t||o||a||r||s||l?(c=!(m=!0),B.isAndroid&&". "==o&&(o=" ",c=!0),o&&!r&&!s&&!a&&!l||g?d.onTextInput(o):d.onTextInput(o,{extendLeft:r,extendRight:s,restoreStart:a,restoreEnd:l}),m=!1,f=e,v=i,y=n,b=l,c?"\n":o):""},k=function(e){if(o)return T();if(e&&e.inputType){if("historyUndo"==e.inputType)return d.execCommand("undo");if("historyRedo"==e.inputType)return d.execCommand("redo")}var e=u.value,t=A(e,!0);(500this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,i=t.session.getBracketRange(e);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,i=(this.setState("selectByLines"),t.getSelectionRange());i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(i.start.row),this.$clickSelection.end=t.selection.getLineRange(i.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){var t,i,n,r,s,o,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),i=this.$lastScroll,r=(a=(n=e.domEvent.timeStamp)-i.t)?e.wheelX/a:i.vx,s=a?e.wheelY/a:i.vy,a<550&&(r=(r+i.vx)/2,s=(s+i.vy)/2),a=!1,1<=(o=Math.abs(r/s))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=o<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?i.allowed=n:n-i.allowed<550&&(Math.abs(r)<=1.5*Math.abs(i.vx)&&Math.abs(s)<=1.5*Math.abs(i.vy)?(a=!0,i.allowed=n):i.allowed=0),i.t=n,i.vx=r,i.vy=s,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var r=e("./lib/dom");(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),t.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function d(e){o.call(this,e)}var u=e("../lib/dom"),n=e("../lib/oop"),p=e("../lib/event"),o=e("../tooltip").Tooltip;n.inherits(d,o),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();i<(e+=15)+r&&(e-=e+r-i),n<(t+=15)+s&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(d.prototype),t.GutterHandler=function(n){function r(){i=i&&clearTimeout(i),a&&(c.hide(),a=null,l._signal("hideGutterTooltip",c),l.off("mousewheel",r))}function s(e){c.setPosition(e.x,e.y)}var i,o,a,l=n.editor,h=l.renderer.$gutterLayer,c=new d(l.container);n.editor.setDefaultHandler("guttermousedown",function(e){if(l.isFocused()&&0==e.getButton()){var t=h.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,i=l.session.selection;if(e.getShiftKey())i.selectTo(t,0);else{if(2==e.domEvent.detail)return l.selectAll(),e.preventDefault();n.$clickSelection=l.selection.getLineRange(t)}return n.setState("selectByLines"),n.captureMouse(e),e.preventDefault()}}}),n.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(u.hasCssClass(t,"ace_fold-widget"))return r();a&&n.$tooltipFollowsMouse&&s(e),o=e,i=i||setTimeout(function(){i=null,(o&&!n.isMousePressed?function(){var e=o.getDocumentPosition().row,t=h.$annotations[e];if(!t)return r();if(e==l.session.getLength()){var e=l.renderer.pixelToScreenCoordinates(0,o.y).row,i=o.$pos;if(e>l.session.documentToScreenRow(i.row,i.column))return r()}a!=t&&(a=t.text.join("
"),c.setHtml(a),c.show(),l._signal("showGutterTooltip",c),l.on("mousewheel",r),n.$tooltipFollowsMouse?s(o):(e=o.domEvent.target.getBoundingClientRect(),(i=c.getElement().style).left=e.right+"px",i.top=e.bottom+"px"))}:r)()},50)}),p.addListener(l.renderer.$gutter,"mouseout",function(e){o=null,a&&(i=i||setTimeout(function(){i=null,r()},50))},l),l.on("changeSession",r)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),e=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(e.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(t){function e(){var e,t,i,n,r,s,o,a,l=u;u=y.renderer.screenToTextCoordinates(h,c),r=u,s=l,o=Date.now(),a=!s||r.row!=s.row,s=!s||r.column!=s.column,!f||a||s?(y.moveCursorToPosition(r),f=o,v={x:h,y:c}):5this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),C.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;C.isIE&&"dragReady"==this.state&&3i&&(m=-1),u=e.clientX=o,p=e.clientY=s,S=A=0,new k(e,c));if(v=o.getDocumentPosition(),r-m<500&&1==t.length&&!w)x++,e.preventDefault(),e.button=0,f=null,clearTimeout(f),c.selection.moveToPosition(v),(s=2<=x?c.selection.getLineRange(v.row):c.session.getBracketRange(v))&&!s.isEmpty()?c.selection.setRange(s):c.selection.selectWord(),b="wait";else{x=0;var o=c.selection.cursor,t=c.selection.isEmpty()?o:c.selection.anchor,s=c.renderer.$cursorLayer.getPixelPosition(o,!0),o=c.renderer.$cursorLayer.getPixelPosition(t,!0),t=c.renderer.scroller.getBoundingClientRect(),a=c.renderer.layerConfig.offset,l=c.renderer.scrollLeft,h=function(e,t){return(e/=n)*e+(t=t/i-.75)*t};if(e.clientX=t.length||(r=i[n-1])!=k&&r!=_||(l=t[n+1])!=k&&l!=_?C:(l=v?_:l)==r?l:C;case L:return(r=0=e){for(n=l+1;n=e;)n++;for(r=l,s=n-1;r>8;return 0==i?191M&&t[a]t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var i=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(i.row,i.column,t.row,t.column)},this.$setSelection=function(e,t,i,n){var r,s;!this.$silent&&(r=this.$isEmpty,s=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(i,n),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){var i;return void 0===t&&(e=(i=e||this.lead).row,t=i.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},this.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(e),i=i?(e=i.start.row,i.end.row):e;return!0===t?new a(e,0,i,this.session.getLine(i).length):new a(e,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,r=e.column+t;return i<0&&(n=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),eh&&(u=e.substring(h,f-g.length),d.type==p?d.value+=u:(d.type&&l.push(d),d={type:p,value:u}));for(var v=0;vy){for(c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0===i)for(i=0;0e.length&&(w=e.length)}),l==1/0&&(l=w,a=o=!1),c&&l%h!=0&&(l=Math.floor(l/h)*h),t(a?d:p)},this.toggleBlockComment=function(e,t,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(u=new g(t,n.row,n.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.start))){var h=u.getCurrentTokenRow(),c=u.getCurrentTokenColumn()+p,d=new f(h,c,h,c+r.start.length);break}a=u.stepBackward()}for(var u,p,a=(u=new g(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.end))){var h=u.getCurrentTokenRow(),c=u.getCurrentTokenColumn()+p,m=new f(h,c,h,c+r.end.length);break}a=u.stepForward()}m&&t.remove(m),d&&(t.remove(d),s=d.start.row,o=-r.start.length)}else o=r.start.length,s=i.start.row,t.insert(i.end,r.end),t.insert(i.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var n in this.$embeds=[],this.$modes={},e){var t,i,r;e[n]&&(i=(t=e[n]).prototype.$id,(r=o.$modes[i])||(o.$modes[i]=r=new t),o.$modes[n]||(o.$modes[n]=r),this.$embeds.push(n),this.$modes[n]=r)}for(var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],n=0;nthis.row||(e=e,t={row:this.row,column:this.column},i=this.$insertRight,n=((o="insert"==e.action)?1:-1)*(e.end.row-e.start.row),r=(o?1:-1)*(e.end.column-e.start.column),s=e.start,o=o?s:e.end,e=a(t,s,i)?{row:t.row,column:t.column}:a(o,t,!i)?{row:t.row+n,column:t.column+(t.row==o.row?r:0)}:{row:s.row,column:s.column},this.setPosition(e.row,e.column,!0))},this.setPosition=function(e,t,i){i=i?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==i.row&&this.column==i.column||(e={row:this.row,column:this.column},this.row=i.row,this.column=i.column,this._signal("change",{old:e,value:i}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}.call(e.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";function n(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}var r=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,l=e("./anchor").Anchor;(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new l(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t,i;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),i=t.length-1,e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))),t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},this.clippedPos=function(e,t){var i=this.getLength(),i=(void 0===e?e=i:e<0?e=0:i<=e&&(e=i-1,t=void 0),this.getLine(e));return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0,i=(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens}}).call(n.prototype),t.BackgroundTokenizer=n}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";function n(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"}var h=e("./lib/lang"),c=(e("./lib/oop"),e("./range").Range);(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,n){if(this.regExp)for(var r=n.firstRow,s=n.lastRow,o=r;o<=s;o++){var a=this.cache[o];null==a&&(a=(a=(a=h.getMatchOffsets(i.getLine(o),this.regExp)).length>this.MAX_RANGES?a.slice(0,this.MAX_RANGES):a).map(function(e){return new c(o,e.offset,o,e.offset+e.length)}),this.cache[o]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].toScreenRange(i),this.clazz,n)}}}).call(n.prototype),t.SearchHighlight=n}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var n=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),0=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,r,s=0,o=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;lt||i[i.length-1].start.row=n);o++);if("insert"==e.action)for(var l=r-n,h=-t.column+i.column;on)break;c.start.row==n&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=h,c.start.row+=l)),c.end.row==n&&c.end.column>=t.column&&(c.end.column==t.column&&this.$bias<0||(c.end.column==t.column&&0c.start.column&&c.end.column==s[o+1].start.column&&(c.end.column-=h),c.end.column+=h,c.end.row+=l))}else for(var c,l=n-r,h=t.column-i.column;or)break;c.end.rowt.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=h,c.end.row+=l):c.end.row>r&&(c.end.row+=l),c.start.rowt.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=h,c.start.row+=l):c.start.row>r&&(c.start.row+=l)}if(0!=l&&o=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(-1==(n=t?i.indexOf(t):n)&&(n=0);n=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;ra)break}while(r&&o.test(r.type));r=n.stepBackward()}else r=n.getCurrentToken();return s.end.row=n.getCurrentTokenRow(),s.end.column=n.getCurrentTokenColumn()+r.value.length-2,s}},this.foldAll=function(e,t,i,n){null==i&&(i=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var s,o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=i,this.addFold("...",s))}},this.foldToLevel=function(e){for(this.foldAll();0=e)break}n--}return{range:-1!==n&&s,firstRange:o}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,i)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var i,n,r,s;if(this.getFoldWidget)return i=this.getFoldWidget(e),n=this.getLine(e),(n=this.getFoldAt(e,-1==(i="end"===i?-1:1)?0:n.length,i))?(t.children||t.all?this.removeFold(n):this.expandFold(n),n):(i=this.getFoldWidgetRange(e,!0))&&!i.isMultiLine()&&(n=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(n.range)?(this.removeFold(n),n):(t.siblings?((n=this.getParentFoldRangeData(e)).range&&(r=n.range.start.row+1,s=n.range.end.row),this.foldAll(r,s,t.all?1e4:0)):t.children?(s=i?i.end.row:this.getLength(),this.foldAll(e+1,s,t.all?1e4:0)):i&&(t.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)},this.toggleFoldWidget=function(e){var t,i=this.selection.getCursor().row;i=this.getRowFoldStart(i),!this.$toggleFoldWidget(i,{})&&(t=(t=this.getParentFoldRangeData(i,!0)).range||t.firstRange)&&(i=t.start.row,(i=this.getFoldAt(i,this.getLine(i).length,1))?this.removeFold(i):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;0==i?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+i,null):((e=Array(1+i)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var d=e("../token_iterator").TokenIterator,a=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,i,n=this.getLine(e.row),r=!0,s=n.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),r=!1),!o)return null;if(o[1]){if(!(i=this.$findClosingBracket(o[1],e)))return null;t=a.fromPoints(e,i),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(i=this.$findOpeningBracket(o[2],e)))return null;t=a.fromPoints(i,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),i=t.charAt(e.column-1),n=i&&i.match(/([\(\[\{])|([\)\]\}])/);return n||(i=t.charAt(e.column),e={row:e.row,column:e.column+1},n=i&&i.match(/([\(\[\{])|([\)\]\}])/)),n?(t=new a(e.row,e.column-1,e.row,e.column),(i=n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e))?[t,new a(i.row,i.column,i.row,i.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new d(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){i=i||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn()-2,l=o.value;;){for(;0<=a;){var h=l.charAt(a);if(h==n){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else h==e&&(r+=1);--a}for(;(o=s.stepBackward())&&!i.test(o.type););if(null==o)break;a=(l=o.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new d(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){i=i||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn();;){for(var l=o.value,h=l.length;a>1,s=e[r];if(st&&(t=e.screenWidth)}),this.lineWidgetWidth=t)},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=t.length,l=0;ln&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=e.length-1;-1!=i;i--){var n=e[i];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=0;ie.end.column&&(t.start.column+=s),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=s),r&&t.start.row>=e.end.row&&(t.start.row+=r,t.end.row+=r)),t.end=this.insert(t.start,o),a.length&&(n=e.start,i=t.start,r=i.row-n.row,s=i.column-n.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==n.row&&(e.start.column+=s),e.end.row==n.row&&(e.end.column+=s),e.start.row+=r,e.end.row+=r,e}))),t},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new d(0,0,0,0),n=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var s=this.getLine(r);i.start.row=r,i.end.row=r;for(var o=0;othis.doc.getLength()-1)return 0;n=r-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var r=new d(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),i=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,i),r.length&&this.addFolds(r),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){var i;return t=Math.max(0,t),t=e<0?e=0:(i=this.doc.getLength())<=e?this.doc.getLine(e=i-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange,t=(i.max<0&&(i={min:t,max:t}),this.$constrainWrapLimit(e,i.min,i.max));return t!=this.$wrapLimit&&1=r.row&&p.shiftRow(-a);o=s}else{var d=Array(a),u=(d.unshift(s,0),t?this.$wrapData:this.$rowLengthCache),h=(u.splice.apply(u,d),this.$foldData),c=0;for((p=this.getFoldLine(s))&&(0==(u=p.range.compareInside(n.row,n.column))?(p=p.split(n.row,n.column))&&(p.shiftRow(a),p.addRemoveChars(o,0,r.column-n.column)):-1==u&&(p.addRemoveChars(s,0,r.column-n.column),p.shiftRow(a)),c=h.indexOf(p)+1);c=s&&p.shiftRow(a)}else{var p,a=Math.abs(e.start.column-e.end.column);"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(s))&&p.addRemoveChars(s,n.column,a)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var o,i,a=this.doc.getAllLines(),n=this.getTabSize(),r=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(i=this.getFoldLine(l,i))?(o=[],i.walk(function(e,t,i,n){var r;if(null!=e){(r=this.$getDisplayTokens(e,o.length))[0]=m;for(var s=1;s>2)),a-1);pc[u-1]):!u,this.getLength()-1),m=this.getNextFoldLine(o),g=m?m.start.row:1/0;l<=e&&!(ea[h-1]):!h,this.getNextFoldLine(o)),d=c?c.start.row:1/0;o=p[m];)n++,m++;u=u.substring(p[m-1]||0,u.length),l=0d||(r.push(o=new b(h,d,h+a-1,u)),2v&&r[c].end.row==i.end.row;)c--;for(r=r.slice(p,c+1),p=0,c=r.length;p=r.length)break;d.lastIndex=a+=1}if(n.index+o>t)break;s.push(n.index,o)}for(var l=s.length-1;0<=l;l-=2){var h=s[l-1];if(i(e,h,e,h+(o=s[l])))return!0}}:function(e,t,i){var n=c.getLine(e);for(d.lastIndex=t;r=d.exec(n);){var r,s=r[0].length;if(i(e,r=r.index,e,r+s))return!0;if(!s&&(d.lastIndex=r+=1,r>=n.length))return!1}},{forEach:a?function(e){var t=n.row;if(!o(t,n.column,e)){for(t--;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return;if(0!=i.wrap)for(t=s,r=n.row;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return}}:function(e){var t=n.row;if(!o(t,n.column,e)){for(t+=1;t<=s;t++)if(o(t,0,e))return;if(0!=i.wrap)for(t=r,s=n.row;t<=s;t++)if(o(t,0,e))return}}})}}).call(n.prototype),t.Search=n}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){n.call(this,e,t),this.$singleCommand=!1}var a=e("../lib/keys"),s=e("../lib/useragent"),l=a.KEY_MODS;r.prototype=n.prototype,function(){function o(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i,n=e&&("string"==typeof e?e:e.name),r=(e=this.commands[n],t||delete this.commands[n],this.commandKeyBinding);for(i in r){var s,o=r[i];o==e?delete r[i]:Array.isArray(o)&&-1!=(s=o.indexOf(e))&&(o.splice(s,1),1==o.length)&&(r[i]=o[0])}},this.bindKey=function(e,n,r){if("object"==typeof e&&e&&(null==r&&(r=e.position),e=e[this.platform]),e)return"function"==typeof n?this.addCommand({exec:n,bindKey:e,name:n.name||e}):void e.split("|").forEach(function(e){var t="",i=(-1!=e.indexOf(" ")&&(e=(i=e.split(/\s+/)).pop(),i.forEach(function(e){e=this.parseKeys(e),e=l[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=l[i.hashId]+i.key;this._addCommandToBinding(t+e,n,r)},this)},this._addCommandToBinding=function(e,t,i){var n=this.commandKeyBinding;if(t)if(!n[e]||this.$singleCommand)n[e]=t;else{Array.isArray(n[e])?-1!=(s=n[e].indexOf(t))&&n[e].splice(s,1):n[e]=[n[e]],"number"!=typeof i&&(i=o(t));for(var r=n[e],s=0;st?t+1:t,e.selection.moveCursorTo(i.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,r=[];n.length<1&&(n=[e.selection.getRange()]);for(var s=0;s=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){var t,i,n,r;this.$mergeUndoDeltas&&(t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(r=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0):n=n&&-1!==i.indexOf(e.command.name),(n="always"!=this.$mergeUndoDeltas&&2e3"===n.value&&a--),n&&0<=a;);else{do{if(n=l,l=i.stepBackward(),n)if(-1!==n.type.indexOf("tag-name"))s===n.value&&("<"===l.value?a++:""===n.value){for(var h=0,c=l;c;){if(-1!==c.type.indexOf("tag-name")&&c.value===s){a--;break}if("<"===c.value)break;c=i.stepBackward(),h++}for(var d=0;da.search(/\S|$/)&&(t=a.substr(s.column).search(/\S|$/),n.doc.removeInLine(s.row,s.column,s.column+t))),this.clearSelection(),s.column),t=n.getState(s.row),a=n.getLine(s.row),l=r.checkOutdent(t,a,e);n.insert(s,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new f(s.row,o+i.selection[0],s.row,o+i.selection[1])):this.selection.setSelectionRange(new f(s.row+i.selection[0],i.selection[1],s.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent&&(n.getDocument().isNewLine(e)&&(o=r.getNextLineIndent(t,a.slice(0,s.column),n.getTabString()),n.insert({row:s.row+1,column:0},o)),l)&&r.autoOutdent(t,n,s.row)},this.autoIndent=function(){for(var e,t,i,n,r,s=this.session,o=s.getMode(),a=(i=this.selection.isEmpty()?(t=0,s.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row),""),l="",h=s.getTabString(),c=t;c<=i;c++)0t.toLowerCase()?1:0});for(var r=new f(0,0,0,0),n=e.first;n<=e.last;n++){var s=t.getLine(n);r.start.row=n,r.end.row=n,r.end.column=s.length,t.replace(r,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){for(var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g,n=(i.lastIndex=0,this.session.getLine(e));i.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t,i,n,r=this.selection.getCursor().row,s=this.selection.getCursor().column,o=new f(r,s-1,r,s),o=this.session.getTextRange(o);!isNaN(parseFloat(o))&&isFinite(o)?(o=this.getNumberAt(r,s))&&(n=0<=o.value.indexOf(".")?o.start+o.value.indexOf(".")+1:o.end,t=o.start+o.value.length-n,i=parseFloat(o.value),i*=Math.pow(10,t),n!==o.end&&sp+1)break;p=m.last}for(c--,a=this.session.$moveLines(u,p,t?0:e),t&&-1==e&&(d=c+1);d<=c;)o[d].moveBy(a,0),d++;l+=a=t?a:0}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,r=e*Math.floor(n.height/n.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),i.scrollTop);i.scrollBy(0,r*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(e)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),e={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new b(this.session,i.row,i.column),r=n.getCurrentToken(),s=r||n.stepForward();if(s){var o,a,l,h=!1,c={},d=i.column-s.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;dwindow.innerHeight)&&null)&&(o.style.top=i+"px",o.style.left=e.left+"px",o.style.height=t.lineHeight+"px",o.scrollIntoView(s)),s=n=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",i))})},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(t,i,n){var r=this;y.loadModule("./ext/prompt",function(e){e.prompt(r,t,i,n)})}}.call(r.prototype),y.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),n.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),n.addCssClass(this.container,"ace_hasPlaceholder"),(e=n.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),{getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,i){return Math.max(t.toString().length,(i.lastRow+1).toString().length,2)*i.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}});t.Editor=r}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,i){"use strict";function r(e,t){for(var i=t;i--;){var n=e[i];if(n&&!n[0].ignore){for(;i"+e.end.row+":"+e.end.column}function o(e,t){var i="insert"==e.action,n="insert"==t.action;if(i&&n)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(i&&!n)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}else if(!i&&n)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(!i&&!n)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,i){h(e.start,t.start,t.end,i),h(e.end,t.start,t.end,i)}function h(e,t,i,n){e.row==(1==n?t:i).row&&(e.column+=n*(i.column-t.column)),e.row+=n*(i.row-t.row)}function c(e,t){var i=e.lines,n=e.end,r=(e.end=a(t),e.end.row-e.start.row),s=i.splice(r,i.length),r=r?t.column:t.column-e.start.column;return i.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:n,lines:s,action:e.action}}function d(e,t){var i;t={start:a((i=t).start),end:a(i.end),action:i.action,lines:i.lines.slice()};for(var n=e.length;n--;){for(var r=e[n],s=0;sa+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,e,this.session,h),this.$lines.push(o)),this.$renderCell(o,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,i=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"",n=((this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+n-1),i?i.getWidth(t,r,e):r.toString().length*e.characterWidth),i=this.$padding||this.$computePadding();(n+=i.left+i.right)===this.gutterWidth||isNaN(n)||(this.gutterWidth=n,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",n))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var i=0;i=this.$cursorRow){if(n.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0i.right-t.right?"foldWidgets":void 0}}).call(n.prototype),t.Gutter=n}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}var p=e("../range").Range,r=e("../lib/dom");(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=t,i.className=e},this.update=function(e){if(e){var t,i;for(i in this.config=e,this.i=0,this.markers){var n,r,s,o=this.markers[i];o.range?(s=o.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(s=s.toScreenRange(this.session),o.renderer?(n=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth,o.renderer(t,s,r,n,e)):"fullLine"==o.type?this.drawFullLineMarker(t,s,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,s,o.clazz,e):s.isMultiLine()?"text"==o.type?this.drawTextMarker(t,s,o.clazz,e):this.drawMultiLineMarker(t,s,o.clazz,e):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",e)):o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ie.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,i){for(var n=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o=s;)o=this.$renderToken(a,o,h,c.substring(0,s-n)),c=c.substring(s-n),n=s,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(v.stringRepeat(" ",i.indent),this.element)),o=0,s=i[++r]||Number.MAX_VALUE;0!=c.length&&(n+=c.length,o=this.$renderToken(a,o,h,c))}}i[i.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,o,null,"",!0)},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],r=n.value;(r=this.displayIndentGuides?this.renderIndentGuide(e,r):r)&&(i=this.$renderToken(e,i,n,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,i,n,r);i=this.$renderToken(e,i,n,r)}},this.$renderOverflowMessage=function(e,t,i,n,r){i&&this.$renderToken(e,t,i,n.slice(0,this.MAX_LINE_LENGTH-t));i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=r?"":"",e.appendChild(i)},this.$renderLine=function(e,t,i){var n,r,s=e;(n=(i=i||0==i?i:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,i):this.session.getTokens(t)).length?(r=this.session.getRowSplitData(t))&&r.length?(this.$renderWrappedLine(e,n,r),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,n)):this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.showEOL&&s&&(i&&(t=i.end.row),(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(r))},this.$getFoldLineTokens=function(e,t){var d=this.session,u=[],p=d.getTokens(e);return t.walk(function(e,t,i,n,r){if(null!=e)u.push({type:"fold",value:e});else if((p=r?d.getTokens(t):p).length){for(var s,o=p,a=n,l=i,h=0,c=0;c+o[h].value.lengthl-a&&(s=s.substring(0,l-a)),u.push({type:o[h].type,value:s}),c=a+s.length,h+=1);cl?u.push({type:o[h].type,value:s.substring(0,l-c)}):u.push(o[h]),c+=s.length,h+=1}},t.end.row,this.session.getLine(t.end.row).length),u},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(n.prototype),t.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}var h=e("../lib/dom");(function(){this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)h.setStyle(t[i].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){h.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){h.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,h.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=h.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){var e;if(1e.height+e.offset||a.top<0)&&1n;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(n.prototype),t.Cursor=n}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}function r(e,t){n.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=a.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}function s(e,t){n.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"}var o=e("./lib/oop"),a=e("./lib/dom"),l=e("./lib/event"),h=e("./lib/event_emitter").EventEmitter;!function(){o.implement(this,h),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}.call(n.prototype),o.inherits(r,n),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(r.prototype);o.inherits(s,n),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(s.prototype),t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=s,t.VScrollBar=r,t.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";function n(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var i=this;this._flush=function(e){i.pending=!1;var t=i.changes;t&&(r.blockIdle(100),i.changes=0,i.onRender(t)),i.changes?i.$recursionLimit--<0||i.schedule():i.$recursionLimit=2}}var r=e("./lib/event");(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(n.prototype),t.RenderLoop=n}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,h="function"==typeof ResizeObserver,e=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",256),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};!function(){n.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e}))},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){var t;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(t=this).$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=r.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},this.transformCoordinates=function(e,t){function i(e,t,i){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*i[0]+t[0]*i[1])/n,(+e[1]*i[0]-e[0]*i[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function o(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&s(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l=o(this.els[0]),h=o(this.els[1]),c=o(this.els[2]),d=o(this.els[3]),d=i(n(d,h),n(d,c),n(r(h,c),r(d,l))),h=s(1+d[0],n(h,l)),c=s(1+d[1],n(c,l));return t?(a=d[0]*t[0]/200+d[1]*t[1]/200+1,t=r(s(t[0],h),s(t[1],c)),r(s(1/a/200,t),l)):(a=n(e,l),t=i(n(h,s(d[0],a)),n(c,s(d[1],a)),a),s(200,t))}}.call(e.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){var i=this,e=(this.container=e||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),this.$textLayer=new h(this.content));this.canvas=e.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!v.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)}var r=e("./lib/oop"),a=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,h=e("./layer/text").Text,c=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,f='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',v=e("./lib/useragent"),y=v.isIE;a.importCssString(f,"ace_editor.css");(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(2o.height-n?a.translate(this.textarea,0,0):(o=1,r=this.$size.height-n,s?s.useTextareaForIME?(s=this.textarea.value,o=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(i-=this.scrollLeft)>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",n+"px"),a.setStyle(e,"width",o+"px"),a.translate(this.textarea,Math.min(i,this.$size.scrollerWidth-o),Math.min(t,r)))):a.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,i,n){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t)&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i,n,t=this.layerConfig;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(i=this.scrollTop+(t.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=i,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),i=t.width+2*this.$padding+"px",n=t.minHeight+"px",a.setStyle(this.content.style,"width",i),a.setStyle(this.content.style,"height",n)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(t):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight());t=!((i=this.$maxPixelHeight&&i>this.$maxPixelHeight?this.$maxPixelHeight:i)<=2*this.lineHeight)&&tc.top)),h=o!==n,c=(h&&(this.$vScroll=n,this.scrollBarV.setVisible(n)),this.scrollTop%this.lineHeight),o=Math.ceil(l/this.lineHeight)-1,o=(n=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)))+o,d=this.lineHeight,n=t.screenToDocumentRow(n,0),u=t.getFoldLine(n),t=(u&&(n=u.start.row),u=t.documentToScreenRow(n,0),e=t.getRowLength(n)*d,o=Math.min(t.screenToDocumentRow(o,0),t.getLength()-1),l=i.scrollerHeight+t.getRowLength(o)*d+e,c=this.scrollTop-u*d,0);return this.layerConfig.width==s&&!a||(t=this.CHANGE_H_SCROLL),(a||h)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,i.width,i.height),this._signal("scrollbarVisibilityChanged"),h)&&(s=this.$getLongestLine()),this.layerConfig={width:s,padding:this.$padding,firstRow:n,firstRowScreen:u,lastRow:o,lineHeight:d,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:c,gutterOffset:d?Math.max(0,Math.ceil((c+i.height-i.scrollerHeight)/d)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),t},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,i=(this.$changedLines=null,this.layerConfig);if(!(e>i.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){var n,r,s;0!==this.$size.scrollerHeight&&(n=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,s=i&&i.top||0,i=i&&i.bottom||0,e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+s?(t&&r+s>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-i=1-this.scrollMargin.top||0=1-this.scrollMargin.left||0this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(h.prototype);e.UIWorkerClient=function(e,t,i){var n=null,r=!1,s=Object.create(c),o=[],a=new h({messageBuffer:o,terminate:function(){},postMessage:function(e){o.push(e),n&&(r?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){r=e},function(){var e=o.shift();e.command?n[e.command].apply(n,e.args):e.event&&s._signal(e.event,e.data)});return s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},d.loadModule(["worker",t],function(e){for(n=new e[i](s);o.length;)l()}),a},e.WorkerClient=h,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";function n(e,t,i,n,r,s){var o=this,t=(this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=i,e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}var l=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop");(function(){s.implement(this,r),this.setup=function(){var t=this,i=this.doc,e=this.session,n=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column),this.pos);n.$insertRight=!0,n.detach(),n.markerId=e.addMarker(new l(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=i.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){var t,i;this.othersActive||(t=this.session,(i=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+i.length),i.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),n&&(this.length+=i),n&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var o={row:(a=this.others[s]).row,column:a.column+r};this.doc.insertMergedLines(o,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var a,o={row:(a=this.others[s]).row,column:a.column+r};this.doc.remove(new l(o.row,o.column,o.row,o.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var i=this,n=this.session,e=function(e,t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new l(e.row,e.column,e.row,e.column+i.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},this.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e)))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;is&&(s=e.column),(t=-1==t?0:t)t[1].length&&(r=t[1].length),st[3].length&&(o=t[3].length)),t):[e]}).map(t?n:a?l?function(e){return e[2]?i(r+s-e[2].length)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:n:function(e){return e[2]?i(r)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(h.prototype),r.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},r.MultiSelect=i,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){i(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var c=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){e=e.getLine(i);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var n=/\S/,r=e.getLine(t),s=r.search(n);if(-1!=s){for(var o,i=i||r.length,a=e.getLength(),r=t,l=t;++ti.row&&(n.row--,n.column=e.getLine(n.row).length),c.fromPoints(i,n)},this.closingBracketBlock=function(e,t,i,n,r){i={row:i,column:n},n=e.$findOpeningBracket(t,i);if(n)return n.column++,i.column--,c.fromPoints(n,i)}}.call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/dom");(function(){this.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var t=e.data,n=t.start.row,r=t.end.row,s="add"==e.action,o=n+1;or[t].column&&t++,n.unshift(t,0),r.splice.apply(r,n)),this.$updateRows())},this.$updateRows=function(){var i,e=this.session.lineWidgets;e&&(i=!0,e.forEach(function(e,t){if(e)for(i=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),i)&&(this.session.lineWidgets=null)},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},this.addLineWidget=function(e){var t,i,n;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight)&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),i=this.session.getFoldAt(e.row,0),(e.$fold=i)&&(n=this.session.lineWidgets,e.row!=i.end.row||n[i.start.row]?e.hidden=!0:n[i.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var r=1/0,s=0;s>1,o=i(t,e[s]);if(0=n.length?r=0"),s.appendChild(d.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),n.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},d.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,s,t){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),a=e("./lib/event"),i=e("./range").Range,l=e("./editor").Editor,n=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,h=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),s.config=e("./config"),s.require=e,"function"==typeof define&&(s.define=define),s.edit=function(e,t){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}var n,r;return e&&e.env&&e.env.editor instanceof l?e.env.editor:(i="",e&&/input|textarea/i.test(e.tagName)?(i=(n=e).value,e=o.createElement("pre"),n.parentNode.replaceChild(e,n)):e&&(i=e.textContent,e.innerHTML=""),i=s.createEditSession(i),e=new l(new h(e),i,t),r={document:i,editor:e,onResize:e.resize.bind(e,null)},n&&(r.textarea=n),a.addListener(window,"resize",r.onResize),e.on("destroy",function(){a.removeListener(window,"resize",r.onResize),r.editor.container.env=null}),e.container.env=e.env=r,e)},s.createEditSession=function(e,t){e=new n(e,t);return e.setUndoManager(new r),e},s.Range=i,s.Editor=l,s.EditSession=n,s.UndoManager=r,s.VirtualRenderer=h,s.version=s.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace.default=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(i){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",require:"?ngModel",link:function(o,e,a,n){function r(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);angular.isDefined(e)&&o.$evalAsync(function(){if(!angular.isFunction(e))throw new Error("ui-ace use a function as callback.");e(t)})}function t(e,t){if(e!==t){(d=angular.extend({},c,o.$eval(a.uiAce))).callbacks=[d.onLoad],d.onLoad!==c.onLoad&&d.callbacks.unshift(c.onLoad),p.removeListener("change",l),l=m(d.onChange),p.on("change",l),u.removeListener("blur",h),h=g(d.onBlur),u.on("blur",h);var i,n,r=u,e=p,s=d;if(angular.isDefined(s.workerPath)&&window.ace.require("ace/config").set("workerPath",s.workerPath),angular.isDefined(s.require)&&s.require.forEach(function(e){window.ace.require(e)}),angular.isDefined(s.showGutter)&&r.renderer.setShowGutter(s.showGutter),angular.isDefined(s.useWrapMode)&&e.setUseWrapMode(s.useWrapMode),angular.isDefined(s.showInvisibles)&&r.renderer.setShowInvisibles(s.showInvisibles),angular.isDefined(s.showIndentGuides)&&r.renderer.setDisplayIndentGuides(s.showIndentGuides),angular.isDefined(s.useSoftTabs)&&e.setUseSoftTabs(s.useSoftTabs),angular.isDefined(s.showPrintMargin)&&r.setShowPrintMargin(s.showPrintMargin),angular.isDefined(s.disableSearch)&&s.disableSearch&&r.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isString(s.theme)&&r.setTheme("ace/theme/"+s.theme),angular.isString(s.mode)&&e.setMode("ace/mode/"+s.mode),angular.isDefined(s.firstLineNumber)&&(angular.isNumber(s.firstLineNumber)?e.setOption("firstLineNumber",s.firstLineNumber):angular.isFunction(s.firstLineNumber)&&e.setOption("firstLineNumber",s.firstLineNumber())),angular.isDefined(s.advanced))for(i in s.advanced)n={name:i,value:s.advanced[i]},r.setOption(n.name,n.value);if(angular.isDefined(s.rendererOptions))for(i in s.rendererOptions)n={name:i,value:s.rendererOptions[i]},r.renderer.setOption(n.name,n.value);angular.forEach(s.callbacks,function(e){angular.isFunction(e)&&e(r)})}}var l,h,c=i.ace||{},d=angular.extend({},c,o.$eval(a.uiAce)),u=window.ace.edit(e[0]),p=u.getSession(),m=function(i){return function(e){var t=p.getValue();!n||t===n.$viewValue||o.$$phase||o.$root.$$phase||o.$evalAsync(function(){n.$setViewValue(t)}),r(i,e,u)}},g=function(e){return function(){r(e,u)}};a.$observe("readonly",function(e){u.setReadOnly(!!e||""===e)}),n&&(n.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-ace cannot use an object or an array as a model");return e}),n.$render=function(){p.setValue(n.$viewValue)});o.$watch(a.uiAce,t,!0),t(c),e.on("$destroy",function(){u.session.$stopWorker(),u.destroy()}),o.$watch(function(){return[e[0].offsetWidth,e[0].offsetHeight]},function(){u.resize(),u.renderer.updateFull()},!0)}}}]),angular.module("anonymous-github",["ngRoute","ngSanitize","ui.ace","ngPDFViewer","htmlDoc","pascalprecht.translate","admin"]).config(["$routeProvider","$locationProvider","$translateProvider",function(e,t,i){i.useStaticFilesLoader({prefix:"/i18n/locale-",suffix:".json"}),i.preferredLanguage("en"),e.when("/",{templateUrl:"/partials/home.htm",controller:"homeController",title:"Anonymous GitHub – Share the code, not the author"}).when("/dashboard",{templateUrl:"/partials/dashboard.htm",controller:"unifiedDashboardController",title:"Your anonymizations – Anonymous GitHub"}).when("/pr-dashboard",{redirectTo:"/dashboard"}).when("/anonymize/:repoId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"New anonymization – Anonymous GitHub"}).when("/pull-request-anonymize/:pullRequestId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a pull request – Anonymous GitHub"}).when("/gist-anonymize/:gistId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a gist – Anonymous GitHub"}).when("/status/:repoId",{templateUrl:"/partials/status.htm",controller:"statusController",title:"Repository status – Anonymous GitHub"}).when("/conferences",{templateUrl:"/partials/conferences.htm",controller:"conferencesController",title:"Your conferences – Anonymous GitHub"}).when("/conference/new",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"New conference – Anonymous GitHub"}).when("/conference/:conferenceId/edit",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"Edit conference – Anonymous GitHub"}).when("/conference/:conferenceId",{templateUrl:"/partials/conference.htm",controller:"conferenceController",title:"Conference – Anonymous GitHub"}).when("/faq",{templateUrl:"/partials/faq.htm",controller:"faqController",title:"FAQ – Anonymous GitHub"}).when("/profile",{templateUrl:"/partials/profile.htm",controller:"profileController",title:"Your settings – Anonymous GitHub"}).when("/claim",{templateUrl:"/partials/claim.htm",controller:"claimController",title:"Claim an anonymization – Anonymous GitHub"}).when("/pr/:pullRequestId/:path*?",{templateUrl:"/partials/pullRequest.htm",controller:"pullRequestController",title:"Anonymous pull request – Anonymous GitHub",reloadOnUrl:!1}).when("/gist/:gistId/:path*?",{templateUrl:"/partials/gist.htm",controller:"gistController",title:"Anonymous gist – Anonymous GitHub",reloadOnUrl:!1}).when("/r/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/repository/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/admin/",{templateUrl:"/partials/admin/overview.htm",controller:"overviewAdminController",title:"Admin · Overview – Anonymous GitHub"}).when("/admin/repositories",{templateUrl:"/partials/admin/repositories.htm",controller:"repositoriesAdminController",title:"Admin · Repositories – Anonymous GitHub"}).when("/admin/users",{templateUrl:"/partials/admin/users.htm",controller:"usersAdminController",title:"Admin · Users – Anonymous GitHub"}).when("/admin/users/:username",{templateUrl:"/partials/admin/user.htm",controller:"userAdminController",title:"Admin · User details – Anonymous GitHub"}).when("/admin/conferences",{templateUrl:"/partials/admin/conferences.htm",controller:"conferencesAdminController",title:"Admin · Conferences – Anonymous GitHub"}).when("/admin/queues",{templateUrl:"/partials/admin/queues.htm",controller:"queuesAdminController",title:"Admin · Queues – Anonymous GitHub"}).when("/admin/errors",{templateUrl:"/partials/admin/errors.htm",controller:"errorsAdminController",title:"Admin · Errors – Anonymous GitHub"}).when("/404",{templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}).otherwise({templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}),t.html5Mode(!0)}]).filter("humanFileSize",function(){return humanFileSize}).filter("bigNum",function(){return function(e){var e=Number(e)||0,t=Math.abs(e);return t<1e3?String(e):t<1e4?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":t<1e6?Math.round(e/1e3)+"k":t<1e7?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(e/1e6)+"M"}}).filter("humanTime",function(){return function(e){if(!e)return"never";var t,i=(e="string"!=typeof(e=e instanceof Date?Math.round((Date.now()-e)/1e3):e)&&"number"!=typeof e?e:Math.round((Date.now()-new Date(e))/1e3))<0?"from now":"ago";if(172800e.replace(/&/g,"&").replace(//g,">");function d(e,t){if(t){var i=t.newPath&&"/dev/null"!==t.newPath?t.newPath:t.oldPath||"",n="/dev/null"===t.oldPath?"added":"/dev/null"===t.newPath?"deleted":t.oldPath&&t.newPath&&t.oldPath!==t.newPath?"renamed":"modified";if(e.push('
'),e.push('
'+s(i)+''+n+"
"),t.lines.length){e.push('');for(const r of t.lines)e.push('");e.push("
'+(r.oldNo||"")+''+(r.newNo||"")+''+("add"===r.kind?"+":"remove"===r.kind?"-":"hunk"===r.kind?"@":"")+''+s(r.text)+"
")}e.push("
")}}return function(e){if(!e)return e;const t=[];let i=null,n=0,r=0;var s=()=>i=i||{oldPath:"",newPath:"",lines:[]},o=()=>{i&&(i.lines.length||i.oldPath||i.newPath)&&(d(t,i),i=null)},a=e.split("\n");for(let e=0;e
',link:function(i,n){function e(){var e,t;i.file&&(i.kind=(e=i.file,"md"===(t=o(e&&e.filename))||"markdown"===t||e&&"Markdown"===e.language?"md":"code"),i.prismClass="language-"+(t=i.file,t&&t.language&&s[t.language.toLowerCase()]||s[o(t&&t.filename)]||"none"),r(()=>{n[0].querySelectorAll("pre code").forEach(e=>{window.Prism&&Prism.highlightElement(e)})},50))}i.$watch("file",e),i.$watch("file.content",e),i.$watch("terms",e),i.$watch("options",e,!0)}}}]).directive("markdown",["$location",function(r){return{restrict:"E",scope:{terms:"=",options:"=",content:"="},link:function(e,t,i){function n(){t.html(renderMD(e.content,r.url()+"/../"))}e.$watch(i.terms,n),e.$watch("terms",n),e.$watch("options",n),e.$watch("content",n)}}}]).directive("tree",[function(){return{restrict:"E",scope:{file:"=",parent:"@",searchQuery:"=",searchResults:"="},controller:["$element","$scope","$routeParams","$compile",function(i,g,n,r){if(g.repoId=document.location.pathname.split("/")[2],g.opens={},n.path){let t="";n.path.split("/").forEach(e=>{g.opens[t+"/"+e]=!0,t=t+"/"+e})}function s(e){var t,i=[];const n={"":{child:i}};for(t of e){if(t.path&&!n[t.path]){o=a=s=r=void 0;var r=t.path;if(!n[r]){var s=r.split("/");let t="";for(let e=0;e{var i=!!e.child,n=!!t.child;return i&&n?e.name.localeCompare(t.name):i?-1:n?1:e.name.localeCompare(t.name)};function v(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function y(e,t,o){if(!e)return"";let a="
    ";for(var l of e=e.sort(f))if(!o||function t(e,i,n){if(!n)return!0;const r=i?i+"/"+e.name:e.name;return e.child?!!n.folders.has(r)||e.child.some(e=>t(e,r,n)):n.paths.has(r)}(l,t?t.substring(1):"",o)){let i=!!l.child,n=l.name,r=l.size,s=l;if(i){let e=n,t=l.child;for(;t&&1==t.length;)e+="/"+t[0].name,r=t[0].size,t=t[0].child;n=e,s=t?{child:t}:l,null!=r&&0<=r&&(i=!1)}var l=null!=r?"Size: "+humanFileSize(r||0):"",h=t+"/"+n,c=i&&(d=h,c=void 0,c=g.$parent.fileCounts)&&c[d.startsWith("/")?d.substring(1):d]||0,d=o?!1!==g.opens[h]:g.opens[h],u=["file"],p=(i&&u.push("folder"),d&&u.push("open"),g.isActive(h)&&u.push("active"),i&&(m=h,p=void 0,!!(p=g.$parent.options&&g.$parent.options.truncatedFolders||[]).length)&&(m=m.startsWith("/")?m.substring(1):m,-1!==p.indexOf(m))),m=(p&&u.push("truncated"),String(h).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""));if(a+=`
  • `,i?(a+=`${v(n)}`,p&&(a+=``),0${c}`),a+=""):(u=""!==t,a+=`${u?'':""}${v(n)}`),d&&s.child){l=s.child;if(1"}var m,p,d,c;return a+"
"}function o(){i.html("");var e=g.searchQuery?function(){var e=g.searchResults;if(!e||!e.length)return null;var t=new Set,i=new Set;for(const r of e){var n=r.path?r.path+"/"+r.name:r.name;if(t.add(n),r.path){let e="";for(const s of r.path.split("/").filter(Boolean))e=e?e+"/"+s:s,i.add(e)}}return{paths:t,folders:i}}():null;let t;t=null!==e&&0===e.paths.size?'
No files found
':y(s(g.file).sort(f),"",e),r(t)(g,e=>{i.append(e),a&&(e=function(e){if(e)for(var t=l(),i=0;i{if(null!=e){if(0==e.length)return i.html("Empty repository");!function e(t,i){if(t)for(const r of t){var n;r.child&&0!==r.child.length&&((n=i+"/"+r.name)in g.opens||(g.opens[n]=!0),e(r.child,n))}}(s(e),""),o()}},!0),g.$watch("searchResults",(e,t)=>{e!==t&&g.file&&g.file.length&&o()}),g.$watch("searchQuery",(e,t)=>{e!==t&&!e&&g.file&&g.file.length&&o()}),g.isActive=function(e){return n.path==e.substring(1)},g.openFolder=function(e,t){var i=g.opens[e],i=(void 0===i&&g.searchQuery&&(i=!0),g.opens[e]=!i,t.target.closest("li")),t=i?i.querySelector(":scope > ul"):null;null!=t&&0!==t.children.length||g.$parent.getFiles(e.substring(1))};var a=n.path?"/"+n.path:null;function l(){return Array.from(i[0].querySelectorAll("li > a"))}function h(){return i[0].querySelector("a.tree-focused")}function c(e){var t,i;return e?(t=e.getAttribute("href"))?(i="/r/"+g.repoId,0===t.indexOf(i)?decodeURIComponent(t.substring(i.length)):null):(t=e.getAttribute("ng-click"))&&(i=t.match(/openFolder\('([^']+)'/))?i[1]:null:null}function d(e){var t=h();t&&t.classList.remove("tree-focused"),a=e?(e.classList.add("tree-focused"),e.scrollIntoView({block:"nearest"}),c(e)):null}i[0].setAttribute("tabindex","0"),i[0].addEventListener("keydown",function(e){var t,i,n,r=l();r.length&&(n=(t=h())?r.indexOf(t):-1,"ArrowDown"===e.key?(e.preventDefault(),d(r[n ul > li > a"))&&d(n):t.click())):"ArrowLeft"===e.key?(e.preventDefault(),t&&((i=t.closest("li"))&&i.classList.contains("folder")&&i.classList.contains("open")?t.click():(r=i&&i.parentElement?i.parentElement.closest("li.folder"):null)&&(n=r.querySelector(":scope > a"))&&d(n))):"Enter"===e.key&&(e.preventDefault(),t)&&t.click())}),i[0].addEventListener("click",function(e){e=e.target.closest("a");e&&i[0].contains(e)&&d(e)})}]}}]).directive("notebook",[function(){return{restrict:"E",scope:{file:"="},controller:["$element","$scope","$http",function(i,e,t){function n(e){e=nb.parse(e);try{i.html("");var t=e.render();i.html(DOMPurify.sanitize(t)),Prism.highlightAll()}catch(e){i.html("Unable to render the notebook.")}}function r(){if(e.$parent.content)try{n(JSON.parse(e.$parent.content))}catch(e){i.html("Unable to render the notebook invalid notebook format.")}else e.file&&t.get(e.file.download_url).then(e=>n(e.data))}e.$watch("file",e=>{r()}),r()}]}}]).directive("loc",[function(){return{restrict:"E",scope:{stats:"="},template:"
",controller:["$scope",function(i){function t(){for(var e in i.elements=[],i.total=0,i.stats){var t=i.stats[e].code;t&&(i.total+=t,i.elements.push({lang:e,loc:t,color:langColors[e]}))}setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},100)}i.$watch("stats",e=>{t()}),t()}]}}]).controller("mainController",["$scope","$http","$location","$timeout",function(r,e,i,t){function n(e,t){t&&(r.title=t.title),r.path=i.url(),r.paths=i.path().substring(1).split("/")}r.title="Main",r.user={status:"connection"},r.site_options,r.toasts=[],r.removeToast=function(e){e=r.toasts.indexOf(e);-1!==e&&r.toasts.splice(e,1)},r.addToast=function(e){return r.toasts.push(e),t(function(){r.removeToast(e)},8e3),e},r.path=i.url(),r.paths=i.path().substring(1).split("/"),r.darkMode=function(e){localStorage.setItem("darkMode",e);var t,i="/css/prism-okaidia.css",n="/css/prism.css",n=(((r.isDarkMode=e)?($("body").addClass("dark-mode"),(t=document.createElement("link")).href=i,t.rel="stylesheet",document.head.append(t),$(`link[href='${n}']`)):($("body").removeClass("dark-mode"),(t=document.createElement("link")).href=n,t.rel="stylesheet",document.head.append(t),$(`link[href='${i}']`))).remove(),document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap"));n&&(n.style.backgroundColor=e?"#FAF9F6":"#1A1815",n.style.color=e?"#1A1815":"#FAF9F6"),r.$broadcast("dark-mode",e)},r.darkMode("true"==localStorage.getItem("darkMode")),e.get("/api/user").then(e=>{e&&(r.user=e.data)},()=>{r.user=null}),e.get("/api/options").then(e=>{e&&(r.site_options=e.data)},()=>{r.site_options=null}),e.get("/api/message").then(e=>{e&&(r.generalMessage=e.data)},()=>{r.generalMessage=null}),r.$on("$routeChangeSuccess",n),r.$on("$routeUpdate",n)}]).controller("faqController",["$scope","$http",function(e,t){}]).controller("profileController",["$scope","$http",function(t,i){function n(){i.get("/api/user/default").then(e=>{e=e.data;e.terms&&(t.terms=e.terms.join("\n")),t.options=Object.assign({},t.options,e.options)})}t.terms="",t.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},n(),t.saveDefault=()=>{var e={terms:t.terms.trim().split("\n"),options:t.options};i.post("/api/user/default",e).then(()=>{n(),t.message="Saved"},e=>{$translate("ERRORS."+e.data.error).then(e=>{t.error=e},console.error)})},t.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(t.deletingAccount=!0,i.delete("/api/user").then(()=>{window.location.href="/"},()=>{t.deletingAccount=!1,t.deleteError="Unable to delete the account. Please try again."}))}}]).controller("claimController",["$scope","$http","$location",function(t,e,i){t.repoId=null,t.repoUrl=null,t.claim=()=>{e.post("/api/repo/claim",{repoId:t.repoId,repoUrl:t.repoUrl}).then(e=>{i.url("/dashboard")},e=>{t.error=e.data,t.claimForm.repoUrl.$setValidity("not_found",!1),t.claimForm.repoId.$setValidity("not_found",!1)})}}]).controller("homeController",["$scope","$http","$location",function(t,e,i){function n(t){var i={series:t,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(t&&!(t.length<2)){var n=new Array(t.length-1);for(let e=1;e{t.user&&!t.user.status&&i.url("/dashboard")}),t.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.get("/api/stat/").then(e=>{t.stat=e.data,t.cards[0].total=e.data.nbRepositories,t.cards[1].total=e.data.nbUsers,t.cards[2].total=e.data.nbPageViews,t.cards[3].total=e.data.nbPullRequests}),t.history={repositories:n([]),users:n([]),pageViews:n([]),pullRequests:n([])},e.get("/api/stat/history?days=60").then(e=>{e=e.data||[];t.history={repositories:n(e.map(e=>e.nbRepositories||0)),users:n(e.map(e=>e.nbUsers||0)),pageViews:n(e.map(e=>e.nbPageViews||0)),pullRequests:n(e.map(e=>e.nbPullRequests||0))}})}]).controller("unifiedDashboardController",["$scope","$http","$location",function(r,s,e){r.$on("$routeChangeStart",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),r.$watch("user.status",()=>{null==r.user&&e.url("/")}),null==r.user&&e.url("/"),setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),r.items=[],r.search="";const t="dashboard.filterPrefs",i="all",n={status:{ready:!0,expired:!0,removed:!1}},o="-anonymizeDate";var a=loadFilterPrefs(t)||{};r.typeFilter=a.typeFilter||i,r.filters={status:Object.assign({},n.status,a.filters&&a.filters.status||{})},r.orderBy=a.orderBy||o,r.$watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})}),r.$watch("filters",()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})},!0),s.get("/api/user/quota").then(e=>{r.quota=e.data,r.quota.storage.percent=r.quota.storage.total?100*r.quota.storage.used/r.quota.storage.total:100,r.quota.file.percent=r.quota.file.total?100*r.quota.file.used/r.quota.file.total:100,r.quota.repository.percent=r.quota.repository.total?100*r.quota.repository.used/r.quota.repository.total:100},console.error);let l=null,h=null,c=null;function d(){r.items=(l||[]).concat(h||[]).concat(c||[])}function u(){l=null,h=null,c=null,s.get("/api/user/anonymized_repositories").then(e=>{l=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="repo",e._id=e.repoId,e._name=e.repoId,e._source=e.source.fullName,e._editUrl="/anonymize/"+e.repoId,e._viewUrl="/r/"+e.repoId+"/",e)),d()},e=>{console.error(e)}),s.get("/api/user/anonymized_pull_requests").then(e=>{h=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="pr",e._id=e.pullRequestId,e._name=e.pullRequestId,e._source=e.source.repositoryFullName+"#"+e.source.pullRequestId,e._editUrl="/pull-request-anonymize/"+e.pullRequestId,e._viewUrl="/pr/"+e.pullRequestId+"/",e)),d()},e=>{console.error(e)}),s.get("/api/user/anonymized_gists").then(e=>{c=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=(e.options.terms||[]).filter(e=>e),e._type="gist",e._id=e.gistId,e._name=e.gistId,e._source=e.source.gistId,e._editUrl="/gist-anonymize/"+e.gistId,e._viewUrl="/gist/"+e.gistId+"/",e)),d()},e=>{console.error(e)})}function p(i,n){s.get("/api/repo/"+i).then(e=>{for(const t of r.items)if("repo"===t._type&&t.repoId==i){t.status=e.data.status;break}"ready"==e.data.status||"error"==e.data.status||"removed"==e.data.status||"expired"==e.data.status?n(e.data):setTimeout(()=>p(i,n),2500)})}u();const m=e=>"repo"===e?"repository":"gist"===e?"gist":"pull request",g=e=>"repo"===e?"/api/repo":"gist"===e?"/api/gist":"/api/pr";r.removeItem=t=>{const e=m(t._type);if(confirm(`Are you sure that you want to remove the ${e} ${t._id}?`)){const n={title:`Removing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be removed.`};r.addToast(n);var i=g(t._type)+"/"+t._id;s.delete(i).then(()=>{"repo"===t._type?p(t._id,()=>{n.title=t._id+" is removed.",n.body=`The ${e} ${t._id} is removed.`,r.$apply()}):(n.title=t._id+" is removed.",n.body=`The ${e} ${t._id} is removed.`,u())},e=>{n.title=`Error during the removal of ${t._id}.`,n.body=e.body,u()})}},r.refreshItem=t=>{const e=m(t._type),i={title:`Refreshing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be refreshed.`};r.addToast(i);var n=`${g(t._type)}/${t._id}/refresh`;s.post(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is refreshed.",i.body=`The ${e} ${t._id} is refreshed.`,r.$apply()}):(i.title=t._id+" is refreshed.",i.body=`The ${e} ${t._id} is refreshed.`,u())},e=>{i.title=`Error during the refresh of ${t._id}.`,i.body=e.body,u()})},r.extendItem=t=>{const e=m(t._type),i={title:`Extending ${t._id}...`,date:new Date,body:`The expiration of ${e} ${t._id} is going to be extended by 6 months.`};r.addToast(i);var n=`${g(t._type)}/${t._id}/extend`;s.post(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is extended.",i.body=`The expiration of ${e} ${t._id} is extended by 6 months.`,r.$apply()}):(i.title=t._id+" is extended.",i.body=`The expiration of ${e} ${t._id} is extended by 6 months.`,u())},e=>{i.title=`Error during the extension of ${t._id}.`,i.body=e.data&&e.data.error||e.body,u()})},r.itemFilter=e=>("all"===r.typeFilter||e._type===r.typeFilter)&&0!=r.filters.status[e.status]&&(0==r.search.trim().length||!!(e._source&&-1{e.get("/api/repo/"+n.repoId,{repoId:n.repoId,repoUrl:n.repoUrl}).then(e=>{n.repo=e.data,e.data.rateLimitResetAt?i(e.data.rateLimitResetAt):n.repo.statusMessage=function(e){if(e){var t=e.match(/^rate_limited:(\d+)$/);if(t)return i(parseInt(t[1],10)),null;n.rateLimitResetAt=0}return e}(n.repo.statusMessage),"ready"==n.repo.status?n.progress=100:"queue"==n.repo.status?n.progress=10:"downloaded"==n.repo.status?n.progress=50:"download"==n.repo.status||"preparing"==n.repo.status?n.progress=25:"anonymizing"==n.repo.status&&(n.progress=75);e="ready"!=n.repo.status;(e="error"!=n.repo.status||n.rateLimitResetAt?e:!1)&&setTimeout(n.getStatus,2e3)},e=>{n.error=e.data.error})},n.getStatus()}]).controller("anonymizeController",["$scope","$http","$sce","$routeParams","$location","$translate","$timeout",function(s,o,r,e,t,a,l){function i(){var e=new Date;return e.setMonth(e.getMonth()+6),e}function n(e){return e.getFullYear()+`-${String(e.getMonth()+1).padStart(2,"0")}-`+String(e.getDate()).padStart(2,"0")}s.sourceUrl="",s.detectedType=null,s.repoId="",s.pullRequestId="",s.gistId="",s.terms="",s.defaultTerms="",s.branches=[],s.source={branch:"",commit:""},s.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0},s.options.expirationDate=i(),s.minExpirationDate=n(new Date);var h,c=new Date;function d(e,t,i){s.anonymize&&s.anonymize[e]&&s.anonymize[e].$setValidity(t,i)}function u(){return s.isUpdate&&s._originalRepositoryID&&function(e){try{var t=parseGithubUrl(e);if(t&&t.owner&&t.repo)return t.owner+"/"+t.repo}catch(e){}return null}(s.sourceUrl)===s._originalFullName?s._originalRepositoryID:void 0}async function p(){var e=parseGithubUrl(s.sourceUrl);try{T();var t=await o.get(`/api/repo/${e.owner}/${e.repo}/`,{params:{repositoryID:u(),force:"1"}});s.details=t.data,s.details&&s.details.id&&(s.repositoryID=s.details.id),s.repoId||(s.repoId=s.details.repo+"-"+generateRandomId(4)),await s.getBranches()}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}}async function m(e){if(s.readme&&!e)return s.readme;var t=parseGithubUrl(s.sourceUrl);try{var i=await o.get(`/api/repo/${t.owner}/${t.repo}/readme`,{params:{force:!0===e?"1":"0",branch:s.source.branch,repositoryID:u()}});s.readme=i.data}catch(e){s.readme=""}}function g(){var e={terms:s.terms?s.terms.split("\n"):[],image:!!s.options.image,link:!!s.options.link,repoId:s.repoId};s.source&&s.source.branch&&(e.branchName=s.source.branch);try{var t=parseGithubUrl(s.sourceUrl);e.repoName=t.owner+"/"+t.repo}catch(e){}return e}function f(i,n){let r=null,s=0;return function(){r&&l.cancel(r),r=l(()=>{r=null;const t=++s;var e=i();e&&o.post("/api/anonymize-preview",e).then(e=>{t===s&&n(e.data)},()=>{})},200)}}c.setFullYear(c.getFullYear()+1),s.maxExpirationDate=n(c),s.anonymize_readme="",s.readme="",s.html_readme="",s.isUpdate=!1,h=()=>{e.repoId&&""!=e.repoId&&(s.isUpdate=!0,s.detectedType="repo",s.repoId=e.repoId,o.get("/api/repo/"+s.repoId).then(async e=>{s.sourceUrl="https://github.com/"+e.data.source.fullName,s._originalFullName=e.data.source.fullName,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.role=e.data.role||"owner",s.coauthors=e.data.coauthors||[],s._originalBranch=e.data.source.branch,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,s.repositoryID=e.data.source.repositoryID,s._originalRepositoryID=e.data.source.repositoryID,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),await Promise.all([p(),m()]),y(),s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.repoId&&(s.anonymize.repoId.$$element[0].disabled=!0)})),e.pullRequestId&&""!=e.pullRequestId&&(s.isUpdate=!0,s.detectedType="pr",s.pullRequestId=e.pullRequestId,o.get("/api/pr/"+s.pullRequestId).then(async t=>{s.sourceUrl="https://github.com/"+t.data.source.repositoryFullName+"/pull/"+t.data.source.pullRequestId,s.terms=t.data.options.terms.filter(e=>e).join("\n"),s.source=t.data.source,s.options=Object.assign({},s.options,t.data.options),s.conference=t.data.conference,t.data.options.expirationDate&&(s.options.expirationDate=new Date(t.data.options.expirationDate));try{s.details=(await o.get(`/api/pr/${t.data.source.repositoryFullName}/`+t.data.source.pullRequestId)).data}catch(e){t=e&&e.data&&e.data.error;t&&(a("ERRORS."+t).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(t))}s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.pullRequestId&&(s.anonymize.pullRequestId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)})),e.gistId&&""!=e.gistId&&(s.isUpdate=!0,s.detectedType="gist",s.gistId=e.gistId,o.get("/api/gist/"+s.gistId).then(async e=>{s.sourceUrl="https://gist.github.com/"+e.data.source.gistId,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),s.details=(await o.get("/api/gist/source/"+e.data.source.gistId)).data,s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.gistId&&(s.anonymize.gistId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)}))},o.get("/api/user/default").then(e=>{e=e.data;e.terms&&(s.defaultTerms=e.terms.join("\n")),s.options=Object.assign({},s.options,e.options),s.options.expirationDate=e.options&&e.options.expirationDate?new Date(e.options.expirationDate):i(),h&&h()}),s.urlSelected=async()=>{s.terms=s.defaultTerms,s.isUpdate||(s.repoId="",s.pullRequestId="",s.gistId=""),s.details=null,s.branches=[],s.source={type:"GitHubStream",branch:"",commit:""},s.anonymize_readme="",s.readme="",s.html_readme="",s.detectedType=null;let e;try{e=parseGithubUrl(s.sourceUrl)}catch(e){return void d("sourceUrl","github",!1)}d("sourceUrl","github",!0);try{if(e.gistId&&!e.repo){s.detectedType="gist",s.source={gistId:e.gistId};var t=parseGithubUrl(s.sourceUrl);try{T();var i=await o.get("/api/gist/source/"+t.gistId);s.details=i.data,s.gistId||(s.gistId="gist-"+t.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}await 0}else if(e.pullRequestId){s.detectedType="pr",s.source={repositoryFullName:e.owner+"/"+e.repo,pullRequestId:e.pullRequestId};var n=parseGithubUrl(s.sourceUrl);try{T();var r=await o.get(`/api/pr/${n.owner}/${n.repo}/`+n.pullRequestId);s.details=r.data,s.pullRequestId||(s.pullRequestId=n.repo+"-PR"+n.pullRequestId+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}await 0}else s.detectedType="repo",await Promise.all([p(),m()]),y()}catch(e){return}s.$apply(),$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),s.$watch("options.update",e=>{"repo"===s.detectedType&&s.anonymize&&s.anonymize.commit&&(s.anonymize.commit.$$element[0].disabled=!!e)}),s.$watch("source.branch",async()=>{var e;"repo"===s.detectedType&&(e=s.branches.filter(e=>e.name==s.source.branch)[0])&&(s.isUpdate&&s._originalBranch===s.source.branch&&!!s.source.commit||(s.source.commit=e.commit),s.readme=e.readme,await m(),y(),s.$apply())}),s.getBranches=async e=>{var t=parseGithubUrl(s.sourceUrl);try{var i=await o.get(`/api/repo/${t.owner}/${t.repo}/branches`,{params:{force:!0===e?"1":"0",repositoryID:u()}}),n=(s.branches=i.data,s.sourceUnreachable=!1,s.source.branch||(s.source.branch=s.details.defaultBranch),s.branches.filter(e=>e.name==s.source.branch));0{s.toasts=s.toasts||[],s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),d("sourceUrl","missing",!1)}s.$apply()};const v=f(()=>s.readme?{content:s.readme,options:g()}:null,e=>{s.anonymize_readme=e.content||"";let t="";try{var i=parseGithubUrl(s.sourceUrl),n=s.source.branch||s.details&&s.details.defaultBranch||"main";t=`https://github.com/${i.owner}/${i.repo}/raw/${n}/`}catch(e){}e=renderMD(s.anonymize_readme,t);s.html_readme=r.trustAsHtml(e),l(Prism.highlightAll,150)});function y(){s.anonymize&&s.anonymize.terms&&(s.termsRegexWarning=!!s.terms&&!!s.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),v())}let b=new Map,w=new Set;const x=f(()=>{var e=function(){var e=new Set,t=s.details&&s.details.pullRequest;if(t){"string"==typeof t.title&&e.add(t.title),"string"==typeof t.body&&e.add(t.body),"string"==typeof t.diff&&e.add(t.diff);for(const i of s.details&&s.details.comments||[])"string"==typeof i.author&&e.add(i.author),"string"==typeof i.body&&e.add(i.body)}return e}(),e=(w=e,Array.from(e));return 0===e.length?null:{contents:e,options:g()}},t=>{if(t&&Array.isArray(t.contents)){var i=Array.from(w),n=new Map;for(let e=0;e{var e=function(){var e=new Set,t=s.details&&s.details.gist;if(t){"string"==typeof t.description&&e.add(t.description),"string"==typeof t.ownerLogin&&e.add(t.ownerLogin);for(const i of t.files||[])"string"==typeof i.filename&&e.add(i.filename),"string"==typeof i.content&&e.add(i.content);for(const n of t.comments||[])"string"==typeof n.author&&e.add(n.author),"string"==typeof n.body&&e.add(n.body)}return e}(),e=(A=e,Array.from(e));return 0===e.length?null:{contents:e,options:g()}},t=>{if(t&&Array.isArray(t.contents)){var i=Array.from(A),n=new Map;for(let e=0;e({filename:s.anonymizeGistContent(e.filename),content:s.anonymizeGistContent(e.content),language:e.language}))}function T(){d("repoId","used",!0),d("repoId","format",!0),d("pullRequestId","used",!0),d("pullRequestId","format",!0),d("gistId","used",!0),d("gistId","format",!0),d("sourceUrl","used",!0),d("sourceUrl","missing",!0),d("sourceUrl","access",!0),d("sourceUrl","github",!0),d("commit","exists",!0),d("conference","activated",!0),d("terms","format",!0),s.termsRegexWarning=!1}function E(){var e=s.anonymize&&s.anonymize.expirationDate;return(!s.options.expirationDate||e&&e.$invalid)&&(e&&e.$setDirty&&e.$setDirty(),s.error="Please choose a valid expiration date.")}function M(e){var t="pr"===s.detectedType?"pullRequestId":"gist"===s.detectedType?"gistId":"repoId";switch(e){case"repoId_already_used":d(t,"used",!1);break;case"invalid_repoId":case"options_not_provided":d(t,"format",!1);break;case"repo_already_anonymized":d("sourceUrl","used",!1);break;case"invalid_terms_format":d("terms","format",!1);break;case"repo_not_found":d("sourceUrl","missing",!1);break;case"repo_not_accessible":d("sourceUrl","access",!1);break;case"commit_not_found":d("commit","exists",!1);break;case"conf_not_activated":d("conference","activated",!1)}}s.anonymizeGistContent=function(e){if(e){if(S.has(e))return S.get(e);A.has(e)||_()}return e},s.previewGistFiles=[],s.$watch("details.gist.files",C,!0),s.$watch("terms",C),s.coauthors=s.coauthors||[],s.coauthorResults=[],s.coauthorError="",s.searchCoauthors=()=>{var e=(s.coauthorSearch||"").trim();s.coauthorError="",e.length<2?s.coauthorResults=[]:o.get("/api/user/search/github-users",{params:{q:e}}).then(e=>{const t=new Set((s.coauthors||[]).map(e=>(e.username||"").toLowerCase()));s.coauthorResults=(e.data||[]).filter(e=>!t.has((e.username||"").toLowerCase()))},()=>{s.coauthorResults=[]})},s.addCoauthor=(e,t)=>{t&&t.preventDefault(),e&&e.username&&o.post("/api/repo/"+s.repoId+"/coauthors",{username:e.username}).then(e=>{s.coauthors=e.data||[],s.coauthorResults=[],s.coauthorSearch="",s.coauthorError=""},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.removeCoauthor=e=>{e&&e.username&&confirm("Remove co-author "+e.username+"?")&&o.delete("/api/repo/"+s.repoId+"/coauthors/"+encodeURIComponent(e.username)).then(e=>{s.coauthors=e.data||[]},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.anonymizeRepo=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={repoId:s.repoId,terms:s.terms.trim().split("\n").filter(e=>e),fullName:t.owner+"/"+t.repo,repository:s.sourceUrl,options:s.options,source:s.source,conference:s.conference},s.details&&(t.options.pageSource=s.details.pageSource),T(),i=s.isUpdate?"/api/repo/"+s.repoId:"/api/repo/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+s.repoId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.anonymizeGist=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={gistId:s.gistId,terms:s.terms.trim().split("\n").filter(e=>e),source:{gistId:t.gistId},options:s.options,conference:s.conference},T(),i=s.isUpdate?"/api/gist/"+s.gistId:"/api/gist/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+s.gistId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.anonymizePullRequest=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={pullRequestId:s.pullRequestId,terms:s.terms.trim().split("\n").filter(e=>e),source:{repositoryFullName:t.owner+"/"+t.repo,pullRequestId:t.pullRequestId},options:s.options,conference:s.conference},T(),i=s.isUpdate?"/api/pr/"+s.pullRequestId:"/api/pr/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+s.pullRequestId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.$watch("conference",()=>{s.conference&&o.get("/api/conferences/"+s.conference).then(e=>{s.conference_data=e.data,s.conference_data.startDate=new Date(s.conference_data.startDate),s.conference_data.endDate=new Date(s.conference_data.endDate),s.options.expirationDate=new Date(s.conference_data.endDate),s.options.expirationMode="remove",s.options.update=s.conference_data.options.update,s.options.image=s.conference_data.options.image,s.options.pdf=s.conference_data.options.pdf,s.options.notebook=s.conference_data.options.notebook,s.options.link=s.conference_data.options.link},()=>{s.conference_data=null})}),s.$watch("terms",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("options.image",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("options.link",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("details",()=>{"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()},!0)}]).controller("exploreController",["$scope","$http","$location","$routeParams","$sce","$q",function(g,s,o,n,a,r){g.files=[],g.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),g.fileSearchQuery="",g.fileSearchResults=null,g.fileSearchLoading=!1,document.addEventListener("keydown",function(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),e=document.querySelector(".tree-search-input"))&&(e.focus(),e.select())});var f=null;g.onFileSearchChange=function(){f&&(f.resolve(),f=null);var e=g.fileSearchQuery;!e||e.length<2?(g.fileSearchResults=null,g.fileSearchLoading=!1):(g.fileSearchLoading=!0,f=r.defer(),s.get(`/api/repo/${g.repoId}/files/search?q=`+encodeURIComponent(e),{timeout:f.promise}).then(function(e){f=null,g.fileSearchLoading=!1;for(var t={},i=(g.files.forEach(function(e){t[(e.path||"")+"/"+e.name]=!0}),[]),n={},r=0;re&&0e.path===i)||g.getFiles(i)}}}),g.fileCounts=null,g.getFiles=function(i){return s.get(`/api/repo/${g.repoId}/files/?path=${encodeURIComponent(i)}&v=`+g.options.lastUpdateDate).then(function(e){const t=i||"";return g.files=g.files.filter(e=>e.path!==t),g.files.push(...e.data),e.data},function(e){g.type="error",g.content=e&&e.data&&e.data.error||"unknown_error",g.files=[]})};var p=null;function m(){g.content="",g.file=g.files.filter(e=>e.name==g.paths[g.paths.length-1]&&e.path==g.paths.slice(0,g.paths.length-1).join("/"))[0];let e="0";g.file&&g.file.sha&&(e=g.file.sha),g.url=`/api/repo/${g.repoId}/file/${encodePathForUrl(g.filePath)}?v=`+e;var t=g.filePath.substring(0,g.filePath.lastIndexOf("/")+1);g.fileBaseUrl=`/api/repo/${g.repoId}/file/`+(t?encodePathForUrl(t):""),g.showSource=!1,g.allowScripts=!1;let i=g.filePath.toLowerCase();var t=i.lastIndexOf(".");if(-1{n.scrollToLine(i,!0,!0,function(){})},100)}else s(null)}e(!0);let o=null;n.on("guttermousedown",function(e){var t=e.getDocumentPosition().row;let i=t,n=t;e.domEvent&&e.domEvent.shiftKey&&null!==o?(i=Math.min(o,t),n=Math.max(o,t)):o=t;t=i===n?"#L"+(i+1):`#L${i+1}-L`+(n+1),t=window.location.pathname+window.location.search+t;window.history.replaceState(null,"",t),s(i,n),e.stop()}),window.addEventListener("hashchange",()=>e(!1)),n.setFontSize(g.aceOption.fontSize),n.setReadOnly(g.aceOption.readOnly),n.setKeyboardHandler(g.aceOption.keyBinding),n.setSelectionStyle(g.aceOption.fullLineSelection?"line":"text"),n.setOption("displayIndentGuides",!0),n.setHighlightActiveLine(g.aceOption.highlightActiveLine),"hide"==g.aceOption.cursor&&(n.renderer.$cursorLayer.element.style.display="none"),n.setHighlightGutterLine(g.aceOption.highlightGutterLine),n.setShowInvisibles(g.aceOption.showInvisibles),n.setDisplayIndentGuides(g.aceOption.showIndentGuides),n.renderer.setShowPrintMargin(g.aceOption.showPrintMargin),n.setHighlightSelectedWord(g.aceOption.highlightSelectedWord),n.session.setUseSoftTabs(g.aceOption.useSoftTab),n.session.setTabSize(g.aceOption.tabSize),n.setBehavioursEnabled(g.aceOption.enableBehaviours),n.setFadeFoldWidgets(g.aceOption.fadeFoldWidgets)}},g.$on("dark-mode",(e,t)=>{g.aceOption.theme=t?"nord_dark":"chrome"}),g.isDarkMode&&(g.aceOption.theme="nord_dark"),g.type="pdf"==(t=i)?"pdf":"html"==t||"htm"==t?"html-doc":"md"==t?"md":"org"==t?"org":"ipynb"==t?"IPython":-1e}).then(e=>{var t;g.type=r,g.content=e.data,""==g.content&&(g.content=null),"md"==g.type&&(g.content=a.trustAsHtml(renderMD(e.data,o.url()+"/../")),g.type="html"),"org"==g.type&&(t=contentAbs2Relative(e.data),t=(new Org.Parser).parse(t).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1}),g.content=a.trustAsHtml(t.toString()),g.type="html"),"code"==g.type&&"application/octet-stream"==e.headers("content-type")&&(g.type="binary",g.content="binary"),setTimeout(()=>{Prism.highlightAll()},50)},t=>{g.type="error",g.content="unknown_error";try{t.data=JSON.parse(t.data),t.data.error?g.content=t.data.error:g.content=t.data}catch(e){console.log(t),-1==t.status?g.content="request_error":502==t.status&&(g.content="unreachable")}})}else g.type="error",g.content="no_file_selected"}}function v(){g.repoId=n.repoId,g.type="loading",g.filePath=n.path||"",g.paths=g.filePath.split("/"),function i(n){s.get(`/api/repo/${g.repoId}/options`).then(e=>{g.options=e.data,g.options.url?window.location=g.options.url:n&&n(e.data)},e=>{function t(){var e,t=Math.max(0,Math.ceil((g.rateLimitResetAt-Date.now())/1e3));t<=0?(g.rateLimitCountdown="",g.rateLimitResetAt=0,p&&(clearInterval(p),p=null),i(n)):(e=Math.floor(t/60),t%=60,g.rateLimitCountdown=0{i.options=e.data,i.options.url?window.location=i.options.url:t&&t(e.data)},e=>{i.type="error",i.content=e.data.error})}(e=>{!async function(t){n.get(`/api/pr/${i.pullRequestId}/content`).then(e=>{i.details=e.data,t&&t(e.data)},e=>{i.type="error",i.content=e.data.error})}()})}]).controller("gistController",["$scope","$http","$location","$routeParams","$sce",function(n,e,t,i,r){n.gistId=i.gistId,n.type="loading",async function(t){e.get(`/api/gist/${n.gistId}/options`).then(e=>{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(()=>{!async function(i){e.get(`/api/gist/${n.gistId}/content`).then(e=>{n.details=e.data;var t=e.data&&e.data.files&&e.data.files.length;n.tabState={active:t?"files":"comments"},i&&i(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("conferencesController",["$scope","$http","$location",function(i,n,e){i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.conferences=[],i.search="";const t="conferences.filterPrefs",r={status:{ready:!0,expired:!1,removed:!1}},s="name";var o=loadFilterPrefs(t)||{};function a(){n.get("/api/conferences/").then(e=>{i.conferences=e.data||[]},e=>{console.error(e)})}i.filters={status:Object.assign({},r.status,o.filters&&o.filters.status||{})},i.orderBy=o.orderBy||s,i.$watch("orderBy",()=>{saveFilterPrefs(t,{filters:i.filters,orderBy:i.orderBy})}),i.$watch("filters",()=>{saveFilterPrefs(t,{filters:i.filters,orderBy:i.orderBy})},!0),i.removeConference=function(e){if(confirm(`Are you sure that you want to remove the conference ${e.name}? All the repositories linked to this conference will expire.`)){const t={title:`Removing ${e.name}...`,date:new Date,body:`The conference ${e.name} is going to be removed.`};i.addToast(t),n.delete("/api/conferences/"+e.conferenceID).then(()=>{t.title=e.name+" is removed.",t.body=`The conference ${e.name} is removed.`,a()})}},a(),i.conferenceFilter=e=>0!=i.filters.status[e.status]&&(0==i.search.trim().length||-1{null==i.user&&n.url("/")}),null==i.user&&n.url("/"),i.plans=[],i.editionMode=!1,t.conferenceId&&(i.editionMode=!0,e.get("/api/conferences/"+t.conferenceId).then(e=>{i.options=e.data,i.options.startDate=new Date(i.options.startDate),i.options.endDate=new Date(i.options.endDate)})),e.get("/api/conferences/plans").then(e=>{i.plans=e.data,i.plan=i.plans.filter(e=>e.id==i.options.plan.planID)[0]});var t=new Date,r=(t.setDate(1),t.setMonth(t.getMonth()+1),new Date);r.setMonth(t.getMonth()+7,0),i.options={startDate:t,endDate:r,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},i.plan=null,i.$watch("options.plan.planID",()=>{i.plan=i.plans.filter(e=>e.id==i.options.plan.planID)[0]}),i.submit=function(){const t={title:`Creating ${i.options.name}...`,date:new Date,body:`The conference ${i.options.conferenceID} is in creation.`};i.editionMode&&(t.title=`Updating ${i.options.name}...`,t.body=`The conference '${i.options.conferenceID}' is updating.`),i.addToast(t),i.conference.name.$setValidity("required",!0),i.conference.conferenceID.$setValidity("pattern",!0),i.conference.conferenceID.$setValidity("required",!0),i.conference.conferenceID.$setValidity("used",!0),i.conference.startDate.$setValidity("required",!0),i.conference.startDate.$setValidity("invalid",!0),i.conference.endDate.$setValidity("required",!0),i.conference.endDate.$setValidity("invalid",!0),i.conference.$setValidity("error",!0),e.post("/api/conferences/"+(i.editionMode?i.options.conferenceID:""),i.options).then(()=>{i.editionMode?(t.title=i.options.name+" updated",t.body=`The conference '${i.options.conferenceID}' is updated.`):(t.title=i.options.name+" created",t.body=`The conference '${i.options.conferenceID}' is created.`),n.url("/conference/"+i.options.conferenceID)},e=>{switch(e.data.error){case"conf_name_missing":i.conference.name.$setValidity("required",!1);break;case"conf_id_missing":i.conference.conferenceID.$setValidity("required",!1);break;case"conf_id_format":i.conference.conferenceID.$setValidity("pattern",!1);break;case"conf_id_used":i.conference.conferenceID.$setValidity("used",!1);break;case"conf_start_date_missing":i.conference.startDate.$setValidity("required",!1);break;case"conf_end_date_missing":i.conference.endDate.$setValidity("required",!1);break;case"conf_start_date_invalid":i.conference.startDate.$setValidity("invalid",!1);break;case"conf_end_date_invalid":i.conference.endDate.$setValidity("invalid",!1);break;default:i.conference.$setValidity("error",!1)}i.removeToast(t)})}}]).controller("conferenceController",["$scope","$http","$location","$routeParams",function(t,e,i,n){t.$watch("user.status",()=>{null==t.user&&i.url("/")}),null==t.user&&i.url("/"),t.conference=null,t.search="",t.filters={status:{ready:!0,expired:!1,removed:!1}},t.orderBy="-anonymizeDate",t.repoFiler=e=>0!=t.filters.status[e.status]&&(0==t.search.trim().length||-1{t.conference=e.data})}]),$(document).on("click","#navbarSupportedContent .nav-link",function(e){var t;"dropdown"!==$(this).attr("data-toggle")&&(t=$("#navbarSupportedContent")).hasClass("show")&&t.collapse("hide")}),angular.module("admin",[]).controller("repositoriesAdminController",["$scope","$http","$location",function(n,r,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.repositories=[],n.total=-1,n.totalPage=0,n.statusCounts=[],n.totalSize=0,n.selected={},n.allSelected=!1;const t=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},s=(document.addEventListener("keydown",t),n.$on("$destroy",()=>document.removeEventListener("keydown",t)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];n.query.owner&&e.push({key:"owner",label:"Owner",value:n.query.owner}),n.query.conference&&e.push({key:"conference",label:"Conference",value:n.query.conference}),n.chips=e}),o=(n.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},n.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.statusStorageFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.storage:0},n.isErrorsOnly=()=>n.query&&n.query.error&&!n.query.ready&&!n.query.preparing&&!n.query.expired&&!n.query.removed,n.toggleErrorsOnly=()=>{n.isErrorsOnly()?Object.assign(n.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(n.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),n.query.page=1},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.repos.filterPrefs");var i=loadFilterPrefs(o)||{},i=(n.query=Object.assign({},{page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},i,{page:1,search:""}),e.search());i.owner&&(n.query.owner=i.owner),i.conference&&(n.query.conference=i.conference),i.search&&(n.query.search=i.search);const a="admin.repos.presets";function l(){n.fetchError=null,r.get("/api/admin/repos",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.repositories=e.data.results,n.statusCounts=e.data.statusCounts||[],n.totalSize=e.data.totalSize||0,n.allSelected=!1},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load repositories",console.error(e)})}n.presets=JSON.parse(localStorage.getItem(a)||"[]"),n.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},n.query)).page,n.presets=(n.presets||[]).filter(e=>e.name!==t),n.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(n.presets)))},n.applyPreset=e=>{Object.assign(n.query,e.query,{page:1})},n.deletePreset=t=>{n.presets=(n.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(n.presets))},n.selectAllOnPage=()=>{n.allSelected=!n.allSelected,n.repositories.forEach(e=>{n.selected[e.repoId]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedRepos=()=>n.repositories.filter(e=>n.selected[e.repoId]),n.bulkRefresh=()=>{var e=n.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>n.updateRepository(e))},n.bulkRemoveCache=()=>{var e=n.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>n.removeCache(e))},n.clearSelection=()=>{n.selected={},n.allSelected=!1},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/repos?"+e.toString(),"_blank")},n.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>l(),e=>console.error(e))},n.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>l(),e=>console.error(e))},n.updateRepository=t=>{const i={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};n.toasts.push(i),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?i.title=t.repoId+" is refreshed.":i.title=`Refreshing of ${t.repoId}.`},e=>{i.title=`Error during the refresh of ${t.repoId}.`,i.body=e.body})},n.fetchError=null,l();let h=null;n.$watch("query",()=>{clearTimeout(h),h=setTimeout(l,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(o,i),s()},!0),s()}]).controller("usersAdminController",["$scope","$http","$location",function(n,t,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.users=[],n.total=-1,n.totalPage=0,n.statusCounts=[],n.selected={},n.allSelected=!1;const i=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",i),n.$on("$destroy",()=>document.removeEventListener("keydown",i)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];n.query.role&&e.push({key:"role",label:"Role",value:n.query.role}),n.chips=e}),s=(n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.users.filterPrefs");var o=loadFilterPrefs(s)||{};function a(){n.fetchError=null,t.get("/api/admin/users",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.users=e.data.results,n.statusCounts=e.data.statusCounts||[],n.allSelected=!1,n.$apply()},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load users",console.error(e)})}n.query=Object.assign({},{page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},o,{page:1,search:""}),n.selectAllOnPage=()=>{n.allSelected=!n.allSelected,n.users.forEach(e=>{n.selected[e.username]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedUsers=()=>n.users.filter(e=>n.selected[e.username]),n.banUser=e=>{confirm(`Ban user ${e.username}?`)&&t.post(`/api/admin/users/${e.username}/ban`).then(a,e=>console.error(e))},n.activateUser=e=>{t.post(`/api/admin/users/${e.username}/activate`).then(a,e=>console.error(e))},n.bulkBan=()=>{var e=n.selectedUsers();e.length&&confirm(`Ban ${e.length} users?`)&&e.forEach(e=>n.banUser(e))},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/users?"+e.toString(),"_blank")},n.fetchError=null,a();let l=null;n.$watch("query",()=>{clearTimeout(l),l=setTimeout(a,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(s,i),r()},!0),r()}]).controller("userAdminController",["$scope","$http","$location","$routeParams",function(n,r,e,i){n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.userInfo,n.repositories=[],n.search="",n.selected={},n.allSelected=!1;const t="admin.user.filterPrefs",s={status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},o="anonymizeDate",a="desc";var l=loadFilterPrefs(t)||{};function h(e){r.get("/api/admin/users/"+e+"/repos",{}).then(e=>{n.repositories=e.data},e=>{console.error(e)})}function c(e){r.get("/api/admin/users/"+e,{}).then(e=>{n.userInfo=e.data},e=>{console.error(e)})}function d(){r.get("/api/admin/tokens").then(e=>{n.tokens=e.data||[]},e=>{401!==e.status&&403!==e.status&&console.error(e)})}n.filters={status:Object.assign({},s.status,l.filters&&l.filters.status||{})},n.query={sort:l.sort||o,direction:l.direction||a},n.orderBy=("asc"===n.query.direction?"":"-")+n.query.sort,n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.orderBy=("asc"===n.query.direction?"":"-")+n.query.sort},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"",n.$watch("query",()=>{saveFilterPrefs(t,{filters:n.filters,sort:n.query.sort,direction:n.query.direction})},!0),n.$watch("filters",()=>{saveFilterPrefs(t,{filters:n.filters,sort:n.query.sort,direction:n.query.direction})},!0),n.statusCountFor=t=>(n.repositories||[]).filter(e=>e.status===t).length,n.repoFiler=e=>0!=n.filters.status[e.status]&&(0==n.search.trim().length||-1{n.allSelected=!n.allSelected,(n.filteredRepositories||n.repositories).forEach(e=>{n.selected[e.repoId]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedRepos=()=>n.repositories.filter(e=>n.selected[e.repoId]),n.bulkRefresh=()=>{var e=n.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>n.updateRepository(e))},n.bulkRemoveCache=()=>{var e=n.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>n.removeCache(e))},n.clearSelection=()=>{n.selected={},n.allSelected=!1},n.exportCsv=()=>{var e=n.filteredRepositories||n.repositories,t=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),e=e.map(e=>[e.repoId,e.status,e.statusMessage||"",e.pageView||0,e.anonymizeDate||"",e.source&&e.source.fullName||"",e.conference||"",e.size&&e.size.storage||0].map(e=>{e=String(null==e?"":e);return/[",\n\r]/.test(e)?'"'+e.replace(/"/g,'""')+'"':e}).join(",")),t=new Blob([t+"\n"+e.join("\n")],{type:"text/csv"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.download=i.username+"-repositories.csv",e.click()},n.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},n.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},c(i.username),h(i.username),n.banUser=()=>{confirm(`Ban user ${i.username}?`)&&r.post(`/api/admin/users/${i.username}/ban`).then(()=>c(i.username),e=>console.error(e))},n.activateUser=()=>{r.post(`/api/admin/users/${i.username}/activate`).then(()=>c(i.username),e=>console.error(e))},n.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&r.post(`/api/admin/users/${i.username}/promote`).then(()=>c(i.username),e=>console.error(e))},n.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&r.post(`/api/admin/users/${i.username}/demote`).then(()=>c(i.username),e=>console.error(e))},n.tokens=[],n.tokenForm={name:"",plaintext:null},d(),n.createToken=()=>{n.tokenForm.name&&r.post("/api/admin/tokens",{name:n.tokenForm.name}).then(e=>{n.tokenForm.plaintext=e.data.token,n.tokenForm.name="",d()},e=>console.error(e))},n.revokeToken=e=>{confirm(`Revoke token "${e.name}"?`)&&r.delete("/api/admin/tokens/"+e.id).then(()=>d(),e=>console.error(e))},n.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>h(i.username),e=>console.error(e))},n.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>h(i.username),e=>console.error(e))},n.updateRepository=t=>{const i={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};n.toasts.push(i),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?i.title=t.repoId+" is refreshed.":i.title=`Refreshing of ${t.repoId}.`},e=>{i.title=`Error during the refresh of ${t.repoId}.`,i.body=e.body})},n.getGitHubRepositories=e=>{r.get(`/api/user/${n.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(e=>{n.userInfo.repositories=e.data})};let u=null;n.$watch("query",()=>{clearTimeout(u),u=setTimeout(()=>{h(i.username)},500)},!0)}]).controller("conferencesAdminController",["$scope","$http","$location",function(n,t,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.conferences=[],n.total=-1,n.totalPage=0,n.statusCounts=[];const i=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",i),n.$on("$destroy",()=>document.removeEventListener("keydown",i)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];(n.query.dateFrom||n.query.dateTo)&&e.push({key:"dateRange",label:"Date",value:(n.query.dateFrom||"…")+" – "+(n.query.dateTo||"…")}),n.chips=e}),s=(n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.conferences.filterPrefs");var o=loadFilterPrefs(s)||{},o=(n.query=Object.assign({},{page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},o,{page:1,search:""}),e.search());o.search&&(n.query.search=o.search);const a="admin.conferences.presets";function l(){n.fetchError=null,t.get("/api/admin/conferences",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.conferences=e.data.results,n.statusCounts=e.data.statusCounts||[]},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load conferences",console.error(e)})}n.presets=JSON.parse(localStorage.getItem(a)||"[]"),n.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},n.query)).page,n.presets=(n.presets||[]).filter(e=>e.name!==t),n.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(n.presets)))},n.applyPreset=e=>{Object.assign(n.query,e.query,{page:1})},n.deletePreset=t=>{n.presets=(n.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(n.presets))},n.removeConference=e=>{confirm("Remove conference "+e.conferenceID+"?")&&t.delete("/api/admin/conferences/"+e.conferenceID).then(()=>l(),e=>console.error(e))},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/conferences?"+e.toString(),"_blank")},n.fetchError=null,l();let h=null;n.$watch("query",()=>{clearTimeout(h),h=setTimeout(l,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(s,i),r()},!0),r()}]).controller("queuesAdminController",["$scope","$http","$location","$interval","$timeout",function(T,t,e,i,n){function r(){var e={queue:T.selectedQueue,search:T.query.search};t.get("/api/admin/queues",{params:e}).then(e=>{T.queueList=e.data.queues||[],T.jobs=e.data.jobs||[],T.selectedStats=T.queueList.find(e=>e.key===T.selectedQueue)||T.queueList[0]||null},e=>console.error(e))}function s(){t.get("/api/admin/queues/metrics",{params:{queue:T.selectedQueue,range:T.range}}).then(e=>{T.metricsPoints=e.data.points||[],n(h,0)},e=>console.error(e))}T.$watch("user.status",()=>{null==T.user&&e.url("/")}),null==T.user&&e.url("/"),T.queueList=[],T.jobs=[],T.selectedQueue="download",T.selectedStats=null,T.range="1h",T.allStates=["active","waiting","delayed","failed","completed"],T.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},T.query={search:"",autoRefresh:!0},T.filteredJobs=()=>(T.jobs||[]).filter(e=>T.stateFilter[e._state]),T.jobProgressPct=e=>e&&e.progress&&"object"==typeof e.progress&&"number"==typeof e.progress.percent?Math.max(0,Math.min(100,Math.round(e.progress.percent))):"number"==typeof e.progress?Math.max(0,Math.min(100,Math.round(e.progress))):null,T.jobDuration=e=>{return e.processedOn?(e=(e.finishedOn||Date.now())-e.processedOn)<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-"},T.metricsPoints=[],T.selectQueue=e=>{T.selectedQueue=e,r(),s()},T.setRange=e=>{T.range=e,s()},r(),s();const o=i(()=>{T.query.autoRefresh&&(r(),s())},15e3);function a(e){var t=e&&e.data&&(e.data.message||e.data.error)||"Request failed";T.actionError=t,n(()=>{T.actionError=null},5e3),console.error(e)}T.$on("$destroy",()=>i.cancel(o)),T.refreshNow=function(){r(),s()},T.actionError=null,T.removeJob=e=>{t.delete(`/api/admin/queue/${T.selectedQueue}/`+e.id).then(r,a)},T.retryJob=e=>{t.post(`/api/admin/queue/${T.selectedQueue}/`+e.id).then(r,a)},T.retryFailed=()=>{confirm(`Retry all failed jobs in ${T.selectedQueue}?`)&&t.post(`/api/admin/queue/${T.selectedQueue}/retry-failed`).then(r,e=>console.error(e))},T.drainSelected=()=>{confirm(`Drain the ${T.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${T.selectedQueue}/drain`).then(r,e=>console.error(e))},T.togglePause=()=>{var e=T.selectedStats&&T.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${T.selectedQueue}/`+e).then(r,e=>console.error(e))},T.emptyQueue=()=>{confirm(`Empty the ${T.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${T.selectedQueue}/empty`).then(r,e=>console.error(e))},T.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(r,e=>console.error(e))};let l=null;function E(e){if(e<=0)return{ticks:[0],niceMax:1};var t=Math.pow(10,Math.floor(Math.log10(e)));let i=t;e/i<2?i=t/2:5{clearTimeout(l),l=setTimeout(r,350)}),T.expanded={},T.toggleJob=e=>{T.expanded[e.id]=!T.expanded[e.id]},T.humanTime=e=>{return e?(e=new Date(e)).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+e.toLocaleDateString([],{month:"short",day:"numeric"}):""},T.delayCountdown=e=>{var t;return e?(e=Math.max(0,Math.ceil((e-Date.now())/1e3)))<=0?"resuming soon":(t=e%60,"in "+(0<(e=Math.floor(e/60))?e+"m "+t+"s":t+"s")):""};var M=null;function c(){var s,o,a=document.getElementById("q-throughput-chart");a&&!a._tipBound&&(a._tipBound=!0,s=document.getElementById("q-chart-tooltip"),o=document.getElementById("q-chart-crosshair"),a.addEventListener("mousemove",function(e){var t,i,n,r;M&&s&&o&&(t=M,i=a.getBoundingClientRect(),e=e.clientX-i.left,(i=Math.round((e-t.marginLeft)/t.step))<0||i>=t.maxLen?(s.style.display="none",o.style.display="none"):(e=t.pts[i],n=Date.now(),r='
'+((n=Math.round((n-e.ts)/6e4))<=0?"now":n<60?n+"m ago":n<1440?(r=n%60,Math.floor(n/60)+"h"+(r?" "+r+"m":"")+" ago"):Math.round(n/1440)+"d ago")+'
● completed: '+e.completed+'/min
● failed: '+e.failed+"/min
",0● avg time: '+(1e3<=e.avgMs?(e.avgMs/1e3).toFixed(1)+"s":e.avgMs+"ms")+""),s.innerHTML=r,(e=(n=t.toX(i))+10)+(r=s.offsetWidth)>t.totalW&&(e=n-r-10),s.style.display="block",s.style.left=e+"px",s.style.top="8px",o.style.display="block",o.style.left=n+"px"))}),a.addEventListener("mouseleave",function(){s&&(s.style.display="none"),o&&(o.style.display="none")}))}T.$watch("metricsPoints",function(){n(c,50)})}]).controller("errorsAdminController",["$scope","$http","$location","$interval",function(c,n,e,t){c.$watch("user.status",()=>{null==c.user&&e.url("/")}),null==c.user&&e.url("/"),c.entries=[],c.visible=[],c.available=!0,c.cap=1e3,c.total=0,c.pageSize=250,c.expanded={},c.detailTab={},c.copyHint="",c.parsedFilterCount=0,c.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},c.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},c.relTime=e=>{var t;return e?(t=new Date(e).getTime(),isNaN(t)?e:(t=Math.max(0,Date.now()-t),(t=Math.floor(t/1e3))<5?"just now":t<60?t+"s ago":(t=Math.floor(t/60))<60?t+"m ago":(t=Math.floor(t/60))<24?t+"h ago":(t=Math.floor(t/24))<7?t+"d ago":new Date(e).toLocaleDateString())):""},c.absTime=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleString()):""},c.absTimeShort=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})):""};const o=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function r(t){var i=(t.raw||[]).find(e=>e&&"object"==typeof e&&!Array.isArray(e));if(i){i.message&&o.test(i.message)?(t.displayMessage=i.message,t.displayContext=t.message):i.code&&o.test(String(i.code))?(t.displayMessage=String(i.code),t.displayContext=t.message):i.name&&"AnonymousError"!==i.name&&"Error"!==i.name?(t.displayMessage=i.name,t.displayContext=i.message||t.message):t.displayMessage=t.message,t._status=i.httpStatus||i.status||null,t._url=i.url||null,t._method=i.method||null,t._repoId=i.repoId||i.detail||null,t._detail=i.detail&&i.detail!==t._repoId?i.detail:null;let e="string"==typeof i.stack?i.stack:null;for(var n=[i.cause,i.err].filter(Boolean),r=0;!e&&r{null!=t&&""!==t&&s.push([e,t])};i("name",t&&t.name),i("code",e.displayMessage||t&&t.message),e._bucket&&i("kind",e._bucket);i("httpStatus",t&&t.httpStatus),t&&t.status&&!t.httpStatus&&i("status",t.status);i("module",e.module);let n=t&&t.detail;if("string"==typeof n){var r=n.trim();if("{"===r[0]||"["===r[0])try{n=JSON.parse(n)}catch{}}if(i("detail",n),i("repoId",t&&t.repoId),i("filePath",t&&t.filePath),i("upstreamStatus",t&&t.upstreamStatus),i("upstreamBody",t&&t.upstreamBody),i("url",e._url),i("err",t&&t.err),i("cause",t&&!t.err&&t.cause),i("ts",e.ts),!s.length)return JSON.stringify(e,null,2);const o=s.reduce((e,t)=>Math.max(e,t[0].length),0),a=["{"];return s.forEach(([e,t],i)=>{e=` ${`"${e}":`.padEnd(o+3," ")} `,i=i0===t?e:r+e).join("\n")}else n="number"==typeof t||"boolean"==typeof t?String(t):JSON.stringify(t);a.push(e+n+i)}),a.push("}"),a.join("\n")}(t,i),t}function d(t,e){for(const a of e.filters){let e;if("code"===a.key)e=t.displayMessage;else if("module"===a.key)e=t.module;else if("status"===a.key)e=t._status;else if("url"===a.key)e=t._url;else if("repo"===a.key)e=t._repoId;else{if("level"!==a.key)continue;e=t.level}if(null==e)return!1;if(i=e,n=a.val,r=a.op,o=s=void 0,s=parseFloat(i),o=parseFloat(n),!("="===r?String(i)===String(n):"!="===r?String(i)!==String(n):">="===r?o<=s:"<="===r?s<=o:">"===r?o=|<=|!=|>|<|=)?([^\s]+)/g;let s=0;for(;n=r.exec(e);)i+=e.slice(s,n.index),s=r.lastIndex,t.push({key:n[1],op:n[2]||"=",val:n[3]});return{filters:t,free:(i+=e.slice(s)).trim().toLowerCase()}}(c.query.search||""),i=(c.parsedFilterCount=t.filters.length,c.query.bucket);let e=c.entries.filter(e=>(!i||e._bucket===i)&&d(e,t));const n=c.query.group;if(n){var r=new Map;for(const l of e){o=l;var s,o="module"===n?o.module:o.displayMessage||o.message||"_";r.has(o)?((s=r.get(o)).count++,s._related.push(l),new Date(l.ts)>new Date(s.ts)&&(s.ts=l.ts,s._url=l._url,s._status=l._status),new Date(l.ts)new Date(e.ts).getTime()>=a).length;e=Array.from(r.values())}else e=e.map((e,t)=>(e._key="row:"+t+":"+e.ts,e._related=[e],e._firstSeen=e.ts,e._lastHourCount=0,e.count=1,e));var o;"count"===c.query.sort?e.sort((e,t)=>t.count-e.count||new Date(t.ts)-new Date(e.ts)):e.sort((e,t)=>new Date(t.ts)-new Date(e.ts)),c.visible=e}function i(i){var e=i?c.entries.length:0,t=i?c.pageSize:Math.max(c.pageSize,c.entries.length||c.pageSize);n.get("/api/admin/errors",{params:{offset:e,limit:t}}).then(e=>{var t=(e.data.entries||[]).map(r);c.entries=i?c.entries.concat(t):t,c.available=!!e.data.available,c.cap=e.data.max||c.cap,c.total=e.data.total||c.entries.length,s()},e=>console.error(e))}function a(){i(),n.get("/api/admin/errors/stats").then(e=>{var e=e.data||{},t=e.prev24h?Math.round((e.last24h-e.prev24h)/e.prev24h*100):0;c.stats={last24h:e.last24h||0,prev24h:e.prev24h||0,delta:t,severity:e.severity||{error:0,warn:0,info:0},unique:e.unique||{error:0,warn:0,info:0},buckets:e.buckets||[],dropped:e.dropped||0}},e=>console.error(e))}function l(e){c.copyHint=e+" copied",setTimeout(()=>{c.copyHint="",c.$apply()},1500)}c.loadMore=()=>i(!0),c.canLoadMore=()=>c.entries.length{var i,n;let r=0;for(const s of c.stats.buckets||[])r=Math.max(r,(s.error||0)+(s.warn||0)+(s.info||0));return r&&(i=(e.error||0)+(e.warn||0)+(e.info||0))?(n=Math.round(i/r*60),e=e[t]||0,Math.round(e/i*n)):0},c.bucketTitle=e=>{return`${new Date(e.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} · ${e.error||0} err · ${e.warn||0} warn · ${e.info||0} info`},c.toggle=e=>{c.expanded[e._key]=!c.expanded[e._key]},c.setBucket=e=>{c.query.bucket=e},c.refreshNow=a,c.clearAll=()=>{confirm("Clear all captured errors?")&&n.delete("/api/admin/errors").then(a,e=>console.error(e))},c.exportCsv=()=>{var e=["ts","level","module","displayMessage","_status","_url","_repoId"],t=[e.join(",")];for(const r of c.visible)t.push(e.map(e=>{e=null==r[e]?"":String(r[e]);return/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}).join(","));var i=new Blob([t.join("\n")],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(i),n=document.createElement("a");n.href=i,n.download=`errors-${(new Date).toISOString().slice(0,19)}.csv`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)},c.copyJson=e=>{navigator.clipboard.writeText(e._detailJson).then(()=>l("JSON"))},c.copyCurl=e=>{e._url&&(e=`curl -X ${e._method||"GET"} '${window.location.origin}${e._url}'`,navigator.clipboard.writeText(e).then(()=>l("curl")))},a();const h=t(()=>{c.query.autoRefresh&&a()},15e3);c.$on("$destroy",()=>t.cancel(h)),c.$watch("query.search",s),c.$watch("query.bucket",s),c.$watch("query.sort",s),c.$watch("query.group",s)}]).controller("overviewAdminController",["$scope","$http","$location","$interval",function(s,e,t,i){var n,r;function o(){e.get("/api/admin/overview").then(function(e){var r,t;e.data.history=(t=e.data.history,(r=t||[]).map(function(e,t){var i=r[t-1]||{},n=Object.assign({},e);return n.dailyRepositories=t?Math.max(0,(e.nbRepositories||0)-(i.nbRepositories||0)):0,n.dailyUsers=t?Math.max(0,(e.nbUsers||0)-(i.nbUsers||0)):0,n.dailyPageViews=t?Math.max(0,(e.nbPageViews||0)-(i.nbPageViews||0)):0,n})),e.data.daily={today:{repositories:(t=(t=e.data.history)&&t.length?t[t.length-1]:{}).dailyRepositories||0,users:t.dailyUsers||0,pageViews:t.dailyPageViews||0}},s.data=e.data,s.loading=!1,s.error=null,n={},(e.data.history||[]).forEach(function(t){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(e){(!n[e]||t[e]>n[e])&&(n[e]=t[e])})})},function(e){s.loading=!1,s.error=e.data&&e.data.error||"Failed to load overview"})}s.Math=Math,s.$watch("user.status",()=>{null==s.user&&t.url("/")}),null==s.user?t.url("/"):(s.data=null,s.loading=!0,s.error=null,s.humanBytes=function(e){if(null==e)return"—";for(var t=["B","KB","MB","GB","TB"],i=0,n=e;1024<=n&&i{var n=i(3),r=i(188),i=i(193);n({target:"Array",proto:!0},{group:function(e){return r(this,e,1{var p=i(99),n=i(14),m=i(13),g=i(40),f=i(18),v=i(64),y=i(189),b=i(108),w=Array,x=n([].push);e.exports=function(e,t,i,n){for(var r,s,o,a=g(e),l=m(a),h=p(t,i),c=y(null),d=v(l),u=0;u{function n(){}function r(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}var s,o=i(47),a=i(190),l=i(66),h=i(55),c=i(192),d=i(43),i=i(54),u="prototype",p="script",m=i("IE_PROTO"),g=function(e){return"<"+p+">"+e+""},f=function(){try{s=new ActiveXObject("htmlfile")}catch(i){}var e,t;f="undefined"==typeof document||document.domain&&s?r(s):(e=d("iframe"),t="java"+p+":",e.style.display="none",c.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F);for(var i=l.length;i--;)delete f[u][l[i]];return f()};h[m]=!0,e.exports=Object.create||function(e,t){var i;return null!==e?(n[u]=o(e),i=new n,n[u]=null,i[m]=e):i=f(),void 0===t?i:a.f(i,t)}},(e,t,i)=>{var n=i(6),r=i(46),a=i(45),l=i(47),h=i(12),c=i(191);t.f=n&&!r?Object.defineProperties:function(e,t){l(e);for(var i,n=h(t),r=c(t),s=r.length,o=0;o{var n=i(59),r=i(66);e.exports=Object.keys||function(e){return n(e,r)}},(e,t,i)=>{i=i(24);e.exports=i("document","documentElement")},(e,t,i)=>{var n=i(34),r=i(189),i=i(45).f,s=n("unscopables"),o=Array.prototype;void 0===o[s]&&i(o,s,{configurable:!0,value:r(null)}),e.exports=function(e){o[s][e]=!0}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaText=void 0,i(89);class s{static textContent(e){const r=[],t={items:r,styles:Object.create(null)};return function t(i){if(i){let e=null;var n=i.name;if("#text"===n)e=i.value;else{if(!s.shouldBuildText(n))return;i?.attributes?.textContent?e=i.attributes.textContent:i.value&&(e=i.value)}if(null!==e&&r.push({str:e}),i.children)for(const r of i.children)t(r)}}(e),t}static shouldBuildText(e){return!("textarea"===e||"input"===e||"option"===e||"select"===e)}}t.XfaText=s},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextLayerRenderTask=void 0,t.renderTextLayer=function(e){e.textContentSource||!e.textContent&&!e.textContentStream||((0,l.deprecated)("The TextLayerRender `textContent`/`textContentStream` parameters will be removed in the future, please use `textContentSource` instead."),e.textContentSource=e.textContent||e.textContentStream);var{container:t,viewport:i}=e,t=getComputedStyle(t),n=t.getPropertyValue("visibility"),t=parseFloat(t.getPropertyValue("--scale-factor")),n=("visible"===n&&(!t||1e-5{this._layoutTextParams=null}).catch(()=>{})}get promise(){return this._capability.promise}cancel(){this._canceled=!0,this._reader&&(this._reader.cancel(new m.AbortException("TextLayer task cancelled.")).catch(()=>{}),this._reader=null),this._capability.reject(new m.AbortException("TextLayer task cancelled."))}_processItems(e,r){for(const p of e)if(void 0!==p.str){this._textContentItemsStr.push(p.str);{s=void 0;o=void 0;a=void 0;l=void 0;h=void 0;c=void 0;d=void 0;u=void 0;var s=this;var o=p;var a=r;var l=document.createElement("span"),h={angle:0,canvasWidth:0,hasText:""!==o.str,hasEOL:o.hasEOL,fontSize:0},c=(s._textDivs.push(l),m.Util.transform(s._transform,o.transform));let e=Math.atan2(c[1],c[0]);var a=a[o.fontName],d=(a.vertical&&(e+=Math.PI/2),Math.hypot(c[2],c[3])),u=d*function(e,t){var i=g.get(e);if(i)return i;i=f(30,t),i.font="30px "+e,t=i.measureText("");let n=t.fontBoundingBoxAscent,r=Math.abs(t.fontBoundingBoxDescent);if(n){const t=n/(n+r);return g.set(e,t),i.canvas.width=i.canvas.height=0,t}i.strokeStyle="red",i.clearRect(0,0,30,30),i.strokeText("g",0,0);let s=i.getImageData(0,0,30,30).data;r=0;for(let e=s.length-1-3;0<=e;e-=4)if(0{this._reader.read().then(e=>{var{value:e,done:t}=e;t?i.resolve():(Object.assign(n,e.styles),this._processItems(e.items,n),r())},i.reject)};this._reader=this._textContentSource.getReader(),r()}else{if(!this._textContentSource)throw new Error('No "textContentSource" parameter specified.');{const{items:n,styles:e}=this._textContentSource;this._processItems(n,e),i.resolve()}}i.promise.then(()=>{n=null;var e=this;if(!e._canceled){const t=e._textDivs,i=e._capability;if(!(1e5{Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationEditorLayer=void 0,i(125),i(136),i(138),i(141),i(143),i(145),i(147);var n=i(1),r=i(164),l=i(197),h=i(202),s=i(168),c=i(203);class d{#Se;#Ee=!1;#xe=null;#we=this.pointerup.bind(this);#Ce=this.pointerdown.bind(this);#Te=new Map;#Pe=!1;#ke=!1;#Me=!1;#Fe;static _initialized=!1;constructor(e){var{uiManager:e,pageIndex:t,div:i,accessibilityManager:n,annotationLayer:r,viewport:s,l10n:o}=e,a=[l.FreeTextEditor,h.InkEditor,c.StampEditor];if(!d._initialized){d._initialized=!0;for(const e of a)e.initialize(o)}e.registerEditorTypes(a),this.#Fe=e,this.pageIndex=t,this.div=i,this.#Se=n,this.#xe=r,this.viewport=s,this.#Fe.addLayer(this)}get isEmpty(){return 0===this.#Te.size}updateToolbar(e){this.#Fe.updateToolbar(e)}updateMode(){var e=0{this.#Fe.focusMainContainer()},0),e.div.remove(),e.isAttachedToDOM=!1,this.#ke||this.addInkEditorIfNeeded(!1)}changeParent(e){e.parent!==this&&(e.annotationElementId&&(this.#Fe.addDeletedAnnotationElement(e.annotationElementId),r.AnnotationEditor.deleteAnnotationElement(e),e.annotationElementId=null),this.attach(e),e.parent?.detach(e),e.setParent(this),e.div)&&e.isAttachedToDOM&&(e.div.remove(),this.div.append(e.div))}add(e){var t;this.changeParent(e),this.#Fe.addEditor(e),this.attach(e),e.isAttachedToDOM||(t=e.render(),this.div.append(t),e.isAttachedToDOM=!0),e.fixAndSetPosition(),e.onceAdded(),this.#Fe.addToAnnotationStorage(e)}moveEditorInDOM(e){if(e.isAttachedToDOM){const t=document["activeElement"];e.div.contains(t)&&(e._focusEventsAllowed=!1,setTimeout(()=>{e.div.contains(document.activeElement)?e._focusEventsAllowed=!0:(e.div.addEventListener("focusin",()=>{e._focusEventsAllowed=!0},{once:!0}),t.focus())},0)),e._structTreeParentId=this.#Se?.moveElementInDOM(this.div,e.div,e.contentDiv,!0)}}addOrRebuild(e){e.needsToBeRebuilt()?e.rebuild():this.add(e)}addUndoableEditor(e){this.addCommands({cmd:()=>e._uiManager.rebuild(e),undo:()=>{e.remove()},mustExec:!1})}getNextId(){return this.#Fe.getId()}#Ie(e){switch(this.#Fe.getMode()){case n.AnnotationEditorType.FREETEXT:return new l.FreeTextEditor(e);case n.AnnotationEditorType.INK:return new h.InkEditor(e);case n.AnnotationEditorType.STAMP:return new c.StampEditor(e)}return null}pasteEditor(e,t){this.#Fe.updateToolbar(e),this.#Fe.updateMode(e);var{offsetX:e,offsetY:i}=this.#Oe(),n=this.getNextId(),n=this.#Ie({parent:this,id:n,x:e,y:i,uiManager:this.#Fe,isCentered:!0,...t});n&&this.add(n)}deserialize(e){switch(e.annotationType??e.annotationEditorType){case n.AnnotationEditorType.FREETEXT:return l.FreeTextEditor.deserialize(e,this,this.#Fe);case n.AnnotationEditorType.INK:return h.InkEditor.deserialize(e,this,this.#Fe);case n.AnnotationEditorType.STAMP:return c.StampEditor.deserialize(e,this,this.#Fe)}return null}#De(e,t){var i=this.getNextId(),i=this.#Ie({parent:this,id:i,x:e.offsetX,y:e.offsetY,uiManager:this.#Fe,isCentered:t});return i&&this.add(i),i}#Oe(){var{x:e,y:t,width:i,height:n}=this.div.getBoundingClientRect(),r=Math.max(0,e),s=Math.max(0,t),r=(r+Math.min(window.innerWidth,e+i))/2-e,i=(s+Math.min(window.innerHeight,t+n))/2-t,[e,s]=this.viewport.rotation%180==0?[r,i]:[i,r];return{offsetX:e,offsetY:s}}addNewEditor(){this.#De(this.#Oe(),!0)}setSelected(e){this.#Fe.setSelected(e)}toggleSelected(e){this.#Fe.toggleSelected(e)}isSelected(e){return this.#Fe.isSelected(e)}unselect(e){this.#Fe.unselect(e)}pointerup(e){var t=n.FeatureTest.platform["isMac"];0!==e.button||e.ctrlKey&&t||e.target!==this.div||!this.#Pe||(this.#Pe=!1,this.#Ee?this.#Fe.getMode()!==n.AnnotationEditorType.STAMP?this.#De(e,!1):this.#Fe.unselectAll():this.#Ee=!0)}pointerdown(e){var t;this.#Pe?this.#Pe=!1:(t=n.FeatureTest.platform.isMac,0!==e.button||e.ctrlKey&&t||e.target===this.div&&(this.#Pe=!0,t=this.#Fe.getActive(),this.#Ee=!t||t.isEmpty()))}findNewParent(e,t,i){t=this.#Fe.findParent(t,i);return null!==t&&t!==this&&(t.changeParent(e),!0)}destroy(){this.#Fe.getActive()?.parent===this&&(this.#Fe.commitOrRemove(),this.#Fe.setActiveEditor(null));for(const e of this.#Te.values())this.#Se?.removePointerInTextLayer(e.contentDiv),e.setParent(null),e.isAttachedToDOM=!1,e.div.remove();this.div=null,this.#Te.clear(),this.#Fe.removeLayer(this)}#Re(){this.#ke=!0;for(const e of this.#Te.values())e.isEmpty()&&e.remove();this.#ke=!1}render(e){e=e.viewport;this.viewport=e,(0,s.setLayerDimensions)(this.div,e);for(const e of this.#Fe.getEditors(this.pageIndex))this.add(e);this.updateMode()}update(e){e=e.viewport;this.#Fe.commitOrRemove(),this.viewport=e,(0,s.setLayerDimensions)(this.div,{rotation:e.rotation}),this.updateMode()}get pageDimensions(){var{pageWidth:e,pageHeight:t}=this.viewport.rawDims;return[e,t]}}t.AnnotationEditorLayer=d},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FreeTextEditor=void 0,i(89);var h=i(1),u=i(165),n=i(164),c=i(198);class r extends n.AnnotationEditor{#Le=this.editorDivBlur.bind(this);#Ne=this.editorDivFocus.bind(this);#Be=this.editorDivInput.bind(this);#je=this.editorDivKeydown.bind(this);#Ue;#ze="";#We=this.id+"-editor";#He;#qe=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){var e=r.prototype,t=e=>e.isEmpty(),i=u.AnnotationEditorUIManager.TRANSLATE_SMALL,n=u.AnnotationEditorUIManager.TRANSLATE_BIG;return(0,h.shadow)(this,"_keyboardManager",new u.KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],e.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],e.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],e._translateEmpty,{args:[-i,0],checker:t}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],e._translateEmpty,{args:[-n,0],checker:t}],[["ArrowRight","mac+ArrowRight"],e._translateEmpty,{args:[i,0],checker:t}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],e._translateEmpty,{args:[n,0],checker:t}],[["ArrowUp","mac+ArrowUp"],e._translateEmpty,{args:[0,-i],checker:t}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],e._translateEmpty,{args:[0,-n],checker:t}],[["ArrowDown","mac+ArrowDown"],e._translateEmpty,{args:[0,i],checker:t}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],e._translateEmpty,{args:[0,n],checker:t}]]))}static _type="freetext";constructor(e){super({...e,name:"freeTextEditor"}),this.#Ue=e.color||r._defaultColor||n.AnnotationEditor._defaultLineColor,this.#He=e.fontSize||r._defaultFontSize}static initialize(e){n.AnnotationEditor.initialize(e,{strings:["free_text2_default_content","editor_free_text2_aria_label"]});e=getComputedStyle(document.documentElement);this._internalPadding=parseFloat(e.getPropertyValue("--freetext-padding"))}static updateDefaultParams(e,t){switch(e){case h.AnnotationEditorParamsType.FREETEXT_SIZE:r._defaultFontSize=t;break;case h.AnnotationEditorParamsType.FREETEXT_COLOR:r._defaultColor=t}}updateParams(e,t){switch(e){case h.AnnotationEditorParamsType.FREETEXT_SIZE:this.#Ge(t);break;case h.AnnotationEditorParamsType.FREETEXT_COLOR:this.#Ve(t)}}static get defaultPropertiesToUpdate(){return[[h.AnnotationEditorParamsType.FREETEXT_SIZE,r._defaultFontSize],[h.AnnotationEditorParamsType.FREETEXT_COLOR,r._defaultColor||n.AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[h.AnnotationEditorParamsType.FREETEXT_SIZE,this.#He],[h.AnnotationEditorParamsType.FREETEXT_COLOR,this.#Ue]]}#Ge(e){const t=e=>{this.editorDiv.style.fontSize=`calc(${e}px * var(--scale-factor))`,this.translate(0,-(e-this.#He)*this.parentScale),this.#He=e,this.#$e()},i=this.#He;this.addCommands({cmd:()=>{t(e)},undo:()=>{t(i)},mustExec:!0,type:h.AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#Ve(e){const t=this.#Ue;this.addCommands({cmd:()=>{this.#Ue=this.editorDiv.style.color=e},undo:()=>{this.#Ue=this.editorDiv.style.color=t},mustExec:!0,type:h.AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(e,t){this._uiManager.translateSelectedEditors(e,t,!0)}getInitialTranslation(){var e=this.parentScale;return[-r._internalPadding*e,-(r._internalPadding+this.#He)*e]}rebuild(){this.parent&&(super.rebuild(),null===this.div||this.isAttachedToDOM||this.parent.add(this))}enableEditMode(){this.isInEditMode()||(this.parent.setEditingState(!1),this.parent.updateToolbar(h.AnnotationEditorType.FREETEXT),super.enableEditMode(),this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.editorDiv.addEventListener("keydown",this.#je),this.editorDiv.addEventListener("focus",this.#Ne),this.editorDiv.addEventListener("blur",this.#Le),this.editorDiv.addEventListener("input",this.#Be))}disableEditMode(){this.isInEditMode()&&(this.parent.setEditingState(!0),super.disableEditMode(),this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#We),this._isDraggable=!0,this.editorDiv.removeEventListener("keydown",this.#je),this.editorDiv.removeEventListener("focus",this.#Ne),this.editorDiv.removeEventListener("blur",this.#Le),this.editorDiv.removeEventListener("input",this.#Be),this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freeTextEditing"))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),e.target!==this.editorDiv)&&this.editorDiv.focus()}onceAdded(){this.width?this.#Xe():(this.enableEditMode(),this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||""===this.editorDiv.innerText.trim()}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freeTextEditing")),super.remove()}#Ke(){var e=this.editorDiv.getElementsByTagName("div");if(0===e.length)return this.editorDiv.innerText;var t=[];for(const i of e)t.push(i.innerText.replace(/\r\n?|\n/,""));return t.join("\n")}#$e(){const[e,t]=this.parentDimensions;let i;if(this.isAttachedToDOM)i=this.div.getBoundingClientRect();else{const{currentLayer:e,div:t}=this,n=t.style.display;t.style.display="hidden",e.div.append(this.div),i=t.getBoundingClientRect(),t.remove(),t.style.display=n}this.rotation%180==this.parentRotation%180?(this.width=i.width/e,this.height=i.height/t):(this.width=i.height/e,this.height=i.width/t),this.fixAndSetPosition()}commit(){if(this.isInEditMode()){super.commit(),this.disableEditMode();const e=this.#ze,t=this.#ze=this.#Ke().trimEnd();if(e!==t){const i=e=>{(this.#ze=e)?(this.#Ye(),this._uiManager.rebuild(this),this.#$e()):this.remove()};this.addCommands({cmd:()=>{i(t)},undo:()=>{i(e)},mustExec:!1}),this.#$e()}}}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}dblclick(e){this.enterInEditMode()}keydown(e){e.target===this.div&&"Enter"===e.key&&(this.enterInEditMode(),e.preventDefault())}editorDivKeydown(e){r._keyboardManager.exec(this,e)}editorDivFocus(e){this.isEditing=!0}editorDivBlur(e){this.isEditing=!1}editorDivInput(e){this.parent.div.classList.toggle("freeTextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}render(){if(!this.div){let r,s;this.width&&(r=this.x,s=this.y),super.render(),this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#We),this.enableEditing(),n.AnnotationEditor._l10nPromise.get("editor_free_text2_aria_label").then(e=>this.editorDiv?.setAttribute("aria-label",e)),n.AnnotationEditor._l10nPromise.get("free_text2_default_content").then(e=>this.editorDiv?.setAttribute("default-content",e)),this.editorDiv.contentEditable=!0;const c=this.editorDiv["style"];if(c.fontSize=`calc(${this.#He}px * var(--scale-factor))`,c.color=this.#Ue,this.div.append(this.editorDiv),this.overlayDiv=document.createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),(0,u.bindEvents)(this,this.div,["dblclick","keydown"]),this.width){const[c,d]=this.parentDimensions;if(this.annotationElementId){const u=this.#qe["position"];let[e,t]=this.getInitialTranslation();[e,t]=this.pageTranslationToScreen(e,t);var[o,a]=this.pageDimensions,[l,h]=this.pageTranslation;let i,n;switch(this.rotation){case 0:i=r+(u[0]-l)/o,n=s+this.height-(u[1]-h)/a;break;case 90:i=r+(u[0]-l)/o,n=s-(u[1]-h)/a,[e,t]=[t,-e];break;case 180:i=r-this.width+(u[0]-l)/o,n=s-(u[1]-h)/a,[e,t]=[-e,-t];break;case 270:i=r+(u[0]-l-this.height*a)/o,n=s+(u[1]-h-this.width*o)/a,[e,t]=[-t,e]}this.setAt(i*c,n*d,e,t)}else this.setAt(r*c,s*d,this.width*c,this.height*d);this.#Ye(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0}return this.div}#Ye(){if(this.editorDiv.replaceChildren(),this.#ze)for(const t of this.#ze.split("\n")){var e=document.createElement("div");e.append(t?document.createTextNode(t):document.createElement("br")),this.editorDiv.append(e)}}get contentDiv(){return this.editorDiv}static deserialize(e,t,i){let n=null;if(e instanceof c.FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize:t,fontColor:i},rect:r,rotation:c,id:s},textContent:o,textPosition:a,parent:{page:{pageNumber:l}}}=e;if(!o||0===o.length)return null;n=e={annotationType:h.AnnotationEditorType.FREETEXT,color:Array.from(i),fontSize:t,value:o.join("\n"),position:a,pageIndex:l-1,rect:r,rotation:c,id:s,deleted:!1}}const r=super.deserialize(e,t,i);return r.#He=e.fontSize,r.#Ue=h.Util.makeHexColor(...e.color),r.#ze=e.value,r.annotationElementId=e.id||null,r.#qe=n,r}serialize(){var e=01<=Math.abs(e-r[t]))||e.color.some((e,t)=>e!==n[t])||e.pageIndex!==s}#Xe(){var e=0this.#Xe(!0),0))}}t.FreeTextEditor=r},(D,e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.StampAnnotationElement=e.InkAnnotationElement=e.FreeTextAnnotationElement=e.AnnotationLayer=void 0,t(89),t(125),t(136),t(138),t(141),t(143),t(145),t(147);var u=t(1),d=t(168),s=t(163),r=t(199),o=t(200),p=t(201);const m=new WeakSet;function g(e){return{width:e[2]-e[0],height:e[3]-e[1]}}class a{static create(e){switch(e.data.annotationType){case u.AnnotationType.LINK:return new i(e);case u.AnnotationType.TEXT:return new l(e);case u.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new h(e);case"Btn":return new(e.data.radioButton?y:e.data.checkBox?v:b)(e);case"Ch":return new w(e);case"Sig":return new c(e)}return new f(e);case u.AnnotationType.POPUP:return new x(e);case u.AnnotationType.FREETEXT:return new A(e);case u.AnnotationType.LINE:return new k(e);case u.AnnotationType.SQUARE:return new _(e);case u.AnnotationType.CIRCLE:return new C(e);case u.AnnotationType.POLYLINE:return new T(e);case u.AnnotationType.CARET:return new M(e);case u.AnnotationType.INK:return new R(e);case u.AnnotationType.POLYGON:return new E(e);case u.AnnotationType.HIGHLIGHT:return new $(e);case u.AnnotationType.UNDERLINE:return new L(e);case u.AnnotationType.SQUIGGLY:return new I(e);case u.AnnotationType.STRIKEOUT:return new F(e);case u.AnnotationType.STAMP:return new P(e);case u.AnnotationType.FILEATTACHMENT:return new O(e);default:return new n(e)}}}class n{#Qe=!1;constructor(e){var{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}=1{var e=i.detail[e],n=e[0],e=e.slice(1);i.target.style[t]=r.ColorConverters[n+"_HTML"](e),this.annotationStorage.setValue(this.data.id,{[t]:r.ColorConverters[n+"_rgb"](e)})};return(0,u.shadow)(this,"_commonActions",{display:e=>{var e=e.detail["display"],t=e%2==1;this.container.style.visibility=t?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:t,noPrint:1===e||2===e})},print:e=>{this.annotationStorage.setValue(this.data.id,{noPrint:!e.detail.print})},hidden:e=>{e=e.detail.hidden;this.container.style.visibility=e?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:e,noView:e})},focus:e=>{setTimeout(()=>e.target.focus({preventScroll:!1}),0)},userName:e=>{e.target.title=e.detail.userName},readonly:e=>{e.target.disabled=e.detail.readonly},required:e=>{this._setRequired(e.target,e.detail.required)},bgColor:e=>{t("bgColor","backgroundColor",e)},fillColor:e=>{t("fillColor","backgroundColor",e)},fgColor:e=>{t("fgColor","color",e)},textColor:e=>{t("textColor","color",e)},borderColor:e=>{t("borderColor","borderColor",e)},strokeColor:e=>{t("strokeColor","borderColor",e)},rotation:e=>{e=e.detail.rotation;this.setRotation(e),this.annotationStorage.setValue(this.data.id,{rotation:e})}})}_dispatchEventFromSandbox(e,t){var i=this._commonActions;for(const n of Object.keys(t.detail))(e[n]||i[n])?.(t)}_setDefaultPropertiesFromJS(e){if(this.enableScripting){var t=this.annotationStorage.getRawValue(this.data.id);if(t){var i,n,r=this._commonActions;for([i,n]of Object.entries(t)){var s=r[i];s&&(s({detail:{[i]:n},target:e}),delete t[i])}}}}_createQuadrilaterals(){if(this.container){const t=this.data["quadPoints"];if(t){const[i,n,r,s]=this.data.rect;if(1===t.length){const[,{x:o,y:e},{x:a,y:l}]=t[0];if(r===o&&s===e&&i===a&&n===l)return}const o=this.container["style"];let e;if(this.#Qe){const{borderColor:t,borderWidth:i}=o;o.borderWidth=0,e=["url('data:image/svg+xml;utf8,",'',``],this.container.classList.add("hasBorder")}const a=r-i,l=s-n,h=this["svgFactory"],c=h.createElement("svg"),d=(c.classList.add("quadrilateralsContainer"),c.setAttribute("width",0),c.setAttribute("height",0),h.createElement("defs")),u=(c.append(d),h.createElement("clipPath")),p="clippath_"+this.data.id;u.setAttribute("id",p),u.setAttribute("clipPathUnits","objectBoundingBox"),d.append(u);for(const[,{x:n,y:r},{x:o,y:c}]of t){const t=h.createElement("rect"),d=(o-i)/a,p=(s-r)/l,m=(n-o)/a,g=(r-c)/l;t.setAttribute("x",d),t.setAttribute("y",p),t.setAttribute("width",m),t.setAttribute("height",g),u.append(t),e?.push(``)}this.#Qe&&(e.push("')"),o.backgroundImage=e.join("")),this.container.append(c),this.container.style.clipPath=`url(#${p})`}}}_createPopup(){var{container:e,data:t}=this,e=(e.setAttribute("aria-haspopup","dialog"),new x({data:{color:t.color,titleObj:t.titleObj,modificationDate:t.modificationDate,contentsObj:t.contentsObj,richText:t.richText,parentRect:t.rect,borderStyle:0,id:"popup_"+t.id,rotation:t.rotation},parent:this.parent,elements:[this]}));this.parent.div.append(e.render())}render(){(0,u.unreachable)("Abstract method `AnnotationElement.render` called")}_getElementsByName(e){var t=1{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}}class i extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!!(1(t&&this.linkService.goToDestination(t),!1),!t&&""!==t||this.#tn()}_bindNamedAction(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeNamedAction(t),!1),this.#tn()}_bindAttachment(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.downloadManager?.openOrDownloadData(this.container,t.content,t.filename),!1),this.#tn()}#Ze(e,t){e.href=this.linkService.getAnchorUrl(""),e.onclick=()=>(this.linkService.executeSetOCGState(t),!1),this.#tn()}_bindJSAction(e,t){e.href=this.linkService.getAnchorUrl("");var i=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const r of Object.keys(t.actions)){var n=i.get(r);n&&(e[n]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:t.id,name:r}}),!1))}e.onclick||(e.onclick=()=>!1),this.#tn()}_bindResetFormAction(e,o){const a=e.onclick;a||(e.href=this.linkService.getAnchorUrl("")),this.#tn(),this._fieldObjects?e.onclick=()=>{a?.();const{fields:e,refs:t,include:i}=o,n=[];if(0!==e.length||0!==t.length){const o=new Set(t);for(const a of e){const e=this._fieldObjects[a]||[];for(const{id:a}of e)o.add(a)}for(const e of Object.values(this._fieldObjects))for(const a of e)o.has(a.id)===i&&n.push(a)}else for(const e of Object.values(this._fieldObjects))n.push(...e);var r=this.annotationStorage,s=[];for(const e of n){const o=e["id"];switch(s.push(o),e.type){case"text":{const a=e.defaultValue||"";r.setValue(o,{value:a});break}case"checkbox":case"radiobutton":{const a=e.defaultValue===e.exportValues;r.setValue(o,{value:a});break}case"combobox":case"listbox":{const a=e.defaultValue||"";r.setValue(o,{value:a});break}default:continue}const a=document.querySelector(`[data-element-id="${o}"]`);a&&(m.has(a)?a.dispatchEvent(new Event("resetform")):(0,u.warn)("_bindResetFormAction - element not allowed: "+o))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:s,name:"ResetForm"}}),!1}:((0,u.warn)('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),a||(e.onclick=()=>!1))}}class l extends n{constructor(e){super(e,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");var e=document.createElement("img");return e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(e),this.container}}class f extends n{render(){return this.data.alternativeText&&(this.container.title=this.data.alternativeText),this.container}showElementAndHideCanvas(e){this.data.hasOwnCanvas&&("CANVAS"===e.previousSibling?.nodeName&&(e.previousSibling.hidden=!0),e.hidden=!1)}_getKeyModifier(e){var{isWin:t,isMac:i}=u.FeatureTest.platform;return t&&e.ctrlKey||i&&e.metaKey}_setEventListener(e,t,i,n,r){i.includes("mouse")?e.addEventListener(i,e=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e),shift:e.shiftKey,modifier:this._getKeyModifier(e)}})}):e.addEventListener(i,e=>{if("blur"===i){if(!t.focused||!e.relatedTarget)return;t.focused=!1}else if("focus"===i){if(t.focused)return;t.focused=!0}r&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:n,value:r(e)}})})}_setEventListeners(e,t,i,n){for(var[r,s]of i)"Action"!==s&&!this.data.actions?.[s]||("Focus"!==s&&"Blur"!==s||(t||={focused:!1}),this._setEventListener(e,t,r,s,n),"Focus"!==s||this.data.actions?.Blur?"Blur"!==s||this.data.actions?.Focus||this._setEventListener(e,t,"focus","Focus",null):this._setEventListener(e,t,"blur","Blur",null))}_setBackgroundColor(e){var t=this.data.backgroundColor||null;e.style.backgroundColor=null===t?"transparent":u.Util.makeHexColor(t[0],t[1],t[2])}_setTextStyle(e){const t=["left","center","right"],i=this.data.defaultAppearanceData["fontColor"],n=this.data.defaultAppearanceData.fontSize||9,r=e.style;let s;var o=e=>Math.round(10*e)/10;if(this.data.multiLine){const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2),t=e/(Math.round(e/(u.LINE_FACTOR*n))||1);s=Math.min(n,o(t/u.LINE_FACTOR))}else{const e=Math.abs(this.data.rect[3]-this.data.rect[1]-2);s=Math.min(n,o(e/u.LINE_FACTOR))}r.fontSize=`calc(${s}px * var(--scale-factor))`,r.color=u.Util.makeHexColor(i[0],i[1],i[2]),null!==this.data.textAlignment&&(r.textAlign=t[this.data.textAlignment])}_setRequired(e,t){t?e.setAttribute("required",!0):e.removeAttribute("required"),e.setAttribute("aria-required",t)}}class h extends f{constructor(e){super(e,{isRenderable:e.renderForms||!e.data.hasAppearance&&!!e.data.fieldValue})}setPropertyOnSiblings(e,t,i,n){var r=this.annotationStorage;for(const s of this._getElementsByName(e.name,e.id))s.domElement&&(s.domElement[t]=i),r.setValue(s.id,{[n]:i})}render(){const n=this.annotationStorage,l=this.data.id;this.container.classList.add("textWidgetAnnotation");let r=null;if(this.renderForms){var s=n.getValue(l,{value:this.data.fieldValue});let e=s.value||"";var o=n.getValue(l,{charLimit:this.data.maxLen}).charLimit;o&&e.length>o&&(e=e.slice(0,o));let t=s.formattedValue||this.data.textContent?.join("\n")||null;t&&this.data.comb&&(t=t.replaceAll(/\s+/g,""));const h={userValue:e,formattedValue:t,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?((r=document.createElement("textarea")).textContent=t??e,this.data.doNotScroll&&(r.style.overflowY="hidden")):((r=document.createElement("input")).type="text",r.setAttribute("value",t??e),this.data.doNotScroll&&(r.style.overflowX="hidden")),this.data.hasOwnCanvas&&(r.hidden=!0),m.add(r),r.setAttribute("data-element-id",l),r.disabled=this.data.readOnly,r.name=this.data.fieldName,r.tabIndex=1e3,this._setRequired(r,this.data.required),o&&(r.maxLength=o),r.addEventListener("input",e=>{n.setValue(l,{value:e.target.value}),this.setPropertyOnSiblings(r,"value",e.target.value,"value"),h.formattedValue=null}),r.addEventListener("resetform",e=>{var t=this.data.defaultFieldValue??"";r.value=h.userValue=t,h.formattedValue=null});let i=e=>{var t=h["formattedValue"];null!=t&&(e.target.value=t),e.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){r.addEventListener("focus",e=>{h.focused||(e=e["target"],h.userValue&&(e.value=h.userValue),h.lastCommittedValue=e.value,h.commitKey=1,h.focused=!0)}),r.addEventListener("updatefromsandbox",e=>{this.showElementAndHideCanvas(e.target),this._dispatchEventFromSandbox({value(e){h.userValue=e.detail.value??"",n.setValue(l,{value:h.userValue.toString()}),e.target.value=h.userValue},formattedValue(e){var t=e.detail["formattedValue"];null!=(h.formattedValue=t)&&e.target!==document.activeElement&&(e.target.value=t),n.setValue(l,{formattedValue:t})},selRange(e){e.target.setSelectionRange(...e.detail.selRange)},charLimit:t=>{var i=t.detail["charLimit"],t=t["target"];if(0===i)t.removeAttribute("maxLength");else{t.setAttribute("maxLength",i);let e=h.userValue;!e||e.length<=i||(e=e.slice(0,i),t.value=h.userValue=e,n.setValue(l,{value:e}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:e,willCommit:!0,commitKey:1,selStart:t.selectionStart,selEnd:t.selectionEnd}}))}}},e)}),r.addEventListener("keydown",e=>{let t=-(h.commitKey=1);var i;"Escape"===e.key?t=0:"Enter"!==e.key||this.data.multiLine?"Tab"===e.key&&(h.commitKey=3):t=2,-1!==t&&(i=e.target.value,h.lastCommittedValue!==i)&&(h.lastCommittedValue=i,h.userValue=i,this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:i,willCommit:!0,commitKey:t,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}))});const a=i;i=null,r.addEventListener("blur",e=>{var t;h.focused&&e.relatedTarget&&(h.focused=!1,t=e.target["value"],h.userValue=t,h.lastCommittedValue!==t&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:t,willCommit:!0,commitKey:h.commitKey,selStart:e.target.selectionStart,selEnd:e.target.selectionEnd}}),a(e))}),this.data.actions?.Keystroke&&r.addEventListener("beforeinput",e=>{h.lastCommittedValue=null;var{data:t,target:i}=e,{value:n,selectionStart:r,selectionEnd:s}=i;let o=r,a=s;switch(e.inputType){case"deleteWordBackward":{const e=n.substring(0,r).match(/\w*[^\w]*$/);e&&(o-=e[0].length);break}case"deleteWordForward":{const e=n.substring(r).match(/^[^\w]*\w*/);e&&(a+=e[0].length);break}case"deleteContentBackward":r===s&&--o;break;case"deleteContentForward":r===s&&(a+=1)}e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:l,name:"Keystroke",value:n,change:t||"",willCommit:!1,selStart:o,selEnd:a}})}),this._setEventListeners(r,h,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.value)}if(i&&r.addEventListener("blur",i),this.data.comb){const n=(this.data.rect[2]-this.data.rect[0])/o;r.classList.add("comb"),r.style.letterSpacing=`calc(${n}px * var(--scale-factor) - 1ch)`}}else(r=document.createElement("div")).textContent=this.data.fieldValue,r.style.verticalAlign="middle",r.style.display="table-cell";return this._setTextStyle(r),this._setBackgroundColor(r),this._setDefaultPropertiesFromJS(r),this.container.append(r),this.container}}class c extends f{constructor(e){super(e,{isRenderable:!!e.data.hasOwnCanvas})}}class v extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){const n=this.annotationStorage,r=this.data,s=r.id;let e=n.getValue(s,{value:r.exportValue===r.fieldValue}).value;"string"==typeof e&&(e="Off"!==e,n.setValue(s,{value:e})),this.container.classList.add("buttonWidgetAnnotation","checkBox");var t=document.createElement("input");return m.add(t),t.setAttribute("data-element-id",s),t.disabled=r.readOnly,this._setRequired(t,this.data.required),t.type="checkbox",t.name=r.fieldName,e&&t.setAttribute("checked",!0),t.setAttribute("exportValue",r.exportValue),t.tabIndex=1e3,t.addEventListener("change",e=>{var{name:t,checked:i}=e.target;for(const e of this._getElementsByName(t,s)){const s=i&&e.exportValue===r.exportValue;e.domElement&&(e.domElement.checked=s),n.setValue(e.id,{value:s})}n.setValue(s,{value:i})}),t.addEventListener("resetform",e=>{var t=r.defaultFieldValue||"Off";e.target.checked=t===r.exportValue}),this.enableScripting&&this.hasJSActions&&(t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value(e){e.target.checked="Off"!==e.detail.value,n.setValue(s,{value:e.target.checked})}},e)}),this._setEventListeners(t,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)),this._setBackgroundColor(t),this._setDefaultPropertiesFromJS(t),this.container.append(t),this.container}}class y extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("buttonWidgetAnnotation","radioButton");const i=this.annotationStorage,n=this.data,r=n.id;let s=i.getValue(r,{value:n.fieldValue===n.buttonValue}).value;"string"==typeof s&&(s=s!==n.buttonValue,i.setValue(r,{value:s}));var e=document.createElement("input");if(m.add(e),e.setAttribute("data-element-id",r),e.disabled=n.readOnly,this._setRequired(e,this.data.required),e.type="radio",e.name=n.fieldName,s&&e.setAttribute("checked",!0),e.tabIndex=1e3,e.addEventListener("change",e=>{var{name:t,checked:e}=e.target;for(const e of this._getElementsByName(t,r))i.setValue(e.id,{value:!1});i.setValue(r,{value:e})}),e.addEventListener("resetform",e=>{var t=n.defaultFieldValue;e.target.checked=null!=t&&t===n.buttonValue}),this.enableScripting&&this.hasJSActions){const s=n.buttonValue;e.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value:e=>{var t=s===e.detail.value;for(const s of this._getElementsByName(e.target.name)){const e=t&&s.id===r;s.domElement&&(s.domElement.checked=e),i.setValue(s.id,{value:e})}}},e)}),this._setEventListeners(e,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],e=>e.target.checked)}return this._setBackgroundColor(e),this._setDefaultPropertiesFromJS(e),this.container.append(e),this.container}}class b extends i{constructor(e){super(e,{ignoreBorder:e.data.hasAppearance})}render(){var e=super.render(),t=(e.classList.add("buttonWidgetAnnotation","pushButton"),this.data.alternativeText&&(e.title=this.data.alternativeText),e.lastChild);return this.enableScripting&&this.hasJSActions&&t&&(this._setDefaultPropertiesFromJS(t),t.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({},e)})),e}}class w extends f{constructor(e){super(e,{isRenderable:e.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const s=this.annotationStorage,o=this.data.id,e=s.getValue(o,{value:this.data.fieldValue}),a=document.createElement("select");m.add(a),a.setAttribute("data-element-id",o),a.disabled=this.data.readOnly,this._setRequired(a,this.data.required),a.name=this.data.fieldName,a.tabIndex=1e3;let t=this.data.combo&&0{var t=this.data.defaultFieldValue;for(const e of a.options)e.selected=e.value===t});for(const s of this.data.options){const o=document.createElement("option");o.textContent=s.displayValue,o.value=s.exportValue,e.value.includes(s.exportValue)&&(o.setAttribute("selected",!0),t=!1),a.append(o)}let i=null;if(t){const s=document.createElement("option");s.value=" ",s.setAttribute("hidden",!0),s.setAttribute("selected",!0),a.prepend(s),i=()=>{s.remove(),a.removeEventListener("input",i),i=null},a.addEventListener("input",i)}const l=e=>{const t=e?"value":"textContent",{options:i,multiple:n}=a;return n?Array.prototype.filter.call(i,e=>e.selected).map(e=>e[t]):-1===i.selectedIndex?null:i[i.selectedIndex][t]};let h=l(!1);const c=e=>{e=e.target.options;return Array.prototype.map.call(e,e=>({displayValue:e.textContent,exportValue:e.value}))};return this.enableScripting&&this.hasJSActions?(a.addEventListener("updatefromsandbox",e=>{this._dispatchEventFromSandbox({value(e){i?.();var e=e.detail.value,t=new Set(Array.isArray(e)?e:[e]);for(const s of a.options)s.selected=t.has(s.value);s.setValue(o,{value:l(!0)}),h=l(!1)},multipleSelection(e){a.multiple=!0},remove(e){var t=a.options,i=e.detail.remove;t[i].selected=!1,a.remove(i),0e.selected)&&(t[0].selected=!0),s.setValue(o,{value:l(!0),items:c(e)}),h=l(!1)},clear(e){for(;0!==a.length;)a.remove(0);s.setValue(o,{value:null,items:[]}),h=l(!1)},insert(e){var{index:t,displayValue:i,exportValue:n}=e.detail.insert,t=a.children[t],r=document.createElement("option");r.textContent=i,r.value=n,t?t.before(r):a.append(r),s.setValue(o,{value:l(!0),items:c(e)}),h=l(!1)},items(e){const t=e.detail["items"];for(;0!==a.length;)a.remove(0);for(const s of t){const{displayValue:o,exportValue:e}=s,t=document.createElement("option");t.textContent=o,t.value=e,a.append(t)}0{var t=l(!0);s.setValue(o,{value:t}),e.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:o,name:"Keystroke",value:h,changeEx:t,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(a,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],e=>e.target.value)):a.addEventListener("input",function(e){s.setValue(o,{value:l(!0)})}),this.data.combo&&this._setTextStyle(a),this._setBackgroundColor(a),this._setDefaultPropertiesFromJS(a),this.container.append(a),this.container}}class x extends n{constructor(e){var{data:t,elements:i}=e;super(e,{isRenderable:n._hasPopupData(t)}),this.elements=i}render(){this.container.classList.add("popupAnnotation");var e=new S({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),t=[];for(const i of this.elements)i.popup=e,t.push(i.data.id),i.addHighlightArea();return this.container.setAttribute("aria-controls",t.map(e=>""+u.AnnotationPrefix+e).join(",")),this.container}}class S{#en=null;#nn=this.#in.bind(this);#rn=this.#sn.bind(this);#an=this.#on.bind(this);#ln=this.#cn.bind(this);#Ue=null;#Rt=null;#hn=null;#dn=null;#un=null;#pn=null;#fn=!1;#gn=null;#mn=null;#bn=null;#vn=null;#yn=!1;constructor(e){var{container:e,color:t,elements:i,titleObj:n,modificationDate:r,contentsObj:s,richText:o,parent:a,rect:l,parentRect:h,open:c}=e,e=(this.#Rt=e,this.#vn=n,this.#hn=s,this.#bn=o,this.#un=a,this.#Ue=t,this.#mn=l,this.#pn=h,this.#dn=i,d.PDFDateString.toDateObject(r));e&&(this.#en=a.l10n.get("annotation_date_string",{date:e.toLocaleDateString(),time:e.toLocaleTimeString()})),this.trigger=i.flatMap(e=>e.getElementsToTriggerPopup());for(const e of this.trigger)e.addEventListener("click",this.#ln),e.addEventListener("mouseenter",this.#an),e.addEventListener("mouseleave",this.#rn),e.classList.add("popupTriggerArea");for(const e of i)e.container?.addEventListener("keydown",this.#nn);this.#Rt.hidden=!0,c&&this.#cn()}render(){if(!this.#gn){const{page:{view:s},viewport:{rawDims:{pageWidth:o,pageHeight:a,pageX:l,pageY:h}}}=this.#un,c=this.#gn=document.createElement("div");if(c.className="popup",this.#Ue){const s=c.style.outlineColor=u.Util.makeHexColor(...this.#Ue);if(CSS.supports("background-color","color-mix(in srgb, red 30%, white)"))c.style.backgroundColor=`color-mix(in srgb, ${s} 30%, white)`;else{const s=.7;c.style.backgroundColor=u.Util.makeHexColor(...this.#Ue.map(e=>Math.floor(.7*(255-e)+e)))}}var i=document.createElement("span"),n=(i.className="header",document.createElement("h1"));if(i.append(n),{dir:n.dir,str:n.textContent}=this.#vn,c.append(i),this.#en){const s=document.createElement("span");s.classList.add("popupDate"),this.#en.then(e=>{s.textContent=e}),i.append(s)}n=this.#hn,i=this.#bn;if(!i?.str||n?.str&&n.str!==i.str){const s=this._formatContents(n);c.append(s)}else p.XfaLayer.render({xfaHtml:i.html,intent:"richText",div:c}),c.lastChild.classList.add("richText","popupContent");let e=!!this.#pn,t=e?this.#pn:this.#mn;for(const s of this.#dn)if(!t||null!==u.Util.intersect(s.data.rect,t)){t=s.data.rect,e=!0;break}var n=u.Util.normalizeRect([t[0],s[3]-t[1]+s[1],t[2],s[3]-t[3]+s[1]]),i=e?t[2]-t[0]+5:0,i=n[0]+i,n=n[1],r=this.#Rt["style"];r.left=100*(i-l)/o+"%",r.top=100*(n-h)/a+"%",this.#Rt.append(c)}}_formatContents(e){let{str:t,dir:i}=e;var n=document.createElement("p"),r=(n.classList.add("popupContent"),n.dir=i,t.split(/(?:\r\n?|\n)/));for(let e=0,t=r.length;e{"Enter"===e.key&&(n?e.metaKey:e.ctrlKey)&&this.#Cn()}),!t.popupRef&&this.hasPopupData?this._createPopup():i.classList.add("popupTriggerArea"),e.append(i),e}getElementsToTriggerPopup(){return this.#wn}addHighlightArea(){this.container.classList.add("highlightArea")}#Cn(){this.downloadManager?.openOrDownloadData(this.container,this.content,this.filename)}}e.AnnotationLayer=class{#Se=null;#Tn=null;#Pn=new Map;constructor(e){var{div:e,accessibilityManager:t,annotationCanvasMap:i,l10n:n,page:r,viewport:s}=e;this.div=e,this.#Se=t,this.#Tn=i,this.l10n=n,this.page=r,this.viewport=s,this.zIndex=0,this.l10n||=o.NullL10n}#kn(e,t){var i=e.firstChild||e;i.id=""+u.AnnotationPrefix+t,this.div.append(e),this.#Se?.moveElementInDOM(this.div,e,i,!1)}async render(e){const t=e["annotations"],i=this.div;(0,d.setLayerDimensions)(i,this.viewport);var n=new Map,r={data:null,layer:i,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||"",renderForms:!1!==e.renderForms,svgFactory:new d.DOMSVGFactory,annotationStorage:e.annotationStorage||new s.AnnotationStorage,enableScripting:!0===e.enableScripting,hasJSActions:e.hasJSActions,fieldObjects:e.fieldObjects,parent:this,elements:null};for(const e of t)if(!e.noHTML){const t=e.annotationType===u.AnnotationType.POPUP;if(t){const t=n.get(e.id);if(!t)continue;r.elements=t}else{const{width:t,height:i}=g(e.rect);if(t<=0||i<=0)continue}r.data=e;const i=a.create(r);if(i.isRenderable){if(!t&&e.popupRef){const t=n.get(e.popupRef);t?t.push(i):n.set(e.popupRef,[i])}0{function i(e){return Math.floor(255*Math.max(0,Math.min(1,e))).toString(16).padStart(2,"0")}function r(e){return Math.max(0,Math.min(255,255*e))}Object.defineProperty(t,"__esModule",{value:!0}),t.ColorConverters=void 0,t.ColorConverters=class{static CMYK_G(e){var[e,t,i,n]=e;return["G",1-Math.min(1,.3*e+.59*i+.11*t+n)]}static G_CMYK(e){var[e]=e;return["CMYK",0,0,0,1-e]}static G_RGB(e){var[e]=e;return["RGB",e,e,e]}static G_rgb(e){var[e]=e;return[e=r(e),e,e]}static G_HTML(e){var[e]=e,e=i(e);return"#"+e+e+e}static RGB_G(e){var[e,t,i]=e;return["G",.3*e+.59*t+.11*i]}static RGB_rgb(e){return e.map(r)}static RGB_HTML(e){return"#"+e.map(i).join("")}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB(e){var[e,t,i,n]=e;return["RGB",1-Math.min(1,e+n),1-Math.min(1,i+n),1-Math.min(1,t+n)]}static CMYK_rgb(e){var[e,t,i,n]=e;return[r(1-Math.min(1,e+n)),r(1-Math.min(1,i+n)),r(1-Math.min(1,t+n))]}static CMYK_HTML(e){e=this.CMYK_RGB(e).slice(1);return this.RGB_HTML(e)}static RGB_CMYK(e){var[e,t,i]=e,e=1-e,t=1-t,i=1-i;return["CMYK",e,t,i,Math.min(e,t,i)]}}},(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NullL10n=void 0,t.getL10nFallback=n;const i={of_pages:"of {{pagesCount}}",page_of_pages:"({{pageNumber}} of {{pagesCount}})",document_properties_kb:"{{size_kb}} KB ({{size_b}} bytes)",document_properties_mb:"{{size_mb}} MB ({{size_b}} bytes)",document_properties_date_string:"{{date}}, {{time}}",document_properties_page_size_unit_inches:"in",document_properties_page_size_unit_millimeters:"mm",document_properties_page_size_orientation_portrait:"portrait",document_properties_page_size_orientation_landscape:"landscape",document_properties_page_size_name_a3:"A3",document_properties_page_size_name_a4:"A4",document_properties_page_size_name_letter:"Letter",document_properties_page_size_name_legal:"Legal",document_properties_page_size_dimension_string:"{{width}} × {{height}} {{unit}} ({{orientation}})",document_properties_page_size_dimension_name_string:"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})",document_properties_linearized_yes:"Yes",document_properties_linearized_no:"No",additional_layers:"Additional Layers",page_landmark:"Page {{page}}",thumb_page_title:"Page {{page}}",thumb_page_canvas:"Thumbnail of Page {{page}}",find_reached_top:"Reached top of document, continued from bottom",find_reached_bottom:"Reached end of document, continued from top","find_match_count[one]":"{{current}} of {{total}} match","find_match_count[other]":"{{current}} of {{total}} matches","find_match_count_limit[one]":"More than {{limit}} match","find_match_count_limit[other]":"More than {{limit}} matches",find_not_found:"Phrase not found",page_scale_width:"Page Width",page_scale_fit:"Page Fit",page_scale_auto:"Automatic Zoom",page_scale_actual:"Actual Size",page_scale_percent:"{{scale}}%",loading_error:"An error occurred while loading the PDF.",invalid_file_error:"Invalid or corrupted PDF file.",missing_file_error:"Missing PDF file.",unexpected_response_error:"Unexpected server response.",rendering_error:"An error occurred while rendering the page.",annotation_date_string:"{{date}}, {{time}}",printing_not_supported:"Warning: Printing is not fully supported by this browser.",printing_not_ready:"Warning: The PDF is not fully loaded for printing.",web_fonts_disabled:"Web fonts are disabled: unable to use embedded PDF fonts.",free_text2_default_content:"Start typing…",editor_free_text2_aria_label:"Text Editor",editor_ink2_aria_label:"Draw Editor",editor_ink_canvas_aria_label:"User-created image",editor_alt_text_button_label:"Alt text",editor_alt_text_edit_button_label:"Edit alt text",editor_alt_text_decorative_tooltip:"Marked as decorative",print_progress_percent:"{{progress}}%"};function n(e,t){switch(e){case"find_match_count":e=`find_match_count[${1===t.total?"one":"other"}]`;break;case"find_match_count_limit":e=`find_match_count_limit[${1===t.limit?"one":"other"}]`}return i[e]||""}t.NullL10n={getLanguage:async()=>"en-us",getDirection:async()=>"ltr",async get(e){var i,t=1t in i?i[t]:"{{"+t+"}}"):e},async translate(e){}}},(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XfaLayer=void 0,i(89);var d=i(194);t.XfaLayer=class{static setupStorage(e,t,i,n,r){var s=n.getValue(t,{value:null});switch(i.name){case"textarea":null!==s.value&&(e.textContent=s.value),"print"!==r&&e.addEventListener("input",e=>{n.setValue(t,{value:e.target.value})});break;case"input":if("radio"===i.attributes.type||"checkbox"===i.attributes.type){if(s.value===i.attributes.xfaOn?e.setAttribute("checked",!0):s.value===i.attributes.xfaOff&&e.removeAttribute("checked"),"print"===r)break;e.addEventListener("change",e=>{n.setValue(t,{value:e.target.checked?e.target.getAttribute("xfaOn"):e.target.getAttribute("xfaOff")})})}else{if(null!==s.value&&e.setAttribute("value",s.value),"print"===r)break;e.addEventListener("input",e=>{n.setValue(t,{value:e.target.value})})}break;case"select":if(null!==s.value){e.setAttribute("value",s.value);for(const e of i.children)e.attributes.value===s.value?e.attributes.selected=!0:e.attributes.hasOwnProperty("selected")&&delete e.attributes.selected}e.addEventListener("input",e=>{e=e.target.options,e=-1===e.selectedIndex?"":e[e.selectedIndex].value;n.setValue(t,{value:e})})}}static setAttributes(e){let{html:t,element:i,storage:n=null,intent:r,linkService:s}=e;var o=i["attributes"],a=t instanceof HTMLAnchorElement;"radio"===o.type&&(o.name=o.name+"-"+r);for(const[e,i]of Object.entries(o))if(null!=i)switch(e){case"class":i.length&&t.setAttribute(e,i.join(" "));break;case"dataId":break;case"id":t.setAttribute("data-element-id",i);break;case"style":Object.assign(t.style,i);break;case"textContent":t.textContent=i;break;default:a&&("href"===e||"newWindow"===e)||t.setAttribute(e,i)}a&&s.addLinkAttributes(t,o.href,o.newWindow),n&&o.dataId&&this.setupStorage(t,o.dataId,i,n)}static render(e){const t=e.annotationStorage,i=e.linkService,n=e.xfaHtml,r=e.intent||"display",s=document.createElement(n.name),o=(n.attributes&&this.setAttributes({html:s,element:n,intent:r,linkService:i}),[[n,-1,s]]),a=e.div;if(a.append(s),e.viewport){const t=`matrix(${e.viewport.transform.join(",")})`;a.style.transform=t}"richText"!==r&&a.setAttribute("class","xfaLayer xfaFont");for(var l=[];0{Object.defineProperty(t,"__esModule",{value:!0}),t.InkEditor=void 0,i(89),i(2);var g=i(1),f=i(164),v=i(198),n=i(168),o=i(165);class y extends f.AnnotationEditor{#Fn=0;#Rn=0;#Dn=this.canvasPointermove.bind(this);#In=this.canvasPointerleave.bind(this);#On=this.canvasPointerup.bind(this);#Ln=this.canvasPointerdown.bind(this);#Nn=new Path2D;#Bn=!1;#jn=!1;#Un=!1;#zn=null;#Wn=0;#Hn=0;#qn=null;static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=1;static _type="ink";constructor(e){super({...e,name:"inkEditor"}),this.color=e.color||null,this.thickness=e.thickness||null,this.opacity=e.opacity||null,this.paths=[],this.bezierPath2D=[],this.allRawPaths=[],this.currentPath=[],this.scaleFactor=1,this.translationX=this.translationY=0,this.x=0,this.y=0,this._willKeepAspectRatio=!0}static initialize(e){f.AnnotationEditor.initialize(e,{strings:["editor_ink_canvas_aria_label","editor_ink2_aria_label"]})}static updateDefaultParams(e,t){switch(e){case g.AnnotationEditorParamsType.INK_THICKNESS:y._defaultThickness=t;break;case g.AnnotationEditorParamsType.INK_COLOR:y._defaultColor=t;break;case g.AnnotationEditorParamsType.INK_OPACITY:y._defaultOpacity=t/100}}updateParams(e,t){switch(e){case g.AnnotationEditorParamsType.INK_THICKNESS:this.#Gn(t);break;case g.AnnotationEditorParamsType.INK_COLOR:this.#Ve(t);break;case g.AnnotationEditorParamsType.INK_OPACITY:this.#Vn(t)}}static get defaultPropertiesToUpdate(){return[[g.AnnotationEditorParamsType.INK_THICKNESS,y._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,y._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*y._defaultOpacity)]]}get propertiesToUpdate(){return[[g.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||y._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,this.color||y._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??y._defaultOpacity))]]}#Gn(e){const t=this.thickness;this.addCommands({cmd:()=>{this.thickness=e,this.#$n()},undo:()=>{this.thickness=t,this.#$n()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0})}#Ve(e){const t=this.color;this.addCommands({cmd:()=>{this.color=e,this.#Xn()},undo:()=>{this.color=t,this.#Xn()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_COLOR,overwriteIfSameType:!0,keepUndo:!0})}#Vn(e){e/=100;const t=this.opacity;this.addCommands({cmd:()=>{this.opacity=e,this.#Xn()},undo:()=>{this.opacity=t,this.#Xn()},mustExec:!0,type:g.AnnotationEditorParamsType.INK_OPACITY,overwriteIfSameType:!0,keepUndo:!0})}rebuild(){this.parent&&(super.rebuild(),null!==this.div)&&(this.canvas||(this.#Kn(),this.#Yn()),this.isAttachedToDOM||(this.parent.add(this),this.#Jn()),this.#$n())}remove(){null!==this.canvas&&(this.isEmpty()||this.commit(),this.canvas.width=this.canvas.height=0,this.canvas.remove(),this.canvas=null,this.#zn.disconnect(),this.#zn=null,super.remove())}setParent(e){!this.parent&&e?this._uiManager.removeShouldRescale(this):this.parent&&null===e&&this._uiManager.addShouldRescale(this),super.setParent(e)}onScaleChanging(){var[e,t]=this.parentDimensions,e=this.width*e,t=this.height*t;this.setDimensions(e,t)}enableEditMode(){this.#Bn||null===this.canvas||(super.enableEditMode(),this._isDraggable=!1,this.canvas.addEventListener("pointerdown",this.#Ln))}disableEditMode(){this.isInEditMode()&&null!==this.canvas&&(super.disableEditMode(),this._isDraggable=!this.isEmpty(),this.div.classList.remove("editing"),this.canvas.removeEventListener("pointerdown",this.#Ln))}onceAdded(){this._isDraggable=!this.isEmpty()}isEmpty(){return 0===this.paths.length||1===this.paths.length&&0===this.paths[0].length}#Qn(){var{parentRotation:e,parentDimensions:[t,i]}=this;switch(e){case 90:return[0,i,i,t];case 180:return[t,i,t,i];case 270:return[t,0,i,t];default:return[0,0,t,i]}}#Zn(){var{ctx:e,color:t,opacity:i,thickness:n,parentScale:r,scaleFactor:s}=this;e.lineWidth=n*r/s,e.lineCap="round",e.lineJoin="round",e.miterLimit=10,e.strokeStyle=""+t+(0,o.opacityToHex)(i)}#ti(e,t){this.canvas.addEventListener("contextmenu",n.noContextMenu),this.canvas.addEventListener("pointerleave",this.#In),this.canvas.addEventListener("pointermove",this.#Dn),this.canvas.addEventListener("pointerup",this.#On),this.canvas.removeEventListener("pointerdown",this.#Ln),this.isEditing=!0,this.#Un||(this.#Un=!0,this.#Jn(),this.thickness||=y._defaultThickness,this.color||=y._defaultColor||f.AnnotationEditor._defaultLineColor,this.opacity??=y._defaultOpacity),this.currentPath.push([e,t]),this.#jn=!1,this.#Zn(),this.#qn=()=>{this.#ei(),this.#qn&&window.requestAnimationFrame(this.#qn)},window.requestAnimationFrame(this.#qn)}#ni(t,i){var[n,e]=this.currentPath.at(-1);if(!(1{this.allRawPaths.push(r),this.paths.push(i),this.bezierPath2D.push(n),this.rebuild()},undo:()=>{this.allRawPaths.pop(),this.paths.pop(),this.bezierPath2D.pop(),0===this.paths.length?this.remove():(this.canvas||(this.#Kn(),this.#Yn()),this.#$n())},mustExec:!0})}#ei(){if(this.#jn){this.#jn=!1;Math.ceil(this.thickness*this.parentScale);const e=this.currentPath.slice(-3),t=e.map(e=>e[0]),i=e.map(e=>e[1]),n=(Math.min(...t),Math.max(...t),Math.min(...i),Math.max(...i),this)["ctx"];n.save(),n.clearRect(0,0,this.canvas.width,this.canvas.height);for(const r of this.bezierPath2D)n.stroke(r);n.stroke(this.#Nn),n.restore()}}#ii(e,t,i,n,r,s,o){t=(t+n)/2,i=(i+r)/2,s=(n+s)/2,o=(r+o)/2;e.bezierCurveTo(t+2*(n-t)/3,i+2*(r-i)/3,s+2*(n-s)/3,o+2*(r-o)/3,s,o)}#ai(){var e=this.currentPath;if(e.length<=2)return[[e[0],e[0],e.at(-1),e.at(-1)]];var t=[];let i,[n,r]=e[0];for(i=1;i{this.canvas.removeEventListener("contextmenu",n.noContextMenu)},10),this.#si(e.offsetX,e.offsetY),this.addToAnnotationStorage(),this.setInBackground()}#Kn(){this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=0,this.canvas.className="inkEditorCanvas",f.AnnotationEditor._l10nPromise.get("editor_ink_canvas_aria_label").then(e=>this.canvas?.setAttribute("aria-label",e)),this.div.append(this.canvas),this.ctx=this.canvas.getContext("2d")}#Yn(){this.#zn=new ResizeObserver(e=>{e=e[0].contentRect;e.width&&e.height&&this.setDimensions(e.width,e.height)}),this.#zn.observe(this.div)}get isResizable(){return!this.isEmpty()&&this.#Bn}render(){if(!this.div){let e,t;this.width&&(e=this.x,t=this.y),super.render(),f.AnnotationEditor._l10nPromise.get("editor_ink2_aria_label").then(e=>this.div?.setAttribute("aria-label",e));const[i,n,r,s]=this.#Qn();if(this.setAt(i,n,0,0),this.setDims(r,s),this.#Kn(),this.width){const[i,n]=this.parentDimensions;this.setAspectRatio(this.width*i,this.height*n),this.setAt(e*i,t*n,this.width*i,this.height*n),this.#Un=!0,this.#Jn(),this.setDims(this.width*i,this.height*n),this.#Xn(),this.div.classList.add("disabled")}else this.div.classList.add("editing"),this.enableEditMode();this.#Yn()}return this.div}#Jn(){var e,t;this.#Un&&([e,t]=this.parentDimensions,this.canvas.width=Math.ceil(this.width*e),this.canvas.height=Math.ceil(this.height*t),this.#oi())}setDimensions(e,t){var i=Math.round(e),n=Math.round(t);this.#Wn===i&&this.#Hn===n||(this.#Wn=i,this.#Hn=n,this.canvas.style.visibility="hidden",[i,n]=this.parentDimensions,this.width=e/i,this.height=t/n,this.fixAndSetPosition(),this.#Bn&&this.#ci(e,t),this.#Jn(),this.#Xn(),this.canvas.style.visibility="visible",this.fixDims())}#ci(e,t){var i=this.#hi(),e=(e-i)/this.#Rn,t=(t-i)/this.#Fn;this.scaleFactor=Math.min(e,t)}#oi(){var e=this.#hi()/2;this.ctx.setTransform(this.scaleFactor,0,0,this.scaleFactor,this.translationX*this.scaleFactor+e,this.translationY*this.scaleFactor+e)}static#di(i){var n=new Path2D;for(let e=0,t=i.length;e{Object.defineProperty(t,"__esModule",{value:!0}),t.StampEditor=void 0,i(149),i(152);var s=i(1),n=i(164),o=i(168),a=i(198);class r extends n.AnnotationEditor{#mi=null;#bi=null;#vi=null;#yi=null;#_i=null;#Ai=null;#zn=null;#Si=null;#Ei=!1;#xi=!1;static _type="stamp";constructor(e){super({...e,name:"stampEditor"}),this.#yi=e.bitmapUrl,this.#_i=e.bitmapFile}static initialize(e){n.AnnotationEditor.initialize(e)}static get supportedTypes(){return(0,s.shadow)(this,"supportedTypes",["apng","avif","bmp","gif","jpeg","png","svg+xml","webp","x-icon"].map(e=>"image/"+e))}static get supportedTypesStr(){return(0,s.shadow)(this,"supportedTypesStr",this.supportedTypes.join(","))}static isHandlingMimeForPasting(e){return this.supportedTypes.includes(e)}static paste(e,t){t.pasteEditor(s.AnnotationEditorType.STAMP,{bitmapFile:e.getAsFile()})}#wi(e){var t=1this.#wi(e,!0)).finally(()=>this.#Ci());else if(this.#yi){const t=this.#yi;this.#yi=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromUrl(t).then(e=>this.#wi(e)).finally(()=>this.#Ci()))}else if(this.#_i){const t=this.#_i;this.#_i=null,this._uiManager.enableWaiting(!0),void(this.#vi=this._uiManager.imageManager.getFromFile(t).then(e=>this.#wi(e)).finally(()=>this.#Ci()))}else{const t=document.createElement("input");t.type="file",t.accept=r.supportedTypesStr,this.#vi=new Promise(e=>{t.addEventListener("change",async()=>{if(t.files&&0!==t.files.length){this._uiManager.enableWaiting(!0);const e=await this._uiManager.imageManager.getFromFile(t.files[0]);this.#wi(e)}else this.remove();e()}),t.addEventListener("cancel",()=>{this.remove(),e()})}).finally(()=>this.#Ci()),t.click()}}remove(){this.#bi&&(this.#mi=null,this._uiManager.imageManager.deleteId(this.#bi),this.#Ai?.remove(),this.#Ai=null,this.#zn?.disconnect(),this.#zn=null),super.remove()}rebuild(){this.parent?(super.rebuild(),null!==this.div&&(this.#bi&&this.#Ti(),this.isAttachedToDOM||this.parent.add(this))):this.#bi&&this.#Ti()}onceAdded(){this._isDraggable=!0,this.div.focus()}isEmpty(){return!(this.#vi||this.#mi||this.#yi||this.#_i)}get isResizable(){return!0}render(){if(!this.div){let e,t;var i,n;this.width&&(e=this.x,t=this.y),super.render(),this.div.hidden=!0,this.#mi?this.#Kn():this.#Ti(),this.width&&([i,n]=this.parentDimensions,this.setAt(e*i,t*n,this.width*i,this.height*n))}return this.div}#Kn(){const e=this["div"];let{width:t,height:i}=this.#mi;var[n,r]=this.pageDimensions;if(this.width)t=this.width*n,i=this.height*r;else if(t>.75*n||i>.75*r){const e=Math.min(.75*n/t,.75*r/i);t*=e,i*=e}var[s,o]=this.parentDimensions,s=(this.setDims(t*s/n,i*o/r),this._uiManager.enableWaiting(!1),this.#Ai=document.createElement("canvas"));e.append(s),e.hidden=!1,this.#Pi(t,i),this.#Yn(),this.#xi||(this.parent.addUndoableEditor(this),this.#xi=!0),this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",subtype:this.editorType,data:{action:"inserted_image"}}}),this.addAltTextButton()}#ki(e,t){var[i,n]=this.parentDimensions;this.width=e/i,this.height=t/n,this.setDims(e,t),this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),(this._initialOptions=null)!==this.#Si&&clearTimeout(this.#Si),this.#Si=setTimeout(()=>{this.#Si=null,this.#Pi(e,t)},200)}#Mi(e,t){const{width:i,height:n}=this.#mi;let r=i,s=n,o=this.#mi;for(;r>2*e||s>2*t;){const i=r,n=s;r>2*e&&(r=16384<=r?Math.floor(r/2)-1:Math.ceil(r/2)),s>2*t&&(s=16384<=s?Math.floor(s/2)-1:Math.ceil(s/2));var a=new OffscreenCanvas(r,s);a.getContext("2d").drawImage(o,0,0,i,n,0,0,r,s),o=a.transferToImageBitmap()}return o}#Pi(e,t){e=Math.ceil(e),t=Math.ceil(t);var i,n=this.#Ai;!n||n.width===e&&n.height===t||(n.width=e,n.height=t,i=this.#Ei?this.#mi:this.#Mi(e,t),(n=n.getContext("2d")).filter=this._uiManager.hcmFilter,n.drawImage(i,0,0,i.width,i.height,0,0,e,t))}#Fi(e){if(e){if(this.#Ei){const e=this._uiManager.imageManager.getSvgUrl(this.#bi);if(e)return e}const e=document.createElement("canvas");return{width:e.width,height:e.height}=this.#mi,e.getContext("2d").drawImage(this.#mi,0,0),e.toDataURL()}if(this.#Ei){const[e,t]=this.pageDimensions,i=Math.round(this.width*e*o.PixelsPerInch.PDF_TO_CSS_UNITS),n=Math.round(this.height*t*o.PixelsPerInch.PDF_TO_CSS_UNITS),r=new OffscreenCanvas(i,n);return r.getContext("2d").drawImage(this.#mi,0,0,this.#mi.width,this.#mi.height,0,0,i,n),r.transferToImageBitmap()}return structuredClone(this.#mi)}#Yn(){this.#zn=new ResizeObserver(e=>{e=e[0].contentRect;e.width&&e.height&&this.#ki(e.width,e.height)}),this.#zn.observe(this.div)}static deserialize(e,t,i){var n,r,s,o;return e instanceof a.StampAnnotationElement?null:(t=super.deserialize(e,t,i),{rect:e,bitmapUrl:n,bitmapId:o,isSvg:r,accessibilityData:s}=e,[i,o]=(o&&i.imageManager.isValidId(o)?t.#bi=o:t.#yi=n,t.#Ei=r,t.pageDimensions),t.width=(e[2]-e[0])/i,t.height=(e[3]-e[1])/o,s&&(t.altTextData=s),t)}serialize(){let e=0e.area&&(e.area=n,e.serialized.bitmap.close(),e.serialized.bitmap=this.#Fi(!1))}}else t.stamps.set(this.#bi,{area:n,serialized:i}),i.bitmap=this.#Fi(!1)}}return i}}t.StampEditor=r}],__webpack_module_cache__={};function __w_pdfjs_require__(e){var t=__webpack_module_cache__[e];return void 0!==t||(t=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e].call(t.exports,t,t.exports,__w_pdfjs_require__)),t.exports}var __webpack_exports__={};return(()=>{var e=__webpack_exports__,t=(Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"AbortException",{enumerable:!0,get:function(){return t.AbortException}}),Object.defineProperty(e,"AnnotationEditorLayer",{enumerable:!0,get:function(){return s.AnnotationEditorLayer}}),Object.defineProperty(e,"AnnotationEditorParamsType",{enumerable:!0,get:function(){return t.AnnotationEditorParamsType}}),Object.defineProperty(e,"AnnotationEditorType",{enumerable:!0,get:function(){return t.AnnotationEditorType}}),Object.defineProperty(e,"AnnotationEditorUIManager",{enumerable:!0,get:function(){return o.AnnotationEditorUIManager}}),Object.defineProperty(e,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(e,"AnnotationMode",{enumerable:!0,get:function(){return t.AnnotationMode}}),Object.defineProperty(e,"CMapCompressionType",{enumerable:!0,get:function(){return t.CMapCompressionType}}),Object.defineProperty(e,"DOMSVGFactory",{enumerable:!0,get:function(){return n.DOMSVGFactory}}),Object.defineProperty(e,"FeatureTest",{enumerable:!0,get:function(){return t.FeatureTest}}),Object.defineProperty(e,"GlobalWorkerOptions",{enumerable:!0,get:function(){return l.GlobalWorkerOptions}}),Object.defineProperty(e,"ImageKind",{enumerable:!0,get:function(){return t.ImageKind}}),Object.defineProperty(e,"InvalidPDFException",{enumerable:!0,get:function(){return t.InvalidPDFException}}),Object.defineProperty(e,"MissingPDFException",{enumerable:!0,get:function(){return t.MissingPDFException}}),Object.defineProperty(e,"OPS",{enumerable:!0,get:function(){return t.OPS}}),Object.defineProperty(e,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(e,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(e,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(e,"PasswordResponses",{enumerable:!0,get:function(){return t.PasswordResponses}}),Object.defineProperty(e,"PermissionFlag",{enumerable:!0,get:function(){return t.PermissionFlag}}),Object.defineProperty(e,"PixelsPerInch",{enumerable:!0,get:function(){return n.PixelsPerInch}}),Object.defineProperty(e,"PromiseCapability",{enumerable:!0,get:function(){return t.PromiseCapability}}),Object.defineProperty(e,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(e,"SVGGraphics",{enumerable:!0,get:function(){return i.SVGGraphics}}),Object.defineProperty(e,"UnexpectedResponseException",{enumerable:!0,get:function(){return t.UnexpectedResponseException}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return t.Util}}),Object.defineProperty(e,"VerbosityLevel",{enumerable:!0,get:function(){return t.VerbosityLevel}}),Object.defineProperty(e,"XfaLayer",{enumerable:!0,get:function(){return h.XfaLayer}}),Object.defineProperty(e,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(e,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return t.createValidAbsoluteUrl}}),Object.defineProperty(e,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(e,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(e,"getPdfFilenameFromUrl",{enumerable:!0,get:function(){return n.getPdfFilenameFromUrl}}),Object.defineProperty(e,"getXfaPageViewport",{enumerable:!0,get:function(){return n.getXfaPageViewport}}),Object.defineProperty(e,"isDataScheme",{enumerable:!0,get:function(){return n.isDataScheme}}),Object.defineProperty(e,"isPdfFile",{enumerable:!0,get:function(){return n.isPdfFile}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(e,"noContextMenu",{enumerable:!0,get:function(){return n.noContextMenu}}),Object.defineProperty(e,"normalizeUnicode",{enumerable:!0,get:function(){return t.normalizeUnicode}}),Object.defineProperty(e,"renderTextLayer",{enumerable:!0,get:function(){return r.renderTextLayer}}),Object.defineProperty(e,"setLayerDimensions",{enumerable:!0,get:function(){return n.setLayerDimensions}}),Object.defineProperty(e,"shadow",{enumerable:!0,get:function(){return t.shadow}}),Object.defineProperty(e,"updateTextLayer",{enumerable:!0,get:function(){return r.updateTextLayer}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return i.version}}),__w_pdfjs_require__(1)),i=__w_pdfjs_require__(124),n=__w_pdfjs_require__(168),r=__w_pdfjs_require__(195),s=__w_pdfjs_require__(196),o=__w_pdfjs_require__(165),a=__w_pdfjs_require__(198),l=__w_pdfjs_require__(176),h=__w_pdfjs_require__(201)})(),__webpack_exports__})()),angular.module("ngPDFViewer",[]).directive("pdfviewer",["$window",function(I){const F=[.5,.75,1,1.25,1.5,2,3];return{restrict:"E",scope:{src:"@"},link:function(e,t){t=t[0];t.classList.add("pdf-viewer");let s=null,o=[],n=!1,i=null,r=1,a=1,l=0,h=0,c=612/792,d=0;const u=document.createElement("div"),p=(u.className="pdf-toolbar",document.createElement("div"));function m(e,t,i){var n=document.createElement("button");return n.type="button",n.className="pdf-toolbar-btn",n.title=t,n.setAttribute("aria-label",t),n.innerHTML='',n.addEventListener("click",i),n}p.className="pdf-pages",p.tabIndex=0,p.setAttribute("aria-label","PDF pages"),t.appendChild(u),t.appendChild(p);const g=m("fa-chevron-up","Previous page",function(){_(a-1)}),f=m("fa-chevron-down","Next page",function(){_(a+1)}),v=document.createElement("input"),y=(v.type="text",v.className="pdf-toolbar-page",v.setAttribute("aria-label","Page number"),v.title="Page number — type a page and press Enter",v.addEventListener("keydown",function(e){"Enter"===e.key&&(_(parseInt(v.value,10)),v.blur())}),v.addEventListener("blur",function(){v.value=String(a)}),document.createElement("span")),b=(y.className="pdf-toolbar-count",m("fa-search-minus","Zoom out",function(){$(F[Math.max(0,S()-1)])})),w=m("fa-search-plus","Zoom in",function(){$(F[Math.min(F.length-1,S()+1)])}),x=document.createElement("button");x.type="button",x.className="pdf-toolbar-btn pdf-toolbar-zoom",x.title="Reset zoom to fit the width",x.setAttribute("aria-label","Reset zoom to fit the width"),x.addEventListener("click",function(){$(1)}),u.appendChild(g),u.appendChild(f);t=document.createElement("span"),t.className="pdf-toolbar-group",t.appendChild(v),t.appendChild(y),u.appendChild(t),t=document.createElement("span");function S(){let t=0;for(let e=0;e=e,x.textContent=Math.round(100*r)+"%",b.disabled=0===S(),w.disabled=S()===F.length-1}function k(e){e=o[e-1];e&&(p.scrollTop+=e.getBoundingClientRect().top-p.getBoundingClientRect().top)}function _(e){s&&!isNaN(e)&&(e=Math.min(Math.max(1,e),s.numPages),o[e-1])&&(k(e),a=e,l=e,h=Date.now()+800,A(),E())}function C(){d++,i&&(clearTimeout(i),i=null),s&&(s.destroy(),s=null),o=[],a=1,p.innerHTML="",A()}function T(){var e=Math.max(120,p.clientWidth-24);return Math.round(Math.min(e,1e3)*r)}function E(){if(s){const a=d;var e=p.getBoundingClientRect();const i=e.top-400,n=e.top+p.clientHeight+400;o.forEach(function(o,e){var t;o.dataset.state||(t=o.getBoundingClientRect()).top>n||t.bottom'),i.srcdoc=e+t}}s.classList.add("html-doc"),r.$watch("content",t),r.$watch("baseUrl",t),r.$watch("allowScripts",t)}}}]),!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){"use strict";var D={d:function(e,t){for(var i in t)D.o(t,i)&&!D.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};D.d(t,{default:function(){return _n}});class O{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let i,n,r="KaTeX parse error: "+e;var s=t&&t.loc;if(s&&s.start<=s.end){const e=s.lexer.input,t=(i=s.start,n=s.end,i===e.length?r+=" at end of input: ":r+=" at position "+(i+1)+": ",e.slice(i,n).replace(/[^]/g,"$&̲"));var s=15":">","<":"<",'"':""","'":"'"},H=/[&><"']/g;var C={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(H,e=>z[e])},hyphenate:function(e){return e.replace(B,"-$1").toLowerCase()},getBaseElem:N,isCharacterBox:function(e){e=N(e);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return e?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};const U={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 "},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 ",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 ",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 ",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 ",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 ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class W{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const i in U){var t;U.hasOwnProperty(i)&&(t=U[i],this[i]=void 0!==e[i]?t.processor?t.processor(e[i]):e[i]:function(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(t))}}reportNonstrict(e,t,i){let n=this.strict;if((n="function"==typeof n?n(e,t,i):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new _("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"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,i){let n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){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+"]"):"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){const t=C.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class q{constructor(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}sup(){return V[j[this.id]]}sub(){return V[G[this.id]]}fracNum(){return V[K[this.id]]}fracDen(){return V[X[this.id]]}cramp(){return V[Y[this.id]]}text(){return V[Q[this.id]]}isTight(){return 2<=this.size}}const V=[new q(0,0,!1),new q(1,0,!0),new q(2,1,!1),new q(3,1,!0),new q(4,2,!1),new q(5,2,!0),new q(6,3,!1),new q(7,3,!0)],j=[4,5,4,5,6,7,6,7],G=[5,5,5,5,7,7,7,7],K=[2,3,4,5,6,7,6,7],X=[3,3,5,5,7,7,7,7],Y=[1,1,3,3,5,5,7,7],Q=[0,1,2,3,2,3,2,3];var T={DISPLAY:V[0],TEXT:V[2],SCRIPT:V[4],SCRIPTSCRIPT:V[6]};const J=[{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]]}],Z=[];function ee(t){for(let e=0;e=Z[e]&&t<=Z[e+1])return 1}J.forEach(e=>e.blocks.forEach(e=>Z.push(...e)));const te={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 ie{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 C.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;ee.toText()).join("")}}var ne={"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]}};const re={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]},se={"Å":"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 oe(e,t,i){if(!ne[t])throw new Error("Font metrics not found for font: "+t+".");let n=e.charCodeAt(0),r=ne[t][n];if(!r&&e[0]in se&&(n=se[e[0]].charCodeAt(0),r=ne[t][n]),r||"text"!==i||ee(n)&&(r=ne[t][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}function ae(e,t){return t.size<2?e:he[e-1][t.size-1]}const le={},he=[[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]],ce=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class de{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||de.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=ce[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(const i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return new de(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ae(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:ce[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=ae(de.BASESIZE,e);return this.size===t&&this.textSize===de.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let 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!==de.BASESIZE?["sizing","reset-size"+this.size,"size"+de.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t=5<=e?0:3<=e?1:2;if(!le[t]){const e=le[t]={cssEmPerMu:re.quad[t]/18};for(const i in re)re.hasOwnProperty(i)&&(e[i]=re[i][t])}return le[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}de.BASESIZE=6;var ue=de;function pe(e){return(e="string"!=typeof e?e.unit:e)in ye||e in be||"ex"===e}function E(e,t){let i;if(e.unit in ye)i=ye[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)i=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new _("Invalid unit: '"+e.unit+"'");i=n.fontMetrics().quad}n!==t&&(i*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)}function me(e){return e.filter(e=>e).join(" ")}function ge(e,t,i){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=i||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}}function fe(e){var t=document.createElement(e);t.className=me(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e"}const ye={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},be={ex:!0,em:!0,mu:!0},M=function(e){return+e.toFixed(4)+"em"};class we{constructor(e,t,i,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,ge.call(this,e,i,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return C.contains(this.classes,e)}toNode(){return fe.call(this,"span")}toMarkup(){return ve.call(this,"span")}}class xe{constructor(e,t,i,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,ge.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return C.contains(this.classes,e)}toNode(){return fe.call(this,"a")}toMarkup(){return ve.call(this,"a")}}class Se{constructor(e,t,i){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=i}hasClass(e){return C.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=''+C.escape(this.alt)+'=n[0]&&t<=n[1])return i.name}}return null}(this.text.charCodeAt(0));e&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=Ae[this.text])}hasClass(e){return C.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0")+n+"":n}}class ke{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e':''}}class Ce{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="","\\gt",!0),i(n,s,p,"∈","\\in",!0),i(n,s,p,"","\\@not"),i(n,s,p,"⊂","\\subset",!0),i(n,s,p,"⊃","\\supset",!0),i(n,s,p,"⊆","\\subseteq",!0),i(n,s,p,"⊇","\\supseteq",!0),i(n,e,p,"⊈","\\nsubseteq",!0),i(n,e,p,"⊉","\\nsupseteq",!0),i(n,s,p,"⊨","\\models"),i(n,s,p,"←","\\leftarrow",!0),i(n,s,p,"≤","\\le"),i(n,s,p,"≤","\\leq",!0),i(n,s,p,"<","\\lt",!0),i(n,s,p,"→","\\rightarrow",!0),i(n,s,p,"→","\\to"),i(n,e,p,"≱","\\ngeq",!0),i(n,e,p,"≰","\\nleq",!0),i(n,s,g," ","\\ "),i(n,s,g," ","\\space"),i(n,s,g," ","\\nobreakspace"),i(r,s,g," ","\\ "),i(r,s,g," "," "),i(r,s,g," ","\\space"),i(r,s,g," ","\\nobreakspace"),i(n,s,g,null,"\\nobreak"),i(n,s,g,null,"\\allowbreak"),i(n,s,Le,",",","),i(n,s,Le,";",";"),i(n,e,a,"⊼","\\barwedge",!0),i(n,e,a,"⊻","\\veebar",!0),i(n,s,a,"⊙","\\odot",!0),i(n,s,a,"⊕","\\oplus",!0),i(n,s,a,"⊗","\\otimes",!0),i(n,s,f,"∂","\\partial",!0),i(n,s,a,"⊘","\\oslash",!0),i(n,e,a,"⊚","\\circledcirc",!0),i(n,e,a,"⊡","\\boxdot",!0),i(n,s,a,"△","\\bigtriangleup"),i(n,s,a,"▽","\\bigtriangledown"),i(n,s,a,"†","\\dagger"),i(n,s,a,"⋄","\\diamond"),i(n,s,a,"⋆","\\star"),i(n,s,a,"◃","\\triangleleft"),i(n,s,a,"▹","\\triangleright"),i(n,s,u,"{","\\{"),i(r,s,f,"{","\\{"),i(r,s,f,"{","\\textbraceleft"),i(n,s,l,"}","\\}"),i(r,s,f,"}","\\}"),i(r,s,f,"}","\\textbraceright"),i(n,s,u,"{","\\lbrace"),i(n,s,l,"}","\\rbrace"),i(n,s,u,"[","\\lbrack",!0),i(r,s,f,"[","\\lbrack",!0),i(n,s,l,"]","\\rbrack",!0),i(r,s,f,"]","\\rbrack",!0),i(n,s,u,"(","\\lparen",!0),i(n,s,l,")","\\rparen",!0),i(r,s,f,"<","\\textless",!0),i(r,s,f,">","\\textgreater",!0),i(n,s,u,"⌊","\\lfloor",!0),i(n,s,l,"⌋","\\rfloor",!0),i(n,s,u,"⌈","\\lceil",!0),i(n,s,l,"⌉","\\rceil",!0),i(n,s,f,"\\","\\backslash"),i(n,s,f,"∣","|"),i(n,s,f,"∣","\\vert"),i(r,s,f,"|","\\textbar",!0),i(n,s,f,"∥","\\|"),i(n,s,f,"∥","\\Vert"),i(r,s,f,"∥","\\textbardbl"),i(r,s,f,"~","\\textasciitilde"),i(r,s,f,"\\","\\textbackslash"),i(r,s,f,"^","\\textasciicircum"),i(n,s,p,"↑","\\uparrow",!0),i(n,s,p,"⇑","\\Uparrow",!0),i(n,s,p,"↓","\\downarrow",!0),i(n,s,p,"⇓","\\Downarrow",!0),i(n,s,p,"↕","\\updownarrow",!0),i(n,s,p,"⇕","\\Updownarrow",!0),i(n,s,c,"∐","\\coprod"),i(n,s,c,"⋁","\\bigvee"),i(n,s,c,"⋀","\\bigwedge"),i(n,s,c,"⨄","\\biguplus"),i(n,s,c,"⋂","\\bigcap"),i(n,s,c,"⋃","\\bigcup"),i(n,s,c,"∫","\\int"),i(n,s,c,"∫","\\intop"),i(n,s,c,"∬","\\iint"),i(n,s,c,"∭","\\iiint"),i(n,s,c,"∏","\\prod"),i(n,s,c,"∑","\\sum"),i(n,s,c,"⨂","\\bigotimes"),i(n,s,c,"⨁","\\bigoplus"),i(n,s,c,"⨀","\\bigodot"),i(n,s,c,"∮","\\oint"),i(n,s,c,"∯","\\oiint"),i(n,s,c,"∰","\\oiiint"),i(n,s,c,"⨆","\\bigsqcup"),i(n,s,c,"∫","\\smallint"),i(r,s,$e,"…","\\textellipsis"),i(n,s,$e,"…","\\mathellipsis"),i(r,s,$e,"…","\\ldots",!0),i(n,s,$e,"…","\\ldots",!0),i(n,s,$e,"⋯","\\@cdots",!0),i(n,s,$e,"⋱","\\ddots",!0),i(n,s,f,"⋮","\\varvdots"),i(n,s,o,"ˊ","\\acute"),i(n,s,o,"ˋ","\\grave"),i(n,s,o,"¨","\\ddot"),i(n,s,o,"~","\\tilde"),i(n,s,o,"ˉ","\\bar"),i(n,s,o,"˘","\\breve"),i(n,s,o,"ˇ","\\check"),i(n,s,o,"^","\\hat"),i(n,s,o,"⃗","\\vec"),i(n,s,o,"˙","\\dot"),i(n,s,o,"˚","\\mathring"),i(n,s,h,"","\\@imath"),i(n,s,h,"","\\@jmath"),i(n,s,f,"ı","ı"),i(n,s,f,"ȷ","ȷ"),i(r,s,f,"ı","\\i",!0),i(r,s,f,"ȷ","\\j",!0),i(r,s,f,"ß","\\ss",!0),i(r,s,f,"æ","\\ae",!0),i(r,s,f,"œ","\\oe",!0),i(r,s,f,"ø","\\o",!0),i(r,s,f,"Æ","\\AE",!0),i(r,s,f,"Œ","\\OE",!0),i(r,s,f,"Ø","\\O",!0),i(r,s,o,"ˊ","\\'"),i(r,s,o,"ˋ","\\`"),i(r,s,o,"ˆ","\\^"),i(r,s,o,"˜","\\~"),i(r,s,o,"ˉ","\\="),i(r,s,o,"˘","\\u"),i(r,s,o,"˙","\\."),i(r,s,o,"¸","\\c"),i(r,s,o,"˚","\\r"),i(r,s,o,"ˇ","\\v"),i(r,s,o,"¨",'\\"'),i(r,s,o,"˝","\\H"),i(r,s,o,"◯","\\textcircled");const Ie={"--":!0,"---":!0,"``":!0,"''":!0};i(r,s,f,"–","--",!0),i(r,s,f,"–","\\textendash"),i(r,s,f,"—","---",!0),i(r,s,f,"—","\\textemdash"),i(r,s,f,"‘","`",!0),i(r,s,f,"‘","\\textquoteleft"),i(r,s,f,"’","'",!0),i(r,s,f,"’","\\textquoteright"),i(r,s,f,"“","``",!0),i(r,s,f,"“","\\textquotedblleft"),i(r,s,f,"”","''",!0),i(r,s,f,"”","\\textquotedblright"),i(n,s,f,"°","\\degree",!0),i(r,s,f,"°","\\degree"),i(r,s,f,"°","\\textdegree",!0),i(n,s,f,"£","\\pounds"),i(n,s,f,"£","\\mathsterling",!0),i(r,s,f,"£","\\pounds"),i(r,s,f,"£","\\textsterling",!0),i(n,e,f,"✠","\\maltese"),i(r,e,f,"✠","\\maltese");var Fe='0123456789/@."';for(let e=0;ei&&(i=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}t.height=i,t.depth=n,t.maxFontSize=r}function y(e,t,i,n){return e=new we(e,t,i,n),Be(e),e}function ze(e){return e=new ie(e),Be(e),e}function He(e,t,i){let 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"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}const Ue=[["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"]],We=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],qe=(e,t,i,n)=>new we(e,t,i,n),Ve={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"}},je={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var R={fontMap:Ve,makeSymbol:Ne,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&Oe(e,"Main-Bold",t).metrics?Ne(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===d[t][e].font?Ne(e,"Main-Regular",t,i,n):Ne(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},makeSpan:y,makeSvgSpan:qe,makeLineSpan:function(e,t,i){e=y([e],[],t);return e.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=M(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,i,n){e=new xe(e,t,i,n);return Be(e),e},makeFragment:ze,wrapFragment:function(e,t){return e instanceof ie?y([],[e],t):e},makeVList:function(t,i){const{children:n,depth:r}=function(i){if("individualShift"===i.positionType){const s=i.children,a=[s[0]],l=-s[0].shift-s[0].elem.depth;let t=l;for(let e=1;e{var i=y(["mspace"],[],t),e=E(e,t);return i.style.marginRight=M(e),i},staticSvg:function(e,t){var[e,i,n]=je[e],e=new _e(e),e=new ke([e],{width:M(i),height:M(n),style:"width:"+M(i),viewBox:"0 0 "+1e3*i+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),e=qe(["overlay"],[e],t);return e.height=n,e.style.height=M(n),e.style.width=M(i),e},svgData:je,tryCombineChars:t=>{for(let e=0;e{if(me(e.classes)!==me(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const i in e.style)if(e.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;for(const n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0})(i,n)&&(i.text+=n.text,i.height=Math.max(i.height,n.height),i.depth=Math.max(i.depth,n.depth),i.italic=n.italic,t.splice(e+1,1),e--)}return t}};const b={number:3,unit:"mu"},Ge={number:4,unit:"mu"},Ke={number:5,unit:"mu"},Xe={mord:{mop:b,mbin:Ge,mrel:Ke,minner:b},mop:{mord:b,mop:b,mrel:Ke,minner:b},mbin:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mrel:{mord:Ke,mop:Ke,mopen:Ke,minner:Ke},mopen:{},mclose:{mop:b,mbin:Ge,mrel:Ke,minner:b},mpunct:{mord:b,mop:b,mrel:Ke,mopen:b,mclose:b,mpunct:b,minner:b},minner:{mord:b,mop:b,mbin:Ge,mrel:Ke,mopen:b,mpunct:b,minner:b}},Ye={mord:{mop:b},mop:{mord:b,mop:b},mbin:{},mrel:{},mopen:{},mclose:{mop:b},mpunct:{},minner:{mop:b}},Qe={},Je={},Ze={};function w(e){var{type:e,names:t,props:i,handler:n,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:i.numArgs,argTypes:i.argTypes,allowedInArgument:!!i.allowedInArgument,allowedInText:!!i.allowedInText,allowedInMath:void 0===i.allowedInMath||i.allowedInMath,numOptionalArgs:i.numOptionalArgs||0,infix:!!i.infix,primitive:!!i.primitive,handler:n};for(let e=0;e{var i=t.classes[0],n=e.classes[0];"mbin"===i&&C.contains(st,n)?t.classes[0]="mord":"mbin"===n&&C.contains(rt,i)&&(e.classes[0]="mord")},{node:o},r,e),lt(s,(e,t)=>{var t=dt(t),i=dt(e),e=t&&i?(e.hasClass("mtight")?Ye:Xe)[t][i]:null;if(e)return R.makeGlue(e,n)},{node:o},r,e)}return s}function it(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),nt(t.concat(e))}const nt=R.makeSpan,rt=["leftmost","mbin","mopen","mrel","mop","mpunct"],st=["rightmost","mrel","mclose","mpunct"],ot={display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT},at={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lt=function(i,e,t,n,r){n&&i.push(n);let s=0;for(;se=>{i.splice(t+1,0,e),s++})(s)}}n&&i.pop()},ht=function(e){return e instanceof ie||e instanceof xe||e instanceof we&&e.hasClass("enclosing")?e:null},ct=function(e,t){var i=ht(e);if(i){const e=i.children;if(e.length){if("right"===t)return ct(e[e.length-1],"right");if("left"===t)return ct(e[0],"left")}}return e},dt=function(e,t){return e&&(t&&(e=ct(e,t)),at[e.classes[0]])||null},L=function(t,i,n){if(!t)return nt();if(Je[t.type]){let e=Je[t.type](t,i);if(n&&i.size!==n.size){e=nt(i.sizingClasses(n),[e],i);const t=i.sizeMultiplier/n.sizeMultiplier;e.height*=t,e.depth*=t}return e}throw new _("Got group of unknown type: '"+t.type+"'")};function ut(e,t){e=nt(["base"],e,t),t=nt(["strut"]);return t.style.height=M(e.height+e.depth),e.depth&&(t.style.verticalAlign=M(-e.depth)),e.children.unshift(t),e}function pt(e,i){let t=null;1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body);var n=$(e,i,"root");let r;2===n.length&&n[1].hasClass("tag")&&(r=n.pop());var s=[];let o,a=[];for(let t=0;t"}toText(){return this.children.map(e=>e.toText()).join("")}}class gt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return C.escape(this.toText())}toText(){return this.text}}var A={MathNode:S,TextNode:gt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",M(this.width)),e)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},newDocumentFragment:mt};function ft(e,t,i){return!d[t][e]||!d[t][e].replace||55349===e.charCodeAt(0)||Ie.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.slice(4,6)||i.font&&"tt"===i.font.slice(4,6))||(e=d[t][e].replace),new A.TextNode(e)}function vt(e){return 1===e.length?e[0]:new A.MathNode("mrow",e)}function yt(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";if(!(t=t.font)||"mathnormal"===t)return null;var i=e.mode;if("mathit"===t)return"italic";if("boldsymbol"===t)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===t)return"bold";if("mathbb"===t)return"double-struck";if("mathfrak"===t)return"fraktur";if("mathscr"===t||"mathcal"===t)return"script";if("mathsf"===t)return"sans-serif";if("mathtt"===t)return"monospace";let n=e.text;return!C.contains(["\\imath","\\jmath"],n)&&oe(n=d[i][n]&&d[i][n].replace?d[i][n].replace:n,R.fontMap[t].fontName,i)?R.fontMap[t].variant:null}function k(t,i,e){if(1===t.length){const n=I(t[0],i);return e&&n instanceof S&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let r;for(let e=0;e{let e,s,o;n&&"supsub"===n.type?(s=F(n.base,"accent"),e=s.base,n.base=e,o=function(e){if(e instanceof we)return e;throw new Error("Expected span but got "+String(e)+".")}(L(n,r)),n.base=s):(s=F(n,"accent"),e=s.base);n=L(e,r.havingCrampedStyle());let a=0;if(s.isShifty&&C.isCharacterBox(e)){const n=C.getBaseElem(e);a=Te(L(n,r.havingCrampedStyle())).skew}var l="\\c"===s.label;let h,c=l?n.height+n.depth:Math.min(n.height,r.fontMetrics().xHeight);if(s.isStretchy)h=Ct(s,r),h=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:0{var i=e.isStretchy?_t(e.label):new A.MathNode("mo",[ft(e.label,e.mode)]),e=new A.MathNode("mover",[I(e.base,t),i]);return e.setAttribute("accent","true"),e},$t=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),Lt=(w({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 t=tt(t[0]),i=!$t.test(e.funcName),n=!i||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:i,isShifty:n,base:t}},htmlBuilder:Mt,mathmlBuilder:Rt}),w({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let i=e.parser.mode;return"math"===i&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),i="text"),{type:"accent",mode:i,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Mt,mathmlBuilder:Rt}),w({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:i}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:i,base:t}},htmlBuilder:(e,t)=>{var i=L(e.base,t),n=Ct(e,t),e="\\utilde"===e.label?.12:0,n=R.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:i}]},t);return R.makeSpan(["mord","accentunder"],[n],t)},mathmlBuilder:(e,t)=>{var i=_t(e.label),e=new A.MathNode("munder",[I(e.base,t),i]);return e.setAttribute("accentunder","true"),e}}),e=>{e=new A.MathNode("mpadded",e?[e]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),It=(w({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,i){var{parser:e,funcName:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:i[0]}},htmlBuilder(e,t){var i=t.style,n=t.havingStyle(i.sup()),r=R.wrapFragment(L(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let o;r.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(i.sub()),(o=R.wrapFragment(L(e.below,n,t),t)).classes.push(s+"-arrow-pad"));i=Ct(e,t),n=-t.fontMetrics().axisHeight+.5*i.height;let a,l=-t.fontMetrics().axisHeight-.5*i.height-.111;if((.25{e="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family},Ot=(w({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){e=e.parser;return{type:"mclass",mode:e.mode,mclass:Dt(t[0]),body:x(t[1]),isCharacterBox:C.isCharacterBox(t[1])}}}),w({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:i}=e,n=t[1],t=t[0],r="\\stackrel"!==i?Dt(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==i,body:x(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===i?null:t,sub:"\\underset"===i?t:null};return{type:"mclass",mode:e.mode,mclass:r,body:[n],isCharacterBox:C.isCharacterBox(n)}},htmlBuilder:Ft,mathmlBuilder:Pt}),w({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"pmb",mode:e.mode,mclass:Dt(t[0]),body:x(t[0])}},htmlBuilder(e,t){var i=$(e.body,t,!0),e=R.makeSpan([e.mclass],i,t);return e.style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){e=k(e.body,t),t=new A.MathNode("mstyle",e);return t.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),Nt=e=>"textord"===e.type&&"@"===e.text;w({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:i}=e;return{type:"cdlabel",mode:e.mode,side:i.slice(4),label:t[0]}},htmlBuilder(e,t){var i=t.havingStyle(t.style.sup()),i=R.wrapFragment(L(e.label,i,t),t);return i.classes.push("cd-label-"+e.side),i.style.bottom=M(.8-i.depth),i.height=0,i.depth=0,i},mathmlBuilder(e,t){let i=new A.MathNode("mrow",[I(e.label,t)]);return(i=new A.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new A.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),w({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){e=e.parser;return{type:"cdlabelparent",mode:e.mode,fragment:t[0]}},htmlBuilder(e,t){e=R.wrapFragment(L(e.fragment,t),t);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new A.MathNode("mrow",[I(e.fragment,t)])}}),w({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e["parser"],i=F(t[0],"ordgroup").body;let n="";for(let e=0;e>10),56320+(1023&s))),{type:"textord",mode:e.mode,text:r}}});g=(e,t)=>{t=$(e.body,t.withColor(e.color),!1);return R.makeFragment(t)},Le=(e,t)=>{t=k(e.body,t.withColor(e.color)),t=new A.MathNode("mstyle",t);return t.setAttribute("mathcolor",e.color),t};w({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e["parser"],i=F(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:i,body:x(t)}},htmlBuilder:g,mathmlBuilder:Le}),w({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:i}=e,t=F(t[0],"color-token").color,i=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,i));return{type:"color",mode:e.mode,color:t,body:i}},htmlBuilder:g,mathmlBuilder:Le}),w({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,i){var e=e["parser"],n="["===e.gullet.future().text?e.parseSizeGroup(!0):null,r=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:r,size:n&&F(n,"size").value}},htmlBuilder(e,t){var i=R.makeSpan(["mspace"],[],t);return e.newLine&&(i.classes.push("newline"),e.size)&&(i.style.marginTop=M(E(e.size,t))),i},mathmlBuilder(e,t){var i=new A.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size)&&i.setAttribute("height",M(E(e.size,t))),i}});function Bt(e,t,i){if(i=oe(d.math[e]&&d.math[e].replace||e,t,i))return i;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function zt(e,t,i,n){return t=i.havingBaseStyle(t),n=R.makeSpan(n.concat(t.sizingClasses(i)),[e],i),e=t.sizeMultiplier/i.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n}function Ht(e,t,i){i=t.havingBaseStyle(i),i=(1-t.sizeMultiplier/i.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=M(i),e.height-=i,e.depth+=i}function Ut(e,t,i,n,r,s){return e=R.makeSymbol(e,"Size"+t+"-Regular",r,n),r=zt(R.makeSpan(["delimsizing","size"+t],[e],n),T.TEXT,n,s),i&&Ht(r,n,T.TEXT),r}function Wt(e,t,i){return{type:"elem",elem:R.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[R.makeSpan([],[R.makeSymbol(e,t,i)])])}}function qt(e,t,i){var n=(ne["Size4-Regular"][e.charCodeAt(0)]?ne["Size4-Regular"]:ne["Size1-Regular"])[e.charCodeAt(0)][4],e=new _e("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))),e=new ke([e],{width:M(n),height:M(t),style:"width:"+M(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=R.makeSvgSpan([],[e],i)).height=t,e.style.height=M(t),e.style.width=M(n),{type:"elem",elem:e}}function Vt(e,t,i,n,r,s){let o,a,l,h,c="",d=0,u=(o=l=h=e,a=null,"Size1-Regular");"\\uparrow"===e?l=h="⏐":"\\Uparrow"===e?l=h="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",h="\\Downarrow"):C.contains(Zt,e)?(l="∣",c="vert",d=333):C.contains(ei,e)?(l="∥",c="doublevert",d=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",h="⎣",u="Size4-Regular",c="lbrack",d=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",h="⎦",u="Size4-Regular",c="rbrack",d=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",h="⎣",u="Size4-Regular",c="lfloor",d=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=h="⎢",u="Size4-Regular",c="lceil",d=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",h="⎦",u="Size4-Regular",c="rfloor",d=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=h="⎥",u="Size4-Regular",c="rceil",d=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",h="⎝",u="Size4-Regular",c="lparen",d=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",h="⎠",u="Size4-Regular",c="rparen",d=875):"\\{"===e||"\\lbrace"===e?(o="⎧",a="⎨",h="⎩",l="⎪",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",a="⎬",h="⎭",l="⎪",u="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",h="⎩",l="⎪",u="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",h="⎭",l="⎪",u="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",h="⎭",l="⎪",u="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",h="⎩",l="⎪",u="Size4-Regular");var e=Bt(o,u,r),p=e.height+e.depth,e=Bt(l,u,r),e=e.height+e.depth,m=(m=Bt(h,u,r)).height+m.depth;let g=0,f=1;if(null!==a){const e=Bt(a,u,r);g=e.height+e.depth,f=2}var v=(v=p+m+g)+Math.max(0,Math.ceil((t-v)/(f*e)))*f*e;let y=n.fontMetrics().axisHeight;i&&(y*=n.sizeMultiplier);var t=v/2-y,b=[];if(0n)return r[t]}return r[r.length-1]}function Kt(e,t,i,n,r,s){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),d=C.contains(ni,e)?si:C.contains(ti,e)?ai:oi;var o,a,l,h,c,d=Gt(e,t,d,n);return"small"===d.type?(o=e,a=d.style,l=i,h=n,c=s,o=R.makeSymbol(o,"Main-Regular",r,h),o=zt(o,a,h,c),l&&Ht(o,h,a),o):"large"===d.type?Ut(e,d.size,i,n,r,s):Vt(e,t,i,n,r,s)}const Xt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Yt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new _("Expected a control sequence",e);return t},Qt=(e,t,i,n)=>{let r=e.gullet.macros.get(i.text);null==r&&(i.noexpand=!0,r={tokens:[i],numArgs:0,unexpandable:!e.gullet.isExpandable(i.text)}),e.gullet.macros.set(t,r,n)},Jt=(w({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,i=(e.consumeSpaces(),e.fetch());if(Xt[i.text])return"\\global"!==t&&"\\\\globallong"!==t||(i.text=Xt[i.text]),F(e.parseFunction(),"internal");throw new _("Invalid token after macro prefix",i)}}),w({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:i}=e,n=t.gullet.popToken();e=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new _("Expected a control sequence",n);let r,s=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),o[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new _('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new _('Argument number "'+n.text+'" out of order');s++,o.push([])}else{if("EOF"===n.text)throw new _("Expected a macro definition");o[s].push(n.text)}let a=t.gullet.consumeArg()["tokens"];return r&&a.unshift(r),"\\edef"!==i&&"\\xdef"!==i||(a=t.gullet.expandTokens(a)).reverse(),t.gullet.macros.set(e,{tokens:a,numArgs:s,delimiters:o},i===Xt[i]),{type:"internal",mode:t.mode}}}),w({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,i=Yt(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Qt(e,i,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),w({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,i=Yt(e.gullet.popToken()),n=e.gullet.popToken(),r=e.gullet.popToken();return Qt(e,i,r,"\\\\globalfuture"===t),e.gullet.pushToken(r),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Zt=["|","\\lvert","\\rvert","\\vert"],ei=["\\|","\\lVert","\\rVert","\\Vert"],ti=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],ii=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],ni=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ri=[0,1.2,1.8,2.4,3],si=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],oi=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"stack"}],ai=[{type:"small",style:T.SCRIPTSCRIPT},{type:"small",style:T.SCRIPT},{type:"small",style:T.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var li={sqrtImage:function(e,t){var i=t.havingBaseSizing(),n=Gt("\\surd",e*i.sizeMultiplier,ai,i);let r=i.sizeMultiplier;i=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let s,o,a=0,l=0,h=0;return o="small"===n.type?(h=1e3+1e3*i+80,e<1?r=1:e<1.4&&(r=.7),a=(1+i+.08)/r,l=(1+i)/r,(s=jt("sqrtMain",a,h,i,t)).style.minWidth="0.853em",.833/r):"large"===n.type?(h=1080*ri[n.size],l=(ri[n.size]+i)/r,a=(ri[n.size]+i+.08)/r,(s=jt("sqrtSize"+n.size,a,h,i,t)).style.minWidth="1.02em",1/r):(a=e+i+.08,l=e+i,h=Math.floor(1e3*e+i)+80,(s=jt("sqrtTall",a,h,i,t)).style.minWidth="0.742em",1.056),s.height=l,s.style.height=M(a),{span:s,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+i)*r}},sizedDelim:function(e,t,i,n,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),C.contains(ti,e)||C.contains(ni,e))return Ut(e,t,!1,i,n,r);if(C.contains(ii,e))return Vt(e,ri[t],!1,i,n,r);throw new _("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:ri,customSizedDelim:Kt,leftRightDelim:function(e,t,i,n,r,s){var o=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,t=Math.max(t-o,i+o),i=Math.max(t/500*901,2*t-a);return Kt(e,i,!0,n,r,s)}};const hi={"\\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}},ci=["(","\\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 di(e,t){var i=Et(e);if(i&&C.contains(ci,i.text))return i;throw new _(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function ui(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}w({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)=>{t=di(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hi[e.funcName].size,mclass:hi[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,t)=>"."===e.delim?R.makeSpan([e.mclass]):li.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(ft(e.delim,e.mode)),new A.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),M(li.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),w({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new _("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:di(t[0],e).text,color:i}}}),w({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=di(t[0],e),e=e.parser,i=(++e.leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),F(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:i,left:t.text,right:n.delim,rightColor:n.color}},htmlBuilder:(t,e)=>{ui(t);const i=$(t.body,e,!0,["mopen","mclose"]);let n,r,s=0,o=0,a=!1;for(let e=0;e{ui(e);var i=k(e.body,t);if("."!==e.left){const t=new A.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),i.unshift(t)}if("."!==e.right){const t=new A.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),i.push(t)}return vt(i)}}),w({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{t=di(t[0],e);if(e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new _("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let i;return"."===e.delim?i=it(t,[]):(i=li.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},i.isMiddle=e),i},mathmlBuilder:(e,t)=>{e="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),e=new A.MathNode("mo",[e]);return e.setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e}});a=(n,r)=>{const s=R.wrapFragment(L(n.body,r),r),o=n.label.slice(1);let a,e=r.sizeMultiplier,l=0;const h=C.isCharacterBox(n.body);if("sout"===o)(a=R.makeSpan(["stretchy","sout"])).height=r.fontMetrics().defaultRuleThickness/e,l=-.5*r.fontMetrics().xHeight;else if("phase"===o){const n=E({number:.6,unit:"pt"},r),o=E({number:.35,unit:"ex"},r),h=(e/=r.havingBaseSizing().sizeMultiplier,s.height+s.depth+n+o),C=(s.style.paddingLeft=M(h/2+n),Math.floor(1e3*h*e)),t="M400000 "+C+" H0 L"+C/2+" 0 l65 45 L145 "+(C-80)+" H400000z",i=new ke([new _e("phase",t)],{width:"400em",height:M(C/1e3),viewBox:"0 0 400000 "+C,preserveAspectRatio:"xMinYMin slice"});(a=R.makeSvgSpan(["hide-tail"],[i],r)).style.height=M(h),l=s.depth+n+o}else{/cancel/.test(o)?h||s.classes.push("cancel-pad"):"angl"===o?s.classes.push("anglpad"):s.classes.push("boxpad");let e=0,t=0,i=0;t=/box/.test(o)?(i=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),e=r.fontMetrics().fboxsep+("colorbox"===o?0:i)):"angl"===o?(i=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),e=4*i,Math.max(0,.25-s.depth)):e=h?.2:0,a=function(e,t,i,n,r){let s;n=e.height+e.depth+i+n;if(/fbox|color|angl/.test(t)){if(s=R.makeSpan(["stretchy",t],[],r),"fbox"===t){const e=r.color&&r.getColor();e&&(s.style.borderColor=e)}}else{const e=[],i=(/^[bx]cancel$/.test(t)&&e.push(new Ce({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new Ce({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),new ke(e,{width:"100%",height:M(n)}));s=R.makeSvgSpan([],[i],r)}return s.height=n,s.style.height=M(n),s}(s,o,e,t,r),/fbox|boxed|fcolorbox/.test(o)?(a.style.borderStyle="solid",a.style.borderWidth=M(i)):"angl"===o&&.049!==i&&(a.style.borderTopWidth=M(i),a.style.borderRightWidth=M(i)),l=s.depth+t,n.backgroundColor&&(a.style.backgroundColor=n.backgroundColor,n.borderColor)&&(a.style.borderColor=n.borderColor)}let t;if(n.backgroundColor)t=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:0}]},r);else{const n=/cancel|phase/.test(o)?["svg-align"]:[];t=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:n}]},r)}return/cancel/.test(o)&&(t.height=s.height,t.depth=s.depth),/cancel/.test(o)&&!h?R.makeSpan(["mord","cancel-lap"],[t],r):R.makeSpan(["mord"],[t],r)},u=(e,t)=>{let i=0;var n=new A.MathNode(-1{if(!e.parser.settings.displayMode)throw new _("{"+e.envName+"} can be used only in display mode.")};function wi(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function xi(t,e,i){let{hskipBeforeAndAfter:n,addJot:r,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:h,emptySingleRow:c,maxNumCols:d,leqno:u}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){const e=t.gullet.expandMacroAsText("\\arraystretch");if(null==e)o=1;else if(!(o=parseFloat(e))||o<0)throw new _("Invalid \\arraystretch: "+e)}t.gullet.beginGroup();let p=[];const m=[p],g=[],f=[],v=null!=l?[]:void 0;function y(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function b(){v&&(t.gullet.macros.get("\\df@tag")?(v.push(t.subparse([new vi("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):v.push(Boolean(l)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(y(),f.push(yi(t));;){let e=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),e={type:"ordgroup",mode:t.mode,body:e},i&&(e={type:"styling",mode:t.mode,style:i,body:[e]}),p.push(e);const n=t.fetch().text;if("&"===n){if(d&&p.length===d){if(h||a)throw new _("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===n){b(),1===p.length&&"styling"===e.type&&0===e.body[0].body.length&&(1e))for(s=0;s=h)){(0e.length));return n.cols=new Array(r).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:Ai,mathmlBuilder:ki}),mi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){e=xi(e.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Ai,mathmlBuilder:ki}),mi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){t=(Et(t[0])?[t[0]]:F(t[0],"ordgroup").body).map(function(e){var t=Tt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new _("Unknown column alignment: "+t,e)});if(1AV".indexOf(h)))throw new _('Expected one of "<>AV=|." after @',a[n]);for(let i=0;i<2;i++){let t=!0;for(let e=n+1;e{var i=e.font,t=t.withFont(i);return L(e.body,t)},$i=(e,t)=>{var i=e.font,t=t.withFont(i);return I(e.body,t)},Li={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Ii=(w({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:e,funcName:i}=e,t=tt(t[0]);let n=i;return n in Li&&(n=Li[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:Ri,mathmlBuilder:$i}),w({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e["parser"],t=t[0],i=C.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Dt(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:i}}}),w({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:i,breakOnTokenText:n}=e,r=e["mode"],n=e.parseExpression(!0,n);return{type:"font",mode:r,font:"math"+i.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},htmlBuilder:Ri,mathmlBuilder:$i}),(e,t)=>{let i=t;return"display"===e?i=i.id>=T.SCRIPT.id?i.text():T.DISPLAY:"text"===e&&i.size===T.DISPLAY.size?i=T.TEXT:"script"===e?i=T.SCRIPT:"scriptscript"===e&&(i=T.SCRIPTSCRIPT),i}),Fi=(e,t)=>{const i=Ii(e.size,t.style),n=i.fracNum(),r=i.fracDen();var s=t.havingStyle(n),o=L(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,i=3.5/t.fontMetrics().ptPerEm;o.height=o.height{let i=new A.MathNode("mfrac",[I(e.numer,t),I(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=E(e.barSize,t);i.setAttribute("linethickness",M(n))}}else i.setAttribute("linethickness","0px");const n=Ii(e.size,t.style);if(n.size!==t.style.size){i=new A.MathNode("mstyle",[i]);const e=n.size===T.DISPLAY.size?"true":"false";i.setAttribute("displaystyle",e),i.setAttribute("scriptlevel","0")}if(null==e.leftDelim&&null==e.rightDelim)return i;{const t=[];if(null!=e.leftDelim){const i=new A.MathNode("mo",[new A.TextNode(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}if(t.push(i),null!=e.rightDelim){const i=new A.MathNode("mo",[new A.TextNode(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}return vt(t)}},Di=(w({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:i}=e,n=t[0],t=t[1];let r,s=null,o=null,a="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",o=")";break;case"\\\\bracefrac":r=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":r=!1,s="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":a="display";break;case"\\tfrac":case"\\tbinom":a="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:r,leftDelim:s,rightDelim:o,size:a,barSize:null}},htmlBuilder:Fi,mathmlBuilder:Pi}),w({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e["parser"],i=t[0],t=t[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:i,denom:t,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),w({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:i,funcName:n,token:r}=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:i.mode,replaceWith:t,token:r}}}),["display","text","script","scriptscript"]),Oi=(w({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e["parser"],i=t[4],n=t[5],r=tt(t[0]),r="atom"===r.type&&"open"===r.family?Ei(r.text):null,s=tt(t[1]),s="atom"===s.type&&"close"===s.family?Ei(s.text):null,o=F(t[2],"size");let a,l=null,h=(a=!!o.isBlank||0<(l=o.value).number,"auto"),c=t[3];if("ordgroup"===c.type){if(0{var e=e["parser"],i=t[0],n=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(F(t[1],"infix").size),t=t[2],r=0{var i=t.style;let n,r;r="supsub"===e.type?(n=e.sup?L(e.sup,t.havingStyle(i.sup()),t):L(e.sub,t.havingStyle(i.sub()),t),F(e.base,"horizBrace")):F(e,"horizBrace");i=L(r.base,t.havingBaseStyle(T.DISPLAY)),e=Ct(r,t);let s;if((r.isOver?(s=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(s=R.makeVList({positionType:"bottom",positionData:i.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:i}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),n){const e=R.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t);s=r.isOver?R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:n}]},t):R.makeVList({positionType:"bottom",positionData:e.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return R.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t)}),Ni=(w({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:i}=e;return{type:"horizBrace",mode:e.mode,label:i,isOver:/^\\over/.test(i),base:t[0]}},htmlBuilder:Oi,mathmlBuilder:(e,t)=>{var i=_t(e.label);return new A.MathNode(e.isOver?"mover":"munder",[I(e.base,t),i])}}),w({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],i=t[1],t=F(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:x(i)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var i=$(e.body,t,!1);return R.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{let i=bt(e.body,t);return(i=i instanceof S?i:new S("mrow",[i])).setAttribute("href",e.href),i}}),w({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],i=F(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:i}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t{let{parser:i,funcName:n}=t;var r=F(e[0],"raw").string,t=e[1];let s;i.settings.strict&&i.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(n){case"\\htmlClass":o.class=r,s={command:"\\htmlClass",class:r};break;case"\\htmlId":o.id=r,s={command:"\\htmlId",id:r};break;case"\\htmlStyle":o.style=r,s={command:"\\htmlStyle",style:r};break;case"\\htmlData":{const t=r.split(",");for(let e=0;e{var i=$(e.body,t,!1),n=["enclosing"],r=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),R.makeSpan(n,i,t));for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&r.setAttribute(t,e.attributes[t]);return r},mathmlBuilder:(e,t)=>bt(e.body,t)}),w({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{e=e.parser;return{type:"htmlmathml",mode:e.mode,html:x(t[0]),mathml:x(t[1])}},htmlBuilder:(e,t)=>{e=$(e.html,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>bt(e.mathml,t)}),w({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,i)=>{let n=t["parser"],r={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(i[0]){const t=F(i[0],"raw").string.split(",");for(let e=0;e{var i=E(e.height,t);let n=0,r=(0{var i=new A.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);const n=E(e.height,t);let r=0;if(0{var{parser:e,funcName:i}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:i.slice(5),body:t}},htmlBuilder:(e,t)=>{let i;i="clap"===e.alignment?(i=R.makeSpan([],[L(e.body,t)]),R.makeSpan(["inner"],[i],t)):R.makeSpan(["inner"],[L(e.body,t)]);var n=R.makeSpan(["fix"],[]);let r=R.makeSpan([e.alignment],[i,n],t);e=R.makeSpan(["strut"]);return e.style.height=M(r.height+r.depth),r.depth&&(e.style.verticalAlign=M(-r.depth)),r.children.unshift(e),r=R.makeSpan(["thinbox"],[r],t),R.makeSpan(["mord","vbox"],[r],t)},mathmlBuilder:(e,t)=>{var i=new A.MathNode("mpadded",[I(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",t+"width")}return i.setAttribute("width","0px"),i}}),w({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:i}=e,n=i.mode,e=(i.switchMode("math"),"\\("===e?"\\)":"$"),r=i.parseExpression(!1,e);return i.expect(e),i.switchMode(n),{type:"styling",mode:i.mode,style:"text",body:r}}}),w({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new _("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case T.DISPLAY.size:return e.display;case T.TEXT.size:return e.text;case T.SCRIPT.size:return e.script;case T.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Bi=(w({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{e=e.parser;return{type:"mathchoice",mode:e.mode,display:x(t[0]),text:x(t[1]),script:x(t[2]),scriptscript:x(t[3])}},htmlBuilder:(e,t)=>{e=Ni(e,t),e=$(e,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=Ni(e,t);return bt(e,t)}}),(e,t,i,n,r,s,o)=>{e=R.makeSpan([],[e]);var a=i&&C.isCharacterBox(i);let l,h,c;if(t){const e=L(t,n.havingStyle(r.sup()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(i){const e=L(i,n.havingStyle(r.sub()),n);l={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}}if(h&&l){const t=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;c=R.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:M(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:M(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){const t=e.height-o;c=R.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:M(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n)}else{if(!h)return e;{const t=e.depth+o;c=R.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:M(s)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}}t=[c];if(l&&0!==s&&!a){const e=R.makeSpan(["mspace"],[],n);e.style.marginRight=M(s),t.unshift(e)}return R.makeSpan(["mop","op-limits"],t,n)}),zi=["\\smallint"],Hi=(t,i)=>{let e,n,r,s=!1;"supsub"===t.type?(e=t.sup,n=t.sub,r=F(t.base,"op"),s=!0):r=F(t,"op");t=i.style;let o,a=!1;if(t.size===T.DISPLAY.size&&r.symbol&&!C.contains(zi,r.name)&&(a=!0),r.symbol){const t=a?"Size2-Regular":"Size1-Regular";let e="";if("\\oiint"!==r.name&&"\\oiiint"!==r.name||(e=r.name.slice(1),r.name="oiint"===e?"\\iint":"\\iiint"),o=R.makeSymbol(r.name,t,"math",i,["mop","op-symbol",a?"large-op":"small-op"]),0{let i;if(e.symbol)i=new S("mo",[ft(e.name,e.mode)]),C.contains(zi,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new S("mo",k(e.body,t));else{i=new S("mi",[new gt(e.name.slice(1))]);const t=new S("mo",[ft("⁡","text")]);i=e.parentIsSupSub?new S("mrow",[i,t]):mt([i,t])}return i},Wi={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},qi=(w({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:i,funcName:n}=e,r=n;return 1===r.length&&(r=Wi[r]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:x(t)}},htmlBuilder:Hi,mathmlBuilder:Ui}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),Vi=(w({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:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Hi,mathmlBuilder:Ui}),w({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:i}=e,n=i;return 1===n.length&&(n=qi[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Hi,mathmlBuilder:Ui}),(e,t)=>{let i,n,r,s,o=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,r=F(e.base,"operatorname"),o=!0):r=F(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),i=$(e,t.withFont("mathrm"),!0);for(let e=0;e{var{parser:e,funcName:i}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:x(t),alwaysHandleSupSub:"\\operatornamewithlimits"===i,limits:!1,parentIsSupSub:!1}},htmlBuilder:Vi,mathmlBuilder:(t,i)=>{let n=k(t.body,i.withFont("mathrm")),r=!0;for(let e=0;ee.toText()).join("");n=[new A.TextNode(t)]}var i=new A.MathNode("mi",n),e=(i.setAttribute("mathvariant","normal"),new A.MathNode("mo",[ft("⁡","text")]));return t.parentIsSupSub?new A.MathNode("mrow",[i,e]):A.newDocumentFragment([i,e])}}),P("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),et({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?R.makeFragment($(e.body,t,!1)):R.makeSpan(["mord"],$(e.body,t,!0),t)},mathmlBuilder(e,t){return bt(e.body,t,!0)}}),w({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){e=e.parser,t=t[0];return{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=L(e.body,t.havingCrampedStyle()),i=R.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:i},{type:"kern",size:n}]},t);return R.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var i=new A.MathNode("mo",[new A.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new A.MathNode("mover",[I(e.body,t),i]));return e.setAttribute("accent","true"),e}}),w({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"phantom",mode:e.mode,body:x(t)}},htmlBuilder:(e,t)=>{e=$(e.body,t.withPhantom(),!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=k(e.body,t);return new A.MathNode("mphantom",e)}}),w({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"hphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{let i=R.makeSpan([],[L(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(let e=0;e{e=k(x(e.body),t),t=new A.MathNode("mphantom",e),e=new A.MathNode("mpadded",[t]);return e.setAttribute("height","0px"),e.setAttribute("depth","0px"),e}}),w({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"vphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{var e=R.makeSpan(["inner"],[L(e.body,t.withPhantom())]),i=R.makeSpan(["fix"],[]);return R.makeSpan(["mord","rlap"],[e,i],t)},mathmlBuilder:(e,t)=>{e=k(x(e.body),t),t=new A.MathNode("mphantom",e),e=new A.MathNode("mpadded",[t]);return e.setAttribute("width","0px"),e}}),w({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e["parser"],i=F(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:i,body:t}},htmlBuilder(e,t){var i=L(e.body,t),e=E(e.dy,t);return R.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){t=new A.MathNode("mpadded",[I(e.body,t)]),e=e.dy.number+e.dy.unit;return t.setAttribute("voffset",e),t}}),w({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){e=e.parser;return{type:"internal",mode:e.mode}}}),w({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,i){var e=e["parser"],i=i[0],n=F(t[0],"size"),t=F(t[1],"size");return{type:"rule",mode:e.mode,shift:i&&F(i,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var i=R.makeSpan(["mord","rule"],[],t),n=E(e.width,t),r=E(e.height,t),e=e.shift?E(e.shift,t):0;return i.style.borderRightWidth=M(n),i.style.borderTopWidth=M(r),i.style.bottom=M(e),i.width=n,i.height=r+e,i.depth=-e,i.maxFontSize=1.125*r*t.sizeMultiplier,i},mathmlBuilder(e,t){var i=E(e.width,t),n=E(e.height,t),e=e.shift?E(e.shift,t):0,t=t.color&&t.getColor()||"black",r=new A.MathNode("mspace"),t=(r.setAttribute("mathbackground",t),r.setAttribute("width",M(i)),r.setAttribute("height",M(n)),new A.MathNode("mpadded",[r]));return 0<=e?t.setAttribute("height",M(e)):(t.setAttribute("height",M(e)),t.setAttribute("depth",M(-e))),t.setAttribute("voffset",M(e)),t}});const Gi=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Ki=(w({type:"sizing",names:Gi,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:i,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:Gi.indexOf(i)+1,body:e}},htmlBuilder:(e,t)=>{var i=t.havingSize(e.size);return ji(e.body,i,t)},mathmlBuilder:(e,t)=>{t=t.havingSize(e.size),e=k(e.body,t),e=new A.MathNode("mstyle",e);return e.setAttribute("mathsize",M(t.sizeMultiplier)),e}}),w({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,i)=>{let n=e["parser"],r=!1,s=!1;var o=i[0]&&F(i[0],"ordgroup");if(o){var a;for(let e=0;e{var i=R.makeSpan([],[L(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(let e=0;e{t=new A.MathNode("mpadded",[I(e.body,t)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}}),w({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,i){e=e.parser,i=i[0],t=t[0];return{type:"sqrt",mode:e.mode,body:t,index:i}},htmlBuilder(e,t){let i=L(e.body,t.havingCrampedStyle());0===i.height&&(i.height=t.fontMetrics().xHeight),i=R.wrapFragment(i,t);const n=t.fontMetrics().defaultRuleThickness;let r=n,s=(t.style.idi.height+i.depth+s&&(s=(s+c-i.height-i.depth)/2);var d=a.height-i.height-s-l,d=(i.style.paddingLeft=M(h),R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+d)},{type:"elem",elem:a},{type:"kern",size:l}]},t));if(e.index){const i=t.havingStyle(T.SCRIPTSCRIPT),n=L(e.index,i,t),r=.6*(d.height-d.depth),s=R.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:n}]},t),o=R.makeSpan(["root"],[s]);return R.makeSpan(["mord","sqrt"],[o,d],t)}return R.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder(e,t){var{body:e,index:i}=e;return i?new A.MathNode("mroot",[I(e,t),I(i,t)]):new A.MathNode("msqrt",[I(e,t)])}}),{display:T.DISPLAY,text:T.TEXT,script:T.SCRIPT,scriptscript:T.SCRIPTSCRIPT}),Xi=(w({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:i,parser:n}=e,e=n.parseExpression(!0,e),i=i.slice(1,i.length-5);return{type:"styling",mode:n.mode,style:i,body:e}},htmlBuilder(e,t){var i=Ki[e.style],i=t.havingStyle(i).withFont("");return ji(e.body,i,t)},mathmlBuilder(e,t){var i=Ki[e.style],t=t.havingStyle(i),i=k(e.body,t),t=new A.MathNode("mstyle",i),i={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",i[0]),t.setAttribute("displaystyle",i[1]),t}}),et({type:"supsub",htmlBuilder(e,t){n=t;const i=(s=(r=e).base)?"op"===s.type?s.limits&&(n.style.size===T.DISPLAY.size||s.alwaysHandleSupSub)?Hi:null:"operatorname"===s.type?s.alwaysHandleSupSub&&(n.style.size===T.DISPLAY.size||s.limits)?Vi:null:"accent"===s.type?C.isCharacterBox(s.base)?Mt:null:"horizBrace"===s.type&&!r.sub===s.isOver?Oi:null:null;if(i)return i(e,t);var{base:n,sup:r,sub:s}=e,o=L(n,t);let a,l;var h=t.fontMetrics();let c=0,d=0;n=n&&C.isCharacterBox(n);if(r){const e=t.havingStyle(t.style.sup());a=L(r,e,t),n||(c=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());l=L(s,e,t),n||(d=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}r=t.style===T.DISPLAY?h.sup1:t.style.cramped?h.sup3:h.sup2,s=t.sizeMultiplier,n=M(.5/h.ptPerEm/s);let u,p=null;if(l){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(o instanceof m||t)&&(p=M(-o.italic))}if(a&&l){c=Math.max(c,r,a.depth+.25*h.xHeight),d=Math.max(d,h.sub2);const e=4*h.defaultRuleThickness;if(c-a.depth-(l.height-d){var e=new A.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),Zi=(et({type:"tag",mathmlBuilder(e,t){e=new A.MathNode("mtable",[new A.MathNode("mtr",[Ji(),new A.MathNode("mtd",[bt(e.body,t)]),Ji(),new A.MathNode("mtd",[bt(e.tag,t)])])]);return e.setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),en={"\\textbf":"textbf","\\textmd":"textmd"},tn={"\\textit":"textit","\\textup":"textup"},nn=(e,t)=>{e=e.font;return e?Zi[e]?t.withTextFontFamily(Zi[e]):en[e]?t.withTextFontWeight(en[e]):t.withTextFontShape(tn[e]):t},rn=(w({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:e,funcName:i}=e,t=t[0];return{type:"text",mode:e.mode,body:x(t),font:i}},htmlBuilder(e,t){t=nn(e,t),e=$(e.body,t,!0);return R.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){t=nn(e,t);return bt(e.body,t)}}),w({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"underline",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=L(e.body,t),i=R.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=R.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return R.makeSpan(["mord","underline"],[i],t)},mathmlBuilder(e,t){var i=new A.MathNode("mo",[new A.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new A.MathNode("munder",[I(e.body,t),i]));return e.setAttribute("accentunder","true"),e}}),w({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"vcenter",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=L(e.body,t),i=t.fontMetrics().axisHeight,i=.5*(e.height-i-(e.depth+i));return R.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new A.MathNode("mpadded",[I(e.body,t)],["vcenter"])}}),w({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,i){throw new _("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(i,e){var n=rn(i),r=[],s=e.havingStyle(e.style.text());for(let t=0;te.body.replace(/ /g,e.star?"␣":" "));var sn=Qe;const on=new RegExp("[̀-ͯ]+$");class an{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("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new vi("EOF",new fi(this,t,t));var i=this.tokenRegex.exec(e);if(null===i||i.index!==t)throw new _("Unexpected character: '"+e[t]+"'",new vi(e[t],new fi(this,t,t+1)));i=i[6]||i[3]||(i[2]?"\\ ":" ");if(14!==this.catcodes[i])return new vi(i,new fi(this,t,this.tokenRegex.lastIndex));{const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}}}class ln{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 _("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0=t)throw new _("Invalid base-"+t+" digit "+i.text);for(var r;null!=(r=cn[e.future().text])&&r{let n=i.consumeArg().tokens;if(1!==n.length)throw new _("\\newcommand's first argument must be a macro name");var r=n[0].text,s=i.isDefined(r);if(s&&!e)throw new _("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!t)throw new _("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");let o=0;if(1===(n=i.consumeArg().tokens).length&&"["===n[0].text){let e="",t=i.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=i.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new _("Invalid number of arguments: "+e);o=parseInt(e),n=i.consumeArg().tokens}return i.macros.set(r,{tokens:n,numArgs:o}),""}),un=(P("\\newcommand",e=>dn(e,!1,!0)),P("\\renewcommand",e=>dn(e,!0,!1)),P("\\providecommand",e=>dn(e,!0,!0)),P("\\message",e=>{e=e.consumeArgs(1)[0];return console.log(e.reverse().map(e=>e.text).join("")),""}),P("\\errmessage",e=>{e=e.consumeArgs(1)[0];return console.error(e.reverse().map(e=>e.text).join("")),""}),P("\\show",e=>{var t=e.popToken(),i=t.text;return console.log(t,e.macros.get(i),sn[i],d.math[i],d.text[i]),""}),P("\\bgroup","{"),P("\\egroup","}"),P("~","\\nobreakspace"),P("\\lq","`"),P("\\rq","'"),P("\\aa","\\r a"),P("\\AA","\\r A"),P("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),P("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),P("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),P("ℬ","\\mathscr{B}"),P("ℰ","\\mathscr{E}"),P("ℱ","\\mathscr{F}"),P("ℋ","\\mathscr{H}"),P("ℐ","\\mathscr{I}"),P("ℒ","\\mathscr{L}"),P("ℳ","\\mathscr{M}"),P("ℛ","\\mathscr{R}"),P("ℭ","\\mathfrak{C}"),P("ℌ","\\mathfrak{H}"),P("ℨ","\\mathfrak{Z}"),P("\\Bbbk","\\Bbb{k}"),P("·","\\cdotp"),P("\\llap","\\mathllap{\\textrm{#1}}"),P("\\rlap","\\mathrlap{\\textrm{#1}}"),P("\\clap","\\mathclap{\\textrm{#1}}"),P("\\mathstrut","\\vphantom{(}"),P("\\underbar","\\underline{\\text{#1}}"),P("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),P("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),P("\\ne","\\neq"),P("≠","\\neq"),P("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),P("∉","\\notin"),P("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),P("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),P("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),P("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),P("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),P("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),P("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),P("⟂","\\perp"),P("‼","\\mathclose{!\\mkern-0.8mu!}"),P("∌","\\notni"),P("⌜","\\ulcorner"),P("⌝","\\urcorner"),P("⌞","\\llcorner"),P("⌟","\\lrcorner"),P("©","\\copyright"),P("®","\\textregistered"),P("️","\\textregistered"),P("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),P("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),P("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),P("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),P("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),P("⋮","\\vdots"),P("\\varGamma","\\mathit{\\Gamma}"),P("\\varDelta","\\mathit{\\Delta}"),P("\\varTheta","\\mathit{\\Theta}"),P("\\varLambda","\\mathit{\\Lambda}"),P("\\varXi","\\mathit{\\Xi}"),P("\\varPi","\\mathit{\\Pi}"),P("\\varSigma","\\mathit{\\Sigma}"),P("\\varUpsilon","\\mathit{\\Upsilon}"),P("\\varPhi","\\mathit{\\Phi}"),P("\\varPsi","\\mathit{\\Psi}"),P("\\varOmega","\\mathit{\\Omega}"),P("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),P("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),P("\\boxed","\\fbox{$\\displaystyle{#1}$}"),P("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),P("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),P("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),{",":"\\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"}),pn=(P("\\dots",function(e){let t="\\dotso";e=e.expandAfterFuture().text;return e in un?t=un[e]:("\\not"===e.slice(0,4)||e in d.math&&C.contains(["bin","rel"],d.math[e].group))&&(t="\\dotsb"),t}),{")":!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});P("\\dotso",function(e){return e.future().text in pn?"\\ldots\\,":"\\ldots"}),P("\\dotsc",function(e){e=e.future().text;return e in pn&&","!==e?"\\ldots\\,":"\\ldots"}),P("\\cdots",function(e){return e.future().text in pn?"\\@cdots\\,":"\\@cdots"}),P("\\dotsb","\\cdots"),P("\\dotsm","\\cdots"),P("\\dotsi","\\!\\cdots"),P("\\dotsx","\\ldots\\,"),P("\\DOTSI","\\relax"),P("\\DOTSB","\\relax"),P("\\DOTSX","\\relax"),P("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),P("\\,","\\tmspace+{3mu}{.1667em}"),P("\\thinspace","\\,"),P("\\>","\\mskip{4mu}"),P("\\:","\\tmspace+{4mu}{.2222em}"),P("\\medspace","\\:"),P("\\;","\\tmspace+{5mu}{.2777em}"),P("\\thickspace","\\;"),P("\\!","\\tmspace-{3mu}{.1667em}"),P("\\negthinspace","\\!"),P("\\negmedspace","\\tmspace-{4mu}{.2222em}"),P("\\negthickspace","\\tmspace-{5mu}{.277em}"),P("\\enspace","\\kern.5em "),P("\\enskip","\\hskip.5em\\relax"),P("\\quad","\\hskip1em\\relax"),P("\\qquad","\\hskip2em\\relax"),P("\\tag","\\@ifstar\\tag@literal\\tag@paren"),P("\\tag@paren","\\tag@literal{({#1})}"),P("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new _("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),P("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),P("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),P("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),P("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),P("\\newline","\\\\\\relax"),P("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");l=M(ne["Main-Regular"]["T".charCodeAt(0)][1]-.7*ne["Main-Regular"]["A".charCodeAt(0)][1]),P("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),P("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),P("\\hspace","\\@ifstar\\@hspacer\\@hspace"),P("\\@hspace","\\hskip #1\\relax"),P("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),P("\\ordinarycolon",":"),P("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),P("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),P("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),P("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),P("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),P("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),P("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),P("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),P("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),P("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),P("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),P("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),P("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),P("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),P("∷","\\dblcolon"),P("∹","\\eqcolon"),P("≔","\\coloneqq"),P("≕","\\eqqcolon"),P("⩴","\\Coloneqq"),P("\\ratio","\\vcentcolon"),P("\\coloncolon","\\dblcolon"),P("\\colonequals","\\coloneqq"),P("\\coloncolonequals","\\Coloneqq"),P("\\equalscolon","\\eqqcolon"),P("\\equalscoloncolon","\\Eqqcolon"),P("\\colonminus","\\coloneq"),P("\\coloncolonminus","\\Coloneq"),P("\\minuscolon","\\eqcolon"),P("\\minuscoloncolon","\\Eqcolon"),P("\\coloncolonapprox","\\Colonapprox"),P("\\coloncolonsim","\\Colonsim"),P("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),P("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),P("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),P("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),P("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),P("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),P("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),P("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),P("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),P("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),P("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),P("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),P("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),P("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),P("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),P("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),P("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),P("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),P("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),P("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),P("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),P("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),P("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),P("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),P("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),P("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),P("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),P("\\imath","\\html@mathml{\\@imath}{ı}"),P("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),P("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),P("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),P("⟦","\\llbracket"),P("⟧","\\rrbracket"),P("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),P("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),P("⦃","\\lBrace"),P("⦄","\\rBrace"),P("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),P("⦵","\\minuso"),P("\\darr","\\downarrow"),P("\\dArr","\\Downarrow"),P("\\Darr","\\Downarrow"),P("\\lang","\\langle"),P("\\rang","\\rangle"),P("\\uarr","\\uparrow"),P("\\uArr","\\Uparrow"),P("\\Uarr","\\Uparrow"),P("\\N","\\mathbb{N}"),P("\\R","\\mathbb{R}"),P("\\Z","\\mathbb{Z}"),P("\\alef","\\aleph"),P("\\alefsym","\\aleph"),P("\\Alpha","\\mathrm{A}"),P("\\Beta","\\mathrm{B}"),P("\\bull","\\bullet"),P("\\Chi","\\mathrm{X}"),P("\\clubs","\\clubsuit"),P("\\cnums","\\mathbb{C}"),P("\\Complex","\\mathbb{C}"),P("\\Dagger","\\ddagger"),P("\\diamonds","\\diamondsuit"),P("\\empty","\\emptyset"),P("\\Epsilon","\\mathrm{E}"),P("\\Eta","\\mathrm{H}"),P("\\exist","\\exists"),P("\\harr","\\leftrightarrow"),P("\\hArr","\\Leftrightarrow"),P("\\Harr","\\Leftrightarrow"),P("\\hearts","\\heartsuit"),P("\\image","\\Im"),P("\\infin","\\infty"),P("\\Iota","\\mathrm{I}"),P("\\isin","\\in"),P("\\Kappa","\\mathrm{K}"),P("\\larr","\\leftarrow"),P("\\lArr","\\Leftarrow"),P("\\Larr","\\Leftarrow"),P("\\lrarr","\\leftrightarrow"),P("\\lrArr","\\Leftrightarrow"),P("\\Lrarr","\\Leftrightarrow"),P("\\Mu","\\mathrm{M}"),P("\\natnums","\\mathbb{N}"),P("\\Nu","\\mathrm{N}"),P("\\Omicron","\\mathrm{O}"),P("\\plusmn","\\pm"),P("\\rarr","\\rightarrow"),P("\\rArr","\\Rightarrow"),P("\\Rarr","\\Rightarrow"),P("\\real","\\Re"),P("\\reals","\\mathbb{R}"),P("\\Reals","\\mathbb{R}"),P("\\Rho","\\mathrm{P}"),P("\\sdot","\\cdot"),P("\\sect","\\S"),P("\\spades","\\spadesuit"),P("\\sub","\\subset"),P("\\sube","\\subseteq"),P("\\supe","\\supseteq"),P("\\Tau","\\mathrm{T}"),P("\\thetasym","\\vartheta"),P("\\weierp","\\wp"),P("\\Zeta","\\mathrm{Z}"),P("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),P("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),P("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),P("\\bra","\\mathinner{\\langle{#1}|}"),P("\\ket","\\mathinner{|{#1}\\rangle}"),P("\\braket","\\mathinner{\\langle{#1}\\rangle}"),P("\\Bra","\\left\\langle#1\\right|"),P("\\Ket","\\left|#1\\right\\rangle"),p=l=>e=>{const t=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var a=i=>e=>{l&&(e.macros.set("|",s),r.length)&&e.macros.set("\\|",o);let t=i;return!i&&r.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?r:n,numArgs:0}},a=(e.macros.set("|",a(!1)),r.length&&e.macros.set("\\|",a(!0)),e.consumeArg().tokens),a=e.expandTokens([...i,...a,...t]);return e.macros.endGroup(),{tokens:a.reverse(),numArgs:0}};P("\\bra@ket",p(!1)),P("\\bra@set",p(!0)),P("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),P("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),P("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),P("\\angln","{\\angl n}"),P("\\blue","\\textcolor{##6495ed}{#1}"),P("\\orange","\\textcolor{##ffa500}{#1}"),P("\\pink","\\textcolor{##ff00af}{#1}"),P("\\red","\\textcolor{##df0030}{#1}"),P("\\green","\\textcolor{##28ae7b}{#1}"),P("\\gray","\\textcolor{gray}{#1}"),P("\\purple","\\textcolor{##9d38bd}{#1}"),P("\\blueA","\\textcolor{##ccfaff}{#1}"),P("\\blueB","\\textcolor{##80f6ff}{#1}"),P("\\blueC","\\textcolor{##63d9ea}{#1}"),P("\\blueD","\\textcolor{##11accd}{#1}"),P("\\blueE","\\textcolor{##0c7f99}{#1}"),P("\\tealA","\\textcolor{##94fff5}{#1}"),P("\\tealB","\\textcolor{##26edd5}{#1}"),P("\\tealC","\\textcolor{##01d1c1}{#1}"),P("\\tealD","\\textcolor{##01a995}{#1}"),P("\\tealE","\\textcolor{##208170}{#1}"),P("\\greenA","\\textcolor{##b6ffb0}{#1}"),P("\\greenB","\\textcolor{##8af281}{#1}"),P("\\greenC","\\textcolor{##74cf70}{#1}"),P("\\greenD","\\textcolor{##1fab54}{#1}"),P("\\greenE","\\textcolor{##0d923f}{#1}"),P("\\goldA","\\textcolor{##ffd0a9}{#1}"),P("\\goldB","\\textcolor{##ffbb71}{#1}"),P("\\goldC","\\textcolor{##ff9c39}{#1}"),P("\\goldD","\\textcolor{##e07d10}{#1}"),P("\\goldE","\\textcolor{##a75a05}{#1}"),P("\\redA","\\textcolor{##fca9a9}{#1}"),P("\\redB","\\textcolor{##ff8482}{#1}"),P("\\redC","\\textcolor{##f9685d}{#1}"),P("\\redD","\\textcolor{##e84d39}{#1}"),P("\\redE","\\textcolor{##bc2612}{#1}"),P("\\maroonA","\\textcolor{##ffbde0}{#1}"),P("\\maroonB","\\textcolor{##ff92c6}{#1}"),P("\\maroonC","\\textcolor{##ed5fa6}{#1}"),P("\\maroonD","\\textcolor{##ca337c}{#1}"),P("\\maroonE","\\textcolor{##9e034e}{#1}"),P("\\purpleA","\\textcolor{##ddd7ff}{#1}"),P("\\purpleB","\\textcolor{##c6b9fc}{#1}"),P("\\purpleC","\\textcolor{##aa87ff}{#1}"),P("\\purpleD","\\textcolor{##7854ab}{#1}"),P("\\purpleE","\\textcolor{##543b78}{#1}"),P("\\mintA","\\textcolor{##f5f9e8}{#1}"),P("\\mintB","\\textcolor{##edf2df}{#1}"),P("\\mintC","\\textcolor{##e0e5cc}{#1}"),P("\\grayA","\\textcolor{##f6f7f7}{#1}"),P("\\grayB","\\textcolor{##f0f1f2}{#1}"),P("\\grayC","\\textcolor{##e3e5e6}{#1}"),P("\\grayD","\\textcolor{##d6d8da}{#1}"),P("\\grayE","\\textcolor{##babec2}{#1}"),P("\\grayF","\\textcolor{##888d93}{#1}"),P("\\grayG","\\textcolor{##626569}{#1}"),P("\\grayH","\\textcolor{##3b3e40}{#1}"),P("\\grayI","\\textcolor{##21242c}{#1}"),P("\\kaBlue","\\textcolor{##314453}{#1}"),P("\\kaGreen","\\textcolor{##71B307}{#1}");const mn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class gn{constructor(e,t,i){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 ln(hn,t.macros),this.mode=i,this.stack=[]}feed(e){this.lexer=new an(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){let t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:i}=this.consumeArg(["]"])}else({tokens:n,start:t,end:i}=this.consumeArg());return this.pushToken(new vi("EOF",i.loc)),this.pushTokens(n),t.range(i,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],i=e&&0this.settings.maxExpand)throw new _("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),i=t.text,n=t.noexpand?null:this._getExpansion(i);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===i[0]&&!this.isDefined(i))throw new _("Undefined control sequence: "+i);return this.pushToken(t),!1}this.countExpansion(1);let r=n.tokens;var s=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(let e=(r=r.slice()).length-1;0<=e;--e){var o=r[e];if("#"===o.text){if(0===e)throw new _("Incomplete placeholder at end of macro body",o);if("#"===(o=r[--e]).text)r.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new _("Not a valid argument number",o);r.splice(e,2,...s[+o.text-1])}}}return this.pushTokens(r),r.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new vi(e)]):void 0}expandTokens(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){e=this.expandMacro(e);return e&&e.map(e=>e.text).join("")}_getExpansion(i){const n=this.macros.get(i);if(null==n)return n;if(1===i.length){const n=this.lexer.catcodes[i];if(null!=n&&13!==n)return}i="function"==typeof n?n(this):n;if("string"!=typeof i)return i;{let e=0;if(-1!==i.indexOf("#")){const n=i.replace(/##/g,"");for(;-1!==n.indexOf("#"+(e+1));)++e}const n=new an(i,this.settings),r=[];let t=n.lex();for(;"EOF"!==t.text;)r.push(t),t=n.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||sn.hasOwnProperty(e)||d.math.hasOwnProperty(e)||d.text.hasOwnProperty(e)||mn.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:sn.hasOwnProperty(e)&&!sn[e].primitive}}const fn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,vn=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),yn={"́":{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"}},bn={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class wn{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 gn(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 _("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,e=(this.consume(),this.gullet.pushToken(new vi("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var i=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==wn.endOfExpression.indexOf(n.text))break;if(t&&n.text===t)break;if(e&&sn[n.text]&&sn[n.text].infix)break;n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&i.push(n)}return"text"===this.mode&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(t){let i,n=-1;for(let e=0;ee.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;-1!==(i=t.search(r));){0t.startsWith(e.left));if(-1===(i=function(e,t,i){let n=i,r=0;for(var s=e.length;n-1===r.indexOf(" "+e+" "))&&h(o,s)}}};var s=function(e,t){if(!e)throw new Error("No element provided to render");var i={};for(const e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);i.delimiters=i.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],i.ignoredTags=i.ignoredTags||["script","noscript","style","textarea","pre","code","option"],i.ignoredClasses=i.ignoredClasses||[],i.errorCallback=i.errorCallback||console.error,i.macros=i.macros||{},h(e,i)}}return e.default}()}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).markedKatex=t(e.katex)}(this,function(n){"use strict";const r=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,i=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function t(t,i){return e=>n.renderToString(e.text,{...t,displayMode:e.displayMode})+(i?"\n":"")}return function(e={}){return{extensions:[{name:"inlineKatex",level:"inline",start(e){let t,i=e;for(;i;){if(-1===(t=i.indexOf("$")))return;if((0===t||" "===i.charAt(t-1))&&i.substring(t).match(r))return t;i=i.substring(t+1).replace(/^\$+/,"")}},tokenizer(e,t){e=e.match(r);if(e)return{type:"inlineKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!1)},{name:"blockKatex",level:"block",tokenizer(e,t){e=e.match(i);if(e)return{type:"blockKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!0)}]}}}),"undefined"!=typeof window&&(window.markedMermaid=markedMermaid),"undefined"!=typeof module&&module.exports&&(module.exports=markedMermaid),!function(){function e(e){return e}function t(i){return function(e){var t=h("img",["image-output"]);return t.src="data:image/"+i+";base64,"+d(e).replace(/\n/g,""),t}}function i(){var t=this,e=u.display_priority.filter(function(e){return(t.raw.data||t.raw)[e]})[0];return e&&u.display[e]?u.display[e](t.raw[e]||t.raw.data[e]):h("div",["empty-output"])}function n(){var e=h("pre",["pyerr"]),t=this.raw.traceback.join("\n");return e.innerHTML=u.highlighter(u.ansi(c(t)),e),e}var r,s,o,a=this,l=void 0!==a.window,h=(s=(l?a:(r=new(require("jsdom").JSDOM)).window).document,function(e,t){e=s.createElement(e);return e.className=(t||[]).map(function(e){return u.prefix+e}).join(" "),e}),c=function(e){return e.replace(//g,">")},d=function(e){return e.join?e.map(d).join(""):e},u={prefix:"nb-",markdown:(o=a.marked||"function"==typeof require&&require("marked"))&&o.parse||e,ansi:(o=a.ansi_up||"function"==typeof require&&require("ansi_up"))&&o.ansi_to_html||e,sanitizer:(o=a.DOMPurify||"function"==typeof require&&require("dompurify"),(l?o&&o.sanitize:o(r.window).sanitize)||e),highlighter:e,VERSION:"0.7.0",Input:function(e,t){this.raw=e,this.cell=t}},p=(u.Input.prototype.render=function(){var e,t,i,n;return this.raw.length?(e=h("div",["input"]),"number"==typeof(n=this.cell).number&&e.setAttribute("data-prompt-number",this.cell.number),t=h("pre"),i=h("code"),n=n.worksheet.notebook.metadata,n=this.cell.raw.language||n.language||n.kernelspec&&n.kernelspec.language||n.language_info&&n.language_info.name,i.setAttribute("data-language",n),i.className="lang-"+n,i.innerHTML=u.highlighter(c(d(this.raw)),t,i,n),t.appendChild(i),e.appendChild(t),this.el=e):h("div")},u.display={},u.display.text=function(e){var t=h("pre",["text-output"]);return t.innerHTML=u.highlighter(u.ansi(d(e)),t),t},u.display["text/plain"]=u.display.text,u.display.html=function(e){var t=h("div",["html-output"]);return t.innerHTML=u.sanitizer(d(e)),t},u.display["text/html"]=u.display.html,u.display.marked=function(e){return u.display.html(u.markdown(d(e)))},u.display["text/markdown"]=u.display.marked,u.display.svg=function(e){var t=h("div",["svg-output"]);return t.innerHTML=d(e),t},u.display["text/svg+xml"]=u.display.svg,u.display["image/svg+xml"]=u.display.svg,u.display.latex=function(e){var t=h("div",["latex-output"]);return t.innerHTML=d(e),t},u.display["text/latex"]=u.display.latex,u.display.javascript=function(e){var t=h("script");return t.innerHTML=d(e),t},u.display["application/javascript"]=u.display.javascript,u.display.png=t("png"),u.display["image/png"]=u.display.png,u.display.jpeg=t("jpeg"),u.display["image/jpeg"]=u.display.jpeg,u.display_priority=["png","image/png","jpeg","image/jpeg","svg","image/svg+xml","text/svg+xml","html","text/html","text/markdown","latex","text/latex","javascript","application/javascript","text","text/plain"],u.Output=function(e,t){this.raw=e,this.cell=t,this.type=e.output_type},u.Output.prototype.renderers={display_data:i,execute_result:i,pyout:i,pyerr:n,error:n,stream:function(){var e=h("pre",[this.raw.stream||this.raw.name]),t=d(this.raw.text);return e.innerHTML=u.highlighter(u.ansi(c(t)),e),e}},u.Output.prototype.render=function(){var e=h("div",["output"]),t=("number"==typeof this.cell.number&&e.setAttribute("data-prompt-number",this.cell.number),this.renderers[this.type].call(this));return e.appendChild(t),this.el=e},u.coalesceStreams=function(e){var t,i;return e.length?(t=e[0],i=[t],e.slice(1).forEach(function(e){"stream"===e.raw.output_type&&"stream"===t.raw.output_type&&e.raw.stream===t.raw.stream&&e.raw.name===t.raw.name?t.raw.text=t.raw.text.concat(e.raw.text):(i.push(e),t=e)}),i):e},[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!(u.Cell=function(e,t){var i=this;i.raw=e,i.worksheet=t,i.type=e.cell_type,"code"===i.type&&(i.number=-1")))):e.innerHTML=u.sanitizer(u.markdown(t)),e},heading:function(){var e=h("h"+this.raw.level,["cell","heading-cell"]);return e.innerHTML=u.sanitizer(d(this.raw.source)),e},raw:function(){var e=h("div",["cell","raw-cell"]);return e.innerHTML=c(d(this.raw.source)),e},code:function(){var t=h("div",["cell","code-cell"]);t.appendChild(this.input.render()),this.outputs.forEach(function(e){t.appendChild(e.render())});return t}},u.Cell.prototype.render=function(){var e=this.renderers[this.type].call(this);return this.el=e},u.Worksheet=function(e,t){var i=this;this.raw=e,this.notebook=t,this.cells=e.cells.map(function(e){return new u.Cell(e,i)}),this.render=function(){var t=h("div",["worksheet"]);return i.cells.forEach(function(e){t.appendChild(e.render())}),this.el=t}},u.Notebook=function(e,t){var i=this,t=(this.raw=e,this.config=t,this.metadata=e.metadata||{}),t=(this.title=t.title||t.name,e.worksheets||[{cells:e.cells}]);this.worksheets=t.map(function(e){return new u.Worksheet(e,i)}),this.sheet=this.worksheets[0]},u.Notebook.prototype.render=function(){var t=h("div",["notebook"]);return this.worksheets.forEach(function(e){t.appendChild(e.render())}),this.el=t},u.parse=function(e,t){return new u.Notebook(e,t)},"function"==typeof define&&define.amd&&define(function(){return u}),"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=u:exports).nb=u:a.nb=u}.call(this);var Org=function(){var e={},n={rules:{},define:function(t,e){this.rules[t]=e,this["is"+t.substring(0,1).toUpperCase()+t.substring(1)]=function(e){return this.rules[t].exec(e)}}};function r(){}function s(e){this.stream=e,this.tokenStack=[]}function o(e,t){if(this.type=e,this.children=[],t)for(var i=0,n=t.length;i";return void 0!==this.value?e+=" "+this.value:this.children&&(e+="\n"+this.children.map(function(e,t){return"#"+t+" "+e.toString()}).join("\n").split("\n").map(function(e){return" "+e}).join("\n")),e}};var u={types:{},define:function(i,n){var e="create"+(this.types[i]=i).substring(0,1).toUpperCase()+i.substring(1),r="function"==typeof n;this[e]=function(e,t){e=new o(i,e);return r&&n(e,t||{}),e}}};function a(e){this.sequences=e.split(/\r?\n/),this.totalLines=this.sequences.length,this.lineNumber=0}function l(){this.inlineParser=new t}function t(){this.preEmphasis=" \t\\('\"",this.postEmphasis="- \t.,:!?;'\"\\)",this.borderForbidden=" \t\r\n,\"'",this.bodyRegexp="[\\s\\S]*?",this.markers="*/_=~+",this.emphasisPattern=this.buildEmphasisPattern(),this.linkPattern=/\[\[([^\]]*)\](?:\[([^\]]*)\])?\]/g}function i(){}function h(e,t){this.initialize(e,t),this.result=this.convert()}return u.define("text",function(e,t){e.value=t.value}),u.define("header",function(e,t){e.level=t.level}),u.define("orderedList"),u.define("unorderedList"),u.define("definitionList"),u.define("listElement"),u.define("paragraph"),u.define("preformatted"),u.define("table"),u.define("tableRow"),u.define("tableCell"),u.define("horizontalRule"),u.define("directive"),u.define("inlineContainer"),u.define("bold"),u.define("italic"),u.define("underline"),u.define("code"),u.define("verbatim"),u.define("dashed"),u.define("link",function(e,t){e.src=t.src}),void 0!==e&&(e.Node=u),a.prototype.peekNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber]:null},a.prototype.getNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber++]:null},a.prototype.hasNext=function(){return this.lineNumbere)){if(0<(l=s.level-i))for(var o,a=0;a]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/i,linkURL:function(e){var t=this;return e.replace(this.urlPattern,function(e){return e.indexOf("://")<0&&(e="http://"+e),t.makeLink(e)})},makeLink:function(e){throw"Implement makeLink"},makeSubscripts:function(e){return"{}"===this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_{([^}]*)}/g,this.makeSubscript):this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_([^_]*)\b/g,this.makeSubscript):e},makeSubscript:function(e,t,i){throw"Implement makeSubscript"},imageExtensionPattern:new RegExp("("+["bmp","png","jpeg","jpg","gif","tiff","tif","xbm","xpm","pbm","pgm","ppm"].join("|")+")$","i")},void 0!==e&&(e.Converter=i),h.prototype={__proto__:i.prototype,convert:function(){var e=this.orgDocument.title?this.convertNode(this.orgDocument.title):this.untitled,t=this.tag("h1",e),i=this.convertNodes(this.orgDocument.nodes,!0),n=this.computeToc(this.documentOptions.toc),r=this.tocToHTML(n);return{title:e,titleHTML:t,contentHTML:i,tocHTML:r,toc:n,toString:function(){return t+r+"\n"+i}}},tocToHTML:function(e){function a(e){for(var t="",i=0;i":[">",null],'"':[""",null],"'":["'",null],"->":["➔",function(e,t){return this.exportOptions.translateSymbolArrow&&!t}]},replaceRegexp:null,escapeSpecialChars:function(i,n){this.replaceRegexp||(this.replaceRegexp=new RegExp(Object.keys(this.replaceMap).join("|"),"g"));var r=this.replaceMap,s=this;return i.replace(this.replaceRegexp,function(e){var t;if(r[e])return"function"!=typeof(t=r[e][1])||t.call(s,i,n)?r[e][0]:e;throw"escapeSpecialChars: Invalid match"})},postProcess:function(e,t,i){return t=this.exportOptions.exportFromLineNumber&&"number"==typeof e.fromLineNumber?this.inlineTag("div",t,{"data-line-number":e.fromLineNumber}):t},makeLink:function(e){return''+decodeURIComponent(e)+""},makeSubscript:function(e,t,i){return''+t+''+i+""},attributesObjectToString:function(e){var t,i="";for(t in e)e.hasOwnProperty(t)&&(i+=" "+t+'="'+e[t]+'"');return i},inlineTag:function(e,t,i,n){var r="<"+e;return n&&(r+=" "+n),r+=this.attributesObjectToString(i=i||{}),null===t?r+"/>":r+">"+t+""},tag:function(e,t,i,n){return this.inlineTag(e,t,i,n)+"\n"}},void 0!==e&&(e.ConverterHTML=h),e}();(function(){function l(e,i){var t,n;return i=o(e,i),(e=r.modules[i])||("function"==typeof(e=r.payloads[i])&&(t={id:i,uri:"",exports:n={},packaged:!0},n=e(function(e,t){return s(i,e,t)},n,t)||t.exports,r.modules[i]=n,delete r.payloads[i]),e=r.modules[i]=n||e),e}var e,t,i=function(){return this}(),r=(i||"undefined"==typeof window||(i=window),function(e,t,i){"string"!=typeof e?r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(i=t),r.modules[e]||(r.payloads[e]=i,r.modules[e]=null))}),s=(r.modules={},r.payloads={},function(e,t,i){if("string"==typeof t){var n=l(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,o=t.length;s ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){var i,n;return this.end.row>t?i={row:t+1,column:0}:this.end.rowt?n={row:t+1,column:0}:this.start.row>=1)&&(e+=e);return i};var n=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,i={};for(t in e)i[t]=e[t];return i},t.copyArray=function(e){for(var t=[],i=0,n=e.length;iDate.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,i){"use strict";var N=e("../lib/event"),B=e("../lib/useragent"),z=e("../lib/dom"),H=e("../lib/lang"),U=e("../clipboard"),W=B.isChrome<18,q=B.isIE,V=63e+1?t.length:n,n+=r.length+1,r=r+"\n"+t):Y&&0=f.length&&e.value===f&&f&&e.selectionEnd!==y}),x=null,S=(this.setInputHandler=function(e){x=e},!(this.getInputHandler=function(){return x})),A=function(e,t){if(S=S&&!1,p)return w(),e&&d.onPaste(e),p=!1,"";for(var i=u.selectionStart,n=u.selectionEnd,r=v,s=f.length-y,o=e,a=e.length-i,l=e.length-n,h=0;0v-1&&f[f.length-h]==e[e.length-h];)h++,s--;a-=h-1,l-=h-1;var c=o.length-h+1;return c<0&&(r=-c,c=0),o=o.slice(0,c),t||o||a||r||s||l?(c=!(m=!0),B.isAndroid&&". "==o&&(o=" ",c=!0),o&&!r&&!s&&!a&&!l||g?d.onTextInput(o):d.onTextInput(o,{extendLeft:r,extendRight:s,restoreStart:a,restoreEnd:l}),m=!1,f=e,v=i,y=n,b=l,c?"\n":o):""},k=function(e){if(o)return T();if(e&&e.inputType){if("historyUndo"==e.inputType)return d.execCommand("undo");if("historyRedo"==e.inputType)return d.execCommand("redo")}var e=u.value,t=A(e,!0);(500this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,i=t.session.getBracketRange(e);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,i=(this.setState("selectByLines"),t.getSelectionRange());i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(i.start.row),this.$clickSelection.end=t.selection.getLineRange(i.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){var t,i,n,r,s,o,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),i=this.$lastScroll,r=(a=(n=e.domEvent.timeStamp)-i.t)?e.wheelX/a:i.vx,s=a?e.wheelY/a:i.vy,a<550&&(r=(r+i.vx)/2,s=(s+i.vy)/2),a=!1,1<=(o=Math.abs(r/s))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=o<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?i.allowed=n:n-i.allowed<550&&(Math.abs(r)<=1.5*Math.abs(i.vx)&&Math.abs(s)<=1.5*Math.abs(i.vy)?(a=!0,i.allowed=n):i.allowed=0),i.t=n,i.vx=r,i.vy=s,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}).call(n.prototype),t.DefaultHandlers=n}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var r=e("./lib/dom");(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),t.Tooltip=n}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";function d(e){o.call(this,e)}var u=e("../lib/dom"),n=e("../lib/oop"),p=e("../lib/event"),o=e("../tooltip").Tooltip;n.inherits(d,o),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();i<(e+=15)+r&&(e-=e+r-i),n<(t+=15)+s&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(d.prototype),t.GutterHandler=function(n){function r(){i=i&&clearTimeout(i),a&&(c.hide(),a=null,l._signal("hideGutterTooltip",c),l.off("mousewheel",r))}function s(e){c.setPosition(e.x,e.y)}var i,o,a,l=n.editor,h=l.renderer.$gutterLayer,c=new d(l.container);n.editor.setDefaultHandler("guttermousedown",function(e){if(l.isFocused()&&0==e.getButton()){var t=h.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,i=l.session.selection;if(e.getShiftKey())i.selectTo(t,0);else{if(2==e.domEvent.detail)return l.selectAll(),e.preventDefault();n.$clickSelection=l.selection.getLineRange(t)}return n.setState("selectByLines"),n.captureMouse(e),e.preventDefault()}}}),n.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(u.hasCssClass(t,"ace_fold-widget"))return r();a&&n.$tooltipFollowsMouse&&s(e),o=e,i=i||setTimeout(function(){i=null,(o&&!n.isMousePressed?function(){var e=o.getDocumentPosition().row,t=h.$annotations[e];if(!t)return r();if(e==l.session.getLength()){var e=l.renderer.pixelToScreenCoordinates(0,o.y).row,i=o.$pos;if(e>l.session.documentToScreenRow(i.row,i.column))return r()}a!=t&&(a=t.text.join("
"),c.setHtml(a),c.show(),l._signal("showGutterTooltip",c),l.on("mousewheel",r),n.$tooltipFollowsMouse?s(o):(e=o.domEvent.target.getBoundingClientRect(),(i=c.getElement().style).left=e.right+"px",i.top=e.bottom+"px"))}:r)()},50)}),p.addListener(l.renderer.$gutter,"mouseout",function(e){o=null,a&&(i=i||setTimeout(function(){i=null,r()},50))},l),l.on("changeSession",r)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),r=e("../lib/useragent"),e=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(e.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";function n(t){function e(){var e,t,i,n,r,s,o,a,l=u;u=y.renderer.screenToTextCoordinates(h,c),r=u,s=l,o=Date.now(),a=!s||r.row!=s.row,s=!s||r.column!=s.column,!f||a||s?(y.moveCursorToPosition(r),f=o,v={x:h,y:c}):5this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),C.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;C.isIE&&"dragReady"==this.state&&3i&&(m=-1),u=e.clientX=o,p=e.clientY=s,S=A=0,new k(e,c));if(v=o.getDocumentPosition(),r-m<500&&1==t.length&&!w)x++,e.preventDefault(),e.button=0,f=null,clearTimeout(f),c.selection.moveToPosition(v),(s=2<=x?c.selection.getLineRange(v.row):c.session.getBracketRange(v))&&!s.isEmpty()?c.selection.setRange(s):c.selection.selectWord(),b="wait";else{x=0;var o=c.selection.cursor,t=c.selection.isEmpty()?o:c.selection.anchor,s=c.renderer.$cursorLayer.getPixelPosition(o,!0),o=c.renderer.$cursorLayer.getPixelPosition(t,!0),t=c.renderer.scroller.getBoundingClientRect(),a=c.renderer.layerConfig.offset,l=c.renderer.scrollLeft,h=function(e,t){return(e/=n)*e+(t=t/i-.75)*t};if(e.clientX=t.length||(r=i[n-1])!=k&&r!=_||(l=t[n+1])!=k&&l!=_?C:(l=v?_:l)==r?l:C;case L:return(r=0=e){for(n=l+1;n=e;)n++;for(r=l,s=n-1;r>8;return 0==i?191M&&t[a]t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var i=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(i.row,i.column,t.row,t.column)},this.$setSelection=function(e,t,i,n){var r,s;!this.$silent&&(r=this.$isEmpty,s=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(i,n),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){var i;return void 0===t&&(e=(i=e||this.lead).row,t=i.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},this.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,i=this.session.getFoldLine(e),i=i?(e=i.start.row,i.end.row):e;return!0===t?new a(e,0,i,this.session.getLine(i).length):new a(e,0,i+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,i){var n=e.column,r=e.column+t;return i<0&&(n=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),eh&&(u=e.substring(h,f-g.length),d.type==p?d.value+=u:(d.type&&l.push(d),d={type:p,value:u}));for(var v=0;vy){for(c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,i=e[t].start;if(void 0===i)for(i=0;0e.length&&(w=e.length)}),l==1/0&&(l=w,a=o=!1),c&&l%h!=0&&(l=Math.floor(l/h)*h),t(a?d:p)},this.toggleBlockComment=function(e,t,i,n){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(u=new g(t,n.row,n.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.start))){var h=u.getCurrentTokenRow(),c=u.getCurrentTokenColumn()+p,d=new f(h,c,h,c+r.start.length);break}a=u.stepBackward()}for(var u,p,a=(u=new g(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.end))){var h=u.getCurrentTokenRow(),c=u.getCurrentTokenColumn()+p,m=new f(h,c,h,c+r.end.length);break}a=u.stepForward()}m&&t.remove(m),d&&(t.remove(d),s=d.start.row,o=-r.start.length)}else o=r.start.length,s=i.start.row,t.insert(i.end,r.end),t.insert(i.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var n in this.$embeds=[],this.$modes={},e){var t,i,r;e[n]&&(i=(t=e[n]).prototype.$id,(r=o.$modes[i])||(o.$modes[i]=r=new t),o.$modes[n]||(o.$modes[n]=r),this.$embeds.push(n),this.$modes[n]=r)}for(var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],n=0;nthis.row||(e=e,t={row:this.row,column:this.column},i=this.$insertRight,n=((o="insert"==e.action)?1:-1)*(e.end.row-e.start.row),r=(o?1:-1)*(e.end.column-e.start.column),s=e.start,o=o?s:e.end,e=a(t,s,i)?{row:t.row,column:t.column}:a(o,t,!i)?{row:t.row+n,column:t.column+(t.row==o.row?r:0)}:{row:s.row,column:s.column},this.setPosition(e.row,e.column,!0))},this.setPosition=function(e,t,i){i=i?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==i.row&&this.column==i.column||(e={row:this.row,column:this.column},this.row=i.row,this.column=i.column,this._signal("change",{old:e,value:i}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}.call(e.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,i){"use strict";function n(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}var r=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,l=e("./anchor").Anchor;(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new l(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t,i;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),i=t.length-1,e.end.row-e.start.row==i&&(t[i]=t[i].substring(0,e.end.column))),t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var i=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},this.clippedPos=function(e,t){var i=this.getLength(),i=(void 0===e?e=i:e<0?e=0:i<=e&&(e=i-1,t=void 0),this.getLine(e));return null==t&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var i=0,i=(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens}}).call(n.prototype),t.BackgroundTokenizer=n}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";function n(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"}var h=e("./lib/lang"),c=(e("./lib/oop"),e("./range").Range);(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,n){if(this.regExp)for(var r=n.firstRow,s=n.lastRow,o=r;o<=s;o++){var a=this.cache[o];null==a&&(a=(a=(a=h.getMatchOffsets(i.getLine(o),this.regExp)).length>this.MAX_RANGES?a.slice(0,this.MAX_RANGES):a).map(function(e){return new c(o,e.offset,o,e.offset+e.length)}),this.cache[o]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].toScreenRange(i),this.clazz,n)}}}).call(n.prototype),t.SearchHighlight=n}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var n=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),0=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){var n,r,s=0,o=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;lt||i[i.length-1].start.row=n);o++);if("insert"==e.action)for(var l=r-n,h=-t.column+i.column;on)break;c.start.row==n&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=h,c.start.row+=l)),c.end.row==n&&c.end.column>=t.column&&(c.end.column==t.column&&this.$bias<0||(c.end.column==t.column&&0c.start.column&&c.end.column==s[o+1].start.column&&(c.end.column-=h),c.end.column+=h,c.end.row+=l))}else for(var c,l=n-r,h=t.column-i.column;or)break;c.end.rowt.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=h,c.end.row+=l):c.end.row>r&&(c.end.row+=l),c.start.rowt.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=h,c.start.row+=l):c.start.row>r&&(c.start.row+=l)}if(0!=l&&o=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(-1==(n=t?i.indexOf(t):n)&&(n=0);n=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;ra)break}while(r&&o.test(r.type));r=n.stepBackward()}else r=n.getCurrentToken();return s.end.row=n.getCurrentTokenRow(),s.end.column=n.getCurrentTokenColumn()+r.value.length-2,s}},this.foldAll=function(e,t,i,n){null==i&&(i=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var s,o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=i,this.addFold("...",s))}},this.foldToLevel=function(e){for(this.foldAll();0=e)break}n--}return{range:-1!==n&&s,firstRange:o}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,i)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var i,n,r,s;if(this.getFoldWidget)return i=this.getFoldWidget(e),n=this.getLine(e),(n=this.getFoldAt(e,-1==(i="end"===i?-1:1)?0:n.length,i))?(t.children||t.all?this.removeFold(n):this.expandFold(n),n):(i=this.getFoldWidgetRange(e,!0))&&!i.isMultiLine()&&(n=this.getFoldAt(i.start.row,i.start.column,1))&&i.isEqual(n.range)?(this.removeFold(n),n):(t.siblings?((n=this.getParentFoldRangeData(e)).range&&(r=n.range.start.row+1,s=n.range.end.row),this.foldAll(r,s,t.all?1e4:0)):t.children?(s=i?i.end.row:this.getLength(),this.foldAll(e+1,s,t.all?1e4:0)):i&&(t.all&&(i.collapseChildren=1e4),this.addFold("...",i)),i)},this.toggleFoldWidget=function(e){var t,i=this.selection.getCursor().row;i=this.getRowFoldStart(i),!this.$toggleFoldWidget(i,{})&&(t=(t=this.getParentFoldRangeData(i,!0)).range||t.firstRange)&&(i=t.start.row,(i=this.getFoldAt(i,this.getLine(i).length,1))?this.removeFold(i):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;0==i?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+i,null):((e=Array(1+i)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var d=e("../token_iterator").TokenIterator,a=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,i,n=this.getLine(e.row),r=!0,s=n.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=n.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),r=!1),!o)return null;if(o[1]){if(!(i=this.$findClosingBracket(o[1],e)))return null;t=a.fromPoints(e,i),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(i=this.$findOpeningBracket(o[2],e)))return null;t=a.fromPoints(i,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),i=t.charAt(e.column-1),n=i&&i.match(/([\(\[\{])|([\)\]\}])/);return n||(i=t.charAt(e.column),e={row:e.row,column:e.column+1},n=i&&i.match(/([\(\[\{])|([\)\]\}])/)),n?(t=new a(e.row,e.column-1,e.row,e.column),(i=n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e))?[t,new a(i.row,i.column,i.row,i.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new d(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){i=i||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn()-2,l=o.value;;){for(;0<=a;){var h=l.charAt(a);if(h==n){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else h==e&&(r+=1);--a}for(;(o=s.stepBackward())&&!i.test(o.type););if(null==o)break;a=(l=o.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var n=this.$brackets[e],r=1,s=new d(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){i=i||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn();;){for(var l=o.value,h=l.length;a>1,s=e[r];if(st&&(t=e.screenWidth)}),this.lineWidgetWidth=t)},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),i=this.$rowLengthCache,n=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=t.length,l=0;ln&&(n=i[l])}this.screenWidth=n}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=e.length-1;-1!=i;i--){var n=e[i];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var i=0;ie.end.column&&(t.start.column+=s),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=s),r&&t.start.row>=e.end.row&&(t.start.row+=r,t.end.row+=r)),t.end=this.insert(t.start,o),a.length&&(n=e.start,i=t.start,r=i.row-n.row,s=i.column-n.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==n.row&&(e.start.column+=s),e.end.row==n.row&&(e.end.column+=s),e.start.row+=r,e.end.row+=r,e}))),t},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new d(0,0,0,0),n=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var s=this.getLine(r);i.start.row=r,i.end.row=r;for(var o=0;othis.doc.getLength()-1)return 0;n=r-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var r=new d(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),i=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,i),r.length&&this.addFolds(r),n},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){var i;return t=Math.max(0,t),t=e<0?e=0:(i=this.doc.getLength())<=e?this.doc.getLine(e=i-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var i=this.$wrapLimitRange,t=(i.max<0&&(i={min:t,max:t}),this.$constrainWrapLimit(e,i.min,i.max));return t!=this.$wrapLimit&&1=r.row&&p.shiftRow(-a);o=s}else{var d=Array(a),u=(d.unshift(s,0),t?this.$wrapData:this.$rowLengthCache),h=(u.splice.apply(u,d),this.$foldData),c=0;for((p=this.getFoldLine(s))&&(0==(u=p.range.compareInside(n.row,n.column))?(p=p.split(n.row,n.column))&&(p.shiftRow(a),p.addRemoveChars(o,0,r.column-n.column)):-1==u&&(p.addRemoveChars(s,0,r.column-n.column),p.shiftRow(a)),c=h.indexOf(p)+1);c=s&&p.shiftRow(a)}else{var p,a=Math.abs(e.start.column-e.end.column);"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(s))&&p.addRemoveChars(s,n.column,a)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var o,i,a=this.doc.getAllLines(),n=this.getTabSize(),r=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(i=this.getFoldLine(l,i))?(o=[],i.walk(function(e,t,i,n){var r;if(null!=e){(r=this.$getDisplayTokens(e,o.length))[0]=m;for(var s=1;s>2)),a-1);pc[u-1]):!u,this.getLength()-1),m=this.getNextFoldLine(o),g=m?m.start.row:1/0;l<=e&&!(ea[h-1]):!h,this.getNextFoldLine(o)),d=c?c.start.row:1/0;o=p[m];)n++,m++;u=u.substring(p[m-1]||0,u.length),l=0d||(r.push(o=new b(h,d,h+a-1,u)),2v&&r[c].end.row==i.end.row;)c--;for(r=r.slice(p,c+1),p=0,c=r.length;p=r.length)break;d.lastIndex=a+=1}if(n.index+o>t)break;s.push(n.index,o)}for(var l=s.length-1;0<=l;l-=2){var h=s[l-1];if(i(e,h,e,h+(o=s[l])))return!0}}:function(e,t,i){var n=c.getLine(e);for(d.lastIndex=t;r=d.exec(n);){var r,s=r[0].length;if(i(e,r=r.index,e,r+s))return!0;if(!s&&(d.lastIndex=r+=1,r>=n.length))return!1}},{forEach:a?function(e){var t=n.row;if(!o(t,n.column,e)){for(t--;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return;if(0!=i.wrap)for(t=s,r=n.row;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return}}:function(e){var t=n.row;if(!o(t,n.column,e)){for(t+=1;t<=s;t++)if(o(t,0,e))return;if(0!=i.wrap)for(t=r,s=n.row;t<=s;t++)if(o(t,0,e))return}}})}}).call(n.prototype),t.Search=n}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){n.call(this,e,t),this.$singleCommand=!1}var a=e("../lib/keys"),s=e("../lib/useragent"),l=a.KEY_MODS;r.prototype=n.prototype,function(){function o(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var i,n=e&&("string"==typeof e?e:e.name),r=(e=this.commands[n],t||delete this.commands[n],this.commandKeyBinding);for(i in r){var s,o=r[i];o==e?delete r[i]:Array.isArray(o)&&-1!=(s=o.indexOf(e))&&(o.splice(s,1),1==o.length)&&(r[i]=o[0])}},this.bindKey=function(e,n,r){if("object"==typeof e&&e&&(null==r&&(r=e.position),e=e[this.platform]),e)return"function"==typeof n?this.addCommand({exec:n,bindKey:e,name:n.name||e}):void e.split("|").forEach(function(e){var t="",i=(-1!=e.indexOf(" ")&&(e=(i=e.split(/\s+/)).pop(),i.forEach(function(e){e=this.parseKeys(e),e=l[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=l[i.hashId]+i.key;this._addCommandToBinding(t+e,n,r)},this)},this._addCommandToBinding=function(e,t,i){var n=this.commandKeyBinding;if(t)if(!n[e]||this.$singleCommand)n[e]=t;else{Array.isArray(n[e])?-1!=(s=n[e].indexOf(t))&&n[e].splice(s,1):n[e]=[n[e]],"number"!=typeof i&&(i=o(t));for(var r=n[e],s=0;st?t+1:t,e.selection.moveCursorTo(i.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,r=[];n.length<1&&(n=[e.selection.getRange()]);for(var s=0;s=n.lastRow||i.end.row<=n.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){var t,i,n,r;this.$mergeUndoDeltas&&(t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(r=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0):n=n&&-1!==i.indexOf(e.command.name),(n="always"!=this.$mergeUndoDeltas&&2e3"===n.value&&a--),n&&0<=a;);else{do{if(n=l,l=i.stepBackward(),n)if(-1!==n.type.indexOf("tag-name"))s===n.value&&("<"===l.value?a++:""===n.value){for(var h=0,c=l;c;){if(-1!==c.type.indexOf("tag-name")&&c.value===s){a--;break}if("<"===c.value)break;c=i.stepBackward(),h++}for(var d=0;da.search(/\S|$/)&&(t=a.substr(s.column).search(/\S|$/),n.doc.removeInLine(s.row,s.column,s.column+t))),this.clearSelection(),s.column),t=n.getState(s.row),a=n.getLine(s.row),l=r.checkOutdent(t,a,e);n.insert(s,e),i&&i.selection&&(2==i.selection.length?this.selection.setSelectionRange(new f(s.row,o+i.selection[0],s.row,o+i.selection[1])):this.selection.setSelectionRange(new f(s.row+i.selection[0],i.selection[1],s.row+i.selection[2],i.selection[3]))),this.$enableAutoIndent&&(n.getDocument().isNewLine(e)&&(o=r.getNextLineIndent(t,a.slice(0,s.column),n.getTabString()),n.insert({row:s.row+1,column:0},o)),l)&&r.autoOutdent(t,n,s.row)},this.autoIndent=function(){for(var e,t,i,n,r,s=this.session,o=s.getMode(),a=(i=this.selection.isEmpty()?(t=0,s.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row),""),l="",h=s.getTabString(),c=t;c<=i;c++)0t.toLowerCase()?1:0});for(var r=new f(0,0,0,0),n=e.first;n<=e.last;n++){var s=t.getLine(n);r.start.row=n,r.end.row=n,r.end.column=s.length,t.replace(r,i[n-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){for(var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g,n=(i.lastIndex=0,this.session.getLine(e));i.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t,i,n,r=this.selection.getCursor().row,s=this.selection.getCursor().column,o=new f(r,s-1,r,s),o=this.session.getTextRange(o);!isNaN(parseFloat(o))&&isFinite(o)?(o=this.getNumberAt(r,s))&&(n=0<=o.value.indexOf(".")?o.start+o.value.indexOf(".")+1:o.end,t=o.start+o.value.length-n,i=parseFloat(o.value),i*=Math.pow(10,t),n!==o.end&&sp+1)break;p=m.last}for(c--,a=this.session.$moveLines(u,p,t?0:e),t&&-1==e&&(d=c+1);d<=c;)o[d].moveBy(a,0),d++;l+=a=t?a:0}i.fromOrientedRange(i.ranges[0]),i.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var i=this.renderer,n=this.renderer.layerConfig,r=e*Math.floor(n.height/n.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),i.scrollTop);i.scrollBy(0,r*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(e)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,i,n){this.renderer.scrollToLine(e,t,i,n)},this.centerSelection=function(){var e=this.getSelectionRange(),e={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var i=this.getCursorPosition(),n=new b(this.session,i.row,i.column),r=n.getCurrentToken(),s=r||n.stepForward();if(s){var o,a,l,h=!1,c={},d=i.column-s.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;dwindow.innerHeight)&&null)&&(o.style.top=i+"px",o.style.left=e.left+"px",o.style.height=t.lineHeight+"px",o.scrollIntoView(s)),s=n=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",i))})},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(t,i,n){var r=this;y.loadModule("./ext/prompt",function(e){e.prompt(r,t,i,n)})}}.call(r.prototype),y.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),n.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),n.addCssClass(this.container,"ace_hasPlaceholder"),(e=n.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),{getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,i){return Math.max(t.toString().length,(i.lastRow+1).toString().length,2)*i.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}});t.Editor=r}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,i){"use strict";function r(e,t){for(var i=t;i--;){var n=e[i];if(n&&!n[0].ignore){for(;i"+e.end.row+":"+e.end.column}function o(e,t){var i="insert"==e.action,n="insert"==t.action;if(i&&n)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(i&&!n)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}else if(!i&&n)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(!i&&!n)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,i){h(e.start,t.start,t.end,i),h(e.end,t.start,t.end,i)}function h(e,t,i,n){e.row==(1==n?t:i).row&&(e.column+=n*(i.column-t.column)),e.row+=n*(i.row-t.row)}function c(e,t){var i=e.lines,n=e.end,r=(e.end=a(t),e.end.row-e.start.row),s=i.splice(r,i.length),r=r?t.column:t.column-e.start.column;return i.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:n,lines:s,action:e.action}}function d(e,t){var i;t={start:a((i=t).start),end:a(i.end),action:i.action,lines:i.lines.slice()};for(var n=e.length;n--;){for(var r=e[n],s=0;sa+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,e,this.session,h),this.$lines.push(o)),this.$renderCell(o,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,i=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"",n=((this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+n-1),i?i.getWidth(t,r,e):r.toString().length*e.characterWidth),i=this.$padding||this.$computePadding();(n+=i.left+i.right)===this.gutterWidth||isNaN(n)||(this.gutterWidth=n,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",n))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var i=0;i=this.$cursorRow){if(n.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0i.right-t.right?"foldWidgets":void 0}}).call(n.prototype),t.Gutter=n}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}var p=e("../range").Range,r=e("../lib/dom");(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=t,i.className=e},this.update=function(e){if(e){var t,i;for(i in this.config=e,this.i=0,this.markers){var n,r,s,o=this.markers[i];o.range?(s=o.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(s=s.toScreenRange(this.session),o.renderer?(n=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth,o.renderer(t,s,r,n,e)):"fullLine"==o.type?this.drawFullLineMarker(t,s,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,s,o.clazz,e):s.isMultiLine()?"text"==o.type?this.drawTextMarker(t,s,o.clazz,e):this.drawMultiLineMarker(t,s,o.clazz,e):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",e)):o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ie.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,i){for(var n=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o=s;)o=this.$renderToken(a,o,h,c.substring(0,s-n)),c=c.substring(s-n),n=s,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(v.stringRepeat(" ",i.indent),this.element)),o=0,s=i[++r]||Number.MAX_VALUE;0!=c.length&&(n+=c.length,o=this.$renderToken(a,o,h,c))}}i[i.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,o,null,"",!0)},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],r=n.value;(r=this.displayIndentGuides?this.renderIndentGuide(e,r):r)&&(i=this.$renderToken(e,i,n,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,i,n,r);i=this.$renderToken(e,i,n,r)}},this.$renderOverflowMessage=function(e,t,i,n,r){i&&this.$renderToken(e,t,i,n.slice(0,this.MAX_LINE_LENGTH-t));i=this.dom.createElement("span");i.className="ace_inline_button ace_keyword ace_toggle_wrap",i.textContent=r?"":"",e.appendChild(i)},this.$renderLine=function(e,t,i){var n,r,s=e;(n=(i=i||0==i?i:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,i):this.session.getTokens(t)).length?(r=this.session.getRowSplitData(t))&&r.length?(this.$renderWrappedLine(e,n,r),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,n)):this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.showEOL&&s&&(i&&(t=i.end.row),(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(r))},this.$getFoldLineTokens=function(e,t){var d=this.session,u=[],p=d.getTokens(e);return t.walk(function(e,t,i,n,r){if(null!=e)u.push({type:"fold",value:e});else if((p=r?d.getTokens(t):p).length){for(var s,o=p,a=n,l=i,h=0,c=0;c+o[h].value.lengthl-a&&(s=s.substring(0,l-a)),u.push({type:o[h].type,value:s}),c=a+s.length,h+=1);cl?u.push({type:o[h].type,value:s.substring(0,l-c)}):u.push(o[h]),c+=s.length,h+=1}},t.end.row,this.session.getLine(t.end.row).length),u},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(n.prototype),t.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.element=h.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),h.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}var h=e("../lib/dom");(function(){this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)h.setStyle(t[i].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){h.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){h.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,h.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=h.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){var e;if(1e.height+e.offset||a.top<0)&&1n;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?h.addCssClass(this.element,"ace_overwrite-cursors"):h.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(n.prototype),t.Cursor=n}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}function r(e,t){n.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=a.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}function s(e,t){n.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"}var o=e("./lib/oop"),a=e("./lib/dom"),l=e("./lib/event"),h=e("./lib/event_emitter").EventEmitter;!function(){o.implement(this,h),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}.call(n.prototype),o.inherits(r,n),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(r.prototype);o.inherits(s,n),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(s.prototype),t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=s,t.VScrollBar=r,t.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";function n(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var i=this;this._flush=function(e){i.pending=!1;var t=i.changes;t&&(r.blockIdle(100),i.changes=0,i.onRender(t)),i.changes?i.$recursionLimit--<0||i.schedule():i.$recursionLimit=2}}var r=e("./lib/event");(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(n.prototype),t.RenderLoop=n}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,i){var n=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,h="function"==typeof ResizeObserver,e=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",256),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};!function(){n.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e}))},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){var t;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(t=this).$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=r.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},this.transformCoordinates=function(e,t){function i(e,t,i){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*i[0]+t[0]*i[1])/n,(+e[1]*i[0]-e[0]*i[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function o(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&s(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l=o(this.els[0]),h=o(this.els[1]),c=o(this.els[2]),d=o(this.els[3]),d=i(n(d,h),n(d,c),n(r(h,c),r(d,l))),h=s(1+d[0],n(h,l)),c=s(1+d[1],n(c,l));return t?(a=d[0]*t[0]/200+d[1]*t[1]/200+1,t=r(s(t[0],h),s(t[1],c)),r(s(1/a/200,t),l)):(a=n(e,l),t=i(n(h,s(d[0],a)),n(c,s(d[1],a)),a),s(200,t))}}.call(e.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,i){"use strict";function n(e,t){var i=this,e=(this.container=e||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),this.$textLayer=new h(this.content));this.canvas=e.element,this.$markerFront=new l(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new d(this.container,this),this.scrollBarV.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!v.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)}var r=e("./lib/oop"),a=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,h=e("./layer/text").Text,c=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,f='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',v=e("./lib/useragent"),y=v.isIE;a.importCssString(f,"ace_editor.css");(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,i){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,i,n){if(!(2o.height-n?a.translate(this.textarea,0,0):(o=1,r=this.$size.height-n,s?s.useTextareaForIME?(s=this.textarea.value,o=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(i-=this.scrollLeft)>this.$size.scrollerWidth-o&&(i=this.$size.scrollerWidth-o),i+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",n+"px"),a.setStyle(e,"width",o+"px"),a.translate(this.textarea,Math.min(i,this.$size.scrollerWidth-o),Math.min(t,r)))):a.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,i,n){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,i,n){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|n,r.left=0|i,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t)&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var i,n,t=this.layerConfig;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(i=this.scrollTop+(t.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=i,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),i=t.width+2*this.$padding+"px",n=t.minHeight+"px",a.setStyle(this.content.style,"width",i),a.setStyle(this.content.style,"height",n)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(t):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight());t=!((i=this.$maxPixelHeight&&i>this.$maxPixelHeight?this.$maxPixelHeight:i)<=2*this.lineHeight)&&tc.top)),h=o!==n,c=(h&&(this.$vScroll=n,this.scrollBarV.setVisible(n)),this.scrollTop%this.lineHeight),o=Math.ceil(l/this.lineHeight)-1,o=(n=Math.max(0,Math.round((this.scrollTop-c)/this.lineHeight)))+o,d=this.lineHeight,n=t.screenToDocumentRow(n,0),u=t.getFoldLine(n),t=(u&&(n=u.start.row),u=t.documentToScreenRow(n,0),e=t.getRowLength(n)*d,o=Math.min(t.screenToDocumentRow(o,0),t.getLength()-1),l=i.scrollerHeight+t.getRowLength(o)*d+e,c=this.scrollTop-u*d,0);return this.layerConfig.width==s&&!a||(t=this.CHANGE_H_SCROLL),(a||h)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,i.width,i.height),this._signal("scrollbarVisibilityChanged"),h)&&(s=this.$getLongestLine()),this.layerConfig={width:s,padding:this.$padding,firstRow:n,firstRowScreen:u,lastRow:o,lineHeight:d,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:c,gutterOffset:d?Math.max(0,Math.ceil((c+i.height-i.scrollerHeight)/d)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),t},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,i=(this.$changedLines=null,this.layerConfig);if(!(e>i.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){var n,r,s;0!==this.$size.scrollerHeight&&(n=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,s=i&&i.top||0,i=i&&i.bottom||0,e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+s?(t&&r+s>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-i=1-this.scrollMargin.top||0=1-this.scrollMargin.left||0this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(h.prototype);e.UIWorkerClient=function(e,t,i){var n=null,r=!1,s=Object.create(c),o=[],a=new h({messageBuffer:o,terminate:function(){},postMessage:function(e){o.push(e),n&&(r?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){r=e},function(){var e=o.shift();e.command?n[e.command].apply(n,e.args):e.event&&s._signal(e.event,e.data)});return s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},d.loadModule(["worker",t],function(e){for(n=new e[i](s);o.length;)l()}),a},e.WorkerClient=h,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";function n(e,t,i,n,r,s){var o=this,t=(this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=i,e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}var l=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop");(function(){s.implement(this,r),this.setup=function(){var t=this,i=this.doc,e=this.session,n=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column),this.pos);n.$insertRight=!0,n.detach(),n.markerId=e.addMarker(new l(n.row,n.column,n.row,n.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=i.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){var t,i;this.othersActive||(t=this.session,(i=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+i.length),i.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),n&&(this.length+=i),n&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var o={row:(a=this.others[s]).row,column:a.column+r};this.doc.insertMergedLines(o,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var a,o={row:(a=this.others[s]).row,column:a.column+r};this.doc.remove(new l(o.row,o.column,o.row,o.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var i=this,n=this.session,e=function(e,t){n.removeMarker(e.markerId),e.markerId=n.addMarker(new l(e.row,e.column,e.row,e.column+i.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},this.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e)))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,i=0;is&&(s=e.column),(t=-1==t?0:t)t[1].length&&(r=t[1].length),st[3].length&&(o=t[3].length)),t):[e]}).map(t?n:a?l?function(e){return e[2]?i(r+s-e[2].length)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:n:function(e){return e[2]?i(r)+e[2]+i(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(h.prototype),r.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},r.MultiSelect=i,e("./config").defineOptions(h.prototype,"editor",{enableMultiselect:{set:function(e){i(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,i){"use strict";var c=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){e=e.getLine(i);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var n=/\S/,r=e.getLine(t),s=r.search(n);if(-1!=s){for(var o,i=i||r.length,a=e.getLength(),r=t,l=t;++ti.row&&(n.row--,n.column=e.getLine(n.row).length),c.fromPoints(i,n)},this.closingBracketBlock=function(e,t,i,n,r){i={row:i,column:n},n=e.$findOpeningBracket(t,i);if(n)return n.column++,i.column--,c.fromPoints(n,i)}}.call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/dom");(function(){this.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var t=e.data,n=t.start.row,r=t.end.row,s="add"==e.action,o=n+1;or[t].column&&t++,n.unshift(t,0),r.splice.apply(r,n)),this.$updateRows())},this.$updateRows=function(){var i,e=this.session.lineWidgets;e&&(i=!0,e.forEach(function(e,t){if(e)for(i=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),i)&&(this.session.lineWidgets=null)},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},this.addLineWidget=function(e){var t,i,n;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight)&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),i=this.session.getFoldAt(e.row,0),(e.$fold=i)&&(n=this.session.lineWidgets,e.row!=i.end.row||n[i.start.row]?e.hidden=!0:n[i.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,i=t&&t[e],n=[];i;)n.push(i),i=i.$oldWidget;return n},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var i=this.session._changedWidgets,n=t.layerConfig;if(i&&i.length){for(var r=1/0,s=0;s>1,o=i(t,e[s]);if(0=n.length?r=0"),s.appendChild(d.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),n.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},d.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,s,t){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),a=e("./lib/event"),i=e("./range").Range,l=e("./editor").Editor,n=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,h=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),s.config=e("./config"),s.require=e,"function"==typeof define&&(s.define=define),s.edit=function(e,t){if("string"==typeof e){var i=e;if(!(e=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}var n,r;return e&&e.env&&e.env.editor instanceof l?e.env.editor:(i="",e&&/input|textarea/i.test(e.tagName)?(i=(n=e).value,e=o.createElement("pre"),n.parentNode.replaceChild(e,n)):e&&(i=e.textContent,e.innerHTML=""),i=s.createEditSession(i),e=new l(new h(e),i,t),r={document:i,editor:e,onResize:e.resize.bind(e,null)},n&&(r.textarea=n),a.addListener(window,"resize",r.onResize),e.on("destroy",function(){a.removeListener(window,"resize",r.onResize),r.editor.container.env=null}),e.container.env=e.env=r,e)},s.createEditSession=function(e,t){e=new n(e,t);return e.setUndoManager(new r),e},s.Range=i,s.Editor=l,s.EditSession=n,s.UndoManager=r,s.VirtualRenderer=h,s.version=s.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace.default=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(i){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",require:"?ngModel",link:function(o,e,a,n){function r(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);angular.isDefined(e)&&o.$evalAsync(function(){if(!angular.isFunction(e))throw new Error("ui-ace use a function as callback.");e(t)})}function t(e,t){if(e!==t){(d=angular.extend({},c,o.$eval(a.uiAce))).callbacks=[d.onLoad],d.onLoad!==c.onLoad&&d.callbacks.unshift(c.onLoad),p.removeListener("change",l),l=m(d.onChange),p.on("change",l),u.removeListener("blur",h),h=g(d.onBlur),u.on("blur",h);var i,n,r=u,e=p,s=d;if(angular.isDefined(s.workerPath)&&window.ace.require("ace/config").set("workerPath",s.workerPath),angular.isDefined(s.require)&&s.require.forEach(function(e){window.ace.require(e)}),angular.isDefined(s.showGutter)&&r.renderer.setShowGutter(s.showGutter),angular.isDefined(s.useWrapMode)&&e.setUseWrapMode(s.useWrapMode),angular.isDefined(s.showInvisibles)&&r.renderer.setShowInvisibles(s.showInvisibles),angular.isDefined(s.showIndentGuides)&&r.renderer.setDisplayIndentGuides(s.showIndentGuides),angular.isDefined(s.useSoftTabs)&&e.setUseSoftTabs(s.useSoftTabs),angular.isDefined(s.showPrintMargin)&&r.setShowPrintMargin(s.showPrintMargin),angular.isDefined(s.disableSearch)&&s.disableSearch&&r.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isString(s.theme)&&r.setTheme("ace/theme/"+s.theme),angular.isString(s.mode)&&e.setMode("ace/mode/"+s.mode),angular.isDefined(s.firstLineNumber)&&(angular.isNumber(s.firstLineNumber)?e.setOption("firstLineNumber",s.firstLineNumber):angular.isFunction(s.firstLineNumber)&&e.setOption("firstLineNumber",s.firstLineNumber())),angular.isDefined(s.advanced))for(i in s.advanced)n={name:i,value:s.advanced[i]},r.setOption(n.name,n.value);if(angular.isDefined(s.rendererOptions))for(i in s.rendererOptions)n={name:i,value:s.rendererOptions[i]},r.renderer.setOption(n.name,n.value);angular.forEach(s.callbacks,function(e){angular.isFunction(e)&&e(r)})}}var l,h,c=i.ace||{},d=angular.extend({},c,o.$eval(a.uiAce)),u=window.ace.edit(e[0]),p=u.getSession(),m=function(i){return function(e){var t=p.getValue();!n||t===n.$viewValue||o.$$phase||o.$root.$$phase||o.$evalAsync(function(){n.$setViewValue(t)}),r(i,e,u)}},g=function(e){return function(){r(e,u)}};a.$observe("readonly",function(e){u.setReadOnly(!!e||""===e)}),n&&(n.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-ace cannot use an object or an array as a model");return e}),n.$render=function(){p.setValue(n.$viewValue)});o.$watch(a.uiAce,t,!0),t(c),e.on("$destroy",function(){u.session.$stopWorker(),u.destroy()}),o.$watch(function(){return[e[0].offsetWidth,e[0].offsetHeight]},function(){u.resize(),u.renderer.updateFull()},!0)}}}]),angular.module("anonymous-github",["ngRoute","ngSanitize","ui.ace","ngPDFViewer","htmlDoc","pascalprecht.translate","admin"]).config(["$routeProvider","$locationProvider","$translateProvider",function(e,t,i){i.useStaticFilesLoader({prefix:"/i18n/locale-",suffix:".json"}),i.preferredLanguage("en"),e.when("/",{templateUrl:"/partials/home.htm",controller:"homeController",title:"Anonymous GitHub – Share the code, not the author"}).when("/dashboard",{templateUrl:"/partials/dashboard.htm",controller:"unifiedDashboardController",title:"Your anonymizations – Anonymous GitHub"}).when("/pr-dashboard",{redirectTo:"/dashboard"}).when("/anonymize/:repoId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"New anonymization – Anonymous GitHub"}).when("/pull-request-anonymize/:pullRequestId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a pull request – Anonymous GitHub"}).when("/gist-anonymize/:gistId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a gist – Anonymous GitHub"}).when("/status/:repoId",{templateUrl:"/partials/status.htm",controller:"statusController",title:"Repository status – Anonymous GitHub"}).when("/conferences",{templateUrl:"/partials/conferences.htm",controller:"conferencesController",title:"Your conferences – Anonymous GitHub"}).when("/conference/new",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"New conference – Anonymous GitHub"}).when("/conference/:conferenceId/edit",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"Edit conference – Anonymous GitHub"}).when("/conference/:conferenceId",{templateUrl:"/partials/conference.htm",controller:"conferenceController",title:"Conference – Anonymous GitHub"}).when("/faq",{templateUrl:"/partials/faq.htm",controller:"faqController",title:"FAQ – Anonymous GitHub"}).when("/profile",{templateUrl:"/partials/profile.htm",controller:"profileController",title:"Your settings – Anonymous GitHub"}).when("/claim",{templateUrl:"/partials/claim.htm",controller:"claimController",title:"Claim an anonymization – Anonymous GitHub"}).when("/pr/:pullRequestId/:path*?",{templateUrl:"/partials/pullRequest.htm",controller:"pullRequestController",title:"Anonymous pull request – Anonymous GitHub",reloadOnUrl:!1}).when("/gist/:gistId/:path*?",{templateUrl:"/partials/gist.htm",controller:"gistController",title:"Anonymous gist – Anonymous GitHub",reloadOnUrl:!1}).when("/r/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/repository/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/admin/",{templateUrl:"/partials/admin/overview.htm",controller:"overviewAdminController",title:"Admin · Overview – Anonymous GitHub"}).when("/admin/repositories",{templateUrl:"/partials/admin/repositories.htm",controller:"repositoriesAdminController",title:"Admin · Repositories – Anonymous GitHub"}).when("/admin/users",{templateUrl:"/partials/admin/users.htm",controller:"usersAdminController",title:"Admin · Users – Anonymous GitHub"}).when("/admin/users/:username",{templateUrl:"/partials/admin/user.htm",controller:"userAdminController",title:"Admin · User details – Anonymous GitHub"}).when("/admin/conferences",{templateUrl:"/partials/admin/conferences.htm",controller:"conferencesAdminController",title:"Admin · Conferences – Anonymous GitHub"}).when("/admin/queues",{templateUrl:"/partials/admin/queues.htm",controller:"queuesAdminController",title:"Admin · Queues – Anonymous GitHub"}).when("/admin/errors",{templateUrl:"/partials/admin/errors.htm",controller:"errorsAdminController",title:"Admin · Errors – Anonymous GitHub"}).when("/404",{templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}).otherwise({templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}),t.html5Mode(!0)}]).run(["$rootScope","$window",function(e,n){const r=/^\/(w|api|github)(\/|$)/;e.$on("$locationChangeStart",function(e,t){let i;try{i=new URL(t,n.location.href)}catch(e){return}i.origin===n.location.origin&&r.test(i.pathname)&&(e.preventDefault(),n.location.assign(i.href))})}]).filter("humanFileSize",function(){return humanFileSize}).filter("bigNum",function(){return function(e){var e=Number(e)||0,t=Math.abs(e);return t<1e3?String(e):t<1e4?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":t<1e6?Math.round(e/1e3)+"k":t<1e7?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(e/1e6)+"M"}}).filter("humanTime",function(){return function(e){if(!e)return"never";var t,i=(e="string"!=typeof(e=e instanceof Date?Math.round((Date.now()-e)/1e3):e)&&"number"!=typeof e?e:Math.round((Date.now()-new Date(e))/1e3))<0?"from now":"ago";if(172800e.replace(/&/g,"&").replace(//g,">");function d(e,t){if(t){var i=t.newPath&&"/dev/null"!==t.newPath?t.newPath:t.oldPath||"",n="/dev/null"===t.oldPath?"added":"/dev/null"===t.newPath?"deleted":t.oldPath&&t.newPath&&t.oldPath!==t.newPath?"renamed":"modified";if(e.push('
'),e.push('
'+s(i)+''+n+"
"),t.lines.length){e.push('');for(const r of t.lines)e.push('");e.push("
'+(r.oldNo||"")+''+(r.newNo||"")+''+("add"===r.kind?"+":"remove"===r.kind?"-":"hunk"===r.kind?"@":"")+''+s(r.text)+"
")}e.push("
")}}return function(e){if(!e)return e;const t=[];let i=null,n=0,r=0;var s=()=>i=i||{oldPath:"",newPath:"",lines:[]},o=()=>{i&&(i.lines.length||i.oldPath||i.newPath)&&(d(t,i),i=null)},a=e.split("\n");for(let e=0;e
',link:function(i,n){function e(){var e,t;i.file&&(i.kind=(e=i.file,"md"===(t=o(e&&e.filename))||"markdown"===t||e&&"Markdown"===e.language?"md":"code"),i.prismClass="language-"+(t=i.file,t&&t.language&&s[t.language.toLowerCase()]||s[o(t&&t.filename)]||"none"),r(()=>{n[0].querySelectorAll("pre code").forEach(e=>{window.Prism&&Prism.highlightElement(e)})},50))}i.$watch("file",e),i.$watch("file.content",e),i.$watch("terms",e),i.$watch("options",e,!0)}}}]).directive("markdown",["$location",function(r){return{restrict:"E",scope:{terms:"=",options:"=",content:"="},link:function(e,t,i){function n(){t.html(renderMD(e.content,r.url()+"/../"))}e.$watch(i.terms,n),e.$watch("terms",n),e.$watch("options",n),e.$watch("content",n)}}}]).directive("tree",[function(){return{restrict:"E",scope:{file:"=",parent:"@",searchQuery:"=",searchResults:"="},controller:["$element","$scope","$routeParams","$compile",function(i,g,n,r){if(g.repoId=document.location.pathname.split("/")[2],g.opens={},n.path){let t="";n.path.split("/").forEach(e=>{g.opens[t+"/"+e]=!0,t=t+"/"+e})}function s(e){var t,i=[];const n={"":{child:i}};for(t of e){if(t.path&&!n[t.path]){o=a=s=r=void 0;var r=t.path;if(!n[r]){var s=r.split("/");let t="";for(let e=0;e{var i=!!e.child,n=!!t.child;return i&&n?e.name.localeCompare(t.name):i?-1:n?1:e.name.localeCompare(t.name)};function v(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function y(e,t,o){if(!e)return"";let a="
    ";for(var l of e=e.sort(f))if(!o||function t(e,i,n){if(!n)return!0;const r=i?i+"/"+e.name:e.name;return e.child?!!n.folders.has(r)||e.child.some(e=>t(e,r,n)):n.paths.has(r)}(l,t?t.substring(1):"",o)){let i=!!l.child,n=l.name,r=l.size,s=l;if(i){let e=n,t=l.child;for(;t&&1==t.length;)e+="/"+t[0].name,r=t[0].size,t=t[0].child;n=e,s=t?{child:t}:l,null!=r&&0<=r&&(i=!1)}var l=null!=r?"Size: "+humanFileSize(r||0):"",h=t+"/"+n,c=i&&(d=h,c=void 0,c=g.$parent.fileCounts)&&c[d.startsWith("/")?d.substring(1):d]||0,d=o?!1!==g.opens[h]:g.opens[h],u=["file"],p=(i&&u.push("folder"),d&&u.push("open"),g.isActive(h)&&u.push("active"),i&&(m=h,p=void 0,!!(p=g.$parent.options&&g.$parent.options.truncatedFolders||[]).length)&&(m=m.startsWith("/")?m.substring(1):m,-1!==p.indexOf(m))),m=(p&&u.push("truncated"),String(h).replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/&/g,"&").replace(//g,">").replace(/"/g,"""));if(a+=`
  • `,i?(a+=`${v(n)}`,p&&(a+=``),0${c}`),a+=""):(u=""!==t,a+=`${u?'':""}${v(n)}`),d&&s.child){l=s.child;if(1"}var m,p,d,c;return a+"
"}function o(){i.html("");var e=g.searchQuery?function(){var e=g.searchResults;if(!e||!e.length)return null;var t=new Set,i=new Set;for(const r of e){var n=r.path?r.path+"/"+r.name:r.name;if(t.add(n),r.path){let e="";for(const s of r.path.split("/").filter(Boolean))e=e?e+"/"+s:s,i.add(e)}}return{paths:t,folders:i}}():null;let t;t=null!==e&&0===e.paths.size?'
No files found
':y(s(g.file).sort(f),"",e),r(t)(g,e=>{i.append(e),a&&(e=function(e){if(e)for(var t=l(),i=0;i{if(null!=e){if(0==e.length)return i.html("Empty repository");!function e(t,i){if(t)for(const r of t){var n;r.child&&0!==r.child.length&&((n=i+"/"+r.name)in g.opens||(g.opens[n]=!0),e(r.child,n))}}(s(e),""),o()}},!0),g.$watch("searchResults",(e,t)=>{e!==t&&g.file&&g.file.length&&o()}),g.$watch("searchQuery",(e,t)=>{e!==t&&!e&&g.file&&g.file.length&&o()}),g.isActive=function(e){return n.path==e.substring(1)},g.openFolder=function(e,t){var i=g.opens[e],i=(void 0===i&&g.searchQuery&&(i=!0),g.opens[e]=!i,t.target.closest("li")),t=i?i.querySelector(":scope > ul"):null;null!=t&&0!==t.children.length||g.$parent.getFiles(e.substring(1))};var a=n.path?"/"+n.path:null;function l(){return Array.from(i[0].querySelectorAll("li > a"))}function h(){return i[0].querySelector("a.tree-focused")}function c(e){var t,i;return e?(t=e.getAttribute("href"))?(i="/r/"+g.repoId,0===t.indexOf(i)?decodeURIComponent(t.substring(i.length)):null):(t=e.getAttribute("ng-click"))&&(i=t.match(/openFolder\('([^']+)'/))?i[1]:null:null}function d(e){var t=h();t&&t.classList.remove("tree-focused"),a=e?(e.classList.add("tree-focused"),e.scrollIntoView({block:"nearest"}),c(e)):null}i[0].setAttribute("tabindex","0"),i[0].addEventListener("keydown",function(e){var t,i,n,r=l();r.length&&(n=(t=h())?r.indexOf(t):-1,"ArrowDown"===e.key?(e.preventDefault(),d(r[n ul > li > a"))&&d(n):t.click())):"ArrowLeft"===e.key?(e.preventDefault(),t&&((i=t.closest("li"))&&i.classList.contains("folder")&&i.classList.contains("open")?t.click():(r=i&&i.parentElement?i.parentElement.closest("li.folder"):null)&&(n=r.querySelector(":scope > a"))&&d(n))):"Enter"===e.key&&(e.preventDefault(),t)&&t.click())}),i[0].addEventListener("click",function(e){e=e.target.closest("a");e&&i[0].contains(e)&&d(e)})}]}}]).directive("notebook",[function(){return{restrict:"E",scope:{file:"="},controller:["$element","$scope","$http",function(i,e,t){function n(e){e=nb.parse(e);try{i.html("");var t=e.render();i.html(DOMPurify.sanitize(t)),Prism.highlightAll()}catch(e){i.html("Unable to render the notebook.")}}function r(){if(e.$parent.content)try{n(JSON.parse(e.$parent.content))}catch(e){i.html("Unable to render the notebook invalid notebook format.")}else e.file&&t.get(e.file.download_url).then(e=>n(e.data))}e.$watch("file",e=>{r()}),r()}]}}]).directive("loc",[function(){return{restrict:"E",scope:{stats:"="},template:"
",controller:["$scope",function(i){function t(){for(var e in i.elements=[],i.total=0,i.stats){var t=i.stats[e].code;t&&(i.total+=t,i.elements.push({lang:e,loc:t,color:langColors[e]}))}setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},100)}i.$watch("stats",e=>{t()}),t()}]}}]).controller("mainController",["$scope","$http","$location","$timeout",function(r,e,i,t){function n(e,t){t&&(r.title=t.title),r.path=i.url(),r.paths=i.path().substring(1).split("/")}r.title="Main",r.user={status:"connection"},r.site_options,r.toasts=[],r.removeToast=function(e){e=r.toasts.indexOf(e);-1!==e&&r.toasts.splice(e,1)},r.addToast=function(e){return r.toasts.push(e),t(function(){r.removeToast(e)},8e3),e},r.path=i.url(),r.paths=i.path().substring(1).split("/"),r.darkMode=function(e){localStorage.setItem("darkMode",e);var t,i="/css/prism-okaidia.css",n="/css/prism.css",n=(((r.isDarkMode=e)?($("body").addClass("dark-mode"),(t=document.createElement("link")).href=i,t.rel="stylesheet",document.head.append(t),$(`link[href='${n}']`)):($("body").removeClass("dark-mode"),(t=document.createElement("link")).href=n,t.rel="stylesheet",document.head.append(t),$(`link[href='${i}']`))).remove(),document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap"));n&&(n.style.backgroundColor=e?"#FAF9F6":"#1A1815",n.style.color=e?"#1A1815":"#FAF9F6"),r.$broadcast("dark-mode",e)},r.darkMode("true"==localStorage.getItem("darkMode")),e.get("/api/user").then(e=>{e&&(r.user=e.data)},()=>{r.user=null}),e.get("/api/options").then(e=>{e&&(r.site_options=e.data)},()=>{r.site_options=null}),e.get("/api/message").then(e=>{e&&(r.generalMessage=e.data)},()=>{r.generalMessage=null}),r.$on("$routeChangeSuccess",n),r.$on("$routeUpdate",n)}]).controller("faqController",["$scope","$http",function(e,t){}]).controller("profileController",["$scope","$http",function(t,i){function n(){i.get("/api/user/default").then(e=>{e=e.data;e.terms&&(t.terms=e.terms.join("\n")),t.options=Object.assign({},t.options,e.options)})}t.terms="",t.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},n(),t.saveDefault=()=>{var e={terms:t.terms.trim().split("\n"),options:t.options};i.post("/api/user/default",e).then(()=>{n(),t.message="Saved"},e=>{$translate("ERRORS."+e.data.error).then(e=>{t.error=e},console.error)})},t.deleteAccount=()=>{confirm("Delete your account? All your anonymized repositories, gists, and pull requests will be removed, and your personal data will be erased. This cannot be undone.")&&(t.deletingAccount=!0,i.delete("/api/user").then(()=>{window.location.href="/"},()=>{t.deletingAccount=!1,t.deleteError="Unable to delete the account. Please try again."}))}}]).controller("claimController",["$scope","$http","$location",function(t,e,i){t.repoId=null,t.repoUrl=null,t.claim=()=>{e.post("/api/repo/claim",{repoId:t.repoId,repoUrl:t.repoUrl}).then(e=>{i.url("/dashboard")},e=>{t.error=e.data,t.claimForm.repoUrl.$setValidity("not_found",!1),t.claimForm.repoId.$setValidity("not_found",!1)})}}]).controller("homeController",["$scope","$http","$location",function(t,e,i){function n(t){var i={series:t,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(t&&!(t.length<2)){var n=new Array(t.length-1);for(let e=1;e{t.user&&!t.user.status&&i.url("/dashboard")}),t.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.get("/api/stat/").then(e=>{t.stat=e.data,t.cards[0].total=e.data.nbRepositories,t.cards[1].total=e.data.nbUsers,t.cards[2].total=e.data.nbPageViews,t.cards[3].total=e.data.nbPullRequests}),t.history={repositories:n([]),users:n([]),pageViews:n([]),pullRequests:n([])},e.get("/api/stat/history?days=60").then(e=>{e=e.data||[];t.history={repositories:n(e.map(e=>e.nbRepositories||0)),users:n(e.map(e=>e.nbUsers||0)),pageViews:n(e.map(e=>e.nbPageViews||0)),pullRequests:n(e.map(e=>e.nbPullRequests||0))}})}]).controller("unifiedDashboardController",["$scope","$http","$location",function(r,s,e){r.$on("$routeChangeStart",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),r.$watch("user.status",()=>{null==r.user&&e.url("/")}),null==r.user&&e.url("/"),setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),r.items=[],r.search="";const t="dashboard.filterPrefs",i="all",n={status:{ready:!0,expired:!0,removed:!1}},o="-anonymizeDate";var a=loadFilterPrefs(t)||{};r.typeFilter=a.typeFilter||i,r.filters={status:Object.assign({},n.status,a.filters&&a.filters.status||{})},r.orderBy=a.orderBy||o,r.$watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})}),r.$watch("filters",()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})},!0),s.get("/api/user/quota").then(e=>{r.quota=e.data,r.quota.storage.percent=r.quota.storage.total?100*r.quota.storage.used/r.quota.storage.total:100,r.quota.file.percent=r.quota.file.total?100*r.quota.file.used/r.quota.file.total:100,r.quota.repository.percent=r.quota.repository.total?100*r.quota.repository.used/r.quota.repository.total:100},console.error);let l=null,h=null,c=null;function d(){r.items=(l||[]).concat(h||[]).concat(c||[])}function u(){l=null,h=null,c=null,s.get("/api/user/anonymized_repositories").then(e=>{l=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="repo",e._id=e.repoId,e._name=e.repoId,e._source=e.source.fullName,e._editUrl="/anonymize/"+e.repoId,e._viewUrl="/r/"+e.repoId+"/",e)),d()},e=>{console.error(e)}),s.get("/api/user/anonymized_pull_requests").then(e=>{h=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="pr",e._id=e.pullRequestId,e._name=e.pullRequestId,e._source=e.source.repositoryFullName+"#"+e.source.pullRequestId,e._editUrl="/pull-request-anonymize/"+e.pullRequestId,e._viewUrl="/pr/"+e.pullRequestId+"/",e)),d()},e=>{console.error(e)}),s.get("/api/user/anonymized_gists").then(e=>{c=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=(e.options.terms||[]).filter(e=>e),e._type="gist",e._id=e.gistId,e._name=e.gistId,e._source=e.source.gistId,e._editUrl="/gist-anonymize/"+e.gistId,e._viewUrl="/gist/"+e.gistId+"/",e)),d()},e=>{console.error(e)})}function p(i,n){s.get("/api/repo/"+i).then(e=>{for(const t of r.items)if("repo"===t._type&&t.repoId==i){t.status=e.data.status;break}"ready"==e.data.status||"error"==e.data.status||"removed"==e.data.status||"expired"==e.data.status?n(e.data):setTimeout(()=>p(i,n),2500)})}u();const m=e=>"repo"===e?"repository":"gist"===e?"gist":"pull request",g=e=>"repo"===e?"/api/repo":"gist"===e?"/api/gist":"/api/pr";r.removeItem=t=>{const e=m(t._type);if(confirm(`Are you sure that you want to remove the ${e} ${t._id}?`)){const n={title:`Removing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be removed.`};r.addToast(n);var i=g(t._type)+"/"+t._id;s.delete(i).then(()=>{"repo"===t._type?p(t._id,()=>{n.title=t._id+" is removed.",n.body=`The ${e} ${t._id} is removed.`,r.$apply()}):(n.title=t._id+" is removed.",n.body=`The ${e} ${t._id} is removed.`,u())},e=>{n.title=`Error during the removal of ${t._id}.`,n.body=e.body,u()})}},r.refreshItem=t=>{const e=m(t._type),i={title:`Refreshing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be refreshed.`};r.addToast(i);var n=`${g(t._type)}/${t._id}/refresh`;s.post(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is refreshed.",i.body=`The ${e} ${t._id} is refreshed.`,r.$apply()}):(i.title=t._id+" is refreshed.",i.body=`The ${e} ${t._id} is refreshed.`,u())},e=>{i.title=`Error during the refresh of ${t._id}.`,i.body=e.body,u()})},r.extendItem=t=>{const e=m(t._type),i={title:`Extending ${t._id}...`,date:new Date,body:`The expiration of ${e} ${t._id} is going to be extended by 6 months.`};r.addToast(i);var n=`${g(t._type)}/${t._id}/extend`;s.post(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is extended.",i.body=`The expiration of ${e} ${t._id} is extended by 6 months.`,r.$apply()}):(i.title=t._id+" is extended.",i.body=`The expiration of ${e} ${t._id} is extended by 6 months.`,u())},e=>{i.title=`Error during the extension of ${t._id}.`,i.body=e.data&&e.data.error||e.body,u()})},r.itemFilter=e=>("all"===r.typeFilter||e._type===r.typeFilter)&&0!=r.filters.status[e.status]&&(0==r.search.trim().length||!!(e._source&&-1{e.get("/api/repo/"+n.repoId,{repoId:n.repoId,repoUrl:n.repoUrl}).then(e=>{n.repo=e.data,e.data.rateLimitResetAt?i(e.data.rateLimitResetAt):n.repo.statusMessage=function(e){if(e){var t=e.match(/^rate_limited:(\d+)$/);if(t)return i(parseInt(t[1],10)),null;n.rateLimitResetAt=0}return e}(n.repo.statusMessage),"ready"==n.repo.status?n.progress=100:"queue"==n.repo.status?n.progress=10:"downloaded"==n.repo.status?n.progress=50:"download"==n.repo.status||"preparing"==n.repo.status?n.progress=25:"anonymizing"==n.repo.status&&(n.progress=75);e="ready"!=n.repo.status;(e="error"!=n.repo.status||n.rateLimitResetAt?e:!1)&&setTimeout(n.getStatus,2e3)},e=>{n.error=e.data.error})},n.getStatus()}]).controller("anonymizeController",["$scope","$http","$sce","$routeParams","$location","$translate","$timeout",function(s,o,r,e,t,a,l){function i(){var e=new Date;return e.setMonth(e.getMonth()+6),e}function n(e){return e.getFullYear()+`-${String(e.getMonth()+1).padStart(2,"0")}-`+String(e.getDate()).padStart(2,"0")}s.sourceUrl="",s.detectedType=null,s.repoId="",s.pullRequestId="",s.gistId="",s.terms="",s.defaultTerms="",s.branches=[],s.source={branch:"",commit:""},s.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0},s.options.expirationDate=i(),s.minExpirationDate=n(new Date);var h,c=new Date;function d(e,t,i){s.anonymize&&s.anonymize[e]&&s.anonymize[e].$setValidity(t,i)}function u(){return s.isUpdate&&s._originalRepositoryID&&function(e){try{var t=parseGithubUrl(e);if(t&&t.owner&&t.repo)return t.owner+"/"+t.repo}catch(e){}return null}(s.sourceUrl)===s._originalFullName?s._originalRepositoryID:void 0}async function p(){var e=parseGithubUrl(s.sourceUrl);try{T();var t=await o.get(`/api/repo/${e.owner}/${e.repo}/`,{params:{repositoryID:u(),force:"1"}});s.details=t.data,s.details&&s.details.id&&(s.repositoryID=s.details.id),s.repoId||(s.repoId=s.details.repo+"-"+generateRandomId(4)),await s.getBranches()}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}}async function m(e){if(s.readme&&!e)return s.readme;var t=parseGithubUrl(s.sourceUrl);try{var i=await o.get(`/api/repo/${t.owner}/${t.repo}/readme`,{params:{force:!0===e?"1":"0",branch:s.source.branch,repositoryID:u()}});s.readme=i.data}catch(e){s.readme=""}}function g(){var e={terms:s.terms?s.terms.split("\n"):[],image:!!s.options.image,link:!!s.options.link,repoId:s.repoId};s.source&&s.source.branch&&(e.branchName=s.source.branch);try{var t=parseGithubUrl(s.sourceUrl);e.repoName=t.owner+"/"+t.repo}catch(e){}return e}function f(i,n){let r=null,s=0;return function(){r&&l.cancel(r),r=l(()=>{r=null;const t=++s;var e=i();e&&o.post("/api/anonymize-preview",e).then(e=>{t===s&&n(e.data)},()=>{})},200)}}c.setFullYear(c.getFullYear()+1),s.maxExpirationDate=n(c),s.anonymize_readme="",s.readme="",s.html_readme="",s.isUpdate=!1,h=()=>{e.repoId&&""!=e.repoId&&(s.isUpdate=!0,s.detectedType="repo",s.repoId=e.repoId,o.get("/api/repo/"+s.repoId).then(async e=>{s.sourceUrl="https://github.com/"+e.data.source.fullName,s._originalFullName=e.data.source.fullName,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.role=e.data.role||"owner",s.coauthors=e.data.coauthors||[],s._originalBranch=e.data.source.branch,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,s.repositoryID=e.data.source.repositoryID,s._originalRepositoryID=e.data.source.repositoryID,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),await Promise.all([p(),m()]),y(),s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.repoId&&(s.anonymize.repoId.$$element[0].disabled=!0)})),e.pullRequestId&&""!=e.pullRequestId&&(s.isUpdate=!0,s.detectedType="pr",s.pullRequestId=e.pullRequestId,o.get("/api/pr/"+s.pullRequestId).then(async t=>{s.sourceUrl="https://github.com/"+t.data.source.repositoryFullName+"/pull/"+t.data.source.pullRequestId,s.terms=t.data.options.terms.filter(e=>e).join("\n"),s.source=t.data.source,s.options=Object.assign({},s.options,t.data.options),s.conference=t.data.conference,t.data.options.expirationDate&&(s.options.expirationDate=new Date(t.data.options.expirationDate));try{s.details=(await o.get(`/api/pr/${t.data.source.repositoryFullName}/`+t.data.source.pullRequestId)).data}catch(e){t=e&&e.data&&e.data.error;t&&(a("ERRORS."+t).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(t))}s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.pullRequestId&&(s.anonymize.pullRequestId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)})),e.gistId&&""!=e.gistId&&(s.isUpdate=!0,s.detectedType="gist",s.gistId=e.gistId,o.get("/api/gist/"+s.gistId).then(async e=>{s.sourceUrl="https://gist.github.com/"+e.data.source.gistId,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),s.details=(await o.get("/api/gist/source/"+e.data.source.gistId)).data,s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.gistId&&(s.anonymize.gistId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)}))},o.get("/api/user/default").then(e=>{e=e.data;e.terms&&(s.defaultTerms=e.terms.join("\n")),s.options=Object.assign({},s.options,e.options),s.options.expirationDate=e.options&&e.options.expirationDate?new Date(e.options.expirationDate):i(),h&&h()}),s.urlSelected=async()=>{s.terms=s.defaultTerms,s.isUpdate||(s.repoId="",s.pullRequestId="",s.gistId=""),s.details=null,s.branches=[],s.source={type:"GitHubStream",branch:"",commit:""},s.anonymize_readme="",s.readme="",s.html_readme="",s.detectedType=null;let e;try{e=parseGithubUrl(s.sourceUrl)}catch(e){return void d("sourceUrl","github",!1)}d("sourceUrl","github",!0);try{if(e.gistId&&!e.repo){s.detectedType="gist",s.source={gistId:e.gistId};var t=parseGithubUrl(s.sourceUrl);try{T();var i=await o.get("/api/gist/source/"+t.gistId);s.details=i.data,s.gistId||(s.gistId="gist-"+t.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}await 0}else if(e.pullRequestId){s.detectedType="pr",s.source={repositoryFullName:e.owner+"/"+e.repo,pullRequestId:e.pullRequestId};var n=parseGithubUrl(s.sourceUrl);try{T();var r=await o.get(`/api/pr/${n.owner}/${n.repo}/`+n.pullRequestId);s.details=r.data,s.pullRequestId||(s.pullRequestId=n.repo+"-PR"+n.pullRequestId+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),M(e.data.error)),d("sourceUrl","missing",!1),e}await 0}else s.detectedType="repo",await Promise.all([p(),m()]),y()}catch(e){return}s.$apply(),$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),s.$watch("options.update",e=>{"repo"===s.detectedType&&s.anonymize&&s.anonymize.commit&&(s.anonymize.commit.$$element[0].disabled=!!e)}),s.$watch("source.branch",async()=>{var e;"repo"===s.detectedType&&(e=s.branches.filter(e=>e.name==s.source.branch)[0])&&(s.isUpdate&&s._originalBranch===s.source.branch&&!!s.source.commit||(s.source.commit=e.commit),s.readme=e.readme,await m(),y(),s.$apply())}),s.getBranches=async e=>{var t=parseGithubUrl(s.sourceUrl);try{var i=await o.get(`/api/repo/${t.owner}/${t.repo}/branches`,{params:{force:!0===e?"1":"0",repositoryID:u()}}),n=(s.branches=i.data,s.sourceUnreachable=!1,s.source.branch||(s.source.branch=s.details.defaultBranch),s.branches.filter(e=>e.name==s.source.branch));0{s.toasts=s.toasts||[],s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),d("sourceUrl","missing",!1)}s.$apply()};const v=f(()=>s.readme?{content:s.readme,options:g()}:null,e=>{s.anonymize_readme=e.content||"";let t="";try{var i=parseGithubUrl(s.sourceUrl),n=s.source.branch||s.details&&s.details.defaultBranch||"main";t=`https://github.com/${i.owner}/${i.repo}/raw/${n}/`}catch(e){}e=renderMD(s.anonymize_readme,t);s.html_readme=r.trustAsHtml(e),l(Prism.highlightAll,150)});function y(){s.anonymize&&s.anonymize.terms&&(s.termsRegexWarning=!!s.terms&&!!s.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),v())}let b=new Map,w=new Set;const x=f(()=>{var e=function(){var e=new Set,t=s.details&&s.details.pullRequest;if(t){"string"==typeof t.title&&e.add(t.title),"string"==typeof t.body&&e.add(t.body),"string"==typeof t.diff&&e.add(t.diff);for(const i of s.details&&s.details.comments||[])"string"==typeof i.author&&e.add(i.author),"string"==typeof i.body&&e.add(i.body)}return e}(),e=(w=e,Array.from(e));return 0===e.length?null:{contents:e,options:g()}},t=>{if(t&&Array.isArray(t.contents)){var i=Array.from(w),n=new Map;for(let e=0;e{var e=function(){var e=new Set,t=s.details&&s.details.gist;if(t){"string"==typeof t.description&&e.add(t.description),"string"==typeof t.ownerLogin&&e.add(t.ownerLogin);for(const i of t.files||[])"string"==typeof i.filename&&e.add(i.filename),"string"==typeof i.content&&e.add(i.content);for(const n of t.comments||[])"string"==typeof n.author&&e.add(n.author),"string"==typeof n.body&&e.add(n.body)}return e}(),e=(A=e,Array.from(e));return 0===e.length?null:{contents:e,options:g()}},t=>{if(t&&Array.isArray(t.contents)){var i=Array.from(A),n=new Map;for(let e=0;e({filename:s.anonymizeGistContent(e.filename),content:s.anonymizeGistContent(e.content),language:e.language}))}function T(){d("repoId","used",!0),d("repoId","format",!0),d("pullRequestId","used",!0),d("pullRequestId","format",!0),d("gistId","used",!0),d("gistId","format",!0),d("sourceUrl","used",!0),d("sourceUrl","missing",!0),d("sourceUrl","access",!0),d("sourceUrl","github",!0),d("commit","exists",!0),d("conference","activated",!0),d("terms","format",!0),s.termsRegexWarning=!1}function E(){var e=s.anonymize&&s.anonymize.expirationDate;return(!s.options.expirationDate||e&&e.$invalid)&&(e&&e.$setDirty&&e.$setDirty(),s.error="Please choose a valid expiration date.")}function M(e){var t="pr"===s.detectedType?"pullRequestId":"gist"===s.detectedType?"gistId":"repoId";switch(e){case"repoId_already_used":d(t,"used",!1);break;case"invalid_repoId":case"options_not_provided":d(t,"format",!1);break;case"repo_already_anonymized":d("sourceUrl","used",!1);break;case"invalid_terms_format":d("terms","format",!1);break;case"repo_not_found":d("sourceUrl","missing",!1);break;case"repo_not_accessible":d("sourceUrl","access",!1);break;case"commit_not_found":d("commit","exists",!1);break;case"conf_not_activated":d("conference","activated",!1)}}s.anonymizeGistContent=function(e){if(e){if(S.has(e))return S.get(e);A.has(e)||_()}return e},s.previewGistFiles=[],s.$watch("details.gist.files",C,!0),s.$watch("terms",C),s.coauthors=s.coauthors||[],s.coauthorResults=[],s.coauthorError="",s.searchCoauthors=()=>{var e=(s.coauthorSearch||"").trim();s.coauthorError="",e.length<2?s.coauthorResults=[]:o.get("/api/user/search/github-users",{params:{q:e}}).then(e=>{const t=new Set((s.coauthors||[]).map(e=>(e.username||"").toLowerCase()));s.coauthorResults=(e.data||[]).filter(e=>!t.has((e.username||"").toLowerCase()))},()=>{s.coauthorResults=[]})},s.addCoauthor=(e,t)=>{t&&t.preventDefault(),e&&e.username&&o.post("/api/repo/"+s.repoId+"/coauthors",{username:e.username}).then(e=>{s.coauthors=e.data||[],s.coauthorResults=[],s.coauthorSearch="",s.coauthorError=""},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.removeCoauthor=e=>{e&&e.username&&confirm("Remove co-author "+e.username+"?")&&o.delete("/api/repo/"+s.repoId+"/coauthors/"+encodeURIComponent(e.username)).then(e=>{s.coauthors=e.data||[]},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.anonymizeRepo=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={repoId:s.repoId,terms:s.terms.trim().split("\n").filter(e=>e),fullName:t.owner+"/"+t.repo,repository:s.sourceUrl,options:s.options,source:s.source,conference:s.conference},s.details&&(t.options.pageSource=s.details.pageSource),T(),i=s.isUpdate?"/api/repo/"+s.repoId:"/api/repo/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+s.repoId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.anonymizeGist=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={gistId:s.gistId,terms:s.terms.trim().split("\n").filter(e=>e),source:{gistId:t.gistId},options:s.options,conference:s.conference},T(),i=s.isUpdate?"/api/gist/"+s.gistId:"/api/gist/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+s.gistId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.anonymizePullRequest=e=>{var t,i;E()||(e.target.disabled=!0,t=parseGithubUrl(s.sourceUrl),t={pullRequestId:s.pullRequestId,terms:s.terms.trim().split("\n").filter(e=>e),source:{repositoryFullName:t.owner+"/"+t.repo,pullRequestId:t.pullRequestId},options:s.options,conference:s.conference},T(),i=s.isUpdate?"/api/pr/"+s.pullRequestId:"/api/pr/",o.post(i,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+s.pullRequestId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),M(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()}))},s.$watch("conference",()=>{s.conference&&o.get("/api/conferences/"+s.conference).then(e=>{s.conference_data=e.data,s.conference_data.startDate=new Date(s.conference_data.startDate),s.conference_data.endDate=new Date(s.conference_data.endDate),s.options.expirationDate=new Date(s.conference_data.endDate),s.options.expirationMode="remove",s.options.update=s.conference_data.options.update,s.options.image=s.conference_data.options.image,s.options.pdf=s.conference_data.options.pdf,s.options.notebook=s.conference_data.options.notebook,s.options.link=s.conference_data.options.link},()=>{s.conference_data=null})}),s.$watch("terms",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("options.image",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("options.link",()=>{"repo"===s.detectedType&&y(),"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()}),s.$watch("details",()=>{"pr"===s.detectedType&&x(),"gist"===s.detectedType&&_()},!0)}]).controller("exploreController",["$scope","$http","$location","$routeParams","$sce","$q",function(g,s,o,n,a,r){g.files=[],g.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),g.fileSearchQuery="",g.fileSearchResults=null,g.fileSearchLoading=!1,document.addEventListener("keydown",function(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),e=document.querySelector(".tree-search-input"))&&(e.focus(),e.select())});var f=null;g.onFileSearchChange=function(){f&&(f.resolve(),f=null);var e=g.fileSearchQuery;!e||e.length<2?(g.fileSearchResults=null,g.fileSearchLoading=!1):(g.fileSearchLoading=!0,f=r.defer(),s.get(`/api/repo/${g.repoId}/files/search?q=`+encodeURIComponent(e),{timeout:f.promise}).then(function(e){f=null,g.fileSearchLoading=!1;for(var t={},i=(g.files.forEach(function(e){t[(e.path||"")+"/"+e.name]=!0}),[]),n={},r=0;re&&0e.path===i)||g.getFiles(i)}}}),g.fileCounts=null,g.getFiles=function(i){return s.get(`/api/repo/${g.repoId}/files/?path=${encodeURIComponent(i)}&v=`+g.options.lastUpdateDate).then(function(e){const t=i||"";return g.files=g.files.filter(e=>e.path!==t),g.files.push(...e.data),e.data},function(e){g.type="error",g.content=e&&e.data&&e.data.error||"unknown_error",g.files=[]})};var p=null;function m(){g.content="",g.file=g.files.filter(e=>e.name==g.paths[g.paths.length-1]&&e.path==g.paths.slice(0,g.paths.length-1).join("/"))[0];let e="0";g.file&&g.file.sha&&(e=g.file.sha),g.url=`/api/repo/${g.repoId}/file/${encodePathForUrl(g.filePath)}?v=`+e;var t=g.filePath.substring(0,g.filePath.lastIndexOf("/")+1);g.fileBaseUrl=`/api/repo/${g.repoId}/file/`+(t?encodePathForUrl(t):""),g.showSource=!1,g.allowScripts=!1;let i=g.filePath.toLowerCase();var t=i.lastIndexOf(".");if(-1{n.scrollToLine(i,!0,!0,function(){})},100)}else s(null)}e(!0);let o=null;n.on("guttermousedown",function(e){var t=e.getDocumentPosition().row;let i=t,n=t;e.domEvent&&e.domEvent.shiftKey&&null!==o?(i=Math.min(o,t),n=Math.max(o,t)):o=t;t=i===n?"#L"+(i+1):`#L${i+1}-L`+(n+1),t=window.location.pathname+window.location.search+t;window.history.replaceState(null,"",t),s(i,n),e.stop()}),window.addEventListener("hashchange",()=>e(!1)),n.setFontSize(g.aceOption.fontSize),n.setReadOnly(g.aceOption.readOnly),n.setKeyboardHandler(g.aceOption.keyBinding),n.setSelectionStyle(g.aceOption.fullLineSelection?"line":"text"),n.setOption("displayIndentGuides",!0),n.setHighlightActiveLine(g.aceOption.highlightActiveLine),"hide"==g.aceOption.cursor&&(n.renderer.$cursorLayer.element.style.display="none"),n.setHighlightGutterLine(g.aceOption.highlightGutterLine),n.setShowInvisibles(g.aceOption.showInvisibles),n.setDisplayIndentGuides(g.aceOption.showIndentGuides),n.renderer.setShowPrintMargin(g.aceOption.showPrintMargin),n.setHighlightSelectedWord(g.aceOption.highlightSelectedWord),n.session.setUseSoftTabs(g.aceOption.useSoftTab),n.session.setTabSize(g.aceOption.tabSize),n.setBehavioursEnabled(g.aceOption.enableBehaviours),n.setFadeFoldWidgets(g.aceOption.fadeFoldWidgets)}},g.$on("dark-mode",(e,t)=>{g.aceOption.theme=t?"nord_dark":"chrome"}),g.isDarkMode&&(g.aceOption.theme="nord_dark"),g.type="pdf"==(t=i)?"pdf":"html"==t||"htm"==t?"html-doc":"md"==t?"md":"org"==t?"org":"ipynb"==t?"IPython":-1e}).then(e=>{var t;g.type=r,g.content=e.data,""==g.content&&(g.content=null),"md"==g.type&&(g.content=a.trustAsHtml(renderMD(e.data,o.url()+"/../")),g.type="html"),"org"==g.type&&(t=contentAbs2Relative(e.data),t=(new Org.Parser).parse(t).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1}),g.content=a.trustAsHtml(t.toString()),g.type="html"),"code"==g.type&&"application/octet-stream"==e.headers("content-type")&&(g.type="binary",g.content="binary"),setTimeout(()=>{Prism.highlightAll()},50)},t=>{g.type="error",g.content="unknown_error";try{t.data=JSON.parse(t.data),t.data.error?g.content=t.data.error:g.content=t.data}catch(e){console.log(t),-1==t.status?g.content="request_error":502==t.status&&(g.content="unreachable")}})}else g.type="error",g.content="no_file_selected"}}function v(){g.repoId=n.repoId,g.type="loading",g.filePath=n.path||"",g.paths=g.filePath.split("/"),function i(n){s.get(`/api/repo/${g.repoId}/options`).then(e=>{g.options=e.data,g.options.url?window.location=g.options.url:n&&n(e.data)},e=>{function t(){var e,t=Math.max(0,Math.ceil((g.rateLimitResetAt-Date.now())/1e3));t<=0?(g.rateLimitCountdown="",g.rateLimitResetAt=0,p&&(clearInterval(p),p=null),i(n)):(e=Math.floor(t/60),t%=60,g.rateLimitCountdown=0{i.options=e.data,i.options.url?window.location=i.options.url:t&&t(e.data)},e=>{i.type="error",i.content=e.data.error})}(e=>{!async function(t){n.get(`/api/pr/${i.pullRequestId}/content`).then(e=>{i.details=e.data,t&&t(e.data)},e=>{i.type="error",i.content=e.data.error})}()})}]).controller("gistController",["$scope","$http","$location","$routeParams","$sce",function(n,e,t,i,r){n.gistId=i.gistId,n.type="loading",async function(t){e.get(`/api/gist/${n.gistId}/options`).then(e=>{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(()=>{!async function(i){e.get(`/api/gist/${n.gistId}/content`).then(e=>{n.details=e.data;var t=e.data&&e.data.files&&e.data.files.length;n.tabState={active:t?"files":"comments"},i&&i(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("conferencesController",["$scope","$http","$location",function(i,n,e){i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.conferences=[],i.search="";const t="conferences.filterPrefs",r={status:{ready:!0,expired:!1,removed:!1}},s="name";var o=loadFilterPrefs(t)||{};function a(){n.get("/api/conferences/").then(e=>{i.conferences=e.data||[]},e=>{console.error(e)})}i.filters={status:Object.assign({},r.status,o.filters&&o.filters.status||{})},i.orderBy=o.orderBy||s,i.$watch("orderBy",()=>{saveFilterPrefs(t,{filters:i.filters,orderBy:i.orderBy})}),i.$watch("filters",()=>{saveFilterPrefs(t,{filters:i.filters,orderBy:i.orderBy})},!0),i.removeConference=function(e){if(confirm(`Are you sure that you want to remove the conference ${e.name}? All the repositories linked to this conference will expire.`)){const t={title:`Removing ${e.name}...`,date:new Date,body:`The conference ${e.name} is going to be removed.`};i.addToast(t),n.delete("/api/conferences/"+e.conferenceID).then(()=>{t.title=e.name+" is removed.",t.body=`The conference ${e.name} is removed.`,a()})}},a(),i.conferenceFilter=e=>0!=i.filters.status[e.status]&&(0==i.search.trim().length||-1{null==i.user&&n.url("/")}),null==i.user&&n.url("/"),i.plans=[],i.editionMode=!1,t.conferenceId&&(i.editionMode=!0,e.get("/api/conferences/"+t.conferenceId).then(e=>{i.options=e.data,i.options.startDate=new Date(i.options.startDate),i.options.endDate=new Date(i.options.endDate)})),e.get("/api/conferences/plans").then(e=>{i.plans=e.data,i.plan=i.plans.filter(e=>e.id==i.options.plan.planID)[0]});var t=new Date,r=(t.setDate(1),t.setMonth(t.getMonth()+1),new Date);r.setMonth(t.getMonth()+7,0),i.options={startDate:t,endDate:r,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},i.plan=null,i.$watch("options.plan.planID",()=>{i.plan=i.plans.filter(e=>e.id==i.options.plan.planID)[0]}),i.submit=function(){const t={title:`Creating ${i.options.name}...`,date:new Date,body:`The conference ${i.options.conferenceID} is in creation.`};i.editionMode&&(t.title=`Updating ${i.options.name}...`,t.body=`The conference '${i.options.conferenceID}' is updating.`),i.addToast(t),i.conference.name.$setValidity("required",!0),i.conference.conferenceID.$setValidity("pattern",!0),i.conference.conferenceID.$setValidity("required",!0),i.conference.conferenceID.$setValidity("used",!0),i.conference.startDate.$setValidity("required",!0),i.conference.startDate.$setValidity("invalid",!0),i.conference.endDate.$setValidity("required",!0),i.conference.endDate.$setValidity("invalid",!0),i.conference.$setValidity("error",!0),e.post("/api/conferences/"+(i.editionMode?i.options.conferenceID:""),i.options).then(()=>{i.editionMode?(t.title=i.options.name+" updated",t.body=`The conference '${i.options.conferenceID}' is updated.`):(t.title=i.options.name+" created",t.body=`The conference '${i.options.conferenceID}' is created.`),n.url("/conference/"+i.options.conferenceID)},e=>{switch(e.data.error){case"conf_name_missing":i.conference.name.$setValidity("required",!1);break;case"conf_id_missing":i.conference.conferenceID.$setValidity("required",!1);break;case"conf_id_format":i.conference.conferenceID.$setValidity("pattern",!1);break;case"conf_id_used":i.conference.conferenceID.$setValidity("used",!1);break;case"conf_start_date_missing":i.conference.startDate.$setValidity("required",!1);break;case"conf_end_date_missing":i.conference.endDate.$setValidity("required",!1);break;case"conf_start_date_invalid":i.conference.startDate.$setValidity("invalid",!1);break;case"conf_end_date_invalid":i.conference.endDate.$setValidity("invalid",!1);break;default:i.conference.$setValidity("error",!1)}i.removeToast(t)})}}]).controller("conferenceController",["$scope","$http","$location","$routeParams",function(t,e,i,n){t.$watch("user.status",()=>{null==t.user&&i.url("/")}),null==t.user&&i.url("/"),t.conference=null,t.search="",t.filters={status:{ready:!0,expired:!1,removed:!1}},t.orderBy="-anonymizeDate",t.repoFiler=e=>0!=t.filters.status[e.status]&&(0==t.search.trim().length||-1{t.conference=e.data})}]),$(document).on("click","#navbarSupportedContent .nav-link",function(e){var t;"dropdown"!==$(this).attr("data-toggle")&&(t=$("#navbarSupportedContent")).hasClass("show")&&t.collapse("hide")}),angular.module("admin",[]).controller("repositoriesAdminController",["$scope","$http","$location",function(n,r,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.repositories=[],n.total=-1,n.totalPage=0,n.statusCounts=[],n.totalSize=0,n.selected={},n.allSelected=!1;const t=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},s=(document.addEventListener("keydown",t),n.$on("$destroy",()=>document.removeEventListener("keydown",t)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];n.query.owner&&e.push({key:"owner",label:"Owner",value:n.query.owner}),n.query.conference&&e.push({key:"conference",label:"Conference",value:n.query.conference}),n.chips=e}),o=(n.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},n.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.statusStorageFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.storage:0},n.isErrorsOnly=()=>n.query&&n.query.error&&!n.query.ready&&!n.query.preparing&&!n.query.expired&&!n.query.removed,n.toggleErrorsOnly=()=>{n.isErrorsOnly()?Object.assign(n.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(n.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),n.query.page=1},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.repos.filterPrefs");var i=loadFilterPrefs(o)||{},i=(n.query=Object.assign({},{page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},i,{page:1,search:""}),e.search());i.owner&&(n.query.owner=i.owner),i.conference&&(n.query.conference=i.conference),i.search&&(n.query.search=i.search);const a="admin.repos.presets";function l(){n.fetchError=null,r.get("/api/admin/repos",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.repositories=e.data.results,n.statusCounts=e.data.statusCounts||[],n.totalSize=e.data.totalSize||0,n.allSelected=!1},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load repositories",console.error(e)})}n.presets=JSON.parse(localStorage.getItem(a)||"[]"),n.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},n.query)).page,n.presets=(n.presets||[]).filter(e=>e.name!==t),n.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(n.presets)))},n.applyPreset=e=>{Object.assign(n.query,e.query,{page:1})},n.deletePreset=t=>{n.presets=(n.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(n.presets))},n.selectAllOnPage=()=>{n.allSelected=!n.allSelected,n.repositories.forEach(e=>{n.selected[e.repoId]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedRepos=()=>n.repositories.filter(e=>n.selected[e.repoId]),n.bulkRefresh=()=>{var e=n.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>n.updateRepository(e))},n.bulkRemoveCache=()=>{var e=n.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>n.removeCache(e))},n.clearSelection=()=>{n.selected={},n.allSelected=!1},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/repos?"+e.toString(),"_blank")},n.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>l(),e=>console.error(e))},n.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>l(),e=>console.error(e))},n.updateRepository=t=>{const i={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};n.toasts.push(i),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?i.title=t.repoId+" is refreshed.":i.title=`Refreshing of ${t.repoId}.`},e=>{i.title=`Error during the refresh of ${t.repoId}.`,i.body=e.body})},n.fetchError=null,l();let h=null;n.$watch("query",()=>{clearTimeout(h),h=setTimeout(l,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(o,i),s()},!0),s()}]).controller("usersAdminController",["$scope","$http","$location",function(n,t,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.users=[],n.total=-1,n.totalPage=0,n.statusCounts=[],n.selected={},n.allSelected=!1;const i=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",i),n.$on("$destroy",()=>document.removeEventListener("keydown",i)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];n.query.role&&e.push({key:"role",label:"Role",value:n.query.role}),n.chips=e}),s=(n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.users.filterPrefs");var o=loadFilterPrefs(s)||{};function a(){n.fetchError=null,t.get("/api/admin/users",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.users=e.data.results,n.statusCounts=e.data.statusCounts||[],n.allSelected=!1,n.$apply()},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load users",console.error(e)})}n.query=Object.assign({},{page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},o,{page:1,search:""}),n.selectAllOnPage=()=>{n.allSelected=!n.allSelected,n.users.forEach(e=>{n.selected[e.username]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedUsers=()=>n.users.filter(e=>n.selected[e.username]),n.banUser=e=>{confirm(`Ban user ${e.username}?`)&&t.post(`/api/admin/users/${e.username}/ban`).then(a,e=>console.error(e))},n.activateUser=e=>{t.post(`/api/admin/users/${e.username}/activate`).then(a,e=>console.error(e))},n.bulkBan=()=>{var e=n.selectedUsers();e.length&&confirm(`Ban ${e.length} users?`)&&e.forEach(e=>n.banUser(e))},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/users?"+e.toString(),"_blank")},n.fetchError=null,a();let l=null;n.$watch("query",()=>{clearTimeout(l),l=setTimeout(a,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(s,i),r()},!0),r()}]).controller("userAdminController",["$scope","$http","$location","$routeParams",function(n,r,e,i){n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.userInfo,n.repositories=[],n.search="",n.selected={},n.allSelected=!1;const t="admin.user.filterPrefs",s={status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},o="anonymizeDate",a="desc";var l=loadFilterPrefs(t)||{};function h(e){r.get("/api/admin/users/"+e+"/repos",{}).then(e=>{n.repositories=e.data},e=>{console.error(e)})}function c(e){r.get("/api/admin/users/"+e,{}).then(e=>{n.userInfo=e.data},e=>{console.error(e)})}function d(){r.get("/api/admin/tokens").then(e=>{n.tokens=e.data||[]},e=>{401!==e.status&&403!==e.status&&console.error(e)})}n.filters={status:Object.assign({},s.status,l.filters&&l.filters.status||{})},n.query={sort:l.sort||o,direction:l.direction||a},n.orderBy=("asc"===n.query.direction?"":"-")+n.query.sort,n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.orderBy=("asc"===n.query.direction?"":"-")+n.query.sort},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"",n.$watch("query",()=>{saveFilterPrefs(t,{filters:n.filters,sort:n.query.sort,direction:n.query.direction})},!0),n.$watch("filters",()=>{saveFilterPrefs(t,{filters:n.filters,sort:n.query.sort,direction:n.query.direction})},!0),n.statusCountFor=t=>(n.repositories||[]).filter(e=>e.status===t).length,n.repoFiler=e=>0!=n.filters.status[e.status]&&(0==n.search.trim().length||-1{n.allSelected=!n.allSelected,(n.filteredRepositories||n.repositories).forEach(e=>{n.selected[e.repoId]=n.allSelected})},n.selectedCount=()=>Object.values(n.selected||{}).filter(Boolean).length,n.selectedRepos=()=>n.repositories.filter(e=>n.selected[e.repoId]),n.bulkRefresh=()=>{var e=n.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>n.updateRepository(e))},n.bulkRemoveCache=()=>{var e=n.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>n.removeCache(e))},n.clearSelection=()=>{n.selected={},n.allSelected=!1},n.exportCsv=()=>{var e=n.filteredRepositories||n.repositories,t=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),e=e.map(e=>[e.repoId,e.status,e.statusMessage||"",e.pageView||0,e.anonymizeDate||"",e.source&&e.source.fullName||"",e.conference||"",e.size&&e.size.storage||0].map(e=>{e=String(null==e?"":e);return/[",\n\r]/.test(e)?'"'+e.replace(/"/g,'""')+'"':e}).join(",")),t=new Blob([t+"\n"+e.join("\n")],{type:"text/csv"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.download=i.username+"-repositories.csv",e.click()},n.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},n.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},c(i.username),h(i.username),n.banUser=()=>{confirm(`Ban user ${i.username}?`)&&r.post(`/api/admin/users/${i.username}/ban`).then(()=>c(i.username),e=>console.error(e))},n.activateUser=()=>{r.post(`/api/admin/users/${i.username}/activate`).then(()=>c(i.username),e=>console.error(e))},n.promoteUser=()=>{confirm(`Promote ${i.username} to admin?`)&&r.post(`/api/admin/users/${i.username}/promote`).then(()=>c(i.username),e=>console.error(e))},n.demoteUser=()=>{confirm(`Remove admin privileges from ${i.username}?`)&&r.post(`/api/admin/users/${i.username}/demote`).then(()=>c(i.username),e=>console.error(e))},n.tokens=[],n.tokenForm={name:"",plaintext:null},d(),n.createToken=()=>{n.tokenForm.name&&r.post("/api/admin/tokens",{name:n.tokenForm.name}).then(e=>{n.tokenForm.plaintext=e.data.token,n.tokenForm.name="",d()},e=>console.error(e))},n.revokeToken=e=>{confirm(`Revoke token "${e.name}"?`)&&r.delete("/api/admin/tokens/"+e.id).then(()=>d(),e=>console.error(e))},n.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>h(i.username),e=>console.error(e))},n.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>h(i.username),e=>console.error(e))},n.updateRepository=t=>{const i={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};n.toasts.push(i),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?i.title=t.repoId+" is refreshed.":i.title=`Refreshing of ${t.repoId}.`},e=>{i.title=`Error during the refresh of ${t.repoId}.`,i.body=e.body})},n.getGitHubRepositories=e=>{r.get(`/api/user/${n.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(e=>{n.userInfo.repositories=e.data})};let u=null;n.$watch("query",()=>{clearTimeout(u),u=setTimeout(()=>{h(i.username)},500)},!0)}]).controller("conferencesAdminController",["$scope","$http","$location",function(n,t,e){n.Math=Math,n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.conferences=[],n.total=-1,n.totalPage=0,n.statusCounts=[];const i=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",i),n.$on("$destroy",()=>document.removeEventListener("keydown",i)),n.clearFilter=e=>{"dateRange"===e?(n.query.dateFrom="",n.query.dateTo=""):n.query[e]="",n.query.page=1},n.chips=[],()=>{var e=[];(n.query.dateFrom||n.query.dateTo)&&e.push({key:"dateRange",label:"Date",value:(n.query.dateFrom||"…")+" – "+(n.query.dateTo||"…")}),n.chips=e}),s=(n.statusCountFor=t=>{var e=(n.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},n.toggleSortDirection=()=>{n.query.direction="asc"===n.query.direction?"desc":"asc"},n.sortBy=e=>{n.query.sort===e?n.query.direction="asc"===n.query.direction?"desc":"asc":(n.query.sort=e,n.query.direction="desc"),n.query.page=1},n.sortIcon=e=>n.query.sort===e?"asc"===n.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.conferences.filterPrefs");var o=loadFilterPrefs(s)||{},o=(n.query=Object.assign({},{page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},o,{page:1,search:""}),e.search());o.search&&(n.query.search=o.search);const a="admin.conferences.presets";function l(){n.fetchError=null,t.get("/api/admin/conferences",{params:n.query}).then(e=>{n.total=e.data.total,n.totalPage=Math.ceil(e.data.total/n.query.limit),n.conferences=e.data.results,n.statusCounts=e.data.statusCounts||[]},e=>{n.fetchError=e&&e.data&&e.data.error||"Failed to load conferences",console.error(e)})}n.presets=JSON.parse(localStorage.getItem(a)||"[]"),n.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},n.query)).page,n.presets=(n.presets||[]).filter(e=>e.name!==t),n.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(n.presets)))},n.applyPreset=e=>{Object.assign(n.query,e.query,{page:1})},n.deletePreset=t=>{n.presets=(n.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(n.presets))},n.removeConference=e=>{confirm("Remove conference "+e.conferenceID+"?")&&t.delete("/api/admin/conferences/"+e.conferenceID).then(()=>l(),e=>console.error(e))},n.exportCsv=()=>{var e=new URLSearchParams(Object.entries(n.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/conferences?"+e.toString(),"_blank")},n.fetchError=null,l();let h=null;n.$watch("query",()=>{clearTimeout(h),h=setTimeout(l,500);const{page:e,search:t,...i}=n.query;saveFilterPrefs(s,i),r()},!0),r()}]).controller("queuesAdminController",["$scope","$http","$location","$interval","$timeout",function(T,t,e,i,n){function r(){var e={queue:T.selectedQueue,search:T.query.search};t.get("/api/admin/queues",{params:e}).then(e=>{T.queueList=e.data.queues||[],T.jobs=e.data.jobs||[],T.selectedStats=T.queueList.find(e=>e.key===T.selectedQueue)||T.queueList[0]||null},e=>console.error(e))}function s(){t.get("/api/admin/queues/metrics",{params:{queue:T.selectedQueue,range:T.range}}).then(e=>{T.metricsPoints=e.data.points||[],n(h,0)},e=>console.error(e))}T.$watch("user.status",()=>{null==T.user&&e.url("/")}),null==T.user&&e.url("/"),T.queueList=[],T.jobs=[],T.selectedQueue="download",T.selectedStats=null,T.range="1h",T.allStates=["active","waiting","delayed","failed","completed"],T.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},T.query={search:"",autoRefresh:!0},T.filteredJobs=()=>(T.jobs||[]).filter(e=>T.stateFilter[e._state]),T.jobProgressPct=e=>e&&e.progress&&"object"==typeof e.progress&&"number"==typeof e.progress.percent?Math.max(0,Math.min(100,Math.round(e.progress.percent))):"number"==typeof e.progress?Math.max(0,Math.min(100,Math.round(e.progress))):null,T.jobDuration=e=>{return e.processedOn?(e=(e.finishedOn||Date.now())-e.processedOn)<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-"},T.metricsPoints=[],T.selectQueue=e=>{T.selectedQueue=e,r(),s()},T.setRange=e=>{T.range=e,s()},r(),s();const o=i(()=>{T.query.autoRefresh&&(r(),s())},15e3);function a(e){var t=e&&e.data&&(e.data.message||e.data.error)||"Request failed";T.actionError=t,n(()=>{T.actionError=null},5e3),console.error(e)}T.$on("$destroy",()=>i.cancel(o)),T.refreshNow=function(){r(),s()},T.actionError=null,T.removeJob=e=>{t.delete(`/api/admin/queue/${T.selectedQueue}/`+e.id).then(r,a)},T.retryJob=e=>{t.post(`/api/admin/queue/${T.selectedQueue}/`+e.id).then(r,a)},T.retryFailed=()=>{confirm(`Retry all failed jobs in ${T.selectedQueue}?`)&&t.post(`/api/admin/queue/${T.selectedQueue}/retry-failed`).then(r,e=>console.error(e))},T.drainSelected=()=>{confirm(`Drain the ${T.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${T.selectedQueue}/drain`).then(r,e=>console.error(e))},T.togglePause=()=>{var e=T.selectedStats&&T.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${T.selectedQueue}/`+e).then(r,e=>console.error(e))},T.emptyQueue=()=>{confirm(`Empty the ${T.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${T.selectedQueue}/empty`).then(r,e=>console.error(e))},T.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(r,e=>console.error(e))};let l=null;function E(e){if(e<=0)return{ticks:[0],niceMax:1};var t=Math.pow(10,Math.floor(Math.log10(e)));let i=t;e/i<2?i=t/2:5{clearTimeout(l),l=setTimeout(r,350)}),T.expanded={},T.toggleJob=e=>{T.expanded[e.id]=!T.expanded[e.id]},T.humanTime=e=>{return e?(e=new Date(e)).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+e.toLocaleDateString([],{month:"short",day:"numeric"}):""},T.delayCountdown=e=>{var t;return e?(e=Math.max(0,Math.ceil((e-Date.now())/1e3)))<=0?"resuming soon":(t=e%60,"in "+(0<(e=Math.floor(e/60))?e+"m "+t+"s":t+"s")):""};var M=null;function c(){var s,o,a=document.getElementById("q-throughput-chart");a&&!a._tipBound&&(a._tipBound=!0,s=document.getElementById("q-chart-tooltip"),o=document.getElementById("q-chart-crosshair"),a.addEventListener("mousemove",function(e){var t,i,n,r;M&&s&&o&&(t=M,i=a.getBoundingClientRect(),e=e.clientX-i.left,(i=Math.round((e-t.marginLeft)/t.step))<0||i>=t.maxLen?(s.style.display="none",o.style.display="none"):(e=t.pts[i],n=Date.now(),r='
'+((n=Math.round((n-e.ts)/6e4))<=0?"now":n<60?n+"m ago":n<1440?(r=n%60,Math.floor(n/60)+"h"+(r?" "+r+"m":"")+" ago"):Math.round(n/1440)+"d ago")+'
● completed: '+e.completed+'/min
● failed: '+e.failed+"/min
",0● avg time: '+(1e3<=e.avgMs?(e.avgMs/1e3).toFixed(1)+"s":e.avgMs+"ms")+""),s.innerHTML=r,(e=(n=t.toX(i))+10)+(r=s.offsetWidth)>t.totalW&&(e=n-r-10),s.style.display="block",s.style.left=e+"px",s.style.top="8px",o.style.display="block",o.style.left=n+"px"))}),a.addEventListener("mouseleave",function(){s&&(s.style.display="none"),o&&(o.style.display="none")}))}T.$watch("metricsPoints",function(){n(c,50)})}]).controller("errorsAdminController",["$scope","$http","$location","$interval",function(c,n,e,t){c.$watch("user.status",()=>{null==c.user&&e.url("/")}),null==c.user&&e.url("/"),c.entries=[],c.visible=[],c.available=!0,c.cap=1e3,c.total=0,c.pageSize=250,c.expanded={},c.detailTab={},c.copyHint="",c.parsedFilterCount=0,c.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},c.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},c.relTime=e=>{var t;return e?(t=new Date(e).getTime(),isNaN(t)?e:(t=Math.max(0,Date.now()-t),(t=Math.floor(t/1e3))<5?"just now":t<60?t+"s ago":(t=Math.floor(t/60))<60?t+"m ago":(t=Math.floor(t/60))<24?t+"h ago":(t=Math.floor(t/24))<7?t+"d ago":new Date(e).toLocaleDateString())):""},c.absTime=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleString()):""},c.absTimeShort=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})):""};const o=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function r(t){var i=(t.raw||[]).find(e=>e&&"object"==typeof e&&!Array.isArray(e));if(i){i.message&&o.test(i.message)?(t.displayMessage=i.message,t.displayContext=t.message):i.code&&o.test(String(i.code))?(t.displayMessage=String(i.code),t.displayContext=t.message):i.name&&"AnonymousError"!==i.name&&"Error"!==i.name?(t.displayMessage=i.name,t.displayContext=i.message||t.message):t.displayMessage=t.message,t._status=i.httpStatus||i.status||null,t._url=i.url||null,t._method=i.method||null,t._repoId=i.repoId||i.detail||null,t._detail=i.detail&&i.detail!==t._repoId?i.detail:null;let e="string"==typeof i.stack?i.stack:null;for(var n=[i.cause,i.err].filter(Boolean),r=0;!e&&r{null!=t&&""!==t&&s.push([e,t])};i("name",t&&t.name),i("code",e.displayMessage||t&&t.message),e._bucket&&i("kind",e._bucket);i("httpStatus",t&&t.httpStatus),t&&t.status&&!t.httpStatus&&i("status",t.status);i("module",e.module);let n=t&&t.detail;if("string"==typeof n){var r=n.trim();if("{"===r[0]||"["===r[0])try{n=JSON.parse(n)}catch{}}if(i("detail",n),i("repoId",t&&t.repoId),i("filePath",t&&t.filePath),i("upstreamStatus",t&&t.upstreamStatus),i("upstreamBody",t&&t.upstreamBody),i("url",e._url),i("err",t&&t.err),i("cause",t&&!t.err&&t.cause),i("ts",e.ts),!s.length)return JSON.stringify(e,null,2);const o=s.reduce((e,t)=>Math.max(e,t[0].length),0),a=["{"];return s.forEach(([e,t],i)=>{e=` ${`"${e}":`.padEnd(o+3," ")} `,i=i0===t?e:r+e).join("\n")}else n="number"==typeof t||"boolean"==typeof t?String(t):JSON.stringify(t);a.push(e+n+i)}),a.push("}"),a.join("\n")}(t,i),t}function d(t,e){for(const a of e.filters){let e;if("code"===a.key)e=t.displayMessage;else if("module"===a.key)e=t.module;else if("status"===a.key)e=t._status;else if("url"===a.key)e=t._url;else if("repo"===a.key)e=t._repoId;else{if("level"!==a.key)continue;e=t.level}if(null==e)return!1;if(i=e,n=a.val,r=a.op,o=s=void 0,s=parseFloat(i),o=parseFloat(n),!("="===r?String(i)===String(n):"!="===r?String(i)!==String(n):">="===r?o<=s:"<="===r?s<=o:">"===r?o=|<=|!=|>|<|=)?([^\s]+)/g;let s=0;for(;n=r.exec(e);)i+=e.slice(s,n.index),s=r.lastIndex,t.push({key:n[1],op:n[2]||"=",val:n[3]});return{filters:t,free:(i+=e.slice(s)).trim().toLowerCase()}}(c.query.search||""),i=(c.parsedFilterCount=t.filters.length,c.query.bucket);let e=c.entries.filter(e=>(!i||e._bucket===i)&&d(e,t));const n=c.query.group;if(n){var r=new Map;for(const l of e){o=l;var s,o="module"===n?o.module:o.displayMessage||o.message||"_";r.has(o)?((s=r.get(o)).count++,s._related.push(l),new Date(l.ts)>new Date(s.ts)&&(s.ts=l.ts,s._url=l._url,s._status=l._status),new Date(l.ts)new Date(e.ts).getTime()>=a).length;e=Array.from(r.values())}else e=e.map((e,t)=>(e._key="row:"+t+":"+e.ts,e._related=[e],e._firstSeen=e.ts,e._lastHourCount=0,e.count=1,e));var o;"count"===c.query.sort?e.sort((e,t)=>t.count-e.count||new Date(t.ts)-new Date(e.ts)):e.sort((e,t)=>new Date(t.ts)-new Date(e.ts)),c.visible=e}function i(i){var e=i?c.entries.length:0,t=i?c.pageSize:Math.max(c.pageSize,c.entries.length||c.pageSize);n.get("/api/admin/errors",{params:{offset:e,limit:t}}).then(e=>{var t=(e.data.entries||[]).map(r);c.entries=i?c.entries.concat(t):t,c.available=!!e.data.available,c.cap=e.data.max||c.cap,c.total=e.data.total||c.entries.length,s()},e=>console.error(e))}function a(){i(),n.get("/api/admin/errors/stats").then(e=>{var e=e.data||{},t=e.prev24h?Math.round((e.last24h-e.prev24h)/e.prev24h*100):0;c.stats={last24h:e.last24h||0,prev24h:e.prev24h||0,delta:t,severity:e.severity||{error:0,warn:0,info:0},unique:e.unique||{error:0,warn:0,info:0},buckets:e.buckets||[],dropped:e.dropped||0}},e=>console.error(e))}function l(e){c.copyHint=e+" copied",setTimeout(()=>{c.copyHint="",c.$apply()},1500)}c.loadMore=()=>i(!0),c.canLoadMore=()=>c.entries.length{var i,n;let r=0;for(const s of c.stats.buckets||[])r=Math.max(r,(s.error||0)+(s.warn||0)+(s.info||0));return r&&(i=(e.error||0)+(e.warn||0)+(e.info||0))?(n=Math.round(i/r*60),e=e[t]||0,Math.round(e/i*n)):0},c.bucketTitle=e=>{return`${new Date(e.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} · ${e.error||0} err · ${e.warn||0} warn · ${e.info||0} info`},c.toggle=e=>{c.expanded[e._key]=!c.expanded[e._key]},c.setBucket=e=>{c.query.bucket=e},c.refreshNow=a,c.clearAll=()=>{confirm("Clear all captured errors?")&&n.delete("/api/admin/errors").then(a,e=>console.error(e))},c.exportCsv=()=>{var e=["ts","level","module","displayMessage","_status","_url","_repoId"],t=[e.join(",")];for(const r of c.visible)t.push(e.map(e=>{e=null==r[e]?"":String(r[e]);return/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}).join(","));var i=new Blob([t.join("\n")],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(i),n=document.createElement("a");n.href=i,n.download=`errors-${(new Date).toISOString().slice(0,19)}.csv`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(i)},c.copyJson=e=>{navigator.clipboard.writeText(e._detailJson).then(()=>l("JSON"))},c.copyCurl=e=>{e._url&&(e=`curl -X ${e._method||"GET"} '${window.location.origin}${e._url}'`,navigator.clipboard.writeText(e).then(()=>l("curl")))},a();const h=t(()=>{c.query.autoRefresh&&a()},15e3);c.$on("$destroy",()=>t.cancel(h)),c.$watch("query.search",s),c.$watch("query.bucket",s),c.$watch("query.sort",s),c.$watch("query.group",s)}]).controller("overviewAdminController",["$scope","$http","$location","$interval",function(s,e,t,i){var n,r;function o(){e.get("/api/admin/overview").then(function(e){var r,t;e.data.history=(t=e.data.history,(r=t||[]).map(function(e,t){var i=r[t-1]||{},n=Object.assign({},e);return n.dailyRepositories=t?Math.max(0,(e.nbRepositories||0)-(i.nbRepositories||0)):0,n.dailyUsers=t?Math.max(0,(e.nbUsers||0)-(i.nbUsers||0)):0,n.dailyPageViews=t?Math.max(0,(e.nbPageViews||0)-(i.nbPageViews||0)):0,n})),e.data.daily={today:{repositories:(t=(t=e.data.history)&&t.length?t[t.length-1]:{}).dailyRepositories||0,users:t.dailyUsers||0,pageViews:t.dailyPageViews||0}},s.data=e.data,s.loading=!1,s.error=null,n={},(e.data.history||[]).forEach(function(t){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(e){(!n[e]||t[e]>n[e])&&(n[e]=t[e])})})},function(e){s.loading=!1,s.error=e.data&&e.data.error||"Failed to load overview"})}s.Math=Math,s.$watch("user.status",()=>{null==s.user&&t.url("/")}),null==s.user?t.url("/"):(s.data=null,s.loading=!0,s.error=null,s.humanBytes=function(e){if(null==e)return"—";for(var t=["B","KB","MB","GB","TB"],i=0,n=e;1024<=n&&i