mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-12 13:48:58 +02:00
74 lines
1.4 MiB
Plaintext
74 lines
1.4 MiB
Plaintext
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=`<div class="mermaid" id="${t}">${e.text}</div>`;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<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(e)try{if(i&&"string"==typeof e){if(i.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\./g);2<=t?.length&&(e="http://"+e)}if(i.tryConvertEncoding)try{e=p(e)}catch{}}var n=t?new URL(e,t):new URL(e);if(function(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return 1;default:return}}(n))return n}catch{}return null},t.getModificationDate=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")},t.getUuid=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto?.randomUUID)return crypto.randomUUID();var t=new Uint8Array(32);if("undefined"!=typeof crypto&&"function"==typeof crypto?.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<32;e++)t[e]=Math.floor(255*Math.random());return h(t)},t.getVerbosityLevel=function(){return r},t.info=function(e){r>=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;e<t;e++)if(i[e]!==n[e])return!1;return!0},t.isNodeJS=void 0,t.normalizeUnicode=function(e){return m||(m=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,g=new Map([["ſt","ſt"]])),e.replaceAll(m,(e,t,i)=>t?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<t;e++){var s=u[i.charCodeAt(e)];r.push(s?String.fromCharCode(s):i.charAt(e))}return r.join("")},t.stringToUTF8String=p,t.unreachable=s,t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=o,i(2),i(84),i(86),i(87),i(89),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);i=!("object"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);t.isNodeJS=i,t.IDENTITY_MATRIX=[1,0,0,1,0,0],t.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],t.MAX_IMAGE_SIZE_TO_CACHE=1e7,t.LINE_FACTOR=1.35,t.LINE_DESCENT_FACTOR=.35,t.BASELINE_FACTOR=.25925925925925924,t.RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,SAVE:8,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,OPLIST:256},t.AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},t.AnnotationEditorPrefix="pdfjs_internal_editor_",t.AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,STAMP:13,INK:15},t.AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23},t.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},t.TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},t.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},t.AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},t.AnnotationReplyType={GROUP:"Group",REPLY:"R"},t.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},t.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},t.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},t.AnnotationActionEventType={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},t.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},t.PageActionEventType={O:"PageOpen",C:"PageClose"};const n={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=n,t.CMapCompressionType={NONE:0,BINARY:1},t.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},t.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let r=n.WARNINGS;function o(e){r>=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:!(3<arguments.length&&void 0!==arguments[3]&&arguments[3]),configurable:!0,writable:!1}),i}l.prototype=new Error;i=l.constructor=l;function l(e,t){this.constructor===l&&s("Cannot initialize BaseException."),this.message=e,this.name=t}function h(t){"object"==typeof t&&void 0!==t?.length||s("Invalid argument for bytesToString");var i=t.length;if(i<8192)return String.fromCharCode.apply(null,t);var n=[];for(let e=0;e<i;e+=8192){var r=Math.min(e+8192,i),r=t.subarray(e,r);n.push(String.fromCharCode.apply(null,r))}return n.join("")}function c(t){"string"!=typeof t&&s("Invalid argument for stringToBytes");var i=t.length,n=new Uint8Array(i);for(let e=0;e<i;++e)n[e]=255&t.charCodeAt(e);return n}t.BaseException=i,t.PasswordException=class extends i{constructor(e,t){super(e,"PasswordException"),this.code=t}},t.UnknownErrorException=class extends i{constructor(e,t){super(e,"UnknownErrorException"),this.details=t}},t.InvalidPDFException=class extends i{constructor(e){super(e,"InvalidPDFException")}},t.MissingPDFException=class extends i{constructor(e){super(e,"MissingPDFException")}},t.UnexpectedResponseException=class extends i{constructor(e,t){super(e,"UnexpectedResponseException"),this.status=t}},t.FormatError=class extends i{constructor(e){super(e,"FormatError")}},t.AbortException=class extends i{constructor(e){super(e,"AbortException")}},t.FeatureTest=class{static get isLittleEndian(){return a(this,"isLittleEndian",((e=new Uint8Array(4))[0]=1)===new Uint32Array(e.buffer,0,1)[0]);var e}static get isEvalSupported(){return a(this,"isEvalSupported",function(){try{return new Function(""),!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return a(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get platform(){return"undefined"==typeof navigator?a(this,"platform",{isWin:!1,isMac:!1}):a(this,"platform",{isWin:navigator.platform.includes("Win"),isMac:navigator.platform.includes("Mac")})}static get isCSSRoundSupported(){return a(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}};const d=[...Array(256).keys()].map(e=>e.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<n||(i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),(e=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3])))<i)?null:[n,i,r,e]}static bezierBoundingBox(t,i,n,r,s,o,a,l){var h=[],e=[[],[]];let c,d,u,p,m,g,f,v;for(let e=0;e<2;++e)u=0===e?(d=6*t-12*n+6*s,c=-3*t+9*n-9*s+3*a,3*n-3*t):(d=6*i-12*r+6*o,c=-3*i+9*r-9*o+3*l,3*r-3*i),Math.abs(c)<1e-12?Math.abs(d)<1e-12||0<(p=-u/d)&&p<1&&h.push(p):(f=d*d-4*u*c,v=Math.sqrt(f),f<0||(0<(m=(-d+v)/(2*c))&&m<1&&h.push(m),0<(g=(-d-v)/(2*c))&&g<1&&h.push(g)));let b,y=h.length;for(var w=y;y--;)b=1-(p=h[y]),e[0][y]=b*b*b*t+3*b*b*p*n+3*b*p*p*s+p*p*p*a,e[1][y]=b*b*b*i+3*b*b*p*r+3*b*p*p*o+p*p*p*l;return e[0][w]=t,e[1][w]=i,e[0][w+1]=a,e[1][w+1]=l,e[0].length=e[1].length=w+2,[Math.min(...e[0]),Math.min(...e[1]),Math.max(...e[0]),Math.max(...e[1])]}},[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]);function p(e){return decodeURIComponent(escape(e))}t.PromiseCapability=class{#t=!1;constructor(){this.promise=new Promise((t,i)=>{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}),b=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(b,"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<n.length;o++){var a=n[o];l(e,a)||i&&l(i,a)||r(e,a,s(t,a))}}},(e,t,i)=>{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<s;)if((n=r[o++])!=n)return!0}else for(;o<s;o++)if((a||o in r)&&r[o]===t)return a||o||0;return!a&&-1}}var l=i(12),h=i(61),c=i(64);e.exports={includes:n(!0),indexOf:n(!1)}},(e,t,i)=>{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<e?i:t)(e)}},(e,t,i)=>{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?r(n(e),9007199254740991):0}},e=>{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),b=i(75),y=i(76),w=i(80),x=i(81),A=i(6),S=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(!S&&u(h,"cause")&&delete h.cause,!i)return l;var o=d("Error"),c=t(function(e,t){t=y(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)&&b(e,this,c),s<arguments.length&&w(e,arguments[s]),e});if(c.prototype=h,"Error"!==a?g?g(c,o):f(c,o,{name:!0}):A&&r in l&&(v(c,l,r),v(c,l,"prepareStackTrace")),f(c,l),!S)try{h.name!==a&&p(h,"name",a),h.constructor=c}catch(e){}return c}}},(e,t,i)=>{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<c;)r=n[a++],h||r.key===s?(h=!0,m(this,r.key)):l++;for(;l<c;)(r=n[l++]).key===s&&r.value===o||p(this,r.key,r.value)},{enumerable:!0,unsafe:!0})},e=>{var i=TypeError;e.exports=function(e,t){if(e<t)throw i("Not enough arguments");return e}},(e,t,i)=>{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<n.length;)if(n[s++]===r)return!0;return!1},{enumerable:!0,unsafe:!0})},(e,t,i)=>{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<n;r++)t[i]=arguments[r],i++;return a(t,i),i}})},(e,t,i)=>{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<e)throw t("Maximum allowed index exceeded");return e}},(e,t,i)=>{var n=i(94),r=i(98).findLast,s=n.aTypedArray;(0,n.exportTypedArrayMethod)("findLast",function(e){return r(s(this),e,1<arguments.length?arguments[1]:void 0)})},(e,t,i)=>{function n(e){var t,e=w(e);if(u(e))return(t=_(e))&&p(t,$)?t[$]:n(e)}function r(e){return!!u(e)&&(e=m(e),p(P,e)||p(I,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),b=i(88),y=i(25),w=i(96),x=i(71),A=i(34),S=i(41),i=i(52),k=i.enforce,_=i.get,i=c.Int8Array,C=i&&i.prototype,E=c.Uint8ClampedArray,E=E&&E.prototype,T=i&&w(i),M=C&&w(C),i=Object.prototype,R=c.TypeError,A=A("toStringTag"),L=S("TYPED_ARRAY_TAG"),$="TypedArrayConstructor",F=l&&!!x&&"Opera"!==m(c.opera),S=!1,P={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},I={BigInt64Array:8,BigUint64Array:8};for(s in P)(a=(o=c[s])&&o.prototype)?k(a)[$]=o:F=!1;for(s in I)(a=(o=c[s])&&o.prototype)&&(k(a)[$]=o);if((!F||!d(T)||T===Function.prototype)&&(T=function(){throw R("Incorrect invocation")},F))for(s in P)c[s]&&x(c[s],T);if((!F||!M||M===i)&&(M=T.prototype,F))for(s in P)c[s]&&x(c[s].prototype,M);if(F&&w(E)!==M&&x(E,M),h&&!p(M,A))for(s in b(M,A,{configurable:S=!0,get:function(){return u(this)?this[L]:void 0}}),P)c[s]&&f(c[s],L,s);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:S&&L,aTypedArray:function(e){if(r(e))return e;throw R("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!d(e)||x&&!y(T,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 P){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&&F&&C[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,i){var n,r;if(h){if(x){if(i)for(n in P)if((r=c[n])&&p(r,e))try{delete r[e]}catch(e){}if(T[e]&&!i)return;try{return v(T,e,!i&&F&&T[e]||t)}catch(e){}}for(n in P)!(r=c[n])||r[e]&&!i||v(r,e,t)}},getTypedArrayConstructor:n,isView:function(e){return!!u(e)&&("DataView"===(e=m(e))||p(P,e)||p(I,e))},isTypedArray:r,TypedArray:T,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<a--;)if(o(n=s[a],a,r))switch(l){case 0:return n;case 1:return a}return h?-1:void 0}}var c=i(99),d=i(13),u=i(40),p=i(64);e.exports={findLast:n(0),findLastIndex:n(1)}},(e,t,i)=>{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<arguments.length?arguments[1]:void 0)})},(e,t,i)=>{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<arguments.length?arguments[1]:void 0,1),i=l(e);if(p)return s(d,this,i,t);var e=this.length,n=o(i),r=0;if(e<n+t)throw h("Wrong length");for(;r<n;)this[t+r]=i[r++]},!p||r)},(e,t,i)=>{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<i;r++)n[r]=e[i-r-1];return n}},(e,t,i)=>{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<n;)r[i]=t[i++];return r}},(e,t,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<r;a++)o[a]=a===s?n:e[a];return o}},(e,t,i)=>{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),b=s(n,"resizable","get"),y=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=!b||!b(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&&y?{maxByteLength:y(e)}:void 0,r=new m(t,i),s=new g(e),o=new g(r),a=f(t,n),l=0;l<a;l++)x(o,l,w(s,l));return r}},(e,t,i)=>{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<s||l&&94<s||o&&97<s)&&(e=new ArrayBuffer(8),t=h(e,{transfer:[e]}),0!==e.byteLength||8!==t.byteLength)})},(e,t,i)=>{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<e.rangeChunkSize?e.rangeChunkSize:DEFAULT_RANGE_CHUNK_SIZE;let c=e.worker instanceof PDFWorker?e.worker:null;const d=e.verbosity,u="string"!=typeof e.docBaseUrl||(0,_display_utils.isDataScheme)(e.docBaseUrl)?null:e.docBaseUrl,p="string"==typeof e.cMapUrl?e.cMapUrl:null,m=!1!==e.cMapPacked,g=e.CMapReaderFactory||DefaultCMapReaderFactory,f="string"==typeof e.standardFontDataUrl?e.standardFontDataUrl:null,v=e.StandardFontDataFactory||DefaultStandardFontDataFactory,b=!0!==e.stopAtErrors,y=Number.isInteger(e.maxImageSize)&&-1<e.maxImageSize?e.maxImageSize:-1,w=!1!==e.isEvalSupported,x="boolean"==typeof e.isOffscreenCanvasSupported?e.isOffscreenCanvasSupported:!_util.isNodeJS,A=Number.isInteger(e.canvasMaxAreaInBytes)?e.canvasMaxAreaInBytes:-1,S="boolean"==typeof e.disableFontFace?e.disableFontFace:_util.isNodeJS,k=!0===e.fontExtraProperties,_=!0===e.enableXfa,C=e.ownerDocument||globalThis.document,E=!0===e.disableRange,T=!0===e.disableStream,M=!0===e.disableAutoFetch,R=!0===e.pdfBug,L=l?l.length:e.length??NaN,$="boolean"==typeof e.useSystemFonts?e.useSystemFonts:!_util.isNodeJS&&!S,F="boolean"==typeof e.useWorkerFetch?e.useWorkerFetch:g===_display_utils.DOMCMapReaderFactory&&v===_display_utils.DOMStandardFontDataFactory&&p&&f&&(0,_display_utils.isValidFetchUrl)(p,document.baseURI)&&(0,_display_utils.isValidFetchUrl)(f,document.baseURI),P=e.canvasFactory||new DefaultCanvasFactory({ownerDocument:C}),O=e.filterFactory||new DefaultFilterFactory({docId:n,ownerDocument:C}),I=((0,_util.setVerbosityLevel)(d),{canvasFactory:P,filterFactory:O});if(F||(I.cMapReaderFactory=new g({baseUrl:p,isCompressed:m}),I.standardFontDataFactory=new v({baseUrl:f})),!c){const e={verbosity:d,port:_worker_options.GlobalWorkerOptions.workerPort};c=e.port?PDFWorker.fromPort(e):new PDFWorker(e),i._worker=c}const D={docId:n,apiVersion:"3.11.174",data:s,password:t,disableAutoFetch:M,rangeChunkSize:h,length:L,docBaseUrl:u,enableXfa:_,evaluatorOptions:{maxImageSize:y,disableFontFace:S,ignoreErrors:b,isEvalSupported:w,isOffscreenCanvasSupported:x,canvasMaxAreaInBytes:A,fontExtraProperties:k,useSystemFonts:$,cMapUrl:F?p:null,standardFontDataUrl:F?f:null}},N={ignoreErrors:b,isEvalSupported:w,disableFontFace:S,fontExtraProperties:k,enableXfa:_,ownerDocument:C,disableAutoFetch:M,pdfBug:R,styleElement:null};return c.promise.then(function(){if(i.destroyed)throw new Error("Loading aborted");var e=_fetchDocument(c,D),t=new Promise(function(e){let t;var i;l?t=new _transport_stream.PDFDataTransportStream({length:L,initialData:l.initialData,progressiveDone:l.progressiveDone,contentDispositionFilename:l.contentDispositionFilename,disableRange:E,disableStream:T},l):s||(t=(i={url:r,length:L,httpHeaders:o,withCredentials:a,rangeChunkSize:h,disableRange:E,disableStream:T},new(_util.isNodeJS?_displayNode_stream.PDFNodeStream:(0,_display_utils.isValidFetchUrl)(i.url)?_displayFetch_stream.PDFFetchStream:_displayNetwork.PDFNetworkStream)(i))),e(t)});return Promise.all([e,t]).then(function(e){var[e,t]=e;if(i.destroyed)throw new Error("Loading aborted");e=new _message_handler.MessageHandler(n,e,c.port),t=new WorkerTransport(e,i,t,N,I);i._transport=t,e.send("Ready",null)})}).catch(i._capability.reject),i}async function _fetchDocument(e,t){if(e.destroyed)throw new Error("Worker was destroyed");t=await e.messageHandler.sendWithPromise("GetDocRequest",t,t.data?[t.data.buffer]:null);if(e.destroyed)throw new Error("Worker was destroyed");return t}function getUrlProp(e){if(e instanceof URL)return e.href;try{return new URL(e,window.location).href}catch{if(_util.isNodeJS&&"string"==typeof e)return e}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(e){if(_util.isNodeJS&&"undefined"!=typeof Buffer&&e instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(e instanceof Uint8Array&&e.byteLength===e.buffer.byteLength)return e;if("string"==typeof e)return(0,_util.stringToBytes)(e);if("object"==typeof e&&!isNaN(e?.length)||(0,_util.isArrayBuffer)(e))return new Uint8Array(e);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}exports.DefaultStandardFontDataFactory=DefaultStandardFontDataFactory;class PDFDocumentLoadingTask{static#e=0;constructor(){this._capability=new _util.PromiseCapability,this._transport=null,this._worker=null,this.docId="d"+PDFDocumentLoadingTask.#e++,this.destroyed=!1,this.onPassword=null,this.onProgress=null}get promise(){return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(e){throw this._worker?.port&&delete this._worker._pendingDestroy,e}this._transport=null,this._worker&&(this._worker.destroy(),this._worker=null)}}exports.PDFDocumentLoadingTask=PDFDocumentLoadingTask;class PDFDataRangeTransport{constructor(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;this.length=e,this.initialData=t,this.progressiveDone=i,this.contentDispositionFilename=n,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._progressiveDoneListeners=[],this._readyCapability=new _util.PromiseCapability}addRangeListener(e){this._rangeListeners.push(e)}addProgressListener(e){this._progressListeners.push(e)}addProgressiveReadListener(e){this._progressiveReadListeners.push(e)}addProgressiveDoneListener(e){this._progressiveDoneListeners.push(e)}onDataRange(e,t){for(const i of this._rangeListeners)i(e,t)}onDataProgress(t,i){this._readyCapability.promise.then(()=>{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<arguments.length&&void 0!==arguments[0]&&arguments[0]||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}get loadingParams(){return this._transport.loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}exports.PDFDocumentProxy=PDFDocumentProxy;class PDFPageProxy{#n=null;#i=!1;constructor(e,t,i){var n=3<arguments.length&&void 0!==arguments[3]&&arguments[3];this._pageIndex=e,this._pageInfo=t,this._transport=i,this._stats=n?new _display_utils.StatTimer:null,this._pdfBug=n,this.commonObjs=i.commonObjs,this.objs=new PDFObjects,this._maybeCleanupAfterRender=!1,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport(){var{scale:e,rotation:t=this.rotate,offsetX:i=0,offsetY:n=0,dontFlip:r=!1}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new _display_utils.PageViewport({viewBox:this.view,scale:e,rotation:t,offsetX:i,offsetY:n,dontFlip:r})}getAnnotations(){var{intent:e="display"}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this._transport.getRenderingIntent(e);return this._transport.getAnnotations(this._pageIndex,e.renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return(0,_util.shadow)(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render(e){let{canvasContext:t,viewport:i,intent:n="display",annotationMode:r=_util.AnnotationMode.ENABLE,transform:s=null,background:o=null,optionalContentConfigPromise:a=null,annotationCanvasMap:l=null,pageColors:h=null,printAnnotationStorage:c=null}=e;this._stats?.time("Overall");e=this._transport.getRenderingIntent(n,r,c);this.#i=!1,this.#r(),a=a||this._transport.getOptionalContentConfig();let d=this._intentStates.get(e.cacheKey);d||(d=Object.create(null),this._intentStates.set(e.cacheKey,d)),d.streamReaderCancelTimeout&&(clearTimeout(d.streamReaderCancelTimeout),d.streamReaderCancelTimeout=null);const u=!!(e.renderingIntent&_util.RenderingIntentFlag.PRINT),p=(d.displayReadyCapability||(d.displayReadyCapability=new _util.PromiseCapability,d.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(e)),e=>{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}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=this._transport.getRenderingIntent(e,t,i,!0);let n,r=this._intentStates.get(e.cacheKey);return r||(r=Object.create(null),this._intentStates.set(e.cacheKey,r)),r.opListReadCapability||((n=Object.create(null)).operatorListChanged=function(){r.operatorList.lastChunk&&(r.opListReadCapability.resolve(r.operatorList),r.renderTasks.delete(n))},r.opListReadCapability=new _util.PromiseCapability,(r.renderTasks||=new Set).add(n),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(e)),r.opListReadCapability.promise}streamTextContent(){var{includeMarkedContent:e=!1,disableNormalization:t=!1}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:!0===e,disableNormalization:!0===t},{highWaterMark:100,size:e=>e.items.length})}getTextContent(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this._transport._htmlForXfa)return this.getXfa().then(e=>_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<arguments.length&&void 0!==arguments[0]&&arguments[0],t=(this.#i=!0,this.#s(!1));return e&&t&&(this._stats&&=new _display_utils.StatTimer),t}#s(){let e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this.#r(),!this.#i||this.destroyed)return!1;if(e)return this.#n=setTimeout(()=>{this.#n=null,this.#s(!1)},DELAYED_CLEANUP_TIMEOUT),!1;for(const{renderTasks:e,operatorList:t}of this._intentStates.values())if(0<e.size||!t.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),!(this.#i=!1)}#r(){this.#n&&(clearTimeout(this.#n),this.#n=null)}_startRenderPage(e,t){t=this._intentStates.get(t);t&&(this._stats?.timeEnd("Page Request"),t.displayReadyCapability?.resolve(e))}_renderPageChunk(i,n){for(let e=0,t=i.length;e<t;e++)n.operatorList.fnArray.push(i.fnArray[e]),n.operatorList.argsArray.push(i.argsArray[e]);n.operatorList.lastChunk=i.lastChunk,n.operatorList.separateAnnots=i.separateAnnots;for(const i of n.renderTasks)i.operatorListChanged();i.lastChunk&&this.#s(!0)}_pumpOperatorList(e){var{renderingIntent:e,cacheKey:t,annotationStorageSerializable:i}=e;const{map:n,transfers:r}=i,s=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:e,cacheKey:t,annotationStorage:n},r).getReader(),o=this._intentStates.get(t),a=(o.streamReader=s,()=>{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.renderTasks.size)return;if(i instanceof _display_utils.RenderingCancelledException){let e=RENDERING_CANCELLED_TIMEOUT;return 0<i.extraDelay&&i.extraDelay<1e3&&(e+=i.extraDelay),void(t.streamReaderCancelTimeout=setTimeout(()=>{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<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this.name=e,this.destroyed=!1,this.verbosity=i,this._readyCapability=new _util.PromiseCapability,this._port=null,this._webWorker=null,this._messageHandler=null,t){if(PDFWorker.#l?.has(t))throw new Error("Cannot use more than one PDFWorker per port.");(PDFWorker.#l||=new WeakMap).set(t,this),this._initializeFromPort(t)}else this._initialize()}get promise(){return this._readyCapability.promise}get port(){return this._port}get messageHandler(){return this._messageHandler}_initializeFromPort(e){this._port=e,this._messageHandler=new _message_handler.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve(),this._messageHandler.send("configure",{verbosity:this.verbosity})}_initialize(){if(!PDFWorkerUtil.isWorkerDisabled&&!PDFWorker._mainThreadWorkerMessageHandler){let e=PDFWorker["workerSrc"];try{PDFWorkerUtil.isSameOrigin(window.location.href,e)||(e=PDFWorkerUtil.createCDNWrapper(new URL(e,window.location).href));const t=new Worker(e),i=new _message_handler.MessageHandler("main","worker",t),n=()=>{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<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=this.#c.get(e);return i||(i=this.messageHandler.sendWithPromise(e,t),this.#c.set(e,i),i)}get annotationStorage(){return(0,_util.shadow)(this,"annotationStorage",new _annotation_storage.AnnotationStorage)}getRenderingIntent(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:_util.AnnotationMode.ENABLE,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null,n=3<arguments.length&&void 0!==arguments[3]&&arguments[3],r=_util.RenderingIntentFlag.DISPLAY,s=_annotation_storage.SerializableEmpty;switch(e){case"any":r=_util.RenderingIntentFlag.ANY;break;case"display":break;case"print":r=_util.RenderingIntentFlag.PRINT;break;default:(0,_util.warn)("getRenderingIntent - invalid intent: "+e)}switch(t){case _util.AnnotationMode.DISABLE:r+=_util.RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case _util.AnnotationMode.ENABLE:break;case _util.AnnotationMode.ENABLE_FORMS:r+=_util.RenderingIntentFlag.ANNOTATIONS_FORMS;break;case _util.AnnotationMode.ENABLE_STORAGE:r+=_util.RenderingIntentFlag.ANNOTATIONS_STORAGE,s=(r&_util.RenderingIntentFlag.PRINT&&i instanceof _annotation_storage.PrintAnnotationStorage?i:this.annotationStorage).serializable;break;default:(0,_util.warn)("getRenderingIntent - invalid annotationMode: "+t)}return n&&(r+=_util.RenderingIntentFlag.OPLIST),{renderingIntent:r,cacheKey:r+"_"+s.hash,annotationStorageSerializable:s}}destroy(){if(!this.destroyCapability){this.destroyed=!0,this.destroyCapability=new _util.PromiseCapability,this.#u?.reject(new Error("Worker was destroyed during onPassword callback"));var e=[];for(const t of this.#h.values())e.push(t._destroy());this.#h.clear(),this.#d.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const t=this.messageHandler.sendWithPromise("Terminate",null);e.push(t),Promise.all(e).then(()=>{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=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const e of this.#h.values())if(!e.cleanup())throw new Error(`startCleanup: Page ${e.pageNumber} is currently rendering.`);this.commonObjs.clear(),e||this.fontLoader.clear(),this.#c.clear(),this.filterFactory.destroy(!0)}}get loadingParams(){var{disableAutoFetch:e,enableXfa:t}=this._params;return(0,_util.shadow)(this,"loadingParams",{disableAutoFetch:e,enableXfa:t})}}class PDFObjects{#f=Object.create(null);#g(e){return this.#f[e]||={capability:new _util.PromiseCapability,data:null}}get(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(t){const i=this.#g(e);return i.capability.promise.then(()=>t(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<arguments.length&&void 0!==arguments[1]?arguments[1]:null,e=this.#g(e);e.data=t,e.capability.resolve()}clear(){for(const t in this.#f){var e=this.#f[t]["data"];e?.bitmap?.close()}this.#f=Object.create(null)}}class RenderTask{#m=null;constructor(e){this.#m=e,this.onContinue=null}get promise(){return this.#m.capability.promise}cancel(){this.#m.cancel(null,0<arguments.length&&void 0!==arguments[0]?arguments[0]:0)}get separateAnnots(){var e,t=this.#m.operatorList["separateAnnots"];return!!t&&(e=this.#m["annotationCanvasMap"],t.form||t.canvas&&0<e?.size)}}exports.RenderTask=RenderTask;class InternalRenderTask{static#b=new WeakSet;constructor(e){var{callback:e,params:t,objs:i,commonObjs:n,annotationCanvasMap:r,operatorList:s,pageIndex:o,canvasFactory:a,filterFactory:l,useRequestAnimationFrame:h=!1,pdfBug:c=!1,pageColors:d=null}=e;this.callback=e,this.params=t,this.objs=i,this.commonObjs=n,this.annotationCanvasMap=r,this.operatorListIdx=null,this.operatorList=s,this._pageIndex=o,this.canvasFactory=a,this.filterFactory=l,this._pdfBug=c,this.pageColors=d,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=!0===h&&"undefined"!=typeof window,this.cancelled=!1,this.capability=new _util.PromiseCapability,this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics(e){var{transparency:e=!1,optionalContentConfig:t}=e;if(!this.cancelled){if(this._canvas){if(InternalRenderTask.#b.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");InternalRenderTask.#b.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var{canvasContext:i,viewport:n,transform:r,background:s}=this.params;this.gfx=new _canvas.CanvasGraphics(i,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:t},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:r,viewport:n,transparency:e,background:s}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}}cancel(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),InternalRenderTask.#b.delete(this._canvas),this.callback(e||new _display_utils.RenderingCancelledException("Rendering cancelled, page "+(this._pageIndex+1),t))}operatorListChanged(){this.graphicsReady?(this.stepper?.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||=this._continueBound}_continue(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?window.requestAnimationFrame(()=>{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)<e.size)&&(t=e.getIterator(),!1!==a(t,function(e){if(!r(i,e))return l(t,"normal",!1)}))}},(e,t,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 y(e,t);return(e=b(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",b=a("Error"),y=a(v),w=n.prototype=y.prototype,x="stack"in b(v),A="stack"in new y(1,2),f=y&&f&&Object.getOwnPropertyDescriptor(o,v),o=!(!f||f.writable&&f.configurable),f=x&&!o&&!A,S=(s({global:!0,constructor:!0,forced:i||f},{DOMException:f?n:y}),a(v)),x=S.prototype;if(x.constructor!==S)for(var k in i||h(x,"constructor",l(1,S)),m)!c(m,k)||c(S,r=(k=m[k]).s)||h(S,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 T("Uncloneable type: "+e,F)}function p(e,t){return O||D(t),O(e)}function m(e,t,i,n,r){var s=v[t];return w(s)||D(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(U(e)&&u("Symbol"),!w(e))return e;if(i){if(R(i,e))return L(i,e)}else i=new M;var t,r,s,o,a,l,h,c,d=A(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=b("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=E()}break;case"DOMException":s=new T(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(O)try{s=O(e),A(s)!==d&&(s=void 0)}catch(e){}if(!s)try{s=new File([e],e.name,e)}catch(e){}s||D(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<l;a++)o.items.add(f(e[a],i,n));s=o.files}else s=p(e,d);break;case"ImageData":try{s=new ImageData(f(e.data,i,n),e.width,e.height,{colorSpace:e.colorSpace})}catch(i){s=p(e,d)}break;default:if(O)s=O(e);else switch(d){case"BigInt":s=C(e.valueOf());break;case"Boolean":s=C(pe(e));break;case"Number":s=C(me(e));break;case"String":s=C(ge(e));break;case"Date":s=new J(fe(e));break;case"Blob":try{s=e.slice(0,e.size,e.type)}catch(e){D(d)}break;case"DOMPoint":case"DOMPointReadOnly":t=v[d];try{s=t.fromPoint?t.fromPoint(e):new t(e.x,e.y,e.z,e.w)}catch(e){D(d)}break;case"DOMRect":case"DOMRectReadOnly":t=v[d];try{s=t.fromRect?t.fromRect(e):new t(e.x,e.y,e.width,e.height)}catch(e){D(d)}break;case"DOMMatrix":case"DOMMatrixReadOnly":t=v[d];try{s=t.fromMatrix?t.fromMatrix(e):new t(e)}catch(e){D(d)}break;case"AudioData":case"VideoFrame":y(e.clone)||D(d);try{s=e.clone()}catch(e){u(d)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":D(d);default:u(d)}}switch($(i,e,s),d){case"Array":case"Object":for(h=de(e),a=0,l=k(h);a<l;a++)c=h[a],q(s,c,f(e[c],i,n));break;case"Map":e.forEach(function(e,t){$(s,f(t,i,n),f(e,i,n))});break;case"Set":e.forEach(function(e){ce(s,f(e,i,n))});break;case"Error":S(s,"message",f(e.message,i,n)),j(e,"cause")&&S(s,"cause",f(e.cause,i,n)),"AggregateError"===r&&(s.errors=f(e.errors,i,n));case"DOMException":Y&&S(s,"stack",f(e.stack,i,n))}return s}function d(e,i){if(!w(e))return e;if(R(i,e))return L(i,e);var t,n,r,s,o,a,l,h;if(e instanceof g)switch(t=e.type,n=e.object,t){case"ArrayBuffer":case"SharedArrayBuffer":h=N(n,i,t);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":r=e.metadata,h=m(n,t,r.offset,r.length,i)}else switch(A(e)){case"Array":case"Object":for(a=de(e),s=0,o=k(a);s<o;s++)e[l=a[s]]=d(e[l],i);break;case"Map":h=new M,e.forEach(function(e,t){$(h,d(t,i),d(e,i))});break;case"Set":h=new he,e.forEach(function(e){ce(h,d(e,i))});break;case"Error":e.message=d(e.message,i),j(e,"cause")&&(e.cause=d(e.cause,i)),"AggregateError"===e.name&&(e.errors=d(e.errors,i));case"DOMException":Y&&(e.stack=d(e.stack,i))}return $(i,e,h||e),h||e}var n,c=e(36),B=e(3),v=e(4),b=e(24),r=e(14),s=e(7),z=e(41),y=e(21),H=e(153),W=e(17),w=e(20),U=e(23),V=e(154),x=e(47),A=e(78),j=e(39),q=e(159),S=e(44),k=e(64),G=e(85),K=e(160),o=e(162),X=e(128),Y=e(83),_=e(119),C=v.Object,Q=v.Array,J=v.Date,E=v.Error,Z=v.EvalError,ee=v.RangeError,te=v.ReferenceError,ie=v.SyntaxError,ne=v.TypeError,re=v.URIError,se=v.PerformanceMark,e=v.WebAssembly,oe=e&&e.CompileError||E,ae=e&&e.LinkError||E,le=e&&e.RuntimeError||E,T=b("DOMException"),M=o.Map,R=o.has,L=o.get,$=o.set,he=X.Set,ce=X.add,de=b("Object","keys"),ue=r([].push),pe=r((!0).valueOf),me=r(1..valueOf),ge=r("".valueOf),fe=r(J.prototype.getTime),a=z("structuredClone"),F="DataCloneError",P="Transferring",I=v.structuredClone,e=c||!i(I,E)||!i(I,T)||(n=I,!!s(function(){var e=n(new v.AggregateError([1],a,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==a||3!==e.cause})),o=!I&&t(function(e){return new se(a,{detail:e}).detail}),O=t(I)||o,D=function(e,t){throw new T((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",F)},N=function(e,t,i){if(R(t,e))return L(t,e);var n,r,s,o,a,l;if("SharedArrayBuffer"===(i||A(e)))n=O?O(e):e;else{i=v.DataView;i||"function"==typeof e.slice||D("ArrayBuffer");try{if("function"!=typeof e.slice||e.resizable){r=e.byteLength,s="maxByteLength"in e?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(r,s),o=new i(e),a=new i(n);for(l=0;l<r;l++)a.setUint8(l,o.getUint8(l))}else n=e.slice(0)}catch(e){throw new T("ArrayBuffer is detached",F)}}return $(t,e,n),n};B({global:!0,enumerable:!0,sham:!_,forced:e},{structuredClone:function(e){var t,i=1<G(arguments.length,1)&&!W(arguments[1])?x(arguments[1]):void 0,i=i?i.transfer:void 0,n=!1,r=(void 0!==i&&(r=function(e,t){if(!w(e))throw ne("Transfer option cannot be converted to a sequence");var i=[];V(e,function(e){ue(i,x(e))});for(var n,r,s,o,a,l=0,h=k(i),c=[];l<h;)if(n=i[l++],"ArrayBuffer"!==(r=A(n))){if(R(t,n))throw new T("Duplicate transferable",F);if(_)o=I(n,{transfer:[n]});else switch(r){case"ImageBitmap":s=v.OffscreenCanvas,H(s)||D(r,P);try{(a=new s(n.width,n.height)).getContext("bitmaprenderer").transferFromImageBitmap(n),o=a.transferToImageBitmap()}catch(e){}break;case"AudioData":case"VideoFrame":y(n.clone)&&y(n.close)||D(r,P);try{o=n.clone(),n.close()}catch(e){}break;case"MediaSourceHandle":case"MessagePort":case"OffscreenCanvas":case"ReadableStream":case"TransformStream":case"WritableStream":D(r,P)}if(void 0===o)throw new T("This object cannot be transferred: "+r,F);$(t,n,o)}else ue(c,n);return c}(i,t=new M),n=!!k(r)),f(e,t,n));if(n){for(var s,o,a=i,l=t=new M,h=0,c=k(a);h<c;){if(s=a[h++],R(l,s))throw new T("Duplicate transferable",F);o=_?I(s,{transfer:[s]}):(y(s.transfer)||D("ArrayBuffer",P),s.transfer()),$(l,s,o)}r=d(r,t)}return r}})},(e,t,i)=>{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 b=i(99),y=i(8),w=i(47),x=i(32),A=i(155),S=i(64),k=i(25),_=i(157),C=i(158),E=i(140),T=TypeError,M=v.prototype;e.exports=function(e,t,i){function n(e){return s&&E(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=b(t,d);if(p)s=e.iterator;else if(m)s=e;else{if(!(i=C(e)))throw T(x(e)+" is not iterable");if(A(i)){for(o=0,a=S(e);o<a;o++)if((l=r(e[o]))&&k(M,l))return l;return new v(!1)}s=_(e,i)}for(h=(p?e:s).next;!(c=y(h,s)).done;){try{l=r(c.value)}catch(e){E(s,"throw",e)}if("object"==typeof l&&l&&k(M,l))return l}return new v(!1)}},(e,t,i)=>{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<this.#y.size?(0,n.objectFromMap)(this.#y):null}setAll(e){for(var[t,i]of Object.entries(e))this.setValue(t,i)}get size(){return this.#y.size}#_(){this.#v||(this.#v=!0,"function"==typeof this.onSetModified&&this.onSetModified())}resetModified(){this.#v&&(this.#v=!1,"function"==typeof this.onResetModified)&&this.onResetModified()}get print(){return new l(this)}get serializable(){if(0===this.#y.size)return a;const e=new Map,t=new o.MurmurHash3_64,i=[],n=Object.create(null);let r=!1;for(const[i,o]of this.#y){const a=o instanceof s.AnnotationEditor?o.serialize(!1,n):o;a&&(e.set(i,a),t.update(i+":"+JSON.stringify(a)),r||=!!a.bitmap)}if(r)for(const t of e.values())t.bitmap&&i.push(t.bitmap);return 0<e.size?{map:e,hash:t.hexdigest(),transfers:i}:a}}class l extends(t.AnnotationStorage=r){#A;constructor(e){super();var{map:e,hash:t,transfers:i}=e.serializable,e=structuredClone(e,null);this.#A={map:e,hash:t,transfers:i}}get print(){(0,n.unreachable)("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#A}}t.PrintAnnotationStorage=l},(e,t,i)=>{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 E{#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=E._zIndex++;static _borderLineWidth=-1;static _colorManager=new n.ColorManager;static _zIndex=1;static SMALL_EDITOR_SIZE=0;constructor(e){this.constructor===E&&(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<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(E._l10nPromise||=new Map(["editor_alt_text_button_label","editor_alt_text_edit_button_label","editor_alt_text_decorative_tooltip"].map(e=>[e,t.get(e)])),e?.strings)for(const i of e.strings)E._l10nPromise.set(i,t.get(i));if(-1===E._borderLineWidth){const i=getComputedStyle(document.documentElement);E._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.x||this.y<0||1<this.y)){const{x:e,y:t}=this.div.getBoundingClientRect();this.parent.findNewParent(this,e,t)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}var{x:e,y:i}=this,[t,n]=this.#N();i+=n,this.div.style.left=(100*(e+=t)).toFixed(2)+"%",this.div.style.top=(100*i).toFixed(2)+"%",this.div.scrollIntoView({block:"nearest"})}#N(){var[e,t]=this.parentDimensions,i=E["_borderLineWidth"],n=i/e,r=i/t;switch(this.rotation){case 90:return[-n,r];case 180:return[n,r];case 270:return[n,-r];default:return[-n,-r]}}fixAndSetPosition(){var[e,t]=this.pageDimensions;let{x:i,y:n,width:r,height:s}=this;switch(r*=e,s*=t,i*=e,n*=t,this.rotation){case 0:i=Math.max(0,Math.min(e-r,i)),n=Math.max(0,Math.min(t-s,n));break;case 90:i=Math.max(0,Math.min(e-s,i)),n=Math.min(t,Math.max(r,n));break;case 180:i=Math.min(e,Math.max(r,i)),n=Math.min(t,Math.max(s,n));break;case 270:i=Math.min(e,Math.max(s,i)),n=Math.max(0,Math.min(t-r,n))}this.x=i/=e,this.y=n/=t;var[o,a]=this.#N(),o=(i+=o,n+=a,this.div)["style"];o.left=(100*i).toFixed(2)+"%",o.top=(100*n).toFixed(2)+"%",this.moveInDOM()}static#B(e,t,i){switch(i){case 90:return[t,-e];case 180:return[-e,-t];case 270:return[-t,e];default:return[e,t]}}screenToPageTranslation(e,t){return E.#B(e,t,this.parentRotation)}pageTranslationToScreen(e,t){return E.#B(e,t,360-this.parentRotation)}#j(e){switch(e){case 90:{const[e,t]=this.pageDimensions;return[0,-e/t,t/e,0]}case 180:return[-1,0,0,-1];case 270:{const[e,i]=this.pageDimensions;return[0,e/i,-i/e,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){var{parentScale:e,pageDimensions:[t,i]}=this,t=t*e,i=i*e;return f.FeatureTest.isCSSRoundSupported?[Math.round(t),Math.round(i)]:[t,i]}setDims(e,t){var[i,n]=this.parentDimensions;this.div.style.width=(100*e/i).toFixed(2)+"%",this.#T||(this.div.style.height=(100*t/n).toFixed(2)+"%"),this.#x?.classList.toggle("small",e<E.SMALL_EDITOR_SIZE||t<E.SMALL_EDITOR_SIZE)}fixDims(){var e,t,i=this.div["style"],{height:n,width:r}=i,s=r.endsWith("%"),o=!this.#T&&n.endsWith("%");s&&o||([e,t]=this.parentDimensions,s||(i.width=(100*parseFloat(r)/e).toFixed(2)+"%"),this.#T)||o||(i.height=(100*parseFloat(n)/t).toFixed(2)+"%")}getInitialTranslation(){return[0,0]}#U(){if(!this.#P){this.#P=document.createElement("div"),this.#P.classList.add("resizers");const e=["topLeft","topRight","bottomRight","bottomLeft"];this._willKeepAspectRatio||e.push("topMiddle","middleRight","bottomMiddle","middleLeft");for(const t of e){const e=document.createElement("div");this.#P.append(e),e.classList.add("resizer",t),e.addEventListener("pointerdown",this.#z.bind(this,t)),e.addEventListener("contextmenu",r.noContextMenu)}this.div.prepend(this.#P)}}#z(e,t){t.preventDefault();var i=f.FeatureTest.platform["isMac"];if(!(0!==t.button||t.ctrlKey&&i)){const o=this.#W.bind(this,e),a=this._isDraggable,l={passive:!(this._isDraggable=!1),capture:!0},h=(window.addEventListener("pointermove",o,l),this.x),c=this.y,d=this.width,u=this.height,p=this.parent.div.style.cursor,m=this.div.style.cursor,g=(this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(t.target).cursor,()=>{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=E.MIN_SIZE/i,h=E.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 b=m(o,a),y=g(o,a),e=u(...y),w=c(r+e[0]),x=c(s+e[1]);let A=1,S=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);A=S=Math.max(Math.min(Math.hypot(y[0]-b[0]-k,y[1]-b[1]-_)/e,1/o,1/a),l/o,h/a)}else v?A=Math.max(l,Math.min(1,Math.abs(y[0]-b[0]-k)))/o:S=Math.max(h,Math.min(1,Math.abs(y[1]-b[1]-_)))/a;var t=c(o*A),C=c(a*S),y=w-(e=u(...g(t,C)))[0],b=x-e[1];this.width=t,this.height=C,this.x=y,this.y=b,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 E._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),!E.SMALL_EDITOR_SIZE){const e=40;E.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){E._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 E._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=E){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,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"/></svg>';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=0<arguments.length&&void 0!==arguments[0]?arguments[0]:128}add(e){var{cmd:e,undo:t,mustExec:i,type:n=NaN,overwriteIfSameType:r=!1,keepUndo:s=!1}=e;i&&e(),this.#Y||(i={cmd:e,undo:t,type:n},-1===this.#Q?(0<this.#K.length&&(this.#K.length=0),this.#Q=0,this.#K.push(i)):r&&this.#K[this.#Q].type===n?(s&&(i.undo=this.#K[this.#Q].undo),this.#K[this.#Q]=i):((e=this.#Q+1)===this.#J?this.#K.splice(0,1):(this.#Q=e)<this.#K.length&&this.#K.splice(e),this.#K.push(i)))}undo(){-1!==this.#Q&&(this.#Y=!0,this.#K[this.#Q].undo(),this.#Y=!1,--this.#Q)}redo(){this.#Q<this.#K.length-1&&(this.#Q+=1,this.#Y=!0,this.#K[this.#Q].cmd(),this.#Y=!1)}hasSomethingToUndo(){return-1!==this.#Q}hasSomethingToRedo(){return this.#Q<this.#K.length-1}destroy(){this.#K=null}}t.CommandManager=r;class l{constructor(e){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;var t=s.FeatureTest.platform["isMac"];for(const[n,s,r={}]of e)for(const e of n){var i=e.startsWith("mac+");t&&i?(this.callbacks.set(e.slice(4),{callback:s,options:r}),this.allKeys.add(e.split("+").at(-1))):t||i||(this.callbacks.set(e,{callback:s,options:r}),this.allKeys.add(e.split("+").at(-1)))}}#Z(e){e.altKey&&this.buffer.push("alt"),e.ctrlKey&&this.buffer.push("ctrl"),e.metaKey&&this.buffer.push("meta"),e.shiftKey&&this.buffer.push("shift"),this.buffer.push(e.key);e=this.buffer.join("+");return this.buffer.length=0,e}exec(e,t){var i,n,r,s;this.allKeys.has(t.key)&&(i=this.callbacks.get(this.#Z(t)))&&({callback:i,options:{bubbles:n=!1,args:r=[],checker:s=null}}=i,s&&!s(e,t)||(i.bind(e,...r)(),n)||(t.stopPropagation(),t.preventDefault()))}}t.KeyboardManager=l;class h{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){var e=new Map([["CanvasText",null],["Canvas",null]]);return(0,o.getColorValues)(e),(0,s.shadow)(this,"_colors",e)}convert(e){const i=(0,o.getRGB)(e);if(window.matchMedia("(forced-colors: active)").matches)for(const[e,t]of this._colors)if(t.every((e,t)=>e===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<arguments.length&&void 0!==arguments[0]&&arguments[0])}addShouldRescale(e){this.#ht.add(e)}removeShouldRescale(e){this.#ht.delete(e)}onScaleChanging(e){e=e.scale;this.commitOrRemove(),this.viewParameters.realScale=e*o.PixelsPerInch.PDF_TO_CSS_UNITS;for(const e of this.#ht)e.onScaleChanging()}onRotationChanging(e){e=e.pagesRotation;this.commitOrRemove(),this.viewParameters.rotation=e}addToAnnotationStorage(e){e.isEmpty()||!this.#rt||this.#rt.has(e.id)||this.#rt.setValue(e.id,e)}#Lt(){window.addEventListener("focus",this.#_t),window.addEventListener("blur",this.#yt)}#Ot(){window.removeEventListener("focus",this.#_t),window.removeEventListener("blur",this.#yt)}blur(){if(this.hasSelection){var e=document["activeElement"];for(const t of this.#bt)if(t.div.contains(e)){this.#gt=[t,e],t._focusEventsAllowed=!1;break}}}focus(){if(this.#gt){const[e,t]=this.#gt;this.#gt=null,t.addEventListener("focusin",()=>{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<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(this.#mt!==e)if((this.#mt=e)!==s.AnnotationEditorType.NONE){this.setEditingState(!0),this.#Gt(),this.unselectAll();for(const t of this.#nt.values())t.updateMode(e);if(t)for(const e of this.#et.values())if(e.annotationElementId===t){this.setSelected(e),e.enterInEditMode();break}}else this.setEditingState(!1),this.#Vt()}updateToolbar(e){e!==this.#mt&&this._eventBus.dispatch("switchannotationeditormode",{source:this,mode:e})}updateParams(e,t){if(this.#ct)if(e!==s.AnnotationEditorParamsType.CREATE){for(const i of this.#bt)i.updateParams(e,t);for(const n of this.#ct)n.updateDefaultParams(e,t)}else this.currentLayer.addNewEditor(e)}enableWaiting(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this.#ft!==e){this.#ft=e;for(const t of this.#nt.values())e?t.disableClick():t.enableClick(),t.div.classList.toggle("waiting",e)}}#Gt(){if(!this.#pt){this.#pt=!0;for(const e of this.#nt.values())e.enable()}}#Vt(){if(this.unselectAll(),this.#pt){this.#pt=!1;for(const e of this.#nt.values())e.disable()}}getEditors(e){var t=[];for(const i of this.#et.values())i.pageIndex===e&&t.push(i);return t}getEditor(e){return this.#et.get(e)}addEditor(e){this.#et.set(e.id,e)}removeEditor(e){this.#et.delete(e.id),this.unselect(e),e.annotationElementId&&this.#ot.has(e.annotationElementId)||this.#rt?.remove(e.id)}addDeletedAnnotationElement(e){this.#ot.add(e.annotationElementId),e.deleted=!0}isDeletedAnnotationElement(e){return this.#ot.has(e)}removeDeletedAnnotationElement(e){this.#ot.delete(e.annotationElementId),e.deleted=!1}#Ut(e){var t=this.#nt.get(e.pageIndex);t?t.addOrRebuild(e):this.addEditor(e)}setActiveEditor(e){this.#tt!==e&&(this.#tt=e)&&this.#Ht(e.propertiesToUpdate)}toggleSelected(e){this.#bt.has(e)?(this.#bt.delete(e),e.unselect(),this.#Wt({hasSelectedEditor:this.hasSelection})):(this.#bt.add(e),e.select(),this.#Ht(e.propertiesToUpdate),this.#Wt({hasSelectedEditor:!0}))}setSelected(e){for(const t of this.#bt)t!==e&&t.unselect();this.#bt.clear(),this.#bt.add(e),e.select(),this.#Ht(e.propertiesToUpdate),this.#Wt({hasSelectedEditor:!0})}isSelected(e){return this.#bt.has(e)}unselect(e){e.unselect(),this.#bt.delete(e),this.#Wt({hasSelectedEditor:this.hasSelection})}get hasSelection(){return 0!==this.#bt.size}undo(){this.#st.undo(),this.#Wt({hasSomethingToUndo:this.#st.hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#qt()})}redo(){this.#st.redo(),this.#Wt({hasSomethingToUndo:!0,hasSomethingToRedo:this.#st.hasSomethingToRedo(),isEmpty:this.#qt()})}addCommands(e){this.#st.add(e),this.#Wt({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#qt()})}#qt(){if(0===this.#et.size)return!0;if(1===this.#et.size)for(const e of this.#et.values())return e.isEmpty();return!1}delete(){if(this.commitOrRemove(),this.hasSelection){const t=[...this.#bt];this.addCommands({cmd:()=>{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<arguments.length&&void 0!==arguments[2]&&arguments[2]||this.commitOrRemove(),this.hasSelection){this.#Mt[0]+=e,this.#Mt[1]+=t;const[i,n]=this.#Mt,r=[...this.#bt];this.#Ft&&clearTimeout(this.#Ft),this.#Ft=setTimeout(()=>{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,O,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=b(h),p=c?n.nodes:u?[]:{};if(u)for(r=p.length,o=w(h),a=0;a<o;a++)g(h,a,m(h,""+a,i,a<r?p[a]:void 0));else for(s=_(h),o=w(s),a=0;a<o;a++)l=s[a],g(h,l,m(h,l,i,y(p,l)?p[l]:void 0))}return f(i,e,t,h,d)}function g(e,t,i){if(r){var n=C(e,t);if(n&&!n.configurable)return}void 0===i?delete e[t]:d(e,t,i)}function s(e,t,i,n){this.value=e,this.end=t,this.source=i,this.nodes=n}function o(e,t){this.source=e,this.index=t}var i=t(3),r=t(6),n=t(4),a=t(24),l=t(14),f=t(8),h=t(21),v=t(20),b=t(91),y=t(39),c=t(77),w=t(64),d=t(159),u=t(7),p=t(167),t=t(27),x=n.JSON,A=n.Number,S=n.SyntaxError,k=x&&x.parse,_=a("Object","keys"),C=Object.getOwnPropertyDescriptor,E=l("".charAt),T=l("".slice),M=l(/./.exec),R=l([].push),L=/^\d$/,$=/^[1-9]$/,F=/^(?:-|\d)$/,P=/^[\t\n\r ]$/,n=(o.prototype={fork:function(e){return new o(this.source,e)},parse:function(){var e=this.source,t=this.skip(P,this.index),i=this.fork(t),e=E(e,t);if(M(F,e))return i.number();switch(e){case"{":return i.object();case"[":return i.array();case'"':return i.string();case"t":return i.keyword(!0);case"f":return i.keyword(!1);case"n":return i.keyword(null)}throw S('Unexpected character: "'+e+'" at: '+t)},node:function(e,t,i,n,r){return new s(t,n,e?null:T(this.source,i,n),r)},object:function(){for(var e=this.source,t=this.index+1,i=!1,n={},r={};t<e.length;){if(t=this.until(['"',"}"],t),"}"===E(e,t)&&!i){t++;break}var s=this.fork(t).string(),o=s.value,t=s.end,o=(t=this.until([":"],t)+1,t=this.skip(P,t),s=this.fork(t).parse(),d(r,o,s),d(n,o,s.value),t=this.until([",","}"],s.end),E(e,t));if(","===o)i=!0,t++;else if("}"===o){t++;break}}return this.node(1,n,this.index,t,r)},array:function(){for(var e=this.source,t=this.index+1,i=!1,n=[],r=[];t<e.length;){if(t=this.skip(P,t),"]"===E(e,t)&&!i){t++;break}var s=this.fork(t).parse();if(R(r,s),R(n,s.value),t=this.until([",","]"],s.end),","===E(e,t))i=!0,t++;else if("]"===E(e,t)){t++;break}}return this.node(1,n,this.index,t,r)},string:function(){var e=this.index,t=p(this.source,this.index+1);return this.node(0,t.value,e,t.end)},number:function(){var e=this.source,t=this.index,i=t;if("-"===E(e,i)&&i++,"0"===E(e,i))i++;else{if(!M($,E(e,i)))throw S("Failed to parse number at: "+i);i=this.skip(L,++i)}if("."===E(e,i)&&(i=this.skip(L,++i)),"e"!==E(e,i)&&"E"!==E(e,i)||("+"!==E(e,++i)&&"-"!==E(e,i)||i++,i!==(i=this.skip(L,i))))return this.node(0,A(T(e,t,i)),t,i);throw S("Failed to parse number's exponent value at: "+i)},keyword:function(e){var t=""+e,i=this.index,n=i+t.length;if(T(this.source,i,n)!==t)throw S("Failed to parse value at: "+i);return this.node(0,e,i,n)},skip:function(e,t){for(var i=this.source;t<i.length&&M(e,E(i,t));t++);return t},until:function(e,t){t=this.skip(P,t);for(var i=E(this.source,t),n=0;n<e.length;n++)if(e[n]===i)return t;throw S('Unexpected character: "'+i+'" at: '+t)}},u(function(){var n,e="9007199254740993";return k(e,function(e,t,i){n=i.source}),n!==e})),I=t&&!u(function(){return 1/k("-0 \t")!=-1/0});i({target:"JSON",stat:!0,forced:n},{parse:function(e,t){if(I&&!h(t))return k(e);var i=0,e=(i=c(e),new o(i,0)),n=e.parse(),r=n.value;if((e=e.skip(P,n.end))<i.length)throw S('Unexpected extra character: "'+E(i,e)+'" after the parsed data at: '+e);return h(t)?m({"":r},"",t,n):r}})},(e,t,i)=>{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<e.length;){var r=c(e,t);if("\\"===r){var s=d(e,t,t+2);if(o(p,s))n+=p[s],t+=2;else{if("\\u"!==s)throw a('Unknown escape sequence: "'+s+'"');s=d(e,t+=2,t+4);if(!u(m,s))throw a("Bad Unicode escape at: "+t);n+=h(l(s,16)),t+=4}}else{if('"'===r){i=!1,t++;break}if(u(g,r))throw a("Bad control character in string literal at: "+t);n+=r,t++}}if(i)throw a("Unterminated string at: "+t);return{value:n,end:t}}},(e,t,i)=>{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,b(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<arguments.length&&void 0!==arguments[1]&&arguments[1]||([e]=e.split(/[#?]/,1)),e.substring(e.lastIndexOf("/")+1)},t.getPdfFilenameFromUrl=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"document.pdf";if("string"!=typeof e)return t;if(g(e))return(0,d.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),t;var i=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i,e=/^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/.exec(e);let n=i.exec(e[1])||i.exec(e[2])||i.exec(e[3]);if(n&&(n=n[0]).includes("%"))try{n=i.exec(decodeURIComponent(n))[0]}catch{}return n||t},t.getRGB=b,t.getXfaPageViewport=function(e,t){var{scale:t=1,rotation:i=0}=t,{width:e,height:n}=e.attributes.style,e=[0,0,parseInt(e),parseInt(n)];return new p({viewBox:e,scale:t,rotation:i})},t.isDataScheme=g,t.isPdfFile=function(e){return"string"==typeof e&&/\.pdf$/i.test(e)},t.isValidFetchUrl=f,t.loadScript=function(n){let r=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return new Promise((t,e)=>{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<arguments.length&&void 0!==arguments[2]&&arguments[2],n=!(3<arguments.length&&void 0!==arguments[3])||arguments[3];if(t instanceof p){const{pageWidth:n,pageHeight:r}=t.rawDims,s=e["style"],o=d.FeatureTest.isCSSRoundSupported,a=`var(--scale-factor) * ${n}px`,l=`var(--scale-factor) * ${r}px`,h=o?`round(${a}, 1px)`:`calc(${a})`,c=o?`round(${l}, 1px)`:`calc(${l})`;i&&t.rotation%180!=0?(s.width=c,s.height=h):(s.width=h,s.height=c)}n&&e.setAttribute("data-main-rotation",t.rotation)},i(2),i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123),i(89),i(84),i(86),i(87);var n=i(169),d=i(1);const s="http://www.w3.org/2000/svg";class r{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}t.PixelsPerInch=r;class o extends n.BaseFilterFactory{#$t;#Xt;#e;#Kt;#Yt;#Jt;#Qt;#Zt;#te;#ee;#G=0;constructor(){var{docId:e,ownerDocument:t=globalThis.document}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};super(),this.#e=e,this.#Kt=t}get#$(){return this.#$t||=new Map}get#ne(){var e,t;return this.#Xt||(t=(e=this.#Kt.createElement("div"))["style"],t.visibility="hidden",t.contain="strict",t.width=t.height=0,t.position="absolute",t.top=t.left=0,t.zIndex=-1,(t=this.#Kt.createElementNS(s,"svg")).setAttribute("width",0),t.setAttribute("height",0),this.#Xt=this.#Kt.createElementNS(s,"defs"),e.append(t),t.append(this.#Xt),this.#Kt.body.append(e)),this.#Xt}addFilter(e){if(!e)return"none";let t,i,n,r,s=this.#$.get(e);if(s)return s;if(1===e.length){const s=e[0],o=new Array(256);for(let e=0;e<256;e++)o[e]=s[e]/255;r=t=i=n=o.join(",")}else{const[s,o,a]=e,l=new Array(256),h=new Array(256),c=new Array(256);for(let e=0;e<256;e++)l[e]=s[e]/255,h[e]=o[e]/255,c[e]=a[e]/255;t=l.join(","),i=h.join(","),n=c.join(","),r=""+t+i+n}if(s=this.#$.get(r))return this.#$.set(e,s),s;const o=`g_${this.#e}_transfer_map_`+this.#G++,a=`url(#${o})`,l=(this.#$.set(e,a),this.#$.set(r,a),this.#ie(o));return this.#re(t,i,n,l),a}addHCMFilter(e,t){var i=e+"-"+t;if(this.#Jt!==i&&(this.#Jt=i,this.#Qt="none",this.#Yt?.remove(),e)&&t){const s=this.#se(e),o=(e=d.Util.makeHexColor(...s),this.#se(t));if(t=d.Util.makeHexColor(...o),this.#ne.style.color="",("#000000"!==e||"#ffffff"!==t)&&e!==t){var n=new Array(256);for(let e=0;e<=255;e++){const t=e/255;n[e]=t<=.03928?t/12.92:((.055+t)/1.055)**2.4}i=n.join(","),e=`g_${this.#e}_hcm_filter`,t=this.#Zt=this.#ie(e),i=(this.#re(i,i,i,t),this.#ae(t),(e,t)=>{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<l&&([l,h,e,t]=[h,l,t,e]),this.#ne.style.color="";n=(e,t,i)=>{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<arguments.length&&void 0!==arguments[0]&&arguments[0]&&(this.#Qt||this.#ee)||(this.#Xt&&(this.#Xt.parentNode.parentNode.remove(),this.#Xt=null),this.#$t&&(this.#$t.clear(),this.#$t=null),this.#G=0)}#ae(e){var t=this.#Kt.createElementNS(s,"feColorMatrix");t.setAttribute("type","matrix"),t.setAttribute("values","0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),e.append(t)}#ie(e){var t=this.#Kt.createElementNS(s,"filter");return t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("id",e),this.#ne.append(t),t}#oe(e,t,i){t=this.#Kt.createElementNS(s,t);t.setAttribute("type","discrete"),t.setAttribute("tableValues",i),e.append(t)}#re(e,t,i,n){var r=this.#Kt.createElementNS(s,"feComponentTransfer");n.append(r),this.#oe(r,"feFuncR",e),this.#oe(r,"feFuncG",t),this.#oe(r,"feFuncB",i)}#se(e){return this.#ne.style.color=e,b(getComputedStyle(this.#ne).getPropertyValue("color"))}}t.DOMFilterFactory=o;class a extends n.BaseCanvasFactory{constructor(){var{ownerDocument:e=globalThis.document}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};super(),this._document=e}_createCanvas(e,t){var i=this._document.createElement("canvas");return i.width=e,i.height=t,i}}async function l(n,e){let r=1<arguments.length&&void 0!==e&&e;if(f(n,document.baseURI)){e=await fetch(n);if(e.ok)return r?new Uint8Array(await e.arrayBuffer()):(0,d.stringToBytes)(await e.text());throw new Error(e.statusText)}return new Promise((t,e)=>{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<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return new p({viewBox:this.viewBox.slice(),scale:e,rotation:t,offsetX:i,offsetY:n,dontFlip:r})}convertToViewportPoint(e,t){return d.Util.applyTransform([e,t],this.transform)}convertToViewportRectangle(e){var t=d.Util.applyTransform([e[0],e[1]],this.transform),e=d.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],e[0],e[1]]}convertToPdfPoint(e,t){return d.Util.applyInverseTransform([e,t],this.transform)}}t.PageViewport=p;class m extends d.BaseException{constructor(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;super(e,"RenderingCancelledException"),this.extraDelay=t}}function g(e){var t=e.length;let i=0;for(;i<t&&""===e[i].trim();)i++;return"data:"===e.substring(i,i+5).toLowerCase()}function f(e,t){try{var i=(t?new URL(e,t):new URL(e))["protocol"];return"http:"===i||"https:"===i}catch{return!1}}t.RenderingCancelledException=m,t.StatTimer=class{started=Object.create(null);times=[];time(e){e in this.started&&(0,d.warn)("Timer is already running for "+e),this.started[e]=Date.now()}timeEnd(e){e in this.started||(0,d.warn)("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}toString(){const e=[];let t=0;for(const{name:e}of this.times)t=Math.max(e.length,t);for(var{name:i,start:n,end:r}of this.times)e.push(`${i.padEnd(t)} ${r-n}ms\n`);return e.join("")}};let v;function b(e){var t;return e.startsWith("#")?[(16711680&(t=parseInt(e.slice(1),16)))>>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<arguments.length&&void 0!==arguments[2]&&arguments[2];if(e<=0||t<=0)throw new Error("Invalid SVG dimensions");var n=this._createSVG("svg:svg");return n.setAttribute("version","1.1"),i||(n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px")),n.setAttribute("preserveAspectRatio","none"),n.setAttribute("viewBox",`0 0 ${e} `+t),n}createElement(e){if("string"!=typeof e)throw new Error("Invalid SVG element type");return this._createSVG(e)}_createSVG(e){(0,n.unreachable)("Abstract method `_createSVG` called.")}}},(e,t,i)=>{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<t;e++){const s=i.charCodeAt(e);s<=255?n[r++]=s:(n[r++]=s>>>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<s;e++)1&e?(o=(o=(o=(o=t[e])*c&p|11601*o&m)<<15|o>>>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<t.length&&t[0].done;){var e=t.shift();setTimeout(e.callback,0)}},callback:e};return t.push(i),i}get _loadTestFont(){var e=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return(0,p.shadow)(this,"_loadTestFont",e)}_prepareFontLoadEvent(e,t){function i(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function n(e,t,i,n){return e.substring(0,t)+n+e.substring(t+i)}let r,s;var o=this._document.createElement("canvas");o.width=1,o.height=1;const a=o.getContext("2d");let l=0;var h="lt"+Date.now()+this.loadTestFontId++,c=1482184792;let d=i(o=n(this._loadTestFont,976,h.length,h),16);for(r=0,s=h.length-3;r<s;r+=4)d=d-c+i(h,r)|0;r<h.length&&(d=d-c+i(h+"XXX",r)|0),o=n(o,16,4,(0,p.string32)(d));o=`@font-face {font-family:"${h}";src:${`url(data:font/opentype;base64,${btoa(o)});`}}`;this.insertRule(o);const u=this._document.createElement("div");u.style.visibility="hidden",u.style.width=u.style.height="10px",u.style.position="absolute",u.style.top=u.style.left="0px";for(const t of[e.loadedName,h]){const e=this._document.createElement("span");e.textContent="Hi",e.style.fontFamily=t,u.append(e)}this._document.body.append(u),function e(t,i){30<++l?((0,p.warn)("Load test font never loaded."),i()):(a.font="30px "+t,a.fillText(".",0,20),0<a.getImageData(0,0,1,1).data[3]?i():setTimeout(e.bind(null,t,i)))}(h,()=>{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,b=Math.round(v),y=(o+l)*c+m,w=Math.abs(Math.round(y)-f)||1,x=(a+h)*p+g,A=Math.abs(Math.round(x)-b)||1;e.setTransform(Math.sign(c),0,0,Math.sign(p),f,b),e.drawImage(t,i,n,r,s,0,0,w,A),void e.setTransform(c,d,u,p,m,g)}else if(0===c&&0===p){const R=a*u+m,S=Math.round(R),k=o*d+g,_=Math.round(k),C=(a+h)*u+m,E=Math.abs(Math.round(C)-S)||1,T=(o+l)*d+g,M=Math.abs(Math.round(T)-_)||1;e.setTransform(0,Math.sign(d),Math.sign(u),0,S,_),e.drawImage(t,i,n,r,s,0,0,M,E),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<arguments.length&&void 0!==arguments[0]?arguments[0]:x.PathType.FILL,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;var i=[this.minX,this.minY,this.maxX,this.maxY];if(e===x.PathType.STROKE){t||(0,w.unreachable)("Stroke bounding box must include transform.");const e=w.Util.singularValueDecompose2dScale(t),n=e[0]*this.lineWidth/2,x=e[1]*this.lineWidth/2;i[0]-=n,i[1]-=x,i[2]+=n,i[3]+=x}return i}updateClipFromPath(){var e=w.Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(e||[0,0,0,0])}isEmptyClip(){return this.minX===1/0}startNewPathAndClipBox(e){this.clipBox=e,this.minX=1/0,this.minY=1/0,this.maxX=0,this.maxY=0}getClippedPathBoundingBox(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:x.PathType.FILL;return w.Util.intersect(this.clipBox,this.getPathBoundingBox(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:null))}}function o(o,a){if("undefined"!=typeof ImageData&&a instanceof ImageData)o.putImageData(a,0,0);else{const c=a.height,d=a.width,u=c%16,p=(c-u)/16,m=0===u?p:p+1,g=o.createImageData(d,16);let n,r=0;var l=a.data,h=g.data;let t,i,s,e;if(a.kind===w.ImageKind.GRAYSCALE_1BPP){const a=l.byteLength,c=new Uint32Array(h.buffer,0,h.byteLength>>2),e=c.length,f=d+7>>3,v=4294967295,b=w.FeatureTest.isLittleEndian?4278190080:255;for(t=0;t<m;t++){for(s=t<p?16:u,n=0,i=0;i<s;i++){const o=a-r;let e=0;const u=o>f?d:8*o-7,p=-8&u;let t=0,i=0;for(;e<p;e+=8)i=l[r++],c[n++]=128&i?v:b,c[n++]=64&i?v:b,c[n++]=32&i?v:b,c[n++]=16&i?v:b,c[n++]=8&i?v:b,c[n++]=4&i?v:b,c[n++]=2&i?v:b,c[n++]=1&i?v:b;for(;e<u;e++)0===t&&(i=l[r++],t=128),c[n++]=i&t?v:b,t>>=1}for(;n<e;)c[n++]=0;o.putImageData(g,0,16*t)}}else if(a.kind===w.ImageKind.RGBA_32BPP){for(i=0,e=16*d*4,t=0;t<p;t++)h.set(l.subarray(r,r+e)),r+=e,o.putImageData(g,0,i),i+=16;t<m&&(e=d*u*4,h.set(l.subarray(r,r+e)),o.putImageData(g,0,i))}else{if(a.kind!==w.ImageKind.RGB_24BPP)throw new Error("bad image kind: "+a.kind);for(s=16,e=d*s,t=0;t<m;t++){for(t>=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 b(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<h;e++){const s=e<l?16:a;({srcPos:t}=(0,d.convertBlackAndWhiteToRGBA)({src:n,srcPos:t,dest:r,width:o,height:s,nonBlackColor:0})),i.putImageData(c,0,16*e)}}}function m(e,t){for(const i of["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"])void 0!==e[i]&&(t[i]=e[i]);void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function g(e){var t;e.strokeStyle=e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0),w.isNodeJS||(t=e["filter"],"none"!==t&&""!==t&&(e.filter="none"))}function L(t,i,n){const r=t.length;for(let e=3;e<r;e+=4){const r=n?n[t[e]]:t[e];i[e]=i[e]*r*.00392156862745098|0}}function $(t,i,n){const r=t.length;for(let e=3;e<r;e+=4){const r=77*t[e-3]+152*t[e-2]+28*t[e-1];i[e]=n?i[e]*n[r>>8]>>8:i[e]*r>>16}}function y(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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof e?(e.startsWith("g_")?this.commonObjs:this.objs).get(e):t}beginDrawing(e){var{transform:e,viewport:t,transparency:i=!1,background:n=null}=e,r=this.ctx.canvas.width,s=this.ctx.canvas.height,o=this.ctx.fillStyle;if(this.ctx.fillStyle=n||"#ffffff",this.ctx.fillRect(0,0,r,s),this.ctx.fillStyle=o,i){const e=this.cachedCanvases.getCanvas("transparent",r,s);this.compositeCtx=this.ctx,this.transparentCanvas=e.canvas,this.ctx=e.context,this.ctx.save(),this.ctx.transform(...(0,R.getCurrentTransform)(this.compositeCtx))}this.ctx.save(),g(this.ctx),e&&(this.ctx.transform(...e),this.outputScaleX=e[0],this.outputScaleY=e[0]),this.ctx.transform(...t.transform),this.viewportScale=t.scale,this.baseTransform=(0,R.getCurrentTransform)(this.ctx)}executeOperatorList(e,t,i,n){var r=e.argsArray,s=e.fnArray;let o=t||0;var a=r.length;if(a===o)return o;var l=10<a-o&&"function"==typeof i,h=l?Date.now()+15:0;let c=0;for(var d,u=this.commonObjs,p=this.objs;;){if(void 0!==n&&o===n.nextBreakPoint)return n.breakIt(o,i),o;if((d=s[o])!==w.OPS.dependency)this[d].apply(this,r[o]);else for(const e of r[o]){const t=e.startsWith("g_")?u:p;if(!t.has(e))return t.get(e,i),o}if(++o===a)return o;if(l&&10<++c){if(Date.now()>h)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<o&&1<l||2<a&&1<h;){let e=l,t=h;2<o&&1<l&&(e=16384<=l?Math.floor(l/2)-1||1:Math.ceil(l/2),o/=l/e),2<a&&1<h&&(t=16384<=h?Math.floor(h/2)-1||1:Math.ceil(h)/2,a/=h/t),r=this.cachedCanvases.getCanvas(c,e,t),(s=r.context).clearRect(0,0,e,t),s.drawImage(i,0,0,l,h,0,0,e,t),i=r.canvas,l=e,h=t,c="prescale1"===c?"prescale2":"prescale1"}return{img:i,paintWidth:l,paintHeight:h}}_createMaskCanvas(e){const t=this.ctx,{width:i,height:n}=e,r=this.current.fillColor,s=this.current.patternFill,o=(0,R.getCurrentTransform)(t);let a,l,h,c;if((e.bitmap||e.data)&&1<e.count){const t=e.bitmap||e.data.buffer,i=(l=JSON.stringify(s?o:[o.slice(0,4),r]),(a=this._cachedBitmapsMap.get(t))||(a=new Map,this._cachedBitmapsMap.set(t,a)),a.get(l));if(i&&!s)return{canvas:i,offsetX:Math.round(Math.min(o[0],o[2])+o[4]),offsetY:Math.round(Math.min(o[1],o[3])+o[5])};h=i}h||b((c=this.cachedCanvases.getCanvas("maskCanvas",i,n)).context,e);var d=w.Util.transform(o,[1/i,0,0,-1/n,0,0]),d=w.Util.transform(d,[1,0,0,1,0,-n]),u=w.Util.applyTransform([0,0],d),p=w.Util.applyTransform([i,n],d),m=w.Util.normalizeRect([u[0],u[1],p[0],p[1]]),g=Math.round(m[2]-m[0])||1,m=Math.round(m[3]-m[1])||1,g=this.cachedCanvases.getCanvas("fillCanvas",g,m),m=g.context,f=Math.min(u[0],p[0]),u=Math.min(u[1],p[1]),p=(m.translate(-f,-u),m.transform(...d),h||(h=(h=this._scaleImage(c.canvas,(0,R.getCurrentTransformInverse)(m))).img,a&&s&&a.set(l,h)),m.imageSmoothingEnabled=y((0,R.getCurrentTransform)(m),e.interpolate),v(m,h,0,0,h.width,h.height,0,0,i,n),m.globalCompositeOperation="source-in",w.Util.transform((0,R.getCurrentTransformInverse)(m),[1,0,0,1,-f,-u]));return m.fillStyle=s?r.getPattern(t,this,p,x.PathType.FILL):r,m.fillRect(0,0,i,n),a&&!s&&(this.cachedCanvases.delete("fillCanvas"),a.set(l,g.canvas)),{canvas:g.canvas,offsetX:Math.round(f),offsetY:Math.round(u)}}setLineWidth(e){e!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=-1),this.current.lineWidth=e,this.ctx.lineWidth=e}setLineCap(e){this.ctx.lineCap=n[e]}setLineJoin(e){this.ctx.lineJoin=r[e]}setMiterLimit(e){this.ctx.miterLimit=e}setDash(e,t){var i=this.ctx;void 0!==i.setLineDash&&(i.setLineDash(e),i.lineDashOffset=t)}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(var[t,i]of e)switch(t){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i[0],i[1]);break;case"CA":this.current.strokeAlpha=i;break;case"ca":this.current.fillAlpha=i,this.ctx.globalAlpha=i;break;case"BM":this.ctx.globalCompositeOperation=i;break;case"SMask":this.current.activeSMask=i?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(i)}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){var e=this.inSMaskMode;this.current.activeSMask&&!e?this.beginSMaskMode():!this.current.activeSMask&&e&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mode");var e=this.ctx.canvas.width,t=this.ctx.canvas.height,i="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(i,e,t),e=(this.suspendedCtx=this.ctx,this.ctx=i.context,this.ctx),n=(e.setTransform(...(0,R.getCurrentTransform)(this.suspendedCtx)),m(this.suspendedCtx,e),e),o=this.suspendedCtx;if(n._removeMirroring)throw new Error("Context is already forwarding operations.");n.__originalSave=n.save,n.__originalRestore=n.restore,n.__originalRotate=n.rotate,n.__originalScale=n.scale,n.__originalTranslate=n.translate,n.__originalTransform=n.transform,n.__originalSetTransform=n.setTransform,n.__originalResetTransform=n.resetTransform,n.__originalClip=n.clip,n.__originalMoveTo=n.moveTo,n.__originalLineTo=n.lineTo,n.__originalBezierCurveTo=n.bezierCurveTo,n.__originalRect=n.rect,n.__originalClosePath=n.closePath,n.__originalBeginPath=n.beginPath,n._removeMirroring=()=>{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,b=!!u,y=b?u[0]:0,w=b?u[1]:0,x=b?u[2]:0,A="Luminosity"===o?$:L,S=Math.min(d,Math.ceil(1048576/c));for(let e=0;e<d;e+=S){const u=Math.min(S,d-e),T=l.getImageData(m-f,e+(g-v),c,u),M=h.getImageData(m,e+g,c,u);if(b){k=void 0;_=void 0;C=void 0;E=void 0;a=void 0;var k=T.data;var _=y;var C=w;var E=x;const R=k.length;for(let e=3;e<R;e+=4){const R=k[e];0===R?(k[e-3]=_,k[e-2]=C,k[e-1]=E):R<255&&(a=255-R,k[e-3]=k[e-3]*R+_*a>>8,k[e-2]=k[e-2]*R+C*a>>8,k[e-1]=k[e-1]*R+E*a>>8)}}A(T.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;e<i;e++)switch(0|n[s]){case w.OPS.rectangle:c=r[t++],d=r[t++];const n=r[t++],s=r[t++],g=c+n,f=d+s;o.moveTo(c,d),0===n||0===s?o.lineTo(g,f):(o.lineTo(g,d),o.lineTo(g,f),o.lineTo(c,f)),p||a.updateRectMinMax(u,[c,d,g,f]),o.closePath();break;case w.OPS.moveTo:c=r[t++],d=r[t++],o.moveTo(c,d),p||a.updatePathMinMax(u,c,d);break;case w.OPS.lineTo:c=r[t++],d=r[t++],o.lineTo(c,d),p||a.updatePathMinMax(u,c,d);break;case w.OPS.curveTo:l=c,h=d,c=r[t+4],d=r[t+5],o.bezierCurveTo(r[t],r[t+1],r[t+2],r[t+3],c,d),a.updateCurvePathMinMax(u,l,h,r[t],r[t+1],r[t+2],r[t+3],c,d,m),t+=6;break;case w.OPS.curveTo2:l=c,h=d,o.bezierCurveTo(c,d,r[t],r[t+1],r[t+2],r[t+3]),a.updateCurvePathMinMax(u,l,h,c,d,r[t],r[t+1],r[t+2],r[t+3],m),c=r[t+2],d=r[t+3],t+=4;break;case w.OPS.curveTo3:l=c,h=d,c=r[t+2],d=r[t+3],o.bezierCurveTo(r[t],r[t+1],c,d,c,d),a.updateCurvePathMinMax(u,l,h,r[t],r[t+1],c,d,c,d,m),t+=4;break;case w.OPS.closePath:o.closePath()}p&&a.updateScalingPathMinMax(u,m),a.setCurrentPoint(c,d)}closePath(){this.ctx.closePath()}stroke(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=this.ctx,i=this.current.strokeColor;t.globalAlpha=this.current.strokeAlpha,this.contentVisible&&("object"==typeof i&&i?.getPattern?(t.save(),t.strokeStyle=i.getPattern(t,this,(0,R.getCurrentTransformInverse)(t),x.PathType.STROKE),this.rescaleAndStroke(!1),t.restore()):this.rescaleAndStroke(!0)),e&&this.consumePath(this.current.getClippedPathBoundingBox()),t.globalAlpha=this.current.fillAlpha}closeStroke(){this.closePath(),this.stroke()}fill(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=this.ctx,i=this.current.fillColor;let n=!1;this.current.patternFill&&(t.save(),t.fillStyle=i.getPattern(t,this,(0,R.getCurrentTransformInverse)(t),x.PathType.FILL),n=!0);i=this.current.getClippedPathBoundingBox();this.contentVisible&&null!==i&&(this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill()),n&&t.restore(),e&&this.consumePath(i)}eoFill(){this.pendingEOFill=!0,this.fill()}fillStroke(){this.fill(!1),this.stroke(!1),this.consumePath()}eoFillStroke(){this.pendingEOFill=!0,this.fillStroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()}endPath(){this.consumePath()}clip(){this.pendingClip=s}eoClip(){this.pendingClip=a}beginText(){this.current.textMatrix=w.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(const i of e)t.setTransform(...i.transform),t.translate(i.x,i.y),i.addToPath(t,i.fontSize);t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()}setCharSpacing(e){this.current.charSpacing=e}setWordSpacing(e){this.current.wordSpacing=e}setHScale(e){this.current.textHScale=e/100}setLeading(e){this.current.leading=-e}setFont(i,n){var r=this.commonObjs.get(i),s=this.current;if(!r)throw new Error("Can't find font for "+i);if(s.fontMatrix=r.fontMatrix||w.FONT_IDENTITY_MATRIX,0!==s.fontMatrix[0]&&0!==s.fontMatrix[3]||(0,w.warn)("Invalid font matrix for font "+i),n<0?(n=-n,s.fontDirection=-1):s.fontDirection=1,this.current.font=r,this.current.fontSize=n,!r.isType3Font){i=r.loadedName||"sans-serif",s=r.systemFontInfo?.css||`"${i}", `+r.fallbackName;let e="normal";r.black?e="900":r.bold&&(e="bold");i=r.italic?"italic":"normal";let t=n;n<16?t=16:100<n&&(t=100),this.current.fontSizeScale=n/t,this.ctx.font=i+` ${e} ${t}px `+s}}setTextRenderingMode(e){this.current.textRenderingMode=e}setTextRise(e){this.current.textRise=e}moveText(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}setTextMatrix(e,t,i,n,r,s){this.current.textMatrix=[e,t,i,n,r,s],this.current.textMatrixScale=Math.hypot(e,t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}nextLine(){this.moveText(0,this.current.leading)}paintChar(e,t,i,n){var r=this.ctx,s=this.current,o=s.font,a=s.textRenderingMode,l=s.fontSize/s.fontSizeScale,h=a&w.TextRenderingMode.FILL_STROKE_MASK,a=!!(a&w.TextRenderingMode.ADD_TO_PATH_FLAG),s=s.patternFill&&!o.missingFile;let c;(o.disableFontFace||a||s)&&(c=o.getPathGenerator(this.commonObjs,e)),o.disableFontFace||s?(r.save(),r.translate(t,i),r.beginPath(),c(r,l),n&&r.setTransform(...n),h!==w.TextRenderingMode.FILL&&h!==w.TextRenderingMode.FILL_STROKE||r.fill(),h!==w.TextRenderingMode.STROKE&&h!==w.TextRenderingMode.FILL_STROKE||r.stroke(),r.restore()):(h!==w.TextRenderingMode.FILL&&h!==w.TextRenderingMode.FILL_STROKE||r.fillText(e,t,i),h!==w.TextRenderingMode.STROKE&&h!==w.TextRenderingMode.FILL_STROKE||r.strokeText(e,t,i)),a&&(this.pendingTextPaths||=[]).push({transform:(0,R.getCurrentTransform)(r),x:t,y:i,fontSize:l,addToPath:c})}get isFontSubpixelAAEnabled(){var e=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10)["context"],t=(e.scale(1.5,1),e.fillText("I",0,10),e.getImageData(0,0,10,10).data);let i=!1;for(let e=3;e<t.length;e+=4)if(0<t[e]&&t[e]<255){i=!0;break}return(0,w.shadow)(this,"isFontSubpixelAAEnabled",i)}showText(o){const a=this.current,l=a.font;if(l.isType3Font)return this.showType3Text(o);var h=a.fontSize;if(0!==h){const c=this.ctx,d=a.fontSizeScale,u=a.charSpacing,p=a.wordSpacing,m=a.fontDirection,g=a.textHScale*m,i=o.length,f=l.vertical,n=f?1:-1,v=l.defaultVMetrics,b=h*a.fontMatrix[0],y=a.textRenderingMode===w.TextRenderingMode.FILL&&!l.disableFontFace&&!a.patternFill;c.save(),c.transform(...a.textMatrix),c.translate(a.x,a.y+a.textRise),0<m?c.scale(g,-1):c.scale(g,1);let s;if(a.patternFill){c.save();const o=a.fillColor.getPattern(c,this,(0,R.getCurrentTransformInverse)(c),x.PathType.FILL);s=(0,R.getCurrentTransform)(c),c.restore(),c.fillStyle=o}let e=a.lineWidth;var t=a.textMatrixScale;if(0===t||0===e){const o=a.textRenderingMode&w.TextRenderingMode.FILL_STROKE_MASK;o!==w.TextRenderingMode.STROKE&&o!==w.TextRenderingMode.FILL_STROKE||(e=this.getSinglePixelWidth())}else e/=t;if(1!==d&&(c.scale(d,d),e/=d),c.lineWidth=e,l.isInvalidPDFjsFont){const l=[];let e=0;for(const a of o)l.push(a.unicode),e+=a.width;c.fillText(l.join(""),0,0),a.x+=e*b*g,c.restore(),void this.compose()}else{let e,r=0;for(e=0;e<i;++e){const a=o[e];if("number"==typeof a)r+=n*a*h/1e3;else{let e=!1;const R=(a.isSpace?p:0)+u,x=a.fontChar,g=a.accent;let t,i,n=a.width;if(f){const o=a.vmetric||v,l=-(a.vmetric?o[1]:.5*n)*b,w=o[2]*b;n=o?-o[0]:n,t=l/d,i=(r+w)/d}else t=r/d,i=0;if(l.remeasure&&0<n){const o=1e3*c.measureText(x).width/h*d;if(n<o&&this.isFontSubpixelAAEnabled){const a=n/o;e=!0,c.save(),c.scale(a,1),t/=a}else n!==o&&(t+=(n-o)/2e3*h/d)}if(this.contentVisible&&(a.isInFont||l.missingFile))if(y&&!g)c.fillText(x,t,i);else if(this.paintChar(x,t,i,s),g){const o=t+h*g.offset.x/d,a=i-h*g.offset.y/d;this.paintChar(g.fontChar,o,a,s)}r+=f?n*b-R*m:n*b+R*m,e&&c.restore()}}f?a.y-=r:a.x+=r*g,c.restore(),this.compose()}}}showType3Text(e){const t=this.ctx,i=this.current,n=i.font,r=i.fontSize,s=i.fontDirection,o=n.vertical?1:-1,a=i.charSpacing,l=i.wordSpacing,h=i.textHScale*s,c=i.fontMatrix||w.FONT_IDENTITY_MATRIX,d=e.length;let u,p,m,g;if(i.textRenderingMode!==w.TextRenderingMode.INVISIBLE&&0!==r){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,t.save(),t.transform(...i.textMatrix),t.translate(i.x,i.y),t.scale(h,s),u=0;u<d;++u)if("number"==typeof(p=e[u]))this.ctx.translate(g=o*p*r/1e3,0),i.x+=g*h;else{const s=(p.isSpace?l:0)+a,d=n.charProcOperatorList[p.operatorListId];d?(this.contentVisible&&(this.processingType3=p,this.save(),t.scale(r,r),t.transform(...c),this.executeOperatorList(d),this.restore()),m=w.Util.applyTransform([p.width,0],c)[0]*r+s,t.translate(m,0),i.x+=m*h):(0,w.warn)(`Type3 character "${p.operatorListId}" is not available.`)}t.restore(),this.processingType3=null}}setCharWidth(e,t){}setCharWidthAndBounds(e,t,i,n,r,s){this.ctx.rect(i,n,r-i,s-n),this.ctx.clip(),this.endPath()}getColorN_Pattern(e){let t;var i,n;return t="TilingPattern"===e[0]?(i=e[1],n=this.baseTransform||(0,R.getCurrentTransform)(this.ctx),new x.TilingPattern(e,i,this.ctx,{createCanvasGraphics:e=>new 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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return this.cachedPatterns.has(e)?t=this.cachedPatterns.get(e):(t=(0,x.getShadingPattern)(this.getObject(e)),this.cachedPatterns.set(e,t)),i&&(t.matrix=i),t}shadingFill(e){if(this.contentVisible){var t=this.ctx;this.save();const n=this._getPattern(e);t.fillStyle=n.getPattern(t,this,(0,R.getCurrentTransformInverse)(t),x.PathType.SHADING);var i=(0,R.getCurrentTransformInverse)(t);if(i){const{width:e,height:n}=t.canvas,[R,x,r,s]=w.Util.getAxialAlignedBoundingBox([0,0,e,n],i);this.ctx.fillRect(R,x,r-R,s-x)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}}beginInlineImage(){(0,w.unreachable)("Should not call beginInlineImage")}beginImageData(){(0,w.unreachable)("Should not call beginImageData")}paintFormXObjectBegin(e,t){if(this.contentVisible&&(this.save(),this.baseTransformStack.push(this.baseTransform),Array.isArray(e)&&6===e.length&&this.transform(...e),this.baseTransform=(0,R.getCurrentTransform)(this.ctx),t)){const e=t[2]-t[0],i=t[3]-t[1];this.ctx.rect(t[0],t[1],e,i),this.current.updateRectMinMax((0,R.getCurrentTransform)(this.ctx),t),this.clip(),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(s){if(this.contentVisible){this.save(),this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);var o=this.ctx,a=(s.isolated||(0,w.info)("TODO: Support non-isolated groups."),s.knockout&&(0,w.warn)("Knockout groups not supported."),(0,R.getCurrentTransform)(o));if(s.matrix&&o.transform(...s.matrix),!s.bbox)throw new Error("Bounding box is required.");var l=w.Util.getAxialAlignedBoundingBox(s.bbox,(0,R.getCurrentTransform)(o)),h=[0,0,o.canvas.width,o.canvas.height],l=w.Util.intersect(l,h)||[0,0,0,0],h=Math.floor(l[0]),c=Math.floor(l[1]);let e=Math.max(Math.ceil(l[2])-h,1),t=Math.max(Math.ceil(l[3])-c,1),i=1,n=1,r=(e>u&&(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<i||1e3<n)return null;const r=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),s=i+1;let o,t,a,l=new Uint8Array(s*(n+1));var h=i+7&-8;let c=new Uint8Array(h*n),d=0;for(const i of e.data){let e=128;for(;0<e;)c[d++]=i&e?0:255,e>>=1}let u=0;for((d=0)!==c[d]&&(l[0]=1,++u),t=1;t<i;t++)c[d]!==c[d+1]&&(l[t]=c[d]?2:1,++u),d++;for(0!==c[d]&&(l[t]=2,++u),o=1;o<n;o++){d=o*h,a=o*s,c[d-h]!==c[d]&&(l[a]=c[d]?1:8,++u);let e=(c[d]?4:0)+(c[d-h]?8:0);for(t=1;t<i;t++)e=(e>>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<u)return null}for(d=h*(n-1),a=o*s,0!==c[d]&&(l[a]=8,++u),t=1;t<i;t++)c[d]!==c[d+1]&&(l[a+t]=c[d]?4:8,++u),d++;if(0!==c[d]&&(l[a+t]=4,++u),1e3<u)return null;const p=new Int32Array([0,s,-1,0,-s,0,0,0,1]),m=new Path2D;for(o=0;u&&o<=n;o++){let t=o*s;const n=t+i;for(;t<n&&!l[t];)t++;if(t!==n){m.moveTo(t%s,o);const r=t;let e=l[t];do{const i=p[e];for(;t+=i,!l[t];);const n=l[t];5!==n&&10!==n?(e=n,l[t]=0):(e=n&51*e>>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=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,s=4<arguments.length?arguments[4]:void 0,o=5<arguments.length?arguments[5]:void 0;if(this.contentVisible){e=this.getObject(e.data,e);var a=this.ctx,l=(a.save(),(0,R.getCurrentTransform)(a)),h=(a.transform(i,n,r,s,0,0),this._createMaskCanvas(e));a.setTransform(1,0,0,1,h.offsetX-l[4],h.offsetY-l[5]);for(let e=0,t=o.length;e<t;e+=2){const R=w.Util.transform(l,[i,n,r,s,o[e],o[e+1]]),[c,d]=w.Util.applyTransform([0,0],R);a.drawImage(h.canvas,c,d)}a.restore(),this.compose()}}paintImageMaskXObjectGroup(e){if(this.contentVisible){var t=this.ctx,i=this.current.fillColor,n=this.current.patternFill;for(const r of e){const{data:e,width:s,height:o,transform:a}=r,l=this.cachedCanvases.getCanvas("maskCanvas",s,o),h=l.context;h.save(),b(h,this.getObject(e,r)),h.globalCompositeOperation="source-in",h.fillStyle=n?i.getPattern(h,this,(0,R.getCurrentTransformInverse)(t),x.PathType.FILL):i,h.fillRect(0,0,s,o),h.restore(),t.save(),t.transform(...a),t.scale(1,-1),v(t,l.canvas,0,0,s,o,0,-1,1,1),t.restore()}this.compose()}}paintImageXObject(e){this.contentVisible&&((e=this.getObject(e))?this.paintInlineImageXObject(e):(0,w.warn)("Dependent image isn't ready yet"))}paintImageXObjectRepeat(e,i,n,r){if(this.contentVisible){e=this.getObject(e);if(e){var s=e.width,o=e.height,a=[];for(let e=0,t=r.length;e<t;e+=2)a.push({transform:[i,0,0,n,r[e],r[e+1]],x:0,y:0,w:s,h:o});this.paintInlineImageXObjectGroup(e,a)}else(0,w.warn)("Dependent image isn't ready yet")}}applyTransferMapsToCanvas(e){return"none"!==this.current.transferMaps&&(e.filter=this.current.transferMaps,e.drawImage(e.canvas,0,0),e.filter="none"),e.canvas}applyTransferMapsToBitmap(e){var t,i;return"none"===this.current.transferMaps?e.bitmap:({bitmap:e,width:t,height:i}=e,(i=(t=this.cachedCanvases.getCanvas("inlineImage",t,i)).context).filter=this.current.transferMaps,i.drawImage(e,0,0),i.filter="none",t.canvas)}paintInlineImageXObject(t){if(this.contentVisible){var i=t.width,n=t.height,r=this.ctx;if(this.save(),!w.isNodeJS){const t=r["filter"];"none"!==t&&""!==t&&(r.filter="none")}r.scale(1/i,-1/n);let e;if(t.bitmap)e=this.applyTransferMapsToBitmap(t);else if("function"==typeof HTMLElement&&t instanceof HTMLElement||!t.data)e=t;else{const w=this.cachedCanvases.getCanvas("inlineImage",i,n).context;o(w,t),e=this.applyTransferMapsToCanvas(w)}var s=this._scaleImage(e,(0,R.getCurrentTransformInverse)(r));r.imageSmoothingEnabled=y((0,R.getCurrentTransform)(r),t.interpolate),v(r,s.img,0,0,s.paintWidth,s.paintHeight,0,-n,i,n),this.compose(),this.restore()}}paintInlineImageXObjectGroup(t,i){if(this.contentVisible){const n=this.ctx;let e;if(t.bitmap)e=t.bitmap;else{const i=t.width,n=t.height,r=this.cachedCanvases.getCanvas("inlineImage",i,n).context;o(r,t),e=this.applyTransferMapsToCanvas(r)}for(const t of i)n.save(),n.transform(...t.transform),n.scale(1,-1),v(n,e,t.x,t.y,t.w,t.h,0,-1,1,1),n.restore();this.compose()}}paintSolidColorImageMask(){this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(e){}markPointProps(e,t){}beginMarkedContent(e){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(e,t){"OC"===e?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(t)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(e){var t=this.current.isEmptyClip(),e=(this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(e),this.ctx);this.pendingClip&&(t||(this.pendingClip===a?e.clip("evenodd"):e.clip()),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox),e.beginPath()}getSinglePixelWidth(){var e,t,i;return this._cachedGetSinglePixelWidth||(0===(i=(0,R.getCurrentTransform)(this.ctx))[1]&&0===i[2]?this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(i[0]),Math.abs(i[3])):(e=Math.abs(i[0]*i[3]-i[2]*i[1]),t=Math.hypot(i[0],i[2]),i=Math.hypot(i[1],i[3]),this._cachedGetSinglePixelWidth=Math.max(t,i)/e)),this._cachedGetSinglePixelWidth}getScaleForStroking(){if(-1===this._cachedScaleForStroking[0]){var i,n,r,s=this.current["lineWidth"],{a:o,b:a,c:l,d:h}=this.ctx.getTransform();let e,t;0===a&&0===l?(r=Math.abs(o))===(i=Math.abs(h))?e=t=0===s?1/r:(n=r*s)<1?1/n:1:t=0===s?(e=1/r,1/i):(n=r*s,r=i*s,e=n<1?1/n:1,r<1?1/r:1):(i=Math.abs(o*h-a*l),n=Math.hypot(o,a),r=Math.hypot(l,h),t=0===s?(e=r/i,n/i):(o=s*i,e=o<r?r/o:1,o<n?n/o:1)),this._cachedScaleForStroking[0]=e,this._cachedScaleForStroking[1]=t}return this._cachedScaleForStroking}rescaleAndStroke(t){var e=this["ctx"],i=this.current["lineWidth"],[n,r]=this.getScaleForStroking();if(e.lineWidth=i||1,1===n&&1===r)e.stroke();else{i=e.getLineDash();if(t&&e.save(),e.scale(n,r),0<i.length){const t=Math.max(n,r);e.setLineDash(i.map(e=>e/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),b=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,b.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 y(t,d,u,p,e,i,m,g){var n=d.coords,f=d.colors,v=t.data,b=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 y=(n[u]+d.offsetX)*d.scaleX,w=(n[u+1]+d.offsetY)*d.scaleY,x=(n[p]+d.offsetX)*d.scaleX,A=(n[p+1]+d.offsetY)*d.scaleY,S=(n[e]+d.offsetX)*d.scaleX,k=(n[e+1]+d.offsetY)*d.scaleY;if(!(k<=w)){var _=f[i],C=f[i+1],E=f[i+2],T=f[m],M=f[m+1],R=f[m+2],L=f[g],$=f[g+1],F=f[g+2],t=Math.round(w),P=Math.round(k);let n,r,s,o,a,l,h,c;for(let e=t;e<=P;e++){if(e<A){const d=e<w?0:(w-e)/(w-A);n=y-(y-x)*d,r=_-(_-T)*d,s=C-(C-M)*d,o=E-(E-R)*d}else{var I=e>k?1:A==k?0:(A-e)/(A-k);n=x-(x-S)*I,r=T-(T-L)*I,s=M-(M-$)*I,o=R-(R-F)*I}let t;a=y-(y-S)*(t=e<w?0:e>k?1:(w-e)/(w-k)),l=_-(_-L)*t,h=C-(C-$)*t,c=E-(E-F)*t;const u=Math.round(Math.min(n,a)),p=Math.round(Math.max(n,a));let i=b*e+4*u;for(let e=u;e<=p;e++)(t=(n-e)/(n-a))<0?t=0:1<t&&(t=1),v[i++]=r-(r-l)*t|0,v[i++]=s-(s-h)*t|0,v[i++]=o-(o-c)*t|0,v[i++]=255}}}class s extends n{constructor(e){super(),this._coords=e[2],this._colors=e[3],this._figures=e[4],this._bounds=e[5],this._bbox=e[7],this._background=e[8],this.matrix=null}_createMeshCanvas(i,n,e){var t=Math.floor(this._bounds[0]),r=Math.floor(this._bounds[1]),s=Math.ceil(this._bounds[2])-t,o=Math.ceil(this._bounds[3])-r,a=Math.min(Math.ceil(Math.abs(s*i[0]*1.1)),3e3),i=Math.min(Math.ceil(Math.abs(o*i[1]*1.1)),3e3),s=s/a,o=o/i,l={coords:this._coords,colors:this._colors,offsetX:-t,offsetY:-r,scaleX:1/s,scaleY:1/o},e=e.getCanvas("mesh",a+4,i+4,!1),h=e.context,c=h.createImageData(a,i);if(n){const i=c.data;for(let e=0,t=i.length;e<t;e+=4)i[e]=n[0],i[e+1]=n[1],i[e+2]=n[2],i[e+3]=255}for(const i of this._figures){d=void 0;u=void 0;p=void 0;m=void 0;g=void 0;f=void 0;v=void 0;b=void 0;var d=c;var u=i;var p=l;var m=u.coords,g=u.colors;let e,t;switch(u.type){case"lattice":var f=u.verticesPerRow,v=Math.floor(m.length/f)-1,b=f-1;for(e=0;e<v;e++){let t=e*f;for(let e=0;e<b;e++,t++)y(d,p,m[t],m[t+1],m[t+f],g[t],g[t+1],g[t+f]),y(d,p,m[t+f+1],m[t+1],m[t+f],g[t+f+1],g[t+1],g[t+f])}break;case"triangles":for(e=0,t=m.length;e<t;e+=3)y(d,p,m[e],m[e+1],m[e+2],g[e],g[e+1],g[e+2]);break;default:throw new Error("illegal figure")}}return h.putImageData(c,2,2),{canvas:e.canvas,offsetX:t-2*s,offsetY:r-2*o,scaleX:s,scaleY:o}}getPattern(e,t,i,n){c(e,this._bbox);let r;if(n===h.SHADING)r=v.Util.singularValueDecompose2dScale((0,b.getCurrentTransform)(e));else if(r=v.Util.singularValueDecompose2dScale(t.baseTransform),this.matrix){const e=v.Util.singularValueDecompose2dScale(this.matrix);r=[r[0]*e[0],r[1]*e[1]]}var s=this._createMeshCanvas(r,n===h.SHADING?null:this._background,t.cachedCanvases);return n!==h.SHADING&&(e.setTransform(...t.baseTransform),this.matrix)&&e.transform(...this.matrix),e.translate(s.offsetX,s.offsetY),e.scale(s.scaleX,s.scaleY),e.createPattern(s.canvas,"no-repeat")}}class o extends n{getPattern(){return"hotpink"}}t.TilingPattern=class a{static MAX_PATTERN_SIZE=3e3;constructor(e,t,i,n,r){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.ctx=i,this.canvasGraphicsFactory=n,this.baseTransform=r}createPatternCanvas(e){var t=this.operatorList,i=this.bbox,n=this.xstep,r=this.ystep,s=this.paintType,o=this.tilingType,a=this.color,l=this.canvasGraphicsFactory,o=((0,v.info)("TilingType: "+o),i[0]),h=i[1],c=i[2],i=i[3],d=v.Util.singularValueDecompose2dScale(this.matrix),u=v.Util.singularValueDecompose2dScale(this.baseTransform),d=[d[0]*u[0],d[1]*u[1]],u=this.getSizeAndScale(n,this.ctx.canvas.width,d[0]),n=this.getSizeAndScale(r,this.ctx.canvas.height,d[1]),d=(r=e.cachedCanvases.getCanvas("pattern",u.size,n.size,!0)).context;(l=l.createCanvasGraphics(d)).groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(l,s,a);let p=o,m=h,g=c,f=i;return o<0&&(p=0,g+=Math.abs(o)),h<0&&(m=0,f+=Math.abs(h)),d.translate(-u.scale*p,-n.scale*m),l.transform(u.scale,0,0,n.scale,0,0),d.save(),this.clipBbox(l,p,m,g,f),l.baseTransform=(0,b.getCurrentTransform)(l.ctx),l.executeOperatorList(t),l.endDrawing(),{canvas:r.canvas,scaleX:u.scale,scaleY:n.scale,offsetX:p,offsetY:m}}getSizeAndScale(e,t,i){e=Math.abs(e),t=Math.max(a.MAX_PATTERN_SIZE,t);let n=Math.ceil(e*i);return n>=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,b.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<a-2;s+=3,r+=4){const o=l[s],e=l[s+1],t=l[s+2];n[r]=4278190080|o,n[r+1]=o>>>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<t;e+=3)n[r++]=i[e]|i[e+1]<<8|i[e+2]<<16|4278190080}else{for(;s<a-2;s+=3,r+=4){const o=l[s],e=l[s+1],t=l[s+2];n[r]=255|o,n[r+1]=o<<24|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<t;e+=3)n[r++]=i[e]<<24|i[e+1]<<16|i[e+2]<<8|255}return{srcPos:e,destPos:r};return}}return null},t.grayToRGBA=function(i,n){if(m.FeatureTest.isLittleEndian)for(let e=0,t=i.length;e<t;e++)n[e]=65793*i[e]|4278190080;else for(let e=0,t=i.length;e<t;e++)n[e]=16843008*i[e]|255},i(93),i(101),i(102),i(105),i(107),i(109),i(113),i(116),i(123);var m=i(1);function n(t){let{src:i,srcPos:n=0,dest:r,width:e,height:s,nonBlackColor:o=4294967295,inverseDecode:a=!1}=t;var t=m.FeatureTest.isLittleEndian?4278190080:255,[l,h]=a?[o,t]:[t,o],c=e>>3,d=7&e,u=i.length;r=new Uint32Array(r.buffer);let p=0;for(let e=0;e<s;e++){for(const t=n+c;n<t;n++){const t=n<u?i[n]:255;r[p++]=128&t?h:l,r[p++]=64&t?h:l,r[p++]=32&t?h:l,r[p++]=16&t?h:l,r[p++]=8&t?h:l,r[p++]=4&t?h:l,r[p++]=2&t?h:l,r[p++]=1&t?h:l}if(0!=d){const t=n<u?i[n++]:255;for(let e=0;e<d;e++)r[p++]=t&1<<7-e?h:l}}return{srcPos:n,destPos:p}}},(e,t)=>{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<arguments.length&&void 0!==arguments[1]?arguments[1]:1,n=2<arguments.length?arguments[2]:void 0;this.isCancelled||(t=this.desiredSize,this.desiredSize-=i,0<t&&this.desiredSize<=0&&(this.sinkCapability=new h.PromiseCapability,this.ready=this.sinkCapability.promise),a.postMessage({sourceName:s,targetName:o,stream:4,streamId:r,chunk:e},n))},close(){this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:s,targetName:o,stream:3,streamId:r}),delete e.streamSinks[r])},error(e){(0,h.assert)(e instanceof Error,"error must have a valid reason"),this.isCancelled||(this.isCancelled=!0,a.postMessage({sourceName:s,targetName:o,stream:5,streamId:r,reason:c(e)}))},sinkCapability:new h.PromiseCapability,onPull:null,onCancel:null,isCancelled:!1,desiredSize:t.desiredSize,ready:null};n.sinkCapability.resolve(),n.ready=n.sinkCapability.promise,this.streamSinks[r]=n,new Promise(function(e){e(i(t.data,n))}).then(function(){a.postMessage({sourceName:s,targetName:o,stream:8,streamId:r,success:!0})},function(e){a.postMessage({sourceName:s,targetName:o,stream:8,streamId:r,reason:c(e)})})}#de(t){const i=t.streamId,n=this.sourceName,r=t.sourceName,s=this.comObj,e=this.streamControllers[i],o=this.streamSinks[i];switch(t.stream){case 8:t.success?e.startCall.resolve():e.startCall.reject(c(t.reason));break;case 7:t.success?e.pullCall.resolve():e.pullCall.reject(c(t.reason));break;case 6:o?(o.desiredSize<=0&&0<t.desiredSize&&o.sinkCapability.resolve(),o.desiredSize=t.desiredSize,new Promise(function(e){e(o.onPull?.())}).then(function(){s.postMessage({sourceName:n,targetName:r,stream:7,streamId:i,success:!0})},function(e){s.postMessage({sourceName:n,targetName:r,stream:7,streamId:i,reason:c(e)})})):s.postMessage({sourceName:n,targetName:r,stream:7,streamId:i,success:!0});break;case 4:(0,h.assert)(e,"enqueue should have stream controller"),e.isClosed||e.controller.enqueue(t.chunk);break;case 3:(0,h.assert)(e,"close should have stream controller"),e.isClosed||(e.isClosed=!0,e.controller.close(),this.#pe(e,i));break;case 5:(0,h.assert)(e,"error should have stream controller"),e.controller.error(c(t.reason)),this.#pe(e,i);break;case 2:t.success?e.cancelCall.resolve():e.cancelCall.reject(c(t.reason)),this.#pe(e,i);break;case 1:o&&(new Promise(function(e){e(o.onCancel?.(c(t.reason)))}).then(function(){s.postMessage({sourceName:n,targetName:r,stream:2,streamId:i,success:!0})},function(e){s.postMessage({sourceName:n,targetName:r,stream:2,streamId:i,reason:c(e)})}),o.sinkCapability.reject(c(t.reason)),o.isCancelled=!0,delete this.streamSinks[i]);break;default:throw new Error("Unexpected stream case")}}async#pe(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]),delete this.streamControllers[t]}destroy(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}}},(e,t,i)=>{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<n;t++){const n=i[t];let e;if(Array.isArray(n))e=this.#Ae(n);else{if(!this.#ve.has(n))return(0,s.warn)("Optional content group not found: "+n),!0;e=this.#ve.get(n).visible}switch(r){case"And":if(e)break;return!1;case"Or":if(e)return!0;break;case"Not":return!e;default:return!0}}return"And"===r}isVisible(e){if(0!==this.#ve.size)if(e){if("OCG"===e.type)return this.#ve.has(e.id)?this.#ve.get(e.id).visible:((0,s.warn)("Optional content group not found: "+e.id),!0);if("OCMD"===e.type){if(e.expression)return this.#Ae(e.expression);if(!e.policy||"AnyOn"===e.policy){for(const t of e.ids){if(!this.#ve.has(t))return(0,s.warn)("Optional content group not found: "+t),!0;if(this.#ve.get(t).visible)return!0}return!1}if("AllOn"===e.policy)for(const i of e.ids){if(!this.#ve.has(i))return(0,s.warn)("Optional content group not found: "+i),!0;if(!this.#ve.get(i).visible)return!1}else{if("AnyOff"===e.policy){for(const n of e.ids){if(!this.#ve.has(n))return(0,s.warn)("Optional content group not found: "+n),!0;if(!this.#ve.get(n).visible)return!0}return!1}if("AllOff"===e.policy)for(const r of e.ids){if(!this.#ve.has(r))return(0,s.warn)("Optional content group not found: "+r),!0;if(this.#ve.get(r).visible)return!1}else(0,s.warn)(`Unknown optional content policy ${e.policy}.`)}}else(0,s.warn)(`Unknown group type ${e.type}.`)}else(0,s.warn)("Optional content group not defined.");return!0}setVisibility(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];this.#ve.has(e)?(this.#ve.get(e)._setVisible(r,!!t),this.#be=null):(0,s.warn)("Optional content group not found: "+e)}get hasInitialVisibility(){return null===this.#ye||this.getHash()===this.#ye}getOrder(){return this.#ve.size?this.#_e?this.#_e.slice():[...this.#ve.keys()]:null}getGroups(){return 0<this.#ve.size?(0,s.objectFromMap)(this.#ve):null}getGroup(e){return this.#ve.get(e)||null}getHash(){if(null!==this.#be)return this.#be;var e,t,i=new n.MurmurHash3_64;for([e,t]of this.#ve)i.update(e+":"+t.visible);return this.#be=i.hexdigest()}}},(e,t,i)=>{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<i?.length){const e=(i instanceof Uint8Array&&i.byteLength===i.buffer.byteLength?i:new Uint8Array(i)).buffer;this._queuedChunks.push(e)}this._pdfDataRangeTransport=t,this._isStreamingSupported=!o,this._isRangeSupported=!s,this._contentLength=e,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener((e,t)=>{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<arguments.length&&void 0!==arguments[2]&&arguments[2],n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;this._stream=e,this._done=i||!1,this._filename=(0,r.isPdfFile)(n)?n:null,this._queuedChunks=t||[],this._loaded=0;for(const e of this._queuedChunks)this._loaded+=e.byteLength;this._requests=[],this._headersReady=Promise.resolve(),(e._fullRequestReader=this).onProgress=null}_enqueue(e){this._done||(0<this._requests.length?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e),this._loaded+=e.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){var e;return 0<this._queuedChunks.length?{value:this._queuedChunks.shift(),done:!1}:this._done?{value:void 0,done:!0}:(e=new a.PromiseCapability,this._requests.push(e),e.promise)}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class s{constructor(e,t,i){this._stream=e,this._begin=t,this._end=i,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(e){if(!this._done){if(0===this._requests.length)this._queuedChunk=e;else{this._requests.shift().resolve({value:e,done:!1});for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new a.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}},(e,t,i)=>{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<n.length&&i in n;++i){let[e,t]=n[i];t=l(t),e&&(t=unescape(t),0===i)&&(t=h(t)),o.push(t)}return o.join("")}(e))?n(o(t)):(t=a("filename","i").exec(e))?n(o(l(t=t[1]))):"";function a(e,t){return new RegExp("(?:^|;)\\s*"+e+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',t)}function s(e,t){if(e){if(!/^[\x00-\xFF]+$/.test(t))return t;try{var i=new TextDecoder(e,{fatal:!0}),n=(0,c.stringToBytes)(t);t=i.decode(n),r=!1}catch{}}return t}function n(e){return e=r&&/[\x80-\xff]/.test(e)&&(e=s("utf-8",e),r)?s("iso-8859-1",e):e}function l(e){if(e.startsWith('"')){var t=e.slice(1).split('\\"');for(let e=0;e<t.length;++e){var i=t[e].indexOf('"');-1!==i&&(t[e]=t[e].slice(0,i),t.length=e+1),t[e]=t[e].replaceAll(/\\(.)/g,"$1")}e=t.join('"')}return e}function h(e){var t=e.indexOf("'");return-1===t?e:s(e.slice(0,t),e.slice(t+1).replace(/^[^']*'/,""))}function o(e){return!e.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(e)?e:e.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(e,t,i,n){if("q"===i||"Q"===i)return s(t,n=(n=n.replaceAll("_"," ")).replaceAll(/=([0-9a-fA-F]{2})/g,function(e,t){return String.fromCharCode(parseInt(t,16))}));try{n=atob(n)}catch{}return s(t,n)})}},i(89),i(149);var c=i(1)},(e,t,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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.url=e,this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||Object.create(null),this.withCredentials=t.withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}requestRange(e,t,i){var n={begin:e,end:t};for(const e in i)n[e]=i[e];return this.request(n)}requestFull(e){return this.request(e)}request(t){const i=new XMLHttpRequest,e=this.currXhrId++,n=this.pendingRequests[e]={xhr:i};i.open("GET",this.url),i.withCredentials=this.withCredentials;for(const t in this.httpHeaders){const e=this.httpHeaders[t];void 0!==e&&i.setRequestHeader(t,e)}return this.isHttp&&"begin"in t&&"end"in t?(i.setRequestHeader("Range",`bytes=${t.begin}-`+(t.end-1)),n.expectedStatus=206):n.expectedStatus=200,i.responseType="arraybuffer",t.onError&&(i.onerror=function(e){t.onError(i.status)}),i.onreadystatechange=this.onStateChange.bind(this,e),i.onprogress=this.onProgress.bind(this,e),n.onHeadersReceived=t.onHeadersReceived,n.onDone=t.onDone,n.onError=t.onError,n.onProgress=t.onProgress,i.send(null),e}onProgress(e,t){e=this.pendingRequests[e];e&&e.onProgress?.(t)}onStateChange(e,t){var i=this.pendingRequests[e];if(i){var n=i.xhr;if(2<=n.readyState&&i.onHeadersReceived&&(i.onHeadersReceived(),delete i.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)i.onError?.(n.status);else{e=n.status||200;if(200===e&&206===i.expectedStatus||e===i.expectedStatus){var r=function(e){e=e.response;return"string"!=typeof e?e:(0,s.stringToBytes)(e).buffer}(n);if(206===e){const e=n.getResponseHeader("Content-Range"),t=/bytes (\d+)-(\d+)\/(\d+)/.exec(e);i.onDone({begin:parseInt(t[1],10),chunk:r})}else r?i.onDone({begin:0,chunk:r}):i.onError?.(n.status)}else i.onError?.(n.status)}}}getRequestXhr(e){return this.pendingRequests[e].xhr}isPendingRequest(e){return e in this.pendingRequests}abortRequest(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}}t.PDFNetworkStream=class{constructor(e){this._source=e,this._manager=new n(e.url,{httpHeaders:e.httpHeaders,withCredentials:e.withCredentials}),this._rangeChunkSize=e.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(e){e=this._rangeRequestReaders.indexOf(e);0<=e&&this._rangeRequestReaders.splice(e,1)}getFullReader(){return(0,s.assert)(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new r(this._manager,this._source),this._fullRequestReader}getRangeReader(e,t){e=new a(this._manager,e,t);return e.onClosed=this._onRangeRequestReaderClosed.bind(this),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,t){this._manager=e;var i={onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=t.url,this._fullRequestId=e.requestFull(i),this._headersReceivedCapability=new s.PromiseCapability,this._disableRange=t.disableRange||!1,this._contentLength=t.length,this._rangeChunkSize=t.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){const e=this._fullRequestId,t=this._manager.getRequestXhr(e),i=e=>t.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<this._requests.length?this._requests.shift().resolve({value:e.chunk,done:!1}):this._cachedChunks.push(e.chunk)),this._done=!0,!(0<this._cachedChunks.length)){for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(e){this._storedError=(0,o.createResponseStatusError)(e,this._url),this._headersReceivedCapability.reject(this._storedError);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(e){this.onProgress?.({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersReceivedCapability.promise}async read(){if(this._storedError)throw this._storedError;var e;return 0<this._cachedChunks.length?{value:this._cachedChunks.shift(),done:!1}:this._done?{value:void 0,done:!0}:(e=new s.PromiseCapability,this._requests.push(e),e.promise)}cancel(e){this._done=!0,this._headersReceivedCapability.reject(e);for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class a{constructor(e,t,i){this._manager=e;var n={onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=e.url,this._requestId=e.requestRange(t,i,n),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_close(){this.onClosed?.(this)}_onDone(e){e=e.chunk;0<this._requests.length?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunk=e,this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(e){this._storedError=(0,o.createResponseStatusError)(e,this._url);for(const e of this._requests)e.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(e){this.isStreamingSupported||this.onProgress?.({loaded:e.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(null!==this._queuedChunk){const e=this._queuedChunk;return this._queuedChunk=null,{value:e,done:!1}}if(this._done)return{value:void 0,done:!0};const e=new s.PromiseCapability;return this._requests.push(e),e.promise}cancel(e){this._done=!0;for(const e of this._requests)e.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}},(e,t,i)=>{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 b(i){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";if(URL.createObjectURL&&"undefined"!=typeof Blob&&!(2<arguments.length&&void 0!==arguments[2]&&arguments[2]))return URL.createObjectURL(new Blob([i],{type:e}));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let r=`data:${e};base64,`;for(let e=0,t=i.length;e<t;e+=3){var s=255&i[e],o=255&i[e+1],a=255&i[e+2];r+=n[s>>2]+n[(3&s)<<4|o>>4]+n[e+1<t?(15&o)<<2|a>>6:64]+n[e+2<t?63&a:64]}return r}const r=["butt","round","square"],s=["miter","round","bevel"],o=function(){const m=new Uint8Array([137,80,78,71,13,10,26,10]),o=new Int32Array(256);for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t=1&t?3988292384^t>>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<n;e++){const i=255&(r^t[e]);r=r>>>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<n;++e)r=(r+(255&t[e]))%65521,s=(s+r)%65521;return s<<16|r}(e,0,e.length);return r[s++]=n>>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<c;++e)u[n++]=0,u.set(d.subarray(r,r+i),n),r+=i,n+=i;if(s===v.ImageKind.GRAYSCALE_1BPP&&a)for(let e=n=0;e<c;e++){n++;for(let e=0;e<i;e++)u[n++]^=255}var l=new Uint8Array([h>>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),b(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 y(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(${y(e[0])} ${y(e[3])})`;if(e[0]===e[3]&&e[1]===-e[2])return`rotate(${y(180*Math.acos(e[0])/Math.PI)})`}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return`translate(${y(e[4])} ${y(e[5])})`;return`matrix(${y(e[0])} ${y(e[1])} ${y(e[2])} ${y(e[3])} ${y(e[4])} ${y(e[5])})`}let l=0,h=0,m=0;t.SVGGraphics=class{constructor(e,t){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2];(0,n.deprecated)("The SVG back-end is no longer maintained and *may* be removed in the future."),this.svgFactory=new n.DOMSVGFactory,this.current=new a,this.transformMatrix=v.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!i,this._operatorIdMapping=[];for(const e in v.OPS)this._operatorIdMapping[v.OPS[e]]=e}getObject(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return"string"==typeof e?(e.startsWith("g_")?this.commonObjs:this.objs).get(e):t}save(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()}restore(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null}group(e){this.save(),this.executeOpTree(e),this.restore()}loadDependencies(i){const n=i.fnArray,r=i.argsArray;for(let e=0,t=n.length;e<t;e++)if(n[e]===v.OPS.dependency)for(const n of r[e]){const i=n.startsWith("g_")?this.commonObjs:this.objs,r=new Promise(e=>{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<t;e++){var o=r[e];s.push({fnId:o,fn:i[o],args:n[e]})}{let e=[];var a=[];for(const l of t=s)"save"!==l.fn?"restore"===l.fn?e=a.pop():e.push(l):(e.push({fnId:92,fn:"group",items:[]}),a.push(e),e=e.at(-1).items);return e}}executeOpTree(e){for(const t of e){const e=t.fn,i=t.fnId,n=t.args;switch(0|i){case v.OPS.beginText:this.beginText();break;case v.OPS.dependency:break;case v.OPS.setLeading:this.setLeading(n);break;case v.OPS.setLeadingMoveText:this.setLeadingMoveText(n[0],n[1]);break;case v.OPS.setFont:this.setFont(n);break;case v.OPS.showText:case v.OPS.showSpacedText:this.showText(n[0]);break;case v.OPS.endText:this.endText();break;case v.OPS.moveText:this.moveText(n[0],n[1]);break;case v.OPS.setCharSpacing:this.setCharSpacing(n[0]);break;case v.OPS.setWordSpacing:this.setWordSpacing(n[0]);break;case v.OPS.setHScale:this.setHScale(n[0]);break;case v.OPS.setTextMatrix:this.setTextMatrix(n[0],n[1],n[2],n[3],n[4],n[5]);break;case v.OPS.setTextRise:this.setTextRise(n[0]);break;case v.OPS.setTextRenderingMode:this.setTextRenderingMode(n[0]);break;case v.OPS.setLineWidth:this.setLineWidth(n[0]);break;case v.OPS.setLineJoin:this.setLineJoin(n[0]);break;case v.OPS.setLineCap:this.setLineCap(n[0]);break;case v.OPS.setMiterLimit:this.setMiterLimit(n[0]);break;case v.OPS.setFillRGBColor:this.setFillRGBColor(n[0],n[1],n[2]);break;case v.OPS.setStrokeRGBColor:this.setStrokeRGBColor(n[0],n[1],n[2]);break;case v.OPS.setStrokeColorN:this.setStrokeColorN(n);break;case v.OPS.setFillColorN:this.setFillColorN(n);break;case v.OPS.shadingFill:this.shadingFill(n[0]);break;case v.OPS.setDash:this.setDash(n[0],n[1]);break;case v.OPS.setRenderingIntent:this.setRenderingIntent(n[0]);break;case v.OPS.setFlatness:this.setFlatness(n[0]);break;case v.OPS.setGState:this.setGState(n[0]);break;case v.OPS.fill:this.fill();break;case v.OPS.eoFill:this.eoFill();break;case v.OPS.stroke:this.stroke();break;case v.OPS.fillStroke:this.fillStroke();break;case v.OPS.eoFillStroke:this.eoFillStroke();break;case v.OPS.clip:this.clip("nonzero");break;case v.OPS.eoClip:this.clip("evenodd");break;case v.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case v.OPS.paintImageXObject:this.paintImageXObject(n[0]);break;case v.OPS.paintInlineImageXObject:this.paintInlineImageXObject(n[0]);break;case v.OPS.paintImageMaskXObject:this.paintImageMaskXObject(n[0]);break;case v.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(n[0],n[1]);break;case v.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case v.OPS.closePath:this.closePath();break;case v.OPS.closeStroke:this.closeStroke();break;case v.OPS.closeFillStroke:this.closeFillStroke();break;case v.OPS.closeEOFillStroke:this.closeEOFillStroke();break;case v.OPS.nextLine:this.nextLine();break;case v.OPS.transform:this.transform(n[0],n[1],n[2],n[3],n[4],n[5]);break;case v.OPS.constructPath:this.constructPath(n[0],n[1]);break;case v.OPS.endPath:this.endPath();break;case 92:this.group(t.items);break;default:(0,v.warn)("Unimplemented operator "+e)}}}setWordSpacing(e){this.current.wordSpacing=e}setCharSpacing(e){this.current.charSpacing=e}nextLine(){this.moveText(0,this.current.leading)}setTextMatrix(e,t,i,n,r,s){var o=this.current;o.textMatrix=o.lineMatrix=[e,t,i,n,r,s],o.textMatrixScale=Math.hypot(e,t),o.x=o.lineX=0,o.y=o.lineY=0,o.xcoords=[],o.ycoords=[],o.tspan=this.svgFactory.createElement("svg:tspan"),o.tspan.setAttributeNS(null,"font-family",o.fontFamily),o.tspan.setAttributeNS(null,"font-size",y(o.fontSize)+"px"),o.tspan.setAttributeNS(null,"y",y(-o.y)),o.txtElement=this.svgFactory.createElement("svg:text"),o.txtElement.append(o.tspan)}beginText(){var e=this.current;e.x=e.lineX=0,e.y=e.lineY=0,e.textMatrix=v.IDENTITY_MATRIX,e.lineMatrix=v.IDENTITY_MATRIX,e.textMatrixScale=1,e.tspan=this.svgFactory.createElement("svg:tspan"),e.txtElement=this.svgFactory.createElement("svg:text"),e.txtgrp=this.svgFactory.createElement("svg:g"),e.xcoords=[],e.ycoords=[]}moveText(e,t){var i=this.current;i.x=i.lineX+=e,i.y=i.lineY+=t,i.xcoords=[],i.ycoords=[],i.tspan=this.svgFactory.createElement("svg:tspan"),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",y(i.fontSize)+"px"),i.tspan.setAttributeNS(null,"y",y(-i.y))}showText(r){const s=this.current,o=s.font,t=s.fontSize;if(0!==t){var a,l=s.fontSizeScale,h=s.charSpacing,c=s.wordSpacing,d=s.fontDirection,i=s.textHScale*d,u=o.vertical,p=u?1:-1,m=o.defaultVMetrics,g=t*s.fontMatrix[0];let n=0;for(const v of r)if(null===v)n+=d*c;else if("number"==typeof v)n+=p*v*t/1e3;else{const r=(v.isSpace?c:0)+h,f=v.fontChar;let e,t,i=v.width;if(u){const s=v.vmetric||m,o=(a=v.vmetric?s[1]:.5*i,s[2]*g);i=s?-s[0]:i,e=-a*g/l,t=(n+o)/l}else e=n/l,t=0;(v.isInFont||o.missingFile)&&(s.xcoords.push(s.x+e),u&&s.ycoords.push(-s.y+t),s.tspan.textContent+=f),n+=u?i*g-r*d:i*g+r*d}s.tspan.setAttributeNS(null,"x",s.xcoords.map(y).join(" ")),u?s.tspan.setAttributeNS(null,"y",s.ycoords.map(y).join(" ")):s.tspan.setAttributeNS(null,"y",y(-s.y)),u?s.y-=n:s.x+=n*i,s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",y(s.fontSize)+"px"),"normal"!==s.fontStyle&&s.tspan.setAttributeNS(null,"font-style",s.fontStyle),"normal"!==s.fontWeight&&s.tspan.setAttributeNS(null,"font-weight",s.fontWeight);r=s.textRenderingMode&v.TextRenderingMode.FILL_STROKE_MASK;if(r===v.TextRenderingMode.FILL||r===v.TextRenderingMode.FILL_STROKE?("#000000"!==s.fillColor&&s.tspan.setAttributeNS(null,"fill",s.fillColor),s.fillAlpha<1&&s.tspan.setAttributeNS(null,"fill-opacity",s.fillAlpha)):s.textRenderingMode===v.TextRenderingMode.ADD_TO_PATH?s.tspan.setAttributeNS(null,"fill","transparent"):s.tspan.setAttributeNS(null,"fill","none"),r===v.TextRenderingMode.STROKE||r===v.TextRenderingMode.FILL_STROKE){const r=1/(s.textMatrixScale||1);this._setStrokeAttributes(s.tspan,r)}let e=s.textMatrix;0!==s.textRise&&((e=e.slice())[5]+=s.textRise),s.txtElement.setAttributeNS(null,"transform",`${w(e)} scale(${y(i)}, -1)`),s.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.txtElement.append(s.tspan),s.txtgrp.append(s.txtElement),this._ensureTransformGroup().append(s.txtElement)}}setLeadingMoveText(e,t){this.setLeading(-t),this.moveText(e,t)}addFontStyle(e){if(!e.data)throw new Error('addFontStyle: No font data available, ensure that the "fontExtraProperties" API parameter is set.');this.cssStyle||(this.cssStyle=this.svgFactory.createElement("svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.append(this.cssStyle));var t=b(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+=`@font-face { font-family: "${e.loadedName}"; src: url(${t}); }
|
||
`}setFont(e){var t=this.current,i=this.commonObjs.get(e[0]);let n=e[1],r=(t.font=i,!this.embedFonts||i.missingFile||this.embeddedFonts[i.loadedName]||(this.addFontStyle(i),this.embeddedFonts[i.loadedName]=i),t.fontMatrix=i.fontMatrix||v.FONT_IDENTITY_MATRIX,"normal");i.black?r="900":i.bold&&(r="bold");e=i.italic?"italic":"normal";n<0?(n=-n,t.fontDirection=-1):t.fontDirection=1,t.fontSize=n,t.fontFamily=i.loadedName,t.fontWeight=r,t.fontStyle=e,t.tspan=this.svgFactory.createElement("svg:tspan"),t.tspan.setAttributeNS(null,"y",y(-t.y)),t.xcoords=[],t.ycoords=[]}endText(){var e=this.current;e.textRenderingMode&v.TextRenderingMode.ADD_TO_PATH_FLAG&&e.txtElement?.hasChildNodes()&&(e.element=e.txtElement,this.clip("nonzero"),this.endPath())}setLineWidth(e){0<e&&(this.current.lineWidth=e)}setLineCap(e){this.current.lineCap=r[e]}setLineJoin(e){this.current.lineJoin=s[e]}setMiterLimit(e){this.current.miterLimit=e}setStrokeAlpha(e){this.current.strokeAlpha=e}setStrokeRGBColor(e,t,i){this.current.strokeColor=v.Util.makeHexColor(e,t,i)}setFillAlpha(e){this.current.fillAlpha=e}setFillRGBColor(e,t,i){this.current.fillColor=v.Util.makeHexColor(e,t,i),this.current.tspan=this.svgFactory.createElement("svg:tspan"),this.current.xcoords=[],this.current.ycoords=[]}setStrokeColorN(e){this.current.strokeColor=this._makeColorN_Pattern(e)}setFillColorN(e){this.current.fillColor=this._makeColorN_Pattern(e)}shadingFill(e){var{width:t,height:i}=this.viewport,n=v.Util.inverseTransform(this.transformMatrix),[t,i,n,r]=v.Util.getAxialAlignedBoundingBox([0,0,t,i],n),s=this.svgFactory.createElement("svg:rect");s.setAttributeNS(null,"x",t),s.setAttributeNS(null,"y",i),s.setAttributeNS(null,"width",n-t),s.setAttributeNS(null,"height",r-i),s.setAttributeNS(null,"fill",this._makeShadingPattern(e)),this.current.fillAlpha<1&&s.setAttributeNS(null,"fill-opacity",this.current.fillAlpha),this._ensureTransformGroup().append(s)}_makeColorN_Pattern(e){return"TilingPattern"===e[0]?this._makeTilingPattern(e):this._makeShadingPattern(e)}_makeTilingPattern(e){var t=e[1],i=e[2],n=e[3]||v.IDENTITY_MATRIX,[r,s,o,a]=e[4],l=e[5],h=e[6],e=e[7],c="shading"+m++,[r,s,o,a]=v.Util.normalizeRect([...v.Util.applyTransform([r,s],n),...v.Util.applyTransform([o,a],n)]),[d,u]=v.Util.singularValueDecompose2dScale(n),l=l*d,d=h*u,h=this.svgFactory.createElement("svg:pattern"),u=(h.setAttributeNS(null,"id",c),h.setAttributeNS(null,"patternUnits","userSpaceOnUse"),h.setAttributeNS(null,"width",l),h.setAttributeNS(null,"height",d),h.setAttributeNS(null,"x",""+r),h.setAttributeNS(null,"y",""+s),this.svg),l=this.transformMatrix,d=this.current.fillColor,p=this.current.strokeColor,o=this.svgFactory.create(o-r,a-s);if(this.svg=o,this.transformMatrix=n,2===e){const e=v.Util.makeHexColor(...t);this.current.fillColor=e,this.current.strokeColor=e}return this.executeOpTree(this.convertOpList(i)),this.svg=u,this.transformMatrix=l,this.current.fillColor=d,this.current.strokeColor=p,h.append(o.childNodes[0]),this.defs.append(h),`url(#${c})`}_makeShadingPattern(t){switch((t="string"==typeof t?this.objs.get(t):t)[0]){case"RadialAxial":var i="shading"+m++,n=t[3];let e;switch(t[1]){case"axial":const h=t[4],v=t[5];(e=this.svgFactory.createElement("svg:linearGradient")).setAttributeNS(null,"id",i),e.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),e.setAttributeNS(null,"x1",h[0]),e.setAttributeNS(null,"y1",h[1]),e.setAttributeNS(null,"x2",v[0]),e.setAttributeNS(null,"y2",v[1]);break;case"radial":var r=t[4],s=t[5],o=t[6],a=t[7];(e=this.svgFactory.createElement("svg:radialGradient")).setAttributeNS(null,"id",i),e.setAttributeNS(null,"gradientUnits","userSpaceOnUse"),e.setAttributeNS(null,"cx",s[0]),e.setAttributeNS(null,"cy",s[1]),e.setAttributeNS(null,"r",a),e.setAttributeNS(null,"fx",r[0]),e.setAttributeNS(null,"fy",r[1]),e.setAttributeNS(null,"fr",o);break;default:throw new Error("Unknown RadialAxial type: "+t[1])}for(const t of n){var l=this.svgFactory.createElement("svg:stop");l.setAttributeNS(null,"offset",t[0]),l.setAttributeNS(null,"stop-color",t[1]),e.append(l)}return this.defs.append(e),`url(#${i})`;case"Mesh":return(0,v.warn)("Unimplemented pattern Mesh"),null;case"Dummy":return"hotpink";default:throw new Error("Unknown IR type: "+t[0])}}setDash(e,t){this.current.dashArray=e,this.current.dashPhase=t}constructPath(e,t){const i=this.current;let n=i.x,r=i.y,s=[],o=0;for(const i of e)switch(0|i){case v.OPS.rectangle:n=t[o++],r=t[o++];const e=n+t[o++],i=r+t[o++];s.push("M",y(n),y(r),"L",y(e),y(r),"L",y(e),y(i),"L",y(n),y(i),"Z");break;case v.OPS.moveTo:n=t[o++],r=t[o++],s.push("M",y(n),y(r));break;case v.OPS.lineTo:n=t[o++],r=t[o++],s.push("L",y(n),y(r));break;case v.OPS.curveTo:n=t[o+4],r=t[o+5],s.push("C",y(t[o]),y(t[o+1]),y(t[o+2]),y(t[o+3]),y(n),y(r)),o+=6;break;case v.OPS.curveTo2:s.push("C",y(n),y(r),y(t[o]),y(t[o+1]),y(t[o+2]),y(t[o+3])),n=t[o+2],r=t[o+3],o+=4;break;case v.OPS.curveTo3:n=t[o+2],r=t[o+3],s.push("C",y(t[o]),y(t[o+1]),y(n),y(r),y(n),y(r)),o+=4;break;case v.OPS.closePath:s.push("Z")}s=s.join(" "),i.path&&0<e.length&&e[0]!==v.OPS.rectangle&&e[0]!==v.OPS.moveTo?s=i.path.getAttributeNS(null,"d")+s:(i.path=this.svgFactory.createElement("svg:path"),this._ensureTransformGroup().append(i.path)),i.path.setAttributeNS(null,"d",s),i.path.setAttributeNS(null,"fill","none"),i.element=i.path,i.setCurrentPoint(n,r)}endPath(){const e=this.current;if(e.path=null,this.pendingClip)if(e.element){var t="clippath"+l++,i=this.svgFactory.createElement("svg:clipPath"),n=(i.setAttributeNS(null,"id",t),i.setAttributeNS(null,"transform",w(this.transformMatrix)),e.element.cloneNode(!0));if("evenodd"===this.pendingClip?n.setAttributeNS(null,"clip-rule","evenodd"):n.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,i.append(n),this.defs.append(i),e.activeClipUrl){e.clipGroup=null;for(const e of this.extraStack)e.clipGroup=null;i.setAttributeNS(null,"clip-path",e.activeClipUrl)}e.activeClipUrl=`url(#${t})`,this.tgrp=null}else this.pendingClip=null}clip(e){this.pendingClip=e}closePath(){var e,t=this.current;t.path&&(e=t.path.getAttributeNS(null,"d")+"Z",t.path.setAttributeNS(null,"d",e))}setLeading(e){this.current.leading=-e}setTextRise(e){this.current.textRise=e}setTextRenderingMode(e){this.current.textRenderingMode=e}setHScale(e){this.current.textHScale=e/100}setRenderingIntent(e){}setFlatness(e){}setGState(e){for(var[t,i]of e)switch(t){case"LW":this.setLineWidth(i);break;case"LC":this.setLineCap(i);break;case"LJ":this.setLineJoin(i);break;case"ML":this.setMiterLimit(i);break;case"D":this.setDash(i[0],i[1]);break;case"RI":this.setRenderingIntent(i);break;case"FL":this.setFlatness(i);break;case"Font":this.setFont(i);break;case"CA":this.setStrokeAlpha(i);break;case"ca":this.setFillAlpha(i);break;default:(0,v.warn)("Unimplemented graphic state operator "+t)}}fill(){var e=this.current;e.element&&(e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha),this.endPath())}stroke(){var e=this.current;e.element&&(this._setStrokeAttributes(e.element),e.element.setAttributeNS(null,"fill","none"),this.endPath())}_setStrokeAttributes(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;var i=this.current;let n=i.dashArray;1!==t&&0<n.length&&(n=n.map(function(e){return t*e})),e.setAttributeNS(null,"stroke",i.strokeColor),e.setAttributeNS(null,"stroke-opacity",i.strokeAlpha),e.setAttributeNS(null,"stroke-miterlimit",y(i.miterLimit)),e.setAttributeNS(null,"stroke-linecap",i.lineCap),e.setAttributeNS(null,"stroke-linejoin",i.lineJoin),e.setAttributeNS(null,"stroke-width",y(t*i.lineWidth)+"px"),e.setAttributeNS(null,"stroke-dasharray",n.map(y).join(" ")),e.setAttributeNS(null,"stroke-dashoffset",y(t*i.dashPhase)+"px")}eoFill(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fill()}fillStroke(){this.stroke(),this.fill()}eoFillStroke(){this.current.element?.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()}closeStroke(){this.closePath(),this.stroke()}closeFillStroke(){this.closePath(),this.fillStroke()}closeEOFillStroke(){this.closePath(),this.eoFillStroke()}paintSolidColorImageMask(){var e=this.svgFactory.createElement("svg:rect");e.setAttributeNS(null,"x","0"),e.setAttributeNS(null,"y","0"),e.setAttributeNS(null,"width","1px"),e.setAttributeNS(null,"height","1px"),e.setAttributeNS(null,"fill",this.current.fillColor),this._ensureTransformGroup().append(e)}paintImageXObject(e){var t=this.getObject(e);t?this.paintInlineImageXObject(t):(0,v.warn)(`Dependent image with object ID ${e} is not ready yet`)}paintInlineImageXObject(e,t){var i=e.width,n=e.height,e=o(e,this.forceDataSchema,!!t),r=this.svgFactory.createElement("svg:rect"),r=(r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y","0"),r.setAttributeNS(null,"width",y(i)),r.setAttributeNS(null,"height",y(n)),this.current.element=r,this.clip("nonzero"),this.svgFactory.createElement("svg:image"));r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e),r.setAttributeNS(null,"x","0"),r.setAttributeNS(null,"y",y(-n)),r.setAttributeNS(null,"width",y(i)+"px"),r.setAttributeNS(null,"height",y(n)+"px"),r.setAttributeNS(null,"transform",`scale(${y(1/i)} ${y(-1/n)})`),(t||this._ensureTransformGroup()).append(r)}paintImageMaskXObject(e){var t,i,n,r,s,o,e=this.getObject(e.data,e);e.bitmap?(0,v.warn)("paintImageMaskXObject: ImageBitmap support is not implemented, ensure that the `isOffscreenCanvasSupported` API parameter is disabled."):(t=this.current,i=e.width,n=e.height,r=t.fillColor,t.maskId="mask"+h++,(s=this.svgFactory.createElement("svg:mask")).setAttributeNS(null,"id",t.maskId),(o=this.svgFactory.createElement("svg:rect")).setAttributeNS(null,"x","0"),o.setAttributeNS(null,"y","0"),o.setAttributeNS(null,"width",y(i)),o.setAttributeNS(null,"height",y(n)),o.setAttributeNS(null,"fill",r),o.setAttributeNS(null,"mask",`url(#${t.maskId})`),this.defs.append(s),this._ensureTransformGroup().append(o),this.paintInlineImageXObject(e,s))}paintFormXObjectBegin(e,t){if(Array.isArray(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t){const e=t[2]-t[0],i=t[3]-t[1],n=this.svgFactory.createElement("svg:rect");n.setAttributeNS(null,"x",t[0]),n.setAttributeNS(null,"y",t[1]),n.setAttributeNS(null,"width",y(e)),n.setAttributeNS(null,"height",y(i)),this.current.element=n,this.clip("nonzero"),this.endPath()}}paintFormXObjectEnd(){}_initialize(e){var t=this.svgFactory.create(e.width,e.height),i=this.svgFactory.createElement("svg:defs"),i=(t.append(i),this.defs=i,this.svgFactory.createElement("svg:g"));return i.setAttributeNS(null,"transform",w(e.transform)),t.append(i),this.svg=i,t}_ensureClipGroup(){var e;return this.current.clipGroup||((e=this.svgFactory.createElement("svg:g")).setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.append(e),this.current.clipGroup=e),this.current.clipGroup}_ensureTransformGroup(){return this.tgrp||(this.tgrp=this.svgFactory.createElement("svg:g"),this.tgrp.setAttributeNS(null,"transform",w(this.transformMatrix)),(this.current.activeClipUrl?this._ensureClipGroup():this.svg).append(this.tgrp)),this.tgrp}}},(e,t,i)=>{var n=i(3),r=i(188),i=i(193);n({target:"Array",proto:!0},{group:function(e){return r(this,e,1<arguments.length?arguments[1]:void 0)}}),i("group")},(e,t,i)=>{var p=i(99),n=i(14),m=i(13),g=i(40),f=i(18),v=i(64),b=i(189),y=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=b(null),d=v(l),u=0;u<d;u++)o=l[u],(s=f(h(o,u,a)))in c?x(c[s],o):c[s]=[o];if(n&&(r=n(a))!==w)for(s in c)c[s]=y(r,c[s]);return c}},(e,t,i)=>{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+"</"+p+">"},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<s;)a.f(e,i=r[o++],n[i]);return e}},(e,t,i)=>{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<Math.abs(t-i.scale))&&console.error("The `--scale-factor` CSS-variable must be set, to the same value as `viewport.scale`, either on the `container`-element itself or higher up in the DOM."),new r(e));return n._render(),n},t.updateTextLayer=function(e){let{container:t,viewport:i,textDivs:n,textDivProperties:r,isOffscreenCanvasSupported:s,mustRotate:o=!0,mustRescale:a=!0}=e;if(o&&(0,l.setLayerDimensions)(t,{rotation:i.rotation}),a){const e=f(0,s),t={prevFontSize:null,prevFontFamily:null,div:null,scale:i.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:e};for(const e of n)t.properties=r.get(e),t.div=e,h(t)}},i(89),i(2);var m=i(1),l=i(168);const g=new Map;function f(e,t){let i;if(t&&m.FeatureTest.isOffscreenCanvasSupported)i=new OffscreenCanvas(e,e).getContext("2d",{alpha:!1});else{const t=document.createElement("canvas");t.width=t.height=e,i=t.getContext("2d",{alpha:!1})}return i}function h(e){var t,i,n,{div:r,scale:s,properties:o,ctx:a,prevFontSize:l,prevFontFamily:h}=e,c=r["style"];let d="";0!==o.canvasWidth&&o.hasText&&(t=c["fontFamily"],{canvasWidth:i,fontSize:n}=o,l=(l===n&&h===t||(a.font=n*s+"px "+t,e.prevFontSize=n,e.prevFontFamily=t),a.measureText(r.textContent))["width"],0<l)&&(d=`scaleX(${i*s/l})`),0<(d=0!==o.angle?`rotate(${o.angle}deg) `+d:d).length&&(c.transform=d)}class r{constructor(e){var{textContentSource:e,container:t,viewport:i,textDivs:n,textDivProperties:r,textContentItemsStr:s,isOffscreenCanvasSupported:o}=e,{pageWidth:e,pageHeight:n,pageX:s,pageY:r}=(this._textContentSource=e,this._isReadableStream=e instanceof ReadableStream,this._container=this._rootContainer=t,this._textDivs=n||[],this._textContentItemsStr=s||[],this._isOffscreenCanvasSupported=o,this._fontInspectorEnabled=!!globalThis.FontInspector?.enabled,this._reader=null,this._textDivProperties=r||new WeakMap,this._canceled=!1,this._capability=new m.PromiseCapability,this._layoutTextParams={prevFontSize:null,prevFontFamily:null,div:null,scale:i.scale*(globalThis.devicePixelRatio||1),properties:null,ctx:f(0,o)},i.rawDims);this._transform=[1,0,0,-1,-s,r+n],this._pageWidth=e,this._pageHeight=n,(0,l.setLayerDimensions)(t,i),this._capability.promise.finally(()=>{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<s[e]){r=Math.ceil(e/4/30);break}i.clearRect(0,0,30,30),i.strokeText("A",0,30),s=i.getImageData(0,0,30,30).data;for(let e=n=0,t=s.length;e<t;e+=4)if(0<s[e]){n=30-Math.floor(e/4/30);break}if(i.canvas.width=i.canvas.height=0,n){const t=n/(n+r);return g.set(e,t),t}return g.set(e,.8),.8}(a.fontFamily,s._isOffscreenCanvasSupported);let t,i,n=(i=0===e?(t=c[4],c[5]-u):(t=c[4]+u*Math.sin(e),c[5]-u*Math.cos(e)),c="calc(var(--scale-factor)*",u=l.style,s._container===s._rootContainer?(u.left=(100*t/s._pageWidth).toFixed(2)+"%",u.top=(100*i/s._pageHeight).toFixed(2)+"%"):(u.left=c+t.toFixed(2)+"px)",u.top=c+i.toFixed(2)+"px)"),u.fontSize=c+d.toFixed(2)+"px)",u.fontFamily=a.fontFamily,h.fontSize=d,l.setAttribute("role","presentation"),l.textContent=o.str,l.dir=o.dir,s._fontInspectorEnabled&&(l.dataset.fontName=o.fontName),0!==e&&(h.angle=e*(180/Math.PI)),!1);if(1<o.str.length)n=!0;else if(" "!==o.str&&o.transform[0]!==o.transform[3]){const s=Math.abs(o.transform[0]),a=Math.abs(o.transform[3]);s!==a&&1.5<Math.max(s,a)/Math.min(s,a)&&(n=!0)}n&&(h.canvasWidth=a.vertical?o.height:o.width),s._textDivProperties.set(l,h),s._isReadableStream&&s._layoutText(l)}}else if("beginMarkedContentProps"===p.type||"beginMarkedContent"===p.type){const e=this._container;this._container=document.createElement("span"),this._container.classList.add("markedContent"),null!==p.id&&this._container.setAttribute("id",""+p.id),e.append(this._container)}else"endMarkedContent"===p.type&&(this._container=this._container.parentNode)}_layoutText(e){var t=this._layoutTextParams.properties=this._textDivProperties.get(e);if(this._layoutTextParams.div=e,h(this._layoutTextParams),t.hasText&&this._container.append(e),t.hasEOL){const e=document.createElement("br");e.setAttribute("role","presentation"),this._container.append(e)}}_render(){const i=new m.PromiseCapability;let n=Object.create(null);if(this._isReadableStream){const r=()=>{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<t.length||e._isReadableStream))for(const i of t)e._layoutText(i);i.resolve()}},this._capability.reject)}}t.TextLayerRenderTask=r},(e,t,i)=>{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<arguments.length&&void 0!==arguments[0]?arguments[0]:this.#Fe.getMode();this.#Re(),e===n.AnnotationEditorType.INK?(this.addInkEditorIfNeeded(!1),this.disableClick()):this.enableClick(),e!==n.AnnotationEditorType.NONE&&(this.div.classList.toggle("freeTextEditing",e===n.AnnotationEditorType.FREETEXT),this.div.classList.toggle("inkEditing",e===n.AnnotationEditorType.INK),this.div.classList.toggle("stampEditing",e===n.AnnotationEditorType.STAMP),this.div.hidden=!1)}addInkEditorIfNeeded(e){if(e||this.#Fe.getMode()===n.AnnotationEditorType.INK){if(!e)for(const e of this.#Te.values())if(e.isEmpty())return void e.setInBackground();this.#De({offsetX:0,offsetY:0},!1).setInBackground()}}setEditingState(e){this.#Fe.setEditingState(e)}addCommands(e){this.#Fe.addCommands(e)}enable(){this.div.style.pointerEvents="auto";var e=new Set;for(const t of this.#Te.values())t.enableEditing(),t.annotationElementId&&e.add(t.annotationElementId);if(this.#xe){const t=this.#xe.getEditableAnnotations();for(const i of t)if(i.hide(),!this.#Fe.isDeletedAnnotationElement(i.data.id)&&!e.has(i.data.id)){const t=this.deserialize(i);t&&(this.addOrRebuild(t),t.enableEditing())}}}disable(){this.#Me=!0,this.div.style.pointerEvents="none";var e=new Set;for(const i of this.#Te.values())i.disableEditing(),i.annotationElementId&&null===i.serialize()?(this.getEditableAnnotation(i.annotationElementId)?.show(),i.remove()):e.add(i.annotationElementId);if(this.#xe)for(const n of this.#xe.getEditableAnnotations()){var t=n.data["id"];e.has(t)||this.#Fe.isDeletedAnnotationElement(t)||n.show()}this.#Re(),this.isEmpty&&(this.div.hidden=!0),this.#Me=!1}getEditableAnnotation(e){return this.#xe?.getEditableAnnotation(e)||null}setActiveEditor(e){this.#Fe.getActive()!==e&&this.#Fe.setActiveEditor(e)}enableClick(){this.div.addEventListener("pointerdown",this.#Ce),this.div.addEventListener("pointerup",this.#we)}disableClick(){this.div.removeEventListener("pointerdown",this.#Ce),this.div.removeEventListener("pointerup",this.#we)}attach(e){this.#Te.set(e.id,e);var t=e["annotationElementId"];t&&this.#Fe.isDeletedAnnotationElement(t)&&this.#Fe.removeDeletedAnnotationElement(e)}detach(e){this.#Te.delete(e.id),this.#Se?.removePointerInTextLayer(e.contentDiv),!this.#Me&&e.annotationElementId&&this.#Fe.addDeletedAnnotationElement(e)}remove(e){this.detach(e),this.#Fe.removeEditor(e),e.div.contains(document.activeElement)&&setTimeout(()=>{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=0<arguments.length&&void 0!==arguments[0]&&arguments[0];if(this.isEmpty())return null;if(this.deleted)return{pageIndex:this.pageIndex,id:this.annotationElementId,deleted:!0};var t=r._internalPadding*this.parentScale,t=this.getRect(t,t),i=n.AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#Ue),i={annotationType:h.AnnotationEditorType.FREETEXT,color:i,fontSize:this.#He,value:this.#ze,pageIndex:this.pageIndex,rect:t,rotation:this.rotation,structTreeParentId:this._structTreeParentId};if(!e){if(this.annotationElementId&&!this.#Je(i))return null;i.id=this.annotationElementId}return i}#Je(e){const{value:t,fontSize:i,color:n,rect:r,pageIndex:s}=this.#qe;return e.value!==t||e.fontSize!==i||e.rect.some((e,t)=>1<=Math.abs(e-r[t]))||e.color.some((e,t)=>e!==n[t])||e.pageIndex!==s}#Xe(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.annotationElementId&&(this.#$e(),e||0!==this.width&&0!==this.height?(e=r._internalPadding*this.parentScale,this.#qe.rect=this.getRect(e,e)):setTimeout(()=>this.#Xe(!0),0))}}t.FreeTextEditor=r},(O,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?b:e.data.checkBox?v:y)(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 S(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 E(e);case u.AnnotationType.CARET:return new M(e);case u.AnnotationType.INK:return new R(e);case u.AnnotationType.POLYGON:return new T(e);case u.AnnotationType.HIGHLIGHT:return new L(e);case u.AnnotationType.UNDERLINE:return new $(e);case u.AnnotationType.SQUIGGLY:return new F(e);case u.AnnotationType.STRIKEOUT:return new P(e);case u.AnnotationType.STAMP:return new I(e);case u.AnnotationType.FILEATTACHMENT:return new D(e);default:return new n(e)}}}class n{#Qe=!1;constructor(e){var{isRenderable:t=!1,ignoreBorder:i=!1,createQuadrilaterals:n=!1}=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.isRenderable=t,this.data=e.data,this.layer=e.layer,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderForms=e.renderForms,this.svgFactory=e.svgFactory,this.annotationStorage=e.annotationStorage,this.enableScripting=e.enableScripting,this.hasJSActions=e.hasJSActions,this._fieldObjects=e.fieldObjects,this.parent=e.parent,t&&(this.container=this._createContainer(i)),n&&this._createQuadrilaterals()}static _hasPopupData(e){var{titleObj:e,contentsObj:t,richText:i}=e;return!!(e?.str||t?.str||i?.str)}get hasPopupData(){return n._hasPopupData(this.data)}_createContainer(e){const{data:t,parent:{page:i,viewport:n}}=this,r=document.createElement("section");r.setAttribute("data-annotation-id",t.id),this instanceof f||(r.tabIndex=1e3),r.style.zIndex=this.parent.zIndex++,this.data.popupRef&&r.setAttribute("aria-haspopup","dialog"),t.noRotate&&r.classList.add("norotate");var{pageWidth:s,pageHeight:o,pageX:a,pageY:l}=n.rawDims;if(!t.rect||this instanceof x){const e=t["rotation"];t.hasOwnCanvas||0===e||this.setRotation(e,r)}else{var{width:h,height:c}=g(t.rect),d=u.Util.normalizeRect([t.rect[0],i.view[3]-t.rect[1]+i.view[1],t.rect[2],i.view[3]-t.rect[3]+i.view[1]]);if(!e&&0<t.borderStyle.width){r.style.borderWidth=t.borderStyle.width+"px";const e=t.borderStyle.horizontalCornerRadius,i=t.borderStyle.verticalCornerRadius;if(0<e||0<i){const t=`calc(${e}px * var(--scale-factor)) / calc(${i}px * var(--scale-factor))`;r.style.borderRadius=t}else if(this instanceof b){const e=`calc(${h}px * var(--scale-factor)) / calc(${c}px * var(--scale-factor))`;r.style.borderRadius=e}switch(t.borderStyle.style){case u.AnnotationBorderStyleType.SOLID:r.style.borderStyle="solid";break;case u.AnnotationBorderStyleType.DASHED:r.style.borderStyle="dashed";break;case u.AnnotationBorderStyleType.BEVELED:(0,u.warn)("Unimplemented border style: beveled");break;case u.AnnotationBorderStyleType.INSET:(0,u.warn)("Unimplemented border style: inset");break;case u.AnnotationBorderStyleType.UNDERLINE:r.style.borderBottomStyle="solid"}const n=t.borderColor||null;n?(this.#Qe=!0,r.style.borderColor=u.Util.makeHexColor(0|n[0],0|n[1],0|n[2])):r.style.borderWidth=0}r.style.left=100*(d[0]-a)/s+"%",r.style.top=100*(d[1]-l)/o+"%";e=t["rotation"];t.hasOwnCanvas||0===e?(r.style.width=100*h/s+"%",r.style.height=100*c/o+"%"):this.setRotation(e,r)}return r}setRotation(i){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.container;if(this.data.rect){var{pageWidth:r,pageHeight:s}=this.parent.viewport.rawDims,{width:o,height:a}=g(this.data.rect);let e,t;t=i%180==0?(e=100*o/r,100*a/s):(e=100*a/r,100*o/s),n.style.width=e+"%",n.style.height=t+"%",n.setAttribute("data-main-rotation",(360-i)%360)}}get _commonActions(){const t=(e,t,i)=>{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,",'<svg xmlns="http://www.w3.org/2000/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${t}" stroke-width="${i}">`],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(`<rect vector-effect="non-scaling-stroke" x="${d}" y="${p}" width="${m}" height="${g}"/>`)}this.#Qe&&(e.push("</g></svg>')"),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<arguments.length&&void 0!==arguments[1]?arguments[1]:null,i=[];if(this._fieldObjects){var n,r,s=this._fieldObjects[e];if(s)for(const{page:e,id:o,exportValues:a}of s)-1!==e&&o!==t&&(n="string"==typeof a?a:null,!(r=document.querySelector(`[data-element-id="${o}"]`))||m.has(r)?i.push({id:o,exportValue:n,domElement:r}):(0,u.warn)("_getElementsByName - element not allowed: "+o))}else for(const u of document.getElementsByName(e)){const e=u["exportValue"],l=u.getAttribute("data-element-id");l!==t&&m.has(u)&&i.push({id:l,exportValue:e,domElement:u})}return i}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){return this.container}addHighlightArea(){var e=this.getElementsToTriggerPopup();if(Array.isArray(e))for(const t of e)t.classList.add("highlightArea");else e.classList.add("highlightArea")}_editOnDoubleClick(){const{annotationEditorType:e,data:{id:t}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode:e,editId:t})})}}class i extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!!(1<arguments.length&&void 0!==arguments[1]?arguments[1]:null)?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=e.data.isTooltipOnly}render(){var{data:e,linkService:t}=this,i=document.createElement("a");i.setAttribute("data-element-id",e.id);let n=!1;return e.url?(t.addLinkAttributes(i,e.url,e.newWindow),n=!0):e.action?(this._bindNamedAction(i,e.action),n=!0):e.attachment?(this._bindAttachment(i,e.attachment),n=!0):e.setOCGState?(this.#Ze(i,e.setOCGState),n=!0):e.dest?(this._bindLink(i,e.dest),n=!0):(e.actions&&(e.actions.Action||e.actions["Mouse Up"]||e.actions["Mouse Down"])&&this.enableScripting&&this.hasJSActions&&(this._bindJSAction(i,e),n=!0),e.resetForm?(this._bindResetFormAction(i,e.resetForm),n=!0):this.isTooltipOnly&&!n&&(this._bindLink(i,""),n=!0)),this.container.classList.add("linkAnnotation"),n&&this.container.append(i),this.container}#tn(){this.container.setAttribute("data-internal-link","")}_bindLink(e,t){e.href=this.linkService.getDestinationHash(t),e.onclick=()=>(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 b 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 y 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<this.data.options.length;this.data.combo||(a.size=this.data.options.length,this.data.multiSelect&&(a.multiple=!0)),a.addEventListener("resetform",e=>{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),0<t.length&&-1===Array.prototype.findIndex.call(t,e=>e.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<a.options.length&&(a.options[0].selected=!0),s.setValue(o,{value:l(!0),items:c(e)}),h=l(!1)},indices(e){var t=new Set(e.detail.indices);for(const s of e.target.options)s.selected=t.has(s.index);s.setValue(o,{value:l(!0)}),h=l(!1)},editable(e){e.target.disabled=!e.detail.editable}},e)}),a.addEventListener("input",e=>{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 A({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 A{#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<t;++e){const i=r[e];n.append(document.createTextNode(i)),e<t-1&&n.append(document.createElement("br"))}return n}#in(e){e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||("Enter"===e.key||"Escape"===e.key&&this.#fn)&&this.#cn()}#cn(){this.#fn=!this.#fn,this.#fn?(this.#on(),this.#Rt.addEventListener("click",this.#ln),this.#Rt.addEventListener("keydown",this.#nn)):(this.#sn(),this.#Rt.removeEventListener("click",this.#ln),this.#Rt.removeEventListener("keydown",this.#nn))}#on(){this.#gn||this.render(),this.isVisible?this.#fn&&this.#Rt.classList.add("focused"):(this.#Rt.hidden=!1,this.#Rt.style.zIndex=parseInt(this.#Rt.style.zIndex)+1e3)}#sn(){this.#Rt.classList.remove("focused"),!this.#fn&&this.isVisible&&(this.#Rt.hidden=!0,this.#Rt.style.zIndex=parseInt(this.#Rt.style.zIndex)-1e3)}forceHide(){this.#yn=this.isVisible,this.#yn&&(this.#Rt.hidden=!0)}maybeShow(){this.#yn&&(this.#yn=!1,this.#Rt.hidden=!1)}get isVisible(){return!1===this.#Rt.hidden}}class S extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.textContent=e.data.textContent,this.textPosition=e.data.textPosition,this.annotationEditorType=u.AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){var e=document.createElement("div");e.classList.add("annotationTextContent"),e.setAttribute("role","comment");for(const i of this.textContent){var t=document.createElement("span");t.textContent=i,e.append(t)}this.container.append(e)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}e.FreeTextAnnotationElement=S;class k extends n{#_n=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("lineAnnotation");var e=this.data,{width:t,height:i}=g(e.rect),t=this.svgFactory.create(t,i,!0),i=this.#_n=this.svgFactory.createElement("svg:line");return i.setAttribute("x1",e.rect[2]-e.lineCoordinates[0]),i.setAttribute("y1",e.rect[3]-e.lineCoordinates[1]),i.setAttribute("x2",e.rect[2]-e.lineCoordinates[2]),i.setAttribute("y2",e.rect[3]-e.lineCoordinates[3]),i.setAttribute("stroke-width",e.borderStyle.width||1),i.setAttribute("stroke","transparent"),i.setAttribute("fill","transparent"),t.append(i),this.container.append(t),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#_n}addHighlightArea(){this.container.classList.add("highlightArea")}}class _ extends n{#An=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");var e=this.data,{width:t,height:i}=g(e.rect),n=this.svgFactory.create(t,i,!0),r=e.borderStyle.width,s=this.#An=this.svgFactory.createElement("svg:rect");return s.setAttribute("x",r/2),s.setAttribute("y",r/2),s.setAttribute("width",t-r),s.setAttribute("height",i-r),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#An}addHighlightArea(){this.container.classList.add("highlightArea")}}class C extends n{#Sn=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");var e=this.data,{width:t,height:i}=g(e.rect),n=this.svgFactory.create(t,i,!0),r=e.borderStyle.width,s=this.#Sn=this.svgFactory.createElement("svg:ellipse");return s.setAttribute("cx",t/2),s.setAttribute("cy",i/2),s.setAttribute("rx",t/2-r/2),s.setAttribute("ry",i/2-r/2),s.setAttribute("stroke-width",r||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#Sn}addHighlightArea(){this.container.classList.add("highlightArea")}}class E extends n{#En=null;constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const e=this.data,{width:t,height:i}=g(e.rect),n=this.svgFactory.create(t,i,!0);let r=[];for(const t of e.vertices){const i=t.x-e.rect[0],n=e.rect[3]-t.y;r.push(i+","+n)}r=r.join(" ");var s=this.#En=this.svgFactory.createElement(this.svgElementName);return s.setAttribute("points",r),s.setAttribute("stroke-width",e.borderStyle.width||1),s.setAttribute("stroke","transparent"),s.setAttribute("fill","transparent"),n.append(s),this.container.append(n),!e.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#En}addHighlightArea(){this.container.classList.add("highlightArea")}}class T extends E{constructor(e){super(e),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class M extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class R extends n{#xn=[];constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=u.AnnotationEditorType.INK}render(){this.container.classList.add(this.containerClassName);const t=this.data,{width:i,height:e}=g(t.rect),n=this.svgFactory.create(i,e,!0);for(const i of t.inkLists){let e=[];for(const n of i){const i=n.x-t.rect[0],s=t.rect[3]-n.y;e.push(i+","+s)}e=e.join(" ");var r=this.svgFactory.createElement(this.svgElementName);this.#xn.push(r),r.setAttribute("points",e),r.setAttribute("stroke-width",t.borderStyle.width||1),r.setAttribute("stroke","transparent"),r.setAttribute("fill","transparent"),!t.popupRef&&this.hasPopupData&&this._createPopup(),n.append(r)}return this.container.append(n),this.container}getElementsToTriggerPopup(){return this.#xn}addHighlightArea(){this.container.classList.add("highlightArea")}}e.InkAnnotationElement=R;class L extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this.container}}class $ extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),this.container}}class F extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),this.container}}class P extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),this.container}}class I extends n{constructor(e){super(e,{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("stampAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}e.StampAnnotationElement=I;class D extends n{#wn=null;constructor(e){super(e,{isRenderable:!0});var{filename:e,content:t}=this.data.file;this.filename=(0,d.getFilenameFromUrl)(e,!0),this.content=t,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,filename:e,content:t})}render(){this.container.classList.add("fileAttachmentAnnotation");var{container:e,data:t}=this;let i;t.hasAppearance||0===t.fillAlpha?i=document.createElement("div"):((i=document.createElement("img")).src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(t.name)?"paperclip":"pushpin"}.svg`,t.fillAlpha&&t.fillAlpha<1&&(i.style=`filter: opacity(${Math.round(100*t.fillAlpha)}%);`)),i.addEventListener("dblclick",this.#Cn.bind(this)),this.#wn=i;const n=u.FeatureTest.platform["isMac"];return e.addEventListener("keydown",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<i.annotationEditorType&&this.#Pn.set(i.data.id,i);const d=i.render();e.hidden&&(d.style.visibility="hidden"),this.#kn(d,e.id)}}this.#Mn(),await this.l10n.translate(i)}update(e){var e=e["viewport"],t=this.div;this.viewport=e,(0,d.setLayerDimensions)(t,{rotation:e.rotation}),this.#Mn(),t.hidden=!1}#Mn(){if(this.#Tn){var e,t,i=this.div;for([e,t]of this.#Tn){var n,r=i.querySelector(`[data-annotation-id="${e}"]`);r&&(n=r["firstChild"],n?"CANVAS"===n.nodeName?n.replaceWith(t):n.before(t):r.append(t))}this.#Tn.clear()}}getEditableAnnotations(){return Array.from(this.#Pn.values())}getEditableAnnotation(e){return this.#Pn.get(e)}}},(e,t)=>{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=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:n(e,t),(i=t)?e.replaceAll(/\{\{\s*(\w+)\s*\}\}/g,(e,t)=>t 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<o.length;){const[e,n,s]=o.at(-1);if(n+1===e.children.length)o.pop();else{const a=e.children[++o.at(-1)[1]];if(null!==a){var h=a["name"];if("#text"===h){const e=document.createTextNode(a.value);l.push(e),s.append(e)}else{var c=a?.attributes?.xmlns?document.createElementNS(a.attributes.xmlns,h):document.createElement(h);if(s.append(c),a.attributes&&this.setAttributes({html:c,element:a,storage:t,intent:r,linkService:i}),a.children&&0<a.children.length)o.push([a,-1,c]);else if(a.value){const e=document.createTextNode(a.value);d.XfaText.shouldBuildText(h)&&l.push(e),c.append(e)}}}}}for(const e of a.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))e.setAttribute("readOnly",!0);return{textDivs:l}}static update(e){var t=`matrix(${e.viewport.transform.join(",")})`;e.div.style.transform=t,e.div.hidden=!1}}},(e,t,i)=>{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 b 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:b._defaultThickness=t;break;case g.AnnotationEditorParamsType.INK_COLOR:b._defaultColor=t;break;case g.AnnotationEditorParamsType.INK_OPACITY:b._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,b._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,b._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*b._defaultOpacity)]]}get propertiesToUpdate(){return[[g.AnnotationEditorParamsType.INK_THICKNESS,this.thickness||b._defaultThickness],[g.AnnotationEditorParamsType.INK_COLOR,this.color||b._defaultColor||f.AnnotationEditor._defaultLineColor],[g.AnnotationEditorParamsType.INK_OPACITY,Math.round(100*(this.opacity??b._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||=b._defaultThickness,this.color||=b._defaultColor||f.AnnotationEditor._defaultLineColor,this.opacity??=b._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.currentPath.length&&t===n&&i===e)){n=this.currentPath;let e=this.#Nn;n.push([t,i]),this.#jn=!0,n.length<=2?(e.moveTo(...n[0]),e.lineTo(t,i)):(3===n.length&&(this.#Nn=e=new Path2D,e.moveTo(...n[0])),this.#ii(e,...n.at(-3),...n.at(-2),t,i))}}#ri(){var e;0!==this.currentPath.length&&(e=this.currentPath.at(-1),this.#Nn.lineTo(...e))}#si(e,t){this.#qn=null,e=Math.min(Math.max(e,0),this.canvas.width),t=Math.min(Math.max(t,0),this.canvas.height),this.#ni(e,t),this.#ri();let i;if(1!==this.currentPath.length)i=this.#ai();else{const n=[e,t];i=[[n,n.slice(),n.slice(),n]]}const n=this.#Nn,r=this.currentPath;this.currentPath=[],this.#Nn=new Path2D,this.addCommands({cmd:()=>{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<e.length-2;i++){const[s,o]=e[i],[a,l]=e[i+1],h=(s+a)/2,c=(o+l)/2,d=[n+2*(s-n)/3,r+2*(o-r)/3],u=[h+2*(s-h)/3,c+2*(o-c)/3];t.push([[n,r],d,u,[h,c]]),[n,r]=[h,c]}const[s,o]=e[i],[a,l]=e[i+1],h=[n+2*(s-n)/3,r+2*(o-r)/3],c=[a+2*(s-a)/3,l+2*(o-l)/3];return t.push([[n,r],h,c,[a,l]]),t}#Xn(){if(this.isEmpty())this.#oi();else{this.#Zn();const{canvas:e,ctx:t}=this;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.width,e.height),this.#oi();for(const e of this.bezierPath2D)t.stroke(e)}}commit(){this.#Bn||(super.commit(),this.isEditing=!1,this.disableEditMode(),this.setInForeground(),this.#Bn=!0,this.div.classList.add("disabled"),this.#$n(!0),this.makeResizable(),this.parent.addInkEditorIfNeeded(!0),this.moveInDOM(),this.div.focus({preventScroll:!0}))}focusin(e){this._focusEventsAllowed&&(super.focusin(e),this.enableEditMode())}canvasPointerdown(e){0===e.button&&this.isInEditMode()&&!this.#Bn&&(this.setInForeground(),e.preventDefault(),"mouse"!==e.type&&this.div.focus(),this.#ti(e.offsetX,e.offsetY))}canvasPointermove(e){e.preventDefault(),this.#ni(e.offsetX,e.offsetY)}canvasPointerup(e){e.preventDefault(),this.#li(e)}canvasPointerleave(e){this.#li(e)}#li(e){this.canvas.removeEventListener("pointerleave",this.#In),this.canvas.removeEventListener("pointermove",this.#Dn),this.canvas.removeEventListener("pointerup",this.#On),this.canvas.addEventListener("pointerdown",this.#Ln),setTimeout(()=>{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<t;e++){var[r,s,o,a]=i[e];0===e&&n.moveTo(...r),n.bezierCurveTo(s[0],s[1],o[0],o[1],a[0],a[1])}return n}static#ui(i,e,n){var[r,s,o,a]=e;switch(n){case 0:for(let e=0,t=i.length;e<t;e+=2)i[e]+=r,i[e+1]=a-i[e+1];break;case 90:for(let e=0,t=i.length;e<t;e+=2){const n=i[e];i[e]=i[e+1]+r,i[e+1]=n+s}break;case 180:for(let e=0,t=i.length;e<t;e+=2)i[e]=o-i[e],i[e+1]+=s;break;case 270:for(let e=0,t=i.length;e<t;e+=2){const n=i[e];i[e]=o-i[e+1],i[e+1]=a-n}break;default:throw new Error("Invalid rotation")}return i}static#pi(i,e,n){var[r,s,o,a]=e;switch(n){case 0:for(let e=0,t=i.length;e<t;e+=2)i[e]-=r,i[e+1]=a-i[e+1];break;case 90:for(let e=0,t=i.length;e<t;e+=2){const n=i[e];i[e]=i[e+1]-s,i[e+1]=n-r}break;case 180:for(let e=0,t=i.length;e<t;e+=2)i[e]=o-i[e],i[e+1]-=s;break;case 270:for(let e=0,t=i.length;e<t;e+=2){const n=i[e];i[e]=a-i[e+1],i[e+1]=o-n}break;default:throw new Error("Invalid rotation")}return i}#fi(i,n,r,e){const t=[],s=this.thickness/2,o=i*n+s,a=i*r+s;for(const n of this.paths){const r=[],s=[];for(let e=0,t=n.length;e<t;e++){var[l,h,c,d]=n[e],u=i*l[0]+o,l=i*l[1]+a,p=i*h[0]+o,h=i*h[1]+a,m=i*c[0]+o,c=i*c[1]+a,g=i*d[0]+o,d=i*d[1]+a;0===e&&(r.push(u,l),s.push(u,l)),r.push(p,h,m,c,g,d),s.push(p,h),e===t-1&&s.push(g,d)}t.push({bezier:b.#ui(r,e,this.rotation),points:b.#ui(s,e,this.rotation)})}return t}#gi(){let e=1/0,t=-1/0,i=1/0,n=-1/0;for(const l of this.paths)for(var[r,s,o,a]of l){r=g.Util.bezierBoundingBox(...r,...s,...o,...a);e=Math.min(e,r[0]),i=Math.min(i,r[1]),t=Math.max(t,r[2]),n=Math.max(n,r[3])}return[e,i,t,n]}#hi(){return this.#Bn?Math.ceil(this.thickness*this.parentScale):0}#$n(){var e,t,i,n,r,s,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0];this.isEmpty()||(this.#Bn?(s=this.#gi(),e=this.#hi(),this.#Rn=Math.max(f.AnnotationEditor.MIN_SIZE,s[2]-s[0]),this.#Fn=Math.max(f.AnnotationEditor.MIN_SIZE,s[3]-s[1]),t=Math.ceil(e+this.#Rn*this.scaleFactor),i=Math.ceil(e+this.#Fn*this.scaleFactor),[n,r]=this.parentDimensions,this.width=t/n,this.height=i/r,this.setAspectRatio(t,i),n=this.translationX,r=this.translationY,this.translationX=-s[0],this.translationY=-s[1],this.#Jn(),this.#Xn(),this.#Wn=t,this.#Hn=i,this.setDims(t,i),s=o?e/this.scaleFactor/2:0,this.translate(n-this.translationX-s,r-this.translationY-s)):this.#Xn())}static deserialize(e,r,t){if(e instanceof v.InkAnnotationElement)return null;const s=super.deserialize(e,r,t),[o,a]=(s.thickness=e.thickness,s.color=g.Util.makeHexColor(...e.color),s.opacity=e.opacity,s.pageDimensions),l=s.width*o,h=s.height*a,c=s.parentScale,d=e.thickness/2;s.#Bn=!0,s.#Wn=Math.round(l),s.#Hn=Math.round(h);var u,{paths:r,rect:p,rotation:m}=e;for({bezier:u}of r){u=b.#pi(u,p,m);const r=[];s.paths.push(r);let i=c*(u[0]-d),n=c*(u[1]-d);for(let e=2,t=u.length;e<t;e+=6){const v=c*(u[e]-d),s=c*(u[e+1]-d),o=c*(u[e+2]-d),a=c*(u[e+3]-d),l=c*(u[e+4]-d),h=c*(u[e+5]-d);r.push([[i,n],[v,s],[o,a],[l,h]]),i=l,n=h}const f=this.#di(r);s.bezierPath2D.push(f)}t=s.#gi();return s.#Rn=Math.max(f.AnnotationEditor.MIN_SIZE,t[2]-t[0]),s.#Fn=Math.max(f.AnnotationEditor.MIN_SIZE,t[3]-t[1]),s.#ci(l,h),s}serialize(){var e,t;return this.isEmpty()?null:(e=this.getRect(0,0),t=f.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle),{annotationType:g.AnnotationEditorType.INK,color:t,thickness:this.thickness,opacity:this.opacity,paths:this.#fi(this.scaleFactor/this.parentScale,this.translationX,this.translationY,e),pageIndex:this.pageIndex,rect:e,rotation:this.rotation,structTreeParentId:this._structTreeParentId})}}t.InkEditor=b},(e,t,i)=>{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=1<arguments.length&&void 0!==arguments[1]&&arguments[1];e?(this.#mi=e.bitmap,t||(this.#bi=e.id,this.#Ei=e.isSvg),this.#Kn()):this.remove()}#Ci(){this.#vi=null,this._uiManager.enableWaiting(!1),this.#Ai&&this.div.focus()}#Ti(){if(this.#bi)this._uiManager.enableWaiting(!0),this._uiManager.imageManager.getFromId(this.#bi).then(e=>this.#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=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;if(this.isEmpty())return null;var i={annotationType:s.AnnotationEditorType.STAMP,bitmapId:this.#bi,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#Ei,structTreeParentId:this._structTreeParentId};if(e)i.bitmapUrl=this.#Fi(!0),i.accessibilityData=this.altTextData;else{var{decorative:n,altText:r}=this.altTextData;if(!n&&r&&(i.accessibilityData={type:"Figure",alt:r}),null!==t){t.stamps||=new Map;n=this.#Ei?(i.rect[2]-i.rect[0])*(i.rect[3]-i.rect[1]):null;if(t.stamps.has(this.#bi)){if(this.#Ei){const e=t.stamps.get(this.#bi);n>e.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__})()),!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 O={d:function(e,t){for(var i in t)O.o(t,i)&&!O.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};O.d(t,{default:function(){return _n}});class D{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<i?"…"+e.slice(i-15,i):e.slice(0,i),o=n+15<e.length?e.slice(n,n+15)+"…":e.slice(n);r+=s+t+o}t=new Error(r);return t.name="ParseError",t.__proto__=D.prototype,null!=(t.position=i)&&null!=n&&(t.length=n-i),t.rawMessage=e,t}}D.prototype.__proto__=Error.prototype;var _=D;function N(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?N(e.body[0]):e:"font"===e.type?N(e.body):e}const B=/([A-Z])/g,z={"&":"&",">":">","<":"<",'"':""","'":"'"},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 W={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class U{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 W){var t;W.hasOwnProperty(i)&&(t=W[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 V{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 j[q[this.id]]}sub(){return j[G[this.id]]}fracNum(){return j[K[this.id]]}fracDen(){return j[X[this.id]]}cramp(){return j[Y[this.id]]}text(){return j[Q[this.id]]}isTight(){return 2<=this.size}}const j=[new V(0,0,!1),new V(1,0,!0),new V(2,1,!1),new V(3,1,!0),new V(4,2,!1),new V(5,2,!0),new V(6,3,!1),new V(7,3,!0)],q=[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 E={DISPLAY:j[0],TEXT:j[2],SCRIPT:j[4],SCRIPTSCRIPT:j[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.length;e+=2)if(t>=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;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){return this.children.map(e=>e.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 be||e in ye||"ex"===e}function T(e,t){let i;if(e.unit in be)i=be[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<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}function ve(e){let t="<"+e,i=(this.classes.length&&(t+=' class="'+C.escape(me(this.classes))+'"'),"");for(const e in this.style)this.style.hasOwnProperty(e)&&(i+=C.hyphenate(e)+":"+this.style[e]+";");i&&(t+=' style="'+C.escape(i)+'"');for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&(t+=" "+e+'="'+C.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+e+">"}const be={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},ye={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 Ae{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='<img src="'+C.escape(this.src)+'" alt="'+C.escape(this.alt)+'"',t="";for(const e in this.style)this.style.hasOwnProperty(e)&&(t+=C.hyphenate(e)+":"+this.style[e]+";");return t&&(e+=' style="'+C.escape(t)+'"'),e+="'/>"}}const Se={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"};class m{constructor(e,t,i,n,r,s,o,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=r||0,this.width=s||0,this.classes=o||[],this.style=a||{},this.maxFontSize=0;e=function(t){for(let e=0;e<J.length;e++){var i=J[e];for(let e=0;e<i.blocks.length;e++){var n=i.blocks[e];if(t>=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=Se[this.text])}hasClass(e){return C.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0<this.italic&&((t=document.createElement("span")).style.marginRight=M(this.italic)),0<this.classes.length&&((t=t||document.createElement("span")).className=me(this.classes));for(const e in this.style)this.style.hasOwnProperty(e)&&(t=t||document.createElement("span"),t.style[e]=this.style[e]);return t?(t.appendChild(e),t):e}toMarkup(){let e=!1,t="<span",i=(this.classes.length&&(e=!0,t=(t+=' class="')+C.escape(me(this.classes))+'"'),"");0<this.italic&&(i+="margin-right:"+this.italic+"em;");for(const e in this.style)this.style.hasOwnProperty(e)&&(i+=C.hyphenate(e)+":"+this.style[e]+";");i&&(e=!0,t+=' style="'+C.escape(i)+'"');var n=C.escape(this.text);return e?t=(t+=">")+n+"</span>":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<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t='<svg xmlns="http://www.w3.org/2000/svg"';for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="'+C.escape(this.attributes[e])+'"');t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</svg>"}}class _e{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",te[this.pathName]),e}toMarkup(){return this.alternate?'<path d="'+C.escape(this.alternate)+'"/>':'<path d="'+C.escape(te[this.pathName])+'"/>'}}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="<line";for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=" "+t+'="'+C.escape(this.attributes[t])+'"');return e+="/>"}}function Ee(e){if(e instanceof m)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}const Te={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Me={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Re={math:{},text:{}};var d=Re;function i(e,t,i,n,r,s){Re[e][r]={font:t,group:i,replace:n},s&&n&&(Re[e][n]=Re[e][r])}var n="math",r="text",s="main",e="ams",o="accent-token",a="bin",l="close",Le="inner",h="mathord",c="op-token",u="open",$e="punct",p="rel",g="spacing",f="textord";i(n,s,p,"≡","\\equiv",!0),i(n,s,p,"≺","\\prec",!0),i(n,s,p,"≻","\\succ",!0),i(n,s,p,"∼","\\sim",!0),i(n,s,p,"⊥","\\perp"),i(n,s,p,"⪯","\\preceq",!0),i(n,s,p,"⪰","\\succeq",!0),i(n,s,p,"≃","\\simeq",!0),i(n,s,p,"∣","\\mid",!0),i(n,s,p,"≪","\\ll",!0),i(n,s,p,"≫","\\gg",!0),i(n,s,p,"≍","\\asymp",!0),i(n,s,p,"∥","\\parallel"),i(n,s,p,"⋈","\\bowtie",!0),i(n,s,p,"⌣","\\smile",!0),i(n,s,p,"⊑","\\sqsubseteq",!0),i(n,s,p,"⊒","\\sqsupseteq",!0),i(n,s,p,"≐","\\doteq",!0),i(n,s,p,"⌢","\\frown",!0),i(n,s,p,"∋","\\ni",!0),i(n,s,p,"∝","\\propto",!0),i(n,s,p,"⊢","\\vdash",!0),i(n,s,p,"⊣","\\dashv",!0),i(n,s,p,"∋","\\owns"),i(n,s,$e,".","\\ldotp"),i(n,s,$e,"⋅","\\cdotp"),i(n,s,f,"#","\\#"),i(r,s,f,"#","\\#"),i(n,s,f,"&","\\&"),i(r,s,f,"&","\\&"),i(n,s,f,"ℵ","\\aleph",!0),i(n,s,f,"∀","\\forall",!0),i(n,s,f,"ℏ","\\hbar",!0),i(n,s,f,"∃","\\exists",!0),i(n,s,f,"∇","\\nabla",!0),i(n,s,f,"♭","\\flat",!0),i(n,s,f,"ℓ","\\ell",!0),i(n,s,f,"♮","\\natural",!0),i(n,s,f,"♣","\\clubsuit",!0),i(n,s,f,"℘","\\wp",!0),i(n,s,f,"♯","\\sharp",!0),i(n,s,f,"♢","\\diamondsuit",!0),i(n,s,f,"ℜ","\\Re",!0),i(n,s,f,"♡","\\heartsuit",!0),i(n,s,f,"ℑ","\\Im",!0),i(n,s,f,"♠","\\spadesuit",!0),i(n,s,f,"§","\\S",!0),i(r,s,f,"§","\\S"),i(n,s,f,"¶","\\P",!0),i(r,s,f,"¶","\\P"),i(n,s,f,"†","\\dag"),i(r,s,f,"†","\\dag"),i(r,s,f,"†","\\textdagger"),i(n,s,f,"‡","\\ddag"),i(r,s,f,"‡","\\ddag"),i(r,s,f,"‡","\\textdaggerdbl"),i(n,s,l,"⎱","\\rmoustache",!0),i(n,s,u,"⎰","\\lmoustache",!0),i(n,s,l,"⟯","\\rgroup",!0),i(n,s,u,"⟮","\\lgroup",!0),i(n,s,a,"∓","\\mp",!0),i(n,s,a,"⊖","\\ominus",!0),i(n,s,a,"⊎","\\uplus",!0),i(n,s,a,"⊓","\\sqcap",!0),i(n,s,a,"∗","\\ast"),i(n,s,a,"⊔","\\sqcup",!0),i(n,s,a,"◯","\\bigcirc",!0),i(n,s,a,"∙","\\bullet",!0),i(n,s,a,"‡","\\ddagger"),i(n,s,a,"≀","\\wr",!0),i(n,s,a,"⨿","\\amalg"),i(n,s,a,"&","\\And"),i(n,s,p,"⟵","\\longleftarrow",!0),i(n,s,p,"⇐","\\Leftarrow",!0),i(n,s,p,"⟸","\\Longleftarrow",!0),i(n,s,p,"⟶","\\longrightarrow",!0),i(n,s,p,"⇒","\\Rightarrow",!0),i(n,s,p,"⟹","\\Longrightarrow",!0),i(n,s,p,"↔","\\leftrightarrow",!0),i(n,s,p,"⟷","\\longleftrightarrow",!0),i(n,s,p,"⇔","\\Leftrightarrow",!0),i(n,s,p,"⟺","\\Longleftrightarrow",!0),i(n,s,p,"↦","\\mapsto",!0),i(n,s,p,"⟼","\\longmapsto",!0),i(n,s,p,"↗","\\nearrow",!0),i(n,s,p,"↩","\\hookleftarrow",!0),i(n,s,p,"↪","\\hookrightarrow",!0),i(n,s,p,"↘","\\searrow",!0),i(n,s,p,"↼","\\leftharpoonup",!0),i(n,s,p,"⇀","\\rightharpoonup",!0),i(n,s,p,"↙","\\swarrow",!0),i(n,s,p,"↽","\\leftharpoondown",!0),i(n,s,p,"⇁","\\rightharpoondown",!0),i(n,s,p,"↖","\\nwarrow",!0),i(n,s,p,"⇌","\\rightleftharpoons",!0),i(n,e,p,"≮","\\nless",!0),i(n,e,p,"","\\@nleqslant"),i(n,e,p,"","\\@nleqq"),i(n,e,p,"⪇","\\lneq",!0),i(n,e,p,"≨","\\lneqq",!0),i(n,e,p,"","\\@lvertneqq"),i(n,e,p,"⋦","\\lnsim",!0),i(n,e,p,"⪉","\\lnapprox",!0),i(n,e,p,"⊀","\\nprec",!0),i(n,e,p,"⋠","\\npreceq",!0),i(n,e,p,"⋨","\\precnsim",!0),i(n,e,p,"⪹","\\precnapprox",!0),i(n,e,p,"≁","\\nsim",!0),i(n,e,p,"","\\@nshortmid"),i(n,e,p,"∤","\\nmid",!0),i(n,e,p,"⊬","\\nvdash",!0),i(n,e,p,"⊭","\\nvDash",!0),i(n,e,p,"⋪","\\ntriangleleft"),i(n,e,p,"⋬","\\ntrianglelefteq",!0),i(n,e,p,"⊊","\\subsetneq",!0),i(n,e,p,"","\\@varsubsetneq"),i(n,e,p,"⫋","\\subsetneqq",!0),i(n,e,p,"","\\@varsubsetneqq"),i(n,e,p,"≯","\\ngtr",!0),i(n,e,p,"","\\@ngeqslant"),i(n,e,p,"","\\@ngeqq"),i(n,e,p,"⪈","\\gneq",!0),i(n,e,p,"≩","\\gneqq",!0),i(n,e,p,"","\\@gvertneqq"),i(n,e,p,"⋧","\\gnsim",!0),i(n,e,p,"⪊","\\gnapprox",!0),i(n,e,p,"⊁","\\nsucc",!0),i(n,e,p,"⋡","\\nsucceq",!0),i(n,e,p,"⋩","\\succnsim",!0),i(n,e,p,"⪺","\\succnapprox",!0),i(n,e,p,"≆","\\ncong",!0),i(n,e,p,"","\\@nshortparallel"),i(n,e,p,"∦","\\nparallel",!0),i(n,e,p,"⊯","\\nVDash",!0),i(n,e,p,"⋫","\\ntriangleright"),i(n,e,p,"⋭","\\ntrianglerighteq",!0),i(n,e,p,"","\\@nsupseteqq"),i(n,e,p,"⊋","\\supsetneq",!0),i(n,e,p,"","\\@varsupsetneq"),i(n,e,p,"⫌","\\supsetneqq",!0),i(n,e,p,"","\\@varsupsetneqq"),i(n,e,p,"⊮","\\nVdash",!0),i(n,e,p,"⪵","\\precneqq",!0),i(n,e,p,"⪶","\\succneqq",!0),i(n,e,p,"","\\@nsubseteqq"),i(n,e,a,"⊴","\\unlhd"),i(n,e,a,"⊵","\\unrhd"),i(n,e,p,"↚","\\nleftarrow",!0),i(n,e,p,"↛","\\nrightarrow",!0),i(n,e,p,"⇍","\\nLeftarrow",!0),i(n,e,p,"⇏","\\nRightarrow",!0),i(n,e,p,"↮","\\nleftrightarrow",!0),i(n,e,p,"⇎","\\nLeftrightarrow",!0),i(n,e,p,"△","\\vartriangle"),i(n,e,f,"ℏ","\\hslash"),i(n,e,f,"▽","\\triangledown"),i(n,e,f,"◊","\\lozenge"),i(n,e,f,"Ⓢ","\\circledS"),i(n,e,f,"®","\\circledR"),i(r,e,f,"®","\\circledR"),i(n,e,f,"∡","\\measuredangle",!0),i(n,e,f,"∄","\\nexists"),i(n,e,f,"℧","\\mho"),i(n,e,f,"Ⅎ","\\Finv",!0),i(n,e,f,"⅁","\\Game",!0),i(n,e,f,"‵","\\backprime"),i(n,e,f,"▲","\\blacktriangle"),i(n,e,f,"▼","\\blacktriangledown"),i(n,e,f,"■","\\blacksquare"),i(n,e,f,"⧫","\\blacklozenge"),i(n,e,f,"★","\\bigstar"),i(n,e,f,"∢","\\sphericalangle",!0),i(n,e,f,"∁","\\complement",!0),i(n,e,f,"ð","\\eth",!0),i(r,s,f,"ð","ð"),i(n,e,f,"╱","\\diagup"),i(n,e,f,"╲","\\diagdown"),i(n,e,f,"□","\\square"),i(n,e,f,"□","\\Box"),i(n,e,f,"◊","\\Diamond"),i(n,e,f,"¥","\\yen",!0),i(r,e,f,"¥","\\yen",!0),i(n,e,f,"✓","\\checkmark",!0),i(r,e,f,"✓","\\checkmark"),i(n,e,f,"ℶ","\\beth",!0),i(n,e,f,"ℸ","\\daleth",!0),i(n,e,f,"ℷ","\\gimel",!0),i(n,e,f,"ϝ","\\digamma",!0),i(n,e,f,"ϰ","\\varkappa"),i(n,e,u,"┌","\\@ulcorner",!0),i(n,e,l,"┐","\\@urcorner",!0),i(n,e,u,"└","\\@llcorner",!0),i(n,e,l,"┘","\\@lrcorner",!0),i(n,e,p,"≦","\\leqq",!0),i(n,e,p,"⩽","\\leqslant",!0),i(n,e,p,"⪕","\\eqslantless",!0),i(n,e,p,"≲","\\lesssim",!0),i(n,e,p,"⪅","\\lessapprox",!0),i(n,e,p,"≊","\\approxeq",!0),i(n,e,a,"⋖","\\lessdot"),i(n,e,p,"⋘","\\lll",!0),i(n,e,p,"≶","\\lessgtr",!0),i(n,e,p,"⋚","\\lesseqgtr",!0),i(n,e,p,"⪋","\\lesseqqgtr",!0),i(n,e,p,"≑","\\doteqdot"),i(n,e,p,"≓","\\risingdotseq",!0),i(n,e,p,"≒","\\fallingdotseq",!0),i(n,e,p,"∽","\\backsim",!0),i(n,e,p,"⋍","\\backsimeq",!0),i(n,e,p,"⫅","\\subseteqq",!0),i(n,e,p,"⋐","\\Subset",!0),i(n,e,p,"⊏","\\sqsubset",!0),i(n,e,p,"≼","\\preccurlyeq",!0),i(n,e,p,"⋞","\\curlyeqprec",!0),i(n,e,p,"≾","\\precsim",!0),i(n,e,p,"⪷","\\precapprox",!0),i(n,e,p,"⊲","\\vartriangleleft"),i(n,e,p,"⊴","\\trianglelefteq"),i(n,e,p,"⊨","\\vDash",!0),i(n,e,p,"⊪","\\Vvdash",!0),i(n,e,p,"⌣","\\smallsmile"),i(n,e,p,"⌢","\\smallfrown"),i(n,e,p,"≏","\\bumpeq",!0),i(n,e,p,"≎","\\Bumpeq",!0),i(n,e,p,"≧","\\geqq",!0),i(n,e,p,"⩾","\\geqslant",!0),i(n,e,p,"⪖","\\eqslantgtr",!0),i(n,e,p,"≳","\\gtrsim",!0),i(n,e,p,"⪆","\\gtrapprox",!0),i(n,e,a,"⋗","\\gtrdot"),i(n,e,p,"⋙","\\ggg",!0),i(n,e,p,"≷","\\gtrless",!0),i(n,e,p,"⋛","\\gtreqless",!0),i(n,e,p,"⪌","\\gtreqqless",!0),i(n,e,p,"≖","\\eqcirc",!0),i(n,e,p,"≗","\\circeq",!0),i(n,e,p,"≜","\\triangleq",!0),i(n,e,p,"∼","\\thicksim"),i(n,e,p,"≈","\\thickapprox"),i(n,e,p,"⫆","\\supseteqq",!0),i(n,e,p,"⋑","\\Supset",!0),i(n,e,p,"⊐","\\sqsupset",!0),i(n,e,p,"≽","\\succcurlyeq",!0),i(n,e,p,"⋟","\\curlyeqsucc",!0),i(n,e,p,"≿","\\succsim",!0),i(n,e,p,"⪸","\\succapprox",!0),i(n,e,p,"⊳","\\vartriangleright"),i(n,e,p,"⊵","\\trianglerighteq"),i(n,e,p,"⊩","\\Vdash",!0),i(n,e,p,"∣","\\shortmid"),i(n,e,p,"∥","\\shortparallel"),i(n,e,p,"≬","\\between",!0),i(n,e,p,"⋔","\\pitchfork",!0),i(n,e,p,"∝","\\varpropto"),i(n,e,p,"◀","\\blacktriangleleft"),i(n,e,p,"∴","\\therefore",!0),i(n,e,p,"∍","\\backepsilon"),i(n,e,p,"▶","\\blacktriangleright"),i(n,e,p,"∵","\\because",!0),i(n,e,p,"⋘","\\llless"),i(n,e,p,"⋙","\\gggtr"),i(n,e,a,"⊲","\\lhd"),i(n,e,a,"⊳","\\rhd"),i(n,e,p,"≂","\\eqsim",!0),i(n,s,p,"⋈","\\Join"),i(n,e,p,"≑","\\Doteq",!0),i(n,e,a,"∔","\\dotplus",!0),i(n,e,a,"∖","\\smallsetminus"),i(n,e,a,"⋒","\\Cap",!0),i(n,e,a,"⋓","\\Cup",!0),i(n,e,a,"⩞","\\doublebarwedge",!0),i(n,e,a,"⊟","\\boxminus",!0),i(n,e,a,"⊞","\\boxplus",!0),i(n,e,a,"⋇","\\divideontimes",!0),i(n,e,a,"⋉","\\ltimes",!0),i(n,e,a,"⋊","\\rtimes",!0),i(n,e,a,"⋋","\\leftthreetimes",!0),i(n,e,a,"⋌","\\rightthreetimes",!0),i(n,e,a,"⋏","\\curlywedge",!0),i(n,e,a,"⋎","\\curlyvee",!0),i(n,e,a,"⊝","\\circleddash",!0),i(n,e,a,"⊛","\\circledast",!0),i(n,e,a,"⋅","\\centerdot"),i(n,e,a,"⊺","\\intercal",!0),i(n,e,a,"⋒","\\doublecap"),i(n,e,a,"⋓","\\doublecup"),i(n,e,a,"⊠","\\boxtimes",!0),i(n,e,p,"⇢","\\dashrightarrow",!0),i(n,e,p,"⇠","\\dashleftarrow",!0),i(n,e,p,"⇇","\\leftleftarrows",!0),i(n,e,p,"⇆","\\leftrightarrows",!0),i(n,e,p,"⇚","\\Lleftarrow",!0),i(n,e,p,"↞","\\twoheadleftarrow",!0),i(n,e,p,"↢","\\leftarrowtail",!0),i(n,e,p,"↫","\\looparrowleft",!0),i(n,e,p,"⇋","\\leftrightharpoons",!0),i(n,e,p,"↶","\\curvearrowleft",!0),i(n,e,p,"↺","\\circlearrowleft",!0),i(n,e,p,"↰","\\Lsh",!0),i(n,e,p,"⇈","\\upuparrows",!0),i(n,e,p,"↿","\\upharpoonleft",!0),i(n,e,p,"⇃","\\downharpoonleft",!0),i(n,s,p,"⊶","\\origof",!0),i(n,s,p,"⊷","\\imageof",!0),i(n,e,p,"⊸","\\multimap",!0),i(n,e,p,"↭","\\leftrightsquigarrow",!0),i(n,e,p,"⇉","\\rightrightarrows",!0),i(n,e,p,"⇄","\\rightleftarrows",!0),i(n,e,p,"↠","\\twoheadrightarrow",!0),i(n,e,p,"↣","\\rightarrowtail",!0),i(n,e,p,"↬","\\looparrowright",!0),i(n,e,p,"↷","\\curvearrowright",!0),i(n,e,p,"↻","\\circlearrowright",!0),i(n,e,p,"↱","\\Rsh",!0),i(n,e,p,"⇊","\\downdownarrows",!0),i(n,e,p,"↾","\\upharpoonright",!0),i(n,e,p,"⇂","\\downharpoonright",!0),i(n,e,p,"⇝","\\rightsquigarrow",!0),i(n,e,p,"⇝","\\leadsto"),i(n,e,p,"⇛","\\Rrightarrow",!0),i(n,e,p,"↾","\\restriction"),i(n,s,f,"‘","`"),i(n,s,f,"$","\\$"),i(r,s,f,"$","\\$"),i(r,s,f,"$","\\textdollar"),i(n,s,f,"%","\\%"),i(r,s,f,"%","\\%"),i(n,s,f,"_","\\_"),i(r,s,f,"_","\\_"),i(r,s,f,"_","\\textunderscore"),i(n,s,f,"∠","\\angle",!0),i(n,s,f,"∞","\\infty",!0),i(n,s,f,"′","\\prime"),i(n,s,f,"△","\\triangle"),i(n,s,f,"Γ","\\Gamma",!0),i(n,s,f,"Δ","\\Delta",!0),i(n,s,f,"Θ","\\Theta",!0),i(n,s,f,"Λ","\\Lambda",!0),i(n,s,f,"Ξ","\\Xi",!0),i(n,s,f,"Π","\\Pi",!0),i(n,s,f,"Σ","\\Sigma",!0),i(n,s,f,"Υ","\\Upsilon",!0),i(n,s,f,"Φ","\\Phi",!0),i(n,s,f,"Ψ","\\Psi",!0),i(n,s,f,"Ω","\\Omega",!0),i(n,s,f,"A","Α"),i(n,s,f,"B","Β"),i(n,s,f,"E","Ε"),i(n,s,f,"Z","Ζ"),i(n,s,f,"H","Η"),i(n,s,f,"I","Ι"),i(n,s,f,"K","Κ"),i(n,s,f,"M","Μ"),i(n,s,f,"N","Ν"),i(n,s,f,"O","Ο"),i(n,s,f,"P","Ρ"),i(n,s,f,"T","Τ"),i(n,s,f,"X","Χ"),i(n,s,f,"¬","\\neg",!0),i(n,s,f,"¬","\\lnot"),i(n,s,f,"⊤","\\top"),i(n,s,f,"⊥","\\bot"),i(n,s,f,"∅","\\emptyset"),i(n,e,f,"∅","\\varnothing"),i(n,s,h,"α","\\alpha",!0),i(n,s,h,"β","\\beta",!0),i(n,s,h,"γ","\\gamma",!0),i(n,s,h,"δ","\\delta",!0),i(n,s,h,"ϵ","\\epsilon",!0),i(n,s,h,"ζ","\\zeta",!0),i(n,s,h,"η","\\eta",!0),i(n,s,h,"θ","\\theta",!0),i(n,s,h,"ι","\\iota",!0),i(n,s,h,"κ","\\kappa",!0),i(n,s,h,"λ","\\lambda",!0),i(n,s,h,"μ","\\mu",!0),i(n,s,h,"ν","\\nu",!0),i(n,s,h,"ξ","\\xi",!0),i(n,s,h,"ο","\\omicron",!0),i(n,s,h,"π","\\pi",!0),i(n,s,h,"ρ","\\rho",!0),i(n,s,h,"σ","\\sigma",!0),i(n,s,h,"τ","\\tau",!0),i(n,s,h,"υ","\\upsilon",!0),i(n,s,h,"ϕ","\\phi",!0),i(n,s,h,"χ","\\chi",!0),i(n,s,h,"ψ","\\psi",!0),i(n,s,h,"ω","\\omega",!0),i(n,s,h,"ε","\\varepsilon",!0),i(n,s,h,"ϑ","\\vartheta",!0),i(n,s,h,"ϖ","\\varpi",!0),i(n,s,h,"ϱ","\\varrho",!0),i(n,s,h,"ς","\\varsigma",!0),i(n,s,h,"φ","\\varphi",!0),i(n,s,a,"∗","*",!0),i(n,s,a,"+","+"),i(n,s,a,"−","-",!0),i(n,s,a,"⋅","\\cdot",!0),i(n,s,a,"∘","\\circ",!0),i(n,s,a,"÷","\\div",!0),i(n,s,a,"±","\\pm",!0),i(n,s,a,"×","\\times",!0),i(n,s,a,"∩","\\cap",!0),i(n,s,a,"∪","\\cup",!0),i(n,s,a,"∖","\\setminus",!0),i(n,s,a,"∧","\\land"),i(n,s,a,"∨","\\lor"),i(n,s,a,"∧","\\wedge",!0),i(n,s,a,"∨","\\vee",!0),i(n,s,f,"√","\\surd"),i(n,s,u,"⟨","\\langle",!0),i(n,s,u,"∣","\\lvert"),i(n,s,u,"∥","\\lVert"),i(n,s,l,"?","?"),i(n,s,l,"!","!"),i(n,s,l,"⟩","\\rangle",!0),i(n,s,l,"∣","\\rvert"),i(n,s,l,"∥","\\rVert"),i(n,s,p,"=","="),i(n,s,p,":",":"),i(n,s,p,"≈","\\approx",!0),i(n,s,p,"≅","\\cong",!0),i(n,s,p,"≥","\\ge"),i(n,s,p,"≥","\\geq",!0),i(n,s,p,"←","\\gets"),i(n,s,p,">","\\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,$e,",",","),i(n,s,$e,";",";"),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,Le,"…","\\textellipsis"),i(n,s,Le,"…","\\mathellipsis"),i(r,s,Le,"…","\\ldots",!0),i(n,s,Le,"…","\\ldots",!0),i(n,s,Le,"⋯","\\@cdots",!0),i(n,s,Le,"⋱","\\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 Fe={"--":!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 Pe='0123456789/@."';for(let e=0;e<Pe.length;e++){const t=Pe.charAt(e);i(n,s,f,t,t)}var Ie='0123456789!@*()-=+";:?/.,';for(let e=0;e<Ie.length;e++){const t=Ie.charAt(e);i(r,s,f,t,t)}var Oe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(let e=0;e<Oe.length;e++){const t=Oe.charAt(e);i(n,s,h,t,t),i(r,s,f,t,t)}i(n,e,f,"C","ℂ"),i(r,e,f,"C","ℂ"),i(n,e,f,"H","ℍ"),i(r,e,f,"H","ℍ"),i(n,e,f,"N","ℕ"),i(r,e,f,"N","ℕ"),i(n,e,f,"P","ℙ"),i(r,e,f,"P","ℙ"),i(n,e,f,"Q","ℚ"),i(r,e,f,"Q","ℚ"),i(n,e,f,"R","ℝ"),i(r,e,f,"R","ℝ"),i(n,e,f,"Z","ℤ"),i(r,e,f,"Z","ℤ"),i(n,s,h,"h","ℎ"),i(r,s,h,"h","ℎ");let v="";for(let e=0;e<Oe.length;e++){const t=Oe.charAt(e);i(n,s,h,t,v=String.fromCharCode(55349,56320+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56372+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56424+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56580+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56684+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56736+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56788+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56840+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56944+e)),i(r,s,f,t,v),e<26&&(i(n,s,h,t,v=String.fromCharCode(55349,56632+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,56476+e)),i(r,s,f,t,v))}i(n,s,h,"k",v=String.fromCharCode(55349,56668)),i(r,s,f,"k",v);for(let e=0;e<10;e++){const t=e.toString();i(n,s,h,t,v=String.fromCharCode(55349,57294+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,57314+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,57324+e)),i(r,s,f,t,v),i(n,s,h,t,v=String.fromCharCode(55349,57334+e)),i(r,s,f,t,v)}for(let e=0;e<"ÐÞþ".length;e++){const t="ÐÞþ".charAt(e);i(n,s,h,t,t),i(r,s,f,t,t)}function De(e,t,i){return{value:e=d[i][e]&&d[i][e].replace?d[i][e].replace:e,metrics:oe(e,t,i)}}function Ne(t,e,i,n,r){var s=De(t,e,i),o=s.metrics;let a;if(t=s.value,o){let e=o.italic;("text"===i||n&&"mathit"===n.font)&&(e=0),a=new m(t,o.height,o.depth,e,o.skew,o.width,r)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+t+"' in style '"+e+"' and mode '"+i+"'"),a=new m(t,0,0,0,0,0,r);if(n){a.maxFontSize=n.sizeMultiplier,n.style.isTight()&&a.classes.push("mtight");const t=n.getColor();t&&(a.style.color=t)}return a}function Be(t){let i=0,n=0,r=0;for(let e=0;e<t.children.length;e++){var s=t.children[e];s.height>i&&(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 b(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 We=[["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"]],Ue=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ve=(e,t,i,n)=>new we(e,t,i,n),je={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"}},qe={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:je,makeSymbol:Ne,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&De(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:b,makeSvgSpan:Ve,makeLineSpan:function(e,t,i){e=b([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?b([],[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<s.length;e++){var n=-s[e].shift-t-s[e].elem.depth,r=n-(s[e-1].elem.height+s[e-1].elem.depth);t+=n,a.push({type:"kern",size:r}),a.push(s[e])}return{children:a,depth:l}}let s;if("top"===i.positionType){let t=i.positionData;for(let e=0;e<i.children.length;e++){var o=i.children[e];t-="kern"===o.type?o.size:o.elem.height+o.elem.depth}s=t}else if("bottom"===i.positionType)s=-i.positionData;else{var e=i.children[0];if("elem"!==e.type)throw new Error('First child must have type "elem".');if("shift"===i.positionType)s=-e.elem.depth-i.positionData;else{if("firstBaseline"!==i.positionType)throw new Error("Invalid positionType "+i.positionType+".");s=-e.elem.depth}}return{children:i.children,depth:s}}(t);let s=0;for(let e=0;e<n.length;e++){const i=n[e];if("elem"===i.type){const t=i.elem;s=Math.max(s,t.maxFontSize,t.height)}}s+=2;var o=b(["pstrut"],[]),a=(o.style.height=M(s),[]);let l=r,h=r,c=r;for(let e=0;e<n.length;e++){const i=n[e];if("kern"===i.type)c+=i.size;else{const t=i.elem,n=i.wrapperClasses||[],r=i.wrapperStyle||{},l=b(n,[o,t],void 0,r);l.style.top=M(-s-c-t.depth),i.marginLeft&&(l.style.marginLeft=i.marginLeft),i.marginRight&&(l.style.marginRight=i.marginRight),a.push(l),c+=t.height+t.depth}l=Math.min(l,c),h=Math.max(h,c)}var e=b(["vlist"],a);let d;if(e.style.height=M(h),l<0){const t=b([],[]),i=b(["vlist"],[t]),n=(i.style.height=M(-l),b(["vlist-s"],[new m("")]));d=[b(["vlist-r"],[e,n]),b(["vlist-r"],[i])]}else d=[b(["vlist-r"],[e])];t=b(["vlist-t"],d);return 2===d.length&&t.classes.push("vlist-t2"),t.height=h,t.depth=-l,t},makeOrd:function(e,n,r){var s,o,a=e.mode,l=e.text,h=["mord"],e="math"===a||"text"===a&&n.font,c=e?n.font:n.fontFamily;let t="",i="";if(55349===l.charCodeAt(0)&&([t,i]=function(e,t){var i=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,t="math"===t?0:1;if(119808<=i&&i<120484){const e=Math.floor((i-119808)/26);return[We[e][2],We[e][t]]}if(120782<=i&&i<=120831){const e=Math.floor((i-120782)/10);return[Ue[e][2],Ue[e][t]]}if(120485==i||120486==i)return[We[0][2],We[0][t]];if(120486<i&&i<120782)return["",""];throw new _("Unsupported character: "+e)}(l,a)),0<t.length)return Ne(l,t,a,n,h.concat(i));if(c){let t,i;if("boldsymbol"===c){s=l,o=a;const n="textord"!==r&&De(s,"Math-BoldItalic",o).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"};t=n.fontName,i=[n.fontClass]}else i=e?(t=je[c].fontName,[c]):(t=He(c,n.fontWeight,n.fontShape),[c,n.fontWeight,n.fontShape]);if(De(l,t,a).metrics)return Ne(l,t,a,n,h.concat(i));if(Fe.hasOwnProperty(l)&&"Typewriter"===t.slice(0,10)){const r=[];for(let e=0;e<l.length;e++)r.push(Ne(l[e],t,a,n,h.concat(i)));return ze(r)}}if("mathord"===r)return Ne(l,"Math-Italic",a,n,h.concat(["mathnormal"]));if("textord"!==r)throw new Error("unexpected type: "+r+" in makeOrd");{const e=d[a][l]&&d[a][l].font;if("ams"===e){const e=He("amsrm",n.fontWeight,n.fontShape);return Ne(l,e,a,n,h.concat("amsrm",n.fontWeight,n.fontShape))}if("main"!==e&&e){const r=He(e,n.fontWeight,n.fontShape);return Ne(l,r,a,n,h.concat(r,n.fontWeight,n.fontShape))}{const e=He("textrm",n.fontWeight,n.fontShape);return Ne(l,e,a,n,h.concat(n.fontWeight,n.fontShape))}}},makeGlue:(e,t)=>{var i=b(["mspace"],[],t),e=T(e,t);return i.style.marginRight=M(e),i},staticSvg:function(e,t){var[e,i,n]=qe[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=Ve(["overlay"],[e],t);return e.height=n,e.style.height=M(n),e.style.width=M(i),e},svgData:qe,tryCombineChars:t=>{for(let e=0;e<t.length-1;e++){var i=t[e],n=t[e+1];i instanceof m&&n instanceof m&&((e,t)=>{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 y={number:3,unit:"mu"},Ge={number:4,unit:"mu"},Ke={number:5,unit:"mu"},Xe={mord:{mop:y,mbin:Ge,mrel:Ke,minner:y},mop:{mord:y,mop:y,mrel:Ke,minner:y},mbin:{mord:Ge,mop:Ge,mopen:Ge,minner:Ge},mrel:{mord:Ke,mop:Ke,mopen:Ke,minner:Ke},mopen:{},mclose:{mop:y,mbin:Ge,mrel:Ke,minner:y},mpunct:{mord:y,mop:y,mrel:Ke,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:Ge,mrel:Ke,mopen:y,mpunct:y,minner:y}},Ye={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},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<t.length;++e)Qe[t[e]]=o;e&&(r&&(Je[e]=r),s)&&(Ze[e]=s)}function et(e){var{type:e,htmlBuilder:t,mathmlBuilder:i}=e;w({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:t,mathmlBuilder:i})}function tt(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e}function x(e){return"ordgroup"===e.type?e.body:[e]}function L(t,i,e,r){void 0===r&&(r=[null,null]);var s=[];for(let e=0;e<t.length;e++){const r=$(t[e],i);if(r instanceof ie){const t=r.children;s.push(...t)}else s.push(r)}if(R.tryCombineChars(s),e){let n=i;if(1===t.length){const e=t[0];"sizing"===e.type?n=i.havingSize(e.size):"styling"===e.type&&(n=i.havingStyle(ot[e.style]))}var o=nt([r[0]||"leftmost"],[],i),r=nt([r[1]||"rightmost"],[],i),e="root"===e;lt(s,(e,t)=>{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:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.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(;s<i.length;s++){const n=i[s],a=ht(n);if(a)lt(a.children,e,t,null,r);else{var o=!n.hasClass("mspace");if(o){const r=e(n,t.node);r&&(t.insertAfter?t.insertAfter(r):(i.unshift(r),s++))}o?t.node=n:r&&n.hasClass("newline")&&(t.node=nt(["leftmost"])),t.insertAfter=(t=>e=>{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},$=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=L(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<n.length;t++)if(a.push(n[t]),n[t].hasClass("mbin")||n[t].hasClass("mrel")||n[t].hasClass("allowbreak")){let e=!1;for(;t<n.length-1&&n[t+1].hasClass("mspace")&&!n[t+1].hasClass("newline");)t++,a.push(n[t]),n[t].hasClass("nobreak")&&(e=!0);e||(s.push(ut(a,i)),a=[])}else n[t].hasClass("newline")&&(a.pop(),0<a.length&&(s.push(ut(a,i)),a=[]),s.push(n[t]));0<a.length&&s.push(ut(a,i)),t?((o=ut(L(t,i,!0))).classes=["tag"],s.push(o)):r&&s.push(r);var l=nt(["katex-html"],s);if(l.setAttribute("aria-hidden","true"),o){const e=o.children[0];e.style.height=M(l.height+l.depth),l.depth&&(e.style.verticalAlign=M(-l.depth))}return l}function mt(e){return new ie(e)}class A{constructor(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0<this.classes.length&&(t.className=me(this.classes));for(let e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){let t="<"+this.type;for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&(t+=" "+e+'="',t+=C.escape(this.attributes[e]),t+='"');0<this.classes.length&&(t+=' class ="'+C.escape(me(this.classes))+'"'),t+=">";for(let e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t+="</"+this.type+">"}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 S={MathNode:A,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?"<mtext>"+this.character+"</mtext>":'<mspace width="'+M(this.width)+'"/>'}toText(){return this.character||" "}},newDocumentFragment:mt};function ft(e,t,i){return!d[t][e]||!d[t][e].replace||55349===e.charCodeAt(0)||Fe.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 S.TextNode(e)}function vt(e){return 1===e.length?e[0]:new S.MathNode("mrow",e)}function bt(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=F(t[0],i);return e&&n instanceof A&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}const n=[];let r;for(let e=0;e<t.length;e++){var s=F(t[e],i);if(s instanceof A&&r instanceof A){if("mtext"===s.type&&"mtext"===r.type&&s.getAttribute("mathvariant")===r.getAttribute("mathvariant")){r.children.push(...s.children);continue}if("mn"===s.type&&"mn"===r.type){r.children.push(...s.children);continue}if("mi"===s.type&&1===s.children.length&&"mn"===r.type){const t=s.children[0];if(t instanceof gt&&"."===t.text){r.children.push(...s.children);continue}}else if("mi"===r.type&&1===r.children.length){const t=r.children[0];if(t instanceof gt&&"̸"===t.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){const t=s.children[0];t instanceof gt&&0<t.text.length&&(t.text=t.text.slice(0,1)+"̸"+t.text.slice(1),n.pop())}}}n.push(s),r=s}return n}function yt(e,t,i){return vt(k(e,t,i))}const F=function(e,t){if(!e)return new S.MathNode("mrow");if(Ze[e.type])return Ze[e.type](e,t);throw new _("Got group of unknown type: '"+e.type+"'")};function wt(e,t,i,n,r){e=k(e,i),i=1===e.length&&e[0]instanceof A&&C.contains(["mrow","mtable"],e[0].type)?e[0]:new S.MathNode("mrow",e),e=new S.MathNode("annotation",[new S.TextNode(t)]),e.setAttribute("encoding","application/x-tex"),t=new S.MathNode("semantics",[i,e]),i=new S.MathNode("math",[t]),i.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&i.setAttribute("display","block"),e=r?"katex":"katex-mathml";return R.makeSpan([e],[i])}const xt=function(e){return new ue({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},At=function(e,t){var i;return t.displayMode&&(i=["katex-display"],t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=R.makeSpan(i,[e])),e},St={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},kt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]};function _t(e){return(e=new S.MathNode("mo",[new S.TextNode(St[e.replace(/^\\/,"")])])).setAttribute("stretchy","true"),e}function Ct(u,p){var{span:e,minWidth:t,height:i}=function(){let n=4e5;var r=u.label.slice(1);if(C.contains(["widehat","widecheck","widetilde","utilde"],r)){var s="ordgroup"===(s=u.base).type?s.body.length:1;let e,t,i;if(5<s)t="widehat"===r||"widecheck"===r?(e=420,n=2364,i=.42,r+"4"):(e=312,n=2340,i=.34,"tilde4");else{const u=[1,1,2,2,3,3][s];t="widehat"===r||"widecheck"===r?(n=[0,1062,2364,2364,2364][u],e=[0,239,300,360,420][u],i=[0,.24,.3,.3,.36,.42][u],r+u):(n=[0,600,1033,2339,2340][u],e=[0,260,286,306,312][u],i=[0,.26,.286,.3,.306,.34][u],"tilde"+u)}s=new _e(t),s=new ke([s],{width:"100%",height:M(i),viewBox:"0 0 "+n+" "+e,preserveAspectRatio:"none"});return{span:R.makeSvgSpan([],[s],p),minWidth:0,height:i}}{const u=[],s=kt[r],[o,a,l]=s,C=l/1e3,h=o.length;let t,i;if(1===h)t=["hide-tail"],i=[s[3]];else if(2===h)t=["halfarrow-left","halfarrow-right"],i=["xMinYMin","xMaxYMin"];else{if(3!==h)throw new Error("Correct katexImagesData or update code here to support\n "+h+" children.");t=["brace-left","brace-center","brace-right"],i=["xMinYMin","xMidYMin","xMaxYMin"]}for(let e=0;e<h;e++){const s=new _e(o[e]),c=new ke([s],{width:"400em",height:M(C),viewBox:"0 0 "+n+" "+l,preserveAspectRatio:i[e]+" slice"}),d=R.makeSvgSpan([t[e]],[c],p);if(1===h)return{span:d,minWidth:a,height:C};d.style.height=M(C),u.push(d)}return{span:R.makeSpan(["stretchy"],u,p),minWidth:a,height:C}}}();return e.height=i,e.style.height=M(i),0<t&&(e.style.minWidth=M(t)),e}function P(e,t){if(e&&e.type===t)return e;throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)))}function Et(e){var t=Tt(e);if(t)return t;throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)))}function Tt(e){return e&&("atom"===e.type||Me.hasOwnProperty(e.type))?e:null}const Mt=(n,r)=>{let e,s,o;n&&"supsub"===n.type?(s=P(n.base,"accent"),e=s.base,n.base=e,o=function(e){if(e instanceof we)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}($(n,r)),n.base=s):(s=P(n,"accent"),e=s.base);n=$(e,r.havingCrampedStyle());let a=0;if(s.isShifty&&C.isCharacterBox(e)){const n=C.getBaseElem(e);a=Ee($(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<a?{width:"calc(100% - "+M(2*a)+")",marginLeft:M(2*a)}:void 0}]},r);else{let e,t;"\\vec"===s.label?(e=R.staticSvg("vec",r),t=R.svgData.vec[1]):((e=Ee(e=R.makeOrd({mode:s.mode,text:s.label},r,"textord"))).italic=0,t=e.width,l&&(c+=e.depth)),h=R.makeSpan(["accent-body"],[e]);const o="\\textcircled"===s.label;o&&(h.classes.push("accent-full"),c=n.height);let i=a;o||(i-=t/2),h.style.left=M(i),"\\textcircled"===s.label&&(h.style.top=".2em"),h=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:-c},{type:"elem",elem:h}]},r)}l=R.makeSpan(["mord","accent"],[h],r);return o?(o.children[0]=l,o.height=Math.max(l.height,o.height),o.classes[0]="mord",o):l},Rt=(e,t)=>{var i=e.isStretchy?_t(e.label):new S.MathNode("mo",[ft(e.label,e.mode)]),e=new S.MathNode("mover",[F(e.base,t),i]);return e.setAttribute("accent","true"),e},Lt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),$t=(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=!Lt.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=$(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 S.MathNode("munder",[F(e.base,t),i]);return e.setAttribute("accentunder","true"),e}}),e=>{e=new S.MathNode("mpadded",e?[e]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),Ft=(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($(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($(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<r.depth||"\\xleftequilibrium"===e.label)&&(l-=r.depth),o){const e=-t.fontMetrics().axisHeight+o.height+.5*i.height+.111;a=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:n},{type:"elem",elem:o,shift:e}]},t)}else a=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:n}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),R.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder(e,t){var i,n,r=_t(e.label);let s;return r.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),s=e.body?(i=$t(F(e.body,t)),e.below?(n=$t(F(e.below,t)),new S.MathNode("munderover",[r,n,i])):new S.MathNode("mover",[r,i])):e.below?(n=$t(F(e.below,t)),new S.MathNode("munder",[r,n])):(s=$t(),new S.MathNode("mover",[r,s]))}}),R.makeSpan);function Pt(e,t){var i=L(e.body,t,!0);return Ft([e.mclass],i,t)}function It(e,t){let i;t=k(e.body,t);return"minner"===e.mclass?i=new S.MathNode("mpadded",t):"mord"===e.mclass?e.isCharacterBox?(i=t[0]).type="mi":i=new S.MathNode("mi",t):(e.isCharacterBox?(i=t[0]).type="mo":i=new S.MathNode("mo",t),"mbin"===e.mclass?(i.attributes.lspace="0.22em",i.attributes.rspace="0.22em"):"mpunct"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(i.attributes.lspace="0em",i.attributes.rspace="0em"):"minner"===e.mclass&&(i.attributes.lspace="0.0556em",i.attributes.width="+0.1111em")),i}w({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:e,funcName:i}=e,t=t[0];return{type:"mclass",mode:e.mode,mclass:"m"+i.slice(5),body:x(t),isCharacterBox:C.isCharacterBox(t)}},htmlBuilder:Pt,mathmlBuilder:It});const Ot=e=>{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},Dt=(w({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){e=e.parser;return{type:"mclass",mode:e.mode,mclass:Ot(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?Ot(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:Pt,mathmlBuilder:It}),w({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"pmb",mode:e.mode,mclass:Ot(t[0]),body:x(t[0])}},htmlBuilder(e,t){var i=L(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 S.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($(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 S.MathNode("mrow",[F(e.label,t)]);return(i=new S.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new S.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($(e.fragment,t),t);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new S.MathNode("mrow",[F(e.fragment,t)])}}),w({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e["parser"],i=P(t[0],"ordgroup").body;let n="";for(let e=0;e<i.length;e++)n+=P(i[e],"textord").text;let r,s=parseInt(n);if(isNaN(s))throw new _("\\@char has non-numeric argument "+n);if(s<0||1114111<=s)throw new _("\\@char with invalid code point "+n);return r=s<=65535?String.fromCharCode(s):(s-=65536,String.fromCharCode(55296+(s>>10),56320+(1023&s))),{type:"textord",mode:e.mode,text:r}}});g=(e,t)=>{t=L(e.body,t.withColor(e.color),!1);return R.makeFragment(t)},$e=(e,t)=>{t=k(e.body,t.withColor(e.color)),t=new S.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=P(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:i,body:x(t)}},htmlBuilder:g,mathmlBuilder:$e}),w({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:i}=e,t=P(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:$e}),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&&P(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(T(e.size,t))),i},mathmlBuilder(e,t){var i=new S.MathNode("mspace");return e.newLine&&(i.setAttribute("linebreak","newline"),e.size)&&i.setAttribute("height",M(T(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 Wt(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),E.TEXT,n,s),i&&Ht(r,n,E.TEXT),r}function Ut(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 Vt(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 jt(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 b=n.fontMetrics().axisHeight;i&&(b*=n.sizeMultiplier);var t=v/2-b,y=[];if(0<c.length){const e=v-p-m,t=Math.round(1e3*v),i=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(c,Math.round(1e3*e)),r=new _e(c,i),s=(d/1e3).toFixed(3)+"em",o=(t/1e3).toFixed(3)+"em",a=new ke([r],{width:s,height:o,viewBox:"0 0 "+d+" "+t}),C=R.makeSvgSpan([],[a],n);C.height=t/1e3,C.style.width=s,C.style.height=o,y.push({type:"elem",elem:C})}else{if(y.push(Ut(h,u,r)),y.push(Jt),null===a){const e=v-p-m+.016;y.push(Vt(l,e,n))}else{const e=(v-p-m-g)/2+.016;y.push(Vt(l,e,n)),y.push(Jt),y.push(Ut(a,u,r)),y.push(Jt),y.push(Vt(l,e,n))}y.push(Jt),y.push(Ut(o,u,r))}return e=n.havingBaseStyle(E.TEXT),i=R.makeVList({positionType:"bottom",positionData:t,children:y},e),zt(R.makeSpan(["delimsizing","mult"],[i],e),E.TEXT,n,s)}function qt(n,e,t,i,r){return i=function(e,t){e*=1e3;let i="";switch(n){case"sqrtMain":i="M95,"+(622+e+80)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize1":i="M263,"+(601+e+80)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize2":i="M983 "+(10+e+80)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" 80h400000v"+(40+e)+"h-400000z";break;case"sqrtSize3":i="M424,"+(2398+e+80)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" 80\nh400000v"+(40+e)+"h-400000z";break;case"sqrtSize4":i="M473,"+(2713+e+80)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" 80h400000v"+(40+e)+"H1017.7z";break;case"sqrtTall":i="M702 "+(80+e)+"H400000"+(40+e)+"\nH742v"+(t-54-80-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 80H400000v"+(40+e)+"H742z"}return i}(i,t),i=new _e(n,i),i=new ke([i],{width:"400em",height:M(e),viewBox:"0 0 400000 "+t,preserveAspectRatio:"xMinYMin slice"}),R.makeSvgSpan(["hide-tail"],[i],r)}function Gt(i,n,r,s){for(let t=Math.min(2,3-s.style.size);t<r.length&&"stack"!==r[t].type;t++){var o=Bt(i,function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")}(r[t]),"math");let e=o.height+o.depth;if("small"===r[t].type&&(e*=s.havingBaseStyle(r[t].style).sizeMultiplier),e>n)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?Wt(e,d.size,i,n,r,s):jt(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]),P(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:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],oi=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],ai=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.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=qt("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=qt("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=qt("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 Wt(e,t,!1,i,n,r);if(C.contains(ii,e))return jt(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=Tt(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 S.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),P(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=L(t.body,e,!0,["mopen","mclose"]);let n,r,s=0,o=0,a=!1;for(let e=0;e<i.length;e++)i[e].isMiddle?a=!0:(s=Math.max(i[e].height,s),o=Math.max(i[e].depth,o));if(s*=e.sizeMultiplier,o*=e.sizeMultiplier,n="."===t.left?it(e,["mopen"]):li.leftRightDelim(t.left,s,o,e,t.mode,["mopen"]),i.unshift(n),a)for(let e=1;e<i.length;e++){const n=i[e].isMiddle;n&&(i[e]=li.leftRightDelim(n.delim,s,o,n.options,t.mode,[]))}if("."===t.right)r=it(e,["mclose"]);else{const i=t.rightColor?e.withColor(t.rightColor):e;r=li.leftRightDelim(t.right,s,o,i,t.mode,["mclose"])}return i.push(r),R.makeSpan(["minner"],i,e)},mathmlBuilder:(e,t)=>{ui(e);var i=k(e.body,t);if("."!==e.left){const t=new S.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),i.unshift(t)}if("."!==e.right){const t=new S.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 S.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($(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=T({number:.6,unit:"pt"},r),o=T({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 S.MathNode(-1<e.label.indexOf("colorbox")?"mpadded":"menclose",[F(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){const i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};w({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,i){var{parser:e,funcName:n}=e,r=P(t[0],"color-token").color,t=t[1];return{type:"enclose",mode:e.mode,label:n,backgroundColor:r,body:t}},htmlBuilder:a,mathmlBuilder:u}),w({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,i){var{parser:e,funcName:n}=e,r=P(t[0],"color-token").color,s=P(t[1],"color-token").color,t=t[2];return{type:"enclose",mode:e.mode,label:n,backgroundColor:s,borderColor:r,body:t}},htmlBuilder:a,mathmlBuilder:u}),w({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){e=e.parser;return{type:"enclose",mode:e.mode,label:"\\fbox",body:t[0]}}}),w({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:i}=e,t=t[0];return{type:"enclose",mode:e.mode,label:i,body:t}},htmlBuilder:a,mathmlBuilder:u}),w({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"enclose",mode:e.mode,label:"\\angl",body:t[0]}}});const pi={};function mi(e){var{type:e,names:t,props:i,handler:n,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:i.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n};for(let e=0;e<t.length;++e)pi[t[e]]=o;r&&(Je[e]=r),s&&(Ze[e]=s)}const gi={};function I(e,t){gi[e]=t}class fi{constructor(e,t,i){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=i}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new fi(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class vi{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new vi(t,fi.range(this,e))}}function bi(e){var t=[];e.consumeSpaces();let i=e.fetch().text;for("\\relax"===i&&(e.consume(),e.consumeSpaces(),i=e.fetch().text);"\\hline"===i||"\\hdashline"===i;)e.consume(),t.push("\\hdashline"===i),e.consumeSpaces(),i=e.fetch().text;return t}const yi=e=>{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 b(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function y(){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(b(),f.push(bi(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){y(),1===p.length&&"styling"===e.type&&0===e.body[0].body.length&&(1<m.length||!c)&&m.pop(),f.length<m.length+1&&f.push([]);break}if("\\\\"!==n)throw new _("Expected & or \\\\ or \\cr or \\end",t.nextToken);{let e;t.consume()," "!==t.gullet.future().text&&(e=t.parseSizeGroup(!0)),g.push(e?e.value:null),y(),f.push(bi(t)),p=[],m.push(p),b()}}}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:r,arraystretch:o,body:m,cols:s,rowGaps:g,hskipBeforeAndAfter:n,hLinesBeforeRow:f,colSeparationType:a,tags:v,leqno:u}}function Ai(e){return"d"===e.slice(0,1)?"display":"text"}function Si(n,r){let s,o;const a=n.body.length,l=n.hLinesBeforeRow;let h=0,c=new Array(a);const d=[],u=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),e=1/r.fontMetrics().ptPerEm;let p=5*e;n.colSeparationType&&"small"===n.colSeparationType&&(p=r.havingStyle(E.SCRIPT).sizeMultiplier/r.sizeMultiplier*.2778);var t="CD"===n.colSeparationType?T({number:3,unit:"ex"},r):12*e,m=3*e,g=.7*(t=n.arraystretch*t),f=.3*t;let v=0;function b(t){for(let e=0;e<t.length;++e)0<e&&(v+=.25),d.push({pos:v,isDashed:t[e]})}for(b(l[0]),s=0;s<n.body.length;++s){const _=n.body[s];let e=g,t=f;h<_.length&&(h=_.length);const d=new Array(_.length);for(o=0;o<_.length;++o){const n=$(_[o],r);t<n.depth&&(t=n.depth),e<n.height&&(e=n.height),d[o]=n}const u=n.rowGaps[s];let i=0;u&&0<(i=T(u,r))&&(i+=f,t<i&&(t=i),i=0),n.addJot&&(t+=m),d.height=e,d.depth=t,v+=e,d.pos=v,v+=t+i,c[s]=d,b(l[s+1])}var y=v/2+r.fontMetrics().axisHeight,w=n.cols||[],x=[];let A,S;var i=[];if(n.tags&&n.tags.some(e=>e))for(s=0;s<a;++s){const _=c[s],o=_.pos-y,a=n.tags[s];var k=!0===a?R.makeSpan(["eqn-num"],[],r):!1===a?R.makeSpan([],[],r):R.makeSpan([],L(a,r,!0),r);k.depth=_.depth,k.height=_.height,i.push({type:"elem",elem:k,shift:o})}for(o=0,S=0;o<h||S<w.length;++o,++S){let t,i=w[S]||{},e=!0;for(;"separator"===i.type;){if(e||((A=R.makeSpan(["arraycolsep"],[])).style.width=M(r.fontMetrics().doubleRuleSep),x.push(A)),"|"!==i.separator&&":"!==i.separator)throw new _("Invalid separator type: "+i.separator);{const n="|"===i.separator?"solid":"dashed",s=R.makeSpan(["vertical-separator"],[],r),_=(s.style.height=M(v),s.style.borderRightWidth=M(u),s.style.borderRightStyle=n,s.style.margin="0 "+M(-u/2),v-y);_&&(s.style.verticalAlign=M(-_)),x.push(s)}S++,i=w[S]||{},e=!1}if(!(o>=h)){(0<o||n.hskipBeforeAndAfter)&&0!==(t=C.deflt(i.pregap,p))&&((A=R.makeSpan(["arraycolsep"],[])).style.width=M(t),x.push(A));let e=[];for(s=0;s<a;++s){const n=c[s],r=n[o];if(r){const _=n.pos-y;r.depth=n.depth,r.height=n.height,e.push({type:"elem",elem:r,shift:_})}}e=R.makeVList({positionType:"individualShift",children:e},r),e=R.makeSpan(["col-align-"+(i.align||"c")],[e]),x.push(e),(o<h-1||n.hskipBeforeAndAfter)&&0!==(t=C.deflt(i.postgap,p))&&((A=R.makeSpan(["arraycolsep"],[])).style.width=M(t),x.push(A))}}if(c=R.makeSpan(["mtable"],x),0<d.length){const n=R.makeLineSpan("hline",r,u),s=R.makeLineSpan("hdashline",r,u),_=[{type:"elem",elem:c,shift:0}];for(;0<d.length;){const r=d.pop(),o=r.pos-y;r.isDashed?_.push({type:"elem",elem:s,shift:o}):_.push({type:"elem",elem:n,shift:o})}c=R.makeVList({positionType:"individualShift",children:_},r)}return 0===i.length?R.makeSpan(["mord"],[c],r):(t=R.makeVList({positionType:"individualShift",children:i},r),t=R.makeSpan(["tag"],[t],r),R.makeFragment([c,t]))}function ki(s,o){var t=[],i=new S.MathNode("mtd",[],["mtr-glue"]),n=new S.MathNode("mtd",[],["mml-eqn-num"]);for(let e=0;e<s.body.length;e++){const r=s.body[e],a=[];for(let e=0;e<r.length;e++)a.push(new S.MathNode("mtd",[F(r[e],o)]));s.tags&&s.tags[e]&&(a.unshift(i),a.push(i),s.leqno?a.unshift(n):a.push(n)),t.push(new S.MathNode("mtr",a))}let e=new S.MathNode("mtable",t);const r=.5===s.arraystretch?.1:.16+s.arraystretch-1+(s.addJot?.09:0);e.setAttribute("rowspacing",M(r));let a="",l="";if(s.cols&&0<s.cols.length){const o=s.cols;let t="",i=!1,n=0,r=o.length;"separator"===o[0].type&&(a+="top ",n=1),"separator"===o[o.length-1].type&&(a+="bottom ",--r);for(let e=n;e<r;e++)"align"===o[e].type?(l+=Ci[o[e].align],i&&(t+="none "),i=!0):"separator"===o[e].type&&i&&(t+="|"===o[e].separator?"solid ":"dashed ",i=!1);e.setAttribute("columnalign",l.trim()),/[sd]/.test(t)&&e.setAttribute("columnlines",t.trim())}if("align"===s.colSeparationType){const o=s.cols||[];let t="";for(let e=1;e<o.length;e++)t+=e%2?"0em ":"1em ";e.setAttribute("columnspacing",t.trim())}else"alignat"===s.colSeparationType||"gather"===s.colSeparationType?e.setAttribute("columnspacing","0em"):"small"===s.colSeparationType?e.setAttribute("columnspacing","0.2778em"):"CD"===s.colSeparationType?e.setAttribute("columnspacing","0.5em"):e.setAttribute("columnspacing","1em");let h="";var c=s.hLinesBeforeRow;a=(a+=0<c[0].length?"left ":"")+(0<c[c.length-1].length?"right ":"");for(let e=1;e<c.length-1;e++)h+=0===c[e].length?"none ":c[e][0]?"dashed ":"solid ";return/[sd]/.test(h)&&e.setAttribute("rowlines",h.trim()),""!==a&&(e=new S.MathNode("menclose",[e])).setAttribute("notation",a.trim()),s.arraystretch&&s.arraystretch<1&&(e=new S.MathNode("mstyle",[e])).setAttribute("scriptlevel","1"),e}function _i(e,i){-1===e.envName.indexOf("ed")&&yi(e);var n=[],t=-1<e.envName.indexOf("at")?"alignat":"align",r="split"===e.envName,t=xi(e.parser,{cols:n,addJot:!0,autoTag:r?void 0:wi(e.envName),emptySingleRow:!0,colSeparationType:t,maxNumCols:r?2:void 0,leqno:e.parser.settings.leqno},"display");let s,o=0;const a={type:"ordgroup",mode:e.mode,body:[]};if(i[0]&&"ordgroup"===i[0].type){let t="";for(let e=0;e<i[0].body.length;e++)t+=P(i[0].body[e],"textord").text;s=Number(t),o=2*s}const l=!o;t.body.forEach(function(t){for(let e=1;e<t.length;e+=2){var i=P(t[e],"styling");P(i.body[0],"ordgroup").body.unshift(a)}if(l)o<t.length&&(o=t.length);else{var e=t.length/2;if(s<e)throw new _("Too many math in a row: expected "+s+", but got "+e,t[0])}});for(let i=0;i<o;++i){let e="r",t=0;i%2==1?e="l":0<i&&l&&(t=1),n[i]={type:"align",align:e,pregap:t,postgap:0}}return t.colSeparationType=l?"align":"alignat",t}const Ci={c:"center ",l:"left ",r:"right "};mi({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){t=(Tt(t[0])?[t[0]]:P(t[0],"ordgroup").body).map(function(e){var t=Et(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new _("Unknown column alignment: "+t,e)}),t={cols:t,hskipBeforeAndAfter:!0,maxNumCols:t.length};return xi(e.parser,t,Ai(e.envName))},htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){const t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")];let i="c";var n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){const t=e.parser;if(t.consumeSpaces(),"["===t.fetch().text){if(t.consume(),t.consumeSpaces(),i=t.fetch().text,-1==="lcr".indexOf(i))throw new _("Expected l or c or r",t.nextToken);t.consume(),t.consumeSpaces(),t.expect("]"),t.consume(),n.cols=[{type:"align",align:i}]}}var n=xi(e.parser,n,Ai(e.envName)),r=Math.max(0,...n.body.map(e=>e.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:Si,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:Si,mathmlBuilder:ki}),mi({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){t=(Tt(t[0])?[t[0]]:P(t[0],"ordgroup").body).map(function(e){var t=Et(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new _("Unknown column alignment: "+t,e)});if(1<t.length)throw new _("{subarray} can contain only one column");if(0<(e=xi(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1<e.body[0].length)throw new _("{subarray} can contain only one column");return e},htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=xi(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Ai(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:-1<e.envName.indexOf("r")?".":"\\{",right:-1<e.envName.indexOf("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:_i,htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){C.contains(["gather","gather*"],e.envName)&&yi(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:wi(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return xi(e.parser,t,"display")},htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:_i,htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){yi(e);var t={autoTag:wi(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return xi(e.parser,t,"display")},htmlBuilder:Si,mathmlBuilder:ki}),mi({type:"array",names:["CD"],props:{numArgs:0},handler(e){yi(e);{var r=e.parser,s,o,n=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){n.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();const e=r.fetch().text;if("&"!==e&&"\\\\"!==e){if("\\end"!==e)throw new _("Expected \\\\ or \\cr or \\end",r.nextToken);0===n[n.length-1].length&&n.pop();break}r.consume()}let i=[];const h=[i];for(let t=0;t<n.length;t++){var a=n[t];let e={type:"styling",body:[],mode:"math",style:"display"};for(let n=0;n<a.length;n++)if(Nt(a[n])){i.push(e);const h=Et(a[n+=1]).text,c=new Array(2);if(c[0]={type:"ordgroup",mode:"math",body:[]},c[1]={type:"ordgroup",mode:"math",body:[]},!(-1<"=|.".indexOf(h))){if(!(-1<"<>AV".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<a.length;e++){if(o=h,("mathord"===(s=a[e]).type||"atom"===s.type)&&s.text===o){t=!1,n=e;break}if(Nt(a[e]))throw new _("Missing a "+h+" character to complete a CD arrow.",a[e]);c[i].body.push(a[e])}if(t)throw new _("Missing a "+h+" character to complete a CD arrow.",a[n])}}var l={type:"styling",body:[function(e,t,i){var n=Dt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{const e={type:"atom",text:n,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[e],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[r],[])}case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{const e={type:"textord",text:"\\Vert",mode:"math"};return i.callFunction("\\Big",[e],[])}default:return{type:"textord",text:" ",mode:"math"}}}(h,c,r)],mode:"math",style:"display"};i.push(l),e={type:"styling",body:[],mode:"math",style:"display"}}else e.body.push(a[n]);t%2==0?i.push(e):i.shift(),i=[],h.push(i)}return r.gullet.endGroup(),r.gullet.endGroup(),{type:"array",mode:"math",body:h,arraystretch:1,addJot:!0,rowGaps:[null],cols:new Array(h[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25}),colSeparationType:"CD",hLinesBeforeRow:new Array(h.length+1).fill([])}}},htmlBuilder:Si,mathmlBuilder:ki}),I("\\nonumber","\\gdef\\@eqnsw{0}"),I("\\notag","\\nonumber"),w({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new _(e.funcName+" valid only within array environment")}});var Ei=pi;w({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){let{parser:i,funcName:n}=e;var r=t[0];if("ordgroup"!==r.type)throw new _("Invalid environment name",r);let s="";for(let e=0;e<r.body.length;++e)s+=P(r.body[e],"textord").text;if("\\begin"!==n)return{type:"environment",mode:i.mode,name:s,nameGroup:r};{if(!Ei.hasOwnProperty(s))throw new _("No such environment: "+s,r);const e=Ei[s],{args:t,optArgs:n}=i.parseArguments("\\begin{"+s+"}",e),l={mode:i.mode,envName:s,parser:i},h=e.handler(l,t,n);i.expect("\\end",!1);var o=i.nextToken,a=P(i.parseFunction(),"environment");if(a.name!==s)throw new _("Mismatch: \\begin{"+s+"} matched by \\end{"+a.name+"}",o);return h}}});function Ti(e){let t=null;return t=0<e.length?"."===(t=e)?null:t:t}function Mi(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new _("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},pe(e))return e;throw new _("Invalid unit: '"+e.unit+"' in \\includegraphics.")}const Ri=(e,t)=>{var i=e.font,t=t.withFont(i);return $(e.body,t)},Li=(e,t)=>{var i=e.font,t=t.withFont(i);return F(e.body,t)},$i={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Fi=(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 $i&&(n=$i[n]),{type:"font",mode:e.mode,font:n.slice(1),body:t}},htmlBuilder:Ri,mathmlBuilder:Li}),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:Ot(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:Li}),(e,t)=>{let i=t;return"display"===e?i=i.id>=E.SCRIPT.id?i.text():E.DISPLAY:"text"===e&&i.size===E.DISPLAY.size?i=E.TEXT:"script"===e?i=E.SCRIPT:"scriptscript"===e&&(i=E.SCRIPTSCRIPT),i}),Pi=(e,t)=>{const i=Fi(e.size,t.style),n=i.fracNum(),r=i.fracDen();var s=t.havingStyle(n),o=$(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,i=3.5/t.fontMetrics().ptPerEm;o.height=o.height<e?e:o.height,o.depth=o.depth<i?i:o.depth}s=t.havingStyle(r);var a=$(e.denom,s,t);let l,h,c,d,u,p,m,g,f,v;if(c=e.hasBarLine?(l=e.barSize?(h=T(e.barSize,t),R.makeLineSpan("frac-line",t,h)):R.makeLineSpan("frac-line",t),h=l.height,l.height):(l=null,h=0,t.fontMetrics().defaultRuleThickness),p=i.size===E.DISPLAY.size||"display"===e.size?(d=t.fontMetrics().num1,u=0<h?3*c:7*c,t.fontMetrics().denom1):(u=0<h?(d=t.fontMetrics().num2,c):(d=t.fontMetrics().num3,3*c),t.fontMetrics().denom2),l){const e=t.fontMetrics().axisHeight,i=(d-o.depth-(e+.5*h)<u&&(d+=u-(d-o.depth-(e+.5*h))),e-.5*h-(a.height-p)<u&&(p+=u-(e-.5*h-(a.height-p))),-(e-.5*h));m=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:l,shift:i},{type:"elem",elem:o,shift:-d}]},t)}else{const e=d-o.depth-(a.height-p);e<u&&(d+=.5*(u-e),p+=.5*(u-e)),m=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:p},{type:"elem",elem:o,shift:-d}]},t)}return s=t.havingStyle(i),m.height*=s.sizeMultiplier/t.sizeMultiplier,m.depth*=s.sizeMultiplier/t.sizeMultiplier,g=i.size===E.DISPLAY.size?t.fontMetrics().delim1:(i.size===E.SCRIPTSCRIPT.size?t.havingStyle(E.SCRIPT):t).fontMetrics().delim2,f=null==e.leftDelim?it(t,["mopen"]):li.customSizedDelim(e.leftDelim,g,!0,t.havingStyle(i),e.mode,["mopen"]),v=e.continued?R.makeSpan([]):null==e.rightDelim?it(t,["mclose"]):li.customSizedDelim(e.rightDelim,g,!0,t.havingStyle(i),e.mode,["mclose"]),R.makeSpan(["mord"].concat(s.sizingClasses(t)),[f,R.makeSpan(["mfrac"],[m]),v],t)},Ii=(e,t)=>{let i=new S.MathNode("mfrac",[F(e.numer,t),F(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const n=T(e.barSize,t);i.setAttribute("linethickness",M(n))}}else i.setAttribute("linethickness","0px");const n=Fi(e.size,t.style);if(n.size!==t.style.size){i=new S.MathNode("mstyle",[i]);const e=n.size===E.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 S.MathNode("mo",[new S.TextNode(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}if(t.push(i),null!=e.rightDelim){const i=new S.MathNode("mo",[new S.TextNode(e.rightDelim.replace("\\",""))]);i.setAttribute("fence","true"),t.push(i)}return vt(t)}},Oi=(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:Pi,mathmlBuilder:Ii}),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"]),Di=(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?Ti(r.text):null,s=tt(t[1]),s="atom"===s.type&&"close"===s.family?Ti(s.text):null,o=P(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<c.body.length){const e=P(c.body[0],"textord");h=Oi[Number(e.text)]}}else c=P(c,"textord"),h=Oi[Number(c.text)];return{type:"genfrac",mode:e.mode,numer:i,denom:n,continued:!1,hasBarLine:a,barSize:l,leftDelim:r,rightDelim:s,size:h}},htmlBuilder:Pi,mathmlBuilder:Ii}),w({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:e,token:i}=e;return{type:"infix",mode:e.mode,replaceWith:"\\\\abovefrac",size:P(t[0],"size").value,token:i}}}),w({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var e=e["parser"],i=t[0],n=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(P(t[1],"infix").size),t=t[2],r=0<n.number;return{type:"genfrac",mode:e.mode,numer:i,denom:t,continued:!1,hasBarLine:r,barSize:n,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Pi,mathmlBuilder:Ii}),(e,t)=>{var i=t.style;let n,r;r="supsub"===e.type?(n=e.sup?$(e.sup,t.havingStyle(i.sup()),t):$(e.sub,t.havingStyle(i.sub()),t),P(e.base,"horizBrace")):P(e,"horizBrace");i=$(r.base,t.havingBaseStyle(E.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:Di,mathmlBuilder:(e,t)=>{var i=_t(e.label);return new S.MathNode(e.isOver?"mover":"munder",[F(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=P(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=L(e.body,t,!1);return R.makeAnchor(e.href,[],i,t)},mathmlBuilder:(e,t)=>{let i=yt(e.body,t);return(i=i instanceof A?i:new A("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=P(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:i}))return e.formatUnsupportedCmd("\\url");var n=[];for(let t=0;t<i.length;t++){let e=i[t];"~"===e&&(e="\\textasciitilde"),n.push({type:"textord",mode:"text",text:e})}t={type:"text",mode:e.mode,font:"\\texttt",body:n};return{type:"href",mode:e.mode,href:i,body:x(t)}}}),w({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){e=e.parser;return{type:"hbox",mode:e.mode,body:x(t[0])}},htmlBuilder(e,t){e=L(e.body,t,!1);return R.makeFragment(e)},mathmlBuilder(e,t){return new S.MathNode("mrow",k(e.body,t))}}),w({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{let{parser:i,funcName:n}=t;var r=P(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<t.length;e++){const i=t[e].split("=");if(2!==i.length)throw new _("Error parsing key-value for \\htmlData");o["data-"+i[0].trim()]=i[1].trim()}s={command:"\\htmlData",attributes:o};break}default:throw new Error("Unrecognized html command")}return i.settings.isTrusted(s)?{type:"html",mode:i.mode,attributes:o,body:x(t)}:i.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var i=L(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)=>yt(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=L(e.html,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>yt(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=P(i[0],"raw").string.split(",");for(let e=0;e<t.length;e++){const i=t[e].split("=");if(2===i.length){const t=i[1].trim();switch(i[0].trim()){case"alt":a=t;break;case"width":r=Mi(t);break;case"height":s=Mi(t);break;case"totalheight":o=Mi(t);break;default:throw new _("Invalid key: '"+i[0]+"' in \\includegraphics.")}}}}t=P(e[0],"url").url;return""===a&&(a=(a=(a=t).replace(/^.*[\\/]/,"")).substring(0,a.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:t})?{type:"includegraphics",mode:n.mode,alt:a,width:r,height:s,totalheight:o,src:t}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var i=T(e.height,t);let n=0,r=(0<e.totalheight.number&&(n=T(e.totalheight,t)-i),0);0<e.width.number&&(r=T(e.width,t));t={height:M(i+n)},0<r&&(t.width=M(r)),0<n&&(t.verticalAlign=M(-n)),e=new Ae(e.src,e.alt,t);return e.height=i,e.depth=n,e},mathmlBuilder:(e,t)=>{var i=new S.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);const n=T(e.height,t);let r=0;if(0<e.totalheight.number&&(r=T(e.totalheight,t)-n,i.setAttribute("valign",M(-r))),i.setAttribute("height",M(n+r)),0<e.width.number){const n=T(e.width,t);i.setAttribute("width",M(n))}return i.setAttribute("src",e.src),i}}),w({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:i,funcName:n}=e,r=P(t[0],"size");if(i.settings.strict){const e="m"===n[1],t="mu"===r.value.unit;e?(t||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+r.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):t&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:r.value}},htmlBuilder(e,t){return R.makeGlue(e.dimension,t)},mathmlBuilder(e,t){e=T(e.dimension,t);return new S.SpaceNode(e)}}),w({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{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([],[$(e.body,t)]),R.makeSpan(["inner"],[i],t)):R.makeSpan(["inner"],[$(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 S.MathNode("mpadded",[F(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 E.DISPLAY.size:return e.display;case E.TEXT.size:return e.text;case E.SCRIPT.size:return e.script;case E.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=L(e,t,!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=Ni(e,t);return yt(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=$(t,n.havingStyle(r.sup()),n);h={elem:e,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}}if(i){const e=$(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=P(t.base,"op"),s=!0):r=P(t,"op");t=i.style;let o,a=!1;if(t.size===E.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<e.length){const t=o.italic,n=R.staticSvg(e+"Size"+(a?"2":"1"),i);o=R.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:n,shift:a?.08:0}]},i),r.name="\\"+e,o.classes.unshift("mop"),o.italic=t}}else if(r.body){const t=L(r.body,i,!0);1===t.length&&t[0]instanceof m?(o=t[0]).classes[0]="mop":o=R.makeSpan(["mop"],t,i)}else{const t=[];for(let e=1;e<r.name.length;e++)t.push(R.mathsym(r.name[e],r.mode,i));o=R.makeSpan(["mop"],t,i)}let l=0,h=0;return(o instanceof m||"\\oiint"===r.name||"\\oiiint"===r.name)&&!r.suppressBaseShift&&(l=(o.height-o.depth)/2-i.fontMetrics().axisHeight,h=o.italic),s?Bi(o,e,n,i,t,h,l):(l&&(o.style.position="relative",o.style.top=M(l)),o)},Wi=(e,t)=>{let i;if(e.symbol)i=new A("mo",[ft(e.name,e.mode)]),C.contains(zi,e.name)&&i.setAttribute("largeop","false");else if(e.body)i=new A("mo",k(e.body,t));else{i=new A("mi",[new gt(e.name.slice(1))]);const t=new A("mo",[ft("","text")]);i=e.parentIsSupSub?new A("mrow",[i,t]):mt([i,t])}return i},Ui={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},Vi=(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=Ui[r]),{type:"op",mode:i.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Hi,mathmlBuilder:Wi}),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:Wi}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),ji=(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:Wi}),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:Wi}),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=Vi[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Hi,mathmlBuilder:Wi}),(e,t)=>{let i,n,r,s,o=!1;if("supsub"===e.type?(i=e.sup,n=e.sub,r=P(e.base,"operatorname"),o=!0):r=P(e,"operatorname"),0<r.body.length){const e=r.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),i=L(e,t.withFont("mathrm"),!0);for(let e=0;e<i.length;e++){const t=i[e];t instanceof m&&(t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=R.makeSpan(["mop"],i,t)}else s=R.makeSpan(["mop"],[],t);return o?Bi(s,i,n,t,t.style,0,0):s});function qi(e,t,i){var n=L(e,t,!1),r=t.sizeMultiplier/i.sizeMultiplier;for(let e=0;e<n.length;e++){var s=n[e].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[e].classes,t.sizingClasses(i)):n[e].classes[s+1]==="reset-size"+t.size&&(n[e].classes[s+1]="reset-size"+i.size),n[e].height*=r,n[e].depth*=r}return R.makeFragment(n)}w({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{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:ji,mathmlBuilder:(t,i)=>{let n=k(t.body,i.withFont("mathrm")),r=!0;for(let e=0;e<n.length;e++){const i=n[e];if(!(i instanceof S.SpaceNode))if(i instanceof S.MathNode)switch(i.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{const t=i.children[0];1===i.children.length&&t instanceof S.TextNode?t.text=t.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):r=!1;break}default:r=!1}else r=!1}if(r){const t=n.map(e=>e.toText()).join("");n=[new S.TextNode(t)]}var i=new S.MathNode("mi",n),e=(i.setAttribute("mathvariant","normal"),new S.MathNode("mo",[ft("","text")]));return t.parentIsSupSub?new S.MathNode("mrow",[i,e]):S.newDocumentFragment([i,e])}}),I("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),et({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?R.makeFragment(L(e.body,t,!1)):R.makeSpan(["mord"],L(e.body,t,!0),t)},mathmlBuilder(e,t){return yt(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=$(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 S.MathNode("mo",[new S.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new S.MathNode("mover",[F(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=L(e.body,t.withPhantom(),!1);return R.makeFragment(e)},mathmlBuilder:(e,t)=>{e=k(e.body,t);return new S.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([],[$(e.body,t.withPhantom())]);if(i.height=0,i.depth=0,i.children)for(let e=0;e<i.children.length;e++)i.children[e].height=0,i.children[e].depth=0;return i=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t),R.makeSpan(["mord"],[i],t)},mathmlBuilder:(e,t)=>{e=k(x(e.body),t),t=new S.MathNode("mphantom",e),e=new S.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"],[$(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 S.MathNode("mphantom",e),e=new S.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=P(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:i,body:t}},htmlBuilder(e,t){var i=$(e.body,t),e=T(e.dy,t);return R.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:i}]},t)},mathmlBuilder(e,t){t=new S.MathNode("mpadded",[F(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=P(t[0],"size"),t=P(t[1],"size");return{type:"rule",mode:e.mode,shift:i&&P(i,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var i=R.makeSpan(["mord","rule"],[],t),n=T(e.width,t),r=T(e.height,t),e=e.shift?T(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=T(e.width,t),n=T(e.height,t),e=e.shift?T(e.shift,t):0,t=t.color&&t.getColor()||"black",r=new S.MathNode("mspace"),t=(r.setAttribute("mathbackground",t),r.setAttribute("width",M(i)),r.setAttribute("height",M(n)),new S.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 qi(e.body,i,t)},mathmlBuilder:(e,t)=>{t=t.havingSize(e.size),e=k(e.body,t),e=new S.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]&&P(i[0],"ordgroup");if(o){var a;for(let e=0;e<o.body.length;++e)if("t"===(a=o.body[e].text))r=!0;else{if("b"!==a){r=!1,s=!1;break}s=!0}}else r=!0,s=!0;e=t[0];return{type:"smash",mode:n.mode,body:e,smashHeight:r,smashDepth:s}},htmlBuilder:(e,t)=>{var i=R.makeSpan([],[$(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return i;if(e.smashHeight&&(i.height=0,i.children))for(let e=0;e<i.children.length;e++)i.children[e].height=0;if(e.smashDepth&&(i.depth=0,i.children))for(let e=0;e<i.children.length;e++)i.children[e].depth=0;e=R.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i}]},t);return R.makeSpan(["mord"],[e],t)},mathmlBuilder:(e,t)=>{t=new S.MathNode("mpadded",[F(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=$(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.id<E.TEXT.id&&(r=t.fontMetrics().xHeight),n+r/4);const o=i.height+i.depth+s+n,{span:a,ruleWidth:l,advanceWidth:h}=li.sqrtImage(o,t),c=a.height-l;c>i.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(E.SCRIPTSCRIPT),n=$(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 S.MathNode("mroot",[F(e,t),F(i,t)]):new S.MathNode("msqrt",[F(e,t)])}}),{display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.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 qi(e.body,i,t)},mathmlBuilder(e,t){var i=Ki[e.style],t=t.havingStyle(i),i=k(e.body,t),t=new S.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===E.DISPLAY.size||s.alwaysHandleSupSub)?Hi:null:"operatorname"===s.type?s.alwaysHandleSupSub&&(n.style.size===E.DISPLAY.size||s.limits)?ji:null:"accent"===s.type?C.isCharacterBox(s.base)?Mt:null:"horizBrace"===s.type&&!r.sub===s.isOver?Di:null:null;if(i)return i(e,t);var{base:n,sup:r,sub:s}=e,o=$(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=$(r,e,t),n||(c=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());l=$(s,e,t),n||(d=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}r=t.style===E.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)<e){d=e-(c-a.depth)+l.height;const t=.8*h.xHeight-(c-a.depth);0<t&&(c+=t,d-=t)}const i=[{type:"elem",elem:l,shift:d,marginRight:n,marginLeft:p},{type:"elem",elem:a,shift:-c,marginRight:n}];u=R.makeVList({positionType:"individualShift",children:i},t)}else if(l){d=Math.max(d,h.sub1,l.height-.8*h.xHeight);const e=[{type:"elem",elem:l,marginLeft:p,marginRight:n}];u=R.makeVList({positionType:"shift",positionData:d,children:e},t)}else{if(!a)throw new Error("supsub must have either sup or sub.");c=Math.max(c,r,a.depth+.25*h.xHeight),u=R.makeVList({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:n}]},t)}s=dt(o,"right")||"mord";return R.makeSpan([s],[o,R.makeSpan(["msupsub"],[u])],t)},mathmlBuilder(e,t){let i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var r=[F(e.base,t)];let s;if(e.sub&&r.push(F(e.sub,t)),e.sup&&r.push(F(e.sup,t)),n)s=i?"mover":"munder";else if(e.sub)if(e.sup){const i=e.base;s=i&&"op"===i.type&&i.limits&&t.style===E.DISPLAY||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(t.style===E.DISPLAY||i.limits)?"munderover":"msubsup"}else{const i=e.base;s=i&&"op"===i.type&&i.limits&&(t.style===E.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||t.style===E.DISPLAY)?"munder":"msub"}else{const i=e.base;s=i&&"op"===i.type&&i.limits&&(t.style===E.DISPLAY||i.alwaysHandleSupSub)||i&&"operatorname"===i.type&&i.alwaysHandleSupSub&&(i.limits||t.style===E.DISPLAY)?"mover":"msup"}return new S.MathNode(s,r)}}),et({type:"atom",htmlBuilder(e,t){return R.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var i=new S.MathNode("mo",[ft(e.text,e.mode)]);return"bin"===e.family?"bold-italic"===(t=bt(e,t))&&i.setAttribute("mathvariant",t):"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false"),i}}),{mi:"italic",mn:"normal",mtext:"normal"}),Yi=(et({type:"mathord",htmlBuilder(e,t){return R.makeOrd(e,t,"mathord")},mathmlBuilder(e,t){var i=new S.MathNode("mi",[ft(e.text,e.mode,t)]),e=bt(e,t)||"italic";return e!==Xi[i.type]&&i.setAttribute("mathvariant",e),i}}),et({type:"textord",htmlBuilder(e,t){return R.makeOrd(e,t,"textord")},mathmlBuilder(e,t){var i=ft(e.text,e.mode,t),t=bt(e,t)||"normal",e="text"===e.mode?new S.MathNode("mtext",[i]):/[0-9]/.test(e.text)?new S.MathNode("mn",[i]):"\\prime"===e.text?new S.MathNode("mo",[i]):new S.MathNode("mi",[i]);return t!==Xi[e.type]&&e.setAttribute("mathvariant",t),e}}),{"\\nobreak":"nobreak","\\allowbreak":"allowbreak"}),Qi={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}},Ji=(et({type:"spacing",htmlBuilder(e,t){if(Qi.hasOwnProperty(e.text)){var i=Qi[e.text].className||"";if("text"!==e.mode)return R.makeSpan(["mspace",i],[R.mathsym(e.text,e.mode,t)],t);{const _=R.makeOrd(e,t,"textord");return _.classes.push(i),_}}if(Yi.hasOwnProperty(e.text))return R.makeSpan(["mspace",Yi[e.text]],[],t);throw new _('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(Qi.hasOwnProperty(e.text))return new S.MathNode("mtext",[new S.TextNode(" ")]);if(Yi.hasOwnProperty(e.text))return new S.MathNode("mspace");throw new _('Unknown type of space "'+e.text+'"')}}),()=>{var e=new S.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),Zi=(et({type:"tag",mathmlBuilder(e,t){e=new S.MathNode("mtable",[new S.MathNode("mtr",[Ji(),new S.MathNode("mtd",[yt(e.body,t)]),Ji(),new S.MathNode("mtd",[yt(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=L(e.body,t,!0);return R.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){t=nn(e,t);return yt(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=$(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 S.MathNode("mo",[new S.TextNode("‾")]),e=(i.setAttribute("stretchy","true"),new S.MathNode("munder",[F(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=$(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 S.MathNode("mpadded",[F(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;t<n.length;t++){let e=n[t];"~"===e&&(e="\\textasciitilde"),r.push(R.makeSymbol(e,"Typewriter-Regular",i.mode,s,["mord","texttt"]))}return R.makeSpan(["mord","text"].concat(s.sizingClasses(e)),R.tryCombineChars(r),s)},mathmlBuilder(e,t){e=new S.TextNode(rn(e)),e=new S.MathNode("mtext",[e]);return e.setAttribute("mathvariant","monospace"),e}}),e=>e.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<this.undefStack.length;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return(this.current.hasOwnProperty(e)?this.current:this.builtins)[e]}set(t,e,i){if(i=void 0===i?!1:i){for(let e=0;e<this.undefStack.length;e++)delete this.undefStack[e][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else{const e=this.undefStack[this.undefStack.length-1];e&&!e.hasOwnProperty(t)&&(e[t]=this.current[t])}null==e?delete this.current[t]:this.current[t]=e}}var hn=gi;I("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),I("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),I("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),I("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),I("\\@ifnextchar",function(e){var t=e.consumeArgs(3),e=(e.consumeSpaces(),e.future());return 1===t[0].length&&t[0][0].text===e.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),I("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),I("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});const cn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},dn=(I("\\char",function(e){let t,i=e.popToken(),n="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])n=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new _("\\char` missing argument");n=i.text.charCodeAt(0)}else t=10;if(t){if(null==(n=cn[i.text])||n>=t)throw new _("Invalid base-"+t+" digit "+i.text);for(var r;null!=(r=cn[e.future().text])&&r<t;)n=n*t+r,e.popToken()}return"\\@char{"+n+"}"}),(i,e,t)=>{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=(I("\\newcommand",e=>dn(e,!1,!0)),I("\\renewcommand",e=>dn(e,!0,!1)),I("\\providecommand",e=>dn(e,!0,!0)),I("\\message",e=>{e=e.consumeArgs(1)[0];return console.log(e.reverse().map(e=>e.text).join("")),""}),I("\\errmessage",e=>{e=e.consumeArgs(1)[0];return console.error(e.reverse().map(e=>e.text).join("")),""}),I("\\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]),""}),I("\\bgroup","{"),I("\\egroup","}"),I("~","\\nobreakspace"),I("\\lq","`"),I("\\rq","'"),I("\\aa","\\r a"),I("\\AA","\\r A"),I("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),I("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),I("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),I("ℬ","\\mathscr{B}"),I("ℰ","\\mathscr{E}"),I("ℱ","\\mathscr{F}"),I("ℋ","\\mathscr{H}"),I("ℐ","\\mathscr{I}"),I("ℒ","\\mathscr{L}"),I("ℳ","\\mathscr{M}"),I("ℛ","\\mathscr{R}"),I("ℭ","\\mathfrak{C}"),I("ℌ","\\mathfrak{H}"),I("ℨ","\\mathfrak{Z}"),I("\\Bbbk","\\Bbb{k}"),I("·","\\cdotp"),I("\\llap","\\mathllap{\\textrm{#1}}"),I("\\rlap","\\mathrlap{\\textrm{#1}}"),I("\\clap","\\mathclap{\\textrm{#1}}"),I("\\mathstrut","\\vphantom{(}"),I("\\underbar","\\underline{\\text{#1}}"),I("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),I("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),I("\\ne","\\neq"),I("≠","\\neq"),I("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),I("∉","\\notin"),I("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),I("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),I("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),I("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),I("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),I("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),I("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),I("⟂","\\perp"),I("‼","\\mathclose{!\\mkern-0.8mu!}"),I("∌","\\notni"),I("⌜","\\ulcorner"),I("⌝","\\urcorner"),I("⌞","\\llcorner"),I("⌟","\\lrcorner"),I("©","\\copyright"),I("®","\\textregistered"),I("️","\\textregistered"),I("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),I("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),I("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),I("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),I("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),I("⋮","\\vdots"),I("\\varGamma","\\mathit{\\Gamma}"),I("\\varDelta","\\mathit{\\Delta}"),I("\\varTheta","\\mathit{\\Theta}"),I("\\varLambda","\\mathit{\\Lambda}"),I("\\varXi","\\mathit{\\Xi}"),I("\\varPi","\\mathit{\\Pi}"),I("\\varSigma","\\mathit{\\Sigma}"),I("\\varUpsilon","\\mathit{\\Upsilon}"),I("\\varPhi","\\mathit{\\Phi}"),I("\\varPsi","\\mathit{\\Psi}"),I("\\varOmega","\\mathit{\\Omega}"),I("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),I("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),I("\\boxed","\\fbox{$\\displaystyle{#1}$}"),I("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),I("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),I("\\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=(I("\\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});I("\\dotso",function(e){return e.future().text in pn?"\\ldots\\,":"\\ldots"}),I("\\dotsc",function(e){e=e.future().text;return e in pn&&","!==e?"\\ldots\\,":"\\ldots"}),I("\\cdots",function(e){return e.future().text in pn?"\\@cdots\\,":"\\@cdots"}),I("\\dotsb","\\cdots"),I("\\dotsm","\\cdots"),I("\\dotsi","\\!\\cdots"),I("\\dotsx","\\ldots\\,"),I("\\DOTSI","\\relax"),I("\\DOTSB","\\relax"),I("\\DOTSX","\\relax"),I("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),I("\\,","\\tmspace+{3mu}{.1667em}"),I("\\thinspace","\\,"),I("\\>","\\mskip{4mu}"),I("\\:","\\tmspace+{4mu}{.2222em}"),I("\\medspace","\\:"),I("\\;","\\tmspace+{5mu}{.2777em}"),I("\\thickspace","\\;"),I("\\!","\\tmspace-{3mu}{.1667em}"),I("\\negthinspace","\\!"),I("\\negmedspace","\\tmspace-{4mu}{.2222em}"),I("\\negthickspace","\\tmspace-{5mu}{.277em}"),I("\\enspace","\\kern.5em "),I("\\enskip","\\hskip.5em\\relax"),I("\\quad","\\hskip1em\\relax"),I("\\qquad","\\hskip2em\\relax"),I("\\tag","\\@ifstar\\tag@literal\\tag@paren"),I("\\tag@paren","\\tag@literal{({#1})}"),I("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new _("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),I("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),I("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),I("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),I("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),I("\\newline","\\\\\\relax"),I("\\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]),I("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),I("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),I("\\hspace","\\@ifstar\\@hspacer\\@hspace"),I("\\@hspace","\\hskip #1\\relax"),I("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),I("\\ordinarycolon",":"),I("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),I("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),I("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),I("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),I("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),I("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),I("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),I("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),I("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),I("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),I("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),I("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),I("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),I("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),I("∷","\\dblcolon"),I("∹","\\eqcolon"),I("≔","\\coloneqq"),I("≕","\\eqqcolon"),I("⩴","\\Coloneqq"),I("\\ratio","\\vcentcolon"),I("\\coloncolon","\\dblcolon"),I("\\colonequals","\\coloneqq"),I("\\coloncolonequals","\\Coloneqq"),I("\\equalscolon","\\eqqcolon"),I("\\equalscoloncolon","\\Eqqcolon"),I("\\colonminus","\\coloneq"),I("\\coloncolonminus","\\Coloneq"),I("\\minuscolon","\\eqcolon"),I("\\minuscoloncolon","\\Eqcolon"),I("\\coloncolonapprox","\\Colonapprox"),I("\\coloncolonsim","\\Colonsim"),I("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),I("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),I("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),I("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),I("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),I("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),I("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),I("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),I("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),I("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),I("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),I("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),I("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),I("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),I("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),I("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),I("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),I("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),I("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),I("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),I("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),I("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),I("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),I("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),I("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),I("\\imath","\\html@mathml{\\@imath}{ı}"),I("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),I("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),I("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),I("⟦","\\llbracket"),I("⟧","\\rrbracket"),I("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),I("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),I("⦃","\\lBrace"),I("⦄","\\rBrace"),I("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),I("⦵","\\minuso"),I("\\darr","\\downarrow"),I("\\dArr","\\Downarrow"),I("\\Darr","\\Downarrow"),I("\\lang","\\langle"),I("\\rang","\\rangle"),I("\\uarr","\\uparrow"),I("\\uArr","\\Uparrow"),I("\\Uarr","\\Uparrow"),I("\\N","\\mathbb{N}"),I("\\R","\\mathbb{R}"),I("\\Z","\\mathbb{Z}"),I("\\alef","\\aleph"),I("\\alefsym","\\aleph"),I("\\Alpha","\\mathrm{A}"),I("\\Beta","\\mathrm{B}"),I("\\bull","\\bullet"),I("\\Chi","\\mathrm{X}"),I("\\clubs","\\clubsuit"),I("\\cnums","\\mathbb{C}"),I("\\Complex","\\mathbb{C}"),I("\\Dagger","\\ddagger"),I("\\diamonds","\\diamondsuit"),I("\\empty","\\emptyset"),I("\\Epsilon","\\mathrm{E}"),I("\\Eta","\\mathrm{H}"),I("\\exist","\\exists"),I("\\harr","\\leftrightarrow"),I("\\hArr","\\Leftrightarrow"),I("\\Harr","\\Leftrightarrow"),I("\\hearts","\\heartsuit"),I("\\image","\\Im"),I("\\infin","\\infty"),I("\\Iota","\\mathrm{I}"),I("\\isin","\\in"),I("\\Kappa","\\mathrm{K}"),I("\\larr","\\leftarrow"),I("\\lArr","\\Leftarrow"),I("\\Larr","\\Leftarrow"),I("\\lrarr","\\leftrightarrow"),I("\\lrArr","\\Leftrightarrow"),I("\\Lrarr","\\Leftrightarrow"),I("\\Mu","\\mathrm{M}"),I("\\natnums","\\mathbb{N}"),I("\\Nu","\\mathrm{N}"),I("\\Omicron","\\mathrm{O}"),I("\\plusmn","\\pm"),I("\\rarr","\\rightarrow"),I("\\rArr","\\Rightarrow"),I("\\Rarr","\\Rightarrow"),I("\\real","\\Re"),I("\\reals","\\mathbb{R}"),I("\\Reals","\\mathbb{R}"),I("\\Rho","\\mathrm{P}"),I("\\sdot","\\cdot"),I("\\sect","\\S"),I("\\spades","\\spadesuit"),I("\\sub","\\subset"),I("\\sube","\\subseteq"),I("\\supe","\\supseteq"),I("\\Tau","\\mathrm{T}"),I("\\thetasym","\\vartheta"),I("\\weierp","\\wp"),I("\\Zeta","\\mathrm{Z}"),I("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),I("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),I("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),I("\\bra","\\mathinner{\\langle{#1}|}"),I("\\ket","\\mathinner{|{#1}\\rangle}"),I("\\braket","\\mathinner{\\langle{#1}\\rangle}"),I("\\Bra","\\left\\langle#1\\right|"),I("\\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}};I("\\bra@ket",p(!1)),I("\\bra@set",p(!0)),I("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),I("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),I("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),I("\\angln","{\\angl n}"),I("\\blue","\\textcolor{##6495ed}{#1}"),I("\\orange","\\textcolor{##ffa500}{#1}"),I("\\pink","\\textcolor{##ff00af}{#1}"),I("\\red","\\textcolor{##df0030}{#1}"),I("\\green","\\textcolor{##28ae7b}{#1}"),I("\\gray","\\textcolor{gray}{#1}"),I("\\purple","\\textcolor{##9d38bd}{#1}"),I("\\blueA","\\textcolor{##ccfaff}{#1}"),I("\\blueB","\\textcolor{##80f6ff}{#1}"),I("\\blueC","\\textcolor{##63d9ea}{#1}"),I("\\blueD","\\textcolor{##11accd}{#1}"),I("\\blueE","\\textcolor{##0c7f99}{#1}"),I("\\tealA","\\textcolor{##94fff5}{#1}"),I("\\tealB","\\textcolor{##26edd5}{#1}"),I("\\tealC","\\textcolor{##01d1c1}{#1}"),I("\\tealD","\\textcolor{##01a995}{#1}"),I("\\tealE","\\textcolor{##208170}{#1}"),I("\\greenA","\\textcolor{##b6ffb0}{#1}"),I("\\greenB","\\textcolor{##8af281}{#1}"),I("\\greenC","\\textcolor{##74cf70}{#1}"),I("\\greenD","\\textcolor{##1fab54}{#1}"),I("\\greenE","\\textcolor{##0d923f}{#1}"),I("\\goldA","\\textcolor{##ffd0a9}{#1}"),I("\\goldB","\\textcolor{##ffbb71}{#1}"),I("\\goldC","\\textcolor{##ff9c39}{#1}"),I("\\goldD","\\textcolor{##e07d10}{#1}"),I("\\goldE","\\textcolor{##a75a05}{#1}"),I("\\redA","\\textcolor{##fca9a9}{#1}"),I("\\redB","\\textcolor{##ff8482}{#1}"),I("\\redC","\\textcolor{##f9685d}{#1}"),I("\\redD","\\textcolor{##e84d39}{#1}"),I("\\redE","\\textcolor{##bc2612}{#1}"),I("\\maroonA","\\textcolor{##ffbde0}{#1}"),I("\\maroonB","\\textcolor{##ff92c6}{#1}"),I("\\maroonC","\\textcolor{##ed5fa6}{#1}"),I("\\maroonD","\\textcolor{##ca337c}{#1}"),I("\\maroonE","\\textcolor{##9e034e}{#1}"),I("\\purpleA","\\textcolor{##ddd7ff}{#1}"),I("\\purpleB","\\textcolor{##c6b9fc}{#1}"),I("\\purpleC","\\textcolor{##aa87ff}{#1}"),I("\\purpleD","\\textcolor{##7854ab}{#1}"),I("\\purpleE","\\textcolor{##543b78}{#1}"),I("\\mintA","\\textcolor{##f5f9e8}{#1}"),I("\\mintB","\\textcolor{##edf2df}{#1}"),I("\\mintC","\\textcolor{##e0e5cc}{#1}"),I("\\grayA","\\textcolor{##f6f7f7}{#1}"),I("\\grayB","\\textcolor{##f0f1f2}{#1}"),I("\\grayC","\\textcolor{##e3e5e6}{#1}"),I("\\grayD","\\textcolor{##d6d8da}{#1}"),I("\\grayE","\\textcolor{##babec2}{#1}"),I("\\grayF","\\textcolor{##888d93}{#1}"),I("\\grayG","\\textcolor{##626569}{#1}"),I("\\grayH","\\textcolor{##3b3e40}{#1}"),I("\\grayI","\\textcolor{##21242c}{#1}"),I("\\kaBlue","\\textcolor{##314453}{#1}"),I("\\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&&0<e.length,n=(i||this.consumeSpaces(),this.future());let r,s=0,o=0;do{if(r=this.popToken(),t.push(r),"{"===r.text)++s;else if("}"===r.text){if(-1===--s)throw new _("Extra }",r)}else if("EOF"===r.text)throw new _("Unexpected end of input in a macro argument, expected '"+(e&&i?e[o]:"}")+"'",r);if(e&&i)if((0===s||1===s&&"{"===e[o])&&r.text===e[o]){if(++o===e.length){t.splice(-o,o);break}}else o=0}while(0!==s||i);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:r}}consumeArgs(t,i){if(i){if(i.length!==t+1)throw new _("The length of delimiters doesn't match the number of args!");const n=i[0];for(let e=0;e<n.length;e++){const i=this.popToken();if(n[e]!==i.text)throw new _("Use of the macro doesn't match its definition",i)}}const n=[];for(let e=0;e<t;e++)n.push(this.consumeArg(i&&i[e+1]).tokens);return n}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),bn={"́":{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"}},yn={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};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;e<t.length;e++)if("infix"===t[e].type){if(-1!==n)throw new _("only one infix operator per group",t[e].token);n=e,i=t[e].replaceWith}var e,r;return-1!==n&&i?(e=t.slice(0,n),r=t.slice(n+1),e=1===e.length&&"ordgroup"===e[0].type?e[0]:{type:"ordgroup",mode:this.mode,body:e},r=1===r.length&&"ordgroup"===r[0].type?r[0]:{type:"ordgroup",mode:this.mode,body:r},["\\\\abovefrac"===i?this.callFunction(i,[e,t[n],r],[]):this.callFunction(i,[e,r],[])]):t}handleSupSubscript(e){var t=this.fetch(),i=t.text,e=(this.consume(),this.consumeSpaces(),this.parseGroup(e));if(e)return e;throw new _("Expected group after '"+i+"'",t)}formatUnsupportedCmd(t){var i=[];for(let e=0;e<t.length;e++)i.push({type:"textord",mode:"text",text:t[e]});var e={type:"text",mode:this.mode,body:i};return{type:"color",mode:this.mode,color:this.settings.errorColor,body:[e]}}parseAtom(e){const t=this.parseGroup("atom",e);if("text"===this.mode)return t;let i,n;for(;;){this.consumeSpaces();const e=this.fetch();if("\\limits"===e.text||"\\nolimits"===e.text){if(t&&"op"===t.type){const i="\\limits"===e.text;t.limits=i,t.alwaysHandleSupSub=!0}else{if(!t||"operatorname"!==t.type)throw new _("Limit controls must follow a math operator",e);t.alwaysHandleSupSub&&(t.limits="\\limits"===e.text)}this.consume()}else if("^"===e.text){if(i)throw new _("Double superscript",e);i=this.handleSupSubscript("superscript")}else if("_"===e.text){if(n)throw new _("Double subscript",e);n=this.handleSupSubscript("subscript")}else if("'"===e.text){if(i)throw new _("Double superscript",e);const t={type:"textord",mode:this.mode,text:"\\prime"},n=[t];for(this.consume();"'"===this.fetch().text;)n.push(t),this.consume();"^"===this.fetch().text&&n.push(this.handleSupSubscript("superscript")),i={type:"ordgroup",mode:this.mode,body:n}}else{if(!vn[e.text])break;{const t=fn.test(e.text),_=[];for(_.push(new vi(vn[e.text])),this.consume();;){const e=this.fetch().text;if(!vn[e])break;if(fn.test(e)!==t)break;_.unshift(new vi(vn[e])),this.consume()}var r=this.subparse(_);t?n={type:"ordgroup",mode:"math",body:r}:i={type:"ordgroup",mode:"math",body:r}}}}return i||n?{type:"supsub",mode:this.mode,base:t,sup:i,sub:n}:t}parseFunction(e,t){var i=this.fetch(),n=i.text,r=sn[n];if(!r)return null;if(this.consume(),t&&"atom"!==t&&!r.allowedInArgument)throw new _("Got function '"+n+"' with no arguments"+(t?" as "+t:""),i);if("text"===this.mode&&!r.allowedInText)throw new _("Can't use function '"+n+"' in text mode",i);if("math"===this.mode&&!1===r.allowedInMath)throw new _("Can't use function '"+n+"' in math mode",i);var{args:t,optArgs:r}=this.parseArguments(n,r);return this.callFunction(n,t,r,i,e)}callFunction(e,t,i,n,r){var s=sn[e];if(s&&s.handler)return s.handler({funcName:e,parser:this,token:n,breakOnTokenText:r},t,i);throw new _("No function handler for "+e)}parseArguments(i,n){var e=n.numArgs+n.numOptionalArgs;if(0===e)return{args:[],optArgs:[]};var r=[],s=[];for(let t=0;t<e;t++){let e=n.argTypes&&n.argTypes[t];var o=t<n.numOptionalArgs,a=((n.primitive&&null==e||"sqrt"===n.type&&1===t&&null==s[0])&&(e="primitive"),this.parseGroupOfType("argument to '"+i+"'",e,o));if(o)s.push(a);else{if(null==a)throw new _("Null argument, please report this as a bug");r.push(a)}}return{args:r,optArgs:s}}parseGroupOfType(e,t,i){switch(t){case"color":return this.parseColorGroup(i);case"size":return this.parseSizeGroup(i);case"url":return this.parseUrlGroup(i);case"math":case"text":return this.parseArgumentGroup(i,t);case"hbox":{const e=this.parseArgumentGroup(i,"text");return null!=e?{type:"styling",mode:e.mode,body:[e],style:"text"}:null}case"raw":{const e=this.parseStringGroup("raw",i);return null!=e?{type:"raw",mode:"text",string:e.text}:null}case"primitive":{if(i)throw new _("A primitive argument cannot be optional");const t=this.parseGroup(e);if(null==t)throw new _("Expected group as "+e,this.fetch());return t}case"original":case null:case void 0:return this.parseArgumentGroup(i);default:throw new _("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;" "===this.fetch().text;)this.consume()}parseStringGroup(e,t){t=this.gullet.scanArgument(t);if(null==t)return null;let i,n="";for(;"EOF"!==(i=this.fetch()).text;)n+=i.text,this.consume();return this.consume(),t.text=n,t}parseRegexGroup(e,t){var i=this.fetch();let n,r=i,s="";for(;"EOF"!==(n=this.fetch()).text&&e.test(s+n.text);)r=n,s+=r.text,this.consume();if(""===s)throw new _("Invalid "+t+": '"+i.text+"'",i);return i.range(r,s)}parseColorGroup(e){e=this.parseStringGroup("color",e);if(null==e)return null;var t=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(e.text);if(!t)throw new _("Invalid color: '"+e.text+"'",e);let i=t[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){let t,i=!1;if(this.gullet.consumeSpaces(),!(t=e||"{"===this.gullet.future().text?this.parseStringGroup("size",e):this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size")))return null;e||0!==t.text.length||(t.text="0pt",i=!0);e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!e)throw new _("Invalid size: '"+t.text+"'",t);e={number:+(e[1]+e[2]),unit:e[3]};if(pe(e))return{type:"size",mode:this.mode,value:e,isBlank:i};throw new _("Invalid unit: '"+e.unit+"'",t)}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var e=this.parseStringGroup("url",e);return this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),null==e?null:(e=e.text.replace(/\\([#$%&~_^{}])/g,"$1"),{type:"url",mode:this.mode,url:e})}parseArgumentGroup(e,t){var i,n,e=this.gullet.scanArgument(e);return null==e?null:(i=this.mode,t&&this.switchMode(t),this.gullet.beginGroup(),n=this.parseExpression(!1,"EOF"),this.expect("EOF"),this.gullet.endGroup(),e={type:"ordgroup",mode:this.mode,loc:e.loc,body:n},t&&this.switchMode(i),e)}parseGroup(e,t){var i=this.fetch(),n=i.text;let r;if("{"===n||"\\begingroup"===n){this.consume();const e="{"===n?"}":"\\endgroup",t=(this.gullet.beginGroup(),this.parseExpression(!1,e)),_=this.fetch();this.expect(e),this.gullet.endGroup(),r={type:"ordgroup",mode:this.mode,loc:fi.range(i,_),body:t,semisimple:"\\begingroup"===n||void 0}}else if(null==(r=this.parseFunction(t,e)||this.parseSymbol())&&"\\"===n[0]&&!mn.hasOwnProperty(n)){if(this.settings.throwOnError)throw new _("Undefined control sequence: "+n,i);r=this.formatUnsupportedCmd(n),this.consume()}return r}formLigatures(t){let i=t.length-1;for(let e=0;e<i;++e){var n=t[e],r=n.text;"-"===r&&"-"===t[e+1].text&&(e+1<i&&"-"===t[e+2].text?(t.splice(e,3,{type:"textord",mode:"text",loc:fi.range(n,t[e+2]),text:"---"}),i-=2):(t.splice(e,2,{type:"textord",mode:"text",loc:fi.range(n,t[e+1]),text:"--"}),--i)),"'"!==r&&"`"!==r||t[e+1].text!==r||(t.splice(e,2,{type:"textord",mode:"text",loc:fi.range(n,t[e+1]),text:r+r}),--i)}}parseSymbol(){const t=this.fetch();let i=t.text;if(/^\\verb[^a-zA-Z]/.test(i)){this.consume();let e=i.slice(5);const n="*"===e.charAt(0);if((e=n?e.slice(1):e).length<2||e.charAt(0)!==e.slice(-1))throw new _("\\verb assertion failed --\n please report what input caused this bug");return{type:"verb",mode:"text",body:e=e.slice(1,-1),star:n}}yn.hasOwnProperty(i[0])&&!d[this.mode][i[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+i[0]+'" used in math mode',t),i=yn[i[0]]+i.slice(1));const n=on.exec(i);let r;if(n&&("i"===(i=i.substring(0,n.index))?i="ı":"j"===i&&(i="ȷ")),d[this.mode][i]){this.settings.strict&&"math"===this.mode&&0<="ÐÞþ".indexOf(i)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+i[0]+'" used in math mode',t);const n=d[this.mode][i].group,_=fi.range(t);let e;if(Te.hasOwnProperty(n)){const t=n;e={type:"atom",mode:this.mode,family:t,loc:_,text:i}}else e={type:n,mode:this.mode,loc:_,text:i};r=e}else{if(!(128<=i.charCodeAt(0)))return null;this.settings.strict&&(ee(i.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+i[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+i[0]+'" ('+i.charCodeAt(0)+")",t)),r={type:"textord",mode:"text",loc:fi.range(t),text:i}}if(this.consume(),n)for(let e=0;e<n[0].length;e++){var s=n[0][e];if(!bn[s])throw new _("Unknown accent ' "+s+"'",t);var o=bn[s][this.mode]||bn[s].text;if(!o)throw new _("Accent "+s+" unsupported in "+this.mode+" mode",t);r={type:"accent",mode:this.mode,loc:fi.range(t),label:o,isStretchy:!1,isShifty:!0,base:r}}return r}}wn.endOfExpression=["}","\\endgroup","\\end","\\right","&"];function xn(e,t){if(!("string"==typeof e||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(e=new wn(e,t)).gullet.macros.current["\\df@tag"];let i=e.parse();if(delete e.gullet.macros.current["\\current@color"],delete e.gullet.macros.current["\\color"],e.gullet.macros.get("\\df@tag")){if(!t.displayMode)throw new _("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:e.subparse([new vi("\\df@tag")])}]}return i}let An=function(e,t,i){t.textContent="";e=kn(e,i).toNode();t.appendChild(e)};"undefined"!=typeof document&&"CSS1Compat"!==document.compatMode&&("undefined"!=typeof console&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),An=function(){throw new _("KaTeX doesn't work in quirks mode.")});function Sn(e,t,i){if(!i.throwOnError&&e instanceof _)return(t=R.makeSpan(["katex-error"],[new m(t)])).setAttribute("title",e.toString()),t.setAttribute("style","color:"+i.errorColor),t;throw e}function kn(t,i){var n=new U(i);try{const i=xn(t,n);{var r=i;var s=t;var o=n;var a=xt(o);let e;if("mathml"===o.output)return wt(r,s,a,o.displayMode,!0);if("html"===o.output){const s=pt(r,a);e=R.makeSpan(["katex"],[s])}else{s=wt(r,s,a,o.displayMode,!1),r=pt(r,a);e=R.makeSpan(["katex"],[s,r])}return At(e,o);return}}catch(i){return Sn(i,t,n)}}var _n={version:"0.16.10",render:An,renderToString:function(e,t){return kn(e,t).toMarkup()},ParseError:_,SETTINGS_SCHEMA:W,__parse:function(e,t){t=new U(t);return xn(e,t)},__renderToDomTree:kn,__renderToHTMLTree:function(e,t){var i=new U(t);try{var n=xn(e,i),r=i;return n=pt(n,xt(r)),n=R.makeSpan(["katex"],[n]),At(n,r)}catch(t){return Sn(t,e,i)}},__setFontMetrics:function(e,t){ne[e]=t},__defineSymbol:i,__defineFunction:w,__defineMacro:I,__domTree:{Span:we,Anchor:xe,SymbolNode:m,SvgNode:ke,PathNode:_e,LineNode:Ce}};return t.default}),!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(c){return function(){"use strict";var i={771:function(e){e.exports=c}},n={};function r(e){var t=n[e];return void 0!==t||(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var e={};{r.d(e,{default:function(){return s}});var t=r(771),o=r.n(t);const a=/^\\begin{/,l=function(e,i){var n=function(t,e){var i;const n=[],r=new RegExp("("+e.map(e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;-1!==(i=t.search(r));){0<i&&(n.push({type:"text",data:t.slice(0,i)}),t=t.slice(i));const r=e.findIndex(e=>t.startsWith(e.left));if(-1===(i=function(e,t,i){let n=i,r=0;for(var s=e.length;n<t.length;){const i=t[n];if(r<=0&&t.slice(n,n+s)===e)return n;"\\"===i?n++:"{"===i?r++:"}"===i&&r--,n++}return-1}(e[r].right,t,e[r].left.length)))break;var s=t.slice(0,i+e[r].right.length),o=a.test(s)?s:t.slice(e[r].left.length,i);n.push({type:"math",data:o,rawData:s,display:e[r].display}),t=t.slice(i+e[r].right.length)}return""!==t&&n.push({type:"text",data:t}),n}(e,i.delimiters);if(1===n.length&&"text"===n[0].type)return null;var r=document.createDocumentFragment();for(let t=0;t<n.length;t++)if("text"===n[t].type)r.appendChild(document.createTextNode(n[t].data));else{var s=document.createElement("span");let e=n[t].data;i.displayMode=n[t].display;try{i.preProcess&&(e=i.preProcess(e)),o().render(e,s,i)}catch(e){if(!(e instanceof o().ParseError))throw e;i.errorCallback("KaTeX auto-render: Failed to parse `"+n[t].data+"` with ",e),r.appendChild(document.createTextNode(n[t].rawData));continue}r.appendChild(s)}return r},h=function(r,s){for(let n=0;n<r.childNodes.length;n++){var o=r.childNodes[n];if(3===o.nodeType){let e=o.textContent,t=o.nextSibling,i=0;for(;t&&t.nodeType===Node.TEXT_NODE;)e+=t.textContent,t=t.nextSibling,i++;const h=l(e,s);if(h){for(let e=0;e<i;e++)o.nextSibling.remove();n+=h.childNodes.length-1,r.replaceChild(h,o)}else n+=i}else if(1===o.nodeType){const r=" "+o.className+" ";-1===s.ignoredTags.indexOf(o.nodeName.toLowerCase())&&s.ignoredClasses.every(e=>-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,"<").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.prompt_number?e.prompt_number:e.execution_count,t=e.input||[e.source],i.input=new u.Input(t,i),e=(i.raw.outputs||[]).map(function(e){return new u.Output(e,i)}),i.outputs=u.coalesceStreams(e))})},{left:"$",right:"$",display:!1}]);u.Cell.prototype.renderers={markdown:function(){var e=h("div",["cell","markdown-cell"]),t=d(this.raw.source);return null!=a.renderMathInElement?(e.innerHTML=u.sanitizer(t),a.renderMathInElement(e,{delimiters:p}),e.innerHTML=u.sanitizer(u.markdown(e.innerHTML.replace(/>/g,">")))):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<n;++i)this.appendChild(t[i])}n.define("header",/^(\*+)\s+(.*)$/),n.define("preformatted",/^(\s*):(?: (.*)$|$)/),n.define("unorderedListElement",/^(\s*)(?:-|\+|\s+\*)\s+(.*)$/),n.define("orderedListElement",/^(\s*)(\d+)(?:\.|\))\s+(.*)$/),n.define("tableSeparator",/^(\s*)\|((?:\+|-)*?)\|?$/),n.define("tableRow",/^(\s*)\|(.*?)\|?$/),n.define("blank",/^$/),n.define("horizontalRule",/^(\s*)-{5,}$/),n.define("directive",/^(\s*)#\+(?:(begin|end)_)?(.*)$/i),n.define("comment",/^(\s*)#(.*)$/),n.define("line",/^(\s*)(.*)$/),r.prototype={isListElement:function(){return this.type===s.tokens.orderedListElement||this.type===s.tokens.unorderedListElement},isTableElement:function(){return this.type===s.tokens.tableSeparator||this.type===s.tokens.tableRow}},s.prototype={tokenize:function(e){var t=new r;if(t.fromLineNumber=this.stream.lineNumber,n.isHeader(e))t.type=s.tokens.header,t.indentation=0,t.content=RegExp.$2,t.level=RegExp.$1.length;else if(n.isPreformatted(e))t.type=s.tokens.preformatted,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(n.isUnorderedListElement(e))t.type=s.tokens.unorderedListElement,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(n.isOrderedListElement(e))t.type=s.tokens.orderedListElement,t.indentation=RegExp.$1.length,t.content=RegExp.$3,t.number=RegExp.$2;else if(n.isTableSeparator(e))t.type=s.tokens.tableSeparator,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(n.isTableRow(e))t.type=s.tokens.tableRow,t.indentation=RegExp.$1.length,t.content=RegExp.$2;else if(n.isBlank(e))t.type=s.tokens.blank,t.indentation=0,t.content=null;else if(n.isHorizontalRule(e))t.type=s.tokens.horizontalRule,t.indentation=RegExp.$1.length,t.content=null;else if(n.isDirective(e)){t.type=s.tokens.directive,t.indentation=RegExp.$1.length,t.content=RegExp.$3;var i=RegExp.$2;/^begin/i.test(i)?t.beginDirective=!0:/^end/i.test(i)?t.endDirective=!0:t.oneshotDirective=!0}else{if(n.isComment(e))t.type=s.tokens.comment;else{if(!n.isLine(e))throw new Error("SyntaxError: Unknown line: "+e);t.type=s.tokens.line}t.indentation=RegExp.$1.length,t.content=RegExp.$2}return t},pushToken:function(e){this.tokenStack.push(e)},pushDummyTokenByType:function(e){var t=new r;t.type=e,this.tokenStack.push(t)},peekStackedToken:function(){return 0<this.tokenStack.length?this.tokenStack[this.tokenStack.length-1]:null},getStackedToken:function(){return 0<this.tokenStack.length?this.tokenStack.pop():null},peekNextToken:function(){return this.peekStackedToken()||this.tokenize(this.stream.peekNextLine())},getNextToken:function(){return this.getStackedToken()||this.tokenize(this.stream.getNextLine())},hasNext:function(){return this.stream.hasNext()},getLineNumber:function(){return this.stream.lineNumber}},s.tokens={},["header","orderedListElement","unorderedListElement","tableRow","tableSeparator","preformatted","line","horizontalRule","blank","directive","comment"].forEach(function(e,t){s.tokens[e]=t}),void 0!==e&&(e.Lexer=s),o.prototype={previousSibling:null,parent:null,get firstChild(){return this.children.length<1?null:this.children[0]},get lastChild(){return this.children.length<1?null:this.children[this.children.length-1]},appendChild:function(e){var t=this.children.length<1?null:this.lastChild;this.children.push(e),e.previousSibling=t,e.parent=this},toString:function(){var e="<"+this.type+">";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.lineNumber<this.totalLines},void 0!==e&&(e.Stream=a),l.parseStream=function(e,t){var i=new l;return i.initStatus(e,t),i.parseNodes(),i.nodes},(l.prototype={initStatus:function(e,t){if("string"==typeof e&&(e=new a(e)),this.lexer=new s(e),this.nodes=[],this.options={toc:!0,num:!0,"^":"{}",multilineCell:!1},t&&"object"==typeof t)for(var i in t)this.options[i]=t[i];this.document={options:this.options,convert:function(e,t){return new e(this,t).result}}},parse:function(e,t){return this.initStatus(e,t),this.parseDocument(),this.document.nodes=this.nodes,this.document},createErrorReport:function(e){return new Error(e+" at line "+this.lexer.getLineNumber())},skipBlank:function(){for(var e=null;this.lexer.peekNextToken().type===s.tokens.blank;)e=this.lexer.getNextToken();return e},setNodeOriginFromToken:function(e,t){return e.fromLineNumber=t.fromLineNumber,e},appendNode:function(e){var t=0<this.nodes.length?this.nodes[this.nodes.length-1]:null;this.nodes.push(e),e.previousSibling=t},parseDocument:function(){this.parseTitle(),this.parseNodes()},parseNodes:function(){for(;this.lexer.hasNext();){var e=this.parseElement();e&&this.appendNode(e)}},parseTitle:function(){this.skipBlank(),this.lexer.hasNext()&&this.lexer.peekNextToken().type===s.tokens.line?this.document.title=this.createTextNode(this.lexer.getNextToken().content):this.document.title=null,this.lexer.pushDummyTokenByType(s.tokens.blank)},parseElement:function(){var e=null;switch(this.lexer.peekNextToken().type){case s.tokens.header:e=this.parseHeader();break;case s.tokens.preformatted:e=this.parsePreformatted();break;case s.tokens.orderedListElement:case s.tokens.unorderedListElement:e=this.parseList();break;case s.tokens.line:e=this.parseText();break;case s.tokens.tableRow:case s.tokens.tableSeparator:e=this.parseTable();break;case s.tokens.blank:this.skipBlank(),this.lexer.hasNext()&&(e=this.lexer.peekNextToken().type===s.tokens.line?this.parseParagraph():this.parseElement());break;case s.tokens.horizontalRule:this.lexer.getNextToken(),e=u.createHorizontalRule();break;case s.tokens.directive:e=this.parseDirective();break;case s.tokens.comment:this.lexer.getNextToken();break;default:throw this.createErrorReport("Unhandled token: "+this.lexer.peekNextToken().type)}return e},parseElementBesidesDirectiveEnd:function(){try{return this.parseElement=this.parseElementBesidesDirectiveEndBody,this.parseElement()}finally{this.parseElement=this.originalParseElement}},parseElementBesidesDirectiveEndBody:function(){return this.lexer.peekNextToken().type===s.tokens.directive&&this.lexer.peekNextToken().endDirective?null:this.originalParseElement()},parseHeader:function(){var e=this.lexer.getNextToken(),t=u.createHeader([this.createTextNode(e.content)],{level:e.level});return this.setNodeOriginFromToken(t,e),t},parsePreformatted:function(){for(var e=this.lexer.peekNextToken(),t=u.createPreformatted([]),i=(this.setNodeOriginFromToken(t,e),[]);this.lexer.hasNext();){var n=this.lexer.peekNextToken();if(n.type!==s.tokens.preformatted||n.indentation<e.indentation)break;this.lexer.getNextToken(),i.push(n.content)}return t.appendChild(this.createTextNode(i.join("\n"),!0)),t},definitionPattern:/^(.*?) :: *(.*)$/,parseList:function(){var e,t=this.lexer.peekNextToken(),i=!1;for(this.definitionPattern.test(t.content)?(e=u.createDefinitionList([]),i=!0):e=t.type===s.tokens.unorderedListElement?u.createUnorderedList([]):u.createOrderedList([]),this.setNodeOriginFromToken(e,t);this.lexer.hasNext();){var n=this.lexer.peekNextToken();if(!n.isListElement()||n.indentation!==t.indentation)break;e.appendChild(this.parseListElement(t.indentation,i))}return e},unknownDefinitionTerm:"???",parseListElement:function(e,t){var i=this.lexer.getNextToken(),n=u.createListElement([]);for(this.setNodeOriginFromToken(n,i),(n.isDefinitionList=t)?(t=this.definitionPattern.exec(i.content),n.term=[this.createTextNode(t&&t[1]?t[1]:this.unknownDefinitionTerm)],n.appendChild(this.createTextNode(t?t[2]:i.content))):n.appendChild(this.createTextNode(i.content));this.lexer.hasNext();){var r=this.skipBlank();if(!this.lexer.hasNext())break;var s=this.lexer.peekNextToken();if(r&&!s.isListElement()&&this.lexer.pushToken(r),s.indentation<=e)break;r=this.parseElement();r&&n.appendChild(r)}return n},parseTable:function(){for(var e,t=this.lexer.peekNextToken(),i=u.createTable([]),n=(this.setNodeOriginFromToken(i,t),!1),r=t.type===s.tokens.tableSeparator&&this.options.multilineCell;this.lexer.hasNext()&&(t=this.lexer.peekNextToken()).isTableElement();)t.type===s.tokens.tableRow?(e=this.parseTableRow(r),i.appendChild(e)):(n=!0,this.lexer.getNextToken());return n&&i.children.length&&i.children[0].children.forEach(function(e){e.isHeader=!0}),i},parseTableRow:function(e){for(var t,i,n,r=[];this.lexer.peekNextToken().type===s.tokens.tableRow&&(r.push(this.lexer.getNextToken()),e););if(r.length)return t=r.shift(),i=t.content.split("|"),r.forEach(function(e){e.content.split("|").forEach(function(e,t){i[t]=(i[t]||"")+"\n"+e})}),n=i.map(function(e){return u.createTableCell(l.parseStream(e))},this),this.setNodeOriginFromToken(u.createTableRow(n),t);throw this.createErrorReport("Expected table row")},parseDirective:function(){var e=this.lexer.getNextToken(),t=this.createDirectiveNodeFromToken(e);if(e.endDirective)throw this.createErrorReport("Unmatched 'end' directive for "+t.directiveName);if(e.oneshotDirective)return this.interpretDirective(t),t;if(e.beginDirective)return t.children=[],this.isVerbatimDirective(t)?this.parseDirectiveBlockVerbatim(t):this.parseDirectiveBlock(t);throw this.createErrorReport("Invalid directive "+t.directiveName)},createDirectiveNodeFromToken:function(e){var t=/^[ ]*([^ ]*)[ ]*(.*)[ ]*$/.exec(e.content),i=u.createDirective(null);return this.setNodeOriginFromToken(i,e),i.directiveName=t[1].toLowerCase(),i.directiveArguments=this.parseDirectiveArguments(t[2]),i.directiveOptions=this.parseDirectiveOptions(t[2]),i.directiveRawValue=t[2],i},isVerbatimDirective:function(e){e=e.directiveName;return"src"===e||"example"===e},parseDirectiveBlock:function(e,t){for(this.lexer.pushDummyTokenByType(s.tokens.blank);this.lexer.hasNext();){var i=this.lexer.peekNextToken();if(i.type===s.tokens.directive&&i.endDirective&&this.createDirectiveNodeFromToken(i).directiveName===e.directiveName)return this.lexer.getNextToken(),e;i=this.parseElementBesidesDirectiveEnd();i&&e.appendChild(i)}throw this.createErrorReport("Unclosed directive "+e.directiveName)},parseDirectiveBlockVerbatim:function(e){for(var t=[];this.lexer.hasNext();){var i=this.lexer.peekNextToken();if(i.type===s.tokens.directive&&i.endDirective&&this.createDirectiveNodeFromToken(i).directiveName===e.directiveName)return this.lexer.getNextToken(),e.appendChild(this.createTextNode(t.join("\n"),!0)),e;t.push(this.lexer.stream.getNextLine())}throw this.createErrorReport("Unclosed directive "+e.directiveName)},parseDirectiveArguments:function(e){return e.split(/[ ]+/).filter(function(e){return e.length&&"-"!==e[0]})},parseDirectiveOptions:function(e){return e.split(/[ ]+/).filter(function(e){return e.length&&"-"===e[0]})},interpretDirective:function(e){switch(e.directiveName){case"options:":this.interpretOptionDirective(e);break;case"title:":this.document.title=e.directiveRawValue;break;case"author:":this.document.author=e.directiveRawValue;break;case"email:":this.document.email=e.directiveRawValue}},interpretOptionDirective:function(e){e.directiveArguments.forEach(function(e){e=e.split(":");this.options[e[0]]=this.convertLispyValue(e[1])},this)},convertLispyValue:function(e){switch(e){case"t":return!0;case"nil":return!1;default:return/^[0-9]+$/.test(e)?parseInt(e):e}},parseParagraph:function(){for(var e=this.lexer.peekNextToken(),t=u.createParagraph([]),i=(this.setNodeOriginFromToken(t,e),[]);this.lexer.hasNext();){var n=this.lexer.peekNextToken();if(n.type!==s.tokens.line||n.indentation<e.indentation)break;this.lexer.getNextToken(),i.push(n.content)}return t.appendChild(this.createTextNode(i.join("\n"))),t},parseText:function(e){var t=this.lexer.getNextToken();return this.createTextNode(t.content,e)},createTextNode:function(e,t){return t?u.createText(null,{value:e}):this.inlineParser.parseEmphasis(e)}}).originalParseElement=l.prototype.parseElement,t.prototype={parseEmphasis:function(e){for(var t=this.emphasisPattern,i=[],n=t.lastIndex=0;l=t.exec(e);){var r=l[0],s=l[1],o=l[2],a=l[3],l=l[4],r=t.lastIndex-r.length,r=e.substring(n,r+s.length),s=t.lastIndex,r=(i.push(this.parseLink(r)),t.lastIndex=s,[u.createText(null,{value:a})]),s=this.emphasizeElementByMarker(r,o);i.push(s),n=t.lastIndex-l.length}return 0!==t.lastIndex&&t.lastIndex===e.length-1||i.push(this.parseLink(e.substring(n))),1===i.length?i[0]:u.createInlineContainer(i)},depth:0,parseLink:function(e){for(var t,i=this.linkPattern,n=[],r=i.lastIndex=0;a=i.exec(e);){var s=a[0],o=a[1],a=a[2],s=i.lastIndex-s.length,s=e.substring(r,s),s=(n.push(u.createText(null,{value:s})),u.createLink([]));s.src=o,a?(t=i.lastIndex,s.appendChild(this.parseEmphasis(a)),i.lastIndex=t):s.appendChild(u.createText(null,{value:o})),n.push(s),r=i.lastIndex}return 0!==i.lastIndex&&i.lastIndex===e.length-1||n.push(u.createText(null,{value:e.substring(r)})),u.createInlineContainer(n)},emphasizeElementByMarker:function(e,t){switch(t){case"*":return u.createBold(e);case"/":return u.createItalic(e);case"_":return u.createUnderline(e);case"=":case"~":return u.createCode(e);case"+":return u.createDashed(e)}},buildEmphasisPattern:function(){return new RegExp("(["+this.preEmphasis+"]|^|\r?\n)(["+this.markers+"])([^"+this.borderForbidden+"]|[^"+this.borderForbidden+"]"+this.bodyRegexp+"[^"+this.borderForbidden+"])\\2(["+this.postEmphasis+"]|$|\r?\n)","g")}},void 0!==e&&(e.Parser=l,e.InlineParser=t),i.prototype={exportOptions:{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!1,suppressAutoLink:!1},untitled:"Untitled",result:null,initialize:function(e,t){this.orgDocument=e,this.documentOptions=e.options||{},this.exportOptions=t||{},this.headers=[],this.headerOffset="number"==typeof this.exportOptions.headerOffset?this.exportOptions.headerOffset:1,this.sectionNumbers=[0]},createTocItem:function(e,t){var i=[];return i.parent=t,{headerNode:e,childTocs:i}},computeToc:function(e){"number"!=typeof e&&(e=1/0);for(var t=[],i=(t.parent=null,1),n=t,r=0;r<this.headers.length;++r){var s=this.headers[r];if(!(s.level>e)){if(0<(l=s.level-i))for(var o,a=0;a<l;++a)0===n.length&&((o=u.createHeader([],{level:i+a})).sectionNumberText="",n.push(this.createTocItem(o,n))),n=n[n.length-1].childTocs;else if(l<0)for(var l=-l,h=0;h<l;++h)n=n.parent;n.push(this.createTocItem(s,n)),i=s.level}}return t},convertNode:function(e,t,i){i||(e.type===u.types.directive?"example"!==e.directiveName&&"src"!==e.directiveName||(i=!0):e.type===u.types.preformatted&&(i=!0));var n,r=(e="string"==typeof e?u.createText(null,{value:e}):e).children?this.convertNodes(e.children,t,i):"",s=this.computeAuxDataForNode(e);switch(e.type){case u.types.header:var o=null,a=(0===r.indexOf("TODO ")?o="todo":0===r.indexOf("DONE ")&&(o="done"),null);if(t){var l=e.level,h=this.sectionNumbers.length;if(h<l)for(var c=l-h,d=0;d<c;++d)this.sectionNumbers[l-1-d]=0;else l<h&&(this.sectionNumbers.length=l);this.sectionNumbers[l-1]++,a=this.sectionNumbers.join("."),e.sectionNumberText=a}n=this.convertHeader(e,r,s,o,a),t&&this.headers.push(e);break;case u.types.orderedList:n=this.convertOrderedList(e,r,s);break;case u.types.unorderedList:n=this.convertUnorderedList(e,r,s);break;case u.types.definitionList:n=this.convertDefinitionList(e,r,s);break;case u.types.listElement:n=e.isDefinitionList?(h=this.convertNodes(e.term,t,i),this.convertDefinitionItem(e,r,s,h,r)):this.convertListItem(e,r,s);break;case u.types.paragraph:n=this.convertParagraph(e,r,s);break;case u.types.preformatted:n=this.convertPreformatted(e,r,s);break;case u.types.table:n=this.convertTable(e,r,s);break;case u.types.tableRow:n=this.convertTableRow(e,r,s);break;case u.types.tableCell:n=e.isHeader?this.convertTableHeader(e,r,s):this.convertTableCell(e,r,s);break;case u.types.horizontalRule:n=this.convertHorizontalRule(e,r,s);break;case u.types.inlineContainer:n=this.convertInlineContainer(e,r,s);break;case u.types.bold:n=this.convertBold(e,r,s);break;case u.types.italic:n=this.convertItalic(e,r,s);break;case u.types.underline:n=this.convertUnderline(e,r,s);break;case u.types.code:n=this.convertCode(e,r,s);break;case u.types.dashed:n=this.convertDashed(e,r,s);break;case u.types.link:n=this.convertLink(e,r,s);break;case u.types.directive:switch(e.directiveName){case"quote":n=this.convertQuote(e,r,s);break;case"example":n=this.convertExample(e,r,s);break;case"src":n=this.convertSrc(e,r,s);break;default:n=r}break;case u.types.text:n=this.convertText(e.value,i);break;default:throw"Unknown node type: "+e.type}return n="function"==typeof this.postProcess?this.postProcess(e,n,i):n},convertText:function(e,t){e=this.escapeSpecialChars(e,t);return this.exportOptions.suppressSubScriptHandling||t||(e=this.makeSubscripts(e,t)),e=this.exportOptions.suppressAutoLink?e:this.linkURL(e)},convertNodes:function(e,t,i){return e.map(function(e){return this.convertNode(e,t,i)},this).join("")},getNodeTextContent:function(e){return e.type===u.types.text?this.escapeSpecialChars(e.value):e.children?e.children.map(this.getNodeTextContent,this).join(""):""},escapeSpecialChars:function(e){throw"Implement escapeSpecialChars"},urlPattern:/\b(?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\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<e.length;++i){var n=e[i],r=n.headerNode.sectionNumberText,s=this.documentOptions.num?this.inlineTag("span",r,{class:"section-number"}):"",o=this.getNodeTextContent(n.headerNode),s=this.inlineTag("a",s+o,{href:"#header-"+r.replace(/\./g,"-")}),o=n.childTocs.length?a.call(this,n.childTocs):"";t+=this.tag("li",s+o)}return this.tag("ul",t)}return a.call(this,e)},computeAuxDataForNode:function(e){for(;e.parent&&e.parent.type===u.types.inlineContainer;)e=e.parent;for(var t=e.previousSibling,i="";t&&t.type===u.types.directive&&"attr_html:"===t.directiveName;)i+=t.directiveRawValue+" ",t=t.previousSibling;return i},convertHeader:function(e,t,i,n,r){var s={};return n&&(t=this.inlineTag("span",t.substring(0,4),{class:"task-status "+n})+t.substring(5)),r&&(t=this.inlineTag("span",r,{class:"section-number"})+t,s.id="header-"+r.replace(/\./g,"-")),n&&(s.class="task-status "+n),this.tag("h"+(this.headerOffset+e.level),t,s,i)},convertOrderedList:function(e,t,i){return this.tag("ol",t,null,i)},convertUnorderedList:function(e,t,i){return this.tag("ul",t,null,i)},convertDefinitionList:function(e,t,i){return this.tag("dl",t,null,i)},convertDefinitionItem:function(e,t,i,n,r){return this.tag("dt",n)+this.tag("dd",r)},convertListItem:function(e,t,i){if(this.exportOptions.suppressCheckboxHandling)return this.tag("li",t,null,i);var n={};if(/^\s*\[(X| |-)\]([\s\S]*)/.exec(t)){var t=RegExp.$2,r={type:"checkbox"};switch(RegExp.$1){case"X":r.checked="true",n["data-checkbox-status"]="done";break;case"-":n["data-checkbox-status"]="intermediate";break;default:n["data-checkbox-status"]="undone"}t=this.inlineTag("input",null,r)+t}return this.tag("li",t,n,i)},convertParagraph:function(e,t,i){return this.tag("p",t,null,i)},convertPreformatted:function(e,t,i){return this.tag("pre",t,null,i)},convertTable:function(e,t,i){return this.tag("table",this.tag("tbody",t),null,i)},convertTableRow:function(e,t,i){return this.tag("tr",t)},convertTableHeader:function(e,t,i){return this.tag("th",t)},convertTableCell:function(e,t,i){return this.tag("td",t)},convertHorizontalRule:function(e,t,i){return this.tag("hr",null,null,i)},convertInlineContainer:function(e,t,i){return t},convertBold:function(e,t,i){return this.inlineTag("b",t)},convertItalic:function(e,t,i){return this.inlineTag("i",t)},convertUnderline:function(e,t,i){return this.inlineTag("span",t,{style:"text-decoration:underline;"})},convertCode:function(e,t,i){return this.inlineTag("code",t)},convertDashed:function(e,t,i){return this.inlineTag("del",t)},convertLink:function(e,t,i){var n;return this.imageExtensionPattern.exec(e.src)?(n=this.getNodeTextContent(e),this.inlineTag("img",null,{src:e.src,alt:n,title:n},i)):this.inlineTag("a",t,{href:e.src})},convertQuote:function(e,t,i){return this.tag("blockquote",t,null,i)},convertExample:function(e,t,i){return this.tag("pre",t,null,i)},convertSrc:function(e,t,i){e=e.directiveArguments.length?e.directiveArguments[0]:"unknown";return t=this.tag("code",t,{class:"language-"+e},i),this.tag("pre",t,{class:"prettyprint"})},replaceMap:{"&":["&",null],"<":["<",null],">":[">",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'<a href="'+e+'">'+decodeURIComponent(e)+"</a>"},makeSubscript:function(e,t,i){return'<span class="org-subscript-parent">'+t+'</span><span class="org-subscript-child">'+i+"</span>"},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+"</"+e+">"},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<o;++s){var a=l(e,t[s]);if(null==a&&h.original)return;r.push(a)}return i&&i.apply(null,r)||!0}}),h=function(e,t){var i=s("",e,t);return null==i&&h.original?h.original.apply(this,arguments):i},o=function(e,t){var i;if(-1!==t.indexOf("!"))return i=t.split("!"),o(e,i[0])+"!"+o(e,i[1]);if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t};t=i,(e="ace")&&(i[e]||(i[e]={}),t=i[e]),t.define&&t.define.packaged||(r.original=t.define,t.define=r,t.define.packaged=!0),t.require&&t.require.packaged||(h.original=t.require,t.require=h,t.require.packaged=!0)})(),ace.define("ace/lib/fixoldbrowsers",["require","exports","module"],function(e,t,i){"use strict";"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},r=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),s=n.userAgent||"",n=n.appName||"";t.isWin="win"==r,t.isMac="mac"==r,t.isLinux="linux"==r,t.isIE="Microsoft Internet Explorer"==n||0<=n.indexOf("MSAppHost")?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=s.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,t.isAIR=0<=s.indexOf("AdobeAIR"),t.isAndroid=0<=s.indexOf("Android"),t.isChromeOS=0<=s.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,s,t){"use strict";var i,e=e("./useragent");s.buildDom=function e(t,i,n){if("string"==typeof t&&t)return h=document.createTextNode(t),i&&i.appendChild(h),h;if(!Array.isArray(t))return t&&t.appendChild&&i&&i.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s<t.length;s++){var o=e(t[s],i,n);o&&r.push(o)}return r}for(var a=document.createElement(t[0]),l=t[1],h=1,s=h=l&&"object"==typeof l&&!Array.isArray(l)?2:h;s<t.length;s++)e(t[s],a,n);return 2==h&&Object.keys(l).forEach(function(e){var t=l[e];"class"===e?a.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?a[e]=t:"ref"===e?n&&(n[t]=a):null!=t&&a.setAttribute(e,t)}),i&&i.appendChild(a),a},s.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},s.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},s.removeChildren=function(e){e.innerHTML=""},s.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},s.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},s.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},s.addCssClass=function(e,t){s.hasCssClass(e,t)||(e.className+=" "+t)},s.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},s.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var r=i.indexOf(t);if(-1==r)break;n=!1,i.splice(r,1)}return n&&i.push(t),e.className=i.join(" "),n},s.setCssClass=function(e,t,i){i?s.addCssClass(e,t):s.removeCssClass(e,t)},s.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},s.importCssString=function(e,t,i){var n=i,i=(n=i&&i.getRootNode&&(n=i.getRootNode())&&n!=i?n:document).ownerDocument||n;if(t&&s.hasCssString(t,n))return null;t&&(e+="\n/*# sourceURL=ace/css/"+t+" */");var r=s.createElement("style");r.appendChild(i.createTextNode(e)),t&&(r.id=t),(n=n==i?s.getDocumentHead(i):n).insertBefore(r,n.firstChild)},s.importCssStylsheet=function(e,t){s.buildDom(["link",{rel:"stylesheet",href:e}],s.getDocumentHead(t))},s.scrollbarWidth=function(e){var t=s.createElement("ace_inner"),i=(t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block",s.createElement("ace_outer")),n=i.style,e=(n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",i.appendChild(t),e.documentElement),r=(e.appendChild(i),t.offsetWidth),n=(n.overflow="scroll",t.offsetWidth);return r==n&&(n=i.clientWidth),e.removeChild(i),r-n},"undefined"==typeof document&&(s.importCssString=function(){}),s.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},s.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},s.HAS_CSS_ANIMATION=!1,s.HAS_CSS_TRANSFORMS=!1,s.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,"undefined"!=typeof document&&(i=document.createElement("div"),s.HI_DPI&&void 0!==i.style.transform&&(s.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===i.style.animationName||(s.HAS_CSS_ANIMATION=!0),i=null),s.HAS_CSS_TRANSFORMS?s.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:s.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,i,t){"use strict";i.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},i.mixin=function(e,t){for(var i in t)e[i]=t[i];return e},i.implement=function(e,t){i.mixin(e,t)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,i){"use strict";var s=e("./oop"),n=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);s.mixin(i,i.MODIFIER_KEYS),s.mixin(i,i.PRINTABLE_KEYS),s.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-";for(var n=["cmd","ctrl","alt","shift"],r=Math.pow(2,n.length);r--;)i.KEY_MODS[r]=n.filter(function(e){return r&i.KEY_MODS[e]}).join("-")+"-";return i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();s.mixin(t,n),t.keyCodeToString=function(e){var t=n[e];return(t="string"!=typeof t?String.fromCharCode(e):t).toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,d,t){"use strict";function r(){if(null==i){i=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){i={passive:!1}}})}catch(e){}}return i}function s(e,t,i){this.elem=e,this.type=t,this.callback=i}function o(e,t,i){var n=l(t);if(!u.isMac&&p){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),p.altGr){if(3==(3&n))return;p.altGr=0}18!==i&&17!==i||(r="location"in t?t.location:t.keyLocation,17===i&&1===r?1==p[i]&&(m=t.timeStamp):18===i&&3===n&&2===r&&t.timeStamp-m<50&&(p.altGr=!0))}if(i in c.MODIFIER_KEYS&&(i=-1),!n&&13===i){var r="location"in t?t.location:t.keyLocation;if(3===r&&(e(t,n,-i),t.defaultPrevented))return}if(u.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in c.FUNCTION_KEYS||i in c.PRINTABLE_KEYS)&&e(t,n,i)}function a(){p=Object.create(null)}function l(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}var i,h,c=e("./keys"),u=e("./useragent"),p=null,m=0,g=(s.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0},d.addListener=function(e,t,i,n){e.addEventListener(t,i,r()),n&&n.$toDestroy.push(new s(e,t,i))}),f=d.removeListener=function(e,t,i){e.removeEventListener(t,i,r())};d.stopEvent=function(e){return d.stopPropagation(e),d.preventDefault(e),!1},d.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},d.preventDefault=function(e){e.preventDefault&&e.preventDefault()},d.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||u.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},d.capture=function(e,t,i){function n(e){t&&t(e),i&&i(e),f(r,"mousemove",t),f(r,"mouseup",n),f(r,"dragstart",n)}var r=e&&e.ownerDocument||document;return g(r,"mousemove",t),g(r,"mouseup",n),g(r,"dragstart",n),n},d.addMouseWheelListener=function(e,t,i){"onmousewheel"in e?g(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),t(e)},i):"onwheel"in e?g(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}t(e)},i):g(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),t(e)},i)},d.addMultiMouseDownListener=function(e,i,n,r,t){function s(e){var t;if(0!==d.getButton(e)?h=0:1<e.detail&&!(4<++h)||(h=1),u.isIE&&(t=5<Math.abs(e.clientX-o)||5<Math.abs(e.clientY-a),l&&!t||(h=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),1==h)&&(o=e.clientX,a=e.clientY),e._clicks=h,n[r]("mousedown",e),4<h)h=0;else if(1<h)return n[r](c[h],e)}var o,a,l,h=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};(e=Array.isArray(e)?e:[e]).forEach(function(e){g(e,"mousedown",s,t)})};d.getModifierString=function(e){return c.KEY_MODS[l(e)]},d.addCommandKeyListener=function(e,i,t){var n,r;u.isOldGecko||u.isOpera&&!("KeyboardEvent"in window)?(n=null,g(e,"keydown",function(e){n=e.keyCode},t),g(e,"keypress",function(e){return o(i,e,n)},t)):(r=null,g(e,"keydown",function(e){p[e.keyCode]=(p[e.keyCode]||0)+1;var t=o(i,e,e.keyCode);return r=e.defaultPrevented,t},t),g(e,"keypress",function(e){r&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(d.stopEvent(e),r=null)},t),g(e,"keyup",function(e){p[e.keyCode]=null},t),p||(a(),g(window,"focus",a)))},"object"==typeof window&&window.postMessage&&!u.isOldIE&&(h=1,d.nextTick=function(t,i){i=i||window;function n(e){e.data==r&&(d.stopPropagation(e),f(i,"message",n),t())}var r="zero-timeout-message-"+h++;g(i,"message",n),i.postMessage(r,"*")}),d.$idleBlocked=!1,d.onIdle=function(t,e){return setTimeout(function e(){d.$idleBlocked?setTimeout(e,100):t()},e)},d.$idleBlockId=null,d.blockIdle=function(e){d.$idleBlockId&&clearTimeout(d.$idleBlockId),d.$idleBlocked=!0,d.$idleBlockId=setTimeout(function(){d.$idleBlocked=!1},e||100)},d.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),d.nextFrame?d.nextFrame=d.nextFrame.bind(window):d.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/range",["require","exports","module"],function(e,t,i){"use strict";function s(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}}(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+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?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:t<this.start.column?-1:t>this.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.row<e&&(i={row:e,column:0}),this.start.row>t?n={row:t+1,column:0}:this.start.row<e&&(n={row:e,column:0}),s.fromPoints(n||this.start,i||this.end)},this.extend=function(e,t){var i,n,r=this.compare(e,t);return 0==r?this:(-1==r?i={row:e,column:t}:n={row:e,column:t},s.fromPoints(i||this.start,n||this.end))},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return s.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new s(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new s(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),e=e.documentToScreenPosition(this.end);return new s(t.row,t.column,e.row,e.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(s.prototype),s.fromPoints=function(e,t){return new s(e.row,e.column,t.row,t.column)},s.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},s.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=s}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,i){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var i="";0<t;)1&t&&(i+=e),(t>>=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;i<n;i++)e[i]&&"object"==typeof e[i]?t[i]=this.copyObject(e[i]):t[i]=e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t))for(var i=[],n=0;n<t.length;n++)i[n]=e(t[n]);else{if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n])}return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t,i=Object.create(null);for(t in e)i[t]=e[t];return i},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,function(e){i.push({offset:arguments[arguments.length-2],length:e.length})}),i},t.deferredCall=function(e){function t(){n=null,e()}function i(e){return i.cancel(),n=setTimeout(t,e||0),i}var n=null;return(i.schedule=i).call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(n),n=null,i},i.isPending=function(){return n},i},t.delayedCall=function(e,t){function i(){r=null,e()}function n(e){null==r&&(r=setTimeout(i,e||t))}var r=null;return n.delay=function(e){r&&clearTimeout(r),r=setTimeout(i,e||t)},(n.schedule=n).call=function(){this.cancel(),e()},n.cancel=function(){r&&clearTimeout(r),r=null},n.isPending=function(){return r},n}}),ace.define("ace/clipboard",["require","exports","module"],function(e,t,i){"use strict";var n;i.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.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"),W=e("../clipboard"),U=B.isChrome<18,V=B.isIE,j=63<B.isChrome,q=e("../lib/keys"),G=q.KEY_MODS,K=B.isIOS,X=K?/\s/:/\n/,Y=B.isMobile;t.TextInput=function(e,d){function t(){i=!0,u.blur(),u.focus(),i=!1}function a(){clearTimeout(L),L=setTimeout(function(){l&&(u.style.cssText=l,l=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor()},0)}var u=z.createElement("textarea"),s=(u.className="ace_text-input",u.setAttribute("wrap","off"),u.setAttribute("autocorrect","off"),u.setAttribute("autocapitalize","off"),u.setAttribute("spellcheck",!1),u.style.opacity="0",e.insertBefore(u,e.firstChild),!1),p=!1,o=!1,m=!1,l="",g=(Y||(u.style.fontSize="1px"),!1),i=!1,f="",v=0,b=0,y=0;try{var h=document.activeElement===u}catch(e){}N.addListener(u,"blur",function(e){i||(d.onBlur(e),h=!1)},d),N.addListener(u,"focus",function(e){if(!i){if(h=!0,B.isEdge)try{if(!document.hasFocus())return}catch(e){}d.onFocus(e),B.isEdge?setTimeout(w):w()}},d),this.$focusScroll=!1,this.focus=function(){if(l||j||"browser"==this.$focusScroll)return u.focus({preventScroll:!0});var e=u.style.top;u.style.position="fixed",u.style.top="0px";try{var t=0!=u.getBoundingClientRect().top}catch(e){return}var i=[];if(t)for(var n=u.parentElement;n&&1==n.nodeType;)i.push(n),n.setAttribute("ace_nocontext",!0),n=!n.parentElement&&n.getRootNode?n.getRootNode().host:n.parentElement;u.focus({preventScroll:!0}),t&&i.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){u.style.position="","0px"==u.style.top&&(u.style.top=e)},0)},this.blur=function(){u.blur()},this.isFocused=function(){return h},d.on("beforeEndOperation",function(){var e=d.curOp,t=e&&e.command&&e.command.name;"insertstring"!=t&&(t=t&&(e.docChanged||e.selectionChanged),o&&t&&(f=u.value="",T()),w())});function n(e){C(e,!0)}function r(e){C(e,!1)}function c(e){var t=_(e);W.pasteCancelled()||("string"==typeof t?(t&&d.onPaste(t,e),B.isIE&&setTimeout(w),N.preventDefault(e)):(u.value="",p=!0))}var w=K?function(e){var t;!h||s&&!e||m||((t="\n ab"+(e=e||"")+"cde fg\n")!=u.value&&(u.value=f=t),t=4+(e.length||(d.selection.isEmpty()?0:1)),4==v&&b==t||u.setSelectionRange(4,t),v=4,b=t)}:function(){if(!o&&!m&&(h||A)){o=!0;var e,t,i=0,n=0,r="",s=(d.session&&(s=(e=d.selection).getRange(),e=e.cursor.row,i=s.start.column,n=s.end.column,r=d.session.getLine(e),s.start.row!=e?(t=d.session.getLine(e-1),i=s.start.row<e-1?0:i,n+=t.length+1,r=t+"\n"+r):s.end.row!=e?(t=d.session.getLine(e+1),n=s.end.row>e+1?t.length:n,n+=r.length+1,r=r+"\n"+t):Y&&0<e&&(r="\n"+r,n+=1,i+=1),400<r.length)&&(i<400&&n<400?r=r.slice(0,400):(r="\n",i==n?i=n=0:(i=0,n=1))),r+"\n\n");if(s!=f&&(u.value=f=s,v=b=s.length),A&&(v=u.selectionStart,b=u.selectionEnd),b!=n||v!=i||u.selectionEnd!=b)try{u.setSelectionRange(i,n),v=i,b=n}catch(e){}o=!1}},O=(this.resetSelection=w,h&&d.onFocus(),function(e){return 0===e.selectionStart&&e.selectionEnd>=f.length&&e.value===f&&f&&e.selectionEnd!==b}),x=null,A=(this.setInputHandler=function(e){x=e},!(this.getInputHandler=function(){return x})),S=function(e,t){if(A=A&&!1,p)return w(),e&&d.onPaste(e),p=!1,"";for(var i=u.selectionStart,n=u.selectionEnd,r=v,s=f.length-b,o=e,a=e.length-i,l=e.length-n,h=0;0<r&&f[h]==e[h];)h++,r--;for(o=o.slice(h),h=1;0<s&&f.length-h>v-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,b=n,y=l,c?"\n":o):""},k=function(e){if(o)return E();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=S(e,!0);(500<e.length||X.test(t)||Y&&v<1&&v==b)&&w()},_=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!U){var r=V||i?"Text":"text/plain";try{return t?!1!==n.setData(r,t):n.getData(r)}catch(e){if(!i)return _(e,t,!0)}}},C=function(e,t){var i=d.getCopyText();if(!i)return N.preventDefault(e);_(e,i)?(K&&(w(i),s=i,setTimeout(function(){s=!1},10)),t?d.onCut():d.onCopy(),N.preventDefault(e)):(s=!0,u.value=i,u.select(),setTimeout(function(){s=!1,w(),t?d.onCut():d.onCopy()}))},E=(N.addCommandKeyListener(u,d.onCommandKey.bind(d),d),N.addListener(u,"select",function(e){o||(s?s=!1:O(u)?(d.selectAll(),w()):Y&&u.selectionStart!=v&&w())},d),N.addListener(u,"input",k,d),N.addListener(u,"cut",n,d),N.addListener(u,"copy",r,d),N.addListener(u,"paste",c,d),"oncut"in u&&"oncopy"in u&&"onpaste"in u||N.addListener(e,"keydown",function(e){if((!B.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:r(e);break;case 86:c(e);break;case 88:n(e)}},d),function(){var e;if(o&&d.onCompositionUpdate&&!d.$readOnly)return g?t():void(o.useTextareaForIME?d.onCompositionUpdate(u.value):(e=u.value,S(e),o.markerRange&&(o.context&&(o.markerRange.start.column=o.selectionStart=o.context.compositionStartOffset),o.markerRange.end.column=o.markerRange.start.column+b-o.selectionStart+y)))}),T=function(e){d.onCompositionEnd&&!d.$readOnly&&(o=!1,d.onCompositionEnd(),d.off("mousedown",t),e)&&k()},M=H.delayedCall(E,50).schedule.bind(null,null);N.addListener(u,"compositionstart",function(e){o||!d.onCompositionStart||d.$readOnly||(o={},g)||(e.data&&(o.useTextareaForIME=!1),setTimeout(E,0),d._signal("compositionStart"),d.on("mousedown",t),(e=d.getSelectionRange()).end.row=e.start.row,e.end.column=e.start.column,o.markerRange=e,o.selectionStart=v,d.onCompositionStart(o),o.useTextareaForIME?(f=u.value="",b=v=0):(u.msGetInputContext&&(o.context=u.msGetInputContext()),u.getInputContext&&(o.context=u.getInputContext())))},d),N.addListener(u,"compositionupdate",E,d),N.addListener(u,"keyup",function(e){27==e.keyCode&&u.value.length<u.selectionStart&&(o||(f=u.value),v=b=-1,w()),M()},d),N.addListener(u,"keydown",M,d),N.addListener(u,"compositionend",T,d),this.getElement=function(){return u},this.setCommandMode=function(e){g=e,u.readOnly=!1},this.setReadOnly=function(e){g||(u.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){A=!0,w(),d._emit("nativecontextmenu",{target:d,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,t){l=l||u.style.cssText,u.style.cssText=(t?"z-index:100000;":"")+(B.isIE?"opacity:0.1;":"")+"text-indent: -"+(v+b)*d.renderer.characterWidth*.5+"px;";function i(e){z.translate(u,e.clientX-s-2,Math.min(e.clientY-r-2,o))}var t=d.container.getBoundingClientRect(),n=z.computedStyle(d.container),r=t.top+(parseInt(n.borderTopWidth)||0),s=t.left+(parseInt(t.borderLeftWidth)||0),o=t.bottom-r-u.clientHeight-2;i(e),"mousedown"==e.type&&(d.renderer.$isMousePressed=!0,clearTimeout(L),B.isWin)&&N.capture(d.container,i,a)},this.onContextMenuClose=a;function R(e){d.textInput.onContextMenu(e),a()}var L,$,F,P,I;function D(e){var t,i,n,r;document.activeElement!==F||I||o||$.$mouseHandler.isMousePressed||s||(t=F.selectionStart,i=F.selectionEnd,n=null,(r=0)==t?n=q.up:1==t?n=q.home:b<i&&"\n"==f[i]?n=q.end:t<v&&" "==f[t-1]?(n=q.left,r=G.option):t<v||t==v&&b!=v&&t==i?n=q.left:b<i&&2<f.slice(0,i).split("\n").length?n=q.down:b<i&&" "==f[i-1]?(n=q.right,r=G.option):(b<i||i==b&&b!=v&&t==i)&&(n=q.right),t!==i&&(r|=G.shift),n&&(!$.onCommandKey({},r,n)&&$.commands&&(n=q.keyCodeToString(n),r=$.commands.findKeyCommand(r,n))&&$.execCommand(r),v=t,b=i,w("")))}N.addListener(u,"mouseup",R,d),N.addListener(u,"mousedown",function(e){e.preventDefault(),a()},d),N.addListener(d.renderer.scroller,"contextmenu",R,d),N.addListener(u,"contextmenu",R,d),K&&($=d,P=null,I=!1,(F=u).addEventListener("keydown",function(e){P&&clearTimeout(P),I=!0},!0),F.addEventListener("keyup",function(e){P=setTimeout(function(){I=!1},100)},!0),document.addEventListener("selectionchange",D),$.on("destroy",function(){document.removeEventListener("selectionchange",D)}))},t.$setUserAgentForTests=function(e,t){Y=e,K=t}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,i){"use strict";function n(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function o(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var s=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition(),n=(this.mousedownEvent=e,this.editor),r=e.getButton();if(0!==r)!n.getSelectionRange().isEmpty()&&1!=r||n.selection.moveToPosition(i),2==r&&(n.textInput.onContextMenu(e.domEvent),s.isMozilla||e.preventDefault());else{if(this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimeout)||this.$clickSelection||n.inMultiSelectMode)return this.captureMouse(e),this.startSelect(i,1<e.domEvent._clicks),e.preventDefault();this.setState("focusWait"),this.captureMouse(e)}},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(e=-1==(e=this.$clickSelection.comparePoint(i))?this.$clickSelection.end:1==e?this.$clickSelection.start:(i=(e=o(this.$clickSelection,i)).cursor,e.anchor),t.selection.setSelectionAnchor(e.row,e.column)),t.selection.selectToPosition(i),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i,n,r=this.editor,s=r.renderer.screenToTextCoordinates(this.x,this.y),e=r.selection[e](s.row,s.column);this.$clickSelection&&(i=this.$clickSelection.comparePoint(e.start),t=this.$clickSelection.comparePoint(e.end),-1==i&&t<=0?(n=this.$clickSelection.end,e.end.row==s.row&&e.end.column==s.column||(s=e.start)):1==t&&0<=i?(n=this.$clickSelection.start,e.start.row==s.row&&e.start.column==s.column||(s=e.end)):n=-1==i&&1==t?(s=e.end,e.start):(s=(i=o(this.$clickSelection,s)).cursor,i.anchor),r.selection.setSelectionAnchor(n.row,n.column)),r.selection.selectToPosition(s),r.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){n=this.mousedownEvent.x,e=this.mousedownEvent.y,i=this.x,t=this.y;var e,t,i=Math.sqrt(Math.pow(i-n,2)+Math.pow(t-e,2)),n=Date.now();(0<i||n-this.mousedownEvent.time>this.$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("<br/>"),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=b.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?(b.moveCursorToPosition(r),f=o,v={x:h,y:c}):5<S(v.x,v.y,h,c)?f=null:200<=o-f&&(b.renderer.scrollCursorIntoView(),f=null),a=u,s=l,r=Date.now(),o=b.renderer.layerConfig.lineHeight,l=b.renderer.layerConfig.characterWidth,e=b.renderer.scroller.getBoundingClientRect(),e={x:{left:h-e.left,right:e.right-h},y:{top:c-e.top,bottom:e.bottom-c}},t=Math.min(e.x.left,e.x.right),i=Math.min(e.y.top,e.y.bottom),n={row:a.row,column:a.column},t/l<=2&&(n.column+=e.x.left<e.x.right?-3:2),i/o<=1&&(n.row+=e.y.top<e.y.bottom?-1:1),t=a.row!=n.row,l=a.column!=n.column,i=!s||a.row!=s.row,t||l&&!i?g?200<=r-g&&b.renderer.scrollCursorIntoView(n):g=r:g=null}function i(){d=b.selection.toOrientedRange(),a=b.session.addMarker(d,"ace_selection",b.getSelectionStyle()),b.clearSelection(),b.isFocused()&&b.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),e(),l=setInterval(e,20),x=0,_.addListener(document,"mousemove",r)}function n(){clearInterval(l),b.session.removeMarker(a),a=null,b.selection.fromOrientedRange(d),b.isFocused()&&!m&&b.$resetCursorStyle(),x=0,f=g=u=d=null,_.removeListener(document,"mousemove",r)}function r(){null==A&&(A=setTimeout(function(){null!=A&&a&&n()},20))}function s(e){e=e.types;return!e||Array.prototype.some.call(e,function(e){return"text/plain"==e||"Text"==e})}function o(e){var t=["copy","copymove","all","uninitialized"],i=C.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return i&&0<=t.indexOf(n)?r="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(n)?r="move":0<=t.indexOf(n)&&(r="copy"),r}var a,h,c,l,d,u,p,m,g,f,v,b=t.editor,y=k.createElement("img"),w=(y.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",C.isOpera&&(y.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),b.on("mousedown",this.onMouseDown.bind(t)),b.container),x=0,A=(this.onDragStart=function(e){var t;if(this.cancelDrag||!w.draggable)return t=this,setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault();d=b.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=b.getReadOnly()?"copy":"copyMove",C.isOpera&&(b.container.appendChild(y),y.scrollTop=0),i.setDragImage&&i.setDragImage(y,0,0),C.isOpera&&b.container.removeChild(y),i.clearData(),i.setData("Text",b.session.getTextRange()),m=!0,this.setState("drag")},this.onDragEnd=function(e){w.draggable=!1,m=!1,this.setState(null),b.getReadOnly()||(e=e.dataTransfer.dropEffect,p||"move"!=e||b.session.remove(b.getSelectionRange()),b.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!b.getReadOnly()&&s(e.dataTransfer))return h=e.clientX,c=e.clientY,a||i(),x++,e.dataTransfer.dropEffect=p=o(e),_.preventDefault(e)},this.onDragOver=function(e){if(!b.getReadOnly()&&s(e.dataTransfer))return h=e.clientX,c=e.clientY,a||(i(),x++),null!==A&&(A=null),e.dataTransfer.dropEffect=p=o(e),_.preventDefault(e)},this.onDragLeave=function(e){if(--x<=0&&a)return n(),p=null,_.preventDefault(e)},this.onDrop=function(e){if(u){var t=e.dataTransfer;if(m)switch(p){case"move":d=d.contains(u.row,u.column)?{start:u,end:u}:b.moveText(d,u);break;case"copy":d=b.moveText(d,u,!0)}else{t=t.getData("Text");d={start:u,end:b.session.insert(u,t)},b.focus(),p=null}return n(),_.preventDefault(e)}},_.addListener(w,"dragstart",this.onDragStart.bind(t),b),_.addListener(w,"dragend",this.onDragEnd.bind(t),b),_.addListener(w,"dragenter",this.onDragEnter.bind(t),b),_.addListener(w,"dragover",this.onDragOver.bind(t),b),_.addListener(w,"dragleave",this.onDragLeave.bind(t),b),_.addListener(w,"drop",this.onDrop.bind(t),b),null)}function S(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}var k=e("../lib/dom"),_=e("../lib/event"),C=e("../lib/useragent");(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.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&&3<S(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<S(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){var t,i,n;this.$dragEnabled&&(this.mousedownEvent=e,t=this.editor,i=e.inSelection(),n=e.getButton(),1!==(e.domEvent.detail||1)||0!==n||!i||e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(n=e.domEvent.target||e.domEvent.srcElement)&&(n.unselectable="on"),t.getDragDelay()?(C.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0))}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(e,t,i){"use strict";var k=e("./mouse_event").MouseEvent,n=e("../lib/event"),a=e("../lib/dom");t.addTouchListeners=function(e,c){function r(){function t(e){var t,i=e.target.getAttribute("action");"more"!=i&&r?("paste"==i?n.readText().then(function(e){c.execCommand(i,e)}):i&&("cut"!=i&&"copy"!=i||(n?n.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(i)),o.firstChild.style.display="none",r=!1,"openCommandPallete"!=i&&c.focus()):(r=!r,e=c.getCopyText(),t=c.session.getUndoManager().hasUndo(),o.replaceChild(a.buildDom(r?["span",!e&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],e&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],e&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],n&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],t&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),o.firstChild))}var n=window.navigator&&window.navigator.clipboard,r=!1;o=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){y="menu",e.stopPropagation(),e.preventDefault(),c.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),t(e)},onclick:t},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function i(){o||r();var e=c.selection.cursor,e=c.renderer.textToScreenCoordinates(e.row,e.column),t=c.renderer.textToScreenCoordinates(0,0).pageX,i=c.renderer.scrollLeft,n=c.container.getBoundingClientRect();o.style.top=e.pageY-n.top-3+"px",e.pageX-n.left<n.width-70?(o.style.left="",o.style.right="10px"):(o.style.right="",o.style.left=t+i-n.left+"px"),o.style.display="",o.firstChild.style.display="none",c.on("input",s)}function s(e){o&&(o.style.display="none"),c.off("input",s)}function d(){f=null,clearTimeout(f);var e=c.selection.getRange(),t=e.contains(v.row,v.column);!e.isEmpty()&&t||(c.selection.moveToPosition(v),c.selection.selectWord()),y="wait",i()}var u,p,m,g,f,t,v,b,o,y="scroll",w=0,x=0,A=0,S=0;n.addListener(e,"contextmenu",function(e){b&&c.textInput.getElement().focus()},c),n.addListener(e,"touchstart",function(e){var t=e.touches;if(f||1<t.length)clearTimeout(f),f=null,m=-1,y="zoom";else{b=c.$mouseHandler.isMousePressed=!0;var i=c.renderer.layerConfig.lineHeight,n=c.renderer.layerConfig.lineHeight,r=e.timeStamp,s=(g=r,t[0]),o=s.clientX,s=s.clientY,o=(Math.abs(u-o)+Math.abs(p-s)>i&&(m=-1),u=e.clientX=o,p=e.clientY=s,A=S=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(),y="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.left)return void(y="zoom");s=h(e.clientX-t.left-s.left+l,e.clientY-t.top-s.top+a),h=h(e.clientX-t.left-o.left+l,e.clientY-t.top-o.top+a);s<3.5&&h<3.5&&(y=h<s?"cursor":"anchor"),y=h<3.5?"anchor":s<3.5?"cursor":"scroll",f=setTimeout(d,450)}m=r}},c),n.addListener(e,"touchend",function(e){b=c.$mouseHandler.isMousePressed=!1,t&&clearInterval(t),"zoom"==y?(y="",w=0):(f?(c.selection.moveToPosition(v),w=0,i):"scroll"==y?(w+=60,t=setInterval(function(){w--<=0&&(clearInterval(t),t=null),Math.abs(A)<.01&&(A=0),Math.abs(S)<.01&&(S=0),w<20&&(A*=.9),w<20&&(S*=.9);var e=c.session.getScrollTop();c.renderer.scrollBy(10*A,10*S),e==c.session.getScrollTop()&&(w=0)},10),s):i)(),clearTimeout(f),f=null},c),n.addListener(e,"touchmove",function(e){f&&(clearTimeout(f),f=null);var t=e.touches;if(!(1<t.length||"zoom"==y)){var t=t[0],i=u-t.clientX,n=p-t.clientY;if("wait"==y){if(!(4<i*i+n*n))return e.preventDefault();y="cursor"}u=t.clientX,p=t.clientY,e.clientX=t.clientX,e.clientY=t.clientY;var t=e.timeStamp,r=t-g;g=t,"scroll"==y?((t=new k(e,c)).speed=1,t.wheelX=i,t.wheelY=n,10*Math.abs(i)<Math.abs(n)&&(i=0),10*Math.abs(n)<Math.abs(i)&&(n=0),0!=r&&(A=i/r,S=n/r),c._emit("mousewheel",t),t.propagationStopped||(A=S=0)):(i=new k(e,c).getDocumentPosition(),"cursor"==y?c.selection.moveCursorToPosition(i):"anchor"==y&&c.selection.setSelectionAnchor(i.row,i.column),c.renderer.scrollCursorIntoView(i),e.preventDefault())}},c)}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var r=e("./dom");t.get=function(e,t){var i=new XMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,i){var t=r.getDocumentHead(),n=document.createElement("script");n.src=e,t.appendChild(n),n.onload=n.onreadystatechange=function(e,t){!t&&n.readyState&&"loaded"!=n.readyState&&"complete"!=n.readyState||(n=n.onload=n.onreadystatechange=null,t)||i()}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";function s(){this.propagationStopped=!0}function o(){this.defaultPrevented=!0}var n={};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var i=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){(t="object"==typeof t&&t?t:{}).type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o);for(var i=i.slice(),r=0;r<i.length&&(i[r](t,this),!t.propagationStopped);r++);return n&&!t.defaultPrevented?n(t,this):void 0}},n._signal=function(e,t){if(i=(this._eventRegistry||{})[e])for(var i=i.slice(),n=0;n<i.length;n++)i[n](t,this)},n.once=function(t,i){var n=this;if(this.on(t,function e(){n.off(t,e),i.apply(null,arguments)}),!i)return new Promise(function(e){i=e})},n.setDefaultHandler=function(e,t){var i,n,r=this._defaultHandlers;(r=r||(this._defaultHandlers={_disabled_:{}}))[e]&&(n=r[e],(i=r._disabled_[e])||(r._disabled_[e]=i=[]),i.push(n),-1!=(n=i.indexOf(t)))&&i.splice(n,1),r[e]=t},n.removeDefaultHandler=function(e,t){var i,n=this._defaultHandlers;n&&(i=n._disabled_[e],n[e]==t?i&&this.setDefaultHandler(e,i.pop()):i&&-1!=(n=i.indexOf(t))&&i.splice(n,1))},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];return-1==(n=n||(this._eventRegistry[e]=[])).indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};e=this._eventRegistry[e];e&&-1!==(t=e.indexOf(t))&&e.splice(t,1)},n.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=n}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){function n(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}function r(e,t){var i=new Error(e);i.data=t,"object"==typeof console&&console.error&&console.error(i),setTimeout(function(){throw i})}function s(){this.$defaultOptions={}}var o=e("./oop"),a=e("./event_emitter").EventEmitter,l={setOptions:function(t){Object.keys(t).forEach(function(e){this.setOption(e,t[e])},this)},getOptions:function(e){var t,i={};return e?Array.isArray(e)||(i=e,e=Object.keys(i)):(t=this.$options,e=Object.keys(t).filter(function(e){return!t[e].hidden})),e.forEach(function(e){i[e]=this.getOption(e)},this),i},setOption:function(e,t){var i;if(this["$"+e]!==t)return(i=this.$options[e])?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].setOption(e,t):(i.handlesSet||(this["$"+e]=t),void(i&&i.set&&i.set.call(this,t))):n('misspelled option "'+e+'"')},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:n('misspelled option "'+e+'"')}};(function(){o.implement(this,a),this.defineOptions=function(i,e,n){return i.$options||(this.$defaultOptions[e]=i.$options={}),Object.keys(n).forEach(function(e){var t=n[e];(t="string"==typeof t?{forwardTo:t}:t).name||(t.name=e),"initialValue"in(i.$options[t.name]=t)&&(i["$"+t.name]=t.initialValue)}),o.implement(i,l),this},this.resetOptions=function(i){Object.keys(i.$options).forEach(function(e){var t=i.$options[e];"value"in t&&i.setOption(e,t.value)})},this.setDefaultValue=function(e,t,i){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var n=this.$defaultOptions[e]||(this.$defaultOptions[e]={});n[t]&&(n.forwardTo?this.setDefaultValue(n.forwardTo,t,i):n[t].value=i)},this.setDefaultValues=function(t,i){Object.keys(i).forEach(function(e){this.setDefaultValue(t,e,i[e])},this)},this.warn=n,this.reportError=r}).call(s.prototype),t.AppConfig=s}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(u,p,m){var e=u("./lib/lang"),r=(u("./lib/oop"),u("./lib/net")),t=u("./lib/app_config").AppConfig,g=(m.exports=p=new t,function(){return this||"undefined"!=typeof window&&window}()),f={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1},s=(p.get=function(e){if(f.hasOwnProperty(e))return f[e];throw new Error("Unknown config key: "+e)},p.set=function(e,t){if(f.hasOwnProperty(e))f[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e)},p.all=function(){return e.copyObject(f)},p.$modes={},p.moduleUrl=function(e,t){var i,n,r;return f.$moduleUrls[e]||(e=e.split("/"),i="snippets"==(t=t||e[e.length-2]||"")?"/":"-",n=e[e.length-1],"worker"==t&&"-"==i&&(r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),n=n.replace(r,"")),(!n||n==t)&&1<e.length&&(n=e[e.length-2]),null==(r=f[t+"Path"])?r=f.basePath:"/"==i&&(t=i=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+i+n+this.get("suffix"))},p.setModuleUrl=function(e,t){return f.$moduleUrls[e]=t},p.$loading={},p.loadModule=function(i,e){var t,n;Array.isArray(i)&&(t=i[0],i=i[1]);try{n=u(i)}catch(e){}return n&&!p.$loading[i]?e&&e(n):(p.$loading[i]||(p.$loading[i]=[]),p.$loading[i].push(e),1<p.$loading[i].length?void 0:(n=function(){u([i],function(t){p._emit("load.module",{name:i,module:t});var e=p.$loading[i];p.$loading[i]=null,e.forEach(function(e){e&&e(t)})})},p.get("packaged")?(r.loadScript(p.moduleUrl(i,t),n),void s()):n()))},function(){f.basePath||f.workerPath||f.modePath||f.themePath||Object.keys(f.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),s=function(){})});p.init=function(e){if(g&&g.document){f.packaged=e||u.packaged||m.packaged||g.define&&define.packaged;for(var t,i={},n="",e=document.currentScript||document._currentScript,r=(e&&e.ownerDocument||document).getElementsByTagName("script"),s=0;s<r.length;s++){var o=r[s],a=o.src||o.getAttribute("src");if(a){for(var l=o.attributes,h=0,c=l.length;h<c;h++){var d=l[h];0===d.name.indexOf("data-ace-")&&(i[d.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=d.value)}o=a.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);o&&(n=o[1])}}for(t in n&&(i.base=i.base||n,i.packaged=!0),i.basePath=i.base,i.workerPath=i.workerPath||i.base,i.modePath=i.modePath||i.base,i.themePath=i.themePath||i.base,delete i.base,i)void 0!==i[t]&&p.set(t,i[t])}},p.version="1.4.12"}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t,i){"use strict";function n(n){function e(e){document.hasFocus&&document.hasFocus()&&(n.isFocused()||document.activeElement!=(n.textInput&&n.textInput.getElement()))||window.focus(),n.focus()}var r=this,t=(this.editor=n,new s(this),new o(this),new a(this),n.renderer.getMouseEventTarget()),i=(c.addListener(t,"click",this.onMouseEvent.bind(this,"click"),n),c.addListener(t,"mousemove",this.onMouseMove.bind(this,"mousemove"),n),c.addMultiMouseDownListener([t,n.renderer.scrollBarV&&n.renderer.scrollBarV.inner,n.renderer.scrollBarH&&n.renderer.scrollBarH.inner,n.textInput&&n.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",n),c.addMouseWheelListener(n.container,this.onMouseWheel.bind(this,"mousewheel"),n),l(n.container,n),n.renderer.$gutter);c.addListener(i,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),n),c.addListener(i,"click",this.onMouseEvent.bind(this,"gutterclick"),n),c.addListener(i,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),n),c.addListener(i,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),n),c.addListener(t,"mousedown",e,n),c.addListener(i,"mousedown",e,n),d.isIE&&n.renderer.scrollBarV&&(c.addListener(n.renderer.scrollBarV.element,"mousedown",e,n),c.addListener(n.renderer.scrollBarH.element,"mousedown",e,n)),n.on("mousemove",function(e){var t,i;r.state||r.$dragDelay||!r.$dragEnabled||(e=n.renderer.screenToTextCoordinates(e.x,e.y),t=n.session.selection.getRange(),i=n.renderer,!t.isEmpty()&&t.insideStart(e.row,e.column)?i.setCursorStyle("default"):i.setCursorStyle(""))},n)}var c=e("../lib/event"),d=e("../lib/useragent"),s=e("./default_handlers").DefaultHandlers,o=e("./default_gutter_handler").GutterHandler,u=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,e=e("../config");(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new u(t,this.editor))},this.onMouseMove=function(e,t){var i=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;i&&i.length&&this.editor._emit(e,new u(t,this.editor))},this.onMouseWheel=function(e,t){var i=new u(t,this.editor);i.speed=2*this.$scrollSpeed,i.wheelX=t.wheelX,i.wheelY=t.wheelY,this.editor._emit(e,i)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;function i(e){if(e)return d.isWebKit&&!e.which&&a.releaseMouse?a.releaseMouse():(a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new u(e,a.editor),void(a.$mouseMoved=!0))}function n(e){s.off("beforeEndOperation",l),clearInterval(h),r(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=o.$isMousePressed=!1,o.$keepTextAreaAtCursor&&o.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),s.endOperation()}function r(){a[a.state]&&a[a.state](),a.$mouseMoved=!1}var s=this.editor,o=this.editor.renderer,a=(o.$isMousePressed=!0,this);if(d.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){n(e)});var l=function(e){a.releaseMouse&&s.curOp.command.name&&s.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())},h=(s.on("beforeEndOperation",l),s.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=i,a.releaseMouse=c.capture(this.editor.container,i,n),setInterval(r,20))},this.releaseMouse=null,this.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&c.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},this.destroy=function(){this.releaseMouse&&this.releaseMouse()}}).call(n.prototype),e.defineOptions(n.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:d.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=n}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom");t.FoldHandler=function(r){r.on("click",function(e){var t=e.getDocumentPosition(),i=r.session,t=i.getFoldAt(t.row,t.column,1),t=(t&&(e.getAccelKey()?i.removeFold(t):i.expandFold(t),e.stop()),e.domEvent&&e.domEvent.target);t&&n.hasCssClass(t,"ace_inline_button")&&n.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),r.renderer.scrollCursorIntoView())}),r.on("gutterclick",function(e){var t,i;"foldWidgets"==r.renderer.$gutterLayer.getRegion(e)&&(t=e.getDocumentPosition().row,(i=r.session).foldWidgets&&i.foldWidgets[t]&&r.session.onFoldWidgetClick(t,e),r.isFocused()||r.focus(),e.stop())}),r.on("gutterdblclick",function(e){var t,i,n;"foldWidgets"==r.renderer.$gutterLayer.getRegion(e)&&(n=e.getDocumentPosition().row,(i=(i=(t=r.session).getParentFoldRangeData(n,!0)).range||i.firstRange)&&(n=i.start.row,(n=t.getFoldAt(n,t.getLine(n).length,1))?t.removeFold(n):(t.addFold("...",i),r.renderer.scrollCursorIntoView({row:i.start.row,column:0}))),e.stop())})}}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,i){"use strict";function n(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}var r=e("../lib/keys"),l=e("../lib/event");(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){var i;e&&("function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e),-1!=(i=this.$handlers.indexOf(e))&&this.$handlers.splice(i,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==i)&&e.attach&&e.attach(this.$editor)},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var t=this.$data,i=t.editor;return this.$handlers.map(function(e){return e.getStatusText&&e.getStatusText(i,t)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,i,n){for(var r,s=!1,o=this.$editor.commands,a=this.$handlers.length;a--&&!((r=this.$handlers[a].handleKeyboard(this.$data,e,t,i,n))&&r.command&&((s="null"==r.command||o.exec(r.command,this.$editor,r.args,n))&&n&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&l.stopEvent(n),s)););return s||-1!=e||(r={command:"insertstring"},s=o.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,i){var n=r.keyCodeToString(i);return this.$callKeyboardHandlers(t,n,i,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(n.prototype),t.KeyBinding=n}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,l,t){"use strict";function h(e,t,i,n){var r,s,o,a=g?x:w,l=0,h=-1,c=null,d=null,u=[];if(!n)for(c=0,n=[];c<i;c++)n[c]=m(e[c]);for(f=g,y=b=v=!1,d=0;d<i;d++){if(o=l,u[d]=r=function(e,t,i,n){var r,s,o,a=t[n];switch(a){case A:case S:v=!1;case C:case _:return a;case k:return v?_:k;case M:return v=!0,S;case R:return C;case L:return n<1||n+1>=t.length||(r=i[n-1])!=k&&r!=_||(l=t[n+1])!=k&&l!=_?C:(l=v?_:l)==r?l:C;case $:return(r=0<n?i[n-1]:E)==k&&n+1<t.length&&t[n+1]==k?k:C;case F:if(0<n&&i[n-1]==k)return k;if(v)return C;for(o=n+1,s=t.length;o<s&&t[o]==F;)o++;return o<s&&t[o]==k?k:C;case P:for(s=t.length,o=n+1;o<s&&t[o]==P;)o++;if(o<s){var l=e[n],l=1425<=l&&l<=2303||64286==l;if(r=t[o],l&&(r==S||r==M))return S}return n<1||(r=t[n-1])==E?C:i[n-1];case E:return b=!(v=!1),g;case T:return y=!0,C;case I:case O:case N:case B:case D:v=!1;case z:return C}}(e,n,u,d),o=240&(l=a[o][r]),l&=15,t[d]=s=a[l][5],0<o){if(16==o)for(c=h;c<d;c++)t[c]=1;h=-1}if(a[l][6])-1==h&&(h=d);else if(-1<h){for(c=h;c<d;c++)t[c]=s;h=-1}n[d]==E&&(t[d]=0),f|=s}if(y)for(c=0;c<i;c++)if(n[c]==T){t[c]=g;for(var p=c-1;0<=p&&n[p]==R;p--)t[p]=g}}function c(e,t,i){if(!(f<e))if(1!=e||1!=g||b)for(var n,r,s,o,a=i.length,l=0;l<a;){if(t[l]>=e){for(n=l+1;n<a&&t[n]>=e;)n++;for(r=l,s=n-1;r<s;r++,s--)o=i[r],i[r]=i[s],i[s]=o;l=n}l++}else i.reverse()}function m(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?191<t?A:n[t]:5==i?/[\u0591-\u05f4]/.test(e)?S:A:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?P:/[\u0660-\u0669\u066b-\u066c]/.test(e)?_:1642==t?F:/[\u06f0-\u06f9]/.test(e)?k:M:32==i&&t<=8287?r[255&t]:254==i&&65136<=t?M:C}var g=0,f=0,v=!1,b=!1,y=!1,w=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],x=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],A=0,S=1,k=2,_=3,C=4,E=5,T=6,M=7,R=8,L=9,$=10,F=11,P=12,I=13,O=14,D=15,N=16,B=17,z=18,n=[z,z,z,z,z,z,z,z,z,T,E,T,R,E,z,z,z,z,z,z,z,z,z,z,z,z,z,z,E,E,E,T,R,C,C,F,F,F,C,C,C,C,C,$,L,$,L,L,k,k,k,k,k,k,k,k,k,k,L,C,C,C,C,C,C,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,C,C,C,C,C,C,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,C,C,C,C,z,z,z,z,z,z,E,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,z,L,C,F,F,F,F,C,C,C,C,A,C,C,z,C,C,F,F,k,k,C,A,C,C,C,k,A,C,C,C,C,C],r=[R,R,R,R,R,R,R,R,R,R,R,z,z,z,A,S,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,R,E,I,O,D,N,B,L,F,F,F,F,F,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,L,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,R];l.L=A,l.R=S,l.EN=k,l.ON_R=3,l.AN=4,l.R_H=5,l.B=6,l.RLE=7,l.DOT="·",l.doBidiReorder=function(e,t,i){if(e.length<2)return{};var n=e.split(""),r=new Array(n.length),s=new Array(n.length),o=[];g=i?1:0,h(n,o,n.length,t);for(var a=0;a<r.length;r[a]=a,a++);c(2,o,r),c(1,o,r);for(a=0;a<r.length-1;a++)t[a]===_?o[a]=l.AN:o[a]===S&&(t[a]>M&&t[a]<I||t[a]===C||t[a]===z)?o[a]=l.ON_R:0<a&&"ل"===n[a-1]&&/\u0622|\u0623|\u0625|\u0627/.test(n[a])&&(o[a-1]=o[a]=l.R_H,a++);n[n.length-1]===l.DOT&&(o[n.length-1]=l.B),""===n[0]&&(o[0]=l.RLE);for(a=0;a<r.length;a++)s[a]=o[r[a]];return{logicalFromVisual:r,bidiLevels:s}},l.hasBidiCharacters=function(e,t){for(var i=!1,n=0;n<e.length;n++)t[n]=m(e.charAt(n)),i||t[n]!=S&&t[n]!=M&&t[n]!=_||(i=!0);return i},l.getVisualFromLogicalIdx=function(e,t){for(var i=0;i<t.logicalFromVisual.length;i++)if(t.logicalFromVisual[i]==e)return i;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,i){"use strict";function n(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=a,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())}var a=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;(function(){this.isBidiRow=function(e,t,i){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,i),this.updateBidiMap()),this.bidiMap.bidiLevels)},this.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},this.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;return e=t.length&&0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))?this.session.$docRowCache[t]:e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-e&&(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=i,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){var i,n=(e=void 0===e?this.getDocumentRow():e)===this.session.getLength()-1?this.EOF:this.EOL,r=(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode&&((e=this.session.$wrapData[e])&&(0<(t=void 0===t?this.getSplitIndex():t)&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[a.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t])),t!=e.length)||(this.line+=this.showInvisibles?n:a.DOT),this.session),s=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||r.isFullWidth(e.charCodeAt(0))?(i="\t"===e?r.getScreenTabSize(t+s):2,s+=i-1,o.stringRepeat(a.DOT,i)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==a.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},this.updateBidiMap=function(){var e=[];a.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=a.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},this.markAsDirty=function(){this.currentRow=null},this.updateCharacterWidths=function(e){var t;this.characterWidth!==e.$characterSize.width&&(this.fontMetrics=e,t=this.characterWidth=e.$characterSize.width,e=e.$measureCharWidth("ה"),this.charWidths[a.L]=this.charWidths[a.EN]=this.charWidths[a.ON_R]=t,this.charWidths[a.R]=this.charWidths[a.AN]=e,this.charWidths[a.R_H]=.45*e,this.charWidths[a.B]=this.charWidths[a.RLE]=0,this.currentRow=null)},this.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},this.setEolChar=function(e){this.EOL=e},this.setContentWidth=function(e){this.contentWidth=e},this.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},this.setRtlDirection=function(e,t){for(var i=e.getCursorPosition(),n=e.selection.getSelectionAnchor().row;n<=i.row;n++)t||e.session.getLine(n).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(n).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:n},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(n,0,1)},this.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,i=t<e?this.session.getOverwrite()?e:e-1:t,n=a.getVisualFromLogicalIdx(i,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[n]%2!=0&&n++;for(var o=0;o<n;o++)s+=this.charWidths[r[o]];return!this.session.getOverwrite()&&t<e&&r[n]%2==0&&(s+=this.charWidths[r[n]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var i,n=this.bidiMap,r=n.bidiLevels,s=[],o=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,h=!1,c=!1,d=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var u,p=0;p<r.length;p++)u=n.logicalFromVisual[p],i=r[p],(h=a<=u&&u<l)&&!c?d=o:!h&&c&&s.push({left:d,width:o-d}),o+=this.charWidths[i],c=h;if(h&&p===r.length&&s.push({left:d,width:o-d}),this.isRtlDir)for(var m=0;m<s.length;m++)s[m].left+=this.rtlLineOffset;return s},this.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,e=Math.max(e,0),i=0,n=0,r=this.bidiMap.bidiLevels,s=this.charWidths[r[n]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i+s/2<e;){if(i+=s,n===r.length-1){s=0;break}s=this.charWidths[r[++n]]}return 0===(t=0<n&&r[n-1]%2!=0&&r[n]%2==0?(e<i&&n--,this.bidiMap.logicalFromVisual[n]):0<n&&r[n-1]%2==0&&r[n]%2!=0?1+(i<e?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===r.length-1&&0===s&&r[n-1]%2==0||!this.isRtlDir&&0===n&&r[n]%2!=0?1+this.bidiMap.logicalFromVisual[n]:(0<n&&r[n-1]%2!=0&&0!==s&&n--,this.bidiMap.logicalFromVisual[n]))&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(n.prototype),t.BidiHandler=n}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t,i){"use strict";function n(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")})}var r=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range;(function(){r.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>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<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(e=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,e,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-e):this.moveCursorBy(0,-1))},this.moveCursorRight=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(e.end.row,e.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(e=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,e,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,e):this.moveCursorBy(0,1))},this.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,i=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(i,0),e=this.session.getDisplayLine(e,null,i.row,i.column).match(/^\s*/);e[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=e[0].length),this.moveCursorToPosition(i)},this.moveCursorLineEnd=function(){var e,t=this.lead,t=this.session.getDocumentLastRowColumnPosition(t.row,t.column);this.lead.column==t.column&&(e=this.session.getLine(t.row),t.column==e.length)&&0<(e=e.search(/\s+$/))&&(t.column=e),this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),r=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.getFoldAt(e,t,1));r?this.moveCursorTo(r.end.row,r.end.column):(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length?(this.moveCursorTo(e,i.length),this.moveCursorRight(),e<this.doc.getLength()-1&&this.moveCursorWordRight()):(this.session.tokenRe.exec(n)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)))},this.moveCursorLongWordLeft=function(){var e,t=this.lead.row,i=this.lead.column;(e=this.session.getFoldAt(t,i,-1))?this.moveCursorTo(e.start.row,e.start.column):(null==(e=this.session.getFoldStringAt(t,i,-1))&&(e=this.doc.getLine(t).substring(0,i)),e=s.stringReverse(e),this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(e)&&(i-=this.session.nonTokenRe.lastIndex,e=e.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0?(this.moveCursorTo(t,0),this.moveCursorLeft(),0<t&&this.moveCursorWordLeft()):(this.session.tokenRe.exec(e)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)))},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(r.lastIndex=0;(t=e[i])&&!r.test(t);)if(r.lastIndex=0,i++,n.test(t)){if(2<i){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(2<i)break}}return r.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),r=this.session.getFoldAt(e,t,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(t==i.length){for(var s=this.doc.getLength();n=this.doc.getLine(++e),e<s&&/^\s*$/.test(n););/^\s+/.test(n)||(n=""),t=0}r=this.$shortWordEndIndex(n);this.moveCursorTo(e,t+r)},this.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(n=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(n.start.row,n.start.column);var i=this.session.getLine(e).substring(0,t);if(0===t){for(;i=this.doc.getLine(--e),0<e&&/^\s*$/.test(i););t=i.length,/\s+$/.test(i)||(i="")}var n=s.stringReverse(i),n=this.$shortWordEndIndex(n);return this.moveCursorTo(e,t-n)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column),r=(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]&&(r=this.session.lineWidgets[this.lead.row],e<0?e-=r.rowsAbove||0:0<e&&(e+=r.rowCount-(r.rowsAbove||0))),this.session.screenToDocumentPosition(n.row+e,n.column,i));0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1),n=(n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(e));/[\uDC00-\uDFFF]/.test(n.charAt(t))&&n.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?--t:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){e=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(e.row,e.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return a.fromPoints(t,i)}catch(e){return a.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){var e;return this.rangeCount?e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}):(e=this.getRange()).isBackwards=this.isBackwards(),e},this.fromJSON=function(e){if(null==e.start){if(this.rangeList&&1<e.length){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=a.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(n.prototype),t.Selection=n}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";function n(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],r=0,s=this.matchMappings[t]={defaultToken:"text"},o="g",a=[],l=0;l<i.length;l++){var h,c,d=i[l];d.defaultToken&&(s.defaultToken=d.defaultToken),d.caseInsensitive&&(o="gi"),null==d.regex||(d.regex instanceof RegExp&&(d.regex=d.regex.toString().slice(1,-1)),h=d.regex,c=new RegExp("(?:("+h+")|(.))").exec("a").length-2,Array.isArray(d.token)?1==d.token.length||1==c?d.token=d.token[0]:c-1!=d.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:d,groupCount:c-1}),d.token=d.token[0]):(d.tokenArray=d.token,d.token=null,d.onMatch=this.$arrayTokens):"function"!=typeof d.token||d.onMatch||(d.onMatch=1<c?this.$applyToken:d.token),1<c&&(h=/\\\d/.test(d.regex)?d.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+r+1)}):(c=1,this.removeCapturingGroups(d.regex)),!d.splitRegex)&&"string"!=typeof d.token&&a.push(d),s[r]=l,r+=c,n.push(h),d.onMatch)||(d.onMatch=null)}n.length||(s[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,o)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",o)}}var r=e("./config"),b=2e3;(function(){this.$setMaxTokenCount=function(e){b=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],r=0,s=i.length;r<s;r++)t[r]&&(n[n.length]={type:i[r],value:t[r]});return n},this.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var i=[],n=this.tokenArray,r=0,s=n.length;r<s;r++)t[r+1]&&(i[i.length]={type:n[r],value:t[r+1]});return i},this.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g,function(e,t){return t?"(?:":e})},this.createSplitterRegexp=function(e,t){var o,a,l;return"$"!=(e="^"!=(e=-1!=e.indexOf("(?=")&&(o=0,a=!1,l={},e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,i,n,r,s){return a?a="]"!=r:r?a=!0:n?(o==l.stack&&(l.end=s+1,l.stack=-1),o--):i&&(o++,1!=i.length)&&(l.stack=o,l.start=s),e}),null!=l.end)&&/^\)*$/.test(e.substr(l.end))?e.substring(0,l.start)+e.substr(l.end):e).charAt(0)?"^"+e:e).charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},this.getLineTokens=function(e,t){t&&"string"!=typeof t?"#tmp"===(t=(i=t.slice(0))[0])&&(i.shift(),t=i.shift()):i=[];for(var i,n,r=t||"start",s=this.states[r],o=(s||(s=this.states[r="start"]),this.matchMappings[r]),a=this.regExps[r],l=[],h=a.lastIndex=0,c=0,d={type:null,value:""};n=a.exec(e);){var u,p=o.defaultToken,m=null,g=n[0],f=a.lastIndex;f-g.length>h&&(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;v<n.length-2;v++)if(void 0!==n[v+1]){p=(m=s[o[v]]).onMatch?m.onMatch(g,r,i,e):m.token,m.next&&(r="string"==typeof m.next?m.next:m.next(r,i),(s=this.states[r])||(this.reportError("state doesn't exist",r),s=this.states[r="start"]),o=this.matchMappings[r],(a=this.regExps[r]).lastIndex=h=f),m.consumeLineEnd&&(h=f);break}if(g)if("string"==typeof p)m&&!1===m.merge||d.type!==p?(d.type&&l.push(d),d={type:p,value:g}):d.value+=g;else if(p){d.type&&l.push(d);for(d={type:null,value:""},v=0;v<p.length;v++)l.push(p[v])}if(h==e.length)break;if(h=f,c++>b){for(c>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h<e.length;)d.type&&l.push(d),d={value:e.substring(h,h+=500),type:"overflow"};r="start",i=[];break}}return d.type&&l.push(d),1<i.length&&i[0]!==r&&i.unshift("#tmp",r),{tokens:l,state:i.length?i:r}},this.reportError=r.reportError}).call(n.prototype),t.Tokenizer=n}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";function n(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}}var l=e("../lib/lang");(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],r=0;r<n.length;r++){var s=n[r];(s.next||s.onMatch)&&("string"==typeof s.next&&0!==s.next.indexOf(t)&&(s.next=t+s.next),s.nextState)&&0!==s.nextState.indexOf(t)&&(s.nextState=t+s.nextState)}this.$rules[t+i]=n}else for(var i in e)this.$rules[i]=e[i]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,i,n,r){e="function"==typeof e?(new e).getRules():e;if(n)for(var s=0;s<n.length;s++)n[s]=t+n[s];else for(var o in n=[],e)n.push(t+o);if(this.addRules(e,t),i)for(var a=Array.prototype[r?"push":"unshift"],s=0;s<n.length;s++)a.apply(this.$rules[n[s]],l.deepCopy(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};function d(e,t){return"start"==e&&!t.length||t.unshift(this.nextState,e),this.nextState}function u(e,t){return t.shift(),t.shift()||"start"}this.normalizeRules=function(){var h=0,c=this.$rules;Object.keys(c).forEach(function e(t){var i=c[t];i.processed=!0;for(var n=0;n<i.length;n++){var r=i[n],s=null,o=(Array.isArray(r)&&(s=r,r={}),!r.regex&&r.start&&(r.regex=r.start,r.next||(r.next=[]),r.next.push({defaultToken:r.token},{token:r.token+".end",regex:r.end||r.start,next:"pop"}),r.token=r.token+".start",r.push=!0),r.next||r.push);if(o&&Array.isArray(o)?((l=r.stateName)||("string"!=typeof(l=r.token)&&(l=l[0]||""),c[l]&&(l+=h++)),c[l]=o,e(r.next=l)):"pop"==o&&(r.next=u),r.push&&(r.nextState=r.next||r.push,r.next=d,delete r.push),r.rules)for(var a in r.rules)c[a]?c[a].push&&c[a].push.apply(c[a],r.rules[a]):c[a]=r.rules[a];var l="string"==typeof r?r:r.include;(s=l?Array.isArray(l)?l.map(function(e){return c[e]}):c[l]:s)&&(o=[n,1].concat(s),r.noEscape&&(o=o.filter(function(e){return!e.next})),i.splice.apply(i,o),n--),r.keywordMap&&(r.token=this.createKeywordMapper(r.keywordMap,r.defaultToken||"text",r.caseInsensitive),delete r.defaultToken)}},this)},this.createKeywordMapper=function(r,t,s,o){var a=Object.create(null);return this.$keywordList=[],Object.keys(r).forEach(function(e){for(var t=r[e].split(o||"|"),i=t.length;i--;){var n=t[i];this.$keywordList.push(n),s&&(n=n.toLowerCase()),a[n]=e}},this),r=null,s?function(e){return a[e.toLowerCase()]||t}:function(e){return a[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(n.prototype),t.TextHighlightRules=n}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";function n(){this.$behaviours={}}(function(){this.add=function(e,t,i){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(var t in e)for(var i in e[t])this.add(t,i,e[t][i])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){e=("function"==typeof e?new e:e).getBehaviours(t),this.addBehaviours(e)},this.getBehaviours=function(e){if(!e)return this.$behaviours;for(var t={},i=0;i<e.length;i++)this.$behaviours[e[i]]&&(t[e[i]]=this.$behaviours[e[i]]);return t}}).call(n.prototype),t.Behaviour=n}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(e,t,i){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t),e=e.getTokenAt(t,i),this.$tokenIndex=e?e.index:-1}var r=e("./range").Range;(function(){this.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){var e;for(this.$tokenIndex+=1;this.$tokenIndex>=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;0<t;)i+=e[--t].value.length;return i},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new r(this.$row,t,this.$row,t+e.value.length)}}).call(n.prototype),t.TokenIterator=n}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";function u(e){var t=-1;if((l=e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount)?{rangeCount:e.multiSelect.rangeCount}:l)[t])return g=l[t];g=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function p(e,t,i,n){var r=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,r,e.end.column+(r?0:1)]}}function m(d){this.add("braces","insertion",function(e,t,i,n,r){var s=i.getCursorPosition(),o=n.doc.getLine(s.row);if("{"==r)return u(i),l=i.getSelectionRange(),""!==(h=n.doc.getTextRange(l))&&"{"!==h&&i.getWrapBehavioursEnabled()?p(l,h,"{","}"):m.isSaneInsertion(i,n)?/[\]\}\)]/.test(o[s.column])||i.inMultiSelectMode||d&&d.braces?(m.recordAutoInsert(i,n,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(i,n,"{"),{text:"{",selection:[1,1]}):void 0;if("}"==r){u(i);var a=o.substring(s.column,s.column+1);if("}"==a)if(null!==n.$findOpeningBracket("}",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){u(i);var l="";if(m.isMaybeInsertedClosing(s,o)&&(l=f.stringRepeat("}",g.maybeInsertedBrackets),m.clearMaybeInsertedClosing()),"}"===(a=o.substring(s.column,s.column+1))){var h=n.findMatchingBracket({row:s.row,column:s.column+1},"}");if(!h)return null;var c=this.$getIndent(n.getLine(h.row))}else{if(!l)return void m.clearMaybeInsertedClosing();c=this.$getIndent(o)}r=c+n.getTabString();return{text:"\n"+r+"\n"+c+l,selection:[1,r.length,1,r.length]}}m.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(u(i),"}"==n.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;g.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,i,n,r){if("("==r)return u(i),s=i.getSelectionRange(),""!==(o=n.doc.getTextRange(s))&&i.getWrapBehavioursEnabled()?p(s,o,"(",")"):m.isSaneInsertion(i,n)?(m.recordAutoInsert(i,n,")"),{text:"()",selection:[1,1]}):void 0;if(")"==r){u(i);var s=i.getCursorPosition(),o=n.doc.getLine(s.row),i=o.substring(s.column,s.column+1);if(")"==i)if(null!==n.$findOpeningBracket(")",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(u(i),")"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(e,t,i,n,r){if("["==r)return u(i),s=i.getSelectionRange(),""!==(o=n.doc.getTextRange(s))&&i.getWrapBehavioursEnabled()?p(s,o,"[","]"):m.isSaneInsertion(i,n)?(m.recordAutoInsert(i,n,"]"),{text:"[]",selection:[1,1]}):void 0;if("]"==r){u(i);var s=i.getCursorPosition(),o=n.doc.getLine(s.row),i=o.substring(s.column,s.column+1);if("]"==i)if(null!==n.$findOpeningBracket("]",{column:s.column+1,row:s.row})&&m.isAutoInsertedClosing(s,o,r))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(u(i),"]"==n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(e,t,i,n,r){var s=n.$mode.$quotes||v;if(1==r.length&&s[r]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(r))){u(i);var o=i.getSelectionRange(),a=n.doc.getTextRange(o);if(""!==a&&(1!=a.length||!s[a])&&i.getWrapBehavioursEnabled())return p(o,a,r,r);if(!a){var s=i.getCursorPosition(),o=n.doc.getLine(s.row),a=o.substring(s.column-1,s.column),i=o.substring(s.column,s.column+1),l=n.getTokenAt(s.row,s.column),h=n.getTokenAt(s.row,s.column+1);if("\\"==a&&l&&/escape/.test(l.type))return null;var c,l=l&&/string|escape/.test(l.type),d=!h||/string|escape/.test(h.type);if(i==r)(c=l!==d)&&/string\.end/.test(h.type)&&(c=!1);else{if(l&&!d)return null;if(l&&d)return null;h=n.$mode.tokenRe,l=(h.lastIndex=0,h.test(a)),d=(h.lastIndex=0,h.test(a));if(l||d)return null;if(i&&!/[\s;,.})\]\\]/.test(i))return null;n=o[s.column-2];if(a==r&&(n==r||h.test(n)))return null;c=!0}return{text:c?r+r:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,n,r){var s=n.$mode.$quotes||v,o=n.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(u(i),n.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})}var g,n=e("../../lib/oop"),r=e("../behaviour").Behaviour,s=e("../../token_iterator").TokenIterator,f=e("../../lib/lang"),o=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l={},v={'"':'"',"'":"'"};m.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new s(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",o)){if(/[)}\]]/.test(e.session.getLine(i.row)[i.column]))return!0;e=new s(t,i.row,i.column+1);if(!this.$matchTokenType(e.getCurrentToken()||"text",o))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",a)},m.$matchTokenType=function(e,t){return-1<t.indexOf(e.type||e)},m.recordAutoInsert=function(e,t,i){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isAutoInsertedClosing(e,t,g.autoInsertedLineEnd[0])||(g.autoInsertedBrackets=0),g.autoInsertedRow=e.row,g.autoInsertedLineEnd=i+t.substr(e.column),g.autoInsertedBrackets++},m.recordMaybeInsert=function(e,t,i){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isMaybeInsertedClosing(e,t)||(g.maybeInsertedBrackets=0),g.maybeInsertedRow=e.row,g.maybeInsertedLineStart=t.substr(0,e.column)+i,g.maybeInsertedLineEnd=t.substr(e.column),g.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(e,t,i){return 0<g.autoInsertedBrackets&&e.row===g.autoInsertedRow&&i===g.autoInsertedLineEnd[0]&&t.substr(e.column)===g.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(e,t){return 0<g.maybeInsertedBrackets&&e.row===g.maybeInsertedRow&&t.substr(e.column)===g.maybeInsertedLineEnd&&t.substr(0,e.column)==g.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){g.autoInsertedLineEnd=g.autoInsertedLineEnd.substr(1),g.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){g&&(g.maybeInsertedBrackets=0,g.maybeInsertedRow=-1)},n.inherits(m,r),t.CstyleBehaviour=m}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){"use strict";for(var n=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,s=[],o=0;o<n.length;o+=2)s.push(r+=n[o]),n[o+1]&&s.push(45,r+=n[o+1]);t.wordChars=String.fromCharCode.apply(null,s)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(e,t,i){"use strict";function n(){this.HighlightRules=s}var o=e("../config"),r=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),x=e("../lib/lang"),g=e("../token_iterator").TokenIterator,f=e("../range").Range;(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,r,i,n){function t(e){for(var t=i;t<=n;t++)e(s.getLine(t),t)}var s=r.doc,o=!0,a=!0,l=1/0,h=r.getTabSize(),c=!1;if(this.lineCommentStart){f=Array.isArray(this.lineCommentStart)?(b=this.lineCommentStart.map(x.escapeRegExp).join("|"),this.lineCommentStart[0]):(b=x.escapeRegExp(this.lineCommentStart),this.lineCommentStart),b=new RegExp("^(\\s*)(?:"+b+") ?"),c=r.getUseSoftTabs();var d=function(e,t){var i,n,r=e.match(b);r&&(i=r[1].length,n=r[0].length,g(e,i,n)||" "!=r[0][n-1]||n--,s.removeInLine(t,i,n))},u=f+" ",p=function(e,t){o&&!/\S/.test(e)||(g(e,l,l)?s.insertInLine({row:t,column:l},u):s.insertInLine({row:t,column:l},f))},m=function(e,t){return b.test(e)},g=function(e,t,i){for(var n=0;t--&&" "==e.charAt(t);)n++;if(n%h!=0)return!1;for(n=0;" "==e.charAt(i++);)n++;return 2<h?n%h!=h-1:n%h==0}}else{if(!this.blockComment)return!1;var f=this.blockComment.start,v=this.blockComment.end,b=new RegExp("^(\\s*)(?:"+x.escapeRegExp(f)+")"),y=new RegExp("(?:"+x.escapeRegExp(v)+")\\s*$"),p=function(e,t){m(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},v),s.insertInLine({row:t,column:l},f))},d=function(e,t){var i;(i=e.match(y))&&s.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(b))&&s.removeInLine(t,i[1].length,i[0].length)},m=function(e,t){if(b.test(e))return!0;for(var i=r.getTokens(t),n=0;n<i.length;n++)if("comment"===i[n].type)return!0}}var w=1/0;t(function(e,t){var i=e.search(/\S/);-1!==i?(i<l&&(l=i),a&&!m(e,t)&&(a=!1)):w>e.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;n<s.length;n++)!function(e){var t=s[n],i=e[t];e[s[n]]=function(){return this.$delegator(t,arguments,i)}}(this)},this.$delegator=function(e,t,i){var n=t[0]||"start";if("string"!=typeof n){if(Array.isArray(n[2])){var r=n[2][n[2].length-1];if(o=this.$modes[r])return o[e].apply(o,[n[1]].concat([].slice.call(t,1)))}n=n[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var o,a=n.split(this.$embeds[s]);if(!a[0]&&a[1])return t[0]=a[1],(o=this.$modes[this.$embeds[s]])[e].apply(o,t)}r=i.apply(this,t);return i?r:void 0},this.transformAction=function(e,t,i,n,r){if(this.$behaviour){var s,o=this.$behaviour.getBehaviours();for(s in o)if(o[s][t]){var a=o[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,i=[];for(n in t)for(var n,r=t[n],s=0,o=r.length;s<o;s++)if("string"==typeof r[s].token)/keyword|support|storage/.test(r[s].token)&&i.push(r[s].regex);else if("object"==typeof r[s].token)for(var a=0,l=r[s].token.length;a<l;a++)/keyword|support|storage/.test(r[s].token[a])&&(n=r[s].regex.match(/\(.+?\)/g)[a],i.push(n.substr(1,n.length-2)));this.completionKeywords=i}return e?i.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,i,n){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(n.prototype),t.Mode=n}),ace.define("ace/apply_delta",["require","exports","module"],function(e,t,i){"use strict";t.applyDelta=function(e,t,i){var n=t.start.row,r=t.start.column,s=e[n]||"";switch(t.action){case"insert":1===t.lines.length?e[n]=s.substring(0,r)+t.lines[0]+s.substring(r):(o=[n,1].concat(t.lines),e.splice.apply(e,o),e[n]=s.substring(0,r)+e[n],e[n+t.lines.length-1]+=s.substring(r));break;case"remove":var o=t.end.column,a=t.end.row;n===a?e[n]=s.substring(0,r)+s.substring(o):e.splice(n,a-n+1,s.substring(0,r)+e[a].substring(o))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),r=e("./lib/event_emitter").EventEmitter,e=t.Anchor=function(e,t,i){this.$onChange=this.onChange.bind(this),this.attach(e),void 0===i?this.setPosition(t.row,t.column):this.setPosition(t,i)};!function(){function a(e,t,i){i=i?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}n.implement(this,r),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var t,i,n,r,s,o;e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.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()))<this.getLength()?(t=t.concat([""]),0):(t=[""].concat(t),this.$lines[--e].length);this.insertMergedLines({row:e,column:i},t)},this.insertMergedLines=function(e,t){var e=this.clippedPos(e.row,e.column),i={row:e.row+t.length-1,column:(1==t.length?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:i,action:"insert",lines:t}),this.clonePos(i)},this.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),e=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},this.removeInLine=function(e,t,i){t=this.clippedPos(e,t),e=this.clippedPos(e,i);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})},!0),this.clonePos(t)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var i=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&0<e,n=t<this.getLength()-1,r=i?e-1:e,i=i?this.getLine(r).length:0,s=n?t+1:t,n=n?0:this.getLine(s).length,r=new a(r,i,s,n),i=this.$lines.slice(e,t+1);return this.applyDelta({start:r.start,end:r.end,action:"remove",lines:this.getLinesForRange(r)}),i},this.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof a||(e=a.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(var t=e.length-1;0<=t;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!a.comparePoints(e.start,e.end))||(i&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},this.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length-t+1,r=e.start.row,s=e.start.column,o=0,a=0;o<n;o=a){a+=t-1;var l=i.slice(o,a);l.push(""),this.applyDelta({start:this.pos(r+o,s),end:this.pos(r+a,s=0),action:e.action,lines:l},!0)}e.lines=i.slice(o),e.start.row=r+o,e.start.column=s,this.applyDelta(e,!0)},this.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=t||0,s=i.length;r<s;r++)if((e-=i[r].length+n)<0)return{row:r,column:e+i[r].length+n};return{row:s-1,column:e+i[s-1].length+n}},this.positionToIndex=function(e,t){for(var i=this.$lines||this.getAllLines(),n=this.getNewLineCharacter().length,r=0,s=Math.min(e.row,i.length),o=t||0;o<s;++o)r+=i[o].length+n;return r+e.column}}).call(n.prototype),t.Document=n}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var a=this;this.$worker=function(){if(a.running){for(var e=new Date,t=a.currentLine,i=-1,n=a.doc,r=t;a.lines[t];)t++;var s=n.getLength(),o=0;for(a.running=!1;t<s;){for(a.$tokenizeRow(t),i=t;t++,a.lines[t];);if(++o%5==0&&20<new Date-e){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,r<=(i=-1==i?t:i)&&a.fireUpdateEvent(r,i)}}}var r=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter;(function(){r.implement(this,s),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){this._signal("update",{data:{first:e,last:t}})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,i=e.end.row-t;0==i?this.lines[t]=null:"remove"==e.action?(this.lines.splice(t,1+i,null),this.states.splice(t,1+i,null)):((e=Array(1+i)).unshift(t,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)),this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),i=this.states[e-1],t=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=t.state+""?(this.states[e]=t.state,this.lines[e+1]=null,this.currentLine>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.row<this.startRow||e.endRow>this.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.range.compareEnd(e.start.row,e.start.column)?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=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;l<o.length;l++){if(-1==(r=(n=o[l]).range.compareStart(t,i)))return void e(null,t,i,s,a);if(!e(null,n.start.row,n.start.column,s,a)&&e(n.placeholder,n.start.row,n.start.column,s)||0===r)return;a=!n.sameRow,s=n.end.column}e(null,t,i,s,a)},this.getNextFoldTo=function(e,t){for(var i,n,r=0;r<this.folds.length;r++){if(-1==(n=(i=this.folds[r]).range.compareEnd(e,t)))return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}return null},this.addRemoveChars=function(e,t,i){var n,r=this.getNextFoldTo(e,t);if(r)if(n=r.fold,"inside"==r.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);else if(n.start.row==e){var s,o=(s=this.folds).indexOf(n);for(0===o&&(this.start.column+=i);o<s.length;o++){if((n=s[o]).start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){var i,n,e=this.getNextFoldTo(e,t);return e&&"inside"!=e.kind?(t=e.fold,e=this.folds,i=this.foldData,t=e.indexOf(t),n=e[t-1],this.end.row=n.end.row,this.end.column=n.end.column,n=new r(i,e=e.splice(t,e.length-t)),i.splice(i.indexOf(this)+1,0,n),n):null},this.merge=function(e){for(var t=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);var n=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach(function(e){t.push(" "+e.toString())}),t.push("]"),t.join("\n")},this.idxToPosition=function(e){for(var t=0,i=0;i<this.folds.length;i++){var n=this.folds[i];if((e-=n.start.column-t)<0)return{row:n.start.row,column:n.start.column+e};if((e-=n.placeholder.length)<0)return n.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(r.prototype),t.FoldLine=r}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";function n(){this.ranges=[],this.$bias=1}var a=e("./range").Range.comparePoints;(function(){this.comparePoints=a,this.pointIndex=function(e,t,i){for(var n=this.ranges,r=i||0;r<n.length;r++){var s=n[r],o=a(e,s.end);if(!(0<o))return s=a(e,s.start),0===o?t&&0!==s?-r-2:r:0<s||0===s&&!t?r:-r-1}return-r-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t),t=this.pointIndex(e.end,t,i=i<0?-i-1:i);return t<0?t=-t-1:t++,this.ranges.splice(i,t-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));return t},this.substractPoint=function(e){e=this.pointIndex(e);if(0<=e)return this.ranges.splice(e,1)},this.merge=function(){for(var e=[],t=this.ranges,i=(t=t.sort(function(e,t){return a(e.start,t.start)}))[0],n=1;n<t.length;n++){var r=i,i=t[n],s=a(r.end,i.start);s<0||(0!=s||r.isEmpty()||i.isEmpty())&&(a(r.end,i.end)<0&&(r.end.row=i.end.row,r.end.column=i.end.column),t.splice(n,1),e.push(i),i=r,n--)}return this.ranges=t,e},this.contains=function(e,t){return 0<=this.pointIndex({row:e,column:t})},this.containsPoint=function(e){return 0<=this.pointIndex(e)},this.rangeAtPoint=function(e){e=this.pointIndex(e);if(0<=e)return this.ranges[e]},this.clipRows=function(e,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];for(var e=this.pointIndex({row:e,column:0}),n=this.pointIndex({row:t,column:0},e=e<0?-e-1:e),r=(n<0&&(n=-n-1),[]),s=e;s<n;s++)r.push(i[s]);return r},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){for(var t=e.start,i=e.end,n=t.row,r=i.row,s=this.ranges,o=0,a=s.length;o<a&&!((c=s[o]).end.row>=n);o++);if("insert"==e.action)for(var l=r-n,h=-t.column+i.column;o<a;o++){if((c=s[o]).start.row>n)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&&0<h&&o<a-1&&c.end.column>c.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;o<a;o++){if((c=s[o]).start.row>r)break;c.end.row<r&&(n<c.end.row||n==c.end.row&&t.column<c.end.column)?(c.end.row=n,c.end.column=t.column):c.end.row==r?c.end.column<=i.column?(l||c.end.column>t.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.row<r&&(n<c.start.row||n==c.start.row&&t.column<c.start.column)?(c.start.row=n,c.start.column=t.column):c.start.row==r?c.start.column<=i.column?(l||c.start.column>t.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<a)for(;o<a;o++)(c=s[o]).start.row+=l,c.end.row+=l}}).call(n.prototype),t.RangeList=n}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"],function(e,t,i){"use strict";function d(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function n(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}var r=e("../range_list").RangeList,e=e("../lib/oop"),s=t.Fold=function(e,t){this.foldLine=null,this.placeholder=t,this.range=e,this.start=e.start,this.end=e.end,this.sameRow=e.start.row==e.end.row,this.subFolds=this.ranges=[]};e.inherits(s,r),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach(function(e){e.setFoldLine(t)})},this.clone=function(){var e=this.range.clone(),t=new s(e,this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},this.addSubFold=function(e){if(!this.range.isEqual(e)){s=e,o=this.start,d(s.start,o),d(s.end,o);for(var t=e.start.row,i=e.start.column,n=0,r=-1;n<this.subFolds.length&&1==(r=this.subFolds[n].range.compare(t,i));n++);var s=this.subFolds[n],o=0;if(0==r){if(s.range.containsRange(e))return s.addSubFold(e);o=1}for(var t=e.range.end.row,i=e.range.end.column,a=n,r=-1;a<this.subFolds.length&&1==(r=this.subFolds[a].range.compare(t,i));a++);0==r&&a++;for(var l=this.subFolds.splice(n,a-n,e),h=0==r?l.length-1:l.length,c=o;c<h;c++)e.addSubFold(l[c]);return e.setFoldLine(this.foldLine),e}},this.restoreRange=function(e){return e=e,t=this.start,n(e.start,t),void n(e.end,t);var t}}.call(s.prototype)}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(e,t,i){"use strict";var h=e("../range").Range,u=e("./fold_line").FoldLine,p=e("./fold").Fold,c=e("../token_iterator").TokenIterator;t.Folding=function(){this.getFoldAt=function(e,t,i){var n=this.getFoldLine(e);if(!n)return null;for(var r=n.folds,s=0;s<r.length;s++){var o=r[s].range;if(o.contains(e,t)&&(1!=i||!o.isEnd(e,t)||o.isEmpty())&&(-1!=i||!o.isStart(e,t)||o.isEmpty()))return r[s]}},this.getFoldsInRange=function(e){var t=e.start,i=e.end,n=this.$foldData,r=[];t.column+=1,--i.column;for(var s=0;s<n.length;s++){var o=n[s].range.compareRange(e);if(2!=o){if(-2==o)break;for(var a=n[s].folds,l=0;l<a.length;l++){var h=a[l];if(-2==(o=h.range.compareRange(e)))break;if(2!=o){if(42==o)break;r.push(h)}}}}return--t.column,i.column+=1,r},this.getFoldsInRangeList=function(e){var t;return Array.isArray(e)?(t=[],e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)):t=this.getFoldsInRange(e),t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,i=0;i<t.length;i++)for(var n=0;n<t[i].folds.length;n++)e.push(t[i].folds[n]);return e},this.getFoldStringAt=function(e,t,i,n){if(!(n=n||this.getFoldLine(e)))return null;for(var r,s={end:{column:0}},o=0;o<n.folds.length;o++){var a,l=(a=n.folds[o]).range.compareEnd(e,t);if(-1==l){r=this.getLine(a.start.row).substring(s.end.column,a.start.column);break}if(0===l)return null;s=a}return r=r||this.getLine(a.start.row).substring(s.end.column),-1==i?r.substring(0,t-s.end.column):1==i?r.substring(t-s.end.column):r},this.getFoldLine=function(e,t){var i=this.$foldData,n=0;for(-1==(n=t?i.indexOf(t):n)&&(n=0);n<i.length;n++){var r=i[n];if(r.start.row<=e&&r.end.row>=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<i.length;n++){var r=i[n];if(r.end.row>=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,r=0;r<i.length;r++){var s=i[r],o=s.end.row,s=s.start.row;if(t<=o){s<t&&(e<=s?n-=t-s:n=0);break}e<=o&&(n-=e<=s?o-s:o-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var i,n=this.$foldData,r=!1,s=(e instanceof p?i=e:(i=new p(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range),i.start.row),e=i.start.column,o=i.end.row,t=i.end.column,a=this.getFoldAt(s,e,1),l=this.getFoldAt(o,t,-1);if(a&&l==a)return a.addSubFold(i);a&&!a.range.isStart(s,e)&&this.removeFold(a),l&&!l.range.isEnd(o,t)&&this.removeFold(l);e=this.getFoldsInRange(i.range);0<e.length&&(this.removeFolds(e),i.collapseChildren||e.forEach(function(e){i.addSubFold(e)}));for(var h=0;h<n.length;h++){var c=n[h];if(o==c.start.row){c.addFold(i),r=!0;break}if(s==c.end.row){if(c.addFold(i),r=!0,!i.sameRow){var d=n[h+1];if(d&&d.start.row==o){c.merge(d);break}}break}if(o<=c.start.row)break}return r||(c=this.$addFoldLine(new u(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(c.start.row,c.start.row):this.$updateRowLengthCache(c.start.row,c.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(e){e.forEach(function(e){this.addFold(e)},this)},this.removeFold=function(e){var t=e.foldLine,i=t.start.row,n=t.end.row,r=this.$foldData,s=t.folds;1==s.length?r.splice(r.indexOf(t),1):t.range.isEnd(e.end.row,e.end.column)?(s.pop(),t.end.row=s[s.length-1].end.row,t.end.column=s[s.length-1].end.column):t.range.isStart(e.start.row,e.start.column)?(s.shift(),t.start.row=s[0].start.row,t.start.column=s[0].start.column):e.sameRow?s.splice(s.indexOf(e),1):((s=(r=t.split(e.start.row,e.start.column)).folds).shift(),r.start.row=s[0].start.row,r.start.column=s[0].start.column),this.$updating||(this.$useWrapMode?this.$updateWrapData(i,n):this.$updateRowLengthCache(i,n)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],i=0;i<e.length;i++)t.push(e[i]);t.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(t){this.removeFold(t),t.subFolds.forEach(function(e){t.restoreRange(e),this.addFold(e)},this),0<t.collapseChildren&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var i;if(null==e?(i=new h(0,0,this.getLength(),0),null==t&&(t=!0)):i="number"==typeof e?new h(e,0,e,this.getLine(e).length):"row"in e?h.fromPoints(e,e):e,e=this.getFoldsInRangeList(i),0!=t?this.removeFolds(e):this.expandFolds(e),e.length)return e},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){t=this.getFoldLine(e,t);return t?t.end.row:e},this.getRowFoldStart=function(e,t){t=this.getFoldLine(e,t);return t?t.start.row:e},this.getFoldDisplayLine=function(e,t,i,r,s){null==r&&(r=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,a="";return e.walk(function(e,t,i,n){if(!(t<r)){if(t==r){if(i<s)return;n=Math.max(s,n)}a+=null!=e?e:o.getLine(t).substring(n,i)}},t,i),a},this.getDisplayLine=function(e,t,i,n){var r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,i,n):(r=this.doc.getLine(e)).substring(n||0,t||r.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(e){e=e.folds.map(function(e){return e.clone()});return new u(t,e)})},this.toggleFold=function(e){var t=this.selection.getRange();if(t.isEmpty()){var i,n=t.start;if(i=this.getFoldAt(n.row,n.column))return void this.expandFold(i);(r=this.findMatchingBracket(n))?1==t.comparePoint(r)?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:n.row,column:n.column+1}))?(1==t.comparePoint(r)?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(n.row,n.column)||t}else{var r=this.getFoldsInRange(t);if(e&&r.length)return void this.expandFolds(r);1==r.length&&(i=r[0])}if((i=i||this.getFoldAt(t.start.row,t.start.column))&&i.range.toString()==t.toString())this.expandFold(i);else{n="...";if(!t.isMultiLine()){if((n=this.getTextRange(t)).length<4)return;n=n.trim().substring(0,2)+".."}this.addFold(n,t)}},this.getCommentFoldRange=function(e,t,i){var n=new c(this,e,t),r=n.getCurrentToken(),s=r&&r.type;if(r&&/^comment|string/.test(s)){"comment"==(s=s.match(/comment|string/)[0])&&(s+="|doc-start");var o=new RegExp(s),s=new h;if(1!=i){for(;(r=n.stepBackward())&&o.test(r.type););n.stepForward()}if(s.start.row=n.getCurrentTokenRow(),s.start.column=n.getCurrentTokenColumn()+2,n=new c(this,e,t),-1!=i){var a=-1;do{if(r=n.stepForward(),-1==a){var l=this.getState(n.$row);o.test(l)||(a=n.$row)}else if(n.$row>a)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<t;o++)null==r[o]&&(r[o]=this.getFoldWidget(o)),"start"!=r[o]||n&&!n(o)||(s=this.getFoldWidgetRange(o))&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(o=s.end.row,s.collapseChildren=i,this.addFold("...",s))}},this.foldToLevel=function(e){for(this.foldAll();0<e--;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(e){for(var t=r.getTokens(e),i=0;i<t.length;i++){var n=t[i];if("text"!=n.type||!/^\s+$/.test(n.value))return!!/comment/.test(n.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");this.$foldStyle!=e&&("manual"==(this.$foldStyle=e)&&this.unfold(),e=this.$foldMode,this.$setFolding(null),this.$setFolding(e))},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n=e-1;0<=n;){var r=i[n];if("start"==(r=null==r?i[n]=this.getFoldWidget(n):r)){var s=this.getFoldWidgetRange(n),o=o||s;if(s&&s.end.row>=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<h;){var c=l.charAt(a);if(c==n){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else c==e&&(r+=1);a+=1}for(;(o=s.stepForward())&&!i.test(o.type););if(null==o)break;a=0}return null}}}}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(e,t,i){"use strict";function n(e,t){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++n.$uid,this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new u(e)),this.setDocument(e),this.selection=new a(this),this.$bidiHandler=new o(this),l.resetOptions(this),this.setMode(t),l._signal("session",this)}var r=e("./lib/oop"),s=e("./lib/lang"),o=e("./bidihandler").BidiHandler,l=e("./config"),h=e("./lib/event_emitter").EventEmitter,a=e("./selection").Selection,c=e("./mode/text").Mode,d=e("./range").Range,u=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,f=e("./search_highlight").SearchHighlight;n.$uid=0,function(){function a(e){return!(e<4352)&&(4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12288<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510)}r.implement(this,h),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),(this.doc=e).on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){var t;e?(t=this.$docRowCache.length,(e=this.$getRowCacheIndex(this.$docRowCache,e)+1)<t&&(this.$docRowCache.splice(e,t),this.$screenRowCache.splice(e,t))):(this.$docRowCache=[],this.$screenRowCache=[])},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var r=i+n>>1,s=e[r];if(s<t)i=1+r;else{if(!(t<s))return r;n=r-1}}return i-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(e){e=e.data;this.$resetRowCache(e.start.row)},this.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},this.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(e){return this.bgTokenizer.getState(e)},this.getTokens=function(e){return this.bgTokenizer.getTokens(e)},this.getTokenAt=function(e,t){var i=this.bgTokenizer.getTokens(e),n=0;if(null==t)var r=i.length-1,n=this.getLine(e).length;else for(r=0;r<i.length&&!(t<=(n+=i[r].value.length));r++);return(e=i[r])?(e.index=r,e.start=n-e.value.length,e):null},this.setUndoManager=function(e){var t;this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e?(e.addSession(t=this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(e,t){(t=void 0===t?"ace_breakpoint":t)?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},this.addMarker=function(e,t,i,n){var r=this.$markerId++,e={range:e,type:i||"line",renderer:"function"==typeof i?i:null,clazz:t,inFront:!!n,id:r};return n?(this.$frontMarkers[r]=e,this._signal("changeFrontMarker")):(this.$backMarkers[r]=e,this._signal("changeBackMarker")),r},this.addDynamicMarker=function(e,t){var i;if(e.update)return i=this.$markerId++,e.id=i,e.inFront=!!t,t?(this.$frontMarkers[i]=e,this._signal("changeFrontMarker")):(this.$backMarkers[i]=e,this._signal("changeBackMarker")),e},this.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},this.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},this.highlight=function(e){var t;this.$searchHighlight||(t=new f(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(t)),this.$searchHighlight.setRegexp(e)},this.highlightLines=function(e,t,i,n){"number"!=typeof t&&(i=t,t=e),i=i||"ace_step";e=new d(e,0,t,1/0);return e.id=this.addMarker(e,i,"fullLine",n),e},this.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(e){e=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},this.getWordRange=function(e,t){var i,n=this.getLine(e),r=!1,s=(i=(r=(r=0<t?!!n.charAt(t-1).match(this.tokenRe):r)||!!n.charAt(t).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(n.slice(t-1,t+1))?/\s/:this.nonTokenRe,t);if(0<s){for(;0<=--s&&n.charAt(s).match(i););s++}for(var o=t;o<n.length&&n.charAt(o).match(i);)o++;return new d(e,s,e,o)},this.getAWordRange=function(e,t){for(var i=this.getWordRange(e,t),n=this.getLine(i.end.row);n.charAt(i.end.column).match(/[ \t]/);)i.end.column+=1;return i},this.setNewLineMode=function(e){this.doc.setNewLineMode(e)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(e){this.setOption("useWorker",e)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},this.$modes=l.$modes,this.$mode=null,this.$modeId=null,this.setMode=function(e,t){if(e&&"object"==typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var i=e,n=i.path}else n=e||"ace/mode/text";this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[n]&&!i?(this.$onChangeMode(this.$modes[n]),t&&t()):(this.$modeId=n,l.loadModule(["mode",n],function(e){if(this.$modeId!==n)return t&&t();this.$modes[n]&&!i?this.$onChangeMode(this.$modes[n]):e&&e.Mode&&(e=new e.Mode(i),i||((this.$modes[n]=e).$id=n),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0))},this.$onChangeMode=function(e,t){var i,n,r,s;t||(this.$modeId=e.$id),this.$mode===e||(i=this.$mode,this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(n=e.getTokenizer()).on&&(r=this.onReloadTokenizer.bind(this),n.on("update",r)),this.bgTokenizer?this.bgTokenizer.setTokenizer(n):(this.bgTokenizer=new p(n),(s=this).bgTokenizer.on("update",function(e){s._signal("tokenizerUpdate",e)})),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t)||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:i,mode:e}))},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){l.warn("Could not load worker",e),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},this.getScrollLeft=function(){return this.$scrollLeft},this.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},this.getLineWidgetMaxWidth=function(){var t;return null!=this.lineWidgetsWidth?this.lineWidgetsWidth:(t=0,this.lineWidgets.forEach(function(e){e&&e.screenWidth>t&&(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;l<a;l++){if(o<l){if(a<=(l=s.end.row+1))break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(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;i<e.length;i++){var n=e[i];"insert"!=n.action&&"remove"!=n.action||this.doc.$safeApplyDelta(n)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},this.setUndoSelect=function(e){this.$undoSelect=e},this.$getUndoSelection=function(e,t){function i(e){return t?"insert"!==e.action:"insert"===e.action}for(var n,r,s=0;s<e.length;s++){var o=e[s];o.start&&(n?i(o)?(r=o.start,-1==n.compare(r.row,r.column)&&n.setStart(r),r=o.end,1==n.compare(r.row,r.column)&&n.setEnd(r)):(r=o.start,-1==n.compare(r.row,r.column)&&(n=d.fromPoints(o.start,o.start))):n=i(o)?d.fromPoints(o.start,o.end):d.fromPoints(o.start,o.start))}return n},this.replace=function(e,t){return this.doc.replace(e,t)},this.moveText=function(e,t,i){var n,r,s,o=this.getTextRange(e),a=this.getFoldsInRange(e),t=d.fromPoints(t,t);return i||(this.remove(e),r=e.start.row-e.end.row,(s=r?-e.end.column:e.start.column-e.end.column)&&(t.start.row==e.end.row&&t.start.column>e.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;o<n&&" "==s.charAt(o);++o);o<n&&"\t"==s.charAt(o)?(i.start.column=o,i.end.column=o+1):(i.start.column=0,i.end.column=o),this.remove(i)}},this.$moveLines=function(e,t,i){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),i<0){if((r=this.getRowFoldStart(e+i))<0)return 0;var n=r-e}else if(0<i){if((r=this.getRowFoldEnd(t+i))>this.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<t&&(this.$wrapLimit=t,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),e=i?Math.min(i,e):e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,i=e.action,n=e.start,r=e.end,s=n.row,o=r.row,a=o-s,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(s,a);var h=this.$foldData,l=this.getFoldsInRange(e);this.removeFolds(l);var c=0;for((p=this.getFoldLine(r.row))&&(p.addRemoveChars(r.row,r.column,n.column-r.column),p.shiftRow(-a),(d=this.getFoldLine(s))&&d!==p&&(d.merge(p),p=d),c=h.indexOf(p)+1);c<h.length;c++)(p=h[c]).start.row>=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<h.length;c++)(p=h[c]).start.row>=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<r.length;s++)r[s]=g}else r=this.$getDisplayTokens(a[t].substring(n,i),o.length);o=o.concat(r)}.bind(this),i.end.row,a[i.end.row].length+1),r[i.start.row]=this.$computeWrapSplits(o,s,n),l=i.end.row+1):(o=this.$getDisplayTokens(a[l]),r[l]=this.$computeWrapSplits(o,s,n),l++)};var m=3,g=4;this.$computeWrapSplits=function(r,e,s){function t(e){for(var t=e-a,i=a;i<e;i++){var n=r[i];12!==n&&2!==n||--t}o.length||(u=function(){var e=0;if(0===d)return e;if(c)for(var t=0;t<r.length;t++){var i=r[t];if(10==i)e+=1;else{if(11!=i){if(12==i)continue;break}e+=s}}return h&&!1!==c&&(e+=s),Math.min(e,d)}(),o.indent=u),l+=t,o.push(l),a=e}if(0==r.length)return[];for(var o=[],i=r.length,a=0,l=0,h=this.$wrapAsCode,c=this.$indentedSoftWrap,d=e<=Math.max(2*s,8)||!1===c?0:Math.floor(e/2),u=0;e-u<i-a;){var n=a+e-u;if(10<=r[n-1]&&10<=r[n])t(n);else if(r[n]==m||r[n]==g){for(;n!=a-1&&r[n]!=m;n--);if(a<n);else{for(n=a+e;n<r.length&&r[n]==g;n++);if(n==r.length)break}t(n)}else{for(var p=Math.max(n-(e-(e>>2)),a-1);p<n&&r[n]<m;)n--;if(h){for(;p<n&&r[n]<m;)n--;for(;p<n&&9==r[n];)n--}else for(;p<n&&r[n]<10;)n--;p<n?t(++n):(2==r[n=a+e]&&n--,t(n-u))}}return o},this.$getDisplayTokens=function(e,t){var i,n=[];t=t||0;for(var r=0;r<e.length;r++){var s=e.charCodeAt(r);if(9==s){i=this.getScreenTabSize(n.length+t),n.push(11);for(var o=1;o<i;o++)n.push(12)}else 32==s?n.push(10):39<s&&s<48||57<s&&s<64?n.push(9):4352<=s&&a(s)?n.push(1,2):n.push(1)}return n},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,r;for(null==t&&(t=1/0),i=i||0,r=0;r<e.length&&(9==(n=e.charCodeAt(r))?i+=this.getScreenTabSize(i):4352<=n&&a(n)?i+=2:i+=1,!(t<i));r++);return[i,r]},this.lineWidgets=null,this.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){var t;return this.$useWrapMode&&(e=this.screenToDocumentPosition(e,Number.MAX_VALUE),(t=this.$wrapData[e.row]).length)&&t[0]<e.column?t.indent:0},this.getScreenLastRowColumn=function(e){e=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},this.getDocumentLastRowColumn=function(e,t){e=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(e)},this.getDocumentLastRowColumnPosition=function(e,t){e=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(e,Number.MAX_VALUE/10)},this.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},this.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},this.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},this.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},this.screenToDocumentPosition=function(e,t,i){if(e<0)return{row:0,column:0};for(var n,r,s,o=0,a=0,l=0,h=0,c=this.$screenRowCache,d=this.$getRowCacheIndex(c,e),u=c.length,p=(s=u&&0<=d?(l=c[d],o=this.$docRowCache[d],e>c[u-1]):!u,this.getLength()-1),m=this.getNextFoldLine(o),g=m?m.start.row:1/0;l<=e&&!(e<l+(h=this.getRowLength(o))||p<=o);)l+=h,g<++o&&(o=m.end.row+1,g=(m=this.getNextFoldLine(o,m))?m.start.row:1/0),s&&(this.$docRowCache.push(o),this.$screenRowCache.push(l));if(m&&m.start.row<=o)n=this.getFoldDisplayLine(m),o=m.start.row;else{if(l+h<=e||p<o)return{row:p,column:this.getLine(p).length};n=this.getLine(o),m=null}d=0,c=Math.floor(e-l);return this.$useWrapMode&&(u=this.$wrapData[o])&&(r=u[c],0<c)&&u.length&&(d=u.indent,a=u[c-1]||u[u.length-1],n=n.substring(a)),void 0!==i&&this.$bidiHandler.isBidiRow(l+c,o,c)&&(t=this.$bidiHandler.offsetToCol(i)),a+=this.$getStringScreenWidth(n,t-d)[1],this.$useWrapMode&&r<=a&&(a=r-1),m?m.idxToPosition(a):{row:o,column:a}},this.documentToScreenPosition=function(e,t){var i=void 0===t?this.$clipPositionToDocument(e.row,e.column):this.$clipPositionToDocument(e,t),n=(e=i.row,t=i.column,0),i=null;(a=this.getFoldAt(e,t,1))&&(e=a.start.row,t=a.start.column);for(var r,s,o=0,a=this.$docRowCache,l=this.$getRowCacheIndex(a,e),h=a.length,c=(s=h&&0<=l?(o=a[l],n=this.$screenRowCache[l],e>a[h-1]):!h,this.getNextFoldLine(o)),d=c?c.start.row:1/0;o<e;){if(d<=o){if(e<(r=c.end.row+1))break;d=(c=this.getNextFoldLine(r,c))?c.start.row:1/0}else r=o+1;n+=this.getRowLength(o),o=r,s&&(this.$docRowCache.push(o),this.$screenRowCache.push(n))}var u="",i=c&&d<=o?(u=this.getFoldDisplayLine(c,e,t),c.start.row):(u=this.getLine(e).substring(0,t),e),l=0;if(this.$useWrapMode){var p=this.$wrapData[i];if(p){for(var m=0;u.length>=p[m];)n++,m++;u=u.substring(p[m-1]||0,u.length),l=0<m?p.indent:0}}return this.lineWidgets&&this.lineWidgets[o]&&this.lineWidgets[o].rowsAbove&&(n+=this.lineWidgets[o].rowsAbove),{row:n,column:l+this.$getStringScreenWidth(u)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var i=this.$wrapData.length,n=0,r=0,s=(t=this.$foldData[r++])?t.start.row:1/0;n<i;){var o=this.$wrapData[n];e+=o?o.length+1:1,s<++n&&(n=t.end.row+1,s=(t=this.$foldData[r++])?t.start.row:1/0)}else for(var e=this.getLength(),a=this.$foldData,r=0;r<a.length;r++)e-=(t=a[r]).end.row-t.start.row;return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},this.$setFontMetrics=function(s){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,t,i){if(0===t)return[0,0];var n,r;for(t=t||1/0,i=i||0,r=0;r<e.length&&!(t<(i+="\t"===(n=e.charAt(r))?this.getScreenTabSize(i):s.getCharacterWidth(n)));r++);return[i,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=a}.call(n.prototype),e("./edit_session/folding").Folding.call(n.prototype),e("./edit_session/bracket_match").BracketMatch.call(n.prototype),l.defineOptions(n.prototype,"session",{wrap:{set:function(e){e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e&&((this.$wrap=e)?(this.setWrapLimitRange(e="number"==typeof e?e:null,e),this.setUseWrapMode(!0)):this.setUseWrapMode(!1))},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode)&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){0<(e=parseInt(e))&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=n}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";function n(){this.$options={}}var b=e("./lib/lang"),r=e("./lib/oop"),y=e("./range").Range;(function(){this.set=function(e){return r.mixin(this.$options,e),this},this.getOptions=function(){return b.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var r,s=this.$options,e=this.$matchIterator(e,s);return!!e&&(r=null,e.forEach(function(e,t,i,n){return r=new y(e,t,i,n),!(t==n&&s.start&&s.start.start&&0!=s.skipCurrent&&r.isEqual(s.start)&&(r=null,1))}),r)},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,n=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),r=[],s=t.re;if(t.$isMultiLine){var o,a=s.length,l=n.length-a;e:for(var h=s.offset||0;h<=l;h++){for(var c=0;c<a;c++)if(-1==n[h+c].search(s[c]))continue e;var d=n[h],u=n[h+a-1],d=d.length-d.match(s[0])[0].length,u=u.match(s[a-1])[0].length;o&&o.end.row===h&&o.end.column>d||(r.push(o=new y(h,d,h+a-1,u)),2<a&&(h=h+a-2))}}else for(var p=0;p<n.length;p++)for(var m=b.getMatchOffsets(n[p],s),c=0;c<m.length;c++){var g=m[c];r.push(new y(p,g.offset,p,g.offset+g.length))}if(i){for(var f=i.start.column,v=i.start.column,p=0,c=r.length-1;p<c&&r[p].start.column<f&&r[p].start.row==i.start.row;)p++;for(;p<c&&r[c].end.column>v&&r[c].end.row==i.end.row;)c--;for(r=r.slice(p,c+1),p=0,c=r.length;p<c;p++)r[p].start.row+=i.start.row,r[p].end.row+=i.start.row}return r},this.replace=function(e,t){var i=this.$options,n=this.$assembleRegExp(i);if(i.$isMultiLine)return t;if(n){var r=n.exec(e);if(!r||r[0].length!=e.length)return null;if(t=e.replace(n,t),i.preserveCase){t=t.split("");for(var s=Math.min(e.length,e.length);s--;){var o=e[s];o&&o.toLowerCase()!=o?t[s]=t[s].toUpperCase():t[s]=t[s].toLowerCase()}t=t.join("")}return t}},this.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var i,n=e.needle;if(!e.needle)return e.re=!1;function r(e){return/\w/.test(e)||i.regExp?"\\b":""}e.regExp||(n=b.escapeRegExp(n)),e.wholeWord&&(i=e,n=r((s=n)[0])+s+r(s[s.length-1]));var s=e.caseSensitive?"gm":"gmi";if(e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,s);try{var o=new RegExp(n,s)}catch(e){o=!1}return e.re=o},this.$assembleMultilineRegExp=function(e,t){for(var i=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],r=0;r<i.length;r++)try{n.push(new RegExp(i[r],t))}catch(e){return!1}return n},this.$matchIterator=function(c,i){var a,e,t,n,r,s,l,o,d=this.$assembleRegExp(i);return!!d&&(a=1==i.backwards,e=0!=i.skipCurrent,t=i.range,(n=(n=i.start)||(t?t[a?"end":"start"]:c.selection.getRange())).start&&(n=n[e!=a?"end":"start"]),r=t?t.start.row:0,s=t?t.end.row:c.getLength()-1,o=i.$isMultiLine?(l=d.length,function(e,t,i){var n=a?e-l+1:e;if(!(n<0)){var r=c.getLine(n),e=r.search(d[0]);if(!(!a&&e<t||-1===e)){for(var s=1;s<l;s++)if(-1==(r=c.getLine(n+s)).search(d[s]))return;var o=r.match(d[l-1])[0].length;if(!(a&&t<o))return!!i(n,e,n+l-1,o)||void 0}}}):a?function(e,t,i){var n,r=c.getLine(e),s=[];for(d.lastIndex=0;n=d.exec(r);){var o=n[0].length,a=n.index;if(!o){if(a>=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;s<r.length;s++)if(i<o(r[s]))break;r.splice(s,0,t)}else delete n[e]},this.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var t=i[e];if(t){if("string"==typeof t)return this.bindKey(t,e);"object"==typeof(t="function"==typeof t?{exec:t}:t)&&(t.name||(t.name=e),this.addCommand(t))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),i=t.pop(),n=a[i];if(a.FUNCTION_KEYS[n])i=a.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var o=a.KEY_MODS[t[s]];if(null==o)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=o}return{key:i,hashId:r}},this.findKeyCommand=function(e,t){e=l[e]+t;return this.commandKeyBinding[e]},this.handleKeyboard=function(e,t,i,n){var r,s;if(!(n<0))return r=l[t]+i,s=this.commandKeyBinding[r],e.$keyChain&&(e.$keyChain+=" "+r,s=this.commandKeyBinding[e.$keyChain]||s),!s||"chainKeys"!=s&&"chainKeys"!=s[s.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||0<n)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-r.length-1)),{command:s}):(e.$keyChain=e.$keyChain||r,{command:"null"})},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=r}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})}var r=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter;r.inherits(n,s),function(){r.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))return!0;return!1}var r;return!!(e="string"==typeof e?this.commands[e]:e)&&!(t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t)||((r={editor:t,command:e,args:i}).returnValue=this._emit("exec",r),this._signal("afterExec",r),!1===r.returnValue))},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e=e[1]?e:e[0]})}}.call(n.prototype),t.CommandManager=n}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,i){"use strict";function n(e,t){return{win:e,mac:t}}var l=e("../lib/lang"),r=e("../config"),h=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:n("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:n("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:n("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:n("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:n("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:n("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:n("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:n("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:n("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:n("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:n("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:n(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:n("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:n("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:n("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:n("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(l.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:n("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:n(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),n=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),t=e.session.doc.getLine(i.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,s=e.session.doc.getLine(i.row),o=i.row+1;o<=n.row+1;o++){var a=l.stringTrimLeft(l.stringTrimRight(e.session.doc.getLine(o)));s+=a=0!==a.length?" "+a:a}n.row+1<e.session.doc.getLength()-1&&(s+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new h(i.row,0,n.row+2,0),s),0<r?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+r)):(t=e.session.doc.getLine(i.row).length>t?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.length;s++)s!=n.length-1||n[s].end.row===t&&n[s].end.column===i||r.push(new h(n[s].end.row,n[s].end.column,t,i)),0===s?0===n[s].start.row&&0===n[s].start.column||r.push(new h(0,0,n[s].start.row,n[s].start.column)):r.push(new h(n[s-1].end.row,n[s-1].end.column,n[s].start.row,n[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<r.length;s++)e.selection.addRange(r[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",description:"Open command pallete",bindKey:n("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:n(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var s=1;s<9;s++)t.commands.push({name:"foldToLevel"+s,description:"Fold To Level "+s,level:s,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"],function(e,t,i){"use strict";e("./lib/fixoldbrowsers");function r(e,t,i){this.$toDestroy=[];var n=e.getContainerElement();this.container=n,this.renderer=e,this.id="editor"+ ++r.$uid,this.commands=new m(o.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new a(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new l(this),new h(this)),this.keyBinding=new c(this),this.$search=(new u).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=g.delayedCall(function(){this._signal("input",{}),this.session&&this.session.bgTokenizer&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(e,t){t._$emitInputEvent.schedule(31)}),this.setSession(t||i&&i.session||new d("")),b.resetOptions(this),i&&this.setOptions(i),b._signal("editor",this)}var s=e("./lib/oop"),n=e("./lib/dom"),g=e("./lib/lang"),o=e("./lib/useragent"),a=e("./keyboard/textinput").TextInput,l=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,u=e("./search").Search,f=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,b=e("./config"),y=e("./token_iterator").TokenIterator,w=e("./clipboard"),x=(r.$uid=0,function(){s.implement(this,p),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=g.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if((1!=e||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var e=this.curOp.command,t=e&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),n=this.renderer.layerConfig;(i.start.row>=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<Date.now()-this.sequenceStartTime?!1:n)?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now()))},this.setKeyboardHandler=function(t,i){var n;t&&"string"==typeof t&&"ace"!=t?(this.$keybindingId=t,n=this,b.loadModule(["keybinding",t],function(e){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(e&&e.handler),i&&i()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),i&&i())},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){var t,i;this.session!=e&&(this.curOp&&this.endOperation(),this.curOp={},(t=this.session)&&(this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),(i=this.session.getSelection()).off("changeCursor",this.$onCursorChange),i.off("changeSelection",this.$onSelectionChange)),(this.session=e)?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e)&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||n.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){var n;this.$highlightPending||((n=this).$highlightPending=!0,setTimeout(function(){n.$highlightPending=!1;var e,t,i=n.session;i&&i.bgTokenizer&&(i.$bracketHighlight&&(i.$bracketHighlight.markerIds.forEach(function(e){i.removeMarker(e)}),i.$bracketHighlight=null),e=!(e=i.getMatchingBracketRanges(n.getCursorPosition()))&&i.$mode.getMatching?i.$mode.getMatching(n.session):e)&&(t="ace_bracket",Array.isArray(e)?1==e.length&&(t="ace_error_bracket"):e=[e],2==e.length&&(0==f.comparePoints(e[0].end,e[1].start)?e=[f.fromPoints(e[0].start,e[1].end)]:0==f.comparePoints(e[0].start,e[1].end)&&(e=[f.fromPoints(e[1].start,e[0].end)])),i.$bracketHighlight={ranges:e,markerIds:e.map(function(e){return i.addMarker(e,t,"text")})})},50))},this.$highlightTags=function(){var u;this.$highlightTagPending||((u=this).$highlightTagPending=!0,setTimeout(function(){u.$highlightTagPending=!1;var e=u.session;if(e&&e.bgTokenizer){var t=u.getCursorPosition(),i=new y(u.session,t.row,t.column),n=i.getCurrentToken();if(n&&/\b(?:tag-open|tag-name)/.test(n.type)){if(-1===n.type.indexOf("tag-open")||(n=i.stepForward())){var r,s=n.value,o=n.value,a=0,l=i.stepBackward();if("<"===l.value)for(;l=n,(n=i.stepForward())&&(-1!==n.type.indexOf("tag-name")?s===(o=n.value)&&("<"===l.value?a++:"</"===l.value&&a--):s===o&&"/>"===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++:"</"===l.value&&a--);else if("/>"===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;d<h;d++)i.stepForward()}}while(l&&a<=0);i.stepForward()}n?(t=i.getCurrentTokenRow(),r=i.getCurrentTokenColumn(),t=new f(t,r,t,r+n.value.length),r=e.$backMarkers[e.$tagHighlight],e.$tagHighlight&&null!=r&&0!==t.compareRange(r.range)&&(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null),e.$tagHighlight||(e.$tagHighlight=e.addMarker(t,"ace_bracket","text"))):(e.removeMarker(e.$tagHighlight),e.$tagHighlight=null)}}else e.removeMarker(e.$tagHighlight),e.$tagHighlight=null}},50))},this.focus=function(){var e=this;setTimeout(function(){e.isFocused()||e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(e){var t=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange()},this.onTokenizerUpdate=function(e){e=e.data;this.renderer.updateLines(e.first,e.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var e,t,i=this.getSession();this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||1<this.renderer.$minLines||(e=!1)),i.$highlightLineMarker&&!e?(i.removeMarker(i.$highlightLineMarker.id),i.$highlightLineMarker=null):!i.$highlightLineMarker&&e?((t=new f(e.row,e.column,e.row,1/0)).id=i.addMarker(t,"ace_active-line","screenLine"),i.$highlightLineMarker=t):e&&(i.$highlightLineMarker.start.row=e.row,i.$highlightLineMarker.end.row=e.row,i.$highlightLineMarker.start.column=e.column,i._signal("changeBackMarker"))},this.onSelectionChange=function(e){var t,i,n=this.session,n=(n.$selectionMarker&&n.removeMarker(n.$selectionMarker),n.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),i=this.getSelectionStyle(),n.$selectionMarker=n.addMarker(t,"ace_selection",i)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(n),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column,n=t.end.column,e=e.getLine(t.start.row),t=e.substring(i,n);if(!(5e3<t.length)&&/[\w\d]/.test(t)){t=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t}),e=e.substring(i-1,n+1);if(t.test(e))return t}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),i=!1;if(!e&&this.$copyWithEmptySelection)for(var i=!0,n=this.selection.getAllRanges(),r=0;r<n.length;r++){var s=n[r];r&&n[r-1].start.row==s.start.row||(e+=this.session.getLine(s.start.row)+t)}var o={text:e};return this._signal("copy",o),w.lineMode=i?o.text:"",o.text},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(e,t){this.commands.exec("paste",this,{text:e,event:t})},this.$handlePaste=function(e){this._signal("paste",e="string"==typeof e?{text:e}:e);var t=e.text,e=t==w.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)e?i.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(e)this.selection.rangeList.ranges.forEach(function(e){i.insert({row:e.start.row,column:0},t)});else{var n=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges,e=!(2!=n.length||n[0]&&n[1]);if(n.length!=r.length||e)return this.commands.exec("insertstring",this,t);for(var s=r.length;s--;){var o=r[s];o.isEmpty()||i.remove(o),i.insert(o.start,n[s])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i,n=this.session,r=n.getMode(),s=this.getCursorPosition(),o=(this.getBehavioursEnabled()&&!t&&(i=r.transformAction(n.getState(s.row),"insertion",this,n,e))&&(e===i.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),e=i.text),"\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==e.indexOf("\n")&&((o=new f.fromPoints(s,s)).end.column+=e.length,this.session.remove(o)):(o=this.getSelectionRange(),s=this.session.remove(o),this.clearSelection()),"\n"!=e&&"\r\n"!=e||(a=n.getLine(s.row),s.column>a.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++)0<c&&(a=s.getState(c-1),n=s.getLine(c-1),l=o.getNextLineIndent(a,n,h)),n=s.getLine(c),l!==(r=o.$getIndent(n))&&(0<r.length&&(r=new f(c,0,c,r.length),s.remove(r)),0<l.length)&&s.insert({row:c,column:0},l),o.autoOutdent(a,s,c)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});e=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(e):e(),this.endOperation()},this.applyComposition=function(e,t){var i;(t.extendLeft||t.extendRight)&&((i=this.selection.getRange()).start.column-=t.extendLeft,i.end.column+=t.extendRight,i.start.column<0&&(i.start.row--,i.start.column+=this.session.getLine(i.start.row).length+1),this.selection.setRange(i),e||i.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((i=this.selection.getRange()).start.column-=t.restoreStart,i.end.column-=t.restoreEnd,this.selection.setRange(i))},this.onCommandKey=function(e,t,i){return this.keyBinding.onCommandKey(e,t,i)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t,i,n,e=this.getSelectionRange();this.getBehavioursEnabled()&&(i=(t=this.session).getState(e.start.row),i=t.getMode().transformAction(i,"deletion",this,t,e),0===e.end.column&&"\n"==(n=t.getTextRange(e))[n.length-1]&&(n=t.getLine(e.end.row),/^\s+$/.test(n))&&(e.end.column=n.length),i)&&(e=i),this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){var e,t,i,n;this.selection.isEmpty()&&0!==(t=(e=this.getCursorPosition()).column)&&(n=t<(n=this.session.getLine(e.row)).length?(i=n.charAt(t)+n.charAt(t-1),new f(e.row,t-1,e.row,t+1)):(i=n.charAt(t-1)+n.charAt(t-2),new f(e.row,t-2,e.row,t)),this.session.replace(n,i),this.session.selection.moveToPosition(n.end))},this.toLowerCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),i=this.session.getTextRange(t);this.session.replace(t,i.toLowerCase()),this.selection.setSelectionRange(e)},this.toUpperCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),i=this.session.getTextRange(t);this.session.replace(t,i.toUpperCase()),this.selection.setSelectionRange(e)},this.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var i,n=e.getTextRange(t);if(!/^\s+$/.test(n))return i=this.$getSelectedRows(),void e.indentRows(i.first,i.last,"\t")}var r=e.getLine(t.start.row),n=t.start,s=e.getTabSize(),n=e.documentToScreenColumn(n.row,n.column);if(this.session.getUseSoftTabs())var o=s-n%s,a=g.stringRepeat(" ",o);else{for(o=n%s;" "==r[t.start.column-1]&&o;)t.start.column--,o--;this.selection.setSelectionRange(t),a="\t"}return this.insert(a)}i=this.$getSelectedRows(),e.indentRows(i.first,i.last,"\t")},this.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},this.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},this.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,i=[],n=e.first;n<=e.last;n++)i.push(t.getLine(n));i.sort(function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.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;){var r=i.exec(n);if(r.index<=t&&r.index+r[0].length>=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&&s<n?e*=Math.pow(10,o.end-s-1):e*=Math.pow(10,o.end-s),n=(i=(i+=e)/Math.pow(10,t)).toFixed(t),e=new f(r,o.start,r,o.end),this.session.replace(e,n),this.moveCursorTo(r,Math.max(o.start+1,s+n.length-o.value.length))):this.toggleWord()},this.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],this.toggleWord=function(){for(var i,n=this.selection.getCursor().row,e=this.selection.getCursor().column,r=(this.selection.selectWord(),this.getSelectedText()),s=this.selection.getWordRange().start.column,t=r.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),o=e-s-1,a=(o<0&&(o=0),0),l=this,h=(r.match(/[A-Za-z0-9_]+/)&&t.forEach(function(e,t){i=a+e.length,a<=o&&o<=i&&(r=e,l.selection.clearSelection(),l.moveCursorTo(n,a+s),l.selection.selectTo(n,i+s)),a=i}),this.$toggleWordPairs),c=0;c<h.length;c++)for(var d=h[c],u=0;u<=1;u++){var p=+!u,m=r.match(new RegExp("^\\s?_?("+g.escapeRegExp(d[u])+")\\s?$","i"));m&&r.match(new RegExp("([_]|^|\\s)("+g.escapeRegExp(m[1])+")($|\\s)","g"))&&(m=r.replace(new RegExp(g.escapeRegExp(d[u]),"i"),function(e){var t=d[p];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+d[p].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(m))}},this.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},this.duplicateSelection=function(){var e,t=this.selection,i=this.session,n=t.getRange(),r=t.isBackwards();n.isEmpty()?(e=n.start.row,i.duplicateLines(e,e)):(e=r?n.start:n.end,i=i.insert(e,i.getTextRange(n),!1),n.start=e,n.end=i,t.setSelectionRange(n,r))},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(e,t,i){return this.session.moveText(e,t,i)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(e,t){var i=this.selection;if(!i.inMultiSelectMode||this.inVirtualSelectionMode){var n=i.toOrientedRange(),r=this.$getSelectedRows(n),s=this.session.$moveLines(r.first,r.last,t?0:e);n.moveBy(s=t&&-1==e?0:s,0),i.fromOrientedRange(n)}else{for(var o=i.rangeList.ranges,a=(i.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),l=0,h=o.length,c=0;c<h;c++){for(var d=c,u=(o[c].moveBy(a,0),(r=this.$getSelectedRows(o[c])).first),p=r.last;++c<h;){l&&o[c].moveBy(l,0);var m=this.$getSelectedRows(o[c]);if(t&&m.first!=p)break;if(!t&&m.first>p+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 y(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(;d<s.value.length&&!h;d++)if(u[s.value[d]])switch(a=u[s.value[d]]+"."+s.type.replace("rparen","lparen"),isNaN(c[a])&&(c[a]=0),s.value[d]){case"(":case"[":case"{":c[a]++;break;case")":case"]":case"}":c[a]--,-1===c[a]&&(o="bracket",h=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(c[s.value])&&(c[s.value]=0),"<"===r.value?c[s.value]++:"</"===r.value&&c[s.value]--,-1===c[s.value])&&(o="tag",h=!0)}while(h||(r=s,s=n.stepForward(),d=0),s&&!h);if(o){if("bracket"===o)!(p=this.session.getBracketRange(i))&&(l=(p=new f(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+d-1,n.getCurrentTokenRow(),n.getCurrentTokenColumn()+d-1)).start,t||l.row===i.row&&Math.abs(l.column-i.column)<2)&&(p=this.session.getBracketRange(l));else if("tag"===o){if(!s||-1===s.type.indexOf("tag-name"))return;var p,m=s.value;if(0===(p=new f(n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2,n.getCurrentTokenRow(),n.getCurrentTokenColumn()-2)).compare(i.row,i.column))for(h=!1;s=r,(r=n.stepBackward())&&(-1!==r.type.indexOf("tag-close")&&p.setEnd(n.getCurrentTokenRow(),n.getCurrentTokenColumn()+1),s.value===m)&&-1!==s.type.indexOf("tag-name")&&("<"===r.value?c[m]++:"</"===r.value&&c[m]--,0===c[m])&&(h=!0),r&&!h;);s&&s.type.indexOf("tag-name")&&(l=p.start).row==i.row&&Math.abs(l.column-i.column)<2&&(l=p.end)}(l=p&&p.cursor||l)&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(l.row,l.column):this.selection.moveTo(l.row,l.column))}}},this.gotoLine=function(e,t,i){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,i)},this.navigateTo=function(e,t){this.selection.moveTo(e,t)},this.navigateUp=function(e){var t;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},this.navigateDown=function(e){var t;if(this.selection.isMultiLine()&&this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},this.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(e,t){t&&this.$search.set(t);var t=this.$search.find(this.session),i=0;return t&&(this.$tryReplace(t,e)&&(i=1),this.selection.setSelectionRange(t),this.renderer.scrollSelectionIntoView(t.start,t.end)),i},this.replaceAll=function(e,t){t&&this.$search.set(t);var i=this.$search.findAll(this.session),n=0;if(i.length){t=this.getSelectionRange();this.selection.moveTo(0,0);for(var r=i.length-1;0<=r;--r)this.$tryReplace(i[r],e)&&n++;this.selection.setSelectionRange(t)}return n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t=t||{},"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&s.mixin(t,e);var n=this.selection.getRange(),e=(null==t.needle&&((e=this.session.getTextRange(n)||this.$search.$options.needle)||(n=this.session.getWordRange(n.start.row,n.start.column),e=this.session.getTextRange(n)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:n}),this.$search.find(this.session));return t.preventScroll?e:e?(this.revealRange(e,i),e):(t.backwards?n.start=n.end:n.end=n.start,void this.selection.setRange(n))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(e){e.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(e){var n,r,s,o,t,i,a;e&&(s=!1,(r=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(o=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild),t=this.on("changeSelection",function(){s=!0}),i=this.renderer.on("beforeRender",function(){s&&(n=r.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){var e,t,i;s&&n&&(r.isFocused()||r.searchBox&&r.searchBox.isFocused())&&(e=(t=r.renderer).$cursorLayer.$pixelPos,t=t.layerConfig,i=e.top-t.offset,null!=(s=0<=e.top&&i+n.top<0||!(e.top<t.height&&e.top+n.top+t.lineHeight>window.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;b.loadModule("./ext/prompt",function(e){e.prompt(r,t,i,n)})}}.call(r.prototype),b.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<t-1;){var r=function(e,t){for(var i=e.length;i--;)for(var n=0;n<t.length;n++)if(!o(e[i],t[n])){for(;i<e.length;){for(;n--;)o(t[n],e[i]);n=t.length,i++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}(e[i],e[i+1]);e[i]=r[0],e[i+1]=r[1],i++}return 1}}}function a(e){return{row:e.row,column:e.column}}function n(e){var t;return e=e||this,Array.isArray(e)?e.map(n).join("\n"):(t="",e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(s).join("\n"):s(e.value)),e.start&&(t+=s(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t)}function s(e){return e.start.row+":"+e.start.column+"=>"+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;s<r.length;s++){var o=function(e,t){var i,n,r="insert"==e.action,s="insert"==t.action;if(r&&s)m(e.start,t.start)<0?l(t,e,1):l(e,t,1);else if(r&&!s)0<=m(e.start,t.end)?l(e,t,-1):(m(e.start,t.start)<=0||l(e,p.fromPoints(t.start,e.start),-1),l(t,e,1));else if(!r&&s)0<=m(t.start,e.end)?l(t,e,-1):(m(t.start,e.start)<=0||l(t,p.fromPoints(e.start,t.start),-1),l(e,t,1));else if(!r&&!s)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return m(e.start,t.start)<0&&(e=c(i=e,t.start)),0<m(e.end,t.end)&&(n=c(e,t.end)),h(t.end,e.start,e.end,-1),n&&!i&&(e.lines=n.lines,e.start=n.start,e.end=n.end,n=e),[t,i,n].filter(Boolean);l(e,t,-1)}return[t,e]}(r[s],t);t=o[0],2!=o.length&&(o[2]?(r.splice(s+1,1,o[1],o[2]),s++):o[1]||(r.splice(s,1),s--))}r.length||e.splice(n,1)}}function u(){this.$maxRev=0,this.$fromUndo=!1,this.reset()}!function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,i){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var i=this.$undoStack,n=i.length;n--;){var r=i[n][0];if(r.id<=e)break;r.id<t&&(r.ignore=!0)}this.lastDeltas=null},this.getSelection=function(e,t){for(var i=this.selections,n=i.length;n--;){var r=i[n];if(r.rev<e)return r=t?i[n+1]:r}},this.getRevision=function(){return this.$rev},this.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var i=this.$undoStack,n=null,r=0,s=i.length;s--;){var o=i[s][0];if(o.id<t&&!n&&(n=s+1),o.id<=e){r=s+1;break}}return i.slice(r,n)},this.getChangedRanges=function(e,t){null==t&&this.$rev},this.getChangedLines=function(e,t){null==t&&this.$rev},this.undo=function(e,t){this.lastDeltas=null;var i,n=this.$undoStack;if(r(n,n.length))return e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,i=null,(n=n.pop())&&(i=e.undoChanges(n,t),this.$redoStack.push(n),this.$syncRev()),this.$fromUndo=!1,i},this.redo=function(e,t){if(this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var i=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),n=this.$redoStack,r=i,s=0;s<r.length;s++)for(var o=r[s],a=0;a<o.length;a++)d(n,o[a]);this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var i=this.$redoStack.pop(),l=null;return i&&(l=e.redoChanges(i,t),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,l},this.$syncRev=function(){var e=this.$undoStack,e=e[e.length-1],e=e&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},this.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},this.canUndo=function(){return 0<this.$undoStack.length},this.canRedo=function(){return 0<this.$redoStack.length},this.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?n(e):n(this.$undoStack)+"\n---\n"+n(this.$redoStack)}}.call(u.prototype);var p=e("./range").Range,m=p.comparePoints;p.comparePoints;t.UndoManager=u}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";function n(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}var o=e("../lib/dom");(function(){this.moveContainer=function(e){o.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,i){var n=t.firstRowScreen*t.lineHeight,n=Math.floor(n/this.canvasHeight);return i.documentToScreenRow(e,0)*t.lineHeight-n*this.canvasHeight},this.computeLineHeight=function(e,t,i){return t.lineHeight*i.getRowLineCount(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=o.createFragment(this.element),i=0;i<e.length;i++)t.appendChild(e[i].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},this.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=o.createFragment(this.element),i=0;i<e.length;i++)t.appendChild(e[i].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},this.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},this.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},this.createCell=function(e,t,i,n){var r,s=this.cellCache.pop();return s||(r=o.createElement("div"),n&&n(r),this.element.appendChild(r),s={element:r,text:"",row:e}),s.row=e,s}}).call(n.prototype),t.Lines=n}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines"],function(e,t,i){"use strict";function h(e){var t=document.createTextNode(""),t=(e.appendChild(t),f.createElement("span"));return e.appendChild(t),e}function n(e){this.element=f.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}var f=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines;(function(){r.implement(this,o),this.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},this.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var i=e[t],n=i.row,r=(r=this.$annotations[n])||(this.$annotations[n]={text:[]}),n=(n=i.text)?s.escapeHTML(n):i.html||"",n=(-1===r.text.indexOf(n)&&r.text.push(n),i.type);"error"==n?r.className=" ace_error":"warning"==n&&" ace_error"!=r.className?r.className=" ace_warning":"info"!=n||r.className||(r.className=" ace_info")}},this.$updateAnnotations=function(e){var t,i;this.$annotations.length&&(t=e.start.row,0!=(i=e.end.row-t))&&("remove"==e.action?this.$annotations.splice(t,1+i,null):((e=new Array(1+i)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,e)))},this.update=function(e){this.config=e;for(var t=this.session,i=e.firstRow,n=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),r=(this.oldLastRow=n,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow(),t.getNextFoldLine(i)),s=r?r.start.row:1/0,o=null,a=-1,l=i;;){if(s<l&&(l=r.end.row+1,s=(r=t.getNextFoldLine(l,r))?r.start.row:1/0),n<l){for(;this.$lines.getLength()>a+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<t.length;i++){var n=t[i];if(n.row>=this.$cursorRow){if(n.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0<i&&r&&r.start.row==t[i-1].row))break;n=t[i-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var i=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=i,!t||n<e.firstRow)return this.update(e);if(i<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(i<n)for(r=this.session.getFoldedRowCount(i+1,n);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n<i&&this.$lines.push(this.$renderLines(e,n+1,i)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,i){for(var n=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o<r&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(i<r);){var a=this.$lines.createCell(r,e,this.session,h);this.$renderCell(a,e,s,r),n.push(a),r++}return n},this.$renderCell=function(e,t,i,n){var r,s=e.element,o=this.session,a=s.childNodes[0],l=s.childNodes[1],h=o.$firstLineNumber,c=o.$breakpoints,d=o.$decorations,u=o.gutterRenderer||this.$renderer,p=this.$showFoldWidgets&&o.foldWidgets,m=i?i.start.row:Number.MAX_VALUE,g="ace_gutter-cell ",d=(this.$highlightGutterLine&&(n==this.$cursorRow||i&&n<this.$cursorRow&&m<=n&&this.$cursorRow<=i.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=e)&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e),c[n]&&(g+=c[n]),d[n]&&(g+=d[n]),this.$annotations[n]&&(g+=this.$annotations[n].className),s.className!=g&&(s.className=g),(r=p&&null==(r=p[n])?p[n]=o.getFoldWidget(n):r)?(g="ace_fold-widget ace_"+r,"start"==r&&n==m&&n<i.end.row?g+=" ace_closed":g+=" ace_open",l.className!=g&&(l.className=g),c=t.lineHeight+"px",f.setStyle(l.style,"height",c),f.setStyle(l.style,"display","inline-block")):l&&f.setStyle(l.style,"display","none"),(u?u.getText(o,n):n+h).toString());return d!==a.data&&(a.data=d),f.setStyle(e.element.style,"height",this.$lines.computeLineHeight(n,t,o)+"px"),f.setStyle(e.element.style,"top",this.$lines.computeLineTop(n,t,o)+"px"),e.text=d,e},this.$fixedWidth=!1,this.$highlightGutterLine=!0,this.$renderer="",this.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(e){e?f.addCssClass(this.element,"ace_folding-enabled"):f.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){var e;return this.element.firstChild?(e=f.computedStyle(this.element.firstChild),this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding):{left:0,right:0}},this.getRegion=function(e){var t=this.$padding||this.$computePadding(),i=this.element.getBoundingClientRect();return e.x<t.left+i.left?"markers":this.$showFoldWidgets&&e.x>i.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.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},this.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},this.drawTextMarker=function(e,t,i,n,r){for(var s,o=this.session,a=t.start.row,l=t.end.row,h=a,c=0,d=o.getScreenLastRowColumn(h),u=new p(h,t.start.column,h,c);h<=l;h++)u.start.row=u.end.row=h,u.start.column=h==a?t.start.column:o.getRowWrapIndent(h),u.end.column=d,s=c,c=d,d=h+1<l?o.getScreenLastRowColumn(h+1):h==l?0:t.end.column,this.drawSingleLineMarker(e,u,i+(h==a?" ace_start":"")+" ace_br"+((h==a||h==a+1&&t.start.column?1:0)|(s<c?2:0)|(d<c?4:0)|(h==l?8:0)),n,h==l?0:1,r)},this.drawMultiLineMarker=function(e,t,i,n,r){var s,o=this.$padding,a=n.lineHeight,l=this.$getTop(t.start.row,n),h=o+t.start.column*n.characterWidth;r=r||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((s=t.clone()).end.row=s.start.row,s.end.column=this.session.getLine(s.start.row).length,this.drawBidiSingleLineMarker(e,s,i+" ace_br1 ace_start",n,null,r)):this.elt(i+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+h+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((s=t.clone()).start.row=s.end.row,s.start.column=0,this.drawBidiSingleLineMarker(e,s,i+" ace_br12",n,null,r)):(l=this.$getTop(t.end.row,n),h=t.end.column*n.characterWidth,this.elt(i+" ace_br12","height:"+a+"px;width:"+h+"px;top:"+l+"px;left:"+o+"px;"+(r||""))),(a=(t.end.row-t.start.row-1)*n.lineHeight)<=0||(l=this.$getTop(t.start.row+1,n),e=(t.start.column?1:0)|(t.end.column?0:8),this.elt(i+(e?" ace_br"+e:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+o+"px;"+(r||"")))},this.drawSingleLineMarker=function(e,t,i,n,r,s){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,i,n,r,s);var e=n.lineHeight,r=(t.end.column+(r||0)-t.start.column)*n.characterWidth,o=this.$getTop(t.start.row,n),t=this.$padding+t.start.column*n.characterWidth;this.elt(i,"height:"+e+"px;width:"+r+"px;top:"+o+"px;left:"+t+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(e,t,i,n,r,s){var o=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(i,"height:"+o+"px;width:"+e.width+(r||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(s||""))},this)},this.drawFullLineMarker=function(e,t,i,n,r){var s=this.$getTop(t.start.row,n),o=n.lineHeight;t.start.row!=t.end.row&&(o+=this.$getTop(t.end.row,n)-s),this.elt(i,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(e,t,i,n,r){t=this.$getTop(t.start.row,n),n=n.lineHeight;this.elt(i,"height:"+n+"px;top:"+t+"px;left:0;right:0;"+(r||""))}}).call(n.prototype),t.Marker=n}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(e,t,i){"use strict";function n(e){this.dom=h,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}var r=e("../lib/oop"),h=e("../lib/dom"),v=e("../lib/lang"),s=e("./lines").Lines,o=e("../lib/event_emitter").EventEmitter;(function(){r.implement(this,o),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,e="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){(this.session=e)&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&("string"==typeof(this.showInvisibles=e)?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){for(var e,t,i,n,r,s,o=this.session.getTabSize(),a=(this.tabSize=o,this.$tabStrings=[0]),l=1;l<o+1;l++)this.showTabs?((s=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",s.textContent=v.stringRepeat(this.TAB_CHAR,l),a.push(s)):a.push(this.dom.createTextNode(v.stringRepeat(" ",l),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,e="ace_indent-guide",t=this.showSpaces?" ace_invisible ace_invisible_space":"",i=this.showSpaces?v.stringRepeat(this.SPACE_CHAR,this.tabSize):v.stringRepeat(" ",this.tabSize),n=this.showTabs?" ace_invisible ace_invisible_tab":"",r=this.showTabs?v.stringRepeat(this.TAB_CHAR,this.tabSize):i,(s=this.dom.createElement("span")).className=e+t,s.textContent=i,this.$tabStrings[" "]=s,(s=this.dom.createElement("span")).className=e+n,s.textContent=r,this.$tabStrings["\t"]=s)},this.updateLines=function(e,t,i){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var n=Math.max(t,e.firstRow),r=Math.min(i,e.lastRow),s=this.element.childNodes,o=0,a=e.firstRow;a<n;a++){if(l=this.session.getFoldLine(a)){if(l.containsRow(n)){n=l.start.row;break}a=l.end.row}o++}for(var l,h=!1,a=n,c=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;c<a&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(r<a);){var d,u=s[o++];u&&(this.dom.removeChildren(u),this.$renderLine(u,a,a==c&&l),h&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px"),d=e.lineHeight*this.session.getRowLength(a)+"px",u.style.height!=d)&&(h=!0,u.style.height=d),a++}if(h)for(;o<this.$lines.cells.length;){var p=this.$lines.cells[o++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var i=e.lastRow,n=t?t.lastRow:-1;if(!t||n<e.firstRow)return this.update(e);if(i<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var r=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);0<r;r--)this.$lines.shift();if(t.lastRow>e.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0<r;r--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.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<r&&(r=s.end.row+1,o=(s=this.session.getNextFoldLine(r,s))?s.start.row:1/0),!(i<r);){var a=this.$lines.createCell(r,e,this.session),l=a.element;this.dom.removeChildren(l),h.setStyle(l.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),h.setStyle(l.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(l,r,r==o&&s),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",n.push(a),r++}return n},this.update=function(e){this.$lines.moveContainer(e);for(var t=(this.config=e).firstRow,i=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,t,i))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){for(var r,s,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),h=0;r=a.exec(n);){var c,d,u=r[1],p=r[2],m=r[3],g=r[4],f=r[5];!o.showSpaces&&p||(c=h!=r.index?n.slice(h,r.index):"",h=r.index+r[0].length,c&&l.appendChild(this.dom.createTextNode(c,this.element)),u?(c=o.session.getScreenTabSize(t+r.index),l.appendChild(o.$tabStrings[c].cloneNode(!0)),t+=c-1):p?o.showSpaces?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",d.textContent=v.stringRepeat(o.SPACE_CHAR,p.length),l.appendChild(d)):l.appendChild(this.com.createTextNode(p,this.element)):m?((d=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",d.textContent=v.stringRepeat(o.SPACE_CHAR,m.length),l.appendChild(d)):g?(t+=1,(d=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",d.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",d.textContent=o.showSpaces?o.SPACE_CHAR:g,l.appendChild(d)):f&&(t+=1,(d=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",d.className="ace_cjk",d.textContent=f,l.appendChild(d)))}return l.appendChild(this.dom.createTextNode(h?n.slice(h):n,this.element)),this.$textToken[i.type]?e.appendChild(l):(s="ace_"+i.type.replace(/\./g," ace_"),d=this.dom.createElement("span"),"fold"==i.type&&(d.style.width=i.value.length*this.config.characterWidth+"px"),d.className=s,d.appendChild(l),e.appendChild(d)),t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);if(n<=0||i<=n)return t;if(" "==t[0])for(var r=(n-=n%this.tabSize)/this.tabSize,s=0;s<r;s++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));else{if("\t"!=t[0])return t;for(s=0;s<n;s++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0))}return t.substr(n)},this.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},this.$renderWrappedLine=function(e,t,i){var n=0,r=0,s=i[0],o=0,a=this.$createLineElement();e.appendChild(a);for(var l=0;l<t.length;l++){var h=t[l],c=h.value;if(0==l&&this.displayIndentGuides){if(n=c.length,!(c=this.renderIndentGuide(a,c,s)))continue;n-=c.length}if(n+c.length<s)o=this.$renderToken(a,o,h,c),n+=c.length;else{for(;n+c.length>=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;s<t.length;s++){if(i+(r=(n=t[s]).value).length>this.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?"<hide>":"<click to see more...>",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.length<a;)if(c+=o[h].value.length,++h==o.length)return;for(c!=a&&((s=o[h].value.substring(a-c)).length>l-a&&(s=s.substring(0,l-a)),u.push({type:o[h].type,value:s}),c=a+s.length,h+=1);c<l&&h<o.length;)(s=o[h].value).length+c>l?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(1<this.cursors.length)return(e=this.cursors.pop()).parentNode.removeChild(e),e},this.hideCursor=function(){this.isVisible=!1,h.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,h.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e,t=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&h.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&setTimeout(function(){h.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),h.HAS_CSS_ANIMATION?this.$startCssAnimation():(e=function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e())):this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e=e||this.session.selection.getCursor();var i=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return 0<=e.top&&e.top<t.maxHeight},this.update=function(e){this.config=e;for(var t=this.session.$selectionMarkers,i=0,n=0,i=0,r=(t=void 0!==t&&0!==t.length?t:[{cursor:null}]).length;i<r;i++){var s,o,a=this.getPixelPosition(t[i].cursor,!0);(a.top>e.height+e.offset||a.top<0)&&1<i||(o=(s=this.cursors[n++]||this.addCursor()).style,this.drawCursor?this.drawCursor(s,a,e,t[i],this.session):this.isCursorInView(a,e)?(h.setStyle(o,"display","block"),h.translate(s,a.left,a.top),h.setStyle(o,"width",Math.round(e.characterWidth)+"px"),h.setStyle(o,"height",e.lineHeight+"px")):h.setStyle(o,"display","none"))}for(;this.cursors.length>n;)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"),b=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.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!i)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.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(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=e?1:0;var r=this.container,r=(n=n||r.clientHeight||r.scrollHeight,i=i||r.clientWidth||r.scrollWidth,this.$updateCachedSize(e,t,i,n));if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var r=0,s=this.$size,o={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};return n&&(e||s.height!=n)&&(s.height=n,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),i&&(e||s.width!=i)&&(r|=this.CHANGE_SIZE,s.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,a.setStyle(this.scrollBarH.element.style,"left",t+"px"),a.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()-this.margin.h),a.setStyle(this.$gutter.style,"left",this.margin.left+"px"),t=this.scrollBarV.getWidth()+"px",a.setStyle(this.scrollBarH.element.style,"right",t),a.setStyle(this.scroller.style,"right",t),a.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL),s.$dirty=!i||!n,r&&this._signal("resize",o),r},this.onGutterResize=function(e){e=this.$showGutter?e:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){var e;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((e=a.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=a.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)),(e=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session)&&-1==this.session.$wrap&&this.adjustWrapLimit()},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){var e,t,i,n,r,s,o;this.$isMousePressed||(e=this.textarea.style,s=this.$composition,this.$keepTextAreaAtCursor||s?(i=this.$cursorLayer.$pixelPos)&&(s&&s.markerRange&&(i=this.$cursorLayer.getPixelPosition(s.markerRange.start,!0)),o=this.layerConfig,t=i.top,i=i.left,t-=o.offset,n=s&&s.useTextareaForIME?this.lineHeight:b?0:1,t<0||t>o.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)&&t<e;i==this.desiredHeight&&this.$size.height==this.desiredHeight&&t==this.$vScroll||(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),e=this.container.clientWidth,this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,i),this.desiredHeight=i,this._signal("autosize"))},this.$computeLayerConfig=function(){var e,t=this.session,i=this.$size,n=i.height<=2*this.lineHeight,r=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!n&&(this.$hScrollBarAlwaysVisible||i.scrollerWidth-s-2*this.$padding<0),a=this.$horizScroll!==o,o=(a&&(this.$horizScroll=o,this.scrollBarH.setVisible(o)),this.$vScroll),l=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),i.scrollerHeight+this.lineHeight),h=!this.$maxLines&&this.$scrollPastEnd?(i.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,c=(r+=h,this.scrollMargin),n=(this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,r-i.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,s+2*this.$padding-i.scrollerWidth+c.right))),!n&&(this.$vScrollBarAlwaysVisible||i.scrollerHeight-r+h<0||this.scrollTop>c.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||t<i.firstRow)){if(t!==1/0)return this.$textLayer.updateLines(i,e,t),!0;this.$showGutter&&this.$gutterLayer.update(i),this.$textLayer.update(i)}}},this.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$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<e+this.lineHeight&&(t&&r+this.$size.scrollerHeight-i<e-this.lineHeight&&(e+=t*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight+i-this.$size.scrollerHeight)),n<(s=this.scrollLeft)?(n<this.$padding+2*this.layerConfig.characterWidth&&(n=-this.scrollMargin.left),this.session.setScrollLeft(n)):s+this.$size.scrollerWidth<n+this.characterWidth?this.session.setScrollLeft(Math.round(n+this.characterWidth-this.$size.scrollerWidth)):s<=this.$padding&&n-s<this.characterWidth&&this.session.setScrollLeft(0))},this.getScrollTop=function(){return this.session.getScrollTop()},this.getScrollLeft=function(){return this.session.getScrollLeft()},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},this.alignCursor=function(e,t){var e=this.$cursorLayer.getPixelPosition(e="number"==typeof e?{row:e,column:0}:e),i=this.$size.scrollerHeight-this.lineHeight,e=e.top-i*(t||0);return this.session.setScrollTop(e),e},this.STEPS=8,this.$calcSteps=function(e,t){for(var i,n,r=0,s=this.STEPS,o=[],r=0;r<s;++r)o.push((i=r/this.STEPS,(t-(n=e))*(Math.pow(i-1,3)+1)+n));return o},this.scrollToLine=function(e,t,i,n){e=this.$cursorLayer.getPixelPosition({row:e,column:0}).top,t&&(e-=this.$size.scrollerHeight/2),t=this.scrollTop;this.session.setScrollTop(e),!1!==i&&this.animateScrolling(t,n)},this.animateScrolling=function(e,t){var i=this.scrollTop;if(this.$animatedScroll){var n=this;if(e!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==i)return}var s=n.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:s},clearInterval(this.$timer),n.session.setScrollTop(s.shift()),n.session.$scrollTop=i,this.$timer=setInterval(function(){if(!n.session)return clearInterval(n.$timer);s.length?(n.session.setScrollTop(s.shift()),n.session.$scrollTop=i):null!=i?(n.session.$scrollTop=-1,n.session.setScrollTop(i),i=null):(n.$timer=clearInterval(n.$timer),n.$scrollAnimation=null,t&&t())},10)}}},this.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},this.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(t)},this.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},this.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||0<t&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||0<e&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var i=e+this.scrollLeft-n.left-this.$padding,e=i/this.characterWidth,t=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),n=this.$blockCursor?Math.floor(e):Math.round(e);return{row:t,column:n,side:0<e-n?1:-1,offsetX:i}},this.screenToTextCoordinates=function(e,t){this.$hasCssTransforms?(i={top:0,left:0},e=(n=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=n[0]):i=this.scroller.getBoundingClientRect();var i,n=e+this.scrollLeft-i.left-this.$padding,e=n/this.characterWidth,e=this.$blockCursor?Math.floor(e):Math.round(e),t=Math.floor((t+this.scrollTop-i.top)/this.lineHeight);return this.session.screenToDocumentPosition(t,Math.max(e,0),n)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),t=this.session.documentToScreenPosition(e,t),e=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,e)?this.session.$bidiHandler.getPosLeft(t.column):Math.round(t.column*this.characterWidth)),t=t.row*this.lineHeight;return{pageX:i.left+e-this.scrollLeft,pageY:i.top+t-this.scrollTop}},this.visualizeFocus=function(){a.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){a.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){(this.$composition=e).cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(a.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){var e;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),a.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,e=this.session.selection.cursor,this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(e,t,i,n){var r=this.session,s=(r.bgTokenizer.lines[i]=null,{type:t,value:e}),o=r.getTokens(i);if(null==n)o.push(s);else for(var a=0,l=0;l<o.length;l++){var h=o[l];if(n<=(a+=h.value.length)){var c=h.value.length-(a-n),d=h.value.slice(0,c),c=h.value.slice(c);o.splice(l,1,{type:h.type,value:d},s,{type:h.type,value:c});break}}this.updateLines(i,i)},this.removeExtraToken=function(e,t){this.updateLines(e,e)},this.setTheme=function(i,n){function e(e){if(r.$themeId!=i)return n&&n();if(!e||!e.cssClass)throw new Error("couldn't load module "+i+" or it didn't call define");e.$id&&(r.$themeId=e.$id),a.importCssString(e.cssText,e.cssClass,r.container),r.theme&&a.removeCssClass(r.container,r.theme.cssClass);var t="padding"in e?e.padding:"padding"in(r.theme||{})?4:r.$padding;r.$padding&&t!=r.$padding&&r.setPadding(t),r.$theme=e.cssClass,r.theme=e,a.addCssClass(r.container,e.cssClass),a.setCssClass(r.container,"ace_dark",e.isDark),r.$size&&(r.$size.width=0,r.$updateSizeAsync()),r._dispatchEvent("themeLoaded",{theme:e}),n&&n()}var t,r=this;this.$themeId=i,r._dispatchEvent("themeChange",{theme:i}),i&&"string"!=typeof i?e(i):(t=i||this.$options.theme.initialValue,s.loadModule(["theme",t],e))},this.getTheme=function(){return this.$themeId},this.setStyle=function(e,t){a.setCssClass(this.container,e,!1!==t)},this.unsetStyle=function(e){a.removeCssClass(this.container,e)},this.setCursorStyle=function(e){a.setStyle(this.scroller.style,"cursor",e)},this.setMouseCursor=function(e){a.setStyle(this.scroller.style,"cursor",e)},this.attachToShadowRoot=function(){a.importCssString(f,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""}}).call(n.prototype),s.defineOptions(n.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(e){a.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){this.$scrollPastEnd!=(e=+e||0)&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!v.isMobile&&!v.isIE}}),t.VirtualRenderer=n}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,e,t){"use strict";function l(e){var t;return"undefined"==typeof Worker?{postMessage:function(){},terminate:function(){}}:d.get("loadWorkerFromBlob")?(t=function(t){t="importScripts('"+n.qualifyURL(t)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var i=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return i.append(t),i.getBlob("application/javascript")}}(e),t=(window.URL||window.webkitURL).createObjectURL(t),new Worker(t)):new Worker(e)}function h(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage}var i=a("../lib/oop"),n=a("../lib/net"),c=a("../lib/event_emitter").EventEmitter,d=a("../config");(function(){i.implement(this,c),this.$createWorkerFromOldConfig=function(e,t,i,n,r){var s,o;return a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),d.get("packaged")||!a.toUrl?n=n||d.moduleUrl(t,"worker"):(s=this.$normalizePath,n=n||s(a.toUrl("ace/worker/worker.js",null,"_")),o={},e.forEach(function(e){o[e]=s(a.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=l(n),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:o,module:t,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var i=this.callbacks[t.id];i&&(i(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return n.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,i){var n;i&&(n=this.callbackId++,this.callbacks[n]=i,t.push(n)),this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,50<e.length&&e.length>this.$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.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},this.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var i="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,n=t.start.column>=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;i<t;i++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(n.prototype),t.PlaceHolder=n}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){function _(e,t){return e.row==t.row&&e.column==t.column}var C=e("../lib/event"),E=e("../lib/useragent");t.onMouseDown=function(e){var t=e.domEvent,i=t.altKey,n=t.shiftKey,r=t.ctrlKey,s=e.getAccelKey(),o=e.getButton();if(r&&E.isMac&&(o=t.button),e.editor.inMultiSelectMode&&2==o)e.editor.textInput.onContextMenu(e.domEvent);else if(r||i||s){if(0===o){var a,l,h,c,d,u,p,m,g=e.editor,f=g.selection,v=g.inMultiSelectMode,b=e.getDocumentPosition(),y=f.getCursor(),y=e.inSelection()||f.isEmpty()&&_(b,y),w=e.x,x=e.y,A=g.session,S=g.renderer.pixelToScreenCoordinates(w,x),k=S;if(g.$mouseHandler.$enableJumpToDef)r&&i||s&&i?a=n?"block":"add":i&&g.$blockSelectEnabled&&(a="block");else if(s&&!i){if(a="add",!v&&n)return}else i&&g.$blockSelectEnabled&&(a="block");if(a&&E.isMac&&t.ctrlKey&&g.$mouseHandler.cancelContextMenu(),"add"==a)!v&&y||(v||(l=f.toOrientedRange(),g.addSelectionMarker(l)),h=f.rangeList.rangeAtPoint(b),g.inVirtualSelectionMode=!0,n&&(h=null,l=f.ranges[0]||l,g.removeSelectionMarker(l)),g.once("mouseup",function(){var e=f.toOrientedRange();h&&e.isEmpty()&&_(h.cursor,e.cursor)?f.substractPoint(e.cursor):(n?f.substractPoint(l.cursor):l&&(g.removeSelectionMarker(l),f.addRange(l)),f.addRange(e)),g.inVirtualSelectionMode=!1}));else if("block"==a)return e.stop(),g.inVirtualSelectionMode=!0,d=[],u=function(){var e=g.renderer.pixelToScreenCoordinates(w,x),t=A.screenToDocumentPosition(e.row,e.column,e.offsetX);_(k,e)&&_(t,f.lead)||(k=e,g.selection.moveToPosition(t),g.renderer.scrollCursorIntoView(),g.removeSelectionMarkers(d),d=f.rectangularRangeBlock(k,S),g.$mouseHandler.$clickSelection&&1==d.length&&d[0].isEmpty()&&(d[0]=g.$mouseHandler.$clickSelection.clone()),d.forEach(g.addSelectionMarker,g),g.updateSelectionMarkers())},v&&!s?f.toSingleRange():!v&&s&&(c=f.toOrientedRange(),g.addSelectionMarker(c)),n?S=A.documentToScreenPosition(f.lead):f.moveToPosition(b),k={row:-1,column:-1},p=u,C.capture(g.container,function(e){w=e.clientX,x=e.clientY},function(e){u(),clearInterval(m),g.removeSelectionMarkers(d),d.length||(d=[f.toOrientedRange()]),c&&(g.removeSelectionMarker(c),f.toSingleRange(c));for(var t=0;t<d.length;t++)f.addRange(d[t]);g.inVirtualSelectionMode=!1,g.$mouseHandler.$clickSelection=null}),m=setInterval(function(){p()},20),e.preventDefault()}}else 0===o&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(e,t,i){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split into lines",exec:function(e){1<e.multiSelect.rangeCount?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];e=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new e(t.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(e,r,t){function i(e){var t,i;function n(e){i&&(t.renderer.setMouseCursor(""),i=!1)}e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=r.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(a.defaultCommands),(t=e).textInput&&(e=t.textInput.getElement(),i=!1,o.addListener(e,"keydown",function(e){e=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&e?i||(t.renderer.setMouseCursor("crosshair"),i=!0):i&&n()},t),o.addListener(e,"keyup",n,t),o.addListener(e,"blur",n,t)))}var n=e("./range_list").RangeList,w=e("./range").Range,u=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,o=e("./lib/event"),p=e("./lib/lang"),a=e("./commands/multi_select_commands");r.commands=a.defaultCommands.concat(a.multiSelectCommands);var l=new(e("./search").Search),h=e("./edit_session").EditSession,h=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var i=this.toOrientedRange();if(this.rangeList.add(i),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(i),this.$onAddRange(i)}e.cursor||(e.cursor=e.end);i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),1<this.rangeCount&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){e=this.rangeList.substractPoint(e);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){var t;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(t=this.rangeList.ranges.pop(),e.push(t),this.rangeCount=0);for(var i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],i=0;i<e.length;i++){var n=e[i],r=n.start.row,s=n.end.row;if(r===s)t.push(n.clone());else{for(t.push(new w(r,n.start.column,r,this.session.getLine(r).length));++r<s;)t.push(this.getLineRange(r,!0));t.push(new w(s,0,s,n.end.column))}0!=i||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(i=t.length;i--;)this.addRange(t[i])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],e=w.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=w.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,i){var n,r,s,o,a,l,h,c=[],d=e.column<t.column,u=(o=(d?(n=e.column,r=t.column,s=e.offsetX,t):(n=t.column,r=e.column,s=t.offsetX,e)).offsetX,e.row<t.row);l=(u?(a=e.row,t):(a=t.row,e)).row,n<0&&(n=0),(a=a<0?0:a)==l&&(i=!0);for(var p,m,g=a;g<=l;g++){var f=w.fromPoints(this.session.screenToDocumentPosition(g,n,s),this.session.screenToDocumentPosition(g,r,o));if(f.isEmpty()){if(h&&(p=f.end,m=h,p.row==m.row)&&p.column==m.column)break;h=f.end}f.cursor=d?f.start:f.end,c.push(f)}if(u&&c.reverse(),!i){for(var v=c.length-1;c[v].isEmpty()&&0<v;)v--;if(0<v)for(var b=0;c[b].isEmpty();)b++;for(var y=v;b<=y;y--)c[y].isEmpty()&&c.splice(y,1)}return c}}.call(u.prototype),e("./editor").Editor);(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){e.marker&&(this.session.removeMarker(e.marker),-1!=(e=this.session.$selectionMarkers.indexOf(e))&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length)},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,i=e.length;i--;){var n=e[i];n.marker&&(this.session.removeMarker(n.marker),-1!=(n=t.indexOf(n)))&&t.splice(n,1)}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(a.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,i=e.command,n=e.editor;if(n.multiSelect)return i.multiSelectAction?t="forEach"==i.multiSelectAction?n.forEachSelection(i,e.args):"forEachLine"==i.multiSelectAction?n.forEachSelection(i,e.args,!0):"single"==i.multiSelectAction?(n.exitMultiSelectMode(),i.exec(n,e.args||{})):i.multiSelectAction(n,e.args||{}):(t=i.exec(n,e.args||{}),n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,r=i&&i.keepOrder,s=1==i||i&&i.$byLines,o=this.session,i=this.selection,a=i.rangeList,l=(r?i:a).ranges;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var r=i._eventRegistry,h=(i._eventRegistry={},new u(o));this.inVirtualSelectionMode=!0;for(var c=l.length;c--;){if(s)for(;0<c&&l[c].start.row==l[c-1].end.row;)c--;h.fromOrientedRange(l[c]),h.index=c,this.selection=o.selection=h;var d=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===d||(n=d),h.toOrientedRange(l[c])}h.detach(),this.selection=o.selection=i,this.inVirtualSelectionMode=!1,i._eventRegistry=r,i.mergeOverlappingRanges(),i.ranges[0]&&i.fromOrientedRange(i.ranges[0]);a=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),a&&a.from==a.to&&this.renderer.animateScrolling(a.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,i=[],n=0;n<t.length;n++)i.push(this.session.getTextRange(t[n]));var r=this.session.getDocument().getNewLineCharacter();(e=i.join(r)).length==(i.length-1)*r.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var i;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(i=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((i=t==this.multiSelect.anchor?i.cursor==i.start?i.end:i.start:i.cursor).row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,i){(t=t||{}).needle=e||t.needle,null==t.needle&&(n=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(n)),this.$search.set(t);var n,r=this.$search.findAll(this.session);if(!r.length)return 0;var s=this.multiSelect;i||s.toSingleRange(r[0]);for(var o=r.length;o--;)s.addRange(r[o],!0);return n&&s.rangeList.rangeAtPoint(n.start)&&s.addRange(n,!0),r.length},this.selectMoreLines=function(e,t){var i,n,r,s=this.selection.toOrientedRange(),o=s.cursor==s.end,a=this.session.documentToScreenPosition(s.cursor),l=(this.selection.$desiredColumn&&(a.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(a.row+e,a.column));e=s.isEmpty()?l:(i=this.session.documentToScreenPosition(o?s.end:s.start),this.session.screenToDocumentPosition(i.row+e,i.column)),o?(n=w.fromPoints(l,e)).cursor=n.start:(n=w.fromPoints(e,l)).cursor=n.end,n.desiredColumn=a.column,this.selection.inMultiSelectMode?t&&(r=s.cursor):this.selection.addRange(s),this.selection.addRange(n),r&&this.selection.substractPoint(r)},this.transposeSelections=function(e){for(var t=this.session,i=t.multiSelect,n=i.ranges,r=n.length;r--;)(o=n[r]).isEmpty()&&(a=t.getWordRange(o.start.row,o.start.column),o.start.row=a.start.row,o.start.column=a.start.column,o.end.row=a.end.row,o.end.column=a.end.column);i.mergeOverlappingRanges();for(var s=[],r=n.length;r--;){var o=n[r];s.unshift(t.getTextRange(o))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=n.length;r--;){var a=(o=n[r]).clone();t.replace(o,s[r]),o.start.row=a.start.row,o.start.column=a.start.column}i.fromOrientedRange(i.ranges[0])},this.selectMore=function(e,t,i){var n,r=this.session,s=r.multiSelect.toOrientedRange();s.isEmpty()&&((s=r.getWordRange(s.start.row,s.start.column)).cursor=-1==e?s.start:s.end,this.multiSelect.addRange(s),i)||(i=r.getTextRange(s),r=r,i=i,n=e,l.$options.wrap=!0,l.$options.needle=i,l.$options.backwards=-1==n,(i=l.find(r))&&(i.cursor=-1==e?i.start:i.end,this.session.unfold(i),this.multiSelect.addRange(i),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(s.cursor))},this.alignCursors=function(){var r=this.session,t=r.multiSelect,e=t.ranges,i=-1,n=e.filter(function(e){if(e.cursor.row==i)return!0;i=e.cursor.row});if(e.length&&n.length!=e.length-1){n.forEach(function(e){t.substractPoint(e.cursor)});var s=0,o=1/0,a=e.map(function(e){var e=e.cursor,t=r.getLine(e.row).substr(e.column).search(/\S/g);return e.column>s&&(s=e.column),(t=-1==t?0:t)<o&&(o=t),t});e.forEach(function(e,t){var i=e.cursor,n=s-i.column,t=a[t]-o;t<n?r.insert(i,p.stringRepeat(" ",n-t)):r.remove(new w(i.row,i.column,i.row,i.column-n+t)),e.start.column=e.end.column=s,e.start.row=e.end.row=i.row,e.cursor=e.end}),t.fromOrientedRange(e[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var n=this.selection.getRange(),l=n.start.row,h=n.end.row,e=l==h;if(e){for(var c,d=this.session.getLength();c=this.session.getLine(h),/[=:]/.test(c)&&++h<d;);for(;c=this.session.getLine(l),/[=:]/.test(c)&&0<--l;);l<0&&(l=0),d<=h&&(h=d-1)}var u=this.session.removeFullLines(l,h),u=this.$reAlignText(u,e);this.session.insert({row:l,column:0},u.join("\n")+"\n"),e||(n.start.column=0,n.end.column=u[u.length-1].length),this.selection.setRange(n)}},this.$reAlignText=function(e,t){function i(e){return p.stringRepeat(" ",e)}function n(e){return e[2]?i(r)+e[2]+i(s-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var r,s,o,a=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?(null==r?(r=t[1].length,s=t[2].length,o=t[3].length):(r+s+o!=t[1].length+t[2].length+t[3].length&&(l=!1),r!=t[1].length&&(a=!1),r>t[1].length&&(r=t[1].length),s<t[2].length&&(s=t[2].length),o>t[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;++t<a;){var h=e.getLine(t).search(n);if(-1!=h){if(h<=s){h=e.getTokenAt(t,0);if(!h||"string"!==h.type)break}l=t}}return r<l?(o=e.getLine(l).length,new c(r,i,l,o)):void 0}},this.openingBracketBlock=function(e,t,i,n,r){i={row:i,column:n+1},n=e.$findClosingBracket(t,i,r);if(n)return"start"==(t=null==(t=e.foldWidgets[n.row])?e.getFoldWidget(n.row):t)&&n.row>i.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;o<r;o++)i[o]&&(i[o].hidden=s);i[r]&&(s?i[n]?i[r].hidden=s:i[n]=i[r]:(i[n]==i[r]&&(i[n]=void 0),i[r].hidden=s))}},this.updateOnChange=function(e){var t,i,n,r=this.session.lineWidgets;r&&(t=e.start.row,0!=(i=e.end.row-t))&&("remove"==e.action?(n=r.splice(t+1,i),!r[t]&&n[n.length-1]&&(r[t]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this)):(n=new Array(i),r[t]&&null!=r[t].column&&e.start.column>r[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<i.length;s++){var o=i[s];if(o&&o.el&&o.session==this.session){if(!o._inDocument){if(this.session.lineWidgets[o.row]!=o)continue;o._inDocument=!0,t.container.appendChild(o.el)}o.h=o.el.offsetHeight,o.fixedWidth||(o.w=o.el.offsetWidth,o.screenWidth=Math.ceil(o.w/n.characterWidth));var a=o.h/n.lineHeight;o.coverLine&&(a-=this.session.getRowLineCount(o.row))<0&&(a=0),o.rowCount!=a&&(o.rowCount=a,o.row<r)&&(r=o.row)}}r!=1/0&&(this.session._emit("changeFold",{data:{start:{row:r}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(e,t){var i=t.layerConfig,n=this.session.lineWidgets;if(n){for(var r=Math.min(this.firstRow,i.firstRow),s=Math.max(this.lastRow,i.lastRow,n.length);0<r&&!n[r];)r--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var o=r;o<=s;o++){var a,l=n[o];l&&l.el&&(l.hidden?l.el.style.top=-100-(l.pixelHeight||0)+"px":(l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el)),a=t.$cursorLayer.getPixelPosition({row:o,column:0},!0).top,l.coverLine||(a+=i.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=a-i.offset+"px",a=l.coverGutter?0:t.gutterWidth,l.fixedWidth||(a-=t.scrollLeft),l.el.style.left=a+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=i.width+2*i.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""))}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";function h(e,t,i){var n=e.getAnnotations().sort(a.comparePoints);if(n.length){var r=function(e,t,i){for(var n=0,r=e.length-1;n<=r;){var s=n+r>>1,o=i(t,e[s]);if(0<o)n=1+s;else{if(!(o<0))return s;r=s-1}}return-(n+1)}(n,{row:t,column:-1},a.comparePoints),s=((r=r<0?-r-1:r)>=n.length?r=0<i?0:n.length-1:0===r&&i<0&&(r=n.length-1),n[r]);if(s&&i){if(s.row===t){for(;(s=n[r+=i])&&s.row===t;);if(!s)return n.slice()}var o=[];for(t=s.row;o[i<0?"unshift":"push"](s),(s=n[r+=i])&&s.row==t;);return o.length&&o}}}var c=e("../line_widgets").LineWidgets,d=e("../lib/dom"),a=e("../range").Range;t.showErrorMarker=function(e,t){var i,n=e.session,r=(n.widgetManager||(n.widgetManager=new c(n),n.widgetManager.attach(e)),e.getCursorPosition()),s=r.row,o=n.widgetManager.getWidgetsAtRow(s).filter(function(e){return"errorMarker"==e.type})[0],s=(o?o.destroy():s-=t,h(n,s,t));if(s){t=s[0];r.column=(t.pos&&"number"!=typeof t.column?t.pos.sc:t.column)||0,r.row=t.row,i=e.renderer.$gutterLayer.$annotations[r.row]}else{if(o)return;i={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);function a(e,t,i){if(0===t&&("esc"===i||"return"===i))return l.destroy(),{command:"null"}}var l={row:r.row,fixedWidth:!0,coverGutter:!0,el:d.createElement("div"),type:"errorMarker"},s=l.el.appendChild(d.createElement("div")),t=l.el.appendChild(d.createElement("div")),o=(t.className="error_widget_arrow "+i.className,e.renderer.$cursorLayer.getPixelPosition(r).left);t.style.left=o+e.renderer.gutterWidth-5+"px",l.el.className="error_widget_wrapper",s.className="error_widget "+i.className,s.innerHTML=i.text.join("<br>"),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)});
|
||
;"use strict";(()=>{var Ol=Object.defineProperty;var Al=(e,t)=>{for(var o in t)Ol(e,o,{get:t[o],enumerable:!0})};function as(e){let t=Object.create(null);for(let o of e.split(","))t[o]=1;return o=>o in t}var Ie={},jt=[],nt=()=>{},Wn=()=>!1,ls=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ds=e=>e.startsWith("onUpdate:"),Be=Object.assign,Es=(e,t)=>{let o=e.indexOf(t);o>-1&&e.splice(o,1)},Il=Object.prototype.hasOwnProperty,Se=(e,t)=>Il.call(e,t),we=Array.isArray,Vt=e=>Cs(e)==="[object Map]",is=e=>Cs(e)==="[object Set]",Jo=e=>Cs(e)==="[object Date]";var ke=e=>typeof e=="function",Fe=e=>typeof e=="string",ut=e=>typeof e=="symbol",Te=e=>e!==null&&typeof e=="object",Kn=e=>(Te(e)||ke(e))&&ke(e.then)&&ke(e.catch),Zo=Object.prototype.toString,Cs=e=>Zo.call(e),Yn=e=>Cs(e).slice(8,-1),en=e=>Cs(e)==="[object Object]",tn=e=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,us=as(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");var sn=e=>{let t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Vl=/-\w/g,We=sn(e=>e.replace(Vl,t=>t.slice(1).toUpperCase())),Pl=/\B([A-Z])/g,Pt=sn(e=>e.replace(Pl,"-$1").toLowerCase()),Wt=sn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ns=sn(e=>e?`on${Wt(e)}`:""),mt=(e,t)=>!Object.is(e,t),Ss=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},nn=(e,t,o,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:o})},xn=e=>{let t=parseFloat(e);return isNaN(t)?e:t};var Qo,Ds=()=>Qo||(Qo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Oe(e){if(we(e)){let t={};for(let o=0;o<e.length;o++){let r=e[o],n=Fe(r)?Fl(r):Oe(r);if(n)for(let i in n)t[i]=n[i]}return t}else if(Fe(e)||Te(e))return e}var ql=/;(?![^(]*\))/g,Ml=/:([^]+)/,$l=/\/\*[^]*?\*\//g;function Fl(e){let t={};return e.replace($l,"").split(ql).forEach(o=>{if(o){let r=o.split(Ml);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function T(e){let t="";if(Fe(e))t=e;else if(we(e))for(let o=0;o<e.length;o++){let r=T(e[o]);r&&(t+=r+" ")}else if(Te(e))for(let o in e)e[o]&&(t+=o+" ");return t.trim()}var er="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",tr=as(er),Ll=as(er+",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");function on(e){return!!e||e===""}function Ul(e,t){if(e.length!==t.length)return!1;let o=!0;for(let r=0;o&&r<e.length;r++)o=cs(e[r],t[r]);return o}function Xo(e,t){if(e.size!==t.size)return!1;let o=Array.from(t),r=new Uint8Array(o.length);for(let n of e){let i=-1;for(let a=0;a<o.length;a++)if(!r[a]&&cs(n,o[a])){i=a;break}if(i<0)return!1;r[i]=1}return!0}function cs(e,t){if(e===t)return!0;let o=Jo(e),r=Jo(t);if(o||r)return o&&r?e.getTime()===t.getTime():!1;if(o=ut(e),r=ut(t),o||r)return e===t;if(o=we(e),r=we(t),o||r)return o&&r?Ul(e,t):!1;if(o=Te(e),r=Te(t),o||r){if(!o||!r)return!1;if(o=Vt(e),r=Vt(t),o||r||(o=is(e),r=is(t),o||r))return o&&r?Xo(e,t):!1;let n=Object.keys(e).length,i=Object.keys(t).length;if(n!==i)return!1;for(let a in e){let u=e.hasOwnProperty(a),p=t.hasOwnProperty(a);if(u&&!p||!u&&p||!cs(e[a],t[a]))return!1}}return String(e)===String(t)}var sr=e=>!!(e&&e.__v_isRef===!0),c=e=>Fe(e)?e:e==null?"":we(e)||Te(e)&&(e.toString===Zo||!ke(e.toString))?sr(e)?c(e.value):JSON.stringify(e,nr,2):String(e),nr=(e,t)=>sr(t)?nr(e,t.value):Vt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[r,n],i)=>(o[jn(r,i)+" =>"]=n,o),{})}:is(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>jn(o))}:ut(t)?jn(t):Te(t)&&!we(t)&&!en(t)?String(t):t,jn=(e,t="")=>{var o;return ut(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};function zl(e,...t){console.warn(`[Vue warn] ${e}`,...t)}var Ke,As=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Ke&&(Ke.active?(this.parent=Ke,this.index=(Ke.scopes||(Ke.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){let r=this.scopes.slice();for(t=0,o=r.length;t<o;t++)r[t].pause()}for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,o;if(this.scopes){let n=this.scopes.slice();for(t=0,o=n.length;t<o;t++)n[t].resume()}let r=this.effects.slice();for(t=0,o=r.length;t<o;t++)r[t].resume()}}run(t){if(this._active){let o=Ke;try{return Ke=this,t()}finally{Ke=o}}}on(){++this._on===1&&(this.prevScope=Ke,Ke=this)}off(){if(this._on>0&&--this._on===0){if(Ke===this)Ke=this.prevScope;else{let t=Ke;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,r;for(o=0,r=this.effects.length;o<r;o++)this.effects[o].stop();for(this.effects.length=0,o=0,r=this.cleanups.length;o<r;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){let n=this.scopes.slice();for(o=0,r=n.length;o<r;o++)n[o].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){let n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}};function ir(){return Ke}function qs(e,t=!1){Ke&&Ke.cleanups.push(e)}var Me;var Jn=new WeakSet,fs=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ke&&(Ke.active?Ke.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Jn.has(this)&&(Jn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||lr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,or(this),dr(this);let t=Me,o=bt;Me=this,bt=!0;try{return this.fn()}finally{ur(this),Me=t,bt=o,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)uo(t);this.deps=this.depsTail=void 0,or(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Jn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Zn(this)&&this.run()}get dirty(){return Zn(this)}},ar=0,Ts,Os;function lr(e,t=!1){if(e.flags|=8,t){e.next=Os,Os=e;return}e.next=Ts,Ts=e}function ao(){ar++}function lo(){if(--ar>0)return;if(Os){let t=Os;for(Os=void 0;t;){let o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;Ts;){let t=Ts;for(Ts=void 0;t;){let o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=o}}if(e)throw e}function dr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ur(e){let t,o=e.depsTail,r=o;for(;r;){let n=r.prevDep;r.version===-1?(r===o&&(o=n),uo(r),Hl(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=t,e.depsTail=o}function Zn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(cr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function cr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Is)||(e.globalVersion=Is,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Zn(e))))return;e.flags|=2;let t=e.dep,o=Me,r=bt;Me=e,bt=!0;try{dr(e);let n=e.fn(e._value);(t.version===0||mt(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{Me=o,bt=r,ur(e),e.flags&=-3}}function uo(e,t=!1){let{dep:o,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),o.subs===e&&(o.subs=r,!r&&o.computed)){o.computed.flags&=-5;for(let i=o.computed.deps;i;i=i.nextDep)uo(i,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function Hl(e){let{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}var bt=!0,pr=[];function St(){pr.push(bt),bt=!1}function Dt(){let e=pr.pop();bt=e===void 0?!0:e}function or(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let o=Me;Me=void 0;try{t()}finally{Me=o}}}var Is=0,eo=class{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Vs=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Me||!bt||Me===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Me)o=this.activeLink=new eo(Me,this),Me.deps?(o.prevDep=Me.depsTail,Me.depsTail.nextDep=o,Me.depsTail=o):Me.deps=Me.depsTail=o,fr(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){let r=o.nextDep;r.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=r),o.prevDep=Me.depsTail,o.nextDep=void 0,Me.depsTail.nextDep=o,Me.depsTail=o,Me.deps===o&&(Me.deps=r)}return o}trigger(t){this.version++,Is++,this.notify(t)}notify(t){ao();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{lo()}}};function fr(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)fr(r)}let o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}var to=new WeakMap,Yt=Symbol(""),so=Symbol(""),Ps=Symbol("");function Je(e,t,o){if(bt&&Me){let r=to.get(e);r||to.set(e,r=new Map);let n=r.get(o);n||(r.set(o,n=new Vs),n.map=r,n.key=o),n.track()}}function Ct(e,t,o,r,n,i){let a=to.get(e);if(!a){Is++;return}let u=p=>{p&&p.trigger()};if(ao(),t==="clear")a.forEach(u);else{let p=we(e),h=p&&tn(o);if(p&&o==="length"){let v=Number(r);a.forEach((g,f)=>{(f==="length"||f===Ps||!ut(f)&&f>=v)&&u(g)})}else switch((o!==void 0||a.has(void 0))&&u(a.get(o)),h&&u(a.get(Ps)),t){case"add":p?h&&u(a.get("length")):(u(a.get(Yt)),Vt(e)&&u(a.get(so)));break;case"delete":p||(u(a.get(Yt)),Vt(e)&&u(a.get(so)));break;case"set":Vt(e)&&u(a.get(Yt));break}}lo()}function ps(e){let t=De(e);return t===e?t:(Je(t,"iterate",Ps),ot(e)?t:t.map(ht))}function Ms(e){return Je(e=De(e),"iterate",Ps),e}function Et(e,t){return wt(e)?xt(Mt(e)?ht(t):t):ht(t)}var Bl={__proto__:null,[Symbol.iterator](){return Qn(this,Symbol.iterator,e=>Et(this,e))},concat(...e){return ps(this).concat(...e.map(t=>we(t)?ps(t):t))},entries(){return Qn(this,"entries",e=>(e[1]=Et(this,e[1]),e))},every(e,t){return qt(this,"every",e,t,void 0,arguments)},filter(e,t){return qt(this,"filter",e,t,o=>o.map(r=>Et(this,r)),arguments)},find(e,t){return qt(this,"find",e,t,o=>Et(this,o),arguments)},findIndex(e,t){return qt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return qt(this,"findLast",e,t,o=>Et(this,o),arguments)},findLastIndex(e,t){return qt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return qt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Xn(this,"includes",e)},indexOf(...e){return Xn(this,"indexOf",e)},join(e){return ps(this).join(e)},lastIndexOf(...e){return Xn(this,"lastIndexOf",e)},map(e,t){return qt(this,"map",e,t,void 0,arguments)},pop(){return Rs(this,"pop")},push(...e){return Rs(this,"push",e)},reduce(e,...t){return rr(this,"reduce",e,t)},reduceRight(e,...t){return rr(this,"reduceRight",e,t)},shift(){return Rs(this,"shift")},some(e,t){return qt(this,"some",e,t,void 0,arguments)},splice(...e){return Rs(this,"splice",e)},toReversed(){return ps(this).toReversed()},toSorted(e){return ps(this).toSorted(e)},toSpliced(...e){return ps(this).toSpliced(...e)},unshift(...e){return Rs(this,"unshift",e)},values(){return Qn(this,"values",e=>Et(this,e))}};function Qn(e,t,o){let r=Ms(e),n=r[t]();return r!==e&&!ot(e)&&(n._next=n.next,n.next=()=>{let i=n._next();return i.done||(i.value=o(i.value)),i}),n}var Gl=Array.prototype;function qt(e,t,o,r,n,i){let a=Ms(e),u=a!==e&&!ot(e),p=a[t];if(p!==Gl[t]){let g=p.apply(e,i);return u?ht(g):g}let h=o;a!==e&&(u?h=function(g,f){return o.call(this,Et(e,g),f,e)}:o.length>2&&(h=function(g,f){return o.call(this,g,f,e)}));let v=p.call(a,h,r);return u&&n?n(v):v}function rr(e,t,o,r){let n=Ms(e),i=n!==e&&!ot(e),a=o,u=!1;n!==e&&(i?(u=r.length===0,a=function(h,v,g){return u&&(u=!1,h=Et(e,h)),o.call(this,h,Et(e,v),g,e)}):o.length>3&&(a=function(h,v,g){return o.call(this,h,v,g,e)}));let p=n[t](a,...r);return u?Et(e,p):p}function Xn(e,t,o){let r=De(e);Je(r,"iterate",Ps);let n=r[t](...o);return(n===-1||n===!1)&&Fs(o[0])?(o[0]=De(o[0]),r[t](...o)):n}function Rs(e,t,o=[]){St(),ao();let r=De(e)[t].apply(e,o);return lo(),Dt(),r}var jl=as("__proto__,__v_isRef,__isVue"),mr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ut));function Wl(e){ut(e)||(e=String(e));let t=De(this);return Je(t,"has",e),t.hasOwnProperty(e)}var dn=class{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,r){if(o==="__v_skip")return t.__v_skip;let n=this._isReadonly,i=this._isShallow;if(o==="__v_isReactive")return!n;if(o==="__v_isReadonly")return n;if(o==="__v_isShallow")return i;if(o==="__v_raw")return r===(n?i?td:yr:i?vr:hr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;let a=we(t);if(!n){let p;if(a&&(p=Bl[o]))return p;if(o==="hasOwnProperty")return Wl}let u=Reflect.get(t,o,xe(t)?t:r);if((ut(o)?mr.has(o):jl(o))||(n||Je(t,"get",o),i))return u;if(xe(u)){let p=a&&tn(o)?u:u.value;return n&&Te(p)?cn(p):p}return Te(u)?n?cn(u):Le(u):u}},un=class extends dn{constructor(t=!1){super(!1,t)}set(t,o,r,n){let i=t[o],a=we(t)&&tn(o);if(!this._isShallow){let h=wt(i);if(!ot(r)&&!wt(r)&&(i=De(i),r=De(r)),!a&&xe(i)&&!xe(r))return h||(i.value=r),!0}let u=a?Number(o)<t.length:Se(t,o),p=Reflect.set(t,o,r,xe(t)?t:n);return t===De(n)&&p&&(u?mt(r,i)&&Ct(t,"set",o,r,i):Ct(t,"add",o,r)),p}deleteProperty(t,o){let r=Se(t,o),n=t[o],i=Reflect.deleteProperty(t,o);return i&&r&&Ct(t,"delete",o,void 0,n),i}has(t,o){let r=Reflect.has(t,o);return(!ut(o)||!mr.has(o))&&Je(t,"has",o),r}ownKeys(t){return Je(t,"iterate",we(t)?"length":Yt),Reflect.ownKeys(t)}},no=class extends dn{constructor(t=!1){super(!0,t)}set(t,o){return!0}deleteProperty(t,o){return!0}},Kl=new un,Yl=new no,xl=new un(!0);var oo=e=>e,rn=e=>Reflect.getPrototypeOf(e);function Jl(e,t,o){return function(...r){let n=this.__v_raw,i=De(n),a=Vt(i),u=e==="entries"||e===Symbol.iterator&&a,p=e==="keys"&&a,h=n[e](...r),v=o?oo:t?xt:ht;return!t&&Je(i,"iterate",p?so:Yt),Be(Object.create(h),{next(){let{value:g,done:f}=h.next();return f?{value:g,done:f}:{value:u?[v(g[0]),v(g[1])]:v(g),done:f}}})}}function an(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ql(e,t){let o={get(n){let i=this.__v_raw,a=De(i),u=De(n);e||(mt(n,u)&&Je(a,"get",n),Je(a,"get",u));let{has:p}=rn(a),h=t?oo:e?xt:ht;if(p.call(a,n))return h(i.get(n));if(p.call(a,u))return h(i.get(u));i!==a&&i.get(n)},get size(){let n=this.__v_raw;return!e&&Je(De(n),"iterate",Yt),n.size},has(n){let i=this.__v_raw,a=De(i),u=De(n);return e||(mt(n,u)&&Je(a,"has",n),Je(a,"has",u)),n===u?i.has(n):i.has(n)||i.has(u)},forEach(n,i){let a=this,u=a.__v_raw,p=De(u),h=t?oo:e?xt:ht;return!e&&Je(p,"iterate",Yt),u.forEach((v,g)=>n.call(i,h(v),h(g),a))}};return Be(o,e?{add:an("add"),set:an("set"),delete:an("delete"),clear:an("clear")}:{add(n){let i=De(this),a=rn(i),u=De(n),p=!t&&!ot(n)&&!wt(n)?u:n;return a.has.call(i,p)||mt(n,p)&&a.has.call(i,n)||mt(u,p)&&a.has.call(i,u)||(i.add(p),Ct(i,"add",p,p)),this},set(n,i){!t&&!ot(i)&&!wt(i)&&(i=De(i));let a=De(this),{has:u,get:p}=rn(a),h=u.call(a,n);h||(n=De(n),h=u.call(a,n));let v=p.call(a,n);return a.set(n,i),h?mt(i,v)&&Ct(a,"set",n,i,v):Ct(a,"add",n,i),this},delete(n){let i=De(this),{has:a,get:u}=rn(i),p=a.call(i,n);p||(n=De(n),p=a.call(i,n));let h=u?u.call(i,n):void 0,v=i.delete(n);return p&&Ct(i,"delete",n,void 0,h),v},clear(){let n=De(this),i=n.size!==0,a=void 0,u=n.clear();return i&&Ct(n,"clear",void 0,void 0,a),u}}),["keys","values","entries",Symbol.iterator].forEach(n=>{o[n]=Jl(n,e,t)}),o}function co(e,t){let o=Ql(e,t);return(r,n,i)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_raw"?r:Reflect.get(Se(o,n)&&n in r?o:r,n,i)}var Xl={get:co(!1,!1)},Zl={get:co(!1,!0)},ed={get:co(!0,!1)};var hr=new WeakMap,vr=new WeakMap,yr=new WeakMap,td=new WeakMap;function sd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Le(e){return wt(e)?e:po(e,!1,Kl,Xl,hr)}function $s(e){return po(e,!1,xl,Zl,vr)}function cn(e){return po(e,!0,Yl,ed,yr)}function po(e,t,o,r,n){if(!Te(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let i=n.get(e);if(i)return i;let a=sd(Yn(e));if(a===0)return e;let u=new Proxy(e,a===2?r:o);return n.set(e,u),u}function Mt(e){return wt(e)?Mt(e.__v_raw):!!(e&&e.__v_isReactive)}function wt(e){return!!(e&&e.__v_isReadonly)}function ot(e){return!!(e&&e.__v_isShallow)}function Fs(e){return e?!!e.__v_raw:!1}function De(e){let t=e&&e.__v_raw;return t?De(t):e}function fo(e){return!Se(e,"__v_skip")&&Object.isExtensible(e)&&nn(e,"__v_skip",!0),e}var ht=e=>Te(e)?Le(e):e,xt=e=>Te(e)?cn(e):e;function xe(e){return e?e.__v_isRef===!0:!1}function rt(e){return gr(e,!1)}function fn(e){return gr(e,!0)}function gr(e,t){return xe(e)?e:new ro(e,t)}var ro=class{constructor(t,o){this.dep=new Vs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:De(t),this._value=o?t:ht(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){let o=this._rawValue,r=this.__v_isShallow||ot(t)||wt(t);t=r?t:De(t),mt(t,o)&&(this._rawValue=t,this._value=r?t:ht(t),this.dep.trigger())}};function $t(e){return xe(e)?e.value:e}var nd={get:(e,t,o)=>t==="__v_raw"?e:$t(Reflect.get(e,t,o)),set:(e,t,o,r)=>{let n=e[t];return xe(n)&&!xe(o)?(n.value=o,!0):Reflect.set(e,t,o,r)}};function mn(e){return Mt(e)?e:new Proxy(e,nd)}var io=class{constructor(t,o,r){this.fn=t,this.setter=o,this._value=void 0,this.dep=new Vs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Is-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return lr(this,!0),!0}get value(){let t=this.dep.track();return cr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};function br(e,t,o=!1){let r,n;return ke(e)?r=e:(r=e.get,n=e.set),new io(r,n,o)}var ln={},pn=new WeakMap,Kt;function wr(e,t=!1,o=Kt){if(o){let r=pn.get(o);r||pn.set(o,r=[]),r.push(e)}}function kr(e,t,o=Ie){let{immediate:r,deep:n,once:i,scheduler:a,augmentJob:u,call:p}=o,h=A=>{(o.onWarn||zl)("Invalid watch source: ",A,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},v=A=>n?A:ot(A)||n===!1||n===0?Nt(A,1):Nt(A),g,f,b,_,k=!1,R=!1;if(xe(e)?(f=()=>e.value,k=ot(e)):Mt(e)?(f=()=>v(e),k=!0):we(e)?(R=!0,k=e.some(A=>Mt(A)||ot(A)),f=()=>e.map(A=>{if(xe(A))return A.value;if(Mt(A))return v(A);if(ke(A))return p?p(A,2):A()})):ke(e)?t?f=p?()=>p(e,2):e:f=()=>{if(b){St();try{b()}finally{Dt()}}let A=Kt;Kt=g;try{return p?p(e,3,[_]):e(_)}finally{Kt=A}}:f=nt,t&&n){let A=f,q=n===!0?1/0:n;f=()=>Nt(A(),q)}let S=ir(),D=()=>{g.stop(),S&&S.active&&Es(S.effects,g)};if(i&&t){let A=t;t=(...q)=>{let ee=A(...q);return D(),ee}}let I=R?new Array(e.length).fill(ln):ln,C=A=>{if(!(!(g.flags&1)||!g.dirty&&!A))if(t){let q=g.run();if(A||n||k||(R?q.some((ee,J)=>mt(ee,I[J])):mt(q,I))){b&&b();let ee=Kt;Kt=g;try{let J=[q,I===ln?void 0:R&&I[0]===ln?[]:I,_];I=q,p?p(t,3,J):t(...J)}finally{Kt=ee}}}else g.run()};return u&&u(C),g=new fs(f),g.scheduler=a?()=>a(C,!1):C,_=A=>wr(A,!1,g),b=g.onStop=()=>{let A=pn.get(g);if(A){if(p)p(A,4);else for(let q of A)q();pn.delete(g)}},t?r?C(!0):I=g.run():a?a(C.bind(null,!0),!0):g.run(),D.pause=g.pause.bind(g),D.resume=g.resume.bind(g),D.stop=D,D}function Nt(e,t=1/0,o){if(t<=0||!Te(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,xe(e))Nt(e.value,t,o);else if(we(e))for(let r=0;r<e.length;r++)Nt(e[r],t,o);else if(is(e)||Vt(e))e.forEach(r=>{Nt(r,t,o)});else if(en(e)){for(let r in e)Nt(e[r],t,o);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Nt(e[r],t,o)}return e}function xs(e,t,o,r){try{return r?e(...r):e()}catch(n){Cn(n,t,o)}}function vt(e,t,o,r){if(ke(e)){let n=xs(e,t,o,r);return n&&Kn(n)&&n.catch(i=>{Cn(i,t,o)}),n}if(we(e)){let n=[];for(let i=0;i<e.length;i++)n.push(vt(e[i],t,o,r));return n}}function Cn(e,t,o,r=!0){let n=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Ie;if(t){let u=t.parent,p=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${o}`;for(;u;){let v=u.ec;if(v){for(let g=0;g<v.length;g++)if(v[g](e,p,h)===!1)return}u=u.parent}if(i){St(),xs(i,null,10,[e,p,h]),Dt();return}}ad(e,o,n,r,a)}function ad(e,t,o,r=!0,n=!1){if(n)throw e;console.error(e)}var tt=[],Tt=-1,hs=[],Gt=null,ms=0,$r=Promise.resolve(),vn=null;function kt(e){let t=vn||$r;return e?t.then(this?e.bind(this):e):t}function ld(e){let t=Tt+1,o=tt.length;for(;t<o;){let r=t+o>>>1,n=tt[r],i=js(n);i<e||i===e&&n.flags&2?t=r+1:o=r}return t}function _o(e){if(!(e.flags&1)){let t=js(e),o=tt[tt.length-1];!o||!(e.flags&2)&&t>=js(o)?tt.push(e):tt.splice(ld(t),0,e),e.flags|=1,Fr()}}function Fr(){vn||(vn=$r.then(zr))}function Lr(e){if(!we(e))Gt&&e.id===-1?Gt.splice(ms+1,0,e):e.flags&1||(hs.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)hs.push(e[t]);Fr()}function _r(e,t,o=Tt+1){for(;o<tt.length;o++){let r=tt[o];if(r&&r.flags&2){if(e&&r.id!==e.uid)continue;tt.splice(o,1),o--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Ur(e){if(hs.length){let t=[...new Set(hs)].sort((o,r)=>js(o)-js(r));if(hs.length=0,Gt){for(let o=0;o<t.length;o++)Gt.push(t[o]);return}for(Gt=t,ms=0;ms<Gt.length;ms++){let o=Gt[ms];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}Gt=null,ms=0}}var js=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zr(e){let t=nt;try{for(Tt=0;Tt<tt.length;Tt++){let o=tt[Tt];o&&!(o.flags&8)&&(o.flags&4&&(o.flags&=-2),xs(o,o.i,o.i?15:14),o.flags&4||(o.flags&=-2))}}finally{for(;Tt<tt.length;Tt++){let o=tt[Tt];o&&(o.flags&=-2)}Tt=-1,tt.length=0,Ur(e),vn=null,(tt.length||hs.length)&&zr(e)}}var ct=null,Hr=null;function yn(e){let t=ct;return ct=e,Hr=e&&e.type.__scopeId||null,t}function dd(e,t=ct,o){if(!t||e._n)return e;let r=(...n)=>{r._d&&wn(-1);let i=yn(t),a=Xt.length,u;try{u=e(...n)}finally{for(let p=Xt.length;p>a;p--)yi();yn(i),r._d&&wn(1)}return u};return r._n=!0,r._c=!0,r._d=!0,r}function E(e,t){if(ct===null)return e;let o=In(ct),r=e.dirs||(e.dirs=[]);for(let n=0;n<t.length;n++){let[i,a,u,p=Ie]=t[n];i&&(ke(i)&&(i={mounted:i,updated:i}),i.deep&&Nt(a),r.push({dir:i,instance:o,value:a,oldValue:void 0,arg:u,modifiers:p}))}return e}function Jt(e,t,o,r){let n=e.dirs,i=t&&t.dirs;for(let a=0;a<n.length;a++){let u=n[a];i&&(u.oldValue=i[a].value);let p=u.dir[r];p&&(St(),vt(p,o,8,[e.el,u,e,t]),Dt())}}function Zt(e,t){if(Ze){let o=Ze.provides,r=Ze.parent&&Ze.parent.provides;r===o&&(o=Ze.provides=Object.create(r)),o[e]=t}}function at(e,t,o=!1){let r=Do();if(r||vs){let n=vs?vs._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(n&&e in n)return n[e];if(arguments.length>1)return o&&ke(t)?t.call(r&&r.proxy):t}}var ud=Symbol.for("v-scx"),cd=()=>{{let e=at(ud);return e}};function ze(e,t,o){return Br(e,t,o)}function Br(e,t,o=Ie){let{immediate:r,deep:n,flush:i,once:a}=o,u=Be({},o),p=t&&r||!t&&i!=="post",h;if(Ys){if(i==="sync"){let b=cd();h=b.__watcherHandles||(b.__watcherHandles=[])}else if(!p){let b=()=>{};return b.stop=nt,b.resume=nt,b.pause=nt,b}}let v=Ze;u.call=(b,_,k)=>vt(b,v,_,k);let g=!1;i==="post"?u.scheduler=b=>{it(b,v&&v.suspense)}:i!=="sync"&&(g=!0,u.scheduler=(b,_)=>{_?b():_o(b)}),u.augmentJob=b=>{t&&(b.flags|=4),g&&(b.flags|=2,v&&(b.id=v.uid,b.i=v))};let f=kr(e,t,u);return Ys&&(h?h.push(f):p&&f()),f}function pd(e,t,o){let r=this.proxy,n=Fe(e)?e.includes(".")?Gr(r,e):()=>r[e]:e.bind(r,r),i;ke(t)?i=t:(i=t.handler,o=t);let a=Js(this),u=Br(n,i.bind(r),o);return a(),u}function Gr(e,t){let o=t.split(".");return()=>{let r=e;for(let n=0;n<o.length&&r;n++)r=r[o[n]];return r}}var fd=Symbol("_vte"),Nn=e=>e.__isTeleport;var mo=Symbol("_leaveCb");function md(e){let t=e[0];if(e.length>1){let o=!1;for(let r of e)if(r.type!==Lt){t=r,o=!0;break}}return t}function jr(e){if(!Eo(e))return Nn(e.type)&&e.children?md(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&ke(o.default))return o.default()}}function Sn(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let o=e.component.subTree;Sn(Nn(o.type)&&jr(o)||o,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Dn(e,t){return ke(e)?Be({name:e.name},t,{setup:e}):e}function Wr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Er(e,t){let o;return!!((o=Object.getOwnPropertyDescriptor(e,t))&&!o.configurable)}var gn=new WeakMap;function zs(e,t,o,r,n=!1){if(we(e)){e.forEach((k,R)=>zs(k,t&&(we(t)?t[R]:t),o,r,n));return}if(Hs(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&zs(e,t,o,r.component.subTree);return}let i=r.shapeFlag&4?In(r.component):r.el,a=n?null:i,{i:u,r:p}=e,h=t&&t.r,v=u.refs===Ie?u.refs={}:u.refs,g=u.setupState,f=De(g),b=g===Ie?Wn:k=>Er(v,k)?!1:Se(f,k),_=(k,R)=>!(R&&Er(v,R));if(h!=null&&h!==p){if(Cr(t),Fe(h))v[h]=null,b(h)&&(g[h]=null);else if(xe(h)){let k=t;_(h,k.k)&&(h.value=null),k.k&&(v[k.k]=null)}}if(ke(p))xs(p,u,12,[a,v]);else{let k=Fe(p),R=xe(p);if(k||R){let S=()=>{if(e.f){let D=k?b(p)?g[p]:v[p]:_(p)||!e.k?p.value:v[e.k];if(n)we(D)&&Es(D,i);else if(we(D))D.includes(i)||D.push(i);else if(k)v[p]=[i],b(p)&&(g[p]=v[p]);else{let I=[i];_(p,e.k)&&(p.value=I),e.k&&(v[e.k]=I)}}else k?(v[p]=a,b(p)&&(g[p]=a)):R&&(_(p,e.k)&&(p.value=a),e.k&&(v[e.k]=a))};if(a){let D=()=>{S(),gn.delete(e)};D.id=-1,gn.set(e,D),it(D,o)}else Cr(e),S()}}}function Cr(e){let t=gn.get(e);t&&(t.flags|=8,gn.delete(e))}var Z3=Ds().requestIdleCallback||(e=>setTimeout(e,1)),eq=Ds().cancelIdleCallback||(e=>clearTimeout(e));var Hs=e=>!!e.type.__asyncLoader;var Eo=e=>e.type.__isKeepAlive;function Kr(e,t){xr(e,"a",t)}function Yr(e,t){xr(e,"da",t)}function xr(e,t,o=Ze){let r=e.__wdc||(e.__wdc=()=>{let n=o;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Rn(t,r,o),o){let n=o.parent;for(;n&&n.parent;)Eo(n.parent.vnode)&&hd(r,t,o,n),n=n.parent}}function hd(e,t,o,r){let n=Rn(t,e,r,!0);Tn(()=>{Es(r[t],n)},o)}function Rn(e,t,o=Ze,r=!1){if(o){let n=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...a)=>{St();let u=Js(o),p=vt(t,o,e,a);return u(),Dt(),p});return r?n.unshift(i):n.push(i),i}}var Ut=e=>(t,o=Ze)=>{(!Ys||e==="sp")&&Rn(e,(...r)=>t(...r),o)},vd=Ut("bm"),At=Ut("m"),Jr=Ut("bu"),Qr=Ut("u"),es=Ut("bum"),Tn=Ut("um"),yd=Ut("sp"),gd=Ut("rtg"),bd=Ut("rtc");function wd(e,t=Ze){Rn("ec",e,t)}var Xr="components",kd="directives";function Qe(e,t){return Zr(Xr,e,!0,t)||e}var _d=Symbol.for("v-ndc");function ye(e){return Zr(kd,e)}function Zr(e,t,o=!0,r=!1){let n=ct||Ze;if(n){let i=n.type;if(e===Xr){let u=ru(i,!1);if(u&&(u===t||u===We(t)||u===Wt(We(t))))return i}let a=Nr(n[e]||i[e],t)||Nr(n.appContext[e],t);return!a&&r?i:a}}function Nr(e,t){return e&&(e[t]||e[We(t)]||e[Wt(We(t))])}function re(e,t,o,r){let n,i=o&&o[r],a=we(e);if(a||Fe(e)){let u=a&&Mt(e),p=!1,h=!1;u&&(p=!ot(e),h=wt(e),e=Ms(e)),n=new Array(e.length);for(let v=0,g=e.length;v<g;v++)n[v]=t(p?h?xt(ht(e[v])):ht(e[v]):e[v],v,void 0,i&&i[v])}else if(typeof e=="number"){n=new Array(e);for(let u=0;u<e;u++)n[u]=t(u+1,u,void 0,i&&i[u])}else if(Te(e))if(e[Symbol.iterator])n=Array.from(e,(u,p)=>t(u,p,void 0,i&&i[p]));else{let u=Object.keys(e);n=new Array(u.length);for(let p=0,h=u.length;p<h;p++){let v=u[p];n[p]=t(e[v],v,p,i&&i[p])}}else n=[];return o&&(o[r]=n),n}var go=e=>e?wi(e)?In(e):go(e.parent):null;var Bs=Be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>go(e.parent),$root:e=>go(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Co(e),$forceUpdate:e=>e.f||(e.f=()=>{_o(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>pd.bind(e)});var ho=(e,t)=>e!==Ie&&!e.__isScriptSetup&&Se(e,t),Ed={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:o,setupState:r,data:n,props:i,accessCache:a,type:u,appContext:p}=e;if(t[0]!=="$"){let f=a[t];if(f!==void 0)switch(f){case 1:return r[t];case 2:return n[t];case 4:return o[t];case 3:return i[t]}else{if(ho(r,t))return a[t]=1,r[t];if(n!==Ie&&Se(n,t))return a[t]=2,n[t];if(Se(i,t))return a[t]=3,i[t];if(o!==Ie&&Se(o,t))return a[t]=4,o[t];bo&&(a[t]=0)}}let h=Bs[t],v,g;if(h)return t==="$attrs"&&Je(e.attrs,"get",""),h(e);if((v=u.__cssModules)&&(v=v[t]))return v;if(o!==Ie&&Se(o,t))return a[t]=4,o[t];if(g=p.config.globalProperties,Se(g,t))return g[t]},set({_:e},t,o){let{data:r,setupState:n,ctx:i}=e;return ho(n,t)?(n[t]=o,!0):r!==Ie&&Se(r,t)?(r[t]=o,!0):Se(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:r,appContext:n,props:i,type:a}},u){let p;return!!(o[u]||e!==Ie&&u[0]!=="$"&&Se(e,u)||ho(t,u)||Se(i,u)||Se(r,u)||Se(Bs,u)||Se(n.config.globalProperties,u)||(p=a.__cssModules)&&p[u])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:Se(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function Sr(e){return we(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}var bo=!0;function Cd(e){let t=Co(e),o=e.proxy,r=e.ctx;bo=!1,t.beforeCreate&&Dr(t.beforeCreate,e,"bc");let{data:n,computed:i,methods:a,watch:u,provide:p,inject:h,created:v,beforeMount:g,mounted:f,beforeUpdate:b,updated:_,activated:k,deactivated:R,beforeDestroy:S,beforeUnmount:D,destroyed:I,unmounted:C,render:A,renderTracked:q,renderTriggered:ee,errorCaptured:J,serverPrefetch:K,expose:U,inheritAttrs:de,components:se,directives:ie,filters:ce}=t;if(h&&Nd(h,r,null),a)for(let me in a){let ae=a[me];ke(ae)&&(r[me]=ae.bind(o))}if(n){let me=n.call(o,o);Te(me)&&(e.data=Le(me))}if(bo=!0,i)for(let me in i){let ae=i[me],O=ke(ae)?ae.bind(o,o):ke(ae.get)?ae.get.bind(o,o):nt,V=!ke(ae)&&ke(ae.set)?ae.set.bind(o):nt,j=Xe({get:O,set:V});Object.defineProperty(r,me,{enumerable:!0,configurable:!0,get:()=>j.value,set:Z=>j.value=Z})}if(u)for(let me in u)ei(u[me],r,o,me);if(p){let me=ke(p)?p.call(o):p;Reflect.ownKeys(me).forEach(ae=>{Zt(ae,me[ae])})}v&&Dr(v,e,"c");function he(me,ae){we(ae)?ae.forEach(O=>me(O.bind(o))):ae&&me(ae.bind(o))}if(he(vd,g),he(At,f),he(Jr,b),he(Qr,_),he(Kr,k),he(Yr,R),he(wd,J),he(bd,q),he(gd,ee),he(es,D),he(Tn,C),he(yd,K),we(U))if(U.length){let me=e.exposed||(e.exposed={});U.forEach(ae=>{Object.defineProperty(me,ae,{get:()=>o[ae],set:O=>o[ae]=O,enumerable:!0})})}else e.exposed||(e.exposed={});A&&e.render===nt&&(e.render=A),de!=null&&(e.inheritAttrs=de),se&&(e.components=se),ie&&(e.directives=ie),K&&Wr(e)}function Nd(e,t,o=nt){we(e)&&(e=wo(e));for(let r in e){let n=e[r],i;Te(n)?"default"in n?i=at(n.from||r,n.default,!0):i=at(n.from||r):i=at(n),xe(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:a=>i.value=a}):t[r]=i}}function Dr(e,t,o){vt(we(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,o)}function ei(e,t,o,r){let n=r.includes(".")?Gr(o,r):()=>o[r];if(Fe(e)){let i=t[e];ke(i)&&ze(n,i)}else if(ke(e))ze(n,e.bind(o));else if(Te(e))if(we(e))e.forEach(i=>ei(i,t,o,r));else{let i=ke(e.handler)?e.handler.bind(o):t[e.handler];ke(i)&&ze(n,i,e)}}function Co(e){let t=e.type,{mixins:o,extends:r}=t,{mixins:n,optionsCache:i,config:{optionMergeStrategies:a}}=e.appContext,u=i.get(t),p;return u?p=u:!n.length&&!o&&!r?p=t:(p={},n.length&&n.forEach(h=>bn(p,h,a,!0)),bn(p,t,a)),Te(t)&&i.set(t,p),p}function bn(e,t,o,r=!1){let{mixins:n,extends:i}=t;i&&bn(e,i,o,!0),n&&n.forEach(a=>bn(e,a,o,!0));for(let a in t)if(!(r&&a==="expose")){let u=Sd[a]||o&&o[a];e[a]=u?u(e[a],t[a]):t[a]}return e}var Sd={data:Rr,props:Tr,emits:Tr,methods:Us,computed:Us,beforeCreate:et,created:et,beforeMount:et,mounted:et,beforeUpdate:et,updated:et,beforeDestroy:et,beforeUnmount:et,destroyed:et,unmounted:et,activated:et,deactivated:et,errorCaptured:et,serverPrefetch:et,components:Us,directives:Us,watch:Rd,provide:Rr,inject:Dd};function Rr(e,t){return t?e?function(){return Be(ke(e)?e.call(this,this):e,ke(t)?t.call(this,this):t)}:t:e}function Dd(e,t){return Us(wo(e),wo(t))}function wo(e){if(we(e)){let t={};for(let o=0;o<e.length;o++)t[e[o]]=e[o];return t}return e}function et(e,t){return e?[...new Set([].concat(e,t))]:t}function Us(e,t){return e?Be(Object.create(null),e,t):t}function Tr(e,t){return e?we(e)&&we(t)?[...new Set([...e,...t])]:Be(Object.create(null),Sr(e),Sr(t??{})):t}function Rd(e,t){if(!e)return t;if(!t)return e;let o=Be(Object.create(null),e);for(let r in t)o[r]=et(e[r],t[r]);return o}function ti(){return{app:null,config:{isNativeTag:Wn,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Td=0;function Od(e,t){return function(r,n=null){ke(r)||(r=Be({},r)),n!=null&&!Te(n)&&(n=null);let i=ti(),a=new WeakSet,u=[],p=!1,h=i.app={_uid:Td++,_component:r,_props:n,_container:null,_context:i,_instance:null,version:au,get config(){return i.config},set config(v){},use(v,...g){return a.has(v)||(v&&ke(v.install)?(a.add(v),v.install(h,...g)):ke(v)&&(a.add(v),v(h,...g))),h},mixin(v){return i.mixins.includes(v)||i.mixins.push(v),h},component(v,g){return g?(i.components[v]=g,h):i.components[v]},directive(v,g){return g?(i.directives[v]=g,h):i.directives[v]},mount(v,g,f){if(!p){let b=h._ceVNode||Re(r,n);return b.appContext=i,f===!0?f="svg":f===!1&&(f=void 0),g&&t?t(b,v):e(b,v,f),p=!0,h._container=v,v.__vue_app__=h,In(b.component)}},onUnmount(v){u.push(v)},unmount(){p&&(vt(u,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(v,g){return i.provides[v]=g,h},runWithContext(v){let g=vs;vs=h;try{return v()}finally{vs=g}}};return h}}var vs=null;var Ad=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${We(t)}Modifiers`]||e[`${Pt(t)}Modifiers`];function Id(e,t,...o){if(e.isUnmounted)return;let r=e.vnode.props||Ie,n=o,i=t.startsWith("update:"),a=i&&Ad(r,t.slice(7));a&&(a.trim&&(n=o.map(v=>Fe(v)?v.trim():v)),a.number&&(n=n.map(xn)));let u,p=r[u=Ns(t)]||r[u=Ns(We(t))];!p&&i&&(p=r[u=Ns(Pt(t))]),p&&vt(p,e,6,n);let h=r[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,vt(h,e,6,n)}}var Vd=new WeakMap;function si(e,t,o=!1){let r=o?Vd:t.emitsCache,n=r.get(e);if(n!==void 0)return n;let i=e.emits,a={},u=!1;if(!ke(e)){let p=h=>{let v=si(h,t,!0);v&&(u=!0,Be(a,v))};!o&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}return!i&&!u?(Te(e)&&r.set(e,null),null):(we(i)?i.forEach(p=>a[p]=null):Be(a,i),Te(e)&&r.set(e,a),a)}function On(e,t){return!e||!ls(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Se(e,t[0].toLowerCase()+t.slice(1))||Se(e,Pt(t))||Se(e,t))}function vo(e){let{type:t,vnode:o,proxy:r,withProxy:n,propsOptions:[i],slots:a,attrs:u,emit:p,render:h,renderCache:v,props:g,data:f,setupState:b,ctx:_,inheritAttrs:k}=e,R=yn(e),S,D;try{if(o.shapeFlag&4){let A=n||r,q=A;S=Ot(h.call(q,A,v,g,b,f,_)),D=u}else{let A=t;S=Ot(A.length>1?A(g,{attrs:u,slots:a,emit:p}):A(g,null)),D=t.props?u:Pd(u)}}catch(A){Xt.length=0,Cn(A,e,1),S=Re(Lt)}let I=S,C;if(D&&k!==!1){let A=Object.keys(D),{shapeFlag:q}=I;A.length&&q&7&&(i&&A.some(ds)&&(D=qd(D,i)),I=ys(I,D,!1,!0))}if(o.dirs&&(I=ys(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(o.dirs):o.dirs),o.transition){let A=Nn(I.type)&&jr(I)||I;Sn(A,o.transition)}return S=I,yn(R),S}var Pd=e=>{let t;for(let o in e)(o==="class"||o==="style"||ls(o))&&((t||(t={}))[o]=e[o]);return t},qd=(e,t)=>{let o={};for(let r in e)(!ds(r)||!(r.slice(9)in t))&&(o[r]=e[r]);return o};function Md(e,t,o){let{props:r,children:n,component:i}=e,{props:a,children:u,patchFlag:p}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&p>=0){if(p&1024)return!0;if(p&16)return r?Or(r,a,h):!!a;if(p&8){let v=t.dynamicProps;for(let g=0;g<v.length;g++){let f=v[g];if(ni(a,r,f)&&!On(h,f))return!0}}}else return(n||u)&&(!u||!u.$stable)?!0:r===a?!1:r?a?Or(r,a,h):!0:!!a;return!1}function Or(e,t,o){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let n=0;n<r.length;n++){let i=r[n];if(ni(t,e,i)&&!On(o,i))return!0}return!1}function ni(e,t,o){let r=e[o],n=t[o];return o==="style"&&Te(r)&&Te(n)?!cs(r,n):r!==n}function $d({vnode:e,parent:t,suspense:o},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}o&&o.activeBranch===e&&(o.vnode.el=r)}var oi={},ri=()=>Object.create(oi),ii=e=>Object.getPrototypeOf(e)===oi;function Fd(e,t,o,r=!1){let n={},i=ri();e.propsDefaults=Object.create(null),ai(e,t,n,i);for(let a in e.propsOptions[0])a in n||(n[a]=void 0);o?e.props=r?n:$s(n):e.type.props?e.props=n:e.props=i,e.attrs=i}function Ld(e,t,o,r){let{props:n,attrs:i,vnode:{patchFlag:a}}=e,u=De(n),[p]=e.propsOptions,h=!1;if((r||a>0)&&!(a&16)){if(a&8){let v=e.vnode.dynamicProps;for(let g=0;g<v.length;g++){let f=v[g];if(On(e.emitsOptions,f))continue;let b=t[f];if(p)if(Se(i,f))b!==i[f]&&(i[f]=b,h=!0);else{let _=We(f);n[_]=ko(p,u,_,b,e,!1)}else b!==i[f]&&(i[f]=b,h=!0)}}}else{ai(e,t,n,i)&&(h=!0);let v;for(let g in u)(!t||!Se(t,g)&&((v=Pt(g))===g||!Se(t,v)))&&(p?o&&(o[g]!==void 0||o[v]!==void 0)&&(n[g]=ko(p,u,g,void 0,e,!0)):delete n[g]);if(i!==u)for(let g in i)(!t||!Se(t,g))&&(delete i[g],h=!0)}h&&Ct(e.attrs,"set","")}function ai(e,t,o,r){let[n,i]=e.propsOptions,a=!1,u;if(t)for(let p in t){if(us(p))continue;let h=t[p],v;n&&Se(n,v=We(p))?!i||!i.includes(v)?o[v]=h:(u||(u={}))[v]=h:On(e.emitsOptions,p)||(!(p in r)||h!==r[p])&&(r[p]=h,a=!0)}if(i){let p=De(o),h=u||Ie;for(let v=0;v<i.length;v++){let g=i[v];o[g]=ko(n,p,g,h[g],e,!Se(h,g))}}return a}function ko(e,t,o,r,n,i){let a=e[o];if(a!=null){let u=Se(a,"default");if(u&&r===void 0){let p=a.default;if(a.type!==Function&&!a.skipFactory&&ke(p)){let{propsDefaults:h}=n;if(o in h)r=h[o];else{let v=Js(n);r=h[o]=p.call(null,t),v()}}else r=p;n.ce&&n.ce._setProp(o,r)}a[0]&&(i&&!u?r=!1:a[1]&&(r===""||r===Pt(o))&&(r=!0))}return r}var Ud=new WeakMap;function li(e,t,o=!1){let r=o?Ud:t.propsCache,n=r.get(e);if(n)return n;let i=e.props,a={},u=[],p=!1;if(!ke(e)){let v=g=>{p=!0;let[f,b]=li(g,t,!0);Be(a,f),b&&u.push(...b)};!o&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!i&&!p)return Te(e)&&r.set(e,jt),jt;if(we(i))for(let v=0;v<i.length;v++){let g=We(i[v]);Ar(g)&&(a[g]=Ie)}else if(i)for(let v in i){let g=We(v);if(Ar(g)){let f=i[v],b=a[g]=we(f)||ke(f)?{type:f}:Be({},f),_=b.type,k=!1,R=!0;if(we(_))for(let S=0;S<_.length;++S){let D=_[S],I=ke(D)&&D.name;if(I==="Boolean"){k=!0;break}else I==="String"&&(R=!1)}else k=ke(_)&&_.name==="Boolean";b[0]=k,b[1]=R,(k||Se(b,"default"))&&u.push(g)}}let h=[a,u];return Te(e)&&r.set(e,h),h}function Ar(e){return e[0]!=="$"&&!us(e)}var No=e=>e==="_"||e==="_ctx"||e==="$stable",So=e=>we(e)?e.map(Ot):[Ot(e)],zd=(e,t,o)=>{if(t._n)return t;let r=dd((...n)=>So(t(...n)),o);return r._c=!1,r},di=(e,t,o)=>{let r=e._ctx;for(let n in e){if(No(n))continue;let i=e[n];if(ke(i))t[n]=zd(n,i,r);else if(i!=null){let a=So(i);t[n]=()=>a}}},ui=(e,t)=>{let o=So(t);e.slots.default=()=>o},ci=(e,t,o)=>{for(let r in t)(o||!No(r))&&(e[r]=t[r])},Hd=(e,t,o)=>{let r=e.slots=ri();if(e.vnode.shapeFlag&32){let n=t._;n?(ci(r,t,o),o&&nn(r,"_",n,!0)):di(t,r)}else t&&ui(e,t)},Bd=(e,t,o)=>{let{vnode:r,slots:n}=e,i=!0,a=Ie;if(r.shapeFlag&32){let u=t._;u?o&&u===1?i=!1:ci(n,t,o):(i=!t.$stable,di(t,n)),a=t}else t&&(ui(e,t),a={default:1});if(i)for(let u in n)!No(u)&&a[u]==null&&delete n[u]};function Gd(){let e=[]}var it=Yd;function pi(e){return jd(e)}function jd(e,t){Gd();let o=Ds();o.__VUE__=!0;let{insert:r,remove:n,patchProp:i,createElement:a,createText:u,createComment:p,setText:h,setElementText:v,parentNode:g,nextSibling:f,setScopeId:b=nt,insertStaticContent:_}=e,k=(w,N,P,z=null,G=null,M=null,Y=void 0,X=null,Q=!!N.dynamicChildren)=>{if(w===N)return;w&&!Ls(w,N)&&(z=ne(w),oe(w,G,M,!0),w=null),N.patchFlag===-2&&(Q=!1,N.dynamicChildren=null);let{type:B,ref:ue,shapeFlag:te}=N;switch(B){case An:R(w,N,P,z);break;case Lt:S(w,N,P,z);break;case Gs:w==null&&D(N,P,z,Y);break;case x:ie(w,N,P,z,G,M,Y,X,Q);break;default:te&1?q(w,N,P,z,G,M,Y,X,Q):te&6?ce(w,N,P,z,G,M,Y,X,Q):(te&64||te&128)&&B.process(w,N,P,z,G,M,Y,X,Q,fe)}ue!=null&&G?zs(ue,w&&w.ref,M,N||w,!N):ue==null&&w&&w.ref!=null&&zs(w.ref,null,M,w,!0)},R=(w,N,P,z)=>{if(w==null)r(N.el=u(N.children),P,z);else{let G=N.el=w.el;N.children!==w.children&&h(G,N.children)}},S=(w,N,P,z)=>{w==null?r(N.el=p(N.children||""),P,z):N.el=w.el},D=(w,N,P,z)=>{[w.el,w.anchor]=_(w.children,N,P,z,w.el,w.anchor)},I=(w,N,P,z)=>{if(N.children!==w.children){let G=f(w.anchor);A(w),[N.el,N.anchor]=_(N.children,P,G,z)}else N.el=w.el,N.anchor=w.anchor},C=({el:w,anchor:N},P,z)=>{let G;for(;w&&w!==N;)G=f(w),r(w,P,z),w=G;r(N,P,z)},A=({el:w,anchor:N})=>{let P;for(;w&&w!==N;)P=f(w),n(w),w=P;n(N)},q=(w,N,P,z,G,M,Y,X,Q)=>{if(N.type==="svg"?Y="svg":N.type==="math"&&(Y="mathml"),w==null)ee(N,P,z,G,M,Y,X,Q);else{let B=w.el&&w.el._isVueCE?w.el:null;try{B&&B._beginPatch(),U(w,N,G,M,Y,X,Q)}finally{B&&B._endPatch()}}},ee=(w,N,P,z,G,M,Y,X)=>{let Q,B,{props:ue,shapeFlag:te,transition:le,dirs:ve}=w;if(Q=w.el=a(w.type,M,ue&&ue.is,ue),te&8?v(Q,w.children):te&16&&K(w.children,Q,null,z,G,yo(w,M),Y,X),ve&&Jt(w,null,z,"created"),J(Q,w,w.scopeId,Y,z),ue){for(let qe in ue)qe!=="value"&&!us(qe)&&i(Q,qe,null,ue[qe],M,z);"value"in ue&&i(Q,"value",null,ue.value,M),(B=ue.onVnodeBeforeMount)&&Rt(B,z,w)}ve&&Jt(w,null,z,"beforeMount");let Ne=Wd(G,le);Ne&&le.beforeEnter(Q),r(Q,N,P),((B=ue&&ue.onVnodeMounted)||Ne||ve)&&it(()=>{let Ve;try{B&&Rt(B,z,w),Ne&&le.enter(Q),ve&&Jt(w,null,z,"mounted")}finally{}},G)},J=(w,N,P,z,G)=>{if(P&&b(w,P),z)for(let M=0;M<z.length;M++)b(w,z[M]);if(G){let M=G.subTree;if(N===M||vi(M.type)&&(M.ssContent===N||M.ssFallback===N)){let Y=G.vnode;J(w,Y,Y.scopeId,Y.slotScopeIds,G.parent)}}},K=(w,N,P,z,G,M,Y,X,Q=0)=>{for(let B=Q;B<w.length;B++){let ue=w[B]=X?Ft(w[B]):Ot(w[B]);k(null,ue,N,P,z,G,M,Y,X)}},U=(w,N,P,z,G,M,Y)=>{let X=N.el=w.el,{patchFlag:Q,dynamicChildren:B,dirs:ue}=N;Q|=w.patchFlag&16;let te=w.props||Ie,le=N.props||Ie,ve;if(P&&Qt(P,!1),(ve=le.onVnodeBeforeUpdate)&&Rt(ve,P,N,w),ue&&Jt(N,w,P,"beforeUpdate"),P&&Qt(P,!0),B&&(!w.dynamicChildren||w.dynamicChildren.length!==B.length)&&(Q=0,Y=!1,B=null),(te.innerHTML&&le.innerHTML==null||te.textContent&&le.textContent==null)&&v(X,""),B?de(w.dynamicChildren,B,X,P,z,yo(N,G),M):Y||O(w,N,X,null,P,z,yo(N,G),M,!1),Q>0){if(Q&16)se(X,te,le,P,G);else if(Q&2&&te.class!==le.class&&i(X,"class",null,le.class,G),Q&4&&i(X,"style",te.style,le.style,G),Q&8){let Ne=N.dynamicProps;for(let qe=0;qe<Ne.length;qe++){let Ve=Ne[qe],Ge=te[Ve],je=le[Ve];(je!==Ge||Ve==="value")&&i(X,Ve,Ge,je,G,P)}}Q&1&&w.children!==N.children&&v(X,N.children)}else!Y&&B==null&&se(X,te,le,P,G);((ve=le.onVnodeUpdated)||ue)&&it(()=>{ve&&Rt(ve,P,N,w),ue&&Jt(N,w,P,"updated")},z)},de=(w,N,P,z,G,M,Y)=>{for(let X=0;X<N.length;X++){let Q=w[X],B=N[X],ue=Q.el&&(Q.type===x||!Ls(Q,B)||Q.shapeFlag&198)?g(Q.el):P;k(Q,B,ue,null,z,G,M,Y,!0)}},se=(w,N,P,z,G)=>{if(N!==P){if(N!==Ie)for(let M in N)!us(M)&&!(M in P)&&i(w,M,N[M],null,G,z);for(let M in P){if(us(M))continue;let Y=P[M],X=N[M];Y!==X&&M!=="value"&&i(w,M,X,Y,G,z)}"value"in P&&i(w,"value",N.value,P.value,G)}},ie=(w,N,P,z,G,M,Y,X,Q)=>{let B=N.el=w?w.el:u(""),ue=N.anchor=w?w.anchor:u(""),{patchFlag:te,dynamicChildren:le,slotScopeIds:ve}=N;ve&&(X=X?X.concat(ve):ve),w==null?(r(B,P,z),r(ue,P,z),K(N.children||[],P,ue,G,M,Y,X,Q)):te>0&&te&64&&le&&w.dynamicChildren&&w.dynamicChildren.length===le.length?(de(w.dynamicChildren,le,P,G,M,Y,X),(N.key!=null||G&&N===G.subTree)&&fi(w,N,!0)):O(w,N,P,ue,G,M,Y,X,Q)},ce=(w,N,P,z,G,M,Y,X,Q)=>{N.slotScopeIds=X,w==null?N.shapeFlag&512?G.ctx.activate(N,P,z,Y,Q):be(N,P,z,G,M,Y,Q):he(w,N,Q)},be=(w,N,P,z,G,M,Y)=>{let X=w.component=eu(w,z,G);if(Eo(w)&&(X.ctx.renderer=fe),tu(X,!1,Y),X.asyncDep){if(G&&G.registerDep(X,me,Y),!w.el){let Q=X.subTree=Re(Lt);S(null,Q,N,P),w.placeholder=Q.el}}else me(X,w,N,P,G,M,Y)},he=(w,N,P)=>{let z=N.component=w.component;if(Md(w,N,P))if(z.asyncDep&&!z.asyncResolved){ae(z,N,P);return}else z.next=N,z.update();else N.el=w.el,z.vnode=N},me=(w,N,P,z,G,M,Y)=>{let X=()=>{if(w.isMounted){let{next:te,bu:le,u:ve,parent:Ne,vnode:qe}=w;{let lt=mi(w);if(lt){te&&(te.el=qe.el,ae(w,te,Y)),lt.asyncDep.then(()=>{it(()=>{w.isUnmounted||B()},G)});return}}let Ve=te,Ge;Qt(w,!1),te?(te.el=qe.el,ae(w,te,Y)):te=qe,le&&Ss(le),(Ge=te.props&&te.props.onVnodeBeforeUpdate)&&Rt(Ge,Ne,te,qe),Qt(w,!0);let je=vo(w),gt=w.subTree;w.subTree=je,k(gt,je,g(gt.el),ne(gt),w,G,M),te.el=je.el,Ve===null&&$d(w,je.el),ve&&it(ve,G),(Ge=te.props&&te.props.onVnodeUpdated)&&it(()=>Rt(Ge,Ne,te,qe),G)}else{let te,{el:le,props:ve}=N,{bm:Ne,m:qe,parent:Ve,root:Ge,type:je}=w,gt=Hs(N);if(Qt(w,!1),Ne&&Ss(Ne),!gt&&(te=ve&&ve.onVnodeBeforeMount)&&Rt(te,Ve,N),Qt(w,!0),le&&pe){let lt=()=>{w.subTree=vo(w),pe(le,w.subTree,w,G,null)};gt&&je.__asyncHydrate?je.__asyncHydrate(le,w,lt):lt()}else{Ge.ce&&Ge.ce._hasShadowRoot()&&Ge.ce._injectChildStyle(je,w.parent?w.parent.type:void 0);let lt=w.subTree=vo(w);k(null,lt,P,z,w,G,M),N.el=lt.el}if(qe&&it(qe,G),!gt&&(te=ve&&ve.onVnodeMounted)){let lt=N;it(()=>Rt(te,Ve,lt),G)}(N.shapeFlag&256||Ve&&Hs(Ve.vnode)&&Ve.vnode.shapeFlag&256)&&w.a&&it(w.a,G),w.isMounted=!0,N=P=z=null}};w.scope.on();let Q=w.effect=new fs(X);w.scope.off();let B=w.update=Q.run.bind(Q),ue=w.job=Q.runIfDirty.bind(Q);ue.i=w,ue.id=w.uid,Q.scheduler=()=>_o(ue),Qt(w,!0),B()},ae=(w,N,P)=>{N.component=w;let z=w.vnode.props;w.vnode=N,w.next=null,Ld(w,N.props,z,P),Bd(w,N.children,P),St(),_r(w),Dt()},O=(w,N,P,z,G,M,Y,X,Q=!1)=>{let B=w&&w.children,ue=w?w.shapeFlag:0,te=N.children,{patchFlag:le,shapeFlag:ve}=N;if(le>0){if(le&128){j(B,te,P,z,G,M,Y,X,Q);return}else if(le&256){V(B,te,P,z,G,M,Y,X,Q);return}}ve&8?(ue&16&&F(B,G,M),te!==B&&v(P,te)):ue&16?ve&16?j(B,te,P,z,G,M,Y,X,Q):F(B,G,M,!0):(ue&8&&v(P,""),ve&16&&K(te,P,z,G,M,Y,X,Q))},V=(w,N,P,z,G,M,Y,X,Q)=>{w=w||jt,N=N||jt;let B=w.length,ue=N.length,te=Math.min(B,ue),le;for(le=0;le<te;le++){let ve=N[le]=Q?Ft(N[le]):Ot(N[le]);k(w[le],ve,P,null,G,M,Y,X,Q)}B>ue?F(w,G,M,!0,!1,te):K(N,P,z,G,M,Y,X,Q,te)},j=(w,N,P,z,G,M,Y,X,Q)=>{let B=0,ue=N.length,te=w.length-1,le=ue-1;for(;B<=te&&B<=le;){let ve=w[B],Ne=N[B]=Q?Ft(N[B]):Ot(N[B]);if(Ls(ve,Ne))k(ve,Ne,P,null,G,M,Y,X,Q);else break;B++}for(;B<=te&&B<=le;){let ve=w[te],Ne=N[le]=Q?Ft(N[le]):Ot(N[le]);if(Ls(ve,Ne))k(ve,Ne,P,null,G,M,Y,X,Q);else break;te--,le--}if(B>te){if(B<=le){let ve=le+1,Ne=ve<ue?N[ve].el:z;for(;B<=le;)k(null,N[B]=Q?Ft(N[B]):Ot(N[B]),P,Ne,G,M,Y,X,Q),B++}}else if(B>le)for(;B<=te;)oe(w[B],G,M,!0),B++;else{let ve=B,Ne=B,qe=new Map;for(B=Ne;B<=le;B++){let dt=N[B]=Q?Ft(N[B]):Ot(N[B]);dt.key!=null&&qe.set(dt.key,B)}let Ve,Ge=0,je=le-Ne+1,gt=!1,lt=0,_s=new Array(je);for(B=0;B<je;B++)_s[B]=0;for(B=ve;B<=te;B++){let dt=w[B];if(Ge>=je){oe(dt,G,M,!0);continue}let _t;if(dt.key!=null)_t=qe.get(dt.key);else for(Ve=Ne;Ve<=le;Ve++)if(_s[Ve-Ne]===0&&Ls(dt,N[Ve])){_t=Ve;break}_t===void 0?oe(dt,G,M,!0):(_s[_t-Ne]=B+1,_t>=lt?lt=_t:gt=!0,k(dt,N[_t],P,null,G,M,Y,X,Q),Ge++)}let Ko=gt?Kd(_s):jt;for(Ve=Ko.length-1,B=je-1;B>=0;B--){let dt=Ne+B,_t=N[dt],Yo=N[dt+1],xo=dt+1<ue?Yo.el||hi(Yo):z;_s[B]===0?k(null,_t,P,xo,G,M,Y,X,Q):gt&&(Ve<0||B!==Ko[Ve]?Z(_t,P,xo,2):Ve--)}}},Z=(w,N,P,z,G=null)=>{let{el:M,type:Y,transition:X,children:Q,shapeFlag:B}=w;if(B&6){Z(w.component.subTree,N,P,z);return}if(B&128){w.suspense.move(N,P,z);return}if(B&64){Y.move(w,N,P,fe);return}if(Y===x){r(M,N,P);for(let te=0;te<Q.length;te++)Z(Q[te],N,P,z);r(w.anchor,N,P);return}if(Y===Gs){C(w,N,P);return}if(z!==2&&B&1&&X)if(z===0)X.persisted&&!M[mo]?r(M,N,P):(X.beforeEnter(M),r(M,N,P),it(()=>X.enter(M),G));else{let{leave:te,delayLeave:le,afterLeave:ve}=X,Ne=()=>{w.ctx.isUnmounted?n(M):r(M,N,P)},qe=()=>{let Ve=M._isLeaving||!!M[mo];M._isLeaving&&M[mo](!0),X.persisted&&!Ve?Ne():te(M,()=>{Ne(),ve&&ve()})};le?le(M,Ne,qe):qe()}else r(M,N,P)},oe=(w,N,P,z=!1,G=!1)=>{let{type:M,props:Y,ref:X,children:Q,dynamicChildren:B,shapeFlag:ue,patchFlag:te,dirs:le,cacheIndex:ve,memo:Ne}=w;if(te===-2&&(G=!1),X!=null&&(St(),zs(X,null,P,w,!0),Dt()),ve!=null&&(N.renderCache[ve]=void 0),ue&256){N.ctx.deactivate(w);return}let qe=ue&1&&le,Ve=!Hs(w),Ge;if(Ve&&(Ge=Y&&Y.onVnodeBeforeUnmount)&&Rt(Ge,N,w),ue&6)$e(w.component,P,z);else{if(ue&128){w.suspense.unmount(P,z);return}qe&&Jt(w,null,N,"beforeUnmount"),ue&64?w.type.remove(w,N,P,fe,z):B&&!B.hasOnce&&(M!==x||te>0&&te&64)?F(B,N,P,!1,!0):(M===x&&te&384||!G&&ue&16)&&F(Q,N,P),z&&Pe(w)}let je=Ne!=null&&ve==null;(Ve&&(Ge=Y&&Y.onVnodeUnmounted)||qe||je)&&it(()=>{Ge&&Rt(Ge,N,w),qe&&Jt(w,null,N,"unmounted"),je&&(w.el=null)},P)},Pe=w=>{let{type:N,el:P,anchor:z,transition:G}=w;if(N===x){Ue(P,z);return}if(N===Gs){A(w);return}let M=()=>{n(P),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(w.shapeFlag&1&&G&&!G.persisted){let{leave:Y,delayLeave:X}=G,Q=()=>Y(P,M);X?X(w.el,M,Q):Q()}else M()},Ue=(w,N)=>{let P;for(;w!==N;)P=f(w),n(w),w=P;n(N)},$e=(w,N,P)=>{let{bum:z,scope:G,job:M,subTree:Y,um:X,m:Q,a:B}=w;Ir(Q),Ir(B),z&&Ss(z),G.stop(),M&&(M.flags|=8,oe(Y,w,N,P)),X&&it(X,N),it(()=>{w.isUnmounted=!0},N)},F=(w,N,P,z=!1,G=!1,M=0)=>{for(let Y=M;Y<w.length;Y++)oe(w[Y],N,P,z,G)},ne=w=>{if(w.shapeFlag&6)return ne(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();let N=f(w.anchor||w.el),P=N&&N[fd];return P?f(P):N},L=!1,W=(w,N,P)=>{let z;w==null?N._vnode&&(oe(N._vnode,null,null,!0),z=N._vnode.component):k(N._vnode||null,w,N,null,null,null,P),N._vnode=w,L||(L=!0,_r(z),Ur(),L=!1)},fe={p:k,um:oe,m:Z,r:Pe,mt:be,mc:K,pc:O,pbc:de,n:ne,o:e},Ee,pe;return t&&([Ee,pe]=t(fe)),{render:W,hydrate:Ee,createApp:Od(W,Ee)}}function yo({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function Qt({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Wd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function fi(e,t,o=!1){let r=e.children,n=t.children;if(we(r)&&we(n))for(let i=0;i<r.length;i++){let a=r[i],u=n[i];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=n[i]=Ft(n[i]),u.el=a.el),!o&&u.patchFlag!==-2&&fi(a,u)),u.type===An&&(u.patchFlag===-1&&(u=n[i]=Ft(u)),u.el=a.el),u.type===Lt&&!u.el&&(u.el=a.el)}}function Kd(e){let t=e.slice(),o=[0],r,n,i,a,u,p=e.length;for(r=0;r<p;r++){let h=e[r];if(h!==0){if(n=o[o.length-1],e[n]<h){t[r]=n,o.push(r);continue}for(i=0,a=o.length-1;i<a;)u=i+a>>1,e[o[u]]<h?i=u+1:a=u;h<e[o[i]]&&(i>0&&(t[r]=o[i-1]),o[i]=r)}}for(i=o.length,a=o[i-1];i-- >0;)o[i]=a,a=t[a];return o}function mi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:mi(t)}function Ir(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function hi(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?hi(t.subTree):null}var vi=e=>e.__isSuspense;function Yd(e,t){t&&t.pendingBranch?we(e)?t.effects.push(...e):t.effects.push(e):Lr(e)}var x=Symbol.for("v-fgt"),An=Symbol.for("v-txt"),Lt=Symbol.for("v-cmt"),Gs=Symbol.for("v-stc"),Xt=[],pt=null;function l(e=!1){Xt.push(pt=e?null:[])}function yi(){Xt.pop(),pt=Xt[Xt.length-1]||null}var Ws=1;function wn(e,t=!1){Ws+=e,e<0&&pt&&t&&(pt.hasOnce=!0)}function gi(e){return e.dynamicChildren=Ws>0?pt||jt:null,yi(),Ws>0&&pt&&pt.push(e),e}function d(e,t,o,r,n,i){return gi(s(e,t,o,r,n,i,!0))}function gs(e,t,o,r,n){return gi(Re(e,t,o,r,n,!0))}function kn(e){return e?e.__v_isVNode===!0:!1}function Ls(e,t){return e.type===t.type&&e.key===t.key}var bi=({key:e})=>e??null,hn=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?Fe(e)||xe(e)||ke(e)?{i:ct,r:e,k:t,f:!!o}:e:null);function s(e,t=null,o=null,r=0,n=null,i=e===x?0:1,a=!1,u=!1){let p={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&bi(t),ref:t&&hn(t),scopeId:Hr,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:ct};return u?(_n(p,o),i&128&&e.normalize(p)):o&&(p.shapeFlag|=Fe(o)?8:16),Ws>0&&!a&&pt&&(p.patchFlag>0||i&6)&&p.patchFlag!==32&&pt.push(p),p}var Re=xd;function xd(e,t=null,o=null,r=0,n=null,i=!1){if((!e||e===_d)&&(e=Lt),kn(e)){let u=ys(e,t,!0);return o&&_n(u,o),Ws>0&&!i&&pt&&(u.shapeFlag&6?pt[pt.indexOf(e)]=u:pt.push(u)),u.patchFlag=-2,u}if(iu(e)&&(e=e.__vccOpts),t){t=Jd(t);let{class:u,style:p}=t;u&&!Fe(u)&&(t.class=T(u)),Te(p)&&(Fs(p)&&!we(p)&&(p=Be({},p)),t.style=Oe(p))}let a=Fe(e)?1:vi(e)?128:Nn(e)?64:Te(e)?4:ke(e)?2:0;return s(e,t,o,r,n,a,i,!0)}function Jd(e){return e?Fs(e)||ii(e)?Be({},e):e:null}function ys(e,t,o=!1,r=!1){let{props:n,ref:i,patchFlag:a,children:u,transition:p}=e,h=t?Qd(n||{},t):n,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&bi(h),ref:t&&t.ref?o&&i?we(i)?i.concat(hn(t)):[i,hn(t)]:hn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==x?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:p,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ys(e.ssContent),ssFallback:e.ssFallback&&ys(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return p&&r&&Sn(v,p.clone(v)),v}function y(e=" ",t=0){return Re(An,null,e,t)}function _e(e,t){let o=Re(Gs,null,e);return o.staticCount=t,o}function m(e="",t=!1){return t?(l(),gs(Lt,null,e)):Re(Lt,null,e)}function Ot(e){return e==null||typeof e=="boolean"?Re(Lt):we(e)?Re(x,null,e.slice()):kn(e)?Ft(e):Re(An,null,String(e))}function Ft(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ys(e)}function _n(e,t){let o=0,{shapeFlag:r}=e;if(t==null)t=null;else if(we(t))o=16;else if(typeof t=="object")if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),_n(e,n()),n._c&&(n._d=!0));return}else{o=32;let n=t._;!n&&!ii(t)?t._ctx=ct:n===3&&ct&&(ct.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ke(t)){if(r&65){_n(e,{default:t});return}t={default:t,_ctx:ct},o=32}else t=String(t),r&64?(o=16,t=[y(t)]):o=8;e.children=t,e.shapeFlag|=o}function Qd(...e){let t={};for(let o=0;o<e.length;o++){let r=e[o];for(let n in r)if(n==="class")t.class!==r.class&&(t.class=T([t.class,r.class]));else if(n==="style")t.style=Oe([t.style,r.style]);else if(ls(n)){let i=t[n],a=r[n];a&&i!==a&&!(we(i)&&i.includes(a))?t[n]=i?[].concat(i,a):a:a==null&&i==null&&!ds(n)&&(t[n]=a)}else n!==""&&(t[n]=r[n])}return t}function Rt(e,t,o,r=null){vt(e,t,7,[o,r])}var Xd=ti(),Zd=0;function eu(e,t,o){let r=e.type,n=(t?t.appContext:e.appContext)||Xd,i={uid:Zd++,vnode:e,type:r,parent:t,appContext:n,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new As(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(n.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:li(r,n),emitsOptions:si(r,n),emit:null,emitted:null,propsDefaults:Ie,inheritAttrs:r.inheritAttrs,ctx:Ie,data:Ie,props:Ie,attrs:Ie,slots:Ie,refs:Ie,setupState:Ie,setupContext:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Id.bind(null,i),e.ce&&e.ce(i),i}var Ze=null,Do=()=>Ze||ct,En,Ks;{let e=Ds(),t=(o,r)=>{let n;return(n=e[o])||(n=e[o]=[]),n.push(r),i=>{n.length>1?n.forEach(a=>a(i)):n[0](i)}};En=t("__VUE_INSTANCE_SETTERS__",o=>Ze=o),Ks=t("__VUE_SSR_SETTERS__",o=>Ys=o)}var Js=e=>{let t=Ze;return En(e),e.scope.on(),()=>{e.scope.off(),En(t)}},Vr=()=>{Ze&&Ze.scope.off(),En(null)};function wi(e){return e.vnode.shapeFlag&4}var Ys=!1;function tu(e,t=!1,o=!1){t&&Ks(t);let{props:r,children:n}=e.vnode,i=wi(e);Fd(e,r,i,t),Hd(e,n,o||t);let a=i?su(e,t):void 0;return t&&Ks(!1),a}function su(e,t){let o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ed);let{setup:r}=o;if(r){St();let n=e.setupContext=r.length>1?ou(e):null,i=Js(e),a=xs(r,e,0,[e.props,n]),u=Kn(a);if(Dt(),i(),(u||e.sp)&&!Hs(e)&&Wr(e),u){if(a.then(Vr,Vr),t)return a.then(p=>{Ks(!0);try{Pr(e,p,t)}finally{Ks(!1)}}).catch(p=>{Cn(p,e,0)});e.asyncDep=a}else Pr(e,a,t)}else ki(e,t)}function Pr(e,t,o){ke(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Te(t)&&(e.setupState=mn(t)),ki(e,o)}var qr,Mr;function ki(e,t,o){let r=e.type;if(!e.render){if(!t&&qr&&!r.render){let n=r.template||Co(e).template;if(n){let{isCustomElement:i,compilerOptions:a}=e.appContext.config,{delimiters:u,compilerOptions:p}=r,h=Be(Be({isCustomElement:i,delimiters:u},a),p);r.render=qr(n,h)}}e.render=r.render||nt,Mr&&Mr(e)}{let n=Js(e);St();try{Cd(e)}finally{Dt(),n()}}}var nu={get(e,t){return Je(e,"get",""),e[t]}};function ou(e){let t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,nu),slots:e.slots,emit:e.emit,expose:t}}function In(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(mn(fo(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Bs)return Bs[o](e)},has(t,o){return o in t||o in Bs}})):e.proxy}function ru(e,t=!0){return ke(e)?e.displayName||e.name:e.name||t&&e.__name}function iu(e){return ke(e)&&"__vccOpts"in e}var Xe=(e,t)=>br(e,t,Ys);function Ce(e,t,o){try{wn(-1);let r=arguments.length;return r===2?Te(t)&&!we(t)?kn(t)?Re(e,null,[t]):Re(e,t):Re(e,null,t):(r>3?o=Array.prototype.slice.call(arguments,2):r===3&&kn(o)&&(o=[o]),Re(e,t,o))}finally{wn(1)}}var au="3.5.42";var Oo,_i=typeof window<"u"&&window.trustedTypes;if(_i)try{Oo=_i.createPolicy("vue",{createHTML:e=>e})}catch{}var Ai=Oo?e=>Oo.createHTML(e):e=>e,lu="http://www.w3.org/2000/svg",du="http://www.w3.org/1998/Math/MathML",zt=typeof document<"u"?document:null,Ei=zt&&zt.createElement("template"),uu={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,r)=>{let n=t==="svg"?zt.createElementNS(lu,e):t==="mathml"?zt.createElementNS(du,e):o?zt.createElement(e,{is:o}):zt.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>zt.createTextNode(e),createComment:e=>zt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>zt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,r,n,i){let a=o?o.previousSibling:t.lastChild;if(n&&(n===i||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),o),!(n===i||!(n=n.nextSibling)););else{Ei.innerHTML=Ai(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);let u=Ei.content;if(r==="svg"||r==="mathml"){let p=u.firstChild;for(;p.firstChild;)u.appendChild(p.firstChild);u.removeChild(p)}t.insertBefore(u,o)}return[a?a.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}};var cu=Symbol("_vtc");function pu(e,t,o){let r=e[cu];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}var Pn=Symbol("_vod"),Ii=Symbol("_vsh"),H={name:"show",beforeMount(e,{value:t},{transition:o}){e[Pn]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Qs(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:r}){!t!=!o&&(r?t?(r.beforeEnter(e),Qs(e,!0),r.enter(e)):r.leave(e,()=>{Qs(e,!1)}):Qs(e,t))},beforeUnmount(e,{value:t}){Qs(e,t)}};function Qs(e,t){e.style.display=t?e[Pn]:"none",e[Ii]=!t}var fu=Symbol("");var mu=/(?:^|;)\s*display\s*:/;function hu(e,t,o){let r=e.style,n=Fe(o),i=!1;if(o&&!n){if(t)if(Fe(t))for(let a of t.split(";")){let u=a.slice(0,a.indexOf(":")).trim();o[u]==null&&Xs(r,u,"")}else for(let a in t)o[a]==null&&Xs(r,a,"");for(let a in o){a==="display"&&(i=!0);let u=o[a];u!=null?yu(e,a,!Fe(t)&&t?t[a]:void 0,u)||Xs(r,a,u):Xs(r,a,"")}}else if(n){if(t!==o){let a=r[fu];a&&(o+=";"+a),r.cssText=o,i=mu.test(o)}}else t&&e.removeAttribute("style");Pn in e&&(e[Pn]=i?r.display:"",e[Ii]&&(r.display="none"))}var Vn=/\s*!important$/;function Xs(e,t,o){if(we(o))o.forEach(r=>Xs(e,t,r));else if(o==null&&(o=""),t.startsWith("--"))Vn.test(o)?e.setProperty(t,o.replace(Vn,""),"important"):e.setProperty(t,o);else{let r=vu(e,t);Vn.test(o)?e.setProperty(Pt(r),o.replace(Vn,""),"important"):e[r]=o}}var Ci=["Webkit","Moz","ms"],Ro={};function vu(e,t){let o=Ro[t];if(o)return o;let r=We(t);if(r!=="filter"&&r in e)return Ro[t]=r;r=Wt(r);for(let n=0;n<Ci.length;n++){let i=Ci[n]+r;if(i in e)return Ro[t]=i}return t}function yu(e,t,o,r){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Fe(r)&&o===r}var Ni="http://www.w3.org/1999/xlink";function Si(e,t,o,r,n,i=tr(t)){r&&t.startsWith("xlink:")?o==null?e.removeAttributeNS(Ni,t.slice(6,t.length)):e.setAttributeNS(Ni,t,o):o==null||i&&!on(o)?e.removeAttribute(t):e.setAttribute(t,i?"":ut(o)?String(o):o)}function Di(e,t,o,r,n){if(t==="innerHTML"||t==="textContent"){o!=null&&(e[t]=t==="innerHTML"?Ai(o):o);return}let i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){let u=i==="OPTION"?e.getAttribute("value")||"":e.value,p=o==null?e.type==="checkbox"?"on":"":String(o);(u!==p||!("_value"in e))&&(e.value=p),o==null&&e.removeAttribute(t),e._value=o;return}let a=!1;if(o===""||o==null){let u=typeof e[t];u==="boolean"?o=on(o):o==null&&u==="string"?(o="",a=!0):u==="number"&&(o=0,a=!0)}try{e[t]=o}catch{}a&&e.removeAttribute(n||t)}function gu(e,t,o,r){e.addEventListener(t,o,r)}function bu(e,t,o,r){e.removeEventListener(t,o,r)}var Ri=Symbol("_vei");function wu(e,t,o,r,n=null){let i=e[Ri]||(e[Ri]={}),a=i[t];if(r&&a)a.value=r;else{let[u,p]=Eu(t);if(r){let h=i[t]=Su(r,n);gu(e,u,h,p)}else a&&(bu(e,u,a,p),i[t]=void 0)}}var ku=/(Once|Passive|Capture)$/,_u=/^on:?(?:Once|Passive|Capture)$/;function Eu(e){let t,o;for(;(o=e.match(ku))&&!_u.test(e);)t||(t={}),e=e.slice(0,e.length-o[1].length),t[o[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Pt(e.slice(2)),t]}var To=0,Cu=Promise.resolve(),Nu=()=>To||(Cu.then(()=>To=0),To=Date.now());function Su(e,t){let o=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=o.attached)return;let n=o.value;if(we(n)){let i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};let a=n.slice(),u=[r];for(let p=0;p<a.length&&!r._stopped;p++){let h=a[p];h&&vt(h,t,5,u)}}else vt(n,t,5,[r])};return o.value=e,o.attached=Nu(),o}var Ti=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Du=(e,t,o,r,n,i)=>{let a=n==="svg";t==="class"?pu(e,r,a):t==="style"?hu(e,o,r):ls(t)?ds(t)||wu(e,t,o,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ru(e,t,r,a))?(Di(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Si(e,t,r,a,i,t!=="value")):e._isVueCE&&(Tu(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Fe(r)))?Di(e,We(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Si(e,t,r,a))};function Ru(e,t,o,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ti(t)&&ke(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return Ti(t)&&Fe(o)?!1:t in e}function Tu(e,t){let o=e._def.props;if(!o)return!1;let r=We(t);return Array.isArray(o)?o.some(n=>We(n)===r):Object.keys(o).some(n=>We(n)===r)}var Ou=["ctrl","shift","alt","meta"],Au={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ou.some(o=>e[`${o}Key`]&&!t.includes(o))},ge=(e,t)=>{if(!e)return e;let o=e._withMods||(e._withMods={}),r=t.join(".");return o[r]||(o[r]=((n,...i)=>{for(let a=0;a<t.length;a++){let u=Au[t[a]];if(u&&u(n,t))return}return e(n,...i)}))};var Iu=Be({patchProp:Du},uu),Oi;function Vu(){return Oi||(Oi=pi(Iu))}var Vi=((...e)=>{let t=Vu().createApp(...e),{mount:o}=t;return t.mount=r=>{let n=qu(r);if(!n)return;let i=t._component;!ke(i)&&!i.render&&!i.template&&(i.template=n.innerHTML),n.nodeType===1&&(n.textContent="");let a=o(n,!1,Pu(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t});function Pu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qu(e){return Fe(e)?document.querySelector(e):e}var ns=typeof document<"u";function qi(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Mu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&qi(e.default)}var Ae=Object.assign;function qn(e,t){let o={};for(let r in t){let n=t[r];o[r]=yt(n)?n.map(e):e(n)}return o}var ws=()=>{},yt=Array.isArray;function Vo(e,t){let o={};for(let r in e)o[r]=r in t?t[r]:e[r];return o}var Mi=/#/g,$u=/&/g,Fu=/\//g,Lu=/=/g,Uu=/\?/g,$i=/\+/g,zu=/%5B/g,Hu=/%5D/g,Fi=/%5E/g,Bu=/%60/g,Li=/%7B/g,Gu=/%7C/g,Ui=/%7D/g,ju=/%20/g;function Po(e){return e==null?"":encodeURI(""+e).replace(Gu,"|").replace(zu,"[").replace(Hu,"]")}function zi(e){return Po(e).replace(Li,"{").replace(Ui,"}").replace(Fi,"^")}function Ao(e){return Po(e).replace($i,"%2B").replace(ju,"+").replace(Mi,"%23").replace($u,"%26").replace(Bu,"`").replace(Li,"{").replace(Ui,"}").replace(Fi,"^")}function Wu(e){return Ao(e).replace(Lu,"%3D")}function Ku(e){return Po(e).replace(Mi,"%23").replace(Uu,"%3F")}function Hi(e){return Ku(e).replace(Fu,"%2F")}function bs(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}var Yu=/\/$/,xu=e=>e.replace(Yu,"");function Mn(e,t,o="/"){let r,n={},i="",a="",u=t.indexOf("#"),p=t.indexOf("?");return p=u>=0&&p>u?-1:p,p>=0&&(r=t.slice(0,p),i=t.slice(p,u>0?u:t.length),n=e(i.slice(1))),u>=0&&(r=r||t.slice(0,u),a=t.slice(u,t.length)),r=Qu(r??t,o),{fullPath:r+i+a,path:r,query:n,hash:bs(a)}}function Bi(e,t){let o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function qo(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function Gi(e,t,o){let r=t.matched.length-1,n=o.matched.length-1;return r>-1&&r===n&&ts(t.matched[r],o.matched[n])&&Mo(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function ts(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Mo(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!Ju(e[o],t[o]))return!1;return!0}function Ju(e,t){return yt(e)?Pi(e,t):yt(t)?Pi(t,e):e?.valueOf()===t?.valueOf()}function Pi(e,t){return yt(t)?e.length===t.length&&e.every((o,r)=>o===t[r]):e.length===1&&e[0]===t}function Qu(e,t){if(e.startsWith("/"))return e;if(!e)return t;let o=t.split("/"),r=e.split("/"),n=r[r.length-1];(n===".."||n===".")&&r.push("");let i=o.length-1,a,u;for(a=0;a<r.length;a++)if(u=r[a],u!==".")if(u==="..")i>1&&i--;else break;return o.slice(0,i).join("/")+"/"+r.slice(a).join("/")}var Bt={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},$n=(function(e){return e.pop="pop",e.push="push",e})({}),Fn=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function ji(e){if(!e)if(ns){let t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),xu(e)}var Xu=/^[^#]+#/;function Wi(e,t){return e.replace(Xu,"#")+t}function Zu(e,t){let o=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-o.left-(t.left||0),top:r.top-o.top-(t.top||0)}}var Zs=()=>({left:window.scrollX,top:window.scrollY});function Ki(e){let t;if("el"in e){let o=e.el,r=typeof o=="string"&&o.startsWith("#"),n=typeof o=="string"?r?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!n)return;t=Zu(n,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function $o(e,t){return(history.state?history.state.position-t:-1)+e}var Io=new Map;function Yi(e,t){Io.set(e,t)}function xi(e){let t=Io.get(e);return Io.delete(e),t}function ec(e){return typeof e=="string"||e&&typeof e=="object"}function Fo(e){return typeof e=="string"||typeof e=="symbol"}var He=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({}),Ji=Symbol("");var Sq={[He.MATCHER_NOT_FOUND]({location:e,currentLocation:t}){return`No match for
|
||
${JSON.stringify(e)}${t?`
|
||
while being at
|
||
`+JSON.stringify(t):""}`},[He.NAVIGATION_GUARD_REDIRECT]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${sc(t)}" via a navigation guard.`},[He.NAVIGATION_ABORTED]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[He.NAVIGATION_CANCELLED]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[He.NAVIGATION_DUPLICATED]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ss(e,t){return Ae(new Error,{type:e,[Ji]:!0},t)}function It(e,t){return e instanceof Error&&Ji in e&&(t==null||!!(e.type&t))}var tc=["params","query","hash"];function sc(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;let t={};for(let o of tc)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function Qi(e){let t={};if(e===""||e==="?")return t;let o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<o.length;++r){let n=o[r].replace($i," "),i=n.indexOf("="),a=bs(i<0?n:n.slice(0,i)),u=i<0?null:bs(n.slice(i+1));if(a in t){let p=t[a];yt(p)||(p=t[a]=[p]),p.push(u)}else t[a]=u}return t}function Lo(e){let t="";for(let o in e){let r=e[o];if(o=Wu(o),r==null){r!==void 0&&(t+=(t.length?"&":"")+o);continue}(yt(r)?r.map(n=>n&&Ao(n)):[r&&Ao(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+o,n!=null&&(t+="="+n))})}return t}function Xi(e){let t={};for(let o in e){let r=e[o];r!==void 0&&(t[o]=yt(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}var Zi=Symbol(""),Uo=Symbol(""),Ln=Symbol(""),Un=Symbol(""),zn=Symbol("");function ks(){let e=[];function t(r){return e.push(r),()=>{let n=e.indexOf(r);n>-1&&e.splice(n,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Ht(e,t,o,r,n,i=a=>a()){let a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((u,p)=>{let h=f=>{f===!1?p(ss(He.NAVIGATION_ABORTED,{from:o,to:t})):f instanceof Error?p(f):ec(f)?p(ss(He.NAVIGATION_GUARD_REDIRECT,{from:t,to:f})):(a&&r.enterCallbacks[n]===a&&typeof f=="function"&&a.push(f),u())},v=i(()=>e.call(r&&r.instances[n],t,o,h)),g=Promise.resolve(v);e.length<3&&(g=g.then(h)),g.catch(f=>p(f))})}function Hn(e,t,o,r,n=i=>i()){let i=[];for(let a of e)for(let u in a.components){let p=a.components[u];if(!(t!=="beforeRouteEnter"&&!a.instances[u]))if(qi(p)){let h=(p.__vccOpts||p)[t];h&&i.push(Ht(h,o,r,a,u,n))}else{let h=p();i.push(()=>h.then(v=>{if(!v)throw new Error(`Couldn't resolve component "${u}" at "${a.path}"`);let g=Mu(v)?v.default:v;a.mods[u]=v,a.components[u]=g;let f=(g.__vccOpts||g)[t];return f&&Ht(f,o,r,a,u,n)()}))}}return i}function ea(e,t){let o=[],r=[],n=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;a<i;a++){let u=t.matched[a];u&&(e.matched.find(h=>ts(h,u))?r.push(u):o.push(u));let p=e.matched[a];p&&(t.matched.find(h=>ts(h,p))||n.push(p))}return[o,r,n]}var nc=()=>location.protocol+"//"+location.host;function ca(e,t){let{pathname:o,search:r,hash:n}=t,i=e.indexOf("#");if(i>-1){let a=n.includes(e.slice(i))?e.slice(i).length:1,u=n.slice(a);return u[0]!=="/"&&(u="/"+u),qo(u,"")}return qo(o,e)+r+n}function oc(e,t,o,r){let n=[],i=[],a=null,u=({state:f})=>{let b=ca(e,location),_=o.value,k=t.value,R=0;if(f){if(o.value=b,t.value=f,a&&a===_){a=null;return}R=k?f.position-k.position:0}else r(b);n.forEach(S=>{S(o.value,_,{delta:R,type:$n.pop,direction:R?R>0?Fn.forward:Fn.back:Fn.unknown})})};function p(){a=o.value}function h(f){n.push(f);let b=()=>{let _=n.indexOf(f);_>-1&&n.splice(_,1)};return i.push(b),b}function v(){if(document.visibilityState==="hidden"){let{history:f}=window;if(!f.state)return;f.replaceState(Ae({},f.state,{scroll:Zs()}),"")}}function g(){for(let f of i)f();i=[],window.removeEventListener("popstate",u),window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",v)}return window.addEventListener("popstate",u),window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",v),{pauseListeners:p,listen:h,destroy:g}}function ta(e,t,o,r=!1,n=!1){return{back:e,current:t,forward:o,replaced:r,position:window.history.length,scroll:n?Zs():null}}function rc(e){let{history:t,location:o}=window,r={value:ca(e,o)},n={value:t.state};n.value||i(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(p,h,v){let g=e.indexOf("#"),f=g>-1?(o.host&&document.querySelector("base")?e:e.slice(g))+p:nc()+e+p;try{t[v?"replaceState":"pushState"](h,"",f),n.value=h}catch(b){console.error(b),o[v?"replace":"assign"](f)}}function a(p,h){i(p,Ae({},t.state,ta(n.value.back,p,n.value.forward,!0),h,{position:n.value.position}),!0),r.value=p}function u(p,h){let v=Ae({},n.value,t.state,{forward:p,scroll:Zs()});i(v.current,v,!0),i(p,Ae({},ta(r.value,p,null),{position:v.position+1},h),!1),r.value=p}return{location:r,state:n,push:u,replace:a}}function pa(e){e=ji(e);let t=rc(e),o=oc(e,t.state,t.location,t.replace);function r(i,a=!0){a||o.pauseListeners(),history.go(i)}let n=Ae({location:"",base:e,go:r,createHref:Wi.bind(null,e)},t,o);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}var os=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e})({}),Ye=(function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e})(Ye||{}),ic={type:os.Static,value:""},ac=/[a-zA-Z0-9_]/;function lc(e){if(!e)return[[]];if(e==="/")return[[ic]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(b){throw new Error(`ERR (${o})/"${h}": ${b}`)}let o=Ye.Static,r=o,n=[],i;function a(){i&&n.push(i),i=[]}let u=0,p,h="",v="";function g(){h&&(o===Ye.Static?i.push({type:os.Static,value:h}):o===Ye.Param||o===Ye.ParamRegExp||o===Ye.ParamRegExpEnd?(i.length>1&&(p==="*"||p==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),i.push({type:os.Param,value:h,regexp:v,repeatable:p==="*"||p==="+",optional:p==="*"||p==="?"})):t("Invalid state to consume buffer"),h="")}function f(){h+=p}for(;u<e.length;){if(p=e[u++],p==="\\"&&o!==Ye.ParamRegExp){r=o,o=Ye.EscapeNext;continue}switch(o){case Ye.Static:p==="/"?(h&&g(),a()):p===":"?(g(),o=Ye.Param):f();break;case Ye.EscapeNext:f(),o=r;break;case Ye.Param:p==="("?o=Ye.ParamRegExp:ac.test(p)?f():(g(),o=Ye.Static,p!=="*"&&p!=="?"&&p!=="+"&&u--);break;case Ye.ParamRegExp:p===")"?v[v.length-1]=="\\"?v=v.slice(0,-1)+p:o=Ye.ParamRegExpEnd:v+=p;break;case Ye.ParamRegExpEnd:g(),o=Ye.Static,p!=="*"&&p!=="?"&&p!=="+"&&u--,v="";break;default:t("Unknown state");break}}return o===Ye.ParamRegExp&&t(`Unfinished custom RegExp for param "${h}"`),g(),a(),n}var sa="[^/]+?",dc={sensitive:!1,strict:!1,start:!0,end:!0},st=(function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e})(st||{}),uc=/[.+*?^${}()[\]/\\]/g;function cc(e,t){let o=Ae({},dc,t),r=[],n=o.start?"^":"",i=[];for(let h of e){let v=h.length?[]:[st.Root];o.strict&&!h.length&&(n+="/");for(let g=0;g<h.length;g++){let f=h[g],b=st.Segment+(o.sensitive?st.BonusCaseSensitive:0);if(f.type===os.Static)g||(n+="/"),n+=f.value.replace(uc,"\\$&"),b+=st.Static;else if(f.type===os.Param){let{value:_,repeatable:k,optional:R,regexp:S}=f;i.push({name:_,repeatable:k,optional:R});let D=S||sa;if(D!==sa){b+=st.BonusCustomRegExp;try{`${D}`}catch(C){throw new Error(`Invalid custom RegExp for param "${_}" (${D}): `+C.message)}}let I=k?`((?:${D})(?:/(?:${D}))*)`:`(${D})`;g||(I=R&&h.length<2?`(?:/${I})`:"/"+I),R&&(I+="?"),n+=I,b+=st.Dynamic,R&&(b+=st.BonusOptional),k&&(b+=st.BonusRepeatable),D===".*"&&(b+=st.BonusWildcard)}v.push(b)}r.push(v)}if(o.strict&&o.end){let h=r.length-1;r[h][r[h].length-1]+=st.BonusStrict}o.strict||(n+="/?"),o.end?n+="$":o.strict&&!n.endsWith("/")&&(n+="(?:/|$)");let a=new RegExp(n,o.sensitive?"":"i");function u(h){let v=h.match(a),g={};if(!v)return null;for(let f=1;f<v.length;f++){let b=v[f]||"",_=i[f-1];g[_.name]=b&&_.repeatable?b.split("/"):b}return g}function p(h){let v="",g=!1;for(let f of e){(!g||!v.endsWith("/"))&&(v+="/"),g=!1;for(let b of f)if(b.type===os.Static)v+=b.value;else if(b.type===os.Param){let{value:_,repeatable:k,optional:R}=b,S=_ in h?h[_]:"";if(yt(S)&&!k)throw new Error(`Provided param "${_}" is an array but it is not repeatable (* or + modifiers)`);let D=yt(S)?S.join("/"):S;if(!D)if(R)f.length<2&&(v.endsWith("/")?v=v.slice(0,-1):g=!0);else throw new Error(`Missing required param "${_}"`);v+=D}}return v||"/"}return{re:a,score:r,keys:i,parse:u,stringify:p}}function pc(e,t){let o=0;for(;o<e.length&&o<t.length;){let r=t[o]-e[o];if(r)return r;o++}return e.length<t.length?e.length===1&&e[0]===st.Static+st.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===st.Static+st.Segment?1:-1:0}function fa(e,t){let o=0,r=e.score,n=t.score;for(;o<r.length&&o<n.length;){let i=pc(r[o],n[o]);if(i)return i;o++}if(Math.abs(n.length-r.length)===1){if(na(r))return 1;if(na(n))return-1}return n.length-r.length}function na(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var fc={strict:!1,end:!0,sensitive:!1};function mc(e,t,o){let r=cc(lc(e.path),o),n=Ae(r,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function hc(e,t){let o=[],r=new Map;t=Vo(fc,t);function n(g){return r.get(g)}function i(g,f,b){let _=!b,k=ra(g);k.aliasOf=b&&b.record;let R=Vo(t,g),S=[k];if("alias"in g){let C=typeof g.alias=="string"?[g.alias]:g.alias;for(let A of C)S.push(ra(Ae({},k,{components:b?b.record.components:k.components,path:A,aliasOf:b?b.record:k})))}let D,I;for(let C of S){let{path:A}=C;if(f&&A[0]!=="/"){let q=f.record.path,ee=q[q.length-1]==="/"?"":"/";C.path=f.record.path+(A&&ee+A)}if(D=mc(C,f,R),b?b.alias.push(D):(I=I||D,I!==D&&I.alias.push(D),_&&g.name&&!ia(D)&&a(g.name)),ma(D)&&p(D),k.children){let q=k.children;for(let ee=0;ee<q.length;ee++)i(q[ee],D,b&&b.children[ee])}b=b||D}return I?()=>{a(I)}:ws}function a(g){if(Fo(g)){let f=r.get(g);f&&(r.delete(g),o.splice(o.indexOf(f),1),f.children.forEach(a),f.alias.forEach(a))}else{let f=o.indexOf(g);f>-1&&(o.splice(f,1),g.record.name&&r.delete(g.record.name),g.children.forEach(a),g.alias.forEach(a))}}function u(){return o}function p(g){let f=gc(g,o);o.splice(f,0,g),g.record.name&&!ia(g)&&r.set(g.record.name,g)}function h(g,f){let b,_={},k,R;if("name"in g&&g.name){if(b=r.get(g.name),!b)throw ss(He.MATCHER_NOT_FOUND,{location:g});R=b.record.name,_=Ae(oa(f.params,b.keys.filter(I=>!I.optional).concat(b.parent?b.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),g.params&&oa(g.params,b.keys.map(I=>I.name))),k=b.stringify(_)}else if(g.path!=null)k=g.path,b=o.find(I=>I.re.test(k)),b&&(_=b.parse(k),R=b.record.name);else{if(b=f.name?r.get(f.name):o.find(I=>I.re.test(f.path)),!b)throw ss(He.MATCHER_NOT_FOUND,{location:g,currentLocation:f});R=b.record.name,_=Ae({},f.params,g.params),k=b.stringify(_)}let S=[],D=b;for(;D;)S.unshift(D.record),D=D.parent;return{name:R,path:k,params:_,matched:S,meta:yc(S)}}e.forEach(g=>i(g));function v(){o.length=0,r.clear()}return{addRoute:i,resolve:h,removeRoute:a,clearRoutes:v,getRoutes:u,getRecordMatcher:n}}function oa(e,t){let o={};for(let r of t)r in e&&(o[r]=e[r]);return o}function ra(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:vc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function vc(e){let t={},o=e.props||!1;if("component"in e)t.default=o;else for(let r in e.components)t[r]=typeof o=="object"?o[r]:o;return t}function ia(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function yc(e){return e.reduce((t,o)=>Ae(t,o.meta),{})}function gc(e,t){let o=0,r=t.length;for(;o!==r;){let i=o+r>>1;fa(e,t[i])<0?r=i:o=i+1}let n=bc(e);return n&&(r=t.lastIndexOf(n,r-1)),r}function bc(e){let t=e;for(;t=t.parent;)if(ma(t)&&fa(e,t)===0)return t}function ma({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function aa(e){let t=at(Ln),o=at(Un),r=!1,n=null,i=Xe(()=>{let v=$t(e.to);return t.resolve(v)}),a=Xe(()=>{let{matched:v}=i.value,{length:g}=v,f=v[g-1],b=o.matched;if(!f||!b.length)return-1;let _=b.findIndex(ts.bind(null,f));if(_>-1)return _;let k=la(v[g-2]);return g>1&&la(f)===k&&b[b.length-1].path!==k?b.findIndex(ts.bind(null,v[g-2])):_}),u=Xe(()=>a.value>-1&&Cc(o.params,i.value.params)),p=Xe(()=>a.value>-1&&a.value===o.matched.length-1&&Mo(o.params,i.value.params));function h(v={}){if(Ec(v)){let g=t[$t(e.replace)?"replace":"push"]($t(e.to)).catch(ws);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>g),g}return Promise.resolve()}return{route:i,href:Xe(()=>i.value.href),isActive:u,isExactActive:p,navigate:h}}function wc(e){return e.length===1?e[0]:e}var kc=Dn({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:aa,setup(e,{slots:t}){let o=Le(aa(e)),{options:r}=at(Ln),n=Xe(()=>({[da(e.activeClass,r.linkActiveClass,"router-link-active")]:o.isActive,[da(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{let i=t.default&&wc(t.default(o));return e.custom?i:Ce("a",{"aria-current":o.isExactActive?e.ariaCurrentValue:null,href:o.href,onClick:o.navigate,class:n.value},i)}}}),_c=kc;function Ec(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Cc(e,t){for(let o in t){let r=t[o],n=e[o];if(typeof r=="string"){if(r!==n)return!1}else if(!yt(n)||n.length!==r.length||r.some((i,a)=>i.valueOf()!==n[a].valueOf()))return!1}return!0}function la(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}var da=(e,t,o)=>e??t??o,Nc=Dn({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:o}){let r=at(zn),n=Xe(()=>e.route||r.value),i=at(Uo,0),a=Xe(()=>{let h=$t(i),{matched:v}=n.value,g;for(;(g=v[h])&&!g.components;)h++;return h}),u=Xe(()=>n.value.matched[a.value]);Zt(Uo,Xe(()=>a.value+1)),Zt(Zi,u),Zt(zn,n);let p=rt();return ze(()=>[p.value,u.value,e.name],([h,v,g],[f,b,_])=>{v&&(v.instances[g]=h,b&&b!==v&&h&&h===f&&(v.leaveGuards.size||(v.leaveGuards=b.leaveGuards),v.updateGuards.size||(v.updateGuards=b.updateGuards))),h&&v&&(!b||!ts(v,b)||!f)&&(v.enterCallbacks[g]||[]).forEach(k=>k(h))},{flush:"post"}),()=>{let h=n.value,v=e.name,g=u.value,f=g&&g.components[v];if(!f)return ua(o.default,{Component:f,route:h});let b=g.props[v],_=b?b===!0?h.params:typeof b=="function"?b(h):b:null,R=Ce(f,Ae({},_,t,{onVnodeUnmounted:S=>{S.component.isUnmounted&&(g.instances[v]=null)},ref:p}));return ua(o.default,{Component:R,route:h})||R}}});function ua(e,t){if(!e)return null;let o=e(t);return o.length===1?o[0]:o}var zo=Nc;function ha(e){let t=hc(e.routes,e),o=e.parseQuery||Qi,r=e.stringifyQuery||Lo,n=e.history,i=ks(),a=ks(),u=ks(),p=fn(Bt),h=Bt;ns&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");let v=qn.bind(null,F=>""+F),g=qn.bind(null,Hi),f=qn.bind(null,bs);function b(F,ne){let L,W;return Fo(F)?(L=t.getRecordMatcher(F),W=ne):W=F,t.addRoute(W,L)}function _(F){let ne=t.getRecordMatcher(F);ne&&t.removeRoute(ne)}function k(){return t.getRoutes().map(F=>F.record)}function R(F){return!!t.getRecordMatcher(F)}function S(F,ne){if(ne=Ae({},ne||p.value),typeof F=="string"){let w=Mn(o,F,ne.path),N=t.resolve({path:w.path},ne),P=n.createHref(w.fullPath);return Ae(w,N,{params:f(N.params),hash:bs(w.hash),redirectedFrom:void 0,href:P})}let L;if(F.path!=null)L=Ae({},F,{path:Mn(o,F.path,ne.path).path});else{let w=Ae({},F.params);for(let N in w)w[N]==null&&delete w[N];L=Ae({},F,{params:g(w)}),ne.params=g(ne.params)}let W=t.resolve(L,ne),fe=F.hash||"";W.params=v(f(W.params));let Ee=Bi(r,Ae({},F,{hash:zi(fe),path:W.path})),pe=n.createHref(Ee);return Ae({fullPath:Ee,hash:fe,query:r===Lo?Xi(F.query):F.query||{}},W,{redirectedFrom:void 0,href:pe})}function D(F){return typeof F=="string"?Mn(o,F,p.value.path):Ae({},F)}function I(F,ne){if(h!==F)return ss(He.NAVIGATION_CANCELLED,{from:ne,to:F})}function C(F){return ee(F)}function A(F){return C(Ae(D(F),{replace:!0}))}function q(F,ne){let L=F.matched[F.matched.length-1];if(L&&L.redirect){let{redirect:W}=L,fe=typeof W=="function"?W(F,ne):W;return typeof fe=="string"&&(fe=fe.includes("?")||fe.includes("#")?fe=D(fe):{path:fe},fe.params={}),Ae({query:F.query,hash:F.hash,params:fe.path!=null?{}:F.params},fe)}}function ee(F,ne){let L=h=S(F),W=p.value,fe=F.state,Ee=F.force,pe=F.replace===!0,w=q(L,W);if(w)return ee(Ae(D(w),{state:typeof w=="object"?Ae({},fe,w.state):fe,force:Ee,replace:pe}),ne||L);let N=L;N.redirectedFrom=ne;let P;return!Ee&&Gi(r,W,L)&&(P=ss(He.NAVIGATION_DUPLICATED,{to:N,from:W}),j(W,W,!0,!1)),(P?Promise.resolve(P):U(N,W)).catch(z=>It(z)?It(z,He.NAVIGATION_GUARD_REDIRECT)?z:V(z):ae(z,N,W)).then(z=>{if(z){if(It(z,He.NAVIGATION_GUARD_REDIRECT))return ee(Ae({replace:pe},D(z.to),{state:typeof z.to=="object"?Ae({},fe,z.to.state):fe,force:Ee}),ne||N)}else z=se(N,W,!0,pe,fe);return de(N,W,z),z})}function J(F,ne){let L=I(F,ne);return L?Promise.reject(L):Promise.resolve()}function K(F){let ne=Pe.values().next().value;return ne&&typeof ne.runWithContext=="function"?ne.runWithContext(F):F()}function U(F,ne){let L,[W,fe,Ee]=ea(F,ne);L=Hn(W.reverse(),"beforeRouteLeave",F,ne);for(let w of W)w.leaveGuards.forEach(N=>{L.push(Ht(N,F,ne))});let pe=J.bind(null,F,ne);return L.push(pe),$e(L).then(()=>{L=[];for(let w of i.list())L.push(Ht(w,F,ne));return L.push(pe),$e(L)}).then(()=>{L=Hn(fe,"beforeRouteUpdate",F,ne);for(let w of fe)w.updateGuards.forEach(N=>{L.push(Ht(N,F,ne))});return L.push(pe),$e(L)}).then(()=>{L=[];for(let w of Ee)if(w.beforeEnter)if(yt(w.beforeEnter))for(let N of w.beforeEnter)L.push(Ht(N,F,ne));else L.push(Ht(w.beforeEnter,F,ne));return L.push(pe),$e(L)}).then(()=>(F.matched.forEach(w=>w.enterCallbacks={}),L=Hn(Ee,"beforeRouteEnter",F,ne,K),L.push(pe),$e(L))).then(()=>{L=[];for(let w of a.list())L.push(Ht(w,F,ne));return L.push(pe),$e(L)}).catch(w=>It(w,He.NAVIGATION_CANCELLED)?w:Promise.reject(w))}function de(F,ne,L){u.list().forEach(W=>K(()=>W(F,ne,L)))}function se(F,ne,L,W,fe){let Ee=I(F,ne);if(Ee)return Ee;let pe=ne===Bt,w=ns?history.state:{};L&&(W||pe?n.replace(F.fullPath,Ae({scroll:pe&&w&&w.scroll},fe)):n.push(F.fullPath,fe)),p.value=F,j(F,ne,L,pe),V()}let ie;function ce(){ie||(ie=n.listen((F,ne,L)=>{if(!Ue.listening)return;let W=S(F),fe=q(W,Ue.currentRoute.value);if(fe){ee(Ae(fe,{replace:!0,force:!0}),W).catch(ws);return}h=W;let Ee=p.value;ns&&Yi($o(Ee.fullPath,L.delta),Zs()),U(W,Ee).catch(pe=>It(pe,He.NAVIGATION_ABORTED|He.NAVIGATION_CANCELLED)?pe:It(pe,He.NAVIGATION_GUARD_REDIRECT)?(ee(Ae(D(pe.to),{force:!0}),W).then(w=>{It(w,He.NAVIGATION_ABORTED|He.NAVIGATION_DUPLICATED)&&!L.delta&&L.type===$n.pop&&n.go(-1,!1)}).catch(ws),Promise.reject()):(L.delta&&n.go(-L.delta,!1),ae(pe,W,Ee))).then(pe=>{pe=pe||se(W,Ee,!1),pe&&(L.delta&&!It(pe,He.NAVIGATION_CANCELLED)?n.go(-L.delta,!1):L.type===$n.pop&&It(pe,He.NAVIGATION_ABORTED|He.NAVIGATION_DUPLICATED)&&n.go(-1,!1)),de(W,Ee,pe)}).catch(ws)}))}let be=ks(),he=ks(),me;function ae(F,ne,L){V(F);let W=he.list();return W.length?W.forEach(fe=>fe(F,ne,L)):console.error(F),Promise.reject(F)}function O(){return me&&p.value!==Bt?Promise.resolve():new Promise((F,ne)=>{be.add([F,ne])})}function V(F){return me||(me=!F,ce(),be.list().forEach(([ne,L])=>F?L(F):ne()),be.reset()),F}function j(F,ne,L,W){let{scrollBehavior:fe}=e;if(!ns||!fe)return Promise.resolve();let Ee=!L&&xi($o(F.fullPath,0))||(W||!L)&&history.state&&history.state.scroll||null;return kt().then(()=>fe(F,ne,Ee)).then(pe=>pe&&Ki(pe)).catch(pe=>ae(pe,F,ne))}let Z=F=>n.go(F),oe,Pe=new Set,Ue={currentRoute:p,listening:!0,addRoute:b,removeRoute:_,clearRoutes:t.clearRoutes,hasRoute:R,getRoutes:k,resolve:S,options:e,push:C,replace:A,go:Z,back:()=>Z(-1),forward:()=>Z(1),beforeEach:i.add,beforeResolve:a.add,afterEach:u.add,onError:he.add,isReady:O,install(F){F.component("RouterLink",_c),F.component("RouterView",zo),F.config.globalProperties.$router=Ue,Object.defineProperty(F.config.globalProperties,"$route",{enumerable:!0,get:()=>$t(p)}),ns&&!oe&&p.value===Bt&&(oe=!0,C(n.location).catch(W=>{}));let ne={};for(let W in Bt)Object.defineProperty(ne,W,{get:()=>p.value[W],enumerable:!0});F.provide(Ln,Ue),F.provide(Un,$s(ne)),F.provide(zn,p);let L=F.unmount;Pe.add(F),F.unmount=function(){Pe.delete(F),Pe.size<1&&(h=Bt,ie&&ie(),ie=null,p.value=Bt,oe=!1,me=!1),L()}}};function $e(F){return F.reduce((ne,L)=>ne.then(()=>K(L)),Promise.resolve())}return Ue}function va(e){return at(Un)}function ya(e,t){return t?.split(".").reduce((o,r)=>o?.[r],e)}function Ho(e=null,t=new Map){let o=Le({}),r=[],n=!1,i=new Proxy(o,{get(a,u){return typeof u=="string"&&u.startsWith("__v_")||Reflect.has(a,u)?Reflect.get(a,u):e?.[u]}});return Object.defineProperty(o,"parent",{value:e,configurable:!0}),Object.defineProperty(o,"viewState",{get:()=>i}),i.watch=(a,u,p=!1)=>{let h=typeof a=="function"?()=>a(i):()=>ya(i,a),v=ze(h,u,{deep:p,flush:"post"});return r.push(v),kt(()=>{n||u(h(),h())}),v},i.watchGroup=(a,u)=>i.watch(()=>a.map(p=>ya(i,p)),u,!0),i.on=(a,u)=>{if(a==="dispose")return r.push(u),()=>{};t.has(a)||t.set(a,new Set),t.get(a).add(u);let p=()=>t.get(a)?.delete(u);return r.push(p),p},i.emit=(a,...u)=>{for(let p of[...t.get(a)||[]])p({},...u)},i.dispose=()=>{n=!0,r.splice(0).reverse().forEach(a=>a())},qs(i.dispose),i}function ft(){let e=new Set,t=new Set,o=!1,r=(i,a=0)=>{if(o)return;let u=setTimeout(()=>{e.delete(u),i()},a);return e.add(u),u};r.cancel=i=>{clearTimeout(i),e.delete(i)};let n=(i,a)=>{if(o)return;let u=setInterval(i,a);return t.add(u),u};return n.cancel=i=>{clearInterval(i),t.delete(i)},qs(()=>{o=!0,e.forEach(clearTimeout),t.forEach(clearInterval)}),{timeout:r,interval:n}}function rs(){let e=[];return qs(()=>e.forEach(t=>t())),(t,o,r,n)=>{t.addEventListener(o,r,n),e.push(()=>t.removeEventListener(o,r,n))}}var ga=function(e,t,o,r){e.title="Main",e.user={status:"connection"},e.site_options,e.toasts=[],e.removeToast=function(p){let h=e.toasts.indexOf(p);h!==-1&&e.toasts.splice(h,1)},e.addToast=function(p){return e.toasts.push(p),r(function(){e.removeToast(p)},8e3),p},e.path=o.url(),e.paths=o.path().substring(1).split("/"),e.darkMode=function(p){localStorage.setItem("darkMode",p),e.isDarkMode=p;let h="/css/prism-okaidia.css",v="/css/prism.css";if(p){$("body").addClass("dark-mode");let f=document.createElement("link");f.href=h,f.rel="stylesheet",document.head.append(f),$(`link[href='${v}']`).remove()}else{$("body").removeClass("dark-mode");let f=document.createElement("link");f.href=v,f.rel="stylesheet",document.head.append(f),$(`link[href='${h}']`).remove()}var g=document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap");g&&(g.style.backgroundColor=p?"#FAF9F6":"#1A1815",g.style.color=p?"#1A1815":"#FAF9F6"),e.emit("dark-mode",p)},e.darkMode(localStorage.getItem("darkMode")=="true");function n(){t.get("/api/user").then(p=>{p&&(e.user=p.data)},()=>{e.user=null})}n();function i(){t.get("/api/options").then(p=>{p&&(e.site_options=p.data)},()=>{e.site_options=null})}i();function a(){t.get("/api/message").then(p=>{p&&(e.generalMessage=p.data)},()=>{e.generalMessage=null})}a();function u(p,h){h&&(e.title=h.title),e.path=o.url(),e.paths=o.path().substring(1).split("/")}e.on("routeChange",u),e.on("routeUpdate",u)},ba=function(e,t){let o=rs()},wa=function(e,t,o,r,n){e.terms="",e.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},e.saving=!1,e.message=null,e.error=null,n.load().then(u=>{e.quota=u},console.error);function i(){t.get("/api/user/default").then(u=>{let p=u.data||{};p.terms&&(e.terms=p.terms.join(`
|
||
`)),e.options=Object.assign({},e.options,p.options)})}i();let a=null;e.saveDefault=u=>{u&&u.preventDefault&&u.preventDefault();let p={terms:e.terms.split(`
|
||
`).map(h=>h.trim()).filter(h=>h.length>0),options:e.options};e.saving=!0,e.error=null,t.post("/api/user/default",p).then(()=>{i(),e.saving=!1,e.message="Saved",a&&r.cancel(a),a=r(()=>{e.message=null},2500)},h=>{e.saving=!1;let v=h&&h.data&&h.data.error;o("ERRORS."+v).then(g=>{e.error=g},()=>{e.error="Unable to save your defaults. Please try again."})})},e.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.")&&(e.deletingAccount=!0,t.delete("/api/user").then(()=>{window.location.href="/"},()=>{e.deletingAccount=!1,e.deleteError="Unable to delete the account. Please try again."}))}},ka=function(e,t,o){e.repoId=null,e.repoUrl=null,e.claim=()=>{t.post("/api/repo/claim",{repoId:e.repoId,repoUrl:e.repoUrl}).then(r=>{o.url("/dashboard")},r=>{e.error=r.data,e.claimForm.repoUrl.setValidity("not_found",!1),e.claimForm.repoId.setValidity("not_found",!1)})}},_a=function(e,t,o,r,n){e.user&&!e.user.status&&o.url("/dashboard"),e.watch("user.status",()=>{e.user&&!e.user.status&&o.url("/dashboard")}),e.features=[{key:"anonymize",num:"01",eyebrow:"Anonymize",title:"Double-anonymous,",accent:"your rules.",text:"Choose what reviewers may see: links, images, PDFs, notebooks, GitHub Pages. Add your own terms, with regex if you need it, and pick the expiration date.",cta:"Start an anonymization",href:"/anonymize",url:"anonymous.4open.science/anonymize",img:"/imgs/anonymize.png",alt:"The anonymize form: source repository, terms to redact, options and a live README preview"},{key:"review",num:"02",eyebrow:"Review",title:"Reviewers browse",accent:"the real thing.",text:"Highlighted source code, rendered PDFs, images, and notebooks, in a familiar file explorer. GitHub Pages is also supported.",cta:"Open the example",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/",target:"_self",url:"anonymous.4open.science/r/840c8c57-\u2026",img:"/imgs/explorer.png",alt:"The repository explorer with a file tree and a rendered README"},{key:"manage",num:"03",eyebrow:"Manage",title:"One dashboard,",accent:"until the decision.",text:"Monitor views, edit configuration, remove or update your repository. Program chairs can group submissions under a conference with one shared expiry.",cta:"Open the dashboard",href:"/dashboard",needsUser:!0,url:"anonymous.4open.science/dashboard",img:"/imgs/dashboard.png",alt:"The dashboard listing anonymized repositories with status, views and expiry"}],e.feature=e.features[0].key,e.selectFeature=function(u){e.feature=u},e.featureHref=function(u){return u.needsUser&&!e.user?"/github/login":u.href},e.featureTarget=function(u){return u.needsUser&&!e.user?"_self":u.target||void 0},e.featureKeydown=function(u,p){let h={ArrowDown:1,ArrowRight:1,ArrowUp:-1,ArrowLeft:-1,Home:"first",End:"last"}[u.key];if(h===void 0)return;u.preventDefault();let v=e.features.length,g=h==="first"?0:h==="last"?v-1:(p+h+v)%v;e.feature=e.features[g].key,n(()=>{let f=r.document.getElementById("feature-tab-"+e.feature);f&&f.focus()})},e.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"}];function i(){t.get("/api/stat/").then(u=>{e.stat=u.data,e.cards[0].total=u.data.nbRepositories,e.cards[1].total=u.data.nbUsers,e.cards[2].total=u.data.nbPageViews,e.cards[3].total=u.data.nbPullRequests})}i();function a(u){let p={series:u,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(!u||u.length<2)return p;let h=new Array(u.length-1);for(let k=1;k<u.length;k++)h[k-1]=u[k]-u[k-1];let v=h.length,g=Math.max.apply(null,h),f=Math.min.apply(null,h),b=Math.min(0,f),_=g-b||1;p.viewW=v*2,p.bars=new Array(v);for(let k=0;k<v;k++){let R=(h[k]-b)/_,S=Math.max(1.5,R*34);p.bars[k]={x:(k*2+.25).toFixed(2),y:(36-S).toFixed(2),w:"1.5",h:S.toFixed(2)}}if(p.deltaToday=h[v-1],v>=2){let k=h[v-2];k&&(p.pctChange=(p.deltaToday-k)/k*100)}return p.pctAbs=Math.round(Math.abs(p.pctChange)),p.isUp=p.pctChange>=0,p}e.history={repositories:a([]),users:a([]),pageViews:a([]),pullRequests:a([])},t.get("/api/stat/history?days=60").then(u=>{let p=u.data||[];e.history={repositories:a(p.map(h=>h.nbRepositories||0)),users:a(p.map(h=>h.nbUsers||0)),pageViews:a(p.map(h=>h.nbPageViews||0)),pullRequests:a(p.map(h=>h.nbPullRequests||0))}})},Ea=function(e,t,o,r,n,i){let a=ft();e.on("routeLeave",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),a.timeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),e.items=[],e.search="",e.loading=!0,e.statusKeyLabels={ready:"Ready",progress:"In progress",error:"Error",expired:"Expired",removed:"Removed"};let u=["queue","download","downloaded","preparing","anonymizing"];function p(C){return C==="ready"||C==="error"?C:C==="expired"||C==="expiring"?"expired":C==="removed"||C==="removing"?"removed":(u.indexOf(C)>-1,"progress")}let h=7200*1e3,v="dashboard.filterPrefs",g={typeFilter:"all",filters:{status:{ready:!0,progress:!0,error:!0,expired:!0,removed:!1}},orderBy:"-anonymizeDate"},f=loadFilterPrefs(v)||{};e.typeFilter=f.typeFilter||g.typeFilter,e.filters={status:Object.assign({},g.filters.status,f.filters&&f.filters.status||{})},e.orderBy=f.orderBy||g.orderBy;let b={_name:{label:"Name",defaultDesc:!1},anonymizeDate:{label:"Anonymize date",defaultDesc:!0},status:{label:"Status",defaultDesc:!1},lastView:{label:"Last view",defaultDesc:!0},pageView:{label:"Views",defaultDesc:!0},"options.expirationDate":{label:"Expiration",defaultDesc:!1}};e.sortFields=b,e.sortField=()=>e.orderBy.replace(/^-/,""),e.sortDesc=()=>e.orderBy.charAt(0)==="-",e.sortLabel=()=>{let C=b[e.sortField()];return C?C.label:"Custom"},e.isSortedBy=C=>e.sortField()===C,e.setSort=(C,A)=>{typeof A!="boolean"&&(A=e.isSortedBy(C)?!e.sortDesc():!!(b[C]&&b[C].defaultDesc)),e.orderBy=(A?"-":"")+C},e.toggleSortDirection=()=>{e.setSort(e.sortField(),!e.sortDesc())},e.watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(v,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(v,{typeFilter:e.typeFilter,filters:e.filters,orderBy:e.orderBy})},!0),i.load().then(C=>{e.quota=C},console.error);function _(C,A,q,ee,J,K){C.pageView||(C.pageView=0),C.lastView||(C.lastView=""),C.options=C.options||{},C.options.terms=(C.options.terms||[]).filter(de=>de),C._id=A||"",C._source=ee,C._broken=!A,C._name=A||ee||"(unnamed)",C._editUrl=A?J:null,C._viewUrl=A?K:null,C._broken&&(C.status="error",C.statusMessage="incomplete_record"),C._statusKey=p(C.status);let U=C.anonymizeDate||C.lastView;return C._stale=C._statusKey==="progress"&&!!U&&Date.now()-new Date(U).getTime()>h,C.status==="expired"||C.status==="expiring"?C._expiry={kind:"expired",date:C.options.expirationDate}:C.status!=="ready"?C._expiry={kind:"none"}:C.options.expirationMode==="never"||!C.options.expirationDate?C._expiry={kind:"never"}:C._expiry={kind:"date",date:C.options.expirationDate},C}function k(C){return t.get(C).then(A=>A.data||[],A=>(console.error(A),[]))}function R(){return e.loading=!0,r.all([k("/api/user/anonymized_repositories"),k("/api/user/anonymized_pull_requests"),k("/api/user/anonymized_gists")]).then(C=>{let A=C[0],q=C[1],ee=C[2],J=[];A.forEach(K=>{K._type="repo";let U=K.source||{};J.push(_(K,K.repoId,K.repoId,U.fullName,"/anonymize/"+K.repoId,"/r/"+K.repoId+"/"))}),q.forEach(K=>{K._type="pr";let U=K.source||{};J.push(_(K,K.pullRequestId,K.pullRequestId,U.repositoryFullName+"#"+U.pullRequestId,"/pull-request-anonymize/"+K.pullRequestId,"/pr/"+K.pullRequestId+"/"))}),ee.forEach(K=>{K._type="gist";let U=K.source||{};J.push(_(K,K.gistId,K.gistId,U.gistId,"/gist-anonymize/"+K.gistId,"/gist/"+K.gistId+"/"))}),e.items=J,e.loading=!1})}R(),e.openItem=(C,A)=>{if(!C._viewUrl)return;let q=A&&A.target;q&&q.closest&&q.closest("a, button, .dropdown, input")||(n.location.href=C._viewUrl)},e.hiddenStatusCount=()=>Object.keys(e.filters.status).filter(C=>e.filters.status[C]===!1).length,e.hasHiddenStatus=()=>e.hiddenStatusCount()>0,e.hasActiveFilters=()=>e.typeFilter!=="all"||e.search.trim().length>0||Object.keys(e.filters.status).some(C=>e.filters.status[C]===!1),e.clearFilters=()=>{e.typeFilter="all",e.search="",Object.keys(e.filters.status).forEach(C=>{e.filters.status[C]=!0})};function S(C,A){t.get("/api/repo/"+C).then(q=>{for(let ee of e.items)if(ee._type==="repo"&&ee.repoId==C){ee.status=q.data.status;break}if(q.data.status=="ready"||q.data.status=="error"||q.data.status=="removed"||q.data.status=="expired"){A(q.data);return}a.timeout(()=>S(C,A),2500)})}let D=C=>C==="repo"?"repository":C==="gist"?"gist":"pull request",I=C=>C==="repo"?"/api/repo":C==="gist"?"/api/gist":"/api/pr";e.removeItem=C=>{let A=D(C._type);if(confirm(`Are you sure that you want to remove the ${A} ${C._id}?`)){let q=Le({title:`Removing ${C._id}...`,date:new Date,body:`The ${A} ${C._id} is going to be removed.`});e.addToast(q);let ee=`${I(C._type)}/${C._id}`;t.delete(ee).then(()=>{C._type==="repo"?S(C._id,()=>{q.title=`${C._id} is removed.`,q.body=`The ${A} ${C._id} is removed.`}):(q.title=`${C._id} is removed.`,q.body=`The ${A} ${C._id} is removed.`,R())},J=>{q.title=`Error during the removal of ${C._id}.`,q.body=J.body,R()})}},e.refreshItem=C=>{let A=D(C._type),q=Le({title:`Refreshing ${C._id}...`,date:new Date,body:`The ${A} ${C._id} is going to be refreshed.`});e.addToast(q);let ee=`${I(C._type)}/${C._id}/refresh`;t.post(ee).then(()=>{C._type==="repo"?S(C._id,()=>{q.title=`${C._id} is refreshed.`,q.body=`The ${A} ${C._id} is refreshed.`}):(q.title=`${C._id} is refreshed.`,q.body=`The ${A} ${C._id} is refreshed.`,R())},J=>{q.title=`Error during the refresh of ${C._id}.`,q.body=J.body,R()})},e.extendItem=C=>{let A=D(C._type),q=Le({title:`Extending ${C._id}...`,date:new Date,body:`The expiration of ${A} ${C._id} is going to be extended by 6 months.`});e.addToast(q);let ee=`${I(C._type)}/${C._id}/extend`;t.post(ee).then(()=>{C._type==="repo"?S(C._id,()=>{q.title=`${C._id} is extended.`,q.body=`The expiration of ${A} ${C._id} is extended by 6 months.`}):(q.title=`${C._id} is extended.`,q.body=`The expiration of ${A} ${C._id} is extended by 6 months.`,R())},J=>{q.title=`Error during the extension of ${C._id}.`,q.body=J.data&&J.data.error||J.body,R()})},e.itemFilter=C=>{if(e.typeFilter!=="all"&&C._type!==e.typeFilter||e.filters.status[C._statusKey]===!1)return!1;let A=e.search.trim().toLowerCase();return!!(A.length==0||C._source&&String(C._source).toLowerCase().indexOf(A)>-1||C._id&&String(C._id).toLowerCase().indexOf(A)>-1||C.conference&&String(C.conference).toLowerCase().indexOf(A)>-1)}};var Ca=function(e,t,o){let r=ft();e.repoId=o.repoId,e.repo=null,e.progress=0,e.rateLimitResetAt=0,e.rateLimitCountdown="";var n=null;let i=null,a=!1;function u(h){e.rateLimitResetAt=h,n&&r.interval.cancel(n);function v(){var g=Math.max(0,Math.ceil((h-Date.now())/1e3));if(g<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,r.interval.cancel(n),n=null;else{var f=Math.floor(g/60),b=g%60;e.rateLimitCountdown=f>0?f+"m "+b+"s":b+"s"}}v(),n=r.interval(v,1e3)}e.on("dispose",function(){a=!0,n&&r.interval.cancel(n),i&&r.timeout.cancel(i)});function p(h){if(!h)return h;var v=h.match(/^rate_limited:(\d+)$/);return v?(u(parseInt(v[1],10)),null):(e.rateLimitResetAt=0,h)}e.getStatus=()=>{a||t.get("/api/repo/"+e.repoId,{repoId:e.repoId,repoUrl:e.repoUrl}).then(h=>{if(!a){e.repo=h.data,h.data.rateLimitResetAt?u(h.data.rateLimitResetAt):e.repo.statusMessage=p(e.repo.statusMessage),e.repo.status=="ready"?e.progress=100:e.repo.status=="queue"?e.progress=10:e.repo.status=="downloaded"?e.progress=50:e.repo.status=="download"||e.repo.status=="preparing"?e.progress=25:e.repo.status=="anonymizing"&&(e.progress=75);var v=!["ready","removed","expired"].includes(e.repo.status);e.repo.status=="error"&&!e.rateLimitResetAt&&(v=!1),v&&(i=r.timeout(e.getStatus,2e3))}},h=>{e.error=h.data.error})},e.getStatus()},Bn=function(e,t,o,r,n,i,a){e.sourceUrl="",e.detectedType=null,e.repoId="",e.pullRequestId="",e.gistId="",e.terms="",e.defaultTerms="",e.branches=[],e.source={branch:"",commit:""},e.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};function u(){let O=new Date;return O.setMonth(O.getMonth()+6),O}e.options.expirationDate=u();function p(O){let V=O.getFullYear(),j=String(O.getMonth()+1).padStart(2,"0"),Z=String(O.getDate()).padStart(2,"0");return`${V}-${j}-${Z}`}e.minExpirationDate=p(new Date);let h=new Date;h.setFullYear(h.getFullYear()+1),e.maxExpirationDate=p(h),e.anonymize_readme="",e.readme="",e.html_readme="",e.isUpdate=!1;function v(O){t.get("/api/user/default").then(V=>{let j=V.data;j.terms&&(e.defaultTerms=j.terms.join(`
|
||
`)),e.options=Object.assign({},e.options,j.options),e.options.expirationDate=j.options&&j.options.expirationDate?new Date(j.options.expirationDate):u(),O&&O()})}function g(O,V,j){e.anonymize&&e.anonymize[O]&&e.anonymize[O].setValidity(V,j)}function f(O){try{let V=parseGithubUrl(O);if(V&&V.owner&&V.repo)return V.owner+"/"+V.repo}catch{}return null}function b(){return!e.isUpdate||!e._originalRepositoryID?void 0:f(e.sourceUrl)===e._originalFullName?e._originalRepositoryID:void 0}v(()=>{r.repoId&&r.repoId!=""&&(e.isUpdate=!0,e.detectedType="repo",e.repoId=r.repoId,t.get("/api/repo/"+e.repoId).then(async O=>{e.sourceUrl="https://github.com/"+O.data.source.fullName,e._originalFullName=O.data.source.fullName,e.terms=O.data.options.terms.filter(V=>V).join(`
|
||
`),e.source=O.data.source,e.role=O.data.role||"owner",e.coauthors=O.data.coauthors||[],e._originalBranch=O.data.source.branch,e.options=Object.assign({},e.options,O.data.options),e.conference=O.data.conference,e.repositoryID=O.data.source.repositoryID,e._originalRepositoryID=O.data.source.repositoryID,O.data.options.expirationDate&&(e.options.expirationDate=new Date(O.data.options.expirationDate)),await Promise.all([_(),k()]),I()},()=>{n.url("/404")})),r.pullRequestId&&r.pullRequestId!=""&&(e.isUpdate=!0,e.detectedType="pr",e.pullRequestId=r.pullRequestId,t.get("/api/pr/"+e.pullRequestId).then(async O=>{e.sourceUrl="https://github.com/"+O.data.source.repositoryFullName+"/pull/"+O.data.source.pullRequestId,e.terms=O.data.options.terms.filter(V=>V).join(`
|
||
`),e.source=O.data.source,e.options=Object.assign({},e.options,O.data.options),e.conference=O.data.conference,O.data.options.expirationDate&&(e.options.expirationDate=new Date(O.data.options.expirationDate));try{e.details=(await t.get(`/api/pr/${O.data.source.repositoryFullName}/${O.data.source.pullRequestId}`)).data}catch(V){let j=V&&V.data&&V.data.error;j&&(i("ERRORS."+j).then(Z=>{e.addToast({title:"Error",date:new Date,body:Z}),e.error=Z},console.error),ae(j))}},()=>{n.url("/404")})),r.gistId&&r.gistId!=""&&(e.isUpdate=!0,e.detectedType="gist",e.gistId=r.gistId,t.get("/api/gist/"+e.gistId).then(async O=>{e.sourceUrl="https://gist.github.com/"+O.data.source.gistId,e.terms=O.data.options.terms.filter(V=>V).join(`
|
||
`),e.source=O.data.source,e.options=Object.assign({},e.options,O.data.options),e.conference=O.data.conference,O.data.options.expirationDate&&(e.options.expirationDate=new Date(O.data.options.expirationDate)),e.details=(await t.get(`/api/gist/source/${O.data.source.gistId}`)).data},()=>{n.url("/404")}))}),e.urlSelected=async()=>{e.terms=e.defaultTerms,e.isUpdate||(e.repoId="",e.pullRequestId="",e.gistId=""),e.details=null,e.branches=[],e.source={type:"GitHubStream",branch:"",commit:""},e.anonymize_readme="",e.readme="",e.html_readme="",e.detectedType=null;let O;try{O=parseGithubUrl(e.sourceUrl)}catch{g("sourceUrl","github",!1);return}g("sourceUrl","github",!0);try{O.gistId&&!O.repo?(e.detectedType="gist",e.source={gistId:O.gistId},await K()):O.pullRequestId?(e.detectedType="pr",e.source={repositoryFullName:O.owner+"/"+O.repo,pullRequestId:O.pullRequestId},await C()):(e.detectedType="repo",await Promise.all([_(),k()]),I())}catch{return}$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),e.watch("source.branch",async()=>{if(e.detectedType!=="repo")return;let O=e.branches.filter(j=>j.name==e.source.branch)[0];if(!O)return;e.isUpdate&&e._originalBranch===e.source.branch&&!!e.source.commit||(e.source.commit=O.commit),e.readme=O.readme,await k(),I()}),e.getBranches=async O=>{let V=parseGithubUrl(e.sourceUrl);try{let j=await t.get(`/api/repo/${V.owner}/${V.repo}/branches`,{params:{force:O===!0?"1":"0",repositoryID:b()}});e.branches=j.data,e.sourceUnreachable=!1,e.source.branch||(e.source.branch=e.details.defaultBranch);let Z=e.branches.filter(oe=>oe.name==e.source.branch);Z.length>0&&(!O&&e.isUpdate&&!e.options.update&&e._originalBranch===e.source.branch&&e.source.commit||(e.source.commit=Z[0].commit),e.readme=Z[0].readme,await k(O))}catch(j){e.branches=[],e.sourceUnreachable=j&&(j.status===404||j.data&&j.data.error==="repo_not_found");let Z=j&&j.data&&j.data.error||(j&&j.status===404?"repo_not_found":"unknown_error");i("ERRORS."+Z).then(oe=>{e.toasts=e.toasts||[],e.addToast({title:"Error",date:new Date,body:oe}),e.error=oe},console.error),typeof g=="function"&&g("sourceUrl","missing",!1)}};async function _(){let O=parseGithubUrl(e.sourceUrl);try{he();let V=await t.get(`/api/repo/${O.owner}/${O.repo}/`,{params:{repositoryID:b(),force:"1"}});e.details=V.data,e.details&&e.details.id&&(e.repositoryID=e.details.id),e.repoId||(e.repoId=e.details.repo+"-"+generateRandomId(4)),await e.getBranches()}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),ae(V.data.error)),g("sourceUrl","missing",!1),V}}async function k(O){if(e.readme&&!O)return e.readme;let V=parseGithubUrl(e.sourceUrl);try{let j=await t.get(`/api/repo/${V.owner}/${V.repo}/readme`,{params:{force:O===!0?"1":"0",branch:e.source.branch,repositoryID:b()}});e.readme=j.data}catch{e.readme=""}}function R(){let O={terms:e.terms?e.terms.split(`
|
||
`):[],image:!!e.options.image,link:!!e.options.link,repoId:e.repoId};e.source&&e.source.branch&&(O.branchName=e.source.branch);try{let V=parseGithubUrl(e.sourceUrl);O.repoName=`${V.owner}/${V.repo}`}catch{}return O}function S(O,V){let j=null,Z=0;return function(){j&&a.cancel(j),j=a(()=>{j=null;let Pe=++Z,Ue=O();Ue&&t.post("/api/anonymize-preview",Ue).then($e=>{Pe===Z&&V($e.data)},()=>{})},200)}}let D=S(()=>e.readme?{content:e.readme,options:R()}:null,O=>{e.anonymize_readme=O.content||"";let V="";try{let Z=parseGithubUrl(e.sourceUrl),oe=e.source.branch||e.details&&e.details.defaultBranch||"main";V=`https://github.com/${Z.owner}/${Z.repo}/raw/${oe}/`}catch{}let j=renderMD(e.anonymize_readme,V);e.html_readme=j,a(Prism.highlightAll,150)});function I(){!e.anonymize||!e.anonymize.terms||(e.termsRegexWarning=!!e.terms&&!!e.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),D())}async function C(){let O=parseGithubUrl(e.sourceUrl);try{he();let V=await t.get(`/api/pr/${O.owner}/${O.repo}/${O.pullRequestId}`);e.details=V.data,e.pullRequestId||(e.pullRequestId=O.repo+"-PR"+O.pullRequestId+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),ae(V.data.error)),g("sourceUrl","missing",!1),V}}let A=Le(new Map),q=new Set;function ee(){let O=new Set,V=e.details&&e.details.pullRequest;if(!V)return O;typeof V.title=="string"&&O.add(V.title),typeof V.body=="string"&&O.add(V.body),typeof V.diff=="string"&&O.add(V.diff);let j=V.comments||[];for(let Z of j)typeof Z.author=="string"&&O.add(Z.author),typeof Z.body=="string"&&O.add(Z.body);return O}let J=S(()=>{let O=ee();q=O;let V=Array.from(O);return V.length===0?null:{contents:V,options:R()}},O=>{if(!O||!Array.isArray(O.contents))return;let V=Array.from(q),j=new Map;for(let Z=0;Z<V.length&&Z<O.contents.length;Z++)j.set(V[Z],O.contents[Z]);A.clear(),j.forEach((Z,oe)=>A.set(oe,Z))});e.anonymizePrContent=function(O){return O&&(A.has(O)?A.get(O):(q.has(O)||J(),O))};async function K(){let O=parseGithubUrl(e.sourceUrl);try{he();let V=await t.get(`/api/gist/source/${O.gistId}`);e.details=V.data,e.gistId||(e.gistId="gist-"+O.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(V){throw V.data&&(i("ERRORS."+V.data.error).then(j=>{e.addToast({title:"Error",date:new Date,body:j}),e.error=j},console.error),ae(V.data.error)),g("sourceUrl","missing",!1),V}}let U=Le(new Map),de=new Set;function se(){let O=new Set,V=e.details&&e.details.gist;if(!V)return O;typeof V.description=="string"&&O.add(V.description),typeof V.ownerLogin=="string"&&O.add(V.ownerLogin);let j=V.files||[];for(let oe of j)typeof oe.filename=="string"&&O.add(oe.filename),typeof oe.content=="string"&&O.add(oe.content);let Z=V.comments||[];for(let oe of Z)typeof oe.author=="string"&&O.add(oe.author),typeof oe.body=="string"&&O.add(oe.body);return O}let ie=S(()=>{let O=se();de=O;let V=Array.from(O);return V.length===0?null:{contents:V,options:R()}},O=>{if(!O||!Array.isArray(O.contents))return;let V=Array.from(de),j=new Map;for(let Z=0;Z<V.length&&Z<O.contents.length;Z++)j.set(V[Z],O.contents[Z]);U.clear(),j.forEach((Z,oe)=>U.set(oe,Z)),ce()});e.anonymizeGistContent=function(O){return O&&(U.has(O)?U.get(O):(de.has(O)||ie(),O))},e.previewGistFiles=[];function ce(){let O=e.details&&e.details.gist&&e.details.gist.files||[];e.previewGistFiles=O.map(V=>({filename:e.anonymizeGistContent(V.filename),content:e.anonymizeGistContent(V.content),language:V.language}))}e.watch("details.gist.files",ce,!0),e.watch("terms",ce);function be(){e.conference&&t.get("/api/conferences/"+e.conference).then(O=>{e.conference_data=O.data,e.conference_data.startDate=new Date(e.conference_data.startDate),e.conference_data.endDate=new Date(e.conference_data.endDate),e.options.expirationDate=new Date(e.conference_data.endDate),e.options.expirationMode="remove",e.options.update=e.conference_data.options.update,e.options.image=e.conference_data.options.image,e.options.pdf=e.conference_data.options.pdf,e.options.notebook=e.conference_data.options.notebook,e.options.link=e.conference_data.options.link},()=>{e.conference_data=null})}function he(){g("repoId","used",!0),g("repoId","format",!0),g("pullRequestId","used",!0),g("pullRequestId","format",!0),g("gistId","used",!0),g("gistId","format",!0),g("sourceUrl","used",!0),g("sourceUrl","missing",!0),g("sourceUrl","access",!0),g("sourceUrl","github",!0),g("commit","exists",!0),g("conference","activated",!0),g("terms","format",!0),e.termsRegexWarning=!1}function me(){let O=e.anonymize&&e.anonymize.expirationDate;return!e.options.expirationDate||O&&O.invalid?(O&&O.setDirty&&O.setDirty(),e.error="Please choose a valid expiration date.",!0):!1}function ae(O){let V=e.detectedType==="pr"?"pullRequestId":e.detectedType==="gist"?"gistId":"repoId";switch(O){case"repoId_already_used":g(V,"used",!1);break;case"invalid_repoId":g(V,"format",!1);break;case"options_not_provided":g(V,"format",!1);break;case"repo_already_anonymized":g("sourceUrl","used",!1);break;case"invalid_terms_format":g("terms","format",!1);break;case"repo_not_found":g("sourceUrl","missing",!1);break;case"repo_not_accessible":g("sourceUrl","access",!1);break;case"commit_not_found":g("commit","exists",!1);break;case"conf_not_activated":g("conference","activated",!1);break}}e.coauthors=e.coauthors||[],e.coauthorResults=[],e.coauthorError="",e.searchCoauthors=()=>{let O=(e.coauthorSearch||"").trim();if(e.coauthorError="",O.length<2){e.coauthorResults=[];return}t.get("/api/user/search/github-users",{params:{q:O}}).then(V=>{let j=new Set((e.coauthors||[]).map(Z=>(Z.username||"").toLowerCase()));e.coauthorResults=(V.data||[]).filter(Z=>!j.has((Z.username||"").toLowerCase()))},()=>{e.coauthorResults=[]})},e.addCoauthor=(O,V)=>{V&&V.preventDefault(),!(!O||!O.username)&&t.post("/api/repo/"+e.repoId+"/coauthors",{username:O.username}).then(j=>{e.coauthors=j.data||[],e.coauthorResults=[],e.coauthorSearch="",e.coauthorError=""},j=>{let Z=j&&j.data&&j.data.error||"unknown_error";e.coauthorError=Z})},e.removeCoauthor=O=>{!O||!O.username||confirm("Remove co-author "+O.username+"?")&&t.delete("/api/repo/"+e.repoId+"/coauthors/"+encodeURIComponent(O.username)).then(V=>{e.coauthors=V.data||[]},V=>{let j=V&&V.data&&V.data.error||"unknown_error";e.coauthorError=j})},e.anonymizeRepo=O=>{if(me())return;O.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),j={repoId:e.repoId,terms:e.terms.trim().split(`
|
||
`).filter(oe=>oe),fullName:`${V.owner}/${V.repo}`,repository:e.sourceUrl,options:e.options,source:e.source,conference:e.conference};e.details&&(j.options.pageSource=e.details.pageSource),he();let Z=e.isUpdate?"/api/repo/"+e.repoId:"/api/repo/";t.post(Z,j,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+e.repoId},oe=>{oe.data&&(i("ERRORS."+oe.data.error).then(Pe=>{e.error=Pe},console.error),ae(oe.data.error))}).finally(()=>{O.target.disabled=!1})},e.anonymizeGist=O=>{if(me())return;O.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),j={gistId:e.gistId,terms:e.terms.trim().split(`
|
||
`).filter(oe=>oe),source:{gistId:V.gistId},options:e.options,conference:e.conference};he();let Z=e.isUpdate?"/api/gist/"+e.gistId:"/api/gist/";t.post(Z,j,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+e.gistId},oe=>{oe.data&&(i("ERRORS."+oe.data.error).then(Pe=>{e.error=Pe},console.error),ae(oe.data.error))}).finally(()=>{O.target.disabled=!1})},e.anonymizePullRequest=O=>{if(me())return;O.target.disabled=!0;let V=parseGithubUrl(e.sourceUrl),j={pullRequestId:e.pullRequestId,terms:e.terms.trim().split(`
|
||
`).filter(oe=>oe),source:{repositoryFullName:`${V.owner}/${V.repo}`,pullRequestId:V.pullRequestId},options:e.options,conference:e.conference};he();let Z=e.isUpdate?"/api/pr/"+e.pullRequestId:"/api/pr/";t.post(Z,j,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+e.pullRequestId},oe=>{oe.data&&(i("ERRORS."+oe.data.error).then(Pe=>{e.error=Pe},console.error),ae(oe.data.error))}).finally(()=>{O.target.disabled=!1})},e.watch("conference",()=>{be()}),e.watch("terms",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("options.image",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("options.link",()=>{e.detectedType==="repo"&&I(),e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()}),e.watch("details",()=>{e.detectedType==="pr"&&J(),e.detectedType==="gist"&&ie()},!0)},Bo=function(e,t,o,r,n,i){let a=ft(),u=rs(),p=0,h=!1;e.on("dispose",()=>{h=!0,p++,v&&v.resolve()}),e.files=[],e.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),e.fileSearchQuery="",e.fileSearchResults=null,e.fileSearchLoading=!1,u(document,"keydown",function(U){if((U.metaKey||U.ctrlKey)&&U.key==="k"){U.preventDefault();var de=document.querySelector(".tree-search-input");de&&(de.focus(),de.select())}});var v=null;e.onFileSearchChange=function(){v&&(v.resolve(),v=null);let U=e.fileSearchQuery;if(!U||U.length<2){e.fileSearchResults=null,e.fileSearchLoading=!1;return}e.fileSearchLoading=!0;let de=i.defer();v=de,t.get(`/api/repo/${e.repoId}/files/search?q=${encodeURIComponent(U)}`,{timeout:de.promise}).then(function(se){if(!(h||v!==de)){v=null,e.fileSearchLoading=!1;var ie={};e.files.forEach(function(F){ie[(F.path||"")+"/"+F.name]=!0});for(var ce=[],be={},he=0;he<se.data.length;he++){var me=se.data[he];if(me.path)for(var ae=me.path.split("/"),O="",V=0;V<ae.length;V++){var j=O;O=O?O+"/"+ae[V]:ae[V];var Z=j+"/"+ae[V];!ie[Z]&&!be[Z]&&(be[Z]=!0,ce.push({name:ae[V],path:j}))}}ce.sort(function(F,ne){return(F.path||"").split("/").length-(ne.path||"").split("/").length}),ce.length>0&&e.files.push.apply(e.files,ce);for(var oe=[],Pe=0;Pe<se.data.length;Pe++){var Ue=se.data[Pe],$e=(Ue.path||"")+"/"+Ue.name;!ie[$e]&&Ue.size!=null&&(oe.push(Ue),ie[$e]=!0)}oe.length>0&&e.files.push.apply(e.files,oe),e.fileSearchResults=se.data}},function(){!h&&v===de&&(v=null,e.fileSearchLoading=!1,e.fileSearchResults=[])})};let g={yml:"yaml",txt:"text",py:"python",js:"javascript",ts:"typescript"},f=["license","txt"],b=["png","jpg","jpeg","gif","svg","ico","bmp","tiff","tif","webp","avif","heif","heic"],_=["wav","mp3","ogg","wma","flac","aac","m4a"],k=["mp4","avi","webm","mov","mpg","mpeg","mkv","flv","wmv","3gp","3g2","m4v","f4v","f4p","f4a","f4b"];e.on("routeUpdate",function(U,de){if(e.repoId!=r.repoId)return K();if((r.path||"")!=e.filePath){e.filePath=r.path||"",e.paths=e.filePath.split("/").filter(se=>se&&se.trim().length>0),J();for(let se=0;se<e.paths.length-1;se++){let ie=se>0?e.paths.slice(0,se).join("/"):"";e.files.some(be=>be.path===ie)||e.getFiles(ie)}}});function R(){if(e.paths[0]!="")return;let U=["readme.md","readme.txt","readme.org","readme.1st","readme"],de={};for(let ie of e.files)ie.name.toLowerCase().indexOf("readme")>-1&&(de[ie.name.toLowerCase()]=ie.name);let se=null;for(let ie of U)if(de[ie]){se=ie;break}if(!se&&Object.keys(de).length>0&&(se=Object.keys(de)[0]),se){let ie=o.url();ie[ie.length-1]!="/"&&(ie+="/"),o.url(ie+encodePathForUrl(de[se]))}}e.fileCounts=null,e.getFiles=function(U){let de=e.repoId;return t.get(`/api/repo/${e.repoId}/files/?path=${encodeURIComponent(U)}&v=${e.options.lastUpdateDate}`).then(function(se){if(h||de!==e.repoId)return[];let ie=U||"";return e.files=e.files.filter(ce=>ce.path!==ie),e.files.push(...se.data),se.data},function(se){if(h||de!==e.repoId)return[];e.type="error",e.content=se&&se.data&&se.data.error||"unknown_error",e.files=[]})};function S(){let U=e.repoId;t.get(`/api/repo/${e.repoId}/files/counts`).then(function(de){h||U!==e.repoId||(e.fileCounts=de.data)},function(){e.fileCounts={}})}function D(){return e.files.filter(U=>U.name==e.paths[e.paths.length-1]&&U.path==e.paths.slice(0,e.paths.length-1).join("/"))[0]}var I=null;e.on("dispose",function(){I&&a.interval.cancel(I)});function C(U){if(h)return;let de=e.repoId;t.get(`/api/repo/${e.repoId}/options`).then(se=>{if(!(h||de!==e.repoId)){if(e.options=se.data,e.options.url){window.location=e.options.url;return}U&&U(se.data)}},se=>{if(!(h||de!==e.repoId)){var ie=se.data||{};if(ie.error==="rate_limited"&&ie.resetAt){let be=function(){var he=Math.max(0,Math.ceil((e.rateLimitResetAt-Date.now())/1e3));if(he<=0)e.rateLimitCountdown="",e.rateLimitResetAt=0,I&&(a.interval.cancel(I),I=null),C(U);else{var me=Math.floor(he/60),ae=he%60;e.rateLimitCountdown=me>0?me+"m "+ae+"s":ae+"s"}};var ce=be;e.type="rate_limited",e.rateLimitResetAt=ie.resetAt,I&&a.interval.cancel(I),be(),I=a.interval(be,1e3)}else ie.error==="repository_not_ready"?(e.type="loading",a.timeout(function(){C(U)},3e3)):(e.type="error",e.content=ie.error)}})}e.toggleSource=function(){e.showSource=!e.showSource},e.toggleAllowScripts=function(){e.allowScripts=!e.allowScripts};function A(U){return g[U]?g[U]:U}function q(U){return U=="pdf"?"pdf":U=="html"||U=="htm"?"html-doc":U=="md"?"md":U=="org"?"org":U=="ipynb"?"IPython":f.indexOf(U)>-1?"text":b.indexOf(U)>-1?"image":k.indexOf(U)>-1?"media":_.indexOf(U)>-1?"audio":"code"}function ee(U,de){let se=p;if(!U){e.type="error",e.content="no_file_selected";return}let ie=e.type;e.type="loading",e.content="loading";let ce=de&&de.sha||"0";t.get(`/api/repo/${e.repoId}/file/${encodePathForUrl(U)}?v=`+ce,{transformResponse:be=>be}).then(be=>{if(!(h||se!==p)){if(e.type=ie,e.content=be.data,e.content==""&&(e.content=null),e.type=="md"&&(e.content=renderMD(be.data,o.url()+"/../"),e.type="html"),e.type=="org"){let me=contentAbs2Relative(be.data);var he=new Org.Parser().parse(me).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1});e.content=DOMPurify.sanitize(he.toString()),e.type="html"}e.type=="code"&&be.headers("content-type")=="application/octet-stream"&&(e.type="binary",e.content="binary"),a.timeout(()=>{Prism.highlightAll()},50)}},be=>{if(!(h||se!==p)){e.type="error",e.content="unknown_error";try{be.data=JSON.parse(be.data),be.data.error?e.content=be.data.error:e.content=be.data}catch{console.log(be),be.status==-1?e.content="request_error":be.status==502&&(e.content="unreachable")}}})}function J(){p++,e.content="",e.file=D();let U="0";e.file&&e.file.sha&&(U=e.file.sha),e.url=`/api/repo/${e.repoId}/file/${encodePathForUrl(e.filePath)}?v=${U}`;let de=e.filePath.substring(0,e.filePath.lastIndexOf("/")+1);e.fileBaseUrl=`/api/repo/${e.repoId}/file/${de?encodePathForUrl(de):""}`,e.showSource=!1,e.allowScripts=!1;let se=e.filePath.toLowerCase(),ie=se.lastIndexOf(".");if(ie>-1&&(se=se.substring(ie+1)),e.aceOption={readOnly:!0,useWrapMode:!0,showGutter:!0,theme:"chrome",useSoftTab:!0,tabSize:2,fontSize:15,keyBinding:"vscode",fullLineSelection:!0,highlightActiveLine:!1,highlightGutterLine:!1,cursor:"hide",showInvisibles:!1,showIndentGuides:!0,showPrintMargin:!1,highlightSelectedWord:!1,enableBehaviours:!0,fadeFoldWidgets:!1,mode:A(se),onLoad:function(ce){let be=ace.require("ace/range").Range,he=null;function me(V,j){he!==null&&(ce.session.removeMarker(he),he=null),V!=null&&(he=ce.session.addMarker(new be(V,0,j,1),"highlighted-line","fullLine"))}function ae(V){let j=window.location.hash.match(/^#L(\d+)(?:-L(\d+))?/);if(!j){me(null);return}let Z=parseInt(j[1])-1,oe=j[2]?parseInt(j[2])-1:Z;me(Z,oe),V&&a.timeout(()=>{ce.scrollToLine(Z,!0,!0,function(){})},100)}ae(!0);let O=null;ce.on("guttermousedown",function(V){let j=V.getDocumentPosition().row,Z=V.domEvent&&V.domEvent.shiftKey,oe=j,Pe=j;Z&&O!==null?(oe=Math.min(O,j),Pe=Math.max(O,j)):O=j;let Ue=oe===Pe?`#L${oe+1}`:`#L${oe+1}-L${Pe+1}`,$e=window.location.pathname+window.location.search+Ue;window.history.replaceState(null,"",$e),me(oe,Pe),V.stop()}),u(window,"hashchange",()=>ae(!1)),ce.setFontSize(e.aceOption.fontSize),ce.setReadOnly(e.aceOption.readOnly),ce.setKeyboardHandler(e.aceOption.keyBinding),ce.setSelectionStyle(e.aceOption.fullLineSelection?"line":"text"),ce.setOption("displayIndentGuides",!0),ce.setHighlightActiveLine(e.aceOption.highlightActiveLine),e.aceOption.cursor=="hide"&&(ce.renderer.$cursorLayer.element.style.display="none"),ce.setHighlightGutterLine(e.aceOption.highlightGutterLine),ce.setShowInvisibles(e.aceOption.showInvisibles),ce.setDisplayIndentGuides(e.aceOption.showIndentGuides),ce.renderer.setShowPrintMargin(e.aceOption.showPrintMargin),ce.setHighlightSelectedWord(e.aceOption.highlightSelectedWord),ce.session.setUseSoftTabs(e.aceOption.useSoftTab),ce.session.setTabSize(e.aceOption.tabSize),ce.setBehavioursEnabled(e.aceOption.enableBehaviours),ce.setFadeFoldWidgets(e.aceOption.fadeFoldWidgets)}},e.on("dark-mode",(ce,be)=>{be?e.aceOption.theme="nord_dark":e.aceOption.theme="chrome"}),e.isDarkMode&&(e.aceOption.theme="nord_dark"),e.type=q(se),e.type=="pdf"){e.content="pdf";return}ee(e.filePath,e.file)}function K(){p++,e.files=[],e.content=null,e.fileCounts=null,e.fileSearchQuery="",e.onFileSearchChange(),e.repoId=r.repoId,e.type="loading",e.filePath=r.path||"",e.paths=e.filePath.split("/");let U=e.repoId;C(function(de){S();var se=i.resolve();for(let ie=0;ie<e.paths.length;ie++){let ce=ie>0?e.paths.slice(0,ie).join("/"):"";se=se.then(function(){return e.getFiles(ce)}).then(function(){if(e.type==="error")return i.reject("error")})}se.then(function(){h||U!==e.repoId||(e.files.length==1&&e.files[0].name==""?(e.files=[],e.type="empty"):(R(),J()))})})}K()},Na=function(e,t,o,r,n){async function i(p){t.get(`/api/pr/${e.pullRequestId}/options`).then(h=>{if(e.options=h.data,e.options.url){window.location=e.options.url;return}p&&p(h.data)},h=>{e.type="error",e.content=h.data.error})}async function a(p){t.get(`/api/pr/${e.pullRequestId}/content`).then(h=>{e.details=h.data,e.tabState={active:h.data.diff?"diff":"comments"},p&&p(h.data)},h=>{e.type="error",e.content=h.data.error})}function u(){e.pullRequestId=r.pullRequestId,e.type="loading",i(p=>{a()})}u()},Sa=function(e,t,o,r,n){async function i(p){t.get(`/api/gist/${e.gistId}/options`).then(h=>{if(e.options=h.data,e.options.url){window.location=e.options.url;return}p&&p(h.data)},h=>{e.type="error",e.content=h.data.error})}async function a(p){t.get(`/api/gist/${e.gistId}/content`).then(h=>{e.details=h.data;let v=h.data&&h.data.files&&h.data.files.length;e.tabState={active:v?"files":"comments"},p&&p(h.data)},h=>{e.type="error",e.content=h.data.error})}function u(){e.gistId=r.gistId,e.type="loading",i(()=>{a()})}u()},Da=function(e,t,o){e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.search="";let r="conferences.filterPrefs",n={filters:{status:{ready:!0,expired:!1,removed:!1}},orderBy:"name"},i=loadFilterPrefs(r)||{};e.filters={status:Object.assign({},n.filters.status,i.filters&&i.filters.status||{})},e.orderBy=i.orderBy||n.orderBy,e.watch("orderBy",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})}),e.watch("filters",()=>{saveFilterPrefs(r,{filters:e.filters,orderBy:e.orderBy})},!0),e.removeConference=function(u){if(confirm(`Are you sure that you want to remove the conference ${u.name}? All the repositories linked to this conference will expire.`)){let p=Le({title:`Removing ${u.name}...`,date:new Date,body:`The conference ${u.name} is going to be removed.`});e.addToast(p),t.delete(`/api/conferences/${u.conferenceID}`).then(()=>{p.title=`${u.name} is removed.`,p.body=`The conference ${u.name} is removed.`,a()})}};function a(){t.get("/api/conferences/").then(u=>{e.conferences=u.data||[]},u=>{console.error(u)})}a(),e.conferenceFilter=u=>e.filters.status[u.status]==!1?!1:e.search.trim().length==0||u.name.indexOf(e.search)>-1||u.conferenceID.indexOf(e.search)>-1},Go=function(e,t,o,r){e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.plans=[],e.editionMode=!1;function n(){t.get("/api/conferences/"+r.conferenceId).then(v=>{e.options=v.data,e.options.startDate=new Date(e.options.startDate),e.options.endDate=new Date(e.options.endDate)})}r.conferenceId&&(e.editionMode=!0,n());function i(){t.get("/api/conferences/plans").then(v=>{e.plans=v.data,e.plan=e.plans.filter(g=>g.id==e.options.plan.planID)[0]})}i();let a=new Date;a.setDate(1),a.setMonth(a.getMonth()+1);let u=new Date(a);u.setMonth(a.getMonth()+7,0),e.options={startDate:a,endDate:u,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},e.plan=null,e.watch("options.plan.planID",()=>{e.plan=e.plans.filter(v=>v.id==e.options.plan.planID)[0]});function p(){e.conference.name.setValidity("required",!0),e.conference.conferenceID.setValidity("pattern",!0),e.conference.conferenceID.setValidity("required",!0),e.conference.conferenceID.setValidity("used",!0),e.conference.startDate.setValidity("required",!0),e.conference.startDate.setValidity("invalid",!0),e.conference.endDate.setValidity("required",!0),e.conference.endDate.setValidity("invalid",!0),e.conference.setValidity("error",!0)}function h(v){switch(v){case"conf_name_missing":e.conference.name.setValidity("required",!1);break;case"conf_id_missing":e.conference.conferenceID.setValidity("required",!1);break;case"conf_id_format":e.conference.conferenceID.setValidity("pattern",!1);break;case"conf_id_used":e.conference.conferenceID.setValidity("used",!1);break;case"conf_start_date_missing":e.conference.startDate.setValidity("required",!1);break;case"conf_end_date_missing":e.conference.endDate.setValidity("required",!1);break;case"conf_start_date_invalid":e.conference.startDate.setValidity("invalid",!1);break;case"conf_end_date_invalid":e.conference.endDate.setValidity("invalid",!1);break;default:e.conference.setValidity("error",!1);break}}e.submit=function(){let v=Le({title:`Creating ${e.options.name}...`,date:new Date,body:`The conference ${e.options.conferenceID} is in creation.`});e.editionMode&&(v.title=`Updating ${e.options.name}...`,v.body=`The conference '${e.options.conferenceID}' is updating.`),e.addToast(v),p(),t.post("/api/conferences/"+(e.editionMode?e.options.conferenceID:""),e.options).then(()=>{e.editionMode?(v.title=`${e.options.name} updated`,v.body=`The conference '${e.options.conferenceID}' is updated.`):(v.title=`${e.options.name} created`,v.body=`The conference '${e.options.conferenceID}' is created.`),o.url("/conference/"+e.options.conferenceID)},g=>{h(g.data.error),e.removeToast(v)})}},Ra=function(e,t,o,r){e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conference=null,e.search="",e.filters={status:{ready:!0,expired:!1,removed:!1}},e.orderBy="-anonymizeDate",e.repoFiler=i=>e.filters.status[i.status]==!1?!1:e.search.trim().length==0||i.source.fullName.indexOf(e.search)>-1||i.repoId.indexOf(e.search)>-1;function n(){t.get("/api/conferences/"+r.conferenceId).then(i=>{e.conference=i.data})}n()};var Ta=function(e,t,o){let r=ft(),n=rs();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.repositories=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.totalSize=0,e.selected={},e.allSelected=!1;let i=_=>{if(_.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){_.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=_=>{_==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[_]="",e.query.page=1},e.chips=[];let a=()=>{let _=[];e.query.owner&&_.push({key:"owner",label:"Owner",value:e.query.owner}),e.query.conference&&_.push({key:"conference",label:"Conference",value:e.query.conference}),e.chips=_};e.showStatusMessage=_=>{let k=_.statusMessage||"(no message)";window.prompt(`Status message for ${_.repoId} (${_.status}):`,k)},e.fetchGithubInfo=_=>{let k=window.open("","_blank");k&&k.document.write("<pre>Loading GitHub info for "+_.repoId+"...</pre>"),t.get("/api/admin/repos/"+_.repoId+"/github").then(R=>{k&&(k.document.open(),k.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(R.data,null,2).replace(/[<>]/g,S=>S==="<"?"<":">")+"</pre>"),k.document.close())},R=>{let S=R&&R.data?JSON.stringify(R.data,null,2):String(R);k&&(k.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+S+"</pre>")})},e.statusCountFor=_=>{let k=(e.statusCounts||[]).find(R=>R._id===_);return k?k.count:0},e.statusStorageFor=_=>{let k=(e.statusCounts||[]).find(R=>R._id===_);return k?k.storage:0},e.isErrorsOnly=()=>e.query&&e.query.error&&!e.query.ready&&!e.query.preparing&&!e.query.expired&&!e.query.removed,e.toggleErrorsOnly=()=>{e.isErrorsOnly()?Object.assign(e.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(e.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),e.query.page=1},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=_=>{e.query.sort===_?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=_,e.query.direction="desc"),e.query.page=1},e.sortIcon=_=>e.query.sort===_?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.repos.filterPrefs",p={page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.owner&&(e.query.owner=v.owner),v.conference&&(e.query.conference=v.conference),v.search&&(e.query.search=v.search);let g="admin.repos.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let _=window.prompt("Preset name:");if(!_)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==_),e.presets.push({name:_,query:k}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=_=>{Object.assign(e.query,_.query,{page:1})},e.deletePreset=_=>{e.presets=(e.presets||[]).filter(k=>k.name!==_.name),localStorage.setItem(g,JSON.stringify(e.presets))},e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.repositories.forEach(_=>{e.selected[_.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(_=>e.selected[_.repoId]),e.bulkRefresh=()=>{let _=e.selectedRepos();_.length&&confirm(`Force refresh ${_.length} repositories?`)&&_.forEach(k=>e.updateRepository(k))},e.bulkRemoveCache=()=>{let _=e.selectedRepos();_.length&&confirm(`Purge cache for ${_.length} repositories?`)&&_.forEach(k=>e.removeCache(k))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let _=new URLSearchParams(Object.entries(e.query).filter(([,k])=>k!==""&&k!==!1&&k!=null));_.set("format","csv"),_.set("limit","10000"),window.open("/api/admin/repos?"+_.toString(),"_blank")},e.removeCache=_=>{confirm("Remove cached files for "+_.repoId+"?")&&t.delete("/api/admin/repos/"+_.repoId).then(()=>f(),k=>console.error(k))},e.removeRepository=_=>{confirm("Remove repository "+_.repoId+"?")&&t.delete("/api/repo/"+_.repoId+"/").then(()=>f(),k=>console.error(k))},e.updateRepository=_=>{let k=Le({title:`Refreshing ${_.repoId}...`,date:new Date,body:`The repository ${_.repoId} is going to be refreshed.`});e.toasts.push(k),t.post(`/api/repo/${_.repoId}/refresh`).then(R=>{R.data.status=="ready"?k.title=`${_.repoId} is refreshed.`:k.title=`Refreshing of ${_.repoId}.`},R=>{k.title=`Error during the refresh of ${_.repoId}.`,k.body=R.body})},e.fetchError=null;function f(){e.fetchError=null,t.get("/api/admin/repos",{params:e.query}).then(_=>{e.total=_.data.total,e.totalPage=Math.ceil(_.data.total/e.query.limit),e.repositories=_.data.results,e.statusCounts=_.data.statusCounts||[],e.totalSize=_.data.totalSize||0,e.allSelected=!1},_=>{e.fetchError=_&&_.data&&_.data.error||"Failed to load repositories",console.error(_)})}f();let b=null;e.watch("query",()=>{r.timeout.cancel(b),b=r.timeout(f,500);let{page:_,search:k,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},Oa=function(e,t,o){let r=ft(),n=rs();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.users=[],e.total=-1,e.totalPage=0,e.statusCounts=[],e.selected={},e.allSelected=!1;let i=f=>{if(f.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){f.preventDefault();let b=document.querySelector('.admin-filter-toolbar input[type="search"]');b&&b.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=f=>{f==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[f]="",e.query.page=1},e.chips=[];let a=()=>{let f=[];e.query.role&&f.push({key:"role",label:"Role",value:e.query.role}),e.chips=f};e.statusCountFor=f=>{let b=(e.statusCounts||[]).find(_=>_._id===f);return b?b.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=f=>{e.query.sort===f?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=f,e.query.direction="desc"),e.query.page=1},e.sortIcon=f=>e.query.sort===f?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.users.filterPrefs",p={page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""}),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,e.users.forEach(f=>{e.selected[f.username]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedUsers=()=>e.users.filter(f=>e.selected[f.username]),e.banUser=f=>{confirm(`Ban user ${f.username}?`)&&t.post(`/api/admin/users/${f.username}/ban`).then(v,b=>console.error(b))},e.activateUser=f=>{t.post(`/api/admin/users/${f.username}/activate`).then(v,b=>console.error(b))},e.bulkBan=()=>{let f=e.selectedUsers();f.length&&confirm(`Ban ${f.length} users?`)&&f.forEach(b=>e.banUser(b))},e.exportCsv=()=>{let f=new URLSearchParams(Object.entries(e.query).filter(([,b])=>b!==""&&b!==!1&&b!=null));f.set("format","csv"),f.set("limit","10000"),window.open("/api/admin/users?"+f.toString(),"_blank")},e.fetchError=null;function v(){e.fetchError=null,t.get("/api/admin/users",{params:e.query}).then(f=>{e.total=f.data.total,e.totalPage=Math.ceil(f.data.total/e.query.limit),e.users=f.data.results,e.statusCounts=f.data.statusCounts||[],e.allSelected=!1},f=>{e.fetchError=f&&f.data&&f.data.error||"Failed to load users",console.error(f)})}v();let g=null;e.watch("query",()=>{r.timeout.cancel(g),g=r.timeout(v,500);let{page:f,search:b,..._}=e.query;saveFilterPrefs(u,_),a()},!0),a()},Aa=function(e,t,o,r){let n=ft();e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.userInfo,e.repositories=[],e.search="",e.selected={},e.allSelected=!1;let i="admin.user.filterPrefs",a={filters:{status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},sort:"anonymizeDate",direction:"desc"},u=loadFilterPrefs(i)||{};e.filters={status:Object.assign({},a.filters.status,u.filters&&u.filters.status||{})},e.query={sort:u.sort||a.sort,direction:u.direction||a.direction},e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort,e.sortBy=f=>{e.query.sort===f?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=f,e.query.direction="desc"),e.orderBy=(e.query.direction==="asc"?"":"-")+e.query.sort},e.sortIcon=f=>e.query.sort===f?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"",e.watch("query",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.watch("filters",()=>{saveFilterPrefs(i,{filters:e.filters,sort:e.query.sort,direction:e.query.direction})},!0),e.statusCountFor=f=>(e.repositories||[]).filter(b=>b.status===f).length,e.repoFiler=f=>e.filters.status[f.status]==!1?!1:!!(e.search.trim().length==0||f.source.fullName.indexOf(e.search)>-1||f.repoId.indexOf(e.search)>-1||f.statusMessage&&f.statusMessage.indexOf(e.search)>-1||f.conference&&f.conference.indexOf(e.search)>-1),e.selectAllOnPage=()=>{e.allSelected=!e.allSelected,(e.filteredRepositories||e.repositories).forEach(f=>{e.selected[f.repoId]=e.allSelected})},e.selectedCount=()=>Object.values(e.selected||{}).filter(Boolean).length,e.selectedRepos=()=>e.repositories.filter(f=>e.selected[f.repoId]),e.bulkRefresh=()=>{let f=e.selectedRepos();f.length&&confirm(`Force refresh ${f.length} repositories?`)&&f.forEach(b=>e.updateRepository(b))},e.bulkRemoveCache=()=>{let f=e.selectedRepos();f.length&&confirm(`Purge cache for ${f.length} repositories?`)&&f.forEach(b=>e.removeCache(b))},e.clearSelection=()=>{e.selected={},e.allSelected=!1},e.exportCsv=()=>{let f=e.filteredRepositories||e.repositories,_=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),k=f.map(D=>[D.repoId,D.status,D.statusMessage||"",D.pageView||0,D.anonymizeDate||"",D.source&&D.source.fullName||"",D.conference||"",D.size&&D.size.storage||0].map(I=>{let C=String(I??"");return/[",\n\r]/.test(C)?'"'+C.replace(/"/g,'""')+'"':C}).join(",")),R=new Blob([_+`
|
||
`+k.join(`
|
||
`)],{type:"text/csv"}),S=document.createElement("a");S.href=URL.createObjectURL(R),S.download=r.username+"-repositories.csv",S.click()},e.showStatusMessage=f=>{let b=f.statusMessage||"(no message)";window.prompt(`Status message for ${f.repoId} (${f.status}):`,b)},e.fetchGithubInfo=f=>{let b=window.open("","_blank");b&&b.document.write("<pre>Loading GitHub info for "+f.repoId+"...</pre>"),t.get("/api/admin/repos/"+f.repoId+"/github").then(_=>{b&&(b.document.open(),b.document.write('<pre style="font:13px monospace;padding:16px;white-space:pre-wrap">'+JSON.stringify(_.data,null,2).replace(/[<>]/g,k=>k==="<"?"<":">")+"</pre>"),b.document.close())},_=>{let k=_&&_.data?JSON.stringify(_.data,null,2):String(_);b&&(b.document.body.innerHTML='<pre style="color:#B42318;padding:16px">'+k+"</pre>")})};function p(f){t.get("/api/admin/users/"+f+"/repos",{}).then(b=>{e.repositories=b.data},b=>{console.error(b)})}function h(f){t.get("/api/admin/users/"+f,{}).then(b=>{e.userInfo=b.data},b=>{console.error(b)})}h(r.username),p(r.username),e.banUser=()=>{confirm(`Ban user ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/ban`).then(()=>h(r.username),f=>console.error(f))},e.activateUser=()=>{t.post(`/api/admin/users/${r.username}/activate`).then(()=>h(r.username),f=>console.error(f))},e.promoteUser=()=>{confirm(`Promote ${r.username} to admin?`)&&t.post(`/api/admin/users/${r.username}/promote`).then(()=>h(r.username),f=>console.error(f))},e.demoteUser=()=>{confirm(`Remove admin privileges from ${r.username}?`)&&t.post(`/api/admin/users/${r.username}/demote`).then(()=>h(r.username),f=>console.error(f))},e.tokens=[],e.tokenForm={name:"",plaintext:null};function v(){t.get("/api/admin/tokens").then(f=>{e.tokens=f.data||[]},f=>{f.status!==401&&f.status!==403&&console.error(f)})}v(),e.createToken=()=>{e.tokenForm.name&&t.post("/api/admin/tokens",{name:e.tokenForm.name}).then(f=>{e.tokenForm.plaintext=f.data.token,e.tokenForm.name="",v()},f=>console.error(f))},e.revokeToken=f=>{confirm(`Revoke token "${f.name}"?`)&&t.delete("/api/admin/tokens/"+f.id).then(()=>v(),b=>console.error(b))},e.removeCache=f=>{confirm("Remove cached files for "+f.repoId+"?")&&t.delete("/api/admin/repos/"+f.repoId).then(()=>p(r.username),b=>console.error(b))},e.removeRepository=f=>{confirm("Remove repository "+f.repoId+"?")&&t.delete("/api/repo/"+f.repoId+"/").then(()=>p(r.username),b=>console.error(b))},e.updateRepository=f=>{let b=Le({title:`Refreshing ${f.repoId}...`,date:new Date,body:`The repository ${f.repoId} is going to be refreshed.`});e.toasts.push(b),t.post(`/api/repo/${f.repoId}/refresh`).then(_=>{_.data.status=="ready"?b.title=`${f.repoId} is refreshed.`:b.title=`Refreshing of ${f.repoId}.`},_=>{b.title=`Error during the refresh of ${f.repoId}.`,b.body=_.body})},e.getGitHubRepositories=f=>{t.get(`/api/user/${e.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(b=>{e.userInfo.repositories=b.data})};let g=null;e.watch("query",()=>{n.timeout.cancel(g),g=n.timeout(()=>{p(r.username)},500)},!0)},Ia=function(e,t,o){let r=ft(),n=rs();e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.conferences=[],e.total=-1,e.totalPage=0,e.statusCounts=[];let i=_=>{if(_.key==="/"&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)){_.preventDefault();let k=document.querySelector('.admin-filter-toolbar input[type="search"]');k&&k.focus()}};n(document,"keydown",i),e.on("dispose",()=>document.removeEventListener("keydown",i)),e.clearFilter=_=>{_==="dateRange"?(e.query.dateFrom="",e.query.dateTo=""):e.query[_]="",e.query.page=1},e.chips=[];let a=()=>{let _=[];(e.query.dateFrom||e.query.dateTo)&&_.push({key:"dateRange",label:"Date",value:(e.query.dateFrom||"\u2026")+" \u2013 "+(e.query.dateTo||"\u2026")}),e.chips=_};e.statusCountFor=_=>{let k=(e.statusCounts||[]).find(R=>R._id===_);return k?k.count:0},e.toggleSortDirection=()=>{e.query.direction=e.query.direction==="asc"?"desc":"asc"},e.sortBy=_=>{e.query.sort===_?e.query.direction=e.query.direction==="asc"?"desc":"asc":(e.query.sort=_,e.query.direction="desc"),e.query.page=1},e.sortIcon=_=>e.query.sort===_?e.query.direction==="asc"?"fa-arrow-up":"fa-arrow-down":"";let u="admin.conferences.filterPrefs",p={page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},h=loadFilterPrefs(u)||{};e.query=Object.assign({},p,h,{page:1,search:""});let v=o.search();v.search&&(e.query.search=v.search);let g="admin.conferences.presets";e.presets=JSON.parse(localStorage.getItem(g)||"[]"),e.savePreset=()=>{let _=window.prompt("Preset name:");if(!_)return;let k=Object.assign({},e.query);delete k.page,e.presets=(e.presets||[]).filter(R=>R.name!==_),e.presets.push({name:_,query:k}),localStorage.setItem(g,JSON.stringify(e.presets))},e.applyPreset=_=>{Object.assign(e.query,_.query,{page:1})},e.deletePreset=_=>{e.presets=(e.presets||[]).filter(k=>k.name!==_.name),localStorage.setItem(g,JSON.stringify(e.presets))},e.removeConference=_=>{confirm("Remove conference "+_.conferenceID+"?")&&t.delete("/api/admin/conferences/"+_.conferenceID).then(()=>f(),k=>console.error(k))},e.exportCsv=()=>{let _=new URLSearchParams(Object.entries(e.query).filter(([,k])=>k!==""&&k!==!1&&k!=null));_.set("format","csv"),_.set("limit","10000"),window.open("/api/admin/conferences?"+_.toString(),"_blank")},e.fetchError=null;function f(){e.fetchError=null,t.get("/api/admin/conferences",{params:e.query}).then(_=>{e.total=_.data.total,e.totalPage=Math.ceil(_.data.total/e.query.limit),e.conferences=_.data.results,e.statusCounts=_.data.statusCounts||[]},_=>{e.fetchError=_&&_.data&&_.data.error||"Failed to load conferences",console.error(_)})}f();let b=null;e.watch("query",()=>{r.timeout.cancel(b),b=r.timeout(f,500);let{page:_,search:k,...R}=e.query;saveFilterPrefs(u,R),a()},!0),a()},Va=function(e,t,o,r,n){let i=ft();e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.queueList=[],e.jobs=[],e.selectedQueue="download",e.selectedStats=null,e.range="1h",e.allStates=["active","waiting","delayed","failed","completed"],e.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},e.query={search:"",autoRefresh:!0},e.filteredJobs=()=>(e.jobs||[]).filter(k=>e.stateFilter[k._state]),e.jobProgressPct=k=>k&&k.progress&&typeof k.progress=="object"&&typeof k.progress.percent=="number"?Math.max(0,Math.min(100,Math.round(k.progress.percent))):typeof k.progress=="number"?Math.max(0,Math.min(100,Math.round(k.progress))):null,e.jobDuration=k=>{if(!k.processedOn)return"-";let S=(k.finishedOn||Date.now())-k.processedOn;return S<1e3?S+"ms":(S/1e3).toFixed(1)+"s"},e.metricsPoints=[],e.selectQueue=k=>{e.selectedQueue=k,a(),u()},e.setRange=k=>{e.range=k,u()};function a(){let k={queue:e.selectedQueue,search:e.query.search};t.get("/api/admin/queues",{params:k}).then(R=>{e.queueList=R.data.queues||[],e.jobs=R.data.jobs||[],e.selectedStats=e.queueList.find(S=>S.key===e.selectedQueue)||e.queueList[0]||null},R=>console.error(R))}function u(){t.get("/api/admin/queues/metrics",{params:{queue:e.selectedQueue,range:e.range}}).then(k=>{e.metricsPoints=k.data.points||[],n(f,0)},k=>console.error(k))}a(),u();let p=r(()=>{e.query.autoRefresh&&(a(),u())},15e3);e.on("dispose",()=>r.cancel(p)),e.refreshNow=function(){a(),u()};function h(k){let R=k&&k.data&&(k.data.message||k.data.error)||"Request failed";e.actionError=R,n(()=>{e.actionError=null},5e3),console.error(k)}e.actionError=null,e.removeJob=k=>{t.delete(`/api/admin/queue/${e.selectedQueue}/${k.id}`).then(a,h)},e.retryJob=k=>{t.post(`/api/admin/queue/${e.selectedQueue}/${k.id}`).then(a,h)},e.retryFailed=()=>{confirm(`Retry all failed jobs in ${e.selectedQueue}?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/retry-failed`).then(a,k=>console.error(k))},e.drainSelected=()=>{confirm(`Drain the ${e.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${e.selectedQueue}/drain`).then(a,k=>console.error(k))},e.togglePause=()=>{let k=e.selectedStats&&e.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${e.selectedQueue}/${k}`).then(a,R=>console.error(R))},e.emptyQueue=()=>{confirm(`Empty the ${e.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${e.selectedQueue}/empty`).then(a,k=>console.error(k))},e.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(a,k=>console.error(k))};let v=null;e.watch("query.search",()=>{i.timeout.cancel(v),v=i.timeout(a,350)}),e.expanded={},e.toggleJob=k=>{e.expanded[k.id]=!e.expanded[k.id]},e.humanTime=k=>{if(!k)return"";let R=new Date(k);return R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+R.toLocaleDateString([],{month:"short",day:"numeric"})},e.delayCountdown=k=>{if(!k)return"";var R=Math.max(0,Math.ceil((k-Date.now())/1e3));if(R<=0)return"resuming soon";var S=Math.floor(R/60),D=R%60;return"in "+(S>0?S+"m "+D+"s":D+"s")};function g(k){if(k<=0)return{ticks:[0],niceMax:1};let R=Math.pow(10,Math.floor(Math.log10(k))),S=R;k/S<2?S=R/2:k/S>5&&(S=R*2);let D=Math.ceil(k/S)*S,I=[];for(let C=0;C<=D;C+=S)I.push(C);return{ticks:I,niceMax:D}}function f(){var k=document.getElementById("q-throughput-chart");if(!k)return;var R=k.getContext("2d"),S=window.devicePixelRatio||1,D=k.parentElement.getBoundingClientRect(),I=44,C=50,A=20,q=D.width-40,ee=180,J=q-I-C,K=ee-A;k.width=q*S,k.height=ee*S,k.style.width=q+"px",k.style.height=ee+"px",R.setTransform(S,0,0,S,0,0);var U=document.body.classList.contains("dark-mode"),de="#8A857C",se=U?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.06)",ie=U?"#A7B2FF":"#3B4AD6",ce=U?"rgba(167,178,255,0.12)":"rgba(59,74,214,0.08)",be=U?"#F08A82":"#B42318",he=U?"rgba(240,138,130,0.08)":"rgba(180,35,24,0.06)",me=U?"#F5C842":"#B8860B",ae=e.metricsPoints||[];if(ae.length===0){R.fillStyle=de,R.font="12px monospace",R.textAlign="center",R.fillText("No metrics data yet",q/2,ee/2),b=null;return}var O=ae.map(function(M){return M.completed}),V=ae.map(function(M){return M.failed}),j=ae.map(function(M){return M.avgMs}),Z=ae.length,oe=J/(Z-1||1),Pe=Math.max(1,Math.max.apply(null,O),Math.max.apply(null,V)),Ue=g(Pe),$e=Math.max.apply(null,j),F=$e>0?g($e):{ticks:[0],niceMax:1},ne=function(M){return K-M/Ue.niceMax*(K-10)},L=function(M){return K-M/F.niceMax*(K-10)},W=function(M){return I+M*oe};R.textAlign="right",R.textBaseline="middle",R.font="10px monospace",Ue.ticks.forEach(function(M){var Y=ne(M);R.strokeStyle=se,R.lineWidth=1,R.beginPath(),R.moveTo(I,Y),R.lineTo(q-C,Y),R.stroke(),R.fillStyle=de,R.fillText(M>=1e3?(M/1e3).toFixed(1)+"k":String(M),I-6,Y)}),$e>0&&(R.textAlign="left",F.ticks.forEach(function(M){var Y=L(M);R.fillStyle=me,R.fillText(M>=1e3?(M/1e3).toFixed(1)+"s":M+"ms",q-C+6,Y)}));var fe=Date.now(),Ee=Math.min(6,Z);R.textAlign="center",R.textBaseline="top";for(var pe=0;pe<Ee;pe++){var w=Math.round(pe/(Ee-1)*(Z-1)),N=Math.round((fe-ae[w].ts)/6e4),P=W(w),z;N<=0?z="now":N<60?z=N+"m":N<1440?z=Math.round(N/60)+"h":z=Math.round(N/1440)+"d",R.fillStyle=de,R.fillText(z,P,K+4)}function G(M,Y,X,Q){M.length!==0&&(R.beginPath(),R.moveTo(W(0),K),M.forEach(function(B,ue){var te=W(ue),le=Y(B);if(ue===0)R.lineTo(te,le);else{var ve=(W(ue-1)+te)/2;R.bezierCurveTo(ve,Y(M[ue-1]),ve,le,te,le)}}),R.lineTo(W(M.length-1),K),R.closePath(),R.fillStyle=X,R.fill(),R.beginPath(),M.forEach(function(B,ue){var te=W(ue),le=Y(B);if(ue===0)R.moveTo(te,le);else{var ve=(W(ue-1)+te)/2;R.bezierCurveTo(ve,Y(M[ue-1]),ve,le,te,le)}}),R.strokeStyle=Q,R.lineWidth=1.5,R.stroke())}G(O,ne,ce,ie),G(V,ne,he,be),$e>0&&(R.beginPath(),j.forEach(function(M,Y){var X=W(Y),Q=L(M);if(Y===0)R.moveTo(X,Q);else{var B=(W(Y-1)+X)/2;R.bezierCurveTo(B,L(j[Y-1]),B,Q,X,Q)}}),R.strokeStyle=me,R.lineWidth=1,R.setLineDash([4,3]),R.stroke(),R.setLineDash([])),b={pts:ae,maxLen:Z,marginLeft:I,step:oe,totalW:q,toX:W}}var b=null;function _(){var k=document.getElementById("q-throughput-chart");if(!(!k||k._tipBound)){k._tipBound=!0;var R=document.getElementById("q-chart-tooltip"),S=document.getElementById("q-chart-crosshair");k.addEventListener("mousemove",function(D){if(!(!b||!R||!S)){var I=b,C=k.getBoundingClientRect(),A=D.clientX-C.left,q=Math.round((A-I.marginLeft)/I.step);if(q<0||q>=I.maxLen){R.style.display="none",S.style.display="none";return}var ee=I.pts[q],J=Date.now(),K=Math.round((J-ee.ts)/6e4),U;if(K<=0)U="now";else if(K<60)U=K+"m ago";else if(K<1440){var de=Math.floor(K/60),se=K%60;U=de+"h"+(se?" "+se+"m":"")+" ago"}else U=Math.round(K/1440)+"d ago";var ie='<div class="q-tip-time">'+U+'</div><div class="q-tip-completed">● completed: '+ee.completed+'/min</div><div class="q-tip-failed">● failed: '+ee.failed+"/min</div>";if(ee.avgMs>0){var ce=ee.avgMs>=1e3?(ee.avgMs/1e3).toFixed(1)+"s":ee.avgMs+"ms";ie+='<div class="q-tip-exec">● avg time: '+ce+"</div>"}R.innerHTML=ie;var be=I.toX(q),he=R.offsetWidth,me=be+10;me+he>I.totalW&&(me=be-he-10),R.style.display="block",R.style.left=me+"px",R.style.top="8px",S.style.display="block",S.style.left=be+"px"}}),k.addEventListener("mouseleave",function(){R&&(R.style.display="none"),S&&(S.style.display="none")})}}e.watch("metricsPoints",function(){n(_,50)})},Pa=function(e,t,o,r){let n=ft();e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null&&o.url("/"),e.entries=[],e.visible=[],e.available=!0,e.cap=1e3,e.total=0,e.pageSize=250,e.expanded={},e.detailTab={},e.copyHint="",e.parsedFilterCount=0,e.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},e.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},e.relTime=S=>{if(!S)return"";let D=new Date(S).getTime();if(isNaN(D))return S;let I=Math.max(0,Date.now()-D),C=Math.floor(I/1e3);if(C<5)return"just now";if(C<60)return`${C}s ago`;let A=Math.floor(C/60);if(A<60)return`${A}m ago`;let q=Math.floor(A/60);if(q<24)return`${q}h ago`;let ee=Math.floor(q/24);return ee<7?`${ee}d ago`:new Date(S).toLocaleDateString()},e.absTime=S=>{if(!S)return"";let D=new Date(S);return isNaN(D.getTime())?S:D.toLocaleString()},e.absTimeShort=S=>{if(!S)return"";let D=new Date(S);return isNaN(D.getTime())?S:D.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})};let i=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function a(S,D){let I=S&&(S.httpStatus||S.status)||null;if(typeof I=="number"){if(I>=500)return"error";if(I===401||I===403||I===404)return"info";if(I>=400)return"warn"}return D==="error"?"error":D==="warn"?"warn":"info"}function u(S){let D=(S.raw||[]).find(q=>q&&typeof q=="object"&&!Array.isArray(q));if(D){D.message&&i.test(D.message)?(S.displayMessage=D.message,S.displayContext=S.message):D.code&&i.test(String(D.code))?(S.displayMessage=String(D.code),S.displayContext=S.message):D.name&&D.name!=="AnonymousError"&&D.name!=="Error"?(S.displayMessage=D.name,S.displayContext=D.message||S.message):S.displayMessage=S.message,S._status=D.httpStatus||D.status||null,S._url=D.url||null,S._method=D.method||null,S._repoId=D.repoId||D.detail||null,S._detail=D.detail&&D.detail!==S._repoId?D.detail:null;let q=typeof D.stack=="string"?D.stack:null;for(var I=[D.cause,D.err].filter(Boolean),C=0;!q&&C<I.length;C++)for(var A=I[C];!q&&A&&typeof A=="object";)typeof A.stack=="string"&&(q=A.stack),A=A.cause;S._stack=q}else S.displayMessage=S.message,S._status=null,S._url=null,S._stack=null;return S._bucket=a(D,S.level),S._detailJson=p(S,D),S}function p(S,D){let I=[],C=(J,K)=>{K==null||K===""||I.push([J,K])};C("name",D&&D.name),C("code",S.displayMessage||D&&D.message),S._bucket&&C("kind",S._bucket),C("httpStatus",D&&D.httpStatus),D&&D.status&&!D.httpStatus&&C("status",D.status),C("module",S.module);let A=D&&D.detail;if(typeof A=="string"){let J=A.trim();if(J[0]==="{"||J[0]==="[")try{A=JSON.parse(A)}catch{}}if(C("detail",A),C("repoId",D&&D.repoId),C("filePath",D&&D.filePath),C("upstreamStatus",D&&D.upstreamStatus),C("upstreamBody",D&&D.upstreamBody),C("url",S._url),C("err",D&&D.err),C("cause",D&&!D.err&&D.cause),C("ts",S.ts),!I.length)return JSON.stringify(S,null,2);let q=I.reduce((J,K)=>Math.max(J,K[0].length),0),ee=["{"];return I.forEach(([J,K],U)=>{let se=` ${`"${J}":`.padEnd(q+3," ")} `,ie=U<I.length-1?",":"",ce;if(K&&typeof K=="object"){let be=" ".repeat(se.length);ce=JSON.stringify(K,null,2).split(`
|
||
`).map((he,me)=>me===0?he:be+he).join(`
|
||
`)}else typeof K=="number"||typeof K=="boolean"?ce=String(K):ce=JSON.stringify(K);ee.push(`${se}${ce}${ie}`)}),ee.push("}"),ee.join(`
|
||
`)}function h(S){let D=[],I="",C=/(\w+):(>=|<=|!=|>|<|=)?([^\s]+)/g,A=0,q;for(;q=C.exec(S);)I+=S.slice(A,q.index),A=C.lastIndex,D.push({key:q[1],op:q[2]||"=",val:q[3]});return I+=S.slice(A),{filters:D,free:I.trim().toLowerCase()}}function v(S,D){for(let I of D.filters){let C=(q,ee,J)=>{let K=parseFloat(q),U=parseFloat(ee);return J==="="?String(q)===String(ee):J==="!="?String(q)!==String(ee):J===">="?K>=U:J==="<="?K<=U:J===">"?K>U:J==="<"?K<U:!0},A;if(I.key==="code")A=S.displayMessage;else if(I.key==="module")A=S.module;else if(I.key==="status")A=S._status;else if(I.key==="url")A=S._url;else if(I.key==="repo")A=S._repoId;else if(I.key==="level")A=S.level;else continue;if(A==null||!C(A,I.val,I.op))return!1}return!(D.free&&((S.displayMessage||"")+" "+(S.module||"")+" "+(S._url||"")+" "+JSON.stringify(S.raw||[])).toLowerCase().indexOf(D.free)===-1)}function g(){let S=h(e.query.search||"");e.parsedFilterCount=S.filters.length;let D=e.query.bucket,I=e.entries.filter(A=>D&&A._bucket!==D?!1:v(A,S)),C=e.query.group;if(C){let A=J=>C==="module"?J.module:J.displayMessage||J.message||"_",q=new Map;for(let J of I){let K=A(J);if(q.has(K)){let U=q.get(K);U.count++,U._related.push(J),new Date(J.ts)>new Date(U.ts)&&(U.ts=J.ts,U._url=J._url,U._status=J._status),new Date(J.ts)<new Date(U._firstSeen)&&(U._firstSeen=J.ts)}else{let U=Object.assign({},J);U._key=`${C}:${K}`,U._related=[J],U._firstSeen=J.ts,U._lastHourCount=0,U.count=1,q.set(K,U)}}let ee=Date.now()-3600*1e3;for(let J of q.values())J._lastHourCount=J._related.filter(K=>new Date(K.ts).getTime()>=ee).length;I=Array.from(q.values())}else I=I.map((A,q)=>(A._key="row:"+q+":"+A.ts,A._related=[A],A._firstSeen=A.ts,A._lastHourCount=0,A.count=1,A));e.query.sort==="count"?I.sort((A,q)=>q.count-A.count||new Date(q.ts)-new Date(A.ts)):I.sort((A,q)=>new Date(q.ts)-new Date(A.ts)),e.visible=I}function f(S){let D=S?e.entries.length:0,I=S?e.pageSize:Math.max(e.pageSize,e.entries.length||e.pageSize);t.get("/api/admin/errors",{params:{offset:D,limit:I}}).then(C=>{let A=(C.data.entries||[]).map(u);e.entries=S?e.entries.concat(A):A,e.available=!!C.data.available,e.cap=C.data.max||e.cap,e.total=C.data.total||e.entries.length,g()},C=>console.error(C))}e.loadMore=()=>f(!0),e.canLoadMore=()=>e.entries.length<e.total;function b(){t.get("/api/admin/errors/stats").then(S=>{let D=S.data||{},I=D.prev24h?Math.round((D.last24h-D.prev24h)/D.prev24h*100):0;e.stats={last24h:D.last24h||0,prev24h:D.prev24h||0,delta:I,severity:D.severity||{error:0,warn:0,info:0},unique:D.unique||{error:0,warn:0,info:0},buckets:D.buckets||[],dropped:D.dropped||0}},S=>console.error(S))}function _(){f(),b()}e.barPx=(S,D)=>{let I=e.stats.buckets||[],C=0;for(let J of I)C=Math.max(C,(J.error||0)+(J.warn||0)+(J.info||0));if(!C)return 0;let A=(S.error||0)+(S.warn||0)+(S.info||0);if(!A)return 0;let q=Math.round(A/C*60),ee=S[D]||0;return Math.round(ee/A*q)},e.bucketTitle=S=>`${new Date(S.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} \xB7 ${S.error||0} err \xB7 ${S.warn||0} warn \xB7 ${S.info||0} info`,e.toggle=S=>{e.expanded[S._key]=!e.expanded[S._key]},e.setBucket=S=>{e.query.bucket=S},e.refreshNow=_,e.clearAll=()=>{confirm("Clear all captured errors?")&&t.delete("/api/admin/errors").then(_,S=>console.error(S))},e.exportCsv=()=>{let S=["ts","level","module","displayMessage","_status","_url","_repoId"],D=[S.join(",")];for(let q of e.visible)D.push(S.map(ee=>{let J=q[ee]==null?"":String(q[ee]);return/[",\n]/.test(J)?`"${J.replace(/"/g,'""')}"`:J}).join(","));let I=new Blob([D.join(`
|
||
`)],{type:"text/csv;charset=utf-8"}),C=URL.createObjectURL(I),A=document.createElement("a");A.href=C,A.download=`errors-${new Date().toISOString().slice(0,19)}.csv`,document.body.appendChild(A),A.click(),document.body.removeChild(A),URL.revokeObjectURL(C)};function k(S){e.copyHint=`${S} copied`,n.timeout(()=>{e.copyHint=""},1500)}e.copyJson=S=>{navigator.clipboard.writeText(S._detailJson).then(()=>k("JSON"))},e.copyCurl=S=>{if(!S._url)return;let I=`curl -X ${S._method||"GET"} '${window.location.origin}${S._url}'`;navigator.clipboard.writeText(I).then(()=>k("curl"))},_();let R=r(()=>{e.query.autoRefresh&&_()},15e3);e.on("dispose",()=>r.cancel(R)),e.watch("query.search",g),e.watch("query.bucket",g),e.watch("query.sort",g),e.watch("query.group",g)},qa=function(e,t,o,r){if(e.Math=Math,e.watch("user.status",()=>{e.user==null&&o.url("/")}),e.user==null){o.url("/");return}e.data=null,e.loading=!0,e.error=null;function n(f){if(f==null)return"\u2014";for(var b=["B","KB","MB","GB","TB"],_=0,k=f;k>=1024&&_<b.length-1;)k/=1024,_++;return k.toFixed(_>0?1:0)+" "+b[_]}e.humanBytes=n;function i(f){if(!f)return"\u2014";var b=Math.floor(f/86400),_=Math.floor(f%86400/3600),k=Math.floor(f%3600/60);return b>0?b+"d "+(_<10?"0":"")+_+"h":_>0?_+"h "+(k<10?"0":"")+k+"m":k+"m"}e.humanDuration=i;function a(f){return f==null?"\u2014":f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(1)+"K":String(f)}e.humanNum=a,e.queueTotal=function(f){return f?(f.waiting||0)+(f.active||0)+(f.delayed||0)+(f.failed||0):0},e.statusCount=function(f){if(!e.data||!e.data.repos)return 0;for(var b=e.data.repos.statusBreakdown||[],_=0;_<b.length;_++)if(b[_]._id===f)return b[_].count;return 0},e.barPct=function(f){var b=e.data&&e.data.repos?e.data.repos.total:0;if(!b)return 0;var _=[f];f==="expired"&&_.push("expiring"),f==="removed"&&_.push("removing"),f==="preparing"&&_.push("download");var k=0;return _.forEach(function(R){k+=e.statusCount(R)}),Math.max(.4,k/b*100)},e.errPct=function(f){if(!e.data||!e.data.errors)return 0;var b=Math.max(e.data.errors.severity.error,e.data.errors.severity.warn,e.data.errors.severity.info,1);return e.data.errors.severity[f]/b*100};function u(f){var b=f||[];return b.map(function(_,k){var R=b[k-1]||{},S=Object.assign({},_);return S.dailyRepositories=k?Math.max(0,(_.nbRepositories||0)-(R.nbRepositories||0)):0,S.dailyUsers=k?Math.max(0,(_.nbUsers||0)-(R.nbUsers||0)):0,S.dailyPageViews=k?Math.max(0,(_.nbPageViews||0)-(R.nbPageViews||0)):0,S})}function p(f){var b=f&&f.length?f[f.length-1]:{};return{repositories:b.dailyRepositories||0,users:b.dailyUsers||0,pageViews:b.dailyPageViews||0}}var h={};e.historyBarH=function(f,b){return!f||!h[b]?0:Math.max(1,Math.round(f[b]/h[b]*140))},e.historyLabel=function(f){if(!f||!f.date)return"";var b=new Date(f.date);return b.getUTCMonth()+1+"/"+b.getUTCDate()};function v(){t.get("/api/admin/overview").then(function(f){f.data.history=u(f.data.history),f.data.daily={today:p(f.data.history)},e.data=f.data,e.loading=!1,e.error=null,h={},(f.data.history||[]).forEach(function(b){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(_){(!h[_]||b[_]>h[_])&&(h[_]=b[_])})})},function(f){e.loading=!1,e.error=f.data&&f.data.error||"Failed to load overview"})}v();var g=r(v,3e4);e.on("dispose",function(){r.cancel(g)})};var Ma=[{path:"/",template:"partials/home.htm",title:"Anonymous GitHub \u2013 Share the code, not the author",preserveExplorer:!1,setup:(e,t)=>_a(e,t.http,t.location,t.window,t.timeout)},{path:"/dashboard",template:"partials/dashboard.htm",title:"Your anonymizations \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ea(e,t.http,t.location,t.promises,t.window,t.quotaService)},{path:"/pr-dashboard",redirect:"/dashboard"},{path:"/anonymize/:repoId?",template:"partials/anonymize.htm",title:"New anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/pull-request-anonymize/:pullRequestId?",template:"partials/anonymize.htm",title:"Anonymize a pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/gist-anonymize/:gistId?",template:"partials/anonymize.htm",title:"Anonymize a gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Bn(e,t.http,t.html,t.params,t.location,t.translate,t.timeout)},{path:"/status/:repoId",template:"partials/status.htm",title:"Repository status \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ca(e,t.http,t.params)},{path:"/conferences",template:"partials/conferences.htm",title:"Your conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Da(e,t.http,t.location)},{path:"/conference/new",template:"partials/newConference.htm",title:"New conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Go(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId/edit",template:"partials/newConference.htm",title:"Edit conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Go(e,t.http,t.location,t.params)},{path:"/conference/:conferenceId",template:"partials/conference.htm",title:"Conference \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ra(e,t.http,t.location,t.params)},{path:"/faq",template:"partials/faq.htm",title:"FAQ \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ba(e,t.http)},{path:"/profile",template:"partials/profile.htm",title:"Your settings \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>wa(e,t.http,t.translate,t.timeout,t.quotaService)},{path:"/claim",template:"partials/claim.htm",title:"Claim an anonymization \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>ka(e,t.http,t.location)},{path:"/pr/:pullRequestId/:path(.*)*",template:"partials/pullRequest.htm",title:"Anonymous pull request \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Na(e,t.http,t.location,t.params,t.html)},{path:"/gist/:gistId/:path(.*)*",template:"partials/gist.htm",title:"Anonymous gist \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Sa(e,t.http,t.location,t.params,t.html)},{path:"/r/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Bo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/repository/:repoId/:path(.*)*",template:"partials/explorer.htm",title:"Anonymous repository \u2013 Anonymous GitHub",preserveExplorer:!0,setup:(e,t)=>Bo(e,t.http,t.location,t.params,t.html,t.promises)},{path:"/admin/",template:"partials/admin/overview.htm",title:"Admin \xB7 Overview \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>qa(e,t.http,t.location,t.interval)},{path:"/admin/repositories",template:"partials/admin/repositories.htm",title:"Admin \xB7 Repositories \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ta(e,t.http,t.location)},{path:"/admin/users",template:"partials/admin/users.htm",title:"Admin \xB7 Users \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Oa(e,t.http,t.location)},{path:"/admin/users/:username",template:"partials/admin/user.htm",title:"Admin \xB7 User details \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Aa(e,t.http,t.location,t.params)},{path:"/admin/conferences",template:"partials/admin/conferences.htm",title:"Admin \xB7 Conferences \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Ia(e,t.http,t.location)},{path:"/admin/queues",template:"partials/admin/queues.htm",title:"Admin \xB7 Queues \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Va(e,t.http,t.location,t.interval,t.timeout)},{path:"/admin/errors",template:"partials/admin/errors.htm",title:"Admin \xB7 Errors \u2013 Anonymous GitHub",preserveExplorer:!1,setup:(e,t)=>Pa(e,t.http,t.location,t.interval)},{path:"/404",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",preserveExplorer:!1,setup:()=>{}},{path:"/:pathMatch(.*)*",template:"partials/404.htm",title:"Page not found \u2013 Anonymous GitHub",setup:()=>{}}];var Rc={class:"paper-empty"};function $a(e,t){return l(),d("div",Rc,[...t[0]||(t[0]=[_e('<div class="paper-empty-inner"><div class="paper-eyebrow">Error \xB7 404</div><h1 class="paper-empty-title"> This link<br><em>isn\u2019t here.</em></h1><p class="paper-empty-lede"> The anonymous mirror you\u2019re looking for has expired, been removed by its owner, or never existed. If you received this URL from an author, ask them to re-issue it. </p><div class="paper-empty-cta"><a href="/" class="btn-hero">Back to home</a><a href="/faq" class="btn-hero-ghost">Read the FAQ</a></div></div>',1)])])}var Tc={class:"container paper-page admin-page"},Oc={class:"admin-summary"},Ac={class:"summary-total"},Ic={class:"count"},Vc={class:"count"},Pc={class:"count"},qc={class:"count"},Mc={class:"count"},$c={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},Fc={class:"w-100 admin-filter-toolbar","aria-label":"Conferences","accept-charset":"UTF-8"},Lc={class:"admin-filter-row"},Uc={class:"search-wrap"},zc={type:"search",class:"form-control",placeholder:"Search conferences\u2026",autocomplete:"off"},Hc={key:0,class:"admin-search-hint"},Bc={class:"admin-filter-inline","aria-label":"Pagination"},Gc=["disabled"],jc={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},Wc=["disabled"],Kc={key:0,class:"admin-filter-row"},Yc={class:"admin-active-chips"},xc={class:"key"},Jc=["onClick"],Qc={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},Xc={class:"paper-table-head",role:"row"},Zc={role:"columnheader"},ep={role:"columnheader"},tp={role:"columnheader"},sp={class:"paper-table-row",role:"row"},np={class:"cell-anon",role:"cell"},op={class:"anon-text"},rp=["textContent","href"],ip={class:"anon-sub"},ap={class:"cell-status",role:"cell"},lp=["textContent"],dp={class:"cell-views num",role:"cell"},up=["textContent","href"],cp={class:"cell-expires",role:"cell"},pp={class:"cell-actions",role:"cell"},fp={class:"dropdown"},mp={class:"dropdown-menu dropdown-menu-right"},hp=["href"],vp=["href"],yp=["href"],gp=["onClick"],bp={key:0,class:"paper-table-empty"},wp={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},kp={style:{"font-size":"12px",color:"var(--ink-muted)"}},_p={key:0,class:"pagination-compact"},Ep=["disabled"],Cp=["max"],Np=["disabled"],Sp={class:"admin-filter-inline"},Dp={class:"form-control form-control-sm"};function Fa(e,t){let o=ye("field"),r=ye("form");return l(),d("div",Tc,[t[42]||(t[42]=_e('<div class="paper-crumbs">Admin \xA0/\xA0 <span class="here">Conferences</span></div><h1 class="paper-page-title">Conferences</h1><nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences" class="active"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',3)),s("div",Oc,[s("span",Ac,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:T(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[13]||(t[13]=y("Ready ",-1)),s("span",Ic,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:T(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[14]||(t[14]=y("Preparing ",-1)),s("span",Vc,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:T(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[15]||(t[15]=y("Errored ",-1)),s("span",Pc,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:T(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[16]||(t[16]=y("Expired ",-1)),s("span",qc,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:T(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[17]||(t[17]=y("Removed ",-1)),s("span",Mc,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",$c,[t[18]||(t[18]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):m("v-if",!0),E((l(),d("form",Fc,[s("div",Lc,[s("div",Uc,[E(s("input",zc,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?m("v-if",!0):(l(),d("span",Hc,"/"))]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",Bc,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,Gc),s("span",jc,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Wc)])]),e.chips?.length?(l(),d("div",Kc,[s("div",Yc,[(l(!0),d(x,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",xc,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Jc)]))),128))])])):m("v-if",!0)])),[[r,e.viewState]]),s("div",Qc,[s("div",Xc,[s("div",Zc,[s("span",{class:T(["sortable",{active:e.query?.sort=="name"}]),onClick:t[8]||(t[8]=n=>e.sortBy("name"))},[t[24]||(t[24]=y("Conference ",-1)),s("i",{class:T(["fas",e.sortIcon("name")])},null,2)],2)]),s("div",ep,[s("span",{class:T(["sortable",{active:e.query?.sort=="status"}]),onClick:t[9]||(t[9]=n=>e.sortBy("status"))},[t[25]||(t[25]=y("Status ",-1)),s("i",{class:T(["fas",e.sortIcon("status")])},null,2)],2)]),t[27]||(t[27]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",tp,[s("span",{class:T(["sortable",{active:e.query?.sort=="startDate"}]),onClick:t[10]||(t[10]=n=>e.sortBy("startDate"))},[t[26]||(t[26]=y("Window ",-1)),s("i",{class:T(["fas",e.sortIcon("startDate")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(x,null,re(e.filteredConferences,(n,i)=>(l(),d("div",sp,[s("div",np,[t[30]||(t[30]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",op,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,rp),s("div",ip,[s("span",null,c(n?.conferenceID),1),t[29]||(t[29]=y("\xA0\xB7\xA0",-1)),s("span",null,c(e.fmt?.number(n?.price||0))+" \u20AC",1)])])]),s("div",ap,[s("span",{class:T(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,lp)]),s("div",dp,[s("a",{title:"Show repositories in this conference",textContent:c(e.fmt?.number(n?.repositories?.length||0)),href:e.safeUrl("/admin/?conference="+n?.conferenceID)},null,8,up)]),s("div",cp,c(e.fmt?.date(n?.startDate))+" \u2013 "+c(e.fmt?.date(n?.endDate)),1),s("div",pp,[s("div",fp,[t[36]||(t[36]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",mp,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[31]||(t[31]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,hp),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[32]||(t[32]=[s("i",{class:"fa fa-eye"},null,-1),y(" View",-1)])],8,vp),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?conference="+n?.conferenceID)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,yp),t[35]||(t[35]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:ge(a=>e.removeConference(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,gp),[[H,n?.status!="removed"]])])])])]))),256)),e.filteredConferences?.length==0?(l(),d("div",bp,[...t[37]||(t[37]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No conferences match the current filters.",-1)])])):m("v-if",!0)]),s("div",wp,[s("span",kp,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",_p,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[38]||(t[38]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,Ep),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,Cp),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[39]||(t[39]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,Np)])):m("v-if",!0),s("span",Sp,[t[41]||(t[41]=s("label",null,"Per page",-1)),E((l(),d("select",Dp,[...t[40]||(t[40]=[_e('<option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option><option value="250">250</option>',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var Rp={class:"container paper-page admin-page errors-page"},Tp={class:"errors-header"},Op={class:"errors-actions"},Ap={class:"kpi-grid"},Ip={class:"kpi-card"},Vp={class:"kpi-value"},Pp={key:0},qp={key:1},Mp={class:"kpi-card kpi-error"},$p={class:"kpi-value"},Fp={class:"kpi-sub"},Lp={class:"kpi-card kpi-warn"},Up={class:"kpi-value"},zp={class:"kpi-sub"},Hp={class:"kpi-card kpi-info"},Bp={class:"kpi-value"},Gp={class:"kpi-sub"},jp={class:"kpi-value"},Wp={class:"kpi-sub"},Kp={key:0,class:"dropped-warn"},Yp={class:"volume-chart"},xp={class:"volume-bars"},Jp=["title"],Qp={class:"errors-toolbar","aria-label":"Error filters"},Xp={class:"seg-tabs"},Zp={class:"search-wrap"},ef={type:"search",class:"form-control",placeholder:"code:repo_not_found module:route status:>=400",autocomplete:"off"},tf={key:0,class:"filter-count"},sf={class:"select-wrap"},nf={class:"form-control form-control-sm"},of={class:"select-wrap"},rf={class:"form-control form-control-sm"},af={class:"autoref"},lf={type:"checkbox"},df={key:0,class:"admin-empty"},uf={key:1,class:"errors-pager"},cf={key:2,class:"errors-list"},pf=["onClick"],ff={class:"col-when"},mf={class:"when-rel"},hf={class:"when-abs"},vf={class:"col-sev"},yf={class:"sev-label"},gf={class:"col-mod"},bf={class:"pill pill-module"},wf={class:"col-msg"},kf={class:"msg-code"},_f={key:0,class:"msg-context"},Ef={key:1,class:"msg-detail"},Cf={key:2,class:"msg-url"},Nf={class:"col-count"},Sf={key:0,class:"count-pill"},Df={key:1,class:"count-pill count-pill-muted"},Rf={class:"col-status"},Tf={key:0,class:"errors-row-detail"},Of={class:"detail-tabs"},Af=["onClick"],If=["onClick"],Vf=["onClick"],Pf={class:"detail-body"},qf={class:"detail-main"},Mf={key:0},$f={key:1,class:"stack-pre"},Ff={key:2,class:"related-list"},Lf={class:"when-abs"},Uf={class:"msg-url"},zf={class:"detail-actions"},Hf=["onClick"],Bf=["onClick"],Gf={key:0,class:"copy-hint"},jf={class:"detail-aside"},Wf={class:"aside-block"},Kf=["title"],Yf={class:"aside-block"},xf=["title"],Jf={class:"aside-block"},Qf={class:"aside-value"},Xf={key:0,class:"aside-sub"},Zf={key:0,class:"aside-block"},em=["href"],tm={key:1,class:"aside-block"},sm={class:"aside-value mono"};function La(e,t){let o=ye("field"),r=ye("form");return l(),d("div",Rp,[t[32]||(t[32]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Errors")],-1)),s("header",Tp,[t[10]||(t[10]=s("h1",{class:"paper-page-title"},"Errors",-1)),s("div",Op,[s("button",{class:"btn btn-sm",type:"button",onClick:t[0]||(t[0]=n=>e.exportCsv())},[...t[8]||(t[8]=[s("i",{class:"fas fa-file-export"},null,-1),y(" Export CSV",-1)])]),s("button",{class:"btn btn-sm btn-danger",type:"button",onClick:t[1]||(t[1]=n=>e.clearAll())},[...t[9]||(t[9]=[s("i",{class:"fas fa-trash"},null,-1),y(" Clear all",-1)])])])]),t[33]||(t[33]=_e('<nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors" class="active"><i class="fas fa-bug"></i> Errors</a></nav>',1)),s("section",Ap,[s("div",Ip,[t[11]||(t[11]=s("div",{class:"kpi-label"},"Last 24h",-1)),s("div",Vp,c(e.stats?.last24h),1),s("div",{class:T(["kpi-sub",{up:e.stats?.delta>0,down:e.stats?.delta<0}])},[e.stats?.prev24h?(l(),d("span",Pp,c(e.stats?.delta>0?"+":"")+c(e.stats?.delta)+"% vs yesterday",1)):m("v-if",!0),e.stats?.prev24h?m("v-if",!0):(l(),d("span",qp,"no prior baseline"))],2)]),s("div",Mp,[t[12]||(t[12]=s("div",{class:"kpi-label"},"Errors (5xx)",-1)),s("div",$p,c(e.stats?.severity?.error),1),s("div",Fp,c(e.stats?.unique?.error)+" unique",1)]),s("div",Lp,[t[13]||(t[13]=s("div",{class:"kpi-label"},"Warnings (4xx)",-1)),s("div",Up,c(e.stats?.severity?.warn),1),s("div",zp,c(e.stats?.unique?.warn)+" unique",1)]),s("div",Hp,[t[14]||(t[14]=s("div",{class:"kpi-label"},"Info (auth, 404)",-1)),s("div",Bp,c(e.stats?.severity?.info),1),s("div",Gp,c(e.stats?.unique?.info)+" unique",1)]),s("div",{class:T(["kpi-card",{"kpi-error":e.stats?.dropped>0}])},[t[15]||(t[15]=s("div",{class:"kpi-label"},"Captured",-1)),s("div",jp,c(e.total),1),s("div",Wp,[y(" cap "+c(e.cap)+" \xB7 "+c(e.available?"live":"redis off")+" ",1),e.stats?.dropped>0?(l(),d("span",Kp," \xB7 "+c(e.stats?.dropped)+" dropped",1)):m("v-if",!0)])],2)]),s("section",Yp,[t[16]||(t[16]=_e('<div class="volume-head"><span class="volume-title">Volume \xB7 24h \xB7 1h buckets</span><span class="volume-legend"><span class="dot dot-error"></span>error <span class="dot dot-warn"></span>warn <span class="dot dot-info"></span>info </span></div>',1)),s("div",xp,[(l(!0),d(x,null,re(e.stats?.buckets,(n,i)=>(l(),d("div",{class:"volume-bar",key:i,title:e.bucketTitle(n)},[s("span",{class:"seg seg-error",style:Oe({height:e.barPx(n,"error")+"px"})},null,4),s("span",{class:"seg seg-warn",style:Oe({height:e.barPx(n,"warn")+"px"})},null,4),s("span",{class:"seg seg-info",style:Oe({height:e.barPx(n,"info")+"px"})},null,4)],8,Jp))),128))])]),E((l(),d("form",Qp,[s("div",Xp,[s("button",{type:"button",class:T({active:e.query?.bucket===""}),onClick:t[2]||(t[2]=n=>e.setBucket(""))},"All",2),s("button",{type:"button",class:T({active:e.query?.bucket==="error"}),onClick:t[3]||(t[3]=n=>e.setBucket("error"))},"5xx",2),s("button",{type:"button",class:T({active:e.query?.bucket==="warn"}),onClick:t[4]||(t[4]=n=>e.setBucket("warn"))},"4xx",2),s("button",{type:"button",class:T({active:e.query?.bucket==="info"}),onClick:t[5]||(t[5]=n=>e.setBucket("info"))},"Info",2)]),s("div",Zp,[t[17]||(t[17]=s("i",{class:"fas fa-search search-icon"},null,-1)),E(s("input",ef,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.parsedFilterCount?(l(),d("span",tf,c(e.parsedFilterCount)+" filter"+c(e.parsedFilterCount>1?"s":""),1)):m("v-if",!0)]),s("div",sf,[t[19]||(t[19]=s("label",null,"Sort",-1)),E((l(),d("select",nf,[...t[18]||(t[18]=[s("option",{value:"recent"},"Most recent",-1),s("option",{value:"count"},"Most frequent",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.sort=n},value:e.query?.sort,form:null,options:{}}]])]),s("div",of,[t[21]||(t[21]=s("label",null,"Group",-1)),E((l(),d("select",rf,[...t[20]||(t[20]=[s("option",{value:""},"Off",-1),s("option",{value:"code"},"By code",-1),s("option",{value:"module"},"By module",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.group=n},value:e.query?.group,form:null,options:{}}]])]),s("label",af,[E(s("input",lf,null,512),[[o,{state:e.viewState,set:n=>{e.query.autoRefresh=n},value:e.query?.autoRefresh,form:null,options:{}}]]),t[22]||(t[22]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm btn-icon",type:"button",title:"Refresh now",onClick:t[6]||(t[6]=n=>e.refreshNow())},[...t[23]||(t[23]=[s("i",{class:"fas fa-sync"},null,-1)])])])),[[r,e.viewState]]),e.visible?.length?m("v-if",!0):(l(),d("div",df,"No errors captured.")),e.canLoadMore()&&e.visible?.length?(l(),d("div",uf,[s("span",null,"Showing "+c(e.entries?.length)+" of "+c(e.total)+" captured",1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.loadMore())},"Load older")])):m("v-if",!0),e.visible?.length?(l(),d("div",cf,[t[31]||(t[31]=_e('<div class="errors-list-head"><span class="col-when">When</span><span class="col-sev">Severity</span><span class="col-mod">Module</span><span class="col-msg">Message</span><span class="col-count">Count</span><span class="col-status">Status</span></div>',1)),(l(!0),d(x,null,re(e.visible,(n,i)=>(l(),d("div",{class:T(["errors-row",{open:e.expanded[n?._key]}]),key:n?._key},[s("div",{class:"errors-row-main",onClick:a=>e.toggle(n)},[s("div",ff,[s("div",mf,c(e.relTime(n?.ts)),1),s("div",hf,c(e.absTimeShort(n?.ts)),1)]),s("div",vf,[s("span",{class:T(["sev-dot","sev-"+n?._bucket])},null,2),s("span",yf,c(e.fmt?.uppercase(n?._bucket)),1)]),s("div",gf,[s("span",bf,c(n?.module),1)]),s("div",wf,[s("strong",kf,c(n?.displayMessage),1),n?.displayContext&&n?.displayContext!==n?.displayMessage?(l(),d("span",_f,c(n?.displayContext),1)):m("v-if",!0),n?._detail?(l(),d("span",Ef,c(n?._detail),1)):m("v-if",!0),n?._url?(l(),d("div",Cf,c(n?._url),1)):m("v-if",!0)]),s("div",Nf,[n?.count>1?(l(),d("span",Sf,"\xD7"+c(n?.count),1)):m("v-if",!0),n?.count===1?(l(),d("span",Df,"\xD71")):m("v-if",!0)]),s("div",Rf,[n?._status?(l(),d("span",{key:0,class:T(["status-pill","status-"+n?._bucket])},c(n?._status),3)):m("v-if",!0)])],8,pf),e.expanded[n?._key]?(l(),d("div",Tf,[s("div",Of,[s("button",{type:"button",class:T({active:e.detailTab[n?._key]==="raw"||!e.detailTab[n?._key]}),onClick:a=>e.detailTab[n._key]="raw"},"Raw",10,Af),n?._stack?(l(),d("button",{key:0,type:"button",class:T({active:e.detailTab[n?._key]==="stack"}),onClick:a=>e.detailTab[n._key]="stack"},"Stack",10,If)):m("v-if",!0),n?.count>1?(l(),d("button",{key:1,type:"button",class:T({active:e.detailTab[n?._key]==="related"}),onClick:a=>e.detailTab[n._key]="related"},"Related ("+c(n?.count)+")",11,Vf)):m("v-if",!0)]),s("div",Pf,[s("div",qf,[(e.detailTab[n?._key]||"raw")==="raw"?(l(),d("pre",Mf,c(n?._detailJson),1)):m("v-if",!0),e.detailTab[n?._key]==="stack"?(l(),d("pre",$f,c(n?._stack),1)):m("v-if",!0),e.detailTab[n?._key]==="related"?(l(),d("div",Ff,[(l(!0),d(x,null,re(n?._related,(a,u)=>(l(),d("div",{class:"related-row",key:u},[s("span",Lf,c(e.absTimeShort(a?.ts)),1),s("span",Uf,c(a?._url),1),a?._status?(l(),d("span",{key:0,class:T(["status-pill","status-"+a?._bucket])},c(a?._status),3)):m("v-if",!0)]))),128))])):m("v-if",!0),s("div",zf,[s("button",{class:"btn btn-sm",type:"button",title:"Copy a curl that reproduces the request",onClick:a=>e.copyCurl(n)},[...t[24]||(t[24]=[s("i",{class:"fas fa-terminal"},null,-1),y(" Copy curl",-1)])],8,Hf),s("button",{class:"btn btn-sm",type:"button",onClick:a=>e.copyJson(n)},[...t[25]||(t[25]=[s("i",{class:"fas fa-clipboard"},null,-1),y(" Copy JSON",-1)])],8,Bf),e.copyHint?(l(),d("span",Gf,c(e.copyHint),1)):m("v-if",!0)])]),s("aside",jf,[s("div",Wf,[t[26]||(t[26]=s("div",{class:"aside-label"},"First seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?._firstSeen)},c(e.relTime(n?._firstSeen)),9,Kf)]),s("div",Yf,[t[27]||(t[27]=s("div",{class:"aside-label"},"Last seen",-1)),s("div",{class:"aside-value",title:e.absTime(n?.ts)},c(e.relTime(n?.ts)),9,xf)]),s("div",Jf,[t[28]||(t[28]=s("div",{class:"aside-label"},"Occurrences",-1)),s("div",Qf,[y(c(n?.count),1),n?._lastHourCount?(l(),d("span",Xf," \xB7 "+c(n?._lastHourCount)+" this hour",1)):m("v-if",!0)])]),n?._repoId?(l(),d("div",Zf,[t[29]||(t[29]=s("div",{class:"aside-label"},"Repository",-1)),s("a",{class:"aside-value",href:e.safeUrl("/r/"+n?._repoId)},c(n?._repoId),9,em)])):m("v-if",!0),n?._url?(l(),d("div",tm,[t[30]||(t[30]=s("div",{class:"aside-label"},"URL",-1)),s("div",sm,c(n?._url),1)])):m("v-if",!0)])])])):m("v-if",!0)],2))),128))])):m("v-if",!0)])}var nm={class:"container paper-page admin-page overview-page"},om={key:0,class:"admin-empty"},rm={key:1,class:"alert alert-danger",style:{margin:"12px 0"}},im={key:2},am={class:"ov-kpi-row"},lm={class:"ov-kpi-card"},dm={class:"ov-kpi-value"},um={class:"ov-kpi-sub"},cm={class:"ov-kpi-card"},pm={class:"ov-kpi-sub"},fm={class:"ov-kpi-card"},mm={class:"ov-kpi-sub"},hm={class:"ov-kpi-card"},vm={class:"ov-kpi-sub"},ym={class:"ov-kpi-card"},gm={class:"ov-kpi-value"},bm={class:"ov-kpi-sub"},wm={class:"ov-daily-row"},km={class:"ov-daily-card"},_m={class:"ov-daily-value"},Em={class:"ov-daily-card"},Cm={class:"ov-daily-value"},Nm={class:"ov-daily-sub"},Sm={class:"ov-daily-card"},Dm={class:"ov-daily-value"},Rm={class:"ov-chart-row"},Tm={class:"ov-chart-card"},Om={key:0,class:"ov-spark-bars"},Am=["data-tip","aria-label"],Im={key:1,class:"ov-spark-x"},Vm={class:"ov-chart-card"},Pm={key:0,class:"ov-spark-bars"},qm=["data-tip","aria-label"],Mm={key:1,class:"ov-spark-x"},$m={class:"ov-chart-card"},Fm={key:0,class:"ov-spark-bars"},Lm=["data-tip","aria-label"],Um={key:1,class:"ov-spark-x"},zm={class:"ov-chart-card"},Hm={key:0,class:"ov-spark-bars"},Bm=["data-tip","aria-label"],Gm={key:1,class:"ov-spark-x"},jm={class:"ov-triple-row"},Wm={class:"ov-panel-card"},Km={class:"ov-panel-head"},Ym={class:"ov-panel-meta"},xm={class:"ov-stacked-bar"},Jm={class:"ov-bar-legend"},Qm={href:"/admin/repositories",class:"ov-legend-item"},Xm={class:"ov-legend-n"},Zm={href:"/admin/repositories",class:"ov-legend-item"},eh={class:"ov-legend-n"},th={href:"/admin/repositories",class:"ov-legend-item"},sh={class:"ov-legend-n"},nh={href:"/admin/repositories",class:"ov-legend-item"},oh={class:"ov-legend-n"},rh={href:"/admin/repositories",class:"ov-legend-item"},ih={class:"ov-legend-n"},ah={class:"ov-panel-card"},lh={class:"ov-panel-head"},dh={class:"ov-panel-meta"},uh={class:"ov-error-bars"},ch={class:"ov-ebar-row"},ph={class:"ov-ebar-track"},fh={class:"ov-ebar-n"},mh={class:"ov-ebar-row"},hh={class:"ov-ebar-track"},vh={class:"ov-ebar-n"},yh={class:"ov-ebar-row"},gh={class:"ov-ebar-track"},bh={class:"ov-ebar-n"},wh={key:0,class:"ov-panel-foot"},kh={href:"/admin/errors"},_h={class:"ov-panel-card"},Eh={class:"ov-routes-table"},Ch={class:"ov-route-row",href:"/admin/queues"},Nh={class:"ov-route-n"},Sh={class:"ov-route-n"},Dh={class:"ov-route-row",href:"/admin/queues"},Rh={class:"ov-route-n"},Th={class:"ov-route-n"},Oh={class:"ov-route-row",href:"/admin/queues"},Ah={class:"ov-route-n"},Ih={class:"ov-route-n"},Vh={class:"ov-services-card"},Ph={class:"ov-services-head"},qh={class:"ov-panel-meta"},Mh={class:"ov-services-grid"},$h={class:"ov-svc"},Fh={class:"ov-svc-info"},Lh={class:"ov-svc-meta"},Uh={class:"ov-svc-detail"},zh={class:"ov-svc"},Hh={class:"ov-svc-info"},Bh={key:0,class:"ov-svc-meta"},Gh={key:1,class:"ov-svc-meta"},jh={class:"ov-svc"},Wh={class:"ov-svc-info"},Kh={key:0,class:"ov-svc-meta"},Yh={key:1,class:"ov-svc-meta"},xh={class:"ov-svc"},Jh={class:"ov-svc-info"},Qh={key:0,class:"ov-svc-meta"},Xh={key:1,class:"ov-svc-meta"},Zh={class:"ov-svc"},ev={class:"ov-svc-info"},tv={class:"ov-svc-meta"};function Ua(e,t){return l(),d("div",nm,[t[42]||(t[42]=_e('<div class="paper-crumbs">Admin \xB7 System Health</div><div class="ov-header"><h1 class="paper-page-title">Overview</h1></div><nav class="admin-nav"><a href="/admin/" class="active"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',3)),e.loading?(l(),d("div",om,"Loading overview\u2026")):m("v-if",!0),e.error?(l(),d("div",rm,[t[0]||(t[0]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.error),1)])):m("v-if",!0),e.data?(l(),d("div",im,[m(" \u2500\u2500 Top KPI row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",am,[s("div",lm,[t[1]||(t[1]=s("div",{class:"ov-kpi-label"},[y("Repositories "),s("span",{class:"ov-dot ov-dot-ok"})],-1)),s("div",dm,c(e.humanNum(e.data?.repos?.total)),1),s("div",um,"+"+c(e.data?.repos?.newRepos24h)+" \xB7 last 24h",1)]),s("div",cm,[t[2]||(t[2]=s("div",{class:"ov-kpi-label"},"CPU",-1)),s("div",{class:T(["ov-kpi-value",{"ov-val-warn":e.data?.system?.cpuPercent>80}])},c(e.data?.system?.cpuPercent)+"%",3),s("div",pm,c(e.data?.system?.cpuCount)+" cores \xB7 load "+c(e.data?.system?.loadAvg?.[0]?.toFixed(1)),1)]),s("div",fm,[t[3]||(t[3]=s("div",{class:"ov-kpi-label"},"Memory",-1)),s("div",{class:T(["ov-kpi-value",{"ov-val-warn":e.data?.system?.memPercent>85}])},c(e.data?.system?.memPercent)+"%",3),s("div",mm,c(e.humanBytes(e.data?.system?.memUsed))+" / "+c(e.humanBytes(e.data?.system?.memTotal)),1)]),s("div",hm,[t[4]||(t[4]=s("div",{class:"ov-kpi-label"},"Disk",-1)),s("div",{class:T(["ov-kpi-value",{"ov-val-warn":e.data?.system?.diskPercent>85}])},c(e.data?.system?.diskPercent)+"%",3),s("div",vm,c(e.humanBytes(e.data?.system?.diskUsed))+" / "+c(e.humanBytes(e.data?.system?.diskTotal))+" \xB7 "+c(e.data?.system?.diskMount),1)]),s("div",ym,[t[5]||(t[5]=s("div",{class:"ov-kpi-label"},"Uptime",-1)),s("div",gm,c(e.humanDuration(e.data?.system?.uptime)),1),s("div",bm,c(e.data?.system?.nodeVersion)+" \xB7 "+c(e.data?.system?.platform),1)])]),m(" \u2500\u2500 Daily activity highlights \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",wm,[s("div",km,[t[6]||(t[6]=s("div",{class:"ov-daily-label"},"New repos today",-1)),s("div",_m,"+"+c(e.fmt?.number(e.data?.daily?.today?.repositories)),1),t[7]||(t[7]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))]),s("div",Em,[t[8]||(t[8]=s("div",{class:"ov-daily-label"},"New users today",-1)),s("div",Cm,"+"+c(e.fmt?.number(e.data?.daily?.today?.users)),1),s("div",Nm,c(e.fmt?.number(e.data?.users?.total))+" total users",1)]),s("div",Sm,[t[9]||(t[9]=s("div",{class:"ov-daily-label"},"Page views today",-1)),s("div",Dm,"+"+c(e.fmt?.number(e.data?.daily?.today?.pageViews)),1),t[10]||(t[10]=s("div",{class:"ov-daily-sub"},"since yesterday",-1))])]),m(" \u2500\u2500 Daily charts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Rm,[s("div",Tm,[t[11]||(t[11]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Daily page views \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-accent"}),y("views/day")])],-1)),e.data?.history?.length?(l(),d("div",Om,[(l(!0),d(x,null,re(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyPageViews)+" views"},[s("span",{class:"ov-spark-fill",style:Oe({height:e.historyBarH(o,"dailyPageViews")+"px"})},null,4)],8,Am))),128))])):m("v-if",!0),e.data?.history?.length?(l(),d("div",Im,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):m("v-if",!0)]),s("div",Vm,[t[12]||(t[12]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New repos \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-ok-fill"}),y("repos/day")])],-1)),e.data?.history?.length?(l(),d("div",Pm,[(l(!0),d(x,null,re(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyRepositories)+" repos"},[s("span",{class:"ov-spark-fill ov-spark-fill-alt",style:Oe({height:e.historyBarH(o,"dailyRepositories")+"px"})},null,4)],8,qm))),128))])):m("v-if",!0),e.data?.history?.length?(l(),d("div",Mm,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):m("v-if",!0)]),s("div",$m,[t[13]||(t[13]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"Users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-user-fill"}),y("total users")])],-1)),e.data?.history?.length?(l(),d("div",Fm,[(l(!0),d(x,null,re(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users","aria-label":e.historyLabel(o)+": "+e.fmt?.number(o?.nbUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-user",style:Oe({height:e.historyBarH(o,"nbUsers")+"px"})},null,4)],8,Lm))),128))])):m("v-if",!0),e.data?.history?.length?(l(),d("div",Um,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):m("v-if",!0)]),s("div",zm,[t[14]||(t[14]=s("div",{class:"ov-chart-head"},[s("span",{class:"ov-chart-title"},"New users \xB7 30d"),s("span",{class:"ov-chart-legend"},[s("span",{class:"ov-dot-legend ov-dot-new-user-fill"}),y("users/day")])],-1)),e.data?.history?.length?(l(),d("div",Hm,[(l(!0),d(x,null,re(e.data?.history,(o,r)=>(l(),d("div",{class:"ov-spark-col has-tip",key:r,"data-tip":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users","aria-label":e.historyLabel(o)+": +"+e.fmt?.number(o?.dailyUsers)+" users"},[s("span",{class:"ov-spark-fill ov-spark-fill-new-user",style:Oe({height:e.historyBarH(o,"dailyUsers")+"px"})},null,4)],8,Bm))),128))])):m("v-if",!0),e.data?.history?.length?(l(),d("div",Gm,[s("span",null,c(e.historyLabel(e.data?.history[0])),1),s("span",null,c(e.historyLabel(e.data?.history[Math?.floor(e.data?.history?.length/2)])),1),s("span",null,c(e.historyLabel(e.data?.history[e.data?.history?.length-1])),1)])):m("v-if",!0)])]),m(" \u2500\u2500 Three-panel row: Status / Errors / Queues \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",jm,[m(" Repo status breakdown "),s("div",Wm,[s("div",Km,[t[15]||(t[15]=s("span",{class:"ov-panel-title"},"Repo status",-1)),s("span",Ym,c(e.fmt?.number(e.data?.repos?.total))+" total",1)]),s("div",xm,[s("span",{class:"ov-bar-seg ov-bar-ready",title:"Ready",style:Oe({width:e.barPct("ready")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-preparing",title:"Preparing",style:Oe({width:e.barPct("preparing")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-error",title:"Error",style:Oe({width:e.barPct("error")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-expired",title:"Expired",style:Oe({width:e.barPct("expired")+"%"})},null,4),s("span",{class:"ov-bar-seg ov-bar-removed",title:"Removed",style:Oe({width:e.barPct("removed")+"%"})},null,4)]),s("div",Jm,[s("a",Qm,[t[16]||(t[16]=s("span",{class:"ov-swatch ov-bar-ready"},null,-1)),t[17]||(t[17]=y(" ready ",-1)),s("span",Xm,c(e.fmt?.number(e.statusCount("ready"))),1)]),s("a",Zm,[t[18]||(t[18]=s("span",{class:"ov-swatch ov-bar-preparing"},null,-1)),t[19]||(t[19]=y(" preparing ",-1)),s("span",eh,c(e.fmt?.number(e.statusCount("preparing")+e.statusCount("download"))),1)]),s("a",th,[t[20]||(t[20]=s("span",{class:"ov-swatch ov-bar-error"},null,-1)),t[21]||(t[21]=y(" error ",-1)),s("span",sh,c(e.fmt?.number(e.statusCount("error"))),1)]),s("a",nh,[t[22]||(t[22]=s("span",{class:"ov-swatch ov-bar-expired"},null,-1)),t[23]||(t[23]=y(" expired ",-1)),s("span",oh,c(e.fmt?.number(e.statusCount("expired")+e.statusCount("expiring"))),1)]),s("a",rh,[t[24]||(t[24]=s("span",{class:"ov-swatch ov-bar-removed"},null,-1)),t[25]||(t[25]=y(" removed ",-1)),s("span",ih,c(e.fmt?.number(e.statusCount("removed")+e.statusCount("removing"))),1)])])]),m(" Error breakdown "),s("div",ah,[s("div",lh,[t[26]||(t[26]=s("span",{class:"ov-panel-title"},"Errors \xB7 24h",-1)),s("span",dh,c(e.data?.errors?.last24h)+" total",1)]),s("div",uh,[s("div",ch,[t[27]||(t[27]=s("span",{class:"ov-ebar-label"},"5xx",-1)),s("span",ph,[s("span",{class:"ov-ebar-fill ov-ebar-error",style:Oe({width:e.errPct("error")+"%"})},null,4)]),s("span",fh,c(e.data?.errors?.severity?.error),1)]),s("div",mh,[t[28]||(t[28]=s("span",{class:"ov-ebar-label"},"4xx",-1)),s("span",hh,[s("span",{class:"ov-ebar-fill ov-ebar-warn",style:Oe({width:e.errPct("warn")+"%"})},null,4)]),s("span",vh,c(e.data?.errors?.severity?.warn),1)]),s("div",yh,[t[29]||(t[29]=s("span",{class:"ov-ebar-label"},"Info",-1)),s("span",gh,[s("span",{class:"ov-ebar-fill ov-ebar-info",style:Oe({width:e.errPct("info")+"%"})},null,4)]),s("span",bh,c(e.data?.errors?.severity?.info),1)])]),e.data?.repos?.recentErrors24h?(l(),d("div",wh,[s("a",kh,c(e.data?.repos?.recentErrors24h)+" repos in error state \u2192",1)])):m("v-if",!0)]),m(" Top routes / queues "),s("div",_h,[t[34]||(t[34]=s("div",{class:"ov-panel-head"},[s("span",{class:"ov-panel-title"},"Queues"),s("span",{class:"ov-panel-meta"},"by state")],-1)),s("div",Eh,[t[33]||(t[33]=_e('<div class="ov-route-row ov-route-head"><span class="ov-route-name">Queue</span><span class="ov-route-n">Active</span><span class="ov-route-n">Wait</span><span class="ov-route-n ov-route-lat">Failed</span></div>',1)),s("a",Ch,[t[30]||(t[30]=s("span",{class:"ov-route-name"},"download",-1)),s("span",Nh,c(e.data?.queues?.download?.active),1),s("span",Sh,c(e.data?.queues?.download?.waiting),1),s("span",{class:T(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.download?.failed>0}])},c(e.data?.queues?.download?.failed),3)]),s("a",Dh,[t[31]||(t[31]=s("span",{class:"ov-route-name"},"remove",-1)),s("span",Rh,c(e.data?.queues?.remove?.active),1),s("span",Th,c(e.data?.queues?.remove?.waiting),1),s("span",{class:T(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.remove?.failed>0}])},c(e.data?.queues?.remove?.failed),3)]),s("a",Oh,[t[32]||(t[32]=s("span",{class:"ov-route-name"},"cache",-1)),s("span",Ah,c(e.data?.queues?.cache?.active),1),s("span",Ih,c(e.data?.queues?.cache?.waiting),1),s("span",{class:T(["ov-route-n ov-route-lat",{"ov-n-bad":e.data?.queues?.cache?.failed>0}])},c(e.data?.queues?.cache?.failed),3)])])])]),m(" \u2500\u2500 Services bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 "),s("section",Vh,[s("div",Ph,[t[35]||(t[35]=s("span",{class:"ov-panel-title"},"Services",-1)),s("span",qh,c(e.fmt?.number(e.data?.users?.total))+" users \xB7 "+c(e.data?.conferences?.total)+" conferences",1)]),s("div",Mh,[s("div",$h,[t[37]||(t[37]=s("span",{class:"ov-svc-dot ov-dot-ok"},null,-1)),s("div",Fh,[t[36]||(t[36]=s("span",{class:"ov-svc-name"},"web",-1)),s("span",Lh,c(e.data?.system?.nodeVersion),1)]),s("span",Uh,"uptime "+c(e.humanDuration(e.data?.system?.uptime)),1)]),s("div",zh,[s("span",{class:T(["ov-svc-dot",e.queueTotal(e.data?.queues?.download)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Hh,[t[38]||(t[38]=s("span",{class:"ov-svc-name"},"download",-1)),e.queueTotal(e.data?.queues?.download)?(l(),d("span",Bh,c(e.queueTotal(e.data?.queues?.download))+" jobs",1)):m("v-if",!0),e.queueTotal(e.data?.queues?.download)?m("v-if",!0):(l(),d("span",Gh,"idle"))])]),s("div",jh,[s("span",{class:T(["ov-svc-dot",e.queueTotal(e.data?.queues?.cache)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Wh,[t[39]||(t[39]=s("span",{class:"ov-svc-name"},"cache",-1)),e.queueTotal(e.data?.queues?.cache)?(l(),d("span",Kh,c(e.queueTotal(e.data?.queues?.cache))+" jobs",1)):m("v-if",!0),e.queueTotal(e.data?.queues?.cache)?m("v-if",!0):(l(),d("span",Yh,"idle"))])]),s("div",xh,[s("span",{class:T(["ov-svc-dot",e.queueTotal(e.data?.queues?.remove)>0?"ov-dot-ok":"ov-dot-idle"])},null,2),s("div",Jh,[t[40]||(t[40]=s("span",{class:"ov-svc-name"},"remove",-1)),e.queueTotal(e.data?.queues?.remove)?(l(),d("span",Qh,c(e.queueTotal(e.data?.queues?.remove))+" jobs",1)):m("v-if",!0),e.queueTotal(e.data?.queues?.remove)?m("v-if",!0):(l(),d("span",Xh,"idle"))])]),s("div",Zh,[s("span",{class:T(["ov-svc-dot",e.data?.repos?.recentErrors24h>10?"ov-dot-warn":"ov-dot-ok"])},null,2),s("div",ev,[t[41]||(t[41]=s("span",{class:"ov-svc-name"},"errors",-1)),s("span",tv,c(e.data?.errors?.last24h)+" / 24h",1)])])])])])):m("v-if",!0)])}var sv={class:"container paper-page admin-page"},nv={class:"q-header"},ov={class:"q-header-actions"},rv={class:"q-range-btns"},iv={class:"q-cards"},av=["onClick"],lv={class:"q-card-head"},dv=["textContent"],uv=["textContent"],cv={class:"q-card-sub"},pv={key:0,class:"q-card-bar"},fv={key:0,class:"q-detail"},mv={class:"q-throughput"},hv={class:"q-section-label"},vv={class:"q-section-right"},yv={class:"q-stats-panel"},gv={class:"q-section-label"},bv={class:"q-stats-grid"},wv={class:"q-stat"},kv=["textContent"],_v={class:"q-stat"},Ev=["textContent"],Cv={class:"q-stat"},Nv=["textContent"],Sv={class:"q-stat"},Dv=["textContent"],Rv={class:"q-stat"},Tv=["textContent"],Ov={class:"q-stat"},Av=["textContent"],Iv={class:"q-stats-actions"},Vv=["disabled"],Pv={class:"q-jobs"},qv={class:"q-jobs-header"},Mv={class:"q-section-label"},$v={class:"q-state-filters"},Fv={class:"q-state-toggle"},Lv={type:"checkbox"},Uv={class:"q-search-row"},zv={type:"search",class:"form-control",placeholder:"Search by job/repo id\u2026",autocomplete:"off"},Hv={class:"q-auto-refresh"},Bv={type:"checkbox"},Gv={key:0,class:"q-table"},jv=["onClick"],Wv={class:"q-cell-state"},Kv=["textContent"],Yv=["textContent"],xv={class:"q-cell-id"},Jv=["textContent","href"],Qv={class:"q-cell-payload"},Xv=["textContent"],Zv={key:0,class:"q-payload-detail"},ey=["textContent"],ty=["textContent"],sy={class:"q-cell-progress"},ny={key:0,class:"q-progress-wrap"},oy=["textContent"],ry={class:"q-cell-actions"},iy=["onClick"],ay=["onClick"],ly={key:0,class:"q-detail-row"},dy={colspan:"7"},uy={class:"q-job-detail"},cy={class:"q-job-detail-grid"},py={class:"q-job-detail-item"},fy={class:"q-job-detail-value"},my=["textContent","href"],hy={class:"q-job-detail-item"},vy={class:"q-job-detail-value"},yy=["textContent"],gy={key:0,class:"q-job-detail-item"},by=["textContent"],wy={key:1,class:"q-job-detail-item"},ky=["textContent"],_y={key:2,class:"q-job-detail-item"},Ey={class:"q-job-detail-value"},Cy={key:3,class:"q-job-detail-item"},Ny=["textContent"],Sy={key:4,class:"q-job-detail-item"},Dy=["textContent"],Ry={key:5,class:"q-job-detail-item"},Ty=["textContent"],Oy={key:6,class:"q-job-detail-item"},Ay=["textContent"],Iy={key:7,class:"q-job-detail-item"},Vy=["textContent"],Py={key:0,class:"q-job-detail-error"},qy=["textContent"],My={key:1},$y=["textContent"],Fy={class:"q-job-detail-actions"},Ly=["onClick"],Uy=["onClick"],zy=["href"],Hy={key:1,class:"paper-table-empty",style:{border:"1px solid var(--border-color)","border-radius":"10px",background:"var(--paper-card)"}},By={key:0},Gy={key:1};function za(e,t){let o=ye("field");return l(),d("div",sv,[t[47]||(t[47]=s("div",{class:"paper-crumbs"},[y("Admin \xA0/\xA0 "),s("span",{class:"here"},"Queues")],-1)),s("div",nv,[t[12]||(t[12]=s("h1",{class:"paper-page-title"},"Queues",-1)),s("div",ov,[s("div",rv,[s("button",{class:T(["btn btn-sm",{active:e.range=="1h"}]),onClick:t[0]||(t[0]=r=>e.setRange("1h"))},"1h",2),s("button",{class:T(["btn btn-sm",{active:e.range=="6h"}]),onClick:t[1]||(t[1]=r=>e.setRange("6h"))},"6h",2),s("button",{class:T(["btn btn-sm",{active:e.range=="24h"}]),onClick:t[2]||(t[2]=r=>e.setRange("24h"))},"24h",2),s("button",{class:T(["btn btn-sm",{active:e.range=="7d"}]),onClick:t[3]||(t[3]=r=>e.setRange("7d"))},"7d",2)]),s("button",{class:"btn btn-sm",onClick:t[4]||(t[4]=r=>e.pauseAll())},"Pause all"),s("button",{class:"btn btn-sm btn-dark",onClick:t[5]||(t[5]=r=>e.drainSelected())},"Drain "+c(e.selectedQueue),1)])]),t[48]||(t[48]=_e('<nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues" class="active"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',1)),m(" Queue overview cards "),s("div",iv,[(l(!0),d(x,null,re(e.queueList,(r,n)=>(l(),d("div",{class:T(["q-card",{selected:e.selectedQueue==r?.key,paused:r?.paused}]),onClick:i=>e.selectQueue(r.key)},[s("div",lv,[s("span",{class:T(["q-dot",{"q-dot-red":r?.paused||r?.counts?.failed>0}])},null,2),s("span",{class:"q-card-name",textContent:c(r?.label)},null,8,dv)]),s("div",{class:"q-card-count",textContent:c((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0))},null,8,uv),s("div",cv,[s("span",null,"waiting \xB7 "+c(r?.counts?.active||0)+" active",1),r?.counts?.active?(l(),d("div",pv,[s("div",{class:"q-card-bar-fill",style:Oe({width:r?.counts?.active/((r?.counts?.waiting||0)+(r?.counts?.active||0)+(r?.counts?.delayed||0)||1)*100+"%"})},null,4)])):m("v-if",!0)])],10,av))),256))]),m(" Detail: throughput chart + stats panel "),e.selectedStats?(l(),d("div",fv,[s("div",mv,[s("div",hv,[y(c(e.selectedQueue)+"\xB7throughput ",1),s("span",vv,[t[13]||(t[13]=s("span",{class:"q-legend-completed"},"\u25CF",-1)),t[14]||(t[14]=y(" completed ",-1)),t[15]||(t[15]=s("span",{class:"q-legend-failed"},"\u25CF",-1)),t[16]||(t[16]=y(" failed ",-1)),t[17]||(t[17]=s("span",{class:"q-legend-exec"},"- -",-1)),y(" avg time \xB7 "+c(e.fmt?.uppercase(e.range)),1)])]),t[18]||(t[18]=s("div",{class:"q-chart-wrap"},[s("canvas",{id:"q-throughput-chart",height:"180"}),s("div",{id:"q-chart-tooltip",class:"q-chart-tooltip",style:{display:"none"}}),s("div",{id:"q-chart-crosshair",class:"q-chart-crosshair",style:{display:"none"}})],-1))]),s("div",yv,[s("div",gv,c(e.selectedQueue)+"\xB7stats",1),s("div",bv,[s("div",wv,[t[19]||(t[19]=s("div",{class:"q-stat-label"},"WAITING",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.waiting||0)},null,8,kv)]),s("div",_v,[t[20]||(t[20]=s("div",{class:"q-stat-label"},"ACTIVE",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.active||0)},null,8,Ev)]),s("div",Cv,[t[21]||(t[21]=s("div",{class:"q-stat-label"},"COMPLETED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.fmt?.number(e.selectedStats?.completed24h))},null,8,Nv)]),s("div",Sv,[t[22]||(t[22]=s("div",{class:"q-stat-label"},"FAILED (24H)",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.failed24h||0)},null,8,Dv)]),s("div",Rv,[t[23]||(t[23]=s("div",{class:"q-stat-label"},"DELAYED",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.counts?.delayed||0)},null,8,Tv)]),s("div",Ov,[t[24]||(t[24]=s("div",{class:"q-stat-label"},"WORKERS",-1)),s("div",{class:"q-stat-value",textContent:c(e.selectedStats?.workers||0)},null,8,Av)])]),s("div",Iv,[s("button",{class:"btn btn-sm",onClick:t[6]||(t[6]=r=>e.togglePause())},c(e.selectedStats?.paused?"Resume":"Pause"),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=r=>e.retryFailed()),disabled:!e.selectedStats?.counts?.failed},"Retry failed",8,Vv),s("button",{class:"btn btn-sm",onClick:t[8]||(t[8]=r=>e.emptyQueue())},"Empty")])])])):m("v-if",!0),e.actionError?(l(),d("div",{key:1,class:"q-toast-error",onClick:t[9]||(t[9]=r=>e.actionError=null)},[t[25]||(t[25]=s("i",{class:"fas fa-exclamation-circle"},null,-1)),y(" "+c(e.actionError),1)])):m("v-if",!0),m(" Jobs table "),s("div",Pv,[s("div",qv,[s("div",Mv,"ALL JOBS \xB7 "+c(e.fmt?.uppercase(e.selectedQueue)),1),s("div",$v,[(l(!0),d(x,null,re(e.allStates,(r,n)=>(l(),d("label",Fv,[E(s("input",Lv,null,512),[[o,{state:e.viewState,set:i=>{e.stateFilter[r]=i},value:e.stateFilter[r],form:null,options:{}}]]),s("span",{class:T("q-state-chip q-state-"+r)},c(r),3)]))),256))])]),s("div",Uv,[E(s("input",zv,null,512),[[o,{state:e.viewState,set:r=>{e.query.search=r},value:e.query?.search,form:null,options:{}}]]),s("label",Hv,[E(s("input",Bv,null,512),[[o,{state:e.viewState,set:r=>{e.query.autoRefresh=r},value:e.query?.autoRefresh,form:null,options:{}}]]),t[26]||(t[26]=y(" Auto-refresh ",-1))]),s("button",{class:"btn btn-sm",type:"button",title:"Refresh now",onClick:t[10]||(t[10]=r=>e.refreshNow())},[...t[27]||(t[27]=[s("i",{class:"fas fa-sync"},null,-1)])])]),e.filteredJobs().length>0?(l(),d("table",Gv,[t[45]||(t[45]=s("thead",null,[s("tr",null,[s("th",null,"STATE"),s("th",null,"JOB ID"),s("th",null,"PAYLOAD"),s("th",null,"ATTEMPTS"),s("th",null,"DURATION"),s("th",null,"PROGRESS"),s("th")])],-1)),(l(!0),d(x,null,re(e.filteredJobs(),(r,n)=>(l(),d("tbody",null,[s("tr",{style:{cursor:"pointer"},class:T({"q-row-failed":r?._state=="failed","q-row-expanded":e.expanded[r?.id]}),onClick:i=>e.toggleJob(r)},[s("td",Wv,[s("span",{textContent:c(r?._state),class:T("q-state-badge q-state-"+r?._state)},null,10,Kv),r?._state=="delayed"&&r?.delayUntil?(l(),d("span",{key:0,class:"q-delay-hint",textContent:c(e.delayCountdown(r?.delayUntil))},null,8,Yv)):m("v-if",!0)]),s("td",xv,[s("i",{class:T(["fas fa-chevron-right q-chevron",{"q-chevron-open":e.expanded[r?.id]}])},null,2),s("a",{target:"_blank",textContent:c("job:"+e.fmt.limitTo(r?.id,6)),onClick:t[11]||(t[11]=i=>i.stopPropagation()),href:e.safeUrl("/r/"+r?.id)},null,8,Jv)]),s("td",Qv,[s("span",{textContent:c(r?.name||"anonymize")},null,8,Xv),r?.data?.repoId&&r?.data?.repoId!==r?.name?(l(),d("span",Zv," \xB7 "+c(r?.data?.repoId),1)):m("v-if",!0)]),s("td",{class:"q-cell-num",textContent:c(r?.attemptsMade||1)},null,8,ey),s("td",{class:"q-cell-num",textContent:c(e.jobDuration(r))},null,8,ty),s("td",sy,[e.jobProgressPct(r)!==null?(l(),d("div",ny,[s("div",{class:"q-progress-bar",style:Oe({"--pct":e.jobProgressPct(r)+"%"})},null,4),s("span",{class:"q-progress-label",textContent:c(e.jobProgressPct(r)+"%")},null,8,oy)])):m("v-if",!0)]),s("td",ry,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",title:"Retry",onClick:i=>{e.retryJob(r),i.stopPropagation()}},[...t[28]||(t[28]=[s("i",{class:"fas fa-sync"},null,-1)])],8,iy)):m("v-if",!0),s("button",{class:"btn btn-sm",title:"Remove",onClick:i=>{e.removeJob(r),i.stopPropagation()}},[...t[29]||(t[29]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,ay)])],10,jv),e.expanded[r?.id]?(l(),d("tr",ly,[s("td",dy,[s("div",uy,[s("div",cy,[s("div",py,[t[30]||(t[30]=s("span",{class:"q-job-detail-label"},"JOB ID",-1)),s("span",fy,[s("a",{target:"_blank",textContent:c(r?.id),href:e.safeUrl("/r/"+r?.id)},null,8,my)])]),s("div",hy,[t[31]||(t[31]=s("span",{class:"q-job-detail-label"},"STATE",-1)),s("span",vy,[s("span",{textContent:c(r?._state),class:T("q-state-badge q-state-"+r?._state)},null,10,yy)])]),r?.data?.repoId?(l(),d("div",gy,[t[32]||(t[32]=s("span",{class:"q-job-detail-label"},"REPO ID",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.data?.repoId)},null,8,by)])):m("v-if",!0),r?.timestamp?(l(),d("div",wy,[t[33]||(t[33]=s("span",{class:"q-job-detail-label"},"CREATED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.timestamp))},null,8,ky)])):m("v-if",!0),r?._state=="delayed"&&r?.delayUntil?(l(),d("div",_y,[t[34]||(t[34]=s("span",{class:"q-job-detail-label"},"RETRY AT",-1)),s("span",Ey,c(e.humanTime(r?.delayUntil))+" ("+c(e.delayCountdown(r?.delayUntil))+")",1)])):m("v-if",!0),r?.processedOn?(l(),d("div",Cy,[t[35]||(t[35]=s("span",{class:"q-job-detail-label"},"PROCESSED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.processedOn))},null,8,Ny)])):m("v-if",!0),r?.finishedOn?(l(),d("div",Sy,[t[36]||(t[36]=s("span",{class:"q-job-detail-label"},"FINISHED",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.humanTime(r?.finishedOn))},null,8,Dy)])):m("v-if",!0),r?.attemptsMade?(l(),d("div",Ry,[t[37]||(t[37]=s("span",{class:"q-job-detail-label"},"ATTEMPTS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.attemptsMade)},null,8,Ty)])):m("v-if",!0),r?.progress&&r?.progress?.status?(l(),d("div",Oy,[t[38]||(t[38]=s("span",{class:"q-job-detail-label"},"STATUS",-1)),s("span",{class:"q-job-detail-value",textContent:c(r?.progress?.status)},null,8,Ay)])):m("v-if",!0),e.jobProgressPct(r)!==null?(l(),d("div",Iy,[t[39]||(t[39]=s("span",{class:"q-job-detail-label"},"PROGRESS",-1)),s("span",{class:"q-job-detail-value",textContent:c(e.jobProgressPct(r)+"%")},null,8,Vy)])):m("v-if",!0)]),r?.failedReason?(l(),d("div",Py,[t[40]||(t[40]=s("span",{class:"q-job-detail-label"},"ERROR",-1)),s("div",{class:"q-error-reason",textContent:c(r?.failedReason)},null,8,qy)])):m("v-if",!0),r?.stacktrace?.length?(l(),d("div",My,[t[41]||(t[41]=s("span",{class:"q-job-detail-label"},"STACKTRACE",-1)),(l(!0),d(x,null,re(r?.stacktrace,(i,a)=>(l(),d("pre",{class:"q-error-stack",key:a},[s("code",{textContent:c(i)},null,8,$y)]))),128))])):m("v-if",!0),s("div",Fy,[r?._state=="failed"?(l(),d("button",{key:0,class:"btn btn-sm",onClick:i=>e.retryJob(r)},[...t[42]||(t[42]=[s("i",{class:"fas fa-sync"},null,-1),y(" Retry",-1)])],8,Ly)):m("v-if",!0),s("button",{class:"btn btn-sm",onClick:i=>e.removeJob(r)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,Uy),s("a",{class:"btn btn-sm",target:"_blank",href:e.safeUrl("/r/"+r?.id)},[...t[44]||(t[44]=[s("i",{class:"fas fa-external-link-alt"},null,-1),y(" View repo",-1)])],8,zy)])])])])):m("v-if",!0)]))),256))])):m("v-if",!0),e.filteredJobs().length==0?(l(),d("div",Hy,[t[46]||(t[46]=s("i",{class:"fas fa-check-circle"},null,-1)),e.query?.search?m("v-if",!0):(l(),d("span",By,"No jobs in the "+c(e.selectedQueue)+" queue.",1)),e.query?.search?(l(),d("span",Gy,"No jobs match the current filters.")):m("v-if",!0)])):m("v-if",!0)])])}var jy={class:"container paper-page admin-page"},Wy={class:"admin-summary"},Ky={class:"summary-total"},Yy={class:"summary-meta"},xy={class:"count"},Jy={class:"count"},Qy={class:"count"},Xy={class:"count"},Zy={class:"count"},eg={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},tg={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},sg={class:"admin-filter-row"},ng={class:"search-wrap"},og={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},rg={key:0,class:"admin-search-hint"},ig={class:"admin-filter-inline"},ag={type:"text",class:"form-control form-control-sm",placeholder:"username"},lg={class:"admin-filter-inline"},dg={type:"text",class:"form-control form-control-sm",placeholder:"ID"},ug={class:"admin-filter-inline","aria-label":"Pagination"},cg=["disabled"],pg={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},fg=["disabled"],mg={key:0,class:"admin-filter-row"},hg={class:"admin-active-chips"},vg={class:"key"},yg=["onClick"],gg={key:1,class:"bulk-bar"},bg={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},wg={class:"paper-table-head",role:"row"},kg={role:"columnheader",style:{width:"28px"}},_g=["checked"],Eg={role:"columnheader"},Cg={role:"columnheader"},Ng={role:"columnheader",class:"num"},Sg={role:"columnheader"},Dg={role:"cell",style:{width:"28px"}},Rg={type:"checkbox","aria-label":"Select repository"},Tg={class:"cell-anon",role:"cell"},Og={class:"anon-text"},Ag=["textContent","href"],Ig={class:"anon-sub"},Vg=["textContent","href"],Pg={key:0},qg=["textContent","href"],Mg={key:1},$g=["textContent","href"],Fg={key:2},Lg={class:"cell-status",role:"cell"},Ug={class:"status-line"},zg=["textContent"],Hg=["textContent","title"],Bg=["textContent"],Gg=["textContent"],jg={class:"cell-actions",role:"cell"},Wg={class:"dropdown"},Kg={class:"dropdown-menu dropdown-menu-right"},Yg=["href"],xg=["href"],Jg=["href"],Qg=["onClick"],Xg=["onClick"],Zg=["onClick"],eb=["onClick"],tb=["onClick"],sb=["onClick"],ob={key:0,class:"paper-table-empty"},rb={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},ib={style:{"font-size":"12px",color:"var(--ink-muted)"}},ab={key:0,class:"pagination-compact"},lb=["disabled"],db=["max"],ub=["disabled"],cb={class:"admin-filter-inline"},pb={class:"form-control form-control-sm"};function Ha(e,t){let o=ye("field"),r=ye("form");return l(),d("div",jy,[t[61]||(t[61]=_e('<div class="paper-crumbs">Admin \xA0/\xA0 <span class="here">Repositories</span></div><h1 class="paper-page-title">Repositories</h1><nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories" class="active"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',3)),s("div",Wy,[s("span",Ky,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",Yy,c(e.fmt?.humanFileSize(e.totalSize))+" on disk",1),s("span",{class:T(["summary-pill ok",{active:e.query?.ready}]),title:"Toggle ready filter",onClick:t[0]||(t[0]=n=>{e.query.ready=!e.query.ready,e.query.page=1})},[t[18]||(t[18]=y("Ready ",-1)),s("span",xy,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:T(["summary-pill warn",{active:e.query?.preparing}]),title:"Toggle preparing filter",onClick:t[1]||(t[1]=n=>{e.query.preparing=!e.query.preparing,e.query.page=1})},[t[19]||(t[19]=y("Preparing ",-1)),s("span",Jy,c(e.fmt?.number(e.statusCountFor("preparing")+e.statusCountFor("download"))),1)],2),s("span",{class:T(["summary-pill error",{active:e.query?.error}]),title:"Toggle errored filter",onClick:t[2]||(t[2]=n=>{e.query.error=!e.query.error,e.query.page=1})},[t[20]||(t[20]=y("Errored ",-1)),s("span",Qy,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:T(["summary-pill",{active:e.query?.expired}]),title:"Toggle expired filter",onClick:t[3]||(t[3]=n=>{e.query.expired=!e.query.expired,e.query.page=1})},[t[21]||(t[21]=y("Expired ",-1)),s("span",Xy,c(e.fmt?.number(e.statusCountFor("expired")+e.statusCountFor("expiring"))),1)],2),s("span",{class:T(["summary-pill",{active:e.query?.removed}]),title:"Toggle removed filter",onClick:t[4]||(t[4]=n=>{e.query.removed=!e.query.removed,e.query.page=1})},[t[22]||(t[22]=y("Removed ",-1)),s("span",Zy,c(e.fmt?.number(e.statusCountFor("removed")+e.statusCountFor("removing"))),1)],2)]),e.fetchError?(l(),d("div",eg,[t[23]||(t[23]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):m("v-if",!0),E((l(),d("form",tg,[m(" Row 1: search + scoped inputs + headline actions "),s("div",sg,[s("div",ng,[E(s("input",og,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?m("v-if",!0):(l(),d("span",rg,"/"))]),s("span",ig,[t[24]||(t[24]=s("label",null,"Owner",-1)),E(s("input",ag,null,512),[[o,{state:e.viewState,set:n=>{e.query.owner=n},value:e.query?.owner,form:null,options:{}}]])]),s("span",lg,[t[25]||(t[25]=s("label",null,"Conference",-1)),E(s("input",dg,null,512),[[o,{state:e.viewState,set:n=>{e.query.conference=n},value:e.query?.conference,form:null,options:{}}]])]),t[29]||(t[29]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[5]||(t[5]=n=>e.exportCsv())},[...t[26]||(t[26]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",ug,[s("button",{class:"btn btn-sm",type:"button",onClick:t[6]||(t[6]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[27]||(t[27]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,cg),s("span",pg,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[28]||(t[28]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,fg)])]),m(" Row 2: appears only when there are active filter chips "),e.chips?.length?(l(),d("div",mg,[s("div",hg,[(l(!0),d(x,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",vg,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button","aria-label":"Remove filter",onClick:a=>e.clearFilter(n.key)},[...t[30]||(t[30]=[s("i",{class:"fas fa-times"},null,-1)])],8,yg)]))),128))])])):m("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",gg,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[31]||(t[31]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[8]||(t[8]=n=>e.bulkRefresh())},[...t[32]||(t[32]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[9]||(t[9]=n=>e.bulkRemoveCache())},[...t[33]||(t[33]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[10]||(t[10]=n=>e.clearSelection())},"Clear")])):m("v-if",!0),s("div",bg,[s("div",wg,[s("div",kg,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[11]||(t[11]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,_g)]),s("div",Eg,[s("span",{class:T(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[12]||(t[12]=n=>e.sortBy("source.repositoryName"))},[t[34]||(t[34]=y("Repository ",-1)),s("i",{class:T(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",Cg,[s("span",{class:T(["sortable",{active:e.query?.sort=="status"}]),onClick:t[13]||(t[13]=n=>e.sortBy("status"))},[t[35]||(t[35]=y("Status ",-1)),s("i",{class:T(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",Ng,[s("span",{class:T(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[14]||(t[14]=n=>e.sortBy("pageView"))},[t[36]||(t[36]=y("Views ",-1)),s("i",{class:T(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",Sg,[s("span",{class:T(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[15]||(t[15]=n=>e.sortBy("anonymizeDate"))},[t[37]||(t[37]=y("Anonymized ",-1)),s("i",{class:T(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[38]||(t[38]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(x,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:T(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",Dg,[E(s("input",Rg,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",Tg,[t[43]||(t[43]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Og,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,Ag),s("div",Ig,[s("a",{textContent:c(n?.source?.repositoryName),href:e.safeUrl("https://github.com/"+n?.source?.repositoryName+"/")},null,8,Vg),n?.options?.update?(l(),d("span",Pg,[t[39]||(t[39]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,qg)])):m("v-if",!0),n?.options?.update?m("v-if",!0):(l(),d("span",Mg,[t[40]||(t[40]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,$g)])),n?.conference?(l(),d("span",Fg,[t[41]||(t[41]=y("\xA0\xB7\xA0",-1)),t[42]||(t[42]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):m("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",Lg,[s("span",Ug,[s("span",{class:T(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,zg)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,Hg)):m("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,Bg),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,Gg),s("div",jg,[s("div",Wg,[t[55]||(t[55]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Kg,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[44]||(t[44]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,Yg),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[45]||(t[45]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,xg),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[46]||(t[46]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,Jg)):m("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.fetchGithubInfo(n),["prevent"])},[...t[47]||(t[47]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,Qg),t[53]||(t[53]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updateRepository(n),["prevent"])},[...t[48]||(t[48]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,Xg),[[H,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updateRepository(n),["prevent"])},[...t[49]||(t[49]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,Zg),[[H,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.showStatusMessage(n),["prevent"])},[...t[50]||(t[50]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,eb),[[H,n?.statusMessage]]),t[54]||(t[54]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.removeCache(n),["prevent"])},[...t[51]||(t[51]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,tb),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:ge(a=>e.removeRepository(n),["prevent"])},[...t[52]||(t[52]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,sb),[[H,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",ob,[...t[56]||(t[56]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):m("v-if",!0)]),s("div",rb,[s("span",ib,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",ab,[s("button",{class:"btn btn-sm",onClick:t[16]||(t[16]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[57]||(t[57]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous ",-1)])],8,lb),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},"aria-label":"Page",max:e.totalPage},null,8,db),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[17]||(t[17]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[58]||(t[58]=[y(" Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,ub)])):m("v-if",!0),s("span",cb,[t[60]||(t[60]=s("label",null,"Per page",-1)),E((l(),d("select",pb,[...t[59]||(t[59]=[_e('<option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option><option value="250">250</option>',5)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var fb={class:"container paper-page admin-page"},mb={class:"paper-crumbs"},hb={class:"here"},vb={class:"paper-page-title"},yb={key:0,class:"user-detail-card"},gb={class:"user-header"},bb=["src"],wb={class:"status-dot-wrap"},kb=["textContent"],_b={key:0,class:"type-badge type-repo"},Eb={class:"user-actions",style:{"margin-top":"4px"}},Cb={class:"user-detail-grid"},Nb={class:"detail-value"},Sb={class:"detail-value"},Db={class:"detail-value",style:{"font-family":"var(--font-mono)","font-size":"0.85rem"}},Rb={class:"detail-value"},Tb=["href"],Ob={class:"detail-value"},Ab={class:"detail-value"},Ib={key:0},Vb={key:1,class:"text-muted"},Pb={class:"detail-value"},qb={key:0,style:{"margin-top":"20px"}},Mb={class:"paper-table w-100",style:{"margin-top":"10px"}},$b={class:"paper-table-row",style:{"grid-template-columns":"1fr 160px"}},Fb={class:"cell-anon",role:"cell"},Lb={class:"anon-text"},Ub=["textContent"],zb={class:"cell-expires",role:"cell"},Hb={key:1,class:"admin-section-header"},Bb={class:"section-count"},Gb={key:2,class:"user-detail-card"},jb={type:"text",class:"form-control",placeholder:"Token name (e.g. dev-laptop)",required:""},Wb={key:0,class:"alert alert-warning",role:"alert"},Kb={style:{"white-space":"pre-wrap","word-break":"break-all",margin:"8px 0 0","font-family":"var(--font-mono)","font-size":"0.85rem"}},Yb={key:1,class:"paper-table w-100"},xb={class:"paper-table-row",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},Jb=["textContent"],Qb=["textContent"],Xb={role:"cell"},Zb={key:0},e1={key:1,class:"text-muted"},t1={role:"cell"},s1=["onClick"],n1={key:2,class:"paper-table-empty"},o1={class:"admin-section-header"},r1={class:"section-count"},i1={class:"admin-summary"},a1={class:"summary-total"},l1={class:"count"},d1={class:"count"},u1={class:"count"},c1={class:"count"},p1={class:"count"},f1={class:"w-100 admin-filter-toolbar","aria-label":"Repositories","accept-charset":"UTF-8"},m1={class:"admin-filter-row"},h1={class:"search-wrap"},v1={type:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search repoId, source repo, error message\u2026",autocomplete:"off"},y1={key:3,class:"bulk-bar"},g1={class:"paper-table paper-table-repos has-bulk w-100",role:"table","aria-label":"Repositories"},b1={class:"paper-table-head",role:"row"},w1={role:"columnheader",style:{width:"28px"}},k1=["checked"],_1={role:"columnheader"},E1={role:"columnheader"},C1={role:"columnheader",class:"num"},N1={role:"columnheader"},S1={role:"cell",style:{width:"28px"}},D1={type:"checkbox","aria-label":"Select repository"},R1={class:"cell-anon",role:"cell"},T1={class:"anon-text"},O1=["textContent","href"],A1={class:"anon-sub"},I1=["textContent","href"],V1={key:0},P1=["textContent","href"],q1={key:1},M1=["textContent","href"],$1={key:2},F1={class:"cell-status",role:"cell"},L1={class:"status-line"},U1=["textContent"],z1=["textContent","title"],H1=["textContent"],B1=["textContent"],G1={class:"cell-actions",role:"cell"},j1={class:"dropdown"},W1={class:"dropdown-menu dropdown-menu-right"},K1=["href"],Y1=["href"],x1=["href"],J1=["onClick"],Q1=["onClick"],X1=["onClick"],Z1=["onClick"],ew=["onClick"],tw=["onClick"],sw={key:0,class:"paper-table-empty"};function Ba(e,t){let o=ye("field"),r=ye("form");return l(),d("div",fb,[s("div",mb,[t[22]||(t[22]=s("a",{href:"/admin/users"},"Users",-1)),t[23]||(t[23]=y(" \xA0/\xA0 ",-1)),s("span",hb,c(e.userInfo?.username||"Profile"),1)]),s("h1",vb,c(e.userInfo?.username||"User"),1),t[81]||(t[81]=_e('<nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users" class="active"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',1)),e.userInfo?(l(),d("div",yb,[s("div",gb,[e.userInfo?.photo?(l(),d("img",{key:0,width:"56",height:"56",src:e.safeUrl(e.userInfo?.photo)},null,8,bb)):m("v-if",!0),s("div",null,[s("h1",null,[y(c(e.userInfo?.username)+" ",1),s("span",wb,[s("span",{class:T(["status-dot",{"status-ready":e.userInfo?.status=="active","status-removed":e.userInfo?.status!="active"}])},null,2),s("span",{textContent:c(e.fmt?.title(e.userInfo?.status))},null,8,kb)]),e.userInfo?.isAdmin?(l(),d("span",_b,"Admin")):m("v-if",!0)]),s("div",Eb,[e.userInfo?.status!=="banned"?(l(),d("button",{key:0,class:"btn btn-sm text-danger",onClick:t[0]||(t[0]=n=>e.banUser())},[...t[24]||(t[24]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])])):m("v-if",!0),e.userInfo?.status==="banned"||e.userInfo?.status==="removed"?(l(),d("button",{key:1,class:"btn btn-sm",onClick:t[1]||(t[1]=n=>e.activateUser())},[...t[25]||(t[25]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])])):m("v-if",!0),e.userInfo?.isAdmin?m("v-if",!0):(l(),d("button",{key:2,class:"btn btn-sm",onClick:t[2]||(t[2]=n=>e.promoteUser())},[...t[26]||(t[26]=[s("i",{class:"fas fa-user-shield"},null,-1),y(" Promote to admin",-1)])])),e.userInfo?.isAdmin?(l(),d("button",{key:3,class:"btn btn-sm text-danger",onClick:t[3]||(t[3]=n=>e.demoteUser())},[...t[27]||(t[27]=[s("i",{class:"fas fa-user-minus"},null,-1),y(" Remove admin",-1)])])):m("v-if",!0)])])]),s("div",Cb,[t[30]||(t[30]=s("div",{class:"detail-label"},"ID",-1)),s("div",Nb,c(e.userInfo?._id),1),t[31]||(t[31]=s("div",{class:"detail-label"},"Email",-1)),s("div",Sb,c(e.userInfo?.emails?.[0]?.email),1),t[32]||(t[32]=s("div",{class:"detail-label"},"Access token",-1)),s("div",Db,c(e.userInfo?.accessTokens?.github),1),t[33]||(t[33]=s("div",{class:"detail-label"},"GitHub",-1)),s("div",Rb,[s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+e.userInfo?.username)},[t[28]||(t[28]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(e.userInfo?.username),1)],8,Tb)]),t[34]||(t[34]=s("div",{class:"detail-label"},"Created",-1)),s("div",Ob,c(e.fmt?.humanTime(e.userInfo?.dateOfEntry)),1),t[35]||(t[35]=s("div",{class:"detail-label"},"Last connection",-1)),s("div",Ab,[e.userInfo?.accessTokenDates?.github?(l(),d("span",Ib,c(e.fmt?.humanTime(e.userInfo?.accessTokenDates?.github)),1)):m("v-if",!0),e.userInfo?.accessTokenDates?.github?m("v-if",!0):(l(),d("span",Vb,"never"))]),t[36]||(t[36]=s("div",{class:"detail-label"},"GitHub repos",-1)),s("div",Pb,[y(c(e.userInfo?.repositories?.length)+" repositories ",1),s("button",{class:"btn btn-sm ml-2",onClick:t[4]||(t[4]=n=>e.showRepos=!e.showRepos)},c(e.showRepos?"Hide":"Show"),1),s("button",{class:"btn btn-sm ml-1",onClick:t[5]||(t[5]=n=>e.getGitHubRepositories())},[...t[29]||(t[29]=[s("i",{class:"fas fa-sync"},null,-1),y(" Refresh ",-1)])])])]),e.showRepos?(l(),d("div",qb,[t[39]||(t[39]=s("div",{class:"paper-section-eyebrow"},"GitHub repositories",-1)),s("div",Mb,[(l(!0),d(x,null,re(e.userInfo?.repositories,(n,i)=>(l(),d("div",$b,[s("div",Fb,[t[37]||(t[37]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",Lb,[s("span",{class:"repo-name",textContent:c(n?.name)},null,8,Ub)])]),s("div",zb,[t[38]||(t[38]=s("i",{class:"fas fa-database"},null,-1)),y(" "+c(e.fmt?.humanFileSize(n?.size)),1)])]))),256))])])):m("v-if",!0)])):m("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",Hb,[t[40]||(t[40]=s("h2",null,[s("i",{class:"fas fa-key"}),y(" API tokens")],-1)),s("span",Bb,c(e.tokens?.length),1)])):m("v-if",!0),e.userInfo&&e.userInfo?.isAdmin&&e.user&&e.user?.username==e.userInfo?.username?(l(),d("div",Gb,[t[46]||(t[46]=s("p",{class:"paper-page-lede"},[y("Personal API tokens for this admin account. Send as "),s("code",null,"Authorization: Bearer <token>"),y(" to authenticate without GitHub OAuth (useful for development).")],-1)),E((l(),d("form",{class:"d-flex",style:{gap:"8px","margin-bottom":"12px"},onSubmit:t[6]||(t[6]=ge(n=>e.submitForm(n,()=>{e.createToken()}),["prevent"]))},[E(s("input",jb,null,512),[[o,{state:e.viewState,set:n=>{e.tokenForm.name=n},value:e.tokenForm?.name,form:null,options:{}}]]),t[41]||(t[41]=s("button",{type:"submit",class:"btn btn-primary"},[s("i",{class:"fas fa-plus"}),y(" Generate")],-1))],32)),[[r,e.viewState]]),e.tokenForm?.plaintext?(l(),d("div",Wb,[t[42]||(t[42]=s("strong",null,"Copy this token now \u2014 it will not be shown again:",-1)),s("pre",Kb,c(e.tokenForm?.plaintext),1),s("button",{class:"btn btn-sm",onClick:t[7]||(t[7]=n=>e.tokenForm.plaintext=null)},"Dismiss")])):m("v-if",!0),e.tokens?.length?(l(),d("div",Yb,[t[44]||(t[44]=s("div",{class:"paper-table-head",role:"row",style:{"grid-template-columns":"1fr 200px 200px 80px"}},[s("div",{role:"columnheader"},"Name"),s("div",{role:"columnheader"},"Created"),s("div",{role:"columnheader"},"Last used"),s("div",{role:"columnheader","aria-label":"Actions"})],-1)),(l(!0),d(x,null,re(e.tokens,(n,i)=>(l(),d("div",xb,[s("div",{role:"cell",textContent:c(n?.name)},null,8,Jb),s("div",{role:"cell",textContent:c(e.fmt?.humanTime(n?.createdAt))},null,8,Qb),s("div",Xb,[n?.lastUsedAt?(l(),d("span",Zb,c(e.fmt?.humanTime(n?.lastUsedAt)),1)):m("v-if",!0),n?.lastUsedAt?m("v-if",!0):(l(),d("span",e1,"never"))]),s("div",t1,[s("button",{class:"btn btn-sm text-danger",title:"Revoke",onClick:a=>e.revokeToken(n)},[...t[43]||(t[43]=[s("i",{class:"fas fa-trash-alt"},null,-1)])],8,s1)])]))),256))])):m("v-if",!0),e.tokens?.length?m("v-if",!0):(l(),d("div",n1,[...t[45]||(t[45]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No tokens yet.",-1)])]))])):m("v-if",!0),s("div",o1,[t[47]||(t[47]=s("h2",null,[s("i",{class:"fas fa-code-branch"}),y(" Anonymized repositories")],-1)),s("span",r1,c(e.repositories?.length),1)]),s("div",i1,[s("span",a1,c(e.fmt?.number(e.repositories?.length)),1),s("span",{class:T(["summary-pill ok",{active:e.filters?.status?.ready===!1}]),title:"Toggle ready filter",onClick:t[8]||(t[8]=n=>e.filters.status.ready=!e.filters.status.ready)},[t[48]||(t[48]=y("Ready ",-1)),s("span",l1,c(e.fmt?.number(e.statusCountFor("ready"))),1)],2),s("span",{class:T(["summary-pill warn",{active:e.filters?.status?.preparing===!1}]),title:"Toggle preparing filter",onClick:t[9]||(t[9]=n=>e.filters.status.preparing=!e.filters.status.preparing)},[t[49]||(t[49]=y("Preparing ",-1)),s("span",d1,c(e.fmt?.number(e.statusCountFor("preparing"))),1)],2),s("span",{class:T(["summary-pill error",{active:e.filters?.status?.error===!1}]),title:"Toggle errored filter",onClick:t[10]||(t[10]=n=>e.filters.status.error=!e.filters.status.error)},[t[50]||(t[50]=y("Errored ",-1)),s("span",u1,c(e.fmt?.number(e.statusCountFor("error"))),1)],2),s("span",{class:T(["summary-pill",{active:e.filters?.status?.expired===!1}]),title:"Toggle expired filter",onClick:t[11]||(t[11]=n=>e.filters.status.expired=!e.filters.status.expired)},[t[51]||(t[51]=y("Expired ",-1)),s("span",c1,c(e.fmt?.number(e.statusCountFor("expired"))),1)],2),s("span",{class:T(["summary-pill",{active:e.filters?.status?.removed===!1}]),title:"Toggle removed filter",onClick:t[12]||(t[12]=n=>e.filters.status.removed=!e.filters.status.removed)},[t[52]||(t[52]=y("Removed ",-1)),s("span",p1,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),E((l(),d("form",f1,[s("div",m1,[s("div",h1,[E(s("input",v1,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),t[54]||(t[54]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",title:"Export current view to CSV",onClick:t[13]||(t[13]=n=>e.exportCsv())},[...t[53]||(t[53]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])])])])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",y1,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[55]||(t[55]=y(" selected",-1))]),s("button",{class:"btn btn-sm",type:"button",onClick:t[14]||(t[14]=n=>e.bulkRefresh())},[...t[56]||(t[56]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force refresh",-1)])]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[15]||(t[15]=n=>e.bulkRemoveCache())},[...t[57]||(t[57]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[16]||(t[16]=n=>e.clearSelection())},"Clear")])):m("v-if",!0),s("div",g1,[s("div",b1,[s("div",w1,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[17]||(t[17]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,k1)]),s("div",_1,[s("span",{class:T(["sortable",{active:e.query?.sort=="source.repositoryName"}]),onClick:t[18]||(t[18]=n=>e.sortBy("source.repositoryName"))},[t[58]||(t[58]=y("Repository ",-1)),s("i",{class:T(["fas",e.sortIcon("source.repositoryName")])},null,2)],2)]),s("div",E1,[s("span",{class:T(["sortable",{active:e.query?.sort=="status"}]),onClick:t[19]||(t[19]=n=>e.sortBy("status"))},[t[59]||(t[59]=y("Status ",-1)),s("i",{class:T(["fas",e.sortIcon("status")])},null,2)],2)]),s("div",C1,[s("span",{class:T(["sortable",{active:e.query?.sort=="pageView"}]),onClick:t[20]||(t[20]=n=>e.sortBy("pageView"))},[t[60]||(t[60]=y("Views ",-1)),s("i",{class:T(["fas",e.sortIcon("pageView")])},null,2)],2)]),s("div",N1,[s("span",{class:T(["sortable",{active:e.query?.sort=="anonymizeDate"}]),onClick:t[21]||(t[21]=n=>e.sortBy("anonymizeDate"))},[t[61]||(t[61]=y("Anonymized ",-1)),s("i",{class:T(["fas",e.sortIcon("anonymizeDate")])},null,2)],2)]),t[62]||(t[62]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(x,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:T(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error","row-selected":e.selected[n?.repoId]}]),role:"row"},[s("div",S1,[E(s("input",D1,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.repoId]=a},value:e.selected[n?.repoId],form:null,options:{}}]])]),s("div",R1,[t[67]||(t[67]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",T1,[s("a",{class:"repo-name",target:"_blank",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId)},null,8,O1),s("div",A1,[s("a",{textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,I1),n?.options?.update?(l(),d("span",V1,[t[63]||(t[63]=y("\xA0\xB7\xA0",-1)),s("a",{textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,P1)])):m("v-if",!0),n?.options?.update?m("v-if",!0):(l(),d("span",q1,[t[64]||(t[64]=y("\xA0\xB7\xA0@",-1)),s("a",{textContent:c(n?.source?.commit?.substring(0,8)),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},null,8,M1)])),n?.conference?(l(),d("span",$1,[t[65]||(t[65]=y("\xA0\xB7\xA0",-1)),t[66]||(t[66]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):m("v-if",!0),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.humanFileSize(n?.size?.storage)),1),s("span",null,"\xA0\xB7\xA0"+c(e.fmt?.number(n?.options?.terms?.length))+" terms",1)])])]),s("div",F1,[s("span",L1,[s("span",{class:T(["status-dot",{"status-removed":n?.status=="removed"||n?.status=="expired","status-ready":n?.status=="ready","status-error":n?.status=="error","status-preparing":n?.status=="preparing"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,U1)]),n?.statusMessage?(l(),d("span",{key:0,class:"status-sub",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,z1)):m("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView||0))},null,8,H1),s("div",{class:"cell-expires",role:"cell",textContent:c(e.fmt?.humanTime(n?.anonymizeDate))},null,8,B1),s("div",G1,[s("div",j1,[t[79]||(t[79]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",W1,[s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[68]||(t[68]=[s("i",{class:"far fa-edit"},null,-1),y(" Edit",-1)])],8,K1),s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[69]||(t[69]=[s("i",{class:"fa fa-eye"},null,-1),y(" View repo",-1)])],8,Y1),n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[70]||(t[70]=[s("i",{class:"fas fa-globe"},null,-1),y(" View page",-1)])],8,x1)):m("v-if",!0),s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.fetchGithubInfo(n),["prevent"])},[...t[71]||(t[71]=[s("i",{class:"fab fa-github"},null,-1),y(" Live GitHub info",-1)])],8,J1),t[77]||(t[77]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updateRepository(n),["prevent"])},[...t[72]||(t[72]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update",-1)])],8,Q1),[[H,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updateRepository(n),["prevent"])},[...t[73]||(t[73]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable",-1)])],8,X1),[[H,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.showStatusMessage(n),["prevent"])},[...t[74]||(t[74]=[s("i",{class:"fas fa-exclamation-triangle"},null,-1),y(" View status message",-1)])],8,Z1),[[H,n?.statusMessage]]),t[78]||(t[78]=s("div",{class:"dropdown-divider"},null,-1)),s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.removeCache(n),["prevent"])},[...t[75]||(t[75]=[s("i",{class:"fas fa-broom"},null,-1),y(" Remove cache",-1)])],8,ew),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:ge(a=>e.removeRepository(n),["prevent"])},[...t[76]||(t[76]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove",-1)])],8,tw),[[H,n?.status=="ready"]])])])])],2))),256)),e.filteredRepositories?.length==0?(l(),d("div",sw,[...t[80]||(t[80]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No repositories match the current filters.",-1)])])):m("v-if",!0)])])}var nw={class:"container paper-page admin-page"},ow={class:"admin-summary"},rw={class:"summary-total"},iw={class:"count"},aw={class:"count"},lw={class:"count"},dw={key:0,class:"alert alert-danger",style:{margin:"8px 0"}},uw={class:"w-100 admin-filter-toolbar","aria-label":"Users","accept-charset":"UTF-8"},cw={class:"admin-filter-row"},pw={class:"search-wrap"},fw={type:"search",class:"form-control","aria-label":"Search users",placeholder:"Search username or email\u2026",autocomplete:"off"},mw={key:0,class:"admin-search-hint"},hw={class:"admin-filter-inline"},vw={class:"form-control form-control-sm"},yw={class:"admin-filter-inline","aria-label":"Pagination"},gw=["disabled"],bw={style:{"font-family":"var(--font-mono)","font-size":"12px",color:"var(--ink-muted)"}},ww=["disabled"],kw={key:0,class:"admin-filter-row"},_w={class:"admin-active-chips"},Ew={class:"key"},Cw=["onClick"],Nw={key:1,class:"bulk-bar"},Sw={class:"paper-table w-100",role:"table","aria-label":"Users",style:{"--cols":"28px minmax(280px, 2.4fr) 100px 140px 140px 52px"}},Dw={class:"paper-table-head admin-users-row",role:"row"},Rw={role:"columnheader",style:{width:"28px"}},Tw=["checked"],Ow={role:"columnheader"},Aw={role:"columnheader"},Iw={role:"cell",style:{width:"28px"}},Vw={type:"checkbox","aria-label":"Select user"},Pw={class:"cell-anon",role:"cell"},qw=["src"],Mw={class:"anon-text"},$w=["textContent","href"],Fw={class:"anon-sub"},Lw={key:0},Uw={key:1},zw=["href"],Hw={key:2},Bw={class:"cell-views num",role:"cell"},Gw=["textContent","href"],jw={class:"cell-status",role:"cell"},Ww=["textContent"],Kw={class:"cell-status",role:"cell"},Yw={key:0,class:"type-badge type-repo"},xw={key:1,class:"empty-dash"},Jw={class:"cell-actions",role:"cell"},Qw={class:"dropdown"},Xw={class:"dropdown-menu dropdown-menu-right"},Zw=["href"],ek=["href"],tk=["onClick"],sk=["onClick"],nk={key:0,class:"paper-table-empty"},ok={class:"admin-toolbar",style:{"justify-content":"space-between","border-bottom":"none"}},rk={style:{"font-size":"12px",color:"var(--ink-muted)"}},ik={key:0,class:"pagination-compact"},ak=["disabled"],lk=["max"],dk=["disabled"],uk={class:"admin-filter-inline"},ck={class:"form-control form-control-sm"};function Ga(e,t){let o=ye("field"),r=ye("form");return l(),d("div",nw,[t[43]||(t[43]=_e('<div class="paper-crumbs">Admin \xA0/\xA0 <span class="here">Users</span></div><h1 class="paper-page-title">Users</h1><nav class="admin-nav"><a href="/admin/"><i class="fas fa-tachometer-alt"></i> Overview</a><a href="/admin/repositories"><i class="fas fa-code-branch"></i> Repositories</a><a href="/admin/users" class="active"><i class="fas fa-users"></i> Users</a><a href="/admin/conferences"><i class="fas fa-chalkboard-teacher"></i> Conferences</a><a href="/admin/queues"><i class="fas fa-tasks"></i> Queues</a><a href="/admin/errors"><i class="fas fa-bug"></i> Errors</a></nav>',3)),s("div",ow,[s("span",rw,c(e.total>=0?e.fmt.number(e.total):"\u2026"),1),s("span",{class:T(["summary-pill ok",{active:e.query?.status=="active"}]),onClick:t[0]||(t[0]=n=>{e.query.status=e.query.status=="active"?"":"active",e.query.page=1})},[t[13]||(t[13]=y("Active ",-1)),s("span",iw,c(e.fmt?.number(e.statusCountFor("active"))),1)],2),s("span",{class:T(["summary-pill error",{active:e.query?.status=="banned"}]),onClick:t[1]||(t[1]=n=>{e.query.status=e.query.status=="banned"?"":"banned",e.query.page=1})},[t[14]||(t[14]=y("Banned ",-1)),s("span",aw,c(e.fmt?.number(e.statusCountFor("banned"))),1)],2),s("span",{class:T(["summary-pill",{active:e.query?.status=="removed"}]),onClick:t[2]||(t[2]=n=>{e.query.status=e.query.status=="removed"?"":"removed",e.query.page=1})},[t[15]||(t[15]=y("Removed ",-1)),s("span",lw,c(e.fmt?.number(e.statusCountFor("removed"))),1)],2)]),e.fetchError?(l(),d("div",dw,[t[16]||(t[16]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fetchError),1)])):m("v-if",!0),E((l(),d("form",uw,[s("div",cw,[s("div",pw,[E(s("input",fw,null,512),[[o,{state:e.viewState,set:n=>{e.query.search=n},value:e.query?.search,form:null,options:{}}]]),e.query?.search?m("v-if",!0):(l(),d("span",mw,"/"))]),s("span",hw,[t[18]||(t[18]=s("label",null,"Role",-1)),E((l(),d("select",vw,[...t[17]||(t[17]=[s("option",{value:""},"Any",-1),s("option",{value:"admin"},"Admin",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.role=n},value:e.query?.role,form:null,options:{}}]])]),t[22]||(t[22]=s("span",{class:"admin-filter-spacer"},null,-1)),s("button",{class:"btn btn-sm",type:"button",onClick:t[3]||(t[3]=n=>e.exportCsv())},[...t[19]||(t[19]=[s("i",{class:"fas fa-file-csv"},null,-1),y(" Export",-1)])]),s("span",yw,[s("button",{class:"btn btn-sm",type:"button",onClick:t[4]||(t[4]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[20]||(t[20]=[s("i",{class:"fas fa-chevron-left"},null,-1)])],8,gw),s("span",bw,c(e.query?.page)+"/"+c(e.totalPage||1),1),s("button",{class:"btn btn-sm",type:"button",onClick:t[5]||(t[5]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[21]||(t[21]=[s("i",{class:"fas fa-chevron-right"},null,-1)])],8,ww)])]),e.chips?.length?(l(),d("div",kw,[s("div",_w,[(l(!0),d(x,null,re(e.chips,(n,i)=>(l(),d("span",{class:"admin-active-chip",key:n?.key},[s("span",Ew,c(n?.label),1),s("span",null,c(n?.value),1),s("button",{type:"button",onClick:a=>e.clearFilter(n.key)},[...t[23]||(t[23]=[s("i",{class:"fas fa-times"},null,-1)])],8,Cw)]))),128))])])):m("v-if",!0)])),[[r,e.viewState]]),e.selectedCount()>0?(l(),d("div",Nw,[s("span",null,[s("strong",null,c(e.selectedCount()),1),t[24]||(t[24]=y(" selected",-1))]),s("button",{class:"btn btn-sm text-danger",type:"button",onClick:t[6]||(t[6]=n=>e.bulkBan())},[...t[25]||(t[25]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])]),s("button",{class:"btn btn-sm",type:"button",onClick:t[7]||(t[7]=n=>{e.selected={},e.allSelected=!1})},"Clear")])):m("v-if",!0),s("div",Sw,[s("div",Dw,[s("div",Rw,[s("input",{type:"checkbox","aria-label":"Select all on page",onClick:t[8]||(t[8]=n=>e.selectAllOnPage()),checked:e.allSelected},null,8,Tw)]),s("div",Ow,[s("span",{class:T(["sortable",{active:e.query?.sort=="username"}]),onClick:t[9]||(t[9]=n=>e.sortBy("username"))},[t[26]||(t[26]=y("User ",-1)),s("i",{class:T(["fas",e.sortIcon("username")])},null,2)],2)]),t[28]||(t[28]=s("div",{role:"columnheader",class:"num"},"Repos",-1)),s("div",Aw,[s("span",{class:T(["sortable",{active:e.query?.sort=="status"}]),onClick:t[10]||(t[10]=n=>e.sortBy("status"))},[t[27]||(t[27]=y("Status ",-1)),s("i",{class:T(["fas",e.sortIcon("status")])},null,2)],2)]),t[29]||(t[29]=s("div",{role:"columnheader"},"Role",-1)),t[30]||(t[30]=s("div",{role:"columnheader","aria-label":"Actions"},null,-1))]),(l(!0),d(x,null,re(e.filteredUsers,(n,i)=>(l(),d("div",{class:T(["paper-table-row admin-users-row",{"row-selected":e.selected[n?.username]}]),role:"row"},[s("div",Iw,[E(s("input",Vw,null,512),[[o,{state:e.viewState,set:a=>{e.selected[n.username]=a},value:e.selected[n?.username],form:null,options:{}}]])]),s("div",Pw,[n?.photo?(l(),d("img",{key:0,width:"28",height:"28",class:"rounded-circle",style:{"flex-shrink":"0"},src:e.safeUrl(n?.photo)},null,8,qw)):m("v-if",!0),s("div",Mw,[s("a",{class:"repo-name",textContent:c(n?.username),href:e.safeUrl("/admin/users/"+n?.username)},null,8,$w),s("div",Fw,[n?.emails[0].email?(l(),d("span",Lw,c(n?.emails[0].email),1)):m("v-if",!0),n?.emails[0].email?(l(),d("span",Uw,"\xA0\xB7\xA0")):m("v-if",!0),s("a",{target:"_blank",href:e.safeUrl("https://github.com/"+n?.username)},[t[31]||(t[31]=s("i",{class:"fab fa-github"},null,-1)),y(" "+c(n?.username),1)],8,zw),n?.dateOfEntry?(l(),d("span",Hw,"\xA0\xB7\xA0Joined "+c(e.fmt?.humanTime(n?.dateOfEntry)),1)):m("v-if",!0)])])]),s("div",Bw,[s("a",{title:"Show this user's repositories",textContent:c(e.fmt?.number(n?.repoCount||0)),href:e.safeUrl("/admin/?owner="+n?.username)},null,8,Gw)]),s("div",jw,[s("span",{class:T(["status-dot",{"status-ready":n?.status=="active","status-removed":n?.status=="removed"||n?.status=="banned"}])},null,2),s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,Ww)]),s("div",Kw,[n?.isAdmin?(l(),d("span",Yw,"Admin")):m("v-if",!0),n?.isAdmin?m("v-if",!0):(l(),d("span",xw,"\u2014"))]),s("div",Jw,[s("div",Qw,[t[37]||(t[37]=s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions"},[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"})],-1)),s("div",Xw,[s("a",{class:"dropdown-item",href:e.safeUrl("/admin/users/"+n?.username)},[...t[32]||(t[32]=[s("i",{class:"far fa-eye"},null,-1),y(" View details",-1)])],8,Zw),s("a",{class:"dropdown-item",href:e.safeUrl("/admin/?owner="+n?.username)},[...t[33]||(t[33]=[s("i",{class:"fas fa-code-branch"},null,-1),y(" View repositories",-1)])],8,ek),t[36]||(t[36]=s("div",{class:"dropdown-divider"},null,-1)),E(s("a",{class:"dropdown-item text-danger",href:"#",onClick:ge(a=>e.banUser(n),["prevent"])},[...t[34]||(t[34]=[s("i",{class:"fas fa-ban"},null,-1),y(" Ban",-1)])],8,tk),[[H,n?.status=="active"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.activateUser(n),["prevent"])},[...t[35]||(t[35]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Activate",-1)])],8,sk),[[H,n?.status=="removed"||n?.status=="banned"]])])])])],2))),256)),e.filteredUsers?.length==0?(l(),d("div",nk,[...t[38]||(t[38]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No users match the current filters.",-1)])])):m("v-if",!0)]),s("div",ok,[s("span",rk,c(e.fmt?.number(e.total))+" results",1),e.totalPage>1?(l(),d("div",ik,[s("button",{class:"btn btn-sm",onClick:t[11]||(t[11]=n=>e.query.page=Math.max(1,e.query.page-1)),disabled:e.query?.page<=1},[...t[39]||(t[39]=[s("i",{class:"fas fa-chevron-left"},null,-1),y(" Previous",-1)])],8,ak),E(s("input",{type:"number",class:"form-control form-control-sm",min:"1",style:{width:"56px"},max:e.totalPage},null,8,lk),[[o,{state:e.viewState,set:n=>{e.query.page=n},value:e.query?.page,form:null,options:{}}]]),s("span",null,"of "+c(e.totalPage),1),s("button",{class:"btn btn-sm",onClick:t[12]||(t[12]=n=>e.query.page=Math.min(e.totalPage,e.query.page+1)),disabled:e.query?.page>=e.totalPage},[...t[40]||(t[40]=[y("Next ",-1),s("i",{class:"fas fa-chevron-right"},null,-1)])],8,dk)])):m("v-if",!0),s("span",uk,[t[42]||(t[42]=s("label",null,"Per page",-1)),E((l(),d("select",ck,[...t[41]||(t[41]=[s("option",{value:"10"},"10",-1),s("option",{value:"25"},"25",-1),s("option",{value:"50"},"50",-1),s("option",{value:"100"},"100",-1)])])),[[o,{state:e.viewState,set:n=>{e.query.limit=n},value:e.query?.limit,form:null,options:{}}]])])])])}var pk={class:"anonymize-page h-100"},fk={class:"anonymize-landing"},mk={class:"anonymize-landing-inner"},hk={class:"form-group mt-4 mb-2"},vk={id:"sourceUrl-landing",type:"text",class:"form-control form-control-lg",placeholder:"https://github.com/owner/repository"},yk={class:"anonymize-workspace"},gk={class:"anonymize-topbar"},bk={class:"anonymize-topbar-inner"},wk={class:"paper-crumbs"},kk={class:"here"},_k={class:"anonymize-topbar-head"},Ek={class:"paper-page-title anonymize-topbar-title"},Ck={key:0},Nk={key:1},Sk={class:"anonymize-split"},Dk={class:"anonymize-form-col overflow-auto"},Rk={class:"form needs-validation paper-settings-main",name:"anonymize",novalidate:""},Tk={class:"paper-settings-section"},Ok={class:"form-group"},Ak=["disabled"],Ik={class:"invalid-feedback"},Vk={class:"invalid-feedback"},Pk={class:"invalid-feedback"},qk={class:"invalid-feedback"},Mk={class:"form-grid-2"},$k={class:"form-group"},Fk={class:"input-group"},Lk={class:"form-control",id:"branch",name:"branch"},Uk=["textContent","value"],zk={class:"input-group-append"},Hk={class:"form-group"},Bk=["disabled"],Gk={class:"invalid-feedback"},jk={class:"invalid-feedback"},Wk={class:"form-check"},Kk={class:"form-check-input",type:"checkbox",id:"update",name:"update"},Yk={class:"paper-settings-section"},xk={class:"form-group"},Jk=["disabled"],Qk={class:"form-text text-muted"},Xk={class:"invalid-feedback"},Zk={class:"form-group"},e_=["disabled"],t_={class:"form-text text-muted"},s_={class:"invalid-feedback"},n_={class:"form-group"},o_=["disabled"],r_={class:"form-text text-muted"},i_={class:"invalid-feedback"},a_={class:"form-group"},l_={class:"form-text text-muted"},d_=["href"],u_={class:"invalid-feedback"},c_={class:"form-text text-muted"},p_={class:"paper-settings-section"},f_={class:"form-group"},m_={class:"form-text text-muted"},h_={class:"warning-feedback"},v_={class:"invalid-feedback"},y_={class:"paper-settings-section"},g_={class:"form-check"},b_={class:"form-check-input",type:"checkbox",id:"link",name:"link"},w_={class:"form-check"},k_={class:"form-check-input",type:"checkbox",id:"image",name:"image"},__={class:"form-check"},E_={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},C_={class:"form-check"},N_={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},S_={class:"form-check"},D_=["disabled"],R_={class:"form-check"},T_={class:"form-check-input",type:"checkbox",id:"title-gist",name:"title-gist"},O_={class:"form-check"},A_={class:"form-check-input",type:"checkbox",id:"content-gist",name:"content-gist"},I_={class:"form-check"},V_={class:"form-check-input",type:"checkbox",id:"comments-gist",name:"comments-gist"},P_={class:"form-check"},q_={class:"form-check-input",type:"checkbox",id:"username-gist",name:"username-gist"},M_={class:"form-check"},$_={class:"form-check-input",type:"checkbox",id:"date-gist",name:"date-gist"},F_={class:"form-check"},L_={class:"form-check-input",type:"checkbox",id:"origin-gist",name:"origin-gist"},U_={class:"form-check"},z_={class:"form-check-input",type:"checkbox",id:"title",name:"title"},H_={class:"form-check"},B_={class:"form-check-input",type:"checkbox",id:"body",name:"body"},G_={class:"form-check"},j_={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},W_={class:"form-check"},K_={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},Y_={class:"form-check"},x_={class:"form-check-input",type:"checkbox",id:"username",name:"username"},J_={class:"form-check"},Q_={class:"form-check-input",type:"checkbox",id:"date",name:"date"},X_={class:"form-check"},Z_={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},e0={class:"paper-settings-section"},t0={class:"form-grid-2"},s0={class:"form-group"},n0={class:"form-control",id:"expiration",name:"expiration"},o0={class:"form-group"},r0=["min","max"],i0={class:"invalid-feedback"},a0={class:"invalid-feedback"},l0={class:"paper-settings-section"},d0={class:"form-group"},u0={style:{position:"relative"}},c0={type:"text",id:"coauthorSearch",class:"form-control",placeholder:"Search GitHub username\u2026",autocomplete:"off"},p0={class:"dropdown-menu show",style:{display:"block","max-height":"220px","overflow-y":"auto",width:"100%"}},f0=["onClick"],m0=["src"],h0=["textContent"],v0=["textContent"],y0={class:"coauthor-list"},g0={class:"coauthor-row d-flex align-items-center",style:{padding:"6px 0",gap:"8px"}},b0=["src"],w0=["textContent","href"],k0=["onClick"],_0={class:"form-text text-muted"},E0=["textContent"],C0={class:"anonymize-submit-bar"},N0={key:0,class:"anonymize-preview-col"},S0=["innerHTML"],D0={key:1,class:"anonymize-preview-col"},R0={class:"anonymize-preview-body"},T0={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},O0={class:"pr-title mb-1"},A0={key:0},I0=["textContent"],V0={key:0},P0={key:1},q0={key:2},M0={class:"pr-comments mt-3"},$0={class:"pr-comment"},F0={class:"pr-comment-head"},L0=["textContent"],U0={key:0,class:"pr-comment-date"},z0={key:3},H0={class:"pr-comments"},B0={class:"pr-comment"},G0={class:"pr-comment-head"},j0={key:0,class:"pr-comment-author"},W0=["textContent"],K0=["textContent"],Y0={key:0,class:"pr-comment-body"},x0={key:2,class:"anonymize-preview-col"},J0={class:"anonymize-preview-body"},Q0={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},X0={class:"pr-title mb-1"},Z0={key:0},eE=["textContent"],tE={key:0},sE={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--paper-bg-alt)"}},nE={key:2,class:"paper-tabs",role:"tablist"},oE=["textContent"],rE={class:"paper-tab-content"},iE={key:0},aE=["innerHTML"],lE={key:1},dE={class:"pr-comments"},uE={class:"pr-comment"},cE={class:"pr-comment-head"},pE={key:0,class:"pr-comment-author"},fE=["textContent"],mE=["textContent"],hE={key:0,class:"pr-comment-body"};function ja(e,t){let o=Qe("gist-file"),r=Qe("markdown"),n=ye("field"),i=ye("form");return l(),d("div",pk,[m(" ===== STATE 1: No URL \u2014 centered input ===== "),E(s("div",fk,[s("div",mk,[t[10]||(t[10]=s("div",{class:"paper-crumbs"},[y("My work \xA0/\xA0 "),s("span",{class:"here"},"New anonymization")],-1)),t[11]||(t[11]=s("h1",{class:"paper-page-title"},[y("New "),s("em",null,"anonymization")],-1)),t[12]||(t[12]=s("p",{class:"paper-page-lede"}," Paste a GitHub repository, pull-request, or gist URL. We\u2019ll fetch it, strip every trace of identity, and hand you back a stable link. ",-1)),s("div",hk,[t[9]||(t[9]=s("label",{class:"paper-field-label",for:"sourceUrl-landing"},"Source URL",-1)),E(s("input",vk,null,512),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:null,options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]])]),t[13]||(t[13]=s("small",{class:"form-text",style:{color:"var(--ink-muted)"}}," Repository, pull request (\u2026/pull/42) and gist (gist.github.com/\u2026) URLs are all accepted. ",-1))])],512),[[H,!e.sourceUrl]]),m(" ===== STATE 2: URL provided \u2014 form (left) + preview (right) ===== "),E(s("div",yk,[s("header",gk,[s("div",bk,[s("div",wk,[t[14]||(t[14]=s("a",{href:"/dashboard"},"My work",-1)),t[15]||(t[15]=y(" \xA0/\xA0 ",-1)),s("span",kk,c(e.isUpdate?"Edit anonymization":"New anonymization"),1)]),s("div",_k,[s("h1",Ek,[e.isUpdate?m("v-if",!0):(l(),d("span",Ck,[...t[16]||(t[16]=[y("New ",-1),s("em",null,"anonymization",-1)])])),e.isUpdate?(l(),d("span",Nk,[...t[17]||(t[17]=[y("Edit ",-1),s("em",null,"anonymization",-1)])])):m("v-if",!0)]),E(s("span",{class:T(["type-badge",{"type-repo":e.detectedType==="repo","type-pr":e.detectedType==="pr","type-gist":e.detectedType==="gist"}])},c(e.detectedType==="repo"?"Repo":e.detectedType==="pr"?"PR":"Gist"),3),[[H,e.detectedType]])])])]),s("div",Sk,[m(" Form column (left) "),s("div",Dk,[E((l(),d("form",Rk,[s("section",Tk,[t[24]||(t[24]=s("div",{class:"paper-section-eyebrow"},"Source",-1)),s("div",Ok,[t[18]||(t[18]=s("label",{class:"paper-field-label",for:"sourceUrl"},"GitHub URL",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.sourceUrl?.invalid}]),name:"sourceUrl",id:"sourceUrl",disabled:e.isUpdate&&e.detectedType!=="repo",placeholder:"Paste a GitHub repo or pull request URL"},null,10,Ak),[[n,{state:e.viewState,set:a=>{e.sourceUrl=a},value:e.sourceUrl,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.urlSelected()}}]]),E(s("div",Ik," Please provide a valid GitHub URL. ",512),[[H,e.anonymize?.sourceUrl?.errors?.github]]),E(s("div",Vk," Not accessible. The organization may restrict access. ",512),[[H,e.anonymize?.sourceUrl?.errors?.access]]),E(s("div",Pk," Does not exist or is not accessible. ",512),[[H,e.anonymize?.sourceUrl?.errors?.missing]]),E(s("div",qk," Already anonymized. ",512),[[H,e.anonymize?.sourceUrl?.errors?.used]])]),E(s("div",Mk,[s("div",$k,[t[20]||(t[20]=s("label",{class:"paper-field-label",for:"branch"},"Branch",-1)),s("div",Fk,[E((l(),d("select",Lk,[(l(!0),d(x,null,re(e.branches,(a,u)=>(l(),d("option",{textContent:c(a?.name),value:a?.name},null,8,Uk))),256))])),[[n,{state:e.viewState,set:a=>{e.source.branch=a},value:e.source?.branch,form:"anonymize",options:{}}]]),s("div",zk,[s("button",{class:"btn",type:"button",title:"Refresh","data-toggle":"tooltip","data-placement":"bottom",onClick:t[0]||(t[0]=a=>e.getBranches(!0))},[...t[19]||(t[19]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1)])])])])]),s("div",Hk,[t[21]||(t[21]=s("label",{class:"paper-field-label",for:"commit"},"Commit",-1)),E(s("input",{class:T(["form-control",{"is-invalid":e.anonymize?.commit?.invalid}]),id:"commit",disabled:e.options.update,name:"commit",pattern:"[a-fA-Z0-9]{6,}",required:""},null,10,Bk),[[n,{state:e.viewState,set:a=>{e.source.commit=a},value:e.source?.commit,form:"anonymize",options:{}}]]),E(s("div",Gk," The commit SHA is not valid. ",512),[[H,e.anonymize?.commit?.errors?.pattern||e.anonymize?.commit?.errors?.required]]),E(s("div",jk," This commit no longer exists in the repository. Click refresh to get the latest. ",512),[[H,e.anonymize?.commit?.errors?.exists]])])],512),[[H,e.detectedType==="repo"]]),E(s("div",Wk,[E(s("input",Kk,null,512),[[n,{state:e.viewState,set:a=>{e.options.update=a},value:e.options?.update,form:"anonymize",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[23]||(t[23]=s("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))],512),[[H,e.detectedType]])]),E(s("section",Yk,[t[35]||(t[35]=s("div",{class:"paper-section-eyebrow"},"Identity",-1)),E(s("div",xk,[t[27]||(t[27]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.repoId?.invalid}]),name:"repoId",id:"repoId",disabled:e.isUpdate},null,10,Jk),[[n,{state:e.viewState,set:a=>{e.repoId=a},value:e.repoId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",Qk,[t[25]||(t[25]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/r/"+c(e.repoId),1),t[26]||(t[26]=y(".",-1))]),E(s("div",Xk,"ID can only contain letters and numbers.",512),[[H,e.anonymize?.repoId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.repoId)+" is already used.",513),[[H,e.anonymize?.repoId?.errors?.used]])],512),[[H,e.detectedType==="repo"]]),E(s("div",Zk,[t[30]||(t[30]=s("label",{class:"paper-field-label",for:"pullRequestId"},"Anonymized pull request ID",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId",disabled:e.isUpdate},null,10,e_),[[n,{state:e.viewState,set:a=>{e.pullRequestId=a},value:e.pullRequestId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",t_,[t[28]||(t[28]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/pr/"+c(e.pullRequestId),1),t[29]||(t[29]=y(".",-1))]),E(s("div",s_,"ID can only contain letters and numbers.",512),[[H,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used.",513),[[H,e.anonymize?.pullRequestId?.errors?.used]])],512),[[H,e.detectedType==="pr"]]),E(s("div",n_,[t[33]||(t[33]=s("label",{class:"paper-field-label",for:"gistId"},"Anonymized gist ID",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.gistId?.invalid}]),name:"gistId",id:"gistId",disabled:e.isUpdate},null,10,o_),[[n,{state:e.viewState,set:a=>{e.gistId=a},value:e.gistId,form:"anonymize",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",r_,[t[31]||(t[31]=y("Your share link will be ",-1)),s("code",null,"anonymous.4open.science/gist/"+c(e.gistId),1),t[32]||(t[32]=y(".",-1))]),E(s("div",i_,"ID can only contain letters and numbers.",512),[[H,e.anonymize?.gistId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.gistId)+" is already used.",513),[[H,e.anonymize?.gistId?.errors?.used]])],512),[[H,e.detectedType==="gist"]]),s("div",a_,[t[34]||(t[34]=s("label",{class:"paper-field-label",for:"conference"},[y("Conference "),s("span",{class:"paper-optional"},"(optional)")],-1)),E(s("input",{class:T(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[n,{state:e.viewState,set:a=>{e.conference=a},value:e.conference,form:"anonymize",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",l_,[s("a",{target:"_blank",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,d_),y(" expires "+c(e.fmt?.date(e.conference_data?.endDate))+". ",1)],512),[[H,e.conference_data]]),E(s("div",u_,"The conference is not activated.",512),[[H,e.anonymize?.conference?.errors?.activated]]),E(s("small",c_,"Link to a conference to apply its shared defaults.",512),[[H,!e.conference_data]])])],512),[[H,e.detectedType]]),E(s("section",p_,[t[43]||(t[43]=s("div",{class:"paper-section-eyebrow"},"Anonymization",-1)),s("div",f_,[t[42]||(t[42]=s("label",{class:"paper-field-label",for:"terms"},"Terms to redact",-1)),E(s("textarea",{class:T(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"4"},null,2),[[n,{state:e.viewState,set:a=>{e.terms=a},value:e.terms,form:"anonymize",options:{debounce:250}}]]),s("small",m_,[t[36]||(t[36]=y("One term per line (regex allowed). Replaced by ",-1)),s("code",null,c(e.site_options?.ANONYMIZATION_MASK)+"-[N]",1),t[37]||(t[37]=y(", or use ",-1)),t[38]||(t[38]=s("code",null,"term=>replacement",-1)),t[39]||(t[39]=y(" to pick your own (e.g. ",-1)),t[40]||(t[40]=s("code",null,"Anonymous=>ABC",-1)),t[41]||(t[41]=y(").",-1))]),E(s("div",h_,"Regex characters detected. Escape them if unintentional.",512),[[H,e.termsRegexWarning]]),E(s("div",v_,"Terms are in an invalid format.",512),[[H,e.anonymize?.terms?.errors?.format]])])],512),[[H,e.detectedType]]),E(s("section",y_,[t[62]||(t[62]=s("div",{class:"paper-section-eyebrow"},"Display",-1)),E(s("div",null,[s("div",g_,[E(s("input",b_,null,512),[[n,{state:e.viewState,set:a=>{e.options.link=a},value:e.options?.link,form:"anonymize",options:{}}]]),t[44]||(t[44]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1))]),s("div",w_,[E(s("input",k_,null,512),[[n,{state:e.viewState,set:a=>{e.options.image=a},value:e.options?.image,form:"anonymize",options:{}}]]),t[45]||(t[45]=s("label",{class:"form-check-label",for:"image"},"Display images",-1))]),s("div",__,[E(s("input",E_,null,512),[[n,{state:e.viewState,set:a=>{e.options.pdf=a},value:e.options?.pdf,form:"anonymize",options:{}}]]),t[46]||(t[46]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1))]),s("div",C_,[E(s("input",N_,null,512),[[n,{state:e.viewState,set:a=>{e.options.notebook=a},value:e.options?.notebook,form:"anonymize",options:{}}]]),t[47]||(t[47]=s("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))]),s("div",S_,[E(s("input",{class:"form-check-input",type:"checkbox",id:"page",name:"page",disabled:!e.details?.hasPage||e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch},null,8,D_),[[n,{state:e.viewState,set:a=>{e.options.page=a},value:e.options?.page,form:"anonymize",options:{}}]]),t[48]||(t[48]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_not_enabled_on_repo")),513),[[H,!e.details?.hasPage]]),E(s("small",{class:"form-text text-muted d-block"},c(e.fmt?.translate("WARNINGS.page_branch_mismatch",{pageBranch:e.details?.pageSource?.branch,selectedBranch:e.source?.branch})),513),[[H,e.details?.hasPage&&e.details?.pageSource&&e.details?.pageSource?.branch!==e.source?.branch]])])],512),[[H,e.detectedType==="repo"]]),E(s("div",null,[s("div",R_,[E(s("input",T_,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[49]||(t[49]=s("label",{class:"form-check-label",for:"title-gist"},"Gist description",-1))]),s("div",O_,[E(s("input",A_,null,512),[[n,{state:e.viewState,set:a=>{e.options.content=a},value:e.options?.content,form:"anonymize",options:{}}]]),t[50]||(t[50]=s("label",{class:"form-check-label",for:"content-gist"},"File contents",-1))]),s("div",I_,[E(s("input",V_,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[51]||(t[51]=s("label",{class:"form-check-label",for:"comments-gist"},"Comments",-1))]),s("div",P_,[E(s("input",q_,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[52]||(t[52]=s("label",{class:"form-check-label",for:"username-gist"},"Usernames",-1))]),s("div",M_,[E(s("input",$_,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[53]||(t[53]=s("label",{class:"form-check-label",for:"date-gist"},"Dates",-1))]),s("div",F_,[E(s("input",L_,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[54]||(t[54]=s("label",{class:"form-check-label",for:"origin-gist"},"Source gist ID",-1))])],512),[[H,e.detectedType==="gist"]]),E(s("div",null,[s("div",U_,[E(s("input",z_,null,512),[[n,{state:e.viewState,set:a=>{e.options.title=a},value:e.options?.title,form:"anonymize",options:{}}]]),t[55]||(t[55]=s("label",{class:"form-check-label",for:"title"},"PR title",-1))]),s("div",H_,[E(s("input",B_,null,512),[[n,{state:e.viewState,set:a=>{e.options.body=a},value:e.options?.body,form:"anonymize",options:{}}]]),t[56]||(t[56]=s("label",{class:"form-check-label",for:"body"},"PR body",-1))]),s("div",G_,[E(s("input",j_,null,512),[[n,{state:e.viewState,set:a=>{e.options.diff=a},value:e.options?.diff,form:"anonymize",options:{}}]]),t[57]||(t[57]=s("label",{class:"form-check-label",for:"diff"},"Diff",-1))]),s("div",W_,[E(s("input",K_,null,512),[[n,{state:e.viewState,set:a=>{e.options.comments=a},value:e.options?.comments,form:"anonymize",options:{}}]]),t[58]||(t[58]=s("label",{class:"form-check-label",for:"comments"},"Comments",-1))]),s("div",Y_,[E(s("input",x_,null,512),[[n,{state:e.viewState,set:a=>{e.options.username=a},value:e.options?.username,form:"anonymize",options:{}}]]),t[59]||(t[59]=s("label",{class:"form-check-label",for:"username"},"Usernames",-1))]),s("div",J_,[E(s("input",Q_,null,512),[[n,{state:e.viewState,set:a=>{e.options.date=a},value:e.options?.date,form:"anonymize",options:{}}]]),t[60]||(t[60]=s("label",{class:"form-check-label",for:"date"},"Dates",-1))]),s("div",X_,[E(s("input",Z_,null,512),[[n,{state:e.viewState,set:a=>{e.options.origin=a},value:e.options?.origin,form:"anonymize",options:{}}]]),t[61]||(t[61]=s("label",{class:"form-check-label",for:"origin"},"Project name",-1))])],512),[[H,e.detectedType==="pr"]])],512),[[H,e.detectedType]]),E(s("section",e0,[t[66]||(t[66]=s("div",{class:"paper-section-eyebrow"},"Expiration",-1)),s("div",t0,[s("div",s0,[t[64]||(t[64]=s("label",{class:"paper-field-label",for:"expiration"},"Strategy",-1)),E((l(),d("select",n0,[...t[63]||(t[63]=[s("option",{value:"redirect"},"Redirect to GitHub when expired",-1),s("option",{value:"remove",selected:""},"Remove when expired",-1)])])),[[n,{state:e.viewState,set:a=>{e.options.expirationMode=a},value:e.options?.expirationMode,form:"anonymize",options:{}}]])]),s("div",o0,[t[65]||(t[65]=s("label",{class:"paper-field-label",for:"expirationDate"},"Expiration date",-1)),E(s("input",{class:T(["form-control",{"is-invalid":e.anonymize?.expirationDate?.invalid}]),type:"date",name:"expirationDate",id:"expirationDate",required:"",min:e.minExpirationDate,max:e.maxExpirationDate},null,10,r0),[[n,{state:e.viewState,set:a=>{e.options.expirationDate=a},value:e.options?.expirationDate,form:"anonymize",options:{}}]]),E(s("div",i0,"Pick a date in the future.",512),[[H,e.anonymize?.expirationDate?.errors?.min]]),E(s("div",{class:"invalid-feedback"},"Pick a date on or before "+c(e.fmt?.date(e.maxExpirationDate))+".",513),[[H,e.anonymize?.expirationDate?.errors?.max]]),E(s("div",a0,"Enter a valid expiration date.",512),[[H,e.anonymize?.expirationDate?.errors?.required||e.anonymize?.expirationDate?.errors?.date]])])]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the content will be removed.",513),[[H,e.options?.expirationMode=="remove"&&e.options?.expirationDate]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", visitors will be redirected to GitHub.",513),[[H,e.options?.expirationMode=="redirect"&&e.options?.expirationDate]])],512),[[H,e.detectedType]]),E(s("section",l0,[t[70]||(t[70]=s("div",{class:"paper-section-eyebrow"},"Co-authors",-1)),t[71]||(t[71]=s("p",{class:"form-text text-muted",style:{"margin-bottom":"8px"}}," Co-authors can view and edit these settings. They cannot delete the anonymization or manage co-authors. ",-1)),E(s("div",d0,[t[67]||(t[67]=s("label",{class:"paper-field-label",for:"coauthorSearch"},"Add a GitHub user",-1)),s("div",u0,[E(s("input",c0,null,512),[[n,{state:e.viewState,set:a=>{e.coauthorSearch=a},value:e.coauthorSearch,form:"anonymize",options:{debounce:300},change:()=>{e.searchCoauthors()}}]]),E(s("div",p0,[(l(!0),d(x,null,re(e.coauthorResults,(a,u)=>(l(),d("a",{href:"#",class:"dropdown-item d-flex align-items-center",onClick:ge(p=>e.addCoauthor(a,p),["prevent"])},[s("img",{alt:"",style:{width:"22px",height:"22px","border-radius":"50%","margin-right":"8px"},src:e.safeUrl(a?.photo)},null,8,m0),s("span",{textContent:c(a?.username)},null,8,h0)],8,f0))),256))],512),[[H,e.coauthorResults?.length>0]])]),E(s("small",{class:"form-text text-muted",textContent:c(e.coauthorError)},null,8,v0),[[H,e.coauthorError]])],512),[[H,e.role==="owner"||e.role==="admin"]]),s("div",y0,[(l(!0),d(x,null,re(e.coauthors,(a,u)=>(l(),d("div",g0,[a?.photo?(l(),d("img",{key:0,alt:"",style:{width:"24px",height:"24px","border-radius":"50%"},src:e.safeUrl(a?.photo)},null,8,b0)):m("v-if",!0),s("a",{target:"_blank",textContent:c(a?.username),href:e.safeUrl("https://github.com/"+a?.username)},null,8,w0),t[69]||(t[69]=s("span",{class:"type-badge type-coauthor"},"Co-author",-1)),E(s("button",{type:"button",class:"btn btn-sm",style:{"margin-left":"auto"},title:"Remove co-author",onClick:p=>e.removeCoauthor(a)},[...t[68]||(t[68]=[s("i",{class:"fas fa-times"},null,-1)])],8,k0),[[H,e.role==="owner"||e.role==="admin"]])]))),256)),E(s("div",_0," No co-authors yet. ",512),[[H,!e.coauthors||e.coauthors?.length===0]])])],512),[[H,e.isUpdate&&e.detectedType==="repo"]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,E0)):m("v-if",!0),E(s("div",C0,[e.detectedType==="repo"&&!e.isUpdate?(l(),d("button",{key:0,type:"submit",class:"btn btn-ink",onClick:t[1]||(t[1]=ge(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[72]||(t[72]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Repository ",-1)])])):m("v-if",!0),e.detectedType==="repo"&&e.isUpdate?(l(),d("button",{key:1,type:"submit",class:"btn btn-ink",onClick:t[2]||(t[2]=ge(a=>e.submitForm(a,()=>{e.anonymizeRepo(a)}),["prevent"]))},[...t[73]||(t[73]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Repository ",-1)])])):m("v-if",!0),e.detectedType==="pr"&&!e.isUpdate?(l(),d("button",{key:2,type:"submit",class:"btn btn-ink",onClick:t[3]||(t[3]=ge(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[74]||(t[74]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Pull Request ",-1)])])):m("v-if",!0),e.detectedType==="pr"&&e.isUpdate?(l(),d("button",{key:3,type:"submit",class:"btn btn-ink",onClick:t[4]||(t[4]=ge(a=>e.submitForm(a,()=>{e.anonymizePullRequest(a)}),["prevent"]))},[...t[75]||(t[75]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Pull Request ",-1)])])):m("v-if",!0),e.detectedType==="gist"&&!e.isUpdate?(l(),d("button",{key:4,type:"submit",class:"btn btn-ink",onClick:t[5]||(t[5]=ge(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[76]||(t[76]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize Gist ",-1)])])):m("v-if",!0),e.detectedType==="gist"&&e.isUpdate?(l(),d("button",{key:5,type:"submit",class:"btn btn-ink",onClick:t[6]||(t[6]=ge(a=>e.submitForm(a,()=>{e.anonymizeGist(a)}),["prevent"]))},[...t[77]||(t[77]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update Gist ",-1)])])):m("v-if",!0)],512),[[H,e.detectedType]])])),[[i,e.viewState]])]),m(" Preview column (right) "),e.detectedType==="repo"&&e.html_readme?(l(),d("div",N0,[t[78]||(t[78]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"README with redactions applied")],-1)),s("div",{class:"anonymize-preview-body markdown-body body",innerHTML:e.sanitize(e.html_readme)},null,8,S0)])):m("v-if",!0),e.detectedType==="gist"&&e.details?(l(),d("div",D0,[t[82]||(t[82]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Gist with redactions applied")],-1)),s("div",R0,[s("div",T0,[s("h2",O0,[e.options?.title?(l(),d("span",A0,c(e.anonymizeGistContent(e.details?.gist?.description)||"Untitled gist"),1)):m("v-if",!0),s("span",{class:T(["badge",{"badge-success":e.details?.gist?.isPublic,"badge-secondary":!e.details?.gist?.isPublic}])},c(e.details?.gist?.isPublic?"public":"secret"),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.gist?.updatedDate))},null,8,I0)):m("v-if",!0)]),e.options?.origin?(l(),d("small",V0,"Gist ID: "+c(e.details?.source?.gistId),1)):m("v-if",!0),e.options?.username&&e.details?.gist?.ownerLogin?(l(),d("small",P0,"By @"+c(e.anonymizeGistContent(e.details?.gist?.ownerLogin)),1)):m("v-if",!0),e.options?.content&&e.previewGistFiles?.length?(l(),d("div",q0,[s("ul",M0,[(l(!0),d(x,null,re(e.previewGistFiles,(a,u)=>(l(),d("li",$0,[s("div",F0,[s("strong",{textContent:c(a?.filename)},null,8,L0),a?.language?(l(),d("span",U0,c(a?.language),1)):m("v-if",!0)]),Re(o,{file:a,terms:e.terms,options:e.options},null,8,["file","terms","options"])]))),256))])])):m("v-if",!0),e.options?.comments&&e.details?.gist?.comments&&e.details?.gist?.comments?.length?(l(),d("div",z0,[t[81]||(t[81]=s("h3",{class:"paper-section-eyebrow mt-3"},"Comments",-1)),s("ul",H0,[(l(!0),d(x,null,re(e.details?.gist?.comments,(a,u)=>(l(),d("li",B0,[s("div",G0,[e.options?.username?(l(),d("span",j0,[t[79]||(t[79]=s("i",{class:"far fa-user"},null,-1)),t[80]||(t[80]=y(" @",-1)),s("span",{textContent:c(e.anonymizeGistContent(a?.author))},null,8,W0)])):m("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,K0)):m("v-if",!0)]),e.options?.body?(l(),d("div",Y0,[Re(r,{content:e.anonymizeGistContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):m("v-if",!0)]))),256))])])):m("v-if",!0)])])):m("v-if",!0),e.detectedType==="pr"&&e.details?(l(),d("div",x0,[t[87]||(t[87]=s("div",{class:"anonymize-preview-head"},[s("span",{class:"paper-eyebrow"},"Live preview"),s("span",{class:"anonymize-preview-sub"},"Pull request with redactions applied")],-1)),s("div",J0,[s("div",Q0,[s("h2",X0,[e.options?.title?(l(),d("span",Z0,c(e.anonymizePrContent(e.details?.pullRequest?.title)),1)):m("v-if",!0),s("span",{class:T(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,eE)):m("v-if",!0)]),e.options?.origin?(l(),d("small",tE,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):m("v-if",!0),e.options?.body?(l(),d("div",sE,[Re(r,{content:e.anonymizePrContent(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):m("v-if",!0),e.options?.diff||e.options?.comments?(l(),d("nav",nE,[e.options?.diff?(l(),d("button",{key:0,class:T(["paper-tab",{active:e.prTabState?.active=="diff"}]),type:"button",role:"tab",onClick:t[7]||(t[7]=a=>e.prTabState.active="diff")},[...t[83]||(t[83]=[s("i",{class:"fas fa-code"},null,-1),y(" Diff ",-1)])],2)):m("v-if",!0),e.options?.comments?(l(),d("button",{key:1,class:T(["paper-tab",{active:e.prTabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[8]||(t[8]=a=>e.prTabState.active="comments")},[t[84]||(t[84]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,oE)],2)):m("v-if",!0)])):m("v-if",!0),s("div",rE,[e.options?.diff&&e.prTabState?.active=="diff"?(l(),d("div",iE,[s("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.anonymizePrContent(e.details?.pullRequest?.diff)))},null,8,aE)])):m("v-if",!0),e.options?.comments&&e.prTabState?.active=="comments"?(l(),d("div",lE,[s("ul",dE,[(l(!0),d(x,null,re(e.details?.pullRequest?.comments,(a,u)=>(l(),d("li",uE,[s("div",cE,[e.options?.username?(l(),d("span",pE,[t[85]||(t[85]=s("i",{class:"far fa-user"},null,-1)),t[86]||(t[86]=y(" @",-1)),s("span",{textContent:c(e.anonymizePrContent(a?.author))},null,8,fE)])):m("v-if",!0),e.options?.date?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(a?.updatedDate))},null,8,mE)):m("v-if",!0)]),e.options?.body?(l(),d("div",hE,[Re(r,{content:e.anonymizePrContent(a?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):m("v-if",!0)]))),256))])])):m("v-if",!0)])])])):m("v-if",!0)])],512),[[H,e.sourceUrl]])])}var vE={class:"container-fluid h-100 anonymize-page"},yE={class:"row h-100 flex-column flex-md-row"},gE={class:"col-md sidePanel shadow overflow-auto anonymize-form-col"},bE={class:"form-group"},wE={class:"form-group"},kE={class:"form-check"},_E={class:"form-check-input",type:"checkbox",id:"update",name:"update"},EE={class:"form-group"},CE={class:"form-text text-muted"},NE=["href"],SE={class:"invalid-feedback"},DE={class:"form-text text-muted"},RE={class:"form-group"},TE={id:"idHelp",class:"form-text text-muted"},OE={class:"invalid-feedback"},AE={class:"form-group"},IE={class:"invalid-feedback"},VE={class:"form-group"},PE={class:"form-control",id:"expiration",name:"expiration"},qE={class:"form-group",id:"expiration-date-form"},ME={class:"form-control",type:"date",name:"expirationDate",id:"expirationDate"},$E={class:"accordion mb-3",id:"options"},FE={class:"card"},LE={id:"collapseOne",class:"collapse show","aria-labelledby":"headingOne","data-parent":"#options"},UE={class:"card-body"},zE={class:"form-group mb-0"},HE={class:"form-check"},BE={class:"form-check-input",type:"checkbox",id:"link",name:"link"},GE={class:"form-check"},jE={class:"form-check-input",type:"checkbox",id:"image",name:"image"},WE={class:"form-check"},KE={class:"form-check-input",type:"checkbox",id:"date",name:"date"},YE={class:"form-check"},xE={class:"form-check-input",type:"checkbox",id:"username",name:"username"},JE={class:"form-check"},QE={class:"form-check-input",type:"checkbox",id:"comments",name:"comments"},XE={class:"form-check"},ZE={class:"form-check-input",type:"checkbox",id:"diff",name:"diff"},eC={class:"form-check"},tC={class:"form-check-input",type:"checkbox",id:"origin",name:"origin"},sC={class:"form-check"},nC={class:"form-check-input",type:"checkbox",id:"title",name:"title"},oC={class:"form-check"},rC={class:"form-check-input",type:"checkbox",id:"body",name:"body"},iC=["textContent"],aC={class:"anonymize-submit-bar"},lC={key:0,class:"col-md-8 p-2 overflow-auto anonymize-preview-col"},dC={class:"d-flex w-100 justify-content-between align-items-center flex-wrap"},uC={class:"pr-title mb-1"},cC={key:0},pC=["textContent"],fC={key:0},mC={key:1,class:"pr-body shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},hC={class:"nav nav-tabs",id:"myTab",role:"tablist"},vC={key:0,class:"nav-item",role:"presentation"},yC={key:1,class:"nav-item",role:"presentation"},gC=["textContent"],bC={class:"tab-content",id:"pills-tabContent"},wC={class:"tab-pane show active",id:"pills-diff",role:"tabpanel","aria-labelledby":"pills-diff-tab"},kC={key:0,class:"pr-diff shadow-sm p-3 mb-4 rounded",style:{background:"var(--sidebar-bg-color)"}},_C={style:{"overflow-x":"auto"}},EC=["innerHTML"],CC={key:0,class:"pr-comments list-group"},NC={class:"pr-comment list-group-item"},SC={class:"d-flex w-100 justify-content-between flex-wrap"},DC={key:0,class:"mb-1"},RC=["textContent"],TC={class:"mb-1"};function Wa(e,t){let o=Qe("markdown"),r=ye("field"),n=ye("form");return l(),d("div",vE,[s("div",yE,[s("div",gE,[s("div",{class:T(["p-0 py-2 m-auto",{card:!e.pullRequestUrl,container:e.pullRequestUrl}])},[E((l(),d("form",{class:T(["form needs-validation",{"card-body":!e.pullRequestUrl}]),name:"anonymizeForm",novalidate:""},[t[30]||(t[30]=_e('<div class="paper-crumbs">Anonymize \xA0/\xA0 <span class="here">Pull request</span></div><h1 class="paper-page-title">Anonymize a <em>pull request</em></h1><p class="paper-page-lede"> Fill in the details \u2014 it only takes a minute. </p><div class="paper-section-eyebrow anonymize-section-title"><i class="fab fa-github"></i> Source </div>',4)),m(" pullRequestUrl "),s("div",bE,[t[2]||(t[2]=s("label",{for:"pullRequestUrl"},"URL of your pull request",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.pullRequestUrl?.invalid}]),name:"pullRequestUrl",id:"pullRequestUrl",placeholder:"https://github.com/owner/repo/pull/123"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestUrl=i},value:e.pullRequestUrl,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"},change:()=>{e.pullRequestSelected()}}]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is not accessible. Some organizations are restricting the access to the repositories. ",513),[[H,e.anonymize?.pullRequestUrl?.errors?.access]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" does not exist or is not accessible ",513),[[H,e.anonymize?.pullRequestUrl?.errors?.missing]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestUrl)+" is already anonymized ",513),[[H,e.anonymize?.pullRequestUrl?.errors?.used]])]),E(s("div",null,[s("div",wE,[s("div",kE,[E(s("input",_E,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"anonymizeForm",options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"update"},"Auto update",-1)),t[4]||(t[4]=s("small",{id:"updateHelp",class:"form-text text-muted"},"Automatically update the anonymized pull request with the latest updates. The pull request is updated once per day maximum.",-1))])]),t[26]||(t[26]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-chalkboard-teacher"}),y(" Conference ID ")],-1)),m(" Conference "),s("div",EE,[t[5]||(t[5]=s("label",{for:"conference"},[y("Conference ID "),s("span",{class:"text-muted"},"(Optional)")],-1)),E(s("input",{class:T(["form-control",{"is-invalid":e.anonymize?.conference?.invalid}]),id:"conference",name:"conference"},null,2),[[r,{state:e.viewState,set:i=>{e.conference=i},value:e.conference,form:"anonymizeForm",options:{debounce:{default:800,blur:0},updateOn:"default blur"}}]]),E(s("small",CE,[s("a",{target:"_target",href:e.safeUrl(e.conference_data?.url)},c(e.conference_data?.name),9,NE),y(" will expire on "+c(e.fmt?.date(e.conference_data?.endDate))+".",1)],512),[[H,e.conference_data]]),E(s("div",SE," The conference is not activated. ",512),[[H,e.anonymize?.conference?.errors?.activated]]),E(s("small",DE," Use the Conference ID that your conference provided you. This will update automatically the anonymization options based on the conference preferences. ",512),[[H,!e.conference_data]])]),t[27]||(t[27]=s("div",{class:"paper-section-eyebrow anonymize-section-title"},[s("i",{class:"fas fa-shield-alt"}),y(" Anonymization Options ")],-1)),m(" Pull Request ID "),s("div",RE,[t[6]||(t[6]=s("label",{for:"pullRequestId"},"Anonymized pull request id",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.anonymize?.pullRequestId?.invalid}]),name:"pullRequestId",id:"pullRequestId"},null,2),[[r,{state:e.viewState,set:i=>{e.pullRequestId=i},value:e.pullRequestId,form:"anonymizeForm",options:{debounce:{default:1e3,blur:0,click:0},updateOn:"default blur click"}}]]),s("small",TE,"Id used in the url: https://anonymous.4open.science/r/"+c(e.pullRequestId),1),E(s("div",OE," Repository id can only contain letters and numbers ",512),[[H,e.anonymize?.pullRequestId?.errors?.format]]),E(s("div",{class:"invalid-feedback"},c(e.pullRequestId)+" is already used ",513),[[H,e.anonymize?.pullRequestId?.errors?.used]])]),m(" Terms "),s("div",AE,[t[7]||(t[7]=s("label",{for:"terms"},"Terms to anonymize",-1)),E(s("textarea",{class:T(["form-control",{"is-invalid":e.anonymize?.terms?.invalid}]),id:"terms",name:"terms",rows:"3"},null,2),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"anonymizeForm",options:{debounce:250}}]]),t[8]||(t[8]=s("small",{id:"termsHelp",class:"form-text text-muted"},"One term per line. Each term will be replaced by XXX.",-1)),E(s("div",IE," Terms are in an invalid format ",512),[[H,e.anonymize?.terms?.errors?.format]])]),s("div",VE,[t[10]||(t[10]=s("label",{for:"expiration"},"Expiration strategy",-1)),E((l(),d("select",PE,[...t[9]||(t[9]=[s("option",{value:"never",selected:""},"Never expire",-1),s("option",{value:"redirect"}," Redirect to GitHub when expired ",-1),s("option",{value:"remove"},"Remove when expired",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"anonymizeForm",options:{}}]]),t[11]||(t[11]=s("small",{class:"form-text text-muted"},"Define the expiration strategy for the anonymized repository.",-1))]),E(s("div",qE,[t[12]||(t[12]=s("label",{for:"expirationDate"},"Expiration date of the anonymized repository",-1)),E(s("input",ME,null,512),[[r,{state:e.viewState,set:i=>{e.options.expirationDate=i},value:e.options?.expirationDate,form:"anonymizeForm",options:{}}]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the repository will be removed and the visitor will not be able to see the content of the repository.",513),[[H,e.options?.expirationMode=="remove"]]),E(s("small",{class:"form-text text-muted"},"After "+c(e.fmt?.date(e.options?.expirationDate))+", the visitors of the anonymized repository will be redirected to "+c(e.pullRequestUrl)+".",513),[[H,e.options?.expirationMode=="redirect"]])],512),[[H,e.options?.expirationMode!="never"]]),s("div",$E,[s("div",FE,[t[25]||(t[25]=s("div",{class:"card-header",id:"headingOne"},[s("h2",{class:"mb-0"},[s("button",{class:"btn btn-block text-left",type:"button","data-toggle":"collapse","data-target":"#collapseOne","aria-expanded":"true","aria-controls":"collapseOne"},[s("i",{class:"fas fa-cog mr-1"}),y(" Advanced options ")])])],-1)),s("div",LE,[s("div",UE,[s("div",zE,[s("div",HE,[E(s("input",BE,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"anonymizeForm",options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Keep or remove all the links.",-1))]),s("div",GE,[E(s("input",jE,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"anonymizeForm",options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"Images are not anonymized",-1))]),s("div",WE,[E(s("input",KE,null,512),[[r,{state:e.viewState,set:i=>{e.options.date=i},value:e.options?.date,form:"anonymizeForm",options:{}}]]),t[17]||(t[17]=s("label",{class:"form-check-label",for:"date"},"Display dates",-1)),t[18]||(t[18]=s("small",{class:"form-text text-muted"},"Display the date of the Pull Request and the date of the comments.",-1))]),s("div",YE,[E(s("input",xE,null,512),[[r,{state:e.viewState,set:i=>{e.options.username=i},value:e.options?.username,form:"anonymizeForm",options:{}}]]),t[19]||(t[19]=s("label",{class:"form-check-label",for:"username"},"Display username",-1))]),s("div",JE,[E(s("input",QE,null,512),[[r,{state:e.viewState,set:i=>{e.options.comments=i},value:e.options?.comments,form:"anonymizeForm",options:{}}]]),t[20]||(t[20]=s("label",{class:"form-check-label",for:"comments"},"Display comments",-1))]),s("div",XE,[E(s("input",ZE,null,512),[[r,{state:e.viewState,set:i=>{e.options.diff=i},value:e.options?.diff,form:"anonymizeForm",options:{}}]]),t[21]||(t[21]=s("label",{class:"form-check-label",for:"diff"},"Display diff",-1))]),s("div",eC,[E(s("input",tC,null,512),[[r,{state:e.viewState,set:i=>{e.options.origin=i},value:e.options?.origin,form:"anonymizeForm",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"origin"},"Display the project name",-1))]),s("div",sC,[E(s("input",nC,null,512),[[r,{state:e.viewState,set:i=>{e.options.title=i},value:e.options?.title,form:"anonymizeForm",options:{}}]]),t[23]||(t[23]=s("label",{class:"form-check-label",for:"title"},"Display the PR title",-1))]),s("div",oC,[E(s("input",rC,null,512),[[r,{state:e.viewState,set:i=>{e.options.body=i},value:e.options?.body,form:"anonymizeForm",options:{}}]]),t[24]||(t[24]=s("label",{class:"form-check-label",for:"body"},"Display the PR body and comment bodies",-1))])])])])])])],512),[[H,e.pullRequestUrl]]),e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,iC)):m("v-if",!0),E(s("div",aC,[e.isUpdate?m("v-if",!0):(l(),d("button",{key:0,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[0]||(t[0]=ge(i=>e.submitForm(i,()=>{e.anonymizePullRequest(i)}),["prevent"]))},[...t[28]||(t[28]=[s("i",{class:"fas fa-user-secret mr-1"},null,-1),y(" Anonymize ",-1)])])),e.isUpdate?(l(),d("button",{key:1,id:"submit",type:"submit",class:"btn btn-ink btn-block",onClick:t[1]||(t[1]=ge(i=>e.submitForm(i,()=>{e.updatePullRequest(i)}),["prevent"]))},[...t[29]||(t[29]=[s("i",{class:"fas fa-save mr-1"},null,-1),y(" Update ",-1)])])):m("v-if",!0)],512),[[H,e.pullRequestUrl]])],2)),[[n,e.viewState]])],2)]),e.details?(l(),d("div",lC,[s("div",dC,[s("h2",uC,[e.options?.title?(l(),d("span",cC,c(e.anonymize(e.details?.pullRequest?.title)),1)):m("v-if",!0),s("span",{class:T(["badge",{"badge-success":e.details?.pullRequest?.merged,"badge-warning":e.details?.pullRequest?.state=="open","badge-danger":e.details?.pullRequest?.state=="closed"&&!e.details?.pullRequest?.merged}])},c(e.fmt?.title(e.details?.pullRequest?.merged?"merged":e.details?.pullRequest?.state)),3)]),e.options?.date?(l(),d("small",{key:0,textContent:c(e.fmt?.date(e.details?.pullRequest?.updatedDate))},null,8,pC)):m("v-if",!0)]),e.options?.origin?(l(),d("small",fC,"Pull Request on "+c(e.details?.pullRequest?.baseRepositoryFullName),1)):m("v-if",!0),e.options?.body?(l(),d("div",mC,[Re(o,{content:e.anonymize(e.details?.pullRequest?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])])):m("v-if",!0),s("ul",hC,[e.options?.diff?(l(),d("li",vC,[...t[31]||(t[31]=[s("button",{class:"nav-link active",id:"pills-diff-tab","data-toggle":"pill","data-target":"#pills-diff",type:"button",role:"tab","aria-controls":"pills-diff","aria-selected":"true"}," Diff ",-1)])])):m("v-if",!0),e.options?.comments?(l(),d("li",yC,[s("button",{class:T(["nav-link",{active:!e.options?.diff}]),id:"pills-comments-tab","data-toggle":"pill","data-target":"#pills-comments",type:"button",role:"tab","aria-controls":"pills-comments","aria-selected":"false"},[s("span",{textContent:c(e.fmt.plural(e.details?.pullRequest?.comments?.length,{0:"No comment",one:"One Comment",other:"{} Comments"}))},null,8,gC)],2)])):m("v-if",!0)]),s("div",bC,[s("div",wC,[e.options?.diff?(l(),d("div",kC,[s("pre",_C,[s("code",{innerHTML:e.sanitize(e.fmt?.diff(e.anonymize(e.details?.pullRequest?.diff)))},null,8,EC)])])):m("v-if",!0)]),s("div",{class:T(["tab-pane",{"show active":!e.options?.diff}]),id:"pills-comments",role:"tabpanel","aria-labelledby":"pills-comments-tab"},[e.options?.comments?(l(),d("ul",CC,[(l(!0),d(x,null,re(e.details?.pullRequest?.comments,(i,a)=>(l(),d("li",NC,[s("div",SC,[e.options?.username?(l(),d("h5",DC," @"+c(e.anonymize(i?.author)),1)):m("v-if",!0),e.options?.date?(l(),d("small",{key:1,textContent:c(e.fmt?.date(i?.updatedDate))},null,8,RC)):m("v-if",!0)]),s("p",TC,[e.options?.body?(l(),gs(o,{key:0,class:"pr-comment-body",content:e.anonymize(i?.body),options:e.options,terms:e.terms},null,8,["content","options","terms"])):m("v-if",!0)])]))),256))])):m("v-if",!0)],2)])])):m("v-if",!0)])])}var OC={class:"container paper-page"},AC={class:"paper-settings-main claim-form"},IC={class:"form-group"},VC={class:"invalid-feedback"},PC={class:"form-group"};function Ka(e,t){let o=ye("field"),r=ye("form");return l(),d("div",OC,[t[6]||(t[6]=_e('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Claim</span></div><h1 class="paper-page-title">Claim an <em>anonymization</em></h1><p class="paper-page-lede"> Take ownership of an existing anonymized repository so it appears on your dashboard. </p>',3)),s("div",AC,[t[5]||(t[5]=s("p",{class:"paper-section-copy"},"Use this when an anonymization was created by a co-author or from another account. You must have access to the GitHub repository it was made from.",-1)),E((l(),d("form",{class:"form needs-validation",name:"claimForm",novalidate:"",onSubmit:t[0]||(t[0]=ge(n=>e.submitForm(n,()=>{e.claim()}),["prevent"]))},[s("div",IC,[t[1]||(t[1]=s("label",{class:"paper-field-label",for:"repoUrl"},"GitHub repository URL",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.claimForm?.repoUrl?.invalid&&(e.claimForm?.repoUrl?.touched||e.claimForm?.submitted)}]),name:"repoUrl",id:"repoUrl",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoUrl=n},value:e.repoUrl,form:"claimForm",options:{}}]]),E(s("div",VC," No anonymization matches this repository and ID. Check both values and that you can access the repository on GitHub. ",512),[[H,e.claimForm?.repoUrl?.errors?.not_found]])]),s("div",PC,[t[2]||(t[2]=s("label",{class:"paper-field-label",for:"repoId"},"Anonymized repository ID",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.claimForm?.repoId?.invalid&&(e.claimForm?.repoId?.touched||e.claimForm?.submitted)}]),name:"repoId",id:"repoId",required:""},null,2),[[o,{state:e.viewState,set:n=>{e.repoId=n},value:e.repoId,form:"claimForm",options:{}}]]),t[3]||(t[3]=s("small",{id:"idHelp",class:"form-text text-muted"},[y("The ID is the last part of the anonymized URL: "),s("code",null,"anonymous.4open.science/r/<ID>"),y(".")],-1))]),t[4]||(t[4]=s("button",{id:"submit",type:"submit",class:"btn btn-ink"}," Claim anonymization ",-1))],32)),[[r,e.viewState]])])])}var qC={class:"container page paper-page"},MC={class:"paper-crumbs"},$C={class:"here"},FC={class:"d-flex align-items-end flex-wrap",style:{gap:"12px","justify-content":"space-between"}},LC=["textContent"],UC={key:0,class:"paper-page-lede"},zC=["textContent","href"],HC={class:"d-flex align-items-center flex-wrap",style:{gap:"10px"}},BC=["textContent"],GC=["href"],jC={class:"paper-meta-rule"},WC=["textContent"],KC=["textContent"],YC={key:0},xC={class:"search-wrap"},JC={type:"search",id:"search",class:"form-control","aria-label":"Search repositories",placeholder:"Search by ID or source repository\u2026",autocomplete:"off"},QC={class:"dashboard-filter-controls"},XC={class:"dropdown"},ZC={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},eN={class:"filter-btn-value"},tN={class:"dropdown-menu","aria-labelledby":"dropdownSort"},sN={class:"form-check dropdown-item"},nN={class:"form-check-input",type:"radio",name:"sort",id:"anonymizeDate",value:"-anonymizeDate"},oN={class:"form-check dropdown-item"},rN={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"repoId"},iN={class:"form-check dropdown-item"},aN={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},lN={class:"form-check dropdown-item"},dN={class:"form-check-input",type:"radio",name:"sort",id:"sortViews",value:"-pageView"},uN={class:"dropdown"},cN={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},pN={key:0,class:"filter-btn-value"},fN={key:1,class:"filter-btn-value"},mN={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},hN={class:"form-check dropdown-item"},vN=["id"],yN=["for"],gN={class:"dashboard-meta"},bN={class:"dashboard-count"},wN={key:0},kN={key:0},_N={key:1},EN={key:1},CN={key:0,class:"filter-chip"},NN=["onClick","aria-label"],SN={class:"paper-table paper-table-repos w-100",role:"table","aria-label":"Repositories"},DN={class:"cell-anon",role:"cell"},RN={class:"anon-text"},TN=["textContent","href"],ON={class:"anon-sub"},AN={class:"anon-source"},IN=["textContent","href"],VN={key:0},PN=["textContent","href"],qN={key:1},MN=["href"],$N={class:"cell-status",role:"cell"},FN={class:"status-line"},LN=["textContent"],UN={key:0,class:"status-sub"},zN=["textContent"],HN={class:"cell-expires",role:"cell"},BN={key:0,class:"expires-never"},GN=["textContent"],jN={key:2,class:"expires-past"},WN={key:0},KN={key:3,class:"empty-dash","aria-label":"Not applicable"},YN={class:"cell-actions",role:"cell"},xN={class:"dropdown"},JN=["aria-label"],QN={class:"dropdown-menu dropdown-menu-right"},XN=["href"],ZN=["href"],eS={key:0,class:"paper-table-empty"},tS={key:0},sS={key:1},nS={key:2,class:"paper-table-empty-actions"};function Ya(e,t){let o=ye("field"),r=ye("form");return l(),d("div",qC,[s("div",null,[s("div",MC,[t[2]||(t[2]=s("a",{href:"/dashboard"},"My work",-1)),t[3]||(t[3]=y(" \xA0/\xA0 ",-1)),t[4]||(t[4]=s("a",{href:"/conferences"},"Conferences",-1)),t[5]||(t[5]=y(" \xA0/\xA0 ",-1)),s("span",$C,c(e.conference?.conferenceID),1)]),s("div",FC,[s("div",null,[s("h1",{class:"paper-page-title",textContent:c(e.conference?.name)},null,8,LC),e.conference?.url?(l(),d("p",UC,[s("a",{target:"_blank",rel:"noopener",textContent:c(e.conference?.url),href:e.safeUrl(e.conference?.url)},null,8,zC)])):m("v-if",!0)]),s("div",HC,[s("span",{class:T(["status-pill",{"status-pill-ready":e.conference?.status=="ready","status-pill-removed":e.conference?.status=="removed"||e.conference?.status=="expired"}])},[s("span",{class:T(["status-dot","status-"+e.conference?.status]),"aria-hidden":"true"},null,2),s("span",{textContent:c(e.fmt?.statusLabel(e.conference?.status))},null,8,BC)],2),s("a",{class:"btn btn-outline-ink",href:e.safeUrl("/conference/"+e.conference?.conferenceID+"/edit")},[...t[6]||(t[6]=[s("i",{class:"far fa-edit mr-1","aria-hidden":"true"},null,-1),y(" Edit conference",-1)])],8,GC)])]),s("div",jC,[s("span",null,[t[7]||(t[7]=y("ID ",-1)),s("b",{class:"commit-hash",textContent:c(e.conference?.conferenceID)},null,8,WC)]),s("span",null,[t[8]||(t[8]=y("Review window ",-1)),s("b",null,c(e.fmt?.date(e.conference?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(e.conference?.endDate,"mediumDate")),1)]),s("span",null,[t[9]||(t[9]=y("Repositories ",-1)),s("b",null,c(e.fmt?.number(e.conference?.repositories?.length)),1)]),s("span",null,[t[10]||(t[10]=y("Plan ",-1)),s("b",{textContent:c(e.conference?.plan?.name||e.conference?.plan?.planID||"Free")},null,8,KC)]),e.conference?.price?(l(),d("span",YC,[t[11]||(t[11]=y("Cost so far ",-1)),s("b",null,c(e.fmt?.number(e.conference?.price,2))+" \u20AC",1)])):m("v-if",!0)]),t[29]||(t[29]=s("div",{class:"paper-section-eyebrow"},"Repositories",-1)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter repositories","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=ge(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",xC,[E(s("input",JC,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",QC,[s("div",XC,[s("button",ZC,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",eN,c({"-anonymizeDate":"Anonymize date",repoId:"ID","-status":"Status","-pageView":"Views"}[e.orderBy]||"Custom"),1)]),s("div",tN,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",sN,[E(s("input",nN,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"anonymizeDate"},"Anonymize date",-1))]),s("div",oN,[E(s("input",rN,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[14]||(t[14]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",iN,[E(s("input",aN,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),s("div",lN,[E(s("input",dN,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[16]||(t[16]=s("label",{class:"form-check-label",for:"sortViews"},"Views",-1))])])]),s("div",uN,[s("button",cN,[t[18]||(t[18]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",pN,"All")):m("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?m("v-if",!0):(l(),d("span",fN,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",mN,[t[19]||(t[19]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(x,null,re(e.statusLabels,(n,i,a)=>(l(),d("div",hN,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,vN),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,yN)]))),256))])])])],32)),[[r,e.viewState]]),s("div",gN,[s("span",bN,[e.filteredRepositories?.length===e.conference?.repositories?.length?(l(),d("span",wN,[y(c(e.fmt?.number(e.conference?.repositories?.length))+" repositor",1),e.conference?.repositories?.length===1?(l(),d("span",kN,"y")):m("v-if",!0),e.conference?.repositories?.length!==1?(l(),d("span",_N,"ies")):m("v-if",!0)])):m("v-if",!0),e.filteredRepositories?.length!==e.conference?.repositories?.length?(l(),d("span",EN,c(e.fmt?.number(e.filteredRepositories?.length))+" of "+c(e.fmt?.number(e.conference?.repositories?.length))+" shown",1)):m("v-if",!0)]),(l(!0),d(x,null,re(e.filters?.status,(n,i,a)=>(l(),d(x,null,[n===!1?(l(),d("span",CN,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,NN)])):m("v-if",!0)],64))),256))]),s("div",SN,[t[28]||(t[28]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Repository"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Views"),s("div",{role:"columnheader"},"Expires"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(x,null,re(e.filteredRepositories,(n,i)=>(l(),d("div",{class:T(["paper-table-row",{"repo-inactive":n?.status=="expired"||n?.status=="removed","repo-error":n?.status=="error"}]),role:"row",key:n?.repoId},[s("div",DN,[t[22]||(t[22]=s("span",{class:"type-badge type-repo"},"Repo",-1)),s("div",RN,[s("a",{class:"repo-name",textContent:c(n?.repoId),href:e.safeUrl("/r/"+n?.repoId+"/")},null,8,TN),s("div",ON,[s("span",AN,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,IN),n?.options?.update&&n?.source?.branch?(l(),d("span",VN,[t[20]||(t[20]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,PN)])):m("v-if",!0),n?.source?.commit?(l(),d("span",qN,[t[21]||(t[21]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,MN)])):m("v-if",!0)])])])]),s("div",$N,[s("div",FN,[s("span",{class:T(["status-dot","status-"+(n?.status=="error"?"error":n?.status=="ready"?"ready":n?.status=="expired"||n?.status=="removed"?n?.status:"progress")]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,LN)]),n?.anonymizeDate?(l(),d("div",UN,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):m("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,zN),s("div",HN,[n?.status=="ready"&&(n?.options?.expirationMode==="never"||!n?.options?.expirationDate)?(l(),d("span",BN,"Never")):m("v-if",!0),n?.status=="ready"&&n?.options?.expirationMode!=="never"&&n?.options?.expirationDate?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?.options?.expirationDate))},null,8,GN)):m("v-if",!0),n?.status=="expired"?(l(),d("span",jN,[t[23]||(t[23]=y("Expired",-1)),n?.options?.expirationDate?(l(),d("span",WN,c(e.fmt?.humanTime(n?.options?.expirationDate)),1)):m("v-if",!0)])):m("v-if",!0),n?.status!="ready"&&n?.status!="expired"?(l(),d("span",KN,"\u2014")):m("v-if",!0)]),s("div",YN,[s("div",xN,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.repoId},[...t[24]||(t[24]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,JN),s("div",QN,[s("a",{class:"dropdown-item",href:e.safeUrl("/r/"+n?.repoId+"/")},[...t[25]||(t[25]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,XN),s("a",{class:"dropdown-item",href:e.safeUrl("/anonymize/"+n?.repoId)},[...t[26]||(t[26]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,ZN)])])])],2))),128)),e.filteredRepositories?.length==0?(l(),d("div",eS,[t[27]||(t[27]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conference?.repositories?.length?m("v-if",!0):(l(),d("span",tS,"No repository has been submitted to this conference yet.")),e.conference?.repositories?.length?(l(),d("span",sS,"Nothing matches the current filters.")):m("v-if",!0),e.conference?.repositories?.length?(l(),d("div",nS,[s("button",{type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")])):m("v-if",!0)])):m("v-if",!0)])])])}var oS={class:"container page paper-page"},rS={class:"row"},iS={class:"w-100"},aS={class:"search-wrap"},lS={type:"search",id:"search",class:"form-control","aria-label":"Search conferences",placeholder:"Search by name or ID\u2026",autocomplete:"off"},dS={class:"dashboard-filter-controls"},uS={class:"dropdown"},cS={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},pS={class:"filter-btn-value"},fS={class:"dropdown-menu","aria-labelledby":"dropdownSort"},mS={class:"form-check dropdown-item"},hS={class:"form-check-input",type:"radio",name:"sort",id:"sortName",value:"name"},vS={class:"form-check dropdown-item"},yS={class:"form-check-input",type:"radio",name:"sort",id:"sortID",value:"conferenceID"},gS={class:"form-check dropdown-item"},bS={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},wS={class:"dropdown"},kS={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},_S={key:0,class:"filter-btn-value"},ES={key:1,class:"filter-btn-value"},CS={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},NS={class:"form-check dropdown-item"},SS=["id"],DS=["for"],RS={class:"dashboard-meta"},TS={class:"dashboard-count"},OS={key:0},AS={key:0},IS={key:1},VS={key:0,class:"filter-chip"},PS=["onClick","aria-label"],qS={class:"paper-table paper-table-conferences w-100",role:"table","aria-label":"Conferences"},MS={class:"cell-anon",role:"cell"},$S={class:"anon-text"},FS=["textContent","href"],LS={class:"anon-sub"},US={class:"anon-source"},zS=["textContent"],HS={key:0},BS=["textContent","href"],GS={class:"cell-status",role:"cell"},jS={class:"status-line"},WS=["textContent"],KS=["textContent"],YS={class:"cell-expires",role:"cell"},xS={key:0},JS={key:1,class:"empty-dash","aria-label":"No review window"},QS={class:"cell-actions",role:"cell"},XS={class:"dropdown"},ZS=["aria-label"],e2={class:"dropdown-menu dropdown-menu-right"},t2=["href"],s2=["href"],n2={key:0},o2=["onClick"],r2={key:0,class:"paper-table-empty"},i2={key:0},a2={key:1},l2={class:"paper-table-empty-actions"},d2={key:1,href:"/conference/new",class:"btn btn-ink"};function xa(e,t){let o=ye("field"),r=ye("form");return l(),d("div",oS,[s("div",rS,[s("div",iS,[t[9]||(t[9]=_e('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Conferences</span></div><div class="d-flex align-items-end justify-content-between flex-wrap" style="gap:12px;"><div><h1 class="paper-page-title">Your <em>conferences</em></h1><p class="paper-page-lede">Group anonymizations by venue, give chairs a shared dashboard, and set one expiry for every submission.</p></div><a href="/conference/new" class="btn btn-ink"><i class="fa fa-plus-circle mr-1" aria-hidden="true"></i> New conference </a></div>',2)),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter conferences","accept-charset":"UTF-8",onSubmit:t[0]||(t[0]=ge(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",aS,[E(s("input",lS,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",dS,[s("div",uS,[s("button",cS,[t[2]||(t[2]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",pS,c({name:"Name",conferenceID:"ID","-status":"Status"}[e.orderBy]||"Custom"),1)]),s("div",fS,[t[6]||(t[6]=s("h6",{class:"dropdown-header"},"Order by",-1)),s("div",mS,[E(s("input",hS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"sortName"},"Name",-1))]),s("div",vS,[E(s("input",yS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=s("label",{class:"form-check-label",for:"sortID"},"ID",-1))]),s("div",gS,[E(s("input",bS,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[5]||(t[5]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))])])]),s("div",wS,[s("button",kS,[t[7]||(t[7]=s("span",{class:"filter-btn-label"},"Status",-1)),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?(l(),d("span",_S,"All")):m("v-if",!0),e.filters?.status?.ready&&e.filters?.status?.expired&&e.filters?.status?.removed?m("v-if",!0):(l(),d("span",ES,c((e.filters?.status?.ready?0:1)+(e.filters?.status?.expired?0:1)+(e.filters?.status?.removed?0:1))+" hidden ",1))]),s("div",CS,[t[8]||(t[8]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(x,null,re(e.statusLabels,(n,i,a)=>(l(),d("div",NS,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,SS),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,DS)]))),256))])])])],32)),[[r,e.viewState]]),s("div",RS,[s("span",TS,[e.filteredConferences?.length===e.conferences?.length?(l(),d("span",OS,[y(c(e.fmt?.number(e.conferences?.length))+" conference",1),e.conferences?.length!==1?(l(),d("span",AS,"s")):m("v-if",!0)])):m("v-if",!0),e.filteredConferences?.length!==e.conferences?.length?(l(),d("span",IS,c(e.fmt?.number(e.filteredConferences?.length))+" of "+c(e.fmt?.number(e.conferences?.length))+" shown",1)):m("v-if",!0)]),(l(!0),d(x,null,re(e.filters?.status,(n,i,a)=>(l(),d(x,null,[n===!1?(l(),d("span",VS,[y(" Hiding "+c(e.statusLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusLabels[i]+" again"},"\xD7",8,PS)])):m("v-if",!0)],64))),256))])]),s("div",qS,[t[20]||(t[20]=s("div",{class:"paper-table-head",role:"row"},[s("div",{role:"columnheader"},"Conference"),s("div",{role:"columnheader"},"Status"),s("div",{role:"columnheader",class:"num"},"Repos"),s("div",{role:"columnheader"},"Review window"),s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")])],-1)),(l(!0),d(x,null,re(e.filteredConferences,(n,i)=>(l(),d("div",{class:T(["paper-table-row row-clickable",{"repo-inactive":n?.status=="expired"||n?.status=="removed"}]),role:"row",key:n?.conferenceID},[s("div",MS,[t[12]||(t[12]=s("span",{class:"type-badge type-repo"},"Conf",-1)),s("div",$S,[s("a",{class:"repo-name",textContent:c(n?.name),href:e.safeUrl("/conference/"+n?.conferenceID)},null,8,FS),s("div",LS,[s("span",US,[t[11]||(t[11]=y("ID ",-1)),s("span",{class:"commit-hash",textContent:c(n?.conferenceID)},null,8,zS),n?.url?(l(),d("span",HS,[t[10]||(t[10]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(e.fmt?.limitTo(n?.url,60)),href:e.safeUrl(n?.url)},null,8,BS)])):m("v-if",!0)])])])]),s("div",GS,[s("div",jS,[s("span",{class:T(["status-dot","status-"+n?.status]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,WS)])]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.nbRepositories||0))},null,8,KS),s("div",YS,[n?.startDate?(l(),d("span",xS,c(e.fmt?.date(n?.startDate,"mediumDate"))+" \u2013 "+c(e.fmt?.date(n?.endDate,"mediumDate")),1)):m("v-if",!0),n?.startDate?m("v-if",!0):(l(),d("span",JS,"\u2014"))]),s("div",QS,[s("div",XS,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?.name},[...t[13]||(t[13]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,ZS),s("div",e2,[s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/")},[...t[14]||(t[14]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,t2),s("a",{class:"dropdown-item",href:e.safeUrl("/conference/"+n?.conferenceID+"/edit")},[...t[15]||(t[15]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,s2),n?.status!="removed"?(l(),d("div",n2,[t[17]||(t[17]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeConference(n)},[...t[16]||(t[16]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,o2)])):m("v-if",!0)])])])],2))),128)),e.filteredConferences?.length==0?(l(),d("div",r2,[t[19]||(t[19]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.conferences?.length==0?(l(),d("span",i2,"You have not created a conference yet.")):m("v-if",!0),e.conferences?.length>0?(l(),d("span",a2,"Nothing matches the current filters.")):m("v-if",!0),s("div",l2,[e.conferences?.length>0?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[1]||(t[1]=n=>{e.search="",e.filters.status.ready=!0,e.filters.status.expired=!0,e.filters.status.removed=!0})},"Clear filters")):m("v-if",!0),e.conferences?.length==0?(l(),d("a",d2,[...t[18]||(t[18]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New conference",-1)])])):m("v-if",!0)])])):m("v-if",!0)])])])}var u2={class:"container page dashboard-page paper-page"},c2={class:"row"},p2={class:"w-100"},f2={key:0,class:"quota-row"},m2={class:"quota-item"},h2={class:"quota-header"},v2={class:"quota-label"},y2={key:0,class:"quota-value"},g2={key:0},b2={key:1,class:"quota-unlimited-tag"},w2={key:1,class:"quota-value"},k2={key:0},_2={key:1,class:"quota-unlimited-tag"},E2=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],C2={class:"search-wrap"},N2={type:"search",id:"search",class:"form-control","aria-label":"Search anonymizations",placeholder:"Search by name, source, or conference\u2026",autocomplete:"off"},S2={class:"dashboard-filter-controls"},D2={class:"btn-group",role:"group","aria-label":"Type"},R2=["aria-pressed"],T2=["aria-pressed"],O2=["aria-pressed"],A2=["aria-pressed"],I2={class:"dropdown"},V2={class:"btn dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},P2={class:"filter-btn-value"},q2={class:"sr-only"},M2={class:"dropdown-menu","aria-labelledby":"dropdownSort"},$2={class:"form-check dropdown-item"},F2=["onClick","checked","id"],L2=["for"],U2={class:"dropdown"},z2={class:"btn dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},H2={key:0,class:"filter-btn-value"},B2={key:1,class:"filter-btn-value"},G2={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},j2={class:"form-check dropdown-item"},W2=["id"],K2=["for"],Y2={key:1,class:"dashboard-meta"},x2={class:"dashboard-count"},J2={key:0},Q2={key:0},X2={key:1},Z2={key:0,class:"filter-chip"},eD=["onClick","aria-label"],tD=["aria-busy"],sD={class:"paper-table-head",role:"row"},nD=["aria-sort"],oD=["aria-sort"],rD=["aria-sort"],iD=["aria-sort"],aD={key:0,class:"paper-table-row paper-table-skeleton",role:"row","aria-hidden":"true"},lD=["onClick"],dD={class:"cell-anon",role:"cell"},uD={class:"anon-text"},cD={class:"anon-title"},pD=["textContent","href"],fD=["textContent"],mD={key:2,class:"type-badge type-coauthor",title:"You are a co-author on this anonymization"},hD={key:0,class:"anon-sub"},vD={key:0,class:"anon-source"},yD=["textContent","href"],gD={key:0},bD=["textContent","href"],wD={key:1},kD=["href"],_D={key:1,class:"anon-source"},ED=["textContent","href"],CD={key:2,class:"anon-source"},ND=["textContent","href"],SD=["title"],DD=["textContent"],RD={class:"cell-status",role:"cell"},TD={class:"status-line"},OD=["textContent"],AD=["textContent","title"],ID=["title"],VD={key:2,class:"status-sub"},PD=["textContent"],qD={class:"cell-expires",role:"cell"},MD={key:0,class:"expires-never"},$D=["textContent"],FD={key:2,class:"expires-past"},LD={key:3,class:"expires-past"},UD={key:4,class:"empty-dash","aria-label":"Not applicable"},zD={class:"cell-actions",role:"cell"},HD={key:0,class:"dropdown"},BD=["aria-label"],GD={class:"dropdown-menu dropdown-menu-right"},jD=["href"],WD=["href"],KD=["href"],YD=["onClick"],xD=["onClick"],JD=["onClick"],QD={key:4},XD=["onClick"],ZD={key:0,class:"paper-table-empty"},eR={key:0},tR={key:1},sR={class:"paper-table-empty-actions"},nR={key:1,href:"/anonymize",class:"btn btn-ink"};function Ja(e,t){let o=ye("field"),r=ye("form");return l(),d("div",u2,[s("div",c2,[s("div",p2,[t[18]||(t[18]=_e('<div class="paper-crumbs">My work \xA0/\xA0 <span class="here">Dashboard</span></div><div class="d-flex align-items-end justify-content-between flex-wrap" style="gap:12px;"><div><h1 class="paper-page-title">Your <em>anonymizations</em></h1><p class="paper-page-lede">Every repository, pull request, and gist you\u2019ve mirrored, with live status and stats.</p></div><a href="/anonymize" class="btn btn-ink"><i class="fa fa-plus-circle mr-1" aria-hidden="true"></i> New anonymization </a></div>',2)),m(" Quota "),e.quota?(l(),d("div",f2,[(l(),d(x,null,re([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(n,i)=>s("div",m2,[s("div",h2,[s("span",v2,c(n?.label),1),n?.kind==="count"?(l(),d("span",y2,[y(c(e.fmt?.number(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?m("v-if",!0):(l(),d("span",g2," / "+c(e.fmt?.number(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",b2,"Unlimited")):m("v-if",!0)])):m("v-if",!0),n?.kind==="bytes"?(l(),d("span",w2,[y(c(e.fmt?.humanFileSize(e.quota[n?.key].used)),1),e.quota[n?.key].unlimited?m("v-if",!0):(l(),d("span",k2," / "+c(e.fmt?.humanFileSize(e.quota[n?.key].total)),1)),e.quota[n?.key].unlimited?(l(),d("span",_2,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:T(["quota-track","quota-"+e.quota[n?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":n?.label+" quota","aria-valuenow":e.quota[n?.key].used,"aria-valuemax":e.quota[n?.key].unlimited?e.quota[n?.key].used:e.quota[n?.key].total,"aria-valuetext":e.quota[n?.key].unlimited?"unlimited":e.fmt.number(e.quota[n?.key].percent,0)+"% used"},[e.quota[n?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Oe({width:e.quota[n?.key].percent+"%"})},null,4))],10,E2)])),64))])):m("v-if",!0),m(" Search + filters "),E((l(),d("form",{class:"w-100 dashboard-filter-row","aria-label":"Filter anonymizations","accept-charset":"UTF-8",onSubmit:t[5]||(t[5]=ge(n=>e.submitForm(n,()=>{n.preventDefault()}),["prevent"]))},[s("div",C2,[E(s("input",N2,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",S2,[s("div",D2,[s("button",{type:"button",class:T(["btn",{"btn-primary":e.typeFilter==="all"}]),onClick:t[0]||(t[0]=n=>e.typeFilter="all"),"aria-pressed":e.typeFilter==="all"},"All",10,R2),s("button",{type:"button",class:T(["btn",{"btn-primary":e.typeFilter==="repo"}]),onClick:t[1]||(t[1]=n=>e.typeFilter="repo"),"aria-pressed":e.typeFilter==="repo"},"Repos",10,T2),s("button",{type:"button",class:T(["btn",{"btn-primary":e.typeFilter==="pr"}]),onClick:t[2]||(t[2]=n=>e.typeFilter="pr"),"aria-pressed":e.typeFilter==="pr"},"PRs",10,O2),s("button",{type:"button",class:T(["btn",{"btn-primary":e.typeFilter==="gist"}]),onClick:t[3]||(t[3]=n=>e.typeFilter="gist"),"aria-pressed":e.typeFilter==="gist"},"Gists",10,A2)]),s("div",I2,[s("button",V2,[t[12]||(t[12]=s("span",{class:"filter-btn-label"},"Sort",-1)),s("span",P2,c(e.sortLabel()),1),s("i",{class:T(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2),s("span",q2,c(e.sortDesc()?"descending":"ascending"),1)]),s("div",M2,[t[14]||(t[14]=s("h6",{class:"dropdown-header"},"Order by",-1)),(l(!0),d(x,null,re(e.sortFields,(n,i,a)=>(l(),d("div",$2,[s("input",{class:"form-check-input",type:"radio",name:"sort",onClick:u=>e.setSort(i,n.defaultDesc),checked:e.isSortedBy(i),id:"sort-"+a},null,8,F2),s("label",{class:"form-check-label",for:"sort-"+a},c(n?.label),9,L2)]))),256)),t[15]||(t[15]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item",onClick:t[4]||(t[4]=n=>e.toggleSortDirection())},[t[13]||(t[13]=s("i",{class:"fas fa-exchange-alt fa-rotate-90","aria-hidden":"true"},null,-1)),y(" "+c(e.sortDesc()?"Switch to ascending":"Switch to descending"),1)])])]),s("div",U2,[s("button",z2,[t[16]||(t[16]=s("span",{class:"filter-btn-label"},"Status",-1)),e.hasHiddenStatus()?m("v-if",!0):(l(),d("span",H2,"All")),e.hasHiddenStatus()?(l(),d("span",B2,c(e.hiddenStatusCount())+" hidden",1)):m("v-if",!0)]),s("div",G2,[t[17]||(t[17]=s("h6",{class:"dropdown-header"},"Show statuses",-1)),(l(!0),d(x,null,re(e.statusKeyLabels,(n,i,a)=>(l(),d("div",j2,[E(s("input",{class:"form-check-input",type:"checkbox",id:"status-"+i},null,8,W2),[[o,{state:e.viewState,set:u=>{e.filters.status[i]=u},value:e.filters?.status[i],form:null,options:{}}]]),s("label",{class:"form-check-label",for:"status-"+i},c(n),9,K2)]))),256))])])])],32)),[[r,e.viewState]]),m(" Result count + active filter chips "),e.loading?m("v-if",!0):(l(),d("div",Y2,[s("span",x2,[e.filteredItems?.length===e.items?.length?(l(),d("span",J2,[y(c(e.fmt?.number(e.items?.length))+" anonymization",1),e.items?.length!==1?(l(),d("span",Q2,"s")):m("v-if",!0)])):m("v-if",!0),e.filteredItems?.length!==e.items?.length?(l(),d("span",X2,c(e.fmt?.number(e.filteredItems?.length))+" of "+c(e.fmt?.number(e.items?.length))+" shown",1)):m("v-if",!0)]),(l(!0),d(x,null,re(e.filters?.status,(n,i,a)=>(l(),d(x,null,[n===!1?(l(),d("span",Z2,[y(" Hiding "+c(e.statusKeyLabels[i])+" ",1),s("button",{type:"button",class:"filter-chip-close",onClick:u=>{e.filters.status[i]=!0},"aria-label":"Show "+e.statusKeyLabels[i]+" again"},"\xD7",8,eD)])):m("v-if",!0)],64))),256)),e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn-link-inline",onClick:t[6]||(t[6]=n=>e.clearFilters())},"Clear filters")):m("v-if",!0)]))]),m(" Table "),s("div",{class:"paper-table paper-table-dashboard w-100",role:"table","aria-label":"Anonymizations","aria-busy":e.loading},[s("div",sD,[s("div",{role:"columnheader","aria-sort":e.isSortedBy("_name")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:T(["sortable",{active:e.isSortedBy("_name")}]),onClick:t[7]||(t[7]=n=>e.setSort("_name"))},[t[19]||(t[19]=y(" Anonymization ",-1)),e.isSortedBy("_name")?(l(),d("i",{key:0,class:T(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):m("v-if",!0)],2)],8,nD),s("div",{role:"columnheader","aria-sort":e.isSortedBy("status")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:T(["sortable",{active:e.isSortedBy("status")}]),onClick:t[8]||(t[8]=n=>e.setSort("status"))},[t[20]||(t[20]=y(" Status ",-1)),e.isSortedBy("status")?(l(),d("i",{key:0,class:T(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):m("v-if",!0)],2)],8,oD),s("div",{role:"columnheader",class:"num","aria-sort":e.isSortedBy("pageView")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:T(["sortable",{active:e.isSortedBy("pageView")}]),onClick:t[9]||(t[9]=n=>e.setSort("pageView"))},[t[21]||(t[21]=y(" Views ",-1)),e.isSortedBy("pageView")?(l(),d("i",{key:0,class:T(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):m("v-if",!0)],2)],8,rD),s("div",{role:"columnheader","aria-sort":e.isSortedBy("options.expirationDate")?e.sortDesc()?"descending":"ascending":"none"},[s("button",{type:"button",class:T(["sortable",{active:e.isSortedBy("options.expirationDate")}]),onClick:t[10]||(t[10]=n=>e.setSort("options.expirationDate"))},[t[22]||(t[22]=y(" Expires ",-1)),e.isSortedBy("options.expirationDate")?(l(),d("i",{key:0,class:T(["fas",e.sortDesc()?"fa-arrow-down":"fa-arrow-up"]),"aria-hidden":"true"},null,2)):m("v-if",!0)],2)],8,iD),t[23]||(t[23]=s("div",{role:"columnheader"},[s("span",{class:"sr-only"},"Actions")],-1))]),m(" Loading skeleton: keeps the layout stable while the three lists load "),(l(),d(x,null,re([1,2,3,4],(n,i)=>(l(),d(x,null,[e.loading?(l(),d("div",aD,[...t[24]||(t[24]=[s("div",{class:"cell-anon",role:"cell"},[s("span",{class:"skeleton skeleton-badge"}),s("div",{class:"anon-text"},[s("span",{class:"skeleton skeleton-line",style:{width:"38%"}}),s("span",{class:"skeleton skeleton-line skeleton-line-sm",style:{width:"56%"}})])],-1),s("div",{class:"cell-status",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"60%"}})],-1),s("div",{class:"cell-views num",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}})],-1),s("div",{class:"cell-expires",role:"cell"},[s("span",{class:"skeleton skeleton-line",style:{width:"55%"}})],-1),s("div",{class:"cell-actions",role:"cell"},null,-1)])])):m("v-if",!0)],64))),64)),(l(!0),d(x,null,re(e.filteredItems,(n,i)=>(l(),d(x,{key:n?._type+":"+(n?._id||i)},[e.loading?m("v-if",!0):(l(),d("div",{key:0,class:T(["paper-table-row",{"repo-inactive":n?._statusKey=="expired"||n?._statusKey=="removed","repo-error":n?.status=="error","row-clickable":!!n?._viewUrl}]),role:"row",onClick:a=>e.openItem(n,a)},[s("div",dD,[s("span",{class:T(["type-badge",{"type-repo":n?._type==="repo","type-pr":n?._type==="pr","type-gist":n?._type==="gist"}])},c(n?._type==="repo"?"Repo":n?._type==="pr"?"PR":"Gist"),3),s("div",uD,[s("div",cD,[n?._viewUrl?(l(),d("a",{key:0,class:"repo-name",textContent:c(n?._name),href:e.safeUrl(n?._viewUrl)},null,8,pD)):m("v-if",!0),n?._viewUrl?m("v-if",!0):(l(),d("span",{key:1,class:"repo-name repo-name-static",textContent:c(n?._name)},null,8,fD)),n?.role==="coauthor"?(l(),d("span",mD,"Co-author")):m("v-if",!0)]),!n?._broken||n?.conference?(l(),d("div",hD,[n?._type==="repo"&&n?.source?.fullName&&!n?._broken?(l(),d("span",vD,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.fullName),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/")},null,8,yD),n?.options?.update&&n?.source?.branch?(l(),d("span",gD,[t[25]||(t[25]=y(" \xB7 ",-1)),s("a",{target:"_blank",rel:"noopener",textContent:c(n?.source?.branch),href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.branch)},null,8,bD)])):m("v-if",!0),n?.source?.commit?(l(),d("span",wD,[t[26]||(t[26]=y(" \xB7 ",-1)),s("a",{class:"commit-hash",target:"_blank",rel:"noopener",href:e.safeUrl("https://github.com/"+n?.source?.fullName+"/tree/"+n?.source?.commit)},"@"+c(n?.source?.commit?.substring(0,8)),9,kD)])):m("v-if",!0)])):m("v-if",!0),n?._type==="pr"&&n?.source?.repositoryFullName&&!n?._broken?(l(),d("span",_D,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},null,8,ED)])):m("v-if",!0),n?._type==="gist"&&n?.source?.gistId&&!n?._broken?(l(),d("span",CD,[s("a",{target:"_blank",rel:"noopener",textContent:c(n?._source),href:e.safeUrl("https://gist.github.com/"+n?.source?.gistId)},null,8,ND)])):m("v-if",!0),n?.conference?(l(),d("span",{key:3,class:"cell-conf conf-tag",title:n?.conference},[t[27]||(t[27]=s("i",{class:"fas fa-university","aria-hidden":"true"},null,-1)),t[28]||(t[28]=y()),s("span",{textContent:c(n?.conference)},null,8,DD)],8,SD)):m("v-if",!0)])):m("v-if",!0)])]),s("div",RD,[s("div",TD,[s("span",{class:T(["status-dot","status-"+n?._statusKey]),"aria-hidden":"true"},null,2),s("span",{class:"status-word",textContent:c(e.fmt?.statusLabel(n?.status))},null,8,OD)]),n?.status=="error"&&n?.statusMessage?(l(),d("div",{key:0,class:"status-sub status-sub-error",textContent:c(e.fmt?.statusMsg(n?.statusMessage)),title:n?.statusMessage},null,8,AD)):m("v-if",!0),n?._stale?(l(),d("div",{key:1,class:"status-sub status-sub-warn",title:"Last activity "+e.fmt?.humanTime(n?.anonymizeDate||n?.lastView)}," Last activity "+c(e.fmt?.humanTime(n?.anonymizeDate||n?.lastView))+" \xB7 may be stuck ",9,ID)):m("v-if",!0),n?.status!="error"&&!n?._stale&&n?.anonymizeDate?(l(),d("div",VD," anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)):m("v-if",!0)]),s("div",{class:"cell-views num",role:"cell",textContent:c(e.fmt?.number(n?.pageView))},null,8,PD),s("div",qD,[n?._expiry?.kind==="never"?(l(),d("span",MD,"Never")):m("v-if",!0),n?._expiry?.kind==="date"?(l(),d("span",{key:1,textContent:c(e.fmt?.humanTime(n?._expiry?.date))},null,8,$D)):m("v-if",!0),n?._expiry?.kind==="expired"&&n?._expiry?.date?(l(),d("span",FD,"Expired "+c(e.fmt?.humanTime(n?._expiry?.date)),1)):m("v-if",!0),n?._expiry?.kind==="expired"&&!n?._expiry?.date?(l(),d("span",LD,"Expired")):m("v-if",!0),n?._expiry?.kind==="none"?(l(),d("span",UD,"\u2014")):m("v-if",!0)]),s("div",zD,[n?._broken?m("v-if",!0):(l(),d("div",HD,[s("button",{class:"btn btn-icon-dots",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false","aria-label":"Actions for "+n?._name},[...t[29]||(t[29]=[s("i",{class:"fas fa-ellipsis-h","aria-hidden":"true"},null,-1)])],8,BD),s("div",GD,[s("a",{class:"dropdown-item",href:e.safeUrl(n?._viewUrl)},[...t[30]||(t[30]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View ",-1)])],8,jD),n?._type==="repo"&&n?.options?.page&&n?.status=="ready"?(l(),d("a",{key:0,class:"dropdown-item",target:"_self",href:e.safeUrl("/w/"+n?.repoId+"/")},[...t[31]||(t[31]=[s("i",{class:"fas fa-globe","aria-hidden":"true"},null,-1),y(" View page ",-1)])],8,WD)):m("v-if",!0),s("a",{class:"dropdown-item",href:e.safeUrl(n?._editUrl)},[...t[32]||(t[32]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,KD),n?.status=="ready"||n?.status=="error"?(l(),d("button",{key:1,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[33]||(t[33]=[s("i",{class:"fas fa-sync","aria-hidden":"true"},null,-1),y(" Force update ",-1)])],8,YD)):m("v-if",!0),n?.status=="removed"?(l(),d("button",{key:2,type:"button",class:"dropdown-item",onClick:a=>e.refreshItem(n)},[...t[34]||(t[34]=[s("i",{class:"fas fa-check-circle","aria-hidden":"true"},null,-1),y(" Enable ",-1)])],8,xD)):m("v-if",!0),n?.status=="expired"?(l(),d("button",{key:3,type:"button",class:"dropdown-item",onClick:a=>e.extendItem(n)},[...t[35]||(t[35]=[s("i",{class:"fas fa-calendar-plus","aria-hidden":"true"},null,-1),y(" Extend 6 months ",-1)])],8,JD)):m("v-if",!0),(n?.status=="ready"||n?.status=="expired"||n?.status=="error")&&n?.role!=="coauthor"?(l(),d("div",QD,[t[37]||(t[37]=s("div",{class:"dropdown-divider"},null,-1)),s("button",{type:"button",class:"dropdown-item dropdown-item-danger",onClick:a=>e.removeItem(n)},[...t[36]||(t[36]=[s("i",{class:"fas fa-trash-alt","aria-hidden":"true"},null,-1),y(" Remove ",-1)])],8,XD)])):m("v-if",!0)])]))])],10,lD))],64))),128)),!e.loading&&e.filteredItems?.length==0?(l(),d("div",ZD,[t[39]||(t[39]=s("i",{class:"fas fa-inbox","aria-hidden":"true"},null,-1)),e.items?.length==0?(l(),d("span",eR,"You have no anonymizations yet.")):m("v-if",!0),e.items?.length>0?(l(),d("span",tR,"Nothing matches the current filters.")):m("v-if",!0),s("div",sR,[e.hasActiveFilters()?(l(),d("button",{key:0,type:"button",class:"btn btn-outline-ink",onClick:t[11]||(t[11]=n=>e.clearFilters())},"Clear filters")):m("v-if",!0),e.items?.length==0?(l(),d("a",nR,[...t[38]||(t[38]=[s("i",{class:"fa fa-plus-circle mr-1","aria-hidden":"true"},null,-1),y(" New anonymization",-1)])])):m("v-if",!0)])])):m("v-if",!0)],8,tD)])])}var oR={class:"explorer-page"},rR=["aria-label"],iR=["textContent"],aR={class:"leftCol-head"},lR={class:"leftCol-search"},dR={class:"tree-search-box"},uR={type:"text",class:"tree-search-input",placeholder:"Search files","aria-label":"Search files"},cR={class:"leftCol-project-header"},pR=["textContent"],fR={class:"project-file-count"},mR={class:"leftCol-body"},hR={key:0,class:"paper-inline-warning",role:"alert"},vR={key:1,class:"paper-inline-warning",role:"alert"},yR={class:"leftCol-foot"},gR=["title"],bR={class:"explorer-main"},wR={class:"status-bar"},kR={class:"breadcrumb paths","aria-label":"Path"},_R=["textContent"],ER={class:"status-bar-actions"},CR=["href"],NR={class:"d-none d-md-inline"},SR={class:"d-none d-md-inline"},DR=["href"],RR=["href"],TR=["href"],OR=["href"],AR={class:"explorer-content"};function Qa(e,t){let o=Qe("tree"),r=Qe("partial-view"),n=ye("field");return l(),d("div",oR,[E(s("button",{class:"sidebar-toggle",onClick:t[0]||(t[0]=i=>e.sidebarCollapsed=!e.sidebarCollapsed),"aria-label":e.sidebarCollapsed?"Show files":"Hide files"},[s("i",{class:T(["fas",e.sidebarCollapsed?"fa-folder-open":"fa-times"])},null,2),s("span",{textContent:c(e.sidebarCollapsed?"Files":"Close")},null,8,iR)],8,rR),[[H,e.files?.length]]),E(s("div",{class:T(["leftCol",{collapsed:e.sidebarCollapsed}])},[s("div",aR,[t[7]||(t[7]=s("span",{class:"leftCol-eyebrow"},"Files",-1)),s("button",{class:"leftCol-close","aria-label":"Close files",onClick:t[1]||(t[1]=i=>e.sidebarCollapsed=!0)},[...t[6]||(t[6]=[s("i",{class:"fas fa-times"},null,-1)])])]),s("div",lR,[s("div",dR,[s("i",{class:T(["fas tree-search-icon",e.fileSearchLoading?"fa-spinner fa-spin":"fa-search"])},null,2),E(s("input",uR,null,512),[[n,{state:e.viewState,set:i=>{e.fileSearchQuery=i},value:e.fileSearchQuery,form:null,options:{debounce:300},change:()=>{e.onFileSearchChange()}}]]),E(s("kbd",{class:"tree-search-kbd"},c(e.isMac?"\u2318":"Ctrl+")+"K",513),[[H,!e.fileSearchQuery]]),E(s("button",{class:"tree-search-clear","aria-label":"Clear search",onClick:t[2]||(t[2]=i=>{e.fileSearchQuery="",e.onFileSearchChange()})},"\xD7",512),[[H,e.fileSearchQuery]])])]),s("div",cR,[s("span",{class:"project-name",textContent:c(e.repoId)},null,8,pR),s("span",fR,c(e.fileCounts?.[""]||e.files?.length)+" files",1)]),s("div",mR,[e.options?.truncatedFolders?.length>0?(l(),d("div",hR,[t[8]||(t[8]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.repo_truncated")),1)])):m("v-if",!0),e.options?.hasSubmodules?(l(),d("div",vR,[t[9]||(t[9]=s("i",{class:"fas fa-exclamation-triangle"},null,-1)),y(" "+c(e.fmt?.translate("WARNINGS.submodules_not_included")),1)])):m("v-if",!0),Re(o,{class:"files",file:e.files,"search-query":e.fileSearchQuery,"search-results":e.fileSearchResults,page:e.viewState},null,8,["file","search-query","search-results","page"])]),s("div",yR,[s("span",{class:"last-update","data-toggle":"tooltip","data-placement":"top",title:e.options?.lastUpdateDate}," Updated "+c(e.fmt?.date(e.options?.lastUpdateDate)),9,gR)])],2),[[H,e.files?.length]]),E(s("div",{class:"leftCol-backdrop",onClick:t[3]||(t[3]=i=>e.sidebarCollapsed=!0)},null,512),[[H,e.files?.length&&!e.sidebarCollapsed]]),s("div",bR,[s("div",wR,[s("ol",kR,[(l(!0),d(x,null,re(e.paths,(i,a)=>(l(),d("li",{class:"breadcrumb-item",textContent:c(i)},null,8,_R))),256))]),s("div",ER,[e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:0,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[10]||(t[10]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,CR)):m("v-if",!0),e.type=="html-doc"&&!e.showSource?(l(),d("button",{key:1,class:T(["btn btn-sm",{"btn-active":e.allowScripts}]),"aria-label":"Allow this document to run JavaScript",title:"Scripts in this file are blocked by default. Enable them only if you trust the repository \u2014 the document stays isolated from your session either way.",onClick:t[4]||(t[4]=i=>e.toggleAllowScripts())},[t[11]||(t[11]=s("i",{class:"fab fa-js"},null,-1)),s("span",NR,c(e.allowScripts?"JS on":"JS off"),1)],2)):m("v-if",!0),e.type=="html-doc"?(l(),d("button",{key:2,class:"btn btn-sm","aria-label":"Toggle between the rendered document and its source",title:"Toggle between the rendered document and its source",onClick:t[5]||(t[5]=i=>e.toggleSource())},[s("i",{class:T(["fas",e.showSource?"fa-eye":"fa-code"])},null,2),s("span",SR,c(e.showSource?"Rendered":"Source"),1)])):m("v-if",!0),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"View raw current file",title:"View the raw content of the current file",href:e.safeUrl(e.url)},[...t[12]||(t[12]=[s("i",{class:"fas fa-file-alt"},null,-1),s("span",{class:"d-none d-md-inline"}," Raw",-1)])],8,DR),[[H,e.content!=null]]),E(s("a",{target:"_self",class:"btn btn-sm","aria-label":"Download current file",title:"Download the current file",href:e.safeUrl(e.url+"&download=true")},[...t[13]||(t[13]=[s("i",{class:"fas fa-download"},null,-1),s("span",{class:"d-none d-md-inline"}," Download",-1)])],8,RR),[[H,e.content!=null]]),e.options?.download?(l(),d("a",{key:3,target:"_self",class:"btn btn-sm","aria-label":"Download full repository as ZIP",title:"Download the full repository as a ZIP archive",href:e.safeUrl("/api/repo/"+e.repoId+"/zip")},[...t[14]||(t[14]=[s("i",{class:"fas fa-file-archive"},null,-1),s("span",{class:"d-none d-md-inline"}," Full repo ZIP",-1)])],8,TR)):m("v-if",!0),e.options?.hasWebsite?(l(),d("a",{key:4,target:"_self",class:"btn btn-sm","aria-label":"Website",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[15]||(t[15]=[s("i",{class:"fas fa-globe"},null,-1),s("span",{class:"d-none d-md-inline"}," Website",-1)])],8,OR)):m("v-if",!0)])]),s("div",AR,[Re(r,{name:"partials/pageView.htm",state:e.viewState},null,8,["state"])])])])}var IR={class:"paper-faq"};function Xa(e,t){return l(),d("div",IR,[...t[0]||(t[0]=[_e('<div class="paper-faq-hero"><div class="paper-faq-eyebrow">Help</div><h1 class="paper-faq-title">Answers to the <em>questions</em> that come up most.</h1><p class="paper-faq-lede"> If something's missing, write to us \u2014 <a href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener">report a bug on GitHub</a>. </p></div>',1),s("div",{class:"paper-faq-body"},[s("aside",{class:"paper-faq-toc"},[s("div",{class:"paper-faq-toc-head"},"Contents"),s("nav",null,[s("a",{href:"#faq-general"},"General"),s("a",{href:"#faq-features"},"Features"),s("a",{href:"#faq-limitations"},"Limitations"),s("a",{href:"#faq-privacy"},"Privacy & Security"),s("a",{href:"#faq-hosting"},"Self-Hosting")])]),s("section",{class:"faq-section","aria-label":"FAQs"},[s("div",null,[m(" General "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-info-circle mr-2"}),y("General ")]),s("div",{class:"panel-group",id:"faq-general",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingWhatIs"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#whatIs","aria-expanded":"false","aria-controls":"whatIs"}," What is Anonymous GitHub? ")])]),s("div",{id:"whatIs",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingWhatIs"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub is a free, open-source tool that anonymizes GitHub repositories and pull requests for double-anonymous (double-blind) peer review. It replaces identifying information \u2014 such as the repository owner, organization name, and custom terms \u2014 so that reviewers cannot determine the identity of the authors through the code repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingHowWork"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#howWork","aria-expanded":"false","aria-controls":"howWork"}," How does Anonymous GitHub work? ")])]),s("div",{id:"howWork",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingHowWork"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub either downloads the complete repository and anonymizes the content, or proxies requests to GitHub on the fly. In both cases, the original and anonymized versions of files are cached on the server. The system automatically detects and replaces the repository owner, organization name, and repository name. You can also specify additional custom terms to anonymize using one-per-line regex patterns. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingScope"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#scope","aria-expanded":"false","aria-controls":"scope"}," What is the scope of anonymization? ")])]),s("div",{id:"scope",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingScope"},[s("div",{class:"panel-body p-3"},[s("p",null," In double-anonymous peer review, the boundary of anonymization is the paper plus its online appendix \u2014 not the entire internet. Searching for any part of the paper or the online appendix can be considered a deliberate attempt to break anonymity. Anonymous GitHub anonymizes the repository owner, organization, repository name, file and directory names, and file contents across all text-based file types. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCost"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-general",href:"#cost","aria-expanded":"false","aria-controls":"cost"}," How much does it cost? ")])]),s("div",{id:"cost",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCost"},[s("div",{class:"panel-body p-3"},[s("p",null,[y(" Anonymous GitHub is completely free to use. However, the server costs hundreds of dollars per year to maintain. If you find the service useful, a small donation would be greatly appreciated. You can support the project by "),s("a",{href:"https://github.com/sponsors/tdurieux/",target:"_blank"},"sponsoring on GitHub"),y(", donating through "),s("a",{href:"https://ko-fi.com/tdurieux",target:"_blank"},"Ko-fi"),y(', or by clicking the "Support me" button on the site. ')])])])])]),m(" Features "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-cogs mr-2"}),y("Features ")]),s("div",{class:"panel-group",id:"faq-features",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingFormats"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#formats","aria-expanded":"false","aria-controls":"formats"}," Which file formats are supported? ")])]),s("div",{id:"formats",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingFormats"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub can display and render a wide variety of file types: "),s("ul",null,[s("li",null,[s("strong",null,"Text and source code"),y(" \u2014 displayed with syntax highlighting")]),s("li",null,[s("strong",null,"Markdown"),y(" \u2014 rendered as formatted HTML")]),s("li",null,[s("strong",null,"Images"),y(" (PNG, JPG, SVG, etc.) \u2014 displayed inline")]),s("li",null,[s("strong",null,"PDFs"),y(" \u2014 rendered directly in the browser")]),s("li",null,[s("strong",null,"Jupyter Notebooks"),y(" \u2014 rendered with code cells and outputs")])]),s("p",null," Only text-based files are anonymized. Anonymous GitHub analyzes the content of each file to determine whether it is textual or binary. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPR"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#pullRequests","aria-expanded":"false","aria-controls":"pullRequests"}," Can I anonymize pull requests? ")])]),s("div",{id:"pullRequests",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPR"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. In addition to full repositories, Anonymous GitHub supports anonymizing individual pull requests. Simply paste the URL of a GitHub pull request when creating a new anonymized repository, and the system will automatically detect that it is a pull request and anonymize it accordingly. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingConference"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#conference","aria-expanded":"false","aria-controls":"conference"}," What is the Conference ID feature? ")])]),s("div",{id:"conference",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingConference"},[s("div",{class:"panel-body p-3"},[s("p",null," When creating an anonymized repository, you can associate it with a Conference ID. This allows conferences to define default anonymization settings (such as expiration dates) that are automatically applied to repositories submitted under that conference. If your conference provides a Conference ID, enter it during the anonymization setup. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingExpiration"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#expiration","aria-expanded":"false","aria-controls":"expiration"}," What happens when an anonymized repository expires? ")])]),s("div",{id:"expiration",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingExpiration"},[s("div",{class:"panel-body p-3"},[s("p",null," You can configure one of three expiration strategies when creating your anonymized repository: "),s("ul",null,[s("li",null,[s("strong",null,"Never expire"),y(" \u2014 the anonymized repository remains accessible indefinitely.")]),s("li",null,[s("strong",null,"Redirect to GitHub"),y(" \u2014 after expiration, visitors are redirected to the original GitHub repository.")]),s("li",null,[s("strong",null,"Remove content"),y(" \u2014 after expiration, the anonymized content is deleted from the server.")])])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDownload"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#download","aria-expanded":"false","aria-controls":"download"}," Can I download an anonymized repository? ")])]),s("div",{id:"download",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDownload"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymized repositories can be downloaded as a ZIP file. This is useful if reviewers want to build or test the code locally. The downloaded archive contains the fully anonymized version of the repository. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingUpdates"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#updates","aria-expanded":"false","aria-controls":"updates"}," Are updates to the original repository reflected in the anonymized version? ")])]),s("div",{id:"updates",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingUpdates"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. The anonymized repository tracks the source on GitHub: when you push new commits to the original repository, the anonymized view picks up those changes (cached files are refreshed against GitHub). This means you can keep iterating on the code while reviewers have the link, and you do not need to recreate the anonymized repository every time you update the source. "),s("p",null," A few practical implications worth keeping in mind: "),s("ul",null,[s("li",null," You can safely create the anonymized repository early in the writing process \u2014 later commits will be visible to reviewers without any additional action. "),s("li",null," If you rename files, add new identifiers, or introduce new contributor names after creation, revisit the anonymization options (custom terms, file filters) to make sure the new content is still properly anonymized. "),s("li",null," If the original repository is made private or deleted, the anonymized repository will no longer be able to fetch updated content. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingCLI"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-features",href:"#cli","aria-expanded":"false","aria-controls":"cli"}," Is there a command-line tool? ")])]),s("div",{id:"cli",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingCLI"},[s("div",{class:"panel-body p-3"},[s("p",null," Yes. Anonymous GitHub provides a CLI tool that lets you anonymize repositories locally, generating an anonymized ZIP file on your machine. Install it via npm: "),s("pre",{style:{"background-color":"var(--hover-bg-color)",padding:"12px","border-radius":"4px","margin-top":"8px",color:"var(--color)"}},[s("code",null,`npm install -g @tdurieux/anonymous_github
|
||
anonymous_github`)])])])])]),m(" Limitations "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-exclamation-triangle mr-2"}),y("Limitations ")]),s("div",{class:"panel-group",id:"faq-limitations",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingLimitation"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-limitations",href:"#limitation","aria-expanded":"false","aria-controls":"limitation"}," What are the limitations of Anonymous GitHub? ")])]),s("div",{id:"limitation",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingLimitation"},[s("div",{class:"panel-body p-3"},[s("ul",null,[s("li",null," Anonymous GitHub only anonymizes text-based files. Binary files (compiled executables, archives, etc.) are served as-is without anonymization. "),s("li",null," Files larger than 8 MB are not supported. "),s("li",null," Static site generators (such as Jekyll) used with GitHub Pages are not fully supported, although Markdown files are converted to HTML. "),s("li",null," The anonymization of terms within source code may change the behavior of the program (e.g., if a replaced term appears in a string literal or identifier). ")])])])])]),m(" Privacy & Security "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-shield-alt mr-2"}),y("Privacy & Security ")]),s("div",{class:"panel-group",id:"faq-privacy",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingData"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#data","aria-expanded":"false","aria-controls":"data"}," How is my data handled? ")])]),s("div",{id:"data",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingData"},[s("div",{class:"panel-body p-3"},[s("p",null," Data stored on Anonymous GitHub is never shared or used for any purpose beyond providing the anonymization service. When a repository is removed or expires, only its configuration is retained \u2014 this makes it easy to restore the repository if needed and ensures that no future repository reuses the same ID. ")])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingPermissions"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#permissions","aria-expanded":"false","aria-controls":"permissions"}," Why does GitHub say Anonymous GitHub asks for write access? ")])]),s("div",{id:"permissions",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingPermissions"},[s("div",{class:"panel-body p-3"},[s("p",null," Anonymous GitHub only reads your repositories \u2014 it never pushes commits, opens issues, modifies settings, or deletes anything. From your perspective as a user, the service is read-only. "),s("p",null,[y(" However, GitHub's OAuth scopes do not offer a read-only option for private repositories: the only scope that grants access to private repos is "),s("code",null,"repo"),y(", which is documented as full read/write access. To support users who want to anonymize a private repository, Anonymous GitHub must request that scope, and GitHub then displays the broader permission text at sign-in. The application itself only ever performs read operations against the GitHub API. ")]),s("p",null,[y(" If you only anonymize public repositories, the source code is open and can be audited on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(", or you can self-host your own instance. ")])])])]),s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingViewer"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-privacy",href:"#viewer","aria-expanded":"false","aria-controls":"viewer"}," Can repository owners see who viewed their anonymized repository? ")])]),s("div",{id:"viewer",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingViewer"},[s("div",{class:"panel-body p-3"},[s("p",null," No. Only the total number of views is tracked as an incremental counter. It is not possible for the repository owner or for Anonymous GitHub to identify individual viewers. Reviewer anonymity is fully preserved. ")])])])]),m(" Self-Hosting "),s("h4",{class:"faq-cat"},[s("i",{class:"fas fa-server mr-2"}),y("Self-Hosting ")]),s("div",{class:"panel-group",id:"faq-hosting",role:"tablist","aria-multiselectable":"true"},[s("div",{class:"panel panel-default mb-3"},[s("div",{class:"panel-heading p-3",role:"tab",id:"headingDeploy"},[s("h3",{class:"panel-title"},[s("a",{class:"collapsed",role:"button","data-toggle":"collapse","data-parent":"#faq-hosting",href:"#deploy","aria-expanded":"false","aria-controls":"deploy"}," Can I deploy my own instance? ")])]),s("div",{id:"deploy",class:"panel-collapse collapse",role:"tabpanel","aria-labelledby":"headingDeploy"},[s("div",{class:"panel-body p-3"},[s("p",null,[y(" Yes. Anonymous GitHub is fully open source (GPL-3.0) and supports Docker-based deployment. You will need to configure a GitHub OAuth app and provide a GitHub token. Detailed setup instructions are available on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/",target:"_blank"},"GitHub repository"),y(". ")]),s("p",null," The basic steps are: "),s("ol",null,[s("li",null,"Clone the repository and install dependencies"),s("li",null,[y("Create a "),s("code",null,".env"),y(" file with your GitHub token, OAuth client ID, and client secret")]),s("li",null,[y("Run "),s("code",null,"docker-compose up -d")])])])])])]),s("div",{class:"text-center mt-5 mb-5 p-4",style:{"background-color":"var(--hover-bg-color)","border-radius":"8px"}},[s("p",{class:"mb-2",style:{"font-size":"1.1rem"}}," Still have questions? "),s("p",{class:"text-muted mb-0"},[y(" Open an issue on the "),s("a",{href:"https://github.com/tdurieux/anonymous_github/issues",target:"_blank"},"GitHub repository"),y(" and we'll be happy to help. ")])])])])],-1)])])}var VR={class:"pr-page"},PR={class:"container paper-page pr-page-inner"},qR={class:"pr-header"},MR={class:"paper-page-title pr-title"},$R=["textContent"],FR={key:1,class:"text-muted"},LR=["href"],UR={class:"pr-header-meta"},zR={key:0,class:"pr-meta-item"},HR=["textContent"],BR={key:1,class:"pr-meta-item"},GR=["textContent"],jR={key:2,class:"pr-meta-item"},WR=["textContent"],KR={key:0,class:"paper-tabs",role:"tablist"},YR=["textContent"],xR=["textContent"],JR={class:"paper-tab-content"},QR={key:0},XR={class:"pr-comments"},ZR={class:"pr-comment"},eT={class:"pr-comment-head"},tT=["textContent"],sT={key:0,class:"pr-comment-date"},nT={key:0,class:"paper-table-empty"},oT={key:1},rT={class:"pr-comments"},iT={class:"pr-comment"},aT={class:"pr-comment-head"},lT={key:0,class:"pr-comment-author"},dT=["textContent"],uT=["textContent"],cT={key:0,class:"pr-comment-body"},pT={key:0,class:"paper-table-empty"};function Za(e,t){let o=Qe("gist-file"),r=Qe("markdown");return l(),d("div",VR,[s("div",PR,[t[15]||(t[15]=s("div",{class:"paper-crumbs"},[s("a",{href:"/dashboard"},"Reviewer"),y(" \xA0/\xA0 "),s("span",{class:"here"},"Gist")],-1)),s("header",qR,[s("h1",MR,[e.details?.description?(l(),d("span",{key:0,textContent:c(e.details?.description)},null,8,$R)):m("v-if",!0),e.details?.description?m("v-if",!0):(l(),d("span",FR,"Untitled gist")),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:2,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/gist-anonymize/"+e.gistId)},[...t[2]||(t[2]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,LR)):m("v-if",!0)]),s("div",UR,[s("span",{class:T(["paper-pill",{good:e.details?.isPublic,warn:!e.details?.isPublic}])},c(e.details?.isPublic?"Public":"Secret"),3),e.details?.ownerLogin?(l(),d("span",zR,[t[3]||(t[3]=s("i",{class:"far fa-user"},null,-1)),t[4]||(t[4]=y(" @",-1)),s("span",{textContent:c(e.details?.ownerLogin)},null,8,HR)])):m("v-if",!0),e.details?.updatedDate?(l(),d("span",BR,[t[5]||(t[5]=s("i",{class:"far fa-clock"},null,-1)),t[6]||(t[6]=y()),s("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,GR)])):m("v-if",!0),e.details?.anonymizeDate?(l(),d("span",jR,[t[7]||(t[7]=s("i",{class:"fas fa-user-secret"},null,-1)),t[8]||(t[8]=y(" Anonymized ",-1)),s("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,WR)])):m("v-if",!0)])]),e.details?.files&&e.details?.files?.length||e.details?.comments&&e.details?.comments?.length?(l(),d("nav",KR,[e.details?.files?(l(),d("button",{key:0,class:T(["paper-tab",{active:e.tabState?.active=="files"}]),type:"button",role:"tab",onClick:t[0]||(t[0]=n=>e.tabState.active="files")},[t[9]||(t[9]=s("i",{class:"fas fa-file-code"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.files?.length,{0:"No files",one:"1 file",other:"{} files"}))},null,8,YR)],2)):m("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:T(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[1]||(t[1]=n=>e.tabState.active="comments")},[t[10]||(t[10]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,xR)],2)):m("v-if",!0)])):m("v-if",!0),s("div",JR,[e.details?.files&&e.tabState?.active=="files"?(l(),d("div",QR,[s("ul",XR,[(l(!0),d(x,null,re(e.details?.files,(n,i)=>(l(),d("li",ZR,[s("div",eT,[s("strong",{textContent:c(n?.filename)},null,8,tT),n?.language?(l(),d("span",sT,c(n?.language),1)):m("v-if",!0)]),Re(o,{file:n},null,8,["file"])]))),256)),e.details?.files?.length?m("v-if",!0):(l(),d("li",nT,[...t[11]||(t[11]=[s("i",{class:"fas fa-file"},null,-1),s("span",null,"No files in this gist.",-1)])]))])])):m("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",oT,[s("ul",rT,[(l(!0),d(x,null,re(e.details?.comments,(n,i)=>(l(),d("li",iT,[s("div",aT,[n?.author?(l(),d("span",lT,[t[12]||(t[12]=s("i",{class:"far fa-user"},null,-1)),t[13]||(t[13]=y(" @",-1)),s("span",{textContent:c(n?.author)},null,8,dT)])):m("v-if",!0),n?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(n?.updatedDate))},null,8,uT)):m("v-if",!0)]),n?.body?(l(),d("div",cT,[Re(r,{content:n?.body},null,8,["content"])])):m("v-if",!0)]))),256)),e.details?.comments?.length?m("v-if",!0):(l(),d("li",pT,[...t[14]||(t[14]=[s("i",{class:"far fa-comment-dots"},null,-1),s("span",null,"No comments on this gist.",-1)])]))])])):m("v-if",!0)])])])}var fT={class:"collapse navbar-collapse",id:"navbarSupportedContent"},mT={class:"navbar-nav mr-auto smooth-scroll"},hT={key:0,class:"nav-item"},vT={key:1,class:"nav-item"},yT={key:2,class:"nav-item"},gT={key:3,class:"nav-item"},bT={class:"nav-item"},wT={key:4,class:"nav-item"},kT={class:"navbar-nav"},_T={key:0,class:"nav-item"},ET={key:1,class:"nav-item"},CT={key:2,class:"nav-item"},NT={key:3,class:"nav-item dropdown user-chip-wrap"},ST={class:"nav-link user-chip dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},DT=["src"],RT={class:"user-chip-name"},TT={class:"dropdown-menu dropdown-menu-right user-menu","aria-labelledby":"navbarDropdownMenuLink"},OT={class:"dropdown-header"},AT=["innerHTML"];function el(e,t){return l(),d(x,null,[s("nav",{class:T(["navbar navbar-expand-lg",{"navbar-dark":e.isDarkMode}])},[t[13]||(t[13]=s("a",{class:"navbar-brand",href:"/"},[y("Anonymous "),s("em",null,"GitHub")],-1)),t[14]||(t[14]=s("button",{class:"navbar-toggler",type:"button","data-toggle":"collapse","data-target":"#navbarSupportedContent","aria-controls":"navbarSupportedContent","aria-expanded":"false","aria-label":"Toggle navigation"},[s("span",{class:"navbar-toggler-icon"})],-1)),s("div",fT,[s("ul",mT,[e.user?m("v-if",!0):(l(),d("li",hT,[s("a",{class:T(["nav-link",{active:e.path=="/"}]),href:"/"}," Home ",2)])),e.user?(l(),d("li",vT,[s("a",{class:T(["nav-link",{active:e.path=="/dashboard"}]),href:"/dashboard"},[...t[2]||(t[2]=[s("i",{class:"fas fa-th-large d-lg-none mr-1"},null,-1),y(" My work ",-1)])],2)])):m("v-if",!0),e.user?(l(),d("li",yT,[s("a",{class:T(["nav-link",{active:e.path=="/anonymize"||e.path=="/pull-request-anonymize"}]),href:"/anonymize"},[...t[3]||(t[3]=[s("i",{class:"fas fa-user-secret d-lg-none mr-1"},null,-1),y(" Anonymize ",-1)])],2)])):m("v-if",!0),e.user?(l(),d("li",gT,[s("a",{class:T(["nav-link",{active:e.path=="/conferences"}]),href:"/conferences"},[...t[4]||(t[4]=[s("i",{class:"fas fa-chalkboard-teacher d-lg-none mr-1"},null,-1),y(" Conferences ",-1)])],2)])):m("v-if",!0),s("li",bT,[s("a",{class:T(["nav-link",{active:e.path=="/faq"}]),href:"/faq"},[...t[5]||(t[5]=[s("i",{class:"fas fa-question-circle d-lg-none mr-1"},null,-1),y("FAQ",-1)])],2)]),e.user&&e.user?.isAdmin?(l(),d("li",wT,[s("a",{class:T(["nav-link",{active:e.path?.indexOf("/admin")===0}]),href:"/admin/"},[...t[6]||(t[6]=[s("i",{class:"fas fa-cog d-lg-none mr-1"},null,-1),y(" Admin ",-1)])],2)])):m("v-if",!0)]),s("ul",kT,[t[11]||(t[11]=s("li",{class:"nav-item"},[s("a",{class:"nav-link nav-icon",target:"_blank",href:"https://github.com/tdurieux/anonymous_github/",title:"Anonymous GitHub source code","aria-label":"Anonymous GitHub source code on GitHub",rel:"noopener","data-offset":"30"},[s("i",{class:"fab fa-github","aria-hidden":"true"})])],-1)),m(` "Report a bug" is about this service. Reviewers who land on an
|
||
anonymized repository often think it is about the paper, so the
|
||
label names the service and the tooltip says who to contact. `),t[12]||(t[12]=s("li",{class:"nav-item d-none d-lg-block"},[s("a",{class:"nav-link",target:"_blank",rel:"noopener",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",title:"Report a problem with the Anonymous GitHub service. Questions about an anonymized repository or paper go to its authors.","data-offset":"30"},[s("i",{class:"fas fa-bug d-lg-none mr-1","aria-hidden":"true"}),y("Report a bug ")])],-1)),e.isDarkMode?m("v-if",!0):(l(),d("li",_T,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to dark mode","aria-label":"Switch to dark mode",role:"button",onClick:t[0]||(t[0]=ge(o=>{e.darkMode(!0)},["prevent"]))},[...t[7]||(t[7]=[s("i",{class:"fas fa-moon","aria-hidden":"true"},null,-1)])])])),e.isDarkMode?(l(),d("li",ET,[s("a",{class:"nav-link nav-icon",href:"#",title:"Switch to light mode","aria-label":"Switch to light mode",role:"button",onClick:t[1]||(t[1]=ge(o=>{e.darkMode(!1)},["prevent"]))},[...t[8]||(t[8]=[s("i",{class:"fas fa-sun","aria-hidden":"true"},null,-1)])])])):m("v-if",!0),e.user?m("v-if",!0):(l(),d("li",CT,[...t[9]||(t[9]=[s("a",{class:"nav-link btn-signin",target:"_self",href:"/github/login","data-offset":"30"},[s("i",{class:"fab fa-github mr-1"}),y(" Sign in ")],-1)])])),e.user?(l(),d("li",NT,[s("a",ST,[e.user?.photo?(l(),d("img",{key:0,width:"22",height:"22",class:"rounded-circle",src:e.safeUrl(e.user?.photo)},null,8,DT)):m("v-if",!0),s("span",RT,c(e.user?.username),1)]),s("div",TT,[s("h6",OT,"Signed in as @"+c(e.user?.username),1),t[10]||(t[10]=_e('<a class="dropdown-item" href="/profile"><i class="fas fa-sliders-h" aria-hidden="true"></i><span>Settings<small>Defaults, quotas, account</small></span></a><a class="dropdown-item" href="/claim"><i class="fas fa-link" aria-hidden="true"></i><span>Claim an anonymization<small>Attach an existing mirror to your account</small></span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><i class="fas fa-bug" aria-hidden="true"></i><span>Report a bug<small>About this service, not a paper</small></span></a><a class="dropdown-item" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><i class="fab fa-github" aria-hidden="true"></i><span>Source code</span></a><div class="dropdown-divider"></div><a class="dropdown-item" href="/api/user/logout" target="_self"><i class="fas fa-sign-out-alt" aria-hidden="true"></i><span>Sign out</span></a>',7))])])):m("v-if",!0)])])],2),e.generalMessage?(l(),d("div",{key:0,class:"navbar shadow generalMessage",innerHTML:e.sanitize(e.generalMessage)},null,8,AT)):m("v-if",!0)],64)}var IT={class:"paper-landing"},VT={class:"paper-hero"},PT={class:"paper-hero-copy"},qT={class:"paper-cta-row"},MT={key:0,href:"/github/login",target:"_self",class:"btn-hero"},$T={key:1,href:"/anonymize",class:"btn-hero"},FT={class:"paper-stats paper-wrap",id:"metrics","aria-label":"Usage over the last 60 days"},LT={class:"paper-stats-grid"},UT={class:"paper-stat-value"},zT={class:"paper-stat-label"},HT=["viewBox"],BT=["x","y","width","height"],GT={key:1,class:"paper-stat-delta"},jT={class:"paper-features paper-wrap","aria-label":"Product features"},WT={class:"paper-features-list",role:"tablist","aria-label":"Features","aria-orientation":"vertical"},KT=["onClick","onKeydown","id","aria-controls","aria-selected","tabindex"],YT={class:"paper-eyebrow"},xT={class:"paper-feature-title"},JT={class:"paper-feature-more"},QT={class:"paper-feature-title paper-feature-title-m","aria-hidden":"true"},XT=["href","target"],ZT={class:"paper-features-stage"},eO=["id","aria-labelledby"],tO={class:"paper-frame"},sO={class:"paper-frame-bar","aria-hidden":"true"},nO={class:"url"},oO=["src","alt"],rO={class:"paper-footer"},iO={class:"paper-footer-inner"},aO={class:"paper-footer-col"},lO={key:0,href:"/dashboard"},dO={key:1,href:"/conferences"},uO={class:"paper-footer-foot"};function tl(e,t){return l(),d("div",IT,[m(" Hero: copy on the left, the product on the right "),s("section",VT,[s("div",PT,[t[2]||(t[2]=s("div",{class:"paper-eyebrow"},"For double-blind peer review",-1)),t[3]||(t[3]=s("h1",{class:"hero-title"},[y(" Share the code,"),s("br"),s("span",{class:"accent"},"not the author.")],-1)),t[4]||(t[4]=s("p",{class:"hero-subtitle"}," Anonymous GitHub makes a read-only mirror of your repository, pull request, or gist with every trace of identity removed, so you can attach a link to your submission without breaking anonymity. ",-1)),s("div",qT,[e.user?m("v-if",!0):(l(),d("a",MT,[...t[0]||(t[0]=[s("i",{class:"fab fa-github mr-2","aria-hidden":"true"},null,-1),y("Sign in with GitHub ",-1)])])),e.user?(l(),d("a",$T," Anonymize a repository \u2192 ")):m("v-if",!0),t[1]||(t[1]=s("a",{class:"paper-link-arrow",target:"_self",href:"https://anonymous.4open.science/r/840c8c57-3c32-451e-bf12-0e20be300389/"},"See an anonymized repository \u2192",-1))]),t[5]||(t[5]=s("ul",{class:"paper-reassure"},[s("li",null,"Free and open source"),s("li",null,"Read-only: never writes to your repos"),s("li",null,"Expires on the date you set")],-1))]),t[6]||(t[6]=_e('<div class="paper-hero-shot"><div class="paper-frame"><div class="paper-frame-bar" aria-hidden="true"><span class="dots"><i></i><i></i><i></i></span><span class="url">anonymous.4open.science/anonymize</span></div><img src="/imgs/anonymize.png" width="2880" height="1800" alt="The anonymize form with a live README preview showing the redactions"></div></div>',1))]),m(" Proof "),t[16]||(t[16]=_e('<section class="paper-proof paper-wrap" aria-label="Venues"><div class="paper-eyebrow">Trusted by authors at</div><div class="paper-proof-venues"><span>ICSE</span><i aria-hidden="true">\xB7</i><span>FSE</span><i aria-hidden="true">\xB7</i><span>OOPSLA</span></div></section>',1)),m(" Live stats "),s("section",FT,[t[7]||(t[7]=s("div",{class:"paper-stats-meta"},[s("div",{class:"paper-stats-meta-left"},"Live \xB7 last 60 days"),s("div",{class:"paper-stats-meta-right"},[s("span",{class:"paper-stats-dot","aria-hidden":"true"}),y(" updated daily ")])],-1)),s("div",LT,[(l(!0),d(x,null,re(e.cards,(o,r)=>(l(),d("div",{class:"paper-stat-card",key:o?.key},[s("div",UT,c(e.fmt?.bigNum(o?.total)),1),s("div",zT,c(o?.label),1),e.history[o?.key].bars?.length>1?(l(),d("svg",{key:0,class:"paper-stat-bars",preserveAspectRatio:"none","aria-hidden":"true",viewBox:"0 0 "+e.history[o?.key].viewW+" 36"},[(l(!0),d(x,null,re(e.history[o?.key].bars,(n,i)=>(l(),d("rect",{key:i,class:T({"is-latest":i===e.history[o.key].bars.length-1}),x:n?.x,y:n?.y,width:n?.w,height:n?.h},null,10,BT))),128))],8,HT)):m("v-if",!0),e.history[o?.key].bars?.length>1?(l(),d("div",GT," +"+c(e.fmt?.number(e.history[o?.key].deltaToday))+" today ",1)):m("v-if",!0)]))),128))])]),m(" Before / after "),t[17]||(t[17]=s("section",{class:"paper-section-head paper-wrap"},[s("div",null,[s("div",{class:"paper-eyebrow"},"Before \xB7 after"),s("h2",null,[y("The same repository, "),s("em",null,"minus you.")])]),s("p",null," Names, affiliations, emails, and any term you list are replaced across the README, source files, notebooks, and PDF links. Reviewers browse the real thing, not a zip. ")],-1)),t[18]||(t[18]=s("div",{class:"paper-preview paper-wrap","aria-label":"Before and after example"},[s("div",{class:"pane"},[s("div",{class:"pane-header"},[s("span",{class:"pane-label"},"Before \xB7 your repo"),s("span",{class:"pane-url"},"github.com/jane-smith/DeepLearnUtils")]),s("div",{class:"pane-body"},[s("div",null,[s("span",{class:"tok"},"#"),y(),s("strong",null,"DeepLearnUtils")]),s("div",null,"Developed by Jane Smith at MIT CSAIL."),s("div",null,"See Smith et\xA0al., \u201CAttention That Works,\u201D 2026."),s("div",null,"Contact: jane.smith@mit.edu")])]),s("div",{class:"pane"},[s("div",{class:"pane-header"},[s("span",{class:"pane-label"},"After \xB7 anonymous mirror"),s("span",{class:"pane-url"},"anonymous.4open.science/r/paper-7f2a")]),s("div",{class:"pane-body"},[s("div",null,[s("span",{class:"tok"},"#"),y(),s("strong",null,"DeepLearnUtils")]),s("div",null,[y("Developed by "),s("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" at "),s("span",{class:"redact",role:"img","aria-label":"redacted affiliation"},"XXXX-2"),y(".")]),s("div",null,[y("See "),s("span",{class:"redact",role:"img","aria-label":"redacted author name"},"XXXX-1"),y(" et\xA0al., \u201CAttention That Works,\u201D 2026.")]),s("div",null,[y("Contact: "),s("span",{class:"redact",role:"img","aria-label":"redacted email address"},"XXXX-3")])])])],-1)),m(" What you get: one screenshot, three tabs "),t[19]||(t[19]=s("section",{class:"paper-section-head paper-wrap",id:"about"},[s("div",null,[s("div",{class:"paper-eyebrow"},"What you get"),s("h2",null,[y("Anonymize, review, "),s("em",null,"manage.")])]),s("p",null," Every mirror is read-only and passes through the same filter, from the README to a PDF's link targets. Monitor it, update it, or remove it the day the decision is out. ")],-1)),s("section",jT,[s("div",WT,[(l(!0),d(x,null,re(e.features,(o,r)=>(l(),d("div",{class:T(["paper-feature",{"is-on":e.feature===o?.key}]),key:o?.key},[s("button",{type:"button",class:"paper-feature-tab",role:"tab",onClick:n=>e.selectFeature(o.key),onKeydown:n=>e.featureKeydown(n,r),id:"feature-tab-"+o?.key,"aria-controls":"feature-panel-"+o?.key,"aria-selected":e.feature===o?.key,tabindex:e.feature===o?.key?0:-1},[s("span",YT,c(o?.num)+" \xB7 "+c(o?.eyebrow),1),s("span",xT,[y(c(o?.title)+" ",1),s("em",null,c(o?.accent),1)])],40,KT),s("div",JT,[s("span",QT,[y(c(o?.title)+" ",1),s("em",null,c(o?.accent),1)]),s("p",null,c(o?.text),1),s("a",{class:"paper-link-arrow",href:e.safeUrl(e.featureHref(o)),target:e.featureTarget(o)},c(o?.cta)+" \u2192",9,XT)])],2))),128))]),s("div",ZT,[(l(!0),d(x,null,re(e.features,(o,r)=>E((l(),d("div",{class:"paper-feature-panel",role:"tabpanel",key:o?.key,id:"feature-panel-"+o?.key,"aria-labelledby":"feature-tab-"+o?.key},[s("div",tO,[s("div",sO,[t[8]||(t[8]=s("span",{class:"dots"},[s("i"),s("i"),s("i")],-1)),s("span",nO,c(o?.url),1)]),s("div",{class:T("paper-crop paper-crop-"+o?.key)},[s("img",{loading:"lazy",width:"2880",height:"1800",src:e.safeUrl(o?.img),alt:o?.alt},null,8,oO)],2)])],8,eO)),[[H,e.feature===o?.key]])),128))])]),m(" FAQ teaser "),t[20]||(t[20]=_e('<section class="paper-qa paper-wrap" aria-labelledby="qa-heading"><div><div class="paper-eyebrow">Before you sign in</div><h2 id="qa-heading">The questions that <em>come up most.</em></h2><a class="paper-link-arrow" href="/faq">Read the full FAQ \u2192</a></div><div><div class="q"><a href="/faq#howWork">Why does GitHub ask for write access at sign-in?</a><p> GitHub's OAuth scopes have no read-only option for private repositories. Anonymous GitHub only ever reads your repositories; it never pushes, modifies, or deletes anything. </p></div><div class="q"><a href="/faq#formats">Which file formats are supported?</a><p> Source code with syntax highlighting, Markdown, Jupyter notebooks, PDFs, images, and GitHub Pages sites. Everything passes through the same redaction filter. </p></div><div class="q"><a href="/faq#expiration">What happens when an anonymized repository expires?</a><p> You choose: the mirror is removed, or visitors are redirected to the original GitHub repository once the review is over. </p></div></div></section>',1)),s("footer",rO,[s("div",iO,[t[12]||(t[12]=s("div",{class:"paper-footer-brand"},[s("div",{class:"paper-footer-mark"},[y("Anonymous "),s("em",null,"GitHub")]),s("p",{class:"paper-footer-tag"}," A read-only, identity-stripped mirror of your repository, built for double-blind peer review. ")],-1)),s("div",aO,[t[9]||(t[9]=s("div",{class:"paper-footer-head"},"Product",-1)),t[10]||(t[10]=s("a",{href:"/anonymize"},"Anonymize",-1)),e.user?(l(),d("a",lO,"My work")):m("v-if",!0),e.user?(l(),d("a",dO,"Conferences")):m("v-if",!0),t[11]||(t[11]=s("a",{href:"/faq"},"FAQ",-1))]),t[13]||(t[13]=_e('<div class="paper-footer-col"><div class="paper-footer-head">Project</div><a href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener">Source code</a><a href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener">Report a bug</a><a href="https://github.com/sponsors/tdurieux/" target="_blank" rel="noopener">Sponsor</a></div><div class="paper-footer-col"><div class="paper-footer-head">Contact</div><a href="mailto:tdurieux@anonymous.4open.science">Email maintainer</a><a href="https://github.com/tdurieux" target="_blank" rel="noopener">@tdurieux</a></div>',2))]),t[15]||(t[15]=s("div",{class:"paper-footer-rule"},null,-1)),s("div",uO,[s("span",null,"\xA9 "+c(e.year||2026)+" Anonymous GitHub \xB7 MIT licensed",1),t[14]||(t[14]=s("span",{class:"paper-footer-meta"},"Built for reviewers, by researchers.",-1))])])])}var cO={class:"paper-empty"},pO={class:"paper-empty-inner"},fO={key:0,class:"paper-eyebrow"},mO={key:1,class:"paper-eyebrow"},hO={key:2,class:"paper-empty-title"},vO=["textContent"];function sl(e,t){return l(),d("div",cO,[s("div",pO,[e.error?m("v-if",!0):(l(),d("div",fO,"Working")),e.error?(l(),d("div",mO,"Error")):m("v-if",!0),e.error?m("v-if",!0):(l(),d("h1",hO,[...t[0]||(t[0]=[y(" Loading",-1),s("span",{class:"dot-anim"},"\u2026",-1)])])),e.error?(l(),d("h1",{key:3,class:"paper-empty-title",textContent:c(e.fmt.translate(e.error))},null,8,vO)):m("v-if",!0)])])}var yO={class:"container paper-page paper-settings"},gO={class:"paper-crumbs"},bO={class:"here"},wO={class:"paper-page-title"},kO={class:"paper-settings-body"},_O={class:"paper-settings-toc"},EO={href:"#conf-billing"},CO={class:"form needs-validation paper-settings-main",name:"conference",novalidate:""},NO={id:"conf-basics",class:"paper-settings-section"},SO={class:"form-group"},DO={class:"invalid-feedback"},RO={class:"invalid-feedback"},TO={class:"form-group"},OO={class:"invalid-feedback"},AO={class:"form-group"},IO={class:"invalid-feedback"},VO={class:"invalid-feedback"},PO={id:"conf-window",class:"paper-settings-section"},qO={class:"form-grid-2"},MO={class:"form-group"},$O={class:"invalid-feedback"},FO={class:"invalid-feedback"},LO={class:"form-group"},UO={class:"invalid-feedback"},zO={class:"invalid-feedback"},HO={id:"conf-rendering",class:"paper-settings-section"},BO={class:"form-check"},GO={class:"form-check-input",type:"checkbox",id:"link",name:"link"},jO={class:"form-check"},WO={class:"form-check-input",type:"checkbox",id:"image",name:"image"},KO={class:"form-check"},YO={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},xO={class:"form-check"},JO={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},QO={id:"conf-features",class:"paper-settings-section"},XO={class:"form-check"},ZO={class:"form-check-input",type:"checkbox",id:"update",name:"update"},eA={class:"form-check"},tA={class:"form-check-input",type:"checkbox",id:"page",name:"page"},sA={id:"conf-plan",class:"paper-settings-section"},nA={class:"paper-plan-grid"},oA=["value"],rA=["textContent"],iA={class:"paper-plan-price"},aA=["innerHTML"],lA={key:0,id:"conf-billing",class:"paper-settings-section"},dA={class:"form-group"},uA={class:"form-group"},cA={class:"form-group"},pA={class:"form-group"},fA={class:"form-grid-3"},mA={class:"form-group"},hA={class:"form-group"},vA={class:"form-group"},yA={class:"form-group"},gA={class:"paper-settings-footer"},bA=["textContent"],wA=["textContent"];function nl(e,t){let o=ye("paper-scrollspy"),r=ye("field"),n=ye("form");return l(),d("div",yO,[s("div",gO,[t[1]||(t[1]=s("a",{href:"/dashboard"},"My work",-1)),t[2]||(t[2]=y(" \xA0/\xA0 ",-1)),t[3]||(t[3]=s("a",{href:"/conferences"},"Conferences",-1)),t[4]||(t[4]=y(" \xA0/\xA0 ",-1)),s("span",bO,c(e.editionMode?"Edit":"New"),1)]),s("h1",wO,[y(c(e.editionMode?"Edit":"Create a")+" ",1),t[5]||(t[5]=s("em",null,"conference",-1))]),t[42]||(t[42]=s("p",{class:"paper-page-lede"}," Give chairs access to every anonymization submitted to a venue, and lift author quotas during the review window. ",-1)),s("div",kO,[E((l(),d("aside",_O,[t[7]||(t[7]=s("div",{class:"paper-settings-toc-head"},"On this page",-1)),s("nav",null,[t[6]||(t[6]=_e('<a href="#conf-basics">Basics</a><a href="#conf-window">Review window</a><a href="#conf-rendering">Rendering defaults</a><a href="#conf-features">Features</a><a href="#conf-plan">Plan</a>',5)),E(s("a",EO,"Billing",512),[[H,e.plan?.pricePerRepo>0]])])])),[[o]]),E((l(),d("form",CO,[s("section",NO,[t[12]||(t[12]=s("div",{class:"paper-section-eyebrow"},"Basics",-1)),s("div",SO,[t[8]||(t[8]=s("label",{class:"paper-field-label",for:"name"},"Conference name",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.name?.invalid&&(e.conference?.name?.touched||e.conference?.submitted)}]),name:"name",id:"name",required:"",placeholder:"e.g. International Conference on Software Engineering"},null,2),[[r,{state:e.viewState,set:i=>{e.options.name=i},value:e.options?.name,form:"conference",options:{}}]]),E(s("div",DO," The name of the conference is invalid. ",512),[[H,e.conference?.name?.errors?.invalid]]),E(s("div",RO," The name of the conference is required. ",512),[[H,e.conference?.name?.errors?.required]])]),s("div",TO,[t[9]||(t[9]=s("label",{class:"paper-field-label",for:"url"},"Website",-1)),E(s("input",{type:"url",class:T(["form-control",{"is-invalid":e.conference?.url?.invalid&&(e.conference?.url?.touched||e.conference?.submitted)}]),name:"url",id:"url",placeholder:"https://example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.url=i},value:e.options?.url,form:"conference",options:{}}]]),E(s("div",OO," The url of the conference is invalid. ",512),[[H,e.conference?.url?.errors?.invalid]])]),s("div",AO,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"conferenceID"},"Conference ID",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.conferenceID?.invalid&&(e.conference?.conferenceID?.touched||e.conference?.submitted)}]),name:"conferenceID",id:"conferenceID",required:"",pattern:"[a-zA-Z0-9\\-_]{3,10}",placeholder:"ICSE26"},null,2),[[r,{state:e.viewState,set:i=>{e.options.conferenceID=i},value:e.options?.conferenceID,form:"conference",options:{}}]]),t[11]||(t[11]=s("small",{class:"form-text text-muted"},[y("3\u201310 characters, letters, numbers, "),s("code",null,"-"),y(" and "),s("code",null,"_"),y(". Authors reference this when they anonymize.")],-1)),E(s("div",{class:"invalid-feedback"}," The conference ID '"+c(e.options?.conferenceID)+"' is already used. ",513),[[H,e.conference?.conferenceID?.errors?.used]]),E(s("div",IO," The conference ID is required. ",512),[[H,e.conference?.conferenceID?.errors?.required]]),E(s("div",VO," The format of the conference ID is incorrect ([a-zA-Z0-9-_]{3,10}). ",512),[[H,e.conference?.conferenceID?.errors?.pattern]])])]),s("section",PO,[t[17]||(t[17]=s("div",{class:"paper-section-eyebrow"},"Review window",-1)),s("div",qO,[s("div",MO,[t[13]||(t[13]=s("label",{class:"paper-field-label",for:"startDate"},"Start date",-1)),E(s("input",{type:"date",class:T(["form-control",{"is-invalid":e.conference?.startDate?.invalid&&(e.conference?.startDate?.touched||e.conference?.submitted)}]),name:"startDate",id:"startDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.startDate=i},value:e.options?.startDate,form:"conference",options:{}}]]),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Beginning of the review process.",-1)),E(s("div",$O," Start date is required. ",512),[[H,e.conference?.startDate?.errors?.required]]),E(s("div",FO," Start date must be before end date. ",512),[[H,e.conference?.startDate?.errors?.invalid]])]),s("div",LO,[t[15]||(t[15]=s("label",{class:"paper-field-label",for:"endDate"},"End date",-1)),E(s("input",{type:"date",class:T(["form-control",{"is-invalid":e.conference?.endDate?.invalid&&(e.conference?.endDate?.touched||e.conference?.submitted)}]),name:"endDate",id:"endDate",required:""},null,2),[[r,{state:e.viewState,set:i=>{e.options.endDate=i},value:e.options?.endDate,form:"conference",options:{}}]]),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"All repositories expire on this date.",-1)),E(s("div",UO," End date is required. ",512),[[H,e.conference?.endDate?.errors?.required]]),E(s("div",zO," End date is invalid. ",512),[[H,e.conference?.endDate?.errors?.invalid]])])])]),s("section",HO,[t[25]||(t[25]=s("div",{class:"paper-section-eyebrow"},"Rendering defaults",-1)),s("div",BO,[E(s("input",GO,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.link=i},value:e.options?.options?.link,form:"conference",options:{}}]]),t[18]||(t[18]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[19]||(t[19]=s("small",{class:"form-text text-muted"},"Keep or remove all links from text files.",-1))]),s("div",jO,[E(s("input",WO,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.image=i},value:e.options?.options?.image,form:"conference",options:{}}]]),t[20]||(t[20]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[21]||(t[21]=s("small",{class:"form-text text-muted"},"Images are not anonymized.",-1))]),s("div",KO,[E(s("input",YO,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.pdf=i},value:e.options?.options?.pdf,form:"conference",options:{}}]]),t[22]||(t[22]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[23]||(t[23]=s("small",{class:"form-text text-muted"},"PDFs are not anonymized.",-1))]),s("div",xO,[E(s("input",JO,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.notebook=i},value:e.options?.options?.notebook,form:"conference",options:{}}]]),t[24]||(t[24]=s("label",{class:"form-check-label",for:"notebook"},"Display Notebooks",-1))])]),s("section",QO,[t[30]||(t[30]=s("div",{class:"paper-section-eyebrow"},"Features",-1)),s("div",XO,[E(s("input",ZO,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.update=i},value:e.options?.options?.update,form:"conference",options:{}}]]),t[26]||(t[26]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[27]||(t[27]=s("small",{class:"form-text text-muted"},"Pull the latest commit automatically (hourly maximum).",-1))]),s("div",eA,[E(s("input",tA,null,512),[[r,{state:e.viewState,set:i=>{e.options.options.page=i},value:e.options?.options?.page,form:"conference",options:{}}]]),t[28]||(t[28]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[29]||(t[29]=s("small",{class:"form-text text-muted"},"Enable anonymized GitHub pages.",-1))])]),s("section",sA,[t[32]||(t[32]=s("div",{class:"paper-section-eyebrow"},"Plan",-1)),t[33]||(t[33]=s("p",{class:"paper-section-copy"},"Billed per repository per month, prorated by the day for as long as a repository stays in the conference.",-1)),s("div",nA,[(l(!0),d(x,null,re(e.plans,(i,a)=>(l(),d("label",{class:T(["paper-plan-card",{selected:e.options?.plan?.planID==i?.id}])},[E(s("input",{type:"radio",name:"planPicker",value:i?.id},null,8,oA),[[r,{state:e.viewState,set:u=>{e.options.plan.planID=u},value:e.options?.plan?.planID,form:"conference",options:{}}]]),s("div",{class:"paper-plan-head",textContent:c(i?.name)},null,8,rA),s("div",iA,[y(c(e.fmt?.number(i?.pricePerRepo))+"\u20AC ",1),t[31]||(t[31]=s("span",{class:"paper-plan-per"},"/ repo / month",-1))]),s("div",{class:"paper-plan-desc",innerHTML:e.sanitize(i?.description)},null,8,aA)],2))),256))])]),e.plan?.pricePerRepo>0?(l(),d("section",lA,[t[41]||(t[41]=s("div",{class:"paper-section-eyebrow"},"Billing",-1)),s("div",dA,[t[34]||(t[34]=s("label",{class:"paper-field-label",for:"billing_name"},"Name",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.billing_name?.invalid&&(e.conference?.billing_name?.touched||e.conference?.submitted)}]),name:"billing_name",id:"billing_name",required:"",placeholder:"First & last name"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.name=i},value:e.options?.billing?.name,form:"conference",options:{}}]])]),s("div",uA,[t[35]||(t[35]=s("label",{class:"paper-field-label",for:"email"},"Email",-1)),E(s("input",{type:"email",class:T(["form-control",{"is-invalid":e.conference?.email?.invalid&&(e.conference?.email?.touched||e.conference?.submitted)}]),name:"email",id:"email",required:"",placeholder:"you@example.org"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.email=i},value:e.options?.billing?.email,form:"conference",options:{}}]])]),s("div",cA,[t[36]||(t[36]=s("label",{class:"paper-field-label",for:"inputAddress"},"Address",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.inputAddress?.invalid&&(e.conference?.inputAddress?.touched||e.conference?.submitted)}]),name:"inputAddress",id:"inputAddress",required:"",placeholder:"1234 Main St"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address=i},value:e.options?.billing?.address,form:"conference",options:{}}]])]),s("div",pA,[E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.inputAddress2?.invalid&&(e.conference?.inputAddress2?.touched||e.conference?.submitted)}]),name:"inputAddress2",id:"inputAddress2",placeholder:"Apartment, studio, or floor"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.address2=i},value:e.options?.billing?.address2,form:"conference",options:{}}]])]),s("div",fA,[s("div",mA,[t[37]||(t[37]=s("label",{class:"paper-field-label",for:"city"},"City",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.city?.invalid&&(e.conference?.city?.touched||e.conference?.submitted)}]),name:"city",id:"city",required:"",placeholder:"City"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.city=i},value:e.options?.billing?.city,form:"conference",options:{}}]])]),s("div",hA,[t[38]||(t[38]=s("label",{class:"paper-field-label",for:"country"},"Country",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.country?.invalid&&(e.conference?.country?.touched||e.conference?.submitted)}]),name:"country",id:"country",required:"",placeholder:"Country"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.country=i},value:e.options?.billing?.country,form:"conference",options:{}}]])]),s("div",vA,[t[39]||(t[39]=s("label",{class:"paper-field-label",for:"zip"},"Zip",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.zip?.invalid&&(e.conference?.zip?.touched||e.conference?.submitted)}]),name:"zip",id:"zip",required:"",placeholder:"Zip"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.zip=i},value:e.options?.billing?.zip,form:"conference",options:{}}]])])]),s("div",yA,[t[40]||(t[40]=s("label",{class:"paper-field-label",for:"vat"},"VAT number",-1)),E(s("input",{type:"text",class:T(["form-control",{"is-invalid":e.conference?.vat?.invalid&&(e.conference?.vat?.touched||e.conference?.submitted)}]),name:"vat",id:"vat",placeholder:"VAT Number"},null,2),[[r,{state:e.viewState,set:i=>{e.options.billing.vat=i},value:e.options?.billing?.vat,form:"conference",options:{}}]])])])):m("v-if",!0),s("div",gA,[e.error?(l(),d("div",{key:0,class:"alert alert-danger",role:"alert",textContent:c(e.error)},null,8,bA)):m("v-if",!0),e.message?(l(),d("div",{key:1,class:"alert alert-success",role:"alert",textContent:c(e.message)},null,8,wA)):m("v-if",!0),s("button",{id:"send",type:"submit",class:"btn btn-ink",onClick:t[0]||(t[0]=ge(i=>e.submitForm(i,()=>{e.submit(i)}),["prevent"]))},c(e.editionMode?"Update":"Create")+" conference ",1)])])),[[n,e.viewState]])])])}var kA={key:0},_A=["innerHTML"],EA={key:3},CA=["src"],NA=["src"],SA={key:7},DA={controls:"controls"},RA=["src"],TA={key:8},OA={key:9,class:"file-error container d-flex h-100"},AA={class:"paper-ratelimit-card m-auto",style:{"max-width":"520px"}},IA={class:"paper-error-msg"},VA={key:10,class:"file-error container d-flex h-100"},PA=["textContent"],qA={key:11,class:"file-error container d-flex h-100"},MA={key:12,class:"file-error container d-flex h-100"},$A={key:13,class:"file-error container d-flex h-100"},FA={key:14,class:"file-error container d-flex h-100"},LA={class:"paper-empty-title m-auto"},UA=["href"];function ol(e,t){let o=Qe("html-doc"),r=Qe("pdfviewer"),n=Qe("notebook"),i=ye("code-editor");return l(),d(x,null,[e.type=="text"?E((l(),d("div",kA,null,512)),[[i,{content:e.content,options:e.aceOption}]]):m("v-if",!0),e.type=="html"?(l(),d("div",{key:1,class:"file-content markdown-body",innerHTML:e.sanitize(e.content)},null,8,_A)):m("v-if",!0),e.type=="html-doc"&&!e.showSource&&e.content!=null?(l(),gs(o,{key:2,content:e.content,"base-url":e.fileBaseUrl,"allow-scripts":e.allowScripts},null,8,["content","base-url","allow-scripts"])):m("v-if",!0),(e.type=="code"||e.type=="html-doc"&&e.showSource)&&e.content!=null?E((l(),d("div",EA,null,512)),[[i,{content:e.content,options:e.aceOption}]]):m("v-if",!0),e.type=="image"?(l(),d("img",{key:4,class:"image-content",src:e.safeUrl(e.url)},null,8,CA)):m("v-if",!0),e.type=="media"?(l(),d("iframe",{key:5,class:"h-100 overflow-auto w-100 b-0",src:e.safeUrl(e.url)},null,8,NA)):m("v-if",!0),e.type=="pdf"?(l(),gs(r,{key:6,src:e.safeUrl(e.url)},null,8,["src"])):m("v-if",!0),e.type=="audio"?(l(),d("div",SA,[s("audio",DA,[s("source",{src:e.safeUrl(e.url)},null,8,RA)])])):m("v-if",!0),e.type=="IPython"?(l(),d("div",TA,[Re(n,{file:e.url,content:e.content},null,8,["file","content"])])):m("v-if",!0),e.type=="rate_limited"?(l(),d("div",OA,[s("div",AA,[t[2]||(t[2]=s("div",{class:"paper-ratelimit-head"},[s("i",{class:"fas fa-hourglass-half"}),s("div",null,[s("div",{class:"paper-error-eyebrow"},"Temporarily paused"),s("div",{class:"paper-error-title"},"GitHub API rate limit reached")])],-1)),s("p",IA,[t[0]||(t[0]=y("This repository will be available in ",-1)),s("strong",null,c(e.rateLimitCountdown),1),t[1]||(t[1]=y(". The page will reload automatically.",-1))])])])):m("v-if",!0),e.type=="error"?(l(),d("div",VA,[s("h1",{class:"paper-empty-title m-auto",textContent:c(e.fmt.translate("ERRORS."+e.content))},null,8,PA)])):m("v-if",!0),e.type=="loading"&&!e.error?(l(),d("div",qA,[...t[3]||(t[3]=[s("h1",{class:"paper-empty-title m-auto"},"Loading\u2026",-1)])])):m("v-if",!0),e.type=="empty"?(l(),d("div",MA,[...t[4]||(t[4]=[s("h1",{class:"paper-empty-title m-auto"},[y("Empty "),s("em",null,"repository"),y(".")],-1)])])):m("v-if",!0),e.content==null&&e.type!="empty"?(l(),d("div",$A,[...t[5]||(t[5]=[s("h1",{class:"paper-empty-title m-auto"},[y("Empty "),s("em",null,"file"),y(".")],-1)])])):m("v-if",!0),e.type=="binary"?(l(),d("div",FA,[s("h1",LA,[t[6]||(t[6]=y("Unsupported ",-1)),t[7]||(t[7]=s("em",null,"binary file",-1)),t[8]||(t[8]=y(". You can ",-1)),s("a",{target:"_blank",href:e.safeUrl(e.url+"&download=true")},"download it",8,UA),t[9]||(t[9]=y(".",-1))])])):m("v-if",!0)],64)}var zA={class:"container page dashboard-page paper-page"},HA={class:"row"},BA={class:"w-100"},GA={class:"w-100","aria-label":"Pull Requests","accept-charset":"UTF-8"},jA={class:"d-flex flex-column flex-md-row align-items-md-center",style:{gap:"8px"}},WA={class:"flex-grow-1"},KA={type:"search",id:"search",class:"form-control","aria-label":"Find a pull request...",placeholder:"Find a pull request...",autocomplete:"off"},YA={class:"d-flex flex-wrap",style:{gap:"6px"}},xA={class:"dropdown"},JA={class:"dropdown-menu","aria-labelledby":"dropdownSort"},QA={class:"form-check dropdown-item"},XA={class:"form-check-input",type:"radio",name:"sort",id:"sortFullName",value:"fullName"},ZA={class:"form-check dropdown-item"},eI={class:"form-check-input",type:"radio",name:"sort",id:"sortAnonymizeDate",value:"-anonymizeDate"},tI={class:"form-check dropdown-item"},sI={class:"form-check-input",type:"radio",name:"sort",id:"sortStatus",value:"-status"},nI={class:"form-check dropdown-item"},oI={class:"form-check-input",type:"radio",name:"sort",id:"sortLastView",value:"-lastView"},rI={class:"form-check dropdown-item"},iI={class:"form-check-input",type:"radio",name:"sort",id:"sortPageView",value:"-pageView"},aI={class:"dropdown"},lI={class:"dropdown-menu","aria-labelledby":"dropdownStatus"},dI={class:"form-check dropdown-item"},uI={class:"form-check-input",type:"checkbox",name:"sort",id:"statusReady",value:"ready"},cI={class:"form-check dropdown-item"},pI={class:"form-check-input",type:"checkbox",name:"sort",id:"statusExpired",value:"expired"},fI={class:"form-check dropdown-item"},mI={class:"form-check-input",type:"checkbox",name:"sort",id:"statusRemoved",value:"removed"},hI={class:"d-flex flex-wrap mt-2",style:{gap:"6px"}},vI={class:"filter-chip"},yI=["onClick"],gI={class:"repo-list w-100"},bI={class:"repo-list-item-content"},wI={class:"repo-list-item-main"},kI={class:"repo-list-item-header"},_I=["textContent","href"],EI=["textContent"],CI=["textContent"],NI={class:"repo-source"},SI=["href"],DI={class:"repo-date"},RI={class:"repo-meta"},TI={key:0,title:"Conference"},OI=["title"],AI=["title"],II=["title"],VI={key:1},PI={class:"repo-list-item-actions"},qI={class:"dropdown"},MI={class:"dropdown-menu dropdown-menu-right"},$I=["href"],FI=["onClick"],LI=["onClick"],UI=["onClick"],zI=["href"],HI={key:0,class:"repo-list-empty"};function rl(e,t){let o=ye("field"),r=ye("form");return l(),d("div",zA,[s("div",HA,[s("div",BA,[t[12]||(t[12]=_e('<div class="paper-crumbs">My work \xA0/\xA0 <span class="here">Pull requests</span></div><div class="d-flex align-items-end justify-content-between flex-wrap" style="gap:12px;"><div><h1 class="paper-page-title">Anonymized <em>pull requests</em></h1><p class="paper-page-lede">Track PR mirrors you\u2019ve created and their reviewer traffic.</p></div><div class="d-flex flex-wrap" style="gap:6px;"><a href="/anonymize" class="btn btn-ink"><i class="fa fa-plus-circle mr-1" aria-hidden="true"></i> Anonymize Repo </a><a href="/pull-request-anonymize" class="btn btn-ink"><i class="fa fa-plus-circle mr-1" aria-hidden="true"></i> Anonymize PR </a><a title="Claim the ownership of an existing anonymized repository." data-toggle="tooltip" data-placement="bottom" href="/claim" class="btn"> Claim </a></div></div>',2)),m(" Search + filters row "),E((l(),d("form",GA,[s("div",jA,[s("div",WA,[E(s("input",KA,null,512),[[o,{state:e.viewState,set:n=>{e.search=n},value:e.search,form:null,options:{}}]])]),s("div",YA,[s("div",xA,[t[6]||(t[6]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownSort","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Sort ",-1)),s("div",JA,[t[5]||(t[5]=s("h6",{class:"dropdown-header"},"Select order",-1)),s("div",QA,[E(s("input",XA,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[0]||(t[0]=s("label",{class:"form-check-label",for:"sortFullName"},"Pull Request",-1))]),s("div",ZA,[E(s("input",eI,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[1]||(t[1]=s("label",{class:"form-check-label",for:"sortAnonymizeDate"},"Anonymize Date",-1))]),s("div",tI,[E(s("input",sI,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[2]||(t[2]=s("label",{class:"form-check-label",for:"sortStatus"},"Status",-1))]),s("div",nI,[E(s("input",oI,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[3]||(t[3]=s("label",{class:"form-check-label",for:"sortLastView"},"Last View",-1))]),s("div",rI,[E(s("input",iI,null,512),[[o,{state:e.viewState,set:n=>{e.orderBy=n},value:e.orderBy,form:null,options:{}}]]),t[4]||(t[4]=s("label",{class:"form-check-label",for:"sortPageView"},"Page View",-1))])])]),s("div",aI,[t[11]||(t[11]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button",id:"dropdownStatus","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Status ",-1)),s("div",lI,[t[10]||(t[10]=s("h6",{class:"dropdown-header"},"Select status",-1)),s("div",dI,[E(s("input",uI,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.ready=n},value:e.filters?.status?.ready,form:null,options:{}}]]),t[7]||(t[7]=s("label",{class:"form-check-label",for:"statusReady"},"Ready",-1))]),s("div",cI,[E(s("input",pI,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.expired=n},value:e.filters?.status?.expired,form:null,options:{}}]]),t[8]||(t[8]=s("label",{class:"form-check-label",for:"statusExpired"},"Expired",-1))]),s("div",fI,[E(s("input",mI,null,512),[[o,{state:e.viewState,set:n=>{e.filters.status.removed=n},value:e.filters?.status?.removed,form:null,options:{}}]]),t[9]||(t[9]=s("label",{class:"form-check-label",for:"statusRemoved"},"Removed",-1))])])])])])])),[[r,e.viewState]]),m(" Active filter chips "),E(s("div",hI,[(l(!0),d(x,null,re(e.filters?.status,(n,i,a)=>E((l(),d("span",vI,[y(c(e.fmt?.title(i))+" ",1),s("button",{type:"button",class:"filter-chip-close","aria-label":"Remove filter",onClick:u=>{e.filters.status[i]=!0}}," \xD7 ",8,yI)],512)),[[H,!n]])),256))],512),[[H,e.filters?.status?.ready===!1||e.filters?.status?.expired===!1||e.filters?.status?.removed===!1]])]),m(" Pull request list "),s("ul",gI,[(l(!0),d(x,null,re(e.filteredPullRequests,(n,i)=>(l(),d("li",{class:T(["repo-list-item",{"repo-inactive":n?.status=="expired"||n?.status=="removed"||n?.status=="error"}])},[s("div",bI,[s("div",wI,[s("div",kI,[s("a",{class:"repo-name",textContent:c(n?.pullRequestId),href:e.safeUrl("/pr/"+n?.pullRequestId)},null,8,_I),s("span",{class:T(["status-badge",{"status-removed":n?.status=="removed"||n?.status=="expired"||n?.status=="removing"||n?.status=="expiring","status-preparing":n?.status=="preparing"||n?.status=="download","status-ready":n?.status=="ready","status-error":n?.status=="error"}])},[s("span",{textContent:c(e.fmt?.title(n?.status))},null,8,EI),n?.status=="error"?(l(),d("span",{key:0,textContent:c(": "+n?.statusMessage)},null,8,CI)):m("v-if",!0)],2)]),s("div",NI,[s("span",null,[t[13]||(t[13]=s("i",{class:"fab fa-github","aria-hidden":"true"},null,-1)),s("a",{href:e.safeUrl("https://github.com/"+n?.source?.repositoryFullName+"/pull/"+n?.source?.pullRequestId)},c(n?.source?.repositoryFullName)+"#"+c(n?.source?.pullRequestId),9,SI)]),s("span",{class:T(["status-badge",{"status-ready":n?.merged,"status-removed":n?.state=="open","status-error":n?.state=="closed"&&!n?.merged}]),style:{"font-size":"10px"}},c(e.fmt?.title(n?.merged?"merged":n?.state)),3),s("span",DI,"anonymized "+c(e.fmt?.humanTime(n?.anonymizeDate)),1)])]),s("div",RI,[n?.conference?(l(),d("span",TI,[t[14]||(t[14]=s("i",{class:"fas fa-chalkboard-teacher"},null,-1)),y(" "+c(n?.conference),1)])):m("v-if",!0),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Terms: "+n?.options?.terms?.join(", ")},[t[15]||(t[15]=s("i",{class:"fas fa-shield-alt"},null,-1)),y(" "+c(e.fmt?.number(n?.options?.terms?.length)),1)],8,OI),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Views: "+e.fmt?.number(n?.pageView)},[t[16]||(t[16]=s("i",{class:"far fa-eye"},null,-1)),y(" "+c(e.fmt?.number(n?.pageView)),1)],8,AI),s("span",{"data-toggle":"tooltip","data-placement":"bottom",title:"Last view: "+e.fmt?.date(n?.lastView)},[t[17]||(t[17]=s("i",{class:"far fa-calendar-alt"},null,-1)),y(" "+c(e.fmt?.humanTime(n?.lastView)),1)],8,II),n?.options?.expirationMode!="never"&&n?.status=="ready"?(l(),d("span",VI,[t[18]||(t[18]=s("i",{class:"far fa-clock"},null,-1)),y(" Expire: "+c(e.fmt?.humanTime(n?.options?.expirationDate)),1)])):m("v-if",!0)])]),s("div",PI,[s("div",qI,[t[24]||(t[24]=s("button",{class:"btn btn-sm dropdown-toggle",type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}," Actions ",-1)),s("div",MI,[s("a",{class:"dropdown-item",href:e.safeUrl("/pull-request-anonymize/"+n?.pullRequestId)},[...t[19]||(t[19]=[s("i",{class:"far fa-edit","aria-hidden":"true"},null,-1),y(" Edit ",-1)])],8,$I),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updatePullRequest(n),["prevent"])},[...t[20]||(t[20]=[s("i",{class:"fas fa-sync"},null,-1),y(" Force update ",-1)])],8,FI),[[H,n?.status=="ready"||n?.status=="error"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.updatePullRequest(n),["prevent"])},[...t[21]||(t[21]=[s("i",{class:"fas fa-check-circle"},null,-1),y(" Enable ",-1)])],8,LI),[[H,n?.status=="removed"]]),E(s("a",{class:"dropdown-item",href:"#",onClick:ge(a=>e.removePullRequest(n),["prevent"])},[...t[22]||(t[22]=[s("i",{class:"fas fa-trash-alt"},null,-1),y(" Remove ",-1)])],8,UI),[[H,n?.status=="ready"]]),s("a",{class:"dropdown-item",href:e.safeUrl("/pr/"+n?.pullRequestId+"/")},[...t[23]||(t[23]=[s("i",{class:"fa fa-eye","aria-hidden":"true"},null,-1),y(" View PR ",-1)])],8,zI)])])])],2))),256)),e.filteredPullRequests?.length==0?(l(),d("li",HI,[...t[25]||(t[25]=[s("i",{class:"fas fa-inbox"},null,-1),s("span",null,"No pull requests to display.",-1)])])):m("v-if",!0)])])])}var BI={class:"container paper-page paper-settings"},GI={class:"paper-settings-body"},jI={class:"paper-settings-toc"},WI={class:"paper-settings-main"},KI={id:"settings-quota",class:"paper-settings-section"},YI={key:0,class:"quota-row"},xI={class:"quota-item"},JI={class:"quota-header"},QI={class:"quota-label"},XI={key:0,class:"quota-value"},ZI={key:0},eV={key:1,class:"quota-unlimited-tag"},tV={key:1,class:"quota-value"},sV={key:0},nV={key:1,class:"quota-unlimited-tag"},oV=["aria-label","aria-valuenow","aria-valuemax","aria-valuetext"],rV={key:1,class:"quota-row","aria-hidden":"true"},iV={class:"quota-item"},aV={id:"settings-terms",class:"paper-settings-section"},lV={class:"form-group"},dV={class:"form-control",id:"terms",name:"terms",rows:"4",placeholder:`Jane Smith
|
||
MIT CSAIL
|
||
jane.smith@example.org`},uV={id:"termsHelp",class:"form-text text-muted"},cV={class:"invalid-feedback"},pV={id:"settings-display",class:"paper-settings-section"},fV={class:"form-group paper-check-list"},mV={class:"form-check"},hV={class:"form-check-input",type:"checkbox",id:"link",name:"link"},vV={class:"form-check"},yV={class:"form-check-input",type:"checkbox",id:"image",name:"image"},gV={class:"form-check"},bV={class:"form-check-input",type:"checkbox",id:"pdf",name:"pdf"},wV={class:"form-check"},kV={class:"form-check-input",type:"checkbox",id:"notebook",name:"notebook"},_V={id:"settings-features",class:"paper-settings-section"},EV={class:"form-group paper-check-list"},CV={class:"form-check"},NV={class:"form-check-input",type:"checkbox",id:"page",name:"page"},SV={class:"form-check"},DV={class:"form-check-input",type:"checkbox",id:"loc",name:"loc"},RV={class:"form-check"},TV={class:"form-check-input",type:"checkbox",id:"update",name:"update"},OV={class:"form-group"},AV={class:"form-control",id:"mode",name:"mode"},IV={class:"form-text text-muted"},VV={id:"settings-expiration",class:"paper-settings-section"},PV={class:"form-group"},qV={class:"form-control",id:"expiration",name:"expiration"},MV={class:"paper-settings-footer"},$V={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},FV=["textContent"],LV={class:"paper-settings-actions"},UV=["disabled"],zV={key:0,class:"fas fa-check mr-1","aria-hidden":"true"},HV={id:"settings-account",class:"paper-settings-section"},BV={class:"paper-account-card"},GV=["src"],jV={class:"paper-account-identity"},WV={class:"paper-account-name"},KV={class:"paper-danger-zone"},YV={key:0,class:"paper-inline-alert paper-inline-alert-error",role:"alert"},xV=["textContent"],JV=["disabled"];function il(e,t){let o=ye("paper-scrollspy"),r=ye("field"),n=ye("form");return l(),d("div",BI,[t[47]||(t[47]=_e('<div class="paper-crumbs"><a href="/dashboard">My work</a> \xA0/\xA0 <span class="here">Settings</span></div><h1 class="paper-page-title">Your <em>settings</em></h1><p class="paper-page-lede">Defaults applied to every new anonymization, your quotas, and your account.</p>',3)),s("div",GI,[E((l(),d("aside",jI,[...t[2]||(t[2]=[_e('<div class="paper-settings-toc-head">On this page</div><nav><a href="#settings-quota">Quota</a><a href="#settings-terms">Terms to redact</a><a href="#settings-display">Display</a><a href="#settings-features">Features</a><a href="#settings-expiration">Expiration</a><a href="#settings-account">Account</a></nav>',2)])])),[[o]]),s("div",WI,[m(" Quota: same markup as the dashboard, driven by quotaService "),s("section",KI,[t[4]||(t[4]=s("div",{class:"paper-section-eyebrow"},"Quota",-1)),t[5]||(t[5]=s("p",{class:"paper-section-copy"},"What you are using across all your anonymizations. Conferences can lift these limits during a review window.",-1)),e.quota?(l(),d("div",YI,[(l(),d(x,null,re([{key:"repository",label:"Repositories",kind:"count"},{key:"storage",label:"Storage",kind:"bytes"},{key:"file",label:"Files",kind:"count"}],(i,a)=>s("div",xI,[s("div",JI,[s("span",QI,c(i?.label),1),i?.kind==="count"?(l(),d("span",XI,[y(c(e.fmt?.number(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",ZI," / "+c(e.fmt?.number(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",eV,"Unlimited")):m("v-if",!0)])):m("v-if",!0),i?.kind==="bytes"?(l(),d("span",tV,[y(c(e.fmt?.humanFileSize(e.quota[i?.key].used)),1),e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("span",sV," / "+c(e.fmt?.humanFileSize(e.quota[i?.key].total)),1)),e.quota[i?.key].unlimited?(l(),d("span",nV,"Unlimited")):m("v-if",!0)])):m("v-if",!0)]),s("div",{class:T(["quota-track","quota-"+e.quota[i?.key].level]),role:"progressbar","aria-valuemin":"0","aria-label":i?.label+" quota","aria-valuenow":e.quota[i?.key].used,"aria-valuemax":e.quota[i?.key].unlimited?e.quota[i?.key].used:e.quota[i?.key].total,"aria-valuetext":e.quota[i?.key].unlimited?"unlimited":e.fmt.number(e.quota[i?.key].percent,0)+"% used"},[e.quota[i?.key].unlimited?m("v-if",!0):(l(),d("div",{key:0,class:"quota-fill",style:Oe({width:e.quota[i?.key].percent+"%"})},null,4))],10,oV)])),64))])):m("v-if",!0),e.quota?m("v-if",!0):(l(),d("div",rV,[(l(),d(x,null,re([1,2,3],(i,a)=>s("div",iV,[...t[3]||(t[3]=[s("div",{class:"quota-header"},[s("span",{class:"skeleton skeleton-line",style:{width:"40%"}}),s("span",{class:"skeleton skeleton-line",style:{width:"25%"}})],-1),s("div",{class:"quota-track"},null,-1)])])),64))]))]),E((l(),d("form",{class:"form needs-validation",name:"defaultsForm",novalidate:"",onSubmit:t[0]||(t[0]=ge(i=>e.submitForm(i,()=>{e.saveDefault(i)}),["prevent"]))},[s("section",aV,[t[11]||(t[11]=s("div",{class:"paper-section-eyebrow"},"Terms to redact",-1)),t[12]||(t[12]=s("p",{class:"paper-section-copy"},"Pre-filled in every new anonymization. You can still edit the list per anonymization.",-1)),s("div",lV,[t[10]||(t[10]=s("label",{class:"paper-field-label",for:"terms"},"Default terms",-1)),E(s("textarea",dV,null,512),[[r,{state:e.viewState,set:i=>{e.terms=i},value:e.terms,form:"defaultsForm",options:{debounce:250}}]]),s("small",uV,[t[6]||(t[6]=y(" One term per line (regex allowed). Each match is replaced by ",-1)),s("code",null,c(e.site_options?.ANONYMIZATION_MASK||"XXX")+"-[N]",1),t[7]||(t[7]=y(", or use ",-1)),t[8]||(t[8]=s("code",null,"term=>replacement",-1)),t[9]||(t[9]=y(" to pick your own. ",-1))]),E(s("div",cV," Terms are in an invalid format ",512),[[H,e.defaultsForm?.terms?.errors?.format]])])]),s("section",pV,[t[21]||(t[21]=s("div",{class:"paper-section-eyebrow"},"Display",-1)),t[22]||(t[22]=s("p",{class:"paper-section-copy"},"What reviewers can see inside an anonymized repository.",-1)),s("div",fV,[s("div",mV,[E(s("input",hV,null,512),[[r,{state:e.viewState,set:i=>{e.options.link=i},value:e.options?.link,form:"defaultsForm",options:{}}]]),t[13]||(t[13]=s("label",{class:"form-check-label",for:"link"},"Keep links",-1)),t[14]||(t[14]=s("small",{class:"form-text text-muted"},"Unchecked, every link in text files is removed.",-1))]),s("div",vV,[E(s("input",yV,null,512),[[r,{state:e.viewState,set:i=>{e.options.image=i},value:e.options?.image,form:"defaultsForm",options:{}}]]),t[15]||(t[15]=s("label",{class:"form-check-label",for:"image"},"Display images",-1)),t[16]||(t[16]=s("small",{class:"form-text text-muted"},"Images are shown as is. They are not anonymized.",-1))]),s("div",gV,[E(s("input",bV,null,512),[[r,{state:e.viewState,set:i=>{e.options.pdf=i},value:e.options?.pdf,form:"defaultsForm",options:{}}]]),t[17]||(t[17]=s("label",{class:"form-check-label",for:"pdf"},"Display PDFs",-1)),t[18]||(t[18]=s("small",{class:"form-text text-muted"},"PDFs are shown as is. They are not anonymized.",-1))]),s("div",wV,[E(s("input",kV,null,512),[[r,{state:e.viewState,set:i=>{e.options.notebook=i},value:e.options?.notebook,form:"defaultsForm",options:{}}]]),t[19]||(t[19]=s("label",{class:"form-check-label",for:"notebook"},"Display notebooks",-1)),t[20]||(t[20]=s("small",{class:"form-text text-muted"},"Render Jupyter notebooks instead of raw JSON.",-1))])])]),s("section",_V,[t[31]||(t[31]=s("div",{class:"paper-section-eyebrow"},"Features",-1)),s("div",EV,[s("div",CV,[E(s("input",NV,null,512),[[r,{state:e.viewState,set:i=>{e.options.page=i},value:e.options?.page,form:"defaultsForm",options:{}}]]),t[23]||(t[23]=s("label",{class:"form-check-label",for:"page"},"GitHub Pages",-1)),t[24]||(t[24]=s("small",{class:"form-text text-muted"},"Serve an anonymized copy of the repository's GitHub Pages site. Only pages built from the anonymized branch are supported.",-1))]),s("div",SV,[E(s("input",DV,null,512),[[r,{state:e.viewState,set:i=>{e.options.loc=i},value:e.options?.loc,form:"defaultsForm",options:{}}]]),t[25]||(t[25]=s("label",{class:"form-check-label",for:"loc"},"Lines of code",-1)),t[26]||(t[26]=s("small",{class:"form-text text-muted"},"Show the line count of the repository in the explorer.",-1))]),s("div",RV,[E(s("input",TV,null,512),[[r,{state:e.viewState,set:i=>{e.options.update=i},value:e.options?.update,form:"defaultsForm",options:{}}]]),t[27]||(t[27]=s("label",{class:"form-check-label",for:"update"},"Auto-update from GitHub",-1)),t[28]||(t[28]=s("small",{class:"form-text text-muted"},"Follow the branch and pull the latest commit automatically, at most once an hour.",-1))])]),s("div",OV,[t[30]||(t[30]=s("label",{class:"paper-field-label",for:"mode"},"Fetch mode",-1)),E((l(),d("select",AV,[...t[29]||(t[29]=[s("option",{value:"GitHubStream",selected:""},"Stream from GitHub on demand",-1),s("option",{value:"GitHubDownload"},"Download to Anonymous GitHub",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.mode=i},value:e.options?.mode,form:"defaultsForm",options:{}}]]),s("small",IV," Download is faster for reviewers and enables every feature. Streaming is the only option above "+c(e.fmt?.humanFileSize(e.site_options?.MAX_REPO_SIZE*1024))+". ",1)])]),s("section",VV,[t[35]||(t[35]=s("div",{class:"paper-section-eyebrow"},"Expiration",-1)),s("div",PV,[t[33]||(t[33]=s("label",{class:"paper-field-label",for:"expiration"},"When an anonymization expires",-1)),E((l(),d("select",qV,[...t[32]||(t[32]=[s("option",{value:"redirect"},"Redirect visitors to the GitHub repository",-1),s("option",{value:"remove",selected:""},"Remove the anonymized repository",-1)])])),[[r,{state:e.viewState,set:i=>{e.options.expirationMode=i},value:e.options?.expirationMode,form:"defaultsForm",options:{}}]]),t[34]||(t[34]=s("small",{class:"form-text text-muted"}," The expiration date itself is chosen per anonymization. Redirecting reveals the source repository, so pick it only once the review is over. ",-1))])]),s("div",MV,[e.error?(l(),d("div",$V,[t[36]||(t[36]=s("i",{class:"fas fa-exclamation-circle","aria-hidden":"true"},null,-1)),t[37]||(t[37]=y()),s("span",{textContent:c(e.error)},null,8,FV)])):m("v-if",!0),s("div",LV,[s("button",{id:"save",type:"submit",class:"btn btn-ink",disabled:e.saving},[e.message?(l(),d("i",zV)):m("v-if",!0),y(c(e.saving?"Saving\u2026":e.message?"Saved":"Save defaults"),1)],8,UV),t[38]||(t[38]=s("span",{class:"paper-settings-hint"},"Applies to new anonymizations only. Existing ones keep their settings.",-1))])])],32)),[[n,e.viewState]]),s("section",HV,[t[46]||(t[46]=s("div",{class:"paper-section-eyebrow"},"Account",-1)),s("div",BV,[e.user?.photo?(l(),d("img",{key:0,width:"40",height:"40",class:"rounded-circle",alt:"",src:e.safeUrl(e.user?.photo)},null,8,GV)):m("v-if",!0),s("div",jV,[s("div",WV,"@"+c(e.user?.username),1),t[39]||(t[39]=s("div",{class:"paper-account-meta"},"Signed in with GitHub. Anonymous GitHub only reads your repositories.",-1))]),t[40]||(t[40]=s("a",{class:"btn btn-outline-ink",href:"/api/user/logout",target:"_self"},"Sign out",-1))]),s("div",KV,[t[44]||(t[44]=s("div",{class:"paper-danger-head"},"Delete account",-1)),t[45]||(t[45]=s("p",{class:"paper-danger-copy"}," Removes all your anonymized repositories, gists, and pull requests, revokes the application's access to your GitHub account, and erases your personal data (username, email, access tokens). This cannot be undone. ",-1)),e.deleteError?(l(),d("div",YV,[t[41]||(t[41]=s("i",{class:"fas fa-exclamation-circle","aria-hidden":"true"},null,-1)),t[42]||(t[42]=y()),s("span",{textContent:c(e.deleteError)},null,8,xV)])):m("v-if",!0),s("button",{type:"button",class:"btn btn-outline-danger",onClick:t[1]||(t[1]=i=>e.deleteAccount()),disabled:e.deletingAccount},[t[43]||(t[43]=s("i",{class:"fas fa-trash-alt mr-1","aria-hidden":"true"},null,-1)),y(c(e.deletingAccount?"Deleting\u2026":"Delete my account"),1)],8,JV)])])])])])}var QV={class:"pr-page"},XV={class:"container paper-page pr-page-inner"},ZV={class:"pr-header"},eP={class:"paper-page-title pr-title"},tP=["textContent"],sP={key:1,class:"text-muted"},nP=["href"],oP={class:"pr-header-meta"},rP={key:0,class:"pr-meta-item"},iP=["textContent"],aP={key:1,class:"pr-meta-item"},lP=["textContent"],dP={key:2,class:"pr-meta-item"},uP=["textContent"],cP={key:0,class:"pr-body-card"},pP={key:1,class:"paper-tabs",role:"tablist"},fP=["textContent"],mP={class:"paper-tab-content"},hP={key:0},vP=["innerHTML"],yP={key:1},gP={class:"pr-comments"},bP={class:"pr-comment"},wP={class:"pr-comment-head"},kP={key:0,class:"pr-comment-author"},_P=["textContent"],EP=["textContent"],CP={key:0,class:"pr-comment-body"},NP={key:0,class:"paper-table-empty"};function al(e,t){let o=Qe("markdown");return l(),d("div",QV,[s("div",XV,[t[15]||(t[15]=s("div",{class:"paper-crumbs"},[s("a",{href:"/dashboard"},"Reviewer"),y(" \xA0/\xA0 "),s("span",{class:"here"},"Pull request")],-1)),s("header",ZV,[s("h1",eP,[e.details?.title?(l(),d("span",{key:0,textContent:c(e.details?.title)},null,8,tP)):m("v-if",!0),e.details?.title?m("v-if",!0):(l(),d("span",sP,"Untitled pull request")),e.options?.isAdmin||e.options?.isOwner?(l(),d("a",{key:2,class:"btn btn-sm","aria-label":"Edit",href:e.safeUrl("/pull-request-anonymize/"+e.pullRequestId)},[...t[2]||(t[2]=[s("i",{class:"far fa-edit"},null,-1),s("span",{class:"d-none d-md-inline"}," Edit",-1)])],8,nP)):m("v-if",!0)]),s("div",oP,[s("span",{class:T(["paper-pill",{good:e.details?.merged,warn:e.details?.state=="open",bad:e.details?.state=="closed"&&!e.details?.merged}])},[s("span",{class:T(["status-dot",{"status-ready":e.details?.merged,"status-error":e.details?.state=="closed"&&!e.details?.merged}])},null,2),y(" "+c(e.details?.merged?"Merged":e.fmt.title(e.details?.state)),1)],2),e.details?.baseRepositoryFullName?(l(),d("span",rP,[t[3]||(t[3]=s("i",{class:"fab fa-github"},null,-1)),t[4]||(t[4]=y()),s("span",{textContent:c(e.details?.baseRepositoryFullName)},null,8,iP)])):m("v-if",!0),e.details?.updatedDate?(l(),d("span",aP,[t[5]||(t[5]=s("i",{class:"far fa-clock"},null,-1)),t[6]||(t[6]=y()),s("span",{textContent:c(e.fmt?.date(e.details?.updatedDate))},null,8,lP)])):m("v-if",!0),e.details?.anonymizeDate?(l(),d("span",dP,[t[7]||(t[7]=s("i",{class:"fas fa-user-secret"},null,-1)),t[8]||(t[8]=y(" Anonymized ",-1)),s("span",{textContent:c(e.fmt?.date(e.details?.anonymizeDate))},null,8,uP)])):m("v-if",!0)])]),e.details?.body?(l(),d("section",cP,[t[9]||(t[9]=s("div",{class:"paper-section-eyebrow"},"Description",-1)),Re(o,{content:e.details?.body},null,8,["content"])])):m("v-if",!0),e.details?.diff||e.details?.comments?(l(),d("nav",pP,[e.details?.diff?(l(),d("button",{key:0,class:T(["paper-tab",{active:e.tabState?.active=="diff"}]),type:"button",role:"tab",onClick:t[0]||(t[0]=r=>e.tabState.active="diff")},[...t[10]||(t[10]=[s("i",{class:"fas fa-code"},null,-1),y(" Diff ",-1)])],2)):m("v-if",!0),e.details?.comments?(l(),d("button",{key:1,class:T(["paper-tab",{active:e.tabState?.active=="comments"}]),type:"button",role:"tab",onClick:t[1]||(t[1]=r=>e.tabState.active="comments")},[t[11]||(t[11]=s("i",{class:"far fa-comment-dots"},null,-1)),s("span",{textContent:c(e.fmt.plural(e.details?.comments?.length,{0:"No comments",one:"1 comment",other:"{} comments"}))},null,8,fP)],2)):m("v-if",!0)])):m("v-if",!0),s("div",mP,[e.details?.diff&&e.tabState?.active=="diff"?(l(),d("div",hP,[s("div",{class:"pr-diff",innerHTML:e.sanitize(e.fmt?.diff(e.details?.diff))},null,8,vP)])):m("v-if",!0),e.details?.comments&&e.tabState?.active=="comments"?(l(),d("div",yP,[s("ul",gP,[(l(!0),d(x,null,re(e.details?.comments,(r,n)=>(l(),d("li",bP,[s("div",wP,[r?.author?(l(),d("span",kP,[t[12]||(t[12]=s("i",{class:"far fa-user"},null,-1)),t[13]||(t[13]=y(" @",-1)),s("span",{textContent:c(r?.author)},null,8,_P)])):m("v-if",!0),r?.updatedDate?(l(),d("span",{key:1,class:"pr-comment-date",textContent:c(e.fmt?.date(r?.updatedDate))},null,8,EP)):m("v-if",!0)]),r?.body?(l(),d("div",CP,[Re(o,{content:r?.body},null,8,["content"])])):m("v-if",!0)]))),256)),e.details?.comments?.length?m("v-if",!0):(l(),d("li",NP,[...t[14]||(t[14]=[s("i",{class:"far fa-comment-dots"},null,-1),s("span",null,"No comments on this pull request.",-1)])]))])])):m("v-if",!0)])])])}var SP={class:"container paper-page"},DP={class:"d-flex align-items-end justify-content-between flex-wrap",style:{gap:"12px"}},RP={class:"paper-page-title"},TP=["textContent"],OP={key:1},AP={class:"paper-settings-section"},IP={key:0,class:"paper-ratelimit-card",role:"status"},VP={class:"paper-error-msg"},PP=["aria-valuenow"],qP={class:"paper-progress-label"},MP=["textContent"],$P={key:0},FP=["textContent"],LP={class:"paper-progress-pct"},UP={key:2,class:"paper-error-card",role:"alert"},zP={key:0,class:"paper-error-msg"},HP={key:1,class:"paper-error-msg"},BP={class:"paper-error-actions"},GP=["href"],jP={class:"paper-detail-grid"},WP={class:"detail-value"},KP=["href"],YP={key:0,class:"detail-label"},xP={key:1,class:"detail-value"},JP=["href"],QP={key:3,class:"anonymize-submit-bar"},XP=["href"],ZP=["href"];function ll(e,t){return l(),d("div",SP,[t[16]||(t[16]=s("div",{class:"paper-crumbs"},[y("Anonymization \xA0/\xA0 "),s("span",{class:"here"},"Status")],-1)),s("div",DP,[s("div",null,[s("h1",RP,[t[0]||(t[0]=y("Status of ",-1)),s("em",null,c(e.repoId),1)]),t[1]||(t[1]=s("p",{class:"paper-page-lede"},"Track progress as your anonymization is prepared.",-1))]),s("span",{class:T(["status-pill",{"status-pill-ready":e.repo?.status=="ready","status-pill-error":e.repo?.status=="error","status-pill-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-pill-ratelimit":e.rateLimitResetAt}])},[s("span",{class:T(["status-dot",{"status-ready":e.repo?.status=="ready","status-error":e.repo?.status=="error","status-removed":e.repo?.status=="removed"||e.repo?.status=="expired","status-ratelimit":e.rateLimitResetAt}])},null,2),e.rateLimitResetAt?m("v-if",!0):(l(),d("span",{key:0,textContent:c(e.fmt?.title(e.repo?.status))},null,8,TP)),e.rateLimitResetAt?(l(),d("span",OP,"Rate limited")):m("v-if",!0)],2)]),s("section",AP,[t[14]||(t[14]=s("div",{class:"paper-section-eyebrow"},"Progress",-1)),t[15]||(t[15]=s("p",{class:"paper-section-copy"},[y(" The repository will take a few minutes to get ready, depending on its size. Visit the "),s("a",{href:"/faq"},"FAQ"),y(" for more information. ")],-1)),e.rateLimitResetAt?(l(),d("div",IP,[t[4]||(t[4]=s("div",{class:"paper-ratelimit-head"},[s("i",{class:"fas fa-hourglass-half"}),s("div",null,[s("div",{class:"paper-error-eyebrow"},"Temporarily paused"),s("div",{class:"paper-error-title"},"GitHub API rate limit reached")])],-1)),s("p",VP,[t[2]||(t[2]=y("Anonymization will resume automatically in ",-1)),s("strong",null,c(e.rateLimitCountdown),1),t[3]||(t[3]=y(". No action needed \u2014 the job is queued and will continue where it left off.",-1))])])):m("v-if",!0),e.repo?.status!="error"&&!e.rateLimitResetAt?(l(),d("div",{key:1,class:T(["paper-progress",{"paper-progress-ready":e.repo?.status=="ready"}]),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e.progress},[s("div",{class:"paper-progress-bar",style:Oe("width: "+e.progress+"%;")},null,4),s("div",qP,[s("span",{textContent:c(e.fmt?.title(e.repo?.status))},null,8,MP),e.repo?.statusMessage?(l(),d("span",$P,[t[5]||(t[5]=y("\xA0\xB7\xA0",-1)),s("span",{textContent:c(e.repo?.statusMessage)},null,8,FP)])):m("v-if",!0),s("span",LP,c(e.progress||0)+"%",1)])],10,PP)):m("v-if",!0),e.repo?.status=="error"&&!e.rateLimitResetAt?(l(),d("div",UP,[t[9]||(t[9]=s("div",{class:"paper-error-head"},[s("i",{class:"fas fa-exclamation-triangle"}),s("div",null,[s("div",{class:"paper-error-eyebrow"},"Anonymization failed"),s("div",{class:"paper-error-title"},"Something went wrong while preparing this repository.")])],-1)),e.repo?.statusMessage?(l(),d("p",zP,c(e.fmt?.translate("ERRORS."+e.repo?.statusMessage)),1)):m("v-if",!0),e.repo?.statusMessage?m("v-if",!0):(l(),d("p",HP,"No additional details were reported. The most common causes are private repositories, missing branches, and rate limits.")),t[10]||(t[10]=s("ul",{class:"paper-error-hints"},[s("li",null,"Make sure the source URL points to a repository or pull request you can access."),s("li",null,"Check that the chosen branch and commit still exist on GitHub."),s("li",null,"If you just signed in, the access token may need a moment to propagate \u2014 try again.")],-1)),s("div",BP,[s("a",{class:"btn btn-ink",href:e.safeUrl("/anonymize/"+e.repoId)},[...t[6]||(t[6]=[s("i",{class:"far fa-edit mr-1"},null,-1),y(" Edit anonymization",-1)])],8,GP),t[7]||(t[7]=s("a",{class:"btn",href:"/faq"},[s("i",{class:"far fa-question-circle mr-1"}),y(" Read the FAQ")],-1)),t[8]||(t[8]=s("a",{class:"btn",href:"https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml",target:"_blank",rel:"noopener"},[s("i",{class:"fas fa-bug mr-1","aria-hidden":"true"}),y(" Report a bug in Anonymous GitHub")],-1))])])):m("v-if",!0),s("div",jP,[t[11]||(t[11]=s("div",{class:"detail-label"},"Repository",-1)),s("div",WP,[s("a",{target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},"/r/"+c(e.repoId)+"/",9,KP)]),e.repo?.options?.page?(l(),d("div",YP,"GitHub Page")):m("v-if",!0),e.repo?.options?.page?(l(),d("div",xP,[s("a",{target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},"/w/"+c(e.repoId)+"/",9,JP)])):m("v-if",!0)]),e.repo?.status=="ready"?(l(),d("div",QP,[s("a",{class:"btn btn-ink",target:"_self",href:e.safeUrl("/r/"+e.repoId+"/")},[...t[12]||(t[12]=[s("i",{class:"far fa-eye mr-1"},null,-1),y(" Go to anonymized repository ",-1)])],8,XP),e.repo?.options?.page?(l(),d("a",{key:0,class:"btn",target:"_self",href:e.safeUrl("/w/"+e.repoId+"/")},[...t[13]||(t[13]=[s("i",{class:"fas fa-globe mr-1"},null,-1),y(" Go to anonymized GitHub page ",-1)])],8,ZP)):m("v-if",!0)])):m("v-if",!0)]),t[17]||(t[17]=_e('<section class="paper-settings-section"><div class="paper-section-eyebrow">Support Anonymous GitHub</div><p class="paper-section-copy"> A small team keeps this running. If it helps you, please consider contributing back \u2014 in code, ideas, or coffee. </p><div class="paper-support-grid"><a class="paper-support-card" href="https://github.com/tdurieux/anonymous_github/" target="_blank" rel="noopener"><div class="paper-support-eyebrow"><i class="fas fa-code-branch"></i> Contribute</div><p>Collaborate by implementing new features and fixing bugs. Help with new file formats or deployment is welcome.</p><span class="paper-support-cta">Open on GitHub <i class="fas fa-arrow-right"></i></span></a><a class="paper-support-card" href="https://github.com/tdurieux/anonymous_github/issues/new?template=issue_report.yml" target="_blank" rel="noopener"><div class="paper-support-eyebrow"><i class="far fa-comment-dots"></i> Feedback</div><p>Tell us about bugs and missing features in Anonymous GitHub itself. Questions about an anonymized repository go to its authors.</p><span class="paper-support-cta">File an issue <i class="fas fa-arrow-right"></i></span></a><a class="paper-support-card" href="https://github.com/sponsors/tdurieux/" target="_blank" rel="noopener"><div class="paper-support-eyebrow"><i class="fas fa-heart"></i> Sponsor</div><p>Server costs hover around $25 a month. Any contribution helps keep the lights on.</p><span class="paper-support-cta">GitHub Sponsors <i class="fas fa-arrow-right"></i></span></a></div><div class="paper-kofi-wrap"><iframe id="kofiframe" src="https://ko-fi.com/tdurieux/?hidefeed=true&widget=true&embed=true&preview=true" title="tdurieux" loading="lazy"></iframe></div></section>',1))])}var Gn={"partials/404.htm":$a,"partials/admin/conferences.htm":Fa,"partials/admin/errors.htm":La,"partials/admin/overview.htm":Ua,"partials/admin/queues.htm":za,"partials/admin/repositories.htm":Ha,"partials/admin/user.htm":Ba,"partials/admin/users.htm":Ga,"partials/anonymize.htm":ja,"partials/anonymizePullRequest.htm":Wa,"partials/claim.htm":Ka,"partials/conference.htm":Ya,"partials/conferences.htm":xa,"partials/dashboard.htm":Ja,"partials/explorer.htm":Qa,"partials/faq.htm":Xa,"partials/gist.htm":Za,"partials/header.htm":el,"partials/home.htm":tl,"partials/loading.htm":sl,"partials/newConference.htm":nl,"partials/pageView.htm":ol,"partials/pr-dashboard.htm":rl,"partials/profile.htm":il,"partials/pullRequest.htm":al,"partials/status.htm":ll};function dl(e,t){e==="partials/explorer.htm"&&(t.sidebarCollapsed=window.matchMedia?.("(max-width: 767px)").matches||!1),e==="partials/anonymize.htm"&&(t.prTabState={active:t.options.diff?"diff":"comments"}),e==="partials/gist.htm"&&(t.tabState={active:t.details?.files?"files":"comments"}),["partials/conferences.htm","partials/conference.htm"].includes(e)&&(t.statusLabels={ready:"Ready",expired:"Expired",removed:"Removed"});let r={"partials/dashboard.htm":["filteredItems",()=>t.items,"itemFilter"],"partials/conferences.htm":["filteredConferences",()=>t.conferences,"conferenceFilter"],"partials/conference.htm":["filteredRepositories",()=>t.conference?.repositories,"repoFiler"],"partials/admin/repositories.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/user.htm":["filteredRepositories",()=>t.repositories,"repoFiler"],"partials/admin/users.htm":["filteredUsers",()=>t.users,"userFiler"],"partials/admin/conferences.htm":["filteredConferences",()=>t.conferences]}[e];if(r){let n=Xe(()=>t.fmt.orderBy(t.fmt.filter(r[1](),t[r[2]]),t.orderBy));Object.defineProperty(t,r[0],{configurable:!0,get:()=>n.value})}}function ul(e=(...t)=>fetch(...t)){async function t(r,n,i,a={}){let u=new URL(n,window.location.href);for(let[v,g]of Object.entries(a.params||{}))if(g!=null)for(let f of Array.isArray(g)?g:[g])u.searchParams.append(v,typeof f=="object"?JSON.stringify(f):f);let p=new AbortController,h;a.timeout?.then?a.timeout.then(()=>p.abort()):a.timeout&&(h=setTimeout(()=>p.abort(),a.timeout));try{let v={Accept:"application/json, text/plain, */*",...a.headers},g=document.cookie.match(/(?:^|;\s*)XSRF-TOKEN=([^;]*)/);g&&u.origin===window.location.origin&&(v["X-XSRF-TOKEN"]=decodeURIComponent(g[1]));let f;i!==void 0&&(i instanceof FormData?f=i:(v["Content-Type"]||(v["Content-Type"]="application/json;charset=utf-8"),f=JSON.stringify(i)));let b=await e(u.href,{method:r,headers:v,body:f,credentials:"same-origin",signal:p.signal}),_=await b.text(),k=_;if(a.transformResponse)k=a.transformResponse(_);else if(_&&(/json/i.test(b.headers.get("content-type")||"")||/^[\[{]/.test(_.trim())))try{k=JSON.parse(_)}catch{}let R={data:k,status:b.status,headers:S=>b.headers.get(S)};if(!b.ok)throw R;return R}catch(v){throw v.name==="AbortError"?{status:-1,data:null}:v}finally{clearTimeout(h)}}let o={};for(let r of["get","delete","head"])o[r]=(n,i)=>t(r.toUpperCase(),n,void 0,i);for(let r of["post","put","patch"])o[r]=(n,i,a)=>t(r.toUpperCase(),n,i,a);return o}var cl={resolve:e=>Promise.resolve(e),reject:e=>Promise.reject(e),all:e=>Promise.all(e),defer(){let e,t;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}};var pl=function(e){function t(o){return o=o||{used:0,total:0},o.unlimited=!o.total,o.percent=o.unlimited?0:Math.min(100,o.used*100/o.total),o.level=o.unlimited?"unlimited":o.percent>=95?"danger":o.percent>=80?"warn":"ok",o}return{decorate:t,load:function(){return e.get("/api/user/quota").then(o=>{let r=o.data||{};return r.storage=t(r.storage),r.file=t(r.file),r.repository=t(r.repository),r})}}};var jo={};Al(jo,{bigNum:()=>t3,date:()=>p3,diff:()=>i3,filter:()=>u3,humanFileSize:()=>e3,humanTime:()=>s3,limitTo:()=>d3,number:()=>a3,orderBy:()=>c3,plural:()=>f3,statusLabel:()=>o3,statusMsg:()=>r3,title:()=>n3,uppercase:()=>l3});var e3=e=>window.humanFileSize(e),t3=(function(){return function(t){let o=Number(t)||0,r=Math.abs(o);return r<1e3?String(o):r<1e4?(o/1e3).toFixed(1).replace(/\.0$/,"")+"k":r<1e6?Math.round(o/1e3)+"k":r<1e7?(o/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(o/1e6)+"M"}})(),s3=(function(){return function(t){if(!t)return"never";t instanceof Date&&(t=Math.round((Date.now()-t)/1e3)),(typeof t=="string"||typeof t=="number")&&(t=Math.round((Date.now()-new Date(t))/1e3));var o=t<0?"from now":"ago";if(Math.abs(t)>7200*24){let p=new Date;return p.setSeconds(p.getSeconds()-t),"on "+p.toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"})}t=Math.abs(t);for(var r=[t/60/60/24/365,t/60/60/24/30,t/60/60/24/7,t/60/60/24,t/60/60,t/60,t],n=["year","month","week","day","hour","minute","second"],i=0;i<n.length;i++){var a=Math.floor(r[i]),u=n[i];if(a>1&&(u+="s"),a>=1)return a+" "+u+" "+o}return"0 seconds "+o}})(),n3=(function(){return function(e){if(!e)return e;e=e.toLowerCase();var t=e.split(" "),o=t.map(function(r){return r.charAt(0).toUpperCase()+r.substring(1,r.length)});return o.join(" ")}})(),o3=(function(){var e={ready:"Ready",error:"Error",expired:"Expired",expiring:"Expiring",removed:"Removed",removing:"Removing",queue:"Queued",download:"Downloading",downloaded:"Downloaded",preparing:"Preparing",anonymizing:"Anonymizing"};return function(t){if(!t)return"";if(e[t])return e[t];var o=String(t).replace(/[_-]+/g," ").toLowerCase();return o.charAt(0).toUpperCase()+o.slice(1)}})(),r3=(function(){var e={branch_not_found:"Branch not found on GitHub",repo_not_found:"Repository not found on GitHub",repository_not_found:"Repository not found on GitHub",repo_not_accessible:"Repository is not accessible with your token",pr_not_found:"Pull request not found on GitHub",gist_not_found:"Gist not found on GitHub",commit_not_found:"Commit not found on GitHub",repo_too_big:"Repository exceeds the size limit",quota_exceeded:"Storage quota exceeded",incomplete_record:"Incomplete record: missing identifier"};return function(t){if(!t)return t;var o=t.match(/^rate_limited:(\d+)$/);if(o){var r=Math.max(0,Math.ceil((parseInt(o[1],10)-Date.now())/1e3));if(r<=0)return"Rate limited \u2014 resuming soon";var n=Math.floor(r/60),i=r%60;return"Rate limited \u2014 retrying in "+(n>0?n+"m "+i+"s":i+"s")}if(e[t])return e[t];if(/^[a-z0-9]+(_[a-z0-9]+)+$/.test(t)){var a=t.replace(/_/g," ");return a.charAt(0).toUpperCase()+a.slice(1)}return t}})(),i3=(function(e){let t=r=>r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");function o(r,n){if(!n)return;let i=n.newPath&&n.newPath!=="/dev/null"?n.newPath:n.oldPath||"",a=n.oldPath==="/dev/null"?"added":n.newPath==="/dev/null"?"deleted":n.oldPath&&n.newPath&&n.oldPath!==n.newPath?"renamed":"modified";if(r.push('<div class="diff-file-block">'),r.push('<div class="diff-file-header"><span class="diff-file-icon"><i class="far fa-file-code"></i></span><span class="diff-file-name">'+t(i)+'</span><span class="diff-file-status diff-file-status-'+a+'">'+a+"</span></div>"),n.lines.length){r.push('<table class="diff-file-table"><tbody>');for(let u of n.lines)r.push('<tr class="diff-row diff-row-'+u.kind+'"><td class="diff-gutter diff-gutter-old">'+(u.oldNo||"")+'</td><td class="diff-gutter diff-gutter-new">'+(u.newNo||"")+'</td><td class="diff-sign">'+(u.kind==="add"?"+":u.kind==="remove"?"-":u.kind==="hunk"?"@":"")+'</td><td class="diff-code">'+t(u.text)+"</td></tr>");r.push("</tbody></table>")}r.push("</div>")}return function(r){if(!r)return r;let n=[],i=null,a=0,u=0,p=()=>(i||(i={oldPath:"",newPath:"",lines:[]}),i),h=()=>{i&&(i.lines.length||i.oldPath||i.newPath)&&(o(n,i),i=null)},v=r.split(`
|
||
`);for(let g=0;g<v.length;g++){let f=v[g];if(f.startsWith("diff --git")){h(),p();continue}if(f.startsWith("--- ")){i&&i.lines.length&&h(),p().oldPath=f.replace(/^--- (a\/)?/,"").trim();continue}if(f.startsWith("+++ ")){p().newPath=f.replace(/^\+\+\+ (b\/)?/,"").trim();continue}if(!(f.startsWith("index ")||f.startsWith("similarity index")||f.startsWith("rename ")||f.startsWith("new file mode")||f.startsWith("deleted file mode")||f.startsWith("Binary files"))){if(f.startsWith("@@")){let b=f.match(/@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/);b&&(a=parseInt(b[1],10),u=parseInt(b[2],10)),p().lines.push({kind:"hunk",oldNo:"",newNo:"",text:f});continue}i&&(f.startsWith("+")?(i.lines.push({kind:"add",oldNo:"",newNo:u,text:f.slice(1)}),u++):f.startsWith("-")?(i.lines.push({kind:"remove",oldNo:a,newNo:"",text:f.slice(1)}),a++):(i.lines.push({kind:"ctx",oldNo:a,newNo:u,text:f.startsWith(" ")?f.slice(1):f}),a++,u++))}}return o(n,i),n.join("")}})({trustAsHtml:e=>e});function a3(e,t){return e==null?"":Number(e).toLocaleString(void 0,t==null?{}:{minimumFractionDigits:t,maximumFractionDigits:t})}function l3(e){return String(e??"").toUpperCase()}function d3(e,t,o=0){return(e||[]).slice(o,o+t)}function u3(e,t){return Array.isArray(e)?typeof t=="function"?e.filter(t):e:[]}function c3(e,t){if(!t)return e||[];let o=Array.isArray(t)?t:[t];return[...e||[]].sort((r,n)=>{for(let i of o){let a=i[0]==="-"?-1:1;i=i.replace(/^[+-]/,"");let u=i.split(".").reduce((h,v)=>h?.[v],r),p=i.split(".").reduce((h,v)=>h?.[v],n);if(typeof u=="string"&&(u=u.toLowerCase()),typeof p=="string"&&(p=p.toLowerCase()),u!==p)return(u==null?-1:p==null?1:u<p?-1:1)*a}return 0})}function p3(e,t){if(!e)return"";let o=new Date(e);if(isNaN(o))return String(e);if(!t||t==="mediumDate")return o.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"});let r={yyyy:o.getFullYear(),MMM:o.toLocaleDateString(void 0,{month:"short"}),MM:String(o.getMonth()+1).padStart(2,"0"),dd:String(o.getDate()).padStart(2,"0"),d:o.getDate(),HH:String(o.getHours()).padStart(2,"0"),mm:String(o.getMinutes()).padStart(2,"0"),ss:String(o.getSeconds()).padStart(2,"0")};return t.replace(/yyyy|MMM|MM|dd|HH|mm|ss|d/g,n=>r[n])}function f3(e,t){return(t?.[e]??t?.[e===1?"one":"other"]??"").replace(/\{\}/g,e??0)}var fl={ERRORS:{repository_job_cancelled:"The repository changed or was removed while processing.",storage_delete_failed:"Unable to remove cached files. Please try again later.",unknown_error:"Unknown error, contact the admin.",unreachable:"Anonymous GitHub is unreachable, contact the admin.",request_error:"Unable to download the file, check your connection or contact the admin.",not_found:"The requested resource could not be found.",not_connected:"You must be logged in to perform this action.",not_authorized:"You do not have permission to perform this action.",unable_to_connect_user:"Unable to connect your account. Please try again later.",user_not_found:"The requested user could not be found.",user_banned:"Your account has been banned. Contact the admin for more information.",repo_access_limited:"GitHub blocked access because the repository's organization restricts third-party OAuth apps. Ask an org owner to approve Anonymous GitHub under Settings \u2192 Third-party Access \u2192 OAuth app policy, or anonymize a personal fork instead.",repo_saml_enforcement:"The repository's organization enforces SAML single sign-on. Authorize your token for that organization (GitHub \u2192 Settings \u2192 Applications, or re-run the org's SSO sign-in), then retry. Alternatively, anonymize a personal fork.",repo_not_found:"The repository was not found on GitHub. Check the URL and spelling, make sure you are signed in to the account that can see it, and confirm the repo isn't hidden under an org that restricts third-party app access.",repo_empty:"The selected branch has no commits on GitHub. Push at least one commit, or pick a different branch, then retry.",repo_not_accessible:"Anonymous GitHub cannot access this repository. Verify the repository exists and that Anonymous GitHub has been authorized for the owning organization.",repository_archived:"This repository has been archived and its files are no longer available.",repository_expired:"The repository is expired.",invalid_status:"This action cannot be performed while the resource is in its current state.",repository_not_ready:"Anonymous GitHub is still processing the repository, it can take several minutes.",repository_not_accessible:"This repository is currently not accessible.",repo_is_updating:"Anonymous GitHub is still processing the repository, it can take several minutes.",invalid_repo:"The provided repository is not valid.",invalid_source_repository:"The repository source name is invalid; expected the form 'owner/name'.",repoId_not_defined:"A repository ID must be provided.",repoUrl_not_defined:"The repository URL needs to be defined.",source_not_provided:"A repository source must be provided.",github_rate_limit_exceeded:"GitHub temporarily blocked the request because we hit its API rate limit. Wait a few minutes and try again. If the problem persists and you contact GitHub Support, include the request ID and timestamp shown in GitHub's response (the 'X-GitHub-Request-Id' header).",rate_limited:"GitHub API rate limit reached. The repository will be available shortly \u2014 please wait a moment and refresh.",repoId_already_used:"The repository ID is already used.",invalid_repoId:"The format of the repository ID is invalid.",unsupported_source:"The repository source type is not supported.",branch_not_specified:"The branch is not specified.",branch_not_found:"The branch of the repository cannot be found.",commit_not_specified:"A commit must be specified.",commit_not_found:"The configured commit no longer exists in the source repository. It may have been force-pushed, rebased, or removed.",repo_renamed:"The source repository appears to have been renamed or moved on GitHub. Please refresh and try again \u2014 the cached name has been updated.",invalid_commit_format:"The commit hash format is invalid. It must be a hexadecimal string.",pull_request_not_found:"The requested pull request could not be found.",pull_request_expired:"This pull request has expired and is no longer available.",pull_request_not_ready:"This pull request is still being prepared. Please try again shortly.",pull_request_not_available:"This pull request is currently not available.",invalid_pullRequestId:"The pull request ID is invalid.",pullRequestId_already_used:"This pull request ID is already in use. Please choose a different one.",repository_not_specified:"A repository must be specified for this pull request.",pullRequestId_not_specified:"A pull request ID must be specified.",pullRequestId_is_not_a_number:"The source pull request ID must be a number.",options_not_provided:"Anonymization options are mandatory.",terms_not_specified:"Anonymization terms must be specified.",invalid_terms_format:"Terms are in an invalid format.",missing_content:"No content was provided to the anonymization preview.",unable_to_anonymize:"An error happened during the anonymization process. Please try later or report the issue.",non_supported_mode:"The selected anonymization mode is invalid, only download and stream are supported.",invalid_path:"The provided path is invalid or missing.",path_not_specified:"A file path must be specified.",path_not_defined:"The file path has not been resolved yet.",invalid_file_path:"The requested file path is not valid.",invalid_request:"The request is missing required fields or is malformed.",no_file_selected:"Please select a file.",file_not_found:"The requested file is not found.",file_not_accessible:"The requested file is not accessible.",file_not_supported:"The file type is not supported. Anonymous GitHub cannot handle it.",file_too_big:"The file size exceeds the limit of Anonymous GitHub.",is_folder:"The path points to a folder.",folder_not_supported:"The path points to a folder. Please select a file.",unable_to_write_file:"Unable to write file on disk.",download_not_enabled:"Repository downloads are not enabled on this server.",unable_to_download:"The repository could not be downloaded. Please try again later.",s3_config_not_provided:"Object storage has not been configured on this server.",stats_unsupported:"Statistics are only supported in download mode.",branches_not_found:"The requested branch is not found.",readme_not_available:"No README for the repository is found.",page_not_supported_on_different_branch:"GitHub Pages is served from a different branch than the one selected. Pick the branch that GitHub Pages is configured to use.",page_not_activated:"GitHub Pages is not enabled on this repository. Enable it in the repository settings on GitHub before anonymizing.",is_removed:"This resource has been removed and is no longer available.",conf_name_missing:"A conference name is required.",conf_id_missing:"A conference ID is required.",conf_id_used:"This conference ID is already in use. Please choose a different one.",conf_start_date_missing:"A start date is required for the conference.",conf_end_date_missing:"An end date is required for the conference.",conf_start_date_invalid:"The start date must be before the end date.",conf_end_date_invalid:"The end date must be in the future.",invalid_plan:"The selected plan is not valid.",conference_not_found:"The requested conference could not be found.",conf_not_found:"The requested conference could not be found.",conf_not_activated:"The conference is not activated.",billing_missing:"Billing information is required for this plan.",billing_name_missing:"A billing name is required.",billing_email_missing:"A billing email is required.",billing_address_missing:"A billing address is required.",billing_city_missing:"A billing city is required.",billing_zip_missing:"A billing ZIP/postal code is required.",billing_country_missing:"A billing country is required.",queue_not_found:"The specified queue could not be found.",job_not_found:"The specified job could not be found in the queue.",error_retrying_job:"An error occurred while retrying the job.",gist_expired:"The gist is expired.",gist_not_ready:"Anonymous GitHub is still processing the gist, it can take several minutes.",gist_not_found:"The requested gist could not be found.",gist_not_available:"This gist is currently not available.",invalid_gistId:"The format of the gist ID is invalid.",gistId_not_specified:"A gist ID must be provided.",gistId_already_used:"The gist ID is already used.",missing_token:"An authentication token is required.",invalid_token:"The provided authentication token is invalid.",login_failed:"Login failed. Please try again.",server_error:"An unexpected server error occurred. Please try again later.",username_not_defined:"A username must be provided.",github_user_not_found:"The specified GitHub user could not be found.",cannot_coauthor_self:"You cannot add yourself as a co-author.",storage_write_size_mismatch:"The downloaded file was smaller than expected. The upstream source may have returned an incomplete response \u2014 please try again.",storage_read_error:"An error occurred while reading the file from storage \u2014 please try again.",upstream_error:"A temporary error occurred while fetching from GitHub \u2014 please try again.",token_expired:"Your GitHub access token has expired. Please log out and log in again to refresh it.",job_is_active:"This job is currently running \u2014 wait for it to finish or remove it first."},WARNINGS:{page_not_enabled_on_repo:"GitHub Pages is not enabled on this repository. Enable it in the repository's Settings \u2192 Pages on GitHub, then refresh.",page_branch_mismatch:"GitHub Pages on this repository is served from the '{{pageBranch}}' branch, but you selected '{{selectedBranch}}'. Switch the branch above to '{{pageBranch}}' to anonymize the Pages site.",folder_truncated:"This folder has more than 10,000 entries; only a partial listing is shown.",repo_truncated:"Some folders in this repository have too many files to be fully listed. Affected folders are marked with a warning icon.",submodules_not_included:"This repository uses git submodules. Submodule contents are not included in the anonymized repository and appear as empty folders."}};var ml={name:"htmlDoc",props:["content","baseUrl","allowScripts"],setup(e){let t=rt(null);return At(()=>{let r=[t.value][0];r.classList.add("html-doc");function n(){r.innerHTML="";let i=e.content;if(typeof i!="string")return;let a=document.createElement("iframe");a.className="html-doc-frame",a.setAttribute("title","Rendered HTML document");let u=["allow-popups","allow-popups-to-escape-sandbox"];e.allowScripts&&u.push("allow-scripts","allow-forms","allow-modals"),a.setAttribute("sandbox",u.join(" ")),a.setAttribute("referrerpolicy","no-referrer"),r.appendChild(a);let p="";e.baseUrl&&(p='<base href="'+e.baseUrl.replace(/&/g,"&").replace(/"/g,""")+'">'),a.srcdoc=p+i}ze(()=>e.content,n,{immediate:!0}),ze(()=>e.baseUrl,n,{immediate:!0}),ze(()=>e.allowScripts,n,{immediate:!0})}),()=>Ce("html-doc",{ref:t})}};var hl={name:"pdfviewer",props:["src"],setup(e){let t=rt(null);return At(()=>{let o=[t.value],r=400,n=[.5,.75,1,1.25,1.5,2,3],i=1e3,a=o[0];a.classList.add("pdf-viewer");let u=null,p=[],h=!1,v=null,g=1,f=1,b=0,_=0,k=612/792,R=0,S=document.createElement("div");S.className="pdf-toolbar";let D=document.createElement("div");D.className="pdf-pages",D.tabIndex=0,D.setAttribute("aria-label","PDF pages"),a.appendChild(S),a.appendChild(D);function I(L,W,fe){let Ee=document.createElement("button");return Ee.type="button",Ee.className="pdf-toolbar-btn",Ee.title=W,Ee.setAttribute("aria-label",W),Ee.innerHTML='<i class="fas '+L+'"></i>',Ee.addEventListener("click",fe),Ee}let C=I("fa-chevron-up","Previous page",function(){he(f-1)}),A=I("fa-chevron-down","Next page",function(){he(f+1)}),q=document.createElement("input");q.type="text",q.className="pdf-toolbar-page",q.setAttribute("aria-label","Page number"),q.title="Page number \u2014 type a page and press Enter",q.addEventListener("keydown",function(L){L.key==="Enter"&&(he(parseInt(q.value,10)),q.blur())}),q.addEventListener("blur",function(){q.value=String(f)});let ee=document.createElement("span");ee.className="pdf-toolbar-count";let J=I("fa-search-minus","Zoom out",function(){$e(n[Math.max(0,ie()-1)])}),K=I("fa-search-plus","Zoom in",function(){$e(n[Math.min(n.length-1,ie()+1)])}),U=document.createElement("button");U.type="button",U.className="pdf-toolbar-btn pdf-toolbar-zoom",U.title="Reset zoom to fit the width",U.setAttribute("aria-label","Reset zoom to fit the width"),U.addEventListener("click",function(){$e(1)}),S.appendChild(C),S.appendChild(A);let de=document.createElement("span");de.className="pdf-toolbar-group",de.appendChild(q),de.appendChild(ee),S.appendChild(de);let se=document.createElement("span");se.className="pdf-toolbar-group pdf-toolbar-right",se.appendChild(J),se.appendChild(U),se.appendChild(K),S.appendChild(se);function ie(){let L=0;for(let W=0;W<n.length;W++)Math.abs(n[W]-g)<Math.abs(n[L]-g)&&(L=W);return L}function ce(){let L=u?u.numPages:0;S.style.display=L?"":"none",ee.textContent="/ "+L,document.activeElement!==q&&(q.value=String(f)),C.disabled=f<=1,A.disabled=f>=L,U.textContent=Math.round(g*100)+"%",J.disabled=ie()===0,K.disabled=ie()===n.length-1}function be(L){let W=p[L-1];W&&(D.scrollTop+=W.getBoundingClientRect().top-D.getBoundingClientRect().top)}function he(L){if(!u||isNaN(L))return;let W=Math.min(Math.max(1,L),u.numPages);p[W-1]&&(be(W),f=W,b=W,_=Date.now()+800,ce(),Z())}function me(){if(!p.length||Date.now()<_)return;let L=D.getBoundingClientRect(),W=L.top+L.height/2,fe=1;for(let Ee=0;Ee<p.length&&p[Ee].getBoundingClientRect().top<=W;Ee++)fe=Ee+1;fe!==f&&(f=fe,ce())}function ae(){R++,v&&(clearTimeout(v),v=null),u&&(u.destroy(),u=null),p=[],f=1,D.innerHTML="",ce()}function O(){D.innerHTML="";let L=document.createElement("div");L.className="pdf-viewer-error",L.textContent="This PDF could not be displayed.",D.appendChild(L)}function V(){let L=Math.max(120,D.clientWidth-24);return Math.round(Math.min(L,i)*g)}function j(L,W){let fe=window.devicePixelRatio||1,Ee=L.getViewport({scale:1}),pe=parseFloat(W.style.width);if(!pe)return;let w=L.getViewport({scale:pe/Ee.width*fe}),N=document.createElement("canvas");return N.width=Math.floor(w.width),N.height=Math.floor(w.height),N.style.width=pe+"px",N.style.height=Math.floor(w.height/fe)+"px",W.innerHTML="",W.appendChild(N),W.style.height="",L.render({canvasContext:N.getContext("2d"),viewport:w}).promise}function Z(){if(!u)return;let L=R,W=D.getBoundingClientRect(),fe=W.top-r,Ee=W.top+D.clientHeight+r;p.forEach(function(pe,w){if(pe.dataset.state)return;let N=pe.getBoundingClientRect();N.top>Ee||N.bottom<fe||(pe.dataset.state="rendering",u.getPage(w+1).then(function(P){if(L===R)return j(P,pe)}).then(function(){L===R&&(pe.dataset.state="done",b&&Date.now()<_&&be(b),Z())}).catch(function(){pe.dataset.state="failed"}))})}function oe(){h||(h=!0,window.requestAnimationFrame(function(){h=!1,me(),Z()}))}function Pe(){let L=!1;function W(){L||(L=!0,Z())}window.requestAnimationFrame(W),window.setTimeout(W,50)}function Ue(){let L=V();p.forEach(function(W){delete W.dataset.state,W.innerHTML="",W.style.width=L+"px",W.style.height=Math.round(L/k)+"px"}),Z()}function $e(L){if(!u||L===g)return;let W=f;g=L,ce(),Ue(),he(W)}function F(){u&&(v&&clearTimeout(v),v=setTimeout(function(){v=null,u&&Ue()},250))}function ne(L){if(ae(),!L)return;let W=R;pdfjsLib.getDocument({url:L,isEvalSupported:!1,standardFontDataUrl:"/script/external/pdf-standard-fonts/",cMapUrl:"/script/external/pdf-cmaps/",cMapPacked:!0}).promise.then(function(fe){if(W!==R){fe.destroy();return}return u=fe,u.getPage(1).then(function(Ee){if(W!==R)return;let pe=Ee.getViewport({scale:1});pe.width&&pe.height&&(k=pe.width/pe.height);let w=V();for(let N=1;N<=u.numPages;N++){let P=document.createElement("div");P.className="pdf-viewer-page",P.style.width=w+"px",P.style.height=Math.round(w/k)+"px",D.appendChild(P),p.push(P)}ce(),Pe()})}).catch(function(){W===R&&O()})}D.addEventListener("scroll",oe,{passive:!0}),$(window).on("resize",F),ce(),ze(()=>e.src,ne,{immediate:!0}),es(function(){D.removeEventListener("scroll",oe),$(window).off("resize",F),ae()})}),()=>Ce("pdfviewer",{ref:t})}};var yl={props:["content","terms","options"],setup(e){let t=rt(null),o=()=>{t.value.innerHTML=renderMD(e.content||"",window.location.pathname+"/../")};return At(()=>{o(),ze(()=>[e.content,e.terms,e.options],o,{deep:!0})}),()=>Ce("markdown",{ref:t})}},h3={props:["file","terms","options"],setup(e){let t=rt(null),o=()=>kt(()=>t.value?.querySelectorAll("pre code").forEach(r=>window.Prism?.highlightElement(r)));return At(o),ze(()=>[e.file?.content,e.terms,e.options],o,{deep:!0}),()=>{let r=e.file||{},n=(r.filename||"").split(".").pop().toLowerCase();if(["md","markdown"].includes(n)||r.language==="Markdown")return Ce("gist-file",{ref:t},Ce(yl,{content:r.content,terms:e.terms,options:e.options}));let i={js:"javascript",jsx:"javascript",ts:"javascript",typescript:"javascript",py:"python",html:"markup",xml:"markup",svg:"markup",sh:"bash"},a=(r.language||n||"none").toLowerCase();return Ce("gist-file",{ref:t},Ce("pre",{class:"line-numbers"},Ce("code",{class:"language-"+(i[a]||a),key:r.content},r.content||"")))}}},v3={props:["file","content"],setup(e){let t=rt(null),o=0,r,n=async()=>{let i=++o;r?.abort(),r=new AbortController;try{let a=e.content?JSON.parse(e.content):await fetch(e.file?.download_url||e.file,{signal:r.signal}).then(u=>{if(!u.ok)throw Error("Notebook request failed");return u.json()});if(i!==o)return;t.value.innerHTML=DOMPurify.sanitize(nb.parse(a).render()),t.value.querySelectorAll("pre code").forEach(u=>window.Prism?.highlightElement(u))}catch(a){i===o&&a.name!=="AbortError"&&(t.value.textContent="Unable to render the notebook.")}};return At(()=>{n(),ze(()=>[e.file,e.content],n)}),es(()=>{o++,r?.abort()}),()=>Ce("notebook",{ref:t})}},y3={props:["stats"],setup(e){return()=>{let t=Object.entries(e.stats||{}).filter(([,r])=>r.code),o=t.reduce((r,[,n])=>r+n.code,0);return Ce("loc",t.map(([r,n])=>Ce("div",{class:"lang",title:`${r}: ${n.code.toLocaleString()} lines`,style:{width:n.code*100/o+"%",background:langColors[r]}})))}}},gl={Markdown:yl,GistFile:h3,Notebook:v3,Loc:y3,HtmlDoc:ml,Pdfviewer:hl},bl={mounted(e,{value:t}){let o=ace.edit(e);e._editor=o,o.setValue(String(t.content??""),-1),vl(e,t.options),t.options?.onLoad?.(o)},updated(e,{value:t}){e._editor.getValue()!==String(t.content??"")&&e._editor.setValue(String(t.content??""),-1),vl(e,t.options)},beforeUnmount(e){e._editor.destroy()}};function vl(e,t={}){t.mode&&e._editor.session.setMode("ace/mode/"+t.mode),t.theme&&e._editor.setTheme("ace/theme/"+t.theme),e._editor.setReadOnly(t.readOnly!==!1)}var wl={mounted(e){if(!window.IntersectionObserver)return;let t=[...e.querySelectorAll('a[href^="#"]')],o=new Set,r=new IntersectionObserver(n=>{n.forEach(a=>a.isIntersecting?o.add(a.target.id):o.delete(a.target.id));let i=t.find(a=>o.has(a.hash.slice(1)));t.forEach(a=>a.classList.toggle("active",a===i))},{rootMargin:"-20% 0px -60% 0px",threshold:0});kt(()=>t.forEach(n=>{let i=document.getElementById(n.hash.slice(1));i&&r.observe(i)})),e._observer=r},beforeUnmount(e){e._observer?.disconnect()}};function g3(e){let t={children:[]},o=new Map([["",t]]);function r(n){if(o.has(n))return o.get(n);let i=n.lastIndexOf("/"),a=r(i<0?"":n.slice(0,i)),u={name:n.slice(i+1),children:[]};return o.set(n,u),a.children.push(u),u}for(let n of e||[]){let i=n.path?`${n.path}/${n.name}`:n.name;n.size==null?r(i):r(n.path||"").children.push({...n})}return t.children}var kl={name:"FileTree",props:["file","parent","searchQuery","searchResults","page"],setup(e){let t=va(),o=rt(null),r=Le(Object.create(null)),n=null,i=Xe(()=>g3(e.file)),a=()=>"/"+(Array.isArray(t.params.path)?t.params.path.join("/"):t.params.path||"");ze(()=>[t.params.repoId,t.params.path],()=>{let f="";a().split("/").filter(Boolean).forEach(b=>{f+="/"+b,r[f]=!0})},{immediate:!0});let u=Xe(()=>{if(!e.searchQuery||!e.searchResults)return null;let f=new Set,b=new Set;return e.searchResults.forEach(_=>{f.add(_.path?`${_.path}/${_.name}`:_.name);let k="";(_.path||"").split("/").filter(Boolean).forEach(R=>{k=k?k+"/"+R:R,b.add(k)})}),{files:f,folders:b}}),p=()=>[...o.value.querySelectorAll("li > a")],h=f=>{o.value.querySelector(".tree-focused")?.classList.remove("tree-focused"),f&&(n=f.dataset.path,f.classList.add("tree-focused"),f.scrollIntoView?.({block:"nearest"}),o.value.focus())};function v(f){let b=p(),_=o.value.querySelector(".tree-focused")||b[0],k=b.indexOf(_);if(!["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(f.key)||(f.preventDefault(),f.key==="ArrowDown"&&h(b[(k+1)%b.length]),f.key==="ArrowUp"&&h(b[(k-1+b.length)%b.length]),!_))return;let R=_.closest("li");f.key==="ArrowRight"&&R.classList.contains("folder")&&(R.classList.contains("open")?h(R.querySelector(":scope > ul > li > a")):_.click()),f.key==="ArrowLeft"&&(R.classList.contains("folder")&&R.classList.contains("open")?_.click():h(R.parentElement.closest("li.folder")?.querySelector(":scope > a"))),f.key==="Enter"&&_.click()}function g(f,b=""){let _=[...f].sort((k,R)=>+!!R.children-+!!k.children||k.name.localeCompare(R.name));return Ce("ul",_.flatMap(k=>{let R=k,S=R.name,D=(b+"/"+S).slice(1);if(u.value&&!u.value.files.has(D)&&!u.value.folders.has(D))return[];for(;R.children?.length===1;)R=R.children[0],S+="/"+R.name;let I=b+"/"+S,C=!!R.children,A=u.value?r[I]!==!1:!!r[I],q=C&&e.page?.options?.truncatedFolders?.includes(I.slice(1)),ee=e.page?.fileCounts?.[I.slice(1)]||0,J=Ce("span",{class:C?"tree-icon-folder":"tree-icon-file"}),K=Ce("span",{class:"tree-name"},S),U=se=>{h(se.currentTarget),C&&(se.preventDefault(),r[I]=!A,r[I]&&!R.children.length&&e.page.getFiles(I.slice(1)),kt(()=>h(p().find(ie=>ie.dataset.path===n))))},de=Ce("a",{"data-path":I,href:C?void 0:`/r/${encodeURIComponent(t.params.repoId)}${encodePathForUrl(I)}`,class:{"tree-focused":n===I},onClick:U},[C?Ce("span",{class:"tree-toggle"}):b?Ce("span",{class:"tree-spacer"}):null,J,K,q?Ce("span",{class:"truncated-warning",title:e.page.fmt.translate("WARNINGS.folder_truncated")},Ce("i",{class:"fas fa-exclamation-triangle"})):null,C&&ee?Ce("span",{class:"tree-count"},ee):null]);return Ce("li",{key:I,class:{file:!0,folder:C,open:A,active:a()===I,truncated:q},title:C?"":`Size: ${humanFileSize(R.size||0)}`},[de,C&&A?g(R.children,I):null])}))}return()=>Ce("tree",{ref:o,tabindex:0,onKeydown:v},e.file?.length?u.value?.files.size===0?Ce("div",{class:"tree-search-empty"},"No files found"):g(i.value):"Empty repository")}};function El(){return Le({errors:{},dirty:!1,touched:!1,submitted:!1,get invalid(){return Object.values(this.errors).some(Boolean)},setValidity(e,t){this.errors[e]=!t},setDirty(){this.dirty=!0}})}function Cl(e,t){if(!e[t]){let o=El();Object.defineProperty(o,"invalid",{get(){return Object.values(o.errors).some(Boolean)||Object.keys(o).some(r=>r!=="invalid"&&o[r]&&typeof o[r]=="object"&&o[r].invalid)}}),e[t]=o}return e[t]}var Nl={beforeMount(e,{value:t}){e._formState=Cl(t,e.name),e.addEventListener("submit",o=>o.preventDefault())}};function b3(e){return e instanceof Date?isNaN(e)?"":`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`:e||""}function _l(e){let t=e._field.binding.value;e.type==="checkbox"?e.checked=!!t:e.type==="radio"?e.checked=t==(e._value??e.value):e._field.timer||(e.value=e.type==="date"?b3(t):t??""),Wo(e)}function Wo(e){let t=e._field.validation;if(!t)return;let o=e.validity;for(let[r,n]of Object.entries({required:o.valueMissing,pattern:o.patternMismatch,min:o.rangeUnderflow,max:o.rangeOverflow,date:o.badInput,email:o.typeMismatch&&e.type==="email",url:o.typeMismatch&&e.type==="url"}))t.setValidity(r,e.disabled||!n)}var Sl={beforeMount(e,{value:t}){var a;let o=t.form&&Cl(t.state,t.form),r=o&&e.name?o[a=e.name]||(o[a]=El()):null;e._field={binding:t,validation:r,timer:null};let n=()=>{clearTimeout(e._field.timer),e._field.timer=null;let u=e._field.binding,p=e.type==="checkbox"?e.checked:e._value??e.value;if(!(e.type==="radio"&&!e.checked)){if((e.type==="number"||e.type==="range")&&(p=e.value===""?null:Number(e.value)),e.type==="date"&&(p=e.value?new Date(e.value+"T00:00:00"):null),r){r.setDirty();for(let h of Object.keys(r.errors))r.setValidity(h,!0)}u.set(p),Wo(e),u.change?.()}};e._field.commit=n;let i=u=>{let p=e._field.binding.options?.debounce||0,h=typeof p=="number"?p:p[u.type]??p.default??0;clearTimeout(e._field.timer),h?e._field.timer=setTimeout(n,h):n()};e.addEventListener(e.tagName==="SELECT"||["checkbox","radio","date"].includes(e.type)?"change":"input",i),e.addEventListener("blur",()=>{r&&(r.touched=!0),e._field.timer&&n()})},mounted:_l,updated(e,{value:t}){e._field.binding=t,_l(e)},beforeUnmount(e){clearTimeout(e._field.timer);let{binding:t,validation:o}=e._field,r=t.form&&t.state[t.form];r&&r[e.name]===o&&delete r[e.name]}};function Dl(e,t){let o=e.target.closest("form");if(o?._formState&&(o._formState.submitted=!0),o?.querySelectorAll("input, select, textarea").forEach(r=>{r._field?.timer&&r._field.commit(),r._field&&Wo(r)}),!(o&&!o.checkValidity()))return t()}var Rl=Symbol("session"),w3=/^\/(w|api|github)(\/|$)/;function Tl(e,t={}){let o=e?.split(".").reduce((r,n)=>r?.[n],fl);return String(o??e??"").replace(/{{\s*([^}]+?)\s*}}/g,(r,n)=>t[n]??"")}var k3={...jo,translate:Tl};function _3(e){if(e==null||e==="")return e;try{let t=new URL(e,window.location.href);return["http:","https:","mailto:","tel:","blob:"].includes(t.protocol)?e:void 0}catch{return}}function E3(e="#app",t={}){let o=new Map,r=ul(t.fetch),n,i;function a(){let h=ft(),v={url(f){return f===void 0?i.currentRoute.value.fullPath:(i.push(f),v)},path(){return i.currentRoute.value.path},search(){return i.currentRoute.value.query}},g=new Proxy({},{get(f,b){let _=i.currentRoute.value.params[b];return Array.isArray(_)?_.join("/"):_}});return{http:r,...h,location:v,params:g,window,promises:cl,html:{trustAsHtml:f=>f},translate:(f,b)=>Promise.resolve(Tl(f,b)),quotaService:pl(r)}}function u(h){return{name:h.template,setup(){let v=Ho(at(Rl),o);h.setup(v,a()),dl(h.template,v);let g=[];return()=>Gn[h.template](v,g)}}}i=ha({history:t.history||pa(),routes:Ma.map(h=>h.redirect?h:{path:h.path,component:u(h),meta:{title:h.title,preserveExplorer:h.preserveExplorer}})});let p=Vi({setup(){n=Ho(null,o),n.fmt=k3,n.window=window,n.Math=Math,n.sanitize=f=>DOMPurify.sanitize(f??""),n.submitForm=Dl,n.safeUrl=_3;let h=a();ga(n,h.http,h.location,h.timeout),Zt(Rl,n),ze(()=>n.title,f=>{document.title=f||"Anonymous GitHub"});let v=[],g=f=>{let b=f.target.closest?.("a[href]");if(f.defaultPrevented||f.button!==0||f.metaKey||f.ctrlKey||f.shiftKey||f.altKey||!b||b.hasAttribute("download")||b.target&&b.target!=="_self"||b.dataset.toggle||b.getAttribute("href").startsWith("#"))return;let k=new URL(b.href,window.location.href);k.origin!==window.location.origin||w3.test(k.pathname)||(f.preventDefault(),i.push(k.pathname+k.search+k.hash),$("#navbarSupportedContent.show").collapse("hide"))};return document.addEventListener("click",g),es(()=>document.removeEventListener("click",g)),()=>[Ce("header",{class:"app-header"},Gn["partials/header.htm"](n,v)),Ce("main",{class:"app-view align-items-stretch w-100"},Ce(zo,null,{default:({Component:f,route:b})=>f?Ce(f,{key:b.meta.preserveExplorer?b.matched[0]?.path:b.path}):null})),Ce("div",{class:"position-fixed p-3",style:{zIndex:999999999,right:0,bottom:0}},n.toasts.map((f,b)=>Ce("div",{class:"toast show",role:"alert","aria-live":"assertive","aria-atomic":"true",key:b},[Ce("div",{class:"toast-header"},[Ce("strong",{class:"mr-auto"},f.title),Ce("button",{type:"button",class:"ml-2 mb-1 close","aria-label":"Close",onClick:()=>n.removeToast(f)},"\xD7")]),Ce("div",{class:"toast-body"},f.body)])))]}});for(let[h,v]of Object.entries(gl))p.component(h,v);return p.component("Tree",kl),p.component("PartialView",{props:["name","state"],setup(h){let v=[];return()=>Gn[h.name](h.state,v)}}),p.directive("field",Sl),p.directive("form",Nl),p.directive("code-editor",bl),p.directive("paper-scrollspy",wl),p.use(i),i.beforeEach(()=>{n?.emit("routeLeave")}),i.afterEach(h=>{if(!n)return;n.title=h.meta.title,n.emit("routeChange",{title:h.meta.title}),n.emit("routeUpdate",{title:h.meta.title});let v=document.querySelector(".app-view");!h.meta.preserveExplorer&&v&&(v.scrollTop=0)}),p.mount(e),{app:p,router:i,state:n}}ace.config.set("basePath","/script/external/ace/");pdfjsLib.GlobalWorkerOptions.workerSrc="/script/external/pdf.worker.js";document.querySelector("#app")&&(window.anonymousApp=E3());})();
|
||
/*! Bundled license information:
|
||
|
||
@vue/shared/dist/shared.esm-bundler.js:
|
||
(**
|
||
* @vue/shared v3.5.42
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**)
|
||
|
||
@vue/reactivity/dist/reactivity.esm-bundler.js:
|
||
(**
|
||
* @vue/reactivity v3.5.42
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**)
|
||
|
||
@vue/runtime-core/dist/runtime-core.esm-bundler.js:
|
||
(**
|
||
* @vue/runtime-core v3.5.42
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**)
|
||
|
||
@vue/runtime-dom/dist/runtime-dom.esm-bundler.js:
|
||
(**
|
||
* @vue/runtime-dom v3.5.42
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**)
|
||
|
||
vue/dist/vue.runtime.esm-bundler.js:
|
||
(**
|
||
* vue v3.5.42
|
||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||
* @license MIT
|
||
**)
|
||
|
||
vue-router/dist/devtools-EWN81iOl.mjs:
|
||
vue-router/dist/vue-router.mjs:
|
||
(*!
|
||
* vue-router v4.6.4
|
||
* (c) 2025 Eduardo San Martin Morote
|
||
* @license MIT
|
||
*)
|
||
*/
|