var Jy=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var XT=Jy((qT,Wo)=>{(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))t(r);new MutationObserver(r=>{for(const u of r)if(u.type==="childList")for(const n of u.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&t(n)}).observe(document,{childList:!0,subtree:!0});function i(r){const u={};return r.integrity&&(u.integrity=r.integrity),r.referrerPolicy&&(u.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?u.credentials="include":r.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function t(r){if(r.ep)return;r.ep=!0;const u=i(r);fetch(r.href,u)}})();var Li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ga(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Zy(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var i=function t(){if(this instanceof t){var r=[null];r.push.apply(r,arguments);var u=Function.bind.apply(e,r);return new u}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(s).forEach(function(t){var r=Object.getOwnPropertyDescriptor(s,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return s[t]}})}),i}var kl={exports:{}};/*!
 * jQuery JavaScript Library v3.5.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2020-05-04T22:49Z
 */var N2;function vd(){return N2||(N2=1,function(s){(function(e,i){s.exports=e.document?i(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}})(typeof window<"u"?window:Li,function(e,i){var t=[],r=Object.getPrototypeOf,u=t.slice,n=t.flat?function(E){return t.flat.call(E)}:function(E){return t.concat.apply([],E)},a=t.push,o=t.indexOf,h={},g=h.toString,l=h.hasOwnProperty,c=l.toString,d=c.call(Object),F={},p=function(L){return typeof L=="function"&&typeof L.nodeType!="number"},f=function(L){return L!=null&&L===L.window},m=e.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function w(E,L,I){I=I||m;var N,U,V=I.createElement("script");if(V.text=E,L)for(N in v)U=L[N]||L.getAttribute&&L.getAttribute(N),U&&V.setAttribute(N,U);I.head.appendChild(V).parentNode.removeChild(V)}function x(E){return E==null?E+"":typeof E=="object"||typeof E=="function"?h[g.call(E)]||"object":typeof E}var A="3.5.1",b=function(E,L){return new b.fn.init(E,L)};b.fn=b.prototype={jquery:A,constructor:b,length:0,toArray:function(){return u.call(this)},get:function(E){return E==null?u.call(this):E<0?this[E+this.length]:this[E]},pushStack:function(E){var L=b.merge(this.constructor(),E);return L.prevObject=this,L},each:function(E){return b.each(this,E)},map:function(E){return this.pushStack(b.map(this,function(L,I){return E.call(L,I,L)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(b.grep(this,function(E,L){return(L+1)%2}))},odd:function(){return this.pushStack(b.grep(this,function(E,L){return L%2}))},eq:function(E){var L=this.length,I=+E+(E<0?L:0);return this.pushStack(I>=0&&I<L?[this[I]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:t.sort,splice:t.splice},b.extend=b.fn.extend=function(){var E,L,I,N,U,V,q=arguments[0]||{},he=1,ge=arguments.length,ve=!1;for(typeof q=="boolean"&&(ve=q,q=arguments[he]||{},he++),typeof q!="object"&&!p(q)&&(q={}),he===ge&&(q=this,he--);he<ge;he++)if((E=arguments[he])!=null)for(L in E)N=E[L],!(L==="__proto__"||q===N)&&(ve&&N&&(b.isPlainObject(N)||(U=Array.isArray(N)))?(I=q[L],U&&!Array.isArray(I)?V=[]:!U&&!b.isPlainObject(I)?V={}:V=I,U=!1,q[L]=b.extend(ve,V,N)):N!==void 0&&(q[L]=N));return q},b.extend({expando:"jQuery"+(A+Math.random()).replace(/\D/g,""),isReady:!0,error:function(E){throw new Error(E)},noop:function(){},isPlainObject:function(E){var L,I;return!E||g.call(E)!=="[object Object]"?!1:(L=r(E),L?(I=l.call(L,"constructor")&&L.constructor,typeof I=="function"&&c.call(I)===d):!0)},isEmptyObject:function(E){var L;for(L in E)return!1;return!0},globalEval:function(E,L,I){w(E,{nonce:L&&L.nonce},I)},each:function(E,L){var I,N=0;if(y(E))for(I=E.length;N<I&&L.call(E[N],N,E[N])!==!1;N++);else for(N in E)if(L.call(E[N],N,E[N])===!1)break;return E},makeArray:function(E,L){var I=L||[];return E!=null&&(y(Object(E))?b.merge(I,typeof E=="string"?[E]:E):a.call(I,E)),I},inArray:function(E,L,I){return L==null?-1:o.call(L,E,I)},merge:function(E,L){for(var I=+L.length,N=0,U=E.length;N<I;N++)E[U++]=L[N];return E.length=U,E},grep:function(E,L,I){for(var N,U=[],V=0,q=E.length,he=!I;V<q;V++)N=!L(E[V],V),N!==he&&U.push(E[V]);return U},map:function(E,L,I){var N,U,V=0,q=[];if(y(E))for(N=E.length;V<N;V++)U=L(E[V],V,I),U!=null&&q.push(U);else for(V in E)U=L(E[V],V,I),U!=null&&q.push(U);return n(q)},guid:1,support:F}),typeof Symbol=="function"&&(b.fn[Symbol.iterator]=t[Symbol.iterator]),b.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(E,L){h["[object "+L+"]"]=L.toLowerCase()});function y(E){var L=!!E&&"length"in E&&E.length,I=x(E);return p(E)||f(E)?!1:I==="array"||L===0||typeof L=="number"&&L>0&&L-1 in E}var k=function(E){var L,I,N,U,V,q,he,ge,ve,Ae,Le,Ce,ke,Ge,ot,qe,rr,Zt,Br,kt="sizzle"+1*new Date,nt=E.document,Dr=0,bt=0,Wt=io(),Ou=io(),eo=io(),Or=io(),O0=function(Q,de){return Q===de&&(Le=!0),0},N0={}.hasOwnProperty,Mr=[],t0=Mr.pop,Jr=Mr.push,r0=Mr.push,_2=Mr.slice,W0=function(Q,de){for(var fe=0,Se=Q.length;fe<Se;fe++)if(Q[fe]===de)return fe;return-1},vl="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",yt="[\\x20\\t\\r\\n\\f]",z0="(?:\\\\[\\da-fA-F]{1,6}"+yt+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",L2="\\["+yt+"*("+z0+")(?:"+yt+"*([*^$|!~]?=)"+yt+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+z0+"))|)"+yt+"*\\]",bl=":("+z0+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+L2+")*)|.*)\\)|)",Ry=new RegExp(yt+"+","g"),to=new RegExp("^"+yt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+yt+"+$","g"),By=new RegExp("^"+yt+"*,"+yt+"*"),T2=new RegExp("^"+yt+"*([>+~]|"+yt+")"+yt+"*"),Oy=new RegExp(yt+"|>"),Ny=new RegExp(bl),Wy=new RegExp("^"+z0+"$"),ro={ID:new RegExp("^#("+z0+")"),CLASS:new RegExp("^\\.("+z0+")"),TAG:new RegExp("^("+z0+"|[*])"),ATTR:new RegExp("^"+L2),PSEUDO:new RegExp("^"+bl),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+yt+"*(even|odd|(([+-]|)(\\d*)n|)"+yt+"*(?:([+-]|)"+yt+"*(\\d+)|))"+yt+"*\\)|)","i"),bool:new RegExp("^(?:"+vl+")$","i"),needsContext:new RegExp("^"+yt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+yt+"*((?:-\\d)?\\d*)"+yt+"*\\)|)(?=[^-]|$)","i")},zy=/HTML$/i,Hy=/^(?:input|select|textarea|button)$/i,Uy=/^h\d$/i,Nu=/^[^{]+\{\s*\[native \w/,Yy=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,wl=/[+~]/,Wi=new RegExp("\\\\[\\da-fA-F]{1,6}"+yt+"?|\\\\([^\\r\\n\\f])","g"),zi=function(Q,de){var fe="0x"+Q.slice(1)-65536;return de||(fe<0?String.fromCharCode(fe+65536):String.fromCharCode(fe>>10|55296,fe&1023|56320))},P2=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,$2=function(Q,de){return de?Q==="\0"?"�":Q.slice(0,-1)+"\\"+Q.charCodeAt(Q.length-1).toString(16)+" ":"\\"+Q},I2=function(){Ce()},Vy=uo(function(Q){return Q.disabled===!0&&Q.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{r0.apply(Mr=_2.call(nt.childNodes),nt.childNodes),Mr[nt.childNodes.length].nodeType}catch{r0={apply:Mr.length?function(de,fe){Jr.apply(de,_2.call(fe))}:function(de,fe){for(var Se=de.length,be=0;de[Se++]=fe[be++];);de.length=Se-1}}}function Mt(Q,de,fe,Se){var be,je,Me,Ie,Be,et,Ze,rt=de&&de.ownerDocument,dt=de?de.nodeType:9;if(fe=fe||[],typeof Q!="string"||!Q||dt!==1&&dt!==9&&dt!==11)return fe;if(!Se&&(Ce(de),de=de||ke,ot)){if(dt!==11&&(Be=Yy.exec(Q)))if(be=Be[1]){if(dt===9)if(Me=de.getElementById(be)){if(Me.id===be)return fe.push(Me),fe}else return fe;else if(rt&&(Me=rt.getElementById(be))&&Br(de,Me)&&Me.id===be)return fe.push(Me),fe}else{if(Be[2])return r0.apply(fe,de.getElementsByTagName(Q)),fe;if((be=Be[3])&&I.getElementsByClassName&&de.getElementsByClassName)return r0.apply(fe,de.getElementsByClassName(be)),fe}if(I.qsa&&!Or[Q+" "]&&(!qe||!qe.test(Q))&&(dt!==1||de.nodeName.toLowerCase()!=="object")){if(Ze=Q,rt=de,dt===1&&(Oy.test(Q)||T2.test(Q))){for(rt=wl.test(Q)&&xl(de.parentNode)||de,(rt!==de||!I.scope)&&((Ie=de.getAttribute("id"))?Ie=Ie.replace(P2,$2):de.setAttribute("id",Ie=kt)),et=q(Q),je=et.length;je--;)et[je]=(Ie?"#"+Ie:":scope")+" "+so(et[je]);Ze=et.join(",")}try{return r0.apply(fe,rt.querySelectorAll(Ze)),fe}catch{Or(Q,!0)}finally{Ie===kt&&de.removeAttribute("id")}}}return ge(Q.replace(to,"$1"),de,fe,Se)}function io(){var Q=[];function de(fe,Se){return Q.push(fe+" ")>N.cacheLength&&delete de[Q.shift()],de[fe+" "]=Se}return de}function di(Q){return Q[kt]=!0,Q}function hi(Q){var de=ke.createElement("fieldset");try{return!!Q(de)}catch{return!1}finally{de.parentNode&&de.parentNode.removeChild(de),de=null}}function yl(Q,de){for(var fe=Q.split("|"),Se=fe.length;Se--;)N.attrHandle[fe[Se]]=de}function R2(Q,de){var fe=de&&Q,Se=fe&&Q.nodeType===1&&de.nodeType===1&&Q.sourceIndex-de.sourceIndex;if(Se)return Se;if(fe){for(;fe=fe.nextSibling;)if(fe===de)return-1}return Q?1:-1}function Xy(Q){return function(de){var fe=de.nodeName.toLowerCase();return fe==="input"&&de.type===Q}}function Gy(Q){return function(de){var fe=de.nodeName.toLowerCase();return(fe==="input"||fe==="button")&&de.type===Q}}function B2(Q){return function(de){return"form"in de?de.parentNode&&de.disabled===!1?"label"in de?"label"in de.parentNode?de.parentNode.disabled===Q:de.disabled===Q:de.isDisabled===Q||de.isDisabled!==!Q&&Vy(de)===Q:de.disabled===Q:"label"in de?de.disabled===Q:!1}}function H0(Q){return di(function(de){return de=+de,di(function(fe,Se){for(var be,je=Q([],fe.length,de),Me=je.length;Me--;)fe[be=je[Me]]&&(fe[be]=!(Se[be]=fe[be]))})})}function xl(Q){return Q&&typeof Q.getElementsByTagName<"u"&&Q}I=Mt.support={},V=Mt.isXML=function(Q){var de=Q.namespaceURI,fe=(Q.ownerDocument||Q).documentElement;return!zy.test(de||fe&&fe.nodeName||"HTML")},Ce=Mt.setDocument=function(Q){var de,fe,Se=Q?Q.ownerDocument||Q:nt;return Se==ke||Se.nodeType!==9||!Se.documentElement||(ke=Se,Ge=ke.documentElement,ot=!V(ke),nt!=ke&&(fe=ke.defaultView)&&fe.top!==fe&&(fe.addEventListener?fe.addEventListener("unload",I2,!1):fe.attachEvent&&fe.attachEvent("onunload",I2)),I.scope=hi(function(be){return Ge.appendChild(be).appendChild(ke.createElement("div")),typeof be.querySelectorAll<"u"&&!be.querySelectorAll(":scope fieldset div").length}),I.attributes=hi(function(be){return be.className="i",!be.getAttribute("className")}),I.getElementsByTagName=hi(function(be){return be.appendChild(ke.createComment("")),!be.getElementsByTagName("*").length}),I.getElementsByClassName=Nu.test(ke.getElementsByClassName),I.getById=hi(function(be){return Ge.appendChild(be).id=kt,!ke.getElementsByName||!ke.getElementsByName(kt).length}),I.getById?(N.filter.ID=function(be){var je=be.replace(Wi,zi);return function(Me){return Me.getAttribute("id")===je}},N.find.ID=function(be,je){if(typeof je.getElementById<"u"&&ot){var Me=je.getElementById(be);return Me?[Me]:[]}}):(N.filter.ID=function(be){var je=be.replace(Wi,zi);return function(Me){var Ie=typeof Me.getAttributeNode<"u"&&Me.getAttributeNode("id");return Ie&&Ie.value===je}},N.find.ID=function(be,je){if(typeof je.getElementById<"u"&&ot){var Me,Ie,Be,et=je.getElementById(be);if(et){if(Me=et.getAttributeNode("id"),Me&&Me.value===be)return[et];for(Be=je.getElementsByName(be),Ie=0;et=Be[Ie++];)if(Me=et.getAttributeNode("id"),Me&&Me.value===be)return[et]}return[]}}),N.find.TAG=I.getElementsByTagName?function(be,je){if(typeof je.getElementsByTagName<"u")return je.getElementsByTagName(be);if(I.qsa)return je.querySelectorAll(be)}:function(be,je){var Me,Ie=[],Be=0,et=je.getElementsByTagName(be);if(be==="*"){for(;Me=et[Be++];)Me.nodeType===1&&Ie.push(Me);return Ie}return et},N.find.CLASS=I.getElementsByClassName&&function(be,je){if(typeof je.getElementsByClassName<"u"&&ot)return je.getElementsByClassName(be)},rr=[],qe=[],(I.qsa=Nu.test(ke.querySelectorAll))&&(hi(function(be){var je;Ge.appendChild(be).innerHTML="<a id='"+kt+"'></a><select id='"+kt+"-\r\\' msallowcapture=''><option selected=''></option></select>",be.querySelectorAll("[msallowcapture^='']").length&&qe.push("[*^$]="+yt+`*(?:''|"")`),be.querySelectorAll("[selected]").length||qe.push("\\["+yt+"*(?:value|"+vl+")"),be.querySelectorAll("[id~="+kt+"-]").length||qe.push("~="),je=ke.createElement("input"),je.setAttribute("name",""),be.appendChild(je),be.querySelectorAll("[name='']").length||qe.push("\\["+yt+"*name"+yt+"*="+yt+`*(?:''|"")`),be.querySelectorAll(":checked").length||qe.push(":checked"),be.querySelectorAll("a#"+kt+"+*").length||qe.push(".#.+[+~]"),be.querySelectorAll("\\\f"),qe.push("[\\r\\n\\f]")}),hi(function(be){be.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var je=ke.createElement("input");je.setAttribute("type","hidden"),be.appendChild(je).setAttribute("name","D"),be.querySelectorAll("[name=d]").length&&qe.push("name"+yt+"*[*^$|!~]?="),be.querySelectorAll(":enabled").length!==2&&qe.push(":enabled",":disabled"),Ge.appendChild(be).disabled=!0,be.querySelectorAll(":disabled").length!==2&&qe.push(":enabled",":disabled"),be.querySelectorAll("*,:x"),qe.push(",.*:")})),(I.matchesSelector=Nu.test(Zt=Ge.matches||Ge.webkitMatchesSelector||Ge.mozMatchesSelector||Ge.oMatchesSelector||Ge.msMatchesSelector))&&hi(function(be){I.disconnectedMatch=Zt.call(be,"*"),Zt.call(be,"[s!='']:x"),rr.push("!=",bl)}),qe=qe.length&&new RegExp(qe.join("|")),rr=rr.length&&new RegExp(rr.join("|")),de=Nu.test(Ge.compareDocumentPosition),Br=de||Nu.test(Ge.contains)?function(be,je){var Me=be.nodeType===9?be.documentElement:be,Ie=je&&je.parentNode;return be===Ie||!!(Ie&&Ie.nodeType===1&&(Me.contains?Me.contains(Ie):be.compareDocumentPosition&&be.compareDocumentPosition(Ie)&16))}:function(be,je){if(je){for(;je=je.parentNode;)if(je===be)return!0}return!1},O0=de?function(be,je){if(be===je)return Le=!0,0;var Me=!be.compareDocumentPosition-!je.compareDocumentPosition;return Me||(Me=(be.ownerDocument||be)==(je.ownerDocument||je)?be.compareDocumentPosition(je):1,Me&1||!I.sortDetached&&je.compareDocumentPosition(be)===Me?be==ke||be.ownerDocument==nt&&Br(nt,be)?-1:je==ke||je.ownerDocument==nt&&Br(nt,je)?1:Ae?W0(Ae,be)-W0(Ae,je):0:Me&4?-1:1)}:function(be,je){if(be===je)return Le=!0,0;var Me,Ie=0,Be=be.parentNode,et=je.parentNode,Ze=[be],rt=[je];if(!Be||!et)return be==ke?-1:je==ke?1:Be?-1:et?1:Ae?W0(Ae,be)-W0(Ae,je):0;if(Be===et)return R2(be,je);for(Me=be;Me=Me.parentNode;)Ze.unshift(Me);for(Me=je;Me=Me.parentNode;)rt.unshift(Me);for(;Ze[Ie]===rt[Ie];)Ie++;return Ie?R2(Ze[Ie],rt[Ie]):Ze[Ie]==nt?-1:rt[Ie]==nt?1:0}),ke},Mt.matches=function(Q,de){return Mt(Q,null,null,de)},Mt.matchesSelector=function(Q,de){if(Ce(Q),I.matchesSelector&&ot&&!Or[de+" "]&&(!rr||!rr.test(de))&&(!qe||!qe.test(de)))try{var fe=Zt.call(Q,de);if(fe||I.disconnectedMatch||Q.document&&Q.document.nodeType!==11)return fe}catch{Or(de,!0)}return Mt(de,ke,null,[Q]).length>0},Mt.contains=function(Q,de){return(Q.ownerDocument||Q)!=ke&&Ce(Q),Br(Q,de)},Mt.attr=function(Q,de){(Q.ownerDocument||Q)!=ke&&Ce(Q);var fe=N.attrHandle[de.toLowerCase()],Se=fe&&N0.call(N.attrHandle,de.toLowerCase())?fe(Q,de,!ot):void 0;return Se!==void 0?Se:I.attributes||!ot?Q.getAttribute(de):(Se=Q.getAttributeNode(de))&&Se.specified?Se.value:null},Mt.escape=function(Q){return(Q+"").replace(P2,$2)},Mt.error=function(Q){throw new Error("Syntax error, unrecognized expression: "+Q)},Mt.uniqueSort=function(Q){var de,fe=[],Se=0,be=0;if(Le=!I.detectDuplicates,Ae=!I.sortStable&&Q.slice(0),Q.sort(O0),Le){for(;de=Q[be++];)de===Q[be]&&(Se=fe.push(be));for(;Se--;)Q.splice(fe[Se],1)}return Ae=null,Q},U=Mt.getText=function(Q){var de,fe="",Se=0,be=Q.nodeType;if(be){if(be===1||be===9||be===11){if(typeof Q.textContent=="string")return Q.textContent;for(Q=Q.firstChild;Q;Q=Q.nextSibling)fe+=U(Q)}else if(be===3||be===4)return Q.nodeValue}else for(;de=Q[Se++];)fe+=U(de);return fe},N=Mt.selectors={cacheLength:50,createPseudo:di,match:ro,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(Q){return Q[1]=Q[1].replace(Wi,zi),Q[3]=(Q[3]||Q[4]||Q[5]||"").replace(Wi,zi),Q[2]==="~="&&(Q[3]=" "+Q[3]+" "),Q.slice(0,4)},CHILD:function(Q){return Q[1]=Q[1].toLowerCase(),Q[1].slice(0,3)==="nth"?(Q[3]||Mt.error(Q[0]),Q[4]=+(Q[4]?Q[5]+(Q[6]||1):2*(Q[3]==="even"||Q[3]==="odd")),Q[5]=+(Q[7]+Q[8]||Q[3]==="odd")):Q[3]&&Mt.error(Q[0]),Q},PSEUDO:function(Q){var de,fe=!Q[6]&&Q[2];return ro.CHILD.test(Q[0])?null:(Q[3]?Q[2]=Q[4]||Q[5]||"":fe&&Ny.test(fe)&&(de=q(fe,!0))&&(de=fe.indexOf(")",fe.length-de)-fe.length)&&(Q[0]=Q[0].slice(0,de),Q[2]=fe.slice(0,de)),Q.slice(0,3))}},filter:{TAG:function(Q){var de=Q.replace(Wi,zi).toLowerCase();return Q==="*"?function(){return!0}:function(fe){return fe.nodeName&&fe.nodeName.toLowerCase()===de}},CLASS:function(Q){var de=Wt[Q+" "];return de||(de=new RegExp("(^|"+yt+")"+Q+"("+yt+"|$)"))&&Wt(Q,function(fe){return de.test(typeof fe.className=="string"&&fe.className||typeof fe.getAttribute<"u"&&fe.getAttribute("class")||"")})},ATTR:function(Q,de,fe){return function(Se){var be=Mt.attr(Se,Q);return be==null?de==="!=":de?(be+="",de==="="?be===fe:de==="!="?be!==fe:de==="^="?fe&&be.indexOf(fe)===0:de==="*="?fe&&be.indexOf(fe)>-1:de==="$="?fe&&be.slice(-fe.length)===fe:de==="~="?(" "+be.replace(Ry," ")+" ").indexOf(fe)>-1:de==="|="?be===fe||be.slice(0,fe.length+1)===fe+"-":!1):!0}},CHILD:function(Q,de,fe,Se,be){var je=Q.slice(0,3)!=="nth",Me=Q.slice(-4)!=="last",Ie=de==="of-type";return Se===1&&be===0?function(Be){return!!Be.parentNode}:function(Be,et,Ze){var rt,dt,_t,tt,ir,mr,Nr=je!==Me?"nextSibling":"previousSibling",Bt=Be.parentNode,Wu=Ie&&Be.nodeName.toLowerCase(),zu=!Ze&&!Ie,Wr=!1;if(Bt){if(je){for(;Nr;){for(tt=Be;tt=tt[Nr];)if(Ie?tt.nodeName.toLowerCase()===Wu:tt.nodeType===1)return!1;mr=Nr=Q==="only"&&!mr&&"nextSibling"}return!0}if(mr=[Me?Bt.firstChild:Bt.lastChild],Me&&zu){for(tt=Bt,_t=tt[kt]||(tt[kt]={}),dt=_t[tt.uniqueID]||(_t[tt.uniqueID]={}),rt=dt[Q]||[],ir=rt[0]===Dr&&rt[1],Wr=ir&&rt[2],tt=ir&&Bt.childNodes[ir];tt=++ir&&tt&&tt[Nr]||(Wr=ir=0)||mr.pop();)if(tt.nodeType===1&&++Wr&&tt===Be){dt[Q]=[Dr,ir,Wr];break}}else if(zu&&(tt=Be,_t=tt[kt]||(tt[kt]={}),dt=_t[tt.uniqueID]||(_t[tt.uniqueID]={}),rt=dt[Q]||[],ir=rt[0]===Dr&&rt[1],Wr=ir),Wr===!1)for(;(tt=++ir&&tt&&tt[Nr]||(Wr=ir=0)||mr.pop())&&!((Ie?tt.nodeName.toLowerCase()===Wu:tt.nodeType===1)&&++Wr&&(zu&&(_t=tt[kt]||(tt[kt]={}),dt=_t[tt.uniqueID]||(_t[tt.uniqueID]={}),dt[Q]=[Dr,Wr]),tt===Be)););return Wr-=be,Wr===Se||Wr%Se===0&&Wr/Se>=0}}},PSEUDO:function(Q,de){var fe,Se=N.pseudos[Q]||N.setFilters[Q.toLowerCase()]||Mt.error("unsupported pseudo: "+Q);return Se[kt]?Se(de):Se.length>1?(fe=[Q,Q,"",de],N.setFilters.hasOwnProperty(Q.toLowerCase())?di(function(be,je){for(var Me,Ie=Se(be,de),Be=Ie.length;Be--;)Me=W0(be,Ie[Be]),be[Me]=!(je[Me]=Ie[Be])}):function(be){return Se(be,0,fe)}):Se}},pseudos:{not:di(function(Q){var de=[],fe=[],Se=he(Q.replace(to,"$1"));return Se[kt]?di(function(be,je,Me,Ie){for(var Be,et=Se(be,null,Ie,[]),Ze=be.length;Ze--;)(Be=et[Ze])&&(be[Ze]=!(je[Ze]=Be))}):function(be,je,Me){return de[0]=be,Se(de,null,Me,fe),de[0]=null,!fe.pop()}}),has:di(function(Q){return function(de){return Mt(Q,de).length>0}}),contains:di(function(Q){return Q=Q.replace(Wi,zi),function(de){return(de.textContent||U(de)).indexOf(Q)>-1}}),lang:di(function(Q){return Wy.test(Q||"")||Mt.error("unsupported lang: "+Q),Q=Q.replace(Wi,zi).toLowerCase(),function(de){var fe;do if(fe=ot?de.lang:de.getAttribute("xml:lang")||de.getAttribute("lang"))return fe=fe.toLowerCase(),fe===Q||fe.indexOf(Q+"-")===0;while((de=de.parentNode)&&de.nodeType===1);return!1}}),target:function(Q){var de=E.location&&E.location.hash;return de&&de.slice(1)===Q.id},root:function(Q){return Q===Ge},focus:function(Q){return Q===ke.activeElement&&(!ke.hasFocus||ke.hasFocus())&&!!(Q.type||Q.href||~Q.tabIndex)},enabled:B2(!1),disabled:B2(!0),checked:function(Q){var de=Q.nodeName.toLowerCase();return de==="input"&&!!Q.checked||de==="option"&&!!Q.selected},selected:function(Q){return Q.parentNode&&Q.parentNode.selectedIndex,Q.selected===!0},empty:function(Q){for(Q=Q.firstChild;Q;Q=Q.nextSibling)if(Q.nodeType<6)return!1;return!0},parent:function(Q){return!N.pseudos.empty(Q)},header:function(Q){return Uy.test(Q.nodeName)},input:function(Q){return Hy.test(Q.nodeName)},button:function(Q){var de=Q.nodeName.toLowerCase();return de==="input"&&Q.type==="button"||de==="button"},text:function(Q){var de;return Q.nodeName.toLowerCase()==="input"&&Q.type==="text"&&((de=Q.getAttribute("type"))==null||de.toLowerCase()==="text")},first:H0(function(){return[0]}),last:H0(function(Q,de){return[de-1]}),eq:H0(function(Q,de,fe){return[fe<0?fe+de:fe]}),even:H0(function(Q,de){for(var fe=0;fe<de;fe+=2)Q.push(fe);return Q}),odd:H0(function(Q,de){for(var fe=1;fe<de;fe+=2)Q.push(fe);return Q}),lt:H0(function(Q,de,fe){for(var Se=fe<0?fe+de:fe>de?de:fe;--Se>=0;)Q.push(Se);return Q}),gt:H0(function(Q,de,fe){for(var Se=fe<0?fe+de:fe;++Se<de;)Q.push(Se);return Q})}},N.pseudos.nth=N.pseudos.eq;for(L in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[L]=Xy(L);for(L in{submit:!0,reset:!0})N.pseudos[L]=Gy(L);function O2(){}O2.prototype=N.filters=N.pseudos,N.setFilters=new O2,q=Mt.tokenize=function(Q,de){var fe,Se,be,je,Me,Ie,Be,et=Ou[Q+" "];if(et)return de?0:et.slice(0);for(Me=Q,Ie=[],Be=N.preFilter;Me;){(!fe||(Se=By.exec(Me)))&&(Se&&(Me=Me.slice(Se[0].length)||Me),Ie.push(be=[])),fe=!1,(Se=T2.exec(Me))&&(fe=Se.shift(),be.push({value:fe,type:Se[0].replace(to," ")}),Me=Me.slice(fe.length));for(je in N.filter)(Se=ro[je].exec(Me))&&(!Be[je]||(Se=Be[je](Se)))&&(fe=Se.shift(),be.push({value:fe,type:je,matches:Se}),Me=Me.slice(fe.length));if(!fe)break}return de?Me.length:Me?Mt.error(Q):Ou(Q,Ie).slice(0)};function so(Q){for(var de=0,fe=Q.length,Se="";de<fe;de++)Se+=Q[de].value;return Se}function uo(Q,de,fe){var Se=de.dir,be=de.next,je=be||Se,Me=fe&&je==="parentNode",Ie=bt++;return de.first?function(Be,et,Ze){for(;Be=Be[Se];)if(Be.nodeType===1||Me)return Q(Be,et,Ze);return!1}:function(Be,et,Ze){var rt,dt,_t,tt=[Dr,Ie];if(Ze){for(;Be=Be[Se];)if((Be.nodeType===1||Me)&&Q(Be,et,Ze))return!0}else for(;Be=Be[Se];)if(Be.nodeType===1||Me)if(_t=Be[kt]||(Be[kt]={}),dt=_t[Be.uniqueID]||(_t[Be.uniqueID]={}),be&&be===Be.nodeName.toLowerCase())Be=Be[Se]||Be;else{if((rt=dt[je])&&rt[0]===Dr&&rt[1]===Ie)return tt[2]=rt[2];if(dt[je]=tt,tt[2]=Q(Be,et,Ze))return!0}return!1}}function Cl(Q){return Q.length>1?function(de,fe,Se){for(var be=Q.length;be--;)if(!Q[be](de,fe,Se))return!1;return!0}:Q[0]}function qy(Q,de,fe){for(var Se=0,be=de.length;Se<be;Se++)Mt(Q,de[Se],fe);return fe}function no(Q,de,fe,Se,be){for(var je,Me=[],Ie=0,Be=Q.length,et=de!=null;Ie<Be;Ie++)(je=Q[Ie])&&(!fe||fe(je,Se,be))&&(Me.push(je),et&&de.push(Ie));return Me}function El(Q,de,fe,Se,be,je){return Se&&!Se[kt]&&(Se=El(Se)),be&&!be[kt]&&(be=El(be,je)),di(function(Me,Ie,Be,et){var Ze,rt,dt,_t=[],tt=[],ir=Ie.length,mr=Me||qy(de||"*",Be.nodeType?[Be]:Be,[]),Nr=Q&&(Me||!de)?no(mr,_t,Q,Be,et):mr,Bt=fe?be||(Me?Q:ir||Se)?[]:Ie:Nr;if(fe&&fe(Nr,Bt,Be,et),Se)for(Ze=no(Bt,tt),Se(Ze,[],Be,et),rt=Ze.length;rt--;)(dt=Ze[rt])&&(Bt[tt[rt]]=!(Nr[tt[rt]]=dt));if(Me){if(be||Q){if(be){for(Ze=[],rt=Bt.length;rt--;)(dt=Bt[rt])&&Ze.push(Nr[rt]=dt);be(null,Bt=[],Ze,et)}for(rt=Bt.length;rt--;)(dt=Bt[rt])&&(Ze=be?W0(Me,dt):_t[rt])>-1&&(Me[Ze]=!(Ie[Ze]=dt))}}else Bt=no(Bt===Ie?Bt.splice(ir,Bt.length):Bt),be?be(null,Ie,Bt,et):r0.apply(Ie,Bt)})}function Al(Q){for(var de,fe,Se,be=Q.length,je=N.relative[Q[0].type],Me=je||N.relative[" "],Ie=je?1:0,Be=uo(function(rt){return rt===de},Me,!0),et=uo(function(rt){return W0(de,rt)>-1},Me,!0),Ze=[function(rt,dt,_t){var tt=!je&&(_t||dt!==ve)||((de=dt).nodeType?Be(rt,dt,_t):et(rt,dt,_t));return de=null,tt}];Ie<be;Ie++)if(fe=N.relative[Q[Ie].type])Ze=[uo(Cl(Ze),fe)];else{if(fe=N.filter[Q[Ie].type].apply(null,Q[Ie].matches),fe[kt]){for(Se=++Ie;Se<be&&!N.relative[Q[Se].type];Se++);return El(Ie>1&&Cl(Ze),Ie>1&&so(Q.slice(0,Ie-1).concat({value:Q[Ie-2].type===" "?"*":""})).replace(to,"$1"),fe,Ie<Se&&Al(Q.slice(Ie,Se)),Se<be&&Al(Q=Q.slice(Se)),Se<be&&so(Q))}Ze.push(fe)}return Cl(Ze)}function Ky(Q,de){var fe=de.length>0,Se=Q.length>0,be=function(je,Me,Ie,Be,et){var Ze,rt,dt,_t=0,tt="0",ir=je&&[],mr=[],Nr=ve,Bt=je||Se&&N.find.TAG("*",et),Wu=Dr+=Nr==null?1:Math.random()||.1,zu=Bt.length;for(et&&(ve=Me==ke||Me||et);tt!==zu&&(Ze=Bt[tt])!=null;tt++){if(Se&&Ze){for(rt=0,!Me&&Ze.ownerDocument!=ke&&(Ce(Ze),Ie=!ot);dt=Q[rt++];)if(dt(Ze,Me||ke,Ie)){Be.push(Ze);break}et&&(Dr=Wu)}fe&&((Ze=!dt&&Ze)&&_t--,je&&ir.push(Ze))}if(_t+=tt,fe&&tt!==_t){for(rt=0;dt=de[rt++];)dt(ir,mr,Me,Ie);if(je){if(_t>0)for(;tt--;)ir[tt]||mr[tt]||(mr[tt]=t0.call(Be));mr=no(mr)}r0.apply(Be,mr),et&&!je&&mr.length>0&&_t+de.length>1&&Mt.uniqueSort(Be)}return et&&(Dr=Wu,ve=Nr),ir};return fe?di(be):be}return he=Mt.compile=function(Q,de){var fe,Se=[],be=[],je=eo[Q+" "];if(!je){for(de||(de=q(Q)),fe=de.length;fe--;)je=Al(de[fe]),je[kt]?Se.push(je):be.push(je);je=eo(Q,Ky(be,Se)),je.selector=Q}return je},ge=Mt.select=function(Q,de,fe,Se){var be,je,Me,Ie,Be,et=typeof Q=="function"&&Q,Ze=!Se&&q(Q=et.selector||Q);if(fe=fe||[],Ze.length===1){if(je=Ze[0]=Ze[0].slice(0),je.length>2&&(Me=je[0]).type==="ID"&&de.nodeType===9&&ot&&N.relative[je[1].type]){if(de=(N.find.ID(Me.matches[0].replace(Wi,zi),de)||[])[0],de)et&&(de=de.parentNode);else return fe;Q=Q.slice(je.shift().value.length)}for(be=ro.needsContext.test(Q)?0:je.length;be--&&(Me=je[be],!N.relative[Ie=Me.type]);)if((Be=N.find[Ie])&&(Se=Be(Me.matches[0].replace(Wi,zi),wl.test(je[0].type)&&xl(de.parentNode)||de))){if(je.splice(be,1),Q=Se.length&&so(je),!Q)return r0.apply(fe,Se),fe;break}}return(et||he(Q,Ze))(Se,de,!ot,fe,!de||wl.test(Q)&&xl(de.parentNode)||de),fe},I.sortStable=kt.split("").sort(O0).join("")===kt,I.detectDuplicates=!!Le,Ce(),I.sortDetached=hi(function(Q){return Q.compareDocumentPosition(ke.createElement("fieldset"))&1}),hi(function(Q){return Q.innerHTML="<a href='#'></a>",Q.firstChild.getAttribute("href")==="#"})||yl("type|href|height|width",function(Q,de,fe){if(!fe)return Q.getAttribute(de,de.toLowerCase()==="type"?1:2)}),(!I.attributes||!hi(function(Q){return Q.innerHTML="<input/>",Q.firstChild.setAttribute("value",""),Q.firstChild.getAttribute("value")===""}))&&yl("value",function(Q,de,fe){if(!fe&&Q.nodeName.toLowerCase()==="input")return Q.defaultValue}),hi(function(Q){return Q.getAttribute("disabled")==null})||yl(vl,function(Q,de,fe){var Se;if(!fe)return Q[de]===!0?de.toLowerCase():(Se=Q.getAttributeNode(de))&&Se.specified?Se.value:null}),Mt}(e);b.find=k,b.expr=k.selectors,b.expr[":"]=b.expr.pseudos,b.uniqueSort=b.unique=k.uniqueSort,b.text=k.getText,b.isXMLDoc=k.isXML,b.contains=k.contains,b.escapeSelector=k.escape;var C=function(E,L,I){for(var N=[],U=I!==void 0;(E=E[L])&&E.nodeType!==9;)if(E.nodeType===1){if(U&&b(E).is(I))break;N.push(E)}return N},D=function(E,L){for(var I=[];E;E=E.nextSibling)E.nodeType===1&&E!==L&&I.push(E);return I},T=b.expr.match.needsContext;function S(E,L){return E.nodeName&&E.nodeName.toLowerCase()===L.toLowerCase()}var M=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function R(E,L,I){return p(L)?b.grep(E,function(N,U){return!!L.call(N,U,N)!==I}):L.nodeType?b.grep(E,function(N){return N===L!==I}):typeof L!="string"?b.grep(E,function(N){return o.call(L,N)>-1!==I}):b.filter(L,E,I)}b.filter=function(E,L,I){var N=L[0];return I&&(E=":not("+E+")"),L.length===1&&N.nodeType===1?b.find.matchesSelector(N,E)?[N]:[]:b.find.matches(E,b.grep(L,function(U){return U.nodeType===1}))},b.fn.extend({find:function(E){var L,I,N=this.length,U=this;if(typeof E!="string")return this.pushStack(b(E).filter(function(){for(L=0;L<N;L++)if(b.contains(U[L],this))return!0}));for(I=this.pushStack([]),L=0;L<N;L++)b.find(E,U[L],I);return N>1?b.uniqueSort(I):I},filter:function(E){return this.pushStack(R(this,E||[],!1))},not:function(E){return this.pushStack(R(this,E||[],!0))},is:function(E){return!!R(this,typeof E=="string"&&T.test(E)?b(E):E||[],!1).length}});var O,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Y=b.fn.init=function(E,L,I){var N,U;if(!E)return this;if(I=I||O,typeof E=="string")if(E[0]==="<"&&E[E.length-1]===">"&&E.length>=3?N=[null,E,null]:N=H.exec(E),N&&(N[1]||!L))if(N[1]){if(L=L instanceof b?L[0]:L,b.merge(this,b.parseHTML(N[1],L&&L.nodeType?L.ownerDocument||L:m,!0)),M.test(N[1])&&b.isPlainObject(L))for(N in L)p(this[N])?this[N](L[N]):this.attr(N,L[N]);return this}else return U=m.getElementById(N[2]),U&&(this[0]=U,this.length=1),this;else return!L||L.jquery?(L||I).find(E):this.constructor(L).find(E);else{if(E.nodeType)return this[0]=E,this.length=1,this;if(p(E))return I.ready!==void 0?I.ready(E):E(b)}return b.makeArray(E,this)};Y.prototype=b.fn,O=b(m);var J=/^(?:parents|prev(?:Until|All))/,Z={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({has:function(E){var L=b(E,this),I=L.length;return this.filter(function(){for(var N=0;N<I;N++)if(b.contains(this,L[N]))return!0})},closest:function(E,L){var I,N=0,U=this.length,V=[],q=typeof E!="string"&&b(E);if(!T.test(E)){for(;N<U;N++)for(I=this[N];I&&I!==L;I=I.parentNode)if(I.nodeType<11&&(q?q.index(I)>-1:I.nodeType===1&&b.find.matchesSelector(I,E))){V.push(I);break}}return this.pushStack(V.length>1?b.uniqueSort(V):V)},index:function(E){return E?typeof E=="string"?o.call(b(E),this[0]):o.call(this,E.jquery?E[0]:E):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(E,L){return this.pushStack(b.uniqueSort(b.merge(this.get(),b(E,L))))},addBack:function(E){return this.add(E==null?this.prevObject:this.prevObject.filter(E))}});function te(E,L){for(;(E=E[L])&&E.nodeType!==1;);return E}b.each({parent:function(E){var L=E.parentNode;return L&&L.nodeType!==11?L:null},parents:function(E){return C(E,"parentNode")},parentsUntil:function(E,L,I){return C(E,"parentNode",I)},next:function(E){return te(E,"nextSibling")},prev:function(E){return te(E,"previousSibling")},nextAll:function(E){return C(E,"nextSibling")},prevAll:function(E){return C(E,"previousSibling")},nextUntil:function(E,L,I){return C(E,"nextSibling",I)},prevUntil:function(E,L,I){return C(E,"previousSibling",I)},siblings:function(E){return D((E.parentNode||{}).firstChild,E)},children:function(E){return D(E.firstChild)},contents:function(E){return E.contentDocument!=null&&r(E.contentDocument)?E.contentDocument:(S(E,"template")&&(E=E.content||E),b.merge([],E.childNodes))}},function(E,L){b.fn[E]=function(I,N){var U=b.map(this,L,I);return E.slice(-5)!=="Until"&&(N=I),N&&typeof N=="string"&&(U=b.filter(N,U)),this.length>1&&(Z[E]||b.uniqueSort(U),J.test(E)&&U.reverse()),this.pushStack(U)}});var ie=/[^\x20\t\r\n\f]+/g;function se(E){var L={};return b.each(E.match(ie)||[],function(I,N){L[N]=!0}),L}b.Callbacks=function(E){E=typeof E=="string"?se(E):b.extend({},E);var L,I,N,U,V=[],q=[],he=-1,ge=function(){for(U=U||E.once,N=L=!0;q.length;he=-1)for(I=q.shift();++he<V.length;)V[he].apply(I[0],I[1])===!1&&E.stopOnFalse&&(he=V.length,I=!1);E.memory||(I=!1),L=!1,U&&(I?V=[]:V="")},ve={add:function(){return V&&(I&&!L&&(he=V.length-1,q.push(I)),function Ae(Le){b.each(Le,function(Ce,ke){p(ke)?(!E.unique||!ve.has(ke))&&V.push(ke):ke&&ke.length&&x(ke)!=="string"&&Ae(ke)})}(arguments),I&&!L&&ge()),this},remove:function(){return b.each(arguments,function(Ae,Le){for(var Ce;(Ce=b.inArray(Le,V,Ce))>-1;)V.splice(Ce,1),Ce<=he&&he--}),this},has:function(Ae){return Ae?b.inArray(Ae,V)>-1:V.length>0},empty:function(){return V&&(V=[]),this},disable:function(){return U=q=[],V=I="",this},disabled:function(){return!V},lock:function(){return U=q=[],!I&&!L&&(V=I=""),this},locked:function(){return!!U},fireWith:function(Ae,Le){return U||(Le=Le||[],Le=[Ae,Le.slice?Le.slice():Le],q.push(Le),L||ge()),this},fire:function(){return ve.fireWith(this,arguments),this},fired:function(){return!!N}};return ve};function ue(E){return E}function ne(E){throw E}function G(E,L,I,N){var U;try{E&&p(U=E.promise)?U.call(E).done(L).fail(I):E&&p(U=E.then)?U.call(E,L,I):L.apply(void 0,[E].slice(N))}catch(V){I.apply(void 0,[V])}}b.extend({Deferred:function(E){var L=[["notify","progress",b.Callbacks("memory"),b.Callbacks("memory"),2],["resolve","done",b.Callbacks("once memory"),b.Callbacks("once memory"),0,"resolved"],["reject","fail",b.Callbacks("once memory"),b.Callbacks("once memory"),1,"rejected"]],I="pending",N={state:function(){return I},always:function(){return U.done(arguments).fail(arguments),this},catch:function(V){return N.then(null,V)},pipe:function(){var V=arguments;return b.Deferred(function(q){b.each(L,function(he,ge){var ve=p(V[ge[4]])&&V[ge[4]];U[ge[1]](function(){var Ae=ve&&ve.apply(this,arguments);Ae&&p(Ae.promise)?Ae.promise().progress(q.notify).done(q.resolve).fail(q.reject):q[ge[0]+"With"](this,ve?[Ae]:arguments)})}),V=null}).promise()},then:function(V,q,he){var ge=0;function ve(Ae,Le,Ce,ke){return function(){var Ge=this,ot=arguments,qe=function(){var Zt,Br;if(!(Ae<ge)){if(Zt=Ce.apply(Ge,ot),Zt===Le.promise())throw new TypeError("Thenable self-resolution");Br=Zt&&(typeof Zt=="object"||typeof Zt=="function")&&Zt.then,p(Br)?ke?Br.call(Zt,ve(ge,Le,ue,ke),ve(ge,Le,ne,ke)):(ge++,Br.call(Zt,ve(ge,Le,ue,ke),ve(ge,Le,ne,ke),ve(ge,Le,ue,Le.notifyWith))):(Ce!==ue&&(Ge=void 0,ot=[Zt]),(ke||Le.resolveWith)(Ge,ot))}},rr=ke?qe:function(){try{qe()}catch(Zt){b.Deferred.exceptionHook&&b.Deferred.exceptionHook(Zt,rr.stackTrace),Ae+1>=ge&&(Ce!==ne&&(Ge=void 0,ot=[Zt]),Le.rejectWith(Ge,ot))}};Ae?rr():(b.Deferred.getStackHook&&(rr.stackTrace=b.Deferred.getStackHook()),e.setTimeout(rr))}}return b.Deferred(function(Ae){L[0][3].add(ve(0,Ae,p(he)?he:ue,Ae.notifyWith)),L[1][3].add(ve(0,Ae,p(V)?V:ue)),L[2][3].add(ve(0,Ae,p(q)?q:ne))}).promise()},promise:function(V){return V!=null?b.extend(V,N):N}},U={};return b.each(L,function(V,q){var he=q[2],ge=q[5];N[q[1]]=he.add,ge&&he.add(function(){I=ge},L[3-V][2].disable,L[3-V][3].disable,L[0][2].lock,L[0][3].lock),he.add(q[3].fire),U[q[0]]=function(){return U[q[0]+"With"](this===U?void 0:this,arguments),this},U[q[0]+"With"]=he.fireWith}),N.promise(U),E&&E.call(U,U),U},when:function(E){var L=arguments.length,I=L,N=Array(I),U=u.call(arguments),V=b.Deferred(),q=function(he){return function(ge){N[he]=this,U[he]=arguments.length>1?u.call(arguments):ge,--L||V.resolveWith(N,U)}};if(L<=1&&(G(E,V.done(q(I)).resolve,V.reject,!L),V.state()==="pending"||p(U[I]&&U[I].then)))return V.then();for(;I--;)G(U[I],q(I),V.reject);return V.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;b.Deferred.exceptionHook=function(E,L){e.console&&e.console.warn&&E&&K.test(E.name)&&e.console.warn("jQuery.Deferred exception: "+E.message,E.stack,L)},b.readyException=function(E){e.setTimeout(function(){throw E})};var le=b.Deferred();b.fn.ready=function(E){return le.then(E).catch(function(L){b.readyException(L)}),this},b.extend({isReady:!1,readyWait:1,ready:function(E){(E===!0?--b.readyWait:b.isReady)||(b.isReady=!0,!(E!==!0&&--b.readyWait>0)&&le.resolveWith(m,[b]))}}),b.ready.then=le.then;function re(){m.removeEventListener("DOMContentLoaded",re),e.removeEventListener("load",re),b.ready()}m.readyState==="complete"||m.readyState!=="loading"&&!m.documentElement.doScroll?e.setTimeout(b.ready):(m.addEventListener("DOMContentLoaded",re),e.addEventListener("load",re));var ae=function(E,L,I,N,U,V,q){var he=0,ge=E.length,ve=I==null;if(x(I)==="object"){U=!0;for(he in I)ae(E,L,he,I[he],!0,V,q)}else if(N!==void 0&&(U=!0,p(N)||(q=!0),ve&&(q?(L.call(E,N),L=null):(ve=L,L=function(Ae,Le,Ce){return ve.call(b(Ae),Ce)})),L))for(;he<ge;he++)L(E[he],I,q?N:N.call(E[he],he,L(E[he],I)));return U?E:ve?L.call(E):ge?L(E[0],I):V},ee=/^-ms-/,ce=/-([a-z])/g;function xe(E,L){return L.toUpperCase()}function Ee(E){return E.replace(ee,"ms-").replace(ce,xe)}var W=function(E){return E.nodeType===1||E.nodeType===9||!+E.nodeType};function z(){this.expando=b.expando+z.uid++}z.uid=1,z.prototype={cache:function(E){var L=E[this.expando];return L||(L={},W(E)&&(E.nodeType?E[this.expando]=L:Object.defineProperty(E,this.expando,{value:L,configurable:!0}))),L},set:function(E,L,I){var N,U=this.cache(E);if(typeof L=="string")U[Ee(L)]=I;else for(N in L)U[Ee(N)]=L[N];return U},get:function(E,L){return L===void 0?this.cache(E):E[this.expando]&&E[this.expando][Ee(L)]},access:function(E,L,I){return L===void 0||L&&typeof L=="string"&&I===void 0?this.get(E,L):(this.set(E,L,I),I!==void 0?I:L)},remove:function(E,L){var I,N=E[this.expando];if(N!==void 0){if(L!==void 0)for(Array.isArray(L)?L=L.map(Ee):(L=Ee(L),L=L in N?[L]:L.match(ie)||[]),I=L.length;I--;)delete N[L[I]];(L===void 0||b.isEmptyObject(N))&&(E.nodeType?E[this.expando]=void 0:delete E[this.expando])}},hasData:function(E){var L=E[this.expando];return L!==void 0&&!b.isEmptyObject(L)}};var $=new z,P=new z,B=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,X=/[A-Z]/g;function oe(E){return E==="true"?!0:E==="false"?!1:E==="null"?null:E===+E+""?+E:B.test(E)?JSON.parse(E):E}function we(E,L,I){var N;if(I===void 0&&E.nodeType===1)if(N="data-"+L.replace(X,"-$&").toLowerCase(),I=E.getAttribute(N),typeof I=="string"){try{I=oe(I)}catch{}P.set(E,L,I)}else I=void 0;return I}b.extend({hasData:function(E){return P.hasData(E)||$.hasData(E)},data:function(E,L,I){return P.access(E,L,I)},removeData:function(E,L){P.remove(E,L)},_data:function(E,L,I){return $.access(E,L,I)},_removeData:function(E,L){$.remove(E,L)}}),b.fn.extend({data:function(E,L){var I,N,U,V=this[0],q=V&&V.attributes;if(E===void 0){if(this.length&&(U=P.get(V),V.nodeType===1&&!$.get(V,"hasDataAttrs"))){for(I=q.length;I--;)q[I]&&(N=q[I].name,N.indexOf("data-")===0&&(N=Ee(N.slice(5)),we(V,N,U[N])));$.set(V,"hasDataAttrs",!0)}return U}return typeof E=="object"?this.each(function(){P.set(this,E)}):ae(this,function(he){var ge;if(V&&he===void 0)return ge=P.get(V,E),ge!==void 0||(ge=we(V,E),ge!==void 0)?ge:void 0;this.each(function(){P.set(this,E,he)})},null,L,arguments.length>1,null,!0)},removeData:function(E){return this.each(function(){P.remove(this,E)})}}),b.extend({queue:function(E,L,I){var N;if(E)return L=(L||"fx")+"queue",N=$.get(E,L),I&&(!N||Array.isArray(I)?N=$.access(E,L,b.makeArray(I)):N.push(I)),N||[]},dequeue:function(E,L){L=L||"fx";var I=b.queue(E,L),N=I.length,U=I.shift(),V=b._queueHooks(E,L),q=function(){b.dequeue(E,L)};U==="inprogress"&&(U=I.shift(),N--),U&&(L==="fx"&&I.unshift("inprogress"),delete V.stop,U.call(E,q,V)),!N&&V&&V.empty.fire()},_queueHooks:function(E,L){var I=L+"queueHooks";return $.get(E,I)||$.access(E,I,{empty:b.Callbacks("once memory").add(function(){$.remove(E,[L+"queue",I])})})}}),b.fn.extend({queue:function(E,L){var I=2;return typeof E!="string"&&(L=E,E="fx",I--),arguments.length<I?b.queue(this[0],E):L===void 0?this:this.each(function(){var N=b.queue(this,E,L);b._queueHooks(this,E),E==="fx"&&N[0]!=="inprogress"&&b.dequeue(this,E)})},dequeue:function(E){return this.each(function(){b.dequeue(this,E)})},clearQueue:function(E){return this.queue(E||"fx",[])},promise:function(E,L){var I,N=1,U=b.Deferred(),V=this,q=this.length,he=function(){--N||U.resolveWith(V,[V])};for(typeof E!="string"&&(L=E,E=void 0),E=E||"fx";q--;)I=$.get(V[q],E+"queueHooks"),I&&I.empty&&(N++,I.empty.add(he));return he(),U.promise(L)}});var ye=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Te=new RegExp("^(?:([+-])=|)("+ye+")([a-z%]*)$","i"),Ye=["Top","Right","Bottom","Left"],Re=m.documentElement,st=function(E){return b.contains(E.ownerDocument,E)},lt={composed:!0};Re.getRootNode&&(st=function(E){return b.contains(E.ownerDocument,E)||E.getRootNode(lt)===E.ownerDocument});var qt=function(E,L){return E=L||E,E.style.display==="none"||E.style.display===""&&st(E)&&b.css(E,"display")==="none"};function At(E,L,I,N){var U,V,q=20,he=N?function(){return N.cur()}:function(){return b.css(E,L,"")},ge=he(),ve=I&&I[3]||(b.cssNumber[L]?"":"px"),Ae=E.nodeType&&(b.cssNumber[L]||ve!=="px"&&+ge)&&Te.exec(b.css(E,L));if(Ae&&Ae[3]!==ve){for(ge=ge/2,ve=ve||Ae[3],Ae=+ge||1;q--;)b.style(E,L,Ae+ve),(1-V)*(1-(V=he()/ge||.5))<=0&&(q=0),Ae=Ae/V;Ae=Ae*2,b.style(E,L,Ae+ve),I=I||[]}return I&&(Ae=+Ae||+ge||0,U=I[1]?Ae+(I[1]+1)*I[2]:+I[2],N&&(N.unit=ve,N.start=Ae,N.end=U)),U}var Nt={};function dr(E){var L,I=E.ownerDocument,N=E.nodeName,U=Nt[N];return U||(L=I.body.appendChild(I.createElement(N)),U=b.css(L,"display"),L.parentNode.removeChild(L),U==="none"&&(U="block"),Nt[N]=U,U)}function Rr(E,L){for(var I,N,U=[],V=0,q=E.length;V<q;V++)N=E[V],N.style&&(I=N.style.display,L?(I==="none"&&(U[V]=$.get(N,"display")||null,U[V]||(N.style.display="")),N.style.display===""&&qt(N)&&(U[V]=dr(N))):I!=="none"&&(U[V]="none",$.set(N,"display",I)));for(V=0;V<q;V++)U[V]!=null&&(E[V].style.display=U[V]);return E}b.fn.extend({show:function(){return Rr(this,!0)},hide:function(){return Rr(this)},toggle:function(E){return typeof E=="boolean"?E?this.show():this.hide():this.each(function(){qt(this)?b(this).show():b(this).hide()})}});var Kr=/^(?:checkbox|radio)$/i,T0=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ls=/^$|^module$|\/(?:java|ecma)script/i;(function(){var E=m.createDocumentFragment(),L=E.appendChild(m.createElement("div")),I=m.createElement("input");I.setAttribute("type","radio"),I.setAttribute("checked","checked"),I.setAttribute("name","t"),L.appendChild(I),F.checkClone=L.cloneNode(!0).cloneNode(!0).lastChild.checked,L.innerHTML="<textarea>x</textarea>",F.noCloneChecked=!!L.cloneNode(!0).lastChild.defaultValue,L.innerHTML="<option></option>",F.option=!!L.lastChild})();var lr={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};lr.tbody=lr.tfoot=lr.colgroup=lr.caption=lr.thead,lr.th=lr.td,F.option||(lr.optgroup=lr.option=[1,"<select multiple='multiple'>","</select>"]);function hr(E,L){var I;return typeof E.getElementsByTagName<"u"?I=E.getElementsByTagName(L||"*"):typeof E.querySelectorAll<"u"?I=E.querySelectorAll(L||"*"):I=[],L===void 0||L&&S(E,L)?b.merge([E],I):I}function Tu(E,L){for(var I=0,N=E.length;I<N;I++)$.set(E[I],"globalEval",!L||$.get(L[I],"globalEval"))}var Pu=/<|&#?\w+;/;function P0(E,L,I,N,U){for(var V,q,he,ge,ve,Ae,Le=L.createDocumentFragment(),Ce=[],ke=0,Ge=E.length;ke<Ge;ke++)if(V=E[ke],V||V===0)if(x(V)==="object")b.merge(Ce,V.nodeType?[V]:V);else if(!Pu.test(V))Ce.push(L.createTextNode(V));else{for(q=q||Le.appendChild(L.createElement("div")),he=(T0.exec(V)||["",""])[1].toLowerCase(),ge=lr[he]||lr._default,q.innerHTML=ge[1]+b.htmlPrefilter(V)+ge[2],Ae=ge[0];Ae--;)q=q.lastChild;b.merge(Ce,q.childNodes),q=Le.firstChild,q.textContent=""}for(Le.textContent="",ke=0;V=Ce[ke++];){if(N&&b.inArray(V,N)>-1){U&&U.push(V);continue}if(ve=st(V),q=hr(Le.appendChild(V),"script"),ve&&Tu(q),I)for(Ae=0;V=q[Ae++];)Ls.test(V.type||"")&&I.push(V)}return Le}var $0=/^key/,I0=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ts=/^([^.]*)(?:\.(.+)|)/;function Ci(){return!0}function Ps(){return!1}function ry(E,L){return E===iy()==(L==="focus")}function iy(){try{return m.activeElement}catch{}}function nl(E,L,I,N,U,V){var q,he;if(typeof L=="object"){typeof I!="string"&&(N=N||I,I=void 0);for(he in L)nl(E,he,I,N,L[he],V);return E}if(N==null&&U==null?(U=I,N=I=void 0):U==null&&(typeof I=="string"?(U=N,N=void 0):(U=N,N=I,I=void 0)),U===!1)U=Ps;else if(!U)return E;return V===1&&(q=U,U=function(ge){return b().off(ge),q.apply(this,arguments)},U.guid=q.guid||(q.guid=b.guid++)),E.each(function(){b.event.add(this,L,U,N,I)})}b.event={global:{},add:function(E,L,I,N,U){var V,q,he,ge,ve,Ae,Le,Ce,ke,Ge,ot,qe=$.get(E);if(W(E))for(I.handler&&(V=I,I=V.handler,U=V.selector),U&&b.find.matchesSelector(Re,U),I.guid||(I.guid=b.guid++),(ge=qe.events)||(ge=qe.events=Object.create(null)),(q=qe.handle)||(q=qe.handle=function(rr){return typeof b<"u"&&b.event.triggered!==rr.type?b.event.dispatch.apply(E,arguments):void 0}),L=(L||"").match(ie)||[""],ve=L.length;ve--;)he=Ts.exec(L[ve])||[],ke=ot=he[1],Ge=(he[2]||"").split(".").sort(),ke&&(Le=b.event.special[ke]||{},ke=(U?Le.delegateType:Le.bindType)||ke,Le=b.event.special[ke]||{},Ae=b.extend({type:ke,origType:ot,data:N,handler:I,guid:I.guid,selector:U,needsContext:U&&b.expr.match.needsContext.test(U),namespace:Ge.join(".")},V),(Ce=ge[ke])||(Ce=ge[ke]=[],Ce.delegateCount=0,(!Le.setup||Le.setup.call(E,N,Ge,q)===!1)&&E.addEventListener&&E.addEventListener(ke,q)),Le.add&&(Le.add.call(E,Ae),Ae.handler.guid||(Ae.handler.guid=I.guid)),U?Ce.splice(Ce.delegateCount++,0,Ae):Ce.push(Ae),b.event.global[ke]=!0)},remove:function(E,L,I,N,U){var V,q,he,ge,ve,Ae,Le,Ce,ke,Ge,ot,qe=$.hasData(E)&&$.get(E);if(!(!qe||!(ge=qe.events))){for(L=(L||"").match(ie)||[""],ve=L.length;ve--;){if(he=Ts.exec(L[ve])||[],ke=ot=he[1],Ge=(he[2]||"").split(".").sort(),!ke){for(ke in ge)b.event.remove(E,ke+L[ve],I,N,!0);continue}for(Le=b.event.special[ke]||{},ke=(N?Le.delegateType:Le.bindType)||ke,Ce=ge[ke]||[],he=he[2]&&new RegExp("(^|\\.)"+Ge.join("\\.(?:.*\\.|)")+"(\\.|$)"),q=V=Ce.length;V--;)Ae=Ce[V],(U||ot===Ae.origType)&&(!I||I.guid===Ae.guid)&&(!he||he.test(Ae.namespace))&&(!N||N===Ae.selector||N==="**"&&Ae.selector)&&(Ce.splice(V,1),Ae.selector&&Ce.delegateCount--,Le.remove&&Le.remove.call(E,Ae));q&&!Ce.length&&((!Le.teardown||Le.teardown.call(E,Ge,qe.handle)===!1)&&b.removeEvent(E,ke,qe.handle),delete ge[ke])}b.isEmptyObject(ge)&&$.remove(E,"handle events")}},dispatch:function(E){var L,I,N,U,V,q,he=new Array(arguments.length),ge=b.event.fix(E),ve=($.get(this,"events")||Object.create(null))[ge.type]||[],Ae=b.event.special[ge.type]||{};for(he[0]=ge,L=1;L<arguments.length;L++)he[L]=arguments[L];if(ge.delegateTarget=this,!(Ae.preDispatch&&Ae.preDispatch.call(this,ge)===!1)){for(q=b.event.handlers.call(this,ge,ve),L=0;(U=q[L++])&&!ge.isPropagationStopped();)for(ge.currentTarget=U.elem,I=0;(V=U.handlers[I++])&&!ge.isImmediatePropagationStopped();)(!ge.rnamespace||V.namespace===!1||ge.rnamespace.test(V.namespace))&&(ge.handleObj=V,ge.data=V.data,N=((b.event.special[V.origType]||{}).handle||V.handler).apply(U.elem,he),N!==void 0&&(ge.result=N)===!1&&(ge.preventDefault(),ge.stopPropagation()));return Ae.postDispatch&&Ae.postDispatch.call(this,ge),ge.result}},handlers:function(E,L){var I,N,U,V,q,he=[],ge=L.delegateCount,ve=E.target;if(ge&&ve.nodeType&&!(E.type==="click"&&E.button>=1)){for(;ve!==this;ve=ve.parentNode||this)if(ve.nodeType===1&&!(E.type==="click"&&ve.disabled===!0)){for(V=[],q={},I=0;I<ge;I++)N=L[I],U=N.selector+" ",q[U]===void 0&&(q[U]=N.needsContext?b(U,this).index(ve)>-1:b.find(U,this,null,[ve]).length),q[U]&&V.push(N);V.length&&he.push({elem:ve,handlers:V})}}return ve=this,ge<L.length&&he.push({elem:ve,handlers:L.slice(ge)}),he},addProp:function(E,L){Object.defineProperty(b.Event.prototype,E,{enumerable:!0,configurable:!0,get:p(L)?function(){if(this.originalEvent)return L(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[E]},set:function(I){Object.defineProperty(this,E,{enumerable:!0,configurable:!0,writable:!0,value:I})}})},fix:function(E){return E[b.expando]?E:new b.Event(E)},special:{load:{noBubble:!0},click:{setup:function(E){var L=this||E;return Kr.test(L.type)&&L.click&&S(L,"input")&&Kn(L,"click",Ci),!1},trigger:function(E){var L=this||E;return Kr.test(L.type)&&L.click&&S(L,"input")&&Kn(L,"click"),!0},_default:function(E){var L=E.target;return Kr.test(L.type)&&L.click&&S(L,"input")&&$.get(L,"click")||S(L,"a")}},beforeunload:{postDispatch:function(E){E.result!==void 0&&E.originalEvent&&(E.originalEvent.returnValue=E.result)}}}};function Kn(E,L,I){if(!I){$.get(E,L)===void 0&&b.event.add(E,L,Ci);return}$.set(E,L,!1),b.event.add(E,L,{namespace:!1,handler:function(N){var U,V,q=$.get(this,L);if(N.isTrigger&1&&this[L]){if(q.length)(b.event.special[L]||{}).delegateType&&N.stopPropagation();else if(q=u.call(arguments),$.set(this,L,q),U=I(this,L),this[L](),V=$.get(this,L),q!==V||U?$.set(this,L,!1):V={},q!==V)return N.stopImmediatePropagation(),N.preventDefault(),V.value}else q.length&&($.set(this,L,{value:b.event.trigger(b.extend(q[0],b.Event.prototype),q.slice(1),this)}),N.stopImmediatePropagation())}})}b.removeEvent=function(E,L,I){E.removeEventListener&&E.removeEventListener(L,I)},b.Event=function(E,L){if(!(this instanceof b.Event))return new b.Event(E,L);E&&E.type?(this.originalEvent=E,this.type=E.type,this.isDefaultPrevented=E.defaultPrevented||E.defaultPrevented===void 0&&E.returnValue===!1?Ci:Ps,this.target=E.target&&E.target.nodeType===3?E.target.parentNode:E.target,this.currentTarget=E.currentTarget,this.relatedTarget=E.relatedTarget):this.type=E,L&&b.extend(this,L),this.timeStamp=E&&E.timeStamp||Date.now(),this[b.expando]=!0},b.Event.prototype={constructor:b.Event,isDefaultPrevented:Ps,isPropagationStopped:Ps,isImmediatePropagationStopped:Ps,isSimulated:!1,preventDefault:function(){var E=this.originalEvent;this.isDefaultPrevented=Ci,E&&!this.isSimulated&&E.preventDefault()},stopPropagation:function(){var E=this.originalEvent;this.isPropagationStopped=Ci,E&&!this.isSimulated&&E.stopPropagation()},stopImmediatePropagation:function(){var E=this.originalEvent;this.isImmediatePropagationStopped=Ci,E&&!this.isSimulated&&E.stopImmediatePropagation(),this.stopPropagation()}},b.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(E){var L=E.button;return E.which==null&&$0.test(E.type)?E.charCode!=null?E.charCode:E.keyCode:!E.which&&L!==void 0&&I0.test(E.type)?L&1?1:L&2?3:L&4?2:0:E.which}},b.event.addProp),b.each({focus:"focusin",blur:"focusout"},function(E,L){b.event.special[E]={setup:function(){return Kn(this,E,ry),!1},trigger:function(){return Kn(this,E),!0},delegateType:L}}),b.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(E,L){b.event.special[E]={delegateType:L,bindType:L,handle:function(I){var N,U=this,V=I.relatedTarget,q=I.handleObj;return(!V||V!==U&&!b.contains(U,V))&&(I.type=q.origType,N=q.handler.apply(this,arguments),I.type=L),N}}}),b.fn.extend({on:function(E,L,I,N){return nl(this,E,L,I,N)},one:function(E,L,I,N){return nl(this,E,L,I,N,1)},off:function(E,L,I){var N,U;if(E&&E.preventDefault&&E.handleObj)return N=E.handleObj,b(E.delegateTarget).off(N.namespace?N.origType+"."+N.namespace:N.origType,N.selector,N.handler),this;if(typeof E=="object"){for(U in E)this.off(U,L,E[U]);return this}return(L===!1||typeof L=="function")&&(I=L,L=void 0),I===!1&&(I=Ps),this.each(function(){b.event.remove(this,E,I,L)})}});var sy=/<script|<style|<link/i,uy=/checked\s*(?:[^=]|=\s*.checked.)/i,ny=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function o2(E,L){return S(E,"table")&&S(L.nodeType!==11?L:L.firstChild,"tr")&&b(E).children("tbody")[0]||E}function oy(E){return E.type=(E.getAttribute("type")!==null)+"/"+E.type,E}function ay(E){return(E.type||"").slice(0,5)==="true/"?E.type=E.type.slice(5):E.removeAttribute("type"),E}function a2(E,L){var I,N,U,V,q,he,ge;if(L.nodeType===1){if($.hasData(E)&&(V=$.get(E),ge=V.events,ge)){$.remove(L,"handle events");for(U in ge)for(I=0,N=ge[U].length;I<N;I++)b.event.add(L,U,ge[U][I])}P.hasData(E)&&(q=P.access(E),he=b.extend({},q),P.set(L,he))}}function ly(E,L){var I=L.nodeName.toLowerCase();I==="input"&&Kr.test(E.type)?L.checked=E.checked:(I==="input"||I==="textarea")&&(L.defaultValue=E.defaultValue)}function $s(E,L,I,N){L=n(L);var U,V,q,he,ge,ve,Ae=0,Le=E.length,Ce=Le-1,ke=L[0],Ge=p(ke);if(Ge||Le>1&&typeof ke=="string"&&!F.checkClone&&uy.test(ke))return E.each(function(ot){var qe=E.eq(ot);Ge&&(L[0]=ke.call(this,ot,qe.html())),$s(qe,L,I,N)});if(Le&&(U=P0(L,E[0].ownerDocument,!1,E,N),V=U.firstChild,U.childNodes.length===1&&(U=V),V||N)){for(q=b.map(hr(U,"script"),oy),he=q.length;Ae<Le;Ae++)ge=U,Ae!==Ce&&(ge=b.clone(ge,!0,!0),he&&b.merge(q,hr(ge,"script"))),I.call(E[Ae],ge,Ae);if(he)for(ve=q[q.length-1].ownerDocument,b.map(q,ay),Ae=0;Ae<he;Ae++)ge=q[Ae],Ls.test(ge.type||"")&&!$.access(ge,"globalEval")&&b.contains(ve,ge)&&(ge.src&&(ge.type||"").toLowerCase()!=="module"?b._evalUrl&&!ge.noModule&&b._evalUrl(ge.src,{nonce:ge.nonce||ge.getAttribute("nonce")},ve):w(ge.textContent.replace(ny,""),ge,ve))}return E}function l2(E,L,I){for(var N,U=L?b.filter(L,E):E,V=0;(N=U[V])!=null;V++)!I&&N.nodeType===1&&b.cleanData(hr(N)),N.parentNode&&(I&&st(N)&&Tu(hr(N,"script")),N.parentNode.removeChild(N));return E}b.extend({htmlPrefilter:function(E){return E},clone:function(E,L,I){var N,U,V,q,he=E.cloneNode(!0),ge=st(E);if(!F.noCloneChecked&&(E.nodeType===1||E.nodeType===11)&&!b.isXMLDoc(E))for(q=hr(he),V=hr(E),N=0,U=V.length;N<U;N++)ly(V[N],q[N]);if(L)if(I)for(V=V||hr(E),q=q||hr(he),N=0,U=V.length;N<U;N++)a2(V[N],q[N]);else a2(E,he);return q=hr(he,"script"),q.length>0&&Tu(q,!ge&&hr(E,"script")),he},cleanData:function(E){for(var L,I,N,U=b.event.special,V=0;(I=E[V])!==void 0;V++)if(W(I)){if(L=I[$.expando]){if(L.events)for(N in L.events)U[N]?b.event.remove(I,N):b.removeEvent(I,N,L.handle);I[$.expando]=void 0}I[P.expando]&&(I[P.expando]=void 0)}}}),b.fn.extend({detach:function(E){return l2(this,E,!0)},remove:function(E){return l2(this,E)},text:function(E){return ae(this,function(L){return L===void 0?b.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=L)})},null,E,arguments.length)},append:function(){return $s(this,arguments,function(E){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=o2(this,E);L.appendChild(E)}})},prepend:function(){return $s(this,arguments,function(E){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var L=o2(this,E);L.insertBefore(E,L.firstChild)}})},before:function(){return $s(this,arguments,function(E){this.parentNode&&this.parentNode.insertBefore(E,this)})},after:function(){return $s(this,arguments,function(E){this.parentNode&&this.parentNode.insertBefore(E,this.nextSibling)})},empty:function(){for(var E,L=0;(E=this[L])!=null;L++)E.nodeType===1&&(b.cleanData(hr(E,!1)),E.textContent="");return this},clone:function(E,L){return E=E??!1,L=L??E,this.map(function(){return b.clone(this,E,L)})},html:function(E){return ae(this,function(L){var I=this[0]||{},N=0,U=this.length;if(L===void 0&&I.nodeType===1)return I.innerHTML;if(typeof L=="string"&&!sy.test(L)&&!lr[(T0.exec(L)||["",""])[1].toLowerCase()]){L=b.htmlPrefilter(L);try{for(;N<U;N++)I=this[N]||{},I.nodeType===1&&(b.cleanData(hr(I,!1)),I.innerHTML=L);I=0}catch{}}I&&this.empty().append(L)},null,E,arguments.length)},replaceWith:function(){var E=[];return $s(this,arguments,function(L){var I=this.parentNode;b.inArray(this,E)<0&&(b.cleanData(hr(this)),I&&I.replaceChild(L,this))},E)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,L){b.fn[E]=function(I){for(var N,U=[],V=b(I),q=V.length-1,he=0;he<=q;he++)N=he===q?this:this.clone(!0),b(V[he])[L](N),a.apply(U,N.get());return this.pushStack(U)}});var ol=new RegExp("^("+ye+")(?!px)[a-z%]+$","i"),Jn=function(E){var L=E.ownerDocument.defaultView;return(!L||!L.opener)&&(L=e),L.getComputedStyle(E)},c2=function(E,L,I){var N,U,V={};for(U in L)V[U]=E.style[U],E.style[U]=L[U];N=I.call(E);for(U in L)E.style[U]=V[U];return N},cy=new RegExp(Ye.join("|"),"i");(function(){function E(){if(ve){ge.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",ve.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Re.appendChild(ge).appendChild(ve);var Ae=e.getComputedStyle(ve);I=Ae.top!=="1%",he=L(Ae.marginLeft)===12,ve.style.right="60%",V=L(Ae.right)===36,N=L(Ae.width)===36,ve.style.position="absolute",U=L(ve.offsetWidth/3)===12,Re.removeChild(ge),ve=null}}function L(Ae){return Math.round(parseFloat(Ae))}var I,N,U,V,q,he,ge=m.createElement("div"),ve=m.createElement("div");ve.style&&(ve.style.backgroundClip="content-box",ve.cloneNode(!0).style.backgroundClip="",F.clearCloneStyle=ve.style.backgroundClip==="content-box",b.extend(F,{boxSizingReliable:function(){return E(),N},pixelBoxStyles:function(){return E(),V},pixelPosition:function(){return E(),I},reliableMarginLeft:function(){return E(),he},scrollboxSize:function(){return E(),U},reliableTrDimensions:function(){var Ae,Le,Ce,ke;return q==null&&(Ae=m.createElement("table"),Le=m.createElement("tr"),Ce=m.createElement("div"),Ae.style.cssText="position:absolute;left:-11111px",Le.style.height="1px",Ce.style.height="9px",Re.appendChild(Ae).appendChild(Le).appendChild(Ce),ke=e.getComputedStyle(Le),q=parseInt(ke.height)>3,Re.removeChild(Ae)),q}}))})();function $u(E,L,I){var N,U,V,q,he=E.style;return I=I||Jn(E),I&&(q=I.getPropertyValue(L)||I[L],q===""&&!st(E)&&(q=b.style(E,L)),!F.pixelBoxStyles()&&ol.test(q)&&cy.test(L)&&(N=he.width,U=he.minWidth,V=he.maxWidth,he.minWidth=he.maxWidth=he.width=q,q=I.width,he.width=N,he.minWidth=U,he.maxWidth=V)),q!==void 0?q+"":q}function d2(E,L){return{get:function(){if(E()){delete this.get;return}return(this.get=L).apply(this,arguments)}}}var h2=["Webkit","Moz","ms"],g2=m.createElement("div").style,F2={};function dy(E){for(var L=E[0].toUpperCase()+E.slice(1),I=h2.length;I--;)if(E=h2[I]+L,E in g2)return E}function al(E){var L=b.cssProps[E]||F2[E];return L||(E in g2?E:F2[E]=dy(E)||E)}var hy=/^(none|table(?!-c[ea]).+)/,p2=/^--/,gy={position:"absolute",visibility:"hidden",display:"block"},f2={letterSpacing:"0",fontWeight:"400"};function m2(E,L,I){var N=Te.exec(L);return N?Math.max(0,N[2]-(I||0))+(N[3]||"px"):L}function ll(E,L,I,N,U,V){var q=L==="width"?1:0,he=0,ge=0;if(I===(N?"border":"content"))return 0;for(;q<4;q+=2)I==="margin"&&(ge+=b.css(E,I+Ye[q],!0,U)),N?(I==="content"&&(ge-=b.css(E,"padding"+Ye[q],!0,U)),I!=="margin"&&(ge-=b.css(E,"border"+Ye[q]+"Width",!0,U))):(ge+=b.css(E,"padding"+Ye[q],!0,U),I!=="padding"?ge+=b.css(E,"border"+Ye[q]+"Width",!0,U):he+=b.css(E,"border"+Ye[q]+"Width",!0,U));return!N&&V>=0&&(ge+=Math.max(0,Math.ceil(E["offset"+L[0].toUpperCase()+L.slice(1)]-V-ge-he-.5))||0),ge}function v2(E,L,I){var N=Jn(E),U=!F.boxSizingReliable()||I,V=U&&b.css(E,"boxSizing",!1,N)==="border-box",q=V,he=$u(E,L,N),ge="offset"+L[0].toUpperCase()+L.slice(1);if(ol.test(he)){if(!I)return he;he="auto"}return(!F.boxSizingReliable()&&V||!F.reliableTrDimensions()&&S(E,"tr")||he==="auto"||!parseFloat(he)&&b.css(E,"display",!1,N)==="inline")&&E.getClientRects().length&&(V=b.css(E,"boxSizing",!1,N)==="border-box",q=ge in E,q&&(he=E[ge])),he=parseFloat(he)||0,he+ll(E,L,I||(V?"border":"content"),q,N,he)+"px"}b.extend({cssHooks:{opacity:{get:function(E,L){if(L){var I=$u(E,"opacity");return I===""?"1":I}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(E,L,I,N){if(!(!E||E.nodeType===3||E.nodeType===8||!E.style)){var U,V,q,he=Ee(L),ge=p2.test(L),ve=E.style;if(ge||(L=al(he)),q=b.cssHooks[L]||b.cssHooks[he],I!==void 0){if(V=typeof I,V==="string"&&(U=Te.exec(I))&&U[1]&&(I=At(E,L,U),V="number"),I==null||I!==I)return;V==="number"&&!ge&&(I+=U&&U[3]||(b.cssNumber[he]?"":"px")),!F.clearCloneStyle&&I===""&&L.indexOf("background")===0&&(ve[L]="inherit"),(!q||!("set"in q)||(I=q.set(E,I,N))!==void 0)&&(ge?ve.setProperty(L,I):ve[L]=I)}else return q&&"get"in q&&(U=q.get(E,!1,N))!==void 0?U:ve[L]}},css:function(E,L,I,N){var U,V,q,he=Ee(L),ge=p2.test(L);return ge||(L=al(he)),q=b.cssHooks[L]||b.cssHooks[he],q&&"get"in q&&(U=q.get(E,!0,I)),U===void 0&&(U=$u(E,L,N)),U==="normal"&&L in f2&&(U=f2[L]),I===""||I?(V=parseFloat(U),I===!0||isFinite(V)?V||0:U):U}}),b.each(["height","width"],function(E,L){b.cssHooks[L]={get:function(I,N,U){if(N)return hy.test(b.css(I,"display"))&&(!I.getClientRects().length||!I.getBoundingClientRect().width)?c2(I,gy,function(){return v2(I,L,U)}):v2(I,L,U)},set:function(I,N,U){var V,q=Jn(I),he=!F.scrollboxSize()&&q.position==="absolute",ge=he||U,ve=ge&&b.css(I,"boxSizing",!1,q)==="border-box",Ae=U?ll(I,L,U,ve,q):0;return ve&&he&&(Ae-=Math.ceil(I["offset"+L[0].toUpperCase()+L.slice(1)]-parseFloat(q[L])-ll(I,L,"border",!1,q)-.5)),Ae&&(V=Te.exec(N))&&(V[3]||"px")!=="px"&&(I.style[L]=N,N=b.css(I,L)),m2(I,N,Ae)}}}),b.cssHooks.marginLeft=d2(F.reliableMarginLeft,function(E,L){if(L)return(parseFloat($u(E,"marginLeft"))||E.getBoundingClientRect().left-c2(E,{marginLeft:0},function(){return E.getBoundingClientRect().left}))+"px"}),b.each({margin:"",padding:"",border:"Width"},function(E,L){b.cssHooks[E+L]={expand:function(I){for(var N=0,U={},V=typeof I=="string"?I.split(" "):[I];N<4;N++)U[E+Ye[N]+L]=V[N]||V[N-2]||V[0];return U}},E!=="margin"&&(b.cssHooks[E+L].set=m2)}),b.fn.extend({css:function(E,L){return ae(this,function(I,N,U){var V,q,he={},ge=0;if(Array.isArray(N)){for(V=Jn(I),q=N.length;ge<q;ge++)he[N[ge]]=b.css(I,N[ge],!1,V);return he}return U!==void 0?b.style(I,N,U):b.css(I,N)},E,L,arguments.length>1)}});function jr(E,L,I,N,U){return new jr.prototype.init(E,L,I,N,U)}b.Tween=jr,jr.prototype={constructor:jr,init:function(E,L,I,N,U,V){this.elem=E,this.prop=I,this.easing=U||b.easing._default,this.options=L,this.start=this.now=this.cur(),this.end=N,this.unit=V||(b.cssNumber[I]?"":"px")},cur:function(){var E=jr.propHooks[this.prop];return E&&E.get?E.get(this):jr.propHooks._default.get(this)},run:function(E){var L,I=jr.propHooks[this.prop];return this.options.duration?this.pos=L=b.easing[this.easing](E,this.options.duration*E,0,1,this.options.duration):this.pos=L=E,this.now=(this.end-this.start)*L+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),I&&I.set?I.set(this):jr.propHooks._default.set(this),this}},jr.prototype.init.prototype=jr.prototype,jr.propHooks={_default:{get:function(E){var L;return E.elem.nodeType!==1||E.elem[E.prop]!=null&&E.elem.style[E.prop]==null?E.elem[E.prop]:(L=b.css(E.elem,E.prop,""),!L||L==="auto"?0:L)},set:function(E){b.fx.step[E.prop]?b.fx.step[E.prop](E):E.elem.nodeType===1&&(b.cssHooks[E.prop]||E.elem.style[al(E.prop)]!=null)?b.style(E.elem,E.prop,E.now+E.unit):E.elem[E.prop]=E.now}}},jr.propHooks.scrollTop=jr.propHooks.scrollLeft={set:function(E){E.elem.nodeType&&E.elem.parentNode&&(E.elem[E.prop]=E.now)}},b.easing={linear:function(E){return E},swing:function(E){return .5-Math.cos(E*Math.PI)/2},_default:"swing"},b.fx=jr.prototype.init,b.fx.step={};var Is,Zn,Fy=/^(?:toggle|show|hide)$/,py=/queueHooks$/;function cl(){Zn&&(m.hidden===!1&&e.requestAnimationFrame?e.requestAnimationFrame(cl):e.setTimeout(cl,b.fx.interval),b.fx.tick())}function b2(){return e.setTimeout(function(){Is=void 0}),Is=Date.now()}function Qn(E,L){var I,N=0,U={height:E};for(L=L?1:0;N<4;N+=2-L)I=Ye[N],U["margin"+I]=U["padding"+I]=E;return L&&(U.opacity=U.width=E),U}function w2(E,L,I){for(var N,U=(ci.tweeners[L]||[]).concat(ci.tweeners["*"]),V=0,q=U.length;V<q;V++)if(N=U[V].call(I,L,E))return N}function fy(E,L,I){var N,U,V,q,he,ge,ve,Ae,Le="width"in L||"height"in L,Ce=this,ke={},Ge=E.style,ot=E.nodeType&&qt(E),qe=$.get(E,"fxshow");I.queue||(q=b._queueHooks(E,"fx"),q.unqueued==null&&(q.unqueued=0,he=q.empty.fire,q.empty.fire=function(){q.unqueued||he()}),q.unqueued++,Ce.always(function(){Ce.always(function(){q.unqueued--,b.queue(E,"fx").length||q.empty.fire()})}));for(N in L)if(U=L[N],Fy.test(U)){if(delete L[N],V=V||U==="toggle",U===(ot?"hide":"show"))if(U==="show"&&qe&&qe[N]!==void 0)ot=!0;else continue;ke[N]=qe&&qe[N]||b.style(E,N)}if(ge=!b.isEmptyObject(L),!(!ge&&b.isEmptyObject(ke))){Le&&E.nodeType===1&&(I.overflow=[Ge.overflow,Ge.overflowX,Ge.overflowY],ve=qe&&qe.display,ve==null&&(ve=$.get(E,"display")),Ae=b.css(E,"display"),Ae==="none"&&(ve?Ae=ve:(Rr([E],!0),ve=E.style.display||ve,Ae=b.css(E,"display"),Rr([E]))),(Ae==="inline"||Ae==="inline-block"&&ve!=null)&&b.css(E,"float")==="none"&&(ge||(Ce.done(function(){Ge.display=ve}),ve==null&&(Ae=Ge.display,ve=Ae==="none"?"":Ae)),Ge.display="inline-block")),I.overflow&&(Ge.overflow="hidden",Ce.always(function(){Ge.overflow=I.overflow[0],Ge.overflowX=I.overflow[1],Ge.overflowY=I.overflow[2]})),ge=!1;for(N in ke)ge||(qe?"hidden"in qe&&(ot=qe.hidden):qe=$.access(E,"fxshow",{display:ve}),V&&(qe.hidden=!ot),ot&&Rr([E],!0),Ce.done(function(){ot||Rr([E]),$.remove(E,"fxshow");for(N in ke)b.style(E,N,ke[N])})),ge=w2(ot?qe[N]:0,N,Ce),N in qe||(qe[N]=ge.start,ot&&(ge.end=ge.start,ge.start=0))}}function my(E,L){var I,N,U,V,q;for(I in E)if(N=Ee(I),U=L[N],V=E[I],Array.isArray(V)&&(U=V[1],V=E[I]=V[0]),I!==N&&(E[N]=V,delete E[I]),q=b.cssHooks[N],q&&"expand"in q){V=q.expand(V),delete E[N];for(I in V)I in E||(E[I]=V[I],L[I]=U)}else L[N]=U}function ci(E,L,I){var N,U,V=0,q=ci.prefilters.length,he=b.Deferred().always(function(){delete ge.elem}),ge=function(){if(U)return!1;for(var Le=Is||b2(),Ce=Math.max(0,ve.startTime+ve.duration-Le),ke=Ce/ve.duration||0,Ge=1-ke,ot=0,qe=ve.tweens.length;ot<qe;ot++)ve.tweens[ot].run(Ge);return he.notifyWith(E,[ve,Ge,Ce]),Ge<1&&qe?Ce:(qe||he.notifyWith(E,[ve,1,0]),he.resolveWith(E,[ve]),!1)},ve=he.promise({elem:E,props:b.extend({},L),opts:b.extend(!0,{specialEasing:{},easing:b.easing._default},I),originalProperties:L,originalOptions:I,startTime:Is||b2(),duration:I.duration,tweens:[],createTween:function(Le,Ce){var ke=b.Tween(E,ve.opts,Le,Ce,ve.opts.specialEasing[Le]||ve.opts.easing);return ve.tweens.push(ke),ke},stop:function(Le){var Ce=0,ke=Le?ve.tweens.length:0;if(U)return this;for(U=!0;Ce<ke;Ce++)ve.tweens[Ce].run(1);return Le?(he.notifyWith(E,[ve,1,0]),he.resolveWith(E,[ve,Le])):he.rejectWith(E,[ve,Le]),this}}),Ae=ve.props;for(my(Ae,ve.opts.specialEasing);V<q;V++)if(N=ci.prefilters[V].call(ve,E,Ae,ve.opts),N)return p(N.stop)&&(b._queueHooks(ve.elem,ve.opts.queue).stop=N.stop.bind(N)),N;return b.map(Ae,w2,ve),p(ve.opts.start)&&ve.opts.start.call(E,ve),ve.progress(ve.opts.progress).done(ve.opts.done,ve.opts.complete).fail(ve.opts.fail).always(ve.opts.always),b.fx.timer(b.extend(ge,{elem:E,anim:ve,queue:ve.opts.queue})),ve}b.Animation=b.extend(ci,{tweeners:{"*":[function(E,L){var I=this.createTween(E,L);return At(I.elem,E,Te.exec(L),I),I}]},tweener:function(E,L){p(E)?(L=E,E=["*"]):E=E.match(ie);for(var I,N=0,U=E.length;N<U;N++)I=E[N],ci.tweeners[I]=ci.tweeners[I]||[],ci.tweeners[I].unshift(L)},prefilters:[fy],prefilter:function(E,L){L?ci.prefilters.unshift(E):ci.prefilters.push(E)}}),b.speed=function(E,L,I){var N=E&&typeof E=="object"?b.extend({},E):{complete:I||!I&&L||p(E)&&E,duration:E,easing:I&&L||L&&!p(L)&&L};return b.fx.off?N.duration=0:typeof N.duration!="number"&&(N.duration in b.fx.speeds?N.duration=b.fx.speeds[N.duration]:N.duration=b.fx.speeds._default),(N.queue==null||N.queue===!0)&&(N.queue="fx"),N.old=N.complete,N.complete=function(){p(N.old)&&N.old.call(this),N.queue&&b.dequeue(this,N.queue)},N},b.fn.extend({fadeTo:function(E,L,I,N){return this.filter(qt).css("opacity",0).show().end().animate({opacity:L},E,I,N)},animate:function(E,L,I,N){var U=b.isEmptyObject(E),V=b.speed(L,I,N),q=function(){var he=ci(this,b.extend({},E),V);(U||$.get(this,"finish"))&&he.stop(!0)};return q.finish=q,U||V.queue===!1?this.each(q):this.queue(V.queue,q)},stop:function(E,L,I){var N=function(U){var V=U.stop;delete U.stop,V(I)};return typeof E!="string"&&(I=L,L=E,E=void 0),L&&this.queue(E||"fx",[]),this.each(function(){var U=!0,V=E!=null&&E+"queueHooks",q=b.timers,he=$.get(this);if(V)he[V]&&he[V].stop&&N(he[V]);else for(V in he)he[V]&&he[V].stop&&py.test(V)&&N(he[V]);for(V=q.length;V--;)q[V].elem===this&&(E==null||q[V].queue===E)&&(q[V].anim.stop(I),U=!1,q.splice(V,1));(U||!I)&&b.dequeue(this,E)})},finish:function(E){return E!==!1&&(E=E||"fx"),this.each(function(){var L,I=$.get(this),N=I[E+"queue"],U=I[E+"queueHooks"],V=b.timers,q=N?N.length:0;for(I.finish=!0,b.queue(this,E,[]),U&&U.stop&&U.stop.call(this,!0),L=V.length;L--;)V[L].elem===this&&V[L].queue===E&&(V[L].anim.stop(!0),V.splice(L,1));for(L=0;L<q;L++)N[L]&&N[L].finish&&N[L].finish.call(this);delete I.finish})}}),b.each(["toggle","show","hide"],function(E,L){var I=b.fn[L];b.fn[L]=function(N,U,V){return N==null||typeof N=="boolean"?I.apply(this,arguments):this.animate(Qn(L,!0),N,U,V)}}),b.each({slideDown:Qn("show"),slideUp:Qn("hide"),slideToggle:Qn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(E,L){b.fn[E]=function(I,N,U){return this.animate(L,I,N,U)}}),b.timers=[],b.fx.tick=function(){var E,L=0,I=b.timers;for(Is=Date.now();L<I.length;L++)E=I[L],!E()&&I[L]===E&&I.splice(L--,1);I.length||b.fx.stop(),Is=void 0},b.fx.timer=function(E){b.timers.push(E),b.fx.start()},b.fx.interval=13,b.fx.start=function(){Zn||(Zn=!0,cl())},b.fx.stop=function(){Zn=null},b.fx.speeds={slow:600,fast:200,_default:400},b.fn.delay=function(E,L){return E=b.fx&&b.fx.speeds[E]||E,L=L||"fx",this.queue(L,function(I,N){var U=e.setTimeout(I,E);N.stop=function(){e.clearTimeout(U)}})},function(){var E=m.createElement("input"),L=m.createElement("select"),I=L.appendChild(m.createElement("option"));E.type="checkbox",F.checkOn=E.value!=="",F.optSelected=I.selected,E=m.createElement("input"),E.value="t",E.type="radio",F.radioValue=E.value==="t"}();var y2,Iu=b.expr.attrHandle;b.fn.extend({attr:function(E,L){return ae(this,b.attr,E,L,arguments.length>1)},removeAttr:function(E){return this.each(function(){b.removeAttr(this,E)})}}),b.extend({attr:function(E,L,I){var N,U,V=E.nodeType;if(!(V===3||V===8||V===2)){if(typeof E.getAttribute>"u")return b.prop(E,L,I);if((V!==1||!b.isXMLDoc(E))&&(U=b.attrHooks[L.toLowerCase()]||(b.expr.match.bool.test(L)?y2:void 0)),I!==void 0){if(I===null){b.removeAttr(E,L);return}return U&&"set"in U&&(N=U.set(E,I,L))!==void 0?N:(E.setAttribute(L,I+""),I)}return U&&"get"in U&&(N=U.get(E,L))!==null?N:(N=b.find.attr(E,L),N??void 0)}},attrHooks:{type:{set:function(E,L){if(!F.radioValue&&L==="radio"&&S(E,"input")){var I=E.value;return E.setAttribute("type",L),I&&(E.value=I),L}}}},removeAttr:function(E,L){var I,N=0,U=L&&L.match(ie);if(U&&E.nodeType===1)for(;I=U[N++];)E.removeAttribute(I)}}),y2={set:function(E,L,I){return L===!1?b.removeAttr(E,I):E.setAttribute(I,I),I}},b.each(b.expr.match.bool.source.match(/\w+/g),function(E,L){var I=Iu[L]||b.find.attr;Iu[L]=function(N,U,V){var q,he,ge=U.toLowerCase();return V||(he=Iu[ge],Iu[ge]=q,q=I(N,U,V)!=null?ge:null,Iu[ge]=he),q}});var vy=/^(?:input|select|textarea|button)$/i,by=/^(?:a|area)$/i;b.fn.extend({prop:function(E,L){return ae(this,b.prop,E,L,arguments.length>1)},removeProp:function(E){return this.each(function(){delete this[b.propFix[E]||E]})}}),b.extend({prop:function(E,L,I){var N,U,V=E.nodeType;if(!(V===3||V===8||V===2))return(V!==1||!b.isXMLDoc(E))&&(L=b.propFix[L]||L,U=b.propHooks[L]),I!==void 0?U&&"set"in U&&(N=U.set(E,I,L))!==void 0?N:E[L]=I:U&&"get"in U&&(N=U.get(E,L))!==null?N:E[L]},propHooks:{tabIndex:{get:function(E){var L=b.find.attr(E,"tabindex");return L?parseInt(L,10):vy.test(E.nodeName)||by.test(E.nodeName)&&E.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),F.optSelected||(b.propHooks.selected={get:function(E){var L=E.parentNode;return L&&L.parentNode&&L.parentNode.selectedIndex,null},set:function(E){var L=E.parentNode;L&&(L.selectedIndex,L.parentNode&&L.parentNode.selectedIndex)}}),b.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){b.propFix[this.toLowerCase()]=this});function R0(E){var L=E.match(ie)||[];return L.join(" ")}function B0(E){return E.getAttribute&&E.getAttribute("class")||""}function dl(E){return Array.isArray(E)?E:typeof E=="string"?E.match(ie)||[]:[]}b.fn.extend({addClass:function(E){var L,I,N,U,V,q,he,ge=0;if(p(E))return this.each(function(ve){b(this).addClass(E.call(this,ve,B0(this)))});if(L=dl(E),L.length){for(;I=this[ge++];)if(U=B0(I),N=I.nodeType===1&&" "+R0(U)+" ",N){for(q=0;V=L[q++];)N.indexOf(" "+V+" ")<0&&(N+=V+" ");he=R0(N),U!==he&&I.setAttribute("class",he)}}return this},removeClass:function(E){var L,I,N,U,V,q,he,ge=0;if(p(E))return this.each(function(ve){b(this).removeClass(E.call(this,ve,B0(this)))});if(!arguments.length)return this.attr("class","");if(L=dl(E),L.length){for(;I=this[ge++];)if(U=B0(I),N=I.nodeType===1&&" "+R0(U)+" ",N){for(q=0;V=L[q++];)for(;N.indexOf(" "+V+" ")>-1;)N=N.replace(" "+V+" "," ");he=R0(N),U!==he&&I.setAttribute("class",he)}}return this},toggleClass:function(E,L){var I=typeof E,N=I==="string"||Array.isArray(E);return typeof L=="boolean"&&N?L?this.addClass(E):this.removeClass(E):p(E)?this.each(function(U){b(this).toggleClass(E.call(this,U,B0(this),L),L)}):this.each(function(){var U,V,q,he;if(N)for(V=0,q=b(this),he=dl(E);U=he[V++];)q.hasClass(U)?q.removeClass(U):q.addClass(U);else(E===void 0||I==="boolean")&&(U=B0(this),U&&$.set(this,"__className__",U),this.setAttribute&&this.setAttribute("class",U||E===!1?"":$.get(this,"__className__")||""))})},hasClass:function(E){var L,I,N=0;for(L=" "+E+" ";I=this[N++];)if(I.nodeType===1&&(" "+R0(B0(I))+" ").indexOf(L)>-1)return!0;return!1}});var wy=/\r/g;b.fn.extend({val:function(E){var L,I,N,U=this[0];return arguments.length?(N=p(E),this.each(function(V){var q;this.nodeType===1&&(N?q=E.call(this,V,b(this).val()):q=E,q==null?q="":typeof q=="number"?q+="":Array.isArray(q)&&(q=b.map(q,function(he){return he==null?"":he+""})),L=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],(!L||!("set"in L)||L.set(this,q,"value")===void 0)&&(this.value=q))})):U?(L=b.valHooks[U.type]||b.valHooks[U.nodeName.toLowerCase()],L&&"get"in L&&(I=L.get(U,"value"))!==void 0?I:(I=U.value,typeof I=="string"?I.replace(wy,""):I??"")):void 0}}),b.extend({valHooks:{option:{get:function(E){var L=b.find.attr(E,"value");return L??R0(b.text(E))}},select:{get:function(E){var L,I,N,U=E.options,V=E.selectedIndex,q=E.type==="select-one",he=q?null:[],ge=q?V+1:U.length;for(V<0?N=ge:N=q?V:0;N<ge;N++)if(I=U[N],(I.selected||N===V)&&!I.disabled&&(!I.parentNode.disabled||!S(I.parentNode,"optgroup"))){if(L=b(I).val(),q)return L;he.push(L)}return he},set:function(E,L){for(var I,N,U=E.options,V=b.makeArray(L),q=U.length;q--;)N=U[q],(N.selected=b.inArray(b.valHooks.option.get(N),V)>-1)&&(I=!0);return I||(E.selectedIndex=-1),V}}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]={set:function(E,L){if(Array.isArray(L))return E.checked=b.inArray(b(E).val(),L)>-1}},F.checkOn||(b.valHooks[this].get=function(E){return E.getAttribute("value")===null?"on":E.value})}),F.focusin="onfocusin"in e;var x2=/^(?:focusinfocus|focusoutblur)$/,C2=function(E){E.stopPropagation()};b.extend(b.event,{trigger:function(E,L,I,N){var U,V,q,he,ge,ve,Ae,Le,Ce=[I||m],ke=l.call(E,"type")?E.type:E,Ge=l.call(E,"namespace")?E.namespace.split("."):[];if(V=Le=q=I=I||m,!(I.nodeType===3||I.nodeType===8)&&!x2.test(ke+b.event.triggered)&&(ke.indexOf(".")>-1&&(Ge=ke.split("."),ke=Ge.shift(),Ge.sort()),ge=ke.indexOf(":")<0&&"on"+ke,E=E[b.expando]?E:new b.Event(ke,typeof E=="object"&&E),E.isTrigger=N?2:3,E.namespace=Ge.join("."),E.rnamespace=E.namespace?new RegExp("(^|\\.)"+Ge.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,E.result=void 0,E.target||(E.target=I),L=L==null?[E]:b.makeArray(L,[E]),Ae=b.event.special[ke]||{},!(!N&&Ae.trigger&&Ae.trigger.apply(I,L)===!1))){if(!N&&!Ae.noBubble&&!f(I)){for(he=Ae.delegateType||ke,x2.test(he+ke)||(V=V.parentNode);V;V=V.parentNode)Ce.push(V),q=V;q===(I.ownerDocument||m)&&Ce.push(q.defaultView||q.parentWindow||e)}for(U=0;(V=Ce[U++])&&!E.isPropagationStopped();)Le=V,E.type=U>1?he:Ae.bindType||ke,ve=($.get(V,"events")||Object.create(null))[E.type]&&$.get(V,"handle"),ve&&ve.apply(V,L),ve=ge&&V[ge],ve&&ve.apply&&W(V)&&(E.result=ve.apply(V,L),E.result===!1&&E.preventDefault());return E.type=ke,!N&&!E.isDefaultPrevented()&&(!Ae._default||Ae._default.apply(Ce.pop(),L)===!1)&&W(I)&&ge&&p(I[ke])&&!f(I)&&(q=I[ge],q&&(I[ge]=null),b.event.triggered=ke,E.isPropagationStopped()&&Le.addEventListener(ke,C2),I[ke](),E.isPropagationStopped()&&Le.removeEventListener(ke,C2),b.event.triggered=void 0,q&&(I[ge]=q)),E.result}},simulate:function(E,L,I){var N=b.extend(new b.Event,I,{type:E,isSimulated:!0});b.event.trigger(N,null,L)}}),b.fn.extend({trigger:function(E,L){return this.each(function(){b.event.trigger(E,L,this)})},triggerHandler:function(E,L){var I=this[0];if(I)return b.event.trigger(E,L,I,!0)}}),F.focusin||b.each({focus:"focusin",blur:"focusout"},function(E,L){var I=function(N){b.event.simulate(L,N.target,b.event.fix(N))};b.event.special[L]={setup:function(){var N=this.ownerDocument||this.document||this,U=$.access(N,L);U||N.addEventListener(E,I,!0),$.access(N,L,(U||0)+1)},teardown:function(){var N=this.ownerDocument||this.document||this,U=$.access(N,L)-1;U?$.access(N,L,U):(N.removeEventListener(E,I,!0),$.remove(N,L))}}});var Ru=e.location,E2={guid:Date.now()},hl=/\?/;b.parseXML=function(E){var L;if(!E||typeof E!="string")return null;try{L=new e.DOMParser().parseFromString(E,"text/xml")}catch{L=void 0}return(!L||L.getElementsByTagName("parsererror").length)&&b.error("Invalid XML: "+E),L};var yy=/\[\]$/,A2=/\r?\n/g,xy=/^(?:submit|button|image|reset|file)$/i,Cy=/^(?:input|select|textarea|keygen)/i;function gl(E,L,I,N){var U;if(Array.isArray(L))b.each(L,function(V,q){I||yy.test(E)?N(E,q):gl(E+"["+(typeof q=="object"&&q!=null?V:"")+"]",q,I,N)});else if(!I&&x(L)==="object")for(U in L)gl(E+"["+U+"]",L[U],I,N);else N(E,L)}b.param=function(E,L){var I,N=[],U=function(V,q){var he=p(q)?q():q;N[N.length]=encodeURIComponent(V)+"="+encodeURIComponent(he??"")};if(E==null)return"";if(Array.isArray(E)||E.jquery&&!b.isPlainObject(E))b.each(E,function(){U(this.name,this.value)});else for(I in E)gl(I,E[I],L,U);return N.join("&")},b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var E=b.prop(this,"elements");return E?b.makeArray(E):this}).filter(function(){var E=this.type;return this.name&&!b(this).is(":disabled")&&Cy.test(this.nodeName)&&!xy.test(E)&&(this.checked||!Kr.test(E))}).map(function(E,L){var I=b(this).val();return I==null?null:Array.isArray(I)?b.map(I,function(N){return{name:L.name,value:N.replace(A2,`\r
`)}}):{name:L.name,value:I.replace(A2,`\r
`)}}).get()}});var Ey=/%20/g,Ay=/#.*$/,ky=/([?&])_=[^&]*/,Sy=/^(.*?):[ \t]*([^\r\n]*)$/mg,jy=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Dy=/^(?:GET|HEAD)$/,My=/^\/\//,k2={},Fl={},S2="*/".concat("*"),pl=m.createElement("a");pl.href=Ru.href;function j2(E){return function(L,I){typeof L!="string"&&(I=L,L="*");var N,U=0,V=L.toLowerCase().match(ie)||[];if(p(I))for(;N=V[U++];)N[0]==="+"?(N=N.slice(1)||"*",(E[N]=E[N]||[]).unshift(I)):(E[N]=E[N]||[]).push(I)}}function D2(E,L,I,N){var U={},V=E===Fl;function q(he){var ge;return U[he]=!0,b.each(E[he]||[],function(ve,Ae){var Le=Ae(L,I,N);if(typeof Le=="string"&&!V&&!U[Le])return L.dataTypes.unshift(Le),q(Le),!1;if(V)return!(ge=Le)}),ge}return q(L.dataTypes[0])||!U["*"]&&q("*")}function fl(E,L){var I,N,U=b.ajaxSettings.flatOptions||{};for(I in L)L[I]!==void 0&&((U[I]?E:N||(N={}))[I]=L[I]);return N&&b.extend(!0,E,N),E}function _y(E,L,I){for(var N,U,V,q,he=E.contents,ge=E.dataTypes;ge[0]==="*";)ge.shift(),N===void 0&&(N=E.mimeType||L.getResponseHeader("Content-Type"));if(N){for(U in he)if(he[U]&&he[U].test(N)){ge.unshift(U);break}}if(ge[0]in I)V=ge[0];else{for(U in I){if(!ge[0]||E.converters[U+" "+ge[0]]){V=U;break}q||(q=U)}V=V||q}if(V)return V!==ge[0]&&ge.unshift(V),I[V]}function Ly(E,L,I,N){var U,V,q,he,ge,ve={},Ae=E.dataTypes.slice();if(Ae[1])for(q in E.converters)ve[q.toLowerCase()]=E.converters[q];for(V=Ae.shift();V;)if(E.responseFields[V]&&(I[E.responseFields[V]]=L),!ge&&N&&E.dataFilter&&(L=E.dataFilter(L,E.dataType)),ge=V,V=Ae.shift(),V){if(V==="*")V=ge;else if(ge!=="*"&&ge!==V){if(q=ve[ge+" "+V]||ve["* "+V],!q){for(U in ve)if(he=U.split(" "),he[1]===V&&(q=ve[ge+" "+he[0]]||ve["* "+he[0]],q)){q===!0?q=ve[U]:ve[U]!==!0&&(V=he[0],Ae.unshift(he[1]));break}}if(q!==!0)if(q&&E.throws)L=q(L);else try{L=q(L)}catch(Le){return{state:"parsererror",error:q?Le:"No conversion from "+ge+" to "+V}}}}return{state:"success",data:L}}b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ru.href,type:"GET",isLocal:jy.test(Ru.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":S2,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(E,L){return L?fl(fl(E,b.ajaxSettings),L):fl(b.ajaxSettings,E)},ajaxPrefilter:j2(k2),ajaxTransport:j2(Fl),ajax:function(E,L){typeof E=="object"&&(L=E,E=void 0),L=L||{};var I,N,U,V,q,he,ge,ve,Ae,Le,Ce=b.ajaxSetup({},L),ke=Ce.context||Ce,Ge=Ce.context&&(ke.nodeType||ke.jquery)?b(ke):b.event,ot=b.Deferred(),qe=b.Callbacks("once memory"),rr=Ce.statusCode||{},Zt={},Br={},kt="canceled",nt={readyState:0,getResponseHeader:function(bt){var Wt;if(ge){if(!V)for(V={};Wt=Sy.exec(U);)V[Wt[1].toLowerCase()+" "]=(V[Wt[1].toLowerCase()+" "]||[]).concat(Wt[2]);Wt=V[bt.toLowerCase()+" "]}return Wt==null?null:Wt.join(", ")},getAllResponseHeaders:function(){return ge?U:null},setRequestHeader:function(bt,Wt){return ge==null&&(bt=Br[bt.toLowerCase()]=Br[bt.toLowerCase()]||bt,Zt[bt]=Wt),this},overrideMimeType:function(bt){return ge==null&&(Ce.mimeType=bt),this},statusCode:function(bt){var Wt;if(bt)if(ge)nt.always(bt[nt.status]);else for(Wt in bt)rr[Wt]=[rr[Wt],bt[Wt]];return this},abort:function(bt){var Wt=bt||kt;return I&&I.abort(Wt),Dr(0,Wt),this}};if(ot.promise(nt),Ce.url=((E||Ce.url||Ru.href)+"").replace(My,Ru.protocol+"//"),Ce.type=L.method||L.type||Ce.method||Ce.type,Ce.dataTypes=(Ce.dataType||"*").toLowerCase().match(ie)||[""],Ce.crossDomain==null){he=m.createElement("a");try{he.href=Ce.url,he.href=he.href,Ce.crossDomain=pl.protocol+"//"+pl.host!=he.protocol+"//"+he.host}catch{Ce.crossDomain=!0}}if(Ce.data&&Ce.processData&&typeof Ce.data!="string"&&(Ce.data=b.param(Ce.data,Ce.traditional)),D2(k2,Ce,L,nt),ge)return nt;ve=b.event&&Ce.global,ve&&b.active++===0&&b.event.trigger("ajaxStart"),Ce.type=Ce.type.toUpperCase(),Ce.hasContent=!Dy.test(Ce.type),N=Ce.url.replace(Ay,""),Ce.hasContent?Ce.data&&Ce.processData&&(Ce.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Ce.data=Ce.data.replace(Ey,"+")):(Le=Ce.url.slice(N.length),Ce.data&&(Ce.processData||typeof Ce.data=="string")&&(N+=(hl.test(N)?"&":"?")+Ce.data,delete Ce.data),Ce.cache===!1&&(N=N.replace(ky,"$1"),Le=(hl.test(N)?"&":"?")+"_="+E2.guid+++Le),Ce.url=N+Le),Ce.ifModified&&(b.lastModified[N]&&nt.setRequestHeader("If-Modified-Since",b.lastModified[N]),b.etag[N]&&nt.setRequestHeader("If-None-Match",b.etag[N])),(Ce.data&&Ce.hasContent&&Ce.contentType!==!1||L.contentType)&&nt.setRequestHeader("Content-Type",Ce.contentType),nt.setRequestHeader("Accept",Ce.dataTypes[0]&&Ce.accepts[Ce.dataTypes[0]]?Ce.accepts[Ce.dataTypes[0]]+(Ce.dataTypes[0]!=="*"?", "+S2+"; q=0.01":""):Ce.accepts["*"]);for(Ae in Ce.headers)nt.setRequestHeader(Ae,Ce.headers[Ae]);if(Ce.beforeSend&&(Ce.beforeSend.call(ke,nt,Ce)===!1||ge))return nt.abort();if(kt="abort",qe.add(Ce.complete),nt.done(Ce.success),nt.fail(Ce.error),I=D2(Fl,Ce,L,nt),!I)Dr(-1,"No Transport");else{if(nt.readyState=1,ve&&Ge.trigger("ajaxSend",[nt,Ce]),ge)return nt;Ce.async&&Ce.timeout>0&&(q=e.setTimeout(function(){nt.abort("timeout")},Ce.timeout));try{ge=!1,I.send(Zt,Dr)}catch(bt){if(ge)throw bt;Dr(-1,bt)}}function Dr(bt,Wt,Ou,eo){var Or,O0,N0,Mr,t0,Jr=Wt;ge||(ge=!0,q&&e.clearTimeout(q),I=void 0,U=eo||"",nt.readyState=bt>0?4:0,Or=bt>=200&&bt<300||bt===304,Ou&&(Mr=_y(Ce,nt,Ou)),!Or&&b.inArray("script",Ce.dataTypes)>-1&&(Ce.converters["text script"]=function(){}),Mr=Ly(Ce,Mr,nt,Or),Or?(Ce.ifModified&&(t0=nt.getResponseHeader("Last-Modified"),t0&&(b.lastModified[N]=t0),t0=nt.getResponseHeader("etag"),t0&&(b.etag[N]=t0)),bt===204||Ce.type==="HEAD"?Jr="nocontent":bt===304?Jr="notmodified":(Jr=Mr.state,O0=Mr.data,N0=Mr.error,Or=!N0)):(N0=Jr,(bt||!Jr)&&(Jr="error",bt<0&&(bt=0))),nt.status=bt,nt.statusText=(Wt||Jr)+"",Or?ot.resolveWith(ke,[O0,Jr,nt]):ot.rejectWith(ke,[nt,Jr,N0]),nt.statusCode(rr),rr=void 0,ve&&Ge.trigger(Or?"ajaxSuccess":"ajaxError",[nt,Ce,Or?O0:N0]),qe.fireWith(ke,[nt,Jr]),ve&&(Ge.trigger("ajaxComplete",[nt,Ce]),--b.active||b.event.trigger("ajaxStop")))}return nt},getJSON:function(E,L,I){return b.get(E,L,I,"json")},getScript:function(E,L){return b.get(E,void 0,L,"script")}}),b.each(["get","post"],function(E,L){b[L]=function(I,N,U,V){return p(N)&&(V=V||U,U=N,N=void 0),b.ajax(b.extend({url:I,type:L,dataType:V,data:N,success:U},b.isPlainObject(I)&&I))}}),b.ajaxPrefilter(function(E){var L;for(L in E.headers)L.toLowerCase()==="content-type"&&(E.contentType=E.headers[L]||"")}),b._evalUrl=function(E,L,I){return b.ajax({url:E,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(N){b.globalEval(N,L,I)}})},b.fn.extend({wrapAll:function(E){var L;return this[0]&&(p(E)&&(E=E.call(this[0])),L=b(E,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&L.insertBefore(this[0]),L.map(function(){for(var I=this;I.firstElementChild;)I=I.firstElementChild;return I}).append(this)),this},wrapInner:function(E){return p(E)?this.each(function(L){b(this).wrapInner(E.call(this,L))}):this.each(function(){var L=b(this),I=L.contents();I.length?I.wrapAll(E):L.append(E)})},wrap:function(E){var L=p(E);return this.each(function(I){b(this).wrapAll(L?E.call(this,I):E)})},unwrap:function(E){return this.parent(E).not("body").each(function(){b(this).replaceWith(this.childNodes)}),this}}),b.expr.pseudos.hidden=function(E){return!b.expr.pseudos.visible(E)},b.expr.pseudos.visible=function(E){return!!(E.offsetWidth||E.offsetHeight||E.getClientRects().length)},b.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch{}};var Ty={0:200,1223:204},Bu=b.ajaxSettings.xhr();F.cors=!!Bu&&"withCredentials"in Bu,F.ajax=Bu=!!Bu,b.ajaxTransport(function(E){var L,I;if(F.cors||Bu&&!E.crossDomain)return{send:function(N,U){var V,q=E.xhr();if(q.open(E.type,E.url,E.async,E.username,E.password),E.xhrFields)for(V in E.xhrFields)q[V]=E.xhrFields[V];E.mimeType&&q.overrideMimeType&&q.overrideMimeType(E.mimeType),!E.crossDomain&&!N["X-Requested-With"]&&(N["X-Requested-With"]="XMLHttpRequest");for(V in N)q.setRequestHeader(V,N[V]);L=function(he){return function(){L&&(L=I=q.onload=q.onerror=q.onabort=q.ontimeout=q.onreadystatechange=null,he==="abort"?q.abort():he==="error"?typeof q.status!="number"?U(0,"error"):U(q.status,q.statusText):U(Ty[q.status]||q.status,q.statusText,(q.responseType||"text")!=="text"||typeof q.responseText!="string"?{binary:q.response}:{text:q.responseText},q.getAllResponseHeaders()))}},q.onload=L(),I=q.onerror=q.ontimeout=L("error"),q.onabort!==void 0?q.onabort=I:q.onreadystatechange=function(){q.readyState===4&&e.setTimeout(function(){L&&I()})},L=L("abort");try{q.send(E.hasContent&&E.data||null)}catch(he){if(L)throw he}},abort:function(){L&&L()}}}),b.ajaxPrefilter(function(E){E.crossDomain&&(E.contents.script=!1)}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(E){return b.globalEval(E),E}}}),b.ajaxPrefilter("script",function(E){E.cache===void 0&&(E.cache=!1),E.crossDomain&&(E.type="GET")}),b.ajaxTransport("script",function(E){if(E.crossDomain||E.scriptAttrs){var L,I;return{send:function(N,U){L=b("<script>").attr(E.scriptAttrs||{}).prop({charset:E.scriptCharset,src:E.url}).on("load error",I=function(V){L.remove(),I=null,V&&U(V.type==="error"?404:200,V.type)}),m.head.appendChild(L[0])},abort:function(){I&&I()}}}});var M2=[],ml=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var E=M2.pop()||b.expando+"_"+E2.guid++;return this[E]=!0,E}}),b.ajaxPrefilter("json jsonp",function(E,L,I){var N,U,V,q=E.jsonp!==!1&&(ml.test(E.url)?"url":typeof E.data=="string"&&(E.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&ml.test(E.data)&&"data");if(q||E.dataTypes[0]==="jsonp")return N=E.jsonpCallback=p(E.jsonpCallback)?E.jsonpCallback():E.jsonpCallback,q?E[q]=E[q].replace(ml,"$1"+N):E.jsonp!==!1&&(E.url+=(hl.test(E.url)?"&":"?")+E.jsonp+"="+N),E.converters["script json"]=function(){return V||b.error(N+" was not called"),V[0]},E.dataTypes[0]="json",U=e[N],e[N]=function(){V=arguments},I.always(function(){U===void 0?b(e).removeProp(N):e[N]=U,E[N]&&(E.jsonpCallback=L.jsonpCallback,M2.push(N)),V&&p(U)&&U(V[0]),V=U=void 0}),"script"}),F.createHTMLDocument=function(){var E=m.implementation.createHTMLDocument("").body;return E.innerHTML="<form></form><form></form>",E.childNodes.length===2}(),b.parseHTML=function(E,L,I){if(typeof E!="string")return[];typeof L=="boolean"&&(I=L,L=!1);var N,U,V;return L||(F.createHTMLDocument?(L=m.implementation.createHTMLDocument(""),N=L.createElement("base"),N.href=m.location.href,L.head.appendChild(N)):L=m),U=M.exec(E),V=!I&&[],U?[L.createElement(U[1])]:(U=P0([E],L,V),V&&V.length&&b(V).remove(),b.merge([],U.childNodes))},b.fn.load=function(E,L,I){var N,U,V,q=this,he=E.indexOf(" ");return he>-1&&(N=R0(E.slice(he)),E=E.slice(0,he)),p(L)?(I=L,L=void 0):L&&typeof L=="object"&&(U="POST"),q.length>0&&b.ajax({url:E,type:U||"GET",dataType:"html",data:L}).done(function(ge){V=arguments,q.html(N?b("<div>").append(b.parseHTML(ge)).find(N):ge)}).always(I&&function(ge,ve){q.each(function(){I.apply(this,V||[ge.responseText,ve,ge])})}),this},b.expr.pseudos.animated=function(E){return b.grep(b.timers,function(L){return E===L.elem}).length},b.offset={setOffset:function(E,L,I){var N,U,V,q,he,ge,ve,Ae=b.css(E,"position"),Le=b(E),Ce={};Ae==="static"&&(E.style.position="relative"),he=Le.offset(),V=b.css(E,"top"),ge=b.css(E,"left"),ve=(Ae==="absolute"||Ae==="fixed")&&(V+ge).indexOf("auto")>-1,ve?(N=Le.position(),q=N.top,U=N.left):(q=parseFloat(V)||0,U=parseFloat(ge)||0),p(L)&&(L=L.call(E,I,b.extend({},he))),L.top!=null&&(Ce.top=L.top-he.top+q),L.left!=null&&(Ce.left=L.left-he.left+U),"using"in L?L.using.call(E,Ce):(typeof Ce.top=="number"&&(Ce.top+="px"),typeof Ce.left=="number"&&(Ce.left+="px"),Le.css(Ce))}},b.fn.extend({offset:function(E){if(arguments.length)return E===void 0?this:this.each(function(U){b.offset.setOffset(this,E,U)});var L,I,N=this[0];if(N)return N.getClientRects().length?(L=N.getBoundingClientRect(),I=N.ownerDocument.defaultView,{top:L.top+I.pageYOffset,left:L.left+I.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var E,L,I,N=this[0],U={top:0,left:0};if(b.css(N,"position")==="fixed")L=N.getBoundingClientRect();else{for(L=this.offset(),I=N.ownerDocument,E=N.offsetParent||I.documentElement;E&&(E===I.body||E===I.documentElement)&&b.css(E,"position")==="static";)E=E.parentNode;E&&E!==N&&E.nodeType===1&&(U=b(E).offset(),U.top+=b.css(E,"borderTopWidth",!0),U.left+=b.css(E,"borderLeftWidth",!0))}return{top:L.top-U.top-b.css(N,"marginTop",!0),left:L.left-U.left-b.css(N,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var E=this.offsetParent;E&&b.css(E,"position")==="static";)E=E.offsetParent;return E||Re})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(E,L){var I=L==="pageYOffset";b.fn[E]=function(N){return ae(this,function(U,V,q){var he;if(f(U)?he=U:U.nodeType===9&&(he=U.defaultView),q===void 0)return he?he[L]:U[V];he?he.scrollTo(I?he.pageXOffset:q,I?q:he.pageYOffset):U[V]=q},E,N,arguments.length)}}),b.each(["top","left"],function(E,L){b.cssHooks[L]=d2(F.pixelPosition,function(I,N){if(N)return N=$u(I,L),ol.test(N)?b(I).position()[L]+"px":N})}),b.each({Height:"height",Width:"width"},function(E,L){b.each({padding:"inner"+E,content:L,"":"outer"+E},function(I,N){b.fn[N]=function(U,V){var q=arguments.length&&(I||typeof U!="boolean"),he=I||(U===!0||V===!0?"margin":"border");return ae(this,function(ge,ve,Ae){var Le;return f(ge)?N.indexOf("outer")===0?ge["inner"+E]:ge.document.documentElement["client"+E]:ge.nodeType===9?(Le=ge.documentElement,Math.max(ge.body["scroll"+E],Le["scroll"+E],ge.body["offset"+E],Le["offset"+E],Le["client"+E])):Ae===void 0?b.css(ge,ve,he):b.style(ge,ve,Ae,he)},L,q?U:void 0,q)}})}),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(E,L){b.fn[L]=function(I){return this.on(L,I)}}),b.fn.extend({bind:function(E,L,I){return this.on(E,null,L,I)},unbind:function(E,L){return this.off(E,null,L)},delegate:function(E,L,I,N){return this.on(L,E,I,N)},undelegate:function(E,L,I){return arguments.length===1?this.off(E,"**"):this.off(L,E||"**",I)},hover:function(E,L){return this.mouseenter(E).mouseleave(L||E)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(E,L){b.fn[L]=function(I,N){return arguments.length>0?this.on(L,null,I,N):this.trigger(L)}});var Py=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;b.proxy=function(E,L){var I,N,U;if(typeof L=="string"&&(I=E[L],L=E,E=I),!!p(E))return N=u.call(arguments,2),U=function(){return E.apply(L||this,N.concat(u.call(arguments)))},U.guid=E.guid=E.guid||b.guid++,U},b.holdReady=function(E){E?b.readyWait++:b.ready(!0)},b.isArray=Array.isArray,b.parseJSON=JSON.parse,b.nodeName=S,b.isFunction=p,b.isWindow=f,b.camelCase=Ee,b.type=x,b.now=Date.now,b.isNumeric=function(E){var L=b.type(E);return(L==="number"||L==="string")&&!isNaN(E-parseFloat(E))},b.trim=function(E){return E==null?"":(E+"").replace(Py,"")};var $y=e.jQuery,Iy=e.$;return b.noConflict=function(E){return e.$===b&&(e.$=Iy),E&&e.jQuery===b&&(e.jQuery=$y),b},typeof i>"u"&&(e.jQuery=e.$=b),b})}(kl)),kl.exports}var Qy=vd();const me=ga(Qy);var bd="1.13.6",W2=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},Fa=Array.prototype,wd=Object.prototype,z2=typeof Symbol<"u"?Symbol.prototype:null,e3=Fa.push,Pn=Fa.slice,Fn=wd.toString,t3=wd.hasOwnProperty,gF=typeof ArrayBuffer<"u",r3=typeof DataView<"u",i3=Array.isArray,H2=Object.keys,U2=Object.create,Y2=gF&&ArrayBuffer.isView,s3=isNaN,u3=isFinite,FF=!{toString:null}.propertyIsEnumerable("toString"),V2=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],n3=Math.pow(2,53)-1;function Er(s,e){return e=e==null?s.length-1:+e,function(){for(var i=Math.max(arguments.length-e,0),t=Array(i),r=0;r<i;r++)t[r]=arguments[r+e];switch(e){case 0:return s.call(this,t);case 1:return s.call(this,arguments[0],t);case 2:return s.call(this,arguments[0],arguments[1],t)}var u=Array(e+1);for(r=0;r<e;r++)u[r]=arguments[r];return u[e]=t,s.apply(this,u)}}function C0(s){var e=typeof s;return e==="function"||e==="object"&&!!s}function pF(s){return s===null}function yd(s){return s===void 0}function xd(s){return s===!0||s===!1||Fn.call(s)==="[object Boolean]"}function fF(s){return!!(s&&s.nodeType===1)}function wr(s){var e="[object "+s+"]";return function(i){return Fn.call(i)===e}}const pa=wr("String"),Cd=wr("Number"),mF=wr("Date"),vF=wr("RegExp"),bF=wr("Error"),Ed=wr("Symbol"),Ad=wr("ArrayBuffer");var wF=wr("Function"),o3=W2.document&&W2.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof o3!="function"&&(wF=function(s){return typeof s=="function"||!1});const vr=wF,yF=wr("Object");var xF=r3&&yF(new DataView(new ArrayBuffer(8))),kd=typeof Map<"u"&&yF(new Map),a3=wr("DataView");function l3(s){return s!=null&&vr(s.getInt8)&&Ad(s.buffer)}const pn=xF?l3:a3,E0=i3||wr("Array");function A0(s,e){return s!=null&&t3.call(s,e)}var vc=wr("Arguments");(function(){vc(arguments)||(vc=function(s){return A0(s,"callee")})})();const fa=vc;function CF(s){return!Ed(s)&&u3(s)&&!isNaN(parseFloat(s))}function Sd(s){return Cd(s)&&s3(s)}function jd(s){return function(){return s}}function EF(s){return function(e){var i=s(e);return typeof i=="number"&&i>=0&&i<=n3}}function AF(s){return function(e){return e==null?void 0:e[s]}}const zo=AF("byteLength"),c3=EF(zo);var d3=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function h3(s){return Y2?Y2(s)&&!pn(s):c3(s)&&d3.test(Fn.call(s))}const Dd=gF?h3:jd(!1),$r=AF("length");function g3(s){for(var e={},i=s.length,t=0;t<i;++t)e[s[t]]=!0;return{contains:function(r){return e[r]===!0},push:function(r){return e[r]=!0,s.push(r)}}}function kF(s,e){e=g3(e);var i=V2.length,t=s.constructor,r=vr(t)&&t.prototype||wd,u="constructor";for(A0(s,u)&&!e.contains(u)&&e.push(u);i--;)u=V2[i],u in s&&s[u]!==r[u]&&!e.contains(u)&&e.push(u)}function or(s){if(!C0(s))return[];if(H2)return H2(s);var e=[];for(var i in s)A0(s,i)&&e.push(i);return FF&&kF(s,e),e}function SF(s){if(s==null)return!0;var e=$r(s);return typeof e=="number"&&(E0(s)||pa(s)||fa(s))?e===0:$r(or(s))===0}function Md(s,e){var i=or(e),t=i.length;if(s==null)return!t;for(var r=Object(s),u=0;u<t;u++){var n=i[u];if(e[n]!==r[n]||!(n in r))return!1}return!0}function Ct(s){if(s instanceof Ct)return s;if(!(this instanceof Ct))return new Ct(s);this._wrapped=s}Ct.VERSION=bd;Ct.prototype.value=function(){return this._wrapped};Ct.prototype.valueOf=Ct.prototype.toJSON=Ct.prototype.value;Ct.prototype.toString=function(){return String(this._wrapped)};function X2(s){return new Uint8Array(s.buffer||s,s.byteOffset||0,zo(s))}var G2="[object DataView]";function bc(s,e,i,t){if(s===e)return s!==0||1/s===1/e;if(s==null||e==null)return!1;if(s!==s)return e!==e;var r=typeof s;return r!=="function"&&r!=="object"&&typeof e!="object"?!1:jF(s,e,i,t)}function jF(s,e,i,t){s instanceof Ct&&(s=s._wrapped),e instanceof Ct&&(e=e._wrapped);var r=Fn.call(s);if(r!==Fn.call(e))return!1;if(xF&&r=="[object Object]"&&pn(s)){if(!pn(e))return!1;r=G2}switch(r){case"[object RegExp]":case"[object String]":return""+s==""+e;case"[object Number]":return+s!=+s?+e!=+e:+s==0?1/+s===1/e:+s==+e;case"[object Date]":case"[object Boolean]":return+s==+e;case"[object Symbol]":return z2.valueOf.call(s)===z2.valueOf.call(e);case"[object ArrayBuffer]":case G2:return jF(X2(s),X2(e),i,t)}var u=r==="[object Array]";if(!u&&Dd(s)){var n=zo(s);if(n!==zo(e))return!1;if(s.buffer===e.buffer&&s.byteOffset===e.byteOffset)return!0;u=!0}if(!u){if(typeof s!="object"||typeof e!="object")return!1;var a=s.constructor,o=e.constructor;if(a!==o&&!(vr(a)&&a instanceof a&&vr(o)&&o instanceof o)&&"constructor"in s&&"constructor"in e)return!1}i=i||[],t=t||[];for(var h=i.length;h--;)if(i[h]===s)return t[h]===e;if(i.push(s),t.push(e),u){if(h=s.length,h!==e.length)return!1;for(;h--;)if(!bc(s[h],e[h],i,t))return!1}else{var g=or(s),l;if(h=g.length,or(e).length!==h)return!1;for(;h--;)if(l=g[h],!(A0(e,l)&&bc(s[l],e[l],i,t)))return!1}return i.pop(),t.pop(),!0}function DF(s,e){return bc(s,e)}function fu(s){if(!C0(s))return[];var e=[];for(var i in s)e.push(i);return FF&&kF(s,e),e}function _d(s){var e=$r(s);return function(i){if(i==null)return!1;var t=fu(i);if($r(t))return!1;for(var r=0;r<e;r++)if(!vr(i[s[r]]))return!1;return s!==LF||!vr(i[Ld])}}var Ld="forEach",MF="has",Td=["clear","delete"],_F=["get",MF,"set"],F3=Td.concat(Ld,_F),LF=Td.concat(_F),p3=["add"].concat(Td,Ld,MF);const TF=kd?_d(F3):wr("Map"),PF=kd?_d(LF):wr("WeakMap"),$F=kd?_d(p3):wr("Set"),IF=wr("WeakSet");function xs(s){for(var e=or(s),i=e.length,t=Array(i),r=0;r<i;r++)t[r]=s[e[r]];return t}function RF(s){for(var e=or(s),i=e.length,t=Array(i),r=0;r<i;r++)t[r]=[e[r],s[e[r]]];return t}function Pd(s){for(var e={},i=or(s),t=0,r=i.length;t<r;t++)e[s[i[t]]]=i[t];return e}function fn(s){var e=[];for(var i in s)vr(s[i])&&e.push(i);return e.sort()}function $d(s,e){return function(i){var t=arguments.length;if(e&&(i=Object(i)),t<2||i==null)return i;for(var r=1;r<t;r++)for(var u=arguments[r],n=s(u),a=n.length,o=0;o<a;o++){var h=n[o];(!e||i[h]===void 0)&&(i[h]=u[h])}return i}}const Id=$d(fu),su=$d(or),Rd=$d(fu,!0);function f3(){return function(){}}function BF(s){if(!C0(s))return{};if(U2)return U2(s);var e=f3();e.prototype=s;var i=new e;return e.prototype=null,i}function OF(s,e){var i=BF(s);return e&&su(i,e),i}function NF(s){return C0(s)?E0(s)?s.slice():Id({},s):s}function WF(s,e){return e(s),s}function Bd(s){return E0(s)?s:[s]}Ct.toPath=Bd;function $n(s){return Ct.toPath(s)}function Od(s,e){for(var i=e.length,t=0;t<i;t++){if(s==null)return;s=s[e[t]]}return i?s:void 0}function Nd(s,e,i){var t=Od(s,$n(e));return yd(t)?i:t}function zF(s,e){e=$n(e);for(var i=e.length,t=0;t<i;t++){var r=e[t];if(!A0(s,r))return!1;s=s[r]}return!!i}function ma(s){return s}function ps(s){return s=su({},s),function(e){return Md(e,s)}}function va(s){return s=$n(s),function(e){return Od(e,s)}}function In(s,e,i){if(e===void 0)return s;switch(i??3){case 1:return function(t){return s.call(e,t)};case 3:return function(t,r,u){return s.call(e,t,r,u)};case 4:return function(t,r,u,n){return s.call(e,t,r,u,n)}}return function(){return s.apply(e,arguments)}}function HF(s,e,i){return s==null?ma:vr(s)?In(s,e,i):C0(s)&&!E0(s)?ps(s):va(s)}function ba(s,e){return HF(s,e,1/0)}Ct.iteratee=ba;function Ir(s,e,i){return Ct.iteratee!==ba?Ct.iteratee(s,e):HF(s,e,i)}function UF(s,e,i){e=Ir(e,i);for(var t=or(s),r=t.length,u={},n=0;n<r;n++){var a=t[n];u[a]=e(s[a],a,s)}return u}function Wd(){}function YF(s){return s==null?Wd:function(e){return Nd(s,e)}}function VF(s,e,i){var t=Array(Math.max(0,s));e=In(e,i,1);for(var r=0;r<s;r++)t[r]=e(r);return t}function Ho(s,e){return e==null&&(e=s,s=0),s+Math.floor(Math.random()*(e-s+1))}const uu=Date.now||function(){return new Date().getTime()};function XF(s){var e=function(u){return s[u]},i="(?:"+or(s).join("|")+")",t=RegExp(i),r=RegExp(i,"g");return function(u){return u=u==null?"":""+u,t.test(u)?u.replace(r,e):u}}const GF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},qF=XF(GF),m3=Pd(GF),KF=XF(m3),JF=Ct.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Sl=/(.)^/,v3={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},b3=/\\|'|\r|\n|\u2028|\u2029/g;function w3(s){return"\\"+v3[s]}var y3=/^\s*(\w|\$)+\s*$/;function ZF(s,e,i){!e&&i&&(e=i),e=Rd({},e,Ct.templateSettings);var t=RegExp([(e.escape||Sl).source,(e.interpolate||Sl).source,(e.evaluate||Sl).source].join("|")+"|$","g"),r=0,u="__p+='";s.replace(t,function(h,g,l,c,d){return u+=s.slice(r,d).replace(b3,w3),r=d+h.length,g?u+=`'+
((__t=(`+g+`))==null?'':_.escape(__t))+
'`:l?u+=`'+
((__t=(`+l+`))==null?'':__t)+
'`:c&&(u+=`';
`+c+`
__p+='`),h}),u+=`';
`;var n=e.variable;if(n){if(!y3.test(n))throw new Error("variable is not a bare identifier: "+n)}else u=`with(obj||{}){
`+u+`}
`,n="obj";u=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
`+u+`return __p;
`;var a;try{a=new Function(n,"_",u)}catch(h){throw h.source=u,h}var o=function(h){return a.call(this,h,Ct)};return o.source="function("+n+`){
`+u+"}",o}function QF(s,e,i){e=$n(e);var t=e.length;if(!t)return vr(i)?i.call(s):i;for(var r=0;r<t;r++){var u=s==null?void 0:s[e[r]];u===void 0&&(u=i,r=t),s=vr(u)?u.call(s):u}return s}var x3=0;function ep(s){var e=++x3+"";return s?s+e:e}function tp(s){var e=Ct(s);return e._chain=!0,e}function rp(s,e,i,t,r){if(!(t instanceof e))return s.apply(i,r);var u=BF(s.prototype),n=s.apply(u,r);return C0(n)?n:u}var Cs=Er(function(s,e){var i=Cs.placeholder,t=function(){for(var r=0,u=e.length,n=Array(u),a=0;a<u;a++)n[a]=e[a]===i?arguments[r++]:e[a];for(;r<arguments.length;)n.push(arguments[r++]);return rp(s,t,this,this,n)};return t});Cs.placeholder=Ct;const zd=Er(function(s,e,i){if(!vr(s))throw new TypeError("Bind must be called on a function");var t=Er(function(r){return rp(s,t,e,this,i.concat(r))});return t}),Yr=EF($r);function Es(s,e,i,t){if(t=t||[],!e&&e!==0)e=1/0;else if(e<=0)return t.concat(s);for(var r=t.length,u=0,n=$r(s);u<n;u++){var a=s[u];if(Yr(a)&&(E0(a)||fa(a)))if(e>1)Es(a,e-1,i,t),r=t.length;else for(var o=0,h=a.length;o<h;)t[r++]=a[o++];else i||(t[r++]=a)}return t}const ip=Er(function(s,e){e=Es(e,!1,!1);var i=e.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var t=e[i];s[t]=zd(s[t],s)}return s});function sp(s,e){var i=function(t){var r=i.cache,u=""+(e?e.apply(this,arguments):t);return A0(r,u)||(r[u]=s.apply(this,arguments)),r[u]};return i.cache={},i}const Hd=Er(function(s,e,i){return setTimeout(function(){return s.apply(null,i)},e)}),up=Cs(Hd,Ct,1);function np(s,e,i){var t,r,u,n,a=0;i||(i={});var o=function(){a=i.leading===!1?0:uu(),t=null,n=s.apply(r,u),t||(r=u=null)},h=function(){var g=uu();!a&&i.leading===!1&&(a=g);var l=e-(g-a);return r=this,u=arguments,l<=0||l>e?(t&&(clearTimeout(t),t=null),a=g,n=s.apply(r,u),t||(r=u=null)):!t&&i.trailing!==!1&&(t=setTimeout(o,l)),n};return h.cancel=function(){clearTimeout(t),a=0,t=r=u=null},h}function op(s,e,i){var t,r,u,n,a,o=function(){var g=uu()-r;e>g?t=setTimeout(o,e-g):(t=null,i||(n=s.apply(a,u)),t||(u=a=null))},h=Er(function(g){return a=this,u=g,r=uu(),t||(t=setTimeout(o,e),i&&(n=s.apply(a,u))),n});return h.cancel=function(){clearTimeout(t),t=u=a=null},h}function ap(s,e){return Cs(e,s)}function wa(s){return function(){return!s.apply(this,arguments)}}function lp(){var s=arguments,e=s.length-1;return function(){for(var i=e,t=s[e].apply(this,arguments);i--;)t=s[i].call(this,t);return t}}function cp(s,e){return function(){if(--s<1)return e.apply(this,arguments)}}function Ud(s,e){var i;return function(){return--s>0&&(i=e.apply(this,arguments)),s<=1&&(e=null),i}}const dp=Cs(Ud,2);function Yd(s,e,i){e=Ir(e,i);for(var t=or(s),r,u=0,n=t.length;u<n;u++)if(r=t[u],e(s[r],r,s))return r}function hp(s){return function(e,i,t){i=Ir(i,t);for(var r=$r(e),u=s>0?0:r-1;u>=0&&u<r;u+=s)if(i(e[u],u,e))return u;return-1}}const ya=hp(1),Vd=hp(-1);function Xd(s,e,i,t){i=Ir(i,t,1);for(var r=i(e),u=0,n=$r(s);u<n;){var a=Math.floor((u+n)/2);i(s[a])<r?u=a+1:n=a}return u}function gp(s,e,i){return function(t,r,u){var n=0,a=$r(t);if(typeof u=="number")s>0?n=u>=0?u:Math.max(u+a,n):a=u>=0?Math.min(u+1,a):u+a+1;else if(i&&u&&a)return u=i(t,r),t[u]===r?u:-1;if(r!==r)return u=e(Pn.call(t,n,a),Sd),u>=0?u+n:-1;for(u=s>0?n:a-1;u>=0&&u<a;u+=s)if(t[u]===r)return u;return-1}}const Gd=gp(1,ya,Xd),Fp=gp(-1,Vd);function mn(s,e,i){var t=Yr(s)?ya:Yd,r=t(s,e,i);if(r!==void 0&&r!==-1)return s[r]}function pp(s,e){return mn(s,ps(e))}function yi(s,e,i){e=In(e,i);var t,r;if(Yr(s))for(t=0,r=s.length;t<r;t++)e(s[t],t,s);else{var u=or(s);for(t=0,r=u.length;t<r;t++)e(s[u[t]],u[t],s)}return s}function Ki(s,e,i){e=Ir(e,i);for(var t=!Yr(s)&&or(s),r=(t||s).length,u=Array(r),n=0;n<r;n++){var a=t?t[n]:n;u[n]=e(s[a],a,s)}return u}function fp(s){var e=function(i,t,r,u){var n=!Yr(i)&&or(i),a=(n||i).length,o=s>0?0:a-1;for(u||(r=i[n?n[o]:o],o+=s);o>=0&&o<a;o+=s){var h=n?n[o]:o;r=t(r,i[h],h,i)}return r};return function(i,t,r,u){var n=arguments.length>=3;return e(i,In(t,u,4),r,n)}}const Js=fp(1),Uo=fp(-1);function m0(s,e,i){var t=[];return e=Ir(e,i),yi(s,function(r,u,n){e(r,u,n)&&t.push(r)}),t}function mp(s,e,i){return m0(s,wa(Ir(e)),i)}function Yo(s,e,i){e=Ir(e,i);for(var t=!Yr(s)&&or(s),r=(t||s).length,u=0;u<r;u++){var n=t?t[u]:u;if(!e(s[n],n,s))return!1}return!0}function Vo(s,e,i){e=Ir(e,i);for(var t=!Yr(s)&&or(s),r=(t||s).length,u=0;u<r;u++){var n=t?t[u]:u;if(e(s[n],n,s))return!0}return!1}function ui(s,e,i,t){return Yr(s)||(s=xs(s)),(typeof i!="number"||t)&&(i=0),Gd(s,e,i)>=0}const vp=Er(function(s,e,i){var t,r;return vr(e)?r=e:(e=$n(e),t=e.slice(0,-1),e=e[e.length-1]),Ki(s,function(u){var n=r;if(!n){if(t&&t.length&&(u=Od(u,t)),u==null)return;n=u[e]}return n==null?n:n.apply(u,i)})});function xa(s,e){return Ki(s,va(e))}function bp(s,e){return m0(s,ps(e))}function qd(s,e,i){var t=-1/0,r=-1/0,u,n;if(e==null||typeof e=="number"&&typeof s[0]!="object"&&s!=null){s=Yr(s)?s:xs(s);for(var a=0,o=s.length;a<o;a++)u=s[a],u!=null&&u>t&&(t=u)}else e=Ir(e,i),yi(s,function(h,g,l){n=e(h,g,l),(n>r||n===-1/0&&t===-1/0)&&(t=h,r=n)});return t}function wp(s,e,i){var t=1/0,r=1/0,u,n;if(e==null||typeof e=="number"&&typeof s[0]!="object"&&s!=null){s=Yr(s)?s:xs(s);for(var a=0,o=s.length;a<o;a++)u=s[a],u!=null&&u<t&&(t=u)}else e=Ir(e,i),yi(s,function(h,g,l){n=e(h,g,l),(n<r||n===1/0&&t===1/0)&&(t=h,r=n)});return t}var C3=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Kd(s){return s?E0(s)?Pn.call(s):pa(s)?s.match(C3):Yr(s)?Ki(s,ma):xs(s):[]}function Jd(s,e,i){if(e==null||i)return Yr(s)||(s=xs(s)),s[Ho(s.length-1)];var t=Kd(s),r=$r(t);e=Math.max(Math.min(e,r),0);for(var u=r-1,n=0;n<e;n++){var a=Ho(n,u),o=t[n];t[n]=t[a],t[a]=o}return t.slice(0,e)}function yp(s){return Jd(s,1/0)}function xp(s,e,i){var t=0;return e=Ir(e,i),xa(Ki(s,function(r,u,n){return{value:r,index:t++,criteria:e(r,u,n)}}).sort(function(r,u){var n=r.criteria,a=u.criteria;if(n!==a){if(n>a||n===void 0)return 1;if(n<a||a===void 0)return-1}return r.index-u.index}),"value")}function Ca(s,e){return function(i,t,r){var u=e?[[],[]]:{};return t=Ir(t,r),yi(i,function(n,a){var o=t(n,a,i);s(u,n,o)}),u}}const Cp=Ca(function(s,e,i){A0(s,i)?s[i].push(e):s[i]=[e]}),Ep=Ca(function(s,e,i){s[i]=e}),Ap=Ca(function(s,e,i){A0(s,i)?s[i]++:s[i]=1}),kp=Ca(function(s,e,i){s[i?0:1].push(e)},!0);function Sp(s){return s==null?0:Yr(s)?s.length:or(s).length}function E3(s,e,i){return e in i}const Zd=Er(function(s,e){var i={},t=e[0];if(s==null)return i;vr(t)?(e.length>1&&(t=In(t,e[1])),e=fu(s)):(t=E3,e=Es(e,!1,!1),s=Object(s));for(var r=0,u=e.length;r<u;r++){var n=e[r],a=s[n];t(a,n,s)&&(i[n]=a)}return i}),jp=Er(function(s,e){var i=e[0],t;return vr(i)?(i=wa(i),e.length>1&&(t=e[1])):(e=Ki(Es(e,!1,!1),String),i=function(r,u){return!ui(e,u)}),Zd(s,i,t)});function Qd(s,e,i){return Pn.call(s,0,Math.max(0,s.length-(e==null||i?1:e)))}function Zs(s,e,i){return s==null||s.length<1?e==null||i?void 0:[]:e==null||i?s[0]:Qd(s,s.length-e)}function ds(s,e,i){return Pn.call(s,e==null||i?1:e)}function Dp(s,e,i){return s==null||s.length<1?e==null||i?void 0:[]:e==null||i?s[s.length-1]:ds(s,Math.max(0,s.length-e))}function Mp(s){return m0(s,Boolean)}function _p(s,e){return Es(s,e,!1)}const eh=Er(function(s,e){return e=Es(e,!0,!0),m0(s,function(i){return!ui(e,i)})}),Lp=Er(function(s,e){return eh(s,e)});function vn(s,e,i,t){xd(e)||(t=i,i=e,e=!1),i!=null&&(i=Ir(i,t));for(var r=[],u=[],n=0,a=$r(s);n<a;n++){var o=s[n],h=i?i(o,n,s):o;e&&!i?((!n||u!==h)&&r.push(o),u=h):i?ui(u,h)||(u.push(h),r.push(o)):ui(r,o)||r.push(o)}return r}const Tp=Er(function(s){return vn(Es(s,!0,!0))});function Pp(s){for(var e=[],i=arguments.length,t=0,r=$r(s);t<r;t++){var u=s[t];if(!ui(e,u)){var n;for(n=1;n<i&&ui(arguments[n],u);n++);n===i&&e.push(u)}}return e}function bn(s){for(var e=s&&qd(s,$r).length||0,i=Array(e),t=0;t<e;t++)i[t]=xa(s,t);return i}const $p=Er(bn);function Ip(s,e){for(var i={},t=0,r=$r(s);t<r;t++)e?i[s[t]]=e[t]:i[s[t][0]]=s[t][1];return i}function Rp(s,e,i){e==null&&(e=s||0,s=0),i||(i=e<s?-1:1);for(var t=Math.max(Math.ceil((e-s)/i),0),r=Array(t),u=0;u<t;u++,s+=i)r[u]=s;return r}function Bp(s,e){if(e==null||e<1)return[];for(var i=[],t=0,r=s.length;t<r;)i.push(Pn.call(s,t,t+=e));return i}function th(s,e){return s._chain?Ct(e).chain():e}function rh(s){return yi(fn(s),function(e){var i=Ct[e]=s[e];Ct.prototype[e]=function(){var t=[this._wrapped];return e3.apply(t,arguments),th(this,i.apply(Ct,t))}}),Ct}yi(["pop","push","reverse","shift","sort","splice","unshift"],function(s){var e=Fa[s];Ct.prototype[s]=function(){var i=this._wrapped;return i!=null&&(e.apply(i,arguments),(s==="shift"||s==="splice")&&i.length===0&&delete i[0]),th(this,i)}});yi(["concat","join","slice"],function(s){var e=Fa[s];Ct.prototype[s]=function(){var i=this._wrapped;return i!=null&&(i=e.apply(i,arguments)),th(this,i)}});const A3=Object.freeze(Object.defineProperty({__proto__:null,VERSION:bd,after:cp,all:Yo,allKeys:fu,any:Vo,assign:su,before:Ud,bind:zd,bindAll:ip,chain:tp,chunk:Bp,clone:NF,collect:Ki,compact:Mp,compose:lp,constant:jd,contains:ui,countBy:Ap,create:OF,debounce:op,default:Ct,defaults:Rd,defer:up,delay:Hd,detect:mn,difference:eh,drop:ds,each:yi,escape:qF,every:Yo,extend:Id,extendOwn:su,filter:m0,find:mn,findIndex:ya,findKey:Yd,findLastIndex:Vd,findWhere:pp,first:Zs,flatten:_p,foldl:Js,foldr:Uo,forEach:yi,functions:fn,get:Nd,groupBy:Cp,has:zF,head:Zs,identity:ma,include:ui,includes:ui,indexBy:Ep,indexOf:Gd,initial:Qd,inject:Js,intersection:Pp,invert:Pd,invoke:vp,isArguments:fa,isArray:E0,isArrayBuffer:Ad,isBoolean:xd,isDataView:pn,isDate:mF,isElement:fF,isEmpty:SF,isEqual:DF,isError:bF,isFinite:CF,isFunction:vr,isMap:TF,isMatch:Md,isNaN:Sd,isNull:pF,isNumber:Cd,isObject:C0,isRegExp:vF,isSet:$F,isString:pa,isSymbol:Ed,isTypedArray:Dd,isUndefined:yd,isWeakMap:PF,isWeakSet:IF,iteratee:ba,keys:or,last:Dp,lastIndexOf:Fp,map:Ki,mapObject:UF,matcher:ps,matches:ps,max:qd,memoize:sp,methods:fn,min:wp,mixin:rh,negate:wa,noop:Wd,now:uu,object:Ip,omit:jp,once:dp,pairs:RF,partial:Cs,partition:kp,pick:Zd,pluck:xa,property:va,propertyOf:YF,random:Ho,range:Rp,reduce:Js,reduceRight:Uo,reject:mp,rest:ds,restArguments:Er,result:QF,sample:Jd,select:m0,shuffle:yp,size:Sp,some:Vo,sortBy:xp,sortedIndex:Xd,tail:ds,take:Zs,tap:WF,template:ZF,templateSettings:JF,throttle:np,times:VF,toArray:Kd,toPath:Bd,transpose:bn,unescape:KF,union:Tp,uniq:vn,unique:vn,uniqueId:ep,unzip:bn,values:xs,where:bp,without:Lp,wrap:ap,zip:$p},Symbol.toStringTag,{value:"Module"}));var Fe=rh(A3);Fe._=Fe;const k3=Object.freeze(Object.defineProperty({__proto__:null,VERSION:bd,after:cp,all:Yo,allKeys:fu,any:Vo,assign:su,before:Ud,bind:zd,bindAll:ip,chain:tp,chunk:Bp,clone:NF,collect:Ki,compact:Mp,compose:lp,constant:jd,contains:ui,countBy:Ap,create:OF,debounce:op,default:Fe,defaults:Rd,defer:up,delay:Hd,detect:mn,difference:eh,drop:ds,each:yi,escape:qF,every:Yo,extend:Id,extendOwn:su,filter:m0,find:mn,findIndex:ya,findKey:Yd,findLastIndex:Vd,findWhere:pp,first:Zs,flatten:_p,foldl:Js,foldr:Uo,forEach:yi,functions:fn,get:Nd,groupBy:Cp,has:zF,head:Zs,identity:ma,include:ui,includes:ui,indexBy:Ep,indexOf:Gd,initial:Qd,inject:Js,intersection:Pp,invert:Pd,invoke:vp,isArguments:fa,isArray:E0,isArrayBuffer:Ad,isBoolean:xd,isDataView:pn,isDate:mF,isElement:fF,isEmpty:SF,isEqual:DF,isError:bF,isFinite:CF,isFunction:vr,isMap:TF,isMatch:Md,isNaN:Sd,isNull:pF,isNumber:Cd,isObject:C0,isRegExp:vF,isSet:$F,isString:pa,isSymbol:Ed,isTypedArray:Dd,isUndefined:yd,isWeakMap:PF,isWeakSet:IF,iteratee:ba,keys:or,last:Dp,lastIndexOf:Fp,map:Ki,mapObject:UF,matcher:ps,matches:ps,max:qd,memoize:sp,methods:fn,min:wp,mixin:rh,negate:wa,noop:Wd,now:uu,object:Ip,omit:jp,once:dp,pairs:RF,partial:Cs,partition:kp,pick:Zd,pluck:xa,property:va,propertyOf:YF,random:Ho,range:Rp,reduce:Js,reduceRight:Uo,reject:mp,rest:ds,restArguments:Er,result:QF,sample:Jd,select:m0,shuffle:yp,size:Sp,some:Vo,sortBy:xp,sortedIndex:Xd,tail:ds,take:Zs,tap:WF,template:ZF,templateSettings:JF,throttle:np,times:VF,toArray:Kd,toPath:Bd,transpose:bn,unescape:KF,union:Tp,uniq:vn,unique:vn,uniqueId:ep,unzip:bn,values:xs,where:bp,without:Lp,wrap:ap,zip:$p},Symbol.toStringTag,{value:"Module"}));var Op={};const S3=Zy(k3);(function(s){(function(e){var i=typeof self=="object"&&self.self===self&&self||typeof Li=="object"&&Li.global===Li&&Li;{var t=S3,r;try{r=vd()}catch{}e(i,s,t,r)}})(function(e,i,t,r){var u=e.Backbone,n=Array.prototype.slice;i.VERSION="1.4.1",i.$=r,i.noConflict=function(){return e.Backbone=u,this},i.emulateHTTP=!1,i.emulateJSON=!1;var a=i.Events={},o=/\s+/,h,g=function(W,z,$,P,B){var X=0,oe;if($&&typeof $=="object")for(P!==void 0&&("context"in B)&&B.context===void 0&&(B.context=P),oe=t.keys($);X<oe.length;X++)z=g(W,z,oe[X],$[oe[X]],B);else if($&&o.test($))for(oe=$.split(o);X<oe.length;X++)z=W(z,oe[X],P,B);else z=W(z,$,P,B);return z};a.on=function(W,z,$){if(this._events=g(l,this._events||{},W,z,{context:$,ctx:this,listening:h}),h){var P=this._listeners||(this._listeners={});P[h.id]=h,h.interop=!1}return this},a.listenTo=function(W,z,$){if(!W)return this;var P=W._listenId||(W._listenId=t.uniqueId("l")),B=this._listeningTo||(this._listeningTo={}),X=h=B[P];X||(this._listenId||(this._listenId=t.uniqueId("l")),X=h=B[P]=new m(this,W));var oe=c(W,z,$,this);if(h=void 0,oe)throw oe;return X.interop&&X.on(z,$),this};var l=function(W,z,$,P){if($){var B=W[z]||(W[z]=[]),X=P.context,oe=P.ctx,we=P.listening;we&&we.count++,B.push({callback:$,context:X,ctx:X||oe,listening:we})}return W},c=function(W,z,$,P){try{W.on(z,$,P)}catch(B){return B}};a.off=function(W,z,$){return this._events?(this._events=g(d,this._events,W,z,{context:$,listeners:this._listeners}),this):this},a.stopListening=function(W,z,$){var P=this._listeningTo;if(!P)return this;for(var B=W?[W._listenId]:t.keys(P),X=0;X<B.length;X++){var oe=P[B[X]];if(!oe)break;oe.obj.off(z,$,this),oe.interop&&oe.off(z,$)}return t.isEmpty(P)&&(this._listeningTo=void 0),this};var d=function(W,z,$,P){if(W){var B=P.context,X=P.listeners,oe=0,we;if(!z&&!B&&!$){for(we=t.keys(X);oe<we.length;oe++)X[we[oe]].cleanup();return}for(we=z?[z]:t.keys(W);oe<we.length;oe++){z=we[oe];var ye=W[z];if(!ye)break;for(var Te=[],Ye=0;Ye<ye.length;Ye++){var Re=ye[Ye];if($&&$!==Re.callback&&$!==Re.callback._callback||B&&B!==Re.context)Te.push(Re);else{var st=Re.listening;st&&st.off(z,$)}}Te.length?W[z]=Te:delete W[z]}return W}};a.once=function(W,z,$){var P=g(F,{},W,z,this.off.bind(this));return typeof W=="string"&&$==null&&(z=void 0),this.on(P,z,$)},a.listenToOnce=function(W,z,$){var P=g(F,{},z,$,this.stopListening.bind(this,W));return this.listenTo(W,P)};var F=function(W,z,$,P){if($){var B=W[z]=t.once(function(){P(z,B),$.apply(this,arguments)});B._callback=$}return W};a.trigger=function(W){if(!this._events)return this;for(var z=Math.max(0,arguments.length-1),$=Array(z),P=0;P<z;P++)$[P]=arguments[P+1];return g(p,this._events,W,void 0,$),this};var p=function(W,z,$,P){if(W){var B=W[z],X=W.all;B&&X&&(X=X.slice()),B&&f(B,P),X&&f(X,[z].concat(P))}return W},f=function(W,z){var $,P=-1,B=W.length,X=z[0],oe=z[1],we=z[2];switch(z.length){case 0:for(;++P<B;)($=W[P]).callback.call($.ctx);return;case 1:for(;++P<B;)($=W[P]).callback.call($.ctx,X);return;case 2:for(;++P<B;)($=W[P]).callback.call($.ctx,X,oe);return;case 3:for(;++P<B;)($=W[P]).callback.call($.ctx,X,oe,we);return;default:for(;++P<B;)($=W[P]).callback.apply($.ctx,z);return}},m=function(W,z){this.id=W._listenId,this.listener=W,this.obj=z,this.interop=!0,this.count=0,this._events=void 0};m.prototype.on=a.on,m.prototype.off=function(W,z){var $;this.interop?(this._events=g(d,this._events,W,z,{context:void 0,listeners:void 0}),$=!this._events):(this.count--,$=this.count===0),$&&this.cleanup()},m.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},a.bind=a.on,a.unbind=a.off,t.extend(i,a);var v=i.Model=function(W,z){var $=W||{};z||(z={}),this.preinitialize.apply(this,arguments),this.cid=t.uniqueId(this.cidPrefix),this.attributes={},z.collection&&(this.collection=z.collection),z.parse&&($=this.parse($,z)||{});var P=t.result(this,"defaults");$=t.defaults(t.extend({},P,$),P),this.set($,z),this.changed={},this.initialize.apply(this,arguments)};t.extend(v.prototype,a,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(W){return t.clone(this.attributes)},sync:function(){return i.sync.apply(this,arguments)},get:function(W){return this.attributes[W]},escape:function(W){return t.escape(this.get(W))},has:function(W){return this.get(W)!=null},matches:function(W){return!!t.iteratee(W,this)(this.attributes)},set:function(W,z,$){if(W==null)return this;var P;if(typeof W=="object"?(P=W,$=z):(P={})[W]=z,$||($={}),!this._validate(P,$))return!1;var B=$.unset,X=$.silent,oe=[],we=this._changing;this._changing=!0,we||(this._previousAttributes=t.clone(this.attributes),this.changed={});var ye=this.attributes,Te=this.changed,Ye=this._previousAttributes;for(var Re in P)z=P[Re],t.isEqual(ye[Re],z)||oe.push(Re),t.isEqual(Ye[Re],z)?delete Te[Re]:Te[Re]=z,B?delete ye[Re]:ye[Re]=z;if(this.idAttribute in P){var st=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,st,$)}if(!X){oe.length&&(this._pending=$);for(var lt=0;lt<oe.length;lt++)this.trigger("change:"+oe[lt],this,ye[oe[lt]],$)}if(we)return this;if(!X)for(;this._pending;)$=this._pending,this._pending=!1,this.trigger("change",this,$);return this._pending=!1,this._changing=!1,this},unset:function(W,z){return this.set(W,void 0,t.extend({},z,{unset:!0}))},clear:function(W){var z={};for(var $ in this.attributes)z[$]=void 0;return this.set(z,t.extend({},W,{unset:!0}))},hasChanged:function(W){return W==null?!t.isEmpty(this.changed):t.has(this.changed,W)},changedAttributes:function(W){if(!W)return this.hasChanged()?t.clone(this.changed):!1;var z=this._changing?this._previousAttributes:this.attributes,$={},P;for(var B in W){var X=W[B];t.isEqual(z[B],X)||($[B]=X,P=!0)}return P?$:!1},previous:function(W){return W==null||!this._previousAttributes?null:this._previousAttributes[W]},previousAttributes:function(){return t.clone(this._previousAttributes)},fetch:function(W){W=t.extend({parse:!0},W);var z=this,$=W.success;return W.success=function(P){var B=W.parse?z.parse(P,W):P;if(!z.set(B,W))return!1;$&&$.call(W.context,z,P,W),z.trigger("sync",z,P,W)},Ee(this,W),this.sync("read",this,W)},save:function(W,z,$){var P;W==null||typeof W=="object"?(P=W,$=z):(P={})[W]=z,$=t.extend({validate:!0,parse:!0},$);var B=$.wait;if(P&&!B){if(!this.set(P,$))return!1}else if(!this._validate(P,$))return!1;var X=this,oe=$.success,we=this.attributes;$.success=function(Ye){X.attributes=we;var Re=$.parse?X.parse(Ye,$):Ye;if(B&&(Re=t.extend({},P,Re)),Re&&!X.set(Re,$))return!1;oe&&oe.call($.context,X,Ye,$),X.trigger("sync",X,Ye,$)},Ee(this,$),P&&B&&(this.attributes=t.extend({},we,P));var ye=this.isNew()?"create":$.patch?"patch":"update";ye==="patch"&&!$.attrs&&($.attrs=P);var Te=this.sync(ye,this,$);return this.attributes=we,Te},destroy:function(W){W=W?t.clone(W):{};var z=this,$=W.success,P=W.wait,B=function(){z.stopListening(),z.trigger("destroy",z,z.collection,W)};W.success=function(oe){P&&B(),$&&$.call(W.context,z,oe,W),z.isNew()||z.trigger("sync",z,oe,W)};var X=!1;return this.isNew()?t.defer(W.success):(Ee(this,W),X=this.sync("delete",this,W)),P||B(),X},url:function(){var W=t.result(this,"urlRoot")||t.result(this.collection,"url")||xe();if(this.isNew())return W;var z=this.get(this.idAttribute);return W.replace(/[^\/]$/,"$&/")+encodeURIComponent(z)},parse:function(W,z){return W},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(W){return this._validate({},t.extend({},W,{validate:!0}))},_validate:function(W,z){if(!z.validate||!this.validate)return!0;W=t.extend({},this.attributes,W);var $=this.validationError=this.validate(W,z)||null;return $?(this.trigger("invalid",this,$,t.extend(z,{validationError:$})),!1):!0}});var w=i.Collection=function(W,z){z||(z={}),this.preinitialize.apply(this,arguments),z.model&&(this.model=z.model),z.comparator!==void 0&&(this.comparator=z.comparator),this._reset(),this.initialize.apply(this,arguments),W&&this.reset(W,t.extend({silent:!0},z))},x={add:!0,remove:!0,merge:!0},A={add:!0,remove:!1},b=function(W,z,$){$=Math.min(Math.max($,0),W.length);var P=Array(W.length-$),B=z.length,X;for(X=0;X<P.length;X++)P[X]=W[X+$];for(X=0;X<B;X++)W[X+$]=z[X];for(X=0;X<P.length;X++)W[X+B+$]=P[X]};t.extend(w.prototype,a,{model:v,preinitialize:function(){},initialize:function(){},toJSON:function(W){return this.map(function(z){return z.toJSON(W)})},sync:function(){return i.sync.apply(this,arguments)},add:function(W,z){return this.set(W,t.extend({merge:!1},z,A))},remove:function(W,z){z=t.extend({},z);var $=!t.isArray(W);W=$?[W]:W.slice();var P=this._removeModels(W,z);return!z.silent&&P.length&&(z.changes={added:[],merged:[],removed:P},this.trigger("update",this,z)),$?P[0]:P},set:function(W,z){if(W!=null){z=t.extend({},x,z),z.parse&&!this._isModel(W)&&(W=this.parse(W,z)||[]);var $=!t.isArray(W);W=$?[W]:W.slice();var P=z.at;P!=null&&(P=+P),P>this.length&&(P=this.length),P<0&&(P+=this.length+1);var B=[],X=[],oe=[],we=[],ye={},Te=z.add,Ye=z.merge,Re=z.remove,st=!1,lt=this.comparator&&P==null&&z.sort!==!1,qt=t.isString(this.comparator)?this.comparator:null,At,Nt;for(Nt=0;Nt<W.length;Nt++){At=W[Nt];var dr=this.get(At);if(dr){if(Ye&&At!==dr){var Rr=this._isModel(At)?At.attributes:At;z.parse&&(Rr=dr.parse(Rr,z)),dr.set(Rr,z),oe.push(dr),lt&&!st&&(st=dr.hasChanged(qt))}ye[dr.cid]||(ye[dr.cid]=!0,B.push(dr)),W[Nt]=dr}else Te&&(At=W[Nt]=this._prepareModel(At,z),At&&(X.push(At),this._addReference(At,z),ye[At.cid]=!0,B.push(At)))}if(Re){for(Nt=0;Nt<this.length;Nt++)At=this.models[Nt],ye[At.cid]||we.push(At);we.length&&this._removeModels(we,z)}var Kr=!1,T0=!lt&&Te&&Re;if(B.length&&T0?(Kr=this.length!==B.length||t.some(this.models,function(Ls,lr){return Ls!==B[lr]}),this.models.length=0,b(this.models,B,0),this.length=this.models.length):X.length&&(lt&&(st=!0),b(this.models,X,P??this.length),this.length=this.models.length),st&&this.sort({silent:!0}),!z.silent){for(Nt=0;Nt<X.length;Nt++)P!=null&&(z.index=P+Nt),At=X[Nt],At.trigger("add",At,this,z);(st||Kr)&&this.trigger("sort",this,z),(X.length||we.length||oe.length)&&(z.changes={added:X,removed:we,merged:oe},this.trigger("update",this,z))}return $?W[0]:W}},reset:function(W,z){z=z?t.clone(z):{};for(var $=0;$<this.models.length;$++)this._removeReference(this.models[$],z);return z.previousModels=this.models,this._reset(),W=this.add(W,t.extend({silent:!0},z)),z.silent||this.trigger("reset",this,z),W},push:function(W,z){return this.add(W,t.extend({at:this.length},z))},pop:function(W){var z=this.at(this.length-1);return this.remove(z,W)},unshift:function(W,z){return this.add(W,t.extend({at:0},z))},shift:function(W){var z=this.at(0);return this.remove(z,W)},slice:function(){return n.apply(this.models,arguments)},get:function(W){if(W!=null)return this._byId[W]||this._byId[this.modelId(this._isModel(W)?W.attributes:W,W.idAttribute)]||W.cid&&this._byId[W.cid]},has:function(W){return this.get(W)!=null},at:function(W){return W<0&&(W+=this.length),this.models[W]},where:function(W,z){return this[z?"find":"filter"](W)},findWhere:function(W){return this.where(W,!0)},sort:function(W){var z=this.comparator;if(!z)throw new Error("Cannot sort a set without a comparator");W||(W={});var $=z.length;return t.isFunction(z)&&(z=z.bind(this)),$===1||t.isString(z)?this.models=this.sortBy(z):this.models.sort(z),W.silent||this.trigger("sort",this,W),this},pluck:function(W){return this.map(W+"")},fetch:function(W){W=t.extend({parse:!0},W);var z=W.success,$=this;return W.success=function(P){var B=W.reset?"reset":"set";$[B](P,W),z&&z.call(W.context,$,P,W),$.trigger("sync",$,P,W)},Ee(this,W),this.sync("read",this,W)},create:function(W,z){z=z?t.clone(z):{};var $=z.wait;if(W=this._prepareModel(W,z),!W)return!1;$||this.add(W,z);var P=this,B=z.success;return z.success=function(X,oe,we){$&&P.add(X,we),B&&B.call(we.context,X,oe,we)},W.save(null,z),W},parse:function(W,z){return W},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(W,z){return W[z||this.model.prototype.idAttribute||"id"]},values:function(){return new k(this,C)},keys:function(){return new k(this,D)},entries:function(){return new k(this,T)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(W,z){if(this._isModel(W))return W.collection||(W.collection=this),W;z=z?t.clone(z):{},z.collection=this;var $;return this.model.prototype?$=new this.model(W,z):$=this.model(W,z),$.validationError?(this.trigger("invalid",this,$.validationError,z),!1):$},_removeModels:function(W,z){for(var $=[],P=0;P<W.length;P++){var B=this.get(W[P]);if(B){var X=this.indexOf(B);this.models.splice(X,1),this.length--,delete this._byId[B.cid];var oe=this.modelId(B.attributes,B.idAttribute);oe!=null&&delete this._byId[oe],z.silent||(z.index=X,B.trigger("remove",B,this,z)),$.push(B),this._removeReference(B,z)}}return $},_isModel:function(W){return W instanceof v},_addReference:function(W,z){this._byId[W.cid]=W;var $=this.modelId(W.attributes,W.idAttribute);$!=null&&(this._byId[$]=W),W.on("all",this._onModelEvent,this)},_removeReference:function(W,z){delete this._byId[W.cid];var $=this.modelId(W.attributes,W.idAttribute);$!=null&&delete this._byId[$],this===W.collection&&delete W.collection,W.off("all",this._onModelEvent,this)},_onModelEvent:function(W,z,$,P){if(z){if((W==="add"||W==="remove")&&$!==this)return;if(W==="destroy"&&this.remove(z,P),W==="changeId"){var B=this.modelId(z.previousAttributes(),z.idAttribute),X=this.modelId(z.attributes,z.idAttribute);B!=null&&delete this._byId[B],X!=null&&(this._byId[X]=z)}}this.trigger.apply(this,arguments)}});var y=typeof Symbol=="function"&&Symbol.iterator;y&&(w.prototype[y]=w.prototype.values);var k=function(W,z){this._collection=W,this._kind=z,this._index=0},C=1,D=2,T=3;y&&(k.prototype[y]=function(){return this}),k.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var W=this._collection.at(this._index);this._index++;var z;if(this._kind===C)z=W;else{var $=this._collection.modelId(W.attributes,W.idAttribute);this._kind===D?z=$:z=[$,W]}return{value:z,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var S=i.View=function(W){this.cid=t.uniqueId("view"),this.preinitialize.apply(this,arguments),t.extend(this,t.pick(W,R)),this._ensureElement(),this.initialize.apply(this,arguments)},M=/^(\S+)\s*(.*)$/,R=["model","collection","el","id","attributes","className","tagName","events"];t.extend(S.prototype,a,{tagName:"div",$:function(W){return this.$el.find(W)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(W){return this.undelegateEvents(),this._setElement(W),this.delegateEvents(),this},_setElement:function(W){this.$el=W instanceof i.$?W:i.$(W),this.el=this.$el[0]},delegateEvents:function(W){if(W||(W=t.result(this,"events")),!W)return this;this.undelegateEvents();for(var z in W){var $=W[z];if(t.isFunction($)||($=this[$]),!!$){var P=z.match(M);this.delegate(P[1],P[2],$.bind(this))}}return this},delegate:function(W,z,$){return this.$el.on(W+".delegateEvents"+this.cid,z,$),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(W,z,$){return this.$el.off(W+".delegateEvents"+this.cid,z,$),this},_createElement:function(W){return document.createElement(W)},_ensureElement:function(){if(this.el)this.setElement(t.result(this,"el"));else{var W=t.extend({},t.result(this,"attributes"));this.id&&(W.id=t.result(this,"id")),this.className&&(W.class=t.result(this,"className")),this.setElement(this._createElement(t.result(this,"tagName"))),this._setAttributes(W)}},_setAttributes:function(W){this.$el.attr(W)}});var O=function(W,z,$,P){switch(z){case 1:return function(){return W[$](this[P])};case 2:return function(B){return W[$](this[P],B)};case 3:return function(B,X){return W[$](this[P],Y(B,this),X)};case 4:return function(B,X,oe){return W[$](this[P],Y(B,this),X,oe)};default:return function(){var B=n.call(arguments);return B.unshift(this[P]),W[$].apply(W,B)}}},H=function(W,z,$,P){t.each($,function(B,X){z[X]&&(W.prototype[X]=O(z,B,X,P))})},Y=function(W,z){return t.isFunction(W)?W:t.isObject(W)&&!z._isModel(W)?J(W):t.isString(W)?function($){return $.get(W)}:W},J=function(W){var z=t.matches(W);return function($){return z($.attributes)}},Z={forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},te={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};t.each([[w,Z,"models"],[v,te,"attributes"]],function(W){var z=W[0],$=W[1],P=W[2];z.mixin=function(B){var X=t.reduce(t.functions(B),function(oe,we){return oe[we]=0,oe},{});H(z,B,X,P)},H(z,t,$,P)}),i.sync=function(W,z,$){var P=ie[W];t.defaults($||($={}),{emulateHTTP:i.emulateHTTP,emulateJSON:i.emulateJSON});var B={type:P,dataType:"json"};if($.url||(B.url=t.result(z,"url")||xe()),$.data==null&&z&&(W==="create"||W==="update"||W==="patch")&&(B.contentType="application/json",B.data=JSON.stringify($.attrs||z.toJSON($))),$.emulateJSON&&(B.contentType="application/x-www-form-urlencoded",B.data=B.data?{model:B.data}:{}),$.emulateHTTP&&(P==="PUT"||P==="DELETE"||P==="PATCH")){B.type="POST",$.emulateJSON&&(B.data._method=P);var X=$.beforeSend;$.beforeSend=function(ye){if(ye.setRequestHeader("X-HTTP-Method-Override",P),X)return X.apply(this,arguments)}}B.type!=="GET"&&!$.emulateJSON&&(B.processData=!1);var oe=$.error;$.error=function(ye,Te,Ye){$.textStatus=Te,$.errorThrown=Ye,oe&&oe.call($.context,ye,Te,Ye)};var we=$.xhr=i.ajax(t.extend(B,$));return z.trigger("request",z,we,$),we};var ie={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};i.ajax=function(){return i.$.ajax.apply(i.$,arguments)};var se=i.Router=function(W){W||(W={}),this.preinitialize.apply(this,arguments),W.routes&&(this.routes=W.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},ue=/\((.*?)\)/g,ne=/(\(\?)?:\w+/g,G=/\*\w+/g,K=/[\-{}\[\]+?.,\\\^$|#\s]/g;t.extend(se.prototype,a,{preinitialize:function(){},initialize:function(){},route:function(W,z,$){t.isRegExp(W)||(W=this._routeToRegExp(W)),t.isFunction(z)&&($=z,z=""),$||($=this[z]);var P=this;return i.history.route(W,function(B){var X=P._extractParameters(W,B);P.execute($,X,z)!==!1&&(P.trigger.apply(P,["route:"+z].concat(X)),P.trigger("route",z,X),i.history.trigger("route",P,z,X))}),this},execute:function(W,z,$){W&&W.apply(this,z)},navigate:function(W,z){return i.history.navigate(W,z),this},_bindRoutes:function(){if(this.routes){this.routes=t.result(this,"routes");for(var W,z=t.keys(this.routes);(W=z.pop())!=null;)this.route(W,this.routes[W])}},_routeToRegExp:function(W){return W=W.replace(K,"\\$&").replace(ue,"(?:$1)?").replace(ne,function(z,$){return $?z:"([^/?]+)"}).replace(G,"([^?]*?)"),new RegExp("^"+W+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(W,z){var $=W.exec(z).slice(1);return t.map($,function(P,B){return B===$.length-1?P||null:P?decodeURIComponent(P):null})}});var le=i.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),typeof window<"u"&&(this.location=window.location,this.history=window.history)},re=/^[#\/]|\s+$/g,ae=/^\/+|\/+$/g,ee=/#.*$/;le.started=!1,t.extend(le.prototype,a,{interval:50,atRoot:function(){var W=this.location.pathname.replace(/[^\/]$/,"$&/");return W===this.root&&!this.getSearch()},matchRoot:function(){var W=this.decodeFragment(this.location.pathname),z=W.slice(0,this.root.length-1)+"/";return z===this.root},decodeFragment:function(W){return decodeURI(W.replace(/%25/g,"%2525"))},getSearch:function(){var W=this.location.href.replace(/#.*/,"").match(/\?.+/);return W?W[0]:""},getHash:function(W){var z=(W||this).location.href.match(/#(.*)$/);return z?z[1]:""},getPath:function(){var W=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return W.charAt(0)==="/"?W.slice(1):W},getFragment:function(W){return W==null&&(this._usePushState||!this._wantsHashChange?W=this.getPath():W=this.getHash()),W.replace(re,"")},start:function(W){if(le.started)throw new Error("Backbone.history has already been started");if(le.started=!0,this.options=t.extend({root:"/"},this.options,W),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(document.documentMode===void 0||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.history&&this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(ae,"/"),this._wantsHashChange&&this._wantsPushState)if(!this._hasPushState&&!this.atRoot()){var z=this.root.slice(0,-1)||"/";return this.location.replace(z+"#"+this.getPath()),!0}else this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0});if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var $=document.body,P=$.insertBefore(this.iframe,$.firstChild).contentWindow;P.document.open(),P.document.close(),P.location.hash="#"+this.fragment}var B=window.addEventListener||function(X,oe){return attachEvent("on"+X,oe)};if(this._usePushState?B("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?B("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var W=window.removeEventListener||function(z,$){return detachEvent("on"+z,$)};this._usePushState?W("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&W("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),le.started=!1},route:function(W,z){this.handlers.unshift({route:W,callback:z})},checkUrl:function(W){var z=this.getFragment();if(z===this.fragment&&this.iframe&&(z=this.getHash(this.iframe.contentWindow)),z===this.fragment)return!1;this.iframe&&this.navigate(z),this.loadUrl()},loadUrl:function(W){return this.matchRoot()?(W=this.fragment=this.getFragment(W),t.some(this.handlers,function(z){if(z.route.test(W))return z.callback(W),!0})):!1},navigate:function(W,z){if(!le.started)return!1;(!z||z===!0)&&(z={trigger:!!z}),W=this.getFragment(W||"");var $=this.root;(W===""||W.charAt(0)==="?")&&($=$.slice(0,-1)||"/");var P=$+W;W=W.replace(ee,"");var B=this.decodeFragment(W);if(this.fragment!==B){if(this.fragment=B,this._usePushState)this.history[z.replace?"replaceState":"pushState"]({},document.title,P);else if(this._wantsHashChange){if(this._updateHash(this.location,W,z.replace),this.iframe&&W!==this.getHash(this.iframe.contentWindow)){var X=this.iframe.contentWindow;z.replace||(X.document.open(),X.document.close()),this._updateHash(X.location,W,z.replace)}}else return this.location.assign(P);if(z.trigger)return this.loadUrl(W)}},_updateHash:function(W,z,$){if($){var P=W.href.replace(/(javascript:|#).*$/,"");W.replace(P+"#"+z)}else W.hash="#"+z}}),i.history=new le;var ce=function(W,z){var $=this,P;return W&&t.has(W,"constructor")?P=W.constructor:P=function(){return $.apply(this,arguments)},t.extend(P,$,z),P.prototype=t.create($.prototype,W),P.prototype.constructor=P,P.__super__=$.prototype,P};v.extend=w.extend=se.extend=S.extend=le.extend=ce;var xe=function(){throw new Error('A "url" property or function must be specified')},Ee=function(W,z){var $=z.error;z.error=function(P){$&&$.call(z.context,W,P,z),W.trigger("error",W,P,z)}};return i})})(Op);const er=ga(Op);var Np;function ze(){return Np.apply(null,arguments)}function j3(s){Np=s}function Pi(s){return s instanceof Array||Object.prototype.toString.call(s)==="[object Array]"}function on(s){return s!=null&&Object.prototype.toString.call(s)==="[object Object]"}function D3(s){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(s).length===0;var e;for(e in s)if(s.hasOwnProperty(e))return!1;return!0}function Lr(s){return s===void 0}function fs(s){return typeof s=="number"||Object.prototype.toString.call(s)==="[object Number]"}function Ea(s){return s instanceof Date||Object.prototype.toString.call(s)==="[object Date]"}function Wp(s,e){var i=[],t;for(t=0;t<s.length;++t)i.push(e(s[t],t));return i}function Jt(s,e){return Object.prototype.hasOwnProperty.call(s,e)}function g0(s,e){for(var i in e)Jt(e,i)&&(s[i]=e[i]);return Jt(e,"toString")&&(s.toString=e.toString),Jt(e,"valueOf")&&(s.valueOf=e.valueOf),s}function Ii(s,e,i,t){return pf(s,e,i,t,!0).utc()}function M3(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function ht(s){return s._pf==null&&(s._pf=M3()),s._pf}var wc;Array.prototype.some?wc=Array.prototype.some:wc=function(s){for(var e=Object(this),i=e.length>>>0,t=0;t<i;t++)if(t in e&&s.call(this,e[t],t,e))return!0;return!1};function ih(s){if(s._isValid==null){var e=ht(s),i=wc.call(e.parsedDateParts,function(r){return r!=null}),t=!isNaN(s._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(s._strict&&(t=t&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0),Object.isFrozen==null||!Object.isFrozen(s))s._isValid=t;else return t}return s._isValid}function Aa(s){var e=Ii(NaN);return s!=null?g0(ht(e),s):ht(e).userInvalidated=!0,e}var jl=ze.momentProperties=[];function sh(s,e){var i,t,r;if(Lr(e._isAMomentObject)||(s._isAMomentObject=e._isAMomentObject),Lr(e._i)||(s._i=e._i),Lr(e._f)||(s._f=e._f),Lr(e._l)||(s._l=e._l),Lr(e._strict)||(s._strict=e._strict),Lr(e._tzm)||(s._tzm=e._tzm),Lr(e._isUTC)||(s._isUTC=e._isUTC),Lr(e._offset)||(s._offset=e._offset),Lr(e._pf)||(s._pf=ht(e)),Lr(e._locale)||(s._locale=e._locale),jl.length>0)for(i=0;i<jl.length;i++)t=jl[i],r=e[t],Lr(r)||(s[t]=r);return s}var Dl=!1;function Rn(s){sh(this,s),this._d=new Date(s._d!=null?s._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),Dl===!1&&(Dl=!0,ze.updateOffset(this),Dl=!1)}function $i(s){return s instanceof Rn||s!=null&&s._isAMomentObject!=null}function ii(s){return s<0?Math.ceil(s)||0:Math.floor(s)}function gt(s){var e=+s,i=0;return e!==0&&isFinite(e)&&(i=ii(e)),i}function zp(s,e,i){var t=Math.min(s.length,e.length),r=Math.abs(s.length-e.length),u=0,n;for(n=0;n<t;n++)(i&&s[n]!==e[n]||!i&&gt(s[n])!==gt(e[n]))&&u++;return u+r}function Hp(s){ze.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+s)}function ai(s,e){var i=!0;return g0(function(){if(ze.deprecationHandler!=null&&ze.deprecationHandler(null,s),i){for(var t=[],r,u=0;u<arguments.length;u++){if(r="",typeof arguments[u]=="object"){r+=`
[`+u+"] ";for(var n in arguments[0])r+=n+": "+arguments[0][n]+", ";r=r.slice(0,-2)}else r=arguments[u];t.push(r)}Hp(s+`
Arguments: `+Array.prototype.slice.call(t).join("")+`
`+new Error().stack),i=!1}return e.apply(this,arguments)},e)}var q2={};function Up(s,e){ze.deprecationHandler!=null&&ze.deprecationHandler(s,e),q2[s]||(Hp(e),q2[s]=!0)}ze.suppressDeprecationWarnings=!1;ze.deprecationHandler=null;function Ri(s){return s instanceof Function||Object.prototype.toString.call(s)==="[object Function]"}function _3(s){var e,i;for(i in s)e=s[i],Ri(e)?this[i]=e:this["_"+i]=e;this._config=s,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Yp(s,e){var i=g0({},s),t;for(t in e)Jt(e,t)&&(on(s[t])&&on(e[t])?(i[t]={},g0(i[t],s[t]),g0(i[t],e[t])):e[t]!=null?i[t]=e[t]:delete i[t]);for(t in s)Jt(s,t)&&!Jt(e,t)&&on(s[t])&&(i[t]=g0({},i[t]));return i}function uh(s){s!=null&&this.set(s)}var yc;Object.keys?yc=Object.keys:yc=function(s){var e,i=[];for(e in s)Jt(s,e)&&i.push(e);return i};var L3={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function T3(s,e,i){var t=this._calendar[s]||this._calendar.sameElse;return Ri(t)?t.call(e,i):t}var P3={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function $3(s){var e=this._longDateFormat[s],i=this._longDateFormat[s.toUpperCase()];return e||!i?e:(this._longDateFormat[s]=i.replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[s])}var I3="Invalid date";function R3(){return this._invalidDate}var B3="%d",O3=/\d{1,2}/;function N3(s){return this._ordinal.replace("%d",s)}var W3={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function z3(s,e,i,t){var r=this._relativeTime[i];return Ri(r)?r(s,e,i,t):r.replace(/%d/i,s)}function H3(s,e){var i=this._relativeTime[s>0?"future":"past"];return Ri(i)?i(e):i.replace(/%s/i,e)}var an={};function yr(s,e){var i=s.toLowerCase();an[i]=an[i+"s"]=an[e]=s}function li(s){return typeof s=="string"?an[s]||an[s.toLowerCase()]:void 0}function nh(s){var e={},i,t;for(t in s)Jt(s,t)&&(i=li(t),i&&(e[i]=s[t]));return e}var Vp={};function xr(s,e){Vp[s]=e}function U3(s){var e=[];for(var i in s)e.push({unit:i,priority:Vp[i]});return e.sort(function(t,r){return t.priority-r.priority}),e}function Ji(s,e,i){var t=""+Math.abs(s),r=e-t.length,u=s>=0;return(u?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+t}var Xp=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oo=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Ml={},Qs={};function ut(s,e,i,t){var r=t;typeof t=="string"&&(r=function(){return this[t]()}),s&&(Qs[s]=r),e&&(Qs[e[0]]=function(){return Ji(r.apply(this,arguments),e[1],e[2])}),i&&(Qs[i]=function(){return this.localeData().ordinal(r.apply(this,arguments),s)})}function Y3(s){return s.match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"")}function V3(s){var e=s.match(Xp),i,t;for(i=0,t=e.length;i<t;i++)Qs[e[i]]?e[i]=Qs[e[i]]:e[i]=Y3(e[i]);return function(r){var u="",n;for(n=0;n<t;n++)u+=Ri(e[n])?e[n].call(r,s):e[n];return u}}function _o(s,e){return s.isValid()?(e=Gp(e,s.localeData()),Ml[e]=Ml[e]||V3(e),Ml[e](s)):s.localeData().invalidDate()}function Gp(s,e){var i=5;function t(r){return e.longDateFormat(r)||r}for(oo.lastIndex=0;i>=0&&oo.test(s);)s=s.replace(oo,t),oo.lastIndex=0,i-=1;return s}var qp=/\d/,Vr=/\d\d/,Kp=/\d{3}/,oh=/\d{4}/,ka=/[+-]?\d{6}/,It=/\d\d?/,Jp=/\d\d\d\d?/,Zp=/\d\d\d\d\d\d?/,Sa=/\d{1,3}/,ah=/\d{1,4}/,ja=/[+-]?\d{1,6}/,X3=/\d+/,Da=/[+-]?\d+/,G3=/Z|[+-]\d\d:?\d\d/gi,Ma=/Z|[+-]\d\d(?::?\d\d)?/gi,q3=/[+-]?\d+(\.\d{1,3})?/,Bn=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,xc={};function Je(s,e,i){xc[s]=Ri(e)?e:function(t,r){return t&&i?i:e}}function K3(s,e){return Jt(xc,s)?xc[s](e._strict,e._locale):new RegExp(J3(s))}function J3(s){return hs(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,i,t,r,u){return i||t||r||u}))}function hs(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Cc={};function Rt(s,e){var i,t=e;for(typeof s=="string"&&(s=[s]),fs(e)&&(t=function(r,u){u[e]=gt(r)}),i=0;i<s.length;i++)Cc[s[i]]=t}function On(s,e){Rt(s,function(i,t,r,u){r._w=r._w||{},e(i,r._w,r,u)})}function Z3(s,e,i){e!=null&&Jt(Cc,s)&&Cc[s](e,i._a,i,s)}var vi=0,Xi=1,Mi=2,ur=3,pi=4,Gi=5,os=6,Q3=7,ex=8;ut("Y",0,0,function(){var s=this.year();return s<=9999?""+s:"+"+s});ut(0,["YY",2],0,function(){return this.year()%100});ut(0,["YYYY",4],0,"year");ut(0,["YYYYY",5],0,"year");ut(0,["YYYYYY",6,!0],0,"year");yr("year","y");xr("year",1);Je("Y",Da);Je("YY",It,Vr);Je("YYYY",ah,oh);Je("YYYYY",ja,ka);Je("YYYYYY",ja,ka);Rt(["YYYYY","YYYYYY"],vi);Rt("YYYY",function(s,e){e[vi]=s.length===2?ze.parseTwoDigitYear(s):gt(s)});Rt("YY",function(s,e){e[vi]=ze.parseTwoDigitYear(s)});Rt("Y",function(s,e){e[vi]=parseInt(s,10)});function ln(s){return _a(s)?366:365}function _a(s){return s%4===0&&s%100!==0||s%400===0}ze.parseTwoDigitYear=function(s){return gt(s)+(gt(s)>68?1900:2e3)};var Qp=mu("FullYear",!0);function tx(){return _a(this.year())}function mu(s,e){return function(i){return i!=null?(ef(this,s,i),ze.updateOffset(this,e),this):Xo(this,s)}}function Xo(s,e){return s.isValid()?s._d["get"+(s._isUTC?"UTC":"")+e]():NaN}function ef(s,e,i){s.isValid()&&!isNaN(i)&&(e==="FullYear"&&_a(s.year())&&s.month()===1&&s.date()===29?s._d["set"+(s._isUTC?"UTC":"")+e](i,s.month(),La(i,s.month())):s._d["set"+(s._isUTC?"UTC":"")+e](i))}function rx(s){return s=li(s),Ri(this[s])?this[s]():this}function ix(s,e){if(typeof s=="object"){s=nh(s);for(var i=U3(s),t=0;t<i.length;t++)this[i[t].unit](s[i[t].unit])}else if(s=li(s),Ri(this[s]))return this[s](e);return this}function sx(s,e){return(s%e+e)%e}var Kt;Array.prototype.indexOf?Kt=Array.prototype.indexOf:Kt=function(s){var e;for(e=0;e<this.length;++e)if(this[e]===s)return e;return-1};function La(s,e){if(isNaN(s)||isNaN(e))return NaN;var i=sx(e,12);return s+=(e-i)/12,i===1?_a(s)?29:28:31-i%7%2}ut("M",["MM",2],"Mo",function(){return this.month()+1});ut("MMM",0,0,function(s){return this.localeData().monthsShort(this,s)});ut("MMMM",0,0,function(s){return this.localeData().months(this,s)});yr("month","M");xr("month",8);Je("M",It);Je("MM",It,Vr);Je("MMM",function(s,e){return e.monthsShortRegex(s)});Je("MMMM",function(s,e){return e.monthsRegex(s)});Rt(["M","MM"],function(s,e){e[Xi]=gt(s)-1});Rt(["MMM","MMMM"],function(s,e,i,t){var r=i._locale.monthsParse(s,t,i._strict);r!=null?e[Xi]=r:ht(i).invalidMonth=s});var tf=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ux="January_February_March_April_May_June_July_August_September_October_November_December".split("_");function nx(s,e){return s?Pi(this._months)?this._months[s.month()]:this._months[(this._months.isFormat||tf).test(e)?"format":"standalone"][s.month()]:Pi(this._months)?this._months:this._months.standalone}var rf="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function ox(s,e){return s?Pi(this._monthsShort)?this._monthsShort[s.month()]:this._monthsShort[tf.test(e)?"format":"standalone"][s.month()]:Pi(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ax(s,e,i){var t,r,u,n=s.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],t=0;t<12;++t)u=Ii([2e3,t]),this._shortMonthsParse[t]=this.monthsShort(u,"").toLocaleLowerCase(),this._longMonthsParse[t]=this.months(u,"").toLocaleLowerCase();return i?e==="MMM"?(r=Kt.call(this._shortMonthsParse,n),r!==-1?r:null):(r=Kt.call(this._longMonthsParse,n),r!==-1?r:null):e==="MMM"?(r=Kt.call(this._shortMonthsParse,n),r!==-1?r:(r=Kt.call(this._longMonthsParse,n),r!==-1?r:null)):(r=Kt.call(this._longMonthsParse,n),r!==-1?r:(r=Kt.call(this._shortMonthsParse,n),r!==-1?r:null))}function lx(s,e,i){var t,r,u;if(this._monthsParseExact)return ax.call(this,s,e,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),t=0;t<12;t++){if(r=Ii([2e3,t]),i&&!this._longMonthsParse[t]&&(this._longMonthsParse[t]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[t]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!i&&!this._monthsParse[t]&&(u="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[t]=new RegExp(u.replace(".",""),"i")),i&&e==="MMMM"&&this._longMonthsParse[t].test(s))return t;if(i&&e==="MMM"&&this._shortMonthsParse[t].test(s))return t;if(!i&&this._monthsParse[t].test(s))return t}}function sf(s,e){var i;if(!s.isValid())return s;if(typeof e=="string"){if(/^\d+$/.test(e))e=gt(e);else if(e=s.localeData().monthsParse(e),!fs(e))return s}return i=Math.min(s.date(),La(s.year(),e)),s._d["set"+(s._isUTC?"UTC":"")+"Month"](e,i),s}function uf(s){return s!=null?(sf(this,s),ze.updateOffset(this,!0),this):Xo(this,"Month")}function cx(){return La(this.year(),this.month())}var dx=Bn;function hx(s){return this._monthsParseExact?(Jt(this,"_monthsRegex")||nf.call(this),s?this._monthsShortStrictRegex:this._monthsShortRegex):(Jt(this,"_monthsShortRegex")||(this._monthsShortRegex=dx),this._monthsShortStrictRegex&&s?this._monthsShortStrictRegex:this._monthsShortRegex)}var gx=Bn;function Fx(s){return this._monthsParseExact?(Jt(this,"_monthsRegex")||nf.call(this),s?this._monthsStrictRegex:this._monthsRegex):(Jt(this,"_monthsRegex")||(this._monthsRegex=gx),this._monthsStrictRegex&&s?this._monthsStrictRegex:this._monthsRegex)}function nf(){function s(n,a){return a.length-n.length}var e=[],i=[],t=[],r,u;for(r=0;r<12;r++)u=Ii([2e3,r]),e.push(this.monthsShort(u,"")),i.push(this.months(u,"")),t.push(this.months(u,"")),t.push(this.monthsShort(u,""));for(e.sort(s),i.sort(s),t.sort(s),r=0;r<12;r++)e[r]=hs(e[r]),i[r]=hs(i[r]);for(r=0;r<24;r++)t[r]=hs(t[r]);this._monthsRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function px(s,e,i,t,r,u,n){var a;return s<100&&s>=0?(a=new Date(s+400,e,i,t,r,u,n),isFinite(a.getFullYear())&&a.setFullYear(s)):a=new Date(s,e,i,t,r,u,n),a}function wn(s){var e;if(s<100&&s>=0){var i=Array.prototype.slice.call(arguments);i[0]=s+400,e=new Date(Date.UTC.apply(null,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(s)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Go(s,e,i){var t=7+e-i,r=(7+wn(s,0,t).getUTCDay()-e)%7;return-r+t-1}function of(s,e,i,t,r){var u=(7+i-t)%7,n=Go(s,t,r),a=1+7*(e-1)+u+n,o,h;return a<=0?(o=s-1,h=ln(o)+a):a>ln(s)?(o=s+1,h=a-ln(s)):(o=s,h=a),{year:o,dayOfYear:h}}function yn(s,e,i){var t=Go(s.year(),e,i),r=Math.floor((s.dayOfYear()-t-1)/7)+1,u,n;return r<1?(n=s.year()-1,u=r+gs(n,e,i)):r>gs(s.year(),e,i)?(u=r-gs(s.year(),e,i),n=s.year()+1):(n=s.year(),u=r),{week:u,year:n}}function gs(s,e,i){var t=Go(s,e,i),r=Go(s+1,e,i);return(ln(s)-t+r)/7}ut("w",["ww",2],"wo","week");ut("W",["WW",2],"Wo","isoWeek");yr("week","w");yr("isoWeek","W");xr("week",5);xr("isoWeek",5);Je("w",It);Je("ww",It,Vr);Je("W",It);Je("WW",It,Vr);On(["w","ww","W","WW"],function(s,e,i,t){e[t.substr(0,1)]=gt(s)});function fx(s){return yn(s,this._week.dow,this._week.doy).week}var mx={dow:0,doy:6};function vx(){return this._week.dow}function bx(){return this._week.doy}function wx(s){var e=this.localeData().week(this);return s==null?e:this.add((s-e)*7,"d")}function yx(s){var e=yn(this,1,4).week;return s==null?e:this.add((s-e)*7,"d")}ut("d",0,"do","day");ut("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)});ut("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)});ut("dddd",0,0,function(s){return this.localeData().weekdays(this,s)});ut("e",0,0,"weekday");ut("E",0,0,"isoWeekday");yr("day","d");yr("weekday","e");yr("isoWeekday","E");xr("day",11);xr("weekday",11);xr("isoWeekday",11);Je("d",It);Je("e",It);Je("E",It);Je("dd",function(s,e){return e.weekdaysMinRegex(s)});Je("ddd",function(s,e){return e.weekdaysShortRegex(s)});Je("dddd",function(s,e){return e.weekdaysRegex(s)});On(["dd","ddd","dddd"],function(s,e,i,t){var r=i._locale.weekdaysParse(s,t,i._strict);r!=null?e.d=r:ht(i).invalidWeekday=s});On(["d","e","E"],function(s,e,i,t){e[t]=gt(s)});function xx(s,e){return typeof s!="string"?s:isNaN(s)?(s=e.weekdaysParse(s),typeof s=="number"?s:null):parseInt(s,10)}function Cx(s,e){return typeof s=="string"?e.weekdaysParse(s)%7||7:isNaN(s)?null:s}function lh(s,e){return s.slice(e,7).concat(s.slice(0,e))}var Ex="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");function Ax(s,e){var i=Pi(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return s===!0?lh(i,this._week.dow):s?i[s.day()]:i}var af="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");function kx(s){return s===!0?lh(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}var Sx="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function jx(s){return s===!0?lh(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function Dx(s,e,i){var t,r,u,n=s.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],t=0;t<7;++t)u=Ii([2e3,1]).day(t),this._minWeekdaysParse[t]=this.weekdaysMin(u,"").toLocaleLowerCase(),this._shortWeekdaysParse[t]=this.weekdaysShort(u,"").toLocaleLowerCase(),this._weekdaysParse[t]=this.weekdays(u,"").toLocaleLowerCase();return i?e==="dddd"?(r=Kt.call(this._weekdaysParse,n),r!==-1?r:null):e==="ddd"?(r=Kt.call(this._shortWeekdaysParse,n),r!==-1?r:null):(r=Kt.call(this._minWeekdaysParse,n),r!==-1?r:null):e==="dddd"?(r=Kt.call(this._weekdaysParse,n),r!==-1||(r=Kt.call(this._shortWeekdaysParse,n),r!==-1)?r:(r=Kt.call(this._minWeekdaysParse,n),r!==-1?r:null)):e==="ddd"?(r=Kt.call(this._shortWeekdaysParse,n),r!==-1||(r=Kt.call(this._weekdaysParse,n),r!==-1)?r:(r=Kt.call(this._minWeekdaysParse,n),r!==-1?r:null)):(r=Kt.call(this._minWeekdaysParse,n),r!==-1||(r=Kt.call(this._weekdaysParse,n),r!==-1)?r:(r=Kt.call(this._shortWeekdaysParse,n),r!==-1?r:null))}function Mx(s,e,i){var t,r,u;if(this._weekdaysParseExact)return Dx.call(this,s,e,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),t=0;t<7;t++){if(r=Ii([2e3,1]).day(t),i&&!this._fullWeekdaysParse[t]&&(this._fullWeekdaysParse[t]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[t]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[t]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[t]||(u="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[t]=new RegExp(u.replace(".",""),"i")),i&&e==="dddd"&&this._fullWeekdaysParse[t].test(s))return t;if(i&&e==="ddd"&&this._shortWeekdaysParse[t].test(s))return t;if(i&&e==="dd"&&this._minWeekdaysParse[t].test(s))return t;if(!i&&this._weekdaysParse[t].test(s))return t}}function _x(s){if(!this.isValid())return s!=null?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return s!=null?(s=xx(s,this.localeData()),this.add(s-e,"d")):e}function Lx(s){if(!this.isValid())return s!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return s==null?e:this.add(s-e,"d")}function Tx(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var e=Cx(s,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}var Px=Bn;function $x(s){return this._weekdaysParseExact?(Jt(this,"_weekdaysRegex")||ch.call(this),s?this._weekdaysStrictRegex:this._weekdaysRegex):(Jt(this,"_weekdaysRegex")||(this._weekdaysRegex=Px),this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex)}var Ix=Bn;function Rx(s){return this._weekdaysParseExact?(Jt(this,"_weekdaysRegex")||ch.call(this),s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Jt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ix),this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}var Bx=Bn;function Ox(s){return this._weekdaysParseExact?(Jt(this,"_weekdaysRegex")||ch.call(this),s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Jt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Bx),this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function ch(){function s(g,l){return l.length-g.length}var e=[],i=[],t=[],r=[],u,n,a,o,h;for(u=0;u<7;u++)n=Ii([2e3,1]).day(u),a=this.weekdaysMin(n,""),o=this.weekdaysShort(n,""),h=this.weekdays(n,""),e.push(a),i.push(o),t.push(h),r.push(a),r.push(o),r.push(h);for(e.sort(s),i.sort(s),t.sort(s),r.sort(s),u=0;u<7;u++)i[u]=hs(i[u]),t[u]=hs(t[u]),r[u]=hs(r[u]);this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function dh(){return this.hours()%12||12}function Nx(){return this.hours()||24}ut("H",["HH",2],0,"hour");ut("h",["hh",2],0,dh);ut("k",["kk",2],0,Nx);ut("hmm",0,0,function(){return""+dh.apply(this)+Ji(this.minutes(),2)});ut("hmmss",0,0,function(){return""+dh.apply(this)+Ji(this.minutes(),2)+Ji(this.seconds(),2)});ut("Hmm",0,0,function(){return""+this.hours()+Ji(this.minutes(),2)});ut("Hmmss",0,0,function(){return""+this.hours()+Ji(this.minutes(),2)+Ji(this.seconds(),2)});function lf(s,e){ut(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}lf("a",!0);lf("A",!1);yr("hour","h");xr("hour",13);function cf(s,e){return e._meridiemParse}Je("a",cf);Je("A",cf);Je("H",It);Je("h",It);Je("k",It);Je("HH",It,Vr);Je("hh",It,Vr);Je("kk",It,Vr);Je("hmm",Jp);Je("hmmss",Zp);Je("Hmm",Jp);Je("Hmmss",Zp);Rt(["H","HH"],ur);Rt(["k","kk"],function(s,e,i){var t=gt(s);e[ur]=t===24?0:t});Rt(["a","A"],function(s,e,i){i._isPm=i._locale.isPM(s),i._meridiem=s});Rt(["h","hh"],function(s,e,i){e[ur]=gt(s),ht(i).bigHour=!0});Rt("hmm",function(s,e,i){var t=s.length-2;e[ur]=gt(s.substr(0,t)),e[pi]=gt(s.substr(t)),ht(i).bigHour=!0});Rt("hmmss",function(s,e,i){var t=s.length-4,r=s.length-2;e[ur]=gt(s.substr(0,t)),e[pi]=gt(s.substr(t,2)),e[Gi]=gt(s.substr(r)),ht(i).bigHour=!0});Rt("Hmm",function(s,e,i){var t=s.length-2;e[ur]=gt(s.substr(0,t)),e[pi]=gt(s.substr(t))});Rt("Hmmss",function(s,e,i){var t=s.length-4,r=s.length-2;e[ur]=gt(s.substr(0,t)),e[pi]=gt(s.substr(t,2)),e[Gi]=gt(s.substr(r))});function Wx(s){return(s+"").toLowerCase().charAt(0)==="p"}var zx=/[ap]\.?m?\.?/i;function Hx(s,e,i){return s>11?i?"pm":"PM":i?"am":"AM"}var Ux=mu("Hours",!0),df={calendar:L3,longDateFormat:P3,invalidDate:I3,ordinal:B3,dayOfMonthOrdinalParse:O3,relativeTime:W3,months:ux,monthsShort:rf,week:mx,weekdays:Ex,weekdaysMin:Sx,weekdaysShort:af,meridiemParse:zx},sr={},Hu={},xn;function K2(s){return s&&s.toLowerCase().replace("_","-")}function Yx(s){for(var e=0,i,t,r,u;e<s.length;){for(u=K2(s[e]).split("-"),i=u.length,t=K2(s[e+1]),t=t?t.split("-"):null;i>0;){if(r=Ta(u.slice(0,i).join("-")),r)return r;if(t&&t.length>=i&&zp(u,t,!0)>=i-1)break;i--}e++}return xn}function Ta(s){var e=null;if(!sr[s]&&typeof Wo<"u"&&Wo&&Wo.exports)try{e=xn._abbr;var i=require;i("./locale/"+s),vu(e)}catch{}return sr[s]}function vu(s,e){var i;return s&&(Lr(e)?i=k0(s):i=hh(s,e),i?xn=i:typeof console<"u"&&console.warn&&console.warn("Locale "+s+" not found. Did you forget to load it?")),xn._abbr}function hh(s,e){if(e!==null){var i,t=df;if(e.abbr=s,sr[s]!=null)Up("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),t=sr[s]._config;else if(e.parentLocale!=null)if(sr[e.parentLocale]!=null)t=sr[e.parentLocale]._config;else if(i=Ta(e.parentLocale),i!=null)t=i._config;else return Hu[e.parentLocale]||(Hu[e.parentLocale]=[]),Hu[e.parentLocale].push({name:s,config:e}),null;return sr[s]=new uh(Yp(t,e)),Hu[s]&&Hu[s].forEach(function(r){hh(r.name,r.config)}),vu(s),sr[s]}else return delete sr[s],null}function Vx(s,e){if(e!=null){var i,t,r=df;t=Ta(s),t!=null&&(r=t._config),e=Yp(r,e),i=new uh(e),i.parentLocale=sr[s],sr[s]=i,vu(s)}else sr[s]!=null&&(sr[s].parentLocale!=null?sr[s]=sr[s].parentLocale:sr[s]!=null&&delete sr[s]);return sr[s]}function k0(s){var e;if(s&&s._locale&&s._locale._abbr&&(s=s._locale._abbr),!s)return xn;if(!Pi(s)){if(e=Ta(s),e)return e;s=[s]}return Yx(s)}function Xx(){return yc(sr)}function gh(s){var e,i=s._a;return i&&ht(s).overflow===-2&&(e=i[Xi]<0||i[Xi]>11?Xi:i[Mi]<1||i[Mi]>La(i[vi],i[Xi])?Mi:i[ur]<0||i[ur]>24||i[ur]===24&&(i[pi]!==0||i[Gi]!==0||i[os]!==0)?ur:i[pi]<0||i[pi]>59?pi:i[Gi]<0||i[Gi]>59?Gi:i[os]<0||i[os]>999?os:-1,ht(s)._overflowDayOfYear&&(e<vi||e>Mi)&&(e=Mi),ht(s)._overflowWeeks&&e===-1&&(e=Q3),ht(s)._overflowWeekday&&e===-1&&(e=ex),ht(s).overflow=e),s}function Vs(s,e,i){return s??e??i}function Gx(s){var e=new Date(ze.now());return s._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Fh(s){var e,i,t=[],r,u,n;if(!s._d){for(r=Gx(s),s._w&&s._a[Mi]==null&&s._a[Xi]==null&&qx(s),s._dayOfYear!=null&&(n=Vs(s._a[vi],r[vi]),(s._dayOfYear>ln(n)||s._dayOfYear===0)&&(ht(s)._overflowDayOfYear=!0),i=wn(n,0,s._dayOfYear),s._a[Xi]=i.getUTCMonth(),s._a[Mi]=i.getUTCDate()),e=0;e<3&&s._a[e]==null;++e)s._a[e]=t[e]=r[e];for(;e<7;e++)s._a[e]=t[e]=s._a[e]==null?e===2?1:0:s._a[e];s._a[ur]===24&&s._a[pi]===0&&s._a[Gi]===0&&s._a[os]===0&&(s._nextDay=!0,s._a[ur]=0),s._d=(s._useUTC?wn:px).apply(null,t),u=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null&&s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),s._nextDay&&(s._a[ur]=24),s._w&&typeof s._w.d<"u"&&s._w.d!==u&&(ht(s).weekdayMismatch=!0)}}function qx(s){var e,i,t,r,u,n,a,o;if(e=s._w,e.GG!=null||e.W!=null||e.E!=null)u=1,n=4,i=Vs(e.GG,s._a[vi],yn($t(),1,4).year),t=Vs(e.W,1),r=Vs(e.E,1),(r<1||r>7)&&(o=!0);else{u=s._locale._week.dow,n=s._locale._week.doy;var h=yn($t(),u,n);i=Vs(e.gg,s._a[vi],h.year),t=Vs(e.w,h.week),e.d!=null?(r=e.d,(r<0||r>6)&&(o=!0)):e.e!=null?(r=e.e+u,(e.e<0||e.e>6)&&(o=!0)):r=u}t<1||t>gs(i,u,n)?ht(s)._overflowWeeks=!0:o!=null?ht(s)._overflowWeekday=!0:(a=of(i,t,r,u,n),s._a[vi]=a.year,s._dayOfYear=a.dayOfYear)}var Kx=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Jx=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Zx=/Z|[+-]\d\d(?::?\d\d)?/,ao=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_l=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Qx=/^\/?Date\((\-?\d+)/i;function hf(s){var e,i,t=s._i,r=Kx.exec(t)||Jx.exec(t),u,n,a,o;if(r){for(ht(s).iso=!0,e=0,i=ao.length;e<i;e++)if(ao[e][1].exec(r[1])){n=ao[e][0],u=ao[e][2]!==!1;break}if(n==null){s._isValid=!1;return}if(r[3]){for(e=0,i=_l.length;e<i;e++)if(_l[e][1].exec(r[3])){a=(r[2]||" ")+_l[e][0];break}if(a==null){s._isValid=!1;return}}if(!u&&a!=null){s._isValid=!1;return}if(r[4])if(Zx.exec(r[4]))o="Z";else{s._isValid=!1;return}s._f=n+(a||"")+(o||""),ph(s)}else s._isValid=!1}var eC=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function tC(s,e,i,t,r,u){var n=[rC(s),rf.indexOf(e),parseInt(i,10),parseInt(t,10),parseInt(r,10)];return u&&n.push(parseInt(u,10)),n}function rC(s){var e=parseInt(s,10);return e<=49?2e3+e:e<=999?1900+e:e}function iC(s){return s.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function sC(s,e,i){if(s){var t=af.indexOf(s),r=new Date(e[0],e[1],e[2]).getDay();if(t!==r)return ht(i).weekdayMismatch=!0,i._isValid=!1,!1}return!0}var uC={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nC(s,e,i){if(s)return uC[s];if(e)return 0;var t=parseInt(i,10),r=t%100,u=(t-r)/100;return u*60+r}function gf(s){var e=eC.exec(iC(s._i));if(e){var i=tC(e[4],e[3],e[2],e[5],e[6],e[7]);if(!sC(e[1],i,s))return;s._a=i,s._tzm=nC(e[8],e[9],e[10]),s._d=wn.apply(null,s._a),s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),ht(s).rfc2822=!0}else s._isValid=!1}function oC(s){var e=Qx.exec(s._i);if(e!==null){s._d=new Date(+e[1]);return}if(hf(s),s._isValid===!1)delete s._isValid;else return;if(gf(s),s._isValid===!1)delete s._isValid;else return;ze.createFromInputFallback(s)}ze.createFromInputFallback=ai("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(s){s._d=new Date(s._i+(s._useUTC?" UTC":""))});ze.ISO_8601=function(){};ze.RFC_2822=function(){};function ph(s){if(s._f===ze.ISO_8601){hf(s);return}if(s._f===ze.RFC_2822){gf(s);return}s._a=[],ht(s).empty=!0;var e=""+s._i,i,t,r,u,n,a=e.length,o=0;for(r=Gp(s._f,s._locale).match(Xp)||[],i=0;i<r.length;i++)u=r[i],t=(e.match(K3(u,s))||[])[0],t&&(n=e.substr(0,e.indexOf(t)),n.length>0&&ht(s).unusedInput.push(n),e=e.slice(e.indexOf(t)+t.length),o+=t.length),Qs[u]?(t?ht(s).empty=!1:ht(s).unusedTokens.push(u),Z3(u,t,s)):s._strict&&!t&&ht(s).unusedTokens.push(u);ht(s).charsLeftOver=a-o,e.length>0&&ht(s).unusedInput.push(e),s._a[ur]<=12&&ht(s).bigHour===!0&&s._a[ur]>0&&(ht(s).bigHour=void 0),ht(s).parsedDateParts=s._a.slice(0),ht(s).meridiem=s._meridiem,s._a[ur]=aC(s._locale,s._a[ur],s._meridiem),Fh(s),gh(s)}function aC(s,e,i){var t;return i==null?e:s.meridiemHour!=null?s.meridiemHour(e,i):(s.isPM!=null&&(t=s.isPM(i),t&&e<12&&(e+=12),!t&&e===12&&(e=0)),e)}function lC(s){var e,i,t,r,u;if(s._f.length===0){ht(s).invalidFormat=!0,s._d=new Date(NaN);return}for(r=0;r<s._f.length;r++)u=0,e=sh({},s),s._useUTC!=null&&(e._useUTC=s._useUTC),e._f=s._f[r],ph(e),ih(e)&&(u+=ht(e).charsLeftOver,u+=ht(e).unusedTokens.length*10,ht(e).score=u,(t==null||u<t)&&(t=u,i=e));g0(s,i||e)}function cC(s){if(!s._d){var e=nh(s._i);s._a=Wp([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),Fh(s)}}function dC(s){var e=new Rn(gh(Ff(s)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Ff(s){var e=s._i,i=s._f;return s._locale=s._locale||k0(s._l),e===null||i===void 0&&e===""?Aa({nullInput:!0}):(typeof e=="string"&&(s._i=e=s._locale.preparse(e)),$i(e)?new Rn(gh(e)):(Ea(e)?s._d=e:Pi(i)?lC(s):i?ph(s):hC(s),ih(s)||(s._d=null),s))}function hC(s){var e=s._i;Lr(e)?s._d=new Date(ze.now()):Ea(e)?s._d=new Date(e.valueOf()):typeof e=="string"?oC(s):Pi(e)?(s._a=Wp(e.slice(0),function(i){return parseInt(i,10)}),Fh(s)):on(e)?cC(s):fs(e)?s._d=new Date(e):ze.createFromInputFallback(s)}function pf(s,e,i,t,r){var u={};return(i===!0||i===!1)&&(t=i,i=void 0),(on(s)&&D3(s)||Pi(s)&&s.length===0)&&(s=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=r,u._l=i,u._i=s,u._f=e,u._strict=t,dC(u)}function $t(s,e,i,t){return pf(s,e,i,t,!1)}var gC=ai("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=$t.apply(null,arguments);return this.isValid()&&s.isValid()?s<this?this:s:Aa()}),FC=ai("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=$t.apply(null,arguments);return this.isValid()&&s.isValid()?s>this?this:s:Aa()});function ff(s,e){var i,t;if(e.length===1&&Pi(e[0])&&(e=e[0]),!e.length)return $t();for(i=e[0],t=1;t<e.length;++t)(!e[t].isValid()||e[t][s](i))&&(i=e[t]);return i}function pC(){var s=[].slice.call(arguments,0);return ff("isBefore",s)}function fC(){var s=[].slice.call(arguments,0);return ff("isAfter",s)}var mC=function(){return Date.now?Date.now():+new Date},Uu=["year","quarter","month","week","day","hour","minute","second","millisecond"];function vC(s){for(var e in s)if(!(Kt.call(Uu,e)!==-1&&(s[e]==null||!isNaN(s[e]))))return!1;for(var i=!1,t=0;t<Uu.length;++t)if(s[Uu[t]]){if(i)return!1;parseFloat(s[Uu[t]])!==gt(s[Uu[t]])&&(i=!0)}return!0}function bC(){return this._isValid}function wC(){return xi(NaN)}function Pa(s){var e=nh(s),i=e.year||0,t=e.quarter||0,r=e.month||0,u=e.week||e.isoWeek||0,n=e.day||0,a=e.hour||0,o=e.minute||0,h=e.second||0,g=e.millisecond||0;this._isValid=vC(e),this._milliseconds=+g+h*1e3+o*6e4+a*1e3*60*60,this._days=+n+u*7,this._months=+r+t*3+i*12,this._data={},this._locale=k0(),this._bubble()}function Ec(s){return s instanceof Pa}function Ac(s){return s<0?Math.round(-1*s)*-1:Math.round(s)}function mf(s,e){ut(s,0,0,function(){var i=this.utcOffset(),t="+";return i<0&&(i=-i,t="-"),t+Ji(~~(i/60),2)+e+Ji(~~i%60,2)})}mf("Z",":");mf("ZZ","");Je("Z",Ma);Je("ZZ",Ma);Rt(["Z","ZZ"],function(s,e,i){i._useUTC=!0,i._tzm=fh(Ma,s)});var yC=/([\+\-]|\d\d)/gi;function fh(s,e){var i=(e||"").match(s);if(i===null)return null;var t=i[i.length-1]||[],r=(t+"").match(yC)||["-",0,0],u=+(r[1]*60)+gt(r[2]);return u===0?0:r[0]==="+"?u:-u}function mh(s,e){var i,t;return e._isUTC?(i=e.clone(),t=($i(s)||Ea(s)?s.valueOf():$t(s).valueOf())-i.valueOf(),i._d.setTime(i._d.valueOf()+t),ze.updateOffset(i,!1),i):$t(s).local()}function kc(s){return-Math.round(s._d.getTimezoneOffset()/15)*15}ze.updateOffset=function(){};function xC(s,e,i){var t=this._offset||0,r;if(!this.isValid())return s!=null?this:NaN;if(s!=null){if(typeof s=="string"){if(s=fh(Ma,s),s===null)return this}else Math.abs(s)<16&&!i&&(s=s*60);return!this._isUTC&&e&&(r=kc(this)),this._offset=s,this._isUTC=!0,r!=null&&this.add(r,"m"),t!==s&&(!e||this._changeInProgress?wf(this,xi(s-t,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ze.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?t:kc(this)}function CC(s,e){return s!=null?(typeof s!="string"&&(s=-s),this.utcOffset(s,e),this):-this.utcOffset()}function EC(s){return this.utcOffset(0,s)}function AC(s){return this._isUTC&&(this.utcOffset(0,s),this._isUTC=!1,s&&this.subtract(kc(this),"m")),this}function kC(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var s=fh(G3,this._i);s!=null?this.utcOffset(s):this.utcOffset(0,!0)}return this}function SC(s){return this.isValid()?(s=s?$t(s).utcOffset():0,(this.utcOffset()-s)%60===0):!1}function jC(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function DC(){if(!Lr(this._isDSTShifted))return this._isDSTShifted;var s={};if(sh(s,this),s=Ff(s),s._a){var e=s._isUTC?Ii(s._a):$t(s._a);this._isDSTShifted=this.isValid()&&zp(s._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function MC(){return this.isValid()?!this._isUTC:!1}function _C(){return this.isValid()?this._isUTC:!1}function vf(){return this.isValid()?this._isUTC&&this._offset===0:!1}var LC=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,TC=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function xi(s,e){var i=s,t=null,r,u,n;return Ec(s)?i={ms:s._milliseconds,d:s._days,M:s._months}:fs(s)?(i={},e?i[e]=s:i.milliseconds=s):(t=LC.exec(s))?(r=t[1]==="-"?-1:1,i={y:0,d:gt(t[Mi])*r,h:gt(t[ur])*r,m:gt(t[pi])*r,s:gt(t[Gi])*r,ms:gt(Ac(t[os]*1e3))*r}):(t=TC.exec(s))?(r=t[1]==="-"?-1:1,i={y:U0(t[2],r),M:U0(t[3],r),w:U0(t[4],r),d:U0(t[5],r),h:U0(t[6],r),m:U0(t[7],r),s:U0(t[8],r)}):i==null?i={}:typeof i=="object"&&("from"in i||"to"in i)&&(n=PC($t(i.from),$t(i.to)),i={},i.ms=n.milliseconds,i.M=n.months),u=new Pa(i),Ec(s)&&Jt(s,"_locale")&&(u._locale=s._locale),u}xi.fn=Pa.prototype;xi.invalid=wC;function U0(s,e){var i=s&&parseFloat(s.replace(",","."));return(isNaN(i)?0:i)*e}function J2(s,e){var i={};return i.months=e.month()-s.month()+(e.year()-s.year())*12,s.clone().add(i.months,"M").isAfter(e)&&--i.months,i.milliseconds=+e-+s.clone().add(i.months,"M"),i}function PC(s,e){var i;return s.isValid()&&e.isValid()?(e=mh(e,s),s.isBefore(e)?i=J2(s,e):(i=J2(e,s),i.milliseconds=-i.milliseconds,i.months=-i.months),i):{milliseconds:0,months:0}}function bf(s,e){return function(i,t){var r,u;return t!==null&&!isNaN(+t)&&(Up(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),u=i,i=t,t=u),i=typeof i=="string"?+i:i,r=xi(i,t),wf(this,r,s),this}}function wf(s,e,i,t){var r=e._milliseconds,u=Ac(e._days),n=Ac(e._months);s.isValid()&&(t=t??!0,n&&sf(s,Xo(s,"Month")+n*i),u&&ef(s,"Date",Xo(s,"Date")+u*i),r&&s._d.setTime(s._d.valueOf()+r*i),t&&ze.updateOffset(s,u||n))}var $C=bf(1,"add"),IC=bf(-1,"subtract");function RC(s,e){var i=s.diff(e,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"}function BC(s,e){var i=s||$t(),t=mh(i,this).startOf("day"),r=ze.calendarFormat(this,t)||"sameElse",u=e&&(Ri(e[r])?e[r].call(this,i):e[r]);return this.format(u||this.localeData().calendar(r,this,$t(i)))}function OC(){return new Rn(this)}function NC(s,e){var i=$i(s)?s:$t(s);return this.isValid()&&i.isValid()?(e=li(e)||"millisecond",e==="millisecond"?this.valueOf()>i.valueOf():i.valueOf()<this.clone().startOf(e).valueOf()):!1}function WC(s,e){var i=$i(s)?s:$t(s);return this.isValid()&&i.isValid()?(e=li(e)||"millisecond",e==="millisecond"?this.valueOf()<i.valueOf():this.clone().endOf(e).valueOf()<i.valueOf()):!1}function zC(s,e,i,t){var r=$i(s)?s:$t(s),u=$i(e)?e:$t(e);return this.isValid()&&r.isValid()&&u.isValid()?(t=t||"()",(t[0]==="("?this.isAfter(r,i):!this.isBefore(r,i))&&(t[1]===")"?this.isBefore(u,i):!this.isAfter(u,i))):!1}function HC(s,e){var i=$i(s)?s:$t(s),t;return this.isValid()&&i.isValid()?(e=li(e)||"millisecond",e==="millisecond"?this.valueOf()===i.valueOf():(t=i.valueOf(),this.clone().startOf(e).valueOf()<=t&&t<=this.clone().endOf(e).valueOf())):!1}function UC(s,e){return this.isSame(s,e)||this.isAfter(s,e)}function YC(s,e){return this.isSame(s,e)||this.isBefore(s,e)}function VC(s,e,i){var t,r,u;if(!this.isValid())return NaN;if(t=mh(s,this),!t.isValid())return NaN;switch(r=(t.utcOffset()-this.utcOffset())*6e4,e=li(e),e){case"year":u=Ll(this,t)/12;break;case"month":u=Ll(this,t);break;case"quarter":u=Ll(this,t)/3;break;case"second":u=(this-t)/1e3;break;case"minute":u=(this-t)/6e4;break;case"hour":u=(this-t)/36e5;break;case"day":u=(this-t-r)/864e5;break;case"week":u=(this-t-r)/6048e5;break;default:u=this-t}return i?u:ii(u)}function Ll(s,e){var i=(e.year()-s.year())*12+(e.month()-s.month()),t=s.clone().add(i,"months"),r,u;return e-t<0?(r=s.clone().add(i-1,"months"),u=(e-t)/(t-r)):(r=s.clone().add(i+1,"months"),u=(e-t)/(r-t)),-(i+u)||0}ze.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ze.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function XC(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function GC(s){if(!this.isValid())return null;var e=s!==!0,i=e?this.clone().utc():this;return i.year()<0||i.year()>9999?_o(i,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ri(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",_o(i,"Z")):_o(i,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function qC(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",e="";this.isLocal()||(s=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z");var i="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",u=e+'[")]';return this.format(i+t+r+u)}function KC(s){s||(s=this.isUtc()?ze.defaultFormatUtc:ze.defaultFormat);var e=_o(this,s);return this.localeData().postformat(e)}function JC(s,e){return this.isValid()&&($i(s)&&s.isValid()||$t(s).isValid())?xi({to:this,from:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ZC(s){return this.from($t(),s)}function QC(s,e){return this.isValid()&&($i(s)&&s.isValid()||$t(s).isValid())?xi({from:this,to:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function e1(s){return this.to($t(),s)}function yf(s){var e;return s===void 0?this._locale._abbr:(e=k0(s),e!=null&&(this._locale=e),this)}var xf=ai("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){return s===void 0?this.localeData():this.locale(s)});function Cf(){return this._locale}var qo=1e3,eu=60*qo,Ko=60*eu,Ef=(365*400+97)*24*Ko;function tu(s,e){return(s%e+e)%e}function Af(s,e,i){return s<100&&s>=0?new Date(s+400,e,i)-Ef:new Date(s,e,i).valueOf()}function kf(s,e,i){return s<100&&s>=0?Date.UTC(s+400,e,i)-Ef:Date.UTC(s,e,i)}function t1(s){var e;if(s=li(s),s===void 0||s==="millisecond"||!this.isValid())return this;var i=this._isUTC?kf:Af;switch(s){case"year":e=i(this.year(),0,1);break;case"quarter":e=i(this.year(),this.month()-this.month()%3,1);break;case"month":e=i(this.year(),this.month(),1);break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=i(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=tu(e+(this._isUTC?0:this.utcOffset()*eu),Ko);break;case"minute":e=this._d.valueOf(),e-=tu(e,eu);break;case"second":e=this._d.valueOf(),e-=tu(e,qo);break}return this._d.setTime(e),ze.updateOffset(this,!0),this}function r1(s){var e;if(s=li(s),s===void 0||s==="millisecond"||!this.isValid())return this;var i=this._isUTC?kf:Af;switch(s){case"year":e=i(this.year()+1,0,1)-1;break;case"quarter":e=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=i(this.year(),this.month()+1,1)-1;break;case"week":e=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ko-tu(e+(this._isUTC?0:this.utcOffset()*eu),Ko)-1;break;case"minute":e=this._d.valueOf(),e+=eu-tu(e,eu)-1;break;case"second":e=this._d.valueOf(),e+=qo-tu(e,qo)-1;break}return this._d.setTime(e),ze.updateOffset(this,!0),this}function i1(){return this._d.valueOf()-(this._offset||0)*6e4}function s1(){return Math.floor(this.valueOf()/1e3)}function u1(){return new Date(this.valueOf())}function n1(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function o1(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function a1(){return this.isValid()?this.toISOString():null}function l1(){return ih(this)}function c1(){return g0({},ht(this))}function d1(){return ht(this).overflow}function h1(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ut(0,["gg",2],0,function(){return this.weekYear()%100});ut(0,["GG",2],0,function(){return this.isoWeekYear()%100});function $a(s,e){ut(0,[s,s.length],0,e)}$a("gggg","weekYear");$a("ggggg","weekYear");$a("GGGG","isoWeekYear");$a("GGGGG","isoWeekYear");yr("weekYear","gg");yr("isoWeekYear","GG");xr("weekYear",1);xr("isoWeekYear",1);Je("G",Da);Je("g",Da);Je("GG",It,Vr);Je("gg",It,Vr);Je("GGGG",ah,oh);Je("gggg",ah,oh);Je("GGGGG",ja,ka);Je("ggggg",ja,ka);On(["gggg","ggggg","GGGG","GGGGG"],function(s,e,i,t){e[t.substr(0,2)]=gt(s)});On(["gg","GG"],function(s,e,i,t){e[t]=ze.parseTwoDigitYear(s)});function g1(s){return Sf.call(this,s,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function F1(s){return Sf.call(this,s,this.isoWeek(),this.isoWeekday(),1,4)}function p1(){return gs(this.year(),1,4)}function f1(){var s=this.localeData()._week;return gs(this.year(),s.dow,s.doy)}function Sf(s,e,i,t,r){var u;return s==null?yn(this,t,r).year:(u=gs(s,t,r),e>u&&(e=u),m1.call(this,s,e,i,t,r))}function m1(s,e,i,t,r){var u=of(s,e,i,t,r),n=wn(u.year,0,u.dayOfYear);return this.year(n.getUTCFullYear()),this.month(n.getUTCMonth()),this.date(n.getUTCDate()),this}ut("Q",0,"Qo","quarter");yr("quarter","Q");xr("quarter",7);Je("Q",qp);Rt("Q",function(s,e){e[Xi]=(gt(s)-1)*3});function v1(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}ut("D",["DD",2],"Do","date");yr("date","D");xr("date",9);Je("D",It);Je("DD",It,Vr);Je("Do",function(s,e){return s?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});Rt(["D","DD"],Mi);Rt("Do",function(s,e){e[Mi]=gt(s.match(It)[0])});var jf=mu("Date",!0);ut("DDD",["DDDD",3],"DDDo","dayOfYear");yr("dayOfYear","DDD");xr("dayOfYear",4);Je("DDD",Sa);Je("DDDD",Kp);Rt(["DDD","DDDD"],function(s,e,i){i._dayOfYear=gt(s)});function b1(s){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return s==null?e:this.add(s-e,"d")}ut("m",["mm",2],0,"minute");yr("minute","m");xr("minute",14);Je("m",It);Je("mm",It,Vr);Rt(["m","mm"],pi);var w1=mu("Minutes",!1);ut("s",["ss",2],0,"second");yr("second","s");xr("second",15);Je("s",It);Je("ss",It,Vr);Rt(["s","ss"],Gi);var y1=mu("Seconds",!1);ut("S",0,0,function(){return~~(this.millisecond()/100)});ut(0,["SS",2],0,function(){return~~(this.millisecond()/10)});ut(0,["SSS",3],0,"millisecond");ut(0,["SSSS",4],0,function(){return this.millisecond()*10});ut(0,["SSSSS",5],0,function(){return this.millisecond()*100});ut(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});ut(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});ut(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});ut(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});yr("millisecond","ms");xr("millisecond",16);Je("S",Sa,qp);Je("SS",Sa,Vr);Je("SSS",Sa,Kp);var F0;for(F0="SSSS";F0.length<=9;F0+="S")Je(F0,X3);function x1(s,e){e[os]=gt(("0."+s)*1e3)}for(F0="S";F0.length<=9;F0+="S")Rt(F0,x1);var C1=mu("Milliseconds",!1);ut("z",0,0,"zoneAbbr");ut("zz",0,0,"zoneName");function E1(){return this._isUTC?"UTC":""}function A1(){return this._isUTC?"Coordinated Universal Time":""}var $e=Rn.prototype;$e.add=$C;$e.calendar=BC;$e.clone=OC;$e.diff=VC;$e.endOf=r1;$e.format=KC;$e.from=JC;$e.fromNow=ZC;$e.to=QC;$e.toNow=e1;$e.get=rx;$e.invalidAt=d1;$e.isAfter=NC;$e.isBefore=WC;$e.isBetween=zC;$e.isSame=HC;$e.isSameOrAfter=UC;$e.isSameOrBefore=YC;$e.isValid=l1;$e.lang=xf;$e.locale=yf;$e.localeData=Cf;$e.max=FC;$e.min=gC;$e.parsingFlags=c1;$e.set=ix;$e.startOf=t1;$e.subtract=IC;$e.toArray=n1;$e.toObject=o1;$e.toDate=u1;$e.toISOString=GC;$e.inspect=qC;$e.toJSON=a1;$e.toString=XC;$e.unix=s1;$e.valueOf=i1;$e.creationData=h1;$e.year=Qp;$e.isLeapYear=tx;$e.weekYear=g1;$e.isoWeekYear=F1;$e.quarter=$e.quarters=v1;$e.month=uf;$e.daysInMonth=cx;$e.week=$e.weeks=wx;$e.isoWeek=$e.isoWeeks=yx;$e.weeksInYear=f1;$e.isoWeeksInYear=p1;$e.date=jf;$e.day=$e.days=_x;$e.weekday=Lx;$e.isoWeekday=Tx;$e.dayOfYear=b1;$e.hour=$e.hours=Ux;$e.minute=$e.minutes=w1;$e.second=$e.seconds=y1;$e.millisecond=$e.milliseconds=C1;$e.utcOffset=xC;$e.utc=EC;$e.local=AC;$e.parseZone=kC;$e.hasAlignedHourOffset=SC;$e.isDST=jC;$e.isLocal=MC;$e.isUtcOffset=_C;$e.isUtc=vf;$e.isUTC=vf;$e.zoneAbbr=E1;$e.zoneName=A1;$e.dates=ai("dates accessor is deprecated. Use date instead.",jf);$e.months=ai("months accessor is deprecated. Use month instead",uf);$e.years=ai("years accessor is deprecated. Use year instead",Qp);$e.zone=ai("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",CC);$e.isDSTShifted=ai("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",DC);function k1(s){return $t(s*1e3)}function S1(){return $t.apply(null,arguments).parseZone()}function Df(s){return s}var Pt=uh.prototype;Pt.calendar=T3;Pt.longDateFormat=$3;Pt.invalidDate=R3;Pt.ordinal=N3;Pt.preparse=Df;Pt.postformat=Df;Pt.relativeTime=z3;Pt.pastFuture=H3;Pt.set=_3;Pt.months=nx;Pt.monthsShort=ox;Pt.monthsParse=lx;Pt.monthsRegex=Fx;Pt.monthsShortRegex=hx;Pt.week=fx;Pt.firstDayOfYear=bx;Pt.firstDayOfWeek=vx;Pt.weekdays=Ax;Pt.weekdaysMin=jx;Pt.weekdaysShort=kx;Pt.weekdaysParse=Mx;Pt.weekdaysRegex=$x;Pt.weekdaysShortRegex=Rx;Pt.weekdaysMinRegex=Ox;Pt.isPM=Wx;Pt.meridiem=Hx;function Jo(s,e,i,t){var r=k0(),u=Ii().set(t,e);return r[i](u,s)}function Mf(s,e,i){if(fs(s)&&(e=s,s=void 0),s=s||"",e!=null)return Jo(s,e,i,"month");var t,r=[];for(t=0;t<12;t++)r[t]=Jo(s,t,i,"month");return r}function vh(s,e,i,t){typeof s=="boolean"?(fs(e)&&(i=e,e=void 0),e=e||""):(e=s,i=e,s=!1,fs(e)&&(i=e,e=void 0),e=e||"");var r=k0(),u=s?r._week.dow:0;if(i!=null)return Jo(e,(i+u)%7,t,"day");var n,a=[];for(n=0;n<7;n++)a[n]=Jo(e,(n+u)%7,t,"day");return a}function j1(s,e){return Mf(s,e,"months")}function D1(s,e){return Mf(s,e,"monthsShort")}function M1(s,e,i){return vh(s,e,i,"weekdays")}function _1(s,e,i){return vh(s,e,i,"weekdaysShort")}function L1(s,e,i){return vh(s,e,i,"weekdaysMin")}vu("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var e=s%10,i=gt(s%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return s+i}});ze.lang=ai("moment.lang is deprecated. Use moment.locale instead.",vu);ze.langData=ai("moment.langData is deprecated. Use moment.localeData instead.",k0);var Hi=Math.abs;function T1(){var s=this._data;return this._milliseconds=Hi(this._milliseconds),this._days=Hi(this._days),this._months=Hi(this._months),s.milliseconds=Hi(s.milliseconds),s.seconds=Hi(s.seconds),s.minutes=Hi(s.minutes),s.hours=Hi(s.hours),s.months=Hi(s.months),s.years=Hi(s.years),this}function _f(s,e,i,t){var r=xi(e,i);return s._milliseconds+=t*r._milliseconds,s._days+=t*r._days,s._months+=t*r._months,s._bubble()}function P1(s,e){return _f(this,s,e,1)}function $1(s,e){return _f(this,s,e,-1)}function Z2(s){return s<0?Math.floor(s):Math.ceil(s)}function I1(){var s=this._milliseconds,e=this._days,i=this._months,t=this._data,r,u,n,a,o;return s>=0&&e>=0&&i>=0||s<=0&&e<=0&&i<=0||(s+=Z2(Sc(i)+e)*864e5,e=0,i=0),t.milliseconds=s%1e3,r=ii(s/1e3),t.seconds=r%60,u=ii(r/60),t.minutes=u%60,n=ii(u/60),t.hours=n%24,e+=ii(n/24),o=ii(Lf(e)),i+=o,e-=Z2(Sc(o)),a=ii(i/12),i%=12,t.days=e,t.months=i,t.years=a,this}function Lf(s){return s*4800/146097}function Sc(s){return s*146097/4800}function R1(s){if(!this.isValid())return NaN;var e,i,t=this._milliseconds;if(s=li(s),s==="month"||s==="quarter"||s==="year")switch(e=this._days+t/864e5,i=this._months+Lf(e),s){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(e=this._days+Math.round(Sc(this._months)),s){case"week":return e/7+t/6048e5;case"day":return e+t/864e5;case"hour":return e*24+t/36e5;case"minute":return e*1440+t/6e4;case"second":return e*86400+t/1e3;case"millisecond":return Math.floor(e*864e5)+t;default:throw new Error("Unknown unit "+s)}}function B1(){return this.isValid()?this._milliseconds+this._days*864e5+this._months%12*2592e6+gt(this._months/12)*31536e6:NaN}function Zi(s){return function(){return this.as(s)}}var O1=Zi("ms"),N1=Zi("s"),W1=Zi("m"),z1=Zi("h"),H1=Zi("d"),U1=Zi("w"),Y1=Zi("M"),V1=Zi("Q"),X1=Zi("y");function G1(){return xi(this)}function q1(s){return s=li(s),this.isValid()?this[s+"s"]():NaN}function As(s){return function(){return this.isValid()?this._data[s]:NaN}}var K1=As("milliseconds"),J1=As("seconds"),Z1=As("minutes"),Q1=As("hours"),eE=As("days"),tE=As("months"),rE=As("years");function iE(){return ii(this.days()/7)}var c0=Math.round,ji={ss:44,s:45,m:45,h:22,d:26,M:11};function sE(s,e,i,t,r){return r.relativeTime(e||1,!!i,s,t)}function uE(s,e,i){var t=xi(s).abs(),r=c0(t.as("s")),u=c0(t.as("m")),n=c0(t.as("h")),a=c0(t.as("d")),o=c0(t.as("M")),h=c0(t.as("y")),g=r<=ji.ss&&["s",r]||r<ji.s&&["ss",r]||u<=1&&["m"]||u<ji.m&&["mm",u]||n<=1&&["h"]||n<ji.h&&["hh",n]||a<=1&&["d"]||a<ji.d&&["dd",a]||o<=1&&["M"]||o<ji.M&&["MM",o]||h<=1&&["y"]||["yy",h];return g[2]=e,g[3]=+s>0,g[4]=i,sE.apply(null,g)}function nE(s){return s===void 0?c0:typeof s=="function"?(c0=s,!0):!1}function oE(s,e){return ji[s]===void 0?!1:e===void 0?ji[s]:(ji[s]=e,s==="s"&&(ji.ss=e-1),!0)}function aE(s){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),i=uE(this,!s,e);return s&&(i=e.pastFuture(+this,i)),e.postformat(i)}var Tl=Math.abs;function Rs(s){return(s>0)-(s<0)||+s}function Ia(){if(!this.isValid())return this.localeData().invalidDate();var s=Tl(this._milliseconds)/1e3,e=Tl(this._days),i=Tl(this._months),t,r,u;t=ii(s/60),r=ii(t/60),s%=60,t%=60,u=ii(i/12),i%=12;var n=u,a=i,o=e,h=r,g=t,l=s?s.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var d=c<0?"-":"",F=Rs(this._months)!==Rs(c)?"-":"",p=Rs(this._days)!==Rs(c)?"-":"",f=Rs(this._milliseconds)!==Rs(c)?"-":"";return d+"P"+(n?F+n+"Y":"")+(a?F+a+"M":"")+(o?p+o+"D":"")+(h||g||l?"T":"")+(h?f+h+"H":"")+(g?f+g+"M":"")+(l?f+l+"S":"")}var mt=Pa.prototype;mt.isValid=bC;mt.abs=T1;mt.add=P1;mt.subtract=$1;mt.as=R1;mt.asMilliseconds=O1;mt.asSeconds=N1;mt.asMinutes=W1;mt.asHours=z1;mt.asDays=H1;mt.asWeeks=U1;mt.asMonths=Y1;mt.asQuarters=V1;mt.asYears=X1;mt.valueOf=B1;mt._bubble=I1;mt.clone=G1;mt.get=q1;mt.milliseconds=K1;mt.seconds=J1;mt.minutes=Z1;mt.hours=Q1;mt.days=eE;mt.weeks=iE;mt.months=tE;mt.years=rE;mt.humanize=aE;mt.toISOString=Ia;mt.toString=Ia;mt.toJSON=Ia;mt.locale=yf;mt.localeData=Cf;mt.toIsoString=ai("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ia);mt.lang=xf;ut("X",0,0,"unix");ut("x",0,0,"valueOf");Je("x",Da);Je("X",q3);Rt("X",function(s,e,i){i._d=new Date(parseFloat(s,10)*1e3)});Rt("x",function(s,e,i){i._d=new Date(gt(s))});//! moment.js
//! version : 2.24.0
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
ze.version="2.24.0";j3($t);ze.fn=$e;ze.min=pC;ze.max=fC;ze.now=mC;ze.utc=Ii;ze.unix=k1;ze.months=j1;ze.isDate=Ea;ze.locale=vu;ze.invalid=Aa;ze.duration=xi;ze.isMoment=$i;ze.weekdays=M1;ze.parseZone=S1;ze.localeData=k0;ze.isDuration=Ec;ze.monthsShort=D1;ze.weekdaysMin=L1;ze.defineLocale=hh;ze.updateLocale=Vx;ze.locales=Xx;ze.weekdaysShort=_1;ze.normalizeUnits=li;ze.relativeTimeRounding=nE;ze.relativeTimeThreshold=oE;ze.calendarFormat=RC;ze.prototype=$e;ze.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};var _e=Fe.clone(er.Events);let Tf;var Cn={},Pf=1024*1024*64;function ks(){return Tf}function $f(s){Tf=s.replace(/\/$/,"")}const Ve=function(s){s=s||{};const e={girderToken:bh()||window.localStorage.getItem("girderToken"),error:(t,r)=>{let u;if(t.status===401)S0(null),bu(null),_e.trigger("g:loginUi"),u={text:"You must log in to view this resource",type:"warning",timeout:4e3,icon:"info"};else if(t.status===403)u={text:"Access denied. See the console for more details.",type:"danger",timeout:5e3,icon:"attention"};else{if(t.status===0&&t.statusText==="abort")return;t.status===500&&t.responseJSON&&t.responseJSON.type==="girder"?u={text:t.responseJSON.message,type:"warning",timeout:5e3,icon:"info"}:r==="parsererror"?u={text:"A parser error occurred while communicating with the server (did you use the correct value for `dataType`?). Details have been logged in the console.",type:"danger",timeout:5e3,icon:"attention"}:u={text:"An error occurred while communicating with the server. Details have been logged in the console.",type:"danger",timeout:5e3,icon:"attention"}}_e.trigger("g:alert",u),console.error(t.status+" "+t.statusText,t.responseText)}},i=Fe.extend({},e,s);try{(!i.method||i.method==="GET"||i.method==="PUT")&&i.data&&!i.contentType&&JSON.stringify(i.data).length>1536&&(i.headers=i.header||{},i.headers["X-HTTP-Method-Override"]=i.method||"GET",i.method="POST")}catch{}if(!i.url)throw new Error('restRequest requires a "url" argument');return i.url=`${ks()}${i.url.substring(0,1)==="/"?"":"/"}${i.url}`,i.girderToken&&(i.headers=i.headers||{},i.headers["Girder-Token"]=i.girderToken,delete i.girderToken),er.$.ajax(i)};er.ajax=Ve;var nu={},Pl=0;me(document).ajaxSend(function(s,e){Pl+=1,e.girderXhrNumber=Pl,nu[Pl]=e});me(document).ajaxComplete(function(s,e){var i=e.girderXhrNumber;i&&nu[i]&&delete nu[i]});function lE(s){return s?Fe.filter(nu,function(e){return e.girder&&e.girder[s]}).length:Fe.size(nu)}function kr(s){Fe.each(nu,function(e){s&&(!e.girder||!e.girder[s])||e.abort&&e.abort()})}function If(){return Pf}function cE(s){Pf=s}const dE=Object.freeze(Object.defineProperty({__proto__:null,cancelRestRequests:kr,getApiRoot:ks,getUploadChunkSize:If,numberOutstandingRestRequests:lE,restRequest:Ve,setApiRoot:$f,setUploadChunkSize:cE,uploadHandlers:Cn},Symbol.toStringTag,{value:"Module"}));var v0=er.Model.extend({resourceName:null,altUrl:null,idAttribute:"_id",increment:function(s,e){if(e===void 0&&(e=1),!!e)return this.set(s,this.get(s)+e)},name:function(){return this.get("name")},save:function(){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Model.");var s,e;this.has("_id")?(s=(this.altUrl||this.resourceName)+"/"+this.get("_id"),e="PUT"):(s=this.altUrl||this.resourceName,e="POST");var i={};return Fe.each(this.keys(),function(t){var r=this.get(t);Fe.isObject(r)||(i[t]=r)},this),Ve({url:s,method:e,data:i,error:null}).done(t=>{this.set(t),this.trigger("g:saved")}).fail(t=>{this.trigger("g:error",t)})},fetch:function(s){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Model.");s=s||{};var e={url:`${this.altUrl||this.resourceName}/${this.id}`};return s.extraPath&&(e.url+="/"+s.extraPath),s.ignoreError&&(e.error=null),s.data&&(e.data=s.data),Ve(e).done(i=>{this.set(i),s.extraPath?this.trigger("g:fetched."+s.extraPath):this.trigger("g:fetched")}).fail(i=>{this.trigger("g:error",i)})},downloadUrl:function(s){let e=`${ks()}/${this.altUrl||this.resourceName}/${this.id}/download`;return s&&(e+="?"+me.param(s)),e},download:function(){window.location.assign(this.downloadUrl())},destroy:function(s){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Model.");var e={url:`${this.altUrl||this.resourceName}/${this.id}`,method:"DELETE"};return s=s||{},s.progress===!0&&(e.url+="?progress=true"),s.throwError!==!1&&(e.error=null),Ve(e).done(()=>{this.collection&&this.collection.remove(this),this.trigger("g:deleted")}).fail(i=>{this.trigger("g:error",i)})},getAccessLevel:function(){return this.get("_accessLevel")}});function Ar(s){const e={timeout:null,streamPath:"/notification/stream"};return this.settings=Fe.extend(e,s),this._state="closed",this._eventSource=null,this._onVisibilityStateChange=Fe.bind(this._onVisibilityStateChange,this),this._onMessage=Fe.bind(this._onMessage,this),this._onError=Fe.bind(this._onError,this),Fe.extend(this,er.Events)}Ar.prototype._onVisibilityStateChange=function(){document.visibilityState==="visible"&&this._state==="stopped"?this._start():document.visibilityState==="hidden"&&this._state==="started"&&this._stop()};Ar.prototype._onMessage=function(s){let e;try{e=window.JSON.parse(s.data)}catch(i){console.error("Invalid JSON from SSE stream: "+s.data+","+i),this.trigger("g:error",s);return}Ar.setLastTimestamp(e._girderTime),this.trigger("g:event."+e.type,e)};Ar.prototype._onError=function(){Ve({url:this.settings.streamPath,method:"HEAD",error:null}).fail(s=>{s.status===503&&(this.trigger("g:eventStream.disable",s),this.close())})};Ar.prototype.open=function(){if(!window.EventSource){console.error("EventSource is not supported on this platform."),this.trigger("g:eventStream.disable");return}if(this._state!=="closed"){console.warn("EventStream should be closed.");return}this._state="stopped",this._start(),document.addEventListener("visibilitychange",this._onVisibilityStateChange)};Ar.prototype._start=function(){if(this._state!=="stopped"){console.warn("EventStream should be stopped");return}const s={};this.settings.timeout&&(s.timeout=this.settings.timeout);const e=Ar.getLastTimestamp();Fe.isNumber(e)&&(s.since=e);const i=ks()+this.settings.streamPath+"?"+me.param(s);this._eventSource=new window.EventSource(i),this._eventSource.onmessage=this._onMessage,this._eventSource.onerror=this._onError,this._state="started",this.trigger("g:eventStream.start")};Ar.prototype._stop=function(){if(this._state!=="started"){console.warn("EventStream should be started");return}this._eventSource.close(),this._eventSource=null,this._state="stopped",this.trigger("g:eventStream.stop")};Ar.prototype.close=function(){if(this._state==="closed"){console.warn("EventStream should not be closed");return}document.removeEventListener("visibilitychange",this._onVisibilityStateChange),this._state==="started"&&this._stop(),this._state="closed",this.trigger("g:eventStream.close")};Ar._lastTimestamp=null;Ar.setLastTimestamp=function(s){try{window.localStorage.setItem("sseTimestamp",s)}catch{}Ar._lastTimestamp=s};Ar.getLastTimestamp=function(){let s;try{s=parseInt(window.localStorage.getItem("sseTimestamp"),10)}catch{}return Fe.isNaN(s)?Ar._lastTimestamp:s};const Ti=new Ar;var pr=v0.extend({resourceName:"user",current:function(){wh().done(s=>{s?this.set(s):this.clear()})},name:function(){return this.get("firstName")+" "+this.get("lastName")},addToGroup:function(s){var e=this.get("groups")||[];e.push(s),this.set("groups",e)},removeFromGroup:function(s){for(var e=this.get("groups")||[],i=e.indexOf(s);i>=0;)e.splice(i,1),i=e.indexOf(s);this.set("groups",e)},addInvitation:function(s,e){var i=this.get("groupInvites")||[];i.push({groupId:s,level:e}),this.set("groupInvites",i)},removeInvitation:function(s){var e=this.get("groupInvites")||[],i=Fe.reject(e,Fe.matcher({groupId:s}));this.set("groupInvites",i)},changePassword:function(s,e){return Ve({url:`${this.resourceName}/password`,data:{old:s,new:e},method:"PUT",error:null}).done(()=>{this.trigger("g:passwordChanged")}).fail(i=>{this.trigger("g:error",i)})},adminChangePassword:function(s){return Ve({url:`${this.resourceName}/${this.id}/password`,data:{password:s},method:"PUT",error:null}).done(()=>{this.trigger("g:passwordChanged")}).fail(e=>{this.trigger("g:error",e)})},initializeEnableOtp:function(){return Ve({url:`user/${this.id}/otp`,method:"POST",error:null}).then(s=>s.totpUri)},finializeEnableOtp:function(s){return Ve({url:`user/${this.id}/otp`,method:"PUT",headers:{"Girder-OTP":s},error:null}).done(()=>{this.set("otp",!0)})},disableOtp:function(){return Ve({url:`user/${this.id}/otp`,method:"DELETE",error:null}).done(()=>{this.set("otp",!1)})}},{fromTemporaryToken:function(s,e){return Ve({url:`user/password/temporary/${s}`,method:"GET",data:{token:e},error:null}).done(i=>{i.user.token=i.authToken.token,Ti.close(),S0(new pr(i.user)),bu(i.authToken.token),Ti.open(),_e.trigger("g:login-changed")})},sendVerificationEmail:function(s){return Ve({url:"user/verification",method:"POST",data:{login:s},error:null})}}),hE=!1,Rf=null,Bf=window.localStorage.getItem("girderToken");function it(){return Rf}function S0(s){Rf=s}function bh(){return Bf}function bu(s){Bf=s}function wh(){return Ve({method:"GET",url:"/user/me"})}function gE(s,e){const t=new TextEncoder().encode(s+":"+e);return"Basic "+btoa(String.fromCharCode(...t))}function Of(s,e,i=null){var t=gE(s,e);const r={Authorization:t};return Fe.isString(i)&&(r["Girder-OTP"]=i),Ve({method:"GET",url:"/user/authentication",headers:r,error:null}).then(function(u){return u.user.token=u.authToken,S0(new pr(u.user)),bu(u.user.token.token),window.localStorage.setItem("girderToken",u.user.token.token),_e.trigger("g:login.success",u.user),_e.trigger("g:login",u),u.user}).fail(function(u){_e.trigger("g:login.error",u.status,u)})}function Nf(){return Ve({method:"DELETE",url:"/user/authentication"}).done(function(){S0(null),bu(null),window.localStorage.removeItem("girderToken"),_e.trigger("g:login",null),_e.trigger("g:logout.success")}).fail(function(s){_e.trigger("g:logout.error",s.status,s)})}const FE=Object.freeze(Object.defineProperty({__proto__:null,corsAuth:hE,fetchCurrentUser:wh,getCurrentToken:bh,getCurrentUser:it,login:Of,logout:Nf,setCurrentToken:bu,setCurrentUser:S0},Symbol.toStringTag,{value:"Module"}));var ms=v0.extend({updateAccess:function(s){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Model.");return Ve({url:`${this.altUrl||this.resourceName}/${this.id}/access`,method:"PUT",data:Fe.extend({access:JSON.stringify(this.get("access")),public:this.get("public"),publicFlags:JSON.stringify(this.get("publicFlags")||[])},s||{})}).done(()=>{this.trigger("g:accessListSaved")}).fail(e=>{this.trigger("g:error",e)})},fetchAccess:function(s){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Model.");return!this.get("access")||s?Ve({url:`${this.altUrl||this.resourceName}/${this.id}/access`,method:"GET"}).done(e=>(e.access?this.set(e):this.set("access",e),this.trigger("g:accessFetched"),e)).fail(e=>{this.trigger("g:error",e)}):(this.trigger("g:accessFetched"),me.Deferred().resolve(this.get("access")).promise())}}),yh=ms.extend({resourceName:"api_key",setActive:function(s){return Ve({url:`api_key/${this.id}`,method:"PUT",data:{active:s}}).done(()=>{this.set({active:s}),this.trigger("g:setActive")})},save:function(){var s=this.get("scope");this.set("scope",JSON.stringify(s),{silent:!0});var e=ms.prototype.save.call(this,arguments);return this.set("scope",s,{silent:!0}),e}}),cn=1,Wf=-1,zf=["January","February","March","April","May","June","July","August","September","October","November","December"],Xe={NONE:-1,READ:0,WRITE:1,ADMIN:2},bi={FILESYSTEM:0,S3:2},Gu={DEFAULT:"default",EMPTY:"empty"};const pE=Object.freeze(Object.defineProperty({__proto__:null,AccessType:Xe,AssetstoreType:bi,Layout:Gu,MONTHS:zf,SORT_ASC:cn,SORT_DESC:Wf},Symbol.toStringTag,{value:"Module"}));var lo;function Hf(s){return lo=lo||document.createElement("textarea"),lo.innerHTML="&"+s+";",lo.value}var fE=Object.prototype.hasOwnProperty;function mE(s,e){return s?fE.call(s,e):!1}function Uf(s){var e=[].slice.call(arguments,1);return e.forEach(function(i){if(i){if(typeof i!="object")throw new TypeError(i+"must be object");Object.keys(i).forEach(function(t){s[t]=i[t]})}}),s}var vE=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function En(s){return s.indexOf("\\")<0?s:s.replace(vE,"$1")}function Yf(s){return!(s>=55296&&s<=57343||s>=64976&&s<=65007||(s&65535)===65535||(s&65535)===65534||s>=0&&s<=8||s===11||s>=14&&s<=31||s>=127&&s<=159||s>1114111)}function jc(s){if(s>65535){s-=65536;var e=55296+(s>>10),i=56320+(s&1023);return String.fromCharCode(e,i)}return String.fromCharCode(s)}var bE=/&([a-z#][a-z0-9]{1,31});/gi,wE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function yE(s,e){var i=0,t=Hf(e);return e!==t?t:e.charCodeAt(0)===35&&wE.test(e)&&(i=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10),Yf(i))?jc(i):s}function vs(s){return s.indexOf("&")<0?s:s.replace(bE,yE)}var xE=/[&<>"]/,CE=/[&<>"]/g,EE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function AE(s){return EE[s]}function Pr(s){return xE.test(s)?s.replace(CE,AE):s}var Ue={};Ue.blockquote_open=function(){return`<blockquote>
`};Ue.blockquote_close=function(s,e){return"</blockquote>"+Ss(s,e)};Ue.code=function(s,e){return s[e].block?"<pre><code>"+Pr(s[e].content)+"</code></pre>"+Ss(s,e):"<code>"+Pr(s[e].content)+"</code>"};Ue.fence=function(s,e,i,t,r){var u=s[e],n="",a=i.langPrefix,o="",h,g,l;if(u.params){if(h=u.params.split(/\s+/g),g=h.join(" "),mE(r.rules.fence_custom,h[0]))return r.rules.fence_custom[h[0]](s,e,i,t,r);o=Pr(vs(En(g))),n=' class="'+a+o+'"'}return i.highlight?l=i.highlight.apply(i.highlight,[u.content].concat(h))||Pr(u.content):l=Pr(u.content),"<pre><code"+n+">"+l+"</code></pre>"+Ss(s,e)};Ue.fence_custom={};Ue.heading_open=function(s,e){return"<h"+s[e].hLevel+">"};Ue.heading_close=function(s,e){return"</h"+s[e].hLevel+`>
`};Ue.hr=function(s,e,i){return(i.xhtmlOut?"<hr />":"<hr>")+Ss(s,e)};Ue.bullet_list_open=function(){return`<ul>
`};Ue.bullet_list_close=function(s,e){return"</ul>"+Ss(s,e)};Ue.list_item_open=function(){return"<li>"};Ue.list_item_close=function(){return`</li>
`};Ue.ordered_list_open=function(s,e){var i=s[e],t=i.order>1?' start="'+i.order+'"':"";return"<ol"+t+`>
`};Ue.ordered_list_close=function(s,e){return"</ol>"+Ss(s,e)};Ue.paragraph_open=function(s,e){return s[e].tight?"":"<p>"};Ue.paragraph_close=function(s,e){var i=!(s[e].tight&&e&&s[e-1].type==="inline"&&!s[e-1].content);return(s[e].tight?"":"</p>")+(i?Ss(s,e):"")};Ue.link_open=function(s,e,i){var t=s[e].title?' title="'+Pr(vs(s[e].title))+'"':"",r=i.linkTarget?' target="'+i.linkTarget+'"':"";return'<a href="'+Pr(s[e].href)+'"'+t+r+">"};Ue.link_close=function(){return"</a>"};Ue.image=function(s,e,i){var t=' src="'+Pr(s[e].src)+'"',r=s[e].title?' title="'+Pr(vs(s[e].title))+'"':"",u=' alt="'+(s[e].alt?Pr(vs(En(s[e].alt))):"")+'"',n=i.xhtmlOut?" /":"";return"<img"+t+u+r+n+">"};Ue.table_open=function(){return`<table>
`};Ue.table_close=function(){return`</table>
`};Ue.thead_open=function(){return`<thead>
`};Ue.thead_close=function(){return`</thead>
`};Ue.tbody_open=function(){return`<tbody>
`};Ue.tbody_close=function(){return`</tbody>
`};Ue.tr_open=function(){return"<tr>"};Ue.tr_close=function(){return`</tr>
`};Ue.th_open=function(s,e){var i=s[e];return"<th"+(i.align?' style="text-align:'+i.align+'"':"")+">"};Ue.th_close=function(){return"</th>"};Ue.td_open=function(s,e){var i=s[e];return"<td"+(i.align?' style="text-align:'+i.align+'"':"")+">"};Ue.td_close=function(){return"</td>"};Ue.strong_open=function(){return"<strong>"};Ue.strong_close=function(){return"</strong>"};Ue.em_open=function(){return"<em>"};Ue.em_close=function(){return"</em>"};Ue.del_open=function(){return"<del>"};Ue.del_close=function(){return"</del>"};Ue.ins_open=function(){return"<ins>"};Ue.ins_close=function(){return"</ins>"};Ue.mark_open=function(){return"<mark>"};Ue.mark_close=function(){return"</mark>"};Ue.sub=function(s,e){return"<sub>"+Pr(s[e].content)+"</sub>"};Ue.sup=function(s,e){return"<sup>"+Pr(s[e].content)+"</sup>"};Ue.hardbreak=function(s,e,i){return i.xhtmlOut?`<br />
`:`<br>
`};Ue.softbreak=function(s,e,i){return i.breaks?i.xhtmlOut?`<br />
`:`<br>
`:`
`};Ue.text=function(s,e){return Pr(s[e].content)};Ue.htmlblock=function(s,e){return s[e].content};Ue.htmltag=function(s,e){return s[e].content};Ue.abbr_open=function(s,e){return'<abbr title="'+Pr(vs(s[e].title))+'">'};Ue.abbr_close=function(){return"</abbr>"};Ue.footnote_ref=function(s,e){var i=Number(s[e].id+1).toString(),t="fnref"+i;return s[e].subId>0&&(t+=":"+s[e].subId),'<sup class="footnote-ref"><a href="#fn'+i+'" id="'+t+'">['+i+"]</a></sup>"};Ue.footnote_block_open=function(s,e,i){var t=i.xhtmlOut?`<hr class="footnotes-sep" />
`:`<hr class="footnotes-sep">
`;return t+`<section class="footnotes">
<ol class="footnotes-list">
`};Ue.footnote_block_close=function(){return`</ol>
</section>
`};Ue.footnote_open=function(s,e){var i=Number(s[e].id+1).toString();return'<li id="fn'+i+'"  class="footnote-item">'};Ue.footnote_close=function(){return`</li>
`};Ue.footnote_anchor=function(s,e){var i=Number(s[e].id+1).toString(),t="fnref"+i;return s[e].subId>0&&(t+=":"+s[e].subId),' <a href="#'+t+'" class="footnote-backref">↩</a>'};Ue.dl_open=function(){return`<dl>
`};Ue.dt_open=function(){return"<dt>"};Ue.dd_open=function(){return"<dd>"};Ue.dl_close=function(){return`</dl>
`};Ue.dt_close=function(){return`</dt>
`};Ue.dd_close=function(){return`</dd>
`};function Vf(s,e){return++e>=s.length-2?e:s[e].type==="paragraph_open"&&s[e].tight&&s[e+1].type==="inline"&&s[e+1].content.length===0&&s[e+2].type==="paragraph_close"&&s[e+2].tight?Vf(s,e+2):e}var Ss=Ue.getBreak=function(e,i){return i=Vf(e,i),i<e.length&&e[i].type==="list_item_close"?"":`
`};function xh(){this.rules=Uf({},Ue),this.getBreak=Ue.getBreak}xh.prototype.renderInline=function(s,e,i){for(var t=this.rules,r=s.length,u=0,n="";r--;)n+=t[s[u].type](s,u++,e,i,this);return n};xh.prototype.render=function(s,e,i){for(var t=this.rules,r=s.length,u=-1,n="";++u<r;)s[u].type==="inline"?n+=this.renderInline(s[u].children,e,i):n+=t[s[u].type](s,u,e,i,this);return n};function Xr(){this.__rules__=[],this.__cache__=null}Xr.prototype.__find__=function(s){for(var e=this.__rules__.length,i=-1;e--;)if(this.__rules__[++i].name===s)return i;return-1};Xr.prototype.__compile__=function(){var s=this,e=[""];s.__rules__.forEach(function(i){i.enabled&&i.alt.forEach(function(t){e.indexOf(t)<0&&e.push(t)})}),s.__cache__={},e.forEach(function(i){s.__cache__[i]=[],s.__rules__.forEach(function(t){t.enabled&&(i&&t.alt.indexOf(i)<0||s.__cache__[i].push(t.fn))})})};Xr.prototype.at=function(s,e,i){var t=this.__find__(s),r=i||{};if(t===-1)throw new Error("Parser rule not found: "+s);this.__rules__[t].fn=e,this.__rules__[t].alt=r.alt||[],this.__cache__=null};Xr.prototype.before=function(s,e,i,t){var r=this.__find__(s),u=t||{};if(r===-1)throw new Error("Parser rule not found: "+s);this.__rules__.splice(r,0,{name:e,enabled:!0,fn:i,alt:u.alt||[]}),this.__cache__=null};Xr.prototype.after=function(s,e,i,t){var r=this.__find__(s),u=t||{};if(r===-1)throw new Error("Parser rule not found: "+s);this.__rules__.splice(r+1,0,{name:e,enabled:!0,fn:i,alt:u.alt||[]}),this.__cache__=null};Xr.prototype.push=function(s,e,i){var t=i||{};this.__rules__.push({name:s,enabled:!0,fn:e,alt:t.alt||[]}),this.__cache__=null};Xr.prototype.enable=function(s,e){s=Array.isArray(s)?s:[s],e&&this.__rules__.forEach(function(i){i.enabled=!1}),s.forEach(function(i){var t=this.__find__(i);if(t<0)throw new Error("Rules manager: invalid rule name "+i);this.__rules__[t].enabled=!0},this),this.__cache__=null};Xr.prototype.disable=function(s){s=Array.isArray(s)?s:[s],s.forEach(function(e){var i=this.__find__(e);if(i<0)throw new Error("Rules manager: invalid rule name "+e);this.__rules__[i].enabled=!1},this),this.__cache__=null};Xr.prototype.getRules=function(s){return this.__cache__===null&&this.__compile__(),this.__cache__[s]||[]};function kE(s){s.inlineMode?s.tokens.push({type:"inline",content:s.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):s.block.parse(s.src,s.options,s.env,s.tokens)}function js(s,e,i,t,r){this.src=s,this.env=t,this.options=i,this.parser=e,this.tokens=r,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent="",this.labelUnmatchedScopes=0}js.prototype.pushPending=function(){this.tokens.push({type:"text",content:this.pending,level:this.pendingLevel}),this.pending=""};js.prototype.push=function(s){this.pending&&this.pushPending(),this.tokens.push(s),this.pendingLevel=this.level};js.prototype.cacheSet=function(s,e){for(var i=this.cache.length;i<=s;i++)this.cache.push(0);this.cache[s]=e};js.prototype.cacheGet=function(s){return s<this.cache.length?this.cache[s]:0};function An(s,e){var i,t,r,u=-1,n=s.posMax,a=s.pos,o=s.isInLabel;if(s.isInLabel)return-1;if(s.labelUnmatchedScopes)return s.labelUnmatchedScopes--,-1;for(s.pos=e+1,s.isInLabel=!0,i=1;s.pos<n;){if(r=s.src.charCodeAt(s.pos),r===91)i++;else if(r===93&&(i--,i===0)){t=!0;break}s.parser.skipToken(s)}return t?(u=s.pos,s.labelUnmatchedScopes=0):s.labelUnmatchedScopes=i-1,s.pos=a,s.isInLabel=o,u}function SE(s,e,i,t){var r,u,n,a,o,h;if(s.charCodeAt(0)!==42||s.charCodeAt(1)!==91||s.indexOf("]:")===-1||(r=new js(s,e,i,t,[]),u=An(r,1),u<0||s.charCodeAt(u+1)!==58))return-1;for(a=r.posMax,n=u+2;n<a&&r.src.charCodeAt(n)!==10;n++);return o=s.slice(2,u),h=s.slice(u+2,n).trim(),h.length===0?-1:(t.abbreviations||(t.abbreviations={}),typeof t.abbreviations[":"+o]>"u"&&(t.abbreviations[":"+o]=h),n)}function jE(s){var e=s.tokens,i,t,r,u;if(!s.inlineMode){for(i=1,t=e.length-1;i<t;i++)if(e[i-1].type==="paragraph_open"&&e[i].type==="inline"&&e[i+1].type==="paragraph_close"){for(r=e[i].content;r.length&&(u=SE(r,s.inline,s.options,s.env),!(u<0));)r=r.slice(u).trim();e[i].content=r,r.length||(e[i-1].tight=!0,e[i+1].tight=!0)}}}function Dc(s){var e=vs(s);try{e=decodeURI(e)}catch{}return encodeURI(e)}function Xf(s,e){var i,t,r,u=e,n=s.posMax;if(s.src.charCodeAt(e)===60){for(e++;e<n;){if(i=s.src.charCodeAt(e),i===10)return!1;if(i===62)return r=Dc(En(s.src.slice(u+1,e))),s.parser.validateLink(r)?(s.pos=e+1,s.linkContent=r,!0):!1;if(i===92&&e+1<n){e+=2;continue}e++}return!1}for(t=0;e<n&&(i=s.src.charCodeAt(e),!(i===32||i<32||i===127));){if(i===92&&e+1<n){e+=2;continue}if(i===40&&(t++,t>1)||i===41&&(t--,t<0))break;e++}return u===e||(r=En(s.src.slice(u,e)),!s.parser.validateLink(r))?!1:(s.linkContent=r,s.pos=e,!0)}function Gf(s,e){var i,t=e,r=s.posMax,u=s.src.charCodeAt(e);if(u!==34&&u!==39&&u!==40)return!1;for(e++,u===40&&(u=41);e<r;){if(i=s.src.charCodeAt(e),i===u)return s.pos=e+1,s.linkContent=En(s.src.slice(t+1,e)),!0;if(i===92&&e+1<r){e+=2;continue}e++}return!1}function qf(s){return s.trim().replace(/\s+/g," ").toUpperCase()}function DE(s,e,i,t){var r,u,n,a,o,h,g,l,c;if(s.charCodeAt(0)!==91||s.indexOf("]:")===-1||(r=new js(s,e,i,t,[]),u=An(r,0),u<0||s.charCodeAt(u+1)!==58))return-1;for(a=r.posMax,n=u+2;n<a&&(o=r.src.charCodeAt(n),!(o!==32&&o!==10));n++);if(!Xf(r,n))return-1;for(g=r.linkContent,n=r.pos,h=n,n=n+1;n<a&&(o=r.src.charCodeAt(n),!(o!==32&&o!==10));n++);for(n<a&&h!==n&&Gf(r,n)?(l=r.linkContent,n=r.pos):(l="",n=h);n<a&&r.src.charCodeAt(n)===32;)n++;return n<a&&r.src.charCodeAt(n)!==10?-1:(c=qf(s.slice(1,u)),typeof t.references[c]>"u"&&(t.references[c]={title:l,href:g}),n)}function ME(s){var e=s.tokens,i,t,r,u;if(s.env.references=s.env.references||{},!s.inlineMode){for(i=1,t=e.length-1;i<t;i++)if(e[i].type==="inline"&&e[i-1].type==="paragraph_open"&&e[i+1].type==="paragraph_close"){for(r=e[i].content;r.length&&(u=DE(r,s.inline,s.options,s.env),!(u<0));)r=r.slice(u).trim();e[i].content=r,r.length||(e[i-1].tight=!0,e[i+1].tight=!0)}}}function _E(s){var e=s.tokens,i,t,r;for(t=0,r=e.length;t<r;t++)i=e[t],i.type==="inline"&&s.inline.parse(i.content,s.options,s.env,i.children)}function LE(s){var e,i,t,r,u,n,a,o,h,g=0,l=!1,c={};if(s.env.footnotes&&(s.tokens=s.tokens.filter(function(d){return d.type==="footnote_reference_open"?(l=!0,o=[],h=d.label,!1):d.type==="footnote_reference_close"?(l=!1,c[":"+h]=o,!1):(l&&o.push(d),!l)}),!!s.env.footnotes.list)){for(n=s.env.footnotes.list,s.tokens.push({type:"footnote_block_open",level:g++}),e=0,i=n.length;e<i;e++){for(s.tokens.push({type:"footnote_open",id:e,level:g++}),n[e].tokens?(a=[],a.push({type:"paragraph_open",tight:!1,level:g++}),a.push({type:"inline",content:"",level:g,children:n[e].tokens}),a.push({type:"paragraph_close",tight:!1,level:--g})):n[e].label&&(a=c[":"+n[e].label]),s.tokens=s.tokens.concat(a),s.tokens[s.tokens.length-1].type==="paragraph_close"?u=s.tokens.pop():u=null,r=n[e].count>0?n[e].count:1,t=0;t<r;t++)s.tokens.push({type:"footnote_anchor",id:e,subId:t,level:g});u&&s.tokens.push(u),s.tokens.push({type:"footnote_close",level:--g})}s.tokens.push({type:"footnote_block_close",level:--g})}}var Q2=` 
()[]'".,!?-`;function $l(s){return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1")}function TE(s){var e,i,t,r,u,n,a,o,h,g,l,c,d=s.tokens;if(s.env.abbreviations){for(s.env.abbrRegExp||(c="(^|["+Q2.split("").map($l).join("")+"])("+Object.keys(s.env.abbreviations).map(function(F){return F.substr(1)}).sort(function(F,p){return p.length-F.length}).map($l).join("|")+")($|["+Q2.split("").map($l).join("")+"])",s.env.abbrRegExp=new RegExp(c,"g")),g=s.env.abbrRegExp,i=0,t=d.length;i<t;i++)if(d[i].type==="inline"){for(r=d[i].children,e=r.length-1;e>=0;e--)if(u=r[e],u.type==="text"){for(o=0,n=u.content,g.lastIndex=0,h=u.level,a=[];l=g.exec(n);)g.lastIndex>o&&a.push({type:"text",content:n.slice(o,l.index+l[1].length),level:h}),a.push({type:"abbr_open",title:s.env.abbreviations[":"+l[2]],level:h++}),a.push({type:"text",content:l[2],level:h}),a.push({type:"abbr_close",level:--h}),o=g.lastIndex-l[3].length;a.length&&(o<n.length&&a.push({type:"text",content:n.slice(o),level:h}),d[i].children=r=[].concat(r.slice(0,e),a,r.slice(e+1)))}}}}var PE=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,$E=/\((c|tm|r|p)\)/ig,IE={c:"©",r:"®",p:"§",tm:"™"};function RE(s){return s.indexOf("(")<0?s:s.replace($E,function(e,i){return IE[i.toLowerCase()]})}function BE(s){var e,i,t,r,u;if(s.options.typographer){for(u=s.tokens.length-1;u>=0;u--)if(s.tokens[u].type==="inline")for(r=s.tokens[u].children,e=r.length-1;e>=0;e--)i=r[e],i.type==="text"&&(t=i.content,t=RE(t),PE.test(t)&&(t=t.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/mg,"$1—$2").replace(/(^|\s)--(\s|$)/mg,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/mg,"$1–$2")),i.content=t)}}var OE=/['"]/,eg=/['"]/g,NE=/[-\s()\[\]]/,tg="’";function rg(s,e){return e<0||e>=s.length?!1:!NE.test(s[e])}function Bs(s,e,i){return s.substr(0,e)+i+s.substr(e+1)}function WE(s){var e,i,t,r,u,n,a,o,h,g,l,c,d,F,p,f,m;if(s.options.typographer){for(m=[],p=s.tokens.length-1;p>=0;p--)if(s.tokens[p].type==="inline"){for(f=s.tokens[p].children,m.length=0,e=0;e<f.length;e++)if(i=f[e],!(i.type!=="text"||OE.test(i.text))){for(a=f[e].level,d=m.length-1;d>=0&&!(m[d].level<=a);d--);m.length=d+1,t=i.content,u=0,n=t.length;e:for(;u<n&&(eg.lastIndex=u,r=eg.exec(t),!!r);){if(o=!rg(t,r.index-1),u=r.index+1,F=r[0]==="'",h=!rg(t,u),!h&&!o){F&&(i.content=Bs(i.content,r.index,tg));continue}if(l=!h,c=!o,c){for(d=m.length-1;d>=0&&(g=m[d],!(m[d].level<a));d--)if(g.single===F&&m[d].level===a){g=m[d],F?(f[g.token].content=Bs(f[g.token].content,g.pos,s.options.quotes[2]),i.content=Bs(i.content,r.index,s.options.quotes[3])):(f[g.token].content=Bs(f[g.token].content,g.pos,s.options.quotes[0]),i.content=Bs(i.content,r.index,s.options.quotes[1])),m.length=d;continue e}}l?m.push({token:e,pos:r.index,single:F,level:a}):c&&F&&(i.content=Bs(i.content,r.index,tg))}}}}}var Il=[["block",kE],["abbr",jE],["references",ME],["inline",_E],["footnote_tail",LE],["abbr2",TE],["replacements",BE],["smartquotes",WE]];function Kf(){this.options={},this.ruler=new Xr;for(var s=0;s<Il.length;s++)this.ruler.push(Il[s][0],Il[s][1])}Kf.prototype.process=function(s){var e,i,t;for(t=this.ruler.getRules(""),e=0,i=t.length;e<i;e++)t[e](s)};function Ds(s,e,i,t,r){var u,n,a,o,h,g,l;for(this.src=s,this.parser=e,this.options=i,this.env=t,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",n=this.src,g=0,l=!1,a=o=g=0,h=n.length;o<h;o++){if(u=n.charCodeAt(o),!l)if(u===32){g++;continue}else l=!0;(u===10||o===h-1)&&(u!==10&&o++,this.bMarks.push(a),this.eMarks.push(o),this.tShift.push(g),l=!1,g=0,a=o+1)}this.bMarks.push(n.length),this.eMarks.push(n.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}Ds.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};Ds.prototype.skipEmptyLines=function(e){for(var i=this.lineMax;e<i&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};Ds.prototype.skipSpaces=function(e){for(var i=this.src.length;e<i&&this.src.charCodeAt(e)===32;e++);return e};Ds.prototype.skipChars=function(e,i){for(var t=this.src.length;e<t&&this.src.charCodeAt(e)===i;e++);return e};Ds.prototype.skipCharsBack=function(e,i,t){if(e<=t)return e;for(;e>t;)if(i!==this.src.charCodeAt(--e))return e+1;return e};Ds.prototype.getLines=function(e,i,t,r){var u,n,a,o,h,g=e;if(e>=i)return"";if(g+1===i)return n=this.bMarks[g]+Math.min(this.tShift[g],t),a=r?this.eMarks[g]+1:this.eMarks[g],this.src.slice(n,a);for(o=new Array(i-e),u=0;g<i;g++,u++)h=this.tShift[g],h>t&&(h=t),h<0&&(h=0),n=this.bMarks[g]+h,g+1<i||r?a=this.eMarks[g]+1:a=this.eMarks[g],o[u]=this.src.slice(n,a);return o.join("")};function zE(s,e,i){var t,r;if(s.tShift[e]-s.blkIndent<4)return!1;for(r=t=e+1;t<i;){if(s.isEmpty(t)){t++;continue}if(s.tShift[t]-s.blkIndent>=4){t++,r=t;continue}break}return s.line=t,s.tokens.push({type:"code",content:s.getLines(e,r,4+s.blkIndent,!0),block:!0,lines:[e,s.line],level:s.level}),!0}function HE(s,e,i,t){var r,u,n,a,o,h=!1,g=s.bMarks[e]+s.tShift[e],l=s.eMarks[e];if(g+3>l||(r=s.src.charCodeAt(g),r!==126&&r!==96)||(o=g,g=s.skipChars(g,r),u=g-o,u<3)||(n=s.src.slice(g,l).trim(),n.indexOf("`")>=0))return!1;if(t)return!0;for(a=e;a++,!(a>=i||(g=o=s.bMarks[a]+s.tShift[a],l=s.eMarks[a],g<l&&s.tShift[a]<s.blkIndent));)if(s.src.charCodeAt(g)===r&&!(s.tShift[a]-s.blkIndent>=4)&&(g=s.skipChars(g,r),!(g-o<u)&&(g=s.skipSpaces(g),!(g<l)))){h=!0;break}return u=s.tShift[e],s.line=a+(h?1:0),s.tokens.push({type:"fence",params:n,content:s.getLines(e+1,a,u,!0),lines:[e,s.line],level:s.level}),!0}function UE(s,e,i,t){var r,u,n,a,o,h,g,l,c,d,F,p=s.bMarks[e]+s.tShift[e],f=s.eMarks[e];if(p>f||s.src.charCodeAt(p++)!==62||s.level>=s.options.maxNesting)return!1;if(t)return!0;for(s.src.charCodeAt(p)===32&&p++,o=s.blkIndent,s.blkIndent=0,a=[s.bMarks[e]],s.bMarks[e]=p,p=p<f?s.skipSpaces(p):p,u=p>=f,n=[s.tShift[e]],s.tShift[e]=p-s.bMarks[e],l=s.parser.ruler.getRules("blockquote"),r=e+1;r<i&&(p=s.bMarks[r]+s.tShift[r],f=s.eMarks[r],!(p>=f));r++){if(s.src.charCodeAt(p++)===62){s.src.charCodeAt(p)===32&&p++,a.push(s.bMarks[r]),s.bMarks[r]=p,p=p<f?s.skipSpaces(p):p,u=p>=f,n.push(s.tShift[r]),s.tShift[r]=p-s.bMarks[r];continue}if(u)break;for(F=!1,c=0,d=l.length;c<d;c++)if(l[c](s,r,i,!0)){F=!0;break}if(F)break;a.push(s.bMarks[r]),n.push(s.tShift[r]),s.tShift[r]=-1337}for(h=s.parentType,s.parentType="blockquote",s.tokens.push({type:"blockquote_open",lines:g=[e,0],level:s.level++}),s.parser.tokenize(s,e,r),s.tokens.push({type:"blockquote_close",level:--s.level}),s.parentType=h,g[1]=s.line,c=0;c<n.length;c++)s.bMarks[c+e]=a[c],s.tShift[c+e]=n[c];return s.blkIndent=o,!0}function YE(s,e,i,t){var r,u,n,a=s.bMarks[e],o=s.eMarks[e];if(a+=s.tShift[e],a>o||(r=s.src.charCodeAt(a++),r!==42&&r!==45&&r!==95))return!1;for(u=1;a<o;){if(n=s.src.charCodeAt(a++),n!==r&&n!==32)return!1;n===r&&u++}return u<3?!1:(t||(s.line=e+1,s.tokens.push({type:"hr",lines:[e,s.line],level:s.level})),!0)}function ig(s,e){var i,t,r;return t=s.bMarks[e]+s.tShift[e],r=s.eMarks[e],t>=r||(i=s.src.charCodeAt(t++),i!==42&&i!==45&&i!==43)||t<r&&s.src.charCodeAt(t)!==32?-1:t}function sg(s,e){var i,t=s.bMarks[e]+s.tShift[e],r=s.eMarks[e];if(t+1>=r||(i=s.src.charCodeAt(t++),i<48||i>57))return-1;for(;;){if(t>=r)return-1;if(i=s.src.charCodeAt(t++),!(i>=48&&i<=57)){if(i===41||i===46)break;return-1}}return t<r&&s.src.charCodeAt(t)!==32?-1:t}function VE(s,e){var i,t,r=s.level+2;for(i=e+2,t=s.tokens.length-2;i<t;i++)s.tokens[i].level===r&&s.tokens[i].type==="paragraph_open"&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}function XE(s,e,i,t){var r,u,n,a,o,h,g,l,c,d,F,p,f,m,v,w,x,A,b=!0,y,k,C,D;if((l=sg(s,e))>=0)f=!0;else if((l=ig(s,e))>=0)f=!1;else return!1;if(s.level>=s.options.maxNesting)return!1;if(p=s.src.charCodeAt(l-1),t)return!0;for(v=s.tokens.length,f?(g=s.bMarks[e]+s.tShift[e],F=Number(s.src.substr(g,l-g-1)),s.tokens.push({type:"ordered_list_open",order:F,lines:x=[e,0],level:s.level++})):s.tokens.push({type:"bullet_list_open",lines:x=[e,0],level:s.level++}),r=e,w=!1,y=s.parser.ruler.getRules("list");r<i&&(m=s.skipSpaces(l),c=s.eMarks[r],m>=c?d=1:d=m-l,d>4&&(d=1),d<1&&(d=1),u=l-s.bMarks[r]+d,s.tokens.push({type:"list_item_open",lines:A=[e,0],level:s.level++}),a=s.blkIndent,o=s.tight,n=s.tShift[e],h=s.parentType,s.tShift[e]=m-s.bMarks[e],s.blkIndent=u,s.tight=!0,s.parentType="list",s.parser.tokenize(s,e,i,!0),(!s.tight||w)&&(b=!1),w=s.line-e>1&&s.isEmpty(s.line-1),s.blkIndent=a,s.tShift[e]=n,s.tight=o,s.parentType=h,s.tokens.push({type:"list_item_close",level:--s.level}),r=e=s.line,A[1]=r,m=s.bMarks[e],!(r>=i||s.isEmpty(r)||s.tShift[r]<s.blkIndent));){for(D=!1,k=0,C=y.length;k<C;k++)if(y[k](s,r,i,!0)){D=!0;break}if(D)break;if(f){if(l=sg(s,r),l<0)break}else if(l=ig(s,r),l<0)break;if(p!==s.src.charCodeAt(l-1))break}return s.tokens.push({type:f?"ordered_list_close":"bullet_list_close",level:--s.level}),x[1]=r,s.line=r,b&&VE(s,v),!0}function GE(s,e,i,t){var r,u,n,a,o,h=s.bMarks[e]+s.tShift[e],g=s.eMarks[e];if(h+4>g||s.src.charCodeAt(h)!==91||s.src.charCodeAt(h+1)!==94||s.level>=s.options.maxNesting)return!1;for(a=h+2;a<g;a++){if(s.src.charCodeAt(a)===32)return!1;if(s.src.charCodeAt(a)===93)break}return a===h+2||a+1>=g||s.src.charCodeAt(++a)!==58?!1:(t||(a++,s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.refs||(s.env.footnotes.refs={}),o=s.src.slice(h+2,a-2),s.env.footnotes.refs[":"+o]=-1,s.tokens.push({type:"footnote_reference_open",label:o,level:s.level++}),r=s.bMarks[e],u=s.tShift[e],n=s.parentType,s.tShift[e]=s.skipSpaces(a)-a,s.bMarks[e]=a,s.blkIndent+=4,s.parentType="footnote",s.tShift[e]<s.blkIndent&&(s.tShift[e]+=s.blkIndent,s.bMarks[e]-=s.blkIndent),s.parser.tokenize(s,e,i,!0),s.parentType=n,s.blkIndent-=4,s.tShift[e]=u,s.bMarks[e]=r,s.tokens.push({type:"footnote_reference_close",level:--s.level})),!0)}function qE(s,e,i,t){var r,u,n,a=s.bMarks[e]+s.tShift[e],o=s.eMarks[e];if(a>=o||(r=s.src.charCodeAt(a),r!==35||a>=o))return!1;for(u=1,r=s.src.charCodeAt(++a);r===35&&a<o&&u<=6;)u++,r=s.src.charCodeAt(++a);return u>6||a<o&&r!==32?!1:(t||(o=s.skipCharsBack(o,32,a),n=s.skipCharsBack(o,35,a),n>a&&s.src.charCodeAt(n-1)===32&&(o=n),s.line=e+1,s.tokens.push({type:"heading_open",hLevel:u,lines:[e,s.line],level:s.level}),a<o&&s.tokens.push({type:"inline",content:s.src.slice(a,o).trim(),level:s.level+1,lines:[e,s.line],children:[]}),s.tokens.push({type:"heading_close",hLevel:u,level:s.level})),!0)}function KE(s,e,i){var t,r,u,n=e+1;return n>=i||s.tShift[n]<s.blkIndent||s.tShift[n]-s.blkIndent>3||(r=s.bMarks[n]+s.tShift[n],u=s.eMarks[n],r>=u)||(t=s.src.charCodeAt(r),t!==45&&t!==61)||(r=s.skipChars(r,t),r=s.skipSpaces(r),r<u)?!1:(r=s.bMarks[e]+s.tShift[e],s.line=n+1,s.tokens.push({type:"heading_open",hLevel:t===61?1:2,lines:[e,s.line],level:s.level}),s.tokens.push({type:"inline",content:s.src.slice(r,s.eMarks[e]).trim(),level:s.level+1,lines:[e,s.line-1],children:[]}),s.tokens.push({type:"heading_close",hLevel:t===61?1:2,level:s.level}),!0)}var Jf={};["article","aside","button","blockquote","body","canvas","caption","col","colgroup","dd","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","iframe","li","map","object","ol","output","p","pre","progress","script","section","style","table","tbody","td","textarea","tfoot","th","tr","thead","ul","video"].forEach(function(s){Jf[s]=!0});var JE=/^<([a-zA-Z]{1,15})[\s\/>]/,ZE=/^<\/([a-zA-Z]{1,15})[\s>]/;function QE(s){var e=s|32;return e>=97&&e<=122}function eA(s,e,i,t){var r,u,n,a=s.bMarks[e],o=s.eMarks[e],h=s.tShift[e];if(a+=h,!s.options.html||h>3||a+2>=o||s.src.charCodeAt(a)!==60)return!1;if(r=s.src.charCodeAt(a+1),r===33||r===63){if(t)return!0}else if(r===47||QE(r)){if(r===47){if(u=s.src.slice(a,o).match(ZE),!u)return!1}else if(u=s.src.slice(a,o).match(JE),!u)return!1;if(Jf[u[1].toLowerCase()]!==!0)return!1;if(t)return!0}else return!1;for(n=e+1;n<s.lineMax&&!s.isEmpty(n);)n++;return s.line=n,s.tokens.push({type:"htmlblock",level:s.level,lines:[e,s.line],content:s.getLines(e,n,0,!0)}),!0}function Rl(s,e){var i=s.bMarks[e]+s.blkIndent,t=s.eMarks[e];return s.src.substr(i,t-i)}function tA(s,e,i,t){var r,u,n,a,o,h,g,l,c,d,F;if(e+2>i||(o=e+1,s.tShift[o]<s.blkIndent)||(n=s.bMarks[o]+s.tShift[o],n>=s.eMarks[o])||(r=s.src.charCodeAt(n),r!==124&&r!==45&&r!==58)||(u=Rl(s,e+1),!/^[-:| ]+$/.test(u))||(h=u.split("|"),h<=2))return!1;for(l=[],a=0;a<h.length;a++){if(c=h[a].trim(),!c){if(a===0||a===h.length-1)continue;return!1}if(!/^:?-+:?$/.test(c))return!1;c.charCodeAt(c.length-1)===58?l.push(c.charCodeAt(0)===58?"center":"right"):c.charCodeAt(0)===58?l.push("left"):l.push("")}if(u=Rl(s,e).trim(),u.indexOf("|")===-1||(h=u.replace(/^\||\|$/g,"").split("|"),l.length!==h.length))return!1;if(t)return!0;for(s.tokens.push({type:"table_open",lines:d=[e,0],level:s.level++}),s.tokens.push({type:"thead_open",lines:[e,e+1],level:s.level++}),s.tokens.push({type:"tr_open",lines:[e,e+1],level:s.level++}),a=0;a<h.length;a++)s.tokens.push({type:"th_open",align:l[a],lines:[e,e+1],level:s.level++}),s.tokens.push({type:"inline",content:h[a].trim(),lines:[e,e+1],level:s.level,children:[]}),s.tokens.push({type:"th_close",level:--s.level});for(s.tokens.push({type:"tr_close",level:--s.level}),s.tokens.push({type:"thead_close",level:--s.level}),s.tokens.push({type:"tbody_open",lines:F=[e+2,0],level:s.level++}),o=e+2;o<i&&!(s.tShift[o]<s.blkIndent||(u=Rl(s,o).trim(),u.indexOf("|")===-1));o++){for(h=u.replace(/^\||\|$/g,"").split("|"),s.tokens.push({type:"tr_open",level:s.level++}),a=0;a<h.length;a++)s.tokens.push({type:"td_open",align:l[a],level:s.level++}),g=h[a].substring(h[a].charCodeAt(0)===124?1:0,h[a].charCodeAt(h[a].length-1)===124?h[a].length-1:h[a].length).trim(),s.tokens.push({type:"inline",content:g,level:s.level,children:[]}),s.tokens.push({type:"td_close",level:--s.level});s.tokens.push({type:"tr_close",level:--s.level})}return s.tokens.push({type:"tbody_close",level:--s.level}),s.tokens.push({type:"table_close",level:--s.level}),d[1]=F[1]=o,s.line=o,!0}function co(s,e){var i,t,r=s.bMarks[e]+s.tShift[e],u=s.eMarks[e];return r>=u||(t=s.src.charCodeAt(r++),t!==126&&t!==58)||(i=s.skipSpaces(r),r===i)||i>=u?-1:i}function rA(s,e){var i,t,r=s.level+2;for(i=e+2,t=s.tokens.length-2;i<t;i++)s.tokens[i].level===r&&s.tokens[i].type==="paragraph_open"&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}function iA(s,e,i,t){var r,u,n,a,o,h,g,l,c,d,F,p,f,m;if(t)return s.ddIndent<0?!1:co(s,e)>=0;if(g=e+1,s.isEmpty(g)&&++g>i||s.tShift[g]<s.blkIndent||(r=co(s,g),r<0)||s.level>=s.options.maxNesting)return!1;h=s.tokens.length,s.tokens.push({type:"dl_open",lines:o=[e,0],level:s.level++}),n=e,u=g;e:for(;;){for(m=!0,f=!1,s.tokens.push({type:"dt_open",lines:[n,n],level:s.level++}),s.tokens.push({type:"inline",content:s.getLines(n,n+1,s.blkIndent,!1).trim(),level:s.level+1,lines:[n,n],children:[]}),s.tokens.push({type:"dt_close",level:--s.level});;){if(s.tokens.push({type:"dd_open",lines:a=[g,0],level:s.level++}),p=s.tight,c=s.ddIndent,l=s.blkIndent,F=s.tShift[u],d=s.parentType,s.blkIndent=s.ddIndent=s.tShift[u]+2,s.tShift[u]=r-s.bMarks[u],s.tight=!0,s.parentType="deflist",s.parser.tokenize(s,u,i,!0),(!s.tight||f)&&(m=!1),f=s.line-u>1&&s.isEmpty(s.line-1),s.tShift[u]=F,s.tight=p,s.parentType=d,s.blkIndent=l,s.ddIndent=c,s.tokens.push({type:"dd_close",level:--s.level}),a[1]=g=s.line,g>=i||s.tShift[g]<s.blkIndent)break e;if(r=co(s,g),r<0)break;u=g}if(g>=i||(n=g,s.isEmpty(n))||s.tShift[n]<s.blkIndent||(u=n+1,u>=i)||(s.isEmpty(u)&&u++,u>=i)||s.tShift[u]<s.blkIndent||(r=co(s,u),r<0))break}return s.tokens.push({type:"dl_close",level:--s.level}),o[1]=g,s.line=g,m&&rA(s,h),!0}function sA(s,e){var i,t,r,u,n,a=e+1,o;if(i=s.lineMax,a<i&&!s.isEmpty(a)){for(o=s.parser.ruler.getRules("paragraph");a<i&&!s.isEmpty(a);a++)if(!(s.tShift[a]-s.blkIndent>3)){for(r=!1,u=0,n=o.length;u<n;u++)if(o[u](s,a,i,!0)){r=!0;break}if(r)break}}return t=s.getLines(e,a,s.blkIndent,!1).trim(),s.line=a,t.length&&(s.tokens.push({type:"paragraph_open",tight:!1,lines:[e,s.line],level:s.level}),s.tokens.push({type:"inline",content:t,level:s.level+1,lines:[e,s.line],children:[]}),s.tokens.push({type:"paragraph_close",tight:!1,level:s.level})),!0}var ho=[["code",zE],["fences",HE,["paragraph","blockquote","list"]],["blockquote",UE,["paragraph","blockquote","list"]],["hr",YE,["paragraph","blockquote","list"]],["list",XE,["paragraph","blockquote"]],["footnote",GE,["paragraph"]],["heading",qE,["paragraph","blockquote"]],["lheading",KE],["htmlblock",eA,["paragraph","blockquote"]],["table",tA,["paragraph"]],["deflist",iA,["paragraph"]],["paragraph",sA]];function Ch(){this.ruler=new Xr;for(var s=0;s<ho.length;s++)this.ruler.push(ho[s][0],ho[s][1],{alt:(ho[s][2]||[]).slice()})}Ch.prototype.tokenize=function(s,e,i){for(var t=this.ruler.getRules(""),r=t.length,u=e,n=!1,a,o;u<i&&(s.line=u=s.skipEmptyLines(u),!(u>=i||s.tShift[u]<s.blkIndent));){for(o=0;o<r&&(a=t[o](s,u,i,!1),!a);o++);if(s.tight=!n,s.isEmpty(s.line-1)&&(n=!0),u=s.line,u<i&&s.isEmpty(u)){if(n=!0,u++,u<i&&s.parentType==="list"&&s.isEmpty(u))break;s.line=u}}};var uA=/[\n\t]/g,nA=/\r[\n\u0085]|[\u2424\u2028\u0085]/g,oA=/\u00a0/g;Ch.prototype.parse=function(s,e,i,t){var r,u=0,n=0;if(!s)return[];s=s.replace(oA," "),s=s.replace(nA,`
`),s.indexOf("	")>=0&&(s=s.replace(uA,function(a,o){var h;return s.charCodeAt(o)===10?(u=o+1,n=0,a):(h="    ".slice((o-u-n)%4),n=o-u+1,h)})),r=new Ds(s,this,e,i,t),this.tokenize(r,r.line,r.lineMax)};function aA(s){switch(s){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}function lA(s,e){for(var i=s.pos;i<s.posMax&&!aA(s.src.charCodeAt(i));)i++;return i===s.pos?!1:(e||(s.pending+=s.src.slice(s.pos,i)),s.pos=i,!0)}function cA(s,e){var i,t,r=s.pos;if(s.src.charCodeAt(r)!==10)return!1;if(i=s.pending.length-1,t=s.posMax,!e)if(i>=0&&s.pending.charCodeAt(i)===32)if(i>=1&&s.pending.charCodeAt(i-1)===32){for(var u=i-2;u>=0;u--)if(s.pending.charCodeAt(u)!==32){s.pending=s.pending.substring(0,u+1);break}s.push({type:"hardbreak",level:s.level})}else s.pending=s.pending.slice(0,-1),s.push({type:"softbreak",level:s.level});else s.push({type:"softbreak",level:s.level});for(r++;r<t&&s.src.charCodeAt(r)===32;)r++;return s.pos=r,!0}var Eh=[];for(var ug=0;ug<256;ug++)Eh.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(s){Eh[s.charCodeAt(0)]=1});function dA(s,e){var i,t=s.pos,r=s.posMax;if(s.src.charCodeAt(t)!==92)return!1;if(t++,t<r){if(i=s.src.charCodeAt(t),i<256&&Eh[i]!==0)return e||(s.pending+=s.src[t]),s.pos+=2,!0;if(i===10){for(e||s.push({type:"hardbreak",level:s.level}),t++;t<r&&s.src.charCodeAt(t)===32;)t++;return s.pos=t,!0}}return e||(s.pending+="\\"),s.pos++,!0}function hA(s,e){var i,t,r,u,n,a=s.pos,o=s.src.charCodeAt(a);if(o!==96)return!1;for(i=a,a++,t=s.posMax;a<t&&s.src.charCodeAt(a)===96;)a++;for(r=s.src.slice(i,a),u=n=a;(u=s.src.indexOf("`",n))!==-1;){for(n=u+1;n<t&&s.src.charCodeAt(n)===96;)n++;if(n-u===r.length)return e||s.push({type:"code",content:s.src.slice(a,u).replace(/[ \n]+/g," ").trim(),block:!1,level:s.level}),s.pos=n,!0}return e||(s.pending+=r),s.pos+=r.length,!0}function gA(s,e){var i,t,r,u=s.posMax,n=s.pos,a,o;if(s.src.charCodeAt(n)!==126||e||n+4>=u||s.src.charCodeAt(n+1)!==126||s.level>=s.options.maxNesting||(a=n>0?s.src.charCodeAt(n-1):-1,o=s.src.charCodeAt(n+2),a===126)||o===126||o===32||o===10)return!1;for(t=n+2;t<u&&s.src.charCodeAt(t)===126;)t++;if(t>n+3)return s.pos+=t-n,e||(s.pending+=s.src.slice(n,t)),!0;for(s.pos=n+2,r=1;s.pos+1<u;){if(s.src.charCodeAt(s.pos)===126&&s.src.charCodeAt(s.pos+1)===126&&(a=s.src.charCodeAt(s.pos-1),o=s.pos+2<u?s.src.charCodeAt(s.pos+2):-1,o!==126&&a!==126&&(a!==32&&a!==10?r--:o!==32&&o!==10&&r++,r<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=n+2,e||(s.push({type:"del_open",level:s.level++}),s.parser.tokenize(s),s.push({type:"del_close",level:--s.level})),s.pos=s.posMax+2,s.posMax=u,!0):(s.pos=n,!1)}function FA(s,e){var i,t,r,u=s.posMax,n=s.pos,a,o;if(s.src.charCodeAt(n)!==43||e||n+4>=u||s.src.charCodeAt(n+1)!==43||s.level>=s.options.maxNesting||(a=n>0?s.src.charCodeAt(n-1):-1,o=s.src.charCodeAt(n+2),a===43)||o===43||o===32||o===10)return!1;for(t=n+2;t<u&&s.src.charCodeAt(t)===43;)t++;if(t!==n+2)return s.pos+=t-n,e||(s.pending+=s.src.slice(n,t)),!0;for(s.pos=n+2,r=1;s.pos+1<u;){if(s.src.charCodeAt(s.pos)===43&&s.src.charCodeAt(s.pos+1)===43&&(a=s.src.charCodeAt(s.pos-1),o=s.pos+2<u?s.src.charCodeAt(s.pos+2):-1,o!==43&&a!==43&&(a!==32&&a!==10?r--:o!==32&&o!==10&&r++,r<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=n+2,e||(s.push({type:"ins_open",level:s.level++}),s.parser.tokenize(s),s.push({type:"ins_close",level:--s.level})),s.pos=s.posMax+2,s.posMax=u,!0):(s.pos=n,!1)}function pA(s,e){var i,t,r,u=s.posMax,n=s.pos,a,o;if(s.src.charCodeAt(n)!==61||e||n+4>=u||s.src.charCodeAt(n+1)!==61||s.level>=s.options.maxNesting||(a=n>0?s.src.charCodeAt(n-1):-1,o=s.src.charCodeAt(n+2),a===61)||o===61||o===32||o===10)return!1;for(t=n+2;t<u&&s.src.charCodeAt(t)===61;)t++;if(t!==n+2)return s.pos+=t-n,e||(s.pending+=s.src.slice(n,t)),!0;for(s.pos=n+2,r=1;s.pos+1<u;){if(s.src.charCodeAt(s.pos)===61&&s.src.charCodeAt(s.pos+1)===61&&(a=s.src.charCodeAt(s.pos-1),o=s.pos+2<u?s.src.charCodeAt(s.pos+2):-1,o!==61&&a!==61&&(a!==32&&a!==10?r--:o!==32&&o!==10&&r++,r<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=n+2,e||(s.push({type:"mark_open",level:s.level++}),s.parser.tokenize(s),s.push({type:"mark_close",level:--s.level})),s.pos=s.posMax+2,s.posMax=u,!0):(s.pos=n,!1)}function ng(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122}function og(s,e){var i=e,t,r,u,n=!0,a=!0,o=s.posMax,h=s.src.charCodeAt(e);for(t=e>0?s.src.charCodeAt(e-1):-1;i<o&&s.src.charCodeAt(i)===h;)i++;return i>=o&&(n=!1),u=i-e,u>=4?n=a=!1:(r=i<o?s.src.charCodeAt(i):-1,(r===32||r===10)&&(n=!1),(t===32||t===10)&&(a=!1),h===95&&(ng(t)&&(n=!1),ng(r)&&(a=!1))),{can_open:n,can_close:a,delims:u}}function fA(s,e){var i,t,r,u,n,a,o,h=s.posMax,g=s.pos,l=s.src.charCodeAt(g);if(l!==95&&l!==42||e)return!1;if(o=og(s,g),i=o.delims,!o.can_open)return s.pos+=i,e||(s.pending+=s.src.slice(g,s.pos)),!0;if(s.level>=s.options.maxNesting)return!1;for(s.pos=g+i,a=[i];s.pos<h;){if(s.src.charCodeAt(s.pos)===l){if(o=og(s,s.pos),t=o.delims,o.can_close){for(u=a.pop(),n=t;u!==n;){if(n<u){a.push(u-n);break}if(n-=u,a.length===0)break;s.pos+=u,u=a.pop()}if(a.length===0){i=u,r=!0;break}s.pos+=t;continue}o.can_open&&a.push(t),s.pos+=t;continue}s.parser.skipToken(s)}return r?(s.posMax=s.pos,s.pos=g+i,e||((i===2||i===3)&&s.push({type:"strong_open",level:s.level++}),(i===1||i===3)&&s.push({type:"em_open",level:s.level++}),s.parser.tokenize(s),(i===1||i===3)&&s.push({type:"em_close",level:--s.level}),(i===2||i===3)&&s.push({type:"strong_close",level:--s.level})),s.pos=s.posMax+i,s.posMax=h,!0):(s.pos=g,!1)}var mA=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function vA(s,e){var i,t,r=s.posMax,u=s.pos;if(s.src.charCodeAt(u)!==126||e||u+2>=r||s.level>=s.options.maxNesting)return!1;for(s.pos=u+1;s.pos<r;){if(s.src.charCodeAt(s.pos)===126){i=!0;break}s.parser.skipToken(s)}return!i||u+1===s.pos||(t=s.src.slice(u+1,s.pos),t.match(/(^|[^\\])(\\\\)*\s/))?(s.pos=u,!1):(s.posMax=s.pos,s.pos=u+1,e||s.push({type:"sub",level:s.level,content:t.replace(mA,"$1")}),s.pos=s.posMax+1,s.posMax=r,!0)}var bA=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;function wA(s,e){var i,t,r=s.posMax,u=s.pos;if(s.src.charCodeAt(u)!==94||e||u+2>=r||s.level>=s.options.maxNesting)return!1;for(s.pos=u+1;s.pos<r;){if(s.src.charCodeAt(s.pos)===94){i=!0;break}s.parser.skipToken(s)}return!i||u+1===s.pos||(t=s.src.slice(u+1,s.pos),t.match(/(^|[^\\])(\\\\)*\s/))?(s.pos=u,!1):(s.posMax=s.pos,s.pos=u+1,e||s.push({type:"sup",level:s.level,content:t.replace(bA,"$1")}),s.pos=s.posMax+1,s.posMax=r,!0)}function yA(s,e){var i,t,r,u,n,a,o,h,g=!1,l=s.pos,c=s.posMax,d=s.pos,F=s.src.charCodeAt(d);if(F===33&&(g=!0,F=s.src.charCodeAt(++d)),F!==91||s.level>=s.options.maxNesting||(i=d+1,t=An(s,d),t<0))return!1;if(a=t+1,a<c&&s.src.charCodeAt(a)===40){for(a++;a<c&&(h=s.src.charCodeAt(a),!(h!==32&&h!==10));a++);if(a>=c)return!1;for(d=a,Xf(s,a)?(u=s.linkContent,a=s.pos):u="",d=a;a<c&&(h=s.src.charCodeAt(a),!(h!==32&&h!==10));a++);if(a<c&&d!==a&&Gf(s,a))for(n=s.linkContent,a=s.pos;a<c&&(h=s.src.charCodeAt(a),!(h!==32&&h!==10));a++);else n="";if(a>=c||s.src.charCodeAt(a)!==41)return s.pos=l,!1;a++}else{if(s.linkLevel>0)return!1;for(;a<c&&(h=s.src.charCodeAt(a),!(h!==32&&h!==10));a++);if(a<c&&s.src.charCodeAt(a)===91&&(d=a+1,a=An(s,a),a>=0?r=s.src.slice(d,a++):a=d-1),r||(typeof r>"u"&&(a=t+1),r=s.src.slice(i,t)),o=s.env.references[qf(r)],!o)return s.pos=l,!1;u=o.href,n=o.title}return e||(s.pos=i,s.posMax=t,g?s.push({type:"image",src:u,title:n,alt:s.src.substr(i,t-i),level:s.level}):(s.push({type:"link_open",href:u,title:n,level:s.level++}),s.linkLevel++,s.parser.tokenize(s),s.linkLevel--,s.push({type:"link_close",level:--s.level}))),s.pos=a,s.posMax=c,!0}function xA(s,e){var i,t,r,u,n=s.posMax,a=s.pos;return a+2>=n||s.src.charCodeAt(a)!==94||s.src.charCodeAt(a+1)!==91||s.level>=s.options.maxNesting||(i=a+2,t=An(s,a+1),t<0)?!1:(e||(s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.list||(s.env.footnotes.list=[]),r=s.env.footnotes.list.length,s.pos=i,s.posMax=t,s.push({type:"footnote_ref",id:r,level:s.level}),s.linkLevel++,u=s.tokens.length,s.parser.tokenize(s),s.env.footnotes.list[r]={tokens:s.tokens.splice(u)},s.linkLevel--),s.pos=t+1,s.posMax=n,!0)}function CA(s,e){var i,t,r,u,n=s.posMax,a=s.pos;if(a+3>n||!s.env.footnotes||!s.env.footnotes.refs||s.src.charCodeAt(a)!==91||s.src.charCodeAt(a+1)!==94||s.level>=s.options.maxNesting)return!1;for(t=a+2;t<n;t++){if(s.src.charCodeAt(t)===32||s.src.charCodeAt(t)===10)return!1;if(s.src.charCodeAt(t)===93)break}return t===a+2||t>=n||(t++,i=s.src.slice(a+2,t-1),typeof s.env.footnotes.refs[":"+i]>"u")?!1:(e||(s.env.footnotes.list||(s.env.footnotes.list=[]),s.env.footnotes.refs[":"+i]<0?(r=s.env.footnotes.list.length,s.env.footnotes.list[r]={label:i,count:0},s.env.footnotes.refs[":"+i]=r):r=s.env.footnotes.refs[":"+i],u=s.env.footnotes.list[r].count,s.env.footnotes.list[r].count++,s.push({type:"footnote_ref",id:r,subId:u,level:s.level})),s.pos=t,s.posMax=n,!0)}var EA=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],AA=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,kA=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function SA(s,e){var i,t,r,u,n,a=s.pos;return s.src.charCodeAt(a)!==60||(i=s.src.slice(a),i.indexOf(">")<0)?!1:(t=i.match(kA),t?EA.indexOf(t[1].toLowerCase())<0||(u=t[0].slice(1,-1),n=Dc(u),!s.parser.validateLink(u))?!1:(e||(s.push({type:"link_open",href:n,level:s.level}),s.push({type:"text",content:u,level:s.level+1}),s.push({type:"link_close",level:s.level})),s.pos+=t[0].length,!0):(r=i.match(AA),r?(u=r[0].slice(1,-1),n=Dc("mailto:"+u),s.parser.validateLink(n)?(e||(s.push({type:"link_open",href:n,level:s.level}),s.push({type:"text",content:u,level:s.level+1}),s.push({type:"link_close",level:s.level})),s.pos+=r[0].length,!0):!1):!1))}function Ra(s,e){return s=s.source,e=e||"",function i(t,r){return t?(r=r.source||r,s=s.replace(t,r),i):new RegExp(s,e)}}var jA=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,DA=/[^"'=<>`\x00-\x20]+/,MA=/'[^']*'/,_A=/"[^"]*"/,LA=Ra(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",DA)("single_quoted",MA)("double_quoted",_A)(),TA=Ra(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",jA)("attr_value",LA)(),PA=Ra(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",TA)(),$A=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,IA=/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/,RA=/<[?].*?[?]>/,BA=/<![A-Z]+\s+[^>]*>/,OA=/<!\[CDATA\[[\s\S]*?\]\]>/,NA=Ra(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",PA)("close_tag",$A)("comment",IA)("processing",RA)("declaration",BA)("cdata",OA)();function WA(s){var e=s|32;return e>=97&&e<=122}function zA(s,e){var i,t,r,u=s.pos;return!s.options.html||(r=s.posMax,s.src.charCodeAt(u)!==60||u+2>=r)||(i=s.src.charCodeAt(u+1),i!==33&&i!==63&&i!==47&&!WA(i))||(t=s.src.slice(u).match(NA),!t)?!1:(e||s.push({type:"htmltag",content:s.src.slice(u,u+t[0].length),level:s.level}),s.pos+=t[0].length,!0)}var HA=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,UA=/^&([a-z][a-z0-9]{1,31});/i;function YA(s,e){var i,t,r,u=s.pos,n=s.posMax;if(s.src.charCodeAt(u)!==38)return!1;if(u+1<n){if(i=s.src.charCodeAt(u+1),i===35){if(r=s.src.slice(u).match(HA),r)return e||(t=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),s.pending+=Yf(t)?jc(t):jc(65533)),s.pos+=r[0].length,!0}else if(r=s.src.slice(u).match(UA),r){var a=Hf(r[1]);if(r[1]!==a)return e||(s.pending+=a),s.pos+=r[0].length,!0}}return e||(s.pending+="&"),s.pos++,!0}var Bl=[["text",lA],["newline",cA],["escape",dA],["backticks",hA],["del",gA],["ins",FA],["mark",pA],["emphasis",fA],["sub",vA],["sup",wA],["links",yA],["footnote_inline",xA],["footnote_ref",CA],["autolink",SA],["htmltag",zA],["entity",YA]];function Ba(){this.ruler=new Xr;for(var s=0;s<Bl.length;s++)this.ruler.push(Bl[s][0],Bl[s][1]);this.validateLink=VA}Ba.prototype.skipToken=function(s){var e=this.ruler.getRules(""),i=e.length,t=s.pos,r,u;if((u=s.cacheGet(t))>0){s.pos=u;return}for(r=0;r<i;r++)if(e[r](s,!0)){s.cacheSet(t,s.pos);return}s.pos++,s.cacheSet(t,s.pos)};Ba.prototype.tokenize=function(s){for(var e=this.ruler.getRules(""),i=e.length,t=s.posMax,r,u;s.pos<t;){for(u=0;u<i&&(r=e[u](s,!1),!r);u++);if(r){if(s.pos>=t)break;continue}s.pending+=s.src[s.pos++]}s.pending&&s.pushPending()};Ba.prototype.parse=function(s,e,i,t){var r=new js(s,this,e,i,t);this.tokenize(r)};function VA(s){var e=["vbscript","javascript","file","data"],i=s.trim().toLowerCase();return i=vs(i),!(i.indexOf(":")!==-1&&e.indexOf(i.split(":")[0])!==-1)}var XA={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},GA={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},qA={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}},KA={default:XA,full:GA,commonmark:qA};function Zf(s,e,i){this.src=e,this.env=i,this.options=s.options,this.tokens=[],this.inlineMode=!1,this.inline=s.inline,this.block=s.block,this.renderer=s.renderer,this.typographer=s.typographer}function j0(s,e){typeof s!="string"&&(e=s,s="default"),e&&e.linkify!=null&&console.warn(`linkify option is removed. Use linkify plugin instead:

import Remarkable from 'remarkable';
import linkify from 'remarkable/linkify';
new Remarkable().use(linkify)
`),this.inline=new Ba,this.block=new Ch,this.core=new Kf,this.renderer=new xh,this.ruler=new Xr,this.options={},this.configure(KA[s]),this.set(e||{})}j0.prototype.set=function(s){Uf(this.options,s)};j0.prototype.configure=function(s){var e=this;if(!s)throw new Error("Wrong `remarkable` preset, check name/content");s.options&&e.set(s.options),s.components&&Object.keys(s.components).forEach(function(i){s.components[i].rules&&e[i].ruler.enable(s.components[i].rules,!0)})};j0.prototype.use=function(s,e){return s(this,e),this};j0.prototype.parse=function(s,e){var i=new Zf(this,s,e);return this.core.process(i),i.tokens};j0.prototype.render=function(s,e){return e=e||{},this.renderer.render(this.parse(s,e),this.options,e)};j0.prototype.parseInline=function(s,e){var i=new Zf(this,s,e);return i.inlineMode=!0,this.core.process(i),i.tokens};j0.prototype.renderInline=function(s,e){return e=e||{},this.renderer.render(this.parseInline(s,e),this.options,e)};var JA="3.16.2";function ZA(s,e){for(var i in e)e.hasOwnProperty(i)&&s[i]===void 0&&(s[i]=e[i]);return s}function QA(s,e,i){var t;return s.length>e&&(i==null?(i="&hellip;",t=3):t=i.length,s=s.substring(0,e-t)+i),s}function ag(s,e){if(Array.prototype.indexOf)return s.indexOf(e);for(var i=0,t=s.length;i<t;i++)if(s[i]===e)return i;return-1}function Y0(s,e){for(var i=s.length-1;i>=0;i--)e(s[i])===!0&&s.splice(i,1)}function ek(s,e){if(!e.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i=[],t=0,r;r=e.exec(s);)i.push(s.substring(t,r.index)),i.push(r[0]),t=r.index+r[0].length;return i.push(s.substring(t)),i}function Ah(s){throw new Error("Unhandled case for value: '".concat(s,"'"))}var Mc=function(){function s(e){e===void 0&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return s.prototype.setTagName=function(e){return this.tagName=e,this},s.prototype.getTagName=function(){return this.tagName||""},s.prototype.setAttr=function(e,i){var t=this.getAttrs();return t[e]=i,this},s.prototype.getAttr=function(e){return this.getAttrs()[e]},s.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},s.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},s.prototype.setClass=function(e){return this.setAttr("class",e)},s.prototype.addClass=function(e){for(var i=this.getClass(),t=this.whitespaceRegex,r=i?i.split(t):[],u=e.split(t),n;n=u.shift();)ag(r,n)===-1&&r.push(n);return this.getAttrs().class=r.join(" "),this},s.prototype.removeClass=function(e){for(var i=this.getClass(),t=this.whitespaceRegex,r=i?i.split(t):[],u=e.split(t),n;r.length&&(n=u.shift());){var a=ag(r,n);a!==-1&&r.splice(a,1)}return this.getAttrs().class=r.join(" "),this},s.prototype.getClass=function(){return this.getAttrs().class||""},s.prototype.hasClass=function(e){return(" "+this.getClass()+" ").indexOf(" "+e+" ")!==-1},s.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},s.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},s.prototype.getInnerHTML=function(){return this.innerHTML||""},s.prototype.getInnerHtml=function(){return this.getInnerHTML()},s.prototype.toAnchorString=function(){var e=this.getTagName(),i=this.buildAttrsStr();return i=i?" "+i:"",["<",e,i,">",this.getInnerHtml(),"</",e,">"].join("")},s.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),i=[];for(var t in e)e.hasOwnProperty(t)&&i.push(t+'="'+e[t]+'"');return i.join(" ")},s}();function tk(s,e,i){var t,r;i==null?(i="&hellip;",r=3,t=8):(r=i.length,t=i.length);var u=function(v){var w={},x=v,A=x.match(/^([a-z]+):\/\//i);return A&&(w.scheme=A[1],x=x.substr(A[0].length)),A=x.match(/^(.*?)(?=(\?|#|\/|$))/i),A&&(w.host=A[1],x=x.substr(A[0].length)),A=x.match(/^\/(.*?)(?=(\?|#|$))/i),A&&(w.path=A[1],x=x.substr(A[0].length)),A=x.match(/^\?(.*?)(?=(#|$))/i),A&&(w.query=A[1],x=x.substr(A[0].length)),A=x.match(/^#(.*?)$/i),A&&(w.fragment=A[1]),w},n=function(v){var w="";return v.scheme&&v.host&&(w+=v.scheme+"://"),v.host&&(w+=v.host),v.path&&(w+="/"+v.path),v.query&&(w+="?"+v.query),v.fragment&&(w+="#"+v.fragment),w},a=function(v,w){var x=w/2,A=Math.ceil(x),b=-1*Math.floor(x),y="";return b<0&&(y=v.substr(b)),v.substr(0,A)+i+y};if(s.length<=e)return s;var o=e-r,h=u(s);if(h.query){var g=h.query.match(/^(.*?)(?=(\?|\#))(.*?)$/i);g&&(h.query=h.query.substr(0,g[1].length),s=n(h))}if(s.length<=e||(h.host&&(h.host=h.host.replace(/^www\./,""),s=n(h)),s.length<=e))return s;var l="";if(h.host&&(l+=h.host),l.length>=o)return h.host.length==e?(h.host.substr(0,e-r)+i).substr(0,o+t):a(l,o).substr(0,o+t);var c="";if(h.path&&(c+="/"+h.path),h.query&&(c+="?"+h.query),c)if((l+c).length>=o){if((l+c).length==e)return(l+c).substr(0,e);var d=o-l.length;return(l+a(c,d)).substr(0,o+t)}else l+=c;if(h.fragment){var F="#"+h.fragment;if((l+F).length>=o){if((l+F).length==e)return(l+F).substr(0,e);var p=o-l.length;return(l+a(F,p)).substr(0,o+t)}else l+=F}if(h.scheme&&h.host){var f=h.scheme+"://";if((l+f).length<o)return(f+l).substr(0,e)}if(l.length<=e)return l;var m="";return o>0&&(m=l.substr(-1*Math.floor(o/2))),(l.substr(0,Math.ceil(o/2))+i+m).substr(0,o+t)}function rk(s,e,i){if(s.length<=e)return s;var t,r;i==null?(i="&hellip;",t=8,r=3):(t=i.length,r=i.length);var u=e-r,n="";return u>0&&(n=s.substr(-1*Math.floor(u/2))),(s.substr(0,Math.ceil(u/2))+i+n).substr(0,u+t)}function ik(s,e,i){return QA(s,e,i)}var lg=function(){function s(e){e===void 0&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return s.prototype.build=function(e){return new Mc({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},s.prototype.createAttrs=function(e){var i={href:e.getAnchorHref()},t=this.createCssClass(e);return t&&(i.class=t),this.newWindow&&(i.target="_blank",i.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length<e.getAnchorText().length&&(i.title=e.getAnchorHref()),i},s.prototype.createCssClass=function(e){var i=this.className;if(i){for(var t=[i],r=e.getCssClassSuffixes(),u=0,n=r.length;u<n;u++)t.push(i+"-"+r[u]);return t.join(" ")}else return""},s.prototype.processAnchorText=function(e){return e=this.doTruncate(e),e},s.prototype.doTruncate=function(e){var i=this.truncate;if(!i||!i.length)return e;var t=i.length,r=i.location;return r==="smart"?tk(e,t):r==="middle"?rk(e,t):ik(e,t)},s}(),wu=function(){function s(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return s.prototype.getMatchedText=function(){return this.matchedText},s.prototype.setOffset=function(e){this.offset=e},s.prototype.getOffset=function(){return this.offset},s.prototype.getCssClassSuffixes=function(){return[this.getType()]},s.prototype.buildTag=function(){return this.tagBuilder.build(this)},s}(),_c=function(s,e){return _c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,t){i.__proto__=t}||function(i,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])},_c(s,e)};function Bi(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");_c(s,e);function i(){this.constructor=s}s.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}var Ht=function(){return Ht=Object.assign||function(e){for(var i,t=1,r=arguments.length;t<r;t++){i=arguments[t];for(var u in i)Object.prototype.hasOwnProperty.call(i,u)&&(e[u]=i[u])}return e},Ht.apply(this,arguments)},Qf=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.email="",t.email=i.email,t}return e.prototype.getType=function(){return"email"},e.prototype.getEmail=function(){return this.email},e.prototype.getAnchorHref=function(){return"mailto:"+this.email},e.prototype.getAnchorText=function(){return this.email},e}(wu),em=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.serviceName="",t.hashtag="",t.serviceName=i.serviceName,t.hashtag=i.hashtag,t}return e.prototype.getType=function(){return"hashtag"},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getHashtag=function(){return this.hashtag},e.prototype.getAnchorHref=function(){var i=this.serviceName,t=this.hashtag;switch(i){case"twitter":return"https://twitter.com/hashtag/"+t;case"facebook":return"https://www.facebook.com/hashtag/"+t;case"instagram":return"https://instagram.com/explore/tags/"+t;case"tiktok":return"https://www.tiktok.com/tag/"+t;default:throw new Error("Unknown service name to point hashtag to: "+i)}},e.prototype.getAnchorText=function(){return"#"+this.hashtag},e}(wu),tm=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.serviceName="twitter",t.mention="",t.mention=i.mention,t.serviceName=i.serviceName,t}return e.prototype.getType=function(){return"mention"},e.prototype.getMention=function(){return this.mention},e.prototype.getServiceName=function(){return this.serviceName},e.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},e.prototype.getAnchorText=function(){return"@"+this.mention},e.prototype.getCssClassSuffixes=function(){var i=s.prototype.getCssClassSuffixes.call(this),t=this.getServiceName();return t&&i.push(t),i},e}(wu),rm=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.number="",t.plusSign=!1,t.number=i.number,t.plusSign=i.plusSign,t}return e.prototype.getType=function(){return"phone"},e.prototype.getPhoneNumber=function(){return this.number},e.prototype.getNumber=function(){return this.getPhoneNumber()},e.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},e.prototype.getAnchorText=function(){return this.matchedText},e}(wu),im=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.url="",t.urlMatchType="scheme",t.protocolUrlMatch=!1,t.protocolRelativeMatch=!1,t.stripPrefix={scheme:!0,www:!0},t.stripTrailingSlash=!0,t.decodePercentEncoding=!0,t.schemePrefixRegex=/^(https?:\/\/)?/i,t.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,t.protocolRelativeRegex=/^\/\//,t.protocolPrepended=!1,t.urlMatchType=i.urlMatchType,t.url=i.url,t.protocolUrlMatch=i.protocolUrlMatch,t.protocolRelativeMatch=i.protocolRelativeMatch,t.stripPrefix=i.stripPrefix,t.stripTrailingSlash=i.stripTrailingSlash,t.decodePercentEncoding=i.decodePercentEncoding,t}return e.prototype.getType=function(){return"url"},e.prototype.getUrlMatchType=function(){return this.urlMatchType},e.prototype.getUrl=function(){var i=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(i=this.url="http://"+i,this.protocolPrepended=!0),i},e.prototype.getAnchorHref=function(){var i=this.getUrl();return i.replace(/&amp;/g,"&")},e.prototype.getAnchorText=function(){var i=this.getMatchedText();return this.protocolRelativeMatch&&(i=this.stripProtocolRelativePrefix(i)),this.stripPrefix.scheme&&(i=this.stripSchemePrefix(i)),this.stripPrefix.www&&(i=this.stripWwwPrefix(i)),this.stripTrailingSlash&&(i=this.removeTrailingSlash(i)),this.decodePercentEncoding&&(i=this.removePercentEncoding(i)),i},e.prototype.stripSchemePrefix=function(i){return i.replace(this.schemePrefixRegex,"")},e.prototype.stripWwwPrefix=function(i){return i.replace(this.wwwPrefixRegex,"$1")},e.prototype.stripProtocolRelativePrefix=function(i){return i.replace(this.protocolRelativeRegex,"")},e.prototype.removeTrailingSlash=function(i){return i.charAt(i.length-1)==="/"&&(i=i.slice(0,-1)),i},e.prototype.removePercentEncoding=function(i){var t=i.replace(/%22/gi,"&quot;").replace(/%26/gi,"&amp;").replace(/%27/gi,"&#39;").replace(/%3C/gi,"&lt;").replace(/%3E/gi,"&gt;");try{return decodeURIComponent(t)}catch{return t}},e}(wu),yu=function(){function s(e){this.__jsduckDummyDocProp=null,this.tagBuilder=e.tagBuilder}return s}(),Ol=/[A-Za-z]/,sk=/[\d]/,uk=/[\D]/,V0=/\s/,Nl=/['"]/,nk=/[\x00-\x1F\x7F]/,sm=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,ok=/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source,ak=/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,um=sm+ok+ak,Zo=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,lk=um+Zo,Xt=um+Zo,qu=new RegExp("[".concat(Xt,"]")),ck="(?:["+Zo+"]{1,3}\\.){3}["+Zo+"]{1,3}",dk="["+Xt+"](?:["+Xt+"\\-_]{0,61}["+Xt+"])?",cg=function(s){return"(?=("+dk+"))\\"+s},Wl=function(s){return"(?:"+cg(s)+"(?:\\."+cg(s+1)+"){0,126}|"+ck+")"},go=qu,nm=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,hk=new RegExp("[".concat(Xt,"!#$%&'*+/=?^_`{|}~-]")),gk=new RegExp("^".concat(nm.source,"$")),dg=function(s){Bi(e,s);function e(){var i=s!==null&&s.apply(this,arguments)||this;return i.localPartCharRegex=hk,i.strictTldRegex=gk,i}return e.prototype.parseMatches=function(i){for(var t=this.tagBuilder,r=this.localPartCharRegex,u=this.strictTldRegex,n=[],a=i.length,o=new Fo,h={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},g=0,l=0,c=o;g<a;){var d=i.charAt(g);switch(l){case 0:F(d);break;case 1:p(i.charAt(g-1),d);break;case 2:f(d);break;case 3:m(d);break;case 4:v(d);break;case 5:w(d);break;case 6:x(d);break;case 7:A(d);break;default:Ah(l)}g++}return k(),n;function F(C){C==="m"?b(1):r.test(C)&&b()}function p(C,D){C===":"?r.test(D)?(l=2,c=new Fo(Ht(Ht({},c),{hasMailtoPrefix:!0}))):y():h[C]===D||(r.test(D)?l=2:D==="."?l=3:D==="@"?l=4:y())}function f(C){C==="."?l=3:C==="@"?l=4:r.test(C)||y()}function m(C){C==="."||C==="@"?y():r.test(C)?l=2:y()}function v(C){go.test(C)?l=5:y()}function w(C){C==="."?l=7:C==="-"?l=6:go.test(C)||k()}function x(C){C==="-"||C==="."?k():go.test(C)?l=5:k()}function A(C){C==="."||C==="-"?k():go.test(C)?(l=5,c=new Fo(Ht(Ht({},c),{hasDomainDot:!0}))):k()}function b(C){C===void 0&&(C=2),l=C,c=new Fo({idx:g})}function y(){l=0,c=o}function k(){if(c.hasDomainDot){var C=i.slice(c.idx,g);/[-.]$/.test(C)&&(C=C.slice(0,-1));var D=c.hasMailtoPrefix?C.slice(7):C;T(D)&&n.push(new Qf({tagBuilder:t,matchedText:C,offset:c.idx,email:D}))}y();function T(S){var M=S.split(".").pop()||"",R=M.toLowerCase(),O=u.test(R);return O}}},e}(yu),Fo=function(){function s(e){e===void 0&&(e={}),this.idx=e.idx!==void 0?e.idx:-1,this.hasMailtoPrefix=!!e.hasMailtoPrefix,this.hasDomainDot=!!e.hasDomainDot}return s}(),Fk=function(){function s(){}return s.isValid=function(e,i){return!(i&&!this.isValidUriScheme(i)||this.urlMatchDoesNotHaveProtocolOrDot(e,i)||this.urlMatchDoesNotHaveAtLeastOneWordChar(e,i)&&!this.isValidIpAddress(e)||this.containsMultipleDots(e))},s.isValidIpAddress=function(e){var i=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source),t=e.match(i);return t!==null},s.containsMultipleDots=function(e){var i=e;return this.hasFullProtocolRegex.test(e)&&(i=e.split("://")[1]),i.split("/")[0].indexOf("..")>-1},s.isValidUriScheme=function(e){var i=e.match(this.uriSchemeRegex),t=i&&i[0].toLowerCase();return t!=="javascript:"&&t!=="vbscript:"},s.urlMatchDoesNotHaveProtocolOrDot=function(e,i){return!!e&&(!i||!this.hasFullProtocolRegex.test(i))&&e.indexOf(".")===-1},s.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,i){return e&&i?!this.hasFullProtocolRegex.test(i)&&!this.hasWordCharAfterProtocolRegex.test(e):!1},s.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,s.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,s.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+sm+"]"),s.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,s}(),pk=function(){var s=/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/,e=/(?:www\.)/,i=new RegExp("[/?#](?:["+Xt+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*["+Xt+"\\-+&@#/%=~_()|'$*\\[\\]{}✓])?");return new RegExp(["(?:","(",s.source,Wl(2),")","|","(","(//)?",e.source,Wl(6),")","|","(","(//)?",Wl(10)+"\\.",nm.source,"(?![-"+lk+"])",")",")","(?::[0-9]+)?","(?:"+i.source+")?"].join(""),"gi")}(),fk=new RegExp("["+Xt+"]"),hg=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.stripPrefix={scheme:!0,www:!0},t.stripTrailingSlash=!0,t.decodePercentEncoding=!0,t.matcherRegex=pk,t.wordCharRegExp=fk,t.stripPrefix=i.stripPrefix,t.stripTrailingSlash=i.stripTrailingSlash,t.decodePercentEncoding=i.decodePercentEncoding,t}return e.prototype.parseMatches=function(i){for(var t=this.matcherRegex,r=this.stripPrefix,u=this.stripTrailingSlash,n=this.decodePercentEncoding,a=this.tagBuilder,o=[],h,g=function(){var c=h[0],d=h[1],F=h[4],p=h[5],f=h[9],m=h.index,v=p||f,w=i.charAt(m-1);if(!Fk.isValid(c,d)||m>0&&w==="@"||m>0&&v&&l.wordCharRegExp.test(w))return"continue";if(/\?$/.test(c)&&(c=c.substr(0,c.length-1)),l.matchHasUnbalancedClosingParen(c))c=c.substr(0,c.length-1);else{var x=l.matchHasInvalidCharAfterTld(c,d);x>-1&&(c=c.substr(0,x))}var A=["http://","https://"].find(function(C){return!!d&&d.indexOf(C)!==-1});if(A){var b=c.indexOf(A);c=c.substr(b),d=d.substr(b),m=m+b}var y=d?"scheme":F?"www":"tld",k=!!d;o.push(new im({tagBuilder:a,matchedText:c,offset:m,urlMatchType:y,url:c,protocolUrlMatch:k,protocolRelativeMatch:!!v,stripPrefix:r,stripTrailingSlash:u,decodePercentEncoding:n}))},l=this;(h=t.exec(i))!==null;)g();return o},e.prototype.matchHasUnbalancedClosingParen=function(i){var t=i.charAt(i.length-1),r;if(t===")")r="(";else if(t==="]")r="[";else if(t==="}")r="{";else return!1;for(var u=0,n=0,a=i.length-1;n<a;n++){var o=i.charAt(n);o===r?u++:o===t&&(u=Math.max(u-1,0))}return u===0},e.prototype.matchHasInvalidCharAfterTld=function(i,t){if(!i)return-1;var r=0;t&&(r=i.indexOf(":"),i=i.slice(r));var u=new RegExp("^((.?//)?[-."+Xt+"]*[-"+Xt+"]\\.[-"+Xt+"]+)"),n=u.exec(i);return n===null?-1:(r+=n[1].length,i=i.slice(n[1].length),/^[^-.A-Za-z0-9:\/?#]/.test(i)?r:-1)},e}(yu),gg=new RegExp("[_".concat(Xt,"]")),Fg=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.serviceName="twitter",t.serviceName=i.serviceName,t}return e.prototype.parseMatches=function(i){for(var t=this.tagBuilder,r=this.serviceName,u=[],n=i.length,a=0,o=-1,h=0;a<n;){var g=i.charAt(a);switch(h){case 0:l(g);break;case 1:c(g);break;case 2:d(g);break;case 3:F(g);break;default:Ah(h)}a++}return p(),u;function l(f){f==="#"?(h=2,o=a):qu.test(f)&&(h=1)}function c(f){qu.test(f)||(h=0)}function d(f){gg.test(f)?h=3:qu.test(f)?h=1:h=0}function F(f){gg.test(f)||(p(),o=-1,qu.test(f)?h=1:h=0)}function p(){if(o>-1&&a-o<=140){var f=i.slice(o,a),m=new em({tagBuilder:t,matchedText:f,offset:o,serviceName:r,hashtag:f.slice(1)});u.push(m)}}},e}(yu),mk=["twitter","facebook","instagram","tiktok"],vk=/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/,bk=/(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/,wk=new RegExp("".concat(vk.source,"|").concat(bk.source),"g"),pg=function(s){Bi(e,s);function e(){var i=s!==null&&s.apply(this,arguments)||this;return i.matcherRegex=wk,i}return e.prototype.parseMatches=function(i){for(var t=this.matcherRegex,r=this.tagBuilder,u=[],n;(n=t.exec(i))!==null;){var a=n[0],o=a.replace(/[^0-9,;#]/g,""),h=!!(n[1]||n[2]),g=n.index==0?"":i.substr(n.index-1,1),l=i.substr(n.index+a.length,1),c=!g.match(/\d/)&&!l.match(/\d/);this.testMatch(n[3])&&this.testMatch(a)&&c&&u.push(new rm({tagBuilder:r,matchedText:a,offset:n.index,number:o,plusSign:h}))}return u},e.prototype.testMatch=function(i){return uk.test(i)},e}(yu),yk=new RegExp("@[_".concat(Xt,"]{1,50}(?![_").concat(Xt,"])"),"g"),xk=new RegExp("@[_.".concat(Xt,"]{1,30}(?![_").concat(Xt,"])"),"g"),Ck=new RegExp("@[-_.".concat(Xt,"]{1,50}(?![-_").concat(Xt,"])"),"g"),Ek=new RegExp("@[_.".concat(Xt,"]{1,23}[_").concat(Xt,"](?![_").concat(Xt,"])"),"g"),Ak=new RegExp("[^"+Xt+"]"),fg=function(s){Bi(e,s);function e(i){var t=s.call(this,i)||this;return t.serviceName="twitter",t.matcherRegexes={twitter:yk,instagram:xk,soundcloud:Ck,tiktok:Ek},t.nonWordCharRegex=Ak,t.serviceName=i.serviceName,t}return e.prototype.parseMatches=function(i){var t=this.serviceName,r=this.matcherRegexes[this.serviceName],u=this.nonWordCharRegex,n=this.tagBuilder,a=[],o;if(!r)return a;for(;(o=r.exec(i))!==null;){var h=o.index,g=i.charAt(h-1);if(h===0||u.test(g)){var l=o[0].replace(/\.+$/g,""),c=l.slice(1);a.push(new tm({tagBuilder:n,matchedText:l,offset:h,serviceName:t,mention:c}))}}return a},e}(yu);function kk(s,e){for(var i=e.onOpenTag,t=e.onCloseTag,r=e.onText,u=e.onComment,n=e.onDoctype,a=new Ei,o=0,h=s.length,g=0,l=0,c=a;o<h;){var d=s.charAt(o);switch(g){case 0:F(d);break;case 1:p(d);break;case 2:m(d);break;case 3:f(d);break;case 4:v(d);break;case 5:w(d);break;case 6:x(d);break;case 7:A(d);break;case 8:b(d);break;case 9:y(d);break;case 10:k(d);break;case 11:C(d);break;case 12:D(d);break;case 13:T();break;case 14:S(d);break;case 15:M(d);break;case 16:R(d);break;case 17:O(d);break;case 18:H(d);break;case 19:Y(d);break;case 20:J(d);break;default:Ah(g)}o++}l<o&&se();function F(G){G==="<"&&te()}function p(G){G==="!"?g=13:G==="/"?(g=2,c=new Ei(Ht(Ht({},c),{isClosing:!0}))):G==="<"?te():Ol.test(G)?(g=3,c=new Ei(Ht(Ht({},c),{isOpening:!0}))):(g=0,c=a)}function f(G){V0.test(G)?(c=new Ei(Ht(Ht({},c),{name:ue()})),g=4):G==="<"?te():G==="/"?(c=new Ei(Ht(Ht({},c),{name:ue()})),g=12):G===">"?(c=new Ei(Ht(Ht({},c),{name:ue()})),ie()):!Ol.test(G)&&!sk.test(G)&&G!==":"&&Z()}function m(G){G===">"?Z():Ol.test(G)?g=3:Z()}function v(G){V0.test(G)||(G==="/"?g=12:G===">"?ie():G==="<"?te():G==="="||Nl.test(G)||nk.test(G)?Z():g=5)}function w(G){V0.test(G)?g=6:G==="/"?g=12:G==="="?g=7:G===">"?ie():G==="<"?te():Nl.test(G)&&Z()}function x(G){V0.test(G)||(G==="/"?g=12:G==="="?g=7:G===">"?ie():G==="<"?te():Nl.test(G)?Z():g=5)}function A(G){V0.test(G)||(G==='"'?g=8:G==="'"?g=9:/[>=`]/.test(G)?Z():G==="<"?te():g=10)}function b(G){G==='"'&&(g=11)}function y(G){G==="'"&&(g=11)}function k(G){V0.test(G)?g=4:G===">"?ie():G==="<"&&te()}function C(G){V0.test(G)?g=4:G==="/"?g=12:G===">"?ie():G==="<"?te():(g=4,ne())}function D(G){G===">"?(c=new Ei(Ht(Ht({},c),{isClosing:!0})),ie()):g=4}function T(G){s.substr(o,2)==="--"?(o+=2,c=new Ei(Ht(Ht({},c),{type:"comment"})),g=14):s.substr(o,7).toUpperCase()==="DOCTYPE"?(o+=7,c=new Ei(Ht(Ht({},c),{type:"doctype"})),g=20):Z()}function S(G){G==="-"?g=15:G===">"?Z():g=16}function M(G){G==="-"?g=18:G===">"?Z():g=16}function R(G){G==="-"&&(g=17)}function O(G){G==="-"?g=18:g=16}function H(G){G===">"?ie():G==="!"?g=19:G==="-"||(g=16)}function Y(G){G==="-"?g=17:G===">"?ie():g=16}function J(G){G===">"?ie():G==="<"&&te()}function Z(){g=0,c=a}function te(){g=1,c=new Ei({idx:o})}function ie(){var G=s.slice(l,c.idx);G&&r(G,l),c.type==="comment"?u(c.idx):c.type==="doctype"?n(c.idx):(c.isOpening&&i(c.name,c.idx),c.isClosing&&t(c.name,c.idx)),Z(),l=o+1}function se(){var G=s.slice(l,o);r(G,l),l=o+1}function ue(){var G=c.idx+(c.isClosing?2:1);return s.slice(G,o).toLowerCase()}function ne(){o--}}var Ei=function(){function s(e){e===void 0&&(e={}),this.idx=e.idx!==void 0?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing}return s}(),Sk=function(){function s(e){e===void 0&&(e={}),this.version=s.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(e.urls),this.email=typeof e.email=="boolean"?e.email:this.email,this.phone=typeof e.phone=="boolean"?e.phone:this.phone,this.hashtag=e.hashtag||this.hashtag,this.mention=e.mention||this.mention,this.newWindow=typeof e.newWindow=="boolean"?e.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(e.stripPrefix),this.stripTrailingSlash=typeof e.stripTrailingSlash=="boolean"?e.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=typeof e.decodePercentEncoding=="boolean"?e.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=e.sanitizeHtml||!1;var i=this.mention;if(i!==!1&&["twitter","instagram","soundcloud","tiktok"].indexOf(i)===-1)throw new Error("invalid `mention` cfg '".concat(i,"' - see docs"));var t=this.hashtag;if(t!==!1&&mk.indexOf(t)===-1)throw new Error("invalid `hashtag` cfg '".concat(t,"' - see docs"));this.truncate=this.normalizeTruncateCfg(e.truncate),this.className=e.className||this.className,this.replaceFn=e.replaceFn||this.replaceFn,this.context=e.context||this}return s.link=function(e,i){var t=new s(i);return t.link(e)},s.parse=function(e,i){var t=new s(i);return t.parse(e)},s.prototype.normalizeUrlsCfg=function(e){return e==null&&(e=!0),typeof e=="boolean"?{schemeMatches:e,wwwMatches:e,tldMatches:e}:{schemeMatches:typeof e.schemeMatches=="boolean"?e.schemeMatches:!0,wwwMatches:typeof e.wwwMatches=="boolean"?e.wwwMatches:!0,tldMatches:typeof e.tldMatches=="boolean"?e.tldMatches:!0}},s.prototype.normalizeStripPrefixCfg=function(e){return e==null&&(e=!0),typeof e=="boolean"?{scheme:e,www:e}:{scheme:typeof e.scheme=="boolean"?e.scheme:!0,www:typeof e.www=="boolean"?e.www:!0}},s.prototype.normalizeTruncateCfg=function(e){return typeof e=="number"?{length:e,location:"end"}:ZA(e||{},{length:Number.POSITIVE_INFINITY,location:"end"})},s.prototype.parse=function(e){var i=this,t=["a","style","script"],r=0,u=[];return kk(e,{onOpenTag:function(n){t.indexOf(n)>=0&&r++},onText:function(n,a){if(r===0){var o=/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi,h=ek(n,o),g=a;h.forEach(function(l,c){if(c%2===0){var d=i.parseText(l,g);u.push.apply(u,d)}g+=l.length})}},onCloseTag:function(n){t.indexOf(n)>=0&&(r=Math.max(r-1,0))},onComment:function(n){},onDoctype:function(n){}}),u=this.compactMatches(u),u=this.removeUnwantedMatches(u),u},s.prototype.compactMatches=function(e){e.sort(function(o,h){return o.getOffset()-h.getOffset()});for(var i=0;i<e.length-1;){var t=e[i],r=t.getOffset(),u=t.getMatchedText().length,n=r+u;if(i+1<e.length){if(e[i+1].getOffset()===r){var a=e[i+1].getMatchedText().length>u?i:i+1;e.splice(a,1);continue}if(e[i+1].getOffset()<n){e.splice(i+1,1);continue}}i++}return e},s.prototype.removeUnwantedMatches=function(e){return this.hashtag||Y0(e,function(i){return i.getType()==="hashtag"}),this.email||Y0(e,function(i){return i.getType()==="email"}),this.phone||Y0(e,function(i){return i.getType()==="phone"}),this.mention||Y0(e,function(i){return i.getType()==="mention"}),this.urls.schemeMatches||Y0(e,function(i){return i.getType()==="url"&&i.getUrlMatchType()==="scheme"}),this.urls.wwwMatches||Y0(e,function(i){return i.getType()==="url"&&i.getUrlMatchType()==="www"}),this.urls.tldMatches||Y0(e,function(i){return i.getType()==="url"&&i.getUrlMatchType()==="tld"}),e},s.prototype.parseText=function(e,i){i===void 0&&(i=0),i=i||0;for(var t=this.getMatchers(),r=[],u=0,n=t.length;u<n;u++){for(var a=t[u].parseMatches(e),o=0,h=a.length;o<h;o++)a[o].setOffset(i+a[o].getOffset());r.push.apply(r,a)}return r},s.prototype.link=function(e){if(!e)return"";this.sanitizeHtml&&(e=e.replace(/</g,"&lt;").replace(/>/g,"&gt;"));for(var i=this.parse(e),t=[],r=0,u=0,n=i.length;u<n;u++){var a=i[u];t.push(e.substring(r,a.getOffset())),t.push(this.createMatchReturnVal(a)),r=a.getOffset()+a.getMatchedText().length}return t.push(e.substring(r)),t.join("")},s.prototype.createMatchReturnVal=function(e){var i;if(this.replaceFn&&(i=this.replaceFn.call(this.context,e)),typeof i=="string")return i;if(i===!1)return e.getMatchedText();if(i instanceof Mc)return i.toAnchorString();var t=e.buildTag();return t.toAnchorString()},s.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var e=this.getTagBuilder(),i=[new Fg({tagBuilder:e,serviceName:this.hashtag}),new dg({tagBuilder:e}),new pg({tagBuilder:e}),new fg({tagBuilder:e,serviceName:this.mention}),new hg({tagBuilder:e,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=i},s.prototype.getTagBuilder=function(){var e=this.tagBuilder;return e||(e=this.tagBuilder=new lg({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),e},s.version=JA,s.AnchorTagBuilder=lg,s.HtmlTag=Mc,s.matcher={Email:dg,Hashtag:Fg,Matcher:yu,Mention:fg,Phone:pg,Url:hg},s.match={Email:Qf,Hashtag:em,Match:wu,Mention:tm,Phone:rm,Url:im},s}(),jk=/www|@|\:\/\//;function Dk(s){return/^<a[>\s]/i.test(s)}function Mk(s){return/^<\/a\s*>/i.test(s)}function _k(){var s=[],e=new Sk({stripPrefix:!1,url:!0,email:!0,replaceFn:function(i){switch(i.getType()){case"url":s.push({text:i.matchedText,url:i.getUrl()});break;case"email":s.push({text:i.matchedText,url:"mailto:"+i.getEmail().replace(/^mailto:/i,"")});break}return!1}});return{links:s,autolinker:e}}function Lk(s){var e,i,t,r,u,n,a,o,h,g,l,c=s.tokens,d=null,F,p;for(i=0,t=c.length;i<t;i++)if(c[i].type==="inline")for(r=c[i].children,l=0,e=r.length-1;e>=0;e--){if(u=r[e],u.type==="link_close"){for(e--;r[e].level!==u.level&&r[e].type!=="link_open";)e--;continue}if(u.type==="htmltag"&&(Dk(u.content)&&l>0&&l--,Mk(u.content)&&l++),!(l>0)&&u.type==="text"&&jk.test(u.content)){if(d||(d=_k(),F=d.links,p=d.autolinker),n=u.content,F.length=0,p.link(n),!F.length)continue;for(a=[],g=u.level,o=0;o<F.length;o++)s.inline.validateLink(F[o].url)&&(h=n.indexOf(F[o].text),h&&a.push({type:"text",content:n.slice(0,h),level:g}),a.push({type:"link_open",href:F[o].url,title:"",level:g++}),a.push({type:"text",content:F[o].text,level:g}),a.push({type:"link_close",level:--g}),n=n.slice(h+F[o].text.length));n.length&&a.push({type:"text",content:n,level:g}),c[i].children=r=[].concat(r.slice(0,e),a,r.slice(e+1))}}}function Tk(s){s.core.ruler.push("linkify",Lk)}var om=0,Oa=1,kh=2,xu=3;function D0(s,e){s=s.replace(" ","T");var i=new Date(s),t=zf[i.getMonth()];return e=e||om,e>=Oa&&(t+=" "+i.getDate()+","),t+=" "+i.getFullYear(),e>=kh&&(t+=" at "+i.getHours()+":"+("0"+i.getMinutes()).slice(-2)),e>=xu&&(t+=":"+("0"+i.getSeconds()).slice(-2)),t}function Yt(s){if(s<1024)return s+" B";var e,i=s,t=1;for(e=0;i>=1024;e+=1)i/=1024;return i<10?t=3:i<100&&(t=2),i.toFixed(t)+" "+["B","kB","MB","GB","TB"][Math.min(e,4)]}function Lc(s,e){s=s||0,e=e||{};for(var i=0,t=e.base||1e3,r=e.sep||"",u=e.maxLen||3,n=u-1;s>t;i+=1)s/=t;return i?s>100?n-=2:s>10&&(n-=1):n=0,s.toFixed(Math.max(0,n))+r+["","k","M","G","T"][Math.min(i,4)]}function am(s,e){var i=s.get(this.sortField),t=e.get(this.sortField);if(i!==void 0&&i.localeCompare){var r=i.localeCompare(t)*this.sortDir;return r||!this.secondarySortField?r:(i=s.get(this.secondarySortField),t=e.get(this.secondarySortField),i.localeCompare(t)*this.sortDir)}return i>t?this.sortDir:i<t?-this.sortDir:0}function lm(s,e){return s!==void 0&&s.localeCompare?s.localeCompare(e):s>e?1:s<e?-1:0}function cm(s){var e=s.charAt(0).toUpperCase();return e+s.substr(1)+"Model"}function Na(s){var e={};return s&&Fe.each(s.replace(/\+/g," ").split(/&/g),function(i){var t=i.split("="),r;t.length>1&&(r=decodeURIComponent(i.substr(t[0].length+1))),e[decodeURIComponent(t[0])]=r}),e}function Pk(s,e){var i=0,t={};return e&&(t[e]=1),Fe.each(s,function(r){t[r]=1<<i,e&&(t[e]|=t[r]),i+=1}),t}var M0=function(){var s=new j0().use(Tk);return function(e,i){if(i)me(i).html(s.render(e));else return s.render(e)}}();function dm(s){return s.charAt(0).toUpperCase()+s.substring(1)}function Wa(s){if(!s)return{base:"",name:""};var e=s.indexOf("?"),i=s.lastIndexOf("?"),t,r;return e===-1?r=s:r=s.slice(0,e),i===-1?t="":t=s.slice(i+1),{name:t,base:r}}function $k(s){return me.when(...s).then((...e)=>e)}const Ik=Object.freeze(Object.defineProperty({__proto__:null,DATE_DAY:Oa,DATE_MINUTE:kh,DATE_MONTH:om,DATE_SECOND:xu,_whenAll:$k,capitalize:dm,defineFlags:Pk,formatCount:Lc,formatDate:D0,formatSize:Yt,getModelClassByName:cm,localeComparator:am,localeSort:lm,parseQueryString:Na,renderMarkdown:M0,splitRoute:Wa},Symbol.toStringTag,{value:"Module"}));var Qi=er.Collection.extend({model:v0,resourceName:null,sortField:"name",sortDir:cn,comparator:am,pageLimit:25,offset:0,altUrl:null,append:!1,filterFunc:null,pageOffsetStack:null,_totalCount:0,hasPreviousPage:function(){return this.filterFunc?this.append?!1:(this.pageOffsetStack=this.pageOffsetStack||[],this.pageOffsetStack.length>1):this.offset-this.length>0},hasNextPage:function(){return this._hasMorePages},getTotalCount:function(){return this._totalCount||0},fetchPreviousPage:function(s){return this.filterFunc?this.append?this.offset=0:(this.pageOffsetStack=this.pageOffsetStack||[],this.pageOffsetStack.length&&this.pageOffsetStack.pop(),this.offset=this.pageOffsetStack.length?this.pageOffsetStack.pop():0):this.offset=Math.max(0,this.offset-this.length-this.pageLimit),this.fetch(Fe.extend({},this.params,s||{}))},fetchNextPage:function(s){return this.fetch(Fe.extend({},this.params,s||{}))},pageNum:function(){return this.filterFunc?this.append?0:(this.pageOffsetStack=this.pageOffsetStack||[],this.pageOffsetStack.length-1):Math.ceil((this.offset-this.length)/this.pageLimit)},fetchPage:function(s,e){if(!this.append&&s*this.pageLimit<this._totalCount&&s>=0)return this.offset=s*this.pageLimit,this.fetch(Fe.extend({},this.params,e||{}))},fetch:function(s,e){if(this.altUrl===null&&this.resourceName===null)throw new Error("An altUrl or resourceName must be set on the Collection.");this.filterFunc&&!this.append&&(this.pageOffsetStack=this.pageOffsetStack||[]),e?(this.filterFunc&&!this.append&&(this.pageOffsetStack=[]),this.offset=0):this.params=s||{},this.filterFunc&&!this.append&&this.pageOffsetStack.push(this.offset);var i=this.pageLimit>0?this.pageLimit+1:0,t=[];function r(){var u=Ve({url:this.altUrl||this.resourceName,data:Fe.extend({limit:i,offset:this.offset,sort:this.sortField,sortdir:this.sortDir},this.params)}),n=u.then(a=>{this.pageLimit>0&&a.length>this.pageLimit?(a.pop(),this._totalCount=u.getResponseHeader("girder-total-count"),this._hasMorePages=!0):this._hasMorePages=!1;var o=a.length;if(this.filterFunc){var h=this.filterFunc;a=a.map(function(d,F){return[F,d]}).filter(function(d){return h(d[1])})}var g=a.length,l=this.pageLimit===0||t.length+g<this.pageLimit;if(!l&&this.pageLimit>0){var c=this.pageLimit-t.length;g>c&&(this._hasMorePages=!0,g=c),this.filterFunc?o=a[g-1][0]+1:o=g}if(a=a.slice(0,g),this.filterFunc&&(a=a.map(function(d){return d[1]})),t=t.concat(a),this.offset+=o,l&&this._hasMorePages)return r.apply(this);(t.length>0||e)&&(this.append&&!e?this.add(t):this.reset(t)),this.trigger("g:changed")});return u.girder={fetch:!0},n}return r.apply(this)}}),hm=Qi.extend({resourceName:"api_key",model:yh}),za=v0.extend({resourceName:"assetstore",capacityKnown:function(){var s=this.get("capacity");return s&&s.free!==null&&s.total!==null},capacityString:function(){var s=this.get("capacity");return Yt(s.free)+" free of "+Yt(s.total)+" total"},import:function(s){return Ve({url:`assetstore/${this.id}/import`,method:"POST",data:s,error:null}).done(e=>{this.trigger("g:imported",e)}).fail(e=>{this.trigger("g:error",e)})},save:function(){return Fe.isNumber(this.get("perms"))&&this.set("perms",this.get("perms").toString(8)),v0.prototype.save.call(this,arguments)}}),gm=Qi.extend({resourceName:"assetstore",model:za,pageLimit:1e3}),Ha={_sendMetadata:function(s,e,i,t){t=t||{},Ve({url:t.path||(this.altUrl||this.resourceName)+`/${this.id}/metadata?allowNull=true`,contentType:"application/json",data:JSON.stringify(s),method:"PUT",error:null}).done(r=>{this.set(t.field||"meta",r.meta),Fe.isFunction(e)&&e()}).fail(r=>{r.message=r.responseJSON.message,Fe.isFunction(i)&&i(r)})},addMetadata:function(s,e,i,t,r){r=r||{};var u={};u[s]=e;var n=this.get(r.field||"meta");n&&Fe.has(n,s)?Fe.isFunction(t)&&t({message:s+" is already a metadata key"}):this._sendMetadata(u,i,t,r)},removeMetadata:function(s,e,i,t){Fe.isArray(s)||(s=[s]),Ve({url:t.path||(this.altUrl||this.resourceName)+`/${this.id}/metadata`,contentType:"application/json",data:JSON.stringify(s),method:"DELETE",error:null}).done(r=>{this.set(t.field||"meta",r.meta),Fe.isFunction(e)&&e()}).fail(r=>{r.message=r.responseJSON.message,Fe.isFunction(i)&&i(r)})},editMetadata:function(s,e,i,t,r,u){if(u=u||{},s===e){var n={};n[s]=i,this._sendMetadata(n,t,r,u)}else if(Fe.has(this.get(u.field||"meta"),s))Fe.isFunction(r)&&r({message:s+" is already a metadata key"});else{var a={};a[e]=null,a[s]=i,this._sendMetadata(a,t,r,u)}}},b0=ms.extend({resourceName:"collection"});Fe.extend(b0.prototype,Ha);var Sh=Qi.extend({resourceName:"collection",model:b0}),Oi=ms.extend({resourceName:"folder",getRootPath:function(){return Ve({url:`${this.resourceName}/${this.id}/rootpath`})},removeContents:function(){return Ve({url:`${this.resourceName}/${this.id}/contents`,method:"DELETE"}).done(()=>{this.trigger("g:success")}).fail(s=>{this.trigger("g:error",s)})}});Fe.extend(Oi.prototype,Ha);var Ms=v0.extend({resourceName:"item",getAccessLevel:function(s){if(s=s||me.noop,this.has("_accessLevel"))return s(this.get("_accessLevel")),this.get("_accessLevel");if(this.parent&&this.parent.getAccessLevel())return this.set("_accessLevel",this.parent.getAccessLevel()),s(this.get("_accessLevel")),this.get("_accessLevel");var e=new Oi;e.set({_id:this.get("folderId")}).once("g:fetched",function(){this.parent=e,this.set("_accessLevel",this.parent.getAccessLevel()),s(this.get("_accessLevel"))},this).fetch()},getRootPath:function(s){return Ve({url:`${this.resourceName}/${this.id}/rootpath`}).done(e=>{s(e)}).fail(e=>{this.trigger("g:error",e)})},getFiles:function(){return Ve({url:`${this.resourceName}/${this.id}/files`}).then(s=>{const e=new jh(s);return this.trigger("g:files",e),e}).fail(s=>{this.trigger("g:error",s)})}});Fe.extend(Ms.prototype,Ha);Cn.s3=function(s){return this.params=s,this.startByte=0,Fe.extend(this,er.Events)};var Cu=Cn.s3.prototype;Cu._xhrProgress=function(s){if(s.lengthComputable){var e=this.payloadLength+s.loaded-s.total;e>=0&&this.trigger("g:upload.progress",{startByte:this.startByte,loaded:e,total:this.params.file.size,file:this.params.file})}};Cu.execute=function(){var s=this.params.upload.s3,e=new XMLHttpRequest;e.open(s.request.method,s.request.url),Fe.each(s.request.headers,(i,t)=>{e.setRequestHeader(t,i)}),s.chunked?this._multiChunkUpload(e):(this.payloadLength=this.params.file.size,e.onload=()=>{e.status===200?(this.trigger("g:upload.chunkSent",{bytes:this.payloadLength}),Ve({url:"file/completion",method:"POST",data:{uploadId:this.params.upload._id},error:null}).done(i=>{this.trigger("g:upload.complete",i)}).fail(i=>{var t;i.status===0?t="Could not connect to the server.":t="An error occurred when resuming upload, check console.",this.trigger("g:upload.error",{message:t})})):this.trigger("g:upload.error",{message:"Error occurred uploading to S3 ("+e.status+")."})},e.upload.addEventListener("progress",i=>{this._xhrProgress(i)}),e.addEventListener("error",i=>{this.trigger("g:upload.error",{message:"Error occurred uploading to S3.",event:i})}),e.send(this.params.file))};Cu.resume=function(){if(this.params.upload.s3.chunked)return this._sendNextChunk();Ve({url:"file/offset",method:"GET",data:{uploadId:this.params.upload._id},error:null}).done(s=>{this.params.upload.s3.request=s,this.execute()}).fail(s=>{var e;s.status===0?e="Could not connect to the Girder server.":e="An error occurred when resuming upload, check console.",this.trigger("g:upload.error",{message:e})})};Cu._multiChunkUpload=function(s){this.eTagList={},this.startByte=0,this.chunkN=1,s.onload=()=>{s.status===200?(this.s3UploadId=s.responseText.match(/<UploadId>(.*)<\/UploadId>/).pop(),this._sendNextChunk()):this.trigger("g:upload.error",{message:"Error while initializing multichunk S3 upload.",event})},s.addEventListener("error",e=>{this.trigger("g:upload.error",{message:"Error occurred uploading to S3.",event:e})}),s.send()};Cu._sendNextChunk=function(){var s=this.params.file.webkitSlice?"webkitSlice":"slice",e=this.params.file[s](this.startByte,this.startByte+this.params.upload.s3.chunkLength);this.payloadLength=e.size,Ve({url:"file/chunk",method:"POST",data:{offset:0,chunk:JSON.stringify({s3UploadId:this.s3UploadId,partNumber:this.chunkN,contentLength:this.payloadLength}),uploadId:this.params.upload._id},error:null}).done(i=>{var t=new XMLHttpRequest;t.open(i.s3.request.method,i.s3.request.url),t.onload=()=>{t.status===200?(this.trigger("g:upload.chunkSent",{bytes:this.payloadLength}),this.eTagList[this.chunkN]=t.getResponseHeader("ETag"),this.startByte+=this.payloadLength,this.chunkN+=1,this.startByte<this.params.file.size?this._sendNextChunk():this._finalizeMultiChunkUpload()):this.trigger("g:upload.error",{message:"Error occurred uploading to S3 ("+t.status+")."})},t.upload.addEventListener("progress",r=>{this._xhrProgress(r)}),t.addEventListener("error",r=>{this.trigger("g:upload.error",{message:"Error occurred uploading to S3.",event:r})}),t.send(e)}).fail(()=>{this.trigger("g:upload.error",{message:"Error getting signed chunk request from Girder."})})};Cu._finalizeMultiChunkUpload=function(){Ve({url:"file/completion",method:"POST",data:{uploadId:this.params.upload._id},error:null}).done(s=>{this.trigger("g:upload.complete",s)}).fail(s=>{const e=s.status===0?"Could not connect to the server.":"Upload error during finalize, check console.";this.trigger("g:upload.error",{message:e})})};const Rk=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var Ua=v0.extend({resourceName:"file",resumeInfo:null,_wrapData:function(s,e){var i=s;return s instanceof Blob||(Fe.isArray(s)||(i=[s]),i=new Blob(i,{type:e})),i},updateContents:function(s){s=this._wrapData(s),this.upload(null,s,{url:`file/${this.id}/contents`,method:"PUT",data:{size:s.size}})},_uploadToContainer:function(s,e,i,t,r){Fe.isString(e)&&(e=new s({_id:e})),i=this._wrapData(i,r),i.name=t,this.upload(e,i)},uploadToFolder:function(s,e,i,t){this._uploadToContainer(Oi,s,e,i,t)},uploadToItem:function(s,e,i,t){this._uploadToContainer(Ms,s,e,i,t)},upload:function(s,e,i,t){this.startByte=0,this.resumeInfo=null,this.uploadHandler=null,i=i||{url:"file",method:"POST",data:Fe.extend({parentType:s.resourceName,parentId:s.get("_id"),name:e.name,size:e.size,mimeType:e.type},t)},Ve(i).done(r=>{var u=r.behavior;if(u&&Cn[u])return this.uploadHandler=new Cn[u]({upload:r,parentModel:s,file:e}),this.uploadHandler.on({"g:upload.complete":function(n){this.set(n),this.trigger("g:upload.complete",n),this.uploadHandler=null},"g:upload.chunkSent":function(n){this.trigger("g:upload.chunkSent",n)},"g:upload.error":function(n){this.trigger("g:upload.error",n)},"g:upload.errorStarting":function(n){this.trigger("g:upload.errorStarting",n)},"g:upload.progress":function(n){this.trigger("g:upload.progress",{startByte:n.startByte,loaded:n.loaded,total:n.file.size,file:n.file})}},this),this.uploadHandler.execute();e.size>0?this._uploadChunk(e,r._id):(this.set(r),this.trigger("g:upload.complete"))}).fail(r=>{var u="Error: ",n;r.status===0?u+="Connection to the server interrupted.":(u+=r.responseJSON.message,n=r.responseJSON.identifier),this.trigger("g:upload.errorStarting",{message:u,identifier:n,response:r})})},resumeUpload:function(){if(this.uploadHandler!==null&&this.uploadHandler.resume)return this.uploadHandler.resume();Ve({url:"file/offset",method:"GET",data:{uploadId:this.resumeInfo.uploadId},error:null}).done(s=>{this.startByte=s.offset,this._uploadChunk(this.resumeInfo.file,this.resumeInfo.uploadId)}).fail(s=>{var e;s.status===0?e="Could not connect to the server.":e="An error occurred when resuming upload, check console.",this.trigger("g:upload.error",{message:e,response:s})})},abortUpload:function(){!this.resumeInfo||!this.resumeInfo.uploadId||Ve({url:"system/uploads",method:"DELETE",data:{uploadId:this.resumeInfo.uploadId},error:null,done:null})},_uploadChunk:function(s,e){var i=Math.min(this.startByte+If(),s.size);this.chunkLength=i-this.startByte;var t=s.webkitSlice?"webkitSlice":"slice",r=s[t](this.startByte,i);Ve({url:`file/chunk?offset=${this.startByte}&uploadId=${e}`,method:"POST",data:r,contentType:!1,processData:!1,success:u=>{this.trigger("g:upload.chunkSent",{bytes:i-this.startByte}),i===s.size?(this.startByte=0,this.resumeInfo=null,this.set(u),this.trigger("g:upload.complete")):(this.startByte=i,this._uploadChunk(s,e))},error:u=>{var n="Error: ",a;u.status===0?n+="Connection to the server interrupted.":(n+=u.responseJSON.message,a=u.responseJSON.identifier),this.resumeInfo={uploadId:e,file:s},this.trigger("g:upload.error",{message:n,identifier:a,response:u})},xhr:()=>{var u=new window.XMLHttpRequest;return u.upload.addEventListener("progress",n=>{this._uploadProgress(s,n)}),u}})},_uploadProgress:function(s,e){if(e.lengthComputable){var i=this.chunkLength+e.loaded-e.total;i>=0&&this.trigger("g:upload.progress",{startByte:this.startByte,loaded:i,total:s.size,file:s})}}}),Bk=Qi.extend({resourceName:"file",model:Ua,pageLimit:100});const jh=Bk;var Fm=Qi.extend({resourceName:"folder",model:Oi,pageLimit:100}),bs=ms.extend({resourceName:"group",sendInvitation:function(s,e,i,t){return t=t||{},Ve({url:`${this.resourceName}/${this.id}/invitation`,data:Fe.extend({userId:s,level:e},t),method:"POST",error:null}).done(r=>{this.set(r),!i&&s===it().get("_id")&&(t.force?it().addToGroup(this.get("_id")):it().addInvitation(this.get("_id"),e)),this.trigger("g:invited")}).fail(r=>{this.trigger("g:error",r)})},joinGroup:function(){return Ve({url:`${this.resourceName}/${this.id}/member`,method:"POST"}).done(s=>{it().addToGroup(this.get("_id")),it().removeInvitation(this.get("_id")),this.set(s),this.trigger("g:joined")}).fail(s=>{this.trigger("g:error",s)})},requestInvitation:function(){return Ve({url:`${this.resourceName}/${this.id}/member`,method:"POST"}).done(s=>{this.set(s),this.trigger("g:inviteRequested")}).fail(s=>{this.trigger("g:error",s)})},promoteUser:function(s,e){var i;return e===Xe.WRITE?i="moderator":e===Xe.ADMIN&&(i="admin"),Ve({url:`${this.resourceName}/${this.id}/${i}`,data:{userId:s.get("_id")},method:"POST"}).done(t=>{this.set(t),this.trigger("g:promoted")}).fail(t=>{this.trigger("g:error",t)})},demoteUser:function(s,e){var i;return e===Xe.WRITE?i="moderator":e===Xe.ADMIN&&(i="admin"),Ve({url:`${this.resourceName}/${this.id}/${i}?userId=${s}`,method:"DELETE"}).done(t=>{this.set(t),this.trigger("g:demoted")}).fail(t=>{this.trigger("g:error",t)})},removeMember:function(s){return Ve({url:`${this.resourceName}/${this.id}/member?userId=${s}`,method:"DELETE"}).done(e=>{s===it().get("_id")&&it().removeFromGroup(this.get("_id")),this.set(e),this.trigger("g:removed")}).fail(e=>{this.trigger("g:error",e)})},mayAddMembers:function(){if(it().get("admin"))return!0;var s,e=this.get("_addToGroupPolicy");if(e==="nomod"||e==="yesmod")s="mod";else if(e==="noadmin"||e==="yesadmin")s="admin";else return!1;var i=this.get("addAllowed")||"";return i==="no"||e.substr(0,3)!=="yes"&&i.substr(0,3)!=="yes"?!1:(i==="yesadmin"&&(s="admin"),s==="admin"&&this.get("_accessLevel")>=Xe.ADMIN||s==="mod"&&this.get("_accessLevel")>=Xe.WRITE)}}),pm=Qi.extend({resourceName:"group",model:bs}),fm=Qi.extend({resourceName:"item",model:Ms,pageLimit:100}),ou=Qi.extend({resourceName:"user",model:pr,sortField:"lastName",secondarySortField:"firstName"},{getTotalCount:function(){return Ve({url:"user/details",method:"GET"}).then(s=>s.nUsers)}});const Ok=Object.freeze(Object.defineProperty({__proto__:null,ApiKeyCollection:hm,AssetstoreCollection:gm,Collection:Qi,CollectionCollection:Sh,FileCollection:jh,FolderCollection:Fm,GroupCollection:pm,ItemCollection:fm,UserCollection:ou},Symbol.toStringTag,{value:"Module"}));+function(s){var e=function(r,u){this.options=u,this.$body=s(document.body),this.$element=s(r),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,s.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};e.VERSION="3.4.1",e.TRANSITION_DURATION=300,e.BACKDROP_TRANSITION_DURATION=150,e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(r){return this.isShown?this.hide():this.show(r)},e.prototype.show=function(r){var u=this,n=s.Event("show.bs.modal",{relatedTarget:r});this.$element.trigger(n),!(this.isShown||n.isDefaultPrevented())&&(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',s.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){u.$element.one("mouseup.dismiss.bs.modal",function(a){s(a.target).is(u.$element)&&(u.ignoreBackdropClick=!0)})}),this.backdrop(function(){var a=s.support.transition&&u.$element.hasClass("fade");u.$element.parent().length||u.$element.appendTo(u.$body),u.$element.show().scrollTop(0),u.adjustDialog(),a&&u.$element[0].offsetWidth,u.$element.addClass("in"),u.enforceFocus();var o=s.Event("shown.bs.modal",{relatedTarget:r});a?u.$dialog.one("bsTransitionEnd",function(){u.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(e.TRANSITION_DURATION):u.$element.trigger("focus").trigger(o)}))},e.prototype.hide=function(r){r&&r.preventDefault(),r=s.Event("hide.bs.modal"),this.$element.trigger(r),!(!this.isShown||r.isDefaultPrevented())&&(this.isShown=!1,this.escape(),this.resize(),s(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),s.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",s.proxy(this.hideModal,this)).emulateTransitionEnd(e.TRANSITION_DURATION):this.hideModal())},e.prototype.enforceFocus=function(){s(document).off("focusin.bs.modal").on("focusin.bs.modal",s.proxy(function(r){document!==r.target&&this.$element[0]!==r.target&&!this.$element.has(r.target).length&&this.$element.trigger("focus")},this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",s.proxy(function(r){r.which==27&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},e.prototype.resize=function(){this.isShown?s(window).on("resize.bs.modal",s.proxy(this.handleUpdate,this)):s(window).off("resize.bs.modal")},e.prototype.hideModal=function(){var r=this;this.$element.hide(),this.backdrop(function(){r.$body.removeClass("modal-open"),r.resetAdjustments(),r.resetScrollbar(),r.$element.trigger("hidden.bs.modal")})},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(r){var u=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var a=s.support.transition&&n;if(this.$backdrop=s(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",s.proxy(function(h){if(this.ignoreBackdropClick){this.ignoreBackdropClick=!1;return}h.target===h.currentTarget&&(this.options.backdrop=="static"?this.$element[0].focus():this.hide())},this)),a&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!r)return;a?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):r()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var o=function(){u.removeBackdrop(),r&&r()};s.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",o).emulateTransitionEnd(e.BACKDROP_TRANSITION_DURATION):o()}else r&&r()},e.prototype.handleUpdate=function(){this.adjustDialog()},e.prototype.adjustDialog=function(){var r=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&r?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!r?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var r=window.innerWidth;if(!r){var u=document.documentElement.getBoundingClientRect();r=u.right-Math.abs(u.left)}this.bodyIsOverflowing=document.body.clientWidth<r,this.scrollbarWidth=this.measureScrollbar()},e.prototype.setScrollbar=function(){var r=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var u=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",r+u),s(this.fixedContent).each(function(n,a){var o=a.style.paddingRight,h=s(a).css("padding-right");s(a).data("padding-right",o).css("padding-right",parseFloat(h)+u+"px")}))},e.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),s(this.fixedContent).each(function(r,u){var n=s(u).data("padding-right");s(u).removeData("padding-right"),u.style.paddingRight=n||""})},e.prototype.measureScrollbar=function(){var r=document.createElement("div");r.className="modal-scrollbar-measure",this.$body.append(r);var u=r.offsetWidth-r.clientWidth;return this.$body[0].removeChild(r),u};function i(r,u){return this.each(function(){var n=s(this),a=n.data("bs.modal"),o=s.extend({},e.DEFAULTS,n.data(),typeof r=="object"&&r);a||n.data("bs.modal",a=new e(this,o)),typeof r=="string"?a[r](u):o.show&&a.show(u)})}var t=s.fn.modal;s.fn.modal=i,s.fn.modal.Constructor=e,s.fn.modal.noConflict=function(){return s.fn.modal=t,this},s(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(r){var u=s(this),n=u.attr("href"),a=u.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""),o=s(document).find(a),h=o.data("bs.modal")?"toggle":s.extend({remote:!/#/.test(n)&&n},o.data(),u.data());u.is("a")&&r.preventDefault(),o.one("show.bs.modal",function(g){g.isDefaultPrevented()||o.one("hidden.bs.modal",function(){u.is(":visible")&&u.trigger("focus")})}),i.call(o,h,this)})}(me);me.fn.girderModal=function(s){if(me(this).is(".modal")&&me(this).data("bs.modal")&&me(this).data("bs.modal").isShown){var e=me(me(this).data("bs.modal").$element),i=e.hasClass("fade");e.removeClass("fade"),me(this).modal("hide"),e.toggleClass("fade",i)}return s!=="close"&&(this.off(),setTimeout(()=>{this.modal().find('[data-dismiss="modal"]').off("click").on("click",()=>{this.modal("hide")})},0),s!==!1&&s.delegateEvents()),this};var Nk=er.Router.extend({initialize:function(){this._enabled=!0},execute:function(s,e){e.push(Na(e.pop()));var i=e[e.length-1];s&&s.apply(this,e),i.dialog==="login"?_e.trigger("g:loginUi"):i.dialog==="register"?_e.trigger("g:registerUi"):i.dialog==="resetpassword"&&_e.trigger("g:resetPasswordUi")},enabled:function(){return arguments.length&&(this._enabled=!!arguments[0]),this._enabled},navigate:function(){this._enabled&&er.Router.prototype.navigate.apply(this,arguments)}}),He=new Nk;He.on("route",function(s,e){e.slice(-1)[0].dialog||me(".modal").girderModal("close")});function Wk(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=is(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function mm(s,e){return Array.isArray(s)?zk(s,e):s&&typeof s=="object"?Hk(s):s||""}function zk(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=mm(s[n]))&&(u&&e[n]&&(i=is(i)),t=t+r+i,r=" ");return t}function Hk(s){var e="",i="";for(var t in s)t&&s[t]&&Uk.call(s,t)&&(e=e+i+t,i=" ");return e}function is(s){var e=""+s,i=Yk.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var Uk=Object.prototype.hasOwnProperty,Yk=/["&<>]/;function vm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void vm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function Vk(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<div class="modal-body">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+"<p></p>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",n.msgConfirmation&&(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<p class="g-additional-text"></p>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<p class="g-additional-instruction">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+"You need to enter '",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+is((i=n.yesText.toUpperCase())==null?"":i),r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+" ",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+is((i=n.name)==null?"":i),r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+"'",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+`
`,r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'and then click on the "',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+is((i=n.yesText)==null?"":i),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'" button</p>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<input class="input-sm form-control" id="g-confirm-text" type="text" name="confirmMsg"/>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<spam class="g-msg-error"></spam>'),e=e+"</div>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<div class="modal-footer">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+is((i=n.noText)==null?"":i)+"</a>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+"<a"+(Wk("class",mm(["btn","btn-small",n.yesClass],[!1,!1,!0]),!1,!1)+' id="g-confirm-button"')+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/confirmDialog.pug",e=e+is((i=n.yesText)==null?"":i)+"</a></div></div></div>"}).call(this,"params"in u?u.params:typeof params<"u"?params:void 0)}catch(n){vm(n,t,r)}return e}function ar(s,e,i){if(He.enabled()){var t=er.history.fragment,r=Wa(t),u=Na(r.name),n=u.dialog,a=u.dialogid;delete u.dialog,delete u.dialogid;var o=me.param(u);o.length>0&&(o="?"+o),n===s&&a===i&&He.navigate(r.base+o,e)}}function br(s,e,i){if(He.enabled()){var t=er.history.fragment,r=Wa(t),u=Na(r.name),n=u.dialog,a=u.dialogid;if(n!==s||i!==a){u.dialog=s,i&&(u.dialogid=i);var o=me.param(u);o.length>0&&(o="?"+o),He.navigate(r.base+o,e)}}}function tr(s){s=Fe.extend({text:"Are you sure?",yesText:"Yes",yesClass:"btn-danger",noText:"Cancel",escapedHtml:!1,msgConfirmation:!1,additionalText:"",name:""},s),me("#g-dialog-container").html(Vk({params:s})).girderModal(!1).one("hidden.bs.modal",function(){me("#g-confirm-button").off("click")});const e=me("#g-dialog-container").find(".modal-body>p:first-child");s.escapedHtml?e.html(s.text):e.text(s.text),s.msgConfirmation&&(s.escapedHtml?me(".g-additional-text").html(s.additionalText):me(".g-additional-text").text(s.additionalText)),me("#g-confirm-button").off("click").on("click",function(){if(s.msgConfirmation){const i=`${s.yesText.toUpperCase()} ${s.name}`,t=me("#g-confirm-text").val();t.toUpperCase()===i.toUpperCase()?(me("#g-dialog-container").modal("hide"),s.confirmCallback()):t.toUpperCase()===""?(me(".g-msg-error").html(`Error: You need to enter <b>'${i}'</b>.`),me(".g-msg-error").css("color","red")):(me(".g-msg-error").html(`Error: <b>'${t}'</b> isn't <b>'${i}'</b>`),me(".g-msg-error").css("color","red"))}else me("#g-dialog-container").modal("hide"),s.confirmCallback()})}const Xk=Object.freeze(Object.defineProperty({__proto__:null,confirm:tr,handleClose:ar,handleOpen:br},Symbol.toStringTag,{value:"Module"})),bm=Object.freeze(Object.defineProperty({__proto__:null,AccessControlledModel:ms,ApiKeyModel:yh,AssetstoreModel:za,CollectionModel:b0,FileModel:Ua,FolderModel:Oi,GroupModel:bs,ItemModel:Ms,MetadataMixin:Ha,Model:v0,UserModel:pr},Symbol.toStringTag,{value:"Module"}));var Gk=function(s,e){window.girder.plugins[s]=e};const qk=Object.freeze(Object.defineProperty({__proto__:null,registerPluginNamespace:Gk},Symbol.toStringTag,{value:"Module"}));function Kk(s,e,i){s.prototype[e]=Fe.wrap(s.prototype[e],i)}var wm={};function Jk(s,e){wm[s]=e}function ym(s){return wm[s]}const Zk=Object.freeze(Object.defineProperty({__proto__:null,exposePluginConfig:Jk,getPluginConfigRoute:ym,wrap:Kk},Symbol.toStringTag,{value:"Module"})),Qk=Object.freeze(Object.defineProperty({__proto__:null,PluginUtils:Zk,S3UploadHandler:Rk,eventStream:Ti},Symbol.toStringTag,{value:"Module"}));+function(s){var e='[data-dismiss="alert"]',i=function(u){s(u).on("click",e,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(u){var n=s(this),a=n.attr("data-target");a||(a=n.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),a=a==="#"?[]:a;var o=s(document).find(a);if(u&&u.preventDefault(),o.length||(o=n.closest(".alert")),o.trigger(u=s.Event("close.bs.alert")),u.isDefaultPrevented())return;o.removeClass("in");function h(){o.detach().trigger("closed.bs.alert").remove()}s.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",h).emulateTransitionEnd(i.TRANSITION_DURATION):h()};function t(u){return this.each(function(){var n=s(this),a=n.data("bs.alert");a||n.data("bs.alert",a=new i(this)),typeof u=="string"&&a[u].call(n)})}var r=s.fn.alert;s.fn.alert=t,s.fn.alert.Constructor=i,s.fn.alert.noConflict=function(){return s.fn.alert=r,this},s(document).on("click.bs.alert.data-api",e,i.prototype.close)}(me);var We=er.View.extend({constructor:function(s){s&&Fe.has(s,"parentView")?s.parentView&&(s.parentView.registerChildView(this),this.parentView=s.parentView):console.error("View created with no parentView property set. This view may not be garbage collected."),er.View.prototype.constructor.apply(this,arguments)},destroy:function(){if(Fe.each(this._childViews,function(e){e.destroy()}),this._childViews=null,this.undelegateEvents(),this.stopListening(),this.off(),_e.off(null,null,this),Ti.off(null,null,this),this.parentView&&this.parentView.unregisterChildView(this),this.$el.is(".modal")){var s=this.$el;s.data("bs.modal")&&s.data("bs.modal").isShown?(s.on("hidden.bs.modal",function(){s.empty().off().removeData()}).modal("hide"),s.modal("removeBackdrop")):(s.modal("hideModal"),s.modal("removeBackdrop"),s.empty().off().removeData())}else this.$el.empty().off().removeData()},registerChildView:function(s){this._childViews=this._childViews||[],this._childViews.push(s)},unregisterChildView:function(s){this._childViews=Fe.without(this._childViews,s)}});function zl(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=eS(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function eS(s){var e=""+s,i=tS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var tS=/["&<>]/;function xm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void xm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function rS(s){var e="",i,t;try{var r=s||{};(function(u,n,a){t=1,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+'<div class="g-footer-links">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+'<a id="g-about-link" href="http://girder.readthedocs.org/en/latest/user-guide.html">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"About</a>",t=3,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",n&&(t=4,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"<a"+(' id="g-contact-link"'+zl("href",n,!0,!1))+">",t=4,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"Contact</a>"),t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"<a"+zl("href",u,!0,!1)+">",t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"Web API</a>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+'<a id="g-bug-link" href="https://github.com/girder/girder/issues/new">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"Report a bug</a>",t=7,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",a&&(t=8,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"<a"+(' id="g-privacy-notice-link"'+zl("href",a,!0,!1))+">",t=8,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"Privacy Notice</a>"),e=e+"</div>",t=10,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+'<div class="g-footer-info">',t=11,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutFooter.pug",e=e+"&copy; Kitware, Inc.</div>"}).call(this,"apiRoot"in r?r.apiRoot:typeof apiRoot<"u"?apiRoot:void 0,"contactHref"in r?r.contactHref:typeof contactHref<"u"?contactHref:void 0,"privacyNoticeLink"in r?r.privacyNoticeLink:typeof privacyNoticeLink<"u"?privacyNoticeLink:void 0)}catch(u){xm(u,i,t)}return e}var Cm=We.extend({initialize:function(s){const e=s.contactEmail||null;this.contactHref=e!==null?`mailto:${e}`:null,this.privacyNoticeHref=s.privacyNoticeHref||null},render:function(){return this.$el.html(rS({apiRoot:ks(),contactHref:this.contactHref,privacyNoticeLink:this.privacyNoticeHref})),this}});function i0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Qo(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Tc(s,e){return Array.isArray(s)?iS(s,e):s&&typeof s=="object"?sS(s):s||""}function iS(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Tc(s[n]))&&(u&&e[n]&&(i=Qo(i)),t=t+r+i,r=" ");return t}function sS(s){var e="",i="";for(var t in s)t&&s[t]&&uS.call(s,t)&&(e=e+i+t,i=" ");return e}function Qo(s){var e=""+s,i=nS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var uS=Object.prototype.hasOwnProperty,nS=/["&<>]/;function Em(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Em(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function oS(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+'<div class="g-global-nav-main">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+'<ul class="g-global-nav">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",function(){var a=n;if(typeof a.length=="number")for(var o=0,h=a.length;o<h;o++){var g=a[o];r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+'<li class="g-global-nav-li">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<a"+(' class="g-nav-link"'+i0("g-target",g.target,!0,!1)+i0("g-name",g.name,!0,!1)+i0("href",`#${g.target}`,!0,!1))+">",r=6,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<i"+i0("class",Tc([g.icon],[!0]),!1,!1)+"></i>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<span>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+Qo((i=g.name)==null?"":i)+"</span></a></li>"}else{var h=0;for(var o in a){h++;var g=a[o];r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+'<li class="g-global-nav-li">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<a"+(' class="g-nav-link"'+i0("g-target",g.target,!0,!1)+i0("g-name",g.name,!0,!1)+i0("href",`#${g.target}`,!0,!1))+">",r=6,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<i"+i0("class",Tc([g.icon],[!0]),!1,!1)+"></i>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+"<span>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutGlobalNav.pug",e=e+Qo((i=g.name)==null?"":i)+"</span></a></li>"}}}.call(this),e=e+"</ul></div>"}).call(this,"navItems"in u?u.navItems:typeof navItems<"u"?navItems:void 0)}catch(n){Em(n,t,r)}return e}var Am=We.extend({events:{"click .g-nav-link":function(s){s.preventDefault();var e=me(s.currentTarget);He.navigate(e.attr("g-target"),{trigger:!0}),e.parent().addClass("g-active")}},initialize:function(s){_e.on("g:highlightItem",this.selectForView,this),_e.on("g:login",this.render,this),_e.on("g:logout",this.render,this),_e.on("g:login-changed",this.render,this),s=s||{},s.navItems?this.navItems=s.navItems:this.defaultNavItems=[{name:"Collections",icon:"icon-sitemap",target:"collections"},{name:"Groups",icon:"icon-users",target:"groups"}]},render:function(){var s;return this.navItems?s=this.navItems:(s=this.defaultNavItems,it()&&(s=s.slice(),s.push({name:"Users",icon:"icon-user",target:"users"}),it().get("admin")&&s.push({name:"Admin console",icon:"icon-wrench",target:"admin"}))),this.$el.html(oS({navItems:s})),er.history.fragment&&this.$('[g-target="'+er.history.fragment+'"]').parent().addClass("g-active"),this},selectForView:function(s){this.deactivateAll(),this.$('[g-name="'+s.slice(0,-4)+'"]').parent().addClass("g-active")},deactivateAll:function(){this.$(".g-global-nav-li").removeClass("g-active")}});function mg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=km(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function km(s){var e=""+s,i=aS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var aS=/["&<>]/;function Sm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Sm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function lS(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<div class="g-user-text">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",a?(r=3,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<a class="g-user-dropdown-link" data-toggle="dropdown" data-target="#g-user-action-menu">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"",r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-user"></i>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+" ",r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+km((i=a.get("login"))==null?"":i),r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-down-open"></i></a>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<div class="dropdown" id="g-user-action-menu">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<ul class="dropdown-menu" role="menu">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<li role="presentation">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"<a"+(' class="g-my-folders"'+mg("href",`#user/${a.id}`,!0,!1))+">",r=10,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-folder"></i>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"My folders</a></li>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<li role="presentation">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"<a"+(' class="g-my-settings"'+mg("href",`#useraccount/${a.id}/info`,!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-cog"></i>',r=15,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"My account</a></li>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<li class="divider" role="presentation"></li>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<li role="presentation">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<a class="g-logout">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-logout"></i>',r=20,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"Log out</a></li></ul></div>"):(r=22,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",n!=="closed"&&(r=23,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<a class="g-register">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"Register</a>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<div class="g-or-text">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"or</div>"),r=25,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<a class="g-login">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+"Log In",r=26,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeaderUser.pug",e=e+'<i class="icon-login"></i></a>'),e=e+"</div>"}).call(this,"registrationPolicy"in u?u.registrationPolicy:typeof registrationPolicy<"u"?registrationPolicy:void 0,"user"in u?u.user:typeof user<"u"?user:void 0)}catch(n){Sm(n,t,r)}return e}+function(s){var e=".dropdown-backdrop",i='[data-toggle="dropdown"]',t=function(o){s(o).on("click.bs.dropdown",this.toggle)};t.VERSION="3.4.1";function r(o){var h=o.attr("data-target");h||(h=o.attr("href"),h=h&&/#[A-Za-z]/.test(h)&&h.replace(/.*(?=#[^\s]*$)/,""));var g=h!=="#"?s(document).find(h):null;return g&&g.length?g:o.parent()}function u(o){o&&o.which===3||(s(e).remove(),s(i).each(function(){var h=s(this),g=r(h),l={relatedTarget:this};g.hasClass("open")&&(o&&o.type=="click"&&/input|textarea/i.test(o.target.tagName)&&s.contains(g[0],o.target)||(g.trigger(o=s.Event("hide.bs.dropdown",l)),!o.isDefaultPrevented()&&(h.attr("aria-expanded","false"),g.removeClass("open").trigger(s.Event("hidden.bs.dropdown",l)))))}))}t.prototype.toggle=function(o){var h=s(this);if(!h.is(".disabled, :disabled")){var g=r(h),l=g.hasClass("open");if(u(),!l){"ontouchstart"in document.documentElement&&!g.closest(".navbar-nav").length&&s(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(s(this)).on("click",u);var c={relatedTarget:this};if(g.trigger(o=s.Event("show.bs.dropdown",c)),o.isDefaultPrevented())return;h.trigger("focus").attr("aria-expanded","true"),g.toggleClass("open").trigger(s.Event("shown.bs.dropdown",c))}return!1}},t.prototype.keydown=function(o){if(!(!/(38|40|27|32)/.test(o.which)||/input|textarea/i.test(o.target.tagName))){var h=s(this);if(o.preventDefault(),o.stopPropagation(),!h.is(".disabled, :disabled")){var g=r(h),l=g.hasClass("open");if(!l&&o.which!=27||l&&o.which==27)return o.which==27&&g.find(i).trigger("focus"),h.trigger("click");var c=" li:not(.disabled):visible a",d=g.find(".dropdown-menu"+c);if(d.length){var F=d.index(o.target);o.which==38&&F>0&&F--,o.which==40&&F<d.length-1&&F++,~F||(F=0),d.eq(F).trigger("focus")}}}};function n(o){return this.each(function(){var h=s(this),g=h.data("bs.dropdown");g||h.data("bs.dropdown",g=new t(this)),typeof o=="string"&&g[o].call(h)})}var a=s.fn.dropdown;s.fn.dropdown=n,s.fn.dropdown.Constructor=t,s.fn.dropdown.noConflict=function(){return s.fn.dropdown=a,this},s(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(o){o.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(me);var jm=We.extend({events:{"click a.g-login":function(){_e.trigger("g:loginUi")},"click a.g-register":function(){_e.trigger("g:registerUi")},"click a.g-logout":Nf},initialize:function(s){this.registrationPolicy=s.registrationPolicy,_e.on("g:login",this.render,this),_e.on("g:login-changed",this.render,this),_e.on("g:logout",this.render,this)},render:function(){return this.$el.html(lS({user:it(),registrationPolicy:this.registrationPolicy})),this}});+function(s){var e=["sanitize","whiteList","sanitizeFn"],i=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],t=/^aria-[\w-]*$/i,r={"*":["class","dir","id","lang","role",t],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},u=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,n=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function a(c,d){var F=c.nodeName.toLowerCase();if(s.inArray(F,d)!==-1)return s.inArray(F,i)!==-1?!!(c.nodeValue.match(u)||c.nodeValue.match(n)):!0;for(var p=s(d).filter(function(v,w){return w instanceof RegExp}),f=0,m=p.length;f<m;f++)if(F.match(p[f]))return!0;return!1}function o(c,d,F){if(c.length===0)return c;if(F&&typeof F=="function")return F(c);if(!document.implementation||!document.implementation.createHTMLDocument)return c;var p=document.implementation.createHTMLDocument("sanitization");p.body.innerHTML=c;for(var f=s.map(d,function(D,T){return T}),m=s(p.body).find("*"),v=0,w=m.length;v<w;v++){var x=m[v],A=x.nodeName.toLowerCase();if(s.inArray(A,f)===-1){x.parentNode.removeChild(x);continue}for(var b=s.map(x.attributes,function(D){return D}),y=[].concat(d["*"]||[],d[A]||[]),k=0,C=b.length;k<C;k++)a(b[k],y)||x.removeAttribute(b[k].nodeName)}return p.body.innerHTML}var h=function(c,d){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",c,d)};h.VERSION="3.4.1",h.TRANSITION_DURATION=150,h.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:r},h.prototype.init=function(c,d,F){if(this.enabled=!0,this.type=c,this.$element=s(d),this.options=this.getOptions(F),this.$viewport=this.options.viewport&&s(document).find(s.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var p=this.options.trigger.split(" "),f=p.length;f--;){var m=p[f];if(m=="click")this.$element.on("click."+this.type,this.options.selector,s.proxy(this.toggle,this));else if(m!="manual"){var v=m=="hover"?"mouseenter":"focusin",w=m=="hover"?"mouseleave":"focusout";this.$element.on(v+"."+this.type,this.options.selector,s.proxy(this.enter,this)),this.$element.on(w+"."+this.type,this.options.selector,s.proxy(this.leave,this))}}this.options.selector?this._options=s.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},h.prototype.getDefaults=function(){return h.DEFAULTS},h.prototype.getOptions=function(c){var d=this.$element.data();for(var F in d)d.hasOwnProperty(F)&&s.inArray(F,e)!==-1&&delete d[F];return c=s.extend({},this.getDefaults(),d,c),c.delay&&typeof c.delay=="number"&&(c.delay={show:c.delay,hide:c.delay}),c.sanitize&&(c.template=o(c.template,c.whiteList,c.sanitizeFn)),c},h.prototype.getDelegateOptions=function(){var c={},d=this.getDefaults();return this._options&&s.each(this._options,function(F,p){d[F]!=p&&(c[F]=p)}),c},h.prototype.enter=function(c){var d=c instanceof this.constructor?c:s(c.currentTarget).data("bs."+this.type);if(d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),s(c.currentTarget).data("bs."+this.type,d)),c instanceof s.Event&&(d.inState[c.type=="focusin"?"focus":"hover"]=!0),d.tip().hasClass("in")||d.hoverState=="in"){d.hoverState="in";return}if(clearTimeout(d.timeout),d.hoverState="in",!d.options.delay||!d.options.delay.show)return d.show();d.timeout=setTimeout(function(){d.hoverState=="in"&&d.show()},d.options.delay.show)},h.prototype.isInStateTrue=function(){for(var c in this.inState)if(this.inState[c])return!0;return!1},h.prototype.leave=function(c){var d=c instanceof this.constructor?c:s(c.currentTarget).data("bs."+this.type);if(d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),s(c.currentTarget).data("bs."+this.type,d)),c instanceof s.Event&&(d.inState[c.type=="focusout"?"focus":"hover"]=!1),!d.isInStateTrue()){if(clearTimeout(d.timeout),d.hoverState="out",!d.options.delay||!d.options.delay.hide)return d.hide();d.timeout=setTimeout(function(){d.hoverState=="out"&&d.hide()},d.options.delay.hide)}},h.prototype.show=function(){var c=s.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(c);var d=s.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(c.isDefaultPrevented()||!d)return;var F=this,p=this.tip(),f=this.getUID(this.type);this.setContent(),p.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&p.addClass("fade");var m=typeof this.options.placement=="function"?this.options.placement.call(this,p[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,w=v.test(m);w&&(m=m.replace(v,"")||"top"),p.detach().css({top:0,left:0,display:"block"}).addClass(m).data("bs."+this.type,this),this.options.container?p.appendTo(s(document).find(this.options.container)):p.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var x=this.getPosition(),A=p[0].offsetWidth,b=p[0].offsetHeight;if(w){var y=m,k=this.getPosition(this.$viewport);m=m=="bottom"&&x.bottom+b>k.bottom?"top":m=="top"&&x.top-b<k.top?"bottom":m=="right"&&x.right+A>k.width?"left":m=="left"&&x.left-A<k.left?"right":m,p.removeClass(y).addClass(m)}var C=this.getCalculatedOffset(m,x,A,b);this.applyPlacement(C,m);var D=function(){var T=F.hoverState;F.$element.trigger("shown.bs."+F.type),F.hoverState=null,T=="out"&&F.leave(F)};s.support.transition&&this.$tip.hasClass("fade")?p.one("bsTransitionEnd",D).emulateTransitionEnd(h.TRANSITION_DURATION):D()}},h.prototype.applyPlacement=function(c,d){var F=this.tip(),p=F[0].offsetWidth,f=F[0].offsetHeight,m=parseInt(F.css("margin-top"),10),v=parseInt(F.css("margin-left"),10);isNaN(m)&&(m=0),isNaN(v)&&(v=0),c.top+=m,c.left+=v,s.offset.setOffset(F[0],s.extend({using:function(C){F.css({top:Math.round(C.top),left:Math.round(C.left)})}},c),0),F.addClass("in");var w=F[0].offsetWidth,x=F[0].offsetHeight;d=="top"&&x!=f&&(c.top=c.top+f-x);var A=this.getViewportAdjustedDelta(d,c,w,x);A.left?c.left+=A.left:c.top+=A.top;var b=/top|bottom/.test(d),y=b?A.left*2-p+w:A.top*2-f+x,k=b?"offsetWidth":"offsetHeight";F.offset(c),this.replaceArrow(y,F[0][k],b)},h.prototype.replaceArrow=function(c,d,F){this.arrow().css(F?"left":"top",50*(1-c/d)+"%").css(F?"top":"left","")},h.prototype.setContent=function(){var c=this.tip(),d=this.getTitle();this.options.html?(this.options.sanitize&&(d=o(d,this.options.whiteList,this.options.sanitizeFn)),c.find(".tooltip-inner").html(d)):c.find(".tooltip-inner").text(d),c.removeClass("fade in top bottom left right")},h.prototype.hide=function(c){var d=this,F=s(this.$tip),p=s.Event("hide.bs."+this.type);function f(){d.hoverState!="in"&&F.detach(),d.$element&&d.$element.removeAttr("aria-describedby").trigger("hidden.bs."+d.type),c&&c()}if(this.$element.trigger(p),!p.isDefaultPrevented())return F.removeClass("in"),s.support.transition&&F.hasClass("fade")?F.one("bsTransitionEnd",f).emulateTransitionEnd(h.TRANSITION_DURATION):f(),this.hoverState=null,this},h.prototype.fixTitle=function(){var c=this.$element;(c.attr("title")||typeof c.attr("data-original-title")!="string")&&c.attr("data-original-title",c.attr("title")||"").attr("title","")},h.prototype.hasContent=function(){return this.getTitle()},h.prototype.getPosition=function(c){c=c||this.$element;var d=c[0],F=d.tagName=="BODY",p=d.getBoundingClientRect();p.width==null&&(p=s.extend({},p,{width:p.right-p.left,height:p.bottom-p.top}));var f=window.SVGElement&&d instanceof window.SVGElement,m=F?{top:0,left:0}:f?null:c.offset(),v={scroll:F?document.documentElement.scrollTop||document.body.scrollTop:c.scrollTop()},w=F?{width:s(window).width(),height:s(window).height()}:null;return s.extend({},p,v,w,m)},h.prototype.getCalculatedOffset=function(c,d,F,p){return c=="bottom"?{top:d.top+d.height,left:d.left+d.width/2-F/2}:c=="top"?{top:d.top-p,left:d.left+d.width/2-F/2}:c=="left"?{top:d.top+d.height/2-p/2,left:d.left-F}:{top:d.top+d.height/2-p/2,left:d.left+d.width}},h.prototype.getViewportAdjustedDelta=function(c,d,F,p){var f={top:0,left:0};if(!this.$viewport)return f;var m=this.options.viewport&&this.options.viewport.padding||0,v=this.getPosition(this.$viewport);if(/right|left/.test(c)){var w=d.top-m-v.scroll,x=d.top+m-v.scroll+p;w<v.top?f.top=v.top-w:x>v.top+v.height&&(f.top=v.top+v.height-x)}else{var A=d.left-m,b=d.left+m+F;A<v.left?f.left=v.left-A:b>v.right&&(f.left=v.left+v.width-b)}return f},h.prototype.getTitle=function(){var c,d=this.$element,F=this.options;return c=d.attr("data-original-title")||(typeof F.title=="function"?F.title.call(d[0]):F.title),c},h.prototype.getUID=function(c){do c+=~~(Math.random()*1e6);while(document.getElementById(c));return c},h.prototype.tip=function(){if(!this.$tip&&(this.$tip=s(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},h.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},h.prototype.enable=function(){this.enabled=!0},h.prototype.disable=function(){this.enabled=!1},h.prototype.toggleEnabled=function(){this.enabled=!this.enabled},h.prototype.toggle=function(c){var d=this;c&&(d=s(c.currentTarget).data("bs."+this.type),d||(d=new this.constructor(c.currentTarget,this.getDelegateOptions()),s(c.currentTarget).data("bs."+this.type,d))),c?(d.inState.click=!d.inState.click,d.isInStateTrue()?d.enter(d):d.leave(d)):d.tip().hasClass("in")?d.leave(d):d.enter(d)},h.prototype.destroy=function(){var c=this;clearTimeout(this.timeout),this.hide(function(){c.$element.off("."+c.type).removeData("bs."+c.type),c.$tip&&c.$tip.detach(),c.$tip=null,c.$arrow=null,c.$viewport=null,c.$element=null})},h.prototype.sanitizeHtml=function(c){return o(c,this.options.whiteList,this.options.sanitizeFn)};function g(c){return this.each(function(){var d=s(this),F=d.data("bs.tooltip"),p=typeof c=="object"&&c;!F&&/destroy|hide/.test(c)||(F||d.data("bs.tooltip",F=new h(this,p)),typeof c=="string"&&F[c]())})}var l=s.fn.tooltip;s.fn.tooltip=g,s.fn.tooltip.Constructor=h,s.fn.tooltip.noConflict=function(){return s.fn.tooltip=l,this}}(me);+function(s){var e=function(r,u){this.init("popover",r,u)};if(!s.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.4.1",e.DEFAULTS=s.extend({},s.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.prototype=s.extend({},s.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var r=this.tip(),u=this.getTitle(),n=this.getContent();if(this.options.html){var a=typeof n;this.options.sanitize&&(u=this.sanitizeHtml(u),a==="string"&&(n=this.sanitizeHtml(n))),r.find(".popover-title").html(u),r.find(".popover-content").children().detach().end()[a==="string"?"html":"append"](n)}else r.find(".popover-title").text(u),r.find(".popover-content").children().detach().end().text(n);r.removeClass("fade top bottom left right in"),r.find(".popover-title").html()||r.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var r=this.$element,u=this.options;return r.attr("data-content")||(typeof u.content=="function"?u.content.call(r[0]):u.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};function i(r){return this.each(function(){var u=s(this),n=u.data("bs.popover"),a=typeof r=="object"&&r;!n&&/destroy|hide/.test(r)||(n||u.data("bs.popover",n=new e(this,a)),typeof r=="string"&&n[r]())})}var t=s.fn.popover;s.fn.popover=i,s.fn.popover.Constructor=e,s.fn.popover.noConflict=function(){return s.fn.popover=t,this}}(me);function vg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=cS(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function cS(s){var e=""+s,i=dS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var dS=/["&<>]/;function Dm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Dm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function hS(s){var e="",i,t;try{var r=s||{};(function(u,n){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<div class="g-search-wrapper">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<a class="g-search-options-button btn btn-sm" title="Show search help">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<i class="g-search-state icon-search"></i></a>',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+"<input"+(' class="g-search-field form-control input-sm" type="text"'+vg("placeholder",n,!0,!1)+vg("mode-select",u.length>1?"on":"off",!0,!1))+"/>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<div class="g-search-results dropdown">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<ul class="dropdown-menu" role="menu"></ul></div>',t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",u.length>1&&(t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<a class="g-search-mode-choose btn btn-sm" title="Search mode">',t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/searchField.pug",e=e+'<i class="icon-down-dir"></i></a>'),e=e+"</div>"}).call(this,"modes"in r?r.modes:typeof modes<"u"?modes:void 0,"placeholder"in r?r.placeholder:typeof placeholder<"u"?placeholder:void 0)}catch(u){Dm(u,i,t)}return e}function gS(s){var e=""+s,i=FS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var FS=/["&<>]/;function Mm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Mm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function pS(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+'<p class="g-search-help-text">',r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+gS((i=a)==null?"":i)+"</p>",r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",n==="text"&&(r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+'<ul class="g-search-examples-list">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<li>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<code>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"cat dog</code>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+' returns documents containing either "cat" or "dog".</li>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<li>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<code>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+'"cat" "dog"</code>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+' returns documents containing both "cat" and "dog".</li>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+"<code>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+'"cat dog"</code>',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchHelp.pug",e=e+' returns documents containing the phrase "cat dog".</li></ul>')}).call(this,"mode"in u?u.mode:typeof mode<"u"?mode:void 0,"modeHelp"in u?u.modeHelp:typeof modeHelp<"u"?modeHelp:void 0)}catch(n){Mm(n,t,r)}return e}function po(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Pc(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Pc(s){var e=""+s,i=fS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var fS=/["&<>]/;function _m(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void _m(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function mS(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"<p>",r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"Choose search mode:</p>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",function(){var h=o;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+'<div class="radio">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"<label>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"<input"+(' class="g-search-mode-radio" type="radio" name="search-mode"'+po("value",c,!0,!1)+po("checked",c===n?"checked":void 0,!0,!1))+"/>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+Pc((i=a(c))==null?"":i)+"</label></div>"}else{var l=0;for(var g in h){l++;var c=h[g];r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+'<div class="radio">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"<label>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+"<input"+(' class="g-search-mode-radio" type="radio" name="search-mode"'+po("value",c,!0,!1)+po("checked",c===n?"checked":void 0,!0,!1))+"/>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchModeSelect.pug",e=e+Pc((i=a(c))==null?"":i)+"</label></div>"}}}.call(this)}).call(this,"currentMode"in u?u.currentMode:typeof currentMode<"u"?currentMode:void 0,"getModeDescription"in u?u.getModeDescription:typeof getModeDescription<"u"?getModeDescription:void 0,"modes"in u?u.modes:typeof modes<"u"?modes:void 0)}catch(n){_m(n,t,r)}return e}function s0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ea(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function $c(s,e){return Array.isArray(s)?vS(s,e):s&&typeof s=="object"?bS(s):s||""}function vS(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=$c(s[n]))&&(u&&e[n]&&(i=ea(i)),t=t+r+i,r=" ");return t}function bS(s){var e="",i="";for(var t in s)t&&s[t]&&wS.call(s,t)&&(e=e+i+t,i=" ");return e}function ea(s){var e=""+s,i=yS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var wS=Object.prototype.hasOwnProperty,yS=/["&<>]/;function Lm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Lm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function xS(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",function(){var a=n;if(typeof a.length=="number")for(var o=0,h=a.length;o<h;o++){var g=a[o];r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<li class="g-search-result">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"<a"+(' class="g-search-result-element"'+s0("data-resource-id",g.id,!0,!1)+s0("data-resource-type",g.type,!0,!1)+s0("data-resource-icon",g.icon,!0,!1)+' tabindex="-1"')+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"<i"+s0("class",$c([`icon-${g.icon}`],[!0]),!1,!1)+"></i>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+ea((i=g.text)==null?"":i)+"</a></li>"}else{var h=0;for(var o in a){h++;var g=a[o];r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<li class="g-search-result">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"<a"+(' class="g-search-result-element"'+s0("data-resource-id",g.id,!0,!1)+s0("data-resource-type",g.type,!0,!1)+s0("data-resource-icon",g.icon,!0,!1)+' tabindex="-1"')+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"<i"+s0("class",$c([`icon-${g.icon}`],[!0]),!1,!1)+"></i>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+ea((i=g.text)==null?"":i)+"</a></li>"}}}.call(this),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",n.length===0?(r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<li class="g-no-search-results disabled">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<a tabindex="-1">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<i class="icon-block">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"No results found</i></a></li>"):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<li class="g-search-result">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+'<a class="g-search-result-page-link" data-resource-type="resultPage">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/searchResults.pug",e=e+"...</a></li>")}).call(this,"results"in u?u.results:typeof results<"u"?results:void 0)}catch(n){Lm(n,t,r)}return e}var Ut=We.extend({events:{"input .g-search-field":"search","click .g-search-mode-radio":function(s){this.currentMode=me(s.target).val(),this.hideResults().search(),window.setTimeout(()=>{this.$(".g-search-mode-choose").popover("hide")},250)},"click .g-search-result>a":function(s){this._resultClicked(me(s.currentTarget))},"keydown .g-search-field":function(s){var e=s.keyCode||s.which,i,t;if(e===13&&this.noResourceSelected)s.preventDefault(),this.$(".g-search-field").val()!==""&&!this.noResultsPage&&this._goToResultPage(this.$(".g-search-field").val(),this.currentMode);else if(e===40||e===38)this.noResourceSelected=!1,e===40?(i=this.$(".g-search-result"),t=i.index(i.filter(".g-search-selected"))+1,i.removeClass("g-search-selected"),t<i.length&&i.eq(t).addClass("g-search-selected"),t===i.length&&(this.noResourceSelected=!0)):e===38&&(i=this.$(".g-search-result"),t=i.index(i.filter(".g-search-selected"))-1,i.removeClass("g-search-selected"),t===-1&&(this.noResourceSelected=!0),t===-2&&(t=i.length-1),t>=0&&i.eq(t).addClass("g-search-selected"));else if(e===13){s.preventDefault(),this.noResourceSelected=!0;var r=this.$(".g-search-result.g-search-selected>a");r.length&&this._resultClicked(r)}}},initialize:function(s){this.ajaxLock=!1,this.pending=null,this.noResourceSelected=!0,this.placeholder=s.placeholder||"Search...",this.noResultsPage=s.noResultsPage||!1,this.getInfoCallback=s.getInfoCallback||null,this.types=s.types||[],this.modes=s.modes||Ut.getModes(),Fe.isArray(this.modes)||(this.modes=[this.modes]),this.currentMode=this.modes[0],this._animatePending=Fe.debounce(this._animatePending,100)},search:function(){var s=this.$(".g-search-field").val();return s?(this.ajaxLock?this.pending=s:this._doSearch(s),this):(this.hideResults(),this)},_goToResultPage:function(s,e){this.resetState(),He.navigate(`#search/results?query=${s}&mode=${e}`,{trigger:!0})},_resultClicked:function(s){s.data("resourceType")==="resultPage"?this._goToResultPage(this.$(".g-search-field").val(),this.currentMode):this.trigger("g:resultClicked",{type:s.data("resourceType"),id:s.data("resourceId"),text:s.text().trim(),icon:s.data("resourceIcon")})},render:function(){return this.$el.html(hS({placeholder:this.placeholder,modes:this.modes,currentMode:this.currentMode})),this.$(".g-search-options-button").popover({trigger:"manual",viewport:{selector:"body",padding:10},content:()=>pS({mode:this.currentMode,modeHelp:Ut.getModeHelp(this.currentMode)}),html:!0,sanitize:!1}).on("click",function(){me(this).popover("toggle")}),this.$(".g-search-mode-choose").popover({trigger:"manual",viewport:{selector:"body",padding:10},content:()=>mS({modes:this.modes,currentMode:this.currentMode,getModeDescription:Ut.getModeDescription}),html:!0,sanitize:!1}).on("click",function(){me(this).popover("toggle")}),this},hideResults:function(){return this.$(".dropdown").removeClass("open"),this},clearText:function(){return this.$(".g-search-field").val(""),this},resetState:function(){return this.hideResults().clearText()},_animatePending:function(){const s=this.ajaxLock;this.$(".g-search-state").toggleClass("icon-search",!s).toggleClass("icon-spin4 animate-spin",s)},_doSearch:function(s){this.ajaxLock=!0,this.pending=null,this._animatePending(),Ve({url:"resource/search",data:{q:s,mode:this.currentMode,types:JSON.stringify(Fe.intersection(this.types,Ut.getModeTypes(this.currentMode)))}}).done(e=>{if(this.ajaxLock=!1,this._animatePending(),this.pending)this._doSearch(this.pending);else{if(!this.$(".g-search-field").val())return;var i=[];Fe.each(this.types,function(t){Fe.each(e[t]||[],function(r){var u,n;if(t==="user")u=r.firstName+" "+r.lastName+" ("+r.login+")",n="user";else if(t==="group")u=r.name,n="users";else if(t==="collection")u=r.name,n="sitemap";else if(t==="folder")u=r.name,n="folder";else if(t==="item")u=r.name,n="doc-text-inv";else{if(this.getInfoCallback){var a=this.getInfoCallback(t,r);a&&(u=a.text,n=a.icon)}(!u||!n)&&(u="[unknown type]",n="attention")}i.push({type:t,id:r._id,text:u,icon:n})},this)},this),this.$(".g-search-results>ul").html(xS({results:i.slice(0,6)})),this.$(".dropdown").addClass("open")}})}},{_allowedSearchMode:{},addMode:function(s,e,i,t){if(Fe.has(Ut._allowedSearchMode,s))throw new Error(`The mode "${s}" exist already. You can't change it`);Ut._allowedSearchMode[s]={types:e,description:i,help:t}},getModes:function(){return Fe.keys(Ut._allowedSearchMode)},getModeTypes:function(s){return Ut._allowedSearchMode[s].types},getModeDescription:function(s){return Ut._allowedSearchMode[s].description},getModeHelp:function(s){return Ut._allowedSearchMode[s].help},removeMode:function(s){delete Ut._allowedSearchMode[s]}});Ut.addMode("text",["item","folder","group","collection","user"],"Full text search",`By default, search results will be returned if they contain
     any of the terms of the search. If you wish to search for documents
     containing all of the terms, place them in quotes.
     Examples:`);Ut.addMode("prefix",["item","folder","group","collection","user"],"Search by prefix",`You are searching by prefix.
     Start typing the first letters of whatever you are searching for.`);function CS(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Tm(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Tm(s){var e=""+s,i=AS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var ES=Object.prototype.hasOwnProperty,AS=/["&<>]/;function Pm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Pm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function kS(s){if(!s)return"";if(typeof s=="object"){var e="";for(var i in s)ES.call(s,i)&&(e=e+i+":"+s[i]+";");return e}return s+""}function SS(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+"<div"+(' class="g-header-wrapper"'+CS("style",kS(`background-color: ${n}; color: ${o}`),!0,!1))+">",r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+'<div class="g-app-title">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+Tm((i=a)==null?"":i)+"</div>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+'<form class="g-quick-search-form" role="form">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+'<div class="form-group g-quick-search-container"></div></form>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+'<div class="g-current-user-wrapper"></div>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/layout/layoutHeader.pug",e=e+'<div class="g-clear-both"></div></div>'}).call(this,"bannerColor"in u?u.bannerColor:typeof bannerColor<"u"?bannerColor:void 0,"brandName"in u?u.brandName:typeof brandName<"u"?brandName:void 0,"textColor"in u?u.textColor:typeof textColor<"u"?textColor:void 0)}catch(n){Pm(n,t,r)}return e}var $m=We.extend({events:{"click .g-app-title":function(){He.navigate("",{trigger:!0})}},initialize:function(s){this.brandName=s.brandName||"Girder",this.bannerColor=s.bannerColor||"#3F3B3B",this.userView=new jm({parentView:this,registrationPolicy:s.registrationPolicy}),this.searchWidget=new Ut({placeholder:"Quick search...",types:["collection","folder","item","group","user"],parentView:this}).on("g:resultClicked",function(e){this.searchWidget.resetState(),He.navigate(e.type+"/"+e.id,{trigger:!0})},this)},render:function(){var s=this._getTextColor(this.bannerColor);return this.$el.html(SS({brandName:this.brandName,bannerColor:this.bannerColor,textColor:s})),this.userView.setElement(this.$(".g-current-user-wrapper")).render(),s!=="#ffffff"&&this.userView.$(".g-user-text a").css("color",s),this.searchWidget.setElement(this.$(".g-quick-search-container")).render(),this},_getTextColor:function(s){const e=s.substr(1,2),i=s.substr(3,2),t=s.substr(5,2),r=Fe.map([e,i,t],a=>parseInt(a,16)/255),u=Fe.map(r,a=>a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)),n=.2126*u[0]+.7152*u[1]+.0722*u[2];return(n+.05)/(0+.05)>(1+.05)/(n+.05)?"#000000":"#ffffff"}});function Im(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Im(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function jS(s){var e="",i,t;try{var r=s||{};(function(u,n){t=1,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<form class="modal-form" id="g-login-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<h4 class="modal-title">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Log in</h4></div>",t=7,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="modal-body">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",u&&(t=9,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="form-group">',t=10,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<label class="control-label" for="g-login">',t=10,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Login or email</label>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<input class="input-sm form-control" id="g-login" type="text" placeholder="Enter login"/></div>',t=12,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<label class="control-label" for="g-password">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Password</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<input class="input-sm form-control" id="g-password" type="password" placeholder="Enter password"/></div>',t=15,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="form-group hidden" id="g-login-otp-group">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<label class="control-label" for="g-login-otp">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Two-factor code</label>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<input class="input-sm form-control" id="g-login-otp" type="text" minlength="6" maxlength="6" placeholder="Your 6-digit two-factor authentication code, if enabled"/></div>',t=19,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="g-validation-failed-message"></div>',t=20,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="g-bottom-message">',t=21,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",n!=="closed"&&(t=22,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Don't have an account yet?",t=23,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<a class="g-register-link">',t=23,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+" Register here.</a>",t=24,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+" |"),t=25,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<a class="g-forgot-password">',t=25,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+" Forgot your password?</a></div>"),e=e+"</div>",t=26,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<div class="modal-footer">',t=27,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<a class="btn btn-default" data-dismiss="modal">',t=27,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+"Close</a>",t=28,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<button class="btn btn-primary" id="g-login-button" type="submit">',t=29,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+'<i class="icon-login"></i>',t=30,i="/home/circleci/project/girder/girder/web/src/templates/layout/loginDialog.pug",e=e+" Login</button></div></form></div></div>"}).call(this,"enablePasswordLogin"in r?r.enablePasswordLogin:typeof enablePasswordLogin<"u"?enablePasswordLogin:void 0,"registrationPolicy"in r?r.registrationPolicy:typeof registrationPolicy<"u"?registrationPolicy:void 0)}catch(u){Im(u,i,t)}return e}me.fn.girderEnable=function(s){var e=me(this);return e.is(":input")&&e.prop("disabled",!s),s?e.removeClass("disabled"):e.addClass("disabled"),this};var Rm=We.extend({events:{"submit #g-login-form":function(s){s.preventDefault(),this.$("#g-login-button").girderEnable(!1),this.$(".g-validation-failed-message").text("");const e=this.$("#g-login").val(),i=this.$("#g-password").val(),t=this.$("#g-login-otp-group").hasClass("hidden")?null:this.$("#g-login-otp").val();Of(e,i,t).done(()=>{this.$el.modal("hide")}).fail(r=>{if(r.responseJSON.message.indexOf("Girder-OTP")!==-1&&this.$("#g-login-otp-group").hasClass("hidden")){this.$("#g-login-otp-group").removeClass("hidden"),this.$("#g-login-otp").trigger("focus");return}if(this.$(".g-validation-failed-message").text(r.responseJSON.message),r.responseJSON.extra==="emailVerification"){var u=r.responseJSON.message+' <a class="g-send-verification-email">Click here to send verification email.</a>';me(".g-validation-failed-message").html(u)}}).always(()=>{this.$("#g-login-button").girderEnable(!0)})},"click .g-send-verification-email":function(){this.$(".g-validation-failed-message").html("");const s=this.$("#g-login").val();pr.sendVerificationEmail(s).done(e=>{this.$(".g-validation-failed-message").html(e.message)}).fail(e=>{this.$(".g-validation-failed-message").html(e.responseJSON.message)})},"click a.g-register-link":function(){_e.trigger("g:registerUi")},"click a.g-forgot-password":function(){_e.trigger("g:resetPasswordUi")}},initialize:function(s){this.registrationPolicy=s.registrationPolicy,this.enablePasswordLogin=Fe.has(s,"enablePasswordLogin")?s.enablePasswordLogin:!0},render:function(){return this.$el.html(jS({registrationPolicy:this.registrationPolicy,enablePasswordLogin:this.enablePasswordLogin,showOtp:!0})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-login").trigger("focus")}).on("hidden.bs.modal",()=>{ar("login",{replace:!0})}),br("login",{replace:!0}),this.$("#g-login").trigger("focus"),this}}),Ic={};(function(s){(function(e){var i={not_string:/[^s]/,number:/[diefg]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijosuxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[\+\-]/};function t(){var a=arguments[0],o=t.cache;return o[a]&&o.hasOwnProperty(a)||(o[a]=t.parse(a)),t.format.call(null,o[a],arguments)}t.format=function(a,o){var h=1,g=a.length,l="",c,d=[],F,p,f,m,v,w,x=!0,A="";for(F=0;F<g;F++)if(l=u(a[F]),l==="string")d[d.length]=a[F];else if(l==="array"){if(f=a[F],f[2])for(c=o[h],p=0;p<f[2].length;p++){if(!c.hasOwnProperty(f[2][p]))throw new Error(t("[sprintf] property '%s' does not exist",f[2][p]));c=c[f[2][p]]}else f[1]?c=o[f[1]]:c=o[h++];if(u(c)=="function"&&(c=c()),i.not_string.test(f[8])&&i.not_json.test(f[8])&&u(c)!="number"&&isNaN(c))throw new TypeError(t("[sprintf] expecting number but found %s",u(c)));switch(i.number.test(f[8])&&(x=c>=0),f[8]){case"b":c=c.toString(2);break;case"c":c=String.fromCharCode(c);break;case"d":case"i":c=parseInt(c,10);break;case"j":c=JSON.stringify(c,null,f[6]?parseInt(f[6]):0);break;case"e":c=f[7]?c.toExponential(f[7]):c.toExponential();break;case"f":c=f[7]?parseFloat(c).toFixed(f[7]):parseFloat(c);break;case"g":c=f[7]?parseFloat(c).toPrecision(f[7]):parseFloat(c);break;case"o":c=c.toString(8);break;case"s":c=(c=String(c))&&f[7]?c.substring(0,f[7]):c;break;case"u":c=c>>>0;break;case"x":c=c.toString(16);break;case"X":c=c.toString(16).toUpperCase();break}i.json.test(f[8])?d[d.length]=c:(i.number.test(f[8])&&(!x||f[3])?(A=x?"+":"-",c=c.toString().replace(i.sign,"")):A="",v=f[4]?f[4]==="0"?"0":f[4].charAt(1):" ",w=f[6]-(A+c).length,m=f[6]&&w>0?n(v,w):"",d[d.length]=f[5]?A+c+m:v==="0"?A+m+c:m+A+c)}return d.join("")},t.cache={},t.parse=function(a){for(var o=a,h=[],g=[],l=0;o;){if((h=i.text.exec(o))!==null)g[g.length]=h[0];else if((h=i.modulo.exec(o))!==null)g[g.length]="%";else if((h=i.placeholder.exec(o))!==null){if(h[2]){l|=1;var c=[],d=h[2],F=[];if((F=i.key.exec(d))!==null)for(c[c.length]=F[1];(d=d.substring(F[0].length))!=="";)if((F=i.key_access.exec(d))!==null)c[c.length]=F[1];else if((F=i.index_access.exec(d))!==null)c[c.length]=F[1];else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");h[2]=c}else l|=2;if(l===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g[g.length]=h}else throw new SyntaxError("[sprintf] unexpected placeholder");o=o.substring(h[0].length)}return g};var r=function(a,o,h){return h=(o||[]).slice(0),h.splice(0,0,a),t.apply(null,h)};function u(a){return Object.prototype.toString.call(a).slice(8,-1).toLowerCase()}function n(a,o){return Array(o+1).join(a)}s.sprintf=t,s.vsprintf=r})()})(Ic);function Os(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ss(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Rc(s,e){return Array.isArray(s)?DS(s,e):s&&typeof s=="object"?MS(s):s||""}function DS(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Rc(s[n]))&&(u&&e[n]&&(i=ss(i)),t=t+r+i,r=" ");return t}function MS(s){var e="",i="";for(var t in s)t&&s[t]&&Bm.call(s,t)&&(e=e+i+t,i=" ");return e}function ss(s){var e=""+s,i=_S.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var Bm=Object.prototype.hasOwnProperty,_S=/["&<>]/;function Om(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Om(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function LS(s){if(!s)return"";if(typeof s=="object"){var e="";for(var i in s)Bm.call(s,i)&&(e=e+i+":"+s[i]+";");return e}return s+""}function TS(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="g-task-progress-top">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+"<div"+Os("class",Rc(["g-task-progress-bar","progress",h],[!1,!1,!0]),!1,!1)+">",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+"<div"+(Os("class",Rc(["progress-bar",n],[!1,!0]),!1,!1)+Os("style",LS(`width: ${l};`),!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="progress-status">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="progress-percent">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+ss((i=a)==null?"":i)+"</div>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="progress-left">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+ss((i=g)==null?"":i)+"</div></div></div></div>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+"<div"+(' class="g-task-progress-title"'+Os("title",o.data.title,!0,!1))+">",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",o.data.resource&&o.data.resource._id&&o.data.resourceName?(r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+"<a"+(Os("title",o.data.title,!0,!1)+Os("href","#"+o.data.resourceName+"/"+o.data.resource._id,!0,!1))+">",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+ss((i=o.data.title)==null?"":i)+"</a>"):(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+ss((i=o.data.title)==null?"":i)),e=e+"</div></div>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="g-task-progress-bottom">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+'<div class="g-task-progress-message">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/taskProgress.pug",e=e+ss((i=o.data.message)==null?"":i)+"</div></div>"}).call(this,"barClass"in u?u.barClass:typeof barClass<"u"?barClass:void 0,"percentText"in u?u.percentText:typeof percentText<"u"?percentText:void 0,"progress"in u?u.progress:typeof progress<"u"?progress:void 0,"progressClass"in u?u.progressClass:typeof progressClass<"u"?progressClass:void 0,"timeLeftText"in u?u.timeLeftText:typeof timeLeftText<"u"?timeLeftText:void 0,"width"in u?u.width:typeof width<"u"?width:void 0)}catch(n){Om(n,t,r)}return e}var Nm=We.extend({initialize:function(s){this.progress=s.progress},render:function(){var s="0",e=[],i=[],t="",r="";if(this.progress.data.state==="active")if(this.progress.data.total<=0)s="100%",e.push("progress-bar-warning"),i.push("progress-striped","active");else if(this.progress.data.current<=0)s="0",t="0%";else if(this.progress.data.current>=this.progress.data.total)t=s="100%";else{var u=100*this.progress.data.current/this.progress.data.total;s=Math.round(u)+"%",t=u.toFixed(1)+"%";var n=parseInt(this.progress.estimatedTotalTime-(this.progress.updatedTime-this.progress.startTime),10);n>=3600?r=Ic.sprintf("%d:%02d:%02d left",n/3600,n/60%60,n%60):n>0&&(r=Ic.sprintf("%d:%02d left",n/60,n%60))}else this.progress.data.state==="success"?(s="100%",e.push("progress-bar-success"),this._scheduleHide(5e3)):this.progress.data.state==="error"&&(s="100%",e.push("progress-bar-danger"),this._scheduleHide(1e4));return this.$el.html(TS({progress:this.progress,width:s,barClass:e.join(" "),progressClass:i.join(" "),percentText:t,timeLeftText:r})),this},update:function(s){this.progress=s,this.render()},_scheduleHide:function(s){window.setTimeout(()=>{this.$el.fadeOut(500,()=>{this.remove(),this.trigger("g:hide",this.progress)})},s)}});function Wm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Wm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function PS(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/layout/layoutProgressArea.pug",e=e+'<div class="g-progress-list-container"></div>'}catch(r){Wm(r,i,t)}return e}var zm=We.extend({initialize:function(s){this.eventStream=s.eventStream,this.listenTo(this.eventStream,"g:event.progress",this._handleProgress,this),this.listenTo(this.eventStream,"g:eventStream.stop",this._clearProgress,this),this._map={}},render:function(){return this.$el.html(PS()),this._onUpdate(),this},_handleProgress:function(s){Fe.has(this._map,s._id)?this._map[s._id].update(s):(this._map[s._id]=new Nm({className:"g-progress-widget-container",progress:s,parentView:null}).on("g:hide",function(e){this._map[e._id].destroy(),delete this._map[e._id],this._onUpdate()},this).render(),this._map[s._id].$el.appendTo(this.$(".g-progress-list-container"))),this._onUpdate()},_clearProgress:function(){const s=!Fe.isEmpty(this._map);Fe.each(this._map,(e,i)=>{e.destroy(),e.remove(),delete this._map[i]}),s&&this._onUpdate()},_onUpdate:function(){this.$el.toggle(!Fe.isEmpty(this._map))}});function $S(s){var e=""+s,i=IS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var IS=/["&<>]/;function Hm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Hm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function RS(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<form class="modal-form" id="g-register-form" role="form">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="modal-header">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"&times;</button>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<h4 class="modal-title">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+$S((i=a)==null?"":i)+"</h4></div>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="modal-body">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-login">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-login">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Choose a login name</label>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-login" type="text" placeholder="Login"/></div>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-email">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-email">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Enter email address</label>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-email" type="text" placeholder="Email"/></div>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-firstName">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-firstName">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Enter first name</label>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-firstName" type="text" placeholder="First name"/></div>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-lastName">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-lastName">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Enter last name</label>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-lastName" type="text" placeholder="Last name"/></div>',r=20,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-password">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-password">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Choose a password</label>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-password" type="password" placeholder="Password"/></div>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="form-group" id="g-group-password2">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<label class="control-label" for="g-password2">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Retype password</label>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<input class="input-sm form-control" id="g-password2" type="password" placeholder="Password"/></div>',r=26,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="g-validation-failed-message"></div>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",n||(r=28,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="g-bottom-message">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Already have an account?",r=30,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<a class="g-login-link">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+" Log in here.</a></div>"),e=e+"</div>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<div class="modal-footer">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<a class="btn btn-default" data-dismiss="modal">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+"Close</a>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<button class="btn btn-primary" id="g-register-button" type="submit">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+'<i class="icon-plus-circled"></i>',r=35,t="/home/circleci/project/girder/girder/web/src/templates/layout/registerDialog.pug",e=e+" Register</button></div></form></div></div>"}).call(this,"currentUser"in u?u.currentUser:typeof currentUser<"u"?currentUser:void 0,"title"in u?u.title:typeof title<"u"?title:void 0)}catch(n){Hm(n,t,r)}return e}var Dh=We.extend({events:{"submit #g-register-form":function(s){if(s.preventDefault(),this.$(".form-group").removeClass("has-error"),this.$("#g-password").val()!==this.$("#g-password2").val()){this.$("#g-group-password,#g-group-password2").addClass("has-error"),this.$("#g-password").trigger("focus"),this.$(".g-validation-failed-message").text("Passwords must match.");return}var e=new pr({login:this.$("#g-login").val(),password:this.$("#g-password").val(),email:this.$("#g-email").val(),firstName:this.$("#g-firstName").val(),lastName:this.$("#g-lastName").val()});e.on("g:saved",function(){if(it())this.trigger("g:userCreated",{user:e});else{var i=e.get("authToken")||{};i.token?(S0(e),bu(i.token),window.localStorage.setItem("girderToken",bh()),_e.trigger("g:login")):_e.trigger("g:alert",{icon:"ok",text:"Check your email to verify registration.",type:"success",timeout:4e3}),ar("register",{replace:!0})}this.$el.modal("hide")},this).on("g:error",function(i){var t=i.responseJSON;this.$(".g-validation-failed-message").text(t.message),t.field&&(this.$("#g-group-"+t.field).addClass("has-error"),this.$("#g-"+t.field).trigger("focus")),this.$("#g-register-button").girderEnable(!0)},this).save(),this.$("#g-register-button").girderEnable(!1),this.$(".g-validation-failed-message").text("")},"click a.g-login-link":function(){_e.trigger("g:loginUi")}},render:function(){return this.$el.html(RS({currentUser:it(),title:it()?"Create new user":"Sign up"})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-login").trigger("focus")}).on("hidden.bs.modal",()=>{ar("register",{replace:!0})}),this.$("#g-login").trigger("focus"),br("register",{replace:!0}),this}});function Um(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Um(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function BS(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<form class="modal-form" id="g-reset-password-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<h4 class="modal-title">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"Forgotten password</h4></div>",t=7,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="modal-body">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="g-password-reset-explanation">',t=9,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"If you have forgotten your password, enter your email address here.",t=10,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+`
`,t=10,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"You will be sent an email with a temporary access link, from",t=11,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+`
`,t=11,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"which you can reset your password.</div>",t=12,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<label class="control-label" for="g-email">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"Email</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<input class="input-sm form-control" id="g-email" type="text" placeholder="Enter your email"/></div>',t=15,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="g-validation-failed-message"></div>',t=16,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="g-bottom-message">',t=17,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",u!=="closed"&&(t=18,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<a class="g-register-link">',t=18,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+" Register</a>",t=19,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+" |"),t=20,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<a class="g-login-link">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+" Login</a></div></div>",t=21,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<div class="modal-footer">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<a class="btn btn-default" data-dismiss="modal">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+"Close</a>",t=23,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<button class="btn btn-primary" id="g-reset-password-button" type="submit">',t=24,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+'<i class="icon-mail"></i>',t=25,i="/home/circleci/project/girder/girder/web/src/templates/layout/resetPasswordDialog.pug",e=e+" Submit</button></div></form></div></div>"}).call(this,"registrationPolicy"in r?r.registrationPolicy:typeof registrationPolicy<"u"?registrationPolicy:void 0)}catch(u){Um(u,i,t)}return e}var Ym=We.extend({events:{"submit #g-reset-password-form":function(s){s.preventDefault(),Ve({url:"user/password/temporary",data:{email:this.$("#g-email").val().trim()},method:"PUT",error:null}).done(()=>{this.$el.modal("hide"),_e.trigger("g:alert",{icon:"mail-alt",text:"Password reset email sent.",type:"success"})}).fail(e=>{this.$(".g-validation-failed-message").text(e.responseJSON.message),this.$("#g-reset-password-button").girderEnable(!0)}),this.$("#g-reset-password-button").girderEnable(!1),this.$(".g-validation-failed-message").text("")},"click a.g-register-link":function(){_e.trigger("g:registerUi")},"click a.g-login-link":function(){_e.trigger("g:loginUi")}},initialize:function(s){this.registrationPolicy=s.registrationPolicy},render:function(){return this.$el.html(BS({registrationPolicy:this.registrationPolicy})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-email").trigger("focus")}).on("hidden.bs.modal",()=>{ar("resetpassword",{replace:!0})}),this.$("#g-email").trigger("focus"),br("resetpassword",{replace:!0}),this}});function bg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Mh(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Bc(s,e){return Array.isArray(s)?OS(s,e):s&&typeof s=="object"?NS(s):s||""}function OS(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Bc(s[n]))&&(u&&e[n]&&(i=Mh(i)),t=t+r+i,r=" ");return t}function NS(s){var e="",i="";for(var t in s)t&&s[t]&&WS.call(s,t)&&(e=e+i+t,i=" ");return e}function Mh(s){var e=""+s,i=zS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var WS=Object.prototype.hasOwnProperty,zS=/["&<>]/;function Vm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Vm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function HS(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+"<div"+bg("class",Bc(["alert","alert-dismissable",`alert-${o}`],[!1,!1,!0]),!1,!1)+">",r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+'<button class="close" type="button" data-dismiss="alert" aria-hidden="true">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+"&times;</button>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",n&&(r=4,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+"<i"+bg("class",Bc([`icon-${n}`],[!0]),!1,!1)+"></i>"),r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+" ",r=5,t="/home/circleci/project/girder/girder/web/src/templates/layout/alert.pug",e=e+Mh((i=a)==null?"":i)+"</div>"}).call(this,"icon"in u?u.icon:typeof icon<"u"?icon:void 0,"text"in u?u.text:typeof text<"u"?text:void 0,"type"in u?u.type:typeof type<"u"?type:void 0)}catch(n){Vm(n,t,r)}return e}function Xm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Xm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function US(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div id="g-app-header-container"></div>',t=2,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div id="g-global-nav-container"></div>',t=3,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div class="g-default-layout" id="g-app-body-container"></div>',t=4,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div id="g-app-footer-container"></div>',t=6,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div id="g-app-progress-container"></div>',t=11,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div class="modal fade" id="g-dialog-container" tabindex="-1"></div>',t=12,i="/home/circleci/project/girder/girder/web/src/templates/layout/layout.pug",e=e+'<div id="g-alerts-container"></div>'}catch(r){Xm(r,i,t)}return e}function Gm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Gm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function YS(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<ul class="g-admin-options">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+"<li>",t=3,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<a class="g-server-config" href="#settings">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<i class="icon-cog-alt"></i>',t=5,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+" Server configuration</a></li>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+"<li>",t=7,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<a class="g-plugins-config" href="#plugins">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<i class="icon-puzzle"></i>',t=9,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+" Plugins</a></li>",t=10,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+"<li>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<a class="g-assetstore-config" href="#assetstores">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+'<i class="icon-box-1"></i>',t=13,i="/home/circleci/project/girder/girder/web/src/templates/body/adminConsole.pug",e=e+" Assetstores</a></li></ul>"}catch(r){Gm(r,i,t)}return e}var qm=We.extend({initialize:function(){kr("fetch"),this.render()},render:function(){if(!it()||!it().get("admin")){this.$el.text("Must be logged in as admin to view this page.");return}return this.$el.html(YS()),this}});function Km(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Km(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function VS(s){var e="",i,t;try{var r=s||{};(function(u,n){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<form class="modal-form" id="g-assetstore-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<h4 class="modal-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Edit assetstore</h4></div>",t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="modal-body">',t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="g-assetstore-form-fields">',t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-name">',t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Assetstore Name</label>",t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-name" type="text" placeholder="Name"/></div>',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",u.get("type")===n.FILESYSTEM&&(t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-fs-root">',t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Root directory</label>",t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-fs-root" type="text" placeholder="Root directory"/></div>',t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-fs-perms">',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"File creation permissions (octal)</label>",t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-fs-perms" type="text" placeholder="600"/></div>'),t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",u.get("type")===n.S3&&(t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-bucket">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"S3 bucket name</label>",t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-bucket" type="text" placeholder="Bucket"/></div>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=25,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-prefix">',t=25,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Path prefix (optional)</label>",t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-prefix" type="text" placeholder="Prefix"/></div>',t=27,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=28,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-access-key-id">',t=28,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Access key ID</label>",t=29,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-access-key-id" type="text" placeholder="Access key ID"/></div>',t=30,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=31,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-secret">',t=31,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Secret access key</label>",t=32,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-secret" type="text" placeholder="Secret access key"/></div>',t=33,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=34,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-service">',t=34,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Service</label>",t=35,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-service" type="text" placeholder="Service" title="The service if different from s3.amazonaws.com, such as storage.googleapis.com."/></div>',t=36,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="form-group">',t=37,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<label class="control-label" for="g-edit-s3-region">',t=37,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Region</label>",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input class="input-sm form-control" id="g-edit-s3-region" type="text" placeholder="Region"/></div>',t=39,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="checkbox">',t=40,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"<label>",t=41,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input id="g-edit-s3-infercredentials" type="checkbox"/>',t=42,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Infer Credentials</label></div>",t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="checkbox">',t=44,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"<label>",t=45,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input id="g-edit-s3-readonly" type="checkbox"/>',t=46,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Read only</label></div>",t=47,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="checkbox">',t=48,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"<label>",t=49,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<input id="g-edit-s3-sse" type="checkbox"/>',t=50,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Server side encryption</label></div>"),e=e+"</div>",t=51,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",u.get("hasFiles")&&(t=52,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"<div>",t=53,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<i class="icon-attention"></i>',t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"",t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"<b>",t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Warning:</b>",t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+" This assetstore contains files.  If you edit where the assetstore is located or how it is reached, those files may become unreachable.</div>"),t=55,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=56,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<div class="modal-footer">',t=57,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=57,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Cancel</a>",t=58,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",u.get("hasFiles")?(t=63,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<button class="g-save-assetstore btn btn-small btn-primary btn-danger" type="submit">',t=64,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<i class="icon-edit"></i>',t=65,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Save",t=66,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<i class="icon-attention"></i></button>'):(t=59,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<button class="g-save-assetstore btn btn-small btn-primary" type="submit">',t=60,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+'<i class="icon-edit"></i>',t=61,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editAssetstoreWidget.pug",e=e+"Save</button>"),e=e+"</div></form></div></div>"}).call(this,"assetstore"in r?r.assetstore:typeof assetstore<"u"?assetstore:void 0,"types"in r?r.types:typeof types<"u"?types:void 0)}catch(u){Km(u,i,t)}return e}var _h=We.extend({events:{"submit #g-assetstore-edit-form":function(s){s.preventDefault();var e=this.fieldsMap[this.model.get("type")].get.call(this);e.name=this.$("#g-edit-name").val(),this.updateAssetstore(e),this.$("button.g-save-assetstore").girderEnable(!1),this.$(".g-validation-failed-message").text("")}},initialize:function(s){this.model=s.model||null},fieldsMap:{},render:function(){var s=this.$el.html(VS({assetstore:this.model,types:bi})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-edit-name").trigger("focus"),br("assetstoreedit",void 0,this.model.get("id")),this.$("#g-edit-name").val(this.model.get("name")),this.fieldsMap[this.model.get("type")].set.call(this)}).on("hidden.bs.modal",()=>{ar("assetstoreedit",void 0,this.model.get("id"))});return s.trigger(me.Event("ready.girder.modal",{relatedTarget:s})),this},updateAssetstore:function(s){var e={},i=this.model;Fe.each(s,function(t,r){e[r]=i.get(r)}),this.model.set(s),this.model.on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",this.model)},this).on("g:error",function(t){this.$(".g-validation-failed-message").text(t.responseJSON.message),this.$("button.g-save-assetstore").girderEnable(!0),this.$("#g-"+t.responseJSON.field).trigger("focus"),this.model.set(e)},this).save()}}),Jm=_h.prototype.fieldsMap;Jm[bi.FILESYSTEM]={get:function(){return{root:this.$("#g-edit-fs-root").val(),perms:this.$("#g-edit-fs-perms").val()}},set:function(){var s=this.model.get("perms")?this.model.get("perms").toString(8):"600";this.$("#g-edit-fs-perms").val(s),this.$("#g-edit-fs-root").val(this.model.get("root"))}};Jm[bi.S3]={get:function(){return{bucket:this.$("#g-edit-s3-bucket").val(),prefix:this.$("#g-edit-s3-prefix").val(),accessKeyId:this.$("#g-edit-s3-access-key-id").val(),secret:this.$("#g-edit-s3-secret").val(),service:this.$("#g-edit-s3-service").val(),region:this.$("#g-edit-s3-region").val(),readOnly:this.$("#g-edit-s3-readonly").is(":checked"),inferCredentials:this.$("#g-edit-s3-infercredentials").is(":checked"),serverSideEncryption:this.$("#g-edit-s3-sse").is(":checked")}},set:function(){this.$("#g-edit-s3-bucket").val(this.model.get("bucket")),this.$("#g-edit-s3-prefix").val(this.model.get("prefix")),this.$("#g-edit-s3-access-key-id").val(this.model.get("accessKeyId")),this.$("#g-edit-s3-secret").val(this.model.get("secret")),this.$("#g-edit-s3-service").val(this.model.get("service")),this.$("#g-edit-s3-region").val(this.model.get("region")),this.$("#g-edit-s3-readonly").attr("checked",this.model.get("readOnly")?"checked":void 0),this.$("#g-edit-s3-infercredentials").attr("checked",this.model.get("inferCredentials")?"checked":void 0),this.$("#g-edit-s3-sse").attr("checked",this.model.get("serverSideEncryption")?"checked":void 0)}};function Zm(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Zm(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function XS(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-group" id="g-assetstore-accordion">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel panel-default">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-assetstore-accordion" data-target="#g-create-fs-tab">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<a>",t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<i class="icon-hdd"></i>',t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<span>",t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Create new ",t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<b>",t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Filesystem</b>",t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+" assetstore</span></a></div></div>",t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-collapse collapse" id="g-create-fs-tab">',t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-body">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<p>",t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"This type of assetstore will store files in a directory on the",t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"local filesystem, using content-addressed storage to ensure that",t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"data is never duplicated on disk. Just specify the root directory",t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"that files will be stored under.</p>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<p>",t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"If the specified root directory does not already exist, the server",t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"will attempt to create it.</p>",t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<form id="g-new-fs-form" role="form">',t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-fs-name">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Assetstore name</label>",t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-fs-name" type="text" placeholder="Name"/></div>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=25,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-fs-root">',t=25,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Root directory</label>",t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-fs-root" type="text" placeholder="Root directory"/></div>',t=28,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<p class="g-validation-failed-message" id="g-new-fs-error"></p>',t=29,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="g-new-assetstore-submit btn btn-sm btn-primary" type="submit" value="Create"/></form></div></div></div>',t=31,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel panel-default">',t=32,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-assetstore-accordion" data-target="#g-create-s3-tab">',t=35,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-title">',t=36,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<a>",t=37,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<i class="icon-upload-cloud"></i>',t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<span>",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Create new ",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<b>",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Amazon S3</b>",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+" assetstore</span></a></div></div>",t=39,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-collapse collapse" id="g-create-s3-tab">',t=40,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="panel-body">',t=41,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<p>",t=42,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"This type of assetstore keeps files in",t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"an ",t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<a target="_blank" href="http://aws.amazon.com/s3/">',t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Amazon S3</a>",t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"",t=44,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=44,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"bucket. The service defaults to s3.amazonaws.com. You can specify an",t=45,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=45,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"alternate service, including an optional protocol and port using the",t=46,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+`
`,t=46,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"form [http[s]://](service domain)[:(port)].</p>",t=47,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<form id="g-new-s3-form" role="form">',t=48,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=49,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-name">',t=49,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Assetstore name</label>",t=50,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-name" type="text" placeholder="Name"/></div>',t=51,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=52,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-bucket">',t=52,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"S3 bucket name</label>",t=53,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-bucket" type="text" placeholder="Bucket"/></div>',t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=55,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-prefix">',t=55,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Path prefix (optional)</label>",t=56,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-prefix" type="text" placeholder="Prefix"/></div>',t=57,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=58,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-access-key-id">',t=58,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Access key ID</label>",t=59,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-access-key-id" type="text" placeholder="Access key ID"/></div>',t=60,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=61,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-secret">',t=61,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Secret access key</label>",t=62,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-secret" type="text" placeholder="Secret access key"/></div>',t=63,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=64,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-service">',t=64,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Service</label>",t=65,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-service" type="text" placeholder="Service" title="The service if different from s3.amazonaws.com, such as storage.googleapis.com."/></div>',t=66,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="form-group">',t=67,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<label class="control-label" for="g-new-s3-region">',t=67,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Region</label>",t=68,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="input-sm form-control" id="g-new-s3-region" type="text" placeholder="Region"/></div>',t=69,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="checkbox">',t=70,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<label>",t=71,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input id="g-new-s3-readonly" type="checkbox"/>',t=72,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Read only</label></div>",t=73,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="checkbox">',t=74,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<label>",t=75,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input id="g-new-s3-infercredentials" type="checkbox"/>',t=76,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Infer Credentials</label></div>",t=77,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<div class="checkbox">',t=78,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"<label>",t=79,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input id="g-new-s3-sse" type="checkbox"/>',t=80,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+"Server side encryption</label></div>",t=82,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<p class="g-validation-failed-message" id="g-new-s3-error"></p>',t=83,i="/home/circleci/project/girder/girder/web/src/templates/widgets/newAssetstore.pug",e=e+'<input class="g-new-assetstore-submit btn btn-sm btn-primary" type="submit" value="Create"/></form></div></div></div></div>'}catch(r){Zm(r,i,t)}return e}+function(s){var e=function(u,n){this.$element=s(u),this.options=s.extend({},e.DEFAULTS,n),this.$trigger=s('[data-toggle="collapse"][href="#'+u.id+'"],[data-toggle="collapse"][data-target="#'+u.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};e.VERSION="3.4.1",e.TRANSITION_DURATION=350,e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){var u=this.$element.hasClass("width");return u?"width":"height"},e.prototype.show=function(){if(!(this.transitioning||this.$element.hasClass("in"))){var u,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(u=n.data("bs.collapse"),u&&u.transitioning))){var a=s.Event("show.bs.collapse");if(this.$element.trigger(a),!a.isDefaultPrevented()){n&&n.length&&(t.call(n,"hide"),u||n.data("bs.collapse",null));var o=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[o](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[o](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!s.support.transition)return h.call(this);var g=s.camelCase(["scroll",o].join("-"));this.$element.one("bsTransitionEnd",s.proxy(h,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[o](this.$element[0][g])}}}},e.prototype.hide=function(){if(!(this.transitioning||!this.$element.hasClass("in"))){var u=s.Event("hide.bs.collapse");if(this.$element.trigger(u),!u.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var a=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!s.support.transition)return a.call(this);this.$element[n](0).one("bsTransitionEnd",s.proxy(a,this)).emulateTransitionEnd(e.TRANSITION_DURATION)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},e.prototype.getParent=function(){return s(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(s.proxy(function(u,n){var a=s(n);this.addAriaAndCollapsedClass(i(a),a)},this)).end()},e.prototype.addAriaAndCollapsedClass=function(u,n){var a=u.hasClass("in");u.attr("aria-expanded",a),n.toggleClass("collapsed",!a).attr("aria-expanded",a)};function i(u){var n,a=u.attr("data-target")||(n=u.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return s(document).find(a)}function t(u){return this.each(function(){var n=s(this),a=n.data("bs.collapse"),o=s.extend({},e.DEFAULTS,n.data(),typeof u=="object"&&u);!a&&o.toggle&&/show|hide/.test(u)&&(o.toggle=!1),a||n.data("bs.collapse",a=new e(this,o)),typeof u=="string"&&a[u]()})}var r=s.fn.collapse;s.fn.collapse=t,s.fn.collapse.Constructor=e,s.fn.collapse.noConflict=function(){return s.fn.collapse=r,this},s(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(u){var n=s(this);n.attr("data-target")||u.preventDefault();var a=i(n),o=a.data("bs.collapse"),h=o?"toggle":n.data();t.call(a,h)})}(me);+function(s){function e(){var i=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var r in t)if(i.style[r]!==void 0)return{end:t[r]};return!1}s.fn.emulateTransitionEnd=function(i){var t=!1,r=this;s(this).one("bsTransitionEnd",function(){t=!0});var u=function(){t||s(r).trigger(s.support.transition.end)};return setTimeout(u,i),this},s(function(){s.support.transition=e(),s.support.transition&&(s.event.special.bsTransitionEnd={bindType:s.support.transition.end,delegateType:s.support.transition.end,handle:function(i){if(s(i.target).is(this))return i.handleObj.handler.apply(this,arguments)}})})}(me);var Qm=We.extend({events:{"submit #g-new-fs-form":function(s){this.createAssetstore(s,this.$("#g-new-fs-error"),{type:bi.FILESYSTEM,name:this.$("#g-new-fs-name").val(),root:this.$("#g-new-fs-root").val()})},"submit #g-new-s3-form":function(s){this.createAssetstore(s,this.$("#g-new-s3-error"),{type:bi.S3,name:this.$("#g-new-s3-name").val(),bucket:this.$("#g-new-s3-bucket").val(),prefix:this.$("#g-new-s3-prefix").val(),accessKeyId:this.$("#g-new-s3-access-key-id").val(),secret:this.$("#g-new-s3-secret").val(),service:this.$("#g-new-s3-service").val(),region:this.$("#g-new-s3-region").val(),readOnly:this.$("#g-new-s3-readonly").is(":checked"),inferCredentials:this.$("#g-new-s3-infercredentials").is(":checked"),serverSideEncryption:this.$("#g-new-s3-sse").is(":checked")})}},render:function(){return this.$el.html(XS()),this},createAssetstore:function(s,e,i){s.preventDefault(),this.$(".g-new-assetstore-submit").girderEnable(!1),e.empty();var t=new za;t.set(i),t.on("g:saved",function(){this.$(".g-new-assetstore-submit").girderEnable(!0),this.trigger("g:created",t)},this).on("g:error",function(r){this.$(".g-new-assetstore-submit").girderEnable(!0),e.text(r.responseJSON.message)},this).save()}});function Qt(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Ot(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Oc(s,e){return Array.isArray(s)?GS(s,e):s&&typeof s=="object"?qS(s):s||""}function GS(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Oc(s[n]))&&(u&&e[n]&&(i=Ot(i)),t=t+r+i,r=" ");return t}function qS(s){var e="",i="";for(var t in s)t&&s[t]&&KS.call(s,t)&&(e=e+i+t,i=" ");return e}function Ot(s){var e=""+s,i=JS.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var KS=Object.prototype.hasOwnProperty,JS=/["&<>]/;function ev(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ev(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function ZS(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-current-assetstores-container">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-body-title">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Assetstores</div>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",n.length?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-bottom-message">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Below is a list of all of the assetstores available to the server. The",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+`
`,r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'one set as "current" is the one that uploaded files will be written to.</div>'):(r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-bottom-message">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"You must create an assetstore before you can upload files to the server.",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+`
`,r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Select from the options below to create one.</div>"),r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",function(){var h=n;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+Qt("class",Oc(["g-assetstore-container","panel","panel-default",c.get("current")?"g-assetstore-current":void 0],[!1,!1,!1,!0]),!1,!1)+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="panel-body">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+(' class="g-assetstore-info-section"'+Qt("assetstore-type",c.get("type"),!0,!1)+Qt("cid",c.cid,!0,!1))+">",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Name:</b>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-name">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("name"))==null?"":i)+"</span>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("current")&&(r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-current-text">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" (Current assetstore)</span>"),e=e+"</div>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Unique ID:</b>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-id">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.id)==null?"":i)+"</span></div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("type")===o.FILESYSTEM?(r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Type:</b>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-type">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" Filesystem</span></div>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Root path:</b>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-root">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("root"))==null?"":i)+"</span></div>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"File creation permissions (octal):</b>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-perms">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=(c.get("perms")||384).toString(8))==null?"":i)+"</span></div>"):c.get("type")===o.S3&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Type:</b>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-type">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" S3</span></div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Bucket:</b>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-bucket">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("bucket"))==null?"":i)+"</span></div>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("prefix")&&(r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Path prefix:</b>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-prefix">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("prefix"))==null?"":i)+"</span></div>"),r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Access key ID:</b>",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-access-key-id">',r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("accessKeyId"))==null?"":i)+"</span></div>",r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Secret access key:</b>",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-secret-key">',r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("secret")&&"[hidden]")==null?"":i)+"</span></div>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Service:</b>",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-service-key">',r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("service"))==null?"":i)+"</span></div>",r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Region:</b>",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-region-key">',r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("region"))==null?"":i)+"</span></div>"),e=e+"</div>",r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.capacityKnown()&&(r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Capacity:</b>",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-capacity">',r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.capacityString())==null?"":i)+"</span>",r=62,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+(' class="g-assetstore-capacity-chart"'+Qt("cid",c.cid,!0,!1))+"></div></div>"),r=63,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-buttons">',r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-edit-assetstore btn btn-sm btn-default"'+Qt("cid",c.cid,!0,!1))+">",r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Edit</button>",r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("hasFiles")?(r=70,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-button-container" title="You must delete all files from the assetstore before you can delete the assetstore.">',r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-delete-assetstore btn btn-sm btn-danger disabled"'+Qt("cid",c.cid,!0,!1)+Qt("disabled",!0,!0,!1))+">",r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Delete</button></div>"):(r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-delete-assetstore btn btn-sm btn-danger"'+Qt("cid",c.cid,!0,!1))+">",r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Delete</button>"),r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",!c.get("current")&&!c.get("readOnly")&&(r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-set-current btn btn-sm btn-primary"'+Qt("cid",c.cid,!0,!1))+">",r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Set as current</button>"),r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",a.indexOf(c.get("type"))!==-1&&(r=78,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-import-button-container">',r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<a"+(' class="g-import-button btn btn-sm btn-success"'+Qt("href",`#assetstore/${c.id}/import`,!0,!1))+">",r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<i class="icon-link-ext"></i>',r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" Import data</a></div>"),e=e+"</div></div></div>"}else{var l=0;for(var g in h){l++;var c=h[g];r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+Qt("class",Oc(["g-assetstore-container","panel","panel-default",c.get("current")?"g-assetstore-current":void 0],[!1,!1,!1,!0]),!1,!1)+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="panel-body">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+(' class="g-assetstore-info-section"'+Qt("assetstore-type",c.get("type"),!0,!1)+Qt("cid",c.cid,!0,!1))+">",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Name:</b>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-name">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("name"))==null?"":i)+"</span>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("current")&&(r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-current-text">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" (Current assetstore)</span>"),e=e+"</div>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Unique ID:</b>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-id">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.id)==null?"":i)+"</span></div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("type")===o.FILESYSTEM?(r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Type:</b>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-type">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" Filesystem</span></div>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Root path:</b>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-root">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("root"))==null?"":i)+"</span></div>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"File creation permissions (octal):</b>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-perms">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=(c.get("perms")||384).toString(8))==null?"":i)+"</span></div>"):c.get("type")===o.S3&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Type:</b>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-type">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" S3</span></div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Bucket:</b>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-bucket">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("bucket"))==null?"":i)+"</span></div>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("prefix")&&(r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Path prefix:</b>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-prefix">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("prefix"))==null?"":i)+"</span></div>"),r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Access key ID:</b>",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-access-key-id">',r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("accessKeyId"))==null?"":i)+"</span></div>",r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Secret access key:</b>",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-secret-key">',r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("secret")&&"[hidden]")==null?"":i)+"</span></div>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Service:</b>",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-service-key">',r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("service"))==null?"":i)+"</span></div>",r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Region:</b>",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-region-key">',r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.get("region"))==null?"":i)+"</span></div>"),e=e+"</div>",r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.capacityKnown()&&(r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div>",r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<b>",r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Capacity:</b>",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<span class="g-assetstore-capacity">',r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" ",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+Ot((i=c.capacityString())==null?"":i)+"</span>",r=62,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<div"+(' class="g-assetstore-capacity-chart"'+Qt("cid",c.cid,!0,!1))+"></div></div>"),r=63,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-buttons">',r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-edit-assetstore btn btn-sm btn-default"'+Qt("cid",c.cid,!0,!1))+">",r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Edit</button>",r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",c.get("hasFiles")?(r=70,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-button-container" title="You must delete all files from the assetstore before you can delete the assetstore.">',r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-delete-assetstore btn btn-sm btn-danger disabled"'+Qt("cid",c.cid,!0,!1)+Qt("disabled",!0,!0,!1))+">",r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Delete</button></div>"):(r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-delete-assetstore btn btn-sm btn-danger"'+Qt("cid",c.cid,!0,!1))+">",r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Delete</button>"),r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",!c.get("current")&&!c.get("readOnly")&&(r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<button"+(' class="g-set-current btn btn-sm btn-primary"'+Qt("cid",c.cid,!0,!1))+">",r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"Set as current</button>"),r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",a.indexOf(c.get("type"))!==-1&&(r=78,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div class="g-assetstore-import-button-container">',r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+"<a"+(' class="g-import-button btn btn-sm btn-success"'+Qt("href",`#assetstore/${c.id}/import`,!0,!1))+">",r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<i class="icon-link-ext"></i>',r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+" Import data</a></div>"),e=e+"</div></div></div>"}}}.call(this),e=e+"</div>",r=83,t="/home/circleci/project/girder/girder/web/src/templates/body/assetstores.pug",e=e+'<div id="g-new-assetstore-container"></div>'}).call(this,"assetstores"in u?u.assetstores:typeof assetstores<"u"?assetstores:void 0,"importableTypes"in u?u.importableTypes:typeof importableTypes<"u"?importableTypes:void 0,"types"in u?u.types:typeof types<"u"?types:void 0)}catch(n){ev(n,t,r)}return e}/*!
 * ApexCharts v4.5.0
 * (c) 2018-2025 ApexCharts
 * Released under the MIT License.
 */function Nc(s,e){(e==null||e>s.length)&&(e=s.length);for(var i=0,t=Array(e);i<e;i++)t[i]=s[i];return t}function tv(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function Oe(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}function wg(s,e){for(var i=0;i<e.length;i++){var t=e[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,sv(t.key),t)}}function Ne(s,e,i){return e&&wg(s.prototype,e),i&&wg(s,i),Object.defineProperty(s,"prototype",{writable:!1}),s}function Ku(s,e){var i=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(!i){if(Array.isArray(s)||(i=Lh(s))||e&&s&&typeof s.length=="number"){i&&(s=i);var t=0,r=function(){};return{s:r,n:function(){return t>=s.length?{done:!0}:{done:!1,value:s[t++]}},e:function(o){throw o},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u,n=!0,a=!1;return{s:function(){i=i.call(s)},n:function(){var o=i.next();return n=o.done,o},e:function(o){a=!0,u=o},f:function(){try{n||i.return==null||i.return()}finally{if(a)throw u}}}}function Nn(s){var e=rv();return function(){var i,t=ra(s);if(e){var r=ra(this).constructor;i=Reflect.construct(t,arguments,r)}else i=t.apply(this,arguments);return function(u,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tv(u)}(this,i)}}function ta(s,e,i){return(e=sv(e))in s?Object.defineProperty(s,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[e]=i,s}function ra(s){return ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ra(s)}function Wn(s,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),e&&Wc(s,e)}function rv(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rv=function(){return!!s})()}function yg(s,e){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(s);e&&(t=t.filter(function(r){return Object.getOwnPropertyDescriptor(s,r).enumerable})),i.push.apply(i,t)}return i}function Pe(s){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?yg(Object(i),!0).forEach(function(t){ta(s,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):yg(Object(i)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(i,t))})}return s}function Wc(s,e){return Wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,t){return i.__proto__=t,i},Wc(s,e)}function iv(s,e){return function(i){if(Array.isArray(i))return i}(s)||function(i,t){var r=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(r!=null){var u,n,a,o,h=[],g=!0,l=!1;try{if(a=(r=r.call(i)).next,t===0){if(Object(r)!==r)return;g=!1}else for(;!(g=(u=a.call(r)).done)&&(h.push(u.value),h.length!==t);g=!0);}catch(c){l=!0,n=c}finally{try{if(!g&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return h}}(s,e)||Lh(s,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function nr(s){return function(e){if(Array.isArray(e))return Nc(e)}(s)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(s)||Lh(s)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function sv(s){var e=function(i,t){if(typeof i!="object"||!i)return i;var r=i[Symbol.toPrimitive];if(r!==void 0){var u=r.call(i,t||"default");if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}(s,"string");return typeof e=="symbol"?e:e+""}function au(s){return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},au(s)}function Lh(s,e){if(s){if(typeof s=="string")return Nc(s,e);var i={}.toString.call(s).slice(8,-1);return i==="Object"&&s.constructor&&(i=s.constructor.name),i==="Map"||i==="Set"?Array.from(s):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Nc(s,e):void 0}}var pe=function(){function s(){Oe(this,s)}return Ne(s,[{key:"shadeRGBColor",value:function(e,i){var t=i.split(","),r=e<0?0:255,u=e<0?-1*e:e,n=parseInt(t[0].slice(4),10),a=parseInt(t[1],10),o=parseInt(t[2],10);return"rgb("+(Math.round((r-n)*u)+n)+","+(Math.round((r-a)*u)+a)+","+(Math.round((r-o)*u)+o)+")"}},{key:"shadeHexColor",value:function(e,i){var t=parseInt(i.slice(1),16),r=e<0?0:255,u=e<0?-1*e:e,n=t>>16,a=t>>8&255,o=255&t;return"#"+(16777216+65536*(Math.round((r-n)*u)+n)+256*(Math.round((r-a)*u)+a)+(Math.round((r-o)*u)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return s.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(e,i){return function(){return e.apply(i,arguments)}}},{key:"isObject",value:function(e){return e&&au(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,i){return Object.prototype.toString.call(i)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var i,t=[];for(i=0;i<e.length;i++)t[i]=e[i];return t}},{key:"extend",value:function(e,i){var t=this;typeof Object.assign!="function"&&(Object.assign=function(u){if(u==null)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(u),a=1;a<arguments.length;a++){var o=arguments[a];if(o!=null)for(var h in o)o.hasOwnProperty(h)&&(n[h]=o[h])}return n});var r=Object.assign({},e);return this.isObject(e)&&this.isObject(i)&&Object.keys(i).forEach(function(u){t.isObject(i[u])&&u in e?r[u]=t.extend(e[u],i[u]):Object.assign(r,ta({},u,i[u]))}),r}},{key:"extendArray",value:function(e,i){var t=[];return e.map(function(r){t.push(s.extend(i,r))}),e=t}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var i,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||au(e)!=="object")return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){i=[],t.set(e,i);for(var r=0;r<e.length;r++)i[r]=this.clone(e[r],t)}else if(e instanceof Date)i=new Date(e.getTime());else for(var u in i={},t.set(e,i),e)e.hasOwnProperty(u)&&(i[u]=this.clone(e[u],t));return i}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,i){return Math.pow(i,Math.floor(Math.log(e)/Math.log(i)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(i))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var i=getComputedStyle(e,null),t=e.clientHeight,r=e.clientWidth;return t-=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),[r-=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),t]}},{key:"getBoundingClientRect",value:function(e){var i=e.getBoundingClientRect();return{top:i.top,right:i.right,bottom:i.bottom,left:i.left,width:e.clientWidth,height:e.clientHeight,x:i.left,y:i.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(i,t){return Array.isArray(t)&&(t=t.reduce(function(r,u){return r.length>u.length?r:u})),i.length>t.length?i:t},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var t=e.replace("#","");t=t.match(new RegExp("(.{"+t.length/3+"})","g"));for(var r=0;r<t.length;r++)t[r]=parseInt(t[r].length===1?t[r]+t[r]:t[r],16);return i!==void 0&&t.push(i),"rgba("+t.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,i){for(var t=[],r=2*Math.PI/i,u=0;u<i;u++){var n={};n.x=e*Math.sin(u*r),n.y=-e*Math.cos(u*r),t.push(n)}return t}},{key:"polarToCartesian",value:function(e,i,t,r){var u=(r-90)*Math.PI/180;return{x:e+t*Math.cos(u),y:i+t*Math.sin(u)}}},{key:"escapeString",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",t=e.toString().slice();return t=t.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,i)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,i,t){if(t>=e.length)for(var r=t-e.length+1;r--;)e.push(void 0);return e.splice(t,0,e.splice(i,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,i){for(;(e=e.parentElement)&&!e.classList.contains(i););return e}},{key:"setELstyles",value:function(e,i){for(var t in i)i.hasOwnProperty(t)&&(e.style.key=i[t])}},{key:"preciseAddition",value:function(e,i){var t=(String(e).split(".")[1]||"").length,r=(String(i).split(".")[1]||"").length,u=Math.pow(10,Math.max(t,r));return(Math.round(e*u)+Math.round(i*u))/u}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,i=e.indexOf("Edge/");return i>0&&parseInt(e.substring(i+5,e.indexOf(".",i)),10)}},{key:"getGCD",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,r=Math.pow(10,t-Math.floor(Math.log10(Math.max(e,i))));for(e=Math.round(Math.abs(e)*r),i=Math.round(Math.abs(i)*r);i;){var u=i;i=e%i,e=u}return e/r}},{key:"getPrimeFactors",value:function(e){for(var i=[],t=2;e>=2;)e%t==0?(i.push(t),e/=t):t++;return i}},{key:"mod",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,r=Math.pow(10,t-Math.floor(Math.log10(Math.max(e,i))));return(e=Math.round(Math.abs(e)*r))%(i=Math.round(Math.abs(i)*r))/r}}]),s}(),Eu=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"animateLine",value:function(e,i,t,r){e.attr(i).animate(r).attr(t)}},{key:"animateMarker",value:function(e,i,t,r){e.attr({opacity:0}).animate(i).attr({opacity:1}).after(function(){r()})}},{key:"animateRect",value:function(e,i,t,r,u){e.attr(i).animate(r).attr(t).after(function(){return u()})}},{key:"animatePathsGradually",value:function(e){var i=e.el,t=e.realIndex,r=e.j,u=e.fill,n=e.pathFrom,a=e.pathTo,o=e.speed,h=e.delay,g=this.w,l=0;g.config.chart.animations.animateGradually.enabled&&(l=g.config.chart.animations.animateGradually.delay),g.config.chart.animations.dynamicAnimation.enabled&&g.globals.dataChanged&&g.config.chart.type!=="bar"&&(l=0),this.morphSVG(i,t,r,g.config.chart.type!=="line"||g.globals.comboCharts?u:"stroke",n,a,o,h*l)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var i=e.el;i.classList.remove("apexcharts-element-hidden"),i.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var i=this.w;i.globals.animationEnded||(i.globals.animationEnded=!0,this.showDelayedElements(),typeof i.config.chart.events.animationEnd=="function"&&i.config.chart.events.animationEnd(this.ctx,{el:e,w:i}))}},{key:"morphSVG",value:function(e,i,t,r,u,n,a,o){var h=this,g=this.w;u||(u=e.attr("pathFrom")),n||(n=e.attr("pathTo"));var l=function(c){return g.config.chart.type==="radar"&&(a=1),"M 0 ".concat(g.globals.gridHeight)};(!u||u.indexOf("undefined")>-1||u.indexOf("NaN")>-1)&&(u=l()),(!n.trim()||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=l()),g.globals.shouldAnimate||(a=1),e.plot(u).animate(1,o).plot(u).animate(a,o).plot(n).after(function(){pe.isNumber(t)?t===g.globals.series[g.globals.maxValsInArrayIndex].length-2&&g.globals.shouldAnimate&&h.animationCompleted(e):r!=="none"&&g.globals.shouldAnimate&&(!g.globals.comboCharts&&i===g.globals.series.length-1||g.globals.comboCharts)&&h.animationCompleted(e),h.showDelayedElements()})}}]),s}();const zc={},uv=[];function ct(s,e){if(Array.isArray(s))for(const i of s)ct(i,e);else if(typeof s!="object")nv(Object.getOwnPropertyNames(e)),zc[s]=Object.assign(zc[s]||{},e);else for(const i in s)ct(i,s[i])}function _r(s){return zc[s]||{}}function nv(s){uv.push(...s)}function Th(s,e){let i;const t=s.length,r=[];for(i=0;i<t;i++)r.push(e(s[i]));return r}function Hl(s){return s%360*Math.PI/180}function Au(s){return s.charAt(0).toUpperCase()+s.slice(1)}function ku(s,e,i,t){return e!=null&&i!=null||(t=t||s.bbox(),e==null?e=t.width/t.height*i:i==null&&(i=t.height/t.width*e)),{width:e,height:i}}function Hc(s,e){const i=s.origin;let t=s.ox!=null?s.ox:s.originX!=null?s.originX:"center",r=s.oy!=null?s.oy:s.originY!=null?s.originY:"center";i!=null&&([t,r]=Array.isArray(i)?i:typeof i=="object"?[i.x,i.y]:[i,i]);const u=typeof t=="string",n=typeof r=="string";if(u||n){const{height:a,width:o,x:h,y:g}=e.bbox();u&&(t=t.includes("left")?h:t.includes("right")?h+o:h+o/2),n&&(r=r.includes("top")?g:r.includes("bottom")?g+a:g+a/2)}return[t,r]}const QS=new Set(["desc","metadata","title"]),Uc=s=>QS.has(s.nodeName),ov=(s,e,i={})=>{const t={...e};for(const r in t)t[r].valueOf()===i[r]&&delete t[r];Object.keys(t).length?s.node.setAttribute("data-svgjs",JSON.stringify(t)):(s.node.removeAttribute("data-svgjs"),s.node.removeAttribute("svgjs:data"))},Ph="http://www.w3.org/2000/svg",Ul="http://www.w3.org/2000/xmlns/",Su="http://www.w3.org/1999/xlink",ft={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function zn(){return ft.window}let $h=class{};const Fs={},Ih="___SYMBOL___ROOT___";function kn(s,e=Ph){return ft.document.createElementNS(e,s)}function Cr(s,e=!1){if(s instanceof $h)return s;if(typeof s=="object")return Yl(s);if(s==null)return new Fs[Ih];if(typeof s=="string"&&s.charAt(0)!=="<")return Yl(ft.document.querySelector(s));const i=e?ft.document.createElement("div"):kn("svg");return i.innerHTML=s,s=Yl(i.firstChild),i.removeChild(i.firstChild),s}function Dt(s,e){return e&&(e instanceof ft.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:kn(s)}function ri(s){if(!s)return null;if(s.instance instanceof $h)return s.instance;if(s.nodeName==="#document-fragment")return new Fs.Fragment(s);let e=Au(s.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":Fs[e]||(e="Dom"),new Fs[e](s)}let Yl=ri;function vt(s,e=s.name,i=!1){return Fs[e]=s,i&&(Fs[Ih]=s),nv(Object.getOwnPropertyNames(s.prototype)),s}let ej=1e3;function av(s){return"Svgjs"+Au(s)+ej++}function lv(s){for(let e=s.children.length-1;e>=0;e--)lv(s.children[e]);return s.id&&(s.id=av(s.nodeName)),s}function Qe(s,e){let i,t;for(t=(s=Array.isArray(s)?s:[s]).length-1;t>=0;t--)for(i in e)s[t].prototype[i]=e[i]}function jt(s){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?s.apply(this,e):s.apply(this,e.slice(0,-1)).attr(i)}}ct("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const s=this.position();return this.parent().add(this.remove(),s+1),this},backward:function(){const s=this.position();return this.parent().add(this.remove(),s?s-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(s){(s=Cr(s)).remove();const e=this.position();return this.parent().add(s,e),this},after:function(s){(s=Cr(s)).remove();const e=this.position();return this.parent().add(s,e+1),this},insertBefore:function(s){return(s=Cr(s)).before(this),this},insertAfter:function(s){return(s=Cr(s)).after(this),this}});const cv=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,tj=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rj=/rgb\((\d+),(\d+),(\d+)\)/,ij=/(#[a-z_][a-z0-9\-_]*)/i,sj=/\)\s*,?\s*/,uj=/\s/g,xg=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Cg=/^rgb\(/,Eg=/^(\s+)?$/,Ag=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nj=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,e0=/[\s,]+/,Rh=/[MLHVCSQTAZ]/i;function oj(s){const e=Math.round(s),i=Math.max(0,Math.min(255,e)).toString(16);return i.length===1?"0"+i:i}function Ns(s,e){for(let i=e.length;i--;)if(s[e[i]]==null)return!1;return!0}function Vl(s,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?s+6*(e-s)*i:i<.5?e:i<2/3?s+(e-s)*(2/3-i)*6:s}ct("Dom",{classes:function(){const s=this.attr("class");return s==null?[]:s.trim().split(e0)},hasClass:function(s){return this.classes().indexOf(s)!==-1},addClass:function(s){if(!this.hasClass(s)){const e=this.classes();e.push(s),this.attr("class",e.join(" "))}return this},removeClass:function(s){return this.hasClass(s)&&this.attr("class",this.classes().filter(function(e){return e!==s}).join(" ")),this},toggleClass:function(s){return this.hasClass(s)?this.removeClass(s):this.addClass(s)}}),ct("Dom",{css:function(s,e){const i={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){const r=t.split(/\s*:\s*/);i[r[0]]=r[1]}),i;if(arguments.length<2){if(Array.isArray(s)){for(const t of s){const r=t;i[t]=this.node.style.getPropertyValue(r)}return i}if(typeof s=="string")return this.node.style.getPropertyValue(s);if(typeof s=="object")for(const t in s)this.node.style.setProperty(t,s[t]==null||Eg.test(s[t])?"":s[t])}return arguments.length===2&&this.node.style.setProperty(s,e==null||Eg.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),ct("Dom",{data:function(s,e,i){if(s==null)return this.data(Th(function(t,r){let u;const n=t.length,a=[];for(u=0;u<n;u++)r(t[u])&&a.push(t[u]);return a}(this.node.attributes,t=>t.nodeName.indexOf("data-")===0),t=>t.nodeName.slice(5)));if(s instanceof Array){const t={};for(const r of s)t[r]=this.data(r);return t}if(typeof s=="object")for(e in s)this.data(e,s[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+s))}catch{return this.attr("data-"+s)}else this.attr("data-"+s,e===null?null:i===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),ct("Dom",{remember:function(s,e){if(typeof arguments[0]=="object")for(const i in s)this.remember(i,s[i]);else{if(arguments.length===1)return this.memory()[s];this.memory()[s]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let s=arguments.length-1;s>=0;s--)delete this.memory()[arguments[s]];return this},memory:function(){return this._memory=this._memory||{}}});class Et{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Et||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",i){const{random:t,round:r,sin:u,PI:n}=Math;if(e==="vibrant"){const a=24*t()+57,o=38*t()+45,h=360*t();return new Et(a,o,h,"lch")}if(e==="sine"){const a=r(80*u(2*n*(i=i??t())/.5+.01)+150),o=r(50*u(2*n*i/.5+4.6)+200),h=r(100*u(2*n*i/.5+2.3)+150);return new Et(a,o,h)}if(e==="pastel"){const a=8*t()+86,o=17*t()+9,h=360*t();return new Et(a,o,h,"lch")}if(e==="dark"){const a=10+10*t(),o=50*t()+86,h=360*t();return new Et(a,o,h,"lch")}if(e==="rgb"){const a=255*t(),o=255*t(),h=255*t();return new Et(a,o,h)}if(e==="lab"){const a=100*t(),o=256*t()-128,h=256*t()-128;return new Et(a,o,h,"lab")}if(e==="grey"){const a=255*t();return new Et(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(xg.test(e)||Cg.test(e))}cmyk(){const{_a:e,_b:i,_c:t}=this.rgb(),[r,u,n]=[e,i,t].map(o=>o/255),a=Math.min(1-r,1-u,1-n);return a===1?new Et(0,0,0,1,"cmyk"):new Et((1-r-a)/(1-a),(1-u-a)/(1-a),(1-n-a)/(1-a),a,"cmyk")}hsl(){const{_a:e,_b:i,_c:t}=this.rgb(),[r,u,n]=[e,i,t].map(c=>c/255),a=Math.max(r,u,n),o=Math.min(r,u,n),h=(a+o)/2,g=a===o,l=a-o;return new Et(360*(g?0:a===r?((u-n)/l+(u<n?6:0))/6:a===u?((n-r)/l+2)/6:a===n?((r-u)/l+4)/6:0),100*(g?0:h>.5?l/(2-a-o):l/(a+o)),100*h,"hsl")}init(e=0,i=0,t=0,r=0,u="rgb"){if(e=e||0,this.space)for(const l in this.space)delete this[this.space[l]];if(typeof e=="number")u=typeof r=="string"?r:u,r=typeof r=="string"?0:r,Object.assign(this,{_a:e,_b:i,_c:t,_d:r,space:u});else if(e instanceof Array)this.space=i||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const l=function(c,d){const F=Ns(c,"rgb")?{_a:c.r,_b:c.g,_c:c.b,_d:0,space:"rgb"}:Ns(c,"xyz")?{_a:c.x,_b:c.y,_c:c.z,_d:0,space:"xyz"}:Ns(c,"hsl")?{_a:c.h,_b:c.s,_c:c.l,_d:0,space:"hsl"}:Ns(c,"lab")?{_a:c.l,_b:c.a,_c:c.b,_d:0,space:"lab"}:Ns(c,"lch")?{_a:c.l,_b:c.c,_c:c.h,_d:0,space:"lch"}:Ns(c,"cmyk")?{_a:c.c,_b:c.m,_c:c.y,_d:c.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return F.space=d||F.space,F}(e,i);Object.assign(this,l)}else if(typeof e=="string")if(Cg.test(e)){const l=e.replace(uj,""),[c,d,F]=rj.exec(l).slice(1,4).map(p=>parseInt(p));Object.assign(this,{_a:c,_b:d,_c:F,_d:0,space:"rgb"})}else{if(!xg.test(e))throw Error("Unsupported string format, can't construct Color");{const l=p=>parseInt(p,16),[,c,d,F]=tj.exec(function(p){return p.length===4?["#",p.substring(1,2),p.substring(1,2),p.substring(2,3),p.substring(2,3),p.substring(3,4),p.substring(3,4)].join(""):p}(e)).map(l);Object.assign(this,{_a:c,_b:d,_c:F,_d:0,space:"rgb"})}}const{_a:n,_b:a,_c:o,_d:h}=this,g=this.space==="rgb"?{r:n,g:a,b:o}:this.space==="xyz"?{x:n,y:a,z:o}:this.space==="hsl"?{h:n,s:a,l:o}:this.space==="lab"?{l:n,a,b:o}:this.space==="lch"?{l:n,c:a,h:o}:this.space==="cmyk"?{c:n,m:a,y:o,k:h}:{};Object.assign(this,g)}lab(){const{x:e,y:i,z:t}=this.xyz();return new Et(116*i-16,500*(e-i),200*(i-t),"lab")}lch(){const{l:e,a:i,b:t}=this.lab(),r=Math.sqrt(i**2+t**2);let u=180*Math.atan2(t,i)/Math.PI;return u<0&&(u*=-1,u=360-u),new Et(e,r,u,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:i,y:t,z:r}=this;if(this.space==="lab"||this.space==="lch"){let{l:d,a:F,b:p}=this;if(this.space==="lch"){const{c:b,h:y}=this,k=Math.PI/180;F=b*Math.cos(k*y),p=b*Math.sin(k*y)}const f=(d+16)/116,m=F/500+f,v=f-p/200,w=16/116,x=.008856,A=7.787;i=.95047*(m**3>x?m**3:(m-w)/A),t=1*(f**3>x?f**3:(f-w)/A),r=1.08883*(v**3>x?v**3:(v-w)/A)}const u=3.2406*i+-1.5372*t+-.4986*r,n=-.9689*i+1.8758*t+.0415*r,a=.0557*i+-.204*t+1.057*r,o=Math.pow,h=.0031308,g=u>h?1.055*o(u,1/2.4)-.055:12.92*u,l=n>h?1.055*o(n,1/2.4)-.055:12.92*n,c=a>h?1.055*o(a,1/2.4)-.055:12.92*a;return new Et(255*g,255*l,255*c)}if(this.space==="hsl"){let{h:i,s:t,l:r}=this;if(i/=360,t/=100,r/=100,t===0)return r*=255,new Et(r,r,r);const u=r<.5?r*(1+t):r+t-r*t,n=2*r-u,a=255*Vl(n,u,i+1/3),o=255*Vl(n,u,i),h=255*Vl(n,u,i-1/3);return new Et(a,o,h)}if(this.space==="cmyk"){const{c:i,m:t,y:r,k:u}=this,n=255*(1-Math.min(1,i*(1-u)+u)),a=255*(1-Math.min(1,t*(1-u)+u)),o=255*(1-Math.min(1,r*(1-u)+u));return new Et(n,a,o)}return this;var e}toArray(){const{_a:e,_b:i,_c:t,_d:r,space:u}=this;return[e,i,t,r,u]}toHex(){const[e,i,t]=this._clamped().map(oj);return`#${e}${i}${t}`}toRgb(){const[e,i,t]=this._clamped();return`rgb(${e},${i},${t})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:i,_c:t}=this.rgb(),[r,u,n]=[e,i,t].map(f=>f/255),a=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,o=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,h=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,g=(.4124*a+.3576*o+.1805*h)/.95047,l=(.2126*a+.7152*o+.0722*h)/1,c=(.0193*a+.1192*o+.9505*h)/1.08883,d=g>.008856?Math.pow(g,1/3):7.787*g+16/116,F=l>.008856?Math.pow(l,1/3):7.787*l+16/116,p=c>.008856?Math.pow(c,1/3):7.787*c+16/116;return new Et(d,F,p,"xyz")}_clamped(){const{_a:e,_b:i,_c:t}=this.rgb(),{max:r,min:u,round:n}=Math;return[e,i,t].map(a=>r(0,u(n(a),255)))}}class wt{constructor(...e){this.init(...e)}clone(){return new wt(this)}init(e,i){const u=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:i};return this.x=u.x==null?0:u.x,this.y=u.y==null?0:u.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){Ke.isMatrixLike(e)||(e=new Ke(e));const{x:i,y:t}=this;return this.x=e.a*i+e.c*t+e.e,this.y=e.b*i+e.d*t+e.f,this}}function Ws(s,e,i){return Math.abs(e-s)<(i||1e-6)}class Ke{constructor(...e){this.init(...e)}static formatTransforms(e){const i=e.flip==="both"||e.flip===!0,t=e.flip&&(i||e.flip==="x")?-1:1,r=e.flip&&(i||e.flip==="y")?-1:1,u=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,n=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*t:isFinite(e.scale)?e.scale*t:isFinite(e.scaleX)?e.scaleX*t:t,o=e.scale&&e.scale.length?e.scale[1]*r:isFinite(e.scale)?e.scale*r:isFinite(e.scaleY)?e.scaleY*r:r,h=e.shear||0,g=e.rotate||e.theta||0,l=new wt(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),c=l.x,d=l.y,F=new wt(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),p=F.x,f=F.y,m=new wt(e.translate||e.tx||e.translateX,e.ty||e.translateY),v=m.x,w=m.y,x=new wt(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:a,scaleY:o,skewX:u,skewY:n,shear:h,theta:g,rx:x.x,ry:x.y,tx:v,ty:w,ox:c,oy:d,px:p,py:f}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,i,t){const r=e.a*i.a+e.c*i.b,u=e.b*i.a+e.d*i.b,n=e.a*i.c+e.c*i.d,a=e.b*i.c+e.d*i.d,o=e.e+e.a*i.e+e.c*i.f,h=e.f+e.b*i.e+e.d*i.f;return t.a=r,t.b=u,t.c=n,t.d=a,t.e=o,t.f=h,t}around(e,i,t){return this.clone().aroundO(e,i,t)}aroundO(e,i,t){const r=e||0,u=i||0;return this.translateO(-r,-u).lmultiplyO(t).translateO(r,u)}clone(){return new Ke(this)}decompose(e=0,i=0){const t=this.a,r=this.b,u=this.c,n=this.d,a=this.e,o=this.f,h=t*n-r*u,g=h>0?1:-1,l=g*Math.sqrt(t*t+r*r),c=Math.atan2(g*r,g*t),d=180/Math.PI*c,F=Math.cos(c),p=Math.sin(c),f=(t*u+r*n)/h,m=u*l/(f*t-r)||n*l/(f*r+t);return{scaleX:l,scaleY:m,shear:f,rotate:d,translateX:a-e+e*F*l+i*(f*F*l-p*m),translateY:o-i+e*p*l+i*(f*p*l+F*m),originX:e,originY:i,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const i=new Ke(e);return Ws(this.a,i.a)&&Ws(this.b,i.b)&&Ws(this.c,i.c)&&Ws(this.d,i.d)&&Ws(this.e,i.e)&&Ws(this.f,i.f)}flip(e,i){return this.clone().flipO(e,i)}flipO(e,i){return e==="x"?this.scaleO(-1,1,i,0):e==="y"?this.scaleO(1,-1,0,i):this.scaleO(-1,-1,e,i||e)}init(e){const i=Ke.fromArray([1,0,0,1,0,0]);return e=e instanceof fr?e.matrixify():typeof e=="string"?Ke.fromArray(e.split(e0).map(parseFloat)):Array.isArray(e)?Ke.fromArray(e):typeof e=="object"&&Ke.isMatrixLike(e)?e:typeof e=="object"?new Ke().transform(e):arguments.length===6?Ke.fromArray([].slice.call(arguments)):i,this.a=e.a!=null?e.a:i.a,this.b=e.b!=null?e.b:i.b,this.c=e.c!=null?e.c:i.c,this.d=e.d!=null?e.d:i.d,this.e=e.e!=null?e.e:i.e,this.f=e.f!=null?e.f:i.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,i=this.b,t=this.c,r=this.d,u=this.e,n=this.f,a=e*r-i*t;if(!a)throw new Error("Cannot invert "+this);const o=r/a,h=-i/a,g=-t/a,l=e/a,c=-(o*u+g*n),d=-(h*u+l*n);return this.a=o,this.b=h,this.c=g,this.d=l,this.e=c,this.f=d,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const i=e instanceof Ke?e:new Ke(e);return Ke.matrixMultiply(i,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const i=e instanceof Ke?e:new Ke(e);return Ke.matrixMultiply(this,i,this)}rotate(e,i,t){return this.clone().rotateO(e,i,t)}rotateO(e,i=0,t=0){e=Hl(e);const r=Math.cos(e),u=Math.sin(e),{a:n,b:a,c:o,d:h,e:g,f:l}=this;return this.a=n*r-a*u,this.b=a*r+n*u,this.c=o*r-h*u,this.d=h*r+o*u,this.e=g*r-l*u+t*u-i*r+i,this.f=l*r+g*u-i*u-t*r+t,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,i=e,t=0,r=0){arguments.length===3&&(r=t,t=i,i=e);const{a:u,b:n,c:a,d:o,e:h,f:g}=this;return this.a=u*e,this.b=n*i,this.c=a*e,this.d=o*i,this.e=h*e-t*e+t,this.f=g*i-r*i+r,this}shear(e,i,t){return this.clone().shearO(e,i,t)}shearO(e,i=0,t=0){const{a:r,b:u,c:n,d:a,e:o,f:h}=this;return this.a=r+u*e,this.c=n+a*e,this.e=o+h*e-t*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,i=e,t=0,r=0){arguments.length===3&&(r=t,t=i,i=e),e=Hl(e),i=Hl(i);const u=Math.tan(e),n=Math.tan(i),{a,b:o,c:h,d:g,e:l,f:c}=this;return this.a=a+o*u,this.b=o+a*n,this.c=h+g*u,this.d=g+h*n,this.e=l+c*u-r*u,this.f=c+l*n-t*n,this}skewX(e,i,t){return this.skew(e,0,i,t)}skewY(e,i,t){return this.skew(0,e,i,t)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Ke.isMatrixLike(e))return new Ke(e).multiplyO(this);const i=Ke.formatTransforms(e),{x:t,y:r}=new wt(i.ox,i.oy).transform(this),u=new Ke().translateO(i.rx,i.ry).lmultiplyO(this).translateO(-t,-r).scaleO(i.scaleX,i.scaleY).skewO(i.skewX,i.skewY).shearO(i.shear).rotateO(i.theta).translateO(t,r);if(isFinite(i.px)||isFinite(i.py)){const n=new wt(t,r).transform(u),a=isFinite(i.px)?i.px-n.x:0,o=isFinite(i.py)?i.py-n.y:0;u.translateO(a,o)}return u.translateO(i.tx,i.ty),u}translate(e,i){return this.clone().translateO(e,i)}translateO(e,i){return this.e+=e||0,this.f+=i||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function h0(){if(!h0.nodes){const s=Cr().size(2,0);s.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),s.attr("focusable","false"),s.attr("aria-hidden","true");const e=s.path().node;h0.nodes={svg:s,path:e}}if(!h0.nodes.svg.node.parentNode){const s=ft.document.body||ft.document.documentElement;h0.nodes.svg.addTo(s)}return h0.nodes}function dv(s){return!(s.width||s.height||s.x||s.y)}vt(Ke,"Matrix");class Vt{constructor(...e){this.init(...e)}addOffset(){return this.x+=ft.window.pageXOffset,this.y+=ft.window.pageYOffset,new Vt(this)}init(e){return e=typeof e=="string"?e.split(e0).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return dv(this)}merge(e){const i=Math.min(this.x,e.x),t=Math.min(this.y,e.y),r=Math.max(this.x+this.width,e.x+e.width)-i,u=Math.max(this.y+this.height,e.y+e.height)-t;return new Vt(i,t,r,u)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof Ke||(e=new Ke(e));let i=1/0,t=-1/0,r=1/0,u=-1/0;return[new wt(this.x,this.y),new wt(this.x2,this.y),new wt(this.x,this.y2),new wt(this.x2,this.y2)].forEach(function(n){n=n.transform(e),i=Math.min(i,n.x),t=Math.max(t,n.x),r=Math.min(r,n.y),u=Math.max(u,n.y)}),new Vt(i,r,t-i,u-r)}}function kg(s,e,i){let t;try{if(t=e(s.node),dv(t)&&(r=s.node)!==ft.document&&!(ft.document.documentElement.contains||function(u){for(;u.parentNode;)u=u.parentNode;return u===ft.document}).call(ft.document.documentElement,r))throw new Error("Element not in the dom")}catch{t=i(s)}var r;return t}ct({viewbox:{viewbox(s,e,i,t){return s==null?new Vt(this.attr("viewBox")):this.attr("viewBox",new Vt(s,e,i,t))},zoom(s,e){let{width:i,height:t}=this.attr(["width","height"]);if((i||t)&&typeof i!="string"&&typeof t!="string"||(i=this.node.clientWidth,t=this.node.clientHeight),!i||!t)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const r=this.viewbox(),u=i/r.width,n=t/r.height,a=Math.min(u,n);if(s==null)return a;let o=a/s;o===1/0&&(o=Number.MAX_SAFE_INTEGER/100),e=e||new wt(i/2/u+r.x,t/2/n+r.y);const h=new Vt(r).transform(new Ke({scale:o,origin:e}));return this.viewbox(h)}}}),vt(Vt,"Box");class ws extends Array{constructor(e=[],...i){if(super(e,...i),typeof e=="number")return this;this.length=0,this.push(...e)}}Qe([ws],{each(s,...e){return typeof s=="function"?this.map((i,t,r)=>s.call(i,i,t,r)):this.map(i=>i[s](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const aj=["toArray","constructor","each"];function _s(s,e){return new ws(Th((e||ft.document).querySelectorAll(s),function(i){return ri(i)}))}ws.extend=function(s){s=s.reduce((e,i)=>(aj.includes(i)||i[0]==="_"||(i in Array.prototype&&(e["$"+i]=Array.prototype[i]),e[i]=function(...t){return this.each(i,...t)}),e),{}),Qe([ws],s)};let lj=0;const hv={};function gv(s){let e=s.getEventHolder();return e===ft.window&&(e=hv),e.events||(e.events={}),e.events}function Bh(s){return s.getEventTarget()}function qi(s,e,i,t,r){const u=i.bind(t||s),n=Cr(s),a=gv(n),o=Bh(n);e=Array.isArray(e)?e:e.split(e0),i._svgjsListenerId||(i._svgjsListenerId=++lj),e.forEach(function(h){const g=h.split(".")[0],l=h.split(".")[1]||"*";a[g]=a[g]||{},a[g][l]=a[g][l]||{},a[g][l][i._svgjsListenerId]=u,o.addEventListener(g,u,r||!1)})}function si(s,e,i,t){const r=Cr(s),u=gv(r),n=Bh(r);(typeof i!="function"||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(e0)).forEach(function(a){const o=a&&a.split(".")[0],h=a&&a.split(".")[1];let g,l;if(i)u[o]&&u[o][h||"*"]&&(n.removeEventListener(o,u[o][h||"*"][i],t||!1),delete u[o][h||"*"][i]);else if(o&&h){if(u[o]&&u[o][h]){for(l in u[o][h])si(n,[o,h].join("."),l);delete u[o][h]}}else if(h)for(a in u)for(g in u[a])h===g&&si(n,[a,h].join("."));else if(o){if(u[o]){for(g in u[o])si(n,[o,g].join("."));delete u[o]}}else{for(a in u)si(n,a);(function(c){let d=c.getEventHolder();d===ft.window&&(d=hv),d.events&&(d.events={})})(r)}})}class Hn extends $h{addEventListener(){}dispatch(e,i,t){return function(r,u,n,a){const o=Bh(r);return u instanceof ft.window.Event||(u=new ft.window.CustomEvent(u,{detail:n,cancelable:!0,...a})),o.dispatchEvent(u),u}(this,e,i,t)}dispatchEvent(e){const i=this.getEventHolder().events;if(!i)return!0;const t=i[e.type];for(const r in t)for(const u in t[r])t[r][u](e);return!e.defaultPrevented}fire(e,i,t){return this.dispatch(e,i,t),this}getEventHolder(){return this}getEventTarget(){return this}off(e,i,t){return si(this,e,i,t),this}on(e,i,t,r){return qi(this,e,i,t,r),this}removeEventListener(){}}function Sg(){}vt(Hn,"EventTarget");const Xl=400,cj=">",dj=0,hj={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ys extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(e0).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class at{constructor(...e){this.init(...e)}convert(e){return new at(this.value,e)}divide(e){return e=new at(e),new at(this/e,this.unit||e.unit)}init(e,i){return i=Array.isArray(e)?e[1]:i,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=i||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(i=e.match(cv))&&(this.value=parseFloat(i[1]),i[5]==="%"?this.value/=100:i[5]==="s"&&(this.value*=1e3),this.unit=i[5]):e instanceof at&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new at(e),new at(this-e,this.unit||e.unit)}plus(e){return e=new at(e),new at(this+e,this.unit||e.unit)}times(e){return e=new at(e),new at(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const gj=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Fv=[];class w0 extends Hn{constructor(e,i){super(),this.node=e,this.type=e.nodeName,i&&e!==i&&this.attr(i)}add(e,i){return(e=Cr(e)).removeNamespace&&this.node instanceof ft.window.SVGElement&&e.removeNamespace(),i==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[i]&&this.node.insertBefore(e.node,this.node.childNodes[i]),this}addTo(e,i){return Cr(e).put(this,i)}children(){return new ws(Th(this.node.children,function(e){return ri(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,i=!0){this.writeDataToDom();let t=this.node.cloneNode(e);return i&&(t=lv(t)),new this.constructor(t)}each(e,i){const t=this.children();let r,u;for(r=0,u=t.length;r<u;r++)e.apply(t[r],[r,t]),i&&t[r].each(e,i);return this}element(e,i){return this.put(new w0(kn(e),i))}first(){return ri(this.node.firstChild)}get(e){return ri(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,i){return this.xml(e,i,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=av(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return ri(this.node.lastChild)}matches(e){const i=this.node,t=i.matches||i.matchesSelector||i.msMatchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||null;return t&&t.call(i,e)}parent(e){let i=this;if(!i.node.parentNode)return null;if(i=ri(i.node.parentNode),!e)return i;do if(typeof e=="string"?i.matches(e):i instanceof e)return i;while(i=ri(i.node.parentNode));return i}put(e,i){return e=Cr(e),this.add(e,i),e}putIn(e,i){return Cr(e).add(this,i)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Cr(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,i=null){const t=10**e,r=this.attr(i);for(const u in r)typeof r[u]=="number"&&(r[u]=Math.round(r[u]*t)/t);return this.attr(r),this}svg(e,i){return this.xml(e,i,Ph)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const i=this.parent();if(!i)return this.addTo(e);const t=i.index(this);return i.put(e,t).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,i,t){if(typeof e=="boolean"&&(t=i,i=e,e=null),e==null||typeof e=="function"){i=i==null||i,this.writeDataToDom();let a=this;if(e!=null){if(a=ri(a.node.cloneNode(!0)),i){const o=e(a);if(a=o||a,o===!1)return""}a.each(function(){const o=e(this),h=o||this;o===!1?this.remove():o&&this!==h&&this.replace(h)},!0)}return i?a.node.outerHTML:a.node.innerHTML}i=i!=null&&i;const r=kn("wrapper",t),u=ft.document.createDocumentFragment();r.innerHTML=e;for(let a=r.children.length;a--;)u.appendChild(r.firstElementChild);const n=this.parent();return i?this.replace(u)&&n:this.add(u)}}Qe(w0,{attr:function(s,e,i){if(s==null){s={},e=this.node.attributes;for(const t of e)s[t.nodeName]=Ag.test(t.nodeValue)?parseFloat(t.nodeValue):t.nodeValue;return s}if(s instanceof Array)return s.reduce((t,r)=>(t[r]=this.attr(r),t),{});if(typeof s=="object"&&s.constructor===Object)for(e in s)this.attr(e,s[e]);else if(e===null)this.node.removeAttribute(s);else{if(e==null)return(e=this.node.getAttribute(s))==null?hj[s]:Ag.test(e)?parseFloat(e):e;typeof(e=Fv.reduce((t,r)=>r(s,t,this),e))=="number"?e=new at(e):gj.has(s)&&Et.isColor(e)?e=new Et(e):e.constructor===Array&&(e=new ys(e)),s==="leading"?this.leading&&this.leading(e):typeof i=="string"?this.node.setAttributeNS(i,s,e.toString()):this.node.setAttribute(s,e.toString()),!this.rebuild||s!=="font-size"&&s!=="x"||this.rebuild()}return this},find:function(s){return _s(s,this.node)},findOne:function(s){return ri(this.node.querySelector(s))}}),vt(w0,"Dom");let fr=class extends w0{constructor(s,e){super(s,e),this.dom={},this.node.instance=this,(s.hasAttribute("data-svgjs")||s.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(s.getAttribute("data-svgjs"))??JSON.parse(s.getAttribute("svgjs:data"))??{})}center(s,e){return this.cx(s).cy(e)}cx(s){return s==null?this.x()+this.width()/2:this.x(s-this.width()/2)}cy(s){return s==null?this.y()+this.height()/2:this.y(s-this.height()/2)}defs(){const s=this.root();return s&&s.defs()}dmove(s,e){return this.dx(s).dy(e)}dx(s=0){return this.x(new at(s).plus(this.x()))}dy(s=0){return this.y(new at(s).plus(this.y()))}getEventHolder(){return this}height(s){return this.attr("height",s)}move(s,e){return this.x(s).y(e)}parents(s=this.root()){const e=typeof s=="string";e||(s=Cr(s));const i=new ws;let t=this;for(;(t=t.parent())&&t.node!==ft.document&&t.nodeName!=="#document-fragment"&&(i.push(t),e||t.node!==s.node)&&(!e||!t.matches(s));)if(t.node===this.root().node)return null;return i}reference(s){if(!(s=this.attr(s)))return null;const e=(s+"").match(ij);return e?Cr(e[1]):null}root(){const s=this.parent(function(e){return Fs[e]}(Ih));return s&&s.root()}setData(s){return this.dom=s,this}size(s,e){const i=ku(this,s,e);return this.width(new at(i.width)).height(new at(i.height))}width(s){return this.attr("width",s)}writeDataToDom(){return ov(this,this.dom),super.writeDataToDom()}x(s){return this.attr("x",s)}y(s){return this.attr("y",s)}};Qe(fr,{bbox:function(){const s=kg(this,e=>e.getBBox(),e=>{try{const i=e.clone().addTo(h0().svg).show(),t=i.node.getBBox();return i.remove(),t}catch(i){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${i.toString()}`)}});return new Vt(s)},rbox:function(s){const e=kg(this,t=>t.getBoundingClientRect(),t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)}),i=new Vt(e);return s?i.transform(s.screenCTM().inverseO()):i.addOffset()},inside:function(s,e){const i=this.bbox();return s>i.x&&e>i.y&&s<i.x+i.width&&e<i.y+i.height},point:function(s,e){return new wt(s,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Ke(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const s=this.rect(1,1),e=s.node.getScreenCTM();return s.remove(),new Ke(e)}return new Ke(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Ke}}}),vt(fr,"Element");const Yu={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(s,e){return e==="color"?s:s+"-"+e}};["fill","stroke"].forEach(function(s){const e={};let i;e[s]=function(t){if(t===void 0)return this.attr(s);if(typeof t=="string"||t instanceof Et||Et.isRgb(t)||t instanceof fr)this.attr(s,t);else for(i=Yu[s].length-1;i>=0;i--)t[Yu[s][i]]!=null&&this.attr(Yu.prefix(s,Yu[s][i]),t[Yu[s][i]]);return this},ct(["Element","Runner"],e)}),ct(["Element","Runner"],{matrix:function(s,e,i,t,r,u){return s==null?new Ke(this):this.attr("transform",new Ke(s,e,i,t,r,u))},rotate:function(s,e,i){return this.transform({rotate:s,ox:e,oy:i},!0)},skew:function(s,e,i,t){return arguments.length===1||arguments.length===3?this.transform({skew:s,ox:e,oy:i},!0):this.transform({skew:[s,e],ox:i,oy:t},!0)},shear:function(s,e,i){return this.transform({shear:s,ox:e,oy:i},!0)},scale:function(s,e,i,t){return arguments.length===1||arguments.length===3?this.transform({scale:s,ox:e,oy:i},!0):this.transform({scale:[s,e],ox:i,oy:t},!0)},translate:function(s,e){return this.transform({translate:[s,e]},!0)},relative:function(s,e){return this.transform({relative:[s,e]},!0)},flip:function(s="both",e="center"){return"xybothtrue".indexOf(s)===-1&&(e=s,s="both"),this.transform({flip:s,origin:e},!0)},opacity:function(s){return this.attr("opacity",s)}}),ct("radius",{radius:function(s,e=s){return(this._element||this).type==="radialGradient"?this.attr("r",new at(s)):this.rx(s).ry(e)}}),ct("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(s){return new wt(this.node.getPointAtLength(s))}}),ct(["Element","Runner"],{font:function(s,e){if(typeof s=="object"){for(e in s)this.font(e,s[e]);return this}return s==="leading"?this.leading(e):s==="anchor"?this.attr("text-anchor",e):s==="size"||s==="family"||s==="weight"||s==="stretch"||s==="variant"||s==="style"?this.attr("font-"+s,e):this.attr(s,e)}});ct("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(s,e){return s[e]=function(i){return i===null?this.off(e):this.on(e,i),this},s},{})),ct("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(sj).slice(0,-1).map(function(e){const i=e.trim().split("(");return[i[0],i[1].split(e0).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(e,i){return i[0]==="matrix"?e.lmultiply(Ke.fromArray(i[1])):e[i[0]].apply(e,i[1])},new Ke)},toParent:function(s,e){if(this===s)return this;if(Uc(this.node))return this.addTo(s,e);const i=this.screenCTM(),t=s.screenCTM().inverse();return this.addTo(s,e).untransform().transform(t.multiply(i)),this},toRoot:function(s){return this.toParent(this.root(),s)},transform:function(s,e){if(s==null||typeof s=="string"){const t=new Ke(this).decompose();return s==null?t:t[s]}Ke.isMatrixLike(s)||(s={...s,origin:Hc(s,this)});const i=new Ke(e===!0?this:e||!1).transform(s);return this.attr("transform",i)}});class Sr extends fr{flatten(){return this.each(function(){if(this instanceof Sr)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),i=e.index(this)){return i=i===-1?e.children().length:i,this.each(function(t,r){return r[r.length-t-1].toParent(e,i)}),this.remove()}}vt(Sr,"Container");class Ya extends Sr{constructor(e,i=e){super(Dt("defs",e),i)}flatten(){return this}ungroup(){return this}}vt(Ya,"Defs");class Gr extends fr{}function Oh(s){return this.attr("rx",s)}function Nh(s){return this.attr("ry",s)}function pv(s){return s==null?this.cx()-this.rx():this.cx(s+this.rx())}function fv(s){return s==null?this.cy()-this.ry():this.cy(s+this.ry())}function mv(s){return this.attr("cx",s)}function vv(s){return this.attr("cy",s)}function bv(s){return s==null?2*this.rx():this.rx(new at(s).divide(2))}function wv(s){return s==null?2*this.ry():this.ry(new at(s).divide(2))}vt(Gr,"Shape");var Fj=Object.freeze({__proto__:null,cx:mv,cy:vv,height:wv,rx:Oh,ry:Nh,width:bv,x:pv,y:fv});class Lo extends Gr{constructor(e,i=e){super(Dt("ellipse",e),i)}size(e,i){const t=ku(this,e,i);return this.rx(new at(t.width).divide(2)).ry(new at(t.height).divide(2))}}Qe(Lo,Fj),ct("Container",{ellipse:jt(function(s=0,e=s){return this.put(new Lo).size(s,e).move(0,0)})}),vt(Lo,"Ellipse");class yv extends w0{constructor(e=ft.document.createDocumentFragment()){super(e)}xml(e,i,t){if(typeof e=="boolean"&&(t=i,i=e,e=null),e==null||typeof e=="function"){const r=new w0(kn("wrapper",t));return r.add(this.node.cloneNode(!0)),r.xml(!1,t)}return super.xml(e,!1,t)}}function xv(s,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new at(s),fy:new at(e)}):this.attr({x1:new at(s),y1:new at(e)})}function Cv(s,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new at(s),cy:new at(e)}):this.attr({x2:new at(s),y2:new at(e)})}vt(yv,"Fragment");var pj=Object.freeze({__proto__:null,from:xv,to:Cv});class dn extends Sr{constructor(e,i){super(Dt(e+"Gradient",typeof e=="string"?null:e),i)}attr(e,i,t){return e==="transform"&&(e="gradientTransform"),super.attr(e,i,t)}bbox(){return new Vt}targets(){return _s("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Qe(dn,pj),ct({Container:{gradient(...s){return this.defs().gradient(...s)}},Defs:{gradient:jt(function(s,e){return this.put(new dn(s)).update(e)})}}),vt(dn,"Gradient");class Sn extends Sr{constructor(e,i=e){super(Dt("pattern",e),i)}attr(e,i,t){return e==="transform"&&(e="patternTransform"),super.attr(e,i,t)}bbox(){return new Vt}targets(){return _s("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}ct({Container:{pattern(...s){return this.defs().pattern(...s)}},Defs:{pattern:jt(function(s,e,i){return this.put(new Sn).update(i).attr({x:0,y:0,width:s,height:e,patternUnits:"userSpaceOnUse"})})}}),vt(Sn,"Pattern");let To=class extends Gr{constructor(s,e=s){super(Dt("image",s),e)}load(s,e){if(!s)return this;const i=new ft.window.Image;return qi(i,"load",function(t){const r=this.parent(Sn);this.width()===0&&this.height()===0&&this.size(i.width,i.height),r instanceof Sn&&r.width()===0&&r.height()===0&&r.size(this.width(),this.height()),typeof e=="function"&&e.call(this,t)},this),qi(i,"load error",function(){si(i)}),this.attr("href",i.src=s,Su)}};var jg;jg=function(s,e,i){return s!=="fill"&&s!=="stroke"||nj.test(e)&&(e=i.root().defs().image(e)),e instanceof To&&(e=i.root().defs().pattern(0,0,t=>{t.add(e)})),e},Fv.push(jg),ct({Container:{image:jt(function(s,e){return this.put(new To).size(0,0).load(s,e)})}}),vt(To,"Image");class y0 extends ys{bbox(){let e=-1/0,i=-1/0,t=1/0,r=1/0;return this.forEach(function(u){e=Math.max(u[0],e),i=Math.max(u[1],i),t=Math.min(u[0],t),r=Math.min(u[1],r)}),new Vt(t,r,e-t,i-r)}move(e,i){const t=this.bbox();if(e-=t.x,i-=t.y,!isNaN(e)&&!isNaN(i))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+e,this[r][1]+i];return this}parse(e=[0,0]){const i=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(e0).map(parseFloat)).length%2!=0&&e.pop();for(let t=0,r=e.length;t<r;t+=2)i.push([e[t],e[t+1]]);return i}size(e,i){let t;const r=this.bbox();for(t=this.length-1;t>=0;t--)r.width&&(this[t][0]=(this[t][0]-r.x)*e/r.width+r.x),r.height&&(this[t][1]=(this[t][1]-r.y)*i/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let i=0,t=this.length;i<t;i++)e.push(this[i].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){Ke.isMatrixLike(e)||(e=new Ke(e));for(let i=this.length;i--;){const[t,r]=this[i];this[i][0]=e.a*t+e.c*r+e.e,this[i][1]=e.b*t+e.d*r+e.f}return this}}const fj=y0;var Wh=Object.freeze({__proto__:null,MorphArray:fj,height:function(s){const e=this.bbox();return s==null?e.height:this.size(e.width,s)},width:function(s){const e=this.bbox();return s==null?e.width:this.size(s,e.height)},x:function(s){return s==null?this.bbox().x:this.move(s,this.bbox().y)},y:function(s){return s==null?this.bbox().y:this.move(this.bbox().x,s)}});let as=class extends Gr{constructor(s,e=s){super(Dt("line",s),e)}array(){return new y0([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(s,e){return this.attr(this.array().move(s,e).toLine())}plot(s,e,i,t){return s==null?this.array():(s=e!==void 0?{x1:s,y1:e,x2:i,y2:t}:new y0(s).toLine(),this.attr(s))}size(s,e){const i=ku(this,s,e);return this.attr(this.array().size(i.width,i.height).toLine())}};Qe(as,Wh),ct({Container:{line:jt(function(...s){return as.prototype.plot.apply(this.put(new as),s[0]!=null?s:[0,0,0,0])})}}),vt(as,"Line");let Po=class extends Sr{constructor(s,e=s){super(Dt("marker",s),e)}height(s){return this.attr("markerHeight",s)}orient(s){return this.attr("orient",s)}ref(s,e){return this.attr("refX",s).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(s){return this.clear(),typeof s=="function"&&s.call(this,this),this}width(s){return this.attr("markerWidth",s)}};function Ks(s,e){return function(i){return i==null?this[s]:(this[s]=i,e&&e.call(this),this)}}ct({Container:{marker(...s){return this.defs().marker(...s)}},Defs:{marker:jt(function(s,e,i){return this.put(new Po).size(s,e).ref(s/2,e/2).viewbox(0,0,s,e).attr("orient","auto").update(i)})},marker:{marker(s,e,i,t){let r=["marker"];return s!=="all"&&r.push(s),r=r.join("-"),s=arguments[1]instanceof Po?arguments[1]:this.defs().marker(e,i,t),this.attr(r,s)}}}),vt(Po,"Marker");const mj={"-":function(s){return s},"<>":function(s){return-Math.cos(s*Math.PI)/2+.5},">":function(s){return Math.sin(s*Math.PI/2)},"<":function(s){return 1-Math.cos(s*Math.PI/2)},bezier:function(s,e,i,t){return function(r){return r<0?s>0?e/s*r:i>0?t/i*r:0:r>1?i<1?(1-t)/(1-i)*r+(t-i)/(1-i):s<1?(1-e)/(1-s)*r+(e-s)/(1-s):1:3*r*(1-r)**2*e+3*r**2*(1-r)*t+r**3}},steps:function(s,e="end"){e=e.split("-").reverse()[0];let i=s;return e==="none"?--i:e==="both"&&++i,(t,r=!1)=>{let u=Math.floor(t*s);const n=t*u%1==0;return e!=="start"&&e!=="both"||++u,r&&n&&--u,t>=0&&u<0&&(u=0),t<=1&&u>i&&(u=i),u/i}}};class zh{done(){return!1}}class Yc extends zh{constructor(e=cj){super(),this.ease=mj[e]||e}step(e,i,t){return typeof e!="number"?t<1?e:i:e+(i-e)*this.ease(t)}}class ia extends zh{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,i,t,r){return this.stepper(e,i,t,r)}}function Dg(){const s=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,t=Math.log(e/100+1e-10),r=-t/Math.sqrt(i*i+t*t),u=3.9/(r*s);this.d=2*r*u,this.k=u*u}Qe(class extends ia{constructor(s=500,e=0){super(),this.duration(s).overshoot(e)}step(s,e,i,t){if(typeof s=="string")return s;if(t.done=i===1/0,i===1/0)return e;if(i===0)return s;i>100&&(i=16),i/=1e3;const r=t.velocity||0,u=-this.d*r-this.k*(s-e),n=s+r*i+u*i*i/2;return t.velocity=r+u*i,t.done=Math.abs(e-n)+Math.abs(r)<.002,t.done?e:n}},{duration:Ks("_duration",Dg),overshoot:Ks("_overshoot",Dg)});Qe(class extends ia{constructor(s=.1,e=.01,i=0,t=1e3){super(),this.p(s).i(e).d(i).windup(t)}step(s,e,i,t){if(typeof s=="string")return s;if(t.done=i===1/0,i===1/0)return e;if(i===0)return s;const r=e-s;let u=(t.integral||0)+r*i;const n=(r-(t.error||0))/i,a=this._windup;return a!==!1&&(u=Math.max(-a,Math.min(u,a))),t.error=r,t.integral=u,t.done=Math.abs(r)<.001,t.done?e:s+(this.P*r+this.I*u+this.D*n)}},{windup:Ks("_windup"),p:Ks("P"),i:Ks("I"),d:Ks("D")});const vj={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Vc={M:function(s,e,i){return e.x=i.x=s[0],e.y=i.y=s[1],["M",e.x,e.y]},L:function(s,e){return e.x=s[0],e.y=s[1],["L",s[0],s[1]]},H:function(s,e){return e.x=s[0],["H",s[0]]},V:function(s,e){return e.y=s[0],["V",s[0]]},C:function(s,e){return e.x=s[4],e.y=s[5],["C",s[0],s[1],s[2],s[3],s[4],s[5]]},S:function(s,e){return e.x=s[2],e.y=s[3],["S",s[0],s[1],s[2],s[3]]},Q:function(s,e){return e.x=s[2],e.y=s[3],["Q",s[0],s[1],s[2],s[3]]},T:function(s,e){return e.x=s[0],e.y=s[1],["T",s[0],s[1]]},Z:function(s,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(s,e){return e.x=s[5],e.y=s[6],["A",s[0],s[1],s[2],s[3],s[4],s[5],s[6]]}},Gl="mlhvqtcsaz".split("");for(let s=0,e=Gl.length;s<e;++s)Vc[Gl[s]]=function(i){return function(t,r,u){if(i==="H")t[0]=t[0]+r.x;else if(i==="V")t[0]=t[0]+r.y;else if(i==="A")t[5]=t[5]+r.x,t[6]=t[6]+r.y;else for(let n=0,a=t.length;n<a;++n)t[n]=t[n]+(n%2?r.y:r.x);return Vc[i](t,r,u)}}(Gl[s].toUpperCase());function Xc(s){return s.segment.length&&s.segment.length-1===vj[s.segment[0].toUpperCase()]}function bj(s,e){s.inNumber&&G0(s,!1);const i=Rh.test(e);if(i)s.segment=[e];else{const t=s.lastCommand,r=t.toLowerCase(),u=t===r;s.segment=[r==="m"?u?"l":"L":t]}return s.inSegment=!0,s.lastCommand=s.segment[0],i}function G0(s,e){if(!s.inNumber)throw new Error("Parser Error");s.number&&s.segment.push(parseFloat(s.number)),s.inNumber=e,s.number="",s.pointSeen=!1,s.hasExponent=!1,Xc(s)&&Gc(s)}function Gc(s){s.inSegment=!1,s.absolute&&(s.segment=function(e){const i=e.segment[0];return Vc[i](e.segment.slice(1),e.p,e.p0)}(s)),s.segments.push(s.segment)}function wj(s){if(!s.segment.length)return!1;const e=s.segment[0].toUpperCase()==="A",i=s.segment.length;return e&&(i===4||i===5)}function yj(s){return s.lastToken.toUpperCase()==="E"}const xj=new Set([" ",",","	",`
`,"\r","\f"]);class fi extends ys{bbox(){return h0().path.setAttribute("d",this.toString()),new Vt(h0.nodes.path.getBBox())}move(e,i){const t=this.bbox();if(e-=t.x,i-=t.y,!isNaN(e)&&!isNaN(i))for(let r,u=this.length-1;u>=0;u--)r=this[u][0],r==="M"||r==="L"||r==="T"?(this[u][1]+=e,this[u][2]+=i):r==="H"?this[u][1]+=e:r==="V"?this[u][1]+=i:r==="C"||r==="S"||r==="Q"?(this[u][1]+=e,this[u][2]+=i,this[u][3]+=e,this[u][4]+=i,r==="C"&&(this[u][5]+=e,this[u][6]+=i)):r==="A"&&(this[u][6]+=e,this[u][7]+=i);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(i,t=!0){let r=0,u="";const n={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:t,p0:new wt,p:new wt};for(;n.lastToken=u,u=i.charAt(r++);)if(n.inSegment||!bj(n,u))if(u!==".")if(isNaN(parseInt(u)))if(xj.has(u))n.inNumber&&G0(n,!1);else if(u!=="-"&&u!=="+")if(u.toUpperCase()!=="E"){if(Rh.test(u)){if(n.inNumber)G0(n,!1);else{if(!Xc(n))throw new Error("parser Error");Gc(n)}--r}}else n.number+=u,n.hasExponent=!0;else{if(n.inNumber&&!yj(n)){G0(n,!1),--r;continue}n.number+=u,n.inNumber=!0}else{if(n.number==="0"||wj(n)){n.inNumber=!0,n.number=u,G0(n,!0);continue}n.inNumber=!0,n.number+=u}else{if(n.pointSeen||n.hasExponent){G0(n,!1),--r;continue}n.inNumber=!0,n.pointSeen=!0,n.number+=u}return n.inNumber&&G0(n,!1),n.inSegment&&Xc(n)&&Gc(n),n.segments}(e)}size(e,i){const t=this.bbox();let r,u;for(t.width=t.width===0?1:t.width,t.height=t.height===0?1:t.height,r=this.length-1;r>=0;r--)u=this[r][0],u==="M"||u==="L"||u==="T"?(this[r][1]=(this[r][1]-t.x)*e/t.width+t.x,this[r][2]=(this[r][2]-t.y)*i/t.height+t.y):u==="H"?this[r][1]=(this[r][1]-t.x)*e/t.width+t.x:u==="V"?this[r][1]=(this[r][1]-t.y)*i/t.height+t.y:u==="C"||u==="S"||u==="Q"?(this[r][1]=(this[r][1]-t.x)*e/t.width+t.x,this[r][2]=(this[r][2]-t.y)*i/t.height+t.y,this[r][3]=(this[r][3]-t.x)*e/t.width+t.x,this[r][4]=(this[r][4]-t.y)*i/t.height+t.y,u==="C"&&(this[r][5]=(this[r][5]-t.x)*e/t.width+t.x,this[r][6]=(this[r][6]-t.y)*i/t.height+t.y)):u==="A"&&(this[r][1]=this[r][1]*e/t.width,this[r][2]=this[r][2]*i/t.height,this[r][6]=(this[r][6]-t.x)*e/t.width+t.x,this[r][7]=(this[r][7]-t.y)*i/t.height+t.y);return this}toString(){return function(e){let i="";for(let t=0,r=e.length;t<r;t++)i+=e[t][0],e[t][1]!=null&&(i+=e[t][1],e[t][2]!=null&&(i+=" ",i+=e[t][2],e[t][3]!=null&&(i+=" ",i+=e[t][3],i+=" ",i+=e[t][4],e[t][5]!=null&&(i+=" ",i+=e[t][5],i+=" ",i+=e[t][6],e[t][7]!=null&&(i+=" ",i+=e[t][7])))));return i+" "}(this)}}const Ev=s=>{const e=typeof s;return e==="number"?at:e==="string"?Et.isColor(s)?Et:e0.test(s)?Rh.test(s)?fi:ys:cv.test(s)?at:qc:Kc.indexOf(s.constructor)>-1?s.constructor:Array.isArray(s)?ys:e==="object"?jn:qc};class q0{constructor(e){this._stepper=e||new Yc("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,i){return e&&i},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(Ev(e));let i=new this._type(e);return this._type===Et&&(i=this._to?i[this._to[4]]():this._from?i[this._from[4]]():i),this._type===jn&&(i=this._to?i.align(this._to):this._from?i.align(this._from):i),i=i.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(i.length)).map(Object).map(function(t){return t.done=!0,t}),i}}class qc{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class Un{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,Un.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}Un.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Cj=(s,e)=>s[0]<e[0]?-1:s[0]>e[0]?1:0;class jn{constructor(...e){this.init(...e)}align(e){const i=this.values;for(let t=0,r=i.length;t<r;++t){if(i[t+1]===e[t+1]){if(i[t+1]===Et&&e[t+7]!==i[t+7]){const a=e[t+7],o=new Et(this.values.splice(t+3,5))[a]().toArray();this.values.splice(t+3,0,...o)}t+=i[t+2]+2;continue}if(!e[t+1])return this;const u=new e[t+1]().toArray(),n=i[t+2]+3;i.splice(t,n,e[t],e[t+1],e[t+2],...u),t+=i[t+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const i=[];for(const t in e){const r=Ev(e[t]),u=new r(e[t]).toArray();i.push([t,r,u.length,...u])}return i.sort(Cj),this.values=i.reduce((t,r)=>t.concat(r),[]),this}toArray(){return this.values}valueOf(){const e={},i=this.values;for(;i.length;){const t=i.shift(),r=i.shift(),u=i.shift(),n=i.splice(0,u);e[t]=new r(n)}return e}}const Kc=[qc,Un,jn];class ru extends Gr{constructor(e,i=e){super(Dt("path",e),i)}array(){return this._array||(this._array=new fi(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,i){return this.attr("d",this.array().move(e,i))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new fi(e))}size(e,i){const t=ku(this,e,i);return this.attr("d",this.array().size(t.width,t.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}ru.prototype.MorphArray=fi,ct({Container:{path:jt(function(s){return this.put(new ru).plot(s||new fi)})}}),vt(ru,"Path");var Av=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new y0(this.attr("points")))},clear:function(){return delete this._array,this},move:function(s,e){return this.attr("points",this.array().move(s,e))},plot:function(s){return s==null?this.array():this.clear().attr("points",typeof s=="string"?s:this._array=new y0(s))},size:function(s,e){const i=ku(this,s,e);return this.attr("points",this.array().size(i.width,i.height))}});class ls extends Gr{constructor(e,i=e){super(Dt("polygon",e),i)}}ct({Container:{polygon:jt(function(s){return this.put(new ls).plot(s||new y0)})}}),Qe(ls,Wh),Qe(ls,Av),vt(ls,"Polygon");class cs extends Gr{constructor(e,i=e){super(Dt("polyline",e),i)}}ct({Container:{polyline:jt(function(s){return this.put(new cs).plot(s||new y0)})}}),Qe(cs,Wh),Qe(cs,Av),vt(cs,"Polyline");class $o extends Gr{constructor(e,i=e){super(Dt("rect",e),i)}}Qe($o,{rx:Oh,ry:Nh}),ct({Container:{rect:jt(function(s,e){return this.put(new $o).size(s,e)})}}),vt($o,"Rect");class ql{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const i=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(i.prev=this._last,this._last.next=i,this._last=i):(this._last=i,this._first=i),i}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const xt={nextDraw:null,frames:new ql,timeouts:new ql,immediates:new ql,timer:()=>ft.window.performance||ft.window.Date,transforms:[],frame(s){const e=xt.frames.push({run:s});return xt.nextDraw===null&&(xt.nextDraw=ft.window.requestAnimationFrame(xt._draw)),e},timeout(s,e){e=e||0;const i=xt.timer().now()+e,t=xt.timeouts.push({run:s,time:i});return xt.nextDraw===null&&(xt.nextDraw=ft.window.requestAnimationFrame(xt._draw)),t},immediate(s){const e=xt.immediates.push(s);return xt.nextDraw===null&&(xt.nextDraw=ft.window.requestAnimationFrame(xt._draw)),e},cancelFrame(s){s!=null&&xt.frames.remove(s)},clearTimeout(s){s!=null&&xt.timeouts.remove(s)},cancelImmediate(s){s!=null&&xt.immediates.remove(s)},_draw(s){let e=null;const i=xt.timeouts.last();for(;(e=xt.timeouts.shift())&&(s>=e.time?e.run():xt.timeouts.push(e),e!==i););let t=null;const r=xt.frames.last();for(;t!==r&&(t=xt.frames.shift());)t.run(s);let u=null;for(;u=xt.immediates.shift();)u();xt.nextDraw=xt.timeouts.first()||xt.frames.first()?ft.window.requestAnimationFrame(xt._draw):null}},Ej=function(s){const e=s.start,i=s.runner.duration();return{start:e,duration:i,end:e+i,runner:s.runner}},Aj=function(){const s=ft.window;return(s.performance||s.Date).now()};class kv extends Hn{constructor(e=Aj){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),i=e?e.runner.duration():0;return(e?e.start:this._time)+i}getEndTimeOfTimeline(){const e=this._runners.map(i=>i.start+i.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const i=this.speed();if(e==null)return this.speed(-i);const t=Math.abs(i);return this.speed(e?-t:t)}schedule(e,i,t){if(e==null)return this._runners.map(Ej);let r=0;const u=this.getEndTime();if(i=i||0,t==null||t==="last"||t==="after")r=u;else if(t==="absolute"||t==="start")r=i,i=0;else if(t==="now")r=this._time;else if(t==="relative"){const o=this.getRunnerInfoById(e.id);o&&(r=o.start+i,i=0)}else{if(t!=="with-last")throw new Error('Invalid value for the "when" parameter');{const o=this.getLastRunnerInfo();r=o?o.start:this._time}}e.unschedule(),e.timeline(this);const n=e.persist(),a={persist:n===null?this._persist:n,start:r+i,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((o,h)=>o.start-h.start),this._runnerIds=this._runners.map(o=>o.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const i=this._runnerIds.indexOf(e.id);return i<0||(this._runners.splice(i,1),this._runnerIds.splice(i,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return xt.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=xt.frame(this._step)),this)}_stepFn(e=!1){const i=this._timeSource();let t=i-this._lastSourceTime;e&&(t=0);const r=this._speed*t+(this._time-this._lastStepTime);this._lastSourceTime=i,e||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let n=this._runners.length;n--;){const a=this._runners[n],o=a.runner;this._time-a.start<=0&&o.reset()}let u=!1;for(let n=0,a=this._runners.length;n<a;n++){const o=this._runners[n],h=o.runner;let g=r;const l=this._time-o.start;if(l<=0){u=!0;continue}l<g&&(g=l),h.active()&&(h.step(g).done?o.persist!==!0&&h.duration()-h.time()+this._time+o.persist<this._time&&(h.unschedule(),--n,--a):u=!0)}return u&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}ct({Element:{timeline:function(s){return s==null?(this._timeline=this._timeline||new kv,this._timeline):(this._timeline=s,this)}}});class Ur extends Hn{constructor(e){super(),this.id=Ur.id++,e=typeof(e=e??Xl)=="function"?new ia(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof ia,this._stepper=this._isDeclarative?e:new Yc,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Ke,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,i,t){let r=1,u=!1,n=0;return i=i??dj,t=t||"last",typeof(e=e??Xl)!="object"||e instanceof zh||(i=e.delay??i,t=e.when??t,u=e.swing||u,r=e.times??r,n=e.wait??n,e=e.duration??Xl),{duration:e,delay:i,swing:u,times:r,wait:n,when:t}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,i,t){const r=Ur.sanitise(e,i,t),u=new Ur(r.duration);return this._timeline&&u.timeline(this._timeline),this._element&&u.element(this._element),u.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Ke,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new Yc(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,i,t){return typeof e=="object"&&(i=e.swing,t=e.wait,e=e.times),this._times=e||1/0,this._swing=i||!1,this._wait=t||0,this._times===!0&&(this._times=1/0),this}loops(e){const i=this._duration+this._wait;if(e==null){const u=Math.floor(this._time/i),n=(this._time-u*i)/this._duration;return Math.min(u+n,this._times)}const t=e%1,r=i*Math.floor(e)+this._duration*t;return this.time(r)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const i=this._time,t=this._duration,r=this._wait,u=this._times,n=this._swing,a=this._reverse;let o;if(e==null){const l=function(d){const F=n*Math.floor(d%(2*(r+t))/(r+t)),p=F&&!a||!F&&a,f=Math.pow(-1,p)*(d%(r+t))/t+p;return Math.max(Math.min(f,1),0)},c=u*(r+t)-r;return o=i<=0?Math.round(l(1e-5)):i<c?l(i):Math.round(l(c-1e-5)),o}const h=Math.floor(this.loops()),g=n&&h%2==0;return o=h+(g&&!a||a&&g?e:1-e),this.loops(o)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,i,t,r){return this._queue.push({initialiser:e||Sg,runner:i||Sg,retarget:t,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,i,t){if(e instanceof kv||(t=i,i=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,i,t),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const i=this.position(),t=this._lastPosition!==i&&this._time>=0;this._lastPosition=i;const r=this.duration(),u=this._lastTime<=0&&this._time>0,n=this._lastTime<r&&this._time>=r;this._lastTime=this._time,u&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!n&&this._time>=r,this._reseted=!1;let o=!1;return(t||a)&&(this._initialise(t),this.transforms=new Ke,o=this._run(a?e:i),this.fire("step",this)),this.done=this.done||o&&a,n&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const i=e-this._time;return this.step(i),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let i=0,t=this._queue.length;i<t;++i){const r=this._queue[i],u=this._isDeclarative||!r.initialised&&e;e=!r.finished,u&&e&&(r.initialiser.call(this),r.initialised=!0)}}_rememberMorpher(e,i){if(this._history[e]={morpher:i,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(e){let i=!0;for(let t=0,r=this._queue.length;t<r;++t){const u=this._queue[t],n=u.runner.call(this,e);u.finished=u.finished||n===!0,i=i&&u.finished}return i}_tryRetarget(e,i,t){if(this._history[e]){if(!this._history[e].caller.initialised){const u=this._queue.indexOf(this._history[e].caller);return this._queue.splice(u,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,i,t):this._history[e].morpher.to(i),this._history[e].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Ur.id=0;class sa{constructor(e=new Ke,i=-1,t=!0){this.transforms=e,this.id=i,this.done=t}clearTransformsFromQueue(){}}Qe([Ur,sa],{mergeWith(s){return new sa(s.transforms.lmultiply(this.transforms),s.id)}});const Sv=(s,e)=>s.lmultiplyO(e),jv=s=>s.transforms;function kj(){const s=this._transformationRunners.runners.map(jv).reduce(Sv,new Ke);this.transform(s),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class Sj{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const i=e.id+1;return this.runners.push(e),this.ids.push(i),this}clearBefore(e){const i=this.ids.indexOf(e+1)||1;return this.ids.splice(0,i,0),this.runners.splice(0,i,new sa).forEach(t=>t.clearTransformsFromQueue()),this}edit(e,i){const t=this.ids.indexOf(e+1);return this.ids.splice(t,1,e+1),this.runners.splice(t,1,i),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let i=0;i<this.runners.length;++i){const t=this.runners[i];if(e&&t.done&&e.done&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(t.id);const r=t.mergeWith(e);this.edit(e.id,r),e=r,--i}else e=t}return this}remove(e){const i=this.ids.indexOf(e+1);return this.ids.splice(i,1),this.runners.splice(i,1),this}}ct({Element:{animate(s,e,i){const t=Ur.sanitise(s,e,i),r=this.timeline();return new Ur(t.duration).loop(t).element(this).timeline(r.play()).schedule(t.delay,t.when)},delay(s,e){return this.animate(0,s,e)},_clearTransformRunnersBefore(s){this._transformationRunners.clearBefore(s.id)},_currentTransform(s){return this._transformationRunners.runners.filter(e=>e.id<=s.id).map(jv).reduce(Sv,new Ke)},_addRunner(s){this._transformationRunners.add(s),xt.cancelImmediate(this._frameId),this._frameId=xt.immediate(kj.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new Sj().add(new sa(new Ke(this))))}}});Qe(Ur,{attr(s,e){return this.styleAttr("attr",s,e)},css(s,e){return this.styleAttr("css",s,e)},styleAttr(s,e,i){if(typeof e=="string")return this.styleAttr(s,{[e]:i});let t=e;if(this._tryRetarget(s,t))return this;let r=new q0(this._stepper).to(t),u=Object.keys(t);return this.queue(function(){r=r.from(this.element()[s](u))},function(n){return this.element()[s](r.at(n).valueOf()),r.done()},function(n){const a=Object.keys(n),o=(h=u,a.filter(l=>!h.includes(l)));var h;if(o.length){const l=this.element()[s](o),c=new jn(r.from()).valueOf();Object.assign(c,l),r.from(c)}const g=new jn(r.to()).valueOf();Object.assign(g,n),r.to(g),u=a,t=n}),this._rememberMorpher(s,r),this},zoom(s,e){if(this._tryRetarget("zoom",s,e))return this;let i=new q0(this._stepper).to(new at(s));return this.queue(function(){i=i.from(this.element().zoom())},function(t){return this.element().zoom(i.at(t),e),i.done()},function(t,r){e=r,i.to(t)}),this._rememberMorpher("zoom",i),this},transform(s,e,i){if(e=s.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",s))return this;const t=Ke.isMatrixLike(s);i=s.affine!=null?s.affine:i??!t;const r=new q0(this._stepper).type(i?Un:Ke);let u,n,a,o,h;return this.queue(function(){n=n||this.element(),u=u||Hc(s,n),h=new Ke(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)},function(g){e||this.clearTransform();const{x:l,y:c}=new wt(u).transform(n._currentTransform(this));let d=new Ke({...s,origin:[l,c]}),F=this._isDeclarative&&a?a:h;if(i){d=d.decompose(l,c),F=F.decompose(l,c);const f=d.rotate,m=F.rotate,v=[f-360,f,f+360],w=v.map(b=>Math.abs(b-m)),x=Math.min(...w),A=w.indexOf(x);d.rotate=v[A]}e&&(t||(d.rotate=s.rotate||0),this._isDeclarative&&o&&(F.rotate=o)),r.from(F),r.to(d);const p=r.at(g);return o=p.rotate,a=new Ke(p),this.addTransform(a),n._addRunner(this),r.done()},function(g){(g.origin||"center").toString()!==(s.origin||"center").toString()&&(u=Hc(g,n)),s={...g,origin:u}},!0),this._isDeclarative&&this._rememberMorpher("transform",r),this},x(s){return this._queueNumber("x",s)},y(s){return this._queueNumber("y",s)},ax(s){return this._queueNumber("ax",s)},ay(s){return this._queueNumber("ay",s)},dx(s=0){return this._queueNumberDelta("x",s)},dy(s=0){return this._queueNumberDelta("y",s)},dmove(s,e){return this.dx(s).dy(e)},_queueNumberDelta(s,e){if(e=new at(e),this._tryRetarget(s,e))return this;const i=new q0(this._stepper).to(e);let t=null;return this.queue(function(){t=this.element()[s](),i.from(t),i.to(t+e)},function(r){return this.element()[s](i.at(r)),i.done()},function(r){i.to(t+new at(r))}),this._rememberMorpher(s,i),this},_queueObject(s,e){if(this._tryRetarget(s,e))return this;const i=new q0(this._stepper).to(e);return this.queue(function(){i.from(this.element()[s]())},function(t){return this.element()[s](i.at(t)),i.done()}),this._rememberMorpher(s,i),this},_queueNumber(s,e){return this._queueObject(s,new at(e))},cx(s){return this._queueNumber("cx",s)},cy(s){return this._queueNumber("cy",s)},move(s,e){return this.x(s).y(e)},amove(s,e){return this.ax(s).ay(e)},center(s,e){return this.cx(s).cy(e)},size(s,e){let i;return s&&e||(i=this._element.bbox()),s||(s=i.width/i.height*e),e||(e=i.height/i.width*s),this.width(s).height(e)},width(s){return this._queueNumber("width",s)},height(s){return this._queueNumber("height",s)},plot(s,e,i,t){if(arguments.length===4)return this.plot([s,e,i,t]);if(this._tryRetarget("plot",s))return this;const r=new q0(this._stepper).type(this._element.MorphArray).to(s);return this.queue(function(){r.from(this._element.array())},function(u){return this._element.plot(r.at(u)),r.done()}),this._rememberMorpher("plot",r),this},leading(s){return this._queueNumber("leading",s)},viewbox(s,e,i,t){return this._queueObject("viewbox",new Vt(s,e,i,t))},update(s){return typeof s!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(s.opacity!=null&&this.attr("stop-opacity",s.opacity),s.color!=null&&this.attr("stop-color",s.color),s.offset!=null&&this.attr("offset",s.offset),this)}}),Qe(Ur,{rx:Oh,ry:Nh,from:xv,to:Cv}),vt(Ur,"Runner");class Jc extends Sr{constructor(e,i=e){super(Dt("svg",e),i),this.namespace()}defs(){return this.isRoot()?ri(this.node.querySelector("defs"))||this.put(new Ya):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof ft.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:Ph,version:"1.1"}).attr("xmlns:xlink",Su,Ul):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ul).attr("xmlns:svgjs",null,Ul)}root(){return this.isRoot()?this:super.root()}}ct({Container:{nested:jt(function(){return this.put(new Jc)})}}),vt(Jc,"Svg",!0);let Zc=class extends Sr{constructor(s,e=s){super(Dt("symbol",s),e)}};ct({Container:{symbol:jt(function(){return this.put(new Zc)})}}),vt(Zc,"Symbol");var Dv=Object.freeze({__proto__:null,amove:function(s,e){return this.ax(s).ay(e)},ax:function(s){return this.attr("x",s)},ay:function(s){return this.attr("y",s)},build:function(s){return this._build=!!s,this},center:function(s,e,i=this.bbox()){return this.cx(s,i).cy(e,i)},cx:function(s,e=this.bbox()){return s==null?e.cx:this.attr("x",this.attr("x")+s-e.cx)},cy:function(s,e=this.bbox()){return s==null?e.cy:this.attr("y",this.attr("y")+s-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(s,e,i=this.bbox()){return this.x(s,i).y(e,i)},plain:function(s){return this._build===!1&&this.clear(),this.node.appendChild(ft.document.createTextNode(s)),this},x:function(s,e=this.bbox()){return s==null?e.x:this.attr("x",this.attr("x")+s-e.x)},y:function(s,e=this.bbox()){return s==null?e.y:this.attr("y",this.attr("y")+s-e.y)}});class mi extends Gr{constructor(e,i=e){super(Dt("text",e),i),this.dom.leading=this.dom.leading??new at(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new at(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const i=this;let t=0;const r=this.dom.leading;this.each(function(u){if(Uc(this.node))return;const n=ft.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=r*new at(n);this.dom.newLined&&(this.attr("x",i.attr("x")),this.text()===`
`?t+=a:(this.attr("dy",u?a+t:0),t=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new at(e.leading||1.3),this}writeDataToDom(){return ov(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const i=this.node.childNodes;let t=0;e="";for(let r=0,u=i.length;r<u;++r)i[r].nodeName==="textPath"||Uc(i[r])?r===0&&(t=r+1):(r!==t&&i[r].nodeType!==3&&ri(i[r]).dom.newLined===!0&&(e+=`
`),e+=i[r].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let i=0,t=(e=(e+"").split(`
`)).length;i<t;i++)this.newLine(e[i]);return this.build(!1).rebuild()}}Qe(mi,Dv),ct({Container:{text:jt(function(s=""){return this.put(new mi).text(s)}),plain:jt(function(s=""){return this.put(new mi).plain(s)})}}),vt(mi,"Text");class Io extends Gr{constructor(e,i=e){super(Dt("tspan",e),i),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof mi))return this;const i=e.index(this),t=ft.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=e.dom.leading*new at(t);return this.dy(i?r:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}Qe(Io,Dv),ct({Tspan:{tspan:jt(function(s=""){const e=new Io;return this._build||this.clear(),this.put(e).text(s)})},Text:{newLine:function(s=""){return this.tspan(s).newLine()}}}),vt(Io,"Tspan");class Kl extends Gr{constructor(e,i=e){super(Dt("circle",e),i)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new at(e).divide(2))}}Qe(Kl,{x:pv,y:fv,cx:mv,cy:vv,width:bv,height:wv}),ct({Container:{circle:jt(function(s=0){return this.put(new Kl).size(s).move(0,0)})}}),vt(Kl,"Circle");class Jl extends Sr{constructor(e,i=e){super(Dt("clipPath",e),i)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return _s("svg [clip-path*="+this.id()+"]")}}ct({Container:{clip:jt(function(){return this.defs().put(new Jl)})},Element:{clipper(){return this.reference("clip-path")},clipWith(s){const e=s instanceof Jl?s:this.parent().clip().add(s);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),vt(Jl,"ClipPath");class Mg extends fr{constructor(e,i=e){super(Dt("foreignObject",e),i)}}ct({Container:{foreignObject:jt(function(s,e){return this.put(new Mg).size(s,e)})}}),vt(Mg,"ForeignObject");var Mv=Object.freeze({__proto__:null,dmove:function(s,e){return this.children().forEach(i=>{let t;try{t=i.node instanceof zn().SVGSVGElement?new Vt(i.attr(["x","y","width","height"])):i.bbox()}catch{return}const r=new Ke(i),u=r.translate(s,e).transform(r.inverse()),n=new wt(t.x,t.y).transform(u);i.move(n.x,n.y)}),this},dx:function(s){return this.dmove(s,0)},dy:function(s){return this.dmove(0,s)},height:function(s,e=this.bbox()){return s==null?e.height:this.size(e.width,s,e)},move:function(s=0,e=0,i=this.bbox()){const t=s-i.x,r=e-i.y;return this.dmove(t,r)},size:function(s,e,i=this.bbox()){const t=ku(this,s,e,i),r=t.width/i.width,u=t.height/i.height;return this.children().forEach(n=>{const a=new wt(i).transform(new Ke(n).inverse());n.scale(r,u,a.x,a.y)}),this},width:function(s,e=this.bbox()){return s==null?e.width:this.size(s,e.height,e)},x:function(s,e=this.bbox()){return s==null?e.x:this.move(s,e.y,e)},y:function(s,e=this.bbox()){return s==null?e.y:this.move(e.x,s,e)}});class f0 extends Sr{constructor(e,i=e){super(Dt("g",e),i)}}Qe(f0,Mv),ct({Container:{group:jt(function(){return this.put(new f0)})}}),vt(f0,"G");class fo extends Sr{constructor(e,i=e){super(Dt("a",e),i)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Su)}}Qe(fo,Mv),ct({Container:{link:jt(function(s){return this.put(new fo).to(s)})},Element:{unlink(){const s=this.linker();if(!s)return this;const e=s.parent();if(!e)return this.remove();const i=e.index(s);return e.add(this,i),s.remove(),this},linkTo(s){let e=this.linker();return e||(e=new fo,this.wrap(e)),typeof s=="function"?s.call(e,e):e.to(s),this},linker(){const s=this.parent();return s&&s.node.nodeName.toLowerCase()==="a"?s:null}}}),vt(fo,"A");class Zl extends Sr{constructor(e,i=e){super(Dt("mask",e),i)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return _s("svg [mask*="+this.id()+"]")}}ct({Container:{mask:jt(function(){return this.defs().put(new Zl)})},Element:{masker(){return this.reference("mask")},maskWith(s){const e=s instanceof Zl?s:this.parent().mask().add(s);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),vt(Zl,"Mask");class _g extends fr{constructor(e,i=e){super(Dt("stop",e),i)}update(e){return(typeof e=="number"||e instanceof at)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new at(e.offset)),this}}ct({Gradient:{stop:function(s,e,i){return this.put(new _g).update(s,e,i)}}}),vt(_g,"Stop");class Ql extends fr{constructor(e,i=e){super(Dt("style",e),i)}addText(e=""){return this.node.textContent+=e,this}font(e,i,t={}){return this.rule("@font-face",{fontFamily:e,src:i,...t})}rule(e,i){return this.addText(function(t,r){if(!t)return"";if(!r)return t;let u=t+"{";for(const n in r)u+=n.replace(/([A-Z])/g,function(a,o){return"-"+o.toLowerCase()})+":"+r[n]+";";return u+="}",u}(e,i))}}ct("Dom",{style(s,e){return this.put(new Ql).rule(s,e)},fontface(s,e,i){return this.put(new Ql).font(s,e,i)}}),vt(Ql,"Style");class ec extends mi{constructor(e,i=e){super(Dt("textPath",e),i)}array(){const e=this.track();return e?e.array():null}plot(e){const i=this.track();let t=null;return i&&(t=i.plot(e)),e==null?t:this}track(){return this.reference("href")}}ct({Container:{textPath:jt(function(s,e){return s instanceof mi||(s=this.text(s)),s.path(e)})},Text:{path:jt(function(s,e=!0){const i=new ec;let t;if(s instanceof ru||(s=this.defs().path(s)),i.attr("href","#"+s,Su),e)for(;t=this.node.firstChild;)i.node.appendChild(t);return this.put(i)}),textPath(){return this.findOne("textPath")}},Path:{text:jt(function(s){return s instanceof mi||(s=new mi().addTo(this.parent()).text(s)),s.path(this)}),targets(){return _s("svg textPath").filter(s=>(s.attr("href")||"").includes(this.id()))}}}),ec.prototype.MorphArray=fi,vt(ec,"TextPath");class Lg extends Gr{constructor(e,i=e){super(Dt("use",e),i)}use(e,i){return this.attr("href",(i||"")+"#"+e,Su)}}ct({Container:{use:jt(function(s,e){return this.put(new Lg).use(s,e)})}}),vt(Lg,"Use");const jj=Cr;Qe([Jc,Zc,To,Sn,Po],_r("viewbox")),Qe([as,cs,ls,ru],_r("marker")),Qe(mi,_r("Text")),Qe(ru,_r("Path")),Qe(Ya,_r("Defs")),Qe([mi,Io],_r("Tspan")),Qe([$o,Lo,dn,Ur],_r("radius")),Qe(Hn,_r("EventTarget")),Qe(w0,_r("Dom")),Qe(fr,_r("Element")),Qe(Gr,_r("Shape")),Qe([Sr,yv],_r("Container")),Qe(dn,_r("Gradient")),Qe(Ur,_r("Runner")),ws.extend([...new Set(uv)]),function(s=[]){Kc.push(...[].concat(s))}([at,Et,Vt,Ke,ys,y0,fi,wt]),Qe(Kc,{to(s){return new q0().type(this.constructor).from(this.toArray()).to(s)},fromArray(s){return this.init(s),this},toConsumable(){return this.toArray()},morph(s,e,i,t,r){return this.fromArray(s.map(function(u,n){return t.step(u,e[n],i,r[n],r)}))}});class Tt extends fr{constructor(e){super(Dt("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,i){return!(e=super.put(e,i)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return _s('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class Hh extends fr{constructor(e,i){super(e,i),this.result(this.id())}in(e){if(e==null){const i=this.attr("in");return this.parent()&&this.parent().find(`[result="${i}"]`)[0]||i}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const Zr=s=>function(...e){for(let i=s.length;i--;)e[i]!=null&&this.attr(s[i],e[i])},Dj={blend:Zr(["in","in2","mode"]),colorMatrix:Zr(["type","values"]),composite:Zr(["in","in2","operator"]),convolveMatrix:function(s){s=new ys(s).toString(),this.attr({order:Math.sqrt(s.split(" ").length),kernelMatrix:s})},diffuseLighting:Zr(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Zr(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Zr(["in","dx","dy","stdDeviation"]),flood:Zr(["flood-color","flood-opacity"]),gaussianBlur:function(s=0,e=s){this.attr("stdDeviation",s+" "+e)},image:function(s){this.attr("href",s,Su)},morphology:Zr(["operator","radius"]),offset:Zr(["dx","dy"]),specularLighting:Zr(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Zr([]),turbulence:Zr(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(s=>{const e=Au(s),i=Dj[s];Tt[e+"Effect"]=class extends Hh{constructor(t){super(Dt("fe"+e,t),t)}update(t){return i.apply(this,t),this}},Tt.prototype[s]=jt(function(t,...r){const u=new Tt[e+"Effect"];return t==null?this.put(u):(typeof t=="function"?t.call(u,u):r.unshift(t),this.put(u).update(r))})}),Qe(Tt,{merge(s){const e=this.put(new Tt.MergeEffect);return typeof s=="function"?(s.call(e,e),e):((s instanceof Array?s:[...arguments]).forEach(i=>{i instanceof Tt.MergeNode?e.put(i):e.mergeNode(i)}),e)},componentTransfer(s={}){const e=this.put(new Tt.ComponentTransferEffect);if(typeof s=="function")return s.call(e,e),e;s.r||s.g||s.b||s.a||(s={r:s,g:s,b:s,a:s});for(const i in s)e.add(new Tt["Func"+i.toUpperCase()](s[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(s=>{const e=Au(s);Tt[e]=class extends Hh{constructor(i){super(Dt("fe"+e,i),i)}}});["funcR","funcG","funcB","funcA"].forEach(function(s){const e=Tt[Au(s)],i=jt(function(){return this.put(new e)});Tt.ComponentTransferEffect.prototype[s]=i});["distantLight","pointLight","spotLight"].forEach(s=>{const e=Tt[Au(s)],i=jt(function(){return this.put(new e)});Tt.DiffuseLightingEffect.prototype[s]=i,Tt.SpecularLightingEffect.prototype[s]=i}),Qe(Tt.MergeEffect,{mergeNode(s){return this.put(new Tt.MergeNode).attr("in",s)}}),Qe(Ya,{filter:function(s){const e=this.put(new Tt);return typeof s=="function"&&s.call(e,e),e}}),Qe(Sr,{filter:function(s){return this.defs().filter(s)}}),Qe(fr,{filterWith:function(s){const e=s instanceof Tt?s:this.defs().filter(s);return this.attr("filter",e)},unfilter:function(s){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Mj={blend:function(s,e){return this.parent()&&this.parent().blend(this,s,e)},colorMatrix:function(s,e){return this.parent()&&this.parent().colorMatrix(s,e).in(this)},componentTransfer:function(s){return this.parent()&&this.parent().componentTransfer(s).in(this)},composite:function(s,e){return this.parent()&&this.parent().composite(this,s,e)},convolveMatrix:function(s){return this.parent()&&this.parent().convolveMatrix(s).in(this)},diffuseLighting:function(s,e,i,t){return this.parent()&&this.parent().diffuseLighting(s,i,t).in(this)},displacementMap:function(s,e,i,t){return this.parent()&&this.parent().displacementMap(this,s,e,i,t)},dropShadow:function(s,e,i){return this.parent()&&this.parent().dropShadow(this,s,e,i).in(this)},flood:function(s,e){return this.parent()&&this.parent().flood(s,e)},gaussianBlur:function(s,e){return this.parent()&&this.parent().gaussianBlur(s,e).in(this)},image:function(s){return this.parent()&&this.parent().image(s)},merge:function(s){return s=s instanceof Array?s:[...s],this.parent()&&this.parent().merge(this,...s)},morphology:function(s,e){return this.parent()&&this.parent().morphology(s,e).in(this)},offset:function(s,e){return this.parent()&&this.parent().offset(s,e).in(this)},specularLighting:function(s,e,i,t,r){return this.parent()&&this.parent().specularLighting(s,i,t,r).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(s,e,i,t,r){return this.parent()&&this.parent().turbulence(s,e,i,t,r).in(this)}};Qe(Hh,Mj),Qe(Tt.MergeEffect,{in:function(s){return s instanceof Tt.MergeNode?this.add(s,0):this.add(new Tt.MergeNode().in(s),0),this}}),Qe([Tt.CompositeEffect,Tt.BlendEffect,Tt.DisplacementMapEffect],{in2:function(s){if(s==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",s)}}),Tt.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Fr=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"getDefaultFilter",value:function(e,i){var t=this.w;e.unfilter(!0),new Tt().size("120%","180%","-5%","-40%"),t.config.chart.dropShadow.enabled&&this.dropShadow(e,t.config.chart.dropShadow,i)}},{key:"applyFilter",value:function(e,i,t){var r,u=this,n=this.w;if(e.unfilter(!0),t!=="none"){var a,o,h=n.config.chart.dropShadow,g=t==="lighten"?2:.3;e.filterWith(function(l){l.colorMatrix({type:"matrix",values:`
          `.concat(g,` 0 0 0 0
          0 `).concat(g,` 0 0 0
          0 0 `).concat(g,` 0 0
          0 0 0 1 0
        `),in:"SourceGraphic",result:"brightness"}),h.enabled&&u.addShadow(l,i,h,"brightness")}),!h.noUserSpaceOnUse&&((a=e.filterer())===null||a===void 0||(o=a.node)===null||o===void 0||o.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((r=e.filterer())===null||r===void 0?void 0:r.node)}else this.getDefaultFilter(e,i)}},{key:"addShadow",value:function(e,i,t,r){var u,n=this.w,a=t.blur,o=t.top,h=t.left,g=t.color,l=t.opacity;if(g=Array.isArray(g)?g[i]:g,((u=n.config.chart.dropShadow.enabledOnSeries)===null||u===void 0?void 0:u.length)>0&&n.config.chart.dropShadow.enabledOnSeries.indexOf(i)===-1)return e;e.offset({in:r,dx:h,dy:o,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),e.flood({"flood-color":g,"flood-opacity":l,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",r])}},{key:"dropShadow",value:function(e,i){var t,r,u,n,a,o=this,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,g=this.w;return e.unfilter(!0),pe.isMsEdge()&&g.config.chart.type==="radialBar"||((t=g.config.chart.dropShadow.enabledOnSeries)===null||t===void 0?void 0:t.length)>0&&((u=g.config.chart.dropShadow.enabledOnSeries)===null||u===void 0?void 0:u.indexOf(h))===-1?e:(e.filterWith(function(l){o.addShadow(l,h,i,"SourceGraphic")}),i.noUserSpaceOnUse||(n=e.filterer())===null||n===void 0||(a=n.node)===null||a===void 0||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((r=e.filterer())===null||r===void 0?void 0:r.node),e)}},{key:"setSelectionFilter",value:function(e,i,t){var r=this.w;if(r.globals.selectedDataPoints[i]!==void 0&&r.globals.selectedDataPoints[i].indexOf(t)>-1){e.node.setAttribute("selected",!0);var u=r.config.states.active.filter;u!=="none"&&this.applyFilter(e,i,u.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(i){for(var t in i)i.hasOwnProperty(t)&&e.setAttribute(t,i[t])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),s}(),De=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"roundPathCorners",value:function(e,i){function t(k,C,D){var T=C.x-k.x,S=C.y-k.y,M=Math.sqrt(T*T+S*S);return r(k,C,Math.min(1,D/M))}function r(k,C,D){return{x:k.x+(C.x-k.x)*D,y:k.y+(C.y-k.y)*D}}function u(k,C){k.length>2&&(k[k.length-2]=C.x,k[k.length-1]=C.y)}function n(k){return{x:parseFloat(k[k.length-2]),y:parseFloat(k[k.length-1])}}e.indexOf("NaN")>-1&&(e="");var a=e.split(/[,\s]/).reduce(function(k,C){var D=C.match("([a-zA-Z])(.+)");return D?(k.push(D[1]),k.push(D[2])):k.push(C),k},[]).reduce(function(k,C){return parseFloat(C)==C&&k.length?k[k.length-1].push(C):k.push([C]),k},[]),o=[];if(a.length>1){var h=n(a[0]),g=null;a[a.length-1][0]=="Z"&&a[0].length>2&&(g=["L",h.x,h.y],a[a.length-1]=g),o.push(a[0]);for(var l=1;l<a.length;l++){var c=o[o.length-1],d=a[l],F=d==g?a[1]:a[l+1];if(F&&c&&c.length>2&&d[0]=="L"&&F.length>2&&F[0]=="L"){var p,f,m=n(c),v=n(d),w=n(F);p=t(v,m,i),f=t(v,w,i),u(d,p),d.origPoint=v,o.push(d);var x=r(p,v,.5),A=r(v,f,.5),b=["C",x.x,x.y,A.x,A.y,f.x,f.y];b.origPoint=v,o.push(b)}else o.push(d)}if(g){var y=n(o[o.length-1]);o.push(["Z"]),u(o[0],y)}}else o=a;return o.reduce(function(k,C){return k+C.join(" ")+" "},"")}},{key:"drawLine",value:function(e,i,t,r){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:i,x2:t,y2:r,stroke:u,"stroke-dasharray":n,"stroke-width":a,"stroke-linecap":o})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,h=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,g=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,l=this.w.globals.dom.Paper.rect();return l.attr({x:e,y:i,width:t>0?t:0,height:r>0?r:0,rx:u,ry:u,opacity:a,"stroke-width":o!==null?o:0,stroke:h!==null?h:"none","stroke-dasharray":g}),l.node.setAttribute("fill",n),l}},{key:"drawPolygon",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:r,stroke:i,"stroke-width":t})}},{key:"drawCircle",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var t=this.w.globals.dom.Paper.circle(2*e);return i!==null&&t.attr(i),t}},{key:"drawPath",value:function(e){var i=e.d,t=i===void 0?"":i,r=e.stroke,u=r===void 0?"#a8a8a8":r,n=e.strokeWidth,a=n===void 0?1:n,o=e.fill,h=e.fillOpacity,g=h===void 0?1:h,l=e.strokeOpacity,c=l===void 0?1:l,d=e.classes,F=e.strokeLinecap,p=F===void 0?null:F,f=e.strokeDashArray,m=f===void 0?0:f,v=this.w;return p===null&&(p=v.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t="M 0 ".concat(v.globals.gridHeight)),v.globals.dom.Paper.path(t).attr({fill:o,"fill-opacity":g,stroke:u,"stroke-opacity":c,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":m,class:d})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.w.globals.dom.Paper.group();return e!==null&&i.attr(e),i}},{key:"move",value:function(e,i){var t=["M",e,i].join(" ");return t}},{key:"line",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=null;return t===null?r=[" L",e,i].join(" "):t==="H"?r=[" H",e].join(" "):t==="V"&&(r=[" V",i].join(" ")),r}},{key:"curve",value:function(e,i,t,r,u,n){var a=["C",e,i,t,r,u,n].join(" ");return a}},{key:"quadraticCurve",value:function(e,i,t,r){return["Q",e,i,t,r].join(" ")}},{key:"arc",value:function(e,i,t,r,u,n,a){var o="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(o="a");var h=[o,e,i,t,r,u,n,a].join(" ");return h}},{key:"renderPaths",value:function(e){var i,t=e.j,r=e.realIndex,u=e.pathFrom,n=e.pathTo,a=e.stroke,o=e.strokeWidth,h=e.strokeLinecap,g=e.fill,l=e.animationDelay,c=e.initialSpeed,d=e.dataChangeSpeed,F=e.className,p=e.chartType,f=e.shouldClipToGrid,m=f===void 0||f,v=e.bindEventsOnPaths,w=v===void 0||v,x=e.drawShadow,A=x===void 0||x,b=this.w,y=new Fr(this.ctx),k=new Eu(this.ctx),C=this.w.config.chart.animations.enabled,D=C&&this.w.config.chart.animations.dynamicAnimation.enabled,T=!!(C&&!b.globals.resized||D&&b.globals.dataChanged&&b.globals.shouldAnimate);T?i=u:(i=n,b.globals.animationEnded=!0);var S=b.config.stroke.dashArray,M=0;M=Array.isArray(S)?S[r]:b.config.stroke.dashArray;var R=this.drawPath({d:i,stroke:a,strokeWidth:o,fill:g,fillOpacity:1,classes:F,strokeLinecap:h,strokeDashArray:M});R.attr("index",r),m&&(p==="bar"&&!b.globals.isHorizontal||b.globals.comboCharts?R.attr({"clip-path":"url(#gridRectBarMask".concat(b.globals.cuid,")")}):R.attr({"clip-path":"url(#gridRectMask".concat(b.globals.cuid,")")})),b.config.chart.dropShadow.enabled&&A&&y.dropShadow(R,b.config.chart.dropShadow,r),w&&(R.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,R)),R.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,R)),R.node.addEventListener("mousedown",this.pathMouseDown.bind(this,R))),R.attr({pathTo:n,pathFrom:u});var O={el:R,j:t,realIndex:r,pathFrom:u,pathTo:n,fill:g,strokeWidth:o,delay:l};return!C||b.globals.resized||b.globals.dataChanged?!b.globals.resized&&b.globals.dataChanged||k.showDelayedElements():k.animatePathsGradually(Pe(Pe({},O),{},{speed:c})),b.globals.dataChanged&&D&&T&&k.animatePathsGradually(Pe(Pe({},O),{},{speed:d})),R}},{key:"drawPattern",value:function(e,i,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(i,t,function(n){e==="horizontalLines"?n.line(0,0,t,0).stroke({color:r,width:u+1}):e==="verticalLines"?n.line(0,0,0,i).stroke({color:r,width:u+1}):e==="slantedLines"?n.line(0,0,i,t).stroke({color:r,width:u}):e==="squares"?n.rect(i,t).fill("none").stroke({color:r,width:u}):e==="circles"&&n.circle(i).fill("none").stroke({color:r,width:u})})}},{key:"drawGradient",value:function(e,i,t,r,u){var n,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,h=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],g=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,l=this.w;i.length<9&&i.indexOf("#")===0&&(i=pe.hexToRgba(i,r)),t.length<9&&t.indexOf("#")===0&&(t=pe.hexToRgba(t,u));var c=0,d=1,F=1,p=null;o!==null&&(c=o[0]!==void 0?o[0]/100:0,d=o[1]!==void 0?o[1]/100:1,F=o[2]!==void 0?o[2]/100:1,p=o[3]!==void 0?o[3]/100:null);var f=!(l.config.chart.type!=="donut"&&l.config.chart.type!=="pie"&&l.config.chart.type!=="polarArea"&&l.config.chart.type!=="bubble");if(n=h&&h.length!==0?l.globals.dom.Paper.gradient(f?"radial":"linear",function(w){(Array.isArray(h[g])?h[g]:h).forEach(function(x){w.stop(x.offset/100,x.color,x.opacity)})}):l.globals.dom.Paper.gradient(f?"radial":"linear",function(w){w.stop(c,i,r),w.stop(d,t,u),w.stop(F,t,u),p!==null&&w.stop(p,i,r)}),f){var m=l.globals.gridWidth/2,v=l.globals.gridHeight/2;l.config.chart.type!=="bubble"?n.attr({gradientUnits:"userSpaceOnUse",cx:m,cy:v,r:a}):n.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?n.from(0,0).to(0,1):e==="diagonal"?n.from(0,0).to(1,1):e==="horizontal"?n.from(0,1).to(1,1):e==="diagonal2"&&n.from(1,0).to(0,1);return n}},{key:"getTextBasedOnMaxWidth",value:function(e){var i=e.text,t=e.maxWidth,r=e.fontSize,u=e.fontFamily,n=this.getTextRects(i,r,u),a=n.width/i.length,o=Math.floor(t/a);return t<n.width?i.slice(0,o-3)+"...":i}},{key:"drawText",value:function(e){var i=this,t=e.x,r=e.y,u=e.text,n=e.textAnchor,a=e.fontSize,o=e.fontFamily,h=e.fontWeight,g=e.foreColor,l=e.opacity,c=e.maxWidth,d=e.cssClass,F=d===void 0?"":d,p=e.isPlainText,f=p===void 0||p,m=e.dominantBaseline,v=m===void 0?"auto":m,w=this.w;u===void 0&&(u="");var x=u;n||(n="start"),g&&g.length||(g=w.config.chart.foreColor),o=o||w.config.chart.fontFamily,h=h||"regular";var A,b={maxWidth:c,fontSize:a=a||"11px",fontFamily:o};return Array.isArray(u)?A=w.globals.dom.Paper.text(function(y){for(var k=0;k<u.length;k++)x=u[k],c&&(x=i.getTextBasedOnMaxWidth(Pe({text:u[k]},b))),k===0?y.tspan(x):y.tspan(x).newLine()}):(c&&(x=this.getTextBasedOnMaxWidth(Pe({text:u},b))),A=f?w.globals.dom.Paper.plain(u):w.globals.dom.Paper.text(function(y){return y.tspan(x)})),A.attr({x:t,y:r,"text-anchor":n,"dominant-baseline":v,"font-size":a,"font-family":o,"font-weight":h,fill:g,class:"apexcharts-text "+F}),A.node.style.fontFamily=o,A.node.style.opacity=l,A}},{key:"getMarkerPath",value:function(e,i,t,r){var u="";switch(t){case"cross":u="M ".concat(e-(r/=1.4)," ").concat(i-r," L ").concat(e+r," ").concat(i+r,"  M ").concat(e-r," ").concat(i+r," L ").concat(e+r," ").concat(i-r);break;case"plus":u="M ".concat(e-(r/=1.12)," ").concat(i," L ").concat(e+r," ").concat(i,"  M ").concat(e," ").concat(i-r," L ").concat(e," ").concat(i+r);break;case"star":case"sparkle":var n=5;r*=1.15,t==="sparkle"&&(r/=1.1,n=4);for(var a=Math.PI/n,o=0;o<=2*n;o++){var h=o*a,g=o%2==0?r:r/2;u+=(o===0?"M":"L")+(e+g*Math.sin(h))+","+(i-g*Math.cos(h))}u+="Z";break;case"triangle":u="M ".concat(e," ").concat(i-r,` 
             L `).concat(e+r," ").concat(i+r,` 
             L `).concat(e-r," ").concat(i+r,` 
             Z`);break;case"square":case"rect":u="M ".concat(e-(r/=1.125)," ").concat(i-r,` 
           L `).concat(e+r," ").concat(i-r,` 
           L `).concat(e+r," ").concat(i+r,` 
           L `).concat(e-r," ").concat(i+r,` 
           Z`);break;case"diamond":r*=1.05,u="M ".concat(e," ").concat(i-r,` 
             L `).concat(e+r," ").concat(i,` 
             L `).concat(e," ").concat(i+r,` 
             L `).concat(e-r," ").concat(i,` 
            Z`);break;case"line":u="M ".concat(e-(r/=1.1)," ").concat(i,` 
           L `).concat(e+r," ").concat(i);break;default:r*=2,u="M ".concat(e,", ").concat(i,` 
           m -`).concat(r/2,`, 0 
           a `).concat(r/2,",").concat(r/2," 0 1,0 ").concat(r,`,0 
           a `).concat(r/2,",").concat(r/2," 0 1,0 -").concat(r,",0")}return u}},{key:"drawMarkerShape",value:function(e,i,t,r,u){var n=this.drawPath({d:this.getMarkerPath(e,i,t,r,u),stroke:u.pointStrokeColor,strokeDashArray:u.pointStrokeDashArray,strokeWidth:u.pointStrokeWidth,fill:u.pointFillColor,fillOpacity:u.pointFillOpacity,strokeOpacity:u.pointStrokeOpacity});return n.attr({cx:e,cy:i,shape:u.shape,class:u.class?u.class:""}),n}},{key:"drawMarker",value:function(e,i,t){e=e||0;var r=t.pSize||0;return pe.isNumber(i)||(r=0,i=0),this.drawMarkerShape(e,i,t==null?void 0:t.shape,r,Pe(Pe({},t),t.shape==="line"||t.shape==="plus"||t.shape==="cross"?{pointStrokeColor:t.pointFillColor,pointStrokeOpacity:t.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,i){var t=this.w,r=new Fr(this.ctx),u=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10);if(typeof t.config.chart.events.dataPointMouseEnter=="function"&&t.config.chart.events.dataPointMouseEnter(i,this.ctx,{seriesIndex:u,dataPointIndex:n,w:t}),this.ctx.events.fireEvent("dataPointMouseEnter",[i,this.ctx,{seriesIndex:u,dataPointIndex:n,w:t}]),(t.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&t.config.states.hover.filter.type!=="none"&&!t.globals.isTouchDevice){var a=t.config.states.hover.filter;r.applyFilter(e,u,a.type)}}},{key:"pathMouseLeave",value:function(e,i){var t=this.w,r=new Fr(this.ctx),u=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10);typeof t.config.chart.events.dataPointMouseLeave=="function"&&t.config.chart.events.dataPointMouseLeave(i,this.ctx,{seriesIndex:u,dataPointIndex:n,w:t}),this.ctx.events.fireEvent("dataPointMouseLeave",[i,this.ctx,{seriesIndex:u,dataPointIndex:n,w:t}]),t.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||t.config.states.hover.filter.type!=="none"&&r.getDefaultFilter(e,u)}},{key:"pathMouseDown",value:function(e,i){var t=this.w,r=new Fr(this.ctx),u=parseInt(e.node.getAttribute("index"),10),n=parseInt(e.node.getAttribute("j"),10),a="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),t.globals.selectedDataPoints[u].indexOf(n)>-1){var o=t.globals.selectedDataPoints[u].indexOf(n);t.globals.selectedDataPoints[u].splice(o,1)}}else{if(!t.config.states.active.allowMultipleDataPointsSelection&&t.globals.selectedDataPoints.length>0){t.globals.selectedDataPoints=[];var h=t.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),g=t.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),l=function(F){Array.prototype.forEach.call(F,function(p){p.node.setAttribute("selected","false"),r.getDefaultFilter(p,u)})};l(h),l(g)}e.node.setAttribute("selected","true"),a="true",t.globals.selectedDataPoints[u]===void 0&&(t.globals.selectedDataPoints[u]=[]),t.globals.selectedDataPoints[u].push(n)}if(a==="true"){var c=t.config.states.active.filter;if(c!=="none")r.applyFilter(e,u,c.type);else if(t.config.states.hover.filter!=="none"&&!t.globals.isTouchDevice){var d=t.config.states.hover.filter;r.applyFilter(e,u,d.type)}}else t.config.states.active.filter.type!=="none"&&(t.config.states.hover.filter.type==="none"||t.globals.isTouchDevice?r.getDefaultFilter(e,u):(d=t.config.states.hover.filter,r.applyFilter(e,u,d.type)));typeof t.config.chart.events.dataPointSelection=="function"&&t.config.chart.events.dataPointSelection(i,this.ctx,{selectedDataPoints:t.globals.selectedDataPoints,seriesIndex:u,dataPointIndex:n,w:t}),i&&this.ctx.events.fireEvent("dataPointSelection",[i,this.ctx,{selectedDataPoints:t.globals.selectedDataPoints,seriesIndex:u,dataPointIndex:n,w:t}])}},{key:"rotateAroundCenter",value:function(e){var i={};return e&&typeof e.getBBox=="function"&&(i=e.getBBox()),{x:i.x+i.width/2,y:i.y+i.height/2}}},{key:"getTextRects",value:function(e,i,t,r){var u=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],n=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:i,fontFamily:t,foreColor:"#fff",opacity:0});r&&a.attr("transform",r),n.globals.dom.Paper.add(a);var o=a.bbox();return u||(o=a.node.getBoundingClientRect()),a.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(e,i,t){if(typeof e.getComputedTextLength=="function"&&(e.textContent=i,i.length>0&&e.getComputedTextLength()>=t/1.1)){for(var r=i.length-3;r>0;r-=3)if(e.getSubStringLength(0,r)<=t/1.1)return void(e.textContent=i.substring(0,r)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,i){for(var t in i)i.hasOwnProperty(t)&&e.setAttribute(t,i[t])}}]),s}(),Gt=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=this.w,t=[];if(i.globals.series.length===0)return t;for(var r=0;r<i.globals.series[i.globals.maxValsInArrayIndex].length;r++){for(var u=0,n=0;n<i.globals.series.length;n++)i.globals.series[n][r]!==void 0&&e.indexOf(n)===-1&&(u+=i.globals.series[n][r]);t.push(u)}return t}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(i,t){return i+t},0):this.w.globals.series[e].reduce(function(i,t){return i+t},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,i=this.w,t=[];return i.globals.seriesGroups.forEach(function(r){var u=[];i.config.series.forEach(function(a,o){r.indexOf(i.globals.seriesNames[o])>-1&&u.push(o)});var n=i.globals.series.map(function(a,o){return u.indexOf(o)===-1?o:-1}).filter(function(a){return a!==-1});t.push(e.getStackedSeriesTotals(n))}),t}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,i=this.w.config,t=[],r=[],u=[],n=e.series.length>i.yaxis.length||i.yaxis.some(function(l){return Array.isArray(l.seriesName)});i.series.forEach(function(l,c){u.push(c),r.push(null)}),i.yaxis.forEach(function(l,c){t[c]=[]});var a=[];i.yaxis.forEach(function(l,c){var d=!1;if(l.seriesName){var F=[];Array.isArray(l.seriesName)?F=l.seriesName:F.push(l.seriesName),F.forEach(function(p){i.series.forEach(function(f,m){if(f.name===p){var v=m;c===m||n?!n||u.indexOf(m)>-1?t[c].push([c,m]):console.warn("Series '"+f.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(t[m].push([m,c]),v=c),d=!0,(v=u.indexOf(v))!==-1&&u.splice(v,1)}})})}d||a.push(c)}),t=t.map(function(l,c){var d=[];return l.forEach(function(F){r[F[1]]=F[0],d.push(F[1])}),d});for(var o=i.yaxis.length-1,h=0;h<a.length&&(o=a[h],t[o]=[],u);h++){var g=u[0];u.shift(),t[o].push(g),r[g]=o}u.forEach(function(l){t[o].push(l),r[l]=o}),e.seriesYAxisMap=t.map(function(l){return l}),e.seriesYAxisReverseMap=r.map(function(l){return l}),e.seriesYAxisMap.forEach(function(l,c){l.forEach(function(d){i.series[d]&&i.series[d].group===void 0&&(i.series[d].group="apexcharts-axis-".concat(c.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(i){return i!==null}):this.w.config.series[e].data.filter(function(i){return i!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(i,t,r){return i===r[0]})}},{key:"getCategoryLabels",value:function(e){var i=this.w,t=e.slice();return i.config.xaxis.convertedCatToNumeric&&(t=e.map(function(r,u){return i.config.xaxis.labels.formatter(r-i.globals.minX+1)})),t}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(i){return i.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(i){return i.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,i=0;return e.globals.markers.size.forEach(function(t){i=Math.max(i,t)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(t){i=Math.max(i,t.size)}),i>0&&(e.config.markers.hover.size>0?i=e.config.markers.hover.size:i+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=i,i}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(i,t){var r=0;if(Array.isArray(i))for(var u=0;u<i.length;u++)r+=i[u];else r+=i;return r})}},{key:"getSeriesTotalsXRange",value:function(e,i){var t=this.w;return t.globals.series.map(function(r,u){for(var n=0,a=0;a<r.length;a++)t.globals.seriesX[u][a]>e&&t.globals.seriesX[u][a]<i&&(n+=r[a]);return n})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(i,t){var r=[];if(Array.isArray(i))for(var u=0;u<i.length;u++){var n=e.globals.stackedSeriesTotals[u],a=0;n&&(a=100*i[u]/n),r.push(a)}else{var o=100*i/e.globals.seriesTotals.reduce(function(h,g){return h+g},0);r.push(o)}return r})}},{key:"getCalculatedRatios",value:function(){var e,i,t,r=this,u=this.w,n=u.globals,a=[],o=0,h=[],g=.1,l=0;if(n.yRange=[],n.isMultipleYAxis)for(var c=0;c<n.minYArr.length;c++)n.yRange.push(Math.abs(n.minYArr[c]-n.maxYArr[c])),h.push(0);else n.yRange.push(Math.abs(n.minY-n.maxY));n.xRange=Math.abs(n.maxX-n.minX),n.zRange=Math.abs(n.maxZ-n.minZ);for(var d=0;d<n.yRange.length;d++)a.push(n.yRange[d]/n.gridHeight);if(i=n.xRange/n.gridWidth,e=n.yRange/n.gridWidth,t=n.xRange/n.gridHeight,(o=n.zRange/n.gridHeight*16)||(o=1),n.minY!==Number.MIN_VALUE&&Math.abs(n.minY)!==0&&(n.hasNegs=!0),u.globals.seriesYAxisReverseMap.length>0){var F=function(f,m){var v=u.config.yaxis[u.globals.seriesYAxisReverseMap[m]],w=f<0?-1:1;return f=Math.abs(f),v.logarithmic&&(f=r.getBaseLog(v.logBase,f)),-w*f/a[m]};if(n.isMultipleYAxis){h=[];for(var p=0;p<a.length;p++)h.push(F(n.minYArr[p],p))}else(h=[]).push(F(n.minY,0)),n.minY!==Number.MIN_VALUE&&Math.abs(n.minY)!==0&&(g=-n.minY/e,l=n.minX/i)}else(h=[]).push(0),g=0,l=0;return{yRatio:a,invertedYRatio:e,zRatio:o,xRatio:i,invertedXRatio:t,baseLineInvertedY:g,baseLineY:h,baseLineX:l}}},{key:"getLogSeries",value:function(e){var i=this,t=this.w;return t.globals.seriesLog=e.map(function(r,u){var n=t.globals.seriesYAxisReverseMap[u];return t.config.yaxis[n]&&t.config.yaxis[n].logarithmic?r.map(function(a){return a===null?null:i.getLogVal(t.config.yaxis[n].logBase,a,u)}):r}),t.globals.invalidLogScale?e:t.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,i){if(e===null)return null;var t=this.w,r=t.globals.seriesYAxisReverseMap[i];return t.config.yaxis[r]&&t.config.yaxis[r].logarithmic?this.getLogVal(t.config.yaxis[r].logBase,e,i):e}},{key:"getBaseLog",value:function(e,i){return Math.log(i)/Math.log(e)}},{key:"getLogVal",value:function(e,i,t){if(i<=0)return 0;var r=this.w,u=r.globals.minYArr[t]===0?-1:this.getBaseLog(e,r.globals.minYArr[t]),n=(r.globals.maxYArr[t]===0?0:this.getBaseLog(e,r.globals.maxYArr[t]))-u;return i<1?i/n:(this.getBaseLog(e,i)-u)/n}},{key:"getLogYRatios",value:function(e){var i=this,t=this.w,r=this.w.globals;return r.yLogRatio=e.slice(),r.logYRange=r.yRange.map(function(u,n){var a=t.globals.seriesYAxisReverseMap[n];if(t.config.yaxis[a]&&i.w.config.yaxis[a].logarithmic){var o,h=-Number.MAX_VALUE,g=Number.MIN_VALUE;return r.seriesLog.forEach(function(l,c){l.forEach(function(d){t.config.yaxis[c]&&t.config.yaxis[c].logarithmic&&(h=Math.max(d,h),g=Math.min(d,g))})}),o=Math.pow(r.yRange[n],Math.abs(g-h)/r.yRange[n]),r.yLogRatio[n]=o/r.gridHeight,o}}),r.invalidLogScale?e.slice():r.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,i,t,r){var u=this.w,n=[];return e.series.length>0&&i.forEach(function(a){var o=[],h=[];e.i.forEach(function(g,l){u.config.series[g].group===a&&(o.push(e.series[l]),h.push(g))}),o.length>0&&n.push(r.draw(o,t,h))}),n}}],[{key:"checkComboSeries",value:function(e,i){var t=!1,r=0,u=0;return i===void 0&&(i="line"),e.length&&e[0].type!==void 0&&e.forEach(function(n){n.type!=="bar"&&n.type!=="column"&&n.type!=="candlestick"&&n.type!=="boxPlot"||r++,n.type!==void 0&&n.type!==i&&u++}),u>0&&(t=!0),{comboBarCount:r,comboCharts:t}}},{key:"extendArrayProps",value:function(e,i,t){var r,u,n,a,o,h;return(r=i)!==null&&r!==void 0&&r.yaxis&&(i=e.extendYAxis(i,t)),(u=i)!==null&&u!==void 0&&u.annotations&&(i.annotations.yaxis&&(i=e.extendYAxisAnnotations(i)),(n=i)!==null&&n!==void 0&&(a=n.annotations)!==null&&a!==void 0&&a.xaxis&&(i=e.extendXAxisAnnotations(i)),(o=i)!==null&&o!==void 0&&(h=o.annotations)!==null&&h!==void 0&&h.points&&(i=e.extendPointAnnotations(i))),i}}]),s}(),Va=function(){function s(e){Oe(this,s),this.w=e.w,this.annoCtx=e}return Ne(s,[{key:"setOrientations",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=this.w;if(e.label.orientation==="vertical"){var r=i!==null?i:0,u=t.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(r,"']"));if(u!==null){var n=u.getBoundingClientRect();u.setAttribute("x",parseFloat(u.getAttribute("x"))-n.height+4);var a=e.label.position==="top"?n.width:-n.width;u.setAttribute("y",parseFloat(u.getAttribute("y"))+a);var o=this.annoCtx.graphics.rotateAroundCenter(u),h=o.x,g=o.y;u.setAttribute("transform","rotate(-90 ".concat(h," ").concat(g,")"))}}}},{key:"addBackgroundToAnno",value:function(e,i){var t=this.w;if(!e||!i.label.text||!String(i.label.text).trim())return null;var r=t.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),u=e.getBoundingClientRect(),n=i.label.style.padding,a=n.left,o=n.right,h=n.top,g=n.bottom;if(i.label.orientation==="vertical"){var l=[a,o,h,g];h=l[0],g=l[1],a=l[2],o=l[3]}var c=u.left-r.left-a,d=u.top-r.top-h,F=this.annoCtx.graphics.drawRect(c-t.globals.barPadForNumericAxis,d,u.width+a+o,u.height+h+g,i.label.borderRadius,i.label.style.background,1,i.label.borderWidth,i.label.borderColor,0);return i.id&&F.node.classList.add(i.id),F}},{key:"annotationsBackground",value:function(){var e=this,i=this.w,t=function(r,u,n){var a=i.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(u,"']"));if(a){var o=a.parentNode,h=e.addBackgroundToAnno(a,r);h&&(o.insertBefore(h.node,a),r.label.mouseEnter&&h.node.addEventListener("mouseenter",r.label.mouseEnter.bind(e,r)),r.label.mouseLeave&&h.node.addEventListener("mouseleave",r.label.mouseLeave.bind(e,r)),r.label.click&&h.node.addEventListener("click",r.label.click.bind(e,r)))}};i.config.annotations.xaxis.forEach(function(r,u){return t(r,u,"xaxis")}),i.config.annotations.yaxis.forEach(function(r,u){return t(r,u,"yaxis")}),i.config.annotations.points.forEach(function(r,u){return t(r,u,"point")})}},{key:"getY1Y2",value:function(e,i){var t,r=this.w,u=e==="y1"?i.y:i.y2,n=!1;if(this.annoCtx.invertAxis){var a=r.config.xaxis.convertedCatToNumeric?r.globals.categoryLabels:r.globals.labels,o=a.indexOf(u),h=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));t=h?parseFloat(h.getAttribute("y")):(r.globals.gridHeight/a.length-1)*(o+1)-r.globals.barHeight,i.seriesIndex!==void 0&&r.globals.barHeight&&(t-=r.globals.barHeight/2*(r.globals.series.length-1)-r.globals.barHeight*i.seriesIndex)}else{var g,l=r.globals.seriesYAxisMap[i.yAxisIndex][0],c=r.config.yaxis[i.yAxisIndex].logarithmic?new Gt(this.annoCtx.ctx).getLogVal(r.config.yaxis[i.yAxisIndex].logBase,u,l)/r.globals.yLogRatio[l]:(u-r.globals.minYArr[l])/(r.globals.yRange[l]/r.globals.gridHeight);t=r.globals.gridHeight-Math.min(Math.max(c,0),r.globals.gridHeight),n=c>r.globals.gridHeight||c<0,!i.marker||i.y!==void 0&&i.y!==null||(t=0),(g=r.config.yaxis[i.yAxisIndex])!==null&&g!==void 0&&g.reversed&&(t=c)}return typeof u=="string"&&u.includes("px")&&(t=parseFloat(u)),{yP:t,clipped:n}}},{key:"getX1X2",value:function(e,i){var t=this.w,r=e==="x1"?i.x:i.x2,u=this.annoCtx.invertAxis?t.globals.minY:t.globals.minX,n=this.annoCtx.invertAxis?t.globals.maxY:t.globals.maxX,a=this.annoCtx.invertAxis?t.globals.yRange[0]:t.globals.xRange,o=!1,h=this.annoCtx.inversedReversedAxis?(n-r)/(a/t.globals.gridWidth):(r-u)/(a/t.globals.gridWidth);return t.config.xaxis.type!=="category"&&!t.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||t.globals.dataFormatXNumeric||t.config.chart.sparkline.enabled||(h=this.getStringX(r)),typeof r=="string"&&r.includes("px")&&(h=parseFloat(r)),r==null&&i.marker&&(h=t.globals.gridWidth),i.seriesIndex!==void 0&&t.globals.barWidth&&!this.annoCtx.invertAxis&&(h-=t.globals.barWidth/2*(t.globals.series.length-1)-t.globals.barWidth*i.seriesIndex),h>t.globals.gridWidth?(h=t.globals.gridWidth,o=!0):h<0&&(h=0,o=!0),{x:h,clipped:o}}},{key:"getStringX",value:function(e){var i=this.w,t=e;i.config.xaxis.convertedCatToNumeric&&i.globals.categoryLabels.length&&(e=i.globals.categoryLabels.indexOf(e)+1);var r=i.globals.labels.map(function(n){return Array.isArray(n)?n.join(" "):n}).indexOf(e),u=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(r+1,")"));return u&&(t=parseFloat(u.getAttribute("x"))),t}}]),s}(),_j=function(){function s(e){Oe(this,s),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Va(this.annoCtx)}return Ne(s,[{key:"addXaxisAnnotation",value:function(e,i,t){var r,u=this.w,n=this.helpers.getX1X2("x1",e),a=n.x,o=n.clipped,h=!0,g=e.label.text,l=e.strokeDashArray;if(pe.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!o){var c=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,u.globals.gridHeight+e.offsetY,e.borderColor,l,e.borderWidth);i.appendChild(c.node),e.id&&c.node.classList.add(e.id)}}else{var d=this.helpers.getX1X2("x2",e);if(r=d.x,h=d.clipped,r<a){var F=a;a=r,r=F}var p=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,r-a,u.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,l);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(u.globals.cuid,")")),i.appendChild(p.node),e.id&&p.node.classList.add(e.id)}if(!o||!h){var f=this.annoCtx.graphics.getTextRects(g,parseFloat(e.label.style.fontSize)),m=e.label.position==="top"?4:e.label.position==="center"?u.globals.gridHeight/2+(e.label.orientation==="vertical"?f.width/2:0):u.globals.gridHeight,v=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:m+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?f.width/2-12:-f.width/2:0),text:g,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});v.attr({rel:t}),i.appendChild(v.node),this.annoCtx.helpers.setOrientations(e,t)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,i=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return i.config.annotations.xaxis.map(function(r,u){e.addXaxisAnnotation(r,t.node,u)}),t}}]),s}(),gr=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return Ne(s,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var i=Date.parse(e);if(!isNaN(i))return this.getTimeStamp(e);var t=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return t=this.getTimeStamp(t)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,i){var t=this.w.globals.locale,r=this.w.config.xaxis.labels.datetimeUTC,u=["\0"].concat(nr(t.months)),n=[""].concat(nr(t.shortMonths)),a=[""].concat(nr(t.days)),o=[""].concat(nr(t.shortDays));function h(k,C){var D=k+"";for(C=C||2;D.length<C;)D="0"+D;return D}var g=r?e.getUTCFullYear():e.getFullYear();i=(i=(i=i.replace(/(^|[^\\])yyyy+/g,"$1"+g)).replace(/(^|[^\\])yy/g,"$1"+g.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+g);var l=(r?e.getUTCMonth():e.getMonth())+1;i=(i=(i=(i=i.replace(/(^|[^\\])MMMM+/g,"$1"+u[0])).replace(/(^|[^\\])MMM/g,"$1"+n[0])).replace(/(^|[^\\])MM/g,"$1"+h(l))).replace(/(^|[^\\])M/g,"$1"+l);var c=r?e.getUTCDate():e.getDate();i=(i=(i=(i=i.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+o[0])).replace(/(^|[^\\])dd/g,"$1"+h(c))).replace(/(^|[^\\])d/g,"$1"+c);var d=r?e.getUTCHours():e.getHours(),F=d>12?d-12:d===0?12:d;i=(i=(i=(i=i.replace(/(^|[^\\])HH+/g,"$1"+h(d))).replace(/(^|[^\\])H/g,"$1"+d)).replace(/(^|[^\\])hh+/g,"$1"+h(F))).replace(/(^|[^\\])h/g,"$1"+F);var p=r?e.getUTCMinutes():e.getMinutes();i=(i=i.replace(/(^|[^\\])mm+/g,"$1"+h(p))).replace(/(^|[^\\])m/g,"$1"+p);var f=r?e.getUTCSeconds():e.getSeconds();i=(i=i.replace(/(^|[^\\])ss+/g,"$1"+h(f))).replace(/(^|[^\\])s/g,"$1"+f);var m=r?e.getUTCMilliseconds():e.getMilliseconds();i=i.replace(/(^|[^\\])fff+/g,"$1"+h(m,3)),m=Math.round(m/10),i=i.replace(/(^|[^\\])ff/g,"$1"+h(m)),m=Math.round(m/10);var v=d<12?"AM":"PM";i=(i=(i=i.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+v)).replace(/(^|[^\\])T/g,"$1"+v.charAt(0));var w=v.toLowerCase();i=(i=i.replace(/(^|[^\\])tt+/g,"$1"+w)).replace(/(^|[^\\])t/g,"$1"+w.charAt(0));var x=-e.getTimezoneOffset(),A=r||!x?"Z":x>0?"+":"-";if(!r){var b=(x=Math.abs(x))%60;A+=h(Math.floor(x/60))+":"+h(b)}i=i.replace(/(^|[^\\])K/g,"$1"+A);var y=(r?e.getUTCDay():e.getDay())+1;return i=(i=(i=(i=(i=i.replace(new RegExp(a[0],"g"),a[y])).replace(new RegExp(o[0],"g"),o[y])).replace(new RegExp(u[0],"g"),u[l])).replace(new RegExp(n[0],"g"),n[l])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,i,t){var r=this.w;r.config.xaxis.min!==void 0&&(e=r.config.xaxis.min),r.config.xaxis.max!==void 0&&(i=r.config.xaxis.max);var u=this.getDate(e),n=this.getDate(i),a=this.formatDate(u,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,i,t){return this.determineDaysOfMonths(e,i)-t}},{key:"determineDaysOfYear",value:function(e){var i=365;return this.isLeapYear(e)&&(i=366),i}},{key:"determineRemainingDaysOfYear",value:function(e,i,t){var r=this.daysCntOfYear[i]+t;return i>1&&this.isLeapYear()&&r++,r}},{key:"determineDaysOfMonths",value:function(e,i){var t=30;switch(e=pe.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(t=this.isLeapYear(i)?29:28);break;case this.months31.indexOf(e)>-1:default:t=31}return t}}]),s}(),Yn=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return Ne(s,[{key:"xLabelFormat",value:function(e,i,t,r){var u=this.w;if(u.config.xaxis.type==="datetime"&&u.config.xaxis.labels.formatter===void 0&&u.config.tooltip.x.formatter===void 0){var n=new gr(this.ctx);return n.formatDate(n.getDate(i),u.config.tooltip.x.format)}return e(i,t,r)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(i){return i}):e}},{key:"defaultYFormatter",value:function(e,i,t){var r=this.w;if(pe.isNumber(e))if(r.globals.yValueDecimal!==0)e=e.toFixed(i.decimalsInFloat!==void 0?i.decimalsInFloat:r.globals.yValueDecimal);else{var u=e.toFixed(0);e=e==u?u:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,i=this.w;return i.globals.xaxisTooltipFormatter=function(t){return e.defaultGeneralFormatter(t)},i.globals.ttKeyFormatter=function(t){return e.defaultGeneralFormatter(t)},i.globals.ttZFormatter=function(t){return t},i.globals.legendFormatter=function(t){return e.defaultGeneralFormatter(t)},i.config.xaxis.labels.formatter!==void 0?i.globals.xLabelFormatter=i.config.xaxis.labels.formatter:i.globals.xLabelFormatter=function(t){if(pe.isNumber(t)){if(!i.config.xaxis.convertedCatToNumeric&&i.config.xaxis.type==="numeric"){if(pe.isNumber(i.config.xaxis.decimalsInFloat))return t.toFixed(i.config.xaxis.decimalsInFloat);var r=i.globals.maxX-i.globals.minX;return r>0&&r<100?t.toFixed(1):t.toFixed(0)}return i.globals.isBarHorizontal&&i.globals.maxY-i.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},typeof i.config.tooltip.x.formatter=="function"?i.globals.ttKeyFormatter=i.config.tooltip.x.formatter:i.globals.ttKeyFormatter=i.globals.xLabelFormatter,typeof i.config.xaxis.tooltip.formatter=="function"&&(i.globals.xaxisTooltipFormatter=i.config.xaxis.tooltip.formatter),(Array.isArray(i.config.tooltip.y)||i.config.tooltip.y.formatter!==void 0)&&(i.globals.ttVal=i.config.tooltip.y),i.config.tooltip.z.formatter!==void 0&&(i.globals.ttZFormatter=i.config.tooltip.z.formatter),i.config.legend.formatter!==void 0&&(i.globals.legendFormatter=i.config.legend.formatter),i.config.yaxis.forEach(function(t,r){t.labels.formatter!==void 0?i.globals.yLabelFormatters[r]=t.labels.formatter:i.globals.yLabelFormatters[r]=function(u){return i.globals.xyCharts?Array.isArray(u)?u.map(function(n){return e.defaultYFormatter(n,t,r)}):e.defaultYFormatter(u,t,r):u}}),i.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var i=e.globals.seriesNames.reduce(function(t,r){return t.length>r.length?t:r},0);e.globals.yAxisScale[0].niceMax=i,e.globals.yAxisScale[0].niceMin=i}}}]),s}(),x0=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"getLabel",value:function(e,i,t,r){var u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",a=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],o=this.w,h=e[r]===void 0?"":e[r],g=h,l=o.globals.xLabelFormatter,c=o.config.xaxis.labels.formatter,d=!1,F=new Yn(this.ctx),p=h;a&&(g=F.xLabelFormat(l,h,p,{i:r,dateFormatter:new gr(this.ctx).formatDate,w:o}),c!==void 0&&(g=c(h,e[r],{i:r,dateFormatter:new gr(this.ctx).formatDate,w:o})));var f,m;i.length>0?(f=i[r].unit,m=null,i.forEach(function(A){A.unit==="month"?m="year":A.unit==="day"?m="month":A.unit==="hour"?m="day":A.unit==="minute"&&(m="hour")}),d=m===f,t=i[r].position,g=i[r].value):o.config.xaxis.type==="datetime"&&c===void 0&&(g=""),g===void 0&&(g=""),g=Array.isArray(g)?g:g.toString();var v=new De(this.ctx),w={};w=o.globals.rotateXLabels&&a?v.getTextRects(g,parseInt(n,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(g,parseInt(n,10));var x=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(g)&&(String(g)==="NaN"||u.indexOf(g)>=0&&x)&&(g=""),{x:t,text:g,textRect:w,isBold:d}}},{key:"checkLabelBasedOnTickamount",value:function(e,i,t){var r=this.w,u=r.config.xaxis.tickAmount;return u==="dataPoints"&&(u=Math.round(r.globals.gridWidth/120)),u>t||e%Math.round(t/(u+1))==0||(i.text=""),i}},{key:"checkForOverflowingLabels",value:function(e,i,t,r,u){var n=this.w;if(e===0&&n.globals.skipFirstTimelinelabel&&(i.text=""),e===t-1&&n.globals.skipLastTimelinelabel&&(i.text=""),n.config.xaxis.labels.hideOverlappingLabels&&r.length>0){var a=u[u.length-1];i.x<a.textRect.width/(n.globals.rotateXLabels?Math.abs(n.config.xaxis.labels.rotate)/12:1.01)+a.x&&(i.text="")}return i}},{key:"checkForReversedLabels",value:function(e,i){var t=this.w;return t.config.yaxis[e]&&t.config.yaxis[e].reversed&&i.reverse(),i}},{key:"yAxisAllSeriesCollapsed",value:function(e){var i=this.w.globals;return!i.seriesYAxisMap[e].some(function(t){return i.collapsedSeriesIndices.indexOf(t)===-1})}},{key:"translateYAxisIndex",value:function(e){var i=this.w,t=i.globals,r=i.config.yaxis;return t.series.length>r.length||r.some(function(u){return Array.isArray(u.seriesName)})?e:t.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var i=this.w,t=i.config.yaxis[e];if(!t.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!t.showForNullSeries){var r=i.globals.seriesYAxisMap[e],u=new Gt(this.ctx);return r.every(function(n){return u.isSeriesNull(n)})}return!1}},{key:"getYAxisForeColor",value:function(e,i){var t=this.w;return Array.isArray(e)&&t.globals.yAxisScale[i]&&this.ctx.theme.pushExtraColors(e,t.globals.yAxisScale[i].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,i,t,r,u,n,a){var o=this.w,h=new De(this.ctx),g=o.globals.translateY+o.config.yaxis[u].labels.offsetY;if(o.globals.isBarHorizontal?g=0:o.config.chart.type==="heatmap"&&(g+=n/2),r.show&&i>0){o.config.yaxis[u].opposite===!0&&(e+=r.width);for(var l=i;l>=0;l--){var c=h.drawLine(e+t.offsetX-r.width+r.offsetX,g+r.offsetY,e+t.offsetX+r.offsetX,g+r.offsetY,r.color);a.add(c),g+=n}}}}]),s}(),Lj=function(){function s(e){Oe(this,s),this.w=e.w,this.annoCtx=e,this.helpers=new Va(this.annoCtx),this.axesUtils=new x0(this.annoCtx)}return Ne(s,[{key:"addYaxisAnnotation",value:function(e,i,t){var r,u=this.w,n=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),o=a.yP,h=a.clipped,g=!0,l=!1,c=e.label.text;if(e.y2===null||e.y2===void 0){if(!h){l=!0;var d=this.annoCtx.graphics.drawLine(0+e.offsetX,o+e.offsetY,this._getYAxisAnnotationWidth(e),o+e.offsetY,e.borderColor,n,e.borderWidth);i.appendChild(d.node),e.id&&d.node.classList.add(e.id)}}else{if(r=(a=this.helpers.getY1Y2("y2",e)).yP,g=a.clipped,r>o){var F=o;o=r,r=F}if(!h||!g){l=!0;var p=this.annoCtx.graphics.drawRect(0+e.offsetX,r+e.offsetY,this._getYAxisAnnotationWidth(e),o-r,0,e.fillColor,e.opacity,1,e.borderColor,n);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(u.globals.cuid,")")),i.appendChild(p.node),e.id&&p.node.classList.add(e.id)}}if(l){var f=e.label.position==="right"?u.globals.gridWidth:e.label.position==="center"?u.globals.gridWidth/2:0,m=this.annoCtx.graphics.drawText({x:f+e.label.offsetX,y:(r??o)+e.label.offsetY-3,text:c,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});m.attr({rel:t}),i.appendChild(m.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var i=this.w;return i.globals.gridWidth,(e.width.indexOf("%")>-1?i.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,i=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return i.config.annotations.yaxis.forEach(function(r,u){r.yAxisIndex=e.axesUtils.translateYAxisIndex(r.yAxisIndex),e.axesUtils.isYAxisHidden(r.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(r.yAxisIndex)||e.addYaxisAnnotation(r,t.node,u)}),t}}]),s}(),Tj=function(){function s(e){Oe(this,s),this.w=e.w,this.annoCtx=e,this.helpers=new Va(this.annoCtx)}return Ne(s,[{key:"addPointAnnotation",value:function(e,i,t){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var r=this.helpers.getX1X2("x1",e),u=r.x,n=r.clipped,a=(r=this.helpers.getY1Y2("y1",e)).yP,o=r.clipped;if(pe.isNumber(u)&&!o&&!n){var h={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},g=this.annoCtx.graphics.drawMarker(u+e.marker.offsetX,a+e.marker.offsetY,h);i.appendChild(g.node);var l=e.label.text?e.label.text:"",c=this.annoCtx.graphics.drawText({x:u+e.label.offsetX,y:a+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:l,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(c.attr({rel:t}),i.appendChild(c.node),e.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});d.attr({transform:"translate(".concat(u+e.customSVG.offsetX,", ").concat(a+e.customSVG.offsetY,")")}),d.node.innerHTML=e.customSVG.SVG,i.appendChild(d.node)}if(e.image.path){var F=e.image.width?e.image.width:20,p=e.image.height?e.image.height:20;g=this.annoCtx.addImage({x:u+e.image.offsetX-F/2,y:a+e.image.offsetY-p/2,width:F,height:p,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&g.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&g.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&g.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,i=this.w,t=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return i.config.annotations.points.map(function(r,u){e.addPointAnnotation(r,t.node,u)}),t}}]),s}(),_v={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},us=function(){function s(){Oe(this,s),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return Ne(s,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[_v],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(i,t){return i+t},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(i,t){return i+t},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),s}(),Pj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.graphics=new De(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Va(this),this.xAxisAnnotations=new _j(this),this.yAxisAnnotations=new Lj(this),this.pointsAnnotations=new Tj(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return Ne(s,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var i=this.yAxisAnnotations.drawYAxisAnnotations(),t=this.xAxisAnnotations.drawXAxisAnnotations(),r=this.pointsAnnotations.drawPointAnnotations(),u=e.config.chart.animations.enabled,n=[i,t,r],a=[t.node,i.node,r.node],o=0;o<3;o++)e.globals.dom.elGraphical.add(n[o]),!u||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&a[o].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(i,t){e.addImage(i,t)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(i,t){e.addText(i,t)})}},{key:"addXaxisAnnotation",value:function(e,i,t){this.xAxisAnnotations.addXaxisAnnotation(e,i,t)}},{key:"addYaxisAnnotation",value:function(e,i,t){this.yAxisAnnotations.addYaxisAnnotation(e,i,t)}},{key:"addPointAnnotation",value:function(e,i,t){this.pointsAnnotations.addPointAnnotation(e,i,t)}},{key:"addText",value:function(e,i){var t=e.x,r=e.y,u=e.text,n=e.textAnchor,a=e.foreColor,o=e.fontSize,h=e.fontFamily,g=e.fontWeight,l=e.cssClass,c=e.backgroundColor,d=e.borderWidth,F=e.strokeDashArray,p=e.borderRadius,f=e.borderColor,m=e.appendTo,v=m===void 0?".apexcharts-svg":m,w=e.paddingLeft,x=w===void 0?4:w,A=e.paddingRight,b=A===void 0?4:A,y=e.paddingBottom,k=y===void 0?2:y,C=e.paddingTop,D=C===void 0?2:C,T=this.w,S=this.graphics.drawText({x:t,y:r,text:u,textAnchor:n||"start",fontSize:o||"12px",fontWeight:g||"regular",fontFamily:h||T.config.chart.fontFamily,foreColor:a||T.config.chart.foreColor,cssClass:l}),M=T.globals.dom.baseEl.querySelector(v);M&&M.appendChild(S.node);var R=S.bbox();if(u){var O=this.graphics.drawRect(R.x-x,R.y-D,R.width+x+b,R.height+k+D,p,c||"transparent",1,d,f,F);M.insertBefore(O.node,S.node)}}},{key:"addImage",value:function(e,i){var t=this.w,r=e.path,u=e.x,n=u===void 0?0:u,a=e.y,o=a===void 0?0:a,h=e.width,g=h===void 0?20:h,l=e.height,c=l===void 0?20:l,d=e.appendTo,F=d===void 0?".apexcharts-svg":d,p=t.globals.dom.Paper.image(r);p.size(g,c).move(n,o);var f=t.globals.dom.baseEl.querySelector(F);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(e,i,t){return this.addAnnotationExternal({params:e,pushToMemory:i,context:t,type:"xaxis",contextMethod:t.addXaxisAnnotation}),t}},{key:"addYaxisAnnotationExternal",value:function(e,i,t){return this.addAnnotationExternal({params:e,pushToMemory:i,context:t,type:"yaxis",contextMethod:t.addYaxisAnnotation}),t}},{key:"addPointAnnotationExternal",value:function(e,i,t){return this.invertAxis===void 0&&(this.invertAxis=t.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:i,context:t,type:"point",contextMethod:t.addPointAnnotation}),t}},{key:"addAnnotationExternal",value:function(e){var i=e.params,t=e.pushToMemory,r=e.context,u=e.type,n=e.contextMethod,a=r,o=a.w,h=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(u,"-annotations")),g=h.childNodes.length+1,l=new us,c=Object.assign({},u==="xaxis"?l.xAxisAnnotation:u==="yaxis"?l.yAxisAnnotation:l.pointAnnotation),d=pe.extend(c,i);switch(u){case"xaxis":this.addXaxisAnnotation(d,h,g);break;case"yaxis":this.addYaxisAnnotation(d,h,g);break;case"point":this.addPointAnnotation(d,h,g)}var F=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(u,"-annotations .apexcharts-").concat(u,"-annotation-label[rel='").concat(g,"']")),p=this.helpers.addBackgroundToAnno(F,d);return p&&h.insertBefore(p.node,F),t&&o.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:pe.randomId(),method:n,label:"addAnnotation",params:i}),r}},{key:"clearAnnotations",value:function(e){for(var i=e.w,t=i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),r=i.globals.memory.methodsToExec.length-1;r>=0;r--)i.globals.memory.methodsToExec[r].label!=="addText"&&i.globals.memory.methodsToExec[r].label!=="addAnnotation"||i.globals.memory.methodsToExec.splice(r,1);t=pe.listToArray(t),Array.prototype.forEach.call(t,function(u){for(;u.firstChild;)u.removeChild(u.firstChild)})}},{key:"removeAnnotation",value:function(e,i){var t=e.w,r=t.globals.dom.baseEl.querySelectorAll(".".concat(i));r&&(t.globals.memory.methodsToExec.map(function(u,n){u.id===i&&t.globals.memory.methodsToExec.splice(n,1)}),Array.prototype.forEach.call(r,function(u){u.parentElement.removeChild(u)}))}}]),s}(),tc=function(s){var e,i=s.isTimeline,t=s.ctx,r=s.seriesIndex,u=s.dataPointIndex,n=s.y1,a=s.y2,o=s.w,h=o.globals.seriesRangeStart[r][u],g=o.globals.seriesRangeEnd[r][u],l=o.globals.labels[u],c=o.config.series[r].name?o.config.series[r].name:"",d=o.globals.ttKeyFormatter,F=o.config.tooltip.y.title.formatter,p={w:o,seriesIndex:r,dataPointIndex:u,start:h,end:g};typeof F=="function"&&(c=F(c,p)),(e=o.config.series[r].data[u])!==null&&e!==void 0&&e.x&&(l=o.config.series[r].data[u].x),i||o.config.xaxis.type==="datetime"&&(l=new Yn(t).xLabelFormat(o.globals.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new gr(t).formatDate,w:o})),typeof d=="function"&&(l=d(l,p)),Number.isFinite(n)&&Number.isFinite(a)&&(h=n,g=a);var f="",m="",v=o.globals.colors[r];if(o.config.tooltip.x.formatter===void 0)if(o.config.xaxis.type==="datetime"){var w=new gr(t);f=w.formatDate(w.getDate(h),o.config.tooltip.x.format),m=w.formatDate(w.getDate(g),o.config.tooltip.x.format)}else f=h,m=g;else f=o.config.tooltip.x.formatter(h),m=o.config.tooltip.x.formatter(g);return{start:h,end:g,startVal:f,endVal:m,ylabel:l,color:v,seriesName:c}},rc=function(s){var e=s.color,i=s.seriesName,t=s.ylabel,r=s.start,u=s.end,n=s.seriesIndex,a=s.dataPointIndex,o=s.ctx.tooltip.tooltipLabels.getFormatters(n);r=o.yLbFormatter(r),u=o.yLbFormatter(u);var h=o.yLbFormatter(s.w.globals.series[n][a]),g=`<span class="value start-value">
  `.concat(r,`
  </span> <span class="separator">-</span> <span class="value end-value">
  `).concat(u,`
  </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(i||"")+'</span></div><div> <span class="category">'+t+": </span> "+(s.w.globals.comboCharts?s.w.config.series[n].type==="rangeArea"||s.w.config.series[n].type==="rangeBar"?g:"<span>".concat(h,"</span>"):g)+" </div></div>"},Dn=function(){function s(e){Oe(this,s),this.opts=e}return Ne(s,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),pe.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,i){var t=i.w.config.series[i.seriesIndex].name;return e!==null?t+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),Pe(Pe({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(i){var t=i.seriesIndex,r=i.dataPointIndex,u=i.w;return e._getBoxTooltip(u,t,r,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(i){var t=i.seriesIndex,r=i.dataPointIndex,u=i.w;return e._getBoxTooltip(u,t,r,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,i){i.ctx;var t=i.seriesIndex,r=i.dataPointIndex,u=i.w,n=function(){var a=u.globals.seriesRangeStart[t][r];return u.globals.seriesRangeEnd[t][r]-a};return u.globals.comboCharts?u.config.series[t].type==="rangeBar"||u.config.series[t].type==="rangeArea"?n():e:n()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(i){var t=tc(Pe(Pe({},i),{},{isTimeline:!0})),r=t.color,u=t.seriesName,n=t.ylabel,a=t.startVal,o=t.endVal;return rc(Pe(Pe({},i),{},{color:r,seriesName:u,ylabel:n,start:a,end:o}))}(e):function(i){var t=tc(i),r=t.color,u=t.seriesName,n=t.ylabel,a=t.start,o=t.end;return rc(Pe(Pe({},i),{},{color:r,seriesName:u,ylabel:n,start:a,end:o}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var i,t;return(i=e.plotOptions.bar)!==null&&i!==void 0&&i.barHeight||(e.plotOptions.bar.barHeight=2),(t=e.plotOptions.bar)!==null&&t!==void 0&&t.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return function(i){var t=tc(i),r=t.color,u=t.seriesName,n=t.ylabel,a=t.start,o=t.end;return rc(Pe(Pe({},i),{},{color:r,seriesName:u,ylabel:n,start:a,end:o}))}(e)}}}}},{key:"brush",value:function(e){return pe.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var i=e.dataLabels.formatter;return e.yaxis.forEach(function(t,r){e.yaxis[r].min=0,e.yaxis[r].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=i||function(t){return typeof t=="number"&&t?t.toFixed(0)+"%":t}),e}},{key:"stackedBars",value:function(){var e=this.bar();return Pe(Pe({},e),{},{plotOptions:Pe(Pe({},e.plotOptions),{},{bar:Pe(Pe({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,i,t){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(n){return pe.isNumber(n)?Math.floor(n):n};var r=e.xaxis.labels.formatter,u=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return t&&t.length&&(u=t.map(function(n){return Array.isArray(n)?n:String(n)})),u&&u.length&&(e.xaxis.labels.formatter=function(n){return pe.isNumber(n)?r(u[Math.floor(n)-1]):r(n)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,i,t,r,u){var n=e.globals.seriesCandleO[i][t],a=e.globals.seriesCandleH[i][t],o=e.globals.seriesCandleM[i][t],h=e.globals.seriesCandleL[i][t],g=e.globals.seriesCandleC[i][t];return e.config.series[i].type&&e.config.series[i].type!==u?`<div class="apexcharts-custom-tooltip">
          `.concat(e.config.series[i].name?e.config.series[i].name:"series-"+(i+1),": <strong>").concat(e.globals.series[i][t],`</strong>
        </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(r[0],': <span class="value">')+n+"</span></div>"+"<div>".concat(r[1],': <span class="value">')+a+"</span></div>"+(o?"<div>".concat(r[2],': <span class="value">')+o+"</span></div>":"")+"<div>".concat(r[3],': <span class="value">')+h+"</span></div>"+"<div>".concat(r[4],': <span class="value">')+g+"</span></div></div>"}}]),s}(),Mn=function(){function s(e){Oe(this,s),this.opts=e}return Ne(s,[{key:"init",value:function(e){var i=e.responsiveOverride,t=this.opts,r=new us,u=new Dn(t);this.chartType=t.chart.type,t=this.extendYAxis(t),t=this.extendAnnotations(t);var n=r.init(),a={};if(t&&au(t)==="object"){var o,h,g,l,c,d,F,p,f,m,v={};v=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(t.chart.type)!==-1?u[t.chart.type]():u.line(),(o=t.plotOptions)!==null&&o!==void 0&&(h=o.bar)!==null&&h!==void 0&&h.isFunnel&&(v=u.funnel()),t.chart.stacked&&t.chart.type==="bar"&&(v=u.stackedBars()),(g=t.chart.brush)!==null&&g!==void 0&&g.enabled&&(v=u.brush(v)),(l=t.plotOptions)!==null&&l!==void 0&&(c=l.line)!==null&&c!==void 0&&c.isSlopeChart&&(v=u.slope()),t.chart.stacked&&t.chart.stackType==="100%"&&(t=u.stacked100(t)),(d=t.plotOptions)!==null&&d!==void 0&&(F=d.bar)!==null&&F!==void 0&&F.isDumbbell&&(t=u.dumbbell(t)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(t),t.xaxis=t.xaxis||window.Apex.xaxis||{},i||(t.xaxis.convertedCatToNumeric=!1),((p=(t=this.checkForCatToNumericXAxis(this.chartType,v,t)).chart.sparkline)!==null&&p!==void 0&&p.enabled||(f=window.Apex.chart)!==null&&f!==void 0&&(m=f.sparkline)!==null&&m!==void 0&&m.enabled)&&(v=u.sparkline(v)),a=pe.extend(n,v)}var w=pe.extend(a,window.Apex);return n=pe.extend(w,t),n=this.handleUserInputErrors(n)}},{key:"checkForCatToNumericXAxis",value:function(e,i,t){var r,u,n=new Dn(t),a=(e==="bar"||e==="boxPlot")&&((r=t.plotOptions)===null||r===void 0||(u=r.bar)===null||u===void 0?void 0:u.horizontal),o=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",h=t.xaxis.type!=="datetime"&&t.xaxis.type!=="numeric",g=t.xaxis.tickPlacement?t.xaxis.tickPlacement:i.xaxis&&i.xaxis.tickPlacement;return a||o||!h||g==="between"||(t=n.convertCatToNumeric(t)),t}},{key:"extendYAxis",value:function(e,i){var t=new us;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=pe.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[pe.extend(t.yAxis,e.yaxis)]:e.yaxis=pe.extendArray(e.yaxis,t.yAxis);var r=!1;e.yaxis.forEach(function(n){n.logarithmic&&(r=!0)});var u=e.series;return i&&!u&&(u=i.config.series),r&&u.length!==e.yaxis.length&&u.length&&(e.yaxis=u.map(function(n,a){if(n.name||(u[a].name="series-".concat(a+1)),e.yaxis[a])return e.yaxis[a].seriesName=u[a].name,e.yaxis[a];var o=pe.extend(t.yAxis,e.yaxis[0]);return o.show=!1,o})),r&&u.length>1&&u.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var i=new us;return e.annotations.yaxis=pe.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],i.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var i=new us;return e.annotations.xaxis=pe.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],i.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var i=new us;return e.annotations.points=pe.extendArray(e.annotations.points!==void 0?e.annotations.points:[],i.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var i=e;if(i.tooltip.shared&&i.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(i.chart.type==="bar"&&i.plotOptions.bar.horizontal){if(i.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");i.yaxis[0].reversed&&(i.yaxis[0].opposite=!0),i.xaxis.tooltip.enabled=!1,i.yaxis[0].tooltip.enabled=!1,i.chart.zoom.enabled=!1}return i.chart.type!=="bar"&&i.chart.type!=="rangeBar"||i.tooltip.shared&&i.xaxis.crosshairs.width==="barWidth"&&i.series.length>1&&(i.xaxis.crosshairs.width="tickWidth"),i.chart.type!=="candlestick"&&i.chart.type!=="boxPlot"||i.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(i.chart.type," chart is not supported.")),i.yaxis[0].reversed=!1),i}}]),s}(),Lv=function(){function s(){Oe(this,s)}return Ne(s,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var i=this.globalVars(e);return this.initGlobalVars(i),i.initialConfig=pe.extend({},e),i.initialSeries=pe.clone(e.series),i.lastXAxis=pe.clone(i.initialConfig.xaxis),i.lastYAxis=pe.clone(i.initialConfig.yaxis),i}}]),s}(),$j=function(){function s(e){Oe(this,s),this.opts=e}return Ne(s,[{key:"init",value:function(){var e=new Mn(this.opts).init({responsiveOverride:!1});return{config:e,globals:new Lv().init(e)}}}]),s}(),wi=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return Ne(s,[{key:"clippedImgArea",value:function(e){var i=this.w,t=i.config,r=parseInt(i.globals.gridWidth,10),u=parseInt(i.globals.gridHeight,10),n=r>u?r:u,a=e.image,o=0,h=0;e.width===void 0&&e.height===void 0?t.fill.image.width!==void 0&&t.fill.image.height!==void 0?(o=t.fill.image.width+1,h=t.fill.image.height):(o=n+1,h=n):(o=e.width,h=e.height);var g=document.createElementNS(i.globals.SVGNS,"pattern");De.setAttrs(g,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:o+"px",height:h+"px"});var l=document.createElementNS(i.globals.SVGNS,"image");g.appendChild(l),l.setAttributeNS(window.SVG.xlink,"href",a),De.setAttrs(l,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:h+"px"}),l.style.opacity=e.opacity,i.globals.dom.elDefs.node.appendChild(g)}},{key:"getSeriesIndex",value:function(e){var i=this.w,t=i.config.chart.type;return(t==="bar"||t==="rangeBar")&&i.config.plotOptions.bar.distributed||t==="heatmap"||t==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%i.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,i){var t,r=this.w,u=null,n=null,a=Ku(e);try{for(a.s();!(t=a.n()).done;){var o=t.value;o>=i.threshold?(u===null||o>u)&&(u=o):(n===null||o<n)&&(n=o)}}catch(l){a.e(l)}finally{a.f()}u===null&&(u=i.threshold),n===null&&(n=i.threshold);var h=u-i.threshold+(i.threshold-n);h===0&&(h=1);var g=100-(i.threshold-n)/h*100;return[{offset:g=Math.max(0,Math.min(g,100)),color:i.colorAboveThreshold,opacity:r.config.fill.opacity},{offset:0,color:i.colorBelowThreshold,opacity:r.config.fill.opacity}]}},{key:"fillPath",value:function(e){var i,t,r,u=this.w;this.opts=e;var n,a,o,h=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var g=h.plotOptions.line.colors.colorAboveThreshold&&h.plotOptions.line.colors.colorBelowThreshold,l=this.getFillColors()[this.seriesIndex];u.globals.seriesColors[this.seriesIndex]!==void 0&&(l=u.globals.seriesColors[this.seriesIndex]),typeof l=="function"&&(l=l({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:u}));var c,d,F,p=e.fillType?e.fillType:this.getFillType(this.seriesIndex),f=Array.isArray(h.fill.opacity)?h.fill.opacity[this.seriesIndex]:h.fill.opacity,m=p==="gradient"||g;e.color&&(l=e.color),(i=u.config.series[this.seriesIndex])!==null&&i!==void 0&&(t=i.data)!==null&&t!==void 0&&(r=t[e.dataPointIndex])!==null&&r!==void 0&&r.fillColor&&(l=(c=u.config.series[this.seriesIndex])===null||c===void 0||(d=c.data)===null||d===void 0||(F=d[e.dataPointIndex])===null||F===void 0?void 0:F.fillColor),l||(l="#fff",console.warn("undefined color - ApexCharts"));var v=l;if(l.indexOf("rgb")===-1?l.indexOf("#")===-1?v=l:l.length<9&&(v=pe.hexToRgba(l,f)):l.indexOf("rgba")>-1?f=pe.getOpacityFromRGBA(l):v=pe.hexToRgba(pe.rgb2hex(l),f),e.opacity&&(f=e.opacity),p==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:l,fillOpacity:f,defaultColor:v})),m){var w=nr(h.fill.gradient.colorStops)||[],x=h.fill.gradient.type;g&&(w[this.seriesIndex]=this.computeColorStops(u.globals.series[this.seriesIndex],h.plotOptions.line.colors),x="vertical"),o=this.handleGradientFill({type:x,fillConfig:e.fillConfig,fillColor:l,fillOpacity:f,colorStops:w,i:this.seriesIndex})}if(p==="image"){var A=h.fill.image.src,b=e.patternID?e.patternID:"",y="pattern".concat(u.globals.cuid).concat(e.seriesNumber+1).concat(b);this.patternIDs.indexOf(y)===-1&&(this.clippedImgArea({opacity:f,image:Array.isArray(A)?e.seriesNumber<A.length?A[e.seriesNumber]:A[0]:A,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:y}),this.patternIDs.push(y)),n="url(#".concat(y,")")}else n=m?o:p==="pattern"?a:v;return e.solid&&(n=v),n}},{key:"getFillType",value:function(e){var i=this.w;return Array.isArray(i.config.fill.type)?i.config.fill.type[e]:i.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,i=e.config,t=this.opts,r=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors):i.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?r=e.globals.stroke.colors:r.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?r=e.globals.fill.colors:r.push(e.globals.fill.colors),t.fillColors!==void 0&&(r=[],Array.isArray(t.fillColors)?r=t.fillColors.slice():r.push(t.fillColors)),r}},{key:"handlePatternFill",value:function(e){var i=e.fillConfig,t=e.patternFill,r=e.fillColor,u=e.fillOpacity,n=e.defaultColor,a=this.w.config.fill;i&&(a=i);var o=this.opts,h=new De(this.ctx),g=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=r;return Array.isArray(a.pattern.style)?t=a.pattern.style[o.seriesNumber]!==void 0?h.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,l,g,u):n:t=h.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,g,u),t}},{key:"handleGradientFill",value:function(e){var i=e.type,t=e.fillColor,r=e.fillOpacity,u=e.fillConfig,n=e.colorStops,a=e.i,o=this.w.config.fill;u&&(o=Pe(Pe({},o),u));var h=this.opts,g=new De(this.ctx),l=new pe;i=i||o.gradient.type;var c,d=t,F=o.gradient.opacityFrom===void 0?r:Array.isArray(o.gradient.opacityFrom)?o.gradient.opacityFrom[a]:o.gradient.opacityFrom;d.indexOf("rgba")>-1&&(F=pe.getOpacityFromRGBA(d));var p=o.gradient.opacityTo===void 0?r:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[a]:o.gradient.opacityTo;if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)c=o.gradient.shade==="dark"?l.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),t.indexOf("rgb")>-1?pe.rgb2hex(t):t):l.shadeColor(parseFloat(o.gradient.shadeIntensity),t.indexOf("rgb")>-1?pe.rgb2hex(t):t);else if(o.gradient.gradientToColors[h.seriesNumber]){var f=o.gradient.gradientToColors[h.seriesNumber];c=f,f.indexOf("rgba")>-1&&(p=pe.getOpacityFromRGBA(f))}else c=t;if(o.gradient.gradientFrom&&(d=o.gradient.gradientFrom),o.gradient.gradientTo&&(c=o.gradient.gradientTo),o.gradient.inverseColors){var m=d;d=c,c=m}return d.indexOf("rgb")>-1&&(d=pe.rgb2hex(d)),c.indexOf("rgb")>-1&&(c=pe.rgb2hex(c)),g.drawGradient(i,d,c,F,p,h.size,o.gradient.stops,n,a)}}]),s}(),ju=function(){function s(e,i){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var i=0;i<=e.globals.series.length;i++)e.globals.markers.size[i]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(t){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e){var i=e.pointsPos,t=e.seriesIndex,r=e.j,u=e.pSize,n=e.alwaysDrawMarker,a=n!==void 0&&n,o=e.isVirtualPoint,h=o!==void 0&&o,g=this.w,l=t,c=i,d=null,F=new De(this.ctx),p=g.config.markers.discrete&&g.config.markers.discrete.length;if(Array.isArray(c.x))for(var f=0;f<c.x.length;f++){var m=void 0,v=r,w=!pe.isNumber(c.y[f]);g.globals.markers.largestSize===0&&g.globals.hasNullValues&&g.globals.series[l][r+1]!==null&&!h&&(w=!0),r===1&&f===0&&(v=0),r===1&&f===1&&(v=1);var x="apexcharts-marker";if(g.config.chart.type!=="line"&&g.config.chart.type!=="area"||g.globals.comboCharts||g.config.tooltip.intersect||(x+=" no-pointer-events"),(Array.isArray(g.config.markers.size)?g.globals.markers.size[t]>0:g.config.markers.size>0)||a||p){w||(x+=" w".concat(pe.randomId()));var A=this.getMarkerConfig({cssClass:x,seriesIndex:t,dataPointIndex:v});g.config.series[l].data[v]&&(g.config.series[l].data[v].fillColor&&(A.pointFillColor=g.config.series[l].data[v].fillColor),g.config.series[l].data[v].strokeColor&&(A.pointStrokeColor=g.config.series[l].data[v].strokeColor)),u!==void 0&&(A.pSize=u),(c.x[f]<-g.globals.markers.largestSize||c.x[f]>g.globals.gridWidth+g.globals.markers.largestSize||c.y[f]<-g.globals.markers.largestSize||c.y[f]>g.globals.gridHeight+g.globals.markers.largestSize)&&(A.pSize=0),!w&&((g.globals.markers.size[t]>0||a||p)&&!d&&(d=F.group({class:a||p?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(g.globals.cuid,")")),(m=F.drawMarker(c.x[f],c.y[f],A)).attr("rel",v),m.attr("j",v),m.attr("index",t),m.node.setAttribute("default-marker-size",A.pSize),new Fr(this.ctx).setSelectionFilter(m,t,v),this.addEvents(m),d&&d.add(m))}else g.globals.pointsArray[t]===void 0&&(g.globals.pointsArray[t]=[]),g.globals.pointsArray[t].push([c.x[f],c.y[f]])}return d}},{key:"getMarkerConfig",value:function(e){var i=e.cssClass,t=e.seriesIndex,r=e.dataPointIndex,u=r===void 0?null:r,n=e.radius,a=n===void 0?null:n,o=e.size,h=o===void 0?null:o,g=e.strokeWidth,l=g===void 0?null:g,c=this.w,d=this.getMarkerStyle(t),F=h===null?c.globals.markers.size[t]:h,p=c.config.markers;return u!==null&&p.discrete.length&&p.discrete.map(function(f){f.seriesIndex===t&&f.dataPointIndex===u&&(d.pointStrokeColor=f.strokeColor,d.pointFillColor=f.fillColor,F=f.size,d.pointShape=f.shape)}),{pSize:a===null?F:a,pRadius:a!==null?a:p.radius,pointStrokeWidth:l!==null?l:Array.isArray(p.strokeWidth)?p.strokeWidth[t]:p.strokeWidth,pointStrokeColor:d.pointStrokeColor,pointFillColor:d.pointFillColor,shape:d.pointShape||(Array.isArray(p.shape)?p.shape[t]:p.shape),class:i,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[t]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[t]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[t]:p.fillOpacity,seriesIndex:t}}},{key:"addEvents",value:function(e){var i=this.w,t=new De(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",i.config.markers.onClick),e.node.addEventListener("dblclick",i.config.markers.onDblClick),e.node.addEventListener("touchstart",t.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var i=this.w,t=i.globals.markers.colors,r=i.config.markers.strokeColor||i.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(r)?r[e]:r,pointFillColor:Array.isArray(t)?t[e]:t}}}]),s}(),Tv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return Ne(s,[{key:"draw",value:function(e,i,t){var r=this.w,u=new De(this.ctx),n=t.realIndex,a=t.pointsPos,o=t.zRatio,h=t.elParent,g=u.group({class:"apexcharts-series-markers apexcharts-series-".concat(r.config.chart.type)});if(g.attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),Array.isArray(a.x))for(var l=0;l<a.x.length;l++){var c=i+1,d=!0;i===0&&l===0&&(c=0),i===0&&l===1&&(c=1);var F=r.globals.markers.size[n];if(o!==1/0){var p=r.config.plotOptions.bubble;F=r.globals.seriesZ[n][c],p.zScaling&&(F/=o),p.minBubbleRadius&&F<p.minBubbleRadius&&(F=p.minBubbleRadius),p.maxBubbleRadius&&F>p.maxBubbleRadius&&(F=p.maxBubbleRadius)}var f=a.x[l],m=a.y[l];if(F=F||0,m!==null&&r.globals.series[n][c]!==void 0||(d=!1),d){var v=this.drawPoint(f,m,F,n,c,i);g.add(v)}h.add(g)}}},{key:"drawPoint",value:function(e,i,t,r,u,n){var a=this.w,o=r,h=new Eu(this.ctx),g=new Fr(this.ctx),l=new wi(this.ctx),c=new ju(this.ctx),d=new De(this.ctx),F=c.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:u,radius:a.config.chart.type==="bubble"||a.globals.comboCharts&&a.config.series[r]&&a.config.series[r].type==="bubble"?t:null}),p=l.fillPath({seriesNumber:r,dataPointIndex:u,color:F.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[r][n]}),f=d.drawMarker(e,i,F);if(a.config.series[o].data[u]&&a.config.series[o].data[u].fillColor&&(p=a.config.series[o].data[u].fillColor),f.attr({fill:p}),a.config.chart.dropShadow.enabled){var m=a.config.chart.dropShadow;g.dropShadow(f,m,r)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;h.animateMarker(f,v,a.globals.easing,function(){window.setTimeout(function(){h.animationCompleted(f)},100)})}return f.attr({rel:u,j:u,index:r,"default-marker-size":F.pSize}),g.setSelectionFilter(f,r,u),c.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(e){var i=this.w;return{y:e+=parseInt(i.config.dataLabels.style.fontSize,10)/4}}}]),s}(),lu=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"dataLabelsCorrection",value:function(e,i,t,r,u,n,a){var o=this.w,h=!1,g=new De(this.ctx).getTextRects(t,a),l=g.width,c=g.height;i<0&&(i=0),i>o.globals.gridHeight+c&&(i=o.globals.gridHeight+c/2),o.globals.dataLabelsRects[r]===void 0&&(o.globals.dataLabelsRects[r]=[]),o.globals.dataLabelsRects[r].push({x:e,y:i,width:l,height:c});var d=o.globals.dataLabelsRects[r].length-2,F=o.globals.lastDrawnDataLabelsIndexes[r]!==void 0?o.globals.lastDrawnDataLabelsIndexes[r][o.globals.lastDrawnDataLabelsIndexes[r].length-1]:0;if(o.globals.dataLabelsRects[r][d]!==void 0){var p=o.globals.dataLabelsRects[r][F];(e>p.x+p.width||i>p.y+p.height||i+c<p.y||e+l<p.x)&&(h=!0)}return(u===0||n)&&(h=!0),{x:e,y:i,textRects:g,drawnextLabel:h}}},{key:"drawDataLabel",value:function(e){var i=this,t=e.type,r=e.pos,u=e.i,n=e.j,a=e.isRangeStart,o=e.strokeWidth,h=o===void 0?2:o,g=this.w,l=new De(this.ctx),c=g.config.dataLabels,d=0,F=0,p=n,f=null;if(g.globals.collapsedSeriesIndices.indexOf(u)!==-1||!c.enabled||!Array.isArray(r.x))return f;f=l.group({class:"apexcharts-data-labels"});for(var m=0;m<r.x.length;m++)if(d=r.x[m]+c.offsetX,F=r.y[m]+c.offsetY+h,!isNaN(d)){n===1&&m===0&&(p=0),n===1&&m===1&&(p=1);var v=g.globals.series[u][p];t==="rangeArea"&&(v=a?g.globals.seriesRangeStart[u][p]:g.globals.seriesRangeEnd[u][p]);var w="",x=function(b){return g.config.dataLabels.formatter(b,{ctx:i.ctx,seriesIndex:u,dataPointIndex:p,w:g})};g.config.chart.type==="bubble"?(w=x(v=g.globals.seriesZ[u][p]),F=r.y[m],F=new Tv(this.ctx).centerTextInBubble(F,u,p).y):v!==void 0&&(w=x(v));var A=g.config.dataLabels.textAnchor;g.globals.isSlopeChart&&(A=p===0?"end":p===g.config.series[u].data.length-1?"start":"middle"),this.plotDataLabelsText({x:d,y:F,text:w,i:u,j:p,parent:f,offsetCorrection:!0,dataLabelsConfig:g.config.dataLabels,textAnchor:A})}return f}},{key:"plotDataLabelsText",value:function(e){var i=this.w,t=new De(this.ctx),r=e.x,u=e.y,n=e.i,a=e.j,o=e.text,h=e.textAnchor,g=e.fontSize,l=e.parent,c=e.dataLabelsConfig,d=e.color,F=e.alwaysDrawDataLabel,p=e.offsetCorrection,f=e.className,m=null;if(Array.isArray(i.config.dataLabels.enabledOnSeries)&&i.config.dataLabels.enabledOnSeries.indexOf(n)<0)return m;var v={x:r,y:u,drawnextLabel:!0,textRects:null};p&&(v=this.dataLabelsCorrection(r,u,o,n,a,F,parseInt(c.style.fontSize,10))),i.globals.zoomed||(r=v.x,u=v.y),v.textRects&&(r<-20-v.textRects.width||r>i.globals.gridWidth+v.textRects.width+30)&&(o="");var w=i.globals.dataLabels.style.colors[n];((i.config.chart.type==="bar"||i.config.chart.type==="rangeBar")&&i.config.plotOptions.bar.distributed||i.config.dataLabels.distributed)&&(w=i.globals.dataLabels.style.colors[a]),typeof w=="function"&&(w=w({series:i.globals.series,seriesIndex:n,dataPointIndex:a,w:i})),d&&(w=d);var x=c.offsetX,A=c.offsetY;if(i.config.chart.type!=="bar"&&i.config.chart.type!=="rangeBar"||(x=0,A=0),i.globals.isSlopeChart&&(a!==0&&(x=-2*c.offsetX+5),a!==0&&a!==i.config.series[n].data.length-1&&(x=0)),v.drawnextLabel){if((m=t.drawText({width:100,height:parseInt(c.style.fontSize,10),x:r+x,y:u+A,foreColor:w,textAnchor:h||c.textAnchor,text:o,fontSize:g||c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:r,cy:u}),c.dropShadow.enabled){var b=c.dropShadow;new Fr(this.ctx).dropShadow(m,b)}l.add(m),i.globals.lastDrawnDataLabelsIndexes[n]===void 0&&(i.globals.lastDrawnDataLabelsIndexes[n]=[]),i.globals.lastDrawnDataLabelsIndexes[n].push(a)}return m}},{key:"addBackgroundToDataLabel",value:function(e,i){var t=this.w,r=t.config.dataLabels.background,u=r.padding,n=r.padding/2,a=i.width,o=i.height,h=new De(this.ctx).drawRect(i.x-u,i.y-n/2,a+2*u,o+n,r.borderRadius,t.config.chart.background!=="transparent"&&t.config.chart.background?t.config.chart.background:"#fff",r.opacity,r.borderWidth,r.borderColor);return r.dropShadow.enabled&&new Fr(this.ctx).dropShadow(h,r.dropShadow),h}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),t=0;t<i.length;t++){var r=i[t],u=r.getBBox(),n=null;if(u.width&&u.height&&(n=this.addBackgroundToDataLabel(r,u)),n){r.parentNode.insertBefore(n.node,r);var a=r.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?n.animate().attr({fill:a}):n.attr({fill:a}),r.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),t=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),r=0;r<i.length;r++)t&&t.insertBefore(i[r],t.nextSibling)}}]),s}(),ni=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return Ne(s,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(pe.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var i=this.getSeriesByName(e),t=parseInt(i.getAttribute("data:realIndex"),10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:t}}},{key:"addCollapsedClassToSeries",value:function(e,i){var t=this.w;function r(u){for(var n=0;n<u.length;n++)u[n].index===i&&e.node.classList.add("apexcharts-series-collapsed")}r(t.globals.collapsedSeries),r(t.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var i=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(i.realIndex,i.isHidden),i.isHidden}},{key:"showSeries",value:function(e){var i=this.isSeriesHidden(e);i.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(i.realIndex,!0)}},{key:"hideSeries",value:function(e){var i=this.isSeriesHidden(e);i.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(i.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=this.w,u=pe.clone(r.globals.initialSeries);r.globals.previousPaths=[],t?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):u=this.emptyCollapsedSeries(u),r.config.series=u,e&&(i&&(r.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(u,r.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var i=this.w,t=0;t<e.length;t++)i.globals.collapsedSeriesIndices.indexOf(t)>-1&&(e[t].data=[]);return e}},{key:"highlightSeries",value:function(e){var i=this.w,t=this.getSeriesByName(e),r=parseInt(t==null?void 0:t.getAttribute("data:realIndex"),10),u=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),n=null,a=null,o=null;if(i.globals.axisCharts||i.config.chart.type==="radialBar")if(i.globals.axisCharts){n=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(r,"']")),a=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(r,"']"));var h=i.globals.seriesYAxisReverseMap[r];o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(h,"']"))}else n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"']"));else n=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(r+1,"'] path"));for(var g=0;g<u.length;g++)u[g].classList.add(this.legendInactiveClass);if(n)i.globals.axisCharts||n.parentNode.classList.remove(this.legendInactiveClass),n.classList.remove(this.legendInactiveClass),a!==null&&a.classList.remove(this.legendInactiveClass),o!==null&&o.classList.remove(this.legendInactiveClass);else for(var l=0;l<u.length;l++)u[l].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,i){var t=this.w;i||(i=e.target);var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var u=parseInt(i.getAttribute("rel"),10)-1;this.highlightSeries(t.globals.seriesNames[u])}else if(e.type==="mouseout")for(var n=0;n<r.length;n++)r[n].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,i){var t=this,r=this.w,u=r.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),n=function(h){for(var g=0;g<u.length;g++)u[g].classList[h](t.legendInactiveClass)};if(e.type==="mousemove"){var a=parseInt(i.getAttribute("rel"),10)-1;n("add");var o=r.config.plotOptions.heatmap.colorScale.ranges;(function(h,g){for(var l=0;l<u.length;l++){var c=Number(u[l].getAttribute("val"));c>=h.from&&(c<h.to||h.to===g&&c===g)&&u[l].classList.remove(t.legendInactiveClass)}})(o[a],o.reduce(function(h,g){return Math.max(h,g.to)},0))}else e.type==="mouseout"&&n("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=this.w,r=0;if(t.config.series.length>1){for(var u=t.config.series.map(function(a,o){return a.data&&a.data.length>0&&t.globals.collapsedSeriesIndices.indexOf(o)===-1&&(!t.globals.comboCharts||i.length===0||i.length&&i.indexOf(t.config.series[o].type)>-1)?o:-1}),n=e==="asc"?0:u.length-1;e==="asc"?n<u.length:n>=0;e==="asc"?n++:n--)if(u[n]!==-1){r=u[n];break}}return r}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,i){return e.type==="bar"||e.type==="column"?i:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,i){return i})}},{key:"getPreviousPaths",value:function(){var e=this.w;function i(n,a,o){for(var h=n[a].childNodes,g={type:o,paths:[],realIndex:n[a].getAttribute("data:realIndex")},l=0;l<h.length;l++)if(h[l].hasAttribute("pathTo")){var c=h[l].getAttribute("pathTo");g.paths.push({d:c})}e.globals.previousPaths.push(g)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(n){for(var a,o=(a=n,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),h=0;h<o.length;h++)i(o,h,n)});var t=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(t.length>0)for(var r=function(n){for(var a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(n,"'] rect")),o=[],h=function(l){var c=function(F){return a[l].getAttribute(F)},d={x:parseFloat(c("x")),y:parseFloat(c("y")),width:parseFloat(c("width")),height:parseFloat(c("height"))};o.push({rect:d,color:a[l].getAttribute("color")})},g=0;g<a.length;g++)h(g);e.globals.previousPaths.push(o)},u=0;u<t.length;u++)r(u);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,i=e.config.noData,t=new De(this.ctx),r=e.globals.svgWidth/2,u=e.globals.svgHeight/2,n="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,i.align==="left"?(r=10,n="start"):i.align==="right"&&(r=e.globals.svgWidth-10,n="end"),i.verticalAlign==="top"?u=50:i.verticalAlign==="bottom"&&(u=e.globals.svgHeight-50),r+=i.offsetX,u=u+parseInt(i.style.fontSize,10)+2+i.offsetY,i.text!==void 0&&i.text!==""){var a=t.drawText({x:r,y:u,text:i.text,textAnchor:n,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,foreColor:i.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var i=this.w,t=0;t<e.length;t++)if(e[t].length===0)for(var r=0;r<e[i.globals.maxValsInArrayIndex].length;r++)e[t].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,i=this.w,t=this.filteredSeriesX(),r=0;r<t.length-1;r++)if(t[r][0]!==t[r+1][0]){e=!1;break}return i.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(i){return i.length>0?i:[]});return e}}]),s}(),Uh=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Gt(this.ctx)}return Ne(s,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),i=new ni(this.ctx);if(this.activeSeriesIndex=i.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),i=new ni(this.ctx);if(this.activeSeriesIndex=i.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,i){for(var t=this.w.config,r=this.w.globals,u=t.chart.type==="boxPlot"||t.series[i].type==="boxPlot",n=0;n<e[i].data.length;n++)if(e[i].data[n][1]!==void 0&&(Array.isArray(e[i].data[n][1])&&e[i].data[n][1].length===4&&!u?this.twoDSeries.push(pe.parseNumber(e[i].data[n][1][3])):e[i].data[n].length>=5?this.twoDSeries.push(pe.parseNumber(e[i].data[n][4])):this.twoDSeries.push(pe.parseNumber(e[i].data[n][1])),r.dataFormatXNumeric=!0),t.xaxis.type==="datetime"){var a=new Date(e[i].data[n][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[i].data[n][0]);for(var o=0;o<e[i].data.length;o++)e[i].data[o][2]!==void 0&&(this.threeDSeries.push(e[i].data[o][2]),r.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,i){var t=this.w.config,r=this.w.globals,u=new gr(this.ctx),n=i;r.collapsedSeriesIndices.indexOf(i)>-1&&(n=this.activeSeriesIndex);for(var a=0;a<e[i].data.length;a++)e[i].data[a].y!==void 0&&(Array.isArray(e[i].data[a].y)?this.twoDSeries.push(pe.parseNumber(e[i].data[a].y[e[i].data[a].y.length-1])):this.twoDSeries.push(pe.parseNumber(e[i].data[a].y))),e[i].data[a].goals!==void 0&&Array.isArray(e[i].data[a].goals)?(this.seriesGoals[i]===void 0&&(this.seriesGoals[i]=[]),this.seriesGoals[i].push(e[i].data[a].goals)):(this.seriesGoals[i]===void 0&&(this.seriesGoals[i]=[]),this.seriesGoals[i].push(null));for(var o=0;o<e[n].data.length;o++){var h=typeof e[n].data[o].x=="string",g=Array.isArray(e[n].data[o].x),l=!g&&!!u.isValidDate(e[n].data[o].x);if(h||l)if(h||t.xaxis.convertedCatToNumeric){var c=r.isBarHorizontal&&r.isRangeData;t.xaxis.type!=="datetime"||c?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[n].data[o].x),isNaN(e[n].data[o].x)||this.w.config.xaxis.type==="category"||typeof e[n].data[o].x=="string"||(r.isXNumeric=!0)):this.twoDSeriesX.push(u.parseDate(e[n].data[o].x))}else t.xaxis.type==="datetime"?this.twoDSeriesX.push(u.parseDate(e[n].data[o].x.toString())):(r.dataFormatXNumeric=!0,r.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[n].data[o].x)));else g?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[n].data[o].x)):(r.isXNumeric=!0,r.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[n].data[o].x))}if(e[i].data[0]&&e[i].data[0].z!==void 0){for(var d=0;d<e[i].data.length;d++)this.threeDSeries.push(e[i].data[d].z);r.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,i){var t=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleRangeDataFormat("array",e,i):this.isFormatXY()&&(r=this.handleRangeDataFormat("xy",e,i)),t.seriesRangeStart.push(r.start===void 0?[]:r.start),t.seriesRangeEnd.push(r.end===void 0?[]:r.end),t.seriesRange.push(r.rangeUniques),t.seriesRange.forEach(function(u,n){u&&u.forEach(function(a,o){a.y.forEach(function(h,g){for(var l=0;l<a.y.length;l++)if(g!==l){var c=h.y1,d=h.y2,F=a.y[l].y1;c<=a.y[l].y2&&F<=d&&(a.overlaps.indexOf(h.rangeName)<0&&a.overlaps.push(h.rangeName),a.overlaps.indexOf(a.y[l].rangeName)<0&&a.overlaps.push(a.y[l].rangeName))}})})}),r}},{key:"handleCandleStickBoxData",value:function(e,i){var t=this.w.globals,r={};return this.isFormat2DArray()?r=this.handleCandleStickBoxDataFormat("array",e,i):this.isFormatXY()&&(r=this.handleCandleStickBoxDataFormat("xy",e,i)),t.seriesCandleO[i]=r.o,t.seriesCandleH[i]=r.h,t.seriesCandleM[i]=r.m,t.seriesCandleL[i]=r.l,t.seriesCandleC[i]=r.c,r}},{key:"handleRangeDataFormat",value:function(e,i,t){var r=[],u=[],n=i[t].data.filter(function(g,l,c){return l===c.findIndex(function(d){return d.x===g.x})}).map(function(g,l){return{x:g.x,overlaps:[],y:[]}});if(e==="array")for(var a=0;a<i[t].data.length;a++)Array.isArray(i[t].data[a])?(r.push(i[t].data[a][1][0]),u.push(i[t].data[a][1][1])):(r.push(i[t].data[a]),u.push(i[t].data[a]));else if(e==="xy")for(var o=function(g){var l=Array.isArray(i[t].data[g].y),c=pe.randomId(),d=i[t].data[g].x,F={y1:l?i[t].data[g].y[0]:i[t].data[g].y,y2:l?i[t].data[g].y[1]:i[t].data[g].y,rangeName:c};i[t].data[g].rangeName=c;var p=n.findIndex(function(f){return f.x===d});n[p].y.push(F),r.push(F.y1),u.push(F.y2)},h=0;h<i[t].data.length;h++)o(h);return{start:r,end:u,rangeUniques:n}}},{key:"handleCandleStickBoxDataFormat",value:function(e,i,t){var r=this.w,u=r.config.chart.type==="boxPlot"||r.config.series[t].type==="boxPlot",n=[],a=[],o=[],h=[],g=[];if(e==="array")if(u&&i[t].data[0].length===6||!u&&i[t].data[0].length===5)for(var l=0;l<i[t].data.length;l++)n.push(i[t].data[l][1]),a.push(i[t].data[l][2]),u?(o.push(i[t].data[l][3]),h.push(i[t].data[l][4]),g.push(i[t].data[l][5])):(h.push(i[t].data[l][3]),g.push(i[t].data[l][4]));else for(var c=0;c<i[t].data.length;c++)Array.isArray(i[t].data[c][1])&&(n.push(i[t].data[c][1][0]),a.push(i[t].data[c][1][1]),u?(o.push(i[t].data[c][1][2]),h.push(i[t].data[c][1][3]),g.push(i[t].data[c][1][4])):(h.push(i[t].data[c][1][2]),g.push(i[t].data[c][1][3])));else if(e==="xy")for(var d=0;d<i[t].data.length;d++)Array.isArray(i[t].data[d].y)&&(n.push(i[t].data[d].y[0]),a.push(i[t].data[d].y[1]),u?(o.push(i[t].data[d].y[2]),h.push(i[t].data[d].y[3]),g.push(i[t].data[d].y[4])):(h.push(i[t].data[d].y[2]),g.push(i[t].data[d].y[3])));return{o:n,h:a,m:o,l:h,c:g}}},{key:"parseDataAxisCharts",value:function(e){var i=this,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,r=this.w.config,u=this.w.globals,n=new gr(t),a=r.labels.length>0?r.labels.slice():r.xaxis.categories.slice();u.isRangeBar=r.chart.type==="rangeBar"&&u.isBarHorizontal,u.hasXaxisGroups=r.xaxis.type==="category"&&r.xaxis.group.groups.length>0,u.hasXaxisGroups&&(u.groups=r.xaxis.group.groups),e.forEach(function(d,F){d.name!==void 0?u.seriesNames.push(d.name):u.seriesNames.push("series-"+parseInt(F+1,10))}),this.coreUtils.setSeriesYAxisMappings();var o=[],h=nr(new Set(r.series.map(function(d){return d.group})));r.series.forEach(function(d,F){var p=h.indexOf(d.group);o[p]||(o[p]=[]),o[p].push(u.seriesNames[F])}),u.seriesGroups=o;for(var g=function(){for(var d=0;d<a.length;d++)if(typeof a[d]=="string"){if(!n.isValidDate(a[d]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");i.twoDSeriesX.push(n.parseDate(a[d]))}else i.twoDSeriesX.push(a[d])},l=0;l<e.length;l++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[l].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(r.chart.type!=="rangeBar"&&r.chart.type!=="rangeArea"&&e[l].type!=="rangeBar"&&e[l].type!=="rangeArea"||(u.isRangeData=!0,r.chart.type!=="rangeBar"&&r.chart.type!=="rangeArea"||this.handleRangeData(e,l)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,l):this.isFormatXY()&&this.handleFormatXY(e,l),r.chart.type!=="candlestick"&&e[l].type!=="candlestick"&&r.chart.type!=="boxPlot"&&e[l].type!=="boxPlot"||this.handleCandleStickBoxData(e,l),u.series.push(this.twoDSeries),u.labels.push(this.twoDSeriesX),u.seriesX.push(this.twoDSeriesX),u.seriesGoals=this.seriesGoals,l!==this.activeSeriesIndex||this.fallbackToCategory||(u.isXNumeric=!0);else{r.xaxis.type==="datetime"?(u.isXNumeric=!0,g(),u.seriesX.push(this.twoDSeriesX)):r.xaxis.type==="numeric"&&(u.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,u.seriesX.push(this.twoDSeriesX))),u.labels.push(this.twoDSeriesX);var c=e[l].data.map(function(d){return pe.parseNumber(d)});u.series.push(c)}u.seriesZ.push(this.threeDSeries),e[l].color!==void 0?u.seriesColors.push(e[l].color):u.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var i=this.w.globals,t=this.w.config;i.series=e.slice(),i.seriesNames=t.labels.slice();for(var r=0;r<i.series.length;r++)i.seriesNames[r]===void 0&&i.seriesNames.push("series-"+(r+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var i=this.w.config,t=this.w.globals;i.xaxis.categories.length>0?t.labels=i.xaxis.categories:i.labels.length>0?t.labels=i.labels.slice():this.fallbackToCategory?(t.labels=t.labels[0],t.seriesRange.length&&(t.seriesRange.map(function(r){r.forEach(function(u){t.labels.indexOf(u.x)<0&&u.x&&t.labels.push(u.x)})}),t.labels=Array.from(new Set(t.labels.map(JSON.stringify)),JSON.parse)),i.xaxis.convertedCatToNumeric&&(new Dn(i).convertCatToNumericXaxis(i,this.ctx,t.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var i=this.w.globals,t=this.w.config,r=[];if(i.axisCharts){if(i.series.length>0)if(this.isFormatXY())for(var u=t.series.map(function(l,c){return l.data.filter(function(d,F,p){return p.findIndex(function(f){return f.x===d.x})===F})}),n=u.reduce(function(l,c,d,F){return F[l].length>c.length?l:d},0),a=0;a<u[n].length;a++)r.push(a+1);else for(var o=0;o<i.series[i.maxValsInArrayIndex].length;o++)r.push(o+1);i.seriesX=[];for(var h=0;h<e.length;h++)i.seriesX.push(r);this.w.globals.isBarHorizontal||(i.isXNumeric=!0)}if(r.length===0){r=i.axisCharts?[]:i.series.map(function(l,c){return c+1});for(var g=0;g<e.length;g++)i.seriesX.push(r)}i.labels=r,t.xaxis.convertedCatToNumeric&&(i.categoryLabels=r.map(function(l){return t.xaxis.labels.formatter(l)})),i.noLabelsProvided=!0}},{key:"parseData",value:function(e){var i=this.w,t=i.config,r=i.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),r.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),t.chart.stacked){var u=new ni(this.ctx);r.series=u.setNullSeriesToZeroValues(r.series)}this.coreUtils.getSeriesTotals(),r.axisCharts&&(r.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),r.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),r.dataFormatXNumeric||r.isXNumeric&&(t.xaxis.type!=="numeric"||t.labels.length!==0||t.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var n=this.coreUtils.getCategoryLabels(r.labels),a=0;a<n.length;a++)if(Array.isArray(n[a])){r.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,i=[];e.globals.seriesYAxisMap.forEach(function(t,r){var u=0;t.forEach(function(n){e.globals.collapsedSeriesIndices.indexOf(n)!==-1&&u++}),u>0&&u==t.length&&i.push(r)}),e.globals.ignoreYAxisIndexes=i.map(function(t){return t})}}]),s}(),hn=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"svgStringToNode",value:function(e){return new DOMParser().parseFromString(e,"image/svg+xml").documentElement}},{key:"scaleSvgNode",value:function(e,i){var t=parseFloat(e.getAttributeNS(null,"width")),r=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",t*i),e.setAttributeNS(null,"height",r*i),e.setAttributeNS(null,"viewBox","0 0 "+t+" "+r)}},{key:"getSvgString",value:function(e){var i=this;return new Promise(function(t){var r=i.w,u=e||r.config.chart.toolbar.export.scale||r.config.chart.toolbar.export.width/r.globals.svgWidth;u||(u=1);var n=r.globals.svgWidth*u,a=r.globals.svgHeight*u,o=r.globals.dom.elWrap.cloneNode(!0);o.style.width=n+"px",o.style.height=a+"px";var h=new XMLSerializer().serializeToString(o),g=`
        <svg xmlns="http://www.w3.org/2000/svg"
          version="1.1"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          class="apexcharts-svg"
          xmlns:data="ApexChartsNS"
          transform="translate(0, 0)"
          width="`.concat(r.globals.svgWidth,'px" height="').concat(r.globals.svgHeight,`px">
          <foreignObject width="100%" height="100%">
            <div xmlns="http://www.w3.org/1999/xhtml" style="width:`).concat(n,"px; height:").concat(a,`px;">
            <style type="text/css">
              .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
                display: none;
              }
            </style>
              `).concat(h,`
            </div>
          </foreignObject>
        </svg>
      `),l=i.svgStringToNode(g);u!==1&&i.scaleSvgNode(l,u),i.convertImagesToBase64(l).then(function(){g=new XMLSerializer().serializeToString(l),t(g.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var i=this,t=e.getElementsByTagName("image"),r=Array.from(t).map(function(u){var n=u.getAttributeNS("http://www.w3.org/1999/xlink","href");return n&&!n.startsWith("data:")?i.getBase64FromUrl(n).then(function(a){u.setAttributeNS("http://www.w3.org/1999/xlink","href",a)}).catch(function(a){console.error("Error converting image to base64:",a)}):Promise.resolve()});return Promise.all(r)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(i,t){var r=new Image;r.crossOrigin="Anonymous",r.onload=function(){var u=document.createElement("canvas");u.width=r.width,u.height=r.height,u.getContext("2d").drawImage(r,0,0),i(u.toDataURL())},r.onerror=t,r.src=e})}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(i){e.getSvgString().then(function(t){var r=new Blob([t],{type:"image/svg+xml;charset=utf-8"});i(URL.createObjectURL(r))})})}},{key:"dataURI",value:function(e){var i=this;return new Promise(function(t){var r=i.w,u=e?e.scale||e.width/r.globals.svgWidth:1,n=document.createElement("canvas");n.width=r.globals.svgWidth*u,n.height=parseInt(r.globals.dom.elWrap.style.height,10)*u;var a=r.config.chart.background!=="transparent"&&r.config.chart.background?r.config.chart.background:"#fff",o=n.getContext("2d");o.fillStyle=a,o.fillRect(0,0,n.width*u,n.height*u),i.getSvgString(u).then(function(h){var g="data:image/svg+xml,"+encodeURIComponent(h),l=new Image;l.crossOrigin="anonymous",l.onload=function(){if(o.drawImage(l,0,0),n.msToBlob){var c=n.msToBlob();t({blob:c})}else{var d=n.toDataURL("image/png");t({imgURI:d})}},l.src=g})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(i){e.triggerDownload(i,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,i=this.w.config.chart.toolbar.export.scale,t=this.w.config.chart.toolbar.export.width,r=i?{scale:i}:t?{width:t}:void 0;this.dataURI(r).then(function(u){var n=u.imgURI,a=u.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(n,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var i=this,t=e.series,r=e.fileName,u=e.columnDelimiter,n=u===void 0?",":u,a=e.lineDelimiter,o=a===void 0?`
`:a,h=this.w;t||(t=h.config.series);var g=[],l=[],c="",d=h.globals.series.map(function(A,b){return h.globals.collapsedSeriesIndices.indexOf(b)===-1?A:[]}),F=function(A){return typeof h.config.chart.toolbar.export.csv.categoryFormatter=="function"?h.config.chart.toolbar.export.csv.categoryFormatter(A):h.config.xaxis.type==="datetime"&&String(A).length>=10?new Date(A).toDateString():pe.isNumber(A)?A:A.split(n).join("")},p=function(A){return typeof h.config.chart.toolbar.export.csv.valueFormatter=="function"?h.config.chart.toolbar.export.csv.valueFormatter(A):A},f=Math.max.apply(Math,nr(t.map(function(A){return A.data?A.data.length:0}))),m=new Uh(this.ctx),v=new x0(this.ctx),w=function(A){var b="";if(h.globals.axisCharts){if(h.config.xaxis.type==="category"||h.config.xaxis.convertedCatToNumeric)if(h.globals.isBarHorizontal){var y=h.globals.yLabelFormatters[0],k=new ni(i.ctx).getActiveConfigSeriesIndex();b=y(h.globals.labels[A],{seriesIndex:k,dataPointIndex:A,w:h})}else b=v.getLabel(h.globals.labels,h.globals.timescaleLabels,0,A).text;h.config.xaxis.type==="datetime"&&(h.config.xaxis.categories.length?b=h.config.xaxis.categories[A]:h.config.labels.length&&(b=h.config.labels[A]))}else b=h.config.labels[A];return b===null?"nullvalue":(Array.isArray(b)&&(b=b.join(" ")),pe.isNumber(b)?b:b.split(n).join(""))},x=function(A,b){if(g.length&&b===0&&l.push(g.join(n)),A.data){A.data=A.data.length&&A.data||nr(Array(f)).map(function(){return""});for(var y=0;y<A.data.length;y++){g=[];var k=w(y);if(k!=="nullvalue"){if(k||(m.isFormatXY()?k=t[b].data[y].x:m.isFormat2DArray()&&(k=t[b].data[y]?t[b].data[y][0]:"")),b===0){g.push(F(k));for(var C=0;C<h.globals.series.length;C++){var D,T=m.isFormatXY()?(D=t[C].data[y])===null||D===void 0?void 0:D.y:d[C][y];g.push(p(T))}}(h.config.chart.type==="candlestick"||A.type&&A.type==="candlestick")&&(g.pop(),g.push(h.globals.seriesCandleO[b][y]),g.push(h.globals.seriesCandleH[b][y]),g.push(h.globals.seriesCandleL[b][y]),g.push(h.globals.seriesCandleC[b][y])),(h.config.chart.type==="boxPlot"||A.type&&A.type==="boxPlot")&&(g.pop(),g.push(h.globals.seriesCandleO[b][y]),g.push(h.globals.seriesCandleH[b][y]),g.push(h.globals.seriesCandleM[b][y]),g.push(h.globals.seriesCandleL[b][y]),g.push(h.globals.seriesCandleC[b][y])),h.config.chart.type==="rangeBar"&&(g.pop(),g.push(h.globals.seriesRangeStart[b][y]),g.push(h.globals.seriesRangeEnd[b][y])),g.length&&l.push(g.join(n))}}}};g.push(h.config.chart.toolbar.export.csv.headerCategory),h.config.chart.type==="boxPlot"?(g.push("minimum"),g.push("q1"),g.push("median"),g.push("q3"),g.push("maximum")):h.config.chart.type==="candlestick"?(g.push("open"),g.push("high"),g.push("low"),g.push("close")):h.config.chart.type==="rangeBar"?(g.push("minimum"),g.push("maximum")):t.map(function(A,b){var y=(A.name?A.name:"series-".concat(b))+"";h.globals.axisCharts&&g.push(y.split(n).join("")?y.split(n).join(""):"series-".concat(b))}),h.globals.axisCharts||(g.push(h.config.chart.toolbar.export.csv.headerValue),l.push(g.join(n))),h.globals.allSeriesHasEqualX||!h.globals.axisCharts||h.config.xaxis.categories.length||h.config.labels.length?t.map(function(A,b){h.globals.axisCharts?x(A,b):((g=[]).push(F(h.globals.labels[b])),g.push(p(d[b])),l.push(g.join(n)))}):function(){var A=new Set,b={};t.forEach(function(y,k){y==null||y.data.forEach(function(C){var D,T;if(m.isFormatXY())D=C.x,T=C.y;else{if(!m.isFormat2DArray())return;D=C[0],T=C[1]}b[D]||(b[D]=Array(t.length).fill("")),b[D][k]=p(T),A.add(D)})}),g.length&&l.push(g.join(n)),Array.from(A).sort().forEach(function(y){l.push([F(y),b[y].join(n)])})}(),c+=l.join(o),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+c),r||h.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,i,t){var r=document.createElement("a");r.href=e,r.download=(i||this.w.globals.chartID)+t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}}]),s}(),_n=function(){function s(e,i){Oe(this,s),this.ctx=e,this.elgrid=i,this.w=e.w;var t=this.w;this.axesUtils=new x0(e),this.xaxisLabels=t.globals.labels.slice(),t.globals.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.globals.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.globals.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=t.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}return Ne(s,[{key:"drawXaxis",value:function(){var e=this.w,i=new De(this.ctx),t=i.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});t.add(r);for(var u=[],n=0;n<this.xaxisLabels.length;n++)u.push(this.xaxisLabels[n]);if(this.drawXAxisLabelAndGroup(!0,i,r,u,e.globals.isXNumeric,function(F,p){return p}),e.globals.hasXaxisGroups){var a=e.globals.groups;u=[];for(var o=0;o<a.length;o++)u.push(a[o].title);var h={};e.config.xaxis.group.style&&(h.xaxisFontSize=e.config.xaxis.group.style.fontSize,h.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,h.xaxisForeColors=e.config.xaxis.group.style.colors,h.fontWeight=e.config.xaxis.group.style.fontWeight,h.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,i,r,u,!1,function(F,p){return a[F].cols*p},h)}if(e.config.xaxis.title.text!==void 0){var g=i.group({class:"apexcharts-xaxis-title"}),l=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});g.add(l),t.add(g)}if(e.config.xaxis.axisBorder.show){var c=e.globals.barPadForNumericAxis,d=i.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-c,this.offY,this.xaxisBorderWidth+c,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(d):t.add(d)}return t}},{key:"drawXAxisLabelAndGroup",value:function(e,i,t,r,u,n){var a,o=this,h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},g=[],l=[],c=this.w,d=h.xaxisFontSize||this.xaxisFontSize,F=h.xaxisFontFamily||this.xaxisFontFamily,p=h.xaxisForeColors||this.xaxisForeColors,f=h.fontWeight||c.config.xaxis.labels.style.fontWeight,m=h.cssClass||c.config.xaxis.labels.style.cssClass,v=c.globals.padHorizontal,w=r.length,x=c.config.xaxis.type==="category"?c.globals.dataPoints:w;if(x===0&&w>x&&(x=w),u){var A=Math.max(Number(c.config.xaxis.tickAmount)||1,x>1?x-1:x);a=c.globals.gridWidth/Math.min(A,w-1),v=v+n(0,a)/2+c.config.xaxis.labels.offsetX}else a=c.globals.gridWidth/x,v=v+n(0,a)+c.config.xaxis.labels.offsetX;for(var b=function(k){var C=v-n(k,a)/2+c.config.xaxis.labels.offsetX;k===0&&w===1&&a/2===v&&x===1&&(C=c.globals.gridWidth/2);var D=o.axesUtils.getLabel(r,c.globals.timescaleLabels,C,k,g,d,e),T=28;if(c.globals.rotateXLabels&&e&&(T=22),c.config.xaxis.title.text&&c.config.xaxis.position==="top"&&(T+=parseFloat(c.config.xaxis.title.style.fontSize)+2),e||(T=T+parseFloat(d)+(c.globals.xAxisLabelsHeight-c.globals.xAxisGroupLabelsHeight)+(c.globals.rotateXLabels?10:0)),D=c.config.xaxis.tickAmount!==void 0&&c.config.xaxis.tickAmount!=="dataPoints"&&c.config.xaxis.type!=="datetime"?o.axesUtils.checkLabelBasedOnTickamount(k,D,w):o.axesUtils.checkForOverflowingLabels(k,D,w,g,l),c.config.xaxis.labels.show){var S=i.drawText({x:D.x,y:o.offY+c.config.xaxis.labels.offsetY+T-(c.config.xaxis.position==="top"?c.globals.xAxisHeight+c.config.xaxis.axisTicks.height-2:0),text:D.text,textAnchor:"middle",fontWeight:D.isBold?600:f,fontSize:d,fontFamily:F,foreColor:Array.isArray(p)?e&&c.config.xaxis.convertedCatToNumeric?p[c.globals.minX+k-1]:p[k]:p,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+m});if(t.add(S),S.on("click",function(R){if(typeof c.config.chart.events.xAxisLabelClick=="function"){var O=Object.assign({},c,{labelIndex:k});c.config.chart.events.xAxisLabelClick(R,o.ctx,O)}}),e){var M=document.createElementNS(c.globals.SVGNS,"title");M.textContent=Array.isArray(D.text)?D.text.join(" "):D.text,S.node.appendChild(M),D.text!==""&&(g.push(D.text),l.push(D))}}k<w-1&&(v+=n(k+1,a))},y=0;y<=w-1;y++)b(y)}},{key:"drawXaxisInversed",value:function(e){var i,t,r=this,u=this.w,n=new De(this.ctx),a=u.config.yaxis[0].opposite?u.globals.translateYAxisX[e]:0,o=n.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),h=n.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});o.add(h);var g=[];if(u.config.yaxis[e].show)for(var l=0;l<this.xaxisLabels.length;l++)g.push(this.xaxisLabels[l]);i=u.globals.gridHeight/g.length,t=-i/2.2;var c=u.globals.yLabelFormatters[0],d=u.config.yaxis[0].labels;if(d.show)for(var F=function(A){var b=g[A]===void 0?"":g[A];b=c(b,{seriesIndex:e,dataPointIndex:A,w:u});var y=r.axesUtils.getYAxisForeColor(d.style.colors,e),k=0;Array.isArray(b)&&(k=b.length/2*parseInt(d.style.fontSize,10));var C=d.offsetX-15,D="end";r.yaxis.opposite&&(D="start"),u.config.yaxis[0].labels.align==="left"?(C=d.offsetX,D="start"):u.config.yaxis[0].labels.align==="center"?(C=d.offsetX,D="middle"):u.config.yaxis[0].labels.align==="right"&&(D="end");var T=n.drawText({x:C,y:t+i+d.offsetY-k,text:b,textAnchor:D,foreColor:Array.isArray(y)?y[A]:y,fontSize:d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.style.cssClass,maxWidth:d.maxWidth});h.add(T),T.on("click",function(R){if(typeof u.config.chart.events.xAxisLabelClick=="function"){var O=Object.assign({},u,{labelIndex:A});u.config.chart.events.xAxisLabelClick(R,r.ctx,O)}});var S=document.createElementNS(u.globals.SVGNS,"title");if(S.textContent=Array.isArray(b)?b.join(" "):b,T.node.appendChild(S),u.config.yaxis[e].labels.rotate!==0){var M=n.rotateAroundCenter(T.node);T.node.setAttribute("transform","rotate(".concat(u.config.yaxis[e].labels.rotate," 0 ").concat(M.y,")"))}t+=i},p=0;p<=g.length-1;p++)F(p);if(u.config.yaxis[0].title.text!==void 0){var f=n.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),m=n.drawText({x:u.config.yaxis[0].title.offsetX,y:u.globals.gridHeight/2+u.config.yaxis[0].title.offsetY,text:u.config.yaxis[0].title.text,textAnchor:"middle",foreColor:u.config.yaxis[0].title.style.color,fontSize:u.config.yaxis[0].title.style.fontSize,fontWeight:u.config.yaxis[0].title.style.fontWeight,fontFamily:u.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+u.config.yaxis[0].title.style.cssClass});f.add(m),o.add(f)}var v=0;this.isCategoryBarHorizontal&&u.config.yaxis[0].opposite&&(v=u.globals.gridWidth);var w=u.config.xaxis.axisBorder;if(w.show){var x=n.drawLine(u.globals.padHorizontal+w.offsetX+v,1+w.offsetY,u.globals.padHorizontal+w.offsetX+v,u.globals.gridHeight+w.offsetY,w.color,0);this.elgrid&&this.elgrid.elGridBorders&&u.config.grid.show?this.elgrid.elGridBorders.add(x):o.add(x)}return u.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(v,g.length,u.config.yaxis[0].axisBorder,u.config.yaxis[0].axisTicks,0,i,o),o}},{key:"drawXaxisTicks",value:function(e,i,t){var r=this.w,u=e;if(!(e<0||e-2>r.globals.gridWidth)){var n=this.offY+r.config.xaxis.axisTicks.offsetY;if(i=i+n+r.config.xaxis.axisTicks.height,r.config.xaxis.position==="top"&&(i=n-r.config.xaxis.axisTicks.height),r.config.xaxis.axisTicks.show){var a=new De(this.ctx).drawLine(e+r.config.xaxis.axisTicks.offsetX,n+r.config.xaxis.offsetY,u+r.config.xaxis.axisTicks.offsetX,i+r.config.xaxis.offsetY,r.config.xaxis.axisTicks.color);t.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,i=[],t=this.xaxisLabels.length,r=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var u=0;u<t;u++)r=this.xaxisLabels[u].position,i.push(r);else for(var n=t,a=0;a<n;a++){var o=n;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(o-=1),r+=e.globals.gridWidth/o,i.push(r)}return i}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,i=new De(this.ctx),t=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),u=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<r.length;a++){var o=i.rotateAroundCenter(r[a]);o.y=o.y-1,o.x=o.x+1,r[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(o.x," ").concat(o.y,")")),r[a].setAttribute("text-anchor","end"),t.setAttribute("transform","translate(0, ".concat(-10,")"));var h=r[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(h,function(d){i.placeTextWithEllipsis(d,d.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var d=e.globals.gridWidth/(e.globals.labels.length+1),F=0;F<r.length;F++){var p=r[F].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(p,function(f){i.placeTextWithEllipsis(f,f.textContent,d)})}})();if(u.length>0){var g=u[u.length-1].getBBox(),l=u[0].getBBox();g.x<-20&&u[u.length-1].parentNode.removeChild(u[u.length-1]),l.x+l.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&u[0].parentNode.removeChild(u[0]);for(var c=0;c<n.length;c++)i.placeTextWithEllipsis(n[c],n[c].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),s}(),Pv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w;var i=this.w;this.xaxisLabels=i.globals.labels.slice(),this.axesUtils=new x0(e),this.isRangeBar=i.globals.seriesRange.length&&i.globals.isBarHorizontal,i.globals.timescaleLabels.length>0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return Ne(s,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.w,t=new De(this.ctx);e||(e=t.group({class:"apexcharts-grid"}));var r=t.drawLine(i.globals.padHorizontal,1,i.globals.padHorizontal,i.globals.gridHeight,"transparent"),u=t.drawLine(i.globals.padHorizontal,i.globals.gridHeight,i.globals.gridWidth,i.globals.gridHeight,"transparent");return e.add(u),e.add(r),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,i=e.globals,t=new De(this.ctx),r=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,nr(e.config.stroke.width)):e.config.stroke.width,u=function(g){var l=document.createElementNS(i.SVGNS,"clipPath");return l.setAttribute("id",g),l};i.dom.elGridRectMask=u("gridRectMask".concat(i.cuid)),i.dom.elGridRectBarMask=u("gridRectBarMask".concat(i.cuid)),i.dom.elGridRectMarkerMask=u("gridRectMarkerMask".concat(i.cuid)),i.dom.elForecastMask=u("forecastMask".concat(i.cuid)),i.dom.elNonForecastMask=u("nonForecastMask".concat(i.cuid));var n=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(n=Math.max(e.config.grid.padding.left,i.barPadForNumericAxis),a=Math.max(e.config.grid.padding.right,i.barPadForNumericAxis)),i.dom.elGridRect=t.drawRect(-r/2-2,-r/2-2,i.gridWidth+r+4,i.gridHeight+r+4,0,"#fff"),i.dom.elGridRectBar=t.drawRect(-r/2-n-2,-r/2-2,i.gridWidth+r+a+n+4,i.gridHeight+r+4,0,"#fff");var o=e.globals.markers.largestSize;i.dom.elGridRectMarker=t.drawRect(-o,-o,i.gridWidth+2*o,i.gridHeight+2*o,0,"#fff"),i.dom.elGridRectMask.appendChild(i.dom.elGridRect.node),i.dom.elGridRectBarMask.appendChild(i.dom.elGridRectBar.node),i.dom.elGridRectMarkerMask.appendChild(i.dom.elGridRectMarker.node);var h=i.dom.baseEl.querySelector("defs");h.appendChild(i.dom.elGridRectMask),h.appendChild(i.dom.elGridRectBarMask),h.appendChild(i.dom.elGridRectMarkerMask),h.appendChild(i.dom.elForecastMask),h.appendChild(i.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var i=e.i,t=e.x1,r=e.y1,u=e.x2,n=e.y2,a=e.xCount,o=e.parent,h=this.w;if(!(i===0&&h.globals.skipFirstTimelinelabel||i===a-1&&h.globals.skipLastTimelinelabel&&!h.config.xaxis.labels.formatter||h.config.chart.type==="radar")){h.config.grid.xaxis.lines.show&&this._drawGridLine({i,x1:t,y1:r,x2:u,y2:n,xCount:a,parent:o});var g=0;if(h.globals.hasXaxisGroups&&h.config.xaxis.tickPlacement==="between"){var l=h.globals.groups;if(l){for(var c=0,d=0;c<i&&d<l.length;d++)c+=l[d].cols;c===i&&(g=.6*h.globals.xAxisLabelsHeight)}}new _n(this.ctx).drawXaxisTicks(t,g,h.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var i=e.i,t=e.x1,r=e.y1,u=e.x2,n=e.y2,a=e.xCount,o=e.parent,h=this.w,g=o.node.classList.contains("apexcharts-gridlines-horizontal"),l=h.globals.barPadForNumericAxis,c=r===0&&n===0||t===0&&u===0||r===h.globals.gridHeight&&n===h.globals.gridHeight||h.globals.isBarHorizontal&&(i===0||i===a-1),d=new De(this).drawLine(t-(g?l:0),r,u+(g?l:0),n,h.config.grid.borderColor,h.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),c&&h.config.grid.show?this.elGridBorders.add(d):o.add(d)}},{key:"_drawGridBandRect",value:function(e){var i=e.c,t=e.x1,r=e.y1,u=e.x2,n=e.y2,a=e.type,o=this.w,h=new De(this.ctx),g=o.globals.barPadForNumericAxis,l=o.config.grid[a].colors[i],c=h.drawRect(t-(a==="row"?g:0),r,u+(a==="row"?2*g:0),n,0,l,o.config.grid[a].opacity);this.elg.add(c),c.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),c.node.classList.add("apexcharts-grid-".concat(a))}},{key:"_drawXYLines",value:function(e){var i=this,t=e.xCount,r=e.tickAmount,u=this.w;if(u.config.grid.xaxis.lines.show||u.config.xaxis.axisTicks.show){var n,a=u.globals.padHorizontal,o=u.globals.gridHeight;u.globals.timescaleLabels.length?function(F){for(var p=F.xC,f=F.x1,m=F.y1,v=F.x2,w=F.y2,x=0;x<p;x++)f=i.xaxisLabels[x].position,v=i.xaxisLabels[x].position,i._drawGridLines({i:x,x1:f,y1:m,x2:v,y2:w,xCount:t,parent:i.elgridLinesV})}({xC:t,x1:a,y1:0,x2:n,y2:o}):(u.globals.isXNumeric&&(t=u.globals.xAxisScale.result.length),function(F){for(var p=F.xC,f=F.x1,m=F.y1,v=F.x2,w=F.y2,x=0;x<p+(u.globals.isXNumeric?0:1);x++)x===0&&p===1&&u.globals.dataPoints===1&&(v=f=u.globals.gridWidth/2),i._drawGridLines({i:x,x1:f,y1:m,x2:v,y2:w,xCount:t,parent:i.elgridLinesV}),v=f+=u.globals.gridWidth/(u.globals.isXNumeric?p-1:p)}({xC:t,x1:a,y1:0,x2:n,y2:o}))}if(u.config.grid.yaxis.lines.show){var h=0,g=0,l=u.globals.gridWidth,c=r+1;this.isRangeBar&&(c=u.globals.labels.length);for(var d=0;d<c+(this.isRangeBar?1:0);d++)this._drawGridLine({i:d,xCount:c+(this.isRangeBar?1:0),x1:0,y1:h,x2:l,y2:g,parent:this.elgridLinesH}),g=h+=u.globals.gridHeight/(this.isRangeBar?c:r)}}},{key:"_drawInvertedXYLines",value:function(e){var i=e.xCount,t=this.w;if(t.config.grid.xaxis.lines.show||t.config.xaxis.axisTicks.show)for(var r,u=t.globals.padHorizontal,n=t.globals.gridHeight,a=0;a<i+1;a++)t.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:i+1,x1:u,y1:0,x2:r,y2:n,parent:this.elgridLinesV}),new _n(this.ctx).drawXaxisTicks(u,0,t.globals.dom.elGraphical),r=u+=t.globals.gridWidth/i;if(t.config.grid.yaxis.lines.show)for(var o=0,h=0,g=t.globals.gridWidth,l=0;l<t.globals.dataPoints+1;l++)this._drawGridLine({i:l,xCount:t.globals.dataPoints+1,x1:0,y1:o,x2:g,y2:h,parent:this.elgridLinesH}),h=o+=t.globals.gridHeight/t.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,i=e.globals,t=new De(this.ctx);this.elg=t.group({class:"apexcharts-grid"}),this.elgridLinesH=t.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=t.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=t.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var r=0;r<i.seriesYAxisMap.length&&i.ignoreYAxisIndexes.includes(r);)r++;r===i.seriesYAxisMap.length&&(r=0);var u,n=i.yAxisScale[r].result.length-1;if(!i.isBarHorizontal||this.isRangeBar){var a,o,h;u=this.xaxisLabels.length,this.isRangeBar&&(n=i.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(u=e.config.xaxis.tickAmount),((a=i.yAxisScale)===null||a===void 0||(o=a[r])===null||o===void 0||(h=o.result)===null||h===void 0?void 0:h.length)>0&&e.config.xaxis.type!=="datetime"&&(u=i.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:u,tickAmount:n})}else u=n,n=i.xTickAmount,this._drawInvertedXYLines({xCount:u,tickAmount:n});return this.drawGridBands(u,n),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.gridWidth/u}}},{key:"drawGridBands",value:function(e,i){var t,r,u=this,n=this.w;if(((t=n.config.grid.row.colors)===null||t===void 0?void 0:t.length)>0&&function(F,p,f,m,v,w){for(var x=0,A=0;x<p;x++,A++)A>=n.config.grid[F].colors.length&&(A=0),u._drawGridBandRect({c:A,x1:f,y1:m,x2:v,y2:w,type:F}),m+=n.globals.gridHeight/i}("row",i,0,0,n.globals.gridWidth,n.globals.gridHeight/i),((r=n.config.grid.column.colors)===null||r===void 0?void 0:r.length)>0){var a=n.globals.isBarHorizontal||n.config.xaxis.tickPlacement!=="on"||n.config.xaxis.type!=="category"&&!n.config.xaxis.convertedCatToNumeric?e:e-1;n.globals.isXNumeric&&(a=n.globals.xAxisScale.result.length-1);for(var o=n.globals.padHorizontal,h=n.globals.padHorizontal+n.globals.gridWidth/a,g=n.globals.gridHeight,l=0,c=0;l<e;l++,c++){var d;c>=n.config.grid.column.colors.length&&(c=0),n.config.xaxis.type==="datetime"&&(o=this.xaxisLabels[l].position,h=(((d=this.xaxisLabels[l+1])===null||d===void 0?void 0:d.position)||n.globals.gridWidth)-this.xaxisLabels[l].position),this._drawGridBandRect({c,x1:o,y1:0,x2:h,y2:g,type:"column"}),o+=n.globals.gridWidth/a}}}}]),s}(),$v=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.coreUtils=new Gt(this.ctx)}return Ne(s,[{key:"niceScale",value:function(e,i){var t,r,u,n,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=1e-11,h=this.w,g=h.globals;g.isBarHorizontal?(t=h.config.xaxis,r=Math.max((g.svgWidth-100)/25,2)):(t=h.config.yaxis[a],r=Math.max((g.svgHeight-100)/15,2)),pe.isNumber(r)||(r=10),u=t.min!==void 0&&t.min!==null,n=t.max!==void 0&&t.min!==null;var l=t.stepSize!==void 0&&t.stepSize!==null,c=t.tickAmount!==void 0&&t.tickAmount!==null,d=c?t.tickAmount:g.niceScaleDefaultTicks[Math.min(Math.round(r/2),g.niceScaleDefaultTicks.length-1)];if(g.isMultipleYAxis&&!c&&g.multiAxisTickAmount>0&&(d=g.multiAxisTickAmount,c=!0),d=d==="dataPoints"?g.dataPoints-1:Math.abs(Math.round(d)),(e===Number.MIN_VALUE&&i===0||!pe.isNumber(e)&&!pe.isNumber(i)||e===Number.MIN_VALUE&&i===-Number.MAX_VALUE)&&(e=pe.isNumber(t.min)?t.min:0,i=pe.isNumber(t.max)?t.max:e+d,g.allSeriesCollapsed=!1),e>i){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var F=i;i=e,e=F}else e===i&&(e=e===0?0:e-1,i=i===0?2:i+1);var p=[];d<1&&(d=1);var f=d,m=Math.abs(i-e);!u&&e>0&&e/m<.15&&(e=0,u=!0),!n&&i<0&&-i/m<.15&&(i=0,n=!0);var v=(m=Math.abs(i-e))/f,w=v,x=Math.floor(Math.log10(w)),A=Math.pow(10,x),b=Math.ceil(w/A);if(v=w=(b=g.niceScaleAllowedMagMsd[g.yValueDecimal===0?0:1][b])*A,g.isBarHorizontal&&t.stepSize&&t.type!=="datetime"?(v=t.stepSize,l=!0):l&&(v=t.stepSize),l&&t.forceNiceScale){var y=Math.floor(Math.log10(v));v*=Math.pow(10,x-y)}if(u&&n){var k=m/f;if(c)if(l)if(pe.mod(m,v)!=0){var C=pe.getGCD(v,k);v=k/C<10?C:k}else pe.mod(v,k)==0?v=k:(k=v,c=!1);else v=k;else if(l)pe.mod(m,v)==0?k=v:v=k;else if(pe.mod(m,v)==0)k=v;else{k=m/(f=Math.ceil(m/v));var D=pe.getGCD(m,v);m/D<r&&(k=D),v=k}f=Math.round(m/v)}else{if(u||n){if(n)if(c)e=i-v*f;else{var T=e;e=v*Math.floor(e/v),Math.abs(i-e)/pe.getGCD(m,v)>r&&(e=i-v*d,e+=v*Math.floor((T-e)/v))}else if(u)if(c)i=e+v*f;else{var S=i;i=v*Math.ceil(i/v),Math.abs(i-e)/pe.getGCD(m,v)>r&&(i=e+v*d,i+=v*Math.ceil((S-i)/v))}}else if(g.isMultipleYAxis&&c){var M=v*Math.floor(e/v),R=M+v*f;R<i&&(v*=2),R=i,i=(e=M)+v*f,m=Math.abs(i-e),e>0&&e<Math.abs(R-i)&&(e=0,i=v*f),i<0&&-i<Math.abs(M-e)&&(i=0,e=-v*f)}else e=v*Math.floor(e/v),i=v*Math.ceil(i/v);m=Math.abs(i-e),v=pe.getGCD(m,v),f=Math.round(m/v)}if(c||u||n||(f=Math.ceil((m-o)/(v+o)))>16&&pe.getPrimeFactors(f).length<2&&f++,!c&&t.forceNiceScale&&g.yValueDecimal===0&&f>m&&(f=m,v=Math.round(m/f)),f>r&&(!c&&!l||t.forceNiceScale)){var O=pe.getPrimeFactors(f),H=O.length-1,Y=f;e:for(var J=0;J<H;J++)for(var Z=0;Z<=H-J;Z++){for(var te=Math.min(Z+J,H),ie=Y,se=1,ue=Z;ue<=te;ue++)se*=O[ue];if((ie/=se)<r){Y=ie;break e}}v=Y===f?m:m/Y,f=Math.round(m/v)}g.isMultipleYAxis&&g.multiAxisTickAmount==0&&g.ignoreYAxisIndexes.indexOf(a)<0&&(g.multiAxisTickAmount=f);var ne=e-v,G=v*o;do ne+=v,p.push(pe.stripNumber(ne,7));while(i-ne>G);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,n=Math.abs(i-e),a=[];if(e===i)return{result:a=[e],niceMin:a[0],niceMax:a[a.length-1]};(t=this._adjustTicksForSmallRange(t,r,n))==="dataPoints"&&(t=this.w.globals.dataPoints-1),u||(u=n/t),u=Math.round(100*(u+Number.EPSILON))/100,t===Number.MAX_VALUE&&(t=5,u=1);for(var o=e;t>=0;)a.push(o),o=pe.preciseAddition(o,u),t-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,i,t){i<=0&&(i=Math.max(e,t)),e<=0&&(e=Math.min(i,t));for(var r=[],u=Math.ceil(Math.log(i)/Math.log(t)+1),n=Math.floor(Math.log(e)/Math.log(t));n<u;n++)r.push(Math.pow(t,n));return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}},{key:"logarithmicScale",value:function(e,i,t){i<=0&&(i=Math.max(e,t)),e<=0&&(e=Math.min(i,t));for(var r=[],u=Math.log(i)/Math.log(t),n=Math.log(e)/Math.log(t),a=u-n,o=Math.round(a),h=a/o,g=0,l=n;g<o;g++,l+=h)r.push(Math.pow(t,l));return r.push(Math.pow(t,u)),{result:r,niceMin:e,niceMax:i}}},{key:"_adjustTicksForSmallRange",value:function(e,i,t){var r=e;if(i!==void 0&&this.w.config.yaxis[i].labels.formatter&&this.w.config.yaxis[i].tickAmount===void 0){var u=Number(this.w.config.yaxis[i].labels.formatter(1));pe.isNumber(u)&&this.w.globals.yValueDecimal===0&&(r=Math.ceil(t))}return r<e?r:e}},{key:"setYScaleForIndex",value:function(e,i,t){var r=this.w.globals,u=this.w.config,n=r.isBarHorizontal?u.xaxis:u.yaxis[e];r.yAxisScale[e]===void 0&&(r.yAxisScale[e]=[]);var a=Math.abs(t-i);n.logarithmic&&a<=5&&(r.invalidLogScale=!0),n.logarithmic&&a>5?(r.allSeriesCollapsed=!1,r.yAxisScale[e]=n.forceNiceScale?this.logarithmicScaleNice(i,t,n.logBase):this.logarithmicScale(i,t,n.logBase)):t!==-Number.MAX_VALUE&&pe.isNumber(t)&&i!==Number.MAX_VALUE&&pe.isNumber(i)?(r.allSeriesCollapsed=!1,r.yAxisScale[e]=this.niceScale(i,t,e)):r.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,i){var t=this.w,r=t.globals;if(i!==-Number.MAX_VALUE&&pe.isNumber(i)){var u=r.xTickAmount;r.xAxisScale=this.linearScale(e,i,u,0,t.config.xaxis.stepSize)}else r.xAxisScale=this.linearScale(0,10,10);return r.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,i=this.w.config,t=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var r=t.seriesYAxisMap,u=t.minYArr,n=t.maxYArr;t.allSeriesCollapsed=!0,t.barGroups=[],r.forEach(function(a,o){var h=[];a.forEach(function(g){var l,c=(l=i.series[g])===null||l===void 0?void 0:l.group;h.indexOf(c)<0&&h.push(c)}),a.length>0?function(){var g,l,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,F=c,p=d;if(i.chart.stacked)(function(){var v=new Array(t.dataPoints).fill(0),w=[],x=[],A=[];h.forEach(function(){w.push(v.map(function(){return Number.MIN_VALUE})),x.push(v.map(function(){return Number.MIN_VALUE})),A.push(v.map(function(){return Number.MIN_VALUE}))});for(var b=function(k){!g&&i.series[a[k]].type&&(g=i.series[a[k]].type);var C=a[k];l=i.series[C].group?i.series[C].group:"axis-".concat(o),!(t.collapsedSeriesIndices.indexOf(C)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(C)<0)||(t.allSeriesCollapsed=!1,h.forEach(function(D,T){if(i.series[C].group===D)for(var S=0;S<t.series[C].length;S++){var M=t.series[C][S];M>=0?x[T][S]+=M:A[T][S]+=M,w[T][S]+=M,F=Math.min(F,M),p=Math.max(p,M)}})),g!=="bar"&&g!=="column"||t.barGroups.push(l)},y=0;y<a.length;y++)b(y);g||(g=i.chart.type),g==="bar"||g==="column"?h.forEach(function(k,C){c=Math.min(c,Math.min.apply(null,A[C])),d=Math.max(d,Math.max.apply(null,x[C]))}):(h.forEach(function(k,C){F=Math.min(F,Math.min.apply(null,w[C])),p=Math.max(p,Math.max.apply(null,w[C]))}),c=F,d=p),c===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)})();else for(var f=0;f<a.length;f++){var m=a[f];c=Math.min(c,u[m]),d=Math.max(d,n[m]),!(t.collapsedSeriesIndices.indexOf(m)<0&&t.ancillaryCollapsedSeriesIndices.indexOf(m)<0)||(t.allSeriesCollapsed=!1)}i.yaxis[o].min!==void 0&&(c=typeof i.yaxis[o].min=="function"?i.yaxis[o].min(c):i.yaxis[o].min),i.yaxis[o].max!==void 0&&(d=typeof i.yaxis[o].max=="function"?i.yaxis[o].max(d):i.yaxis[o].max),t.barGroups=t.barGroups.filter(function(v,w,x){return x.indexOf(v)===w}),e.setYScaleForIndex(o,c,d),a.forEach(function(v){u[v]=t.yAxisScale[o].niceMin,n[v]=t.yAxisScale[o].niceMax})}():e.setYScaleForIndex(o,0,-Number.MAX_VALUE)})}}]),s}(),Qc=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.scales=new $v(e)}return Ne(s,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,u=this.w.config,n=this.w.globals,a=-Number.MAX_VALUE,o=Number.MIN_VALUE;r===null&&(r=e+1);var h=n.series,g=h,l=h;u.chart.type==="candlestick"?(g=n.seriesCandleL,l=n.seriesCandleH):u.chart.type==="boxPlot"?(g=n.seriesCandleO,l=n.seriesCandleC):n.isRangeData&&(g=n.seriesRangeStart,l=n.seriesRangeEnd);var c=!1;if(n.seriesX.length>=r){var d,F=(d=n.brushSource)===null||d===void 0?void 0:d.w.config.chart.brush;(u.chart.zoom.enabled&&u.chart.zoom.autoScaleYaxis||F!=null&&F.enabled&&F!=null&&F.autoScaleYaxis)&&(c=!0)}for(var p=e;p<r;p++){n.dataPoints=Math.max(n.dataPoints,h[p].length);var f=u.series[p].type;n.categoryLabels.length&&(n.dataPoints=n.categoryLabels.filter(function(A){return A!==void 0}).length),n.labels.length&&u.xaxis.type!=="datetime"&&n.series.reduce(function(A,b){return A+b.length},0)!==0&&(n.dataPoints=Math.max(n.dataPoints,n.labels.length));var m=0,v=h[p].length-1;if(c){if(u.xaxis.min)for(;m<v&&n.seriesX[p][m]<u.xaxis.min;m++);if(u.xaxis.max)for(;v>m&&n.seriesX[p][v]>u.xaxis.max;v--);}for(var w=m;w<=v&&w<n.series[p].length;w++){var x=h[p][w];if(x!==null&&pe.isNumber(x)){switch(l[p][w]!==void 0&&(a=Math.max(a,l[p][w]),i=Math.min(i,l[p][w])),g[p][w]!==void 0&&(i=Math.min(i,g[p][w]),t=Math.max(t,g[p][w])),f){case"candlestick":n.seriesCandleC[p][w]!==void 0&&(a=Math.max(a,n.seriesCandleH[p][w]),i=Math.min(i,n.seriesCandleL[p][w]));break;case"boxPlot":n.seriesCandleC[p][w]!==void 0&&(a=Math.max(a,n.seriesCandleC[p][w]),i=Math.min(i,n.seriesCandleO[p][w]))}f&&f!=="candlestick"&&f!=="boxPlot"&&f!=="rangeArea"&&f!=="rangeBar"&&(a=Math.max(a,n.series[p][w]),i=Math.min(i,n.series[p][w])),n.seriesGoals[p]&&n.seriesGoals[p][w]&&Array.isArray(n.seriesGoals[p][w])&&n.seriesGoals[p][w].forEach(function(A){a=Math.max(a,A.value),i=Math.min(i,A.value)}),t=a,x=pe.noExponents(x),pe.isFloat(x)&&(n.yValueDecimal=Math.max(n.yValueDecimal,x.toString().split(".")[1].length)),o>g[p][w]&&g[p][w]<0&&(o=g[p][w])}else n.hasNullValues=!0}f!=="bar"&&f!=="column"||(o<0&&a<0&&(a=0,t=Math.max(t,0)),o===Number.MIN_VALUE&&(o=0,i=Math.min(i,0)))}return u.chart.type==="rangeBar"&&n.seriesRangeStart.length&&n.isBarHorizontal&&(o=i),u.chart.type==="bar"&&(o<0&&a<0&&(a=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:a,lowestY:i,highestY:t}}},{key:"setYRange",value:function(){var e=this.w.globals,i=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var t,r=Number.MAX_VALUE;if(e.isMultipleYAxis){r=Number.MAX_VALUE;for(var u=0;u<e.series.length;u++)t=this.getMinYMaxY(u),e.minYArr[u]=t.lowestY,e.maxYArr[u]=t.highestY,r=Math.min(r,t.lowestY)}return t=this.getMinYMaxY(0,r,null,e.series.length),i.chart.type==="bar"?(e.minY=t.minY,e.maxY=t.maxY):(e.minY=t.lowestY,e.maxY=t.highestY),r=t.lowestY,i.chart.stacked&&this._setStackedMinMax(),i.chart.type==="line"||i.chart.type==="area"||i.chart.type==="scatter"||i.chart.type==="candlestick"||i.chart.type==="boxPlot"||i.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&r!==-Number.MAX_VALUE&&r!==e.maxY&&(e.minY=r):e.minY=e.minY!==Number.MIN_VALUE?Math.min(t.minY,e.minY):t.minY,i.yaxis.forEach(function(n,a){n.max!==void 0&&(typeof n.max=="number"?e.maxYArr[a]=n.max:typeof n.max=="function"&&(e.maxYArr[a]=n.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),n.min!==void 0&&(typeof n.min=="number"?e.minYArr[a]=n.min:typeof n.min=="function"&&(e.minYArr[a]=n.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(function(n){i.xaxis[n]!==void 0&&typeof i.xaxis[n]=="number"&&(n==="min"?e.minY=i.xaxis[n]:e.maxY=i.xaxis[n])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=r):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],i.series.forEach(function(n){switch(n.type||i.chart.type){case"bar":case"column":e.barGroups.push(n.group);break;case"line":e.lineGroups.push(n.group);break;case"area":e.areaGroups.push(n.group)}}),e.barGroups=e.barGroups.filter(function(n,a,o){return o.indexOf(n)===a}),e.lineGroups=e.lineGroups.filter(function(n,a,o){return o.indexOf(n)===a}),e.areaGroups=e.areaGroups.filter(function(n,a,o){return o.indexOf(n)===a}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,i=this.w.config,t=i.xaxis.type==="numeric"||i.xaxis.type==="datetime"||i.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var o=0;o<e.series.length;o++)if(e.labels[o])for(var h=0;h<e.labels[o].length;h++)e.labels[o][h]!==null&&pe.isNumber(e.labels[o][h])&&(e.maxX=Math.max(e.maxX,e.labels[o][h]),e.initialMaxX=Math.max(e.maxX,e.labels[o][h]),e.minX=Math.min(e.minX,e.labels[o][h]),e.initialMinX=Math.min(e.minX,e.labels[o][h]))}(),e.noLabelsProvided&&i.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var r=10;if(i.xaxis.tickAmount===void 0)r=Math.round(e.svgWidth/150),i.xaxis.type==="numeric"&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1);else if(i.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(r=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var u=Math.round(e.maxX-e.minX);u<30&&(r=u-1)}}else r=i.xaxis.tickAmount;if(e.xTickAmount=r,i.xaxis.max!==void 0&&typeof i.xaxis.max=="number"&&(e.maxX=i.xaxis.max),i.xaxis.min!==void 0&&typeof i.xaxis.min=="number"&&(e.minX=i.xaxis.min),i.xaxis.range!==void 0&&(e.minX=e.maxX-i.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(i.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var n=[],a=e.minX-1;a<e.maxX;a++)n.push(a+1);e.xAxisScale={result:n,niceMin:n[0],niceMax:n[n.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,r,r,0,i.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,r-1,0,i.xaxis.stepSize),e.seriesX=e.labels.slice());t&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var i=0;i<e.series.length;i++)if(e.seriesZ[i]!==void 0)for(var t=0;t<e.seriesZ[i].length;t++)e.seriesZ[i][t]!==null&&pe.isNumber(e.seriesZ[i][t])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[i][t]),e.minZ=Math.min(e.minZ,e.seriesZ[i][t]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,i=this.w.config;if(e.minX===e.maxX){var t=new gr(this.ctx);if(i.xaxis.type==="datetime"){var r=t.getDate(e.minX);i.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()-2):r.setDate(r.getDate()-2),e.minX=new Date(r).getTime();var u=t.getDate(e.maxX);i.xaxis.labels.datetimeUTC?u.setUTCDate(u.getUTCDate()+2):u.setDate(u.getDate()+2),e.maxX=new Date(u).getTime()}else(i.xaxis.type==="numeric"||i.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(i,t){if(i.length){i.length===1&&i.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var r=i.slice();r.sort(function(u,n){return u-n}),r.forEach(function(u,n){if(n>0){var a=u-r[n-1];a>0&&(e.minXDiff=Math.min(a,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,i=this.w.globals;if(i.series.length){var t=i.seriesGroups;t.length||(t=[this.w.globals.seriesNames.map(function(n){return n})]);var r={},u={};t.forEach(function(n){r[n]=[],u[n]=[],e.w.config.series.map(function(a,o){return n.indexOf(i.seriesNames[o])>-1?o:null}).filter(function(a){return a!==null}).forEach(function(a){for(var o=0;o<i.series[i.maxValsInArrayIndex].length;o++){var h,g,l,c;r[n][o]===void 0&&(r[n][o]=0,u[n][o]=0),(e.w.config.chart.stacked&&!i.comboCharts||e.w.config.chart.stacked&&i.comboCharts&&(!e.w.config.chart.stackOnlyBar||((h=e.w.config.series)===null||h===void 0||(g=h[a])===null||g===void 0?void 0:g.type)==="bar"||((l=e.w.config.series)===null||l===void 0||(c=l[a])===null||c===void 0?void 0:c.type)==="column"))&&i.series[a][o]!==null&&pe.isNumber(i.series[a][o])&&(i.series[a][o]>0?r[n][o]+=parseFloat(i.series[a][o])+1e-4:u[n][o]+=parseFloat(i.series[a][o]))}})}),Object.entries(r).forEach(function(n){var a=iv(n,1)[0];r[a].forEach(function(o,h){i.maxY=Math.max(i.maxY,r[a][h]),i.minY=Math.min(i.minY,u[a][h])})})}}}]),s}(),Yh=function(){function s(e,i){Oe(this,s),this.ctx=e,this.elgrid=i,this.w=e.w;var t=this.w;this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new x0(e)}return Ne(s,[{key:"drawYaxis",value:function(e){var i=this.w,t=new De(this.ctx),r=i.config.yaxis[e].labels.style,u=r.fontSize,n=r.fontFamily,a=r.fontWeight,o=t.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(i.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return o;var h=t.group({class:"apexcharts-yaxis-texts-g"});o.add(h);var g=i.globals.yAxisScale[e].result.length-1,l=i.globals.gridHeight/g,c=i.globals.yLabelFormatters[e],d=this.axesUtils.checkForReversedLabels(e,i.globals.yAxisScale[e].result.slice());if(i.config.yaxis[e].labels.show){var F=i.globals.translateY+i.config.yaxis[e].labels.offsetY;i.globals.isBarHorizontal?F=0:i.config.chart.type==="heatmap"&&(F-=l/2),F+=parseInt(u,10)/3;for(var p=g;p>=0;p--){var f=c(d[p],p,i),m=i.config.yaxis[e].labels.padding;i.config.yaxis[e].opposite&&i.config.yaxis.length!==0&&(m*=-1);var v=this.getTextAnchor(i.config.yaxis[e].labels.align,i.config.yaxis[e].opposite),w=this.axesUtils.getYAxisForeColor(r.colors,e),x=Array.isArray(w)?w[p]:w,A=pe.listToArray(i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(y){return y.textContent}),b=t.drawText({x:m,y:F,text:A.includes(f)&&!i.config.yaxis[e].labels.showDuplicates?"":f,textAnchor:v,fontSize:u,fontFamily:n,fontWeight:a,maxWidth:i.config.yaxis[e].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(r.cssClass)});h.add(b),this.addTooltip(b,f),i.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(t,b,firstLabel,i.config.yaxis[e].labels.rotate),F+=l}}return this.addYAxisTitle(t,o,e),this.addAxisBorder(t,o,e,g,l),o}},{key:"getTextAnchor",value:function(e,i){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":i?"start":"end"}},{key:"addTooltip",value:function(e,i){var t=document.createElementNS(this.w.globals.SVGNS,"title");t.textContent=Array.isArray(i)?i.join(" "):i,e.node.appendChild(t)}},{key:"rotateLabel",value:function(e,i,t,r){var u=e.rotateAroundCenter(t.node),n=e.rotateAroundCenter(i.node);i.node.setAttribute("transform","rotate(".concat(r," ").concat(u.x," ").concat(n.y,")"))}},{key:"addYAxisTitle",value:function(e,i,t){var r=this.w;if(r.config.yaxis[t].title.text!==void 0){var u=e.group({class:"apexcharts-yaxis-title"}),n=r.config.yaxis[t].opposite?r.globals.translateYAxisX[t]:0,a=e.drawText({x:n,y:r.globals.gridHeight/2+r.globals.translateY+r.config.yaxis[t].title.offsetY,text:r.config.yaxis[t].title.text,textAnchor:"end",foreColor:r.config.yaxis[t].title.style.color,fontSize:r.config.yaxis[t].title.style.fontSize,fontWeight:r.config.yaxis[t].title.style.fontWeight,fontFamily:r.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(r.config.yaxis[t].title.style.cssClass)});u.add(a),i.add(u)}}},{key:"addAxisBorder",value:function(e,i,t,r,u){var n=this.w,a=n.config.yaxis[t].axisBorder,o=31+a.offsetX;if(n.config.yaxis[t].opposite&&(o=-31-a.offsetX),a.show){var h=e.drawLine(o,n.globals.translateY+a.offsetY-2,o,n.globals.gridHeight+n.globals.translateY+a.offsetY+2,a.color,0,a.width);i.add(h)}n.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,r,a,n.config.yaxis[t].axisTicks,t,u,i)}},{key:"drawYaxisInversed",value:function(e){var i=this.w,t=new De(this.ctx),r=t.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),u=t.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(i.globals.translateXAxisX,", ").concat(i.globals.translateXAxisY,")")});r.add(u);var n=i.globals.yAxisScale[e].result.length-1,a=i.globals.gridWidth/n+.1,o=a+i.config.xaxis.labels.offsetX,h=i.globals.xLabelFormatter,g=this.axesUtils.checkForReversedLabels(e,i.globals.yAxisScale[e].result.slice()),l=i.globals.timescaleLabels;if(l.length>0&&(this.xaxisLabels=l.slice(),n=(g=l.slice()).length),i.config.xaxis.labels.show)for(var c=l.length?0:n;l.length?c<l.length:c>=0;l.length?c++:c--){var d=h(g[c],c,i),F=i.globals.gridWidth+i.globals.padHorizontal-(o-a+i.config.xaxis.labels.offsetX);if(l.length){var p=this.axesUtils.getLabel(g,l,F,c,this.drawnLabels,this.xaxisFontSize);F=p.x,d=p.text,this.drawnLabels.push(p.text),c===0&&i.globals.skipFirstTimelinelabel&&(d=""),c===g.length-1&&i.globals.skipLastTimelinelabel&&(d="")}var f=t.drawText({x:F,y:this.xAxisoffX+i.config.xaxis.labels.offsetY+30-(i.config.xaxis.position==="top"?i.globals.xAxisHeight+i.config.xaxis.axisTicks.height-2:0),text:d,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:i.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(i.config.xaxis.labels.style.cssClass)});u.add(f),f.tspan(d),this.addTooltip(f,d),o+=a}return this.inversedYAxisTitleText(r),this.inversedYAxisBorder(r),r}},{key:"inversedYAxisBorder",value:function(e){var i=this.w,t=new De(this.ctx),r=i.config.xaxis.axisBorder;if(r.show){var u=0;i.config.chart.type==="bar"&&i.globals.isXNumeric&&(u-=15);var n=t.drawLine(i.globals.padHorizontal+u+r.offsetX,this.xAxisoffX,i.globals.gridWidth,this.xAxisoffX,r.color,0,r.height);this.elgrid&&this.elgrid.elGridBorders&&i.config.grid.show?this.elgrid.elGridBorders.add(n):e.add(n)}}},{key:"inversedYAxisTitleText",value:function(e){var i=this.w,t=new De(this.ctx);if(i.config.xaxis.title.text!==void 0){var r=t.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),u=t.drawText({x:i.globals.gridWidth/2+i.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(i.config.xaxis.title.style.fontSize)+i.config.xaxis.title.offsetY+20,text:i.config.xaxis.title.text,textAnchor:"middle",fontSize:i.config.xaxis.title.style.fontSize,fontFamily:i.config.xaxis.title.style.fontFamily,fontWeight:i.config.xaxis.title.style.fontWeight,foreColor:i.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(i.config.xaxis.title.style.cssClass)});r.add(u),e.add(r)}}},{key:"yAxisTitleRotate",value:function(e,i){var t=this.w,r=new De(this.ctx),u=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),n=u?u.getBoundingClientRect():{width:0,height:0},a=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),o=a?a.getBoundingClientRect():{width:0,height:0};if(a){var h=this.xPaddingForYAxisTitle(e,n,o,i);a.setAttribute("x",h.xPos-(i?10:0));var g=r.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(i?-1*t.config.yaxis[e].title.rotate:t.config.yaxis[e].title.rotate," ").concat(g.x," ").concat(g.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,i,t,r){var u=this.w,n=0,a=10;return u.config.yaxis[e].title.text===void 0||e<0?{xPos:n,padd:0}:(r?n=i.width+u.config.yaxis[e].title.offsetX+t.width/2+a/2:(n=-1*i.width+u.config.yaxis[e].title.offsetX+a/2+t.width/2,u.globals.isBarHorizontal&&(a=25,n=-1*i.width-u.config.yaxis[e].title.offsetX-a)),{xPos:n,padd:a})}},{key:"setYAxisXPosition",value:function(e,i){var t=this.w,r=0,u=0,n=18,a=1;t.config.yaxis.length>1&&(this.multipleYs=!0),t.config.yaxis.forEach(function(o,h){var g=t.globals.ignoreYAxisIndexes.includes(h)||!o.show||o.floating||e[h].width===0,l=e[h].width+i[h].width;o.opposite?t.globals.isBarHorizontal?(u=t.globals.gridWidth+t.globals.translateX-1,t.globals.translateYAxisX[h]=u-o.labels.offsetX):(u=t.globals.gridWidth+t.globals.translateX+a,g||(a+=l+20),t.globals.translateYAxisX[h]=u-o.labels.offsetX+20):(r=t.globals.translateX-n,g||(n+=l+20),t.globals.translateYAxisX[h]=r+o.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;pe.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(i,t){var r=e.config.yaxis[t];if(r&&!r.floating&&r.labels.align!==void 0){var u=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),n=pe.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label"))),a=u.getBoundingClientRect();n.forEach(function(o){o.setAttribute("text-anchor",r.labels.align)}),r.labels.align!=="left"||r.opposite?r.labels.align==="center"?u.setAttribute("transform","translate(".concat(a.width/2*(r.opposite?1:-1),", 0)")):r.labels.align==="right"&&r.opposite&&u.setAttribute("transform","translate(".concat(a.width,", 0)")):u.setAttribute("transform","translate(-".concat(a.width,", 0)"))}})}}]),s}(),Ij=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.documentEvent=pe.bind(this.documentEvent,this)}return Ne(s,[{key:"addEventListener",value:function(e,i){var t=this.w;t.globals.events.hasOwnProperty(e)?t.globals.events[e].push(i):t.globals.events[e]=[i]}},{key:"removeEventListener",value:function(e,i){var t=this.w;if(t.globals.events.hasOwnProperty(e)){var r=t.globals.events[e].indexOf(i);r!==-1&&t.globals.events[e].splice(r,1)}}},{key:"fireEvent",value:function(e,i){var t=this.w;if(t.globals.events.hasOwnProperty(e)){i&&i.length||(i=[]);for(var r=t.globals.events[e],u=r.length,n=0;n<u;n++)r[n].apply(null,i)}}},{key:"setupEventHandlers",value:function(){var e=this,i=this.w,t=this.ctx,r=i.globals.dom.baseEl.querySelector(i.globals.chartClass);this.ctx.eventList.forEach(function(u){r.addEventListener(u,function(n){var a=Object.assign({},i,{seriesIndex:i.globals.axisCharts?i.globals.capturedSeriesIndex:0,dataPointIndex:i.globals.capturedDataPointIndex});n.type==="mousemove"||n.type==="touchmove"?typeof i.config.chart.events.mouseMove=="function"&&i.config.chart.events.mouseMove(n,t,a):n.type==="mouseleave"||n.type==="touchleave"?typeof i.config.chart.events.mouseLeave=="function"&&i.config.chart.events.mouseLeave(n,t,a):(n.type==="mouseup"&&n.which===1||n.type==="touchend")&&(typeof i.config.chart.events.click=="function"&&i.config.chart.events.click(n,t,a),t.ctx.events.fireEvent("click",[n,t,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(u){i.globals.dom.baseEl.addEventListener(u,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var i=this.w,t=e.target.className;if(e.type==="click"){var r=i.globals.dom.baseEl.querySelector(".apexcharts-menu");r&&r.classList.contains("apexcharts-menu-open")&&t!=="apexcharts-menu-icon"&&r.classList.remove("apexcharts-menu-open")}i.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,i.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),s}(),Rj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"setCurrentLocaleValues",value:function(e){var i=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(i=this.w.config.chart.locales.concat(window.Apex.chart.locales));var t=i.filter(function(u){return u.name===e})[0];if(!t)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var r=pe.extend(_v,t);this.w.globals.locale=r.options}}]),s}(),Bj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"drawAxis",value:function(e,i){var t,r,u=this,n=this.w.globals,a=this.w.config,o=new _n(this.ctx,i),h=new Yh(this.ctx,i);n.axisCharts&&e!=="radar"&&(n.isBarHorizontal?(r=h.drawYaxisInversed(0),t=o.drawXaxisInversed(0),n.dom.elGraphical.add(t),n.dom.elGraphical.add(r)):(t=o.drawXaxis(),n.dom.elGraphical.add(t),a.yaxis.map(function(g,l){if(n.ignoreYAxisIndexes.indexOf(l)===-1&&(r=h.drawYaxis(l),n.dom.Paper.add(r),u.w.config.grid.position==="back")){var c=n.dom.Paper.children()[1];c.remove(),n.dom.Paper.add(c)}})))}}]),s}(),ed=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"drawXCrosshairs",value:function(){var e=this.w,i=new De(this.ctx),t=new Fr(this.ctx),r=e.config.xaxis.crosshairs.fill.gradient,u=e.config.xaxis.crosshairs.dropShadow,n=e.config.xaxis.crosshairs.fill.type,a=r.colorFrom,o=r.colorTo,h=r.opacityFrom,g=r.opacityTo,l=r.stops,c=u.enabled,d=u.left,F=u.top,p=u.blur,f=u.color,m=u.opacity,v=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){n==="gradient"&&(v=i.drawGradient("vertical",a,o,h,g,null,l,null));var w=i.drawRect();e.config.xaxis.crosshairs.width===1&&(w=i.drawLine());var x=e.globals.gridHeight;(!pe.isNumber(x)||x<0)&&(x=0);var A=e.config.xaxis.crosshairs.width;(!pe.isNumber(A)||A<0)&&(A=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:A,height:x,fill:v,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),c&&(w=t.dropShadow(w,{left:d,top:F,blur:p,color:f,opacity:m})),e.globals.dom.elGraphical.add(w)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,i=new De(this.ctx),t=e.config.yaxis[0].crosshairs,r=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var u=i.drawLine(-r,0,e.globals.gridWidth+r,0,t.stroke.color,t.stroke.dashArray,t.stroke.width);u.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(u)}var n=i.drawLine(-r,0,e.globals.gridWidth+r,0,t.stroke.color,0,0);n.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(n)}}]),s}(),Oj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"checkResponsiveConfig",value:function(e){var i=this,t=this.w,r=t.config;if(r.responsive.length!==0){var u=r.responsive.slice();u.sort(function(h,g){return h.breakpoint>g.breakpoint?1:g.breakpoint>h.breakpoint?-1:0}).reverse();var n=new Mn({}),a=function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},g=u[0].breakpoint,l=window.innerWidth>0?window.innerWidth:screen.width;if(l>g){var c=pe.clone(t.globals.initialConfig);c.series=pe.clone(t.config.series);var d=Gt.extendArrayProps(n,c,t);h=pe.extend(d,h),h=pe.extend(t.config,h),i.overrideResponsiveOptions(h)}else for(var F=0;F<u.length;F++)l<u[F].breakpoint&&(h=Gt.extendArrayProps(n,u[F].options,t),h=pe.extend(t.config,h),i.overrideResponsiveOptions(h))};if(e){var o=Gt.extendArrayProps(n,e,t);o=pe.extend(t.config,o),a(o=pe.extend(o,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var i=new Mn(e).init({responsiveOverride:!0});this.w.config=i}}]),s}(),Nj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return Ne(s,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,i=e.chart,t=e.plotOptions;return i.type==="treemap"&&t.treemap&&t.treemap.distributed||i.type==="heatmap"&&t.heatmap&&t.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,i=e.chart,t=e.plotOptions;return t.bar&&t.bar.distributed&&(i.type==="bar"||i.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,i=new pe;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var t=nr(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(t),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,i));var r=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r)}},{key:"getColors",value:function(e){var i=this,t=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,t.config.series.map(function(r,u){var n=e[u]||e[0];return typeof n=="function"?n({value:t.globals.axisCharts?t.globals.series[u][0]||0:t.globals.series[u],seriesIndex:u,dataPointIndex:u,w:i.w}):n})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,i){e.forEach(function(t,r){t&&(i[r]=t)})}},{key:"getMonochromeColors",value:function(e,i,t){var r=e.color,u=e.shadeIntensity,n=e.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?i[0].length*i.length:i.length,o=1/(a/u),h=0;return Array.from({length:a},function(){var g=n==="dark"?t.shadeColor(-1*h,r):t.shadeColor(h,r);return h+=o,g})}},{key:"applyColorTypes",value:function(e,i){var t=this,r=this.w;e.forEach(function(u){r.globals[u].colors=r.config[u].colors===void 0?t.isColorFn?r.config.colors:i:r.config[u].colors.slice(),t.pushExtraColors(r.globals[u].colors)})}},{key:"applyDataLabelsColors",value:function(e){var i=this.w;i.globals.dataLabels.style.colors=i.config.dataLabels.style.colors===void 0?e:i.config.dataLabels.style.colors.slice(),this.pushExtraColors(i.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var i=this.w;i.globals.markers.colors=i.config.markers.colors===void 0?e:i.config.markers.colors.slice(),this.pushExtraColors(i.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=this.w,u=i||r.globals.series.length;if(t===null&&(t=this.isBarDistributed||this.isHeatmapDistributed||r.config.chart.type==="heatmap"&&r.config.plotOptions.heatmap&&r.config.plotOptions.heatmap.colorScale.inverse),t&&r.globals.series.length&&(u=r.globals.series[r.globals.maxValsInArrayIndex].length*r.globals.series.length),e.length<u)for(var n=u-e.length,a=0;a<n;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var i=e.theme.mode,t=i==="dark"?"palette4":i==="light"?"palette1":e.theme.palette||"palette1",r=i==="dark"?"#f6f7f8":i==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=i||"light",e.chart.foreColor=r,e.theme.palette=t,e}},{key:"predefined",value:function(){var e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return e[this.w.config.theme.palette]||e.default}}]),s}(),Wj=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var i=this.w,t=e==="title"?i.config.title:i.config.subtitle,r=i.globals.svgWidth/2,u=t.offsetY,n="middle";if(t.align==="left"?(r=10,n="start"):t.align==="right"&&(r=i.globals.svgWidth-10,n="end"),r+=t.offsetX,u=u+parseInt(t.style.fontSize,10)+t.margin/2,t.text!==void 0){var a=new De(this.ctx).drawText({x:r,y:u,text:t.text,textAnchor:n,fontSize:t.style.fontSize,fontFamily:t.style.fontFamily,fontWeight:t.style.fontWeight,foreColor:t.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),i.globals.dom.Paper.add(a)}}}]),s}(),zj=function(){function s(e){Oe(this,s),this.w=e.w,this.dCtx=e}return Ne(s,[{key:"getTitleSubtitleCoords",value:function(e){var i=this.w,t=0,r=0,u=e==="title"?i.config.title.floating:i.config.subtitle.floating,n=i.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(n!==null&&!u){var a=n.getBoundingClientRect();t=a.width,r=i.globals.axisCharts?a.height+5:a.height}return{width:t,height:r}}},{key:"getLegendsRect",value:function(){var e=this.w,i=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(i.style.maxHeight=e.globals.svgHeight/2+"px");var t=Object.assign({},pe.getBoundingClientRect(i));return i!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:t.x,y:t.y,height:t.height,width:t.height===0?0:t.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,i=this.w,t=[];i.config.series.forEach(function(o,h){o.data.forEach(function(g,l){var c;c=i.globals.series[h][l],r=i.config.dataLabels.formatter(c,{ctx:e.dCtx.ctx,seriesIndex:h,dataPointIndex:l,w:i}),t.push(r)})});var r=pe.getLargestStringFromArr(t),u=new De(this.dCtx.ctx),n=i.config.dataLabels.style,a=u.getTextRects(r,parseInt(n.fontSize),n.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(e,i){var t=e;if(this.w.globals.isMultiLineX){var r=i.map(function(n,a){return Array.isArray(n)?n.length:1}),u=Math.max.apply(Math,nr(r));t=i[r.indexOf(u)]}return t}}]),s}(),Hj=function(){function s(e){Oe(this,s),this.w=e.w,this.dCtx=e}return Ne(s,[{key:"getxAxisLabelsCoords",value:function(){var e,i=this.w,t=i.globals.labels.slice();if(i.config.xaxis.convertedCatToNumeric&&t.length===0&&(t=i.globals.categoryLabels),i.globals.timescaleLabels.length>0){var r=this.getxAxisTimeScaleLabelsCoords();e={width:r.width,height:r.height},i.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=i.config.legend.position!=="left"&&i.config.legend.position!=="right"||i.config.legend.floating?0:this.dCtx.lgRect.width;var u=i.globals.xLabelFormatter,n=pe.getLargestStringFromArr(t),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,t);i.globals.isBarHorizontal&&(a=n=i.globals.yAxisScale[0].result.reduce(function(F,p){return F.length>p.length?F:p},0));var o=new Yn(this.dCtx.ctx),h=n;n=o.xLabelFormat(u,n,h,{i:void 0,dateFormatter:new gr(this.dCtx.ctx).formatDate,w:i}),a=o.xLabelFormat(u,a,h,{i:void 0,dateFormatter:new gr(this.dCtx.ctx).formatDate,w:i}),(i.config.xaxis.convertedCatToNumeric&&n===void 0||String(n).trim()==="")&&(a=n="1");var g=new De(this.dCtx.ctx),l=g.getTextRects(n,i.config.xaxis.labels.style.fontSize),c=l;if(n!==a&&(c=g.getTextRects(a,i.config.xaxis.labels.style.fontSize)),(e={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height}).width*t.length>i.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&i.config.xaxis.labels.rotate!==0||i.config.xaxis.labels.rotateAlways){if(!i.globals.isBarHorizontal){i.globals.rotateXLabels=!0;var d=function(F){return g.getTextRects(F,i.config.xaxis.labels.style.fontSize,i.config.xaxis.labels.style.fontFamily,"rotate(".concat(i.config.xaxis.labels.rotate," 0 0)"),!1)};l=d(n),n!==a&&(c=d(a)),e.height=(l.height>c.height?l.height:c.height)/1.5,e.width=l.width>c.width?l.width:c.width}}else i.globals.rotateXLabels=!1}return i.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,i=this.w;if(!i.globals.hasXaxisGroups)return{width:0,height:0};var t,r=((e=i.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||i.config.xaxis.labels.style.fontSize,u=i.globals.groups.map(function(l){return l.title}),n=pe.getLargestStringFromArr(u),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,u),o=new De(this.dCtx.ctx),h=o.getTextRects(n,r),g=h;return n!==a&&(g=o.getTextRects(a,r)),t={width:h.width>=g.width?h.width:g.width,height:h.height>=g.height?h.height:g.height},i.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,i=0,t=0;if(e.config.xaxis.title.text!==void 0){var r=new De(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);i=r.width,t=r.height}return{width:i,height:t}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,i=this.w;this.dCtx.timescaleLabels=i.globals.timescaleLabels.slice();var t=this.dCtx.timescaleLabels.map(function(u){return u.value}),r=t.reduce(function(u,n){return u===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):u.length>n.length?u:n},0);return 1.05*(e=new De(this.dCtx.ctx).getTextRects(r,i.config.xaxis.labels.style.fontSize)).width*t.length>i.globals.gridWidth&&i.config.xaxis.labels.rotate!==0&&(i.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var i=this,t=this.w,r=t.globals,u=t.config,n=u.xaxis.type,a=e.width;r.skipLastTimelinelabel=!1,r.skipFirstTimelinelabel=!1;var o=t.config.yaxis[0].opposite&&t.globals.isBarHorizontal,h=function(g,l){u.yaxis.length>1&&function(c){return r.collapsedSeriesIndices.indexOf(c)!==-1}(l)||function(c){if(i.dCtx.timescaleLabels&&i.dCtx.timescaleLabels.length){var d=i.dCtx.timescaleLabels[0],F=i.dCtx.timescaleLabels[i.dCtx.timescaleLabels.length-1].position+a/1.75-i.dCtx.yAxisWidthRight,p=d.position-a/1.75+i.dCtx.yAxisWidthLeft,f=t.config.legend.position==="right"&&i.dCtx.lgRect.width>0?i.dCtx.lgRect.width:0;F>r.svgWidth-r.translateX-f&&(r.skipLastTimelinelabel=!0),p<-(c.show&&!c.floating||u.chart.type!=="bar"&&u.chart.type!=="candlestick"&&u.chart.type!=="rangeBar"&&u.chart.type!=="boxPlot"?10:a/1.75)&&(r.skipFirstTimelinelabel=!0)}else n==="datetime"?i.dCtx.gridPad.right<a&&!r.rotateXLabels&&(r.skipLastTimelinelabel=!0):n!=="datetime"&&i.dCtx.gridPad.right<a/2-i.dCtx.yAxisWidthRight&&!r.rotateXLabels&&!t.config.xaxis.labels.trim&&(i.dCtx.xPadRight=a/2+1)}(g)};u.yaxis.forEach(function(g,l){o?(i.dCtx.gridPad.left<a&&(i.dCtx.xPadLeft=a/2+1),i.dCtx.xPadRight=a/2+1):h(g,l)})}}]),s}(),Uj=function(){function s(e){Oe(this,s),this.w=e.w,this.dCtx=e}return Ne(s,[{key:"getyAxisLabelsCoords",value:function(){var e=this,i=this.w,t=[],r=10,u=new x0(this.dCtx.ctx);return i.config.yaxis.map(function(n,a){var o={seriesIndex:a,dataPointIndex:-1,w:i},h=i.globals.yAxisScale[a],g=0;if(!u.isYAxisHidden(a)&&n.labels.show&&n.labels.minWidth!==void 0&&(g=n.labels.minWidth),!u.isYAxisHidden(a)&&n.labels.show&&h.result.length){var l=i.globals.yLabelFormatters[a],c=h.niceMin===Number.MIN_VALUE?0:h.niceMin,d=h.result.reduce(function(x,A){var b,y;return((b=String(l(x,o)))===null||b===void 0?void 0:b.length)>((y=String(l(A,o)))===null||y===void 0?void 0:y.length)?x:A},c),F=d=l(d,o);if(d!==void 0&&d.length!==0||(d=h.niceMax),i.globals.isBarHorizontal){r=0;var p=i.globals.labels.slice();d=pe.getLargestStringFromArr(p),d=l(d,{seriesIndex:a,dataPointIndex:-1,w:i}),F=e.dCtx.dimHelpers.getLargestStringFromMultiArr(d,p)}var f=new De(e.dCtx.ctx),m="rotate(".concat(n.labels.rotate," 0 0)"),v=f.getTextRects(d,n.labels.style.fontSize,n.labels.style.fontFamily,m,!1),w=v;d!==F&&(w=f.getTextRects(F,n.labels.style.fontSize,n.labels.style.fontFamily,m,!1)),t.push({width:(g>w.width||g>v.width?g:w.width>v.width?w.width:v.width)+r,height:w.height>v.height?w.height:v.height})}else t.push({width:0,height:0})}),t}},{key:"getyAxisTitleCoords",value:function(){var e=this,i=this.w,t=[];return i.config.yaxis.map(function(r,u){if(r.show&&r.title.text!==void 0){var n=new De(e.dCtx.ctx),a="rotate(".concat(r.title.rotate," 0 0)"),o=n.getTextRects(r.title.text,r.title.style.fontSize,r.title.style.fontFamily,a,!1);t.push({width:o.width,height:o.height})}else t.push({width:0,height:0})}),t}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,i=0,t=0,r=0,u=e.globals.yAxisScale.length>1?10:0,n=new x0(this.dCtx.ctx),a=function(o,h){var g=e.config.yaxis[h].floating,l=0;o.width>0&&!g?(l=o.width+u,function(c){return e.globals.ignoreYAxisIndexes.indexOf(c)>-1}(h)&&(l=l-o.width-u)):l=g||n.isYAxisHidden(h)?0:5,e.config.yaxis[h].opposite?r+=l:t+=l,i+=l};return e.globals.yLabelsCoords.map(function(o,h){a(o,h)}),e.globals.yTitleCoords.map(function(o,h){a(o,h)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(i=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=t,this.dCtx.yAxisWidthRight=r,i}}]),s}(),Yj=function(){function s(e){Oe(this,s),this.w=e.w,this.dCtx=e}return Ne(s,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var i=this.w,t=i.config,r=i.globals;if(r.noData||r.collapsedSeries.length+r.ancillaryCollapsedSeries.length===t.series.length)return 0;var u=function(d){return["bar","rangeBar","candlestick","boxPlot"].includes(d)},n=t.chart.type,a=0,o=u(n)?t.series.length:1;r.comboBarCount>0&&(o=r.comboBarCount),r.collapsedSeries.forEach(function(d){u(d.type)&&(o-=1)}),t.chart.stacked&&(o=1);var h=u(n)||r.comboBarCount>0,g=Math.abs(r.initialMaxX-r.initialMinX);if(h&&r.isXNumeric&&!r.isBarHorizontal&&o>0&&g!==0){g<=3&&(g=r.dataPoints);var l=g/e,c=r.minXDiff&&r.minXDiff/l>0?r.minXDiff/l:0;c>e/2&&(c/=2),(a=c*parseInt(t.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),r.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,i=this.w,t=i.globals,r=this.dCtx.isSparkline||!t.axisCharts?0:10;["title","subtitle"].forEach(function(a){i.config[a].text!==void 0?r+=i.config[a].margin:r+=e.dCtx.isSparkline||!t.axisCharts?0:5}),!i.config.legend.show||i.config.legend.position!=="bottom"||i.config.legend.floating||t.axisCharts||(r+=10);var u=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.gridHeight-=u.height+n.height+r,t.translateY+=u.height+n.height+r}},{key:"setGridXPosForDualYAxis",value:function(e,i){var t=this.w,r=new x0(this.dCtx.ctx);t.config.yaxis.forEach(function(u,n){t.globals.ignoreYAxisIndexes.indexOf(n)!==-1||u.floating||r.isYAxisHidden(n)||(u.opposite&&(t.globals.translateX-=i[n].width+e[n].width+parseInt(u.labels.style.fontSize,10)/1.2+12),t.globals.translateX<2&&(t.globals.translateX=2))})}}]),s}(),ua=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new zj(this),this.dimYAxis=new Uj(this),this.dimXAxis=new Hj(this),this.dimGrid=new Yj(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return Ne(s,[{key:"plotCoords",value:function(){var e=this,i=this.w,t=i.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var r=Array.isArray(i.config.stroke.width)?Math.max.apply(Math,nr(i.config.stroke.width)):i.config.stroke.width;this.isSparkline&&((i.config.markers.discrete.length>0||i.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(n){var a=iv(n,2),o=a[0],h=a[1];e.gridPad[o]=Math.max(h,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(r/2,this.gridPad.top),this.gridPad.bottom=Math.max(r/2,this.gridPad.bottom)),t.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.gridHeight=t.gridHeight-this.gridPad.top-this.gridPad.bottom,t.gridWidth=t.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var u=this.dimGrid.gridPadForColumnsInNumericAxis(t.gridWidth);t.gridWidth=t.gridWidth-2*u,t.translateX=t.translateX+this.gridPad.left+this.xPadLeft+(u>0?u:0),t.translateY=t.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,i=this.w,t=i.globals,r=this.dimYAxis.getyAxisLabelsCoords(),u=this.dimYAxis.getyAxisTitleCoords();t.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),i.globals.yLabelsCoords=[],i.globals.yTitleCoords=[],i.config.yaxis.map(function(d,F){i.globals.yLabelsCoords.push({width:r[F].width,index:F}),i.globals.yTitleCoords.push({width:u[F].width,index:F})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var n=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(n,o,a),t.translateXAxisY=i.globals.rotateXLabels?this.xAxisHeight/8:-4,t.translateXAxisX=i.globals.rotateXLabels&&i.globals.isXNumeric&&i.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,i.globals.isBarHorizontal&&(t.rotateXLabels=!1,t.translateXAxisY=parseInt(i.config.xaxis.labels.style.fontSize,10)/1.5*-1),t.translateXAxisY=t.translateXAxisY+i.config.xaxis.labels.offsetY,t.translateXAxisX=t.translateXAxisX+i.config.xaxis.labels.offsetX;var h=this.yAxisWidth,g=this.xAxisHeight;t.xAxisLabelsHeight=this.xAxisHeight-o.height,t.xAxisGroupLabelsHeight=t.xAxisLabelsHeight-n.height,t.xAxisLabelsWidth=this.xAxisWidth,t.xAxisHeight=this.xAxisHeight;var l=10;(i.config.chart.type==="radar"||this.isSparkline)&&(h=0,g=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||i.config.chart.type==="treemap")&&(h=0,g=0,l=0),this.isSparkline||i.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(n);var c=function(){t.translateX=h+e.datalabelsCoords.width,t.gridHeight=t.svgHeight-e.lgRect.height-g-(e.isSparkline||i.config.chart.type==="treemap"?0:i.globals.rotateXLabels?10:15),t.gridWidth=t.svgWidth-h-2*e.datalabelsCoords.width};switch(i.config.xaxis.position==="top"&&(l=t.xAxisHeight-i.config.xaxis.axisTicks.height-5),i.config.legend.position){case"bottom":t.translateY=l,c();break;case"top":t.translateY=this.lgRect.height+l,c();break;case"left":t.translateY=l,t.translateX=this.lgRect.width+h+this.datalabelsCoords.width,t.gridHeight=t.svgHeight-g-12,t.gridWidth=t.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width;break;case"right":t.translateY=l,t.translateX=h+this.datalabelsCoords.width,t.gridHeight=t.svgHeight-g-12,t.gridWidth=t.svgWidth-this.lgRect.width-h-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(u,r),new Yh(this.ctx).setYAxisXPosition(r,u)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,i=e.globals,t=e.config,r=0;e.config.legend.show&&!e.config.legend.floating&&(r=20);var u=t.chart.type==="pie"||t.chart.type==="polarArea"||t.chart.type==="donut"?"pie":"radialBar",n=t.plotOptions[u].offsetY,a=t.plotOptions[u].offsetX;if(!t.legend.show||t.legend.floating){i.gridHeight=i.svgHeight;var o=i.dom.elWrap.getBoundingClientRect().width;return i.gridWidth=Math.min(o,i.gridHeight),i.translateY=n,void(i.translateX=a+(i.svgWidth-i.gridWidth)/2)}switch(t.legend.position){case"bottom":i.gridHeight=i.svgHeight-this.lgRect.height,i.gridWidth=i.svgWidth,i.translateY=n-10,i.translateX=a+(i.svgWidth-i.gridWidth)/2;break;case"top":i.gridHeight=i.svgHeight-this.lgRect.height,i.gridWidth=i.svgWidth,i.translateY=this.lgRect.height+n+10,i.translateX=a+(i.svgWidth-i.gridWidth)/2;break;case"left":i.gridWidth=i.svgWidth-this.lgRect.width-r,i.gridHeight=t.chart.height!=="auto"?i.svgHeight:i.gridWidth,i.translateY=n,i.translateX=a+this.lgRect.width+r;break;case"right":i.gridWidth=i.svgWidth-this.lgRect.width-r-5,i.gridHeight=t.chart.height!=="auto"?i.svgHeight:i.gridWidth,i.translateY=n,i.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,i,t){var r=this.w,u=r.globals.hasXaxisGroups?2:1,n=t.height+e.height+i.height,a=r.globals.isMultiLineX?1.2:r.globals.LINE_HEIGHT_RATIO,o=r.globals.rotateXLabels?22:10,h=r.globals.rotateXLabels&&r.config.legend.position==="bottom"?10:0;this.xAxisHeight=n*a+u*o+h,this.xAxisWidth=e.width,this.xAxisHeight-i.height>r.config.xaxis.labels.maxHeight&&(this.xAxisHeight=r.config.xaxis.labels.maxHeight),r.config.xaxis.labels.minHeight&&this.xAxisHeight<r.config.xaxis.labels.minHeight&&(this.xAxisHeight=r.config.xaxis.labels.minHeight),r.config.xaxis.floating&&(this.xAxisHeight=0);var g=0,l=0;r.config.yaxis.forEach(function(c){g+=c.labels.minWidth,l+=c.labels.maxWidth}),this.yAxisWidth<g&&(this.yAxisWidth=g),this.yAxisWidth>l&&(this.yAxisWidth=l)}}]),s}(),Vj=function(){function s(e){Oe(this,s),this.w=e.w,this.lgCtx=e}return Ne(s,[{key:"getLegendStyles",value:function(){var e,i,t,r=document.createElement("style");r.setAttribute("type","text/css");var u=((e=this.lgCtx.ctx)===null||e===void 0||(i=e.opts)===null||i===void 0||(t=i.chart)===null||t===void 0?void 0:t.nonce)||this.w.config.chart.nonce;u&&r.setAttribute("nonce",u);var n=document.createTextNode(`
      .apexcharts-flip-y {
        transform: scaleY(-1) translateY(-100%);
        transform-origin: top;
        transform-box: fill-box;
      }
      .apexcharts-flip-x {
        transform: scaleX(-1);
        transform-origin: center;
        transform-box: fill-box;
      }
      .apexcharts-legend {
        display: flex;
        overflow: auto;
        padding: 0 10px;
      }
      .apexcharts-legend.apexcharts-legend-group-horizontal {
        flex-direction: column;
      }
      .apexcharts-legend-group {
        display: flex;
      }
      .apexcharts-legend-group-vertical {
        flex-direction: column-reverse;
      }
      .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
        flex-wrap: wrap
      }
      .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
        flex-direction: column;
        bottom: 0;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
        justify-content: flex-start;
        align-items: flex-start;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
        justify-content: center;
        align-items: center;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
        justify-content: flex-end;
        align-items: flex-end;
      }
      .apexcharts-legend-series {
        cursor: pointer;
        line-height: normal;
        display: flex;
        align-items: center;
      }
      .apexcharts-legend-text {
        position: relative;
        font-size: 14px;
      }
      .apexcharts-legend-text *, .apexcharts-legend-marker * {
        pointer-events: none;
      }
      .apexcharts-legend-marker {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin-right: 1px;
      }

      .apexcharts-legend-series.apexcharts-no-click {
        cursor: auto;
      }
      .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
        display: none !important;
      }
      .apexcharts-inactive-legend {
        opacity: 0.45;
      }

    `);return r.appendChild(n),r}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),i=e.width;return{clwh:e.height,clww:i}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,i){var t=this,r=this.w;if(r.globals.axisCharts||r.config.chart.type==="radialBar"){r.globals.resized=!0;var u=null,n=null;r.globals.risingSeries=[],r.globals.axisCharts?(u=r.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),n=parseInt(u.getAttribute("data:realIndex"),10)):(u=r.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),n=parseInt(u.getAttribute("rel"),10)-1),i?[{cs:r.globals.collapsedSeries,csi:r.globals.collapsedSeriesIndices},{cs:r.globals.ancillaryCollapsedSeries,csi:r.globals.ancillaryCollapsedSeriesIndices}].forEach(function(g){t.riseCollapsedSeries(g.cs,g.csi,n)}):this.hideSeries({seriesEl:u,realIndex:n})}else{var a=r.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),o=r.config.chart.type;if(o==="pie"||o==="polarArea"||o==="donut"){var h=r.config.plotOptions.pie.donut.labels;new De(this.lgCtx.ctx).pathMouseDown(a,null),this.lgCtx.ctx.pie.printDataLabelsInner(a.node,h)}a.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var i=e.realIndex,t=this.w,r=t.globals,u=pe.clone(t.config.series);if(r.axisCharts){var n=t.config.yaxis[r.seriesYAxisReverseMap[i]],a={index:i,data:u[i].data.slice(),type:u[i].type||t.config.chart.type};if(n&&n.show&&n.showAlways)r.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(r.ancillaryCollapsedSeries.push(a),r.ancillaryCollapsedSeriesIndices.push(i));else if(r.collapsedSeriesIndices.indexOf(i)<0){r.collapsedSeries.push(a),r.collapsedSeriesIndices.push(i);var o=r.risingSeries.indexOf(i);r.risingSeries.splice(o,1)}}else r.collapsedSeries.push({index:i,data:u[i]}),r.collapsedSeriesIndices.push(i);return r.allSeriesCollapsed=r.collapsedSeries.length+r.ancillaryCollapsedSeries.length===t.config.series.length,this._getSeriesBasedOnCollapsedState(u)}},{key:"hideSeries",value:function(e){for(var i=e.seriesEl,t=e.realIndex,r=this.w,u=this.getSeriesAfterCollapsing({realIndex:t}),n=i.childNodes,a=0;a<n.length;a++)n[a].classList.contains("apexcharts-series-markers-wrap")&&(n[a].classList.contains("apexcharts-hide")?n[a].classList.remove("apexcharts-hide"):n[a].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(u,r.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,i,t){var r=this.w,u=pe.clone(r.config.series);if(e.length>0){for(var n=0;n<e.length;n++)e[n].index===t&&(r.globals.axisCharts?u[t].data=e[n].data.slice():u[t]=e[n].data,typeof u[t]!="number"&&(u[t].hidden=!1),e.splice(n,1),i.splice(n,1),r.globals.risingSeries.push(t));u=this._getSeriesBasedOnCollapsedState(u),this.lgCtx.ctx.updateHelpers._updateSeries(u,r.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var i=this.w,t=0;return i.globals.axisCharts?e.forEach(function(r,u){i.globals.collapsedSeriesIndices.indexOf(u)<0&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(u)<0||(e[u].data=[],t++)}):e.forEach(function(r,u){!i.globals.collapsedSeriesIndices.indexOf(u)<0&&(e[u]=0,t++)}),i.globals.allSeriesCollapsed=t===e.length,e}}]),s}(),Iv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Vj(this)}return Ne(s,[{key:"init",value:function(){var e=this.w,i=e.globals,t=e.config,r=t.legend.showForSingleSeries&&i.series.length===1||this.isBarsDistributed||i.series.length>1;if(this.legendHelpers.appendToForeignObject(),(r||!i.axisCharts)&&t.legend.show){for(;i.dom.elLegendWrap.firstChild;)i.dom.elLegendWrap.removeChild(i.dom.elLegendWrap.firstChild);this.drawLegends(),t.legend.position==="bottom"||t.legend.position==="top"?this.legendAlignHorizontal():t.legend.position!=="right"&&t.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var i=e.i,t=e.fillcolor,r=this.w,u=document.createElement("span");u.classList.add("apexcharts-legend-marker");var n=r.config.legend.markers.shape||r.config.markers.shape,a=n;Array.isArray(n)&&(a=n[i]);var o=Array.isArray(r.config.legend.markers.size)?parseFloat(r.config.legend.markers.size[i]):parseFloat(r.config.legend.markers.size),h=Array.isArray(r.config.legend.markers.offsetX)?parseFloat(r.config.legend.markers.offsetX[i]):parseFloat(r.config.legend.markers.offsetX),g=Array.isArray(r.config.legend.markers.offsetY)?parseFloat(r.config.legend.markers.offsetY[i]):parseFloat(r.config.legend.markers.offsetY),l=Array.isArray(r.config.legend.markers.strokeWidth)?parseFloat(r.config.legend.markers.strokeWidth[i]):parseFloat(r.config.legend.markers.strokeWidth),c=u.style;if(c.height=2*(o+l)+"px",c.width=2*(o+l)+"px",c.left=h+"px",c.top=g+"px",r.config.legend.markers.customHTML)c.background="transparent",c.color=t[i],Array.isArray(r.config.legend.markers.customHTML)?r.config.legend.markers.customHTML[i]&&(u.innerHTML=r.config.legend.markers.customHTML[i]()):u.innerHTML=r.config.legend.markers.customHTML();else{var d=new ju(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:i,strokeWidth:l,size:o}),F=window.SVG().addTo(u).size("100%","100%"),p=new De(this.ctx).drawMarker(0,0,Pe(Pe({},d),{},{pointFillColor:Array.isArray(t)?t[i]:d.pointFillColor,shape:a}));r.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(f){f.node.classList.contains("apexcharts-marker-triangle")?f.node.style.transform="translate(50%, 45%)":f.node.style.transform="translate(50%, 50%)"}),F.add(p)}return u}},{key:"drawLegends",value:function(){var e=this,i=this,t=this.w,r=t.config.legend.fontFamily,u=t.globals.seriesNames,n=t.config.legend.markers.fillColors?t.config.legend.markers.fillColors.slice():t.globals.colors.slice();if(t.config.chart.type==="heatmap"){var a=t.config.plotOptions.heatmap.colorScale.ranges;u=a.map(function(d){return d.name?d.name:d.from+" - "+d.to}),n=a.map(function(d){return d.color})}else this.isBarsDistributed&&(u=t.globals.labels.slice());t.config.legend.customLegendItems.length&&(u=t.config.legend.customLegendItems);var o=t.globals.legendFormatter,h=t.config.legend.inverseOrder,g=[];t.globals.seriesGroups.length>1&&t.config.legend.clusterGroupedSeries&&t.globals.seriesGroups.forEach(function(d,F){g[F]=document.createElement("div"),g[F].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(F)),t.config.legend.clusterGroupedSeriesOrientation==="horizontal"?t.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):g[F].classList.add("apexcharts-legend-group-vertical")});for(var l=function(d){var F,p=o(u[d],{seriesIndex:d,w:t}),f=!1,m=!1;if(t.globals.collapsedSeries.length>0)for(var v=0;v<t.globals.collapsedSeries.length;v++)t.globals.collapsedSeries[v].index===d&&(f=!0);if(t.globals.ancillaryCollapsedSeriesIndices.length>0)for(var w=0;w<t.globals.ancillaryCollapsedSeriesIndices.length;w++)t.globals.ancillaryCollapsedSeriesIndices[w]===d&&(m=!0);var x=e.createLegendMarker({i:d,fillcolor:n});De.setAttrs(x,{rel:d+1,"data:collapsed":f||m}),(f||m)&&x.classList.add("apexcharts-inactive-legend");var A=document.createElement("div"),b=document.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(p)?p.join(" "):p;var y=t.config.legend.labels.useSeriesColors?t.globals.colors[d]:Array.isArray(t.config.legend.labels.colors)?(F=t.config.legend.labels.colors)===null||F===void 0?void 0:F[d]:t.config.legend.labels.colors;y||(y=t.config.chart.foreColor),b.style.color=y,b.style.fontSize=parseFloat(t.config.legend.fontSize)+"px",b.style.fontWeight=t.config.legend.fontWeight,b.style.fontFamily=r||t.config.chart.fontFamily,De.setAttrs(b,{rel:d+1,i:d,"data:default-text":encodeURIComponent(p),"data:collapsed":f||m}),A.appendChild(x),A.appendChild(b);var k=new Gt(e.ctx);t.config.legend.showForZeroSeries||k.getSeriesTotalByIndex(d)===0&&k.seriesHaveSameValues(d)&&!k.isSeriesNull(d)&&t.globals.collapsedSeriesIndices.indexOf(d)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1&&A.classList.add("apexcharts-hidden-zero-series"),t.config.legend.showForNullSeries||k.isSeriesNull(d)&&t.globals.collapsedSeriesIndices.indexOf(d)===-1&&t.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1&&A.classList.add("apexcharts-hidden-null-series"),g.length?t.globals.seriesGroups.forEach(function(C,D){var T;C.includes((T=t.config.series[d])===null||T===void 0?void 0:T.name)&&(t.globals.dom.elLegendWrap.appendChild(g[D]),g[D].appendChild(A))}):t.globals.dom.elLegendWrap.appendChild(A),t.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(t.config.legend.horizontalAlign)),t.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+t.config.legend.position),A.classList.add("apexcharts-legend-series"),A.style.margin="".concat(t.config.legend.itemMargin.vertical,"px ").concat(t.config.legend.itemMargin.horizontal,"px"),t.globals.dom.elLegendWrap.style.width=t.config.legend.width?t.config.legend.width+"px":"",t.globals.dom.elLegendWrap.style.height=t.config.legend.height?t.config.legend.height+"px":"",De.setAttrs(A,{rel:d+1,seriesName:pe.escapeString(u[d]),"data:collapsed":f||m}),(f||m)&&A.classList.add("apexcharts-inactive-legend"),t.config.legend.onItemClick.toggleDataSeries||A.classList.add("apexcharts-no-click")},c=h?u.length-1:0;h?c>=0:c<=u.length-1;h?c--:c++)l(c);t.globals.dom.elWrap.addEventListener("click",i.onLegendClick,!0),t.config.legend.onItemHover.highlightDataSeries&&t.config.legend.customLegendItems.length===0&&(t.globals.dom.elWrap.addEventListener("mousemove",i.onLegendHovered,!0),t.globals.dom.elWrap.addEventListener("mouseout",i.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,i){var t=this.w,r=t.globals.dom.elLegendWrap,u=r.clientHeight,n=0,a=0;if(t.config.legend.position==="bottom")a=t.globals.svgHeight-Math.min(u,t.globals.svgHeight/2)-5;else if(t.config.legend.position==="top"){var o=new ua(this.ctx),h=o.dimHelpers.getTitleSubtitleCoords("title").height,g=o.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(h>0?h-10:0)+(g>0?g-10:0)}r.style.position="absolute",n=n+e+t.config.legend.offsetX,a=a+i+t.config.legend.offsetY,r.style.left=n+"px",r.style.top=a+"px",t.config.legend.position==="right"&&(r.style.left="auto",r.style.right=25+t.config.legend.offsetX+"px"),["width","height"].forEach(function(l){r.style[l]&&(r.style[l]=parseInt(t.config.legend[l],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var i=new ua(this.ctx),t=i.dimHelpers.getTitleSubtitleCoords("title"),r=i.dimHelpers.getTitleSubtitleCoords("subtitle"),u=0;e.config.legend.position==="top"&&(u=t.height+r.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,u)}},{key:"legendAlignVertical",value:function(){var e=this.w,i=this.legendHelpers.getLegendDimensions(),t=0;e.config.legend.position==="left"&&(t=20),e.config.legend.position==="right"&&(t=e.globals.svgWidth-i.clww-10),this.setLegendWrapXY(t,20)}},{key:"onLegendHovered",value:function(e){var i=this.w,t=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(i.config.chart.type==="heatmap"||this.isBarsDistributed){if(t){var r=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,r,this.w]),new ni(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&t&&new ni(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var i=this.w;if(!i.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var t=parseInt(e.target.getAttribute("rel"),10)-1,r=e.target.getAttribute("data:collapsed")==="true",u=this.w.config.chart.events.legendClick;typeof u=="function"&&u(this.ctx,t,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,t,this.w]);var n=this.w.config.legend.markers.onClick;typeof n=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(n(this.ctx,t,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,t,this.w])),i.config.chart.type!=="treemap"&&i.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&i.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(t,r)}}}]),s}(),Rv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return Ne(s,[{key:"createToolbar",value:function(){var e=this,i=this.w,t=function(){return document.createElement("div")},r=t();if(r.setAttribute("class","apexcharts-toolbar"),r.style.top=i.config.chart.toolbar.offsetY+"px",r.style.right=3-i.config.chart.toolbar.offsetX+"px",i.globals.dom.elWrap.appendChild(r),this.elZoom=t(),this.elZoomIn=t(),this.elZoomOut=t(),this.elPan=t(),this.elSelection=t(),this.elZoomReset=t(),this.elMenuIcon=t(),this.elMenu=t(),this.elCustomIcons=[],this.t=i.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var u=0;u<this.t.customIcons.length;u++)this.elCustomIcons.push(t());var n=[],a=function(l,c,d){var F=l.toLowerCase();e.t[F]&&i.config.chart.zoom.enabled&&n.push({el:c,icon:typeof e.t[F]=="string"?e.t[F]:d,title:e.localeValues[l],class:"apexcharts-".concat(F,"-icon")})};a("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`);var o=function(l){e.t[l]&&i.config.chart[l].enabled&&n.push({el:l==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[l]=="string"?e.t[l]:l==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
    <path d="M0 0h24v24H0V0z" fill="none"/>
    <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
</svg>`,title:e.localeValues[l==="zoom"?"selectionZoom":"selection"],class:i.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(l,"-icon")})};o("zoom"),o("selection"),this.t.pan&&i.config.chart.zoom.enabled&&n.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
    <defs>
        <path d="M0 0h24v24H0z" id="a"/>
    </defs>
    <clipPath id="b">
        <use overflow="visible" xlink:href="#a"/>
    </clipPath>
    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
</svg>`,title:this.localeValues.pan,class:i.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
    <path d="M0 0h24v24H0z" fill="none"/>
</svg>`),this.t.download&&n.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var h=0;h<this.elCustomIcons.length;h++)n.push({el:this.elCustomIcons[h],icon:this.t.customIcons[h].icon,title:this.t.customIcons[h].title,index:this.t.customIcons[h].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[h].class});n.forEach(function(l,c){l.index&&pe.moveIndexInArray(n,c,l.index)});for(var g=0;g<n.length;g++)De.setAttrs(n[g].el,{class:n[g].class,title:n[g].title}),n[g].el.innerHTML=n[g].icon,r.appendChild(n[g].el);this._createHamburgerMenu(r),i.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):i.globals.panEnabled?this.elPan.classList.add(this.selectedClass):i.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),De.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var i=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],t=0;t<i.length;t++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[t].innerHTML=i[t].title,De.setAttrs(this.elMenuItems[t],{class:"apexcharts-menu-item ".concat(i[t].name),title:i[t].title}),this.elMenu.appendChild(this.elMenuItems[t])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(t){t.classList.contains("exportSVG")?t.addEventListener("click",e.handleDownload.bind(e,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",e.handleDownload.bind(e,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var i=0;i<this.t.customIcons.length;i++)this.elCustomIcons[i].addEventListener("click",this.t.customIcons[i].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(i){i.ctx.toolbar.toggleOtherControls();var t=e==="selection"?i.ctx.toolbar.elSelection:i.ctx.toolbar.elZoom,r=e==="selection"?"selectionEnabled":"zoomEnabled";i.w.globals[r]=!i.w.globals[r],t.classList.contains(i.ctx.toolbar.selectedClass)?t.classList.remove(i.ctx.toolbar.selectedClass):t.classList.add(i.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var i=e==="pan"?this.elPan:this.elZoom,t=e==="pan"?this.elZoom:this.elPan;i&&i.classList.add(this.selectedClass),t&&t.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,i=this.w;i.globals.panEnabled=!1,i.globals.zoomEnabled=!1,i.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(t){t&&t.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var i=(this.minX+this.maxX)/2,t=(this.minX+i)/2,r=(this.maxX+i)/2,u=this._getNewMinXMaxX(t,r);e.globals.disableZoomIn||this.zoomUpdateOptions(u.minX,u.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var i=(this.minX+this.maxX)/2,t=this.minX-(i-this.minX),r=this.maxX-(i-this.maxX),u=this._getNewMinXMaxX(t,r);e.globals.disableZoomOut||this.zoomUpdateOptions(u.minX,u.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,i){var t=this.w.config.xaxis.convertedCatToNumeric;return{minX:t?Math.floor(e):e,maxX:t?Math.floor(i):i}}},{key:"zoomUpdateOptions",value:function(e,i){var t=this.w;if(e!==void 0||i!==void 0){if(!(t.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,i=t.globals.dataPoints),i-e<2))){var r={min:e,max:i},u=this.getBeforeZoomRange(r);u&&(r=u.xaxis);var n={xaxis:r},a=pe.clone(t.globals.initialConfig.yaxis);t.config.chart.group||(n.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(n,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(r,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,i){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:i})}},{key:"getBeforeZoomRange",value:function(e,i){var t=null;return typeof this.ev.beforeZoom=="function"&&(t=this.ev.beforeZoom(this,{xaxis:e,yaxis:i})),t}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var i=this.w,t=new hn(this.ctx);switch(e){case"svg":t.exportToSVG(this.ctx);break;case"png":t.exportToPng(this.ctx);break;case"csv":t.exportToCSV({series:i.config.series,columnDelimiter:i.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(i){var t=i.w;if(t.globals.lastXAxis.min=t.globals.initialConfig.xaxis.min,t.globals.lastXAxis.max=t.globals.initialConfig.xaxis.max,i.updateHelpers.revertDefaultAxisMinMax(),typeof t.config.chart.events.beforeResetZoom=="function"){var r=t.config.chart.events.beforeResetZoom(i,t);r&&i.updateHelpers.revertDefaultAxisMinMax(r)}typeof t.config.chart.events.zoomed=="function"&&i.ctx.toolbar.zoomCallback({min:t.config.xaxis.min,max:t.config.xaxis.max}),t.globals.zoomed=!1;var u=i.ctx.series.emptyCollapsedSeries(pe.clone(t.globals.initialSeries));i.updateHelpers._updateSeries(u,t.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),s}(),Xj=function(s){Wn(i,Rv);var e=Nn(i);function i(t){var r;return Oe(this,i),(r=e.call(this,t)).ctx=t,r.w=t.w,r.dragged=!1,r.graphics=new De(r.ctx),r.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],r.clientX=0,r.clientY=0,r.startX=0,r.endX=0,r.dragX=0,r.startY=0,r.endY=0,r.dragY=0,r.moveDirection="none",r.debounceTimer=null,r.debounceDelay=100,r.wheelDelay=400,r}return Ne(i,[{key:"init",value:function(t){var r=this,u=t.xyRatios,n=this.w,a=this;this.xyRatios=u,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=n.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Vt(0,0,n.globals.gridWidth,n.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),n.globals.dom.Paper.add(this.zoomRect),n.globals.dom.Paper.add(this.selectionRect),n.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:n.globals.gridWidth,maxY:n.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):n.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:n.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=n.globals.dom.baseEl.querySelector("".concat(n.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(o){r.hoverArea.addEventListener(o,a.svgMouseEvents.bind(a,u),{capture:!1,passive:!0})}),n.config.chart.zoom.enabled&&n.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",a.mouseWheelEvent.bind(a),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(t,r){var u=this.w,n=this.ctx.toolbar,a=u.globals.zoomEnabled?u.config.chart.zoom.type:u.config.chart.selection.type,o=u.config.chart.toolbar.autoSelected;if(r.shiftKey?(this.shiftWasPressed=!0,n.enableZoomPanFromToolbar(o==="pan"?"zoom":"pan")):this.shiftWasPressed&&(n.enableZoomPanFromToolbar(o),this.shiftWasPressed=!1),r.target){var h,g=r.target.classList;if(r.target.parentNode&&r.target.parentNode!==null&&(h=r.target.parentNode.classList),!(g.contains("apexcharts-legend-marker")||g.contains("apexcharts-legend-text")||h&&h.contains("apexcharts-toolbar"))){if(this.clientX=r.type==="touchmove"||r.type==="touchstart"?r.touches[0].clientX:r.type==="touchend"?r.changedTouches[0].clientX:r.clientX,this.clientY=r.type==="touchmove"||r.type==="touchstart"?r.touches[0].clientY:r.type==="touchend"?r.changedTouches[0].clientY:r.clientY,r.type==="mousedown"&&r.which===1||r.type==="touchstart"){var l=this.gridRect.getBoundingClientRect();this.startX=this.clientX-l.left-u.globals.barPadForNumericAxis,this.startY=this.clientY-l.top,this.dragged=!1,this.w.globals.mousedown=!0}(r.type==="mousemove"&&r.which===1||r.type==="touchmove")&&(this.dragged=!0,u.globals.panEnabled?(u.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:t})):(this.w.globals.mousedown&&u.globals.zoomEnabled||this.w.globals.mousedown&&u.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),r.type!=="mouseup"&&r.type!=="touchend"&&r.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(t){var r,u=t.zoomtype,n=t.isResized,a=this.w,o=(r=this.gridRect)===null||r===void 0?void 0:r.getBoundingClientRect();o&&(this.w.globals.mousedown||n)&&(this.endX=this.clientX-o.left-a.globals.barPadForNumericAxis,this.endY=this.clientY-o.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(a.globals.zoomEnabled||a.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:u}),a.globals.panEnabled&&a.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),a.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(t){var r=this,u=this.w;t.preventDefault();var n=Date.now();n-u.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),u.globals.lastWheelExecution=n),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){n-u.globals.lastWheelExecution>r.wheelDelay&&(r.executeMouseWheelZoom(t),u.globals.lastWheelExecution=n)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var r,u=this.w;this.minX=u.globals.isRangeBar?u.globals.minY:u.globals.minX,this.maxX=u.globals.isRangeBar?u.globals.maxY:u.globals.maxX;var n=(r=this.gridRect)===null||r===void 0?void 0:r.getBoundingClientRect();if(n){var a,o,h,g=(t.clientX-n.left)/n.width,l=this.minX,c=this.maxX,d=c-l;if(t.deltaY<0){var F=l+g*d;o=F-(a=.5*d)/2,h=F+a/2}else o=l-(a=1.5*d)/2,h=c+a/2;if(!u.globals.isRangeBar){o=Math.max(o,u.globals.initialMinX),h=Math.min(h,u.globals.initialMaxX);var p=.01*(u.globals.initialMaxX-u.globals.initialMinX);if(h-o<p){var f=(o+h)/2;o=f-p/2,h=f+p/2}}var m=this._getNewMinXMaxX(o,h);isNaN(m.minX)||isNaN(m.maxX)||this.zoomUpdateOptions(m.minX,m.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var t=this,r=this.w;if(this.selectionRect){var u=this.selectionRect.node.getBoundingClientRect();u.width>0&&u.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(n,a,o,h,g){return g==="l"||g==="r"?n.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):n.circle(0)},updateHandle:function(n,a){return n.center(a[0],a[1])}}).resize().on("resize",function(){var n=r.globals.zoomEnabled?r.config.chart.zoom.type:r.config.chart.selection.type;t.handleMouseUp({zoomtype:n,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var t=this.w,r=this.xyRatios;if(!t.globals.zoomEnabled){if(t.globals.selection!==void 0&&t.globals.selection!==null)this.drawSelectionRect(Pe(Pe({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(t.config.chart.selection.xaxis.min!==void 0&&t.config.chart.selection.xaxis.max!==void 0){var u=(t.config.chart.selection.xaxis.min-t.globals.minX)/r.xRatio,n=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/r.xRatio-u;t.globals.isRangeBar&&(u=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/r.invertedYRatio,n=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/r.invertedYRatio);var a={x:u,y:0,width:n,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof t.config.chart.events.selection=="function"&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(t){var r=t.x,u=t.y,n=t.width,a=t.height,o=t.translateX,h=o===void 0?0:o,g=t.translateY,l=g===void 0?0:g,c=this.w,d=this.zoomRect,F=this.selectionRect;if(this.dragged||c.globals.selection!==null){var p={transform:"translate("+h+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(n<0&&(n=1),d.attr({x:r,y:u,width:n,height:a,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),De.setAttrs(d.node,p)),c.globals.selectionEnabled&&(F.attr({x:r,y:u,width:n>0?n:0,height:a>0?a:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),De.setAttrs(F.node,p))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var r=t.context,u=t.zoomtype,n=this.w,a=r,o=this.gridRect.getBoundingClientRect(),h=a.startX-1,g=a.startY,l=!1,c=!1,d=a.clientX-o.left-n.globals.barPadForNumericAxis,F=a.clientY-o.top,p=d-h,f=F-g,m={translateX:n.globals.translateX,translateY:n.globals.translateY};return Math.abs(p+h)>n.globals.gridWidth?p=n.globals.gridWidth-h:d<0&&(p=h),h>d&&(l=!0,p=Math.abs(p)),g>F&&(c=!0,f=Math.abs(f)),m=Pe(Pe({},m=u==="x"?{x:l?h-p:h,y:0,width:p,height:n.globals.gridHeight}:u==="y"?{x:0,y:c?g-f:g,width:n.globals.gridWidth,height:f}:{x:l?h-p:h,y:c?g-f:g,width:p,height:f}),{},{translateX:n.globals.translateX,translateY:n.globals.translateY}),a.drawSelectionRect(m),a.selectionDragging("resizing"),m}},{key:"selectionDragging",value:function(t,r){var u=this,n=this.w;if(r){r.preventDefault();var a=r.detail,o=a.handler,h=a.box,g=h.x,l=h.y;g<this.constraints.x&&(g=this.constraints.x),l<this.constraints.y&&(l=this.constraints.y),h.x2>this.constraints.x2&&(g=this.constraints.x2-h.w),h.y2>this.constraints.y2&&(l=this.constraints.y2-h.h),o.move(g,l);var c=this.xyRatios,d=this.selectionRect,F=0;t==="resizing"&&(F=30);var p=function(m){return parseFloat(d.node.getAttribute(m))},f={x:p("x"),y:p("y"),width:p("width"),height:p("height")};n.globals.selection=f,typeof n.config.chart.events.selection=="function"&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var m,v,w,x,A=u.gridRect.getBoundingClientRect(),b=d.node.getBoundingClientRect();n.globals.isRangeBar?(m=n.globals.yAxisScale[0].niceMin+(b.left-A.left)*c.invertedYRatio,v=n.globals.yAxisScale[0].niceMin+(b.right-A.left)*c.invertedYRatio,w=0,x=1):(m=n.globals.xAxisScale.niceMin+(b.left-A.left)*c.xRatio,v=n.globals.xAxisScale.niceMin+(b.right-A.left)*c.xRatio,w=n.globals.yAxisScale[0].niceMin+(A.bottom-b.bottom)*c.yRatio[0],x=n.globals.yAxisScale[0].niceMax-(b.top-A.top)*c.yRatio[0]);var y={xaxis:{min:m,max:v},yaxis:{min:w,max:x}};n.config.chart.events.selection(u.ctx,y),n.config.chart.brush.enabled&&n.config.chart.events.brushScrolled!==void 0&&n.config.chart.events.brushScrolled(u.ctx,y)},F))}}},{key:"selectionDrawn",value:function(t){var r,u,n=t.context,a=t.zoomtype,o=this.w,h=n,g=this.xyRatios,l=this.ctx.toolbar,c=o.globals.zoomEnabled?h.zoomRect.node.getBoundingClientRect():h.selectionRect.node.getBoundingClientRect(),d=h.gridRect.getBoundingClientRect(),F=c.left-d.left-o.globals.barPadForNumericAxis,p=c.right-d.left-o.globals.barPadForNumericAxis,f=c.top-d.top,m=c.bottom-d.top;o.globals.isRangeBar?(r=o.globals.yAxisScale[0].niceMin+F*g.invertedYRatio,u=o.globals.yAxisScale[0].niceMin+p*g.invertedYRatio):(r=o.globals.xAxisScale.niceMin+F*g.xRatio,u=o.globals.xAxisScale.niceMin+p*g.xRatio);var v=[],w=[];if(o.config.yaxis.forEach(function(D,T){var S=o.globals.seriesYAxisMap[T][0],M=o.globals.yAxisScale[T].niceMax-g.yRatio[S]*f,R=o.globals.yAxisScale[T].niceMax-g.yRatio[S]*m;v.push(M),w.push(R)}),h.dragged&&(h.dragX>10||h.dragY>10)&&r!==u){if(o.globals.zoomEnabled){var x=pe.clone(o.globals.initialConfig.yaxis),A=pe.clone(o.globals.initialConfig.xaxis);if(o.globals.zoomed=!0,o.config.xaxis.convertedCatToNumeric&&(r=Math.floor(r),u=Math.floor(u),r<1&&(r=1,u=o.globals.dataPoints),u-r<2&&(u=r+1)),a!=="xy"&&a!=="x"||(A={min:r,max:u}),a!=="xy"&&a!=="y"||x.forEach(function(D,T){x[T].min=w[T],x[T].max=v[T]}),l){var b=l.getBeforeZoomRange(A,x);b&&(A=b.xaxis?b.xaxis:A,x=b.yaxis?b.yaxis:x)}var y={xaxis:A};o.config.chart.group||(y.yaxis=x),h.ctx.updateHelpers._updateOptions(y,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof o.config.chart.events.zoomed=="function"&&l.zoomCallback(A,x)}else if(o.globals.selectionEnabled){var k,C=null;k={min:r,max:u},a!=="xy"&&a!=="y"||(C=pe.clone(o.config.yaxis)).forEach(function(D,T){C[T].min=w[T],C[T].max=v[T]}),o.globals.selection=h.selection,typeof o.config.chart.events.selection=="function"&&o.config.chart.events.selection(h.ctx,{xaxis:k,yaxis:C})}}}},{key:"panDragging",value:function(t){var r=t.context,u=this.w,n=r;if(u.globals.lastClientPosition.x!==void 0){var a=u.globals.lastClientPosition.x-n.clientX,o=u.globals.lastClientPosition.y-n.clientY;Math.abs(a)>Math.abs(o)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(o)&&a<0?this.moveDirection="right":Math.abs(o)>Math.abs(a)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(a)&&o<0&&(this.moveDirection="down")}u.globals.lastClientPosition={x:n.clientX,y:n.clientY};var h=u.globals.isRangeBar?u.globals.minY:u.globals.minX,g=u.globals.isRangeBar?u.globals.maxY:u.globals.maxX;u.config.xaxis.convertedCatToNumeric||n.panScrolled(h,g)}},{key:"delayedPanScrolled",value:function(){var t=this.w,r=t.globals.minX,u=t.globals.maxX,n=(t.globals.maxX-t.globals.minX)/2;this.moveDirection==="left"?(r=t.globals.minX+n,u=t.globals.maxX+n):this.moveDirection==="right"&&(r=t.globals.minX-n,u=t.globals.maxX-n),r=Math.floor(r),u=Math.floor(u),this.updateScrolledChart({xaxis:{min:r,max:u}},r,u)}},{key:"panScrolled",value:function(t,r){var u=this.w,n=this.xyRatios,a=pe.clone(u.globals.initialConfig.yaxis),o=n.xRatio,h=u.globals.minX,g=u.globals.maxX;u.globals.isRangeBar&&(o=n.invertedYRatio,h=u.globals.minY,g=u.globals.maxY),this.moveDirection==="left"?(t=h+u.globals.gridWidth/15*o,r=g+u.globals.gridWidth/15*o):this.moveDirection==="right"&&(t=h-u.globals.gridWidth/15*o,r=g-u.globals.gridWidth/15*o),u.globals.isRangeBar||(t<u.globals.initialMinX||r>u.globals.initialMaxX)&&(t=h,r=g);var l={xaxis:{min:t,max:r}};u.config.chart.group||(l.yaxis=a),this.updateScrolledChart(l,t,r)}},{key:"updateScrolledChart",value:function(t,r,u){var n=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),typeof n.config.chart.events.scrolled=="function"&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:r,max:u}})}}]),i}(),Bv=function(){function s(e){Oe(this,s),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return Ne(s,[{key:"getNearestValues",value:function(e){var i=e.hoverArea,t=e.elGrid,r=e.clientX,u=e.clientY,n=this.w,a=t.getBoundingClientRect(),o=a.width,h=a.height,g=o/(n.globals.dataPoints-1),l=h/n.globals.dataPoints,c=this.hasBars();!n.globals.comboCharts&&!c||n.config.xaxis.convertedCatToNumeric||(g=o/n.globals.dataPoints);var d=r-a.left-n.globals.barPadForNumericAxis,F=u-a.top;d<0||F<0||d>o||F>h?(i.classList.remove("hovering-zoom"),i.classList.remove("hovering-pan")):n.globals.zoomEnabled?(i.classList.remove("hovering-pan"),i.classList.add("hovering-zoom")):n.globals.panEnabled&&(i.classList.remove("hovering-zoom"),i.classList.add("hovering-pan"));var p=Math.round(d/g),f=Math.floor(F/l);c&&!n.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(d/g),p-=1);var m=null,v=null,w=n.globals.seriesXvalues.map(function(k){return k.filter(function(C){return pe.isNumber(C)})}),x=n.globals.seriesYvalues.map(function(k){return k.filter(function(C){return pe.isNumber(C)})});if(n.globals.isXNumeric){var A=this.ttCtx.getElGrid().getBoundingClientRect(),b=d*(A.width/o),y=F*(A.height/h);m=(v=this.closestInMultiArray(b,y,w,x)).index,p=v.j,m!==null&&n.globals.hasNullValues&&(w=n.globals.seriesXvalues[m],p=(v=this.closestInArray(b,w)).j)}return n.globals.capturedSeriesIndex=m===null?-1:m,(!p||p<1)&&(p=0),n.globals.isBarHorizontal?n.globals.capturedDataPointIndex=f:n.globals.capturedDataPointIndex=p,{capturedSeries:m,j:n.globals.isBarHorizontal?f:p,hoverX:d,hoverY:F}}},{key:"getFirstActiveXArray",value:function(e){for(var i=this.w,t=0,r=e.map(function(n,a){return n.length>0?a:-1}),u=0;u<r.length;u++)if(r[u]!==-1&&i.globals.collapsedSeriesIndices.indexOf(u)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(u)===-1){t=r[u];break}return t}},{key:"closestInMultiArray",value:function(e,i,t,r){for(var u,n=this.w,a=1/0,o=null,h=null,g=0;g<t.length;g++)if(u=g,n.globals.collapsedSeriesIndices.indexOf(u)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(u)===-1)for(var l=t[g],c=r[g],d=Math.min(l.length,c.length),F=0;F<d;F++){var p=e-l[F],f=Math.sqrt(p*p);if(!n.globals.allSeriesHasEqualX){var m=i-c[F];f=Math.sqrt(p*p+m*m)}f<a&&(a=f,o=g,h=F)}return{index:o,j:h}}},{key:"closestInArray",value:function(e,i){for(var t=i[0],r=null,u=Math.abs(e-t),n=0;n<i.length;n++){var a=Math.abs(e-i[n]);a<u&&(u=a,r=n)}return{j:r}}},{key:"isXoverlap",value:function(e){var i=[],t=this.w.globals.seriesX.filter(function(u){return u[0]!==void 0});if(t.length>0)for(var r=0;r<t.length-1;r++)t[r][e]!==void 0&&t[r+1][e]!==void 0&&t[r][e]!==t[r+1][e]&&i.push("unEqual");return i.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,i=this.w.globals.initialSeries,t=0;t<i.length-1;t++)if(i[t].data.length!==i[t+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return nr(e).reduce(function(i,t){return i+t.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");t=nr(t),i&&(t=t.filter(function(u){var n=Number(u.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(n)===-1})),t.sort(function(u,n){var a=Number(u.getAttribute("data:realIndex")),o=Number(n.getAttribute("data:realIndex"));return o<a?1:o>a?-1:0});var r=[];return t.forEach(function(u){r.push(u.querySelector(".apexcharts-marker"))}),r}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,i){var t=Number(e.getAttribute("cx")),r=Number(e.getAttribute("cy")),u=e.getAttribute("shape");return new De(this.ctx).getMarkerPath(t,r,u,i)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var i=this.w,t=i.config.markers.hover.size;return t===void 0&&(t=i.globals.markers.size[e]+i.config.markers.hover.sizeOffset),t}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var i=this.w,t=this.ttCtx;t.allTooltipSeriesGroups.length===0&&(t.allTooltipSeriesGroups=i.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var r=t.allTooltipSeriesGroups,u=0;u<r.length;u++)e==="enable"?(r[u].classList.add("apexcharts-active"),r[u].style.display=i.config.tooltip.items.display):(r[u].classList.remove("apexcharts-active"),r[u].style.display="none")}}]),s}(),Gj=function(){function s(e){Oe(this,s),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new Bv(e)}return Ne(s,[{key:"drawSeriesTexts",value:function(e){var i=e.shared,t=i===void 0||i,r=e.ttItems,u=e.i,n=u===void 0?0:u,a=e.j,o=a===void 0?null:a,h=e.y1,g=e.y2,l=e.e,c=this.w;c.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:n,j:o,y1:h,y2:g,w:c}):this.toggleActiveInactiveSeries(t,n);var d=this.getValuesToPrint({i:n,j:o});this.printLabels({i:n,j:o,values:d,ttItems:r,shared:t,e:l});var F=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=F.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=F.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var i,t=this,r=e.i,u=e.j,n=e.values,a=e.ttItems,o=e.shared,h=e.e,g=this.w,l=[],c=function(A){return g.globals.seriesGoals[A]&&g.globals.seriesGoals[A][u]&&Array.isArray(g.globals.seriesGoals[A][u])},d=n.xVal,F=n.zVal,p=n.xAxisTTVal,f="",m=g.globals.colors[r];u!==null&&g.config.plotOptions.bar.distributed&&(m=g.globals.colors[u]);for(var v=function(A,b){var y=t.getFormatters(r);f=t.getSeriesName({fn:y.yLbTitleFormatter,index:r,seriesIndex:r,j:u}),g.config.chart.type==="treemap"&&(f=y.yLbTitleFormatter(String(g.config.series[r].data[u].x),{series:g.globals.series,seriesIndex:r,dataPointIndex:u,w:g}));var k=g.config.tooltip.inverseOrder?b:A;if(g.globals.axisCharts){var C=function(S){var M,R,O,H;return g.globals.isRangeData?y.yLbFormatter((M=g.globals.seriesRangeStart)===null||M===void 0||(R=M[S])===null||R===void 0?void 0:R[u],{series:g.globals.seriesRangeStart,seriesIndex:S,dataPointIndex:u,w:g})+" - "+y.yLbFormatter((O=g.globals.seriesRangeEnd)===null||O===void 0||(H=O[S])===null||H===void 0?void 0:H[u],{series:g.globals.seriesRangeEnd,seriesIndex:S,dataPointIndex:u,w:g}):y.yLbFormatter(g.globals.series[S][u],{series:g.globals.series,seriesIndex:S,dataPointIndex:u,w:g})};if(o)y=t.getFormatters(k),f=t.getSeriesName({fn:y.yLbTitleFormatter,index:k,seriesIndex:r,j:u}),m=g.globals.colors[k],i=C(k),c(k)&&(l=g.globals.seriesGoals[k][u].map(function(S){return{attrs:S,val:y.yLbFormatter(S.value,{seriesIndex:k,dataPointIndex:u,w:g})}}));else{var D,T=h==null||(D=h.target)===null||D===void 0?void 0:D.getAttribute("fill");T&&(T.indexOf("url")!==-1?T.indexOf("Pattern")!==-1&&(m=g.globals.dom.baseEl.querySelector(T.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):m=T),i=C(r),c(r)&&Array.isArray(g.globals.seriesGoals[r][u])&&(l=g.globals.seriesGoals[r][u].map(function(S){return{attrs:S,val:y.yLbFormatter(S.value,{seriesIndex:r,dataPointIndex:u,w:g})}}))}}u===null&&(i=y.yLbFormatter(g.globals.series[r],Pe(Pe({},g),{},{seriesIndex:r,dataPointIndex:r}))),t.DOMHandling({i:r,t:k,j:u,ttItems:a,values:{val:i,goalVals:l,xVal:d,xAxisTTVal:p,zVal:F},seriesName:f,shared:o,pColor:m})},w=0,x=g.globals.series.length-1;w<g.globals.series.length;w++,x--)v(w,x)}},{key:"getFormatters",value:function(e){var i,t=this.w,r=t.globals.yLabelFormatters[e];return t.globals.ttVal!==void 0?Array.isArray(t.globals.ttVal)?(r=t.globals.ttVal[e]&&t.globals.ttVal[e].formatter,i=t.globals.ttVal[e]&&t.globals.ttVal[e].title&&t.globals.ttVal[e].title.formatter):(r=t.globals.ttVal.formatter,typeof t.globals.ttVal.title.formatter=="function"&&(i=t.globals.ttVal.title.formatter)):i=t.config.tooltip.y.title.formatter,typeof r!="function"&&(r=t.globals.yLabelFormatters[0]?t.globals.yLabelFormatters[0]:function(u){return u}),typeof i!="function"&&(i=function(u){return u?u+": ":""}),{yLbFormatter:r,yLbTitleFormatter:i}}},{key:"getSeriesName",value:function(e){var i=e.fn,t=e.index,r=e.seriesIndex,u=e.j,n=this.w;return i(String(n.globals.seriesNames[t]),{series:n.globals.series,seriesIndex:r,dataPointIndex:u,w:n})}},{key:"DOMHandling",value:function(e){e.i;var i=e.t,t=e.j,r=e.ttItems,u=e.values,n=e.seriesName,a=e.shared,o=e.pColor,h=this.w,g=this.ttCtx,l=u.val,c=u.goalVals,d=u.xVal,F=u.xAxisTTVal,p=u.zVal,f=null;f=r[i].children,h.config.tooltip.fillSeriesColor&&(r[i].style.backgroundColor=o,f[0].style.display="none"),g.showTooltipTitle&&(g.tooltipTitle===null&&(g.tooltipTitle=h.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),g.tooltipTitle.innerHTML=d),g.isXAxisTooltipEnabled&&(g.xaxisTooltipText.innerHTML=F!==""?F:d);var m=r[i].querySelector(".apexcharts-tooltip-text-y-label");m&&(m.innerHTML=n||"");var v=r[i].querySelector(".apexcharts-tooltip-text-y-value");v&&(v.innerHTML=l!==void 0?l:""),f[0]&&f[0].classList.contains("apexcharts-tooltip-marker")&&(h.config.tooltip.marker.fillColors&&Array.isArray(h.config.tooltip.marker.fillColors)&&(o=h.config.tooltip.marker.fillColors[i]),h.config.tooltip.fillSeriesColor?f[0].style.backgroundColor=o:f[0].style.color=o),h.config.tooltip.marker.show||(f[0].style.display="none");var w=r[i].querySelector(".apexcharts-tooltip-text-goals-label"),x=r[i].querySelector(".apexcharts-tooltip-text-goals-value");if(c.length&&h.globals.seriesGoals[i]){var A=function(){var k="<div>",C="<div>";c.forEach(function(D,T){k+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(D.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(D.attrs.name,"</div>"),C+="<div>".concat(D.val,"</div>")}),w.innerHTML=k+"</div>",x.innerHTML=C+"</div>"};a?h.globals.seriesGoals[i][t]&&Array.isArray(h.globals.seriesGoals[i][t])?A():(w.innerHTML="",x.innerHTML=""):A()}else w.innerHTML="",x.innerHTML="";if(p!==null&&(r[i].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,r[i].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=p!==void 0?p:""),a&&f[0]){if(h.config.tooltip.hideEmptySeries){var b=r[i].querySelector(".apexcharts-tooltip-marker"),y=r[i].querySelector(".apexcharts-tooltip-text");parseFloat(l)==0?(b.style.display="none",y.style.display="none"):(b.style.display="block",y.style.display="block")}l==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(i)>-1||h.globals.collapsedSeriesIndices.indexOf(i)>-1||Array.isArray(g.tConfig.enabledOnSeries)&&g.tConfig.enabledOnSeries.indexOf(i)===-1?f[0].parentNode.style.display="none":f[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(g.tConfig.enabledOnSeries)&&g.tConfig.enabledOnSeries.indexOf(i)===-1&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,i){var t=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var r=t.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(i));r&&(r.classList.add("apexcharts-active"),r.style.display=t.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var i=e.i,t=e.j,r=this.w,u=this.ctx.series.filteredSeriesX(),n="",a="",o=null,h=null,g={series:r.globals.series,seriesIndex:i,dataPointIndex:t,w:r},l=r.globals.ttZFormatter;t===null?h=r.globals.series[i]:r.globals.isXNumeric&&r.config.chart.type!=="treemap"?(n=u[i][t],u[i].length===0&&(n=u[this.tooltipUtil.getFirstActiveXArray(u)][t])):n=new Uh(this.ctx).isFormatXY()?r.config.series[i].data[t]!==void 0?r.config.series[i].data[t].x:"":r.globals.labels[t]!==void 0?r.globals.labels[t]:"";var c=n;return r.globals.isXNumeric&&r.config.xaxis.type==="datetime"?n=new Yn(this.ctx).xLabelFormat(r.globals.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new gr(this.ctx).formatDate,w:this.w}):n=r.globals.isBarHorizontal?r.globals.yLabelFormatters[0](c,g):r.globals.xLabelFormatter(c,g),r.config.tooltip.x.formatter!==void 0&&(n=r.globals.ttKeyFormatter(c,g)),r.globals.seriesZ.length>0&&r.globals.seriesZ[i].length>0&&(o=l(r.globals.seriesZ[i][t],r)),a=typeof r.config.xaxis.tooltip.formatter=="function"?r.globals.xaxisTooltipFormatter(c,g):n,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(n)?n.join(" "):n,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var i=e.i,t=e.j,r=e.y1,u=e.y2,n=e.w,a=this.ttCtx.getElTooltip(),o=n.config.tooltip.custom;Array.isArray(o)&&o[i]&&(o=o[i]);var h=o({ctx:this.ctx,series:n.globals.series,seriesIndex:i,dataPointIndex:t,y1:r,y2:u,w:n});typeof h=="string"?a.innerHTML=h:(h instanceof Element||typeof h.nodeName=="string")&&(a.innerHTML="",a.appendChild(h.cloneNode(!0)))}}]),s}(),Ov=function(){function s(e){Oe(this,s),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return Ne(s,[{key:"moveXCrosshairs",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,t=this.ttCtx,r=this.w,u=t.getElXCrosshairs(),n=e-t.xcrosshairsWidth/2,a=r.globals.labels.slice().length;if(i!==null&&(n=r.globals.gridWidth/a*i),u===null||r.globals.isBarHorizontal||(u.setAttribute("x",n),u.setAttribute("x1",n),u.setAttribute("x2",n),u.setAttribute("y2",r.globals.gridHeight),u.classList.add("apexcharts-active")),n<0&&(n=0),n>r.globals.gridWidth&&(n=r.globals.gridWidth),t.isXAxisTooltipEnabled){var o=n;r.config.xaxis.crosshairs.width!=="tickWidth"&&r.config.xaxis.crosshairs.width!=="barWidth"||(o=n+t.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var i=this.ttCtx;i.ycrosshairs!==null&&De.setAttrs(i.ycrosshairs,{y1:e,y2:e}),i.ycrosshairsHidden!==null&&De.setAttrs(i.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var i=this.w,t=this.ttCtx;if(t.xaxisTooltip!==null&&t.xcrosshairsWidth!==0){t.xaxisTooltip.classList.add("apexcharts-active");var r=t.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.globals.translateY+1+i.config.xaxis.offsetY;if(e-=t.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=i.globals.translateX;var u;u=new De(this.ctx).getTextRects(t.xaxisTooltipText.innerHTML),t.xaxisTooltipText.style.minWidth=u.width+"px",t.xaxisTooltip.style.left=e+"px",t.xaxisTooltip.style.top=r+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var i=this.w,t=this.ttCtx;t.yaxisTTEls===null&&(t.yaxisTTEls=i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var r=parseInt(t.ycrosshairsHidden.getAttribute("y1"),10),u=i.globals.translateY+r,n=t.yaxisTTEls[e].getBoundingClientRect().height,a=i.globals.translateYAxisX[e]-2;i.config.yaxis[e].opposite&&(a-=26),u-=n/2,i.globals.ignoreYAxisIndexes.indexOf(e)===-1?(t.yaxisTTEls[e].classList.add("apexcharts-active"),t.yaxisTTEls[e].style.top=u+"px",t.yaxisTTEls[e].style.left=a+i.config.yaxis[e].tooltip.offsetX+"px"):t.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=this.w,u=this.ttCtx,n=u.getElTooltip(),a=u.tooltipRect,o=t!==null?parseFloat(t):1,h=parseFloat(e)+o+5,g=parseFloat(i)+o/2;if(h>r.globals.gridWidth/2&&(h=h-a.ttWidth-o-10),h>r.globals.gridWidth-a.ttWidth-10&&(h=r.globals.gridWidth-a.ttWidth),h<-20&&(h=-20),r.config.tooltip.followCursor){var l=u.getElGrid().getBoundingClientRect();(h=u.e.clientX-l.left)>r.globals.gridWidth/2&&(h-=u.tooltipRect.ttWidth),(g=u.e.clientY+r.globals.translateY-l.top)>r.globals.gridHeight/2&&(g-=u.tooltipRect.ttHeight)}else r.globals.isBarHorizontal||a.ttHeight/2+g>r.globals.gridHeight&&(g=r.globals.gridHeight-a.ttHeight+r.globals.translateY);isNaN(h)||(h+=r.globals.translateX,n.style.left=h+"px",n.style.top=g+"px")}},{key:"moveMarkers",value:function(e,i){var t=this.w,r=this.ttCtx;if(t.globals.markers.size[e]>0)for(var u=t.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),n=0;n<u.length;n++)parseInt(u[n].getAttribute("rel"),10)===i&&(r.marker.resetPointsSize(),r.marker.enlargeCurrentPoint(i,u[n]));else r.marker.resetPointsSize(),this.moveDynamicPointOnHover(i,e)}},{key:"moveDynamicPointOnHover",value:function(e,i){var t,r,u,n,a=this.w,o=this.ttCtx,h=new De(this.ctx),g=a.globals.pointsArray,l=o.tooltipUtil.getHoverMarkerSize(i),c=a.config.series[i].type;if(!c||c!=="column"&&c!=="candlestick"&&c!=="boxPlot"){u=(t=g[i][e])===null||t===void 0?void 0:t[0],n=((r=g[i][e])===null||r===void 0?void 0:r[1])||0;var d=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"'] .apexcharts-series-markers path"));if(d&&n<a.globals.gridHeight&&n>0){var F=d.getAttribute("shape"),p=h.getMarkerPath(u,n,F,1.5*l);d.setAttribute("d",p)}this.moveXCrosshairs(u),o.fixedTooltip||this.moveTooltip(u,n,l)}}},{key:"moveDynamicPointsOnHover",value:function(e){var i,t=this.ttCtx,r=t.w,u=0,n=0,a=r.globals.pointsArray,o=new ni(this.ctx),h=new De(this.ctx);i=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var g=t.tooltipUtil.getHoverMarkerSize(i);if(a[i]&&(u=a[i][e][0],n=a[i][e][1]),!isNaN(u)){var l=t.tooltipUtil.getAllMarkers();if(l.length)for(var c=0;c<r.globals.series.length;c++){var d=a[c];if(r.globals.comboCharts&&d===void 0&&l.splice(c,0,null),d&&d.length){var F=a[c][e][1],p=void 0;l[c].setAttribute("cx",u);var f=l[c].getAttribute("shape");if(r.config.chart.type==="rangeArea"&&!r.globals.comboCharts){var m=e+r.globals.series[c].length;p=a[c][m][1],F-=Math.abs(F-p)/2}if(F!==null&&!isNaN(F)&&F<r.globals.gridHeight+g&&F+g>0){var v=h.getMarkerPath(u,F,f,g);l[c].setAttribute("d",v)}else l[c].setAttribute("d","")}}this.moveXCrosshairs(u),t.fixedTooltip||this.moveTooltip(u,n||r.globals.gridHeight,g)}}},{key:"moveStickyTooltipOverBars",value:function(e,i){var t=this.w,r=this.ttCtx,u=t.globals.columnSeries?t.globals.columnSeries.length:t.globals.series.length;t.config.chart.stacked&&(u=t.globals.barGroups.length);var n=u>=2&&u%2==0?Math.floor(u/2):Math.floor(u/2)+1;t.globals.isBarHorizontal&&(n=new ni(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(n,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(n,"'] path[j='").concat(e,"']"));a||typeof i!="number"||(a=t.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(i,"'] path[j='").concat(e,`'],
        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(i,"'] path[j='").concat(e,`'],
        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(i,"'] path[j='").concat(e,`'],
        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(i,"'] path[j='").concat(e,"']")));var o=a?parseFloat(a.getAttribute("cx")):0,h=a?parseFloat(a.getAttribute("cy")):0,g=a?parseFloat(a.getAttribute("barWidth")):0,l=r.getElGrid().getBoundingClientRect(),c=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));t.globals.isXNumeric?(a&&!c&&(o-=u%2!=0?g/2:0),a&&c&&(o-=g/2)):t.globals.isBarHorizontal||(o=r.xAxisTicksPositions[e-1]+r.dataPointsDividedWidth/2,isNaN(o)&&(o=r.xAxisTicksPositions[e]-r.dataPointsDividedWidth/2)),t.globals.isBarHorizontal?h-=r.tooltipRect.ttHeight:t.config.tooltip.followCursor?h=r.e.clientY-l.top-r.tooltipRect.ttHeight/2:h+r.tooltipRect.ttHeight+15>t.globals.gridHeight&&(h=t.globals.gridHeight),t.globals.isBarHorizontal||this.moveXCrosshairs(o),r.fixedTooltip||this.moveTooltip(o,h||t.globals.gridHeight)}}]),s}(),qj=function(){function s(e){Oe(this,s),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Ov(e)}return Ne(s,[{key:"drawDynamicPoints",value:function(){var e=this.w,i=new De(this.ctx),t=new ju(this.ctx),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");r=nr(r),e.config.chart.stacked&&r.sort(function(l,c){return parseFloat(l.getAttribute("data:realIndex"))-parseFloat(c.getAttribute("data:realIndex"))});for(var u=0;u<r.length;u++){var n=r[u].querySelector(".apexcharts-series-markers-wrap");if(n!==null){var a=void 0,o="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(o+=" no-pointer-events");var h=t.getMarkerConfig({cssClass:o,seriesIndex:Number(n.getAttribute("data:realIndex"))});(a=i.drawMarker(0,0,h)).node.setAttribute("default-marker-size",0);var g=document.createElementNS(e.globals.SVGNS,"g");g.classList.add("apexcharts-series-markers"),g.appendChild(a.node),n.appendChild(g)}}}},{key:"enlargeCurrentPoint",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,u=this.w;u.config.chart.type!=="bubble"&&this.newPointSize(e,i);var n=i.getAttribute("cx"),a=i.getAttribute("cy");if(t!==null&&r!==null&&(n=t,a=r),this.tooltipPosition.moveXCrosshairs(n),!this.fixedTooltip){if(u.config.chart.type==="radar"){var o=this.ttCtx.getElGrid().getBoundingClientRect();n=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(n,a,u.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var i=this.w,t=this,r=this.ttCtx,u=e,n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=i.config.markers.hover.size,o=0;o<n.length;o++){var h=n[o].getAttribute("rel"),g=n[o].getAttribute("index");if(a===void 0&&(a=i.globals.markers.size[g]+i.config.markers.hover.sizeOffset),u===parseInt(h,10)){t.newPointSize(u,n[o]);var l=n[o].getAttribute("cx"),c=n[o].getAttribute("cy");t.tooltipPosition.moveXCrosshairs(l),r.fixedTooltip||t.tooltipPosition.moveTooltip(l,c,a)}else t.oldPointSize(n[o])}}},{key:"newPointSize",value:function(e,i){var t=this.w,r=t.config.markers.hover.size,u=e===0?i.parentNode.firstChild:i.parentNode.lastChild;if(u.getAttribute("default-marker-size")!=="0"){var n=parseInt(u.getAttribute("index"),10);r===void 0&&(r=t.globals.markers.size[n]+t.config.markers.hover.sizeOffset),r<0&&(r=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(i,r);i.setAttribute("d",a)}}},{key:"oldPointSize",value:function(e){var i=parseFloat(e.getAttribute("default-marker-size")),t=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",t)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),i=0;i<e.length;i++){var t=parseFloat(e[i].getAttribute("default-marker-size"));if(pe.isNumber(t)&&t>0){var r=this.ttCtx.tooltipUtil.getPathFromPoint(e[i],t);e[i].setAttribute("d",r)}else e[i].setAttribute("d","M0,0")}}}]),s}(),Kj=function(){function s(e){Oe(this,s),this.w=e.w;var i=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.config.chart.type==="rangeBar"&&i.config.plotOptions.bar.rangeBarGroupRows}return Ne(s,[{key:"getAttr",value:function(e,i){return parseFloat(e.target.getAttribute(i))}},{key:"handleHeatTreeTooltip",value:function(e){var i=e.e,t=e.opt,r=e.x,u=e.y,n=e.type,a=this.ttCtx,o=this.w;if(i.target.classList.contains("apexcharts-".concat(n,"-rect"))){var h=this.getAttr(i,"i"),g=this.getAttr(i,"j"),l=this.getAttr(i,"cx"),c=this.getAttr(i,"cy"),d=this.getAttr(i,"width"),F=this.getAttr(i,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:h,j:g,shared:!1,e:i}),o.globals.capturedSeriesIndex=h,o.globals.capturedDataPointIndex=g,r=l+a.tooltipRect.ttWidth/2+d,u=c+a.tooltipRect.ttHeight/2-F/2,a.tooltipPosition.moveXCrosshairs(l+d/2),r>o.globals.gridWidth/2&&(r=l-a.tooltipRect.ttWidth/2+d),a.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();r=o.globals.clientX-p.left-(r>o.globals.gridWidth/2?a.tooltipRect.ttWidth:0),u=o.globals.clientY-p.top-(u>o.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:r,y:u}}},{key:"handleMarkerTooltip",value:function(e){var i,t,r=e.e,u=e.opt,n=e.x,a=e.y,o=this.w,h=this.ttCtx;if(r.target.classList.contains("apexcharts-marker")){var g=parseInt(u.paths.getAttribute("cx"),10),l=parseInt(u.paths.getAttribute("cy"),10),c=parseFloat(u.paths.getAttribute("val"));if(t=parseInt(u.paths.getAttribute("rel"),10),i=parseInt(u.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var d=pe.findAncestor(u.paths,"apexcharts-series");d&&(i=parseInt(d.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:u.ttItems,i,j:t,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:r}),r.type==="mouseup"&&h.markerClick(r,i,t),o.globals.capturedSeriesIndex=i,o.globals.capturedDataPointIndex=t,n=g,a=l+o.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var F=h.getElGrid().getBoundingClientRect();a=h.e.clientY+o.globals.translateY-F.top}c<0&&(a=l),h.marker.enlargeCurrentPoint(t,u.paths,n,a)}return{x:n,y:a}}},{key:"handleBarTooltip",value:function(e){var i,t,r=e.e,u=e.opt,n=this.w,a=this.ttCtx,o=a.getElTooltip(),h=0,g=0,l=0,c=this.getBarTooltipXY({e:r,opt:u});if(c.j!==null||c.barHeight!==0||c.barWidth!==0){i=c.i;var d=c.j;if(n.globals.capturedSeriesIndex=i,n.globals.capturedDataPointIndex=d,n.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!n.config.tooltip.shared?(g=c.x,l=c.y,t=Array.isArray(n.config.stroke.width)?n.config.stroke.width[i]:n.config.stroke.width,h=g):n.globals.comboCharts||n.config.tooltip.shared||(h/=2),isNaN(l)&&(l=n.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(u.paths.parentNode.getAttribute("data:realIndex"),10),g+a.tooltipRect.ttWidth>n.globals.gridWidth?g-=a.tooltipRect.ttWidth:g<0&&(g=0),a.w.config.tooltip.followCursor){var F=a.getElGrid().getBoundingClientRect();l=a.e.clientY-F.top}a.tooltip===null&&(a.tooltip=n.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),n.config.tooltip.shared||(n.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(h+t/2):a.tooltipPosition.moveXCrosshairs(h)),!a.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(l=l+n.globals.translateY-a.tooltipRect.ttHeight/2,o.style.left=g+n.globals.translateX+"px",o.style.top=l+"px")}}},{key:"getBarTooltipXY",value:function(e){var i=this,t=e.e,r=e.opt,u=this.w,n=null,a=this.ttCtx,o=0,h=0,g=0,l=0,c=0,d=t.target.classList;if(d.contains("apexcharts-bar-area")||d.contains("apexcharts-candlestick-area")||d.contains("apexcharts-boxPlot-area")||d.contains("apexcharts-rangebar-area")){var F=t.target,p=F.getBoundingClientRect(),f=r.elGrid.getBoundingClientRect(),m=p.height;c=p.height;var v=p.width,w=parseInt(F.getAttribute("cx"),10),x=parseInt(F.getAttribute("cy"),10);l=parseFloat(F.getAttribute("barWidth"));var A=t.type==="touchmove"?t.touches[0].clientX:t.clientX;n=parseInt(F.getAttribute("j"),10),o=parseInt(F.parentNode.getAttribute("rel"),10)-1;var b=F.getAttribute("data-range-y1"),y=F.getAttribute("data-range-y2");u.globals.comboCharts&&(o=parseInt(F.parentNode.getAttribute("data:realIndex"),10));var k=function(D){return u.globals.isXNumeric?w-v/2:i.isVerticalGroupedRangeBar?w+v/2:w-a.dataPointsDividedWidth+v/2},C=function(){return x-a.dataPointsDividedHeight+m/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:o,j:n,y1:b?parseInt(b,10):null,y2:y?parseInt(y,10):null,shared:!a.showOnIntersect&&u.config.tooltip.shared,e:t}),u.config.tooltip.followCursor?u.globals.isBarHorizontal?(h=A-f.left+15,g=C()):(h=k(),g=t.clientY-f.top-a.tooltipRect.ttHeight/2-15):u.globals.isBarHorizontal?((h=w)<a.xyRatios.baseLineInvertedY&&(h=w-a.tooltipRect.ttWidth),g=C()):(h=k(),g=x)}return{x:h,y:g,barHeight:c,barWidth:l,i:o,j:n}}}]),s}(),Jj=function(){function s(e){Oe(this,s),this.w=e.w,this.ttCtx=e}return Ne(s,[{key:"drawXaxisTooltip",value:function(){var e=this.w,i=this.ttCtx,t=e.config.xaxis.position==="bottom";i.xaxisOffY=t?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var r=t?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",u=e.globals.dom.elWrap;i.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(i.xaxisTooltip=document.createElement("div"),i.xaxisTooltip.setAttribute("class",r+" apexcharts-theme-"+e.config.tooltip.theme),u.appendChild(i.xaxisTooltip),i.xaxisTooltipText=document.createElement("div"),i.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),i.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,i.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,i.xaxisTooltip.appendChild(i.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,i=this.ttCtx,t=0;t<e.config.yaxis.length;t++){var r=e.config.yaxis[t].opposite||e.config.yaxis[t].crosshairs.opposite;i.yaxisOffX=r?e.globals.gridWidth+1:1;var u="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(t,r?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),n=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(t))===null&&(i.yaxisTooltip=document.createElement("div"),i.yaxisTooltip.setAttribute("class",u+" apexcharts-theme-"+e.config.tooltip.theme),n.appendChild(i.yaxisTooltip),t===0&&(i.yaxisTooltipText=[]),i.yaxisTooltipText[t]=document.createElement("div"),i.yaxisTooltipText[t].classList.add("apexcharts-yaxistooltip-text"),i.yaxisTooltip.appendChild(i.yaxisTooltipText[t]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,i=this.ttCtx,t=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var r=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(r!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var u=parseFloat(r.getAttribute("barWidth"));i.xcrosshairsWidth=u}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var n=e.globals.labels.length;i.xcrosshairsWidth=e.globals.gridWidth/n}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var a=e.globals.labels.length;i.xcrosshairsWidth=e.globals.gridWidth/a}else if(e.config.xaxis.crosshairs.width==="barWidth"){var o=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(o!==null){var h=parseFloat(o.getAttribute("barWidth"));i.xcrosshairsWidth=h}else i.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),t!==null&&i.xcrosshairsWidth>0&&t.setAttribute("width",i.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,i=this.ttCtx;i.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),i.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,i,t){var r=this.ttCtx,u=this.w,n=u.globals,a=n.seriesYAxisMap[e];if(r.yaxisTooltips[e]&&a.length>0){var o=n.yLabelFormatters[e],h=r.getElGrid().getBoundingClientRect(),g=a[0],l=0;t.yRatio.length>1&&(l=g);var c=(i-h.top)*t.yRatio[l],d=n.maxYArr[g]-n.minYArr[g],F=n.minYArr[g]+(d-c);u.config.yaxis[e].reversed&&(F=n.maxYArr[g]-(d-c)),r.tooltipPosition.moveYCrosshairs(i-h.top),r.yaxisTooltipText[e].innerHTML=o(F),r.tooltipPosition.moveYAxisTooltip(e)}}}]),s}(),Tg=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new Bv(this),this.tooltipLabels=new Gj(this),this.tooltipPosition=new Ov(this),this.marker=new qj(this),this.intersect=new Kj(this),this.axesTooltip=new Jj(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return Ne(s,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var i=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=i.config.xaxis.tooltip.enabled&&i.globals.axisCharts,this.yaxisTooltips=i.config.yaxis.map(function(n,a){return!!(n.show&&n.tooltip.enabled&&i.globals.axisCharts)}),this.allTooltipSeriesGroups=[],i.globals.axisCharts||(this.showTooltipTitle=!1);var t=document.createElement("div");if(t.classList.add("apexcharts-tooltip"),i.config.tooltip.cssClass&&t.classList.add(i.config.tooltip.cssClass),t.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),i.globals.dom.elWrap.appendChild(t),i.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var r=new _n(this.ctx);this.xAxisTicksPositions=r.getXAxisTicksPositions()}if(!i.globals.comboCharts&&!this.tConfig.intersect&&i.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),i.config.markers.size!==0&&i.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),i.globals.collapsedSeries.length!==i.globals.series.length){this.dataPointsDividedHeight=i.globals.gridHeight/i.globals.dataPoints,this.dataPointsDividedWidth=i.globals.gridWidth/i.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||i.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,t.appendChild(this.tooltipTitle));var u=i.globals.series.length;(i.globals.xyCharts||i.globals.comboCharts)&&this.tConfig.shared&&(u=this.showOnIntersect?1:i.globals.series.length),this.legendLabels=i.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(u),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var i=this,t=this.w,r=[],u=this.getElTooltip(),n=function(o){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(o)),h.style.order=t.config.tooltip.inverseOrder?e-o:o+1;var g=document.createElement("span");g.classList.add("apexcharts-tooltip-marker"),t.config.tooltip.fillSeriesColor?g.style.backgroundColor=t.globals.colors[o]:g.style.color=t.globals.colors[o];var l=t.config.markers.shape,c=l;Array.isArray(l)&&(c=l[o]),g.setAttribute("shape",c),h.appendChild(g);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=i.tConfig.style.fontFamily||t.config.chart.fontFamily,d.style.fontSize=i.tConfig.style.fontSize,["y","goals","z"].forEach(function(F){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(F,"-group"));var f=document.createElement("span");f.classList.add("apexcharts-tooltip-text-".concat(F,"-label")),p.appendChild(f);var m=document.createElement("span");m.classList.add("apexcharts-tooltip-text-".concat(F,"-value")),p.appendChild(m),d.appendChild(p)}),h.appendChild(d),u.appendChild(h),r.push(h)},a=0;a<e;a++)n(a);return r}},{key:"addSVGEvents",value:function(){var e=this.w,i=e.config.chart.type,t=this.getElTooltip(),r=!(i!=="bar"&&i!=="candlestick"&&i!=="boxPlot"&&i!=="rangeBar"),u=i==="area"||i==="line"||i==="scatter"||i==="bubble"||i==="radar",n=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var o,h=[],g=[],l={hoverArea:n,elGrid:a,tooltipEl:t,tooltipY:h,tooltipX:g,ttItems:this.ttItems};if(e.globals.axisCharts&&(u?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):r?o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):i!=="heatmap"&&i!=="treemap"||(o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),o&&o.length))for(var c=0;c<o.length;c++)h.push(o[c].getAttribute("cy")),g.push(o[c].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||r&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([n],l);else if(r&&!e.globals.comboCharts||u&&this.showOnIntersect)this.addDatapointEventsListeners(l);else if(!e.globals.axisCharts||i==="heatmap"||i==="treemap"){var d=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(d,l)}if(this.showOnIntersect){var F=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");F.length>0&&this.addPathsEventListeners(F,l),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(l)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,i=this.getElTooltip(),t=i.getBoundingClientRect(),r=t.width+10,u=t.height+10,n=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+e.globals.svgWidth-r+10),o.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-u-10),i.style.left=n+"px",i.style.top=a+"px",{x:n,y:a,ttWidth:r,ttHeight:u}}},{key:"addDatapointEventsListeners",value:function(e){var i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(i,e)}},{key:"addPathsEventListeners",value:function(e,i){for(var t=this,r=function(n){var a={paths:e[n],tooltipEl:i.tooltipEl,tooltipY:i.tooltipY,tooltipX:i.tooltipX,elGrid:i.elGrid,hoverArea:i.hoverArea,ttItems:i.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(o){return e[n].addEventListener(o,t.onSeriesHover.bind(t,a),{capture:!1,passive:!0})})},u=0;u<e.length;u++)r(u)}},{key:"onSeriesHover",value:function(e,i){var t=this,r=Date.now()-this.lastHoverTime;r>=20?this.seriesHover(e,i):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){t.seriesHover(e,i)},20-r))}},{key:"seriesHover",value:function(e,i){var t=this;this.lastHoverTime=Date.now();var r=[],u=this.w;u.config.chart.group&&(r=this.ctx.getGroupedCharts()),u.globals.axisCharts&&(u.globals.minX===-1/0&&u.globals.maxX===1/0||u.globals.dataPoints===0)||(r.length?r.forEach(function(n){var a=t.getElTooltip(n),o={paths:e.paths,tooltipEl:a,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===t.w.globals.minX&&n.w.globals.maxX===t.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:o,e:i})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:i}))}},{key:"seriesHoverByContext",value:function(e){var i=e.chartCtx,t=e.ttCtx,r=e.opt,u=e.e,n=i.w,a=this.getElTooltip(i);a&&(t.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},t.e=u,t.tooltipUtil.hasBars()&&!n.globals.comboCharts&&!t.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new ni(i).toggleSeriesOnHover(u,u.target.parentNode),t.fixedTooltip&&t.drawFixedTooltipRect(),n.globals.axisCharts?t.axisChartsTooltips({e:u,opt:r,tooltipRect:t.tooltipRect}):t.nonAxisChartsTooltips({e:u,opt:r,tooltipRect:t.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var i,t,r=e.e,u=e.opt,n=this.w,a=u.elGrid.getBoundingClientRect(),o=r.type==="touchmove"?r.touches[0].clientX:r.clientX,h=r.type==="touchmove"?r.touches[0].clientY:r.clientY;if(this.clientY=h,this.clientX=o,n.globals.capturedSeriesIndex=-1,n.globals.capturedDataPointIndex=-1,h<a.top||h>a.top+a.height)this.handleMouseOut(u);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!n.config.tooltip.shared){var g=parseInt(u.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(g)<0)return void this.handleMouseOut(u)}var l=this.getElTooltip(),c=this.getElXCrosshairs(),d=[];n.config.chart.group&&(d=this.ctx.getSyncedCharts());var F=n.globals.xyCharts||n.config.chart.type==="bar"&&!n.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||n.globals.comboCharts&&this.tooltipUtil.hasBars();if(r.type==="mousemove"||r.type==="touchmove"||r.type==="mouseup"){if(n.globals.collapsedSeries.length+n.globals.ancillaryCollapsedSeries.length===n.globals.series.length)return;c!==null&&c.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter(function(v){return v===!0});if(this.ycrosshairs!==null&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),F&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(r,o,h,u);else if(n.config.chart.type==="heatmap"||n.config.chart.type==="treemap"){var f=this.intersect.handleHeatTreeTooltip({e:r,opt:u,x:i,y:t,type:n.config.chart.type});i=f.x,t=f.y,l.style.left=i+"px",l.style.top=t+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:r,opt:u}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:r,opt:u,x:i,y:t});if(this.yaxisTooltips.length)for(var m=0;m<n.config.yaxis.length;m++)this.axesTooltip.drawYaxisTooltipText(m,h,this.xyRatios);n.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),u.tooltipEl.classList.add("apexcharts-active")}else r.type!=="mouseout"&&r.type!=="touchend"||this.handleMouseOut(u)}}},{key:"nonAxisChartsTooltips",value:function(e){var i=e.e,t=e.opt,r=e.tooltipRect,u=this.w,n=t.paths.getAttribute("rel"),a=this.getElTooltip(),o=u.globals.dom.elWrap.getBoundingClientRect();if(i.type==="mousemove"||i.type==="touchmove"){u.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:t.ttItems,i:parseInt(n,10)-1,shared:!1});var h=u.globals.clientX-o.left-r.ttWidth/2,g=u.globals.clientY-o.top-r.ttHeight-10;if(a.style.left=h+"px",a.style.top=g+"px",u.config.legend.tooltipHoverFormatter){var l=n-1,c=(0,u.config.legend.tooltipHoverFormatter)(this.legendLabels[l].getAttribute("data:default-text"),{seriesIndex:l,dataPointIndex:l,w:u});this.legendLabels[l].innerHTML=c}}else i.type!=="mouseout"&&i.type!=="touchend"||(a.classList.remove("apexcharts-active"),u.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),u.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(d){var F=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(F)}))}},{key:"handleStickyTooltip",value:function(e,i,t,r){var u=this.w,n=this.tooltipUtil.getNearestValues({context:this,hoverArea:r.hoverArea,elGrid:r.elGrid,clientX:i,clientY:t}),a=n.j,o=n.capturedSeries;u.globals.collapsedSeriesIndices.includes(o)&&(o=null);var h=r.elGrid.getBoundingClientRect();if(n.hoverX<0||n.hoverX>h.width)this.handleMouseOut(r);else if(o!==null)this.handleStickyCapturedSeries(e,o,r,a);else if(this.tooltipUtil.isXoverlap(a)||u.globals.isBarHorizontal){var g=u.globals.series.findIndex(function(l,c){return!u.globals.collapsedSeriesIndices.includes(c)});this.create(e,this,g,a,r.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,i,t,r){var u=this.w;if(!this.tConfig.shared&&u.globals.series[i][r]===null)return void this.handleMouseOut(t);if(u.globals.series[i][r]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(r)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,i,r,t.ttItems):this.create(e,this,i,r,t.ttItems,!1);else if(this.tooltipUtil.isXoverlap(r)){var n=u.globals.series.findIndex(function(a,o){return!u.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,n,r,t.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,i=new De(this.ctx),t=e.globals.dom.Paper.find(".apexcharts-bar-area"),r=0;r<t.length;r++)i.pathMouseLeave(t[r])}},{key:"handleMouseOut",value:function(e){var i=this.w,t=this.getElXCrosshairs();if(i.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),i.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),t!==null&&t.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=i.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(u){var n=u.getAttribute("data:default-text");u.innerHTML=decodeURIComponent(n)})}},{key:"markerClick",value:function(e,i,t){var r=this.w;typeof r.config.chart.events.markerClick=="function"&&r.config.chart.events.markerClick(e,this.ctx,{seriesIndex:i,dataPointIndex:t,w:r}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:i,dataPointIndex:t,w:r}])}},{key:"create",value:function(e,i,t,r,u){var n,a,o,h,g,l,c,d,F,p,f,m,v,w,x,A,b=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,y=this.w,k=i;e.type==="mouseup"&&this.markerClick(e,t,r),b===null&&(b=this.tConfig.shared);var C=this.tooltipUtil.hasMarkers(t),D=this.tooltipUtil.getElBars(),T=function(){y.globals.markers.largestSize>0?k.marker.enlargePoints(r):k.tooltipPosition.moveDynamicPointsOnHover(r)};if(y.config.legend.tooltipHoverFormatter){var S=y.config.legend.tooltipHoverFormatter,M=Array.from(this.legendLabels);M.forEach(function(ue){var ne=ue.getAttribute("data:default-text");ue.innerHTML=decodeURIComponent(ne)});for(var R=0;R<M.length;R++){var O=M[R],H=parseInt(O.getAttribute("i"),10),Y=decodeURIComponent(O.getAttribute("data:default-text")),J=S(Y,{seriesIndex:b?H:t,dataPointIndex:r,w:y});if(b)O.innerHTML=y.globals.collapsedSeriesIndices.indexOf(H)<0?J:Y;else if(O.innerHTML=H===t?J:Y,t===H)break}}var Z=Pe(Pe({ttItems:u,i:t,j:r},((n=y.globals.seriesRange)===null||n===void 0||(a=n[t])===null||a===void 0||(o=a[r])===null||o===void 0||(h=o.y[0])===null||h===void 0?void 0:h.y1)!==void 0&&{y1:(g=y.globals.seriesRange)===null||g===void 0||(l=g[t])===null||l===void 0||(c=l[r])===null||c===void 0||(d=c.y[0])===null||d===void 0?void 0:d.y1}),((F=y.globals.seriesRange)===null||F===void 0||(p=F[t])===null||p===void 0||(f=p[r])===null||f===void 0||(m=f.y[0])===null||m===void 0?void 0:m.y2)!==void 0&&{y2:(v=y.globals.seriesRange)===null||v===void 0||(w=v[t])===null||w===void 0||(x=w[r])===null||x===void 0||(A=x.y[0])===null||A===void 0?void 0:A.y2});if(b){if(k.tooltipLabels.drawSeriesTexts(Pe(Pe({},Z),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),C)T();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(D),this.barSeriesHeight>0)){var te=new De(this.ctx),ie=y.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(r,"']"));this.deactivateHoverFilter(),k.tooltipPosition.moveStickyTooltipOverBars(r,t),k.tooltipUtil.getAllMarkers(!0).length&&T();for(var se=0;se<ie.length;se++)te.pathMouseEnter(ie[se])}}else k.tooltipLabels.drawSeriesTexts(Pe({shared:!1},Z)),this.tooltipUtil.hasBars()&&k.tooltipPosition.moveStickyTooltipOverBars(r,t),C&&k.tooltipPosition.moveMarkers(t,r)}}]),s}(),Zj=function(){function s(e){Oe(this,s),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return Ne(s,[{key:"handleBarDataLabels",value:function(e){var i,t,r=e.x,u=e.y,n=e.y1,a=e.y2,o=e.i,h=e.j,g=e.realIndex,l=e.columnGroupIndex,c=e.series,d=e.barHeight,F=e.barWidth,p=e.barXPosition,f=e.barYPosition,m=e.visibleSeries,v=e.renderedPath,w=this.w,x=new De(this.barCtx.ctx),A=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[g]:this.barCtx.strokeWidth;w.globals.isXNumeric&&!w.globals.isBarHorizontal?(i=r+parseFloat(F*(m+1)),t=u+parseFloat(d*(m+1))-A):(i=r+parseFloat(F*m),t=u+parseFloat(d*m));var b,y=null,k=r,C=u,D={},T=w.config.dataLabels,S=this.barCtx.barOptions.dataLabels,M=this.barCtx.barOptions.dataLabels.total;f!==void 0&&this.barCtx.isRangeBar&&(t=f,C=f),p!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(i=p,k=p);var R=T.offsetX,O=T.offsetY,H={width:0,height:0};if(w.config.dataLabels.enabled){var Y=w.globals.series[o][h];H=x.getTextRects(w.config.dataLabels.formatter?w.config.dataLabels.formatter(Y,Pe(Pe({},w),{},{seriesIndex:o,dataPointIndex:h,w})):w.globals.yLabelFormatters[0](Y),parseFloat(T.style.fontSize))}var J={x:r,y:u,i:o,j:h,realIndex:g,columnGroupIndex:l,renderedPath:v,bcx:i,bcy:t,barHeight:d,barWidth:F,textRects:H,strokeWidth:A,dataLabelsX:k,dataLabelsY:C,dataLabelsConfig:T,barDataLabelsConfig:S,barTotalDataLabelsConfig:M,offX:R,offY:O};return D=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(J):this.calculateColumnsDataLabelsPosition(J),v.attr({cy:D.bcy,cx:D.bcx,j:h,val:w.globals.series[o][h],barHeight:d,barWidth:F}),b=this.drawCalculatedDataLabels({x:D.dataLabelsX,y:D.dataLabelsY,val:this.barCtx.isRangeBar?[n,a]:w.config.chart.stackType==="100%"?c[g][h]:w.globals.series[g][h],i:g,j:h,barWidth:F,barHeight:d,textRects:H,dataLabelsConfig:T}),w.config.chart.stacked&&M.enabled&&(y=this.drawTotalDataLabels({x:D.totalDataLabelsX,y:D.totalDataLabelsY,barWidth:F,barHeight:d,realIndex:g,textAnchor:D.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:g,j:h}),dataLabelsConfig:T,barTotalDataLabelsConfig:M})),{dataLabels:b,totalDataLabels:y}}},{key:"getStackedTotalDataLabel",value:function(e){var i=e.realIndex,t=e.j,r=this.w,u=this.barCtx.stackedSeriesTotals[t];return this.totalFormatter&&(u=this.totalFormatter(u,Pe(Pe({},r),{},{seriesIndex:i,dataPointIndex:t,w:r}))),u}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var i=this,t=this.w,r=e.i,u=e.j,n=e.realIndex;e.columnGroupIndex;var a,o,h=e.y,g=e.bcx,l=e.barWidth,c=e.barHeight,d=e.textRects,F=e.dataLabelsX,p=e.dataLabelsY,f=e.dataLabelsConfig,m=e.barDataLabelsConfig,v=e.barTotalDataLabelsConfig,w=e.strokeWidth,x=e.offX,A=e.offY,b=g;c=Math.abs(c);var y=t.config.plotOptions.bar.dataLabels.orientation==="vertical",k=this.barCtx.barHelpers.getZeroValueEncounters({i:r,j:u}).zeroEncounters;g-=w/2;var C=t.globals.gridWidth/t.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?F+=l/2:(F=t.globals.isXNumeric?g-l/2+x:g-C+l/2+x,!t.config.chart.stacked&&k>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(F-=l*k)),y&&(F=F+d.height/2-w/2-2);var D=t.globals.series[r][u]<0,T=h;switch(this.barCtx.isReversed&&(T=h+(D?c:-c)),m.position){case"center":p=y?D?T-c/2+A:T+c/2-A:D?T-c/2+d.height/2+A:T+c/2+d.height/2-A;break;case"bottom":p=y?D?T-c+A:T+c-A:D?T-c+d.height+w+A:T+c-d.height/2+w-A;break;case"top":p=y?D?T+A:T-A:D?T-d.height/2-A:T+d.height+A}var S=T;if(t.globals.seriesGroups.forEach(function(O){var H;(H=i.barCtx[O.join(",")])===null||H===void 0||H.prevY.forEach(function(Y){S=D?Math.max(Y[u],S):Math.min(Y[u],S)})}),this.barCtx.lastActiveBarSerieIndex===n&&v.enabled){var M=new De(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:n,j:u}),f.fontSize);a=D?S-M.height/2-A-v.offsetY+18:S+M.height+A+v.offsetY-18;var R=C;o=b+(t.globals.isXNumeric?-l*t.globals.barGroups.length/2:t.globals.barGroups.length*l/2-(t.globals.barGroups.length-1)*l-R)+v.offsetX}return t.config.chart.stacked||(p<0?p=0+w:p+d.height/3>t.globals.gridHeight&&(p=t.globals.gridHeight-w)),{bcx:g,bcy:h,dataLabelsX:F,dataLabelsY:p,totalDataLabelsX:o,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var i=this,t=this.w,r=e.x,u=e.i,n=e.j,a=e.realIndex,o=e.bcy,h=e.barHeight,g=e.barWidth,l=e.textRects,c=e.dataLabelsX,d=e.strokeWidth,F=e.dataLabelsConfig,p=e.barDataLabelsConfig,f=e.barTotalDataLabelsConfig,m=e.offX,v=e.offY,w=t.globals.gridHeight/t.globals.dataPoints,x=this.barCtx.barHelpers.getZeroValueEncounters({i:u,j:n}).zeroEncounters;g=Math.abs(g);var A,b,y=o-(this.barCtx.isRangeBar?0:w)+h/2+l.height/2+v-3;!t.config.chart.stacked&&x>0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=h*x);var k="start",C=t.globals.series[u][n]<0,D=r;switch(this.barCtx.isReversed&&(D=r+(C?-g:g),k=C?"start":"end"),p.position){case"center":c=C?D+g/2-m:Math.max(l.width/2,D-g/2)+m;break;case"bottom":c=C?D+g-d-m:D-g+d+m;break;case"top":c=C?D-d-m:D-d+m}var T=D;if(t.globals.seriesGroups.forEach(function(M){var R;(R=i.barCtx[M.join(",")])===null||R===void 0||R.prevX.forEach(function(O){T=C?Math.min(O[n],T):Math.max(O[n],T)})}),this.barCtx.lastActiveBarSerieIndex===a&&f.enabled){var S=new De(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:n}),F.fontSize);C?(A=T-d-m-f.offsetX,k="end"):A=T+m+f.offsetX+(this.barCtx.isReversed?-(g+d):d),b=y-l.height/2+S.height/2+f.offsetY+d,t.globals.barGroups.length>1&&(b-=t.globals.barGroups.length/2*(h/2))}return t.config.chart.stacked||(F.textAnchor==="start"?c-l.width<0?c=C?l.width+d:d:c+l.width>t.globals.gridWidth&&(c=C?t.globals.gridWidth-d:t.globals.gridWidth-l.width-d):F.textAnchor==="middle"?c-l.width/2<0?c=l.width/2+d:c+l.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-l.width/2-d):F.textAnchor==="end"&&(c<1?c=l.width+d:c+1>t.globals.gridWidth&&(c=t.globals.gridWidth-l.width-d))),{bcx:r,bcy:o,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:A,totalDataLabelsY:b,totalDataLabelsAnchor:k}}},{key:"drawCalculatedDataLabels",value:function(e){var i=e.x,t=e.y,r=e.val,u=e.i,n=e.j,a=e.textRects,o=e.barHeight,h=e.barWidth,g=e.dataLabelsConfig,l=this.w,c="rotate(0)";l.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(c="rotate(-90, ".concat(i,", ").concat(t,")"));var d=new lu(this.barCtx.ctx),F=new De(this.barCtx.ctx),p=g.formatter,f=null,m=l.globals.collapsedSeriesIndices.indexOf(u)>-1;if(g.enabled&&!m){f=F.group({class:"apexcharts-data-labels",transform:c});var v="";r!==void 0&&(v=p(r,Pe(Pe({},l),{},{seriesIndex:u,dataPointIndex:n,w:l}))),!r&&l.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v="");var w=l.globals.series[u][n]<0,x=l.config.plotOptions.bar.dataLabels.position;l.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(x==="top"&&(g.textAnchor=w?"end":"start"),x==="center"&&(g.textAnchor="middle"),x==="bottom"&&(g.textAnchor=w?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&h<F.getTextRects(v,parseFloat(g.style.fontSize)).width&&(v=""),l.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(h)&&(v=""):a.height/1.6>Math.abs(o)&&(v=""));var A=Pe({},g);this.barCtx.isHorizontal&&r<0&&(g.textAnchor==="start"?A.textAnchor="end":g.textAnchor==="end"&&(A.textAnchor="start")),d.plotDataLabelsText({x:i,y:t,text:v,i:u,j:n,parent:f,dataLabelsConfig:A,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return f}},{key:"drawTotalDataLabels",value:function(e){var i=e.x,t=e.y,r=e.val,u=e.realIndex,n=e.textAnchor,a=e.barTotalDataLabelsConfig;this.w;var o,h=new De(this.barCtx.ctx);return a.enabled&&i!==void 0&&t!==void 0&&this.barCtx.lastActiveBarSerieIndex===u&&(o=h.drawText({x:i,y:t,foreColor:a.style.color,text:r,textAnchor:n,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),o}}]),s}(),Qj=function(){function s(e){Oe(this,s),this.w=e.w,this.barCtx=e}return Ne(s,[{key:"initVariables",value:function(e){var i=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var t=0;t<e.length;t++)if(e[t].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[t].length),i.globals.isXNumeric)for(var r=0;r<e[t].length;r++)i.globals.seriesX[t][r]>i.globals.minX&&i.globals.seriesX[t][r]<i.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=i.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(i.globals.series),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],i.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(e){var i,t,r,u,n,a,o,h,g=this.w,l=g.globals.dataPoints;this.barCtx.isRangeBar&&(l=g.globals.labels.length);var c=this.barCtx.seriesLen;if(g.config.plotOptions.bar.rangeBarGroupRows&&(c=1),this.barCtx.isHorizontal)n=(r=g.globals.gridHeight/l)/c,g.globals.isXNumeric&&(n=(r=g.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),n=n*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(n=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+g.globals.padHorizontal+(this.barCtx.isReversed?g.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=g.globals.gridWidth/2),t=(r-n*this.barCtx.seriesLen)/2;else{if(u=g.globals.gridWidth/this.barCtx.visibleItems,g.config.xaxis.convertedCatToNumeric&&(u=g.globals.gridWidth/g.globals.dataPoints),a=u/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,g.globals.isXNumeric){var d=this.barCtx.xRatio;g.globals.minXDiff&&g.globals.minXDiff!==.5&&g.globals.minXDiff/d>0&&(u=g.globals.minXDiff/d),(a=u/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(a=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(a=parseInt(this.barCtx.barOptions.columnWidth,10)),o=g.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?g.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),g.globals.isXNumeric?i=this.barCtx.getBarXForNumericXAxis({x:i,j:0,realIndex:e,barWidth:a}).x:i=g.globals.padHorizontal+pe.noExponents(u-a*this.barCtx.seriesLen)/2}return g.globals.barHeight=n,g.globals.barWidth=a,{x:i,y:t,yDivision:r,xDivision:u,barHeight:n,barWidth:a,zeroH:o,zeroW:h}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].prevY=[],e[i].prevX=[],e[i].prevYF=[],e[i].prevXF=[],e[i].prevYVal=[],e[i].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(i){e[i]||(e[i]={}),e[i].xArrj=[],e[i].xArrjF=[],e[i].xArrjVal=[],e[i].yArrj=[],e[i].yArrjF=[],e[i].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,i,t,r){var u,n,a,o,h=this.w,g=this.barCtx.ctx.fill,l=null,c=this.barCtx.barOptions.distributed?t:i,d=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(F){e[i][t]>=F.from&&e[i][t]<=F.to&&(l=F.color,d=!0)}),{color:g.fillPath({seriesNumber:this.barCtx.barOptions.distributed?c:r,dataPointIndex:t,color:l,value:e[i][t],fillConfig:(u=h.config.series[i].data[t])===null||u===void 0?void 0:u.fill,fillType:(n=h.config.series[i].data[t])!==null&&n!==void 0&&(a=n.fill)!==null&&a!==void 0&&a.type?(o=h.config.series[i].data[t])===null||o===void 0?void 0:o.fill.type:Array.isArray(h.config.fill.type)?h.config.fill.type[r]:h.config.fill.type}),useRangeColor:d}}},{key:"getStrokeWidth",value:function(e,i,t){var r=0,u=this.w;return this.barCtx.series[e][i]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,u.config.stroke.show&&(this.barCtx.isNullValue||(r=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[t]:this.barCtx.strokeWidth)),r}},{key:"createBorderRadiusArr",value:function(e){var i,t=this.w,r=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadius<=0,u=e.length,n=0|((i=e[0])===null||i===void 0?void 0:i.length),a=Array.from({length:u},function(){return Array(n).fill(r?"top":"none")});if(r)return a;for(var o=0;o<n;o++){for(var h=[],g=[],l=0,c=0;c<u;c++){var d=e[c][o];d>0?(h.push(c),l++):d<0&&(g.push(c),l++)}if(h.length>0&&g.length===0)if(h.length===1)a[h[0]][o]="both";else{var F,p=h[0],f=h[h.length-1],m=Ku(h);try{for(m.s();!(F=m.n()).done;){var v=F.value;a[v][o]=v===p?"bottom":v===f?"top":"none"}}catch(H){m.e(H)}finally{m.f()}}else if(g.length>0&&h.length===0)if(g.length===1)a[g[0]][o]="both";else{var w,x=Math.max.apply(Math,g),A=Math.min.apply(Math,g),b=Ku(g);try{for(b.s();!(w=b.n()).done;){var y=w.value;a[y][o]=y===x?"bottom":y===A?"top":"none"}}catch(H){b.e(H)}finally{b.f()}}else if(h.length>0&&g.length>0){var k,C=h[h.length-1],D=Ku(h);try{for(D.s();!(k=D.n()).done;){var T=k.value;a[T][o]=T===C?"top":"none"}}catch(H){D.e(H)}finally{D.f()}var S,M=Math.max.apply(Math,g),R=Ku(g);try{for(R.s();!(S=R.n()).done;){var O=S.value;a[O][o]=O===M?"bottom":"none"}}catch(H){R.e(H)}finally{R.f()}}else l===1&&(a[h[0]||g[0]][o]="both")}return a}},{key:"barBackground",value:function(e){var i=e.j,t=e.i,r=e.x1,u=e.x2,n=e.y1,a=e.y2,o=e.elSeries,h=this.w,g=new De(this.barCtx.ctx),l=new ni(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&l===t){i>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(i%=this.barCtx.barOptions.colors.backgroundBarColors.length);var c=this.barCtx.barOptions.colors.backgroundBarColors[i],d=g.drawRect(r!==void 0?r:0,n!==void 0?n:0,u!==void 0?u:h.globals.gridWidth,a!==void 0?a:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,c,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(d),d.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var i,t=e.barWidth,r=e.barXPosition,u=e.y1,n=e.y2,a=e.strokeWidth,o=e.isReversed,h=e.series,g=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,F=e.w,p=new De(this.barCtx.ctx);(a=Array.isArray(a)?a[l]:a)||(a=0);var f=t,m=r;(i=F.config.series[l].data[d])!==null&&i!==void 0&&i.columnWidthOffset&&(m=r-F.config.series[l].data[d].columnWidthOffset/2,f=t+F.config.series[l].data[d].columnWidthOffset);var v=a/2,w=m+v,x=m+f-v,A=(h[c][d]>=0?1:-1)*(o?-1:1);u+=.001-v*A,n+=.001+v*A;var b=p.move(w,u),y=p.move(w,u),k=p.line(x,u);if(F.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(l,d,!1)),b=b+p.line(w,n)+p.line(x,n)+k+(F.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][d]==="both"?" Z":" z"),y=y+p.line(w,u)+k+k+k+k+k+p.line(w,u)+(F.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][d]==="both"?" Z":" z"),this.arrBorderRadius[l][d]!=="none"&&(b=p.roundPathCorners(b,F.config.plotOptions.bar.borderRadius)),F.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[g]).yArrj.push(n-v*A),C.yArrjF.push(Math.abs(u-n+a*A)),C.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:b,pathFrom:y}}},{key:"getBarpaths",value:function(e){var i,t=e.barYPosition,r=e.barHeight,u=e.x1,n=e.x2,a=e.strokeWidth,o=e.isReversed,h=e.series,g=e.seriesGroup,l=e.realIndex,c=e.i,d=e.j,F=e.w,p=new De(this.barCtx.ctx);(a=Array.isArray(a)?a[l]:a)||(a=0);var f=t,m=r;(i=F.config.series[l].data[d])!==null&&i!==void 0&&i.barHeightOffset&&(f=t-F.config.series[l].data[d].barHeightOffset/2,m=r+F.config.series[l].data[d].barHeightOffset);var v=a/2,w=f+v,x=f+m-v,A=(h[c][d]>=0?1:-1)*(o?-1:1);u+=.001+v*A,n+=.001-v*A;var b=p.move(u,w),y=p.move(u,w);F.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(l,d,!1));var k=p.line(u,x);if(b=b+p.line(n,w)+p.line(n,x)+k+(F.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][d]==="both"?" Z":" z"),y=y+p.line(u,w)+k+k+k+k+k+p.line(u,w)+(F.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][d]==="both"?" Z":" z"),this.arrBorderRadius[l][d]!=="none"&&(b=p.roundPathCorners(b,F.config.plotOptions.bar.borderRadius)),F.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[g]).xArrj.push(n+v*A),C.xArrjF.push(Math.abs(u-n-a*A)),C.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:b,pathFrom:y}}},{key:"checkZeroSeries",value:function(e){for(var i=e.series,t=this.w,r=0;r<i.length;r++){for(var u=0,n=0;n<i[t.globals.maxValsInArrayIndex].length;n++)u+=i[r][n];u===0&&this.barCtx.zeroSerieses.push(r)}}},{key:"getXForValue",value:function(e,i){var t=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?i:null;return e!=null&&(t=i+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),t}},{key:"getYForValue",value:function(e,i,t){var r=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?i:null;return e!=null&&(r=i-e/this.barCtx.yRatio[t]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[t]:0)),r}},{key:"getGoalValues",value:function(e,i,t,r,u,n){var a=this,o=this.w,h=[],g=function(d,F){var p;h.push((ta(p={},e,e==="x"?a.getXForValue(d,i,!1):a.getYForValue(d,t,n,!1)),ta(p,"attrs",F),p))};if(o.globals.seriesGoals[r]&&o.globals.seriesGoals[r][u]&&Array.isArray(o.globals.seriesGoals[r][u])&&o.globals.seriesGoals[r][u].forEach(function(d){g(d.value,d)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var l=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,c={strokeHeight:e==="x"?0:o.globals.markers.size[r],strokeWidth:e==="x"?o.globals.markers.size[r]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(l[r])?l[r][0]:l[r]};g(o.globals.seriesRangeStart[r][u],c),g(o.globals.seriesRangeEnd[r][u],Pe(Pe({},c),{},{strokeColor:Array.isArray(l[r])?l[r][1]:l[r]}))}return h}},{key:"drawGoalLine",value:function(e){var i=e.barXPosition,t=e.barYPosition,r=e.goalX,u=e.goalY,n=e.barWidth,a=e.barHeight,o=new De(this.barCtx.ctx),h=o.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var g=null;return this.barCtx.isHorizontal?Array.isArray(r)&&r.forEach(function(l){if(l.x>=-1&&l.x<=o.w.globals.gridWidth+1){var c=l.attrs.strokeHeight!==void 0?l.attrs.strokeHeight:a/2,d=t+c+a/2;g=o.drawLine(l.x,d-2*c,l.x,d,l.attrs.strokeColor?l.attrs.strokeColor:void 0,l.attrs.strokeDashArray,l.attrs.strokeWidth?l.attrs.strokeWidth:2,l.attrs.strokeLineCap),h.add(g)}}):Array.isArray(u)&&u.forEach(function(l){if(l.y>=-1&&l.y<=o.w.globals.gridHeight+1){var c=l.attrs.strokeWidth!==void 0?l.attrs.strokeWidth:n/2,d=i+c+n/2;g=o.drawLine(d-2*c,l.y,d,l.y,l.attrs.strokeColor?l.attrs.strokeColor:void 0,l.attrs.strokeDashArray,l.attrs.strokeHeight?l.attrs.strokeHeight:2,l.attrs.strokeLineCap),h.add(g)}}),h}},{key:"drawBarShadow",value:function(e){var i=e.prevPaths,t=e.currPaths,r=e.color,u=this.w,n=i.x,a=i.x1,o=i.barYPosition,h=t.x,g=t.x1,l=t.barYPosition,c=o+t.barHeight,d=new De(this.barCtx.ctx),F=new pe,p=d.move(a,c)+d.line(n,c)+d.line(h,l)+d.line(g,l)+d.line(a,c)+(u.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return d.drawPath({d:p,fill:F.shadeColor(.5,pe.rgb2hex(r)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var i,t=e.i,r=e.j,u=this.w,n=0,a=0;return(u.config.plotOptions.bar.horizontal?u.globals.series.map(function(o,h){return h}):((i=u.globals.columnSeries)===null||i===void 0?void 0:i.i.map(function(o){return o}))||[]).forEach(function(o){var h=u.globals.seriesPercent[o][r];h&&n++,o<t&&h===0&&a++}),{nonZeroColumns:n,zeroEncounters:a}}},{key:"getGroupIndex",value:function(e){var i=this.w,t=i.globals.seriesGroups.findIndex(function(n){return n.indexOf(i.globals.seriesNames[e])>-1}),r=this.barCtx.columnGroupIndices,u=r.indexOf(t);return u<0&&(r.push(t),u=r.length-1),{groupIndex:t,columnGroupIndex:u}}}]),s}(),cu=function(){function s(e,i){Oe(this,s),this.ctx=e,this.w=e.w;var t=this.w;this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.globals.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=i,this.xyRatios!==null&&(this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.invertedXRatio=i.invertedXRatio,this.invertedYRatio=i.invertedYRatio,this.baseLineY=i.baseLineY,this.baseLineInvertedY=i.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new ni(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var u=r.getBarSeriesIndices(),n=new Gt(this.ctx);this.stackedSeriesTotals=n.getStackedSeriesTotals(this.w.config.series.map(function(a,o){return u.indexOf(o)===-1?o:-1}).filter(function(a){return a!==-1})),this.barHelpers=new Qj(this)}return Ne(s,[{key:"draw",value:function(e,i){var t=this.w,r=new De(this.ctx),u=new Gt(this.ctx,t);e=u.getLogSeries(e),this.series=e,this.yRatio=u.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var n=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});t.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,o=0;a<e.length;a++,o++){var h,g,l,c,d=void 0,F=void 0,p=[],f=[],m=t.globals.comboCharts?i[a]:a,v=this.barHelpers.getGroupIndex(m).columnGroupIndex,w=r.group({class:"apexcharts-series",rel:a+1,seriesName:pe.escapeString(t.globals.seriesNames[m]),"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(w,m),e[a].length>0&&(this.visibleI=this.visibleI+1);var x=0,A=0;this.yRatio.length>1&&(this.yaxisIndex=t.globals.seriesYAxisReverseMap[m],this.translationsIndex=m);var b=this.translationsIndex;this.isReversed=t.config.yaxis[this.yaxisIndex]&&t.config.yaxis[this.yaxisIndex].reversed;var y=this.barHelpers.initialPositions(m);F=y.y,x=y.barHeight,g=y.yDivision,c=y.zeroW,d=y.x,A=y.barWidth,h=y.xDivision,l=y.zeroH,this.isHorizontal||f.push(d+A/2);var k=r.group({class:"apexcharts-datalabels","data:realIndex":m});t.globals.delayedElements.push({el:k.node}),k.node.classList.add("apexcharts-element-hidden");var C=r.group({class:"apexcharts-bar-goals-markers"}),D=r.group({class:"apexcharts-bar-shadows"});t.globals.delayedElements.push({el:D.node}),D.node.classList.add("apexcharts-element-hidden");for(var T=0;T<e[a].length;T++){var S=this.barHelpers.getStrokeWidth(a,T,m),M=null,R={indexes:{i:a,j:T,realIndex:m,translationsIndex:b,bc:o},x:d,y:F,strokeWidth:S,elSeries:w};this.isHorizontal?(M=this.drawBarPaths(Pe(Pe({},R),{},{barHeight:x,zeroW:c,yDivision:g})),A=this.series[a][T]/this.invertedYRatio):(M=this.drawColumnPaths(Pe(Pe({},R),{},{xDivision:h,barWidth:A,zeroH:l})),x=this.series[a][T]/this.yRatio[b]);var O=this.barHelpers.getPathFillColor(e,a,T,m);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&T>0){var H,Y=this.barHelpers.drawBarShadow({color:typeof O.color=="string"&&((H=O.color)===null||H===void 0?void 0:H.indexOf("url"))===-1?O.color:pe.hexToRgba(t.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:M});D.add(Y),t.config.chart.dropShadow.enabled&&new Fr(this.ctx).dropShadow(Y,t.config.chart.dropShadow,m)}this.pathArr.push(M);var J=this.barHelpers.drawGoalLine({barXPosition:M.barXPosition,barYPosition:M.barYPosition,goalX:M.goalX,goalY:M.goalY,barHeight:x,barWidth:A});J&&C.add(J),F=M.y,d=M.x,T>0&&f.push(d+A/2),p.push(F),this.renderSeries(Pe(Pe({realIndex:m,pathFill:O.color},O.useRangeColor?{lineFill:O.color}:{}),{},{j:T,i:a,columnGroupIndex:v,pathFrom:M.pathFrom,pathTo:M.pathTo,strokeWidth:S,elSeries:w,x:d,y:F,series:e,barHeight:Math.abs(M.barHeight?M.barHeight:x),barWidth:Math.abs(M.barWidth?M.barWidth:A),elDataLabelsWrap:k,elGoalsMarkers:C,elBarShadows:D,visibleSeries:this.visibleI,type:"bar"}))}t.globals.seriesXvalues[m]=f,t.globals.seriesYvalues[m]=p,n.add(w)}return n}},{key:"renderSeries",value:function(e){var i=e.realIndex,t=e.pathFill,r=e.lineFill,u=e.j,n=e.i,a=e.columnGroupIndex,o=e.pathFrom,h=e.pathTo,g=e.strokeWidth,l=e.elSeries,c=e.x,d=e.y,F=e.y1,p=e.y2,f=e.series,m=e.barHeight,v=e.barWidth,w=e.barXPosition,x=e.barYPosition,A=e.elDataLabelsWrap,b=e.elGoalsMarkers,y=e.elBarShadows,k=e.visibleSeries,C=e.type,D=e.classes,T=this.w,S=new De(this.ctx);if(!r){var M=typeof T.globals.stroke.colors[i]=="function"?function(J){var Z,te=T.config.stroke.colors;return Array.isArray(te)&&te.length>0&&((Z=te[J])||(Z=""),typeof Z=="function")?Z({value:T.globals.series[J][u],dataPointIndex:u,w:T}):Z}(i):T.globals.stroke.colors[i];r=this.barOptions.distributed?T.globals.stroke.colors[u]:M}T.config.series[n].data[u]&&T.config.series[n].data[u].strokeColor&&(r=T.config.series[n].data[u].strokeColor),this.isNullValue&&(t="none");var R=u/T.config.chart.animations.animateGradually.delay*(T.config.chart.animations.speed/T.globals.dataPoints)/2.4,O=S.renderPaths({i:n,j:u,realIndex:i,pathFrom:o,pathTo:h,stroke:r,strokeWidth:g,strokeLineCap:T.config.stroke.lineCap,fill:t,animationDelay:R,initialSpeed:T.config.chart.animations.speed,dataChangeSpeed:T.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(D),chartType:C});O.attr("clip-path","url(#gridRectBarMask".concat(T.globals.cuid,")"));var H=T.config.forecastDataPoints;H.count>0&&u>=T.globals.dataPoints-H.count&&(O.node.setAttribute("stroke-dasharray",H.dashArray),O.node.setAttribute("stroke-width",H.strokeWidth),O.node.setAttribute("fill-opacity",H.fillOpacity)),F!==void 0&&p!==void 0&&(O.attr("data-range-y1",F),O.attr("data-range-y2",p)),new Fr(this.ctx).setSelectionFilter(O,i,u),l.add(O);var Y=new Zj(this).handleBarDataLabels({x:c,y:d,y1:F,y2:p,i:n,j:u,series:f,realIndex:i,columnGroupIndex:a,barHeight:m,barWidth:v,barXPosition:w,barYPosition:x,renderedPath:O,visibleSeries:k});return Y.dataLabels!==null&&A.add(Y.dataLabels),Y.totalDataLabels&&A.add(Y.totalDataLabels),l.add(A),b&&l.add(b),y&&l.add(y),l}},{key:"drawBarPaths",value:function(e){var i,t=e.indexes,r=e.barHeight,u=e.strokeWidth,n=e.zeroW,a=e.x,o=e.y,h=e.yDivision,g=e.elSeries,l=this.w,c=t.i,d=t.j;if(l.globals.isXNumeric)i=(o=(l.globals.seriesX[c][d]-l.globals.minX)/this.invertedXRatio-r)+r*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){var F=this.barHelpers.getZeroValueEncounters({i:c,j:d}),p=F.nonZeroColumns,f=F.zeroEncounters;p>0&&(r=this.seriesLen*r/p),i=o+r*this.visibleI,i-=r*f}else i=o+r*this.visibleI;this.isFunnel&&(n-=(this.barHelpers.getXForValue(this.series[c][d],n)-n)/2),a=this.barHelpers.getXForValue(this.series[c][d],n);var m=this.barHelpers.getBarpaths({barYPosition:i,barHeight:r,x1:n,x2:a,strokeWidth:u,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:c,j:d,w:l});return l.globals.isXNumeric||(o+=h),this.barHelpers.barBackground({j:d,i:c,y1:i-r*this.visibleI,y2:r*this.seriesLen,elSeries:g}),{pathTo:m.pathTo,pathFrom:m.pathFrom,x1:n,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",n,null,c,d),barYPosition:i,barHeight:r}}},{key:"drawColumnPaths",value:function(e){var i,t=e.indexes,r=e.x,u=e.y,n=e.xDivision,a=e.barWidth,o=e.zeroH,h=e.strokeWidth,g=e.elSeries,l=this.w,c=t.realIndex,d=t.translationsIndex,F=t.i,p=t.j,f=t.bc;if(l.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:r,j:p,realIndex:c,barWidth:a});r=m.x,i=m.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){var v=this.barHelpers.getZeroValueEncounters({i:F,j:p}),w=v.nonZeroColumns,x=v.zeroEncounters;w>0&&(a=this.seriesLen*a/w),i=r+a*this.visibleI,i-=a*x}else i=r+a*this.visibleI;u=this.barHelpers.getYForValue(this.series[F][p],o,d);var A=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:o,y2:u,strokeWidth:h,isReversed:this.isReversed,series:this.series,realIndex:c,i:F,j:p,w:l});return l.globals.isXNumeric||(r+=n),this.barHelpers.barBackground({bc:f,j:p,i:F,x1:i-h/2-a*this.visibleI,x2:a*this.seriesLen+h/2,elSeries:g}),{pathTo:A.pathTo,pathFrom:A.pathFrom,x:r,y:u,goalY:this.barHelpers.getGoalValues("y",null,o,F,p,d),barXPosition:i,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(e){var i=e.x,t=e.barWidth,r=e.realIndex,u=e.j,n=this.w,a=r;return n.globals.seriesX[r].length||(a=n.globals.maxValsInArrayIndex),pe.isNumber(n.globals.seriesX[a][u])&&(i=(n.globals.seriesX[a][u]-n.globals.minX)/this.xRatio-t*this.seriesLen/2),{barXPosition:i+t*this.visibleI,x:i}}},{key:"getPreviousPath",value:function(e,i){for(var t,r=this.w,u=0;u<r.globals.previousPaths.length;u++){var n=r.globals.previousPaths[u];n.paths&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(e,10)&&r.globals.previousPaths[u].paths[i]!==void 0&&(t=r.globals.previousPaths[u].paths[i].d)}return t}}]),s}(),Pg=function(s){Wn(i,cu);var e=Nn(i);function i(){return Oe(this,i),e.apply(this,arguments)}return Ne(i,[{key:"draw",value:function(t,r){var u=this,n=this.w;this.graphics=new De(this.ctx),this.bar=new cu(this.ctx,this.xyRatios);var a=new Gt(this.ctx,n);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),n.config.chart.stackType==="100%"&&(t=n.globals.comboCharts?r.map(function(F){return n.globals.seriesPercent[F]}):n.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,g=0,l=function(F,p){var f=void 0,m=void 0,v=void 0,w=void 0,x=n.globals.comboCharts?r[F]:F,A=u.barHelpers.getGroupIndex(x),b=A.groupIndex,y=A.columnGroupIndex;u.groupCtx=u[n.globals.seriesGroups[b]];var k=[],C=[],D=0;u.yRatio.length>1&&(u.yaxisIndex=n.globals.seriesYAxisReverseMap[x][0],D=x),u.isReversed=n.config.yaxis[u.yaxisIndex]&&n.config.yaxis[u.yaxisIndex].reversed;var T=u.graphics.group({class:"apexcharts-series",seriesName:pe.escapeString(n.globals.seriesNames[x]),rel:F+1,"data:realIndex":x});u.ctx.series.addCollapsedClassToSeries(T,x);var S=u.graphics.group({class:"apexcharts-datalabels","data:realIndex":x}),M=u.graphics.group({class:"apexcharts-bar-goals-markers"}),R=0,O=0,H=u.initialPositions(h,g,f,m,v,w,D);g=H.y,R=H.barHeight,m=H.yDivision,w=H.zeroW,h=H.x,O=H.barWidth,f=H.xDivision,v=H.zeroH,n.globals.barHeight=R,n.globals.barWidth=O,u.barHelpers.initializeStackedXYVars(u),u.groupCtx.prevY.length===1&&u.groupCtx.prevY[0].every(function(G){return isNaN(G)})&&(u.groupCtx.prevY[0]=u.groupCtx.prevY[0].map(function(){return v}),u.groupCtx.prevYF[0]=u.groupCtx.prevYF[0].map(function(){return 0}));for(var Y=0;Y<n.globals.dataPoints;Y++){var J=u.barHelpers.getStrokeWidth(F,Y,x),Z={indexes:{i:F,j:Y,realIndex:x,translationsIndex:D,bc:p},strokeWidth:J,x:h,y:g,elSeries:T,columnGroupIndex:y,seriesGroup:n.globals.seriesGroups[b]},te=null;u.isHorizontal?(te=u.drawStackedBarPaths(Pe(Pe({},Z),{},{zeroW:w,barHeight:R,yDivision:m})),O=u.series[F][Y]/u.invertedYRatio):(te=u.drawStackedColumnPaths(Pe(Pe({},Z),{},{xDivision:f,barWidth:O,zeroH:v})),R=u.series[F][Y]/u.yRatio[D]);var ie=u.barHelpers.drawGoalLine({barXPosition:te.barXPosition,barYPosition:te.barYPosition,goalX:te.goalX,goalY:te.goalY,barHeight:R,barWidth:O});ie&&M.add(ie),g=te.y,h=te.x,k.push(h),C.push(g);var se=u.barHelpers.getPathFillColor(t,F,Y,x),ue="",ne=n.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(u.barHelpers.arrBorderRadius[x][Y]==="bottom"&&n.globals.series[x][Y]>0||u.barHelpers.arrBorderRadius[x][Y]==="top"&&n.globals.series[x][Y]<0)&&(ue=ne),T=u.renderSeries(Pe(Pe({realIndex:x,pathFill:se.color},se.useRangeColor?{lineFill:se.color}:{}),{},{j:Y,i:F,columnGroupIndex:y,pathFrom:te.pathFrom,pathTo:te.pathTo,strokeWidth:J,elSeries:T,x:h,y:g,series:t,barHeight:R,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:M,type:"bar",visibleSeries:y,classes:ue}))}n.globals.seriesXvalues[x]=k,n.globals.seriesYvalues[x]=C,u.groupCtx.prevY.push(u.groupCtx.yArrj),u.groupCtx.prevYF.push(u.groupCtx.yArrjF),u.groupCtx.prevYVal.push(u.groupCtx.yArrjVal),u.groupCtx.prevX.push(u.groupCtx.xArrj),u.groupCtx.prevXF.push(u.groupCtx.xArrjF),u.groupCtx.prevXVal.push(u.groupCtx.xArrjVal),o.add(T)},c=0,d=0;c<t.length;c++,d++)l(c,d);return o}},{key:"initialPositions",value:function(t,r,u,n,a,o,h){var g,l,c=this.w;if(this.isHorizontal){n=c.globals.gridHeight/c.globals.dataPoints;var d=c.config.plotOptions.bar.barHeight;g=String(d).indexOf("%")===-1?parseInt(d,10):n*parseInt(d,10)/100,o=c.globals.padHorizontal+(this.isReversed?c.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),r=(n-g)/2}else{l=u=c.globals.gridWidth/c.globals.dataPoints;var F=c.config.plotOptions.bar.columnWidth;c.globals.isXNumeric&&c.globals.dataPoints>1?l=(u=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(F).indexOf("%")===-1?l=parseInt(F,10):l*=parseInt(F,10)/100,a=this.isReversed?this.baseLineY[h]:c.globals.gridHeight-this.baseLineY[h],t=c.globals.padHorizontal+(u-l)/2}var p=c.globals.barGroups.length||1;return{x:t,y:r,yDivision:n,xDivision:u,barHeight:g/p,barWidth:l/p,zeroH:a,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var r,u=t.indexes,n=t.barHeight,a=t.strokeWidth,o=t.zeroW,h=t.x,g=t.y,l=t.columnGroupIndex,c=t.seriesGroup,d=t.yDivision,F=t.elSeries,p=this.w,f=g+l*n,m=u.i,v=u.j,w=u.realIndex,x=u.translationsIndex,A=0,b=0;b<this.groupCtx.prevXF.length;b++)A+=this.groupCtx.prevXF[b][v];var y=m;if(p.config.series[w].name&&(y=c.indexOf(p.config.series[w].name)),y>0){var k=o;this.groupCtx.prevXVal[y-1][v]<0?k=this.series[m][v]>=0?this.groupCtx.prevX[y-1][v]+A-2*(this.isReversed?A:0):this.groupCtx.prevX[y-1][v]:this.groupCtx.prevXVal[y-1][v]>=0&&(k=this.series[m][v]>=0?this.groupCtx.prevX[y-1][v]:this.groupCtx.prevX[y-1][v]-A+2*(this.isReversed?A:0)),r=k}else r=o;h=this.series[m][v]===null?r:r+this.series[m][v]/this.invertedYRatio-2*(this.isReversed?this.series[m][v]/this.invertedYRatio:0);var C=this.barHelpers.getBarpaths({barYPosition:f,barHeight:n,x1:r,x2:h,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:u.realIndex,seriesGroup:c,i:m,j:v,w:p});return this.barHelpers.barBackground({j:v,i:m,y1:f,y2:n,elSeries:F}),g+=d,{pathTo:C.pathTo,pathFrom:C.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,m,v,x),barXPosition:r,barYPosition:f,x:h,y:g}}},{key:"drawStackedColumnPaths",value:function(t){var r=t.indexes,u=t.x,n=t.y,a=t.xDivision,o=t.barWidth,h=t.zeroH,g=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,d=this.w,F=r.i,p=r.j,f=r.bc,m=r.realIndex,v=r.translationsIndex;if(d.globals.isXNumeric){var w=d.globals.seriesX[m][p];w||(w=0),u=(w-d.globals.minX)/this.xRatio-o/2*d.globals.barGroups.length}for(var x,A=u+g*o,b=0,y=0;y<this.groupCtx.prevYF.length;y++)b+=isNaN(this.groupCtx.prevYF[y][p])?0:this.groupCtx.prevYF[y][p];var k=F;if(l&&(k=l.indexOf(d.globals.seriesNames[m])),k>0&&!d.globals.isXNumeric||k>0&&d.globals.isXNumeric&&d.globals.seriesX[m-1][p]===d.globals.seriesX[m][p]){var C,D,T,S=Math.min(this.yRatio.length+1,m+1);if(this.groupCtx.prevY[k-1]!==void 0&&this.groupCtx.prevY[k-1].length)for(var M=1;M<S;M++){var R;if(!isNaN((R=this.groupCtx.prevY[k-M])===null||R===void 0?void 0:R[p])){T=this.groupCtx.prevY[k-M][p];break}}for(var O=1;O<S;O++){var H,Y;if(((H=this.groupCtx.prevYVal[k-O])===null||H===void 0?void 0:H[p])<0){D=this.series[F][p]>=0?T-b+2*(this.isReversed?b:0):T;break}if(((Y=this.groupCtx.prevYVal[k-O])===null||Y===void 0?void 0:Y[p])>=0){D=this.series[F][p]>=0?T:T+b-2*(this.isReversed?b:0);break}}D===void 0&&(D=d.globals.gridHeight),x=(C=this.groupCtx.prevYF[0])!==null&&C!==void 0&&C.every(function(Z){return Z===0})&&this.groupCtx.prevYF.slice(1,k).every(function(Z){return Z.every(function(te){return isNaN(te)})})?h:D}else x=h;n=this.series[F][p]?x-this.series[F][p]/this.yRatio[v]+2*(this.isReversed?this.series[F][p]/this.yRatio[v]:0):x;var J=this.barHelpers.getColumnPaths({barXPosition:A,barWidth:o,y1:x,y2:n,yRatio:this.yRatio[v],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:r.realIndex,i:F,j:p,w:d});return this.barHelpers.barBackground({bc:f,j:p,i:F,x1:A,x2:o,elSeries:c}),{pathTo:J.pathTo,pathFrom:J.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,F,p),barXPosition:A,x:d.globals.isXNumeric?u:u+a,y:n}}}]),i}(),ic=function(s){Wn(i,cu);var e=Nn(i);function i(){return Oe(this,i),e.apply(this,arguments)}return Ne(i,[{key:"draw",value:function(t,r,u){var n=this,a=this.w,o=new De(this.ctx),h=a.globals.comboCharts?r:a.config.chart.type,g=new wi(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var l=new Gt(this.ctx,a);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var c=o.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),d=function(p){n.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[p].type==="boxPlot";var f,m,v,w,x=void 0,A=void 0,b=[],y=[],k=a.globals.comboCharts?u[p]:p,C=n.barHelpers.getGroupIndex(k).columnGroupIndex,D=o.group({class:"apexcharts-series",seriesName:pe.escapeString(a.globals.seriesNames[k]),rel:p+1,"data:realIndex":k});n.ctx.series.addCollapsedClassToSeries(D,k),t[p].length>0&&(n.visibleI=n.visibleI+1);var T,S,M=0;n.yRatio.length>1&&(n.yaxisIndex=a.globals.seriesYAxisReverseMap[k][0],M=k);var R=n.barHelpers.initialPositions(k);A=R.y,T=R.barHeight,m=R.yDivision,w=R.zeroW,x=R.x,S=R.barWidth,f=R.xDivision,v=R.zeroH,y.push(x+S/2);for(var O=o.group({class:"apexcharts-datalabels","data:realIndex":k}),H=o.group({class:"apexcharts-bar-goals-markers"}),Y=function(Z){var te=n.barHelpers.getStrokeWidth(p,Z,k),ie=null,se={indexes:{i:p,j:Z,realIndex:k,translationsIndex:M},x,y:A,strokeWidth:te,elSeries:D};ie=n.isHorizontal?n.drawHorizontalBoxPaths(Pe(Pe({},se),{},{yDivision:m,barHeight:T,zeroW:w})):n.drawVerticalBoxPaths(Pe(Pe({},se),{},{xDivision:f,barWidth:S,zeroH:v})),A=ie.y,x=ie.x;var ue=n.barHelpers.drawGoalLine({barXPosition:ie.barXPosition,barYPosition:ie.barYPosition,goalX:ie.goalX,goalY:ie.goalY,barHeight:T,barWidth:S});ue&&H.add(ue),Z>0&&y.push(x+S/2),b.push(A),ie.pathTo.forEach(function(ne,G){var K=!n.isBoxPlot&&n.candlestickOptions.wick.useFillColor?ie.color[G]:a.globals.stroke.colors[p],le=g.fillPath({seriesNumber:k,dataPointIndex:Z,color:ie.color[G],value:t[p][Z]});n.renderSeries({realIndex:k,pathFill:le,lineFill:K,j:Z,i:p,pathFrom:ie.pathFrom,pathTo:ne,strokeWidth:te,elSeries:D,x,y:A,series:t,columnGroupIndex:C,barHeight:T,barWidth:S,elDataLabelsWrap:O,elGoalsMarkers:H,visibleSeries:n.visibleI,type:a.config.chart.type})})},J=0;J<a.globals.dataPoints;J++)Y(J);a.globals.seriesXvalues[k]=y,a.globals.seriesYvalues[k]=b,c.add(D)},F=0;F<t.length;F++)d(F);return c}},{key:"drawVerticalBoxPaths",value:function(t){var r=t.indexes,u=t.x;t.y;var n=t.xDivision,a=t.barWidth,o=t.zeroH,h=t.strokeWidth,g=this.w,l=new De(this.ctx),c=r.i,d=r.j,F=g.config.plotOptions.candlestick.colors,p=this.boxOptions.colors,f=r.realIndex,m=function(O){return Array.isArray(O)?O[f]:O},v=m(F.upward),w=m(F.downward),x=this.yRatio[r.translationsIndex],A=this.getOHLCValue(f,d),b=o,y=o,k=A.o<A.c?[v]:[w];this.isBoxPlot&&(k=[m(p.lower),m(p.upper)]);var C=Math.min(A.o,A.c),D=Math.max(A.o,A.c),T=A.m;g.globals.isXNumeric&&(u=(g.globals.seriesX[f][d]-g.globals.minX)/this.xRatio-a/2);var S=u+a*this.visibleI;this.series[c][d]===void 0||this.series[c][d]===null?(C=o,D=o):(C=o-C/x,D=o-D/x,b=o-A.h/x,y=o-A.l/x,T=o-A.m/x);var M=l.move(S,o),R=l.move(S+a/2,C);return g.globals.previousPaths.length>0&&(R=this.getPreviousPath(f,d,!0)),M=this.isBoxPlot?[l.move(S,C)+l.line(S+a/2,C)+l.line(S+a/2,b)+l.line(S+a/4,b)+l.line(S+a-a/4,b)+l.line(S+a/2,b)+l.line(S+a/2,C)+l.line(S+a,C)+l.line(S+a,T)+l.line(S,T)+l.line(S,C+h/2),l.move(S,T)+l.line(S+a,T)+l.line(S+a,D)+l.line(S+a/2,D)+l.line(S+a/2,y)+l.line(S+a-a/4,y)+l.line(S+a/4,y)+l.line(S+a/2,y)+l.line(S+a/2,D)+l.line(S,D)+l.line(S,T)+"z"]:[l.move(S,D)+l.line(S+a/2,D)+l.line(S+a/2,b)+l.line(S+a/2,D)+l.line(S+a,D)+l.line(S+a,C)+l.line(S+a/2,C)+l.line(S+a/2,y)+l.line(S+a/2,C)+l.line(S,C)+l.line(S,D-h/2)],R+=l.move(S,C),g.globals.isXNumeric||(u+=n),{pathTo:M,pathFrom:R,x:u,y:D,goalY:this.barHelpers.getGoalValues("y",null,o,c,d,r.translationsIndex),barXPosition:S,color:k}}},{key:"drawHorizontalBoxPaths",value:function(t){var r=t.indexes;t.x;var u=t.y,n=t.yDivision,a=t.barHeight,o=t.zeroW,h=t.strokeWidth,g=this.w,l=new De(this.ctx),c=r.i,d=r.j,F=this.boxOptions.colors.lower;this.isBoxPlot&&(F=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.invertedYRatio,f=r.realIndex,m=this.getOHLCValue(f,d),v=o,w=o,x=Math.min(m.o,m.c),A=Math.max(m.o,m.c),b=m.m;g.globals.isXNumeric&&(u=(g.globals.seriesX[f][d]-g.globals.minX)/this.invertedXRatio-a/2);var y=u+a*this.visibleI;this.series[c][d]===void 0||this.series[c][d]===null?(x=o,A=o):(x=o+x/p,A=o+A/p,v=o+m.h/p,w=o+m.l/p,b=o+m.m/p);var k=l.move(o,y),C=l.move(x,y+a/2);return g.globals.previousPaths.length>0&&(C=this.getPreviousPath(f,d,!0)),k=[l.move(x,y)+l.line(x,y+a/2)+l.line(v,y+a/2)+l.line(v,y+a/2-a/4)+l.line(v,y+a/2+a/4)+l.line(v,y+a/2)+l.line(x,y+a/2)+l.line(x,y+a)+l.line(b,y+a)+l.line(b,y)+l.line(x+h/2,y),l.move(b,y)+l.line(b,y+a)+l.line(A,y+a)+l.line(A,y+a/2)+l.line(w,y+a/2)+l.line(w,y+a-a/4)+l.line(w,y+a/4)+l.line(w,y+a/2)+l.line(A,y+a/2)+l.line(A,y)+l.line(b,y)+"z"],C+=l.move(x,y),g.globals.isXNumeric||(u+=n),{pathTo:k,pathFrom:C,x:A,y:u,goalX:this.barHelpers.getGoalValues("x",o,null,c,d),barYPosition:y,color:F}}},{key:"getOHLCValue",value:function(t,r){var u=this.w,n=new Gt(this.ctx,u),a=n.getLogValAtSeriesIndex(u.globals.seriesCandleH[t][r],t),o=n.getLogValAtSeriesIndex(u.globals.seriesCandleO[t][r],t),h=n.getLogValAtSeriesIndex(u.globals.seriesCandleM[t][r],t),g=n.getLogValAtSeriesIndex(u.globals.seriesCandleC[t][r],t),l=n.getLogValAtSeriesIndex(u.globals.seriesCandleL[t][r],t);return{o:this.isBoxPlot?a:o,h:this.isBoxPlot?o:a,m:h,l:this.isBoxPlot?g:l,c:this.isBoxPlot?l:g}}}]),i}(),Nv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"checkColorRange",value:function(){var e=this.w,i=!1,t=e.config.plotOptions[e.config.chart.type];return t.colorScale.ranges.length>0&&t.colorScale.ranges.map(function(r,u){r.from<=0&&(i=!0)}),i}},{key:"getShadeColor",value:function(e,i,t,r){var u=this.w,n=1,a=u.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,i,t);u.globals.hasNegs||r?n=u.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*a):(1-o.percent/100)*(1.25*a):o.percent<=0?1-(1+o.percent/100)*a:(1-o.percent/100)*a:(n=1-o.percent/100,e==="treemap"&&(n=(1-o.percent/100)*(1.25*a)));var h=o.color,g=new pe;if(u.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var l=g.shadeColor(-1*n,o.color);h=pe.hexToRgba(pe.isColorHex(l)?l:pe.rgb2hex(l),u.config.fill.opacity)}else{var c=g.shadeColor(n,o.color);h=pe.hexToRgba(pe.isColorHex(c)?c:pe.rgb2hex(c),u.config.fill.opacity)}return{color:h,colorProps:o}}},{key:"determineColor",value:function(e,i,t){var r=this.w,u=r.globals.series[i][t],n=r.config.plotOptions[e],a=n.colorScale.inverse?t:i;n.distributed&&r.config.chart.type==="treemap"&&(a=t);var o=r.globals.colors[a],h=null,g=Math.min.apply(Math,nr(r.globals.series[i])),l=Math.max.apply(Math,nr(r.globals.series[i]));n.distributed||e!=="heatmap"||(g=r.globals.minY,l=r.globals.maxY),n.colorScale.min!==void 0&&(g=n.colorScale.min<r.globals.minY?n.colorScale.min:r.globals.minY,l=n.colorScale.max>r.globals.maxY?n.colorScale.max:r.globals.maxY);var c=Math.abs(l)+Math.abs(g),d=100*u/(c===0?c-1e-6:c);return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(function(F,p){if(u>=F.from&&u<=F.to){o=F.color,h=F.foreColor?F.foreColor:null,g=F.from,l=F.to;var f=Math.abs(l)+Math.abs(g);d=100*u/(f===0?f-1e-6:f)}}),{color:o,foreColor:h,percent:d}}},{key:"calculateDataLabels",value:function(e){var i=e.text,t=e.x,r=e.y,u=e.i,n=e.j,a=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,g=new De(this.ctx),l=new lu(this.ctx),c=null;if(h.enabled){c=g.group({class:"apexcharts-data-labels"});var d=h.offsetX,F=h.offsetY,p=t+d,f=r+parseFloat(h.style.fontSize)/3+F;l.plotDataLabelsText({x:p,y:f,text:i,i:u,j:n,color:a.foreColor,parent:c,fontSize:o,dataLabelsConfig:h})}return c}},{key:"addListeners",value:function(e){var i=new De(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e))}}]),s}(),eD=function(){function s(e,i){Oe(this,s),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Nv(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return Ne(s,[{key:"draw",value:function(e){var i=this.w,t=new De(this.ctx),r=t.group({class:"apexcharts-heatmap"});r.attr("clip-path","url(#gridRectMask".concat(i.globals.cuid,")"));var u=i.globals.gridWidth/i.globals.dataPoints,n=i.globals.gridHeight/i.globals.series.length,a=0,o=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();i.config.yaxis[0].reversed&&(o=!0,h.reverse());for(var g=o?0:h.length-1;o?g<h.length:g>=0;o?g++:g--){var l=t.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:pe.escapeString(i.globals.seriesNames[g]),rel:g+1,"data:realIndex":g});if(this.ctx.series.addCollapsedClassToSeries(l,g),i.config.chart.dropShadow.enabled){var c=i.config.chart.dropShadow;new Fr(this.ctx).dropShadow(l,c,g)}for(var d=0,F=i.config.plotOptions.heatmap.shadeIntensity,p=0,f=0;f<i.globals.dataPoints;f++)if(i.globals.seriesX.length&&!i.globals.allSeriesHasEqualX&&i.globals.minX+i.globals.minXDiff*f<i.globals.seriesX[g][p])d+=u;else{if(p>=h[g].length)break;var m=this.helpers.getShadeColor(i.config.chart.type,g,p,this.negRange),v=m.color,w=m.colorProps;i.config.fill.type==="image"&&(v=new wi(this.ctx).fillPath({seriesNumber:g,dataPointIndex:p,opacity:i.globals.hasNegs?w.percent<0?1-(1+w.percent/100):F+w.percent/100:w.percent/100,patternID:pe.randomId(),width:i.config.fill.image.width?i.config.fill.image.width:u,height:i.config.fill.image.height?i.config.fill.image.height:n}));var x=this.rectRadius,A=t.drawRect(d,a,u,n,x);if(A.attr({cx:d,cy:a}),A.node.classList.add("apexcharts-heatmap-rect"),l.add(A),A.attr({fill:v,i:g,index:g,j:p,val:e[g][p],"stroke-width":this.strokeWidth,stroke:i.config.plotOptions.heatmap.useFillColorAsStroke?v:i.globals.stroke.colors[0],color:v}),this.helpers.addListeners(A),i.config.chart.animations.enabled&&!i.globals.dataChanged){var b=1;i.globals.resized||(b=i.config.chart.animations.speed),this.animateHeatMap(A,d,a,u,n,b)}if(i.globals.dataChanged){var y=1;if(this.dynamicAnim.enabled&&i.globals.shouldAnimate){y=this.dynamicAnim.speed;var k=i.globals.previousPaths[g]&&i.globals.previousPaths[g][p]&&i.globals.previousPaths[g][p].color;k||(k="rgba(255, 255, 255, 0)"),this.animateHeatColor(A,pe.isColorHex(k)?k:pe.rgb2hex(k),pe.isColorHex(v)?v:pe.rgb2hex(v),y)}}var C=(0,i.config.dataLabels.formatter)(i.globals.series[g][p],{value:i.globals.series[g][p],seriesIndex:g,dataPointIndex:p,w:i}),D=this.helpers.calculateDataLabels({text:C,x:d+u/2,y:a+n/2,i:g,j:p,colorProps:w,series:h});D!==null&&l.add(D),d+=u,p++}a+=n,r.add(l)}var T=i.globals.yAxisScale[0].result.slice();return i.config.yaxis[0].reversed?T.unshift(""):T.push(""),i.globals.yAxisScale[0].result=T,r}},{key:"animateHeatMap",value:function(e,i,t,r,u,n){var a=new Eu(this.ctx);a.animateRect(e,{x:i+r/2,y:t+u/2,width:0,height:0},{x:i,y:t,width:r,height:u},n,function(){a.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,i,t,r){e.attr({fill:i}).animate(r).attr({fill:t})}}]),s}(),Wv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"drawYAxisTexts",value:function(e,i,t,r){var u=this.w,n=u.config.yaxis[0],a=u.globals.yLabelFormatters[0];return new De(this.ctx).drawText({x:e+n.labels.offsetX,y:i+n.labels.offsetY,text:a(r,t),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[t]:n.labels.style.colors})}}]),s}(),zv=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w;var i=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=i.globals.stroke.colors!==void 0?i.globals.stroke.colors:i.globals.colors,this.defaultSize=Math.min(i.globals.gridWidth,i.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=i.globals.gridWidth/2,i.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(i.config.plotOptions.pie.endAngle-i.config.plotOptions.pie.startAngle),this.initialAngle=i.config.plotOptions.pie.startAngle%this.fullAngle,i.globals.radialSize=this.defaultSize/2.05-i.config.stroke.width-(i.config.chart.sparkline.enabled?0:i.config.chart.dropShadow.blur),this.donutSize=i.globals.radialSize*parseInt(i.config.plotOptions.pie.donut.size,10)/100;var t=i.config.plotOptions.pie.customScale,r=i.globals.gridWidth/2,u=i.globals.gridHeight/2;this.translateX=r-r*t,this.translateY=u-u*t,this.dataLabelsGroup=new De(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(t,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return Ne(s,[{key:"draw",value:function(e){var i=this,t=this.w,r=new De(this.ctx),u=r.group({class:"apexcharts-pie"});if(t.globals.noData)return u;for(var n=0,a=0;a<e.length;a++)n+=pe.negToZero(e[a]);var o=[],h=r.group();n===0&&(n=1e-5),e.forEach(function(w){i.maxY=Math.max(i.maxY,w)}),t.config.yaxis[0].max&&(this.maxY=t.config.yaxis[0].max),t.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(u);for(var g=0;g<e.length;g++){var l=this.fullAngle*pe.negToZero(e[g])/n;o.push(l),this.chartType==="polarArea"?(o[g]=this.fullAngle/e.length,this.sliceSizes.push(t.globals.radialSize*e[g]/this.maxY)):this.sliceSizes.push(t.globals.radialSize)}if(t.globals.dataChanged){for(var c,d=0,F=0;F<t.globals.previousPaths.length;F++)d+=pe.negToZero(t.globals.previousPaths[F]);for(var p=0;p<t.globals.previousPaths.length;p++)c=this.fullAngle*pe.negToZero(t.globals.previousPaths[p])/d,this.prevSectorAngleArr.push(c)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var f=r.drawCircle(this.donutSize);f.attr({cx:this.centerX,cy:this.centerY,fill:t.config.plotOptions.pie.donut.background?t.config.plotOptions.pie.donut.background:"transparent"}),h.add(f)}var m=this.drawArcs(o,e);if(this.sliceLabels.forEach(function(w){m.add(w)}),h.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(t.config.plotOptions.pie.customScale,")")}),h.add(m),u.add(h),this.donutDataLabels.show){var v=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});u.add(v)}return t.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(u),u}},{key:"drawArcs",value:function(e,i){var t=this.w,r=new Fr(this.ctx),u=new De(this.ctx),n=new wi(this.ctx),a=u.group({class:"apexcharts-slices"}),o=this.initialAngle,h=this.initialAngle,g=this.initialAngle,l=this.initialAngle;this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0;for(var c=0;c<e.length;c++){var d=u.group({class:"apexcharts-series apexcharts-pie-series",seriesName:pe.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});a.add(d),h=l,g=(o=g)+e[c],l=h+this.prevSectorAngleArr[c];var F=g<o?this.fullAngle+g-o:g-o,p=n.fillPath({seriesNumber:c,size:this.sliceSizes[c],value:i[c]}),f=this.getChangedPath(h,l),m=u.drawPath({d:f,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[c]:this.lineColorArr,strokeWidth:0,fill:p,fillOpacity:t.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c)});if(m.attr({index:0,j:c}),r.setSelectionFilter(m,0,c),t.config.chart.dropShadow.enabled){var v=t.config.chart.dropShadow;r.dropShadow(m,v,c)}this.addListeners(m,this.donutDataLabels),De.setAttrs(m.node,{"data:angle":F,"data:startAngle":o,"data:strokeWidth":this.strokeWidth,"data:value":i[c]});var w={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?w=pe.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize/1.25+t.config.plotOptions.pie.dataLabels.offset,(o+F/2)%this.fullAngle):this.chartType==="donut"&&(w=pe.polarToCartesian(this.centerX,this.centerY,(t.globals.radialSize+this.donutSize)/2+t.config.plotOptions.pie.dataLabels.offset,(o+F/2)%this.fullAngle)),d.add(m);var x=0;if(!this.initialAnim||t.globals.resized||t.globals.dataChanged?this.animBeginArr.push(0):((x=F/this.fullAngle*t.config.chart.animations.speed)===0&&(x=1),this.animDur=x+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&t.globals.dataChanged?this.animatePaths(m,{size:this.sliceSizes[c],endAngle:g,startAngle:o,prevStartAngle:h,prevEndAngle:l,animateStartingPos:!0,i:c,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:t.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(m,{size:this.sliceSizes[c],endAngle:g,startAngle:o,i:c,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:x}),t.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&m.node.addEventListener("mouseup",this.pieClicked.bind(this,c)),t.globals.selectedDataPoints[0]!==void 0&&t.globals.selectedDataPoints[0].indexOf(c)>-1&&this.pieClicked(c),t.config.dataLabels.enabled){var A=w.x,b=w.y,y=100*F/this.fullAngle+"%";if(F!==0&&t.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[c]){var k=t.config.dataLabels.formatter;k!==void 0&&(y=k(t.globals.seriesPercent[c][0],{seriesIndex:c,w:t}));var C=t.globals.dataLabels.style.colors[c],D=u.group({class:"apexcharts-datalabels"}),T=u.drawText({x:A,y:b,text:y,textAnchor:"middle",fontSize:t.config.dataLabels.style.fontSize,fontFamily:t.config.dataLabels.style.fontFamily,fontWeight:t.config.dataLabels.style.fontWeight,foreColor:C});if(D.add(T),t.config.dataLabels.dropShadow.enabled){var S=t.config.dataLabels.dropShadow;r.dropShadow(T,S)}T.node.classList.add("apexcharts-pie-label"),t.config.chart.animations.animate&&t.globals.resized===!1&&(T.node.classList.add("apexcharts-pie-label-delay"),T.node.style.animationDelay=t.config.chart.animations.speed/940+"s"),this.sliceLabels.push(D)}}}return a}},{key:"addListeners",value:function(e,i){var t=new De(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,i)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,i)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,i)))}},{key:"animatePaths",value:function(e,i){var t=this.w,r=i.endAngle<i.startAngle?this.fullAngle+i.endAngle-i.startAngle:i.endAngle-i.startAngle,u=r,n=i.startAngle,a=i.startAngle;i.prevStartAngle!==void 0&&i.prevEndAngle!==void 0&&(n=i.prevEndAngle,u=i.prevEndAngle<i.prevStartAngle?this.fullAngle+i.prevEndAngle-i.prevStartAngle:i.prevEndAngle-i.prevStartAngle),i.i===t.config.series.length-1&&(r+a>this.fullAngle?i.endAngle=i.endAngle-(r+a):r+a<this.fullAngle&&(i.endAngle=i.endAngle+(this.fullAngle-(r+a)))),r===this.fullAngle&&(r=this.fullAngle-.01),this.animateArc(e,n,a,r,u,i)}},{key:"animateArc",value:function(e,i,t,r,u,n){var a,o=this,h=this.w,g=new Eu(this.ctx),l=n.size;(isNaN(i)||isNaN(u))&&(i=t,u=r,n.dur=0);var c=r,d=t,F=i<t?this.fullAngle+i-t:i-t;h.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(a=o.getPiePath({me:o,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:l}),e.attr({d:a})),n.dur!==0?e.animate(n.dur,n.animBeginArr[n.i]).after(function(){o.chartType!=="pie"&&o.chartType!=="donut"&&o.chartType!=="polarArea"||this.animate(h.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":o.strokeWidth}),n.i===h.config.series.length-1&&g.animationCompleted(e)}).during(function(p){c=F+(r-F)*p,n.animateStartingPos&&(c=u+(r-u)*p,d=i-u+(t-(i-u))*p),a=o.getPiePath({me:o,startAngle:d,angle:c,size:l}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})}):(a=o.getPiePath({me:o,startAngle:d,angle:r,size:l}),n.isTrack||(h.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":o.strokeWidth}))}},{key:"pieClicked",value:function(e){var i,t=this.w,r=this,u=r.sliceSizes[e]+(t.config.plotOptions.pie.expandOnClick?4:0),n=t.globals.dom.Paper.findOne(".apexcharts-".concat(r.chartType.toLowerCase(),"-slice-").concat(e));if(n.attr("data:pieClicked")!=="true"){var a=t.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,function(l){l.setAttribute("data:pieClicked","false");var c=l.getAttribute("data:pathOrig");c&&l.setAttribute("d",c)}),t.globals.capturedDataPointIndex=e,n.attr("data:pieClicked","true");var o=parseInt(n.attr("data:startAngle"),10),h=parseInt(n.attr("data:angle"),10);i=r.getPiePath({me:r,startAngle:o,angle:h,size:u}),h!==360&&n.plot(i)}else{n.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(n.node,this.donutDataLabels);var g=n.attr("data:pathOrig");n.attr({d:g})}}},{key:"getChangedPath",value:function(e,i){var t="";return this.dynamicAnim&&this.w.globals.dataChanged&&(t=this.getPiePath({me:this,startAngle:e,angle:i-e,size:this.size})),t}},{key:"getPiePath",value:function(e){var i,t=e.me,r=e.startAngle,u=e.angle,n=e.size,a=new De(this.ctx),o=r,h=Math.PI*(o-90)/180,g=u+r;Math.ceil(g)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(g=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(g)>this.fullAngle&&(g-=this.fullAngle);var l=Math.PI*(g-90)/180,c=t.centerX+n*Math.cos(h),d=t.centerY+n*Math.sin(h),F=t.centerX+n*Math.cos(l),p=t.centerY+n*Math.sin(l),f=pe.polarToCartesian(t.centerX,t.centerY,t.donutSize,g),m=pe.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),v=u>180?1:0,w=["M",c,d,"A",n,n,0,v,1,F,p];return i=t.chartType==="donut"?[].concat(w,["L",f.x,f.y,"A",t.donutSize,t.donutSize,0,v,0,m.x,m.y,"L",c,d,"z"]).join(" "):t.chartType==="pie"||t.chartType==="polarArea"?[].concat(w,["L",t.centerX,t.centerY,"L",c,d]).join(" "):[].concat(w).join(" "),a.roundPathCorners(i,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var i=this.w,t=new $v(this.ctx),r=new De(this.ctx),u=new Wv(this.ctx),n=r.group(),a=r.group(),o=t.niceScale(0,Math.ceil(this.maxY),0),h=o.result.reverse(),g=o.result.length;this.maxY=o.niceMax;for(var l=i.globals.radialSize,c=l/(g-1),d=0;d<g-1;d++){var F=r.drawCircle(l);if(F.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":i.config.plotOptions.polarArea.rings.strokeWidth,stroke:i.config.plotOptions.polarArea.rings.strokeColor}),i.config.yaxis[0].show){var p=u.drawYAxisTexts(this.centerX,this.centerY-l+parseInt(i.config.yaxis[0].labels.style.fontSize,10)/2,d,h[d]);a.add(p)}n.add(F),l-=c}this.drawSpokes(e),e.add(n),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,i,t){var r=this.w,u=new De(this.ctx),n=i.total.show;e.node.innerHTML="",e.node.style.opacity=t.opacity;var a,o,h=t.centerX,g=this.donutDataLabels.total.label?t.centerY:t.centerY-t.centerY/6;a=i.name.color===void 0?r.globals.colors[0]:i.name.color;var l=i.name.fontSize,c=i.name.fontFamily,d=i.name.fontWeight;o=i.value.color===void 0?r.config.chart.foreColor:i.value.color;var F=i.value.formatter,p="",f="";if(n?(a=i.total.color,l=i.total.fontSize,c=i.total.fontFamily,d=i.total.fontWeight,f=this.donutDataLabels.total.label?i.total.label:"",p=i.total.formatter(r)):r.globals.series.length===1&&(p=F(r.globals.series[0],r),f=r.globals.seriesNames[0]),f&&(f=i.name.formatter(f,i.total.show,r)),i.name.show){var m=u.drawText({x:h,y:g+parseFloat(i.name.offsetY),text:f,textAnchor:"middle",foreColor:a,fontSize:l,fontWeight:d,fontFamily:c});m.node.classList.add("apexcharts-datalabel-label"),e.add(m)}if(i.value.show){var v=i.name.show?parseFloat(i.value.offsetY)+16:i.value.offsetY,w=u.drawText({x:h,y:g+v,text:p,textAnchor:"middle",foreColor:o,fontWeight:i.value.fontWeight,fontSize:i.value.fontSize,fontFamily:i.value.fontFamily});w.node.classList.add("apexcharts-datalabel-value"),e.add(w)}return e}},{key:"printInnerLabels",value:function(e,i,t,r){var u,n=this.w;r?u=e.name.color===void 0?n.globals.colors[parseInt(r.parentNode.getAttribute("rel"),10)-1]:e.name.color:n.globals.series.length>1&&e.total.show&&(u=e.total.color);var a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=n.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");t=(0,e.value.formatter)(t,n),r||typeof e.total.formatter!="function"||(t=e.total.formatter(n));var h=i===e.total.label;i=this.donutDataLabels.total.label?e.name.formatter(i,h,n):"",a!==null&&(a.textContent=i),o!==null&&(o.textContent=t),a!==null&&(a.style.fill=u)}},{key:"printDataLabelsInner",value:function(e,i){var t=this.w,r=e.getAttribute("data:value"),u=t.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];t.globals.series.length>1&&this.printInnerLabels(i,u,r,e);var n=t.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");n!==null&&(n.style.opacity=1)}},{key:"drawSpokes",value:function(e){var i=this,t=this.w,r=new De(this.ctx),u=t.config.plotOptions.polarArea.spokes;if(u.strokeWidth!==0){for(var n=[],a=360/t.globals.series.length,o=0;o<t.globals.series.length;o++)n.push(pe.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+a*o));n.forEach(function(h,g){var l=r.drawLine(h.x,h.y,i.centerX,i.centerY,Array.isArray(u.connectorColors)?u.connectorColors[g]:u.connectorColors);e.add(l)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var i=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),t=this.renderInnerDataLabels(i,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(t)}}}]),s}(),tD=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new De(this.ctx),this.lineColorArr=i.globals.stroke.colors!==void 0?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight<i.globals.svgWidth?i.globals.gridHeight:i.globals.gridWidth,this.isLog=i.config.yaxis[0].logarithmic,this.logBase=i.config.yaxis[0].logBase,this.coreUtils=new Gt(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,i.globals.maxY,0):i.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):i.globals.minY,this.polygons=i.config.plotOptions.radar.polygons,this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-i.config.chart.dropShadow.blur,i.config.xaxis.labels.show&&(this.size=this.size-i.globals.xAxisLabelsWidth/1.75),i.config.plotOptions.radar.size!==void 0&&(this.size=i.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return Ne(s,[{key:"draw",value:function(e){var i=this,t=this.w,r=new wi(this.ctx),u=[],n=new lu(this.ctx);e.length&&(this.dataPointsLen=e[t.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=t.globals.gridWidth/2,o=t.globals.gridHeight/2,h=a+t.config.plotOptions.radar.offsetX,g=o+t.config.plotOptions.radar.offsetY,l=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(h||0,", ").concat(g||0,")")}),c=[],d=null,F=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(f,m){var v=f.length===t.globals.dataPoints,w=i.graphics.group().attr({class:"apexcharts-series","data:longestSeries":v,seriesName:pe.escapeString(t.globals.seriesNames[m]),rel:m+1,"data:realIndex":m});i.dataRadiusOfPercent[m]=[],i.dataRadius[m]=[],i.angleArr[m]=[],f.forEach(function(M,R){var O=Math.abs(i.maxValue-i.minValue);M-=i.minValue,i.isLog&&(M=i.coreUtils.getLogVal(i.logBase,M,0)),i.dataRadiusOfPercent[m][R]=M/O,i.dataRadius[m][R]=i.dataRadiusOfPercent[m][R]*i.size,i.angleArr[m][R]=R*i.disAngle}),c=i.getDataPointsPos(i.dataRadius[m],i.angleArr[m]);var x=i.createPaths(c,{x:0,y:0});d=i.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),F=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":m}),t.globals.delayedElements.push({el:d.node,index:m});var A={i:m,realIndex:m,animationDelay:m,initialSpeed:t.config.chart.animations.speed,dataChangeSpeed:t.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:t.globals.stroke.colors[m],strokeLineCap:t.config.stroke.lineCap},b=null;t.globals.previousPaths.length>0&&(b=i.getPreviousPath(m));for(var y=0;y<x.linePathsTo.length;y++){var k=i.graphics.renderPaths(Pe(Pe({},A),{},{pathFrom:b===null?x.linePathsFrom[y]:b,pathTo:x.linePathsTo[y],strokeWidth:Array.isArray(i.strokeWidth)?i.strokeWidth[m]:i.strokeWidth,fill:"none",drawShadow:!1}));w.add(k);var C=r.fillPath({seriesNumber:m}),D=i.graphics.renderPaths(Pe(Pe({},A),{},{pathFrom:b===null?x.areaPathsFrom[y]:b,pathTo:x.areaPathsTo[y],strokeWidth:0,fill:C,drawShadow:!1}));if(t.config.chart.dropShadow.enabled){var T=new Fr(i.ctx),S=t.config.chart.dropShadow;T.dropShadow(D,Object.assign({},S,{noUserSpaceOnUse:!0}),m)}w.add(D)}f.forEach(function(M,R){var O=new ju(i.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:m,dataPointIndex:R}),H=i.graphics.drawMarker(c[R].x,c[R].y,O);H.attr("rel",R),H.attr("j",R),H.attr("index",m),H.node.setAttribute("default-marker-size",O.pSize);var Y=i.graphics.group({class:"apexcharts-series-markers"});Y&&Y.add(H),d.add(Y),w.add(d);var J=t.config.dataLabels;if(J.enabled){var Z=J.formatter(t.globals.series[m][R],{seriesIndex:m,dataPointIndex:R,w:t});n.plotDataLabelsText({x:c[R].x,y:c[R].y,text:Z,textAnchor:"middle",i:m,j:m,parent:F,offsetCorrection:!1,dataLabelsConfig:Pe({},J)})}w.add(F)}),u.push(w)}),this.drawPolygons({parent:l}),t.config.xaxis.labels.show){var p=this.drawXAxisTexts();l.add(p)}return u.forEach(function(f){l.add(f)}),l.add(this.yaxisLabels),l}},{key:"drawPolygons",value:function(e){for(var i=this,t=this.w,r=e.parent,u=new Wv(this.ctx),n=t.globals.yAxisScale[0].result.reverse(),a=n.length,o=[],h=this.size/(a-1),g=0;g<a;g++)o[g]=h*g;o.reverse();var l=[],c=[];o.forEach(function(d,F){var p=pe.getPolygonPos(d,i.dataPointsLen),f="";p.forEach(function(m,v){if(F===0){var w=i.graphics.drawLine(m.x,m.y,0,0,Array.isArray(i.polygons.connectorColors)?i.polygons.connectorColors[v]:i.polygons.connectorColors);c.push(w)}v===0&&i.yaxisLabelsTextsPos.push({x:m.x,y:m.y}),f+=m.x+","+m.y+" "}),l.push(f)}),l.forEach(function(d,F){var p=i.polygons.strokeColors,f=i.polygons.strokeWidth,m=i.graphics.drawPolygon(d,Array.isArray(p)?p[F]:p,Array.isArray(f)?f[F]:f,t.globals.radarPolygons.fill.colors[F]);r.add(m)}),c.forEach(function(d){r.add(d)}),t.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(d,F){var p=u.drawYAxisTexts(d.x,d.y,F,n[F]);i.yaxisLabels.add(p)})}},{key:"drawXAxisTexts",value:function(){var e=this,i=this.w,t=i.config.xaxis.labels,r=this.graphics.group({class:"apexcharts-xaxis"}),u=pe.getPolygonPos(this.size,this.dataPointsLen);return i.globals.labels.forEach(function(n,a){var o=i.config.xaxis.labels.formatter,h=new lu(e.ctx);if(u[a]){var g=e.getTextPos(u[a],e.size),l=o(n,{seriesIndex:-1,dataPointIndex:a,w:i});h.plotDataLabelsText({x:g.newX,y:g.newY,text:l,textAnchor:g.textAnchor,i:a,j:a,parent:r,className:"apexcharts-xaxis-label",color:Array.isArray(t.style.colors)&&t.style.colors[a]?t.style.colors[a]:"#a8a8a8",dataLabelsConfig:Pe({textAnchor:g.textAnchor,dropShadow:{enabled:!1}},t),offsetCorrection:!1}).on("click",function(c){if(typeof i.config.chart.events.xAxisLabelClick=="function"){var d=Object.assign({},i,{labelIndex:a});i.config.chart.events.xAxisLabelClick(c,e.ctx,d)}})}}),r}},{key:"createPaths",value:function(e,i){var t=this,r=[],u=[],n=[],a=[];if(e.length){u=[this.graphics.move(i.x,i.y)],a=[this.graphics.move(i.x,i.y)];var o=this.graphics.move(e[0].x,e[0].y),h=this.graphics.move(e[0].x,e[0].y);e.forEach(function(g,l){o+=t.graphics.line(g.x,g.y),h+=t.graphics.line(g.x,g.y),l===e.length-1&&(o+="Z",h+="Z")}),r.push(o),n.push(h)}return{linePathsFrom:u,linePathsTo:r,areaPathsFrom:a,areaPathsTo:n}}},{key:"getTextPos",value:function(e,i){var t="middle",r=e.x,u=e.y;return Math.abs(e.x)>=10?e.x>0?(t="start",r+=10):e.x<0&&(t="end",r-=10):t="middle",Math.abs(e.y)>=i-10&&(e.y<0?u-=10:e.y>0&&(u+=10)),{textAnchor:t,newX:r,newY:u}}},{key:"getPreviousPath",value:function(e){for(var i=this.w,t=null,r=0;r<i.globals.previousPaths.length;r++){var u=i.globals.previousPaths[r];u.paths.length>0&&parseInt(u.realIndex,10)===parseInt(e,10)&&i.globals.previousPaths[r].paths[0]!==void 0&&(t=i.globals.previousPaths[r].paths[0].d)}return t}},{key:"getDataPointsPos",value:function(e,i){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],i=i||[];for(var r=[],u=0;u<t;u++){var n={};n.x=e[u]*Math.sin(i[u]),n.y=-e[u]*Math.cos(i[u]),r.push(n)}return r}}]),s}(),rD=function(s){Wn(i,zv);var e=Nn(i);function i(t){var r;Oe(this,i),(r=e.call(this,t)).ctx=t,r.w=t.w,r.animBeginArr=[0],r.animDur=0;var u=r.w;return r.startAngle=u.config.plotOptions.radialBar.startAngle,r.endAngle=u.config.plotOptions.radialBar.endAngle,r.totalAngle=Math.abs(u.config.plotOptions.radialBar.endAngle-u.config.plotOptions.radialBar.startAngle),r.trackStartAngle=u.config.plotOptions.radialBar.track.startAngle,r.trackEndAngle=u.config.plotOptions.radialBar.track.endAngle,r.barLabels=r.w.config.plotOptions.radialBar.barLabels,r.donutDataLabels=r.w.config.plotOptions.radialBar.dataLabels,r.radialDataLabels=r.donutDataLabels,r.trackStartAngle||(r.trackStartAngle=r.startAngle),r.trackEndAngle||(r.trackEndAngle=r.endAngle),r.endAngle===360&&(r.endAngle=359.99),r.margin=parseInt(u.config.plotOptions.radialBar.track.margin,10),r.onBarLabelClick=r.onBarLabelClick.bind(tv(r)),r}return Ne(i,[{key:"draw",value:function(t){var r=this.w,u=new De(this.ctx),n=u.group({class:"apexcharts-radialbar"});if(r.globals.noData)return n;var a=u.group(),o=this.defaultSize/2,h=r.globals.gridWidth/2,g=this.defaultSize/2.05;r.config.chart.sparkline.enabled||(g=g-r.config.stroke.width-r.config.chart.dropShadow.blur);var l=r.globals.fill.colors;if(r.config.plotOptions.radialBar.track.show){var c=this.drawTracks({size:g,centerX:h,centerY:o,colorArr:l,series:t});a.add(c)}var d=this.drawArcs({size:g,centerX:h,centerY:o,colorArr:l,series:t}),F=360;r.config.plotOptions.radialBar.startAngle<0&&(F=this.totalAngle);var p=(360-F)/360;if(r.globals.radialSize=g-g*p,this.radialDataLabels.value.show){var f=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);r.globals.radialSize+=f*p}return a.add(d.g),r.config.plotOptions.radialBar.hollow.position==="front"&&(d.g.add(d.elHollow),d.dataLabels&&d.g.add(d.dataLabels)),n.add(a),n}},{key:"drawTracks",value:function(t){var r=this.w,u=new De(this.ctx),n=u.group({class:"apexcharts-tracks"}),a=new Fr(this.ctx),o=new wi(this.ctx),h=this.getStrokeWidth(t);t.size=t.size-h/2;for(var g=0;g<t.series.length;g++){var l=u.group({class:"apexcharts-radialbar-track apexcharts-track"});n.add(l),l.attr({rel:g+1}),t.size=t.size-h-this.margin;var c=r.config.plotOptions.radialBar.track,d=o.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[g]:c.background,solid:!0}),F=this.trackStartAngle,p=this.trackEndAngle;Math.abs(p)+Math.abs(F)>=360&&(p=360-Math.abs(this.startAngle)-.1);var f=u.drawPath({d:"",stroke:d,strokeWidth:h*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var m=c.dropShadow;a.dropShadow(f,m)}l.add(f),f.attr("id","apexcharts-radialbarTrack-"+g),this.animatePaths(f,{centerX:t.centerX,centerY:t.centerY,endAngle:p,startAngle:F,size:t.size,i:g,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return n}},{key:"drawArcs",value:function(t){var r=this.w,u=new De(this.ctx),n=new wi(this.ctx),a=new Fr(this.ctx),o=u.group(),h=this.getStrokeWidth(t);t.size=t.size-h/2;var g=r.config.plotOptions.radialBar.hollow.background,l=t.size-h*t.series.length-this.margin*t.series.length-h*parseInt(r.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-r.config.plotOptions.radialBar.hollow.margin;r.config.plotOptions.radialBar.hollow.image!==void 0&&(g=this.drawHollowImage(t,o,l,g));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:g||"transparent"});if(r.config.plotOptions.radialBar.hollow.dropShadow.enabled){var F=r.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(d,F)}var p=1;!this.radialDataLabels.total.show&&r.globals.series.length>1&&(p=0);var f=null;if(this.radialDataLabels.show){var m=r.globals.dom.Paper.findOne(".apexcharts-datalabels-group");f=this.renderInnerDataLabels(m,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:p})}r.config.plotOptions.radialBar.hollow.position==="back"&&(o.add(d),f&&o.add(f));var v=!1;r.config.plotOptions.radialBar.inverseOrder&&(v=!0);for(var w=v?t.series.length-1:0;v?w>=0:w<t.series.length;v?w--:w++){var x=u.group({class:"apexcharts-series apexcharts-radial-series",seriesName:pe.escapeString(r.globals.seriesNames[w])});o.add(x),x.attr({rel:w+1,"data:realIndex":w}),this.ctx.series.addCollapsedClassToSeries(x,w),t.size=t.size-h-this.margin;var A=n.fillPath({seriesNumber:w,size:t.size,value:t.series[w]}),b=this.startAngle,y=void 0,k=pe.negToZero(t.series[w]>100?100:t.series[w])/100,C=Math.round(this.totalAngle*k)+this.startAngle,D=void 0;r.globals.dataChanged&&(y=this.startAngle,D=Math.round(this.totalAngle*pe.negToZero(r.globals.previousPaths[w])/100)+y),Math.abs(C)+Math.abs(b)>360&&(C-=.01),Math.abs(D)+Math.abs(y)>360&&(D-=.01);var T=C-b,S=Array.isArray(r.config.stroke.dashArray)?r.config.stroke.dashArray[w]:r.config.stroke.dashArray,M=u.drawPath({d:"",stroke:A,strokeWidth:h,fill:"none",fillOpacity:r.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+w,strokeDashArray:S});if(De.setAttrs(M.node,{"data:angle":T,"data:value":t.series[w]}),r.config.chart.dropShadow.enabled){var R=r.config.chart.dropShadow;a.dropShadow(M,R,w)}if(a.setSelectionFilter(M,0,w),this.addListeners(M,this.radialDataLabels),x.add(M),M.attr({index:0,j:w}),this.barLabels.enabled){var O=pe.polarToCartesian(t.centerX,t.centerY,t.size,b),H=this.barLabels.formatter(r.globals.seriesNames[w],{seriesIndex:w,w:r}),Y=["apexcharts-radialbar-label"];this.barLabels.onClick||Y.push("apexcharts-no-click");var J=this.barLabels.useSeriesColors?r.globals.colors[w]:r.config.chart.foreColor;J||(J=r.config.chart.foreColor);var Z=O.x+this.barLabels.offsetX,te=O.y+this.barLabels.offsetY,ie=u.drawText({x:Z,y:te,text:H,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:J,cssClass:Y.join(" ")});ie.on("click",this.onBarLabelClick),ie.attr({rel:w+1}),b!==0&&ie.attr({"transform-origin":"".concat(Z," ").concat(te),transform:"rotate(".concat(b," 0 0)")}),x.add(ie)}var se=0;!this.initialAnim||r.globals.resized||r.globals.dataChanged||(se=r.config.chart.animations.speed),r.globals.dataChanged&&(se=r.config.chart.animations.dynamicAnimation.speed),this.animDur=se/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:C,startAngle:b,prevEndAngle:D,prevStartAngle:y,size:t.size,i:w,totalItems:2,animBeginArr:this.animBeginArr,dur:se,shouldSetPrevPaths:!0})}return{g:o,elHollow:d,dataLabels:f}}},{key:"drawHollow",value:function(t){var r=new De(this.ctx).drawCircle(2*t.size);return r.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),r}},{key:"drawHollowImage",value:function(t,r,u,n){var a=this.w,o=new wi(this.ctx),h=pe.randomId(),g=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:u,height:u,image:g,patternID:"pattern".concat(a.globals.cuid).concat(h)}),n="url(#pattern".concat(a.globals.cuid).concat(h,")");else{var l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(l===void 0&&c===void 0){var d=a.globals.dom.Paper.image(g,function(p){this.move(t.centerX-p.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-p.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});r.add(d)}else{var F=a.globals.dom.Paper.image(g,function(p){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)});r.add(F)}}return n}},{key:"getStrokeWidth",value:function(t){var r=this.w;return t.size*(100-parseInt(r.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var r=parseInt(t.target.getAttribute("rel"),10)-1,u=this.barLabels.onClick,n=this.w;u&&u(n.globals.seriesNames[r],{w:n,seriesIndex:r})}}]),i}(),iD=function(s){Wn(i,cu);var e=Nn(i);function i(){return Oe(this,i),e.apply(this,arguments)}return Ne(i,[{key:"draw",value:function(t,r){var u=this.w,n=new De(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.globals.seriesRangeStart,this.seriesRangeEnd=u.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var a=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o<t.length;o++){var h,g,l,c,d=void 0,F=void 0,p=u.globals.comboCharts?r[o]:o,f=this.barHelpers.getGroupIndex(p).columnGroupIndex,m=n.group({class:"apexcharts-series",seriesName:pe.escapeString(u.globals.seriesNames[p]),rel:o+1,"data:realIndex":p});this.ctx.series.addCollapsedClassToSeries(m,p),t[o].length>0&&(this.visibleI=this.visibleI+1);var v=0,w=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[p][0],x=p);var A=this.barHelpers.initialPositions(p);F=A.y,c=A.zeroW,d=A.x,w=A.barWidth,v=A.barHeight,h=A.xDivision,g=A.yDivision,l=A.zeroH;for(var b=n.group({class:"apexcharts-datalabels","data:realIndex":p}),y=n.group({class:"apexcharts-rangebar-goals-markers"}),k=0;k<u.globals.dataPoints;k++){var C=this.barHelpers.getStrokeWidth(o,k,p),D=this.seriesRangeStart[o][k],T=this.seriesRangeEnd[o][k],S=null,M=null,R=null,O={x:d,y:F,strokeWidth:C,elSeries:m},H=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(H=1),u.config.series[o].data[k]===void 0)break;if(this.isHorizontal){R=F+v*this.visibleI;var Y=(g-v*H)/2;if(u.config.series[o].data[k].x){var J=this.detectOverlappingBars({i:o,j:k,barYPosition:R,srty:Y,barHeight:v,yDivision:g,initPositions:A});v=J.barHeight,R=J.barYPosition}w=(S=this.drawRangeBarPaths(Pe({indexes:{i:o,j:k,realIndex:p},barHeight:v,barYPosition:R,zeroW:c,yDivision:g,y1:D,y2:T},O))).barWidth}else{u.globals.isXNumeric&&(d=(u.globals.seriesX[o][k]-u.globals.minX)/this.xRatio-w/2),M=d+w*this.visibleI;var Z=(h-w*H)/2;if(u.config.series[o].data[k].x){var te=this.detectOverlappingBars({i:o,j:k,barXPosition:M,srtx:Z,barWidth:w,xDivision:h,initPositions:A});w=te.barWidth,M=te.barXPosition}v=(S=this.drawRangeColumnPaths(Pe({indexes:{i:o,j:k,realIndex:p,translationsIndex:x},barWidth:w,barXPosition:M,zeroH:l,xDivision:h},O))).barHeight}var ie=this.barHelpers.drawGoalLine({barXPosition:S.barXPosition,barYPosition:R,goalX:S.goalX,goalY:S.goalY,barHeight:v,barWidth:w});ie&&y.add(ie),F=S.y,d=S.x;var se=this.barHelpers.getPathFillColor(t,o,k,p);this.renderSeries({realIndex:p,pathFill:se.color,lineFill:se.useRangeColor?se.color:u.globals.stroke.colors[p],j:k,i:o,x:d,y:F,y1:D,y2:T,pathFrom:S.pathFrom,pathTo:S.pathTo,strokeWidth:C,elSeries:m,series:t,barHeight:v,barWidth:w,barXPosition:M,barYPosition:R,columnGroupIndex:f,elDataLabelsWrap:b,elGoalsMarkers:y,visibleSeries:this.visibleI,type:"rangebar"})}a.add(m)}return a}},{key:"detectOverlappingBars",value:function(t){var r=t.i,u=t.j,n=t.barYPosition,a=t.barXPosition,o=t.srty,h=t.srtx,g=t.barHeight,l=t.barWidth,c=t.yDivision,d=t.xDivision,F=t.initPositions,p=this.w,f=[],m=p.config.series[r].data[u].rangeName,v=p.config.series[r].data[u].x,w=Array.isArray(v)?v.join(" "):v,x=p.globals.labels.map(function(b){return Array.isArray(b)?b.join(" "):b}).indexOf(w),A=p.globals.seriesRange[r].findIndex(function(b){return b.x===w&&b.overlaps.length>0});return this.isHorizontal?(n=p.config.plotOptions.bar.rangeBarGroupRows?o+c*x:o+g*this.visibleI+c*x,A>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(f=p.globals.seriesRange[r][A].overlaps).indexOf(m)>-1&&(n=(g=F.barHeight/f.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+g*(this.visibleI+f.indexOf(m))+c*x)):(x>-1&&!p.globals.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?h+d*x:h+l*this.visibleI+d*x),A>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(f=p.globals.seriesRange[r][A].overlaps).indexOf(m)>-1&&(a=(l=F.barWidth/f.length)*this.visibleI+d*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+f.indexOf(m))+d*x)),{barYPosition:n,barXPosition:a,barHeight:g,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var r=t.indexes,u=t.x,n=t.xDivision,a=t.barWidth,o=t.barXPosition,h=t.zeroH,g=this.w,l=r.i,c=r.j,d=r.realIndex,F=r.translationsIndex,p=this.yRatio[F],f=this.getRangeValue(d,c),m=Math.min(f.start,f.end),v=Math.max(f.start,f.end);this.series[l][c]===void 0||this.series[l][c]===null?m=h:(m=h-m/p,v=h-v/p);var w=Math.abs(v-m),x=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:a,y1:m,y2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:c,w:g});if(g.globals.isXNumeric){var A=this.getBarXForNumericXAxis({x:u,j:c,realIndex:d,barWidth:a});u=A.x,o=A.barXPosition}else u+=n;return{pathTo:x.pathTo,pathFrom:x.pathFrom,barHeight:w,x:u,y:f.start<0&&f.end<0?m:v,goalY:this.barHelpers.getGoalValues("y",null,h,l,c,F),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var r=this.w;return t<0&&(t=0),t>r.globals.gridWidth&&(t=r.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var r=t.indexes,u=t.y,n=t.y1,a=t.y2,o=t.yDivision,h=t.barHeight,g=t.barYPosition,l=t.zeroW,c=this.w,d=r.realIndex,F=r.j,p=this.preventBarOverflow(l+n/this.invertedYRatio),f=this.preventBarOverflow(l+a/this.invertedYRatio),m=this.getRangeValue(d,F),v=Math.abs(f-p),w=this.barHelpers.getBarpaths({barYPosition:g,barHeight:h,x1:p,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:d,realIndex:d,j:F,w:c});return c.globals.isXNumeric||(u+=o),{pathTo:w.pathTo,pathFrom:w.pathFrom,barWidth:v,x:m.start<0&&m.end<0?p:f,goalX:this.barHelpers.getGoalValues("x",l,null,d,F),y:u}}},{key:"getRangeValue",value:function(t,r){var u=this.w;return{start:u.globals.seriesRangeStart[t][r],end:u.globals.seriesRangeEnd[t][r]}}}]),i}(),sD=function(){function s(e){Oe(this,s),this.w=e.w,this.lineCtx=e}return Ne(s,[{key:"sameValueSeriesFix",value:function(e,i){var t=this.w;if((t.config.fill.type==="gradient"||t.config.fill.type[e]==="gradient")&&new Gt(this.lineCtx.ctx,t).seriesHaveSameValues(e)){var r=i[e].slice();r[r.length-1]=r[r.length-1]+1e-6,i[e]=r}return i}},{key:"calculatePoints",value:function(e){var i=e.series,t=e.realIndex,r=e.x,u=e.y,n=e.i,a=e.j,o=e.prevY,h=this.w,g=[],l=[],c=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;return h.globals.isXNumeric&&(c=(h.globals.seriesX[t][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),a===0&&(g.push(c),l.push(pe.isNumber(i[n][0])?o+h.config.markers.offsetY:null)),g.push(r+h.config.markers.offsetX),l.push(pe.isNumber(i[n][a+1])?u+h.config.markers.offsetY:null),{x:g,y:l}}},{key:"checkPreviousPaths",value:function(e){for(var i=e.pathFromLine,t=e.pathFromArea,r=e.realIndex,u=this.w,n=0;n<u.globals.previousPaths.length;n++){var a=u.globals.previousPaths[n];(a.type==="line"||a.type==="area")&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(r,10)&&(a.type==="line"?(this.lineCtx.appendPathFrom=!1,i=u.globals.previousPaths[n].paths[0].d):a.type==="area"&&(this.lineCtx.appendPathFrom=!1,t=u.globals.previousPaths[n].paths[0].d,u.config.stroke.show&&u.globals.previousPaths[n].paths[1]&&(i=u.globals.previousPaths[n].paths[1].d)))}return{pathFromLine:i,pathFromArea:t}}},{key:"determineFirstPrevY",value:function(e){var i,t,r,u=e.i,n=e.realIndex,a=e.series,o=e.prevY,h=e.lineYPosition,g=e.translationsIndex,l=this.w,c=l.config.chart.stacked&&!l.globals.comboCharts||l.config.chart.stacked&&l.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((i=this.w.config.series[n])===null||i===void 0?void 0:i.type)==="bar"||((t=this.w.config.series[n])===null||t===void 0?void 0:t.type)==="column");if(((r=a[u])===null||r===void 0?void 0:r[0])!==void 0)o=(h=c&&u>0?this.lineCtx.prevSeriesY[u-1][0]:this.lineCtx.zeroY)-a[u][0]/this.lineCtx.yRatio[g]+2*(this.lineCtx.isReversed?a[u][0]/this.lineCtx.yRatio[g]:0);else if(c&&u>0&&a[u][0]===void 0){for(var d=u-1;d>=0;d--)if(a[d][0]!==null&&a[d][0]!==void 0){o=h=this.lineCtx.prevSeriesY[d][0];break}}return{prevY:o,lineYPosition:h}}}]),s}(),uD=function(s){for(var e,i,t,r,u=function(g){for(var l=[],c=g[0],d=g[1],F=l[0]=sc(c,d),p=1,f=g.length-1;p<f;p++)c=d,d=g[p+1],l[p]=.5*(F+(F=sc(c,d)));return l[p]=F,l}(s),n=s.length-1,a=[],o=0;o<n;o++)t=sc(s[o],s[o+1]),Math.abs(t)<1e-6?u[o]=u[o+1]=0:(r=(e=u[o]/t)*e+(i=u[o+1]/t)*i)>9&&(r=3*t/Math.sqrt(r),u[o]=r*e,u[o+1]=r*i);for(var h=0;h<=n;h++)r=(s[Math.min(n,h+1)][0]-s[Math.max(0,h-1)][0])/(6*(1+u[h]*u[h])),a.push([r||0,u[h]*r||0]);return a},nD=function(s){var e=uD(s),i=s[1],t=s[0],r=[],u=e[1],n=e[0];r.push(t,[t[0]+n[0],t[1]+n[1],i[0]-u[0],i[1]-u[1],i[0],i[1]]);for(var a=2,o=e.length;a<o;a++){var h=s[a],g=e[a];r.push([h[0]-g[0],h[1]-g[1],h[0],h[1]])}return r},oD=function(s,e,i){var t=s.slice(e,i);if(e){if(i-e>1&&t[1].length<6){var r=t[0].length;t[1]=[2*t[0][r-2]-t[0][r-4],2*t[0][r-1]-t[0][r-3]].concat(t[1])}t[0]=t[0].slice(-2)}return t};function sc(s,e){return(e[1]-s[1])/(e[0]-s[0])}var uc=function(){function s(e,i,t){Oe(this,s),this.ctx=e,this.w=e.w,this.xyRatios=i,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||t,this.scatter=new Tv(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new sD(this),this.markers=new ju(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return Ne(s,[{key:"draw",value:function(e,i,t,r){var u,n=this.w,a=new De(this.ctx),o=n.globals.comboCharts?i:n.config.chart.type,h=a.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),g=new Gt(this.ctx,n);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=g.getLogSeries(e),this.yRatio=g.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var l=[],c=0;c<e.length;c++){e=this.lineHelpers.sameValueSeriesFix(c,e);var d=n.globals.comboCharts?t[c]:c,F=this.yRatio.length>1?d:0;this._initSerieVariables(e,c,d);var p=[],f=[],m=[],v=n.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,d),n.globals.isXNumeric&&n.globals.seriesX.length>0&&(v=(n.globals.seriesX[d][0]-n.globals.minX)/this.xRatio),m.push(v);var w,x=v,A=void 0,b=x,y=this.zeroY,k=this.zeroY;y=this.lineHelpers.determineFirstPrevY({i:c,realIndex:d,series:e,prevY:y,lineYPosition:0,translationsIndex:F}).prevY,n.config.stroke.curve==="monotoneCubic"&&e[c][0]===null?p.push(null):p.push(y),w=y,o==="rangeArea"&&(A=k=this.lineHelpers.determineFirstPrevY({i:c,realIndex:d,series:r,prevY:k,lineYPosition:0,translationsIndex:F}).prevY,f.push(p[0]!==null?k:null));var C=this._calculatePathsFrom({type:o,series:e,i:c,realIndex:d,translationsIndex:F,prevX:b,prevY:y,prevY2:k}),D=[p[0]],T=[f[0]],S={type:o,series:e,realIndex:d,translationsIndex:F,i:c,x:v,y:1,pX:x,pY:w,pathsFrom:C,linePaths:[],areaPaths:[],seriesIndex:t,lineYPosition:0,xArrj:m,yArrj:p,y2Arrj:f,seriesRangeEnd:r},M=this._iterateOverDataPoints(Pe(Pe({},S),{},{iterations:o==="rangeArea"?e[c].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){for(var R=this._calculatePathsFrom({series:r,i:c,realIndex:d,prevX:b,prevY:k}),O=this._iterateOverDataPoints(Pe(Pe({},S),{},{series:r,xArrj:[v],yArrj:D,y2Arrj:T,pY:A,areaPaths:M.areaPaths,pathsFrom:R,iterations:r[c].length-1,isRangeStart:!1})),H=M.linePaths.length/2,Y=0;Y<H;Y++)M.linePaths[Y]=O.linePaths[Y+H]+M.linePaths[Y];M.linePaths.splice(H),M.pathFromLine=O.pathFromLine+M.pathFromLine}else M.pathFromArea+="z";this._handlePaths({type:o,realIndex:d,i:c,paths:M}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),l.push(this.elSeries)}if(((u=n.config.series[0])===null||u===void 0?void 0:u.zIndex)!==void 0&&l.sort(function(te,ie){return Number(te.node.getAttribute("zIndex"))-Number(ie.node.getAttribute("zIndex"))}),n.config.chart.stacked)for(var J=l.length-1;J>=0;J--)h.add(l[J]);else for(var Z=0;Z<l.length;Z++)h.add(l[Z]);return h}},{key:"_initSerieVariables",value:function(e,i,t){var r=this.w,u=new De(this.ctx);this.xDivision=r.globals.gridWidth/(r.globals.dataPoints-(r.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width;var n=0;if(this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[t],n=t),this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.zeroY=r.globals.gridHeight-this.baseLineY[n]-(this.isReversed?r.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[n]:0),this.areaBottomY=this.zeroY,(this.zeroY>r.globals.gridHeight||r.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=r.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=u.group({class:"apexcharts-series",zIndex:r.config.series[t].zIndex!==void 0?r.config.series[t].zIndex:t,seriesName:pe.escapeString(r.globals.seriesNames[t])}),this.elPointsMain=u.group({class:"apexcharts-series-markers-wrap","data:realIndex":t}),r.globals.hasNullValues){var a=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[r.globals.gridHeight+r.globals.markers.largestSize]},seriesIndex:i,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});a!==null&&this.elPointsMain.add(a)}this.elDataLabelsWrap=u.group({class:"apexcharts-datalabels","data:realIndex":t});var o=e[i].length===r.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:i+1,"data:realIndex":t}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var i,t,r,u,n=e.type,a=e.series,o=e.i,h=e.realIndex,g=e.translationsIndex,l=e.prevX,c=e.prevY,d=e.prevY2,F=this.w,p=new De(this.ctx);if(a[o][0]===null){for(var f=0;f<a[o].length;f++)if(a[o][f]!==null){l=this.xDivision*f,c=this.zeroY-a[o][f]/this.yRatio[g],i=p.move(l,c),t=p.move(l,this.areaBottomY);break}}else i=p.move(l,c),n==="rangeArea"&&(i=p.move(l,d)+p.line(l,c)),t=p.move(l,this.areaBottomY)+p.line(l,c);if(r=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),u=p.move(0,this.areaBottomY)+p.line(0,this.areaBottomY),F.globals.previousPaths.length>0){var m=this.lineHelpers.checkPreviousPaths({pathFromLine:r,pathFromArea:u,realIndex:h});r=m.pathFromLine,u=m.pathFromArea}return{prevX:l,prevY:c,linePath:i,areaPath:t,pathFromLine:r,pathFromArea:u}}},{key:"_handlePaths",value:function(e){var i=e.type,t=e.realIndex,r=e.i,u=e.paths,n=this.w,a=new De(this.ctx),o=new wi(this.ctx);this.prevSeriesY.push(u.yArrj),n.globals.seriesXvalues[t]=u.xArrj,n.globals.seriesYvalues[t]=u.yArrj;var h=n.config.forecastDataPoints;if(h.count>0&&i!=="rangeArea"){var g=n.globals.seriesXvalues[t][n.globals.seriesXvalues[t].length-h.count-1],l=a.drawRect(g,0,n.globals.gridWidth,n.globals.gridHeight,0);n.globals.dom.elForecastMask.appendChild(l.node);var c=a.drawRect(0,0,g,n.globals.gridHeight,0);n.globals.dom.elNonForecastMask.appendChild(c.node)}this.pointsChart||n.globals.delayedElements.push({el:this.elPointsMain.node,index:t});var d={i:r,realIndex:t,animationDelay:r,initialSpeed:n.config.chart.animations.speed,dataChangeSpeed:n.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(i)};if(i==="area")for(var F=o.fillPath({seriesNumber:t}),p=0;p<u.areaPaths.length;p++){var f=a.renderPaths(Pe(Pe({},d),{},{pathFrom:u.pathFromArea,pathTo:u.areaPaths[p],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:F}));this.elSeries.add(f)}if(n.config.stroke.show&&!this.pointsChart){var m=null;if(i==="line")m=o.fillPath({seriesNumber:t,i:r});else if(n.config.stroke.fill.type==="solid")m=n.globals.stroke.colors[t];else{var v=n.config.fill;n.config.fill=n.config.stroke.fill,m=o.fillPath({seriesNumber:t,i:r}),n.config.fill=v}for(var w=0;w<u.linePaths.length;w++){var x=m;i==="rangeArea"&&(x=o.fillPath({seriesNumber:t}));var A=Pe(Pe({},d),{},{pathFrom:u.pathFromLine,pathTo:u.linePaths[w],stroke:m,strokeWidth:this.strokeWidth,strokeLineCap:n.config.stroke.lineCap,fill:i==="rangeArea"?x:"none"}),b=a.renderPaths(A);if(this.elSeries.add(b),b.attr("fill-rule","evenodd"),h.count>0&&i!=="rangeArea"){var y=a.renderPaths(A);y.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&y.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(y),y.attr("clip-path","url(#forecastMask".concat(n.globals.cuid,")")),b.attr("clip-path","url(#nonForecastMask".concat(n.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var i,t,r=this,u=e.type,n=e.series,a=e.iterations,o=e.realIndex,h=e.translationsIndex,g=e.i,l=e.x,c=e.y,d=e.pX,F=e.pY,p=e.pathsFrom,f=e.linePaths,m=e.areaPaths,v=e.seriesIndex,w=e.lineYPosition,x=e.xArrj,A=e.yArrj,b=e.y2Arrj,y=e.isRangeStart,k=e.seriesRangeEnd,C=this.w,D=new De(this.ctx),T=this.yRatio,S=p.prevY,M=p.linePath,R=p.areaPath,O=p.pathFromLine,H=p.pathFromArea,Y=pe.isNumber(C.globals.minYArr[o])?C.globals.minYArr[o]:C.globals.minY;a||(a=C.globals.dataPoints>1?C.globals.dataPoints-1:C.globals.dataPoints);var J=function(ae,ee){return ee-ae/T[h]+2*(r.isReversed?ae/T[h]:0)},Z=c,te=C.config.chart.stacked&&!C.globals.comboCharts||C.config.chart.stacked&&C.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((i=this.w.config.series[o])===null||i===void 0?void 0:i.type)==="bar"||((t=this.w.config.series[o])===null||t===void 0?void 0:t.type)==="column"),ie=C.config.stroke.curve;Array.isArray(ie)&&(ie=Array.isArray(v)?ie[v[g]]:ie[g]);for(var se,ue=0,ne=0;ne<a&&n[g].length!==0;ne++){var G=n[g][ne+1]===void 0||n[g][ne+1]===null;if(C.globals.isXNumeric){var K=C.globals.seriesX[o][ne+1];C.globals.seriesX[o][ne+1]===void 0&&(K=C.globals.seriesX[o][a-1]),l=(K-C.globals.minX)/this.xRatio}else l+=this.xDivision;te?g>0&&C.globals.collapsedSeries.length<C.config.series.length-1?w=this.prevSeriesY[function(ae){for(var ee=ae;ee>0;ee--){if(!(C.globals.collapsedSeriesIndices.indexOf((v==null?void 0:v[ee])||ee)>-1))return ee;ee--}return 0}(g-1)][ne+1]:w=this.zeroY:w=this.zeroY,G?c=J(Y,w):(c=J(n[g][ne+1],w),u==="rangeArea"&&(Z=J(k[g][ne+1],w))),x.push(n[g][ne+1]===null?null:l),!G||C.config.stroke.curve!=="smooth"&&C.config.stroke.curve!=="monotoneCubic"?(A.push(c),b.push(Z)):(A.push(null),b.push(null));var le=this.lineHelpers.calculatePoints({series:n,x:l,y:c,realIndex:o,i:g,j:ne,prevY:S}),re=this._createPaths({type:u,series:n,i:g,realIndex:o,j:ne,x:l,y:c,y2:Z,xArrj:x,yArrj:A,y2Arrj:b,pX:d,pY:F,pathState:ue,segmentStartX:se,linePath:M,areaPath:R,linePaths:f,areaPaths:m,curve:ie,isRangeStart:y});m=re.areaPaths,f=re.linePaths,d=re.pX,F=re.pY,ue=re.pathState,se=re.segmentStartX,R=re.areaPath,M=re.linePath,!this.appendPathFrom||C.globals.hasNullValues||ie==="monotoneCubic"&&u==="rangeArea"||(O+=D.line(l,this.areaBottomY),H+=D.line(l,this.areaBottomY)),this.handleNullDataPoints(n,le,g,ne,o),this._handleMarkersAndLabels({type:u,pointsPos:le,i:g,j:ne,realIndex:o,isRangeStart:y})}return{yArrj:A,xArrj:x,pathFromArea:H,areaPaths:m,pathFromLine:O,linePaths:f,linePath:M,areaPath:R}}},{key:"_handleMarkersAndLabels",value:function(e){var i=e.type,t=e.pointsPos,r=e.isRangeStart,u=e.i,n=e.j,a=e.realIndex,o=this.w,h=new lu(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,n,{realIndex:a,pointsPos:t,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[u].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var g=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:a,j:n+1});g!==null&&this.elPointsMain.add(g)}var l=h.drawDataLabel({type:i,isRangeStart:r,pos:t,i:a,j:n+1});l!==null&&this.elDataLabelsWrap.add(l)}},{key:"_createPaths",value:function(e){var i=e.type,t=e.series,r=e.i;e.realIndex;var u,n=e.j,a=e.x,o=e.y,h=e.xArrj,g=e.yArrj,l=e.y2,c=e.y2Arrj,d=e.pX,F=e.pY,p=e.pathState,f=e.segmentStartX,m=e.linePath,v=e.areaPath,w=e.linePaths,x=e.areaPaths,A=e.curve,b=e.isRangeStart,y=new De(this.ctx),k=this.areaBottomY,C=i==="rangeArea",D=i==="rangeArea"&&b;switch(A){case"monotoneCubic":var T=b?g:c;switch(p){case 0:if(T[n+1]===null)break;p=1;case 1:if(!(C?h.length===t[r].length:n===t[r].length-2))break;case 2:var S=b?h:h.slice().reverse(),M=b?T:T.slice().reverse(),R=(u=M,S.map(function(K,le){return[K,u[le]]}).filter(function(K){return K[1]!==null})),O=R.length>1?nD(R):R,H=[];C&&(D?x=R:H=x.reverse());var Y=0,J=0;if(function(K,le){for(var re=function(xe){var Ee=[],W=0;return xe.forEach(function(z){z!==null?W++:W>0&&(Ee.push(W),W=0)}),W>0&&Ee.push(W),Ee}(K),ae=[],ee=0,ce=0;ee<re.length;ce+=re[ee++])ae[ee]=oD(le,ce,ce+re[ee]);return ae}(M,O).forEach(function(K){Y++;var le=function(ee){for(var ce="",xe=0;xe<ee.length;xe++){var Ee=ee[xe],W=Ee.length;W>4?(ce+="C".concat(Ee[0],", ").concat(Ee[1]),ce+=", ".concat(Ee[2],", ").concat(Ee[3]),ce+=", ".concat(Ee[4],", ").concat(Ee[5])):W>2&&(ce+="S".concat(Ee[0],", ").concat(Ee[1]),ce+=", ".concat(Ee[2],", ").concat(Ee[3]))}return ce}(K),re=J,ae=(J+=K.length)-1;D?m=y.move(R[re][0],R[re][1])+le:C?m=y.move(H[re][0],H[re][1])+y.line(R[re][0],R[re][1])+le+y.line(H[ae][0],H[ae][1]):(m=y.move(R[re][0],R[re][1])+le,v=m+y.line(R[ae][0],k)+y.line(R[re][0],k)+"z",x.push(v)),w.push(m)}),C&&Y>1&&!D){var Z=w.slice(Y).reverse();w.splice(Y),Z.forEach(function(K){return w.push(K)})}p=0}break;case"smooth":var te=.35*(a-d);if(t[r][n]===null)p=0;else switch(p){case 0:if(f=d,m=D?y.move(d,c[n])+y.line(d,F):y.move(d,F),v=y.move(d,F),t[r][n+1]===null||t[r][n+1]===void 0){w.push(m),x.push(v);break}if(p=1,n<t[r].length-2){var ie=y.curve(d+te,F,a-te,o,a,o);m+=ie,v+=ie;break}case 1:if(t[r][n+1]===null)m+=D?y.line(d,l):y.move(d,F),v+=y.line(d,k)+y.line(f,k)+"z",w.push(m),x.push(v),p=-1;else{var se=y.curve(d+te,F,a-te,o,a,o);m+=se,v+=se,n>=t[r].length-2&&(D&&(m+=y.curve(a,o,a,o,a,l)+y.move(a,l)),v+=y.curve(a,o,a,o,a,k)+y.line(f,k)+"z",w.push(m),x.push(v),p=-1)}}d=a,F=o;break;default:var ue=function(K,le,re){var ae=[];switch(K){case"stepline":ae=y.line(le,null,"H")+y.line(null,re,"V");break;case"linestep":ae=y.line(null,re,"V")+y.line(le,null,"H");break;case"straight":ae=y.line(le,re)}return ae};if(t[r][n]===null)p=0;else switch(p){case 0:if(f=d,m=D?y.move(d,c[n])+y.line(d,F):y.move(d,F),v=y.move(d,F),t[r][n+1]===null||t[r][n+1]===void 0){w.push(m),x.push(v);break}if(p=1,n<t[r].length-2){var ne=ue(A,a,o);m+=ne,v+=ne;break}case 1:if(t[r][n+1]===null)m+=D?y.line(d,l):y.move(d,F),v+=y.line(d,k)+y.line(f,k)+"z",w.push(m),x.push(v),p=-1;else{var G=ue(A,a,o);m+=G,v+=G,n>=t[r].length-2&&(D&&(m+=y.line(a,l)),v+=y.line(a,k)+y.line(f,k)+"z",w.push(m),x.push(v),p=-1)}}d=a,F=o}return{linePaths:w,areaPaths:x,pX:d,pY:F,pathState:p,segmentStartX:f,linePath:m,areaPath:v}}},{key:"handleNullDataPoints",value:function(e,i,t,r,u){var n=this.w;if(e[t][r]===null&&n.config.markers.showNullDataPoints||e[t].length===1){var a=this.strokeWidth-n.config.markers.strokeWidth/2;a>0||(a=0);var o=this.markers.plotChartMarkers({pointsPos:i,seriesIndex:u,j:r+1,pSize:a,alwaysDrawMarker:!0});o!==null&&this.elPointsMain.add(o)}}}]),s}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function s(a,o,h,g){this.xoffset=a,this.yoffset=o,this.height=g,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(l){var c,d=[],F=this.xoffset,p=this.yoffset,f=u(l)/this.height,m=u(l)/this.width;if(this.width>=this.height)for(c=0;c<l.length;c++)d.push([F,p,F+f,p+l[c]/f]),p+=l[c]/f;else for(c=0;c<l.length;c++)d.push([F,p,F+l[c]/m,p+m]),F+=l[c]/m;return d},this.cutArea=function(l){var c;if(this.width>=this.height){var d=l/this.height,F=this.width-d;c=new s(this.xoffset+d,this.yoffset,F,this.height)}else{var p=l/this.width,f=this.height-p;c=new s(this.xoffset,this.yoffset+p,this.width,f)}return c}}function e(a,o,h,g,l){g=g===void 0?0:g,l=l===void 0?0:l;var c=i(function(d,F){var p,f=[],m=F/u(d);for(p=0;p<d.length;p++)f[p]=d[p]*m;return f}(a,o*h),[],new s(g,l,o,h),[]);return function(d){var F,p,f=[];for(F=0;F<d.length;F++)for(p=0;p<d[F].length;p++)f.push(d[F][p]);return f}(c)}function i(a,o,h,g){var l,c,d;if(a.length!==0)return l=h.shortestEdge(),function(F,p,f){var m;if(F.length===0)return!0;(m=F.slice()).push(p);var v=t(F,f),w=t(m,f);return v>=w}(o,c=a[0],l)?(o.push(c),i(a.slice(1),o,h,g)):(d=h.cutArea(u(o),g),g.push(h.getCoordinates(o)),i(a,[],d,g)),g;g.push(h.getCoordinates(o))}function t(a,o){var h=Math.min.apply(Math,a),g=Math.max.apply(Math,a),l=u(a);return Math.max(Math.pow(o,2)*g/Math.pow(l,2),Math.pow(l,2)/(Math.pow(o,2)*h))}function r(a){return a&&a.constructor===Array}function u(a){var o,h=0;for(o=0;o<a.length;o++)h+=a[o];return h}function n(a){var o,h=0;if(r(a[0]))for(o=0;o<a.length;o++)h+=n(a[o]);else h=u(a);return h}return function a(o,h,g,l,c){l=l===void 0?0:l,c=c===void 0?0:c;var d,F,p=[],f=[];if(r(o[0])){for(F=0;F<o.length;F++)p[F]=n(o[F]);for(d=e(p,h,g,l,c),F=0;F<o.length;F++)f.push(a(o[F],d[F][2]-d[F][0],d[F][3]-d[F][1],d[F][0],d[F][1]))}else f=e(o,h,g,l,c);return f}}();var aD=function(){function s(e,i){Oe(this,s),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new Nv(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return Ne(s,[{key:"draw",value:function(e){var i=this,t=this.w,r=new De(this.ctx),u=new wi(this.ctx),n=r.group({class:"apexcharts-treemap"});if(t.globals.noData)return n;var a=[];return e.forEach(function(o){var h=o.map(function(g){return Math.abs(g)});a.push(h)}),this.negRange=this.helpers.checkColorRange(),t.config.series.forEach(function(o,h){o.data.forEach(function(g){Array.isArray(i.labels[h])||(i.labels[h]=[]),i.labels[h].push(g.x)})}),window.TreemapSquared.generate(a,t.globals.gridWidth,t.globals.gridHeight).forEach(function(o,h){var g=r.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:pe.escapeString(t.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(t.config.chart.dropShadow.enabled){var l=t.config.chart.dropShadow;new Fr(i.ctx).dropShadow(n,l,h)}var c=r.group({class:"apexcharts-data-labels"}),d={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};o.forEach(function(O,H){var Y=O[0],J=O[1],Z=O[2],te=O[3];d.xMin=Math.min(d.xMin,Y),d.yMin=Math.min(d.yMin,J),d.xMax=Math.max(d.xMax,Z),d.yMax=Math.max(d.yMax,te);var ie=i.helpers.getShadeColor(t.config.chart.type,h,H,i.negRange),se=ie.color,ue=u.fillPath({color:se,seriesNumber:h,dataPointIndex:H}),ne=r.drawRect(Y,J,Z-Y,te-J,t.config.plotOptions.treemap.borderRadius,"#fff",1,i.strokeWidth,t.config.plotOptions.treemap.useFillColorAsStroke?se:t.globals.stroke.colors[h]);ne.attr({cx:Y,cy:J,index:h,i:h,j:H,width:Z-Y,height:te-J,fill:ue}),ne.node.classList.add("apexcharts-treemap-rect"),i.helpers.addListeners(ne);var G={x:Y+(Z-Y)/2,y:J+(te-J)/2,width:0,height:0},K={x:Y,y:J,width:Z-Y,height:te-J};if(t.config.chart.animations.enabled&&!t.globals.dataChanged){var le=1;t.globals.resized||(le=t.config.chart.animations.speed),i.animateTreemap(ne,G,K,le)}if(t.globals.dataChanged){var re=1;i.dynamicAnim.enabled&&t.globals.shouldAnimate&&(re=i.dynamicAnim.speed,t.globals.previousPaths[h]&&t.globals.previousPaths[h][H]&&t.globals.previousPaths[h][H].rect&&(G=t.globals.previousPaths[h][H].rect),i.animateTreemap(ne,G,K,re))}var ae=i.getFontSize(O),ee=t.config.dataLabels.formatter(i.labels[h][H],{value:t.globals.series[h][H],seriesIndex:h,dataPointIndex:H,w:t});t.config.plotOptions.treemap.dataLabels.format==="truncate"&&(ae=parseInt(t.config.dataLabels.style.fontSize,10),ee=i.truncateLabels(ee,ae,Y,J,Z,te));var ce=null;t.globals.series[h][H]&&(ce=i.helpers.calculateDataLabels({text:ee,x:(Y+Z)/2,y:(J+te)/2+i.strokeWidth/2+ae/3,i:h,j:H,colorProps:ie,fontSize:ae,series:e})),t.config.dataLabels.enabled&&ce&&i.rotateToFitLabel(ce,ae,ee,Y,J,Z,te),g.add(ne),ce!==null&&g.add(ce)});var F=t.config.plotOptions.treemap.seriesTitle;if(t.config.series.length>1&&F&&F.show){var p=t.config.series[h].name||"";if(p&&d.xMin<1/0&&d.yMin<1/0){var f=F.offsetX,m=F.offsetY,v=F.borderColor,w=F.borderWidth,x=F.borderRadius,A=F.style,b=A.color||t.config.chart.foreColor,y={left:A.padding.left,right:A.padding.right,top:A.padding.top,bottom:A.padding.bottom},k=r.getTextRects(p,A.fontSize,A.fontFamily),C=k.width+y.left+y.right,D=k.height+y.top+y.bottom,T=d.xMin+(f||0),S=d.yMin+(m||0),M=r.drawRect(T,S,C,D,x,A.background,1,w,v),R=r.drawText({x:T+y.left,y:S+y.top+.75*k.height,text:p,fontSize:A.fontSize,fontFamily:A.fontFamily,fontWeight:A.fontWeight,foreColor:b,cssClass:A.cssClass||""});g.add(M),g.add(R)}}g.add(c),n.add(g)}),n}},{key:"getFontSize",value:function(e){var i=this.w,t=function r(u){var n,a=0;if(Array.isArray(u[0]))for(n=0;n<u.length;n++)a+=r(u[n]);else for(n=0;n<u.length;n++)a+=u[n].length;return a}(this.labels)/function r(u){var n,a=0;if(Array.isArray(u[0]))for(n=0;n<u.length;n++)a+=r(u[n]);else for(n=0;n<u.length;n++)a+=1;return a}(this.labels);return function(r,u){var n=r*u,a=Math.pow(n,.5);return Math.min(a/t,parseInt(i.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,i,t,r,u,n,a){var o=new De(this.ctx),h=o.getTextRects(t,i);if(h.width+this.w.config.stroke.width+5>n-r&&h.width<=a-u){var g=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(g.x," ").concat(g.y,") translate(").concat(h.height/3,")"))}}},{key:"truncateLabels",value:function(e,i,t,r,u,n){var a=new De(this.ctx),o=a.getTextRects(e,i).width+this.w.config.stroke.width+5>u-t&&n-r>u-t?n-r:u-t,h=a.getTextBasedOnMaxWidth({text:e,maxWidth:o,fontSize:i});return e.length!==h.length&&o/i<5?"":h}},{key:"animateTreemap",value:function(e,i,t,r){var u=new Eu(this.ctx);u.animateRect(e,i,t,r,function(){u.animationCompleted(e)})}}]),s}(),Hv=86400,lD=10/Hv,cD=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return Ne(s,[{key:"calculateTimeScaleTicks",value:function(e,i){var t=this,r=this.w;if(r.globals.allSeriesCollapsed)return r.globals.labels=[],r.globals.timescaleLabels=[],[];var u=new gr(this.ctx),n=(i-e)/864e5;this.determineInterval(n),r.globals.disableZoomIn=!1,r.globals.disableZoomOut=!1,n<lD?r.globals.disableZoomIn=!0:n>5e4&&(r.globals.disableZoomOut=!0);var a=u.getTimeUnitsfromTimestamp(e,i,this.utc),o=r.globals.gridWidth/n,h=o/24,g=h/60,l=g/60,c=Math.floor(24*n),d=Math.floor(1440*n),F=Math.floor(n*Hv),p=Math.floor(n),f=Math.floor(n/30),m=Math.floor(n/365),v={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},w={firstVal:v,currentMillisecond:v.minMillisecond,currentSecond:v.minSecond,currentMinute:v.minMinute,currentHour:v.minHour,currentMonthDate:v.minDate,currentDate:v.minDate,currentMonth:v.minMonth,currentYear:v.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:h,minutesWidthOnXAxis:g,secondsWidthOnXAxis:l,numberOfSeconds:F,numberOfMinutes:d,numberOfHours:c,numberOfDays:p,numberOfMonths:f,numberOfYears:m};switch(this.tickInterval){case"years":this.generateYearScale(w);break;case"months":case"half_year":this.generateMonthScale(w);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(w);break;case"hours":this.generateHourScale(w);break;case"minutes_fives":case"minutes":this.generateMinuteScale(w);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(w)}var x=this.timeScaleArray.map(function(A){var b={position:A.position,unit:A.unit,year:A.year,day:A.day?A.day:1,hour:A.hour?A.hour:0,month:A.month+1};return A.unit==="month"?Pe(Pe({},b),{},{day:1,value:A.value+1}):A.unit==="day"||A.unit==="hour"?Pe(Pe({},b),{},{value:A.value}):A.unit==="minute"?Pe(Pe({},b),{},{value:A.value,minute:A.value}):A.unit==="second"?Pe(Pe({},b),{},{value:A.value,minute:A.minute,second:A.second}):A});return x.filter(function(A){var b=1,y=Math.ceil(r.globals.gridWidth/120),k=A.value;r.config.xaxis.tickAmount!==void 0&&(y=r.config.xaxis.tickAmount),x.length>y&&(b=Math.floor(x.length/y));var C=!1,D=!1;switch(t.tickInterval){case"years":A.unit==="year"&&(C=!0);break;case"half_year":b=7,A.unit==="year"&&(C=!0);break;case"months":b=1,A.unit==="year"&&(C=!0);break;case"months_fortnight":b=15,A.unit!=="year"&&A.unit!=="month"||(C=!0),k===30&&(D=!0);break;case"months_days":b=10,A.unit==="month"&&(C=!0),k===30&&(D=!0);break;case"week_days":b=8,A.unit==="month"&&(C=!0);break;case"days":b=1,A.unit==="month"&&(C=!0);break;case"hours":A.unit==="day"&&(C=!0);break;case"minutes_fives":case"seconds_fives":k%5!=0&&(D=!0);break;case"seconds_tens":k%10!=0&&(D=!0)}if(t.tickInterval==="hours"||t.tickInterval==="minutes_fives"||t.tickInterval==="seconds_tens"||t.tickInterval==="seconds_fives"){if(!D)return!0}else if((k%b==0||C)&&!D)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,i){var t=this.w,r=this.formatDates(e),u=this.removeOverlappingTS(r);t.globals.timescaleLabels=u.slice(),new ua(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var i=24*e,t=60*i;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case i>2.4:this.tickInterval="hours";break;case t>15:this.tickInterval="minutes_fives";break;case t>5:this.tickInterval="minutes";break;case t>1:this.tickInterval="seconds_tens";break;case 60*t>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var i=e.firstVal,t=e.currentMonth,r=e.currentYear,u=e.daysWidthOnXAxis,n=e.numberOfYears,a=i.minYear,o=0,h=new gr(this.ctx),g="year";if(i.minDate>1||i.minMonth>0){var l=h.determineRemainingDaysOfYear(i.minYear,i.minMonth,i.minDate);o=(h.determineDaysOfYear(i.minYear)-l+1)*u,a=i.minYear+1,this.timeScaleArray.push({position:o,value:a,unit:g,year:a,month:pe.monthMod(t+1)})}else i.minDate===1&&i.minMonth===0&&this.timeScaleArray.push({position:o,value:a,unit:g,year:r,month:pe.monthMod(t+1)});for(var c=a,d=o,F=0;F<n;F++)c++,d=h.determineDaysOfYear(c-1)*u+d,this.timeScaleArray.push({position:d,value:c,unit:g,year:c,month:1})}},{key:"generateMonthScale",value:function(e){var i=e.firstVal,t=e.currentMonthDate,r=e.currentMonth,u=e.currentYear,n=e.daysWidthOnXAxis,a=e.numberOfMonths,o=r,h=0,g=new gr(this.ctx),l="month",c=0;if(i.minDate>1){h=(g.determineDaysOfMonths(r+1,i.minYear)-t+1)*n,o=pe.monthMod(r+1);var d=u+c,F=pe.monthMod(o),p=o;o===0&&(l="year",p=d,F=1,d+=c+=1),this.timeScaleArray.push({position:h,value:p,unit:l,year:d,month:F})}else this.timeScaleArray.push({position:h,value:o,unit:l,year:u,month:pe.monthMod(r)});for(var f=o+1,m=h,v=0,w=1;v<a;v++,w++){(f=pe.monthMod(f))===0?(l="year",c+=1):l="month";var x=this._getYear(u,f,c);m=g.determineDaysOfMonths(f,x)*n+m;var A=f===0?x:f;this.timeScaleArray.push({position:m,value:A,unit:l,year:x,month:f===0?1:f}),f++}}},{key:"generateDayScale",value:function(e){var i=e.firstVal,t=e.currentMonth,r=e.currentYear,u=e.hoursWidthOnXAxis,n=e.numberOfDays,a=new gr(this.ctx),o="day",h=i.minDate+1,g=h,l=function(w,x,A){return w>a.determineDaysOfMonths(x+1,A)&&(g=1,o="month",d=x+=1),x},c=(24-i.minHour)*u,d=h,F=l(g,t,r);i.minHour===0&&i.minDate===1?(c=0,d=pe.monthMod(i.minMonth),o="month",g=i.minDate):i.minDate!==1&&i.minHour===0&&i.minMinute===0&&(c=0,h=i.minDate,d=h,F=l(g=h,t,r),d!==1&&(o="day")),this.timeScaleArray.push({position:c,value:d,unit:o,year:this._getYear(r,F,0),month:pe.monthMod(F),day:g});for(var p=c,f=0;f<n;f++){o="day",F=l(g+=1,F,this._getYear(r,F,0));var m=this._getYear(r,F,0);p=24*u+p;var v=g===1?pe.monthMod(F):g;this.timeScaleArray.push({position:p,value:v,unit:o,year:m,month:pe.monthMod(F),day:v})}}},{key:"generateHourScale",value:function(e){var i=e.firstVal,t=e.currentDate,r=e.currentMonth,u=e.currentYear,n=e.minutesWidthOnXAxis,a=e.numberOfHours,o=new gr(this.ctx),h="hour",g=function(b,y){return b>o.determineDaysOfMonths(y+1,u)&&(f=1,y+=1),{month:y,date:f}},l=function(b,y){return b>o.determineDaysOfMonths(y+1,u)?y+=1:y},c=60-(i.minMinute+i.minSecond/60),d=c*n,F=i.minHour+1,p=F;c===60&&(d=0,p=F=i.minHour);var f=t;p>=24&&(p=0,h="day",F=f+=1);var m=g(f,r).month;m=l(f,m),F>31&&(F=f=1),this.timeScaleArray.push({position:d,value:F,unit:h,day:f,hour:p,year:u,month:pe.monthMod(m)}),p++;for(var v=d,w=0;w<a;w++){h="hour",p>=24&&(p=0,h="day",m=g(f+=1,m).month,m=l(f,m));var x=this._getYear(u,m,0);v=60*n+v;var A=p===0?f:p;this.timeScaleArray.push({position:v,value:A,unit:h,hour:p,day:f,year:x,month:pe.monthMod(m)}),p++}}},{key:"generateMinuteScale",value:function(e){for(var i=e.currentMillisecond,t=e.currentSecond,r=e.currentMinute,u=e.currentHour,n=e.currentDate,a=e.currentMonth,o=e.currentYear,h=e.minutesWidthOnXAxis,g=e.secondsWidthOnXAxis,l=e.numberOfMinutes,c=r+1,d=n,F=a,p=o,f=u,m=(60-t-i/1e3)*g,v=0;v<l;v++)c>=60&&(c=0,(f+=1)===24&&(f=0)),this.timeScaleArray.push({position:m,value:c,unit:"minute",hour:f,minute:c,day:d,year:this._getYear(p,F,0),month:pe.monthMod(F)}),m+=h,c++}},{key:"generateSecondScale",value:function(e){for(var i=e.currentMillisecond,t=e.currentSecond,r=e.currentMinute,u=e.currentHour,n=e.currentDate,a=e.currentMonth,o=e.currentYear,h=e.secondsWidthOnXAxis,g=e.numberOfSeconds,l=t+1,c=r,d=n,F=a,p=o,f=u,m=(1e3-i)/1e3*h,v=0;v<g;v++)l>=60&&(l=0,++c>=60&&(c=0,++f===24&&(f=0))),this.timeScaleArray.push({position:m,value:l,unit:"second",hour:f,minute:c,second:l,day:d,year:this._getYear(p,F,0),month:pe.monthMod(F)}),m+=h,l++}},{key:"createRawDateString",value:function(e,i){var t=e.year;return e.month===0&&(e.month=1),t+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?t+=e.unit==="day"?"-"+("0"+i).slice(-2):"-01":t+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?t+=e.unit==="hour"?"T"+("0"+i).slice(-2):"T00":t+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?t+=":"+("0"+i).slice(-2):t+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?t+=":"+("0"+i).slice(-2):t+=":00",this.utc&&(t+=".000Z"),t}},{key:"formatDates",value:function(e){var i=this,t=this.w;return e.map(function(r){var u=r.value.toString(),n=new gr(i.ctx),a=i.createRawDateString(r,u),o=n.getDate(n.parseDate(a));if(i.utc||(o=n.getDate(n.parseDateWithTimezone(a))),t.config.xaxis.labels.format===void 0){var h="dd MMM",g=t.config.xaxis.labels.datetimeFormatter;r.unit==="year"&&(h=g.year),r.unit==="month"&&(h=g.month),r.unit==="day"&&(h=g.day),r.unit==="hour"&&(h=g.hour),r.unit==="minute"&&(h=g.minute),r.unit==="second"&&(h=g.second),u=n.formatDate(o,h)}else u=n.formatDate(o,t.config.xaxis.labels.format);return{dateString:a,position:r.position,value:u,unit:r.unit,year:r.year,month:r.month}})}},{key:"removeOverlappingTS",value:function(e){var i,t=this,r=new De(this.ctx),u=!1;e.length>0&&e[0].value&&e.every(function(o){return o.value.length===e[0].value.length})&&(u=!0,i=r.getTextRects(e[0].value).width);var n=0,a=e.map(function(o,h){if(h>0&&t.w.config.xaxis.labels.hideOverlappingLabels){var g=u?i:r.getTextRects(e[n].value).width,l=e[n].position;return o.position>l+g+10?(n=h,o):null}return o});return a=a.filter(function(o){return o!==null})}},{key:"_getYear",value:function(e,i,t){return e+Math.floor(i/12)+t}}]),s}(),dD=function(){function s(e,i){Oe(this,s),this.ctx=i,this.w=i.w,this.el=e}return Ne(s,[{key:"setupElements",value:function(){var e=this.w,i=e.globals,t=e.config,r=t.chart.type;i.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(r),i.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(r),i.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(r)&&t.plotOptions.bar.horizontal,i.chartClass=".apexcharts".concat(i.chartID),i.dom.baseEl=this.el,i.dom.elWrap=document.createElement("div"),De.setAttrs(i.dom.elWrap,{id:i.chartClass.substring(1),class:"apexcharts-canvas ".concat(i.chartClass.substring(1))}),this.el.appendChild(i.dom.elWrap),i.dom.Paper=window.SVG().addTo(i.dom.elWrap),i.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(t.chart.offsetX,", ").concat(t.chart.offsetY,")")}),i.dom.Paper.node.style.background=t.theme.mode!=="dark"||t.chart.background?t.theme.mode!=="light"||t.chart.background?t.chart.background:"#fff":"#424242",this.setSVGDimensions(),i.dom.elLegendForeign=document.createElementNS(i.SVGNS,"foreignObject"),De.setAttrs(i.dom.elLegendForeign,{x:0,y:0,width:i.svgWidth,height:i.svgHeight}),i.dom.elLegendWrap=document.createElement("div"),i.dom.elLegendWrap.classList.add("apexcharts-legend"),i.dom.elWrap.appendChild(i.dom.elLegendWrap),i.dom.Paper.node.appendChild(i.dom.elLegendForeign),i.dom.elGraphical=i.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),i.dom.elDefs=i.dom.Paper.defs(),i.dom.Paper.add(i.dom.elGraphical),i.dom.elGraphical.add(i.dom.elDefs)}},{key:"plotChartType",value:function(e,i){var t=this.w,r=this.ctx,u=t.config,n=t.globals,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=u.chart.type||"line",h=null,g=0;n.series.forEach(function(b,y){var k=e[y].type==="column"?"bar":e[y].type||(o==="column"?"bar":o);a[k]?(k==="rangeArea"?(a[k].series.push(n.seriesRangeStart[y]),a[k].seriesRangeEnd.push(n.seriesRangeEnd[y])):a[k].series.push(b),a[k].i.push(y),k==="bar"&&(t.globals.columnSeries=a.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(k)?h=k:console.warn("You have specified an unrecognized series type (".concat(k,").")),o!==k&&k!=="scatter"&&g++}),g>0&&(h&&console.warn("Chart or series type ".concat(h," cannot appear with other chart or series types.")),a.bar.series.length>0&&u.plotOptions.bar.horizontal&&(g-=a.bar.series.length,a.bar={series:[],i:[]},t.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),n.comboCharts||(n.comboCharts=g>0);var l=new uc(r,i),c=new ic(r,i);r.pie=new zv(r);var d=new rD(r);r.rangeBar=new iD(r,i);var F=new tD(r),p=[];if(n.comboCharts){var f,m,v=new Gt(r);if(a.area.series.length>0&&(f=p).push.apply(f,nr(v.drawSeriesByGroup(a.area,n.areaGroups,"area",l))),a.bar.series.length>0)if(u.chart.stacked){var w=new Pg(r,i);p.push(w.draw(a.bar.series,a.bar.i))}else r.bar=new cu(r,i),p.push(r.bar.draw(a.bar.series,a.bar.i));if(a.rangeArea.series.length>0&&p.push(l.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(m=p).push.apply(m,nr(v.drawSeriesByGroup(a.line,n.lineGroups,"line",l))),a.candlestick.series.length>0&&p.push(c.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(c.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(r.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var x=new uc(r,i,!0);p.push(x.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var A=new uc(r,i,!0);p.push(A.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(u.chart.type){case"line":p=l.draw(n.series,"line");break;case"area":p=l.draw(n.series,"area");break;case"bar":u.chart.stacked?p=new Pg(r,i).draw(n.series):(r.bar=new cu(r,i),p=r.bar.draw(n.series));break;case"candlestick":p=new ic(r,i).draw(n.series,"candlestick");break;case"boxPlot":p=new ic(r,i).draw(n.series,u.chart.type);break;case"rangeBar":p=r.rangeBar.draw(n.series);break;case"rangeArea":p=l.draw(n.seriesRangeStart,"rangeArea",void 0,n.seriesRangeEnd);break;case"heatmap":p=new eD(r,i).draw(n.series);break;case"treemap":p=new aD(r,i).draw(n.series);break;case"pie":case"donut":case"polarArea":p=r.pie.draw(n.series);break;case"radialBar":p=d.draw(n.series);break;case"radar":p=F.draw(n.series);break;default:p=l.draw(n.series)}return p}},{key:"setSVGDimensions",value:function(){var e=this.w,i=e.globals,t=e.config;t.chart.width=t.chart.width||"100%",t.chart.height=t.chart.height||"auto",i.svgWidth=t.chart.width,i.svgHeight=t.chart.height;var r=pe.getDimensions(this.el),u=t.chart.width.toString().split(/[0-9]+/g).pop();u==="%"?pe.isNumber(r[0])&&(r[0].width===0&&(r=pe.getDimensions(this.el.parentNode)),i.svgWidth=r[0]*parseInt(t.chart.width,10)/100):u!=="px"&&u!==""||(i.svgWidth=parseInt(t.chart.width,10));var n=String(t.chart.height).toString().split(/[0-9]+/g).pop();if(i.svgHeight!=="auto"&&i.svgHeight!=="")if(n==="%"){var a=pe.getDimensions(this.el.parentNode);i.svgHeight=a[1]*parseInt(t.chart.height,10)/100}else i.svgHeight=parseInt(t.chart.height,10);else i.svgHeight=i.axisCharts?i.svgWidth/1.61:i.svgWidth/1.2;if(i.svgWidth=Math.max(i.svgWidth,0),i.svgHeight=Math.max(i.svgHeight,0),De.setAttrs(i.dom.Paper.node,{width:i.svgWidth,height:i.svgHeight}),n!=="%"){var o=t.chart.sparkline.enabled?0:i.axisCharts?t.chart.parentHeightOffset:0;i.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(i.svgHeight+o,"px")}i.dom.elWrap.style.width="".concat(i.svgWidth,"px"),i.dom.elWrap.style.height="".concat(i.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,i=e.translateY,t=e.translateX;De.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(t,", ").concat(i,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,i=e.globals,t=0,r=e.config.chart.sparkline.enabled?1:15;r+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(t=new Iv(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var u=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),n=2.05*e.globals.radialSize;if(u&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var a=pe.getBoundingClientRect(u);n=a.bottom;var o=a.bottom-a.top;n=Math.max(2.05*e.globals.radialSize,o)}var h=Math.ceil(n+i.translateY+t+r);i.dom.elLegendForeign&&i.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).includes("%")||(i.dom.elWrap.style.height="".concat(h,"px"),De.setAttrs(i.dom.Paper.node,{height:h}),i.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(h,"px"))}},{key:"coreCalculations",value:function(){new Qc(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,i=function(){return e.w.config.series.map(function(){return[]})},t=new Lv,r=this.w.globals;t.initGlobalVars(r),r.seriesXvalues=i(),r.seriesYvalues=i()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,i=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new ed(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new ed(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new cD(this.ctx);var t=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(t=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(t)}i=new Gt(this.ctx).getCalculatedRatios()}return i}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,i=this.ctx,t=this.w;if(t.config.chart.brush.enabled&&typeof t.config.chart.events.selection!="function"){var r=Array.isArray(t.config.chart.brush.targets)?t.config.chart.brush.targets:[t.config.chart.brush.target];r.forEach(function(u){var n=i.constructor.getChartByID(u);n.w.globals.brushSource=e.ctx,typeof n.w.config.chart.events.zoomed!="function"&&(n.w.config.chart.events.zoomed=function(){return e.updateSourceChart(n)}),typeof n.w.config.chart.events.scrolled!="function"&&(n.w.config.chart.events.scrolled=function(){return e.updateSourceChart(n)})}),t.config.chart.events.selection=function(u,n){r.forEach(function(a){i.constructor.getChartByID(a).ctx.updateHelpers._updateOptions({xaxis:{min:n.xaxis.min,max:n.xaxis.max}},!1,!1,!1,!1)})}}}}]),s}(),hD=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"_updateOptions",value:function(e){var i=this,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],n=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(a){var o=[i.ctx];u&&(o=i.ctx.getSyncedCharts()),i.ctx.w.globals.isExecCalled&&(o=[i.ctx],i.ctx.w.globals.isExecCalled=!1),o.forEach(function(h,g){var l=h.w;if(l.globals.shouldAnimate=r,t||(l.globals.resized=!0,l.globals.dataChanged=!0,r&&h.series.getPreviousPaths()),e&&au(e)==="object"&&(h.config=new Mn(e),e=Gt.extendArrayProps(h.config,e,l),h.w.globals.chartID!==i.ctx.w.globals.chartID&&delete e.series,l.config=pe.extend(l.config,e),n&&(l.globals.lastXAxis=e.xaxis?pe.clone(e.xaxis):[],l.globals.lastYAxis=e.yaxis?pe.clone(e.yaxis):[],l.globals.initialConfig=pe.extend({},l.config),l.globals.initialSeries=pe.clone(l.config.series),e.series))){for(var c=0;c<l.globals.collapsedSeriesIndices.length;c++){var d=l.config.series[l.globals.collapsedSeriesIndices[c]];l.globals.collapsedSeries[c].data=l.globals.axisCharts?d.data.slice():d}for(var F=0;F<l.globals.ancillaryCollapsedSeriesIndices.length;F++){var p=l.config.series[l.globals.ancillaryCollapsedSeriesIndices[F]];l.globals.ancillaryCollapsedSeries[F].data=l.globals.axisCharts?p.data.slice():p}h.series.emptyCollapsedSeries(l.config.series)}return h.update(e).then(function(){g===o.length-1&&a(h)})})})}},{key:"_updateSeries",value:function(e,i){var t=this,r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(u){var n,a=t.w;return a.globals.shouldAnimate=i,a.globals.dataChanged=!0,i&&t.ctx.series.getPreviousPaths(),a.globals.axisCharts?((n=e.map(function(o,h){return t._extendSeries(o,h)})).length===0&&(n=[{data:[]}]),a.config.series=n):a.config.series=e.slice(),r&&(a.globals.initialConfig.series=pe.clone(a.config.series),a.globals.initialSeries=pe.clone(a.config.series)),t.ctx.update().then(function(){u(t.ctx)})})}},{key:"_extendSeries",value:function(e,i){var t=this.w,r=t.config.series[i];return Pe(Pe({},t.config.series[i]),{},{name:e.name?e.name:r==null?void 0:r.name,color:e.color?e.color:r==null?void 0:r.color,type:e.type?e.type:r==null?void 0:r.type,group:e.group?e.group:r==null?void 0:r.group,hidden:e.hidden!==void 0?e.hidden:r==null?void 0:r.hidden,data:e.data?e.data:r==null?void 0:r.data,zIndex:e.zIndex!==void 0?e.zIndex:i})}},{key:"toggleDataPointSelection",value:function(e,i){var t=this.w,r=null,u=".apexcharts-series[data\\:realIndex='".concat(e,"']");return t.globals.axisCharts?r=t.globals.dom.Paper.findOne("".concat(u," path[j='").concat(i,"'], ").concat(u," circle[j='").concat(i,"'], ").concat(u," rect[j='").concat(i,"']")):i===void 0&&(r=t.globals.dom.Paper.findOne("".concat(u," path[j='").concat(e,"']")),t.config.chart.type!=="pie"&&t.config.chart.type!=="polarArea"&&t.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),r?(new De(this.ctx).pathMouseDown(r,null),r.node?r.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var i=this.w;if(["min","max"].forEach(function(r){e.xaxis[r]!==void 0&&(i.config.xaxis[r]=e.xaxis[r],i.globals.lastXAxis[r]=e.xaxis[r])}),e.xaxis.categories&&e.xaxis.categories.length&&(i.config.xaxis.categories=e.xaxis.categories),i.config.xaxis.convertedCatToNumeric){var t=new Dn(e);e=t.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(i,t){e.yaxis[t].min=0,e.yaxis[t].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var i=this,t=this.w,r=t.globals.lastXAxis,u=t.globals.lastYAxis;e&&e.xaxis&&(r=e.xaxis),e&&e.yaxis&&(u=e.yaxis),t.config.xaxis.min=r.min,t.config.xaxis.max=r.max;var n=function(a){u[a]!==void 0&&(t.config.yaxis[a].min=u[a].min,t.config.yaxis[a].max=u[a].max)};t.config.yaxis.map(function(a,o){t.globals.zoomed||u[o]!==void 0?n(o):i.ctx.opts.yaxis[o]!==void 0&&(a.min=i.ctx.opts.yaxis[o].min,a.max=i.ctx.opts.yaxis[o].max)})}}]),s}();(function(){function s(){for(var u=arguments.length>0&&arguments[0]!==l?arguments[0]:[],n=arguments.length>1?arguments[1]:l,a=arguments.length>2?arguments[2]:l,o=arguments.length>3?arguments[3]:l,h=arguments.length>4?arguments[4]:l,g=arguments.length>5?arguments[5]:l,l=arguments.length>6?arguments[6]:l,c=u.slice(n,a||l),d=o.slice(h,g||l),F=0,p={pos:[0,0],start:[0,0]},f={pos:[0,0],start:[0,0]};c[F]=e.call(p,c[F]),d[F]=e.call(f,d[F]),c[F][0]!=d[F][0]||c[F][0]=="M"||c[F][0]=="A"&&(c[F][4]!=d[F][4]||c[F][5]!=d[F][5])?(Array.prototype.splice.apply(c,[F,1].concat(t.call(p,c[F]))),Array.prototype.splice.apply(d,[F,1].concat(t.call(f,d[F])))):(c[F]=i.call(p,c[F]),d[F]=i.call(f,d[F])),!(++F==c.length&&F==d.length);)F==c.length&&c.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),F==d.length&&d.push(["C",f.pos[0],f.pos[1],f.pos[0],f.pos[1],f.pos[0],f.pos[1]]);return{start:c,dest:d}}function e(u){switch(u[0]){case"z":case"Z":u[0]="L",u[1]=this.start[0],u[2]=this.start[1];break;case"H":u[0]="L",u[2]=this.pos[1];break;case"V":u[0]="L",u[2]=u[1],u[1]=this.pos[0];break;case"T":u[0]="Q",u[3]=u[1],u[4]=u[2],u[1]=this.reflection[1],u[2]=this.reflection[0];break;case"S":u[0]="C",u[6]=u[4],u[5]=u[3],u[4]=u[2],u[3]=u[1],u[2]=this.reflection[1],u[1]=this.reflection[0]}return u}function i(u){var n=u.length;return this.pos=[u[n-2],u[n-1]],"SCQT".indexOf(u[0])!=-1&&(this.reflection=[2*this.pos[0]-u[n-4],2*this.pos[1]-u[n-3]]),u}function t(u){var n=[u];switch(u[0]){case"M":return this.pos=this.start=[u[1],u[2]],n;case"L":u[5]=u[3]=u[1],u[6]=u[4]=u[2],u[1]=this.pos[0],u[2]=this.pos[1];break;case"Q":u[6]=u[4],u[5]=u[3],u[4]=1*u[4]/3+2*u[2]/3,u[3]=1*u[3]/3+2*u[1]/3,u[2]=1*this.pos[1]/3+2*u[2]/3,u[1]=1*this.pos[0]/3+2*u[1]/3;break;case"A":n=function(a,o){var h,g,l,c,d,F,p,f,m,v,w,x,A,b,y,k,C,D,T,S,M,R,O,H,Y,J,Z=Math.abs(o[1]),te=Math.abs(o[2]),ie=o[3]%360,se=o[4],ue=o[5],ne=o[6],G=o[7],K=new wt(a),le=new wt(ne,G),re=[];if(Z===0||te===0||K.x===le.x&&K.y===le.y)return[["C",K.x,K.y,le.x,le.y,le.x,le.y]];for(h=new wt((K.x-le.x)/2,(K.y-le.y)/2).transform(new Ke().rotate(ie)),g=h.x*h.x/(Z*Z)+h.y*h.y/(te*te),g>1&&(Z*=g=Math.sqrt(g),te*=g),l=new Ke().rotate(ie).scale(1/Z,1/te).rotate(-ie),K=K.transform(l),le=le.transform(l),c=[le.x-K.x,le.y-K.y],F=c[0]*c[0]+c[1]*c[1],d=Math.sqrt(F),c[0]/=d,c[1]/=d,p=F<4?Math.sqrt(1-F/4):0,se===ue&&(p*=-1),f=new wt((le.x+K.x)/2+p*-c[1],(le.y+K.y)/2+p*c[0]),m=new wt(K.x-f.x,K.y-f.y),v=new wt(le.x-f.x,le.y-f.y),w=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(w*=-1),x=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(x*=-1),ue&&w>x&&(x+=2*Math.PI),!ue&&w<x&&(x-=2*Math.PI),b=Math.ceil(2*Math.abs(w-x)/Math.PI),k=[],C=w,A=(x-w)/b,y=4*Math.tan(A/4)/3,M=0;M<=b;M++)T=Math.cos(C),D=Math.sin(C),S=new wt(f.x+T,f.y+D),k[M]=[new wt(S.x+y*D,S.y-y*T),S,new wt(S.x-y*D,S.y+y*T)],C+=A;for(k[0][0]=k[0][1].clone(),k[k.length-1][2]=k[k.length-1][1].clone(),l=new Ke().rotate(ie).scale(Z,te).rotate(-ie),M=0,R=k.length;M<R;M++)k[M][0]=k[M][0].transform(l),k[M][1]=k[M][1].transform(l),k[M][2]=k[M][2].transform(l);for(M=1,R=k.length;M<R;M++)O=(S=k[M-1][2]).x,H=S.y,Y=(S=k[M][0]).x,J=S.y,ne=(S=k[M][1]).x,G=S.y,re.push(["C",O,H,Y,J,ne,G]);return re}(this.pos,u),u=n[0]}return u[0]="C",this.pos=[u[5],u[6]],this.reflection=[2*u[5]-u[3],2*u[6]-u[4]],n}function r(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(n===!1)return!1;for(var a=n,o=u.length;a<o;++a)if(u[a][0]=="M")return a;return!1}Qe(fi,{morph:function(u,n,a,o,h){for(var g=this.parse(u),l=this.parse(n),c=0,d=0,F=!1,p=!1;c!==!1||d!==!1;){var f;F=r(g,c!==!1&&c+1),p=r(l,d!==!1&&d+1),c===!1&&(c=(f=new fi(m.start).bbox()).height==0||f.width==0?g.push(g[0])-1:g.push(["M",f.x+f.width/2,f.y+f.height/2])-1),d===!1&&(d=(f=new fi(m.dest).bbox()).height==0||f.width==0?l.push(l[0])-1:l.push(["M",f.x+f.width/2,f.y+f.height/2])-1);var m=s(g,c,F,l,d,p);g=g.slice(0,c).concat(m.start,F===!1?[]:g.slice(F)),l=l.slice(0,d).concat(m.dest,p===!1?[]:l.slice(p)),c=F!==!1&&c+m.start.length,d=p!==!1&&d+m.dest.length}this._array=g,this.destination=new fi,this.destination._array=l;var v=this.fromArray(g.map(function(w,x){var A=l[x].map(function(b,y){return y===0?b:o.step(w[y],l[x][y],a,h[x],h)});return A}));return v}})})();const $g=s=>(s.changedTouches&&(s=s.changedTouches[0]),{x:s.clientX,y:s.clientY});class gD{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const i=!e.type.indexOf("mouse");if(i&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($g(e));const t=(i?"mouseup":"touchend")+".drag";qi(window,(i?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),qi(window,t,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:i,lastClick:t}=this,r=this.el.point($g(e)),u=r.x-t.x,n=r.y-t.y;if(!u&&!n)return i;const a=i.x+u,o=i.y+n;this.box=new Vt(a,o,i.w,i.h),this.lastClick=r,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(a,o)}move(e,i){this.el.type==="svg"?f0.prototype.move.call(this.el,e,i):this.el.move(e,i)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),si(window,"mousemove.drag"),si(window,"touchmove.drag"),si(window,"mouseup.drag"),si(window,"touchend.drag"),this.init(!0)}}/*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function td(s,e,i,t=null){return function(r){r.preventDefault(),r.stopPropagation();var u=r.pageX||r.touches[0].pageX,n=r.pageY||r.touches[0].pageY;e.fire(s,{x:u,y:n,event:r,index:t,points:i})}}function rd([s,e],{a:i,b:t,c:r,d:u,e:n,f:a}){return[s*i+e*r+n,s*t+e*u+a]}Qe(fr,{draggable(s=!0){return(this.remember("_draggable")||new gD(this)).init(s),this}});let Uv=class{constructor(s){this.el=s,s.remember("_selectHandler",this),this.selection=new f0,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=zn();this.observer=new e.MutationObserver(this.mutationHandler)}init(s){this.createHandle=s.createHandle||this.createHandleFn,this.createRot=s.createRot||this.createRotFn,this.updateHandle=s.updateHandle||this.updateHandleFn,this.updateRot=s.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(s,e){if(!s)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((s,e,i)=>{const t=this.order[e];this.createHandle.call(this,this.selection,s,e,i,t),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+t).on("mousedown.selection touchstart.selection",td(t,this.el,this.handlePoints,e))})}createHandleFn(s){s.polyline()}updateHandleFn(s,e,i,t){const r=t.at(i-1),u=t[(i+1)%t.length],n=e,a=[n[0]-r[0],n[1]-r[1]],o=[n[0]-u[0],n[1]-u[1]],h=Math.sqrt(a[0]*a[0]+a[1]*a[1]),g=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=[a[0]/h,a[1]/h],c=[o[0]/g,o[1]/g],d=[n[0]-10*l[0],n[1]-10*l[1]],F=[n[0]-10*c[0],n[1]-10*c[1]];s.plot([d,n,F])}updateResizeHandles(){this.handlePoints.forEach((s,e,i)=>{const t=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),s,e,i,t)})}createRotFn(s){s.line(),s.circle(5)}getPoint(s){return this.handlePoints[this.order.indexOf(s)]}getPointHandle(s){return this.selection.get(this.order.indexOf(s)+1)}updateRotFn(s,e){const i=this.getPoint("t");s.get(0).plot(i[0],i[1],e[0],e[1]),s.get(1).center(e[0],e[1])}createRotationHandle(){const s=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",td("rot",this.el,this.handlePoints));this.createRot.call(this,s)}updateRotationHandle(){const s=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(s,this.rotationPoint,this.handlePoints)}updatePoints(){const s=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(s).map(i=>rd(i,e)),this.rotationPoint=rd(this.getRotationPoint(s),e)}getHandlePoints({x:s,x2:e,y:i,y2:t,cx:r,cy:u}=this.el.bbox()){return[[s,i],[r,i],[e,i],[e,u],[e,t],[r,t],[s,t],[s,u]]}getRotationPoint({y:s,cx:e}=this.el.bbox()){return[e,s-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const Ig=s=>function(e=!0,i={}){typeof e=="object"&&(i=e,e=!0);let t=this.remember("_"+s.name);return t||(e.prototype instanceof Uv?(t=new e(this),e=!0):t=new s(this),this.remember("_"+s.name,t)),t.active(e,i),this};/*!
* @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
* @version 2.0.4
* https://github.com/svgdotjs/svg.resize.js
*
* @copyright [object Object]
* @license MIT
*
* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
*//*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function id(s,e,i,t=null){return function(r){r.preventDefault(),r.stopPropagation();var u=r.pageX||r.touches[0].pageX,n=r.pageY||r.touches[0].pageY;e.fire(s,{x:u,y:n,event:r,index:t,points:i})}}function sd([s,e],{a:i,b:t,c:r,d:u,e:n,f:a}){return[s*i+e*r+n,s*t+e*u+a]}Qe(fr,{select:Ig(Uv)}),Qe([ls,cs,as],{pointSelect:Ig(class{constructor(s){this.el=s,s.remember("_pointSelectHandler",this),this.selection=new f0,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=zn();this.observer=new e.MutationObserver(this.mutationHandler)}init(s){this.createHandle=s.createHandle||this.createHandleFn,this.updateHandle=s.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(s,e){if(!s)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((s,e,i)=>{this.createHandle.call(this,this.selection,s,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",td("point",this.el,this.points,e))})}createHandleFn(s){s.circle(5)}updateHandleFn(s,e){s.center(e[0],e[1])}updatePointHandles(){this.points.forEach((s,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),s,e,i)})}updatePoints(){const s=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>rd(e,s))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class Yv{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new f0,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const i=zn();this.observer=new i.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,i){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(i)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,i,t)=>{const r=this.order[i];this.createHandle.call(this,this.selection,e,i,t,r),this.selection.get(i+1).addClass("svg_select_handle svg_select_handle_"+r).on("mousedown.selection touchstart.selection",id(r,this.el,this.handlePoints,i))})}createHandleFn(e){e.polyline()}updateHandleFn(e,i,t,r){const u=r.at(t-1),n=r[(t+1)%r.length],a=i,o=[a[0]-u[0],a[1]-u[1]],h=[a[0]-n[0],a[1]-n[1]],g=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=Math.sqrt(h[0]*h[0]+h[1]*h[1]),c=[o[0]/g,o[1]/g],d=[h[0]/l,h[1]/l],F=[a[0]-10*c[0],a[1]-10*c[1]],p=[a[0]-10*d[0],a[1]-10*d[1]];e.plot([F,a,p])}updateResizeHandles(){this.handlePoints.forEach((e,i,t)=>{const r=this.order[i];this.updateHandle.call(this,this.selection.get(i+1),e,i,t,r)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,i){const t=this.getPoint("t");e.get(0).plot(t[0],t[1],i[0],i[1]),e.get(1).center(i[0],i[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",id("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),i=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(t=>sd(t,i)),this.rotationPoint=sd(this.getRotationPoint(e),i)}getHandlePoints({x:e,x2:i,y:t,y2:r,cx:u,cy:n}=this.el.bbox()){return[[e,t],[u,t],[i,t],[i,n],[i,r],[u,r],[e,r],[e,n]]}getRotationPoint({y:e,cx:i}=this.el.bbox()){return[i,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const Rg=s=>function(e=!0,i={}){typeof e=="object"&&(i=e,e=!0);let t=this.remember("_"+s.name);return t||(e.prototype instanceof Yv?(t=new e(this),e=!0):t=new s(this),this.remember("_"+s.name,t)),t.active(e,i),this};Qe(fr,{select:Rg(Yv)}),Qe([ls,cs,as],{pointSelect:Rg(class{constructor(s){this.el=s,s.remember("_pointSelectHandler",this),this.selection=new f0,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=zn();this.observer=new e.MutationObserver(this.mutationHandler)}init(s){this.createHandle=s.createHandle||this.createHandleFn,this.updateHandle=s.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(s,e){if(!s)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((s,e,i)=>{this.createHandle.call(this,this.selection,s,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",id("point",this.el,this.points,e))})}createHandleFn(s){s.circle(5)}updateHandleFn(s,e){s.center(e[0],e[1])}updatePointHandles(){this.points.forEach((s,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),s,e,i)})}updatePoints(){const s=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>sd(e,s))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const mo=s=>(s.changedTouches&&(s=s.changedTouches[0]),{x:s.clientX,y:s.clientY}),Bg=s=>{let e=1/0,i=1/0,t=-1/0,r=-1/0;for(let u=0;u<s.length;u++){const n=s[u];e=Math.min(e,n[0]),i=Math.min(i,n[1]),t=Math.max(t,n[0]),r=Math.max(r,n[1])}return new Vt(e,i,t-e,r-i)};class Og{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,i){this.preserveAspectRatio=i.preserveAspectRatio??!1,this.aroundCenter=i.aroundCenter??!1,this.grid=i.grid??0,this.degree=i.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:i,index:t,points:r}=e.detail,u=!i.type.indexOf("mouse");if(u&&(i.which||i.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(mo(i)),this.index=t,this.points=r.slice();const n=(u?"mousemove":"touchmove")+".resize",a=(u?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?qi(window,n,this.movePoint):e.type==="rot"?qi(window,n,this.rotate):qi(window,n,this.resize),qi(window,a,this.endResize)}resize(e){this.lastEvent=e;const i=this.snapToGrid(this.el.point(mo(e)));let t=i.x-this.startPoint.x,r=i.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(t*=2,r*=2);const u=this.box.x+t,n=this.box.y+r,a=this.box.x2+t,o=this.box.y2+r;let h=new Vt(this.box);if(this.eventType.includes("l")&&(h.x=Math.min(u,this.box.x2),h.x2=Math.max(u,this.box.x2)),this.eventType.includes("r")&&(h.x=Math.min(a,this.box.x),h.x2=Math.max(a,this.box.x)),this.eventType.includes("t")&&(h.y=Math.min(n,this.box.y2),h.y2=Math.max(n,this.box.y2)),this.eventType.includes("b")&&(h.y=Math.min(o,this.box.y),h.y2=Math.max(o,this.box.y)),h.width=h.x2-h.x,h.height=h.y2-h.y,this.preserveAspectRatio){const g=h.width/this.box.width,l=h.height/this.box.height,c=["lt","t","rt","r","rb","b","lb","l"],d=(c.indexOf(this.eventType)+4)%c.length,F=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[d];let p=this.eventType.includes("t")||this.eventType.includes("b")?l:g;p=this.eventType.length===2?Math.max(g,l):p,h=function(f,m,v){const w=[[f.x,f.y],[f.x+f.width,f.y],[f.x+f.width,f.y+f.height],[f.x,f.y+f.height]].map(([x,A])=>{const b=x-m[0],y=(A-m[1])*v;return[b*v+m[0],y+m[1]]});return Bg(w)}(this.box,F,p)}this.el.dispatch("resize",{box:new Vt(h),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(h.width,h.height).move(h.x,h.y)}movePoint(e){this.lastEvent=e;const{x:i,y:t}=this.snapToGrid(this.el.point(mo(e))),r=this.el.array().slice();r[this.index]=[i,t],this.el.dispatch("resize",{box:Bg(r),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(r)}rotate(e){this.lastEvent=e;const i=this.startPoint,t=this.el.point(mo(e)),{cx:r,cy:u}=this.box,n=i.x-r,a=i.y-u,o=t.x-r,h=t.y-u,g=Math.sqrt(n*n+a*a)*Math.sqrt(o*o+h*h);if(g===0)return;let l=Math.acos((n*o+a*h)/g)/Math.PI*180;if(!l)return;t.x<i.x&&(l=-l);const c=new Ke(this.el),{x:d,y:F}=new wt(r,u).transformO(c),{rotate:p}=c.decompose(),f=this.snapToAngle(p+l)-p;this.el.dispatch("resize",{box:this.box,angle:f,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(c.rotateO(f,d,F))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",si(window,"mousemove.resize touchmove.resize"),si(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}Qe(fr,{resize:function(s=!0,e={}){typeof s=="object"&&(e=s,s=!0);let i=this.remember("_ResizeHandler");return i||(s.prototype instanceof Og?(i=new s(this),s=!0):i=new Og(this),this.remember("_resizeHandler",i)),i.active(s,e),this}}),window.SVG===void 0&&(window.SVG=jj),window.Apex===void 0&&(window.Apex={});var Ng=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new Eu(this.ctx),this.ctx.axes=new Bj(this.ctx),this.ctx.core=new dD(this.ctx.el,this.ctx),this.ctx.config=new Mn({}),this.ctx.data=new Uh(this.ctx),this.ctx.grid=new Pv(this.ctx),this.ctx.graphics=new De(this.ctx),this.ctx.coreUtils=new Gt(this.ctx),this.ctx.crosshairs=new ed(this.ctx),this.ctx.events=new Ij(this.ctx),this.ctx.exports=new hn(this.ctx),this.ctx.fill=new wi(this.ctx),this.ctx.localization=new Rj(this.ctx),this.ctx.options=new us,this.ctx.responsive=new Oj(this.ctx),this.ctx.series=new ni(this.ctx),this.ctx.theme=new Nj(this.ctx),this.ctx.formatters=new Yn(this.ctx),this.ctx.titleSubtitle=new Wj(this.ctx),this.ctx.legend=new Iv(this.ctx),this.ctx.toolbar=new Rv(this.ctx),this.ctx.tooltip=new Tg(this.ctx),this.ctx.dimensions=new ua(this.ctx),this.ctx.updateHelpers=new hD(this.ctx),this.ctx.zoomPanSelection=new Xj(this.ctx),this.ctx.w.globals.tooltip=new Tg(this.ctx)}}]),s}(),Wg=function(){function s(e){Oe(this,s),this.ctx=e,this.w=e.w}return Ne(s,[{key:"clear",value:function(e){var i=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:i})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var i=this,t=e.isUpdating,r=this.w.globals.dom.Paper.node;r.parentNode&&r.parentNode.parentNode&&!t&&(r.parentNode.parentNode.style.minHeight="unset");var u=this.w.globals.dom.baseEl;u&&this.ctx.eventList.forEach(function(a){u.removeEventListener(a,i.ctx.events.documentEvent)});var n=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(n.Paper),n.Paper.remove(),n.elWrap=null,n.elGraphical=null,n.elLegendWrap=null,n.elLegendForeign=null,n.baseEl=null,n.elGridRect=null,n.elGridRectMask=null,n.elGridRectBarMask=null,n.elGridRectMarkerMask=null,n.elForecastMask=null,n.elNonForecastMask=null,n.elDefs=null}}]),s}(),nc=new WeakMap,FD=function(){function s(e,i){Oe(this,s),this.opts=i,this.ctx=this,this.w=new $j(i).init(),this.el=e,this.w.globals.cuid=pe.randomId(),this.w.globals.chartID=this.w.config.chart.id?pe.escapeString(this.w.config.chart.id):this.w.globals.cuid,new Ng(this).initModules(),this.create=pe.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return Ne(s,[{key:"render",value:function(){var e=this;return new Promise(function(i,t){if(pe.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var r=e.w.config.chart.events.beforeMount;typeof r=="function"&&r(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(c,d){var F=!1;if(c.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var p=c.getBoundingClientRect();c.style.display!=="none"&&p.width!==0||(F=!0)}var f=new ResizeObserver(function(m){F&&d.call(c,m),F=!0});c.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(c.children).forEach(function(m){return f.observe(m)}):f.observe(c),nc.set(d,f)}(e.el.parentNode,e.parentResizeHandler);var u=e.el.getRootNode&&e.el.getRootNode(),n=pe.is("ShadowRoot",u),a=e.el.ownerDocument,o=n?u.getElementById("apexcharts-css"):a.getElementById("apexcharts-css");if(!o){var h;(o=document.createElement("style")).id="apexcharts-css",o.textContent=`@keyframes opaque {
  0% {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes resizeanim {

  0%,
  to {
    opacity: 0
  }
}

.apexcharts-canvas {
  position: relative;
  direction: ltr !important;
  user-select: none
}

.apexcharts-canvas ::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 6px
}

.apexcharts-canvas ::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, .5);
  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}

.apexcharts-inner {
  position: relative
}

.apexcharts-text tspan {
  font-family: inherit
}

rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
  transition: .15s ease all;
  opacity: .2
}

.apexcharts-legend-text {
  padding-left: 15px;
  margin-left: -15px;
}

.apexcharts-series-collapsed {
  opacity: 0
}

.apexcharts-tooltip {
  border-radius: 5px;
  box-shadow: 2px 2px 6px -4px #999;
  cursor: default;
  font-size: 14px;
  left: 62px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  z-index: 12;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-theme-light {
  border: 1px solid #e3e3e3;
  background: rgba(255, 255, 255, .96)
}

.apexcharts-tooltip.apexcharts-theme-dark {
  color: #fff;
  background: rgba(30, 30, 30, .8)
}

.apexcharts-tooltip * {
  font-family: inherit
}

.apexcharts-tooltip-title {
  padding: 6px;
  font-size: 15px;
  margin-bottom: 4px
}

.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
  background: #eceff1;
  border-bottom: 1px solid #ddd
}

.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
  background: rgba(0, 0, 0, .7);
  border-bottom: 1px solid #333
}

.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
  display: inline-block;
  margin-left: 5px;
  font-weight: 600
}

.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
  display: none
}

.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  padding: 6px 0 5px
}

.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  display: flex
}

.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
  margin-top: -6px
}

.apexcharts-tooltip-marker {
  display: inline-block;
  position: relative;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
  margin-right: 4px;
  text-align: center;
  vertical-align: middle;
  color: inherit;
}

.apexcharts-tooltip-marker::before {
  content: "";
  display: inline-block;
  width: 100%;
  text-align: center;
  color: currentcolor;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-size: 26px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 14px;
  font-weight: 900;
}

.apexcharts-tooltip-marker[shape="circle"]::before {
  content: "\\25CF";
}

.apexcharts-tooltip-marker[shape="square"]::before,
.apexcharts-tooltip-marker[shape="rect"]::before {
  content: "\\25A0";
  transform: translate(-1px, -2px);
}

.apexcharts-tooltip-marker[shape="line"]::before {
  content: "\\2500";
}

.apexcharts-tooltip-marker[shape="diamond"]::before {
  content: "\\25C6";
  font-size: 28px;
}

.apexcharts-tooltip-marker[shape="triangle"]::before {
  content: "\\25B2";
  font-size: 22px;
}

.apexcharts-tooltip-marker[shape="cross"]::before {
  content: "\\2715";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="plus"]::before {
  content: "\\2715";
  transform: rotate(45deg) translate(-1px, -1px);
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="star"]::before {
  content: "\\2605";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="sparkle"]::before {
  content: "\\2726";
  font-size: 20px;
}

.apexcharts-tooltip-series-group {
  padding: 0 10px;
  display: none;
  text-align: left;
  justify-content: left;
  align-items: center
}

.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
  opacity: 1
}

.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
  padding-bottom: 4px
}

.apexcharts-tooltip-y-group {
  padding: 6px 0 5px
}

.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
  padding: 4px 8px
}

.apexcharts-tooltip-boxPlot {
  display: flex;
  flex-direction: column-reverse
}

.apexcharts-tooltip-box>div {
  margin: 4px 0
}

.apexcharts-tooltip-box span.value {
  font-weight: 700
}

.apexcharts-tooltip-rangebar {
  padding: 5px 8px
}

.apexcharts-tooltip-rangebar .category {
  font-weight: 600;
  color: #777
}

.apexcharts-tooltip-rangebar .series-name {
  font-weight: 700;
  display: block;
  margin-bottom: 5px
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  opacity: 0;
  pointer-events: none;
  color: #373d3f;
  font-size: 13px;
  text-align: center;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
  background: #eceff1;
  border: 1px solid #90a4ae
}

.apexcharts-xaxistooltip {
  padding: 9px 10px;
  transition: .15s ease all
}

.apexcharts-xaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
  left: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-xaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-left: -6px
}

.apexcharts-xaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-left: -7px
}

.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
  bottom: 100%
}

.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
  top: 100%
}

.apexcharts-xaxistooltip-bottom:after {
  border-bottom-color: #eceff1
}

.apexcharts-xaxistooltip-bottom:before {
  border-bottom-color: #90a4ae
}

.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
  border-bottom-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip-top:after {
  border-top-color: #eceff1
}

.apexcharts-xaxistooltip-top:before {
  border-top-color: #90a4ae
}

.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
  border-top-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-yaxistooltip {
  padding: 4px 10px
}

.apexcharts-yaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-yaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-top: -6px
}

.apexcharts-yaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-top: -7px
}

.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
  left: 100%
}

.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
  right: 100%
}

.apexcharts-yaxistooltip-left:after {
  border-left-color: #eceff1
}

.apexcharts-yaxistooltip-left:before {
  border-left-color: #90a4ae
}

.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
  border-left-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip-right:after {
  border-right-color: #eceff1
}

.apexcharts-yaxistooltip-right:before {
  border-right-color: #90a4ae
}

.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
  border-right-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip.apexcharts-active {
  opacity: 1
}

.apexcharts-yaxistooltip-hidden {
  display: none
}

.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
  pointer-events: none;
  opacity: 0;
  transition: .15s ease all
}

.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-ycrosshairs-hidden {
  opacity: 0
}

.apexcharts-selection-rect {
  cursor: move
}

.svg_select_shape {
  stroke-width: 1;
  stroke-dasharray: 10 10;
  stroke: black;
  stroke-opacity: 0.1;
  pointer-events: none;
  fill: none;
}

.svg_select_handle {
  stroke-width: 3;
  stroke: black;
  fill: none;
}

.svg_select_handle_r {
  cursor: e-resize;
}

.svg_select_handle_l {
  cursor: w-resize;
}

.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
  cursor: crosshair
}

.apexcharts-svg.apexcharts-zoomable.hovering-pan {
  cursor: move
}

.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  cursor: pointer;
  width: 20px;
  height: 20px;
  line-height: 24px;
  color: #6e8192;
  text-align: center
}

.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
  fill: #6e8192
}

.apexcharts-selection-icon svg {
  fill: #444;
  transform: scale(.76)
}

.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
  fill: #f3f4f5
}

.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
  fill: #008ffb
}

.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
  fill: #333
}

.apexcharts-menu-icon,
.apexcharts-selection-icon {
  position: relative
}

.apexcharts-reset-icon {
  margin-left: 5px
}

.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
  transform: scale(.85)
}

.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  transform: scale(.7)
}

.apexcharts-zoomout-icon {
  margin-right: 3px
}

.apexcharts-pan-icon {
  transform: scale(.62);
  position: relative;
  left: 1px;
  top: 0
}

.apexcharts-pan-icon svg {
  fill: #fff;
  stroke: #6e8192;
  stroke-width: 2
}

.apexcharts-pan-icon.apexcharts-selected svg {
  stroke: #008ffb
}

.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
  stroke: #333
}

.apexcharts-toolbar {
  position: absolute;
  z-index: 11;
  max-width: 176px;
  text-align: right;
  border-radius: 3px;
  padding: 0 6px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.apexcharts-menu {
  background: #fff;
  position: absolute;
  top: 100%;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px;
  right: 10px;
  opacity: 0;
  min-width: 110px;
  transition: .15s ease all;
  pointer-events: none
}

.apexcharts-menu.apexcharts-menu-open {
  opacity: 1;
  pointer-events: all;
  transition: .15s ease all
}

.apexcharts-menu-item {
  padding: 6px 7px;
  font-size: 12px;
  cursor: pointer
}

.apexcharts-theme-light .apexcharts-menu-item:hover {
  background: #eee
}

.apexcharts-theme-dark .apexcharts-menu {
  background: rgba(0, 0, 0, .7);
  color: #fff
}

@media screen and (min-width:768px) {
  .apexcharts-canvas:hover .apexcharts-toolbar {
    opacity: 1
  }
}

.apexcharts-canvas .apexcharts-element-hidden,
.apexcharts-datalabel.apexcharts-element-hidden,
.apexcharts-hide .apexcharts-series-points {
  opacity: 0;
}

.apexcharts-hidden-element-shown {
  opacity: 1;
  transition: 0.25s ease all;
}

.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-datalabels,
.apexcharts-pie-label {
  cursor: default;
  pointer-events: none
}

.apexcharts-pie-label-delay {
  opacity: 0;
  animation-name: opaque;
  animation-duration: .3s;
  animation-fill-mode: forwards;
  animation-timing-function: ease
}

.apexcharts-radialbar-label {
  cursor: pointer;
}

.apexcharts-annotation-rect,
.apexcharts-area-series .apexcharts-area,
.apexcharts-gridline,
.apexcharts-line,
.apexcharts-point-annotation-label,
.apexcharts-radar-series path:not(.apexcharts-marker),
.apexcharts-radar-series polygon,
.apexcharts-toolbar svg,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-xaxis-annotation-label,
.apexcharts-yaxis-annotation-label,
.apexcharts-zoom-rect,
.no-pointer-events {
  pointer-events: none
}

.apexcharts-tooltip-active .apexcharts-marker {
  transition: .15s ease all
}

.apexcharts-radar-series .apexcharts-yaxis {
  pointer-events: none;
}

.resize-triggers {
  animation: 1ms resizeanim;
  visibility: hidden;
  opacity: 0;
  height: 100%;
  width: 100%;
  overflow: hidden
}

.contract-trigger:before,
.resize-triggers,
.resize-triggers>div {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0
}

.resize-triggers>div {
  height: 100%;
  width: 100%;
  background: #eee;
  overflow: auto
}

.contract-trigger:before {
  overflow: hidden;
  width: 200%;
  height: 200%
}

.apexcharts-bar-goals-markers {
  pointer-events: none
}

.apexcharts-bar-shadows {
  pointer-events: none
}

.apexcharts-rangebar-goals-markers {
  pointer-events: none
}`;var g=((h=e.opts.chart)===null||h===void 0?void 0:h.nonce)||e.w.config.chart.nonce;g&&o.setAttribute("nonce",g),n?u.prepend(o):a.head.appendChild(o)}var l=e.create(e.w.config.series,{});if(!l)return i(e);e.mount(l).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),i(l)}).catch(function(c){t(c)})}else t(new Error("Element not found"))})}},{key:"create",value:function(e,i){var t=this,r=this.w;new Ng(this).initModules();var u=this.w.globals;if(u.noData=!1,u.animationEnded=!1,!pe.elementExists(this.el))return u.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(i),r.config.xaxis.convertedCatToNumeric&&new Dn(r.config).convertCatToNumericXaxis(r.config,this.ctx),this.core.setupElements(),r.config.chart.type==="treemap"&&(r.config.grid.show=!1,r.config.yaxis[0].show=!1),u.svgWidth===0)return u.animationEnded=!0,null;var n=e;e.forEach(function(c,d){c.hidden&&(n=t.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:d}))});var a=Gt.checkComboSeries(n,r.config.chart.type);u.comboCharts=a.comboCharts,u.comboBarCount=a.comboBarCount;var o=n.every(function(c){return c.data&&c.data.length===0});(n.length===0||o&&u.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(n),this.theme.init(),new ju(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),u.noData&&u.collapsedSeries.length!==u.series.length&&!r.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),u.axisCharts&&(this.core.coreCalculations(),r.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=r.globals.minX,this.ctx.toolbar.maxX=r.globals.maxX),this.formatters.heatmapLabelFormatters(),new Gt(this).getLargestMarkerSize(),this.dimensions.plotCoords();var h=this.core.xySettings();this.grid.createGridMask();var g=this.core.plotChartType(n,h),l=new lu(this);return l.bringForward(),r.config.dataLabels.background.enabled&&l.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:g,xyRatios:h,dimensions:{plot:{left:r.globals.translateX,top:r.globals.translateY,width:r.globals.gridWidth,height:r.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=this,r=t.w;return new Promise(function(u,n){if(t.el===null)return n(new Error("Not enough data to display or target element not found"));(i===null||r.globals.allSeriesCollapsed)&&t.series.handleNoData(),t.grid=new Pv(t);var a,o,h=t.grid.drawGrid();if(t.annotations=new Pj(t),t.annotations.drawImageAnnos(),t.annotations.drawTextAnnos(),r.config.grid.position==="back"&&(h&&r.globals.dom.elGraphical.add(h.el),h!=null&&(a=h.elGridBorders)!==null&&a!==void 0&&a.node&&r.globals.dom.elGraphical.add(h.elGridBorders)),Array.isArray(i.elGraph))for(var g=0;g<i.elGraph.length;g++)r.globals.dom.elGraphical.add(i.elGraph[g]);else r.globals.dom.elGraphical.add(i.elGraph);r.config.grid.position==="front"&&(h&&r.globals.dom.elGraphical.add(h.el),h!=null&&(o=h.elGridBorders)!==null&&o!==void 0&&o.node&&r.globals.dom.elGraphical.add(h.elGridBorders)),r.config.xaxis.crosshairs.position==="front"&&t.crosshairs.drawXCrosshairs(),r.config.yaxis[0].crosshairs.position==="front"&&t.crosshairs.drawYCrosshairs(),r.config.chart.type!=="treemap"&&t.axes.drawAxis(r.config.chart.type,h);var l=new _n(e.ctx,h),c=new Yh(e.ctx,h);if(h!==null&&(l.xAxisLabelCorrections(h.xAxisTickWidth),c.setYAxisTextAlignments(),r.config.yaxis.map(function(F,p){r.globals.ignoreYAxisIndexes.indexOf(p)===-1&&c.yAxisTitleRotate(p,F.opposite)})),t.annotations.drawAxesAnnotations(),!r.globals.noData){if(r.config.tooltip.enabled&&!r.globals.noData&&t.w.globals.tooltip.drawTooltip(i.xyRatios),r.globals.axisCharts&&(r.globals.isXNumeric||r.config.xaxis.convertedCatToNumeric||r.globals.isRangeBar))(r.config.chart.zoom.enabled||r.config.chart.selection&&r.config.chart.selection.enabled||r.config.chart.pan&&r.config.chart.pan.enabled)&&t.zoomPanSelection.init({xyRatios:i.xyRatios});else{var d=r.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(F){d[F]=!1})}r.config.chart.toolbar.show&&!r.globals.allSeriesCollapsed&&t.toolbar.createToolbar()}r.globals.memory.methodsToExec.length>0&&r.globals.memory.methodsToExec.forEach(function(F){F.method(F.params,!1,F.context)}),r.globals.axisCharts||r.globals.noData||t.core.resizeNonAxisCharts(),u(t)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(i,t){var r=nc.get(t);r&&(r.disconnect(),nc.delete(t))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(i,t){i.id===pe.escapeString(e)&&Apex._chartInstances.splice(t,1)}),new Wg(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var i=this,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],r=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],n=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(o,h){return i.updateHelpers._extendSeries(o,h)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,t,r,u,n)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,i,t)}},{key:"appendSeries",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],r=this.w.config.series.slice();return r.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(r,i,t)}},{key:"appendData",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=this;t.w.globals.dataChanged=!0,t.series.getPreviousPaths();for(var r=t.w.config.series.slice(),u=0;u<r.length;u++)if(e[u]!==null&&e[u]!==void 0)for(var n=0;n<e[u].data.length;n++)r[u].data.push(e[u].data[n]);return t.w.config.series=r,i&&(t.w.globals.initialSeries=pe.clone(t.w.config.series)),this.update()}},{key:"update",value:function(e){var i=this;return new Promise(function(t,r){new Wg(i.ctx).clear({isUpdating:!0});var u=i.create(i.w.config.series,e);if(!u)return t(i);i.mount(u).then(function(){typeof i.w.config.chart.events.updated=="function"&&i.w.config.chart.events.updated(i,i.w),i.events.fireEvent("updated",[i,i.w]),i.w.globals.isDirty=!0,t(i)}).catch(function(n){r(n)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),i=[this];return e.length&&(i=[],e.forEach(function(t){i.push(t)})),i}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(i){if(i.group)return!0}).map(function(i){return e.w.config.chart.group===i.group?i.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,i){return this.series.toggleSeriesOnHover(e,i)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,i)}},{key:"addEventListener",value:function(e,i){this.events.addEventListener(e,i)}},{key:"removeEventListener",value:function(e,i){this.events.removeEventListener(e,i)}},{key:"addXaxisAnnotation",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;t&&(r=t),r.annotations.addXaxisAnnotationExternal(e,i,r)}},{key:"addYaxisAnnotation",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;t&&(r=t),r.annotations.addYaxisAnnotationExternal(e,i,r)}},{key:"addPointAnnotation",value:function(e){var i=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,r=this;t&&(r=t),r.annotations.addPointAnnotationExternal(e,i,r)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,i=this;e&&(i=e),i.annotations.clearAnnotations(i)}},{key:"removeAnnotation",value:function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,t=this;i&&(t=i),t.annotations.removeAnnotation(t,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,i){return this.coreUtils.getSeriesTotalsXRange(e,i)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Qc(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Qc(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,i){return this.updateHelpers.toggleDataPointSelection(e,i)}},{key:"zoomX",value:function(e,i){this.ctx.toolbar.zoomUpdateOptions(e,i)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new hn(this.ctx).dataURI(e)}},{key:"getSvgString",value:function(e){return new hn(this.ctx).getSvgString(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new hn(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var i=pe.escapeString(e);if(Apex._chartInstances){var t=Apex._chartInstances.filter(function(r){return r.id===i})[0];return t&&t.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i<e.length;i++)new s(e[i],JSON.parse(e[i].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,i){var t=this.getChartByID(e);if(t){t.w.globals.isExecCalled=!0;var r=null;if(t.publicMethods.indexOf(i)!==-1){for(var u=arguments.length,n=new Array(u>2?u-2:0),a=2;a<u;a++)n[a-2]=arguments[a];r=t[i].apply(t,n)}return r}}},{key:"merge",value:function(e,i){return pe.extend(e,i)}}]),s}();function zr(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Vi(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Ro(s,e){return Array.isArray(s)?pD(s,e):s&&typeof s=="object"?fD(s):s||""}function pD(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Ro(s[n]))&&(u&&e[n]&&(i=Vi(i)),t=t+r+i,r=" ");return t}function fD(s){var e="",i="";for(var t in s)t&&s[t]&&mD.call(s,t)&&(e=e+i+t,i=" ");return e}function Vi(s){var e=""+s,i=vD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var mD=Object.prototype.hasOwnProperty,vD=/["&<>]/;function Vv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Vv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function bD(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l,c,d,F,p){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.privacyEditor=t=function(f){var m=this&&this.block,v=this&&this.attributes||{};if(u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-public-container">',u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' id="g-access-private" type="radio" name="privacy"'+zr("checked",F?void 0:"checked",!0,!1))+"/>",u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-lock"></i>',u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<b>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Private</b>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" &mdash; Access is required to view this ",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=f)==null?"":t)+"</label></div>",u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' id="g-access-public" type="radio" name="privacy"'+zr("checked",F?"checked":void 0,!0,!1))+"/>",u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-globe"></i>',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<b>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Public</b>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" &mdash; Anyone can view this ",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=f)==null?"":t)+"</label></div>",u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",a.keys(o).length){u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<a class="g-action-manage-public-flags hide" title="Public access flags">',u=18,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="g-flag-icon icon-flag">',u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var w=p&&p.length||0;u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+zr("class",Ro(["g-flag-count-indicator",w?null:"hide"],[!1,!0]),!1,!1)+">",u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=w)==null?"":t)+"</div></i>",u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" Manage public access flags...</a>",u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-public-flags-popover-container hide">',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",function(){var x=o;if(typeof x.length=="number")for(var A=0,b=x.length;A<b;A++){var y=x[A];u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var k=a.contains(p,A)?"checked":null;u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var C=!c&&y.admin?"disabled":null;u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+zr("class",Ro(["checkbox",C],[!1,!0]),!1,!1)+">",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label"+(' class="g-flag-label"'+zr("title",y.description,!0,!1))+">",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' class="g-public-flag-checkbox"'+zr("flag",A,!0,!1)+' type="checkbox"'+zr("checked",k,!0,!1)+zr("disabled",C,!0,!1))+"/>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<span>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=y.name)==null?"":t)+"</span></label></div>"}else{var b=0;for(var A in x){b++;var y=x[A];u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var k=a.contains(p,A)?"checked":null;u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var C=!c&&y.admin?"disabled":null;u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+zr("class",Ro(["checkbox",C],[!1,!0]),!1,!1)+">",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label"+(' class="g-flag-label"'+zr("title",y.description,!0,!1))+">",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' class="g-public-flag-checkbox"'+zr("flag",A,!0,!1)+' type="checkbox"'+zr("checked",k,!0,!1)+zr("disabled",C,!0,!1))+"/>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<span>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=y.name)==null?"":t)+"</span></label></div>"}}}.call(this),u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<button class="g-close-public-flags-popover btn btn-xs btn-default">',u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Close</button></div>"}e=e+"</div>"},u=32,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.permissionsEditor=t=function(){var f=this&&this.block,m=this&&this.attributes||{};u=33,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-permissions-editor">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-ac-list-title">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-key-1"></i>',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"  Permissions</div>",u=35,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-ac-list">',u=36,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div id="g-ac-list-groups"></div>',u=37,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div id="g-ac-list-users"></div></div>',u=39,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-grant-access-container">',u=40,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<form role="form">',u=41,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="form-group">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<label for="addAccess">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Grant access to another group or user</label>",u=43,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-search-field-container"></div></div></form></div></div>'},u=45,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.recurseOption=t=function(f){var m=this&&this.block,v=this&&this.attributes||{};u=46,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-recursive-container">',u=47,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=48,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=49,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<input id="g-apply-nonrecursive" type="radio" name="recurse" checked="checked"/>',u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Apply permissions only to this ",u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=f)==null?"":t),u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+", not its subfolders</label></div>",u=51,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=52,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=53,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<input id="g-apply-recursive" type="radio" name="recurse"/>',u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Also set permissions on all subfolders to match this ",u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Vi((t=f)==null?"":t),u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"'s permissions</label></div></div>"},u=56,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.saveAccessButton=t=function(){var f=this&&this.block,m=this&&this.attributes||{};u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<button class="g-save-access-list btn btn-small btn-primary">',u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-ok"></i>',u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"  Save</button>"},u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",h||(u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",i.privacyEditor(d)),u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",i.permissionsEditor(),u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",g||(u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",i.recurseOption(d)),u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",l||(u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorNonModal.pug",i.saveAccessButton())}).call(this,"_"in n?n._:typeof _<"u"?_:void 0,"flagList"in n?n.flagList:typeof flagList<"u"?flagList:void 0,"hidePrivacyEditor"in n?n.hidePrivacyEditor:typeof hidePrivacyEditor<"u"?hidePrivacyEditor:void 0,"hideRecurseOption"in n?n.hideRecurseOption:typeof hideRecurseOption<"u"?hideRecurseOption:void 0,"hideSaveButton"in n?n.hideSaveButton:typeof hideSaveButton<"u"?hideSaveButton:void 0,"isAdmin"in n?n.isAdmin:typeof isAdmin<"u"?isAdmin:void 0,"modelType"in n?n.modelType:typeof modelType<"u"?modelType:void 0,"publicFlag"in n?n.publicFlag:typeof publicFlag<"u"?publicFlag:void 0,"publicFlags"in n?n.publicFlags:typeof publicFlags<"u"?publicFlags:void 0)}catch(a){Vv(a,r,u)}return e}function Hr(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Si(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Bo(s,e){return Array.isArray(s)?wD(s,e):s&&typeof s=="object"?yD(s):s||""}function wD(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Bo(s[n]))&&(u&&e[n]&&(i=Si(i)),t=t+r+i,r=" ");return t}function yD(s){var e="",i="";for(var t in s)t&&s[t]&&xD.call(s,t)&&(e=e+i+t,i=" ");return e}function Si(s){var e=""+s,i=CD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var xD=Object.prototype.hasOwnProperty,CD=/["&<>]/;function Xv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Xv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function ED(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l,c,d,F,p){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.privacyEditor=t=function(f){var m=this&&this.block,v=this&&this.attributes||{};if(u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-public-container">',u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' id="g-access-private" type="radio" name="privacy"'+Hr("checked",F?void 0:"checked",!0,!1))+"/>",u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-lock"></i>',u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<b>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Private</b>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" &mdash; Access is required to view this ",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=f)==null?"":t)+"</label></div>",u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' id="g-access-public" type="radio" name="privacy"'+Hr("checked",F?"checked":void 0,!0,!1))+"/>",u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-globe"></i>',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<b>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Public</b>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" &mdash; Anyone can view this ",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=f)==null?"":t)+"</label></div>",u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",a.keys(o).length){u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<a class="g-action-manage-public-flags hide" title="Public access flags">',u=18,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="g-flag-icon icon-flag">',u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var w=p&&p.length||0;u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+Hr("class",Bo(["g-flag-count-indicator",w?null:"hide"],[!1,!0]),!1,!1)+">",u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=w)==null?"":t)+"</div></i>",u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+" Manage public access flags...</a>",u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-public-flags-popover-container hide">',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",function(){var x=o;if(typeof x.length=="number")for(var A=0,b=x.length;A<b;A++){var y=x[A];u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var k=a.contains(p,A)?"checked":null;u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var C=!l&&y.admin?"disabled":null;u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+Hr("class",Bo(["checkbox",C],[!1,!0]),!1,!1)+">",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label"+(' class="g-flag-label"'+Hr("title",y.description,!0,!1))+">",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' class="g-public-flag-checkbox"'+Hr("flag",A,!0,!1)+' type="checkbox"'+Hr("checked",k,!0,!1)+Hr("disabled",C,!0,!1))+"/>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<span>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=y.name)==null?"":t)+"</span></label></div>"}else{var b=0;for(var A in x){b++;var y=x[A];u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var k=a.contains(p,A)?"checked":null;u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug";var C=!l&&y.admin?"disabled":null;u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<div"+Hr("class",Bo(["checkbox",C],[!1,!0]),!1,!1)+">",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label"+(' class="g-flag-label"'+Hr("title",y.description,!0,!1))+">",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<input"+(' class="g-public-flag-checkbox"'+Hr("flag",A,!0,!1)+' type="checkbox"'+Hr("checked",k,!0,!1)+Hr("disabled",C,!0,!1))+"/>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<span>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=y.name)==null?"":t)+"</span></label></div>"}}}.call(this),u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<button class="g-close-public-flags-popover btn btn-xs btn-default">',u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Close</button></div>"}e=e+"</div>"},u=32,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.permissionsEditor=t=function(){var f=this&&this.block,m=this&&this.attributes||{};u=33,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-permissions-editor">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-ac-list-title">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-key-1"></i>',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"  Permissions</div>",u=35,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-ac-list">',u=36,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div id="g-ac-list-groups"></div>',u=37,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div id="g-ac-list-users"></div></div>',u=39,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-grant-access-container">',u=40,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<form role="form">',u=41,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="form-group">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<label for="addAccess">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Grant access to another group or user</label>",u=43,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-search-field-container"></div></div></form></div></div>'},u=45,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.recurseOption=t=function(f){var m=this&&this.block,v=this&&this.attributes||{};u=46,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="g-recursive-container">',u=47,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=48,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=49,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<input id="g-apply-nonrecursive" type="radio" name="recurse" checked="checked"/>',u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Apply permissions only to this ",u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=f)==null?"":t),u=50,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+", not its subfolders</label></div>",u=51,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<div class="radio">',u=52,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"<label>",u=53,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<input id="g-apply-recursive" type="radio" name="recurse"/>',u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"Also set permissions on all subfolders to match this ",u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+Si((t=f)==null?"":t),u=54,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"'s permissions</label></div></div>"},u=56,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",i.saveAccessButton=t=function(){var f=this&&this.block,m=this&&this.attributes||{};u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<button class="g-save-access-list btn btn-small btn-primary">',u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"",u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+'<i class="icon-ok"></i>',u=57,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditorMixins.pug",e=e+"  Save</button>"},u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="modal-dialog">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="modal-content">',u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="modal-header">',u=6,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',u=6,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+"&times;</button>",u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<h4 class="modal-title">',u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+"Access control</h4>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="g-dialog-subtitle">',u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",d==="folder"?(u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<i class="icon-folder"></i>'):d==="collection"&&(u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<i class="icon-sitemap"></i>'),u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+Si((t=c.name())==null?"":t)+"</div></div>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="modal-body g-access-modal-body">',u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",h||(u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",i.privacyEditor(d)),u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",i.permissionsEditor(),u=18,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",g||(u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",i.recurseOption(d)),e=e+"</div>",u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<div class="modal-footer">',u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",e=e+"Close</a>",u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEditor.pug",i.saveAccessButton(),e=e+"</div></div></div>"}).call(this,"_"in n?n._:typeof _<"u"?_:void 0,"flagList"in n?n.flagList:typeof flagList<"u"?flagList:void 0,"hidePrivacyEditor"in n?n.hidePrivacyEditor:typeof hidePrivacyEditor<"u"?hidePrivacyEditor:void 0,"hideRecurseOption"in n?n.hideRecurseOption:typeof hideRecurseOption<"u"?hideRecurseOption:void 0,"isAdmin"in n?n.isAdmin:typeof isAdmin<"u"?isAdmin:void 0,"model"in n?n.model:typeof model<"u"?model:void 0,"modelType"in n?n.modelType:typeof modelType<"u"?modelType:void 0,"publicFlag"in n?n.publicFlag:typeof publicFlag<"u"?publicFlag:void 0,"publicFlags"in n?n.publicFlags:typeof publicFlags<"u"?publicFlags:void 0)}catch(a){Xv(a,r,u)}return e}function Lt(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ns(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Xs(s,e){return Array.isArray(s)?AD(s,e):s&&typeof s=="object"?kD(s):s||""}function AD(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Xs(s[n]))&&(u&&e[n]&&(i=ns(i)),t=t+r+i,r=" ");return t}function kD(s){var e="",i="";for(var t in s)t&&s[t]&&SD.call(s,t)&&(e=e+i+t,i=" ");return e}function ns(s){var e=""+s,i=jD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var SD=Object.prototype.hasOwnProperty,jD=/["&<>]/;function Gv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Gv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function vo(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,p,c,d,F){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<div"+(Lt("class",Xs([`g-${F}-access-entry`],[!0]),!1,!1)+Lt("resourceid",o.id,!0,!1))+">",r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-access-col-left">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug";var p=F==="group"?"users":"user";r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-access-icon">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<i"+Lt("class",Xs([`icon-${p}`],[!0]),!1,!1)+"></i></div>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-access-desc">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-desc-title">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+ns((i=o.title)==null?"":i)+"</div>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-desc-subtitle">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+ns((i=o.subtitle)==null?"":i)+"</div></div></div>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-access-col-right">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",g||(r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<select class="form-control input-sm">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<option"+(Lt("value",a.READ,!0,!1)+Lt("selected",o.level===a.READ?"selected":null,!0,!1))+">",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"Can view</option>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<option"+(Lt("value",a.WRITE,!0,!1)+Lt("selected",o.level===a.WRITE?"selected":null,!0,!1))+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"Can edit</option>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<option"+(Lt("value",a.ADMIN,!0,!1)+Lt("selected",o.level===a.ADMIN?"selected":null,!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"Is owner</option></select>"),r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<div class="g-access-action-container">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",!d&&n.keys(h).length&&(r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<a class="g-action-manage-flags" title="Access flags">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<i class="g-flag-icon icon-flag">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<div"+Lt("class",Xs(["g-flag-count-indicator",o.flags&&o.flags.length?null:"hide"],[!1,!0]),!1,!1)+">",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+ns((i=(o.flags||[]).length)==null?"":i)+"</div></i></a>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<div"+(' class="g-flags-popover-container hide"'+Lt("resourcetype",F,!0,!1)+Lt("resourceid",o.id,!0,!1)+' title="Access flags"')+">",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",function(){var f=h;if(typeof f.length=="number")for(var m=0,v=f.length;m<v;m++){var w=f[m];r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug";var x=n.contains(o.flags,m)?"checked":null;r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug";var A=!c&&w.admin?"disabled":null;r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<div"+Lt("class",Xs(["checkbox",A],[!1,!0]),!1,!1)+">",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<label"+(' class="g-flag-label"'+Lt("title",w.description,!0,!1))+">",r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<input"+(' class="g-flag-checkbox"'+Lt("resourcetype",F,!0,!1)+Lt("resourceid",o.id,!0,!1)+Lt("flag",m,!0,!1)+' type="checkbox"'+Lt("checked",x,!0,!1)+Lt("disabled",A,!0,!1))+"/>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+ns((i=w.name)==null?"":i)+"</span></label></div>"}else{var v=0;for(var m in f){v++;var w=f[m];r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug";var x=n.contains(o.flags,m)?"checked":null;r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug";var A=!c&&w.admin?"disabled":null;r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<div"+Lt("class",Xs(["checkbox",A],[!1,!0]),!1,!1)+">",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<label"+(' class="g-flag-label"'+Lt("title",w.description,!0,!1))+">",r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<input"+(' class="g-flag-checkbox"'+Lt("resourcetype",F,!0,!1)+Lt("resourceid",o.id,!0,!1)+Lt("flag",m,!0,!1)+' type="checkbox"'+Lt("checked",x,!0,!1)+Lt("disabled",A,!0,!1))+"/>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"<span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+ns((i=w.name)==null?"":i)+"</span></label></div>"}}}.call(this),r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<button class="g-close-flags-popover btn btn-xs btn-default">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+"Close</button></div>"),r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<a class="g-action-remove-access" title="Remove access">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/accessEntry.pug",e=e+'<i class="icon-cancel"></i></a></div></div></div>'}).call(this,"_"in u?u._:typeof _<"u"?_:void 0,"accessTypes"in u?u.accessTypes:typeof accessTypes<"u"?accessTypes:void 0,"entry"in u?u.entry:typeof entry<"u"?entry:void 0,"flagList"in u?u.flagList:typeof flagList<"u"?flagList:void 0,"hideAccessType"in u?u.hideAccessType:typeof hideAccessType<"u"?hideAccessType:void 0,"icon"in u?u.icon:typeof icon<"u"?icon:void 0,"isAdmin"in u?u.isAdmin:typeof isAdmin<"u"?isAdmin:void 0,"noAccessFlag"in u?u.noAccessFlag:typeof noAccessFlag<"u"?noAccessFlag:void 0,"type"in u?u.type:typeof type<"u"?type:void 0)}catch(n){Gv(n,t,r)}return e}function qv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void qv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function DD(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/loadingAnimation.pug",e=e+'<div id="g-loading-animation">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/loadingAnimation.pug",e=e+'<div class="g-loading-block" id="g-loading-block-1"></div>',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/loadingAnimation.pug",e=e+'<div class="g-loading-block" id="g-loading-block-2"></div>',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/loadingAnimation.pug",e=e+'<div class="g-loading-block" id="g-loading-block-3"></div></div>'}catch(r){qv(r,i,t)}return e}var Vn=We.extend({render:function(){return this.$el.html(DD()),this}}),Xa=We.extend({events:{"click button.g-save-access-list":function(s){me(s.currentTarget).girderEnable(!1),this.saveAccessList()},"click .g-close-flags-popover":function(s){me(s.currentTarget).parents(".g-access-action-container").find(".g-action-manage-flags").popover("hide")},"click .g-close-public-flags-popover":function(s){me(s.currentTarget).parents(".g-public-container").find(".g-action-manage-public-flags").popover("hide")},"click a.g-action-remove-access":"removeAccessEntry","change .g-public-container .radio input":"privacyChanged","change .g-flag-checkbox":"_toggleAccessFlag","change .g-public-flag-checkbox":"_togglePublicAccessFlag"},initialize:function(s){this.modelType=s.modelType,this.hideRecurseOption=s.hideRecurseOption||!1,this.hideSaveButton=s.hideSaveButton||!1,this.hidePrivacyEditor=s.hidePrivacyEditor||!1,this.hideAccessType=s.hideAccessType||!1,this.noAccessFlag=s.noAccessFlag||!1,this.modal=Fe.has(s,"modal")?s.modal:!0,this.currentUser=it(),this.isAdmin=!!(this.currentUser&&this.currentUser.get("admin")),this.searchWidget=new Ut({placeholder:"Start typing a name...",noResultsPage:!0,modes:["prefix","text"],types:["group","user"],parentView:this}).on("g:resultClicked",this.addEntry,this);var e=null;this.noAccessFlag?this.flagList=[]:e=Ve({url:"system/access_flag"}).done(i=>{this.flagList=i}),me.when(e,this.model.fetchAccess()).done(()=>{this.render()})},render:function(){if(!this.model.get("access")||!this.flagList){new Vn({el:this.$el,parentView:this}).render();return}var s;this.modal&&this.modelType==="folder"?(br("folderaccess"),s=function(){ar("folderaccess")}):this.modal&&(br("access"),s=function(){ar("access")});var e=this.modal?ED:bD;return this.$el.html(e({_:Fe,model:this.model,modelType:this.modelType,publicFlag:this.model.get("public"),publicFlags:this.model.get("publicFlags"),hideRecurseOption:this.hideRecurseOption,hideSaveButton:this.hideSaveButton,hidePrivacyEditor:this.hidePrivacyEditor,flagList:this.flagList,isAdmin:this.isAdmin})),this.modal&&this.$el.girderModal(this).on("hidden.bs.modal",s),Fe.each(this.model.get("access").groups,function(i){this.$("#g-ac-list-groups").append(vo({_:Fe,accessTypes:Xe,type:"group",flagList:this.flagList,isAdmin:this.isAdmin,hideAccessType:this.hideAccessType,noAccessFlag:this.noAccessFlag,entry:Fe.extend(i,{title:i.name,subtitle:i.description})}))},this),Fe.each(this.model.get("access").users,function(i){this.$("#g-ac-list-users").append(vo({_:Fe,accessTypes:Xe,type:"user",flagList:this.flagList,isAdmin:this.isAdmin,hideAccessType:this.hideAccessType,noAccessFlag:this.noAccessFlag,entry:Fe.extend(i,{title:i.name,subtitle:i.login})}))},this),this._makeTooltips(),this.searchWidget.setElement(this.$(".g-search-field-container")).render(),this.privacyChanged(),this},_makeTooltips:function(){Fe.each(this.$(".g-action-manage-flags"),s=>{me(s).data("bs.popover")||me(s).popover({trigger:"manual",placement:"left",viewport:{selector:"body",padding:10},content:function(){return me(this).parent().find(".g-flags-popover-container").html()},html:!0,sanitize:!1}).on("click",function(){me(this).popover("toggle")})}),Fe.each(this.$(".g-action-manage-public-flags"),s=>{me(s).data("bs.popover")||me(s).popover({trigger:"manual",placement:"right",viewport:{selector:"body",padding:10},content:function(){return me(this).parent().find(".g-public-flags-popover-container").html()},html:!0,sanitize:!1}).on("click",function(){me(this).popover("toggle")})})},addEntry:function(s){this.searchWidget.resetState(),s.type==="user"?this._addUserEntry(s):s.type==="group"&&this._addGroupEntry(s)},_addUserEntry:function(s){var e=!1;if(Fe.every(this.$(".g-user-access-entry"),function(t){return me(t).attr("resourceid")===s.id&&(e=!0),!e},this),!e){var i=new pr;i.set("_id",s.id).on("g:fetched",function(){this.$("#g-ac-list-users").append(vo({_:Fe,accessTypes:Xe,type:"user",entry:{title:i.name(),subtitle:i.get("login"),id:s.id,level:Xe.READ},isAdmin:this.isAdmin,hideAccessType:this.hideAccessType,noAccessFlag:this.noAccessFlag,flagList:this.flagList})),this._makeTooltips()},this).fetch()}},_addGroupEntry:function(s){var e=!1;if(Fe.every(this.$(".g-group-access-entry"),function(t){return me(t).attr("resourceid")===s.id&&(e=!0),!e},this),!e){var i=new bs;i.set("_id",s.id).on("g:fetched",function(){this.$("#g-ac-list-groups").append(vo({_:Fe,accessTypes:Xe,type:"group",entry:{title:i.name(),subtitle:i.get("description"),id:s.id,level:Xe.READ},isAdmin:this.isAdmin,hideAccessType:this.hideAccessType,noAccessFlag:this.noAccessFlag,flagList:this.flagList})),this._makeTooltips()},this).fetch()}},saveAccessList:function(){var s=this.getAccessList(),e=Fe.map(this.$(".g-public-flag-checkbox:checked"),t=>me(t).attr("flag"));this.model.set({access:s,public:this.$("#g-access-public").is(":checked"),publicFlags:e});var i=this.$("#g-apply-recursive").is(":checked");this.model.off("g:accessListSaved",null,this).on("g:accessListSaved",function(){this.modal&&this.$el.modal("hide"),this.trigger("g:accessListSaved",{recurse:i})},this).updateAccess({recurse:i,progress:!0})},getAccessList:function(){var s={users:[],groups:[]};return Fe.each(this.$(".g-group-access-entry"),function(e){var i=me(e);s.groups.push({name:i.find(".g-desc-title").html(),id:i.attr("resourceid"),level:parseInt(i.find(".g-access-col-right>select").val()||0,10),flags:Fe.map(i.find(".g-flag-checkbox:checked"),t=>me(t).attr("flag"))})},this),Fe.each(this.$(".g-user-access-entry"),function(e){var i=me(e);s.users.push({login:i.find(".g-desc-subtitle").html(),name:i.find(".g-desc-title").html(),id:i.attr("resourceid"),level:parseInt(i.find(".g-access-col-right>select").val()||0,10),flags:Fe.map(i.find(".g-flag-checkbox:checked"),t=>me(t).attr("flag"))})},this),s},removeAccessEntry:function(s){var e=".g-user-access-entry,.g-group-access-entry";me(s.currentTarget).parents(e).remove()},privacyChanged:function(){this.$(".g-public-container .radio").removeClass("g-selected");var s=this.$(".g-public-container .radio input:checked");s.parents(".radio").addClass("g-selected"),this.$("#g-access-public").is(":checked")?this.$(".g-action-manage-public-flags").removeClass("hide"):this.$(".g-action-manage-public-flags").addClass("hide")},_toggleAccessFlag:function(s){var e=me(s.currentTarget),i=e.attr("resourcetype"),t=e.attr("resourceid"),r=e.attr("flag"),u=this.$(`.g-flags-popover-container[resourcetype='${i}'][resourceid='${t}']`);u.find(`.g-flag-checkbox[flag="${r}"]`).attr("checked",e.is(":checked")?"checked":null),this._updateFlagCount(u,".g-flag-checkbox")},_togglePublicAccessFlag:function(s){var e=me(s.currentTarget),i=e.attr("flag"),t=this.$(".g-public-flags-popover-container");t.find(`.g-public-flag-checkbox[flag="${i}"]`).attr("checked",e.is(":checked")?"checked":null),this._updateFlagCount(t,".g-public-flag-checkbox")},_updateFlagCount:function(s,e){const i=s.find(`${e}[checked="checked"]`).length,t=s.parent().find(".g-flag-count-indicator");t.text(i),i?t.removeClass("hide"):t.addClass("hide")}});function bo(s){var e=""+s,i=MD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var MD=/["&<>]/;function Kv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Kv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function _D(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c,d,F,p){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<li class="g-checked-menu-header dropdown-header" role="presentation">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",o&&(r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-folder"></i>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<span class="g-checked-folder-count">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+bo((i=o)==null?"":i)+"</span>"),r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",h&&(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<span class="g-checked-item-count">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+bo((i=h)==null?"":i)+"</span>"),r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",d&&(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-plus-circled"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<span class="g-checked-picked-count">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+bo((i=d)==null?"":i)+"</span>"),e=e+"</li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",(o||h)&&(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"<li>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-download-checked">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-download"></i>',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Download checked resources</a></li>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"<li>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-pick-checked">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-plus-circled"></i>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Pick checked resources for Move or Copy</a></li>"),r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",a.getPickedResources()&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<li class="g-admin divider"></li>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",p&&(r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"<li>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-move-picked">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-move"></i>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Move picked resources here</a></li>"),r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",c&&(r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"<li>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-copy-picked">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-paste"></i>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Copy picked resources here</a></li>"),r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"<li>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-clear-picked">',r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-minus-circled"></i>',r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Clear picked resources",r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",F&&(r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+" (",r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+bo((i=F)==null?"":i),r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+")"),e=e+"</a></li>"),r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",(o||h)&&(r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",g>=n.ADMIN&&l>=n.WRITE&&(r=42,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<li class="g-admin divider"></li>',r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<li class="g-admin">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<a class="g-delete-checked">',r=45,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+'<i class="icon-trash"></i>',r=46,t="/home/circleci/project/girder/girder/web/src/templates/widgets/checkedActionsMenu.pug",e=e+"Delete checked resources</a></li>"))}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"HierarchyWidget"in u?u.HierarchyWidget:typeof HierarchyWidget<"u"?HierarchyWidget:void 0,"folderCount"in u?u.folderCount:typeof folderCount<"u"?folderCount:void 0,"itemCount"in u?u.itemCount:typeof itemCount<"u"?itemCount:void 0,"minFolderLevel"in u?u.minFolderLevel:typeof minFolderLevel<"u"?minFolderLevel:void 0,"minItemLevel"in u?u.minItemLevel:typeof minItemLevel<"u"?minItemLevel:void 0,"pickedCopyAllowed"in u?u.pickedCopyAllowed:typeof pickedCopyAllowed<"u"?pickedCopyAllowed:void 0,"pickedCount"in u?u.pickedCount:typeof pickedCount<"u"?pickedCount:void 0,"pickedDesc"in u?u.pickedDesc:typeof pickedDesc<"u"?pickedDesc:void 0,"pickedMoveAllowed"in u?u.pickedMoveAllowed:typeof pickedMoveAllowed<"u"?pickedMoveAllowed:void 0)}catch(n){Kv(n,t,r)}return e}var Jv=We.extend({initialize:function(s){this._fetchAndInit(s),this.dropdownToggle=s.dropdownToggle},render:function(){if(this.folderCount+this.itemCount+this.pickedCount===0){this.dropdownToggle.girderEnable(!1);return}return this.dropdownToggle.girderEnable(!0),this.$el.html(_D({minFolderLevel:this.minFolderLevel,minItemLevel:this.minItemLevel,folderCount:this.folderCount,itemCount:this.itemCount,AccessType:Xe,pickedCount:this.pickedCount,pickedCopyAllowed:this.pickedCopyAllowed,pickedMoveAllowed:this.pickedMoveAllowed,pickedDesc:this.pickedDesc,HierarchyWidget:Du})),this},update:function(s){this._fetchAndInit(s),this.render()},_fetchAndInit:function(s){this.minFolderLevel=s.minFolderLevel||Xe.READ,this.minItemLevel=s.minItemLevel||Xe.READ,this.folderCount=s.folderCount||0,this.itemCount=s.itemCount||0,this.pickedCount=s.pickedCount||0,this.pickedCopyAllowed=s.pickedCopyAllowed||!1,this.pickedMoveAllowed=s.pickedMoveAllowed||!1,this.pickedDesc=s.pickedDesc||""}});function LD(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=K0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function K0(s){var e=""+s,i=TD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var TD=/["&<>]/;function Zv(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Zv(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function PD(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",i.dateInfo=t=function(c,d){var F=this&&this.block,p=this&&this.attributes||{};u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"<div"+(' class="g-collection-info-line"'+LD("property",d,!0,!1))+">",u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<i class="icon-clock"></i>',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"<span>",u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=c)==null?"":t)+"</span>",u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<span class="g-bold-part">',u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=h(o.get(d),a))==null?"":t)+"</span></div>"},u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="modal-dialog">',u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="modal-content">',u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="modal-header">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"&times;</button>",u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<h4 class="modal-title">',u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"Collection information</h4>",u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-dialog-subtitle">',u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<i class="icon-sitemap"></i>',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"<span>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=o.name())==null?"":t)+"</span></div></div>",u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="modal-body">',u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",o.get("description")&&(u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-info-dialog-description">',u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+((t=l(o.get("description")))==null?"":t)+"</div>"),u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-collection-info-lines">',u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",i.dateInfo("Created ","created"),u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",o.get("created")!==o.get("updated")&&(u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",i.dateInfo("Last updated ","updated")),u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-collection-info-line" property="size">',u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<i class="icon-floppy"></i>',u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"Total size: ",u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<span class="g-bold-part">',u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=g(o.get("size")))==null?"":t)+"</span>",u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"</div>",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-collection-info-line" property="nFolders">',u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<i class="icon-folder"></i>',u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"Contains ",u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<span class="g-bold-part">',u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=o.get("nFolders"))==null?"":t)+"</span>",u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+" subfolders</div>",u=32,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="g-collection-info-line" property="id">',u=33,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<i class="icon-share"></i>',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"Unique ID: ",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<span class="g-bold-part">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+K0((t=o.id)==null?"":t)+"</span>",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"</div></div></div>",u=36,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<div class="modal-footer">',u=37,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',u=37,r="/home/circleci/project/girder/girder/web/src/templates/widgets/collectionInfoDialog.pug",e=e+"Close</a></div></div></div>"}).call(this,"DATE_SECOND"in n?n.DATE_SECOND:typeof DATE_SECOND<"u"?DATE_SECOND:void 0,"collection"in n?n.collection:typeof collection<"u"?collection:void 0,"formatDate"in n?n.formatDate:typeof formatDate<"u"?formatDate:void 0,"formatSize"in n?n.formatSize:typeof formatSize<"u"?formatSize:void 0,"renderMarkdown"in n?n.renderMarkdown:typeof renderMarkdown<"u"?renderMarkdown:void 0)}catch(a){Zv(a,r,u)}return e}var Qv=We.extend({initialize:function(){this.needToFetch=!this.model.has("nFolders"),(this.needToFetch||this.timestamp!==this.model.get("updated"))&&this.model.once("g:fetched.details",function(){this.needToFetch=!1,this.timestamp=this.model.get("updated"),this.render()},this).fetch({extraPath:"details"})},render:function(){if(!this.needToFetch)return this.$el.html(PD({collection:this.model,formatDate:D0,formatSize:Yt,DATE_SECOND:xu,renderMarkdown:M0})).girderModal(this),this}});function zs(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=eb(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function eb(s){var e=""+s,i=$D.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var $D=/["&<>]/;function tb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void tb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function ID(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-widget">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-tabs-container">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-tabs-top">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<ul class="nav nav-tabs">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<li class="first active" role="presentation">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"<a"+(' class="g-write-link"'+zs("data-target",`#${o}-write`,!0,!1)+' aria-controls="home" role="tab" data-toggle="tab"')+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"Write</a></li>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<li role="presentation">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"<a"+(' class="g-preview-link"'+zs("data-target",`#${o}-preview`,!0,!1)+' aria-controls="preview" role="tab" data-toggle="tab"')+">",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"Preview</a></li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-explanation">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"Supports",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<a href="https://daringfireball.net/projects/markdown/syntax" tabindex="-1" target="_blank">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+" Markdown</a></div></ul></div>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="tab-content">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"<div"+(' class="tab-pane active" role="tabpanel"'+zs("id",`${o}-write`,!0,!1))+">",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-drop-zone">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"<textarea"+(' class="form-control g-markdown-text"'+zs("upload-enabled",n?"true":null,!0,!1)+zs("placeholder",a,!0,!1))+">",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+eb((i=h)==null?"":i)+"</textarea>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",n&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-upload-overlay hide">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-upload-progress-container">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-upload-progress progress progress-striped">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="progress-bar progress-bar-info" role="progressbar"></div></div>',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-upload-progress-message">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"Starting upload...</div></div></div>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-upload-footer">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<i class="icon-picture"></i>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+" Add an image by ",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<a class="g-browse">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"clicking here</a>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+", or drag",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+`
`,r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"and drop one into the editor.</div>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="hide">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<input class="g-file-input" type="file"/></div>'),e=e+"</div></div>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+"<div"+(' class="tab-pane" role="tabpanel"'+zs("id",`${o}-preview`,!0,!1))+">",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/markdownWidget.pug",e=e+'<div class="g-markdown-preview"></div></div></div></div></div>'}).call(this,"enableUploads"in u?u.enableUploads:typeof enableUploads<"u"?enableUploads:void 0,"placeholder"in u?u.placeholder:typeof placeholder<"u"?placeholder:void 0,"prefix"in u?u.prefix:typeof prefix<"u"?prefix:void 0,"text"in u?u.text:typeof text<"u"?text:void 0)}catch(n){tb(n,t,r)}return e}+function(s){var e=function(u){this.element=s(u)};e.VERSION="3.4.1",e.TRANSITION_DURATION=150,e.prototype.show=function(){var u=this.element,n=u.closest("ul:not(.dropdown-menu)"),a=u.data("target");if(a||(a=u.attr("href"),a=a&&a.replace(/.*(?=#[^\s]*$)/,"")),!u.parent("li").hasClass("active")){var o=n.find(".active:last a"),h=s.Event("hide.bs.tab",{relatedTarget:u[0]}),g=s.Event("show.bs.tab",{relatedTarget:o[0]});if(o.trigger(h),u.trigger(g),!(g.isDefaultPrevented()||h.isDefaultPrevented())){var l=s(document).find(a);this.activate(u.closest("li"),n),this.activate(l,l.parent(),function(){o.trigger({type:"hidden.bs.tab",relatedTarget:u[0]}),u.trigger({type:"shown.bs.tab",relatedTarget:o[0]})})}}},e.prototype.activate=function(u,n,a){var o=n.find("> .active"),h=a&&s.support.transition&&(o.length&&o.hasClass("fade")||!!n.find("> .fade").length);function g(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),u.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(u[0].offsetWidth,u.addClass("in")):u.removeClass("fade"),u.parent(".dropdown-menu").length&&u.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),a&&a()}o.length&&h?o.one("bsTransitionEnd",g).emulateTransitionEnd(e.TRANSITION_DURATION):g(),o.removeClass("in")};function i(u){return this.each(function(){var n=s(this),a=n.data("bs.tab");a||n.data("bs.tab",a=new e(this)),typeof u=="string"&&a[u]()})}var t=s.fn.tab;s.fn.tab=i,s.fn.tab.Constructor=e,s.fn.tab.noConflict=function(){return s.fn.tab=t,this};var r=function(u){u.preventDefault(),i.call(s(this),"show")};s(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(me);var Ga=We.extend({events:{"show.bs.tab .g-preview-link":function(){M0(this.val().trim()||"Nothing to show",this.$(".g-markdown-preview"))},"shown.bs.tab .g-write-link":function(){this.$(".g-markdown-text").trigger("focus")},"click .g-browse":function(){this.$(".g-file-input").trigger("click")},"change .g-file-input":function(s){var e=s.target.files;e.length&&(this.files=e,this.filesAdded())},"dragenter .g-markdown-drop-zone":function(s){s.stopPropagation(),s.preventDefault(),s.originalEvent.dataTransfer.dropEffect="copy",this.$(".g-markdown-text,.g-upload-footer").addClass("dragover")},"dragleave .g-markdown-drop-zone":function(s){s.stopPropagation(),s.preventDefault(),this.$(".g-markdown-text,.g-upload-footer").removeClass("dragover")},"dragover .g-markdown-drop-zone":function(s){s.originalEvent.dataTransfer.dropEffect="copy",this.$(".g-markdown-text,.g-upload-footer").addClass("dragover")},"drop .g-markdown-drop-zone":function(s){s.stopPropagation(),s.preventDefault(),this.$(".g-markdown-text,.g-upload-footer").removeClass("dragover"),this.files=s.originalEvent.dataTransfer.files,this.filesAdded()}},initialize:function(s){this.text=s.text||"",this.placeholder=s.placeholder||"",this.prefix=s.prefix||"markdown",this.enableUploads=s.enableUploads||!1,this.parent=s.parent||null,this.maxUploadSize=s.maxUploadSize||1024*1024*10,this.allowedExtensions=s.allowedExtensions||null,this.files=[]},filesAdded:function(){try{this.validateFiles()}catch(i){_e.trigger("g:alert",{type:"danger",text:i.message,icon:"cancel",timeout:5e3});return}var s=this.files[0],e=new Ua;e.on("g:upload.complete",function(){var i=this.$(".g-markdown-text").val();i+="!["+s.name+"]("+e.downloadUrl()+`)
`,this.$(".g-upload-overlay").addClass("hide"),this.$(".g-markdown-text").girderEnable(!0).val(i),this.trigger("g:fileUploaded",{file:s,model:e})},this).on("g:upload.progress",function(i){var t=i.startByte+i.loaded;this.$(".g-markdown-upload-progress>.progress-bar").css("width",Math.ceil(100*t/i.total)+"%"),this.$(".g-markdown-upload-progress-message").text("Uploading "+i.file.name+" - "+Yt(t)+" / "+Yt(i.total))},this).on("g:upload.error",function(i){_e.trigger("g:alert",{type:"danger",text:i.message,icon:"cancel",timeout:5e3}),this.$(".g-upload-overlay").addClass("hide"),this.$(".g-markdown-text").girderEnable(!0)},this).on("g:upload.errorStarting",function(i){_e.trigger("g:alert",{type:"danger",text:i.message,icon:"cancel",timeout:5e3}),this.$(".g-upload-overlay").addClass("hide"),this.$(".g-markdown-text").girderEnable(!0)},this).upload(this.parent,s),this.$(".g-upload-overlay").removeClass("hide"),this.$(".g-markdown-text").girderEnable(!1)},validateFiles:function(s){if(s=s||this.files,this.files.length!==1)throw new Error("Please add only one file at a time.");var e=s[0],i=e.name.split(".").pop().toLowerCase();if(this.maxUploadSize&&e.size>this.maxUploadSize)throw new Error("That file is too large. You may only attach files up to "+Yt(this.maxUploadSize)+".");if(this.allowedExtensions&&!Fe.contains(this.allowedExtensions,i))throw new Error("Only files with the following extensions are allowed: "+this.allowedExtensions.join(", ")+".")},render:function(){return this.$el.html(ID({text:this.text,placeholder:this.placeholder,prefix:this.prefix,enableUploads:this.enableUploads})),this},val:function(){return arguments.length?this.$(".g-markdown-text").val(arguments[0]):this.$(".g-markdown-text").val()},saveText:function(){this.text=this.val()}});function rb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void rb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function RD(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<form class="modal-form" id="g-collection-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<h4 class="modal-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",u?(t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Create collection"):(t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Edit collection"),e=e+"</h4></div>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="modal-body">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<label class="control-label" for="g-name">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Name</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<input class="input-sm form-control" id="g-name" type="text" placeholder="Enter collection name"/></div>',t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="form-group">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<label class="control-label">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Description (optional)</label>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="g-description-editor-container"></div></div>',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<div class="modal-footer">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Cancel</a>",t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<button class="g-save-collection btn btn-small btn-primary" type="submit">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",u?(t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<i class="icon-plus-squared"></i>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Create"):(t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+'<i class="icon-edit"></i>',t=27,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editCollectionWidget.pug",e=e+"Save"),e=e+"</button></div></form></div></div>"}).call(this,"create"in r?r.create:typeof create<"u"?create:void 0)}catch(u){rb(u,i,t)}return e}const qa=We.extend({events:{"submit #g-collection-edit-form":function(s){s.preventDefault();const e={name:this.$("#g-name").val(),description:this.descriptionEditor.val()};this.descriptionEditor.saveText(),this.$("button.g-save-collection").girderEnable(!1),this.$(".g-validation-failed-message").text(""),this._saveCollection(e).always(()=>{this.$("button.g-save-collection").girderEnable(!0)}).done(()=>{this.$el.modal("hide")}).fail(i=>{this.$(".g-validation-failed-message").text(i.responseJSON.message),this.$("#g-"+i.responseJSON.field).trigger("focus")})}},initialize:function(s){this.create=!s.model,this.model=s.model||new b0,this.descriptionEditor=new Ga({text:this.model?this.model.get("description"):"",prefix:"collection-description",placeholder:"Enter a description",enableUploads:!1,parentView:this})},render:function(){this.$el.html(RD({create:this.create,collection:this.model}));const s=this.$el.girderModal(this).on("shown.bs.modal",()=>{this.$("#g-name").trigger("focus")}).on("hidden.bs.modal",()=>{ar(this.create?"create":"edit")}).on("ready.girder.modal",()=>{this.create||(this.$("#g-name").val(this.model.get("name")),this.$("#g-description").val(this.model.get("description")))});return s.trigger(me.Event("ready.girder.modal",{relatedTarget:s})),this.descriptionEditor.setElement(this.$(".g-description-editor-container")).render(),this.$("#g-name").trigger("focus"),br(this.create?"create":"edit"),this},_saveCollection:function(s){return this.model.set(s),this.model.save().done(()=>{this.trigger("g:saved",this.model)})}});function ib(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ib(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function BD(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<form class="modal-form" id="g-folder-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<h4 class="modal-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",u?(t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Edit folder"):(t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Create folder"),e=e+"</h4></div>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="modal-body">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<label class="control-label" for="g-name">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Name</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<input class="input-sm form-control" id="g-name" type="text" placeholder="Enter folder name"/></div>',t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="form-group">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<label class="control-label">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Description (optional)</label>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="g-description-editor-container"></div></div>',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<div class="modal-footer">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Cancel</a>",t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<button class="g-save-folder btn btn-small btn-primary" type="submit">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",u?(t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<i class="icon-edit"></i>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Save"):(t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+'<i class="icon-plus-squared"></i>',t=27,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFolderWidget.pug",e=e+"Create"),e=e+"</button></div></form></div></div>"}).call(this,"folder"in r?r.folder:typeof folder<"u"?folder:void 0)}catch(u){ib(u,i,t)}return e}var ud=We.extend({events:{"submit #g-folder-edit-form":function(s){s.preventDefault();var e={name:this.$("#g-name").val(),description:this.descriptionEditor.val()};this.folder?this.updateFolder(e):this.createFolder(e),this.descriptionEditor.saveText(),this.$("button.g-save-folder").girderEnable(!1),this.$(".g-validation-failed-message").text("")}},initialize:function(s){this.folder=s.folder||null,this.parentModel=s.parentModel,this.descriptionEditor=new Ga({text:this.folder?this.folder.get("description"):"",prefix:"folder-description",placeholder:"Enter a description",parent:this.folder,allowedExtensions:["png","jpg","jpeg","gif"],enableUploads:!!this.folder,parentView:this}).on("g:fileUploaded",function(e){this.trigger("g:fileUploaded",e)},this)},render:function(){var s=this.$el.html(BD({folder:this.folder})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-name").trigger("focus"),this.folder?br("folderedit"):br("foldercreate")}).on("hidden.bs.modal",()=>{this.create?ar("foldercreate"):ar("folderedit")}).on("ready.girder.modal",()=>{this.folder?(this.$("#g-name").val(this.folder.get("name")),this.descriptionEditor.val(this.folder.get("description")),this.create=!1):this.create=!0});return s.trigger(me.Event("ready.girder.modal",{relatedTarget:s})),this.$("#g-name").trigger("focus"),this.descriptionEditor.setElement(this.$(".g-description-editor-container")).render(),this},createFolder:function(s){var e=new Oi;e.set(Fe.extend(s,{parentType:this.parentModel.resourceName,parentId:this.parentModel.get("_id")})),e.on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",e)},this).on("g:error",function(i){this.$(".g-validation-failed-message").text(i.responseJSON.message),this.$("button.g-save-folder").girderEnable(!0),this.$("#g-"+i.responseJSON.field).trigger("focus")},this).save()},updateFolder:function(s){this.folder.set(s),this.folder.off().on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",this.folder)},this).on("g:error",function(e){this.$(".g-validation-failed-message").text(e.responseJSON.message),this.$("button.g-save-folder").girderEnable(!0),this.$("#g-"+e.responseJSON.field).trigger("focus")},this).save()}});function sb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void sb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function OD(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<form class="modal-form" id="g-item-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<h4 class="modal-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",u?(t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Edit item"):(t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Create item"),e=e+"</h4></div>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="modal-body">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<label class="control-label" for="g-name">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Name</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<input class="input-sm form-control" id="g-name" type="text" placeholder="Enter item name"/></div>',t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="form-group">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<label class="control-label">',t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Description (optional)</label>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="g-description-editor-container"></div></div>',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<div class="modal-footer">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Cancel</a>",t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<button class="g-save-item btn btn-small btn-primary" type="submit">',t=22,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",u?(t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<i class="icon-edit"></i>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Save"):(t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+'<i class="icon-plus-squared"></i>',t=27,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editItemWidget.pug",e=e+"Create"),e=e+"</button></div></form></div></div>"}).call(this,"item"in r?r.item:typeof item<"u"?item:void 0)}catch(u){sb(u,i,t)}return e}var Vh=We.extend({events:{"submit #g-item-edit-form":function(){var s={name:this.$("#g-name").val(),description:this.descriptionEditor.val()};return this.item?this.updateItem(s):this.createItem(s),this.descriptionEditor.saveText(),this.$("button.g-save-item").girderEnable(!1),this.$(".g-validation-failed-message").empty(),!1}},initialize:function(s){this.item=s.item||null,this.parentModel=s.parentModel,this.descriptionEditor=new Ga({text:this.item?this.item.get("description"):"",prefix:"item-description",placeholder:"Enter a description",enableUploads:!1,parentView:this})},render:function(){var s=this.$el.html(OD({item:this.item})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-name").trigger("focus"),this.item?br("itemedit"):br("itemcreate")}).on("hidden.bs.modal",()=>{this.create?ar("itemcreate"):ar("itemedit")}).on("ready.girder.modal",()=>{this.item?(this.$("#g-name").val(this.item.get("name")),this.$("#g-description").val(this.item.get("description")),this.create=!1):this.create=!0});return s.trigger(me.Event("ready.girder.modal",{relatedTarget:s})),this.descriptionEditor.setElement(this.$(".g-description-editor-container")).render(),this},createItem:function(s){var e=new Ms;e.set(Fe.extend(s,{folderId:this.parentModel.get("_id")})),e.on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",e)},this).on("g:error",function(i){this.$(".g-validation-failed-message").text(i.responseJSON.message),this.$("button.g-save-item").girderEnable(!0),this.$("#g-"+i.responseJSON.field).trigger("focus")},this).save()},updateItem:function(s){this.item.set(s),this.item.off().on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",this.item)},this).on("g:error",function(e){this.$(".g-validation-failed-message").text(e.responseJSON.message),this.$("button.g-save-item").girderEnable(!0),this.$("#g-"+e.responseJSON.field).trigger("focus")},this).save()}});function ND(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=a0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function a0(s){var e=""+s,i=WD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var WD=/["&<>]/;function ub(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ub(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function zD(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",i.dateInfo=t=function(c,d){var F=this&&this.block,p=this&&this.attributes||{};u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<div"+(' class="g-folder-info-line"'+ND("property",d,!0,!1))+">",u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<i class="icon-clock"></i>',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=c)==null?"":t)+"</span>",u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<span class="g-bold-part">',u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=h(o.get(d),a))==null?"":t)+"</span></div>"},u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="modal-dialog">',u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="modal-content">',u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="modal-header">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"&times;</button>",u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<h4 class="modal-title">',u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"Folder information</h4>",u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-dialog-subtitle">',u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<i class="icon-folder"></i>',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=o.name())==null?"":t)+"</span></div></div>",u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="modal-body">',u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",o.get("description")&&(u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-info-dialog-description g-folder-description">',u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+((t=l(o.get("description")))==null?"":t)+"</div>"),u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-folder-info-lines">',u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",i.dateInfo("Created ","created"),u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",o.get("created")!==o.get("updated")&&(u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",i.dateInfo("Last updated ","updated")),u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-folder-info-line" property="nItems">',u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<i class="icon-doc-text-inv"></i>',u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"Contains</span>",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<span class="g-bold-part">',u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" ",u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=o.get("nItems"))==null?"":t),u=27,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" items</span>",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" totaling</span>",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<span class="g-bold-part">',u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" ",u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=g(o.get("size")))==null?"":t)+"</span></div>",u=31,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-folder-info-line" property="nFolders">',u=32,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<i class="icon-folder"></i>',u=33,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=33,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"Contains</span>",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<span class="g-bold-part">',u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" ",u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=o.get("nFolders"))==null?"":t),u=34,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" subfolders</span></div>",u=36,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="g-folder-info-line" property="id">',u=37,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<i class="icon-share"></i>',u=38,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"<span>",u=38,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"Unique ID:</span>",u=39,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<span class="g-bold-part">',u=39,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+" ",u=39,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+a0((t=o.id)==null?"":t)+"</span></div></div></div>",u=41,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<div class="modal-footer">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',u=42,r="/home/circleci/project/girder/girder/web/src/templates/widgets/folderInfoDialog.pug",e=e+"Close</a></div></div></div>"}).call(this,"DATE_SECOND"in n?n.DATE_SECOND:typeof DATE_SECOND<"u"?DATE_SECOND:void 0,"folder"in n?n.folder:typeof folder<"u"?folder:void 0,"formatDate"in n?n.formatDate:typeof formatDate<"u"?formatDate:void 0,"formatSize"in n?n.formatSize:typeof formatSize<"u"?formatSize:void 0,"renderMarkdown"in n?n.renderMarkdown:typeof renderMarkdown<"u"?renderMarkdown:void 0)}catch(a){ub(a,r,u)}return e}var nb=We.extend({initialize:function(){this.needToFetch=!this.model.has("nItems")||!this.model.has("nFolders"),this.needToFetch&&this.model.once("g:fetched.details",function(){this.needToFetch=!1,this.render()},this).fetch({extraPath:"details"})},render:function(){return this.needToFetch?this:(this.$el.html(zD({folder:this.model,formatDate:D0,formatSize:Yt,renderMarkdown:M0,DATE_SECOND:xu})).girderModal(this),this)}});function u0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=nd(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function nd(s){var e=""+s,i=HD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var HD=/["&<>]/;function ob(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ob(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function UD(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<ul class="g-folder-list">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",function(){var h=a;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<li"+(' class="g-folder-list-entry"'+u0("public",c.get("public")?"true":"false",!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",n&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<input"+(' class="g-list-checkbox" type="checkbox"'+u0("g-folder-cid",c.cid,!0,!1))+"/>"),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<a"+(' class="g-folder-list-link"'+u0("g-folder-cid",c.cid,!0,!1)+u0("href",`#folder/${c.id}`,!0,!1))+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-folder"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+nd((i=c.get("name"))==null?"":i),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-right-dir"></i></a>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<div class="g-folder-privacy">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",c.get("public")?(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-globe"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"Public"):(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-lock"></i>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"Private"),e=e+"</div></li>"}else{var l=0;for(var g in h){l++;var c=h[g];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<li"+(' class="g-folder-list-entry"'+u0("public",c.get("public")?"true":"false",!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",n&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<input"+(' class="g-list-checkbox" type="checkbox"'+u0("g-folder-cid",c.cid,!0,!1))+"/>"),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"<a"+(' class="g-folder-list-link"'+u0("g-folder-cid",c.cid,!0,!1)+u0("href",`#folder/${c.id}`,!0,!1))+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-folder"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+nd((i=c.get("name"))==null?"":i),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-right-dir"></i></a>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<div class="g-folder-privacy">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",c.get("public")?(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-globe"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"Public"):(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-lock"></i>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"Private"),e=e+"</div></li>"}}}.call(this),r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",o&&(r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<li class="g-show-more">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<a class="g-show-more-folders">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+'<i class="icon-level-down"></i>',r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/folderList.pug",e=e+"Show more folders...</a></li>"),e=e+"</ul>"}).call(this,"checkboxes"in u?u.checkboxes:typeof checkboxes<"u"?checkboxes:void 0,"folders"in u?u.folders:typeof folders<"u"?folders:void 0,"hasMore"in u?u.hasMore:typeof hasMore<"u"?hasMore:void 0)}catch(n){ob(n,t,r)}return e}var ab=We.extend({events:{"click a.g-folder-list-link":function(s){s.preventDefault();var e=me(s.currentTarget).attr("g-folder-cid");this.trigger("g:folderClicked",this.collection.get(e))},"click a.g-show-more-folders":function(){this.collection.fetchNextPage()},"change .g-list-checkbox":function(s){const e=me(s.currentTarget),i=e.attr("g-folder-cid");if(e.prop("checked"))this.checked.push(i);else{const t=this.checked.indexOf(i);t!==-1&&this.checked.splice(t,1)}this.trigger("g:checkboxesChanged")}},initialize:function(s){this.checked=[],this._checkboxes=s.checkboxes,new Vn({el:this.$el,parentView:this}).render(),this.collection=new Fm,this.collection.append=!0,this.collection.filterFunc=s.folderFilter,this.collection.on("g:changed",function(){this.render(),this.trigger("g:changed")},this).fetch({parentType:s.parentType||"folder",parentId:s.parentId})},render:function(){return this.checked=[],this.$el.html(UD({folders:this.collection.toArray(),hasMore:this.collection.hasNextPage(),checkboxes:this._checkboxes})),this},insertFolder:function(s){this.collection.add(s),this.trigger("g:changed"),this.render()},checkAll:function(s){this.$(".g-list-checkbox").prop("checked",s),this.checked=[],s&&this.collection.each(function(e){this.checked.push(e.cid)},this),this.trigger("g:checkboxesChanged")},recomputeChecked:function(){this.checked=Fe.map(this.$(".g-list-checkbox:checked"),function(s){return me(s).attr("g-folder-cid")},this)}});function cr(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=d0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function od(s,e){return Array.isArray(s)?YD(s,e):s&&typeof s=="object"?VD(s):s||""}function YD(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=od(s[n]))&&(u&&e[n]&&(i=d0(i)),t=t+r+i,r=" ");return t}function VD(s){var e="",i="";for(var t in s)t&&s[t]&&XD.call(s,t)&&(e=e+i+t,i=" ");return e}function d0(s){var e=""+s,i=GD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var XD=Object.prototype.hasOwnProperty,GD=/["&<>]/;function lb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void lb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function qD(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c,d,F,p,f){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<ul class="g-item-list">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",function(){var m=c;if(typeof m.length=="number")for(var v=0,w=m.length;v<w;v++){var x=m[v];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<li"+(cr("class",od(["g-item-list-entry",g&&x.id===F?"g-selected":""],[!1,!0]),!1,!1)+cr("public",l?"true":"false",!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",n&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<input"+(' class="g-list-checkbox" type="checkbox"'+cr("g-item-cid",x.cid,!0,!1))+"/>"),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",a||f?(r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-item-list-link g-right-border"'+cr("g-item-cid",x.cid,!0,!1)+cr("href",`#item/${x.id}`,!0,!1))+">",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=x.name())==null?"":i)+"</a>"):(r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-item-list-link"'+cr("g-item-cid",x.cid,!0,!1)+cr("href","#item/"+x.id,!0,!1))+">",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=x.name())==null?"":i)+"</a>"),r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",a&&(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' title="Download item"'+cr("href",x.downloadUrl(),!0,!1))+">",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-download"></i></a>'),r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",f&&(r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-view-inline" title="View in browser" target="_blank" rel="noopener noreferrer"'+cr("href",x.downloadUrl({contentDisposition:"inline"}),!0,!1))+">",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-eye"></i></a>'),r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",p&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<div class="g-item-size">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=o(x.get("size")))==null?"":i)+"</div>"),e=e+"</li>"}else{var w=0;for(var v in m){w++;var x=m[v];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<li"+(cr("class",od(["g-item-list-entry",g&&x.id===F?"g-selected":""],[!1,!0]),!1,!1)+cr("public",l?"true":"false",!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",n&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<input"+(' class="g-list-checkbox" type="checkbox"'+cr("g-item-cid",x.cid,!0,!1))+"/>"),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",a||f?(r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-item-list-link g-right-border"'+cr("g-item-cid",x.cid,!0,!1)+cr("href",`#item/${x.id}`,!0,!1))+">",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=x.name())==null?"":i)+"</a>"):(r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-item-list-link"'+cr("g-item-cid",x.cid,!0,!1)+cr("href","#item/"+x.id,!0,!1))+">",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=x.name())==null?"":i)+"</a>"),r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",a&&(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' title="Download item"'+cr("href",x.downloadUrl(),!0,!1))+">",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-download"></i></a>'),r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",f&&(r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"<a"+(' class="g-view-inline" title="View in browser" target="_blank" rel="noopener noreferrer"'+cr("href",x.downloadUrl({contentDisposition:"inline"}),!0,!1))+">",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-eye"></i></a>'),r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",p&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<div class="g-item-size">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+d0((i=o(x.get("size")))==null?"":i)+"</div>"),e=e+"</li>"}}}.call(this),r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",h&&!d&&(r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<li class="g-show-more">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<a class="g-show-more-items">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+'<i class="icon-level-down"></i>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemList.pug",e=e+"Show more items...</a></li>"),e=e+"</ul>"}).call(this,"checkboxes"in u?u.checkboxes:typeof checkboxes<"u"?checkboxes:void 0,"downloadLinks"in u?u.downloadLinks:typeof downloadLinks<"u"?downloadLinks:void 0,"formatSize"in u?u.formatSize:typeof formatSize<"u"?formatSize:void 0,"hasMore"in u?u.hasMore:typeof hasMore<"u"?hasMore:void 0,"highlightItem"in u?u.highlightItem:typeof highlightItem<"u"?highlightItem:void 0,"isParentPublic"in u?u.isParentPublic:typeof isParentPublic<"u"?isParentPublic:void 0,"items"in u?u.items:typeof items<"u"?items:void 0,"paginated"in u?u.paginated:typeof paginated<"u"?paginated:void 0,"selectedItemId"in u?u.selectedItemId:typeof selectedItemId<"u"?selectedItemId:void 0,"showSizes"in u?u.showSizes:typeof showSizes<"u"?showSizes:void 0,"viewLinks"in u?u.viewLinks:typeof viewLinks<"u"?viewLinks:void 0)}catch(n){lb(n,t,r)}return e}var cb=We.extend({events:{"click a.g-item-list-link":function(s){s.preventDefault();var e=me(s.currentTarget).attr("g-item-cid");this.trigger("g:itemClicked",this.collection.get(e),s)},"click a.g-show-more-items":function(){this.collection.fetchNextPage()},"change .g-list-checkbox":function(s){const e=me(s.currentTarget),i=e.attr("g-item-cid");if(e.prop("checked"))this.checked.push(i);else{const t=this.checked.indexOf(i);t!==-1&&this.checked.splice(t,1)}this.trigger("g:checkboxesChanged")}},initialize:function(s){this.checked=[],this._checkboxes=s.checkboxes,this._downloadLinks=Fe.has(s,"downloadLinks")?s.downloadLinks:!0,this._viewLinks=Fe.has(s,"viewLinks")?s.viewLinks:!0,this._showSizes=Fe.has(s,"showSizes")?s.showSizes:!0,this._highlightItem=Fe.has(s,"highlightItem")?s.highlightItem:!1,this._paginated=Fe.has(s,"paginated")?s.paginated:!1,this.accessLevel=s.accessLevel,this.public=s.public,this._selectedItem=s.selectedItem,new Vn({el:this.$el,parentView:this}).render(),this.collection=new fm,this.collection.append=!0,this.collection.filterFunc=s.itemFilter,this.currentPage=1,this._paginated&&(this.collection.filterFunc?(console.warn("Pagination cannot be used with a filter function"),this._paginated=!1):this.collection.append=!1),this.collection.fetch({folderId:s.folderId}).done(()=>{this._totalPages=Math.ceil(this.collection.getTotalCount()/this.collection.pageLimit),this._paginated&&this.collection.hasNextPage()?(this.trigger("g:paginated"),this._selectedItem?Ve({url:`item/${this._selectedItem.get("_id")}/position`,method:"GET",data:{folderId:this._selectedItem.get("folderId"),sort:"name"}}).done(e=>{if(e=Number(e),e>=this.collection.pageLimit){const i=this.collection.pageLimit,t=1+Math.ceil((e-e%i)/i);return this.collection.fetchPage(t-1)}}).done(()=>this.bindOnChanged()):this.bindOnChanged()):this.bindOnChanged()})},bindOnChanged:function(){this.collection.on("g:changed",this.changedFunc,this),this.changedFunc()},changedFunc:function(){this.accessLevel!==void 0&&this.collection.each(s=>{s.set("_accessLevel",this.accessLevel)}),this._paginated&&(this.currentPage=this.collection.pageNum()+1),this.render(),this.trigger("g:changed")},render:function(){return this.checked=[],this._selectedItem&&this._highlightItem&&this.scrollPositionObserver(),this.$el.html(qD({items:this.collection.toArray(),isParentPublic:this.public,hasMore:this.collection.hasNextPage(),formatSize:Yt,checkboxes:this._checkboxes,downloadLinks:this._downloadLinks,viewLinks:this._viewLinks,showSizes:this._showSizes,highlightItem:this._highlightItem,selectedItemId:(this._selectedItem||{}).id,paginated:this._paginated})),this},getNumPages(){return this._totalPages||1},getCurrentPage(){return this.currentPage||1},setPage(s){if(this._paginated&&this.collection&&this.collection.fetchPage)return this.currentPage=s,this.collection.fetchPage(s-1).then(()=>this.$el.parents(".g-hierarchy-widget-container").scrollTop(0))},insertItem:function(s){this.accessLevel!==void 0&&s.set("_accessLevel",this.accessLevel),this.collection.add(s),this.trigger("g:changed"),this.render()},checkAll:function(s){this.$(".g-list-checkbox").prop("checked",s),this.checked=[],s&&this.collection.each(function(e){this.checked.push(e.cid)},this),this.trigger("g:checkboxesChanged")},selectItem:function(s){this.$("li.g-item-list-entry").removeClass("g-selected"),this.$("a.g-item-list-link[g-item-cid="+s.cid+"]").parents("li.g-item-list-entry").addClass("g-selected")},getSelectedItem:function(){var s=this.$("li.g-item-list-entry.g-selected");if(!s.length)return null;var e=me(".g-item-list-link",me(s[0])).attr("g-item-cid");return this.collection.get(e)},recomputeChecked:function(){this.checked=Fe.map(this.$(".g-list-checkbox:checked"),function(s){return me(s).attr("g-item-cid")},this)},centerSelected:function(){const s=this.$el.parents(".g-hierarchy-widget-container"),e=this.$("li.g-item-list-entry.g-selected");if(s.length>0&&e.length>0){const i=me(".g-folder-list").length?me(".g-folder-list").height():0,t=me(".g-hierarchy-breadcrumb-bar").length?me(".g-hierarchy-breadcrumb-bar").height():0,u=e.position().top+i+t,n=s.height()/2-i/2-t/2-e.outerHeight()/2,a=u-n;this.tempScrollPos===void 0&&(this.tempScrollPos=a);const o=new CustomEvent("scroll",{detail:"selected_item_scroll"});s[0].scrollTop=a,s[0].dispatchEvent(o)}},scrollPositionObserver:function(){const s=this.$(".g-item-list");if(window.MutationObserver&&s.length>0){const e=this.$el.parents(".g-hierarchy-widget-container");this.observer&&this.observer.disconnect&&this.observer.disconnect();const i=()=>{this.observer&&this.centerSelected()};this.observer=new MutationObserver(r=>{Fe.each(r,u=>{u.addedNodes&&Fe.each(u.addedNodes,n=>{n.className&&n.className.indexOf("g-item-list")!==-1&&(window.requestIdleCallback?requestIdleCallback(()=>{this.centerSelected()},{timeout:2e3}):this.centerSelected()),Fe.isFunction(n.getElementsByTagName)&&this.$("img",n).on("load",i)})})}),this.observer.observe(s.parent()[0],{childList:!0,subtree:!0});const t=()=>{this.observer&&(e.unbind("scroll.observerscroll"),e.unbind("wheel.observerscroll"),e.unbind("click.observerscroll"),this.observer.disconnect(),this.observer=null,this.tempScrollPos=void 0,this._highlightItem=!1)};e.bind("scroll.observerscroll",r=>{this.tempScrollPos!==void 0&&this.tempScrollPos!==e[0].scrollTop&&(this.tempScrollPos=e[0].scrollTop,r.detail!=="selected_item_scroll"&&t())}),e.bind("wheel.selectionobserver",t),e.bind("click.selectionobserver",t)}}});function KD(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=JD(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function JD(s){var e=""+s,i=ZD.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var ZD=/["&<>]/;function db(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void db(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function QD(s){var e="",i,t;try{var r=s||{};(function(u,n){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+"<input"+(' class="input-sm form-control g-widget-metadata-key-input" type="text"'+KD("value",u,!0,!1)+' placeholder="Key"')+"/>",t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<div class="g-json-editor"></div>',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-warning g-widget-metadata-cancel-button" title="Cancel">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<i class="icon-cancel"></i></button>',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-primary g-widget-metadata-save-button" title="Accept">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<i class="icon-ok"></i></button>',t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",n||(t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-primary g-widget-metadata-toggle-button" title="Convert to Simple">',t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<i class="icon-cog"></i></button>',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-danger g-widget-metadata-delete-button" title="Delete">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumEditWidget.pug",e=e+'<i class="icon-trash"></i></button>')}).call(this,"key"in r?r.key:typeof key<"u"?key:void 0,"newDatum"in r?r.newDatum:typeof newDatum<"u"?newDatum:void 0)}catch(u){db(u,i,t)}return e}function zg(s){var e=""+s,i=eM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var eM=/["&<>]/;function hb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void hb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function tM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",a>=n.WRITE&&(r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+'<button class="btn btn-sm btn-default g-widget-metadata-edit-button">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+'<i class="icon-pencil"></i></button>'),r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+'<span class="g-widget-metadata-key">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+zg((i=o)==null?"":i)+"</span>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+'<span class="g-widget-metadata-value">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+"<pre>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/jsonMetadatumView.pug",e=e+zg((i=h)==null?"":i)+"</pre></span>"}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"accessLevel"in u?u.accessLevel:typeof accessLevel<"u"?accessLevel:void 0,"key"in u?u.key:typeof key<"u"?key:void 0,"value"in u?u.value:typeof value<"u"?value:void 0)}catch(n){hb(n,t,r)}return e}function rM(s){var e=""+s,i=iM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var iM=/["&<>]/;function gb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void gb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function sM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",a>=n.WRITE&&(r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<div class="btn-group pull-right">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<button class="g-widget-metadata-add-button btn btn-sm btn-primary btn-default dropdown-toggle" data-toggle="dropdown" title="Add Metadata">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<i class="icon-plus"></i></button>',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<ul class="dropdown-menu pull-right" role="menu">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<li role="presentation">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<a class="g-add-simple-metadata" role="menuitem">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+"Simple</a></li>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<li role="presentation">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<a class="g-add-json-metadata">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+"JSON</a></li></ul></div>"),r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<div class="g-widget-metadata-header">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<i class="icon-tags"></i>',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+" ",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+rM((i=o)==null?"":i)+"</div>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadataWidget.pug",e=e+'<div class="g-widget-metadata-container"></div>'}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"accessLevel"in u?u.accessLevel:typeof accessLevel<"u"?accessLevel:void 0,"title"in u?u.title:typeof title<"u"?title:void 0)}catch(n){gb(n,t,r)}return e}function Hg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Fb(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Fb(s){var e=""+s,i=uM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var uM=/["&<>]/;function pb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void pb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function nM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,g,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+"<input"+(' class="input-sm form-control g-widget-metadata-key-input" type="text"'+Hg("value",n,!0,!1)+' placeholder="Key"')+"/>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug";var g=h.length<=40?1:h.length<=100?3:5;r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+"<textarea"+(' class="input-sm form-control g-widget-metadata-value-input" placeholder="Value"'+Hg("rows",g,!0,!1))+">",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+Fb((i=h)==null?"":i)+"</textarea>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-warning g-widget-metadata-cancel-button" title="Cancel">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<i class="icon-cancel"></i></button>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-primary g-widget-metadata-save-button" title="Accept">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<i class="icon-ok"></i></button>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",a||(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-primary g-widget-metadata-toggle-button" title="Convert to JSON">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<i class="icon-cog"></i></button>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<button class="btn btn-sm btn-danger g-widget-metadata-delete-button" title="Delete">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumEditWidget.pug",e=e+'<i class="icon-trash"></i></button>')}).call(this,"key"in u?u.key:typeof key<"u"?key:void 0,"newDatum"in u?u.newDatum:typeof newDatum<"u"?newDatum:void 0,"rows"in u?u.rows:typeof rows<"u"?rows:void 0,"value"in u?u.value:typeof value<"u"?value:void 0)}catch(n){pb(n,t,r)}return e}function Ug(s){var e=""+s,i=oM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var oM=/["&<>]/;function fb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void fb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function aM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",a>=n.WRITE&&(r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+'<button class="btn btn-sm btn-default g-widget-metadata-edit-button">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+'<i class="icon-pencil"></i></button>'),r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+'<span class="g-widget-metadata-key">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+Ug((i=o)==null?"":i)+"</span>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+'<span class="g-widget-metadata-value">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/metadatumView.pug",e=e+Ug((i=h)==null?"":i)+"</span>"}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"accessLevel"in u?u.accessLevel:typeof accessLevel<"u"?accessLevel:void 0,"key"in u?u.key:typeof key<"u"?key:void 0,"value"in u?u.value:typeof value<"u"?value:void 0)}catch(n){fb(n,t,r)}return e}var mb={exports:{}};/*!
 * jsoneditor.js
 *
 * @brief
 * JSONEditor is a web-based tool to view, edit, format, and validate JSON.
 * It has various modes such as a tree editor, a code editor, and a plain text
 * editor.
 *
 * Supported browsers: Chrome, Firefox, Safari, Opera, Internet Explorer 8+
 *
 * @license
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy
 * of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 *
 * Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org
 *
 * @author  Jos de Jong, <wjosdejong@gmail.com>
 * @version 5.9.6
 * @date    2017-09-16
 */(function(s,e){(function(t,r){s.exports=r()})(Li,function(){return function(i){var t={};function r(u){if(t[u])return t[u].exports;var n=t[u]={exports:{},id:u,loaded:!1};return i[u].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=i,r.c=t,r.p="",r(0)}([function(i,t,r){var u;try{u=r(1)}catch{}var n=r(54),a=r(66),o=r(57);function h(g,l,c){if(!(this instanceof h))throw new Error('JSONEditor constructor called without "new".');var d=o.getInternetExplorerVersion();if(d!=-1&&d<9)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(l&&(l.error&&(console.warn('Option "error" has been renamed to "onError"'),l.onError=l.error,delete l.error),l.change&&(console.warn('Option "change" has been renamed to "onChange"'),l.onChange=l.change,delete l.change),l.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),l.onEditable=l.editable,delete l.editable),l)){var F=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys"];Object.keys(l).forEach(function(p){F.indexOf(p)===-1&&console.warn('Unknown option "'+p+'". This option will be ignored')})}arguments.length&&this._create(g,l,c)}h.modes={},h.prototype.DEBOUNCE_INTERVAL=150,h.prototype._create=function(g,l,c){this.container=g,this.options=l||{},this.json=c||{};var d=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(d)},h.prototype.destroy=function(){},h.prototype.set=function(g){this.json=g},h.prototype.get=function(){return this.json},h.prototype.setText=function(g){this.json=o.parse(g)},h.prototype.getText=function(){return JSON.stringify(this.json)},h.prototype.setName=function(g){this.options||(this.options={}),this.options.name=g},h.prototype.getName=function(){return this.options&&this.options.name},h.prototype.setMode=function(g){var l=this.container,c=o.extend({},this.options),d=c.mode,F,p;c.mode=g;var f=h.modes[g];if(f)try{var m=f.data=="text";if(p=this.getName(),F=this[m?"getText":"get"](),this.destroy(),o.clear(this),o.extend(this,f.mixin),this.create(l,c),this.setName(p),this[m?"setText":"set"](F),typeof f.load=="function")try{f.load.call(this)}catch(v){console.error(v)}if(typeof c.onModeChange=="function"&&g!==d)try{c.onModeChange(g,d)}catch(v){console.error(v)}}catch(v){this._onError(v)}else throw new Error('Unknown mode "'+c.mode+'"')},h.prototype.getMode=function(){return this.options.mode},h.prototype._onError=function(g){if(this.options&&typeof this.options.onError=="function")this.options.onError(g);else throw g},h.prototype.setSchema=function(g,l){if(g){var c;try{c=this.options.ajv||u({allErrors:!0,verbose:!0})}catch{console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}if(c){if(l){for(var d in l)c.removeSchema(d),l[d]&&c.addSchema(l[d],d);this.options.schemaRefs=l}this.validateSchema=c.compile(g),this.options.schema=g,this.validate()}this.refresh()}else this.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate(),this.refresh()},h.prototype.validate=function(){},h.prototype.refresh=function(){},h.registerMode=function(g){var l,c;if(o.isArray(g))for(l=0;l<g.length;l++)h.registerMode(g[l]);else{if(!("mode"in g))throw new Error('Property "mode" missing');if(!("mixin"in g))throw new Error('Property "mixin" missing');if(!("data"in g))throw new Error('Property "data" missing');var d=g.mode;if(d in h.modes)throw new Error('Mode "'+d+'" already registered');if(typeof g.mixin.create!="function")throw new Error('Required function "create" missing on mixin');var F=["setMode","registerMode","modes"];for(l=0;l<F.length;l++)if(c=F[l],c in g.mixin)throw new Error('Reserved property "'+c+'" not allowed in mixin');h.modes[d]=g}},h.registerMode(n),h.registerMode(a),i.exports=h},function(i,t,r){var u=r(2),n=r(3),a=r(22),o=r(13),h=r(16),g=r(23),l=r(24),c=r(47),d=r(48),F=r(11),p=r(21);i.exports=A,A.prototype.validate=b,A.prototype.compile=y,A.prototype.addSchema=k,A.prototype.addMetaSchema=C,A.prototype.validateSchema=D,A.prototype.getSchema=S,A.prototype.removeSchema=O,A.prototype.addFormat=ne,A.prototype.errorsText=ue,A.prototype._addSchema=Y,A.prototype._compile=J,A.prototype.compileAsync=r(49);var f=r(50);A.prototype.addKeyword=f.add,A.prototype.getKeyword=f.get,A.prototype.removeKeyword=f.remove;var m=r(15);A.ValidationError=m.Validation,A.MissingRefError=m.MissingRef,A.$dataMetaSchema=c;var v="http://json-schema.org/draft-06/schema",w=["removeAdditional","useDefaults","coerceTypes"],x=["/properties"];function A(ee){if(!(this instanceof A))return new A(ee);ee=this._opts=F.copy(ee)||{},this._schemas={},this._refs={},this._fragments={},this._formats=g(ee.format);var ce=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(xe){return ce.test(xe)},this._cache=ee.cache||new a,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=Z(ee),ee.loopRequired=ee.loopRequired||1/0,ee.errorDataPath=="property"&&(ee._errorDataPathProperty=!0),ee.serialize===void 0&&(ee.serialize=h),this._metaOpts=ae(this),ee.formats&&le(this),G(this),typeof ee.meta=="object"&&this.addMetaSchema(ee.meta),K(this),ee.patternGroups&&d(this)}function b(ee,ce){var xe;if(typeof ee=="string"){if(xe=this.getSchema(ee),!xe)throw new Error('no schema with key or ref "'+ee+'"')}else{var Ee=this._addSchema(ee);xe=Ee.validate||this._compile(Ee)}var W=xe(ce);return xe.$async===!0?this._opts.async=="*"?p(W):W:(this.errors=xe.errors,W)}function y(ee,ce){var xe=this._addSchema(ee,void 0,ce);return xe.validate||this._compile(xe)}function k(ee,ce,xe,Ee){if(Array.isArray(ee)){for(var W=0;W<ee.length;W++)this.addSchema(ee[W],void 0,xe,Ee);return}var z=this._getId(ee);if(z!==void 0&&typeof z!="string")throw new Error("schema id must be string");ce=n.normalizeId(ce||z),re(this,ce),this._schemas[ce]=this._addSchema(ee,xe,Ee,!0)}function C(ee,ce,xe){this.addSchema(ee,ce,xe,!0)}function D(ee,ce){var xe=ee.$schema;if(xe!==void 0&&typeof xe!="string")throw new Error("$schema must be a string");if(xe=xe||this._opts.defaultMeta||T(this),!xe)return console.warn("meta-schema not available"),this.errors=null,!0;var Ee=this._formats.uri;this._formats.uri=typeof Ee=="function"?this._schemaUriFormatFunc:this._schemaUriFormat;var W;try{W=this.validate(xe,ee)}finally{this._formats.uri=Ee}if(!W&&ce){var z="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")console.error(z);else throw new Error(z)}return W}function T(ee){var ce=ee._opts.meta;return ee._opts.defaultMeta=typeof ce=="object"?ee._getId(ce)||ce:ee.getSchema(v)?v:void 0,ee._opts.defaultMeta}function S(ee){var ce=R(this,ee);switch(typeof ce){case"object":return ce.validate||this._compile(ce);case"string":return this.getSchema(ce);case"undefined":return M(this,ee)}}function M(ee,ce){var xe=n.schema.call(ee,{schema:{}},ce);if(xe){var Ee=xe.schema,W=xe.root,z=xe.baseId,$=u.call(ee,Ee,W,void 0,z);return ee._fragments[ce]=new o({ref:ce,fragment:!0,schema:Ee,root:W,baseId:z,validate:$}),$}}function R(ee,ce){return ce=n.normalizeId(ce),ee._schemas[ce]||ee._refs[ce]||ee._fragments[ce]}function O(ee){if(ee instanceof RegExp){H(this,this._schemas,ee),H(this,this._refs,ee);return}switch(typeof ee){case"undefined":H(this,this._schemas),H(this,this._refs),this._cache.clear();return;case"string":var ce=R(this,ee);ce&&this._cache.del(ce.cacheKey),delete this._schemas[ee],delete this._refs[ee];return;case"object":var xe=this._opts.serialize,Ee=xe?xe(ee):ee;this._cache.del(Ee);var W=this._getId(ee);W&&(W=n.normalizeId(W),delete this._schemas[W],delete this._refs[W])}}function H(ee,ce,xe){for(var Ee in ce){var W=ce[Ee];!W.meta&&(!xe||xe.test(Ee))&&(ee._cache.del(W.cacheKey),delete ce[Ee])}}function Y(ee,ce,xe,Ee){if(typeof ee!="object"&&typeof ee!="boolean")throw new Error("schema should be object or boolean");var W=this._opts.serialize,z=W?W(ee):ee,$=this._cache.get(z);if($)return $;Ee=Ee||this._opts.addUsedSchema!==!1;var P=n.normalizeId(this._getId(ee));P&&Ee&&re(this,P);var B=this._opts.validateSchema!==!1&&!ce,X;B&&!(X=P&&P==n.normalizeId(ee.$schema))&&this.validateSchema(ee,!0);var oe=n.ids.call(this,ee),we=new o({id:P,schema:ee,localRefs:oe,cacheKey:z,meta:xe});return P[0]!="#"&&Ee&&(this._refs[P]=we),this._cache.put(z,we),B&&X&&this.validateSchema(ee,!0),we}function J(ee,ce){if(ee.compiling)return ee.validate=W,W.schema=ee.schema,W.errors=null,W.root=ce||W,ee.schema.$async===!0&&(W.$async=!0),W;ee.compiling=!0;var xe;ee.meta&&(xe=this._opts,this._opts=this._metaOpts);var Ee;try{Ee=u.call(this,ee.schema,ce,ee.localRefs)}finally{ee.compiling=!1,ee.meta&&(this._opts=xe)}return ee.validate=Ee,ee.refs=Ee.refs,ee.refVal=Ee.refVal,ee.root=Ee.root,Ee;function W(){var z=ee.validate,$=z.apply(null,arguments);return W.errors=z.errors,$}}function Z(ee){switch(ee.schemaId){case"$id":return ie;case"id":return te;default:return se}}function te(ee){return ee.$id&&console.warn("schema $id ignored",ee.$id),ee.id}function ie(ee){return ee.id&&console.warn("schema id ignored",ee.id),ee.$id}function se(ee){if(ee.$id&&ee.id&&ee.$id!=ee.id)throw new Error("schema $id is different from id");return ee.$id||ee.id}function ue(ee,ce){if(ee=ee||this.errors,!ee)return"No errors";ce=ce||{};for(var xe=ce.separator===void 0?", ":ce.separator,Ee=ce.dataVar===void 0?"data":ce.dataVar,W="",z=0;z<ee.length;z++){var $=ee[z];$&&(W+=Ee+$.dataPath+" "+$.message+xe)}return W.slice(0,-xe.length)}function ne(ee,ce){typeof ce=="string"&&(ce=new RegExp(ce)),this._formats[ee]=ce}function G(ee){var ce;if(ee._opts.$data&&(ce=r(52),ee.addMetaSchema(ce,ce.$id,!0)),ee._opts.meta!==!1){var xe=r(53);ee._opts.$data&&(xe=c(xe,x)),ee.addMetaSchema(xe,v,!0),ee._refs["http://json-schema.org/schema"]=v}}function K(ee){var ce=ee._opts.schemas;if(ce)if(Array.isArray(ce))ee.addSchema(ce);else for(var xe in ce)ee.addSchema(ce[xe],xe)}function le(ee){for(var ce in ee._opts.formats){var xe=ee._opts.formats[ce];ee.addFormat(ce,xe)}}function re(ee,ce){if(ee._schemas[ce]||ee._refs[ce])throw new Error('schema with key or id "'+ce+'" already exists')}function ae(ee){for(var ce=F.copy(ee._opts),xe=0;xe<w.length;xe++)delete ce[w[xe]];return ce}},function(i,t,r){var u=r(3),n=r(11),a=r(15),o=r(16),h=r(20),g=r(21),l=n.ucs2length,c=r(10),d=a.Validation;i.exports=F;function F(y,k,C,D){var T=this,S=this._opts,M=[void 0],R={},O=[],H={},Y=[],J={},Z=[];k=k||{schema:y,refVal:M,refs:R};var te=p.call(this,y,k,D),ie=this._compilations[te.index];if(te.compiling)return ie.callValidate=K;var se=this._formats,ue=this.RULES;try{var ne=le(y,k,C,D);ie.validate=ne;var G=ie.callValidate;return G&&(G.schema=ne.schema,G.errors=null,G.refs=ne.refs,G.refVal=ne.refVal,G.root=ne.root,G.$async=ne.$async,S.sourceCode&&(G.source=ne.source)),ne}finally{f.call(this,y,k,D)}function K(){var z=ie.validate,$=z.apply(null,arguments);return K.errors=z.errors,$}function le(z,$,P,B){var X=!$||$&&$.schema==z;if($.schema!=k.schema)return F.call(T,z,$,P,B);var oe=z.$async===!0,we=h({isTop:!0,schema:z,isRoot:X,baseId:B,root:$,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:a.MissingRef,RULES:ue,validate:h,util:n,resolve:u,resolveRef:re,usePattern:xe,useDefault:Ee,useCustomRule:W,opts:S,formats:se,self:T});we=b(M,x)+b(O,v)+b(Y,w)+b(Z,A)+we,S.processCode&&(we=S.processCode(we));var ye;try{var Te=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",we);ye=Te(T,ue,se,k,M,Y,Z,g,c,l,d),M[0]=ye}catch(Ye){throw console.error("Error compiling schema, function code:",we),Ye}return ye.schema=z,ye.errors=null,ye.refs=R,ye.refVal=M,ye.root=X?ye:$,oe&&(ye.$async=!0),S.sourceCode===!0&&(ye.source={code:we,patterns:O,defaults:Y}),ye}function re(z,$,P){$=u.url(z,$);var B=R[$],X,oe;if(B!==void 0)return X=M[B],oe="refVal["+B+"]",ce(X,oe);if(!P&&k.refs){var we=k.refs[$];if(we!==void 0)return X=k.refVal[we],oe=ae($,X),ce(X,oe)}oe=ae($);var ye=u.call(T,le,k,$);if(ye===void 0){var Te=C&&C[$];Te&&(ye=u.inlineRef(Te,S.inlineRefs)?Te:F.call(T,Te,k,C,z))}if(ye!==void 0)return ee($,ye),ce(ye,oe)}function ae(z,$){var P=M.length;return M[P]=$,R[z]=P,"refVal"+P}function ee(z,$){var P=R[z];M[P]=$}function ce(z,$){return typeof z=="object"||typeof z=="boolean"?{code:$,schema:z,inline:!0}:{code:$,$async:z&&z.$async}}function xe(z){var $=H[z];return $===void 0&&($=H[z]=O.length,O[$]=z),"pattern"+$}function Ee(z){switch(typeof z){case"boolean":case"number":return""+z;case"string":return n.toQuotedString(z);case"object":if(z===null)return"null";var $=o(z),P=J[$];return P===void 0&&(P=J[$]=Y.length,Y[P]=z),"default"+P}}function W(z,$,P,B){var X=z.definition.validateSchema;if(X&&T._opts.validateSchema!==!1){var oe=X($);if(!oe){var we="keyword schema is invalid: "+T.errorsText(X.errors);if(T._opts.validateSchema=="log")console.error(we);else throw new Error(we)}}var ye=z.definition.compile,Te=z.definition.inline,Ye=z.definition.macro,Re;if(ye)Re=ye.call(T,$,P,B);else if(Ye)Re=Ye.call(T,$,P,B),S.validateSchema!==!1&&T.validateSchema(Re,!0);else if(Te)Re=Te.call(T,B,z.keyword,$,P);else if(Re=z.definition.validate,!Re)return;if(Re===void 0)throw new Error('custom keyword "'+z.keyword+'"failed to compile');var st=Z.length;return Z[st]=Re,{code:"customRule"+st,validate:Re}}}function p(y,k,C){var D=m.call(this,y,k,C);return D>=0?{index:D,compiling:!0}:(D=this._compilations.length,this._compilations[D]={schema:y,root:k,baseId:C},{index:D,compiling:!1})}function f(y,k,C){var D=m.call(this,y,k,C);D>=0&&this._compilations.splice(D,1)}function m(y,k,C){for(var D=0;D<this._compilations.length;D++){var T=this._compilations[D];if(T.schema==y&&T.root==k&&T.baseId==C)return D}return-1}function v(y,k){return"var pattern"+y+" = new RegExp("+n.toQuotedString(k[y])+");"}function w(y){return"var default"+y+" = defaults["+y+"];"}function x(y,k){return k[y]===void 0?"":"var refVal"+y+" = refVal["+y+"];"}function A(y){return"var customRule"+y+" = customRules["+y+"];"}function b(y,k){if(!y.length)return"";for(var C="",D=0;D<y.length;D++)C+=k(D,y);return C}},function(i,t,r){var u=r(4),n=r(10),a=r(11),o=r(13),h=r(14);i.exports=g,g.normalizeId=b,g.fullPath=w,g.url=y,g.ids=k,g.inlineRef=f,g.schema=l;function g(C,D,T){var S=this._refs[T];if(typeof S=="string")if(this._refs[S])S=this._refs[S];else return g.call(this,C,D,S);if(S=S||this._schemas[T],S instanceof o)return f(S.schema,this._opts.inlineRefs)?S.schema:S.validate||this._compile(S);var M=l.call(this,D,T),R,O,H;return M&&(R=M.schema,D=M.root,H=M.baseId),R instanceof o?O=R.validate||C.call(this,R.schema,D,void 0,H):R!==void 0&&(O=f(R,this._opts.inlineRefs)?R:C.call(this,R,D,void 0,H)),O}function l(C,D){var T=u.parse(D,!1,!0),S=x(T),M=w(this._getId(C.schema));if(S!==M){var R=b(S),O=this._refs[R];if(typeof O=="string")return c.call(this,C,O,T);if(O instanceof o)O.validate||this._compile(O),C=O;else if(O=this._schemas[R],O instanceof o){if(O.validate||this._compile(O),R==b(D))return{schema:O,root:C,baseId:M};C=O}else return;if(!C.schema)return;M=w(this._getId(C.schema))}return F.call(this,T,M,C.schema,C)}function c(C,D,T){var S=l.call(this,C,D);if(S){var M=S.schema,R=S.baseId;C=S.root;var O=this._getId(M);return O&&(R=y(R,O)),F.call(this,T,R,M,C)}}var d=a.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function F(C,D,T,S){if(C.hash=C.hash||"",C.hash.slice(0,2)=="#/"){for(var M=C.hash.split("/"),R=1;R<M.length;R++){var O=M[R];if(O){if(O=a.unescapeFragment(O),T=T[O],T===void 0)break;var H;if(!d[O]&&(H=this._getId(T),H&&(D=y(D,H)),T.$ref)){var Y=y(D,T.$ref),J=l.call(this,S,Y);J&&(T=J.schema,S=J.root,D=J.baseId)}}}if(T!==void 0&&T!==S.schema)return{schema:T,root:S,baseId:D}}}var p=a.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function f(C,D){if(D===!1)return!1;if(D===void 0||D===!0)return m(C);if(D)return v(C)<=D}function m(C){var D;if(Array.isArray(C)){for(var T=0;T<C.length;T++)if(D=C[T],typeof D=="object"&&!m(D))return!1}else for(var S in C)if(S=="$ref"||(D=C[S],typeof D=="object"&&!m(D)))return!1;return!0}function v(C){var D=0,T;if(Array.isArray(C)){for(var S=0;S<C.length;S++)if(T=C[S],typeof T=="object"&&(D+=v(T)),D==1/0)return 1/0}else for(var M in C){if(M=="$ref")return 1/0;if(p[M])D++;else if(T=C[M],typeof T=="object"&&(D+=v(T)+1),D==1/0)return 1/0}return D}function w(C,D){D!==!1&&(C=b(C));var T=u.parse(C,!1,!0);return x(T)}function x(C){var D=C.protocol||C.href.slice(0,2)=="//"?"//":"";return(C.protocol||"")+D+(C.host||"")+(C.path||"")+"#"}var A=/#\/?$/;function b(C){return C?C.replace(A,""):""}function y(C,D){return D=b(D),u.resolve(C,D)}function k(C){var D=b(this._getId(C)),T={"":D},S={"":w(D,!1)},M={},R=this;return h(C,{allKeys:!0},function(O,H,Y,J,Z,te,ie){if(H!==""){var se=R._getId(O),ue=T[J],ne=S[J]+"/"+Z;if(ie!==void 0&&(ne+="/"+(typeof ie=="number"?ie:a.escapeFragment(ie))),typeof se=="string"){se=ue=b(ue?u.resolve(ue,se):se);var G=R._refs[se];if(typeof G=="string"&&(G=R._refs[G]),G&&G.schema){if(!n(O,G.schema))throw new Error('id "'+se+'" resolves to more than one schema')}else if(se!=b(ne))if(se[0]=="#"){if(M[se]&&!n(O,M[se]))throw new Error('id "'+se+'" resolves to more than one schema');M[se]=O}else R._refs[se]=ne}T[H]=ue,S[H]=ne}}),M}},function(i,t,r){var u=r(5);t.parse=A,t.resolve=y,t.resolveObject=k,t.format=b,t.Url=n;function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var a=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,h=["<",">",'"',"`"," ","\r",`
`,"	"],g=["{","}","|","\\","^","`"].concat(h),l=["'"].concat(g),c=["%","/","?",";","#"].concat(l),d=["/","?","#"],F=255,p=/^[a-z0-9A-Z_-]{0,63}$/,f=/^([a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=r(7);function A(M,R,O){if(M&&D(M)&&M instanceof n)return M;var H=new n;return H.parse(M,R,O),H}n.prototype.parse=function(M,R,O){if(!C(M))throw new TypeError("Parameter 'url' must be a string, not "+typeof M);var H=M;H=H.trim();var Y=a.exec(H);if(Y){Y=Y[0];var J=Y.toLowerCase();this.protocol=J,H=H.substr(Y.length)}if(O||Y||H.match(/^\/\/[^@\/]+@[^@\/]+/)){var Z=H.substr(0,2)==="//";Z&&!(Y&&v[Y])&&(H=H.substr(2),this.slashes=!0)}if(!v[Y]&&(Z||Y&&!w[Y])){for(var te=-1,ie=0;ie<d.length;ie++){var se=H.indexOf(d[ie]);se!==-1&&(te===-1||se<te)&&(te=se)}var ue,ne;te===-1?ne=H.lastIndexOf("@"):ne=H.lastIndexOf("@",te),ne!==-1&&(ue=H.slice(0,ne),H=H.slice(ne+1),this.auth=decodeURIComponent(ue)),te=-1;for(var ie=0;ie<c.length;ie++){var se=H.indexOf(c[ie]);se!==-1&&(te===-1||se<te)&&(te=se)}te===-1&&(te=H.length),this.host=H.slice(0,te),H=H.slice(te),this.parseHost(),this.hostname=this.hostname||"";var G=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!G)for(var K=this.hostname.split(/\./),ie=0,le=K.length;ie<le;ie++){var re=K[ie];if(re&&!re.match(p)){for(var ae="",ee=0,ce=re.length;ee<ce;ee++)re.charCodeAt(ee)>127?ae+="x":ae+=re[ee];if(!ae.match(p)){var xe=K.slice(0,ie),Ee=K.slice(ie+1),W=re.match(f);W&&(xe.push(W[1]),Ee.unshift(W[2])),Ee.length&&(H="/"+Ee.join(".")+H),this.hostname=xe.join(".");break}}}if(this.hostname.length>F?this.hostname="":this.hostname=this.hostname.toLowerCase(),!G){for(var z=this.hostname.split("."),$=[],ie=0;ie<z.length;++ie){var P=z[ie];$.push(P.match(/[^A-Za-z0-9_-]/)?"xn--"+u.encode(P):P)}this.hostname=$.join(".")}var B=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+B,this.href+=this.host,G&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),H[0]!=="/"&&(H="/"+H))}if(!m[J])for(var ie=0,le=l.length;ie<le;ie++){var oe=l[ie],we=encodeURIComponent(oe);we===oe&&(we=escape(oe)),H=H.split(oe).join(we)}var ye=H.indexOf("#");ye!==-1&&(this.hash=H.substr(ye),H=H.slice(0,ye));var Te=H.indexOf("?");if(Te!==-1?(this.search=H.substr(Te),this.query=H.substr(Te+1),R&&(this.query=x.parse(this.query)),H=H.slice(0,Te)):R&&(this.search="",this.query={}),H&&(this.pathname=H),w[J]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var B=this.pathname||"",P=this.search||"";this.path=B+P}return this.href=this.format(),this};function b(M){return C(M)&&(M=A(M)),M instanceof n?M.format():n.prototype.format.call(M)}n.prototype.format=function(){var M=this.auth||"";M&&(M=encodeURIComponent(M),M=M.replace(/%3A/i,":"),M+="@");var R=this.protocol||"",O=this.pathname||"",H=this.hash||"",Y=!1,J="";this.host?Y=M+this.host:this.hostname&&(Y=M+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Y+=":"+this.port)),this.query&&D(this.query)&&Object.keys(this.query).length&&(J=x.stringify(this.query));var Z=this.search||J&&"?"+J||"";return R&&R.substr(-1)!==":"&&(R+=":"),this.slashes||(!R||w[R])&&Y!==!1?(Y="//"+(Y||""),O&&O.charAt(0)!=="/"&&(O="/"+O)):Y||(Y=""),H&&H.charAt(0)!=="#"&&(H="#"+H),Z&&Z.charAt(0)!=="?"&&(Z="?"+Z),O=O.replace(/[?#]/g,function(te){return encodeURIComponent(te)}),Z=Z.replace("#","%23"),R+Y+O+Z+H};function y(M,R){return A(M,!1,!0).resolve(R)}n.prototype.resolve=function(M){return this.resolveObject(A(M,!1,!0)).format()};function k(M,R){return M?A(M,!1,!0).resolveObject(R):R}n.prototype.resolveObject=function(M){if(C(M)){var R=new n;R.parse(M,!1,!0),M=R}var O=new n;if(Object.keys(this).forEach(function(ce){O[ce]=this[ce]},this),O.hash=M.hash,M.href==="")return O.href=O.format(),O;if(M.slashes&&!M.protocol)return Object.keys(M).forEach(function(ce){ce!=="protocol"&&(O[ce]=M[ce])}),w[O.protocol]&&O.hostname&&!O.pathname&&(O.path=O.pathname="/"),O.href=O.format(),O;if(M.protocol&&M.protocol!==O.protocol){if(!w[M.protocol])return Object.keys(M).forEach(function(ce){O[ce]=M[ce]}),O.href=O.format(),O;if(O.protocol=M.protocol,!M.host&&!v[M.protocol]){for(var ue=(M.pathname||"").split("/");ue.length&&!(M.host=ue.shift()););M.host||(M.host=""),M.hostname||(M.hostname=""),ue[0]!==""&&ue.unshift(""),ue.length<2&&ue.unshift(""),O.pathname=ue.join("/")}else O.pathname=M.pathname;if(O.search=M.search,O.query=M.query,O.host=M.host||"",O.auth=M.auth,O.hostname=M.hostname||M.host,O.port=M.port,O.pathname||O.search){var H=O.pathname||"",Y=O.search||"";O.path=H+Y}return O.slashes=O.slashes||M.slashes,O.href=O.format(),O}var J=O.pathname&&O.pathname.charAt(0)==="/",Z=M.host||M.pathname&&M.pathname.charAt(0)==="/",te=Z||J||O.host&&M.pathname,ie=te,se=O.pathname&&O.pathname.split("/")||[],ue=M.pathname&&M.pathname.split("/")||[],ne=O.protocol&&!w[O.protocol];if(ne&&(O.hostname="",O.port=null,O.host&&(se[0]===""?se[0]=O.host:se.unshift(O.host)),O.host="",M.protocol&&(M.hostname=null,M.port=null,M.host&&(ue[0]===""?ue[0]=M.host:ue.unshift(M.host)),M.host=null),te=te&&(ue[0]===""||se[0]==="")),Z)O.host=M.host||M.host===""?M.host:O.host,O.hostname=M.hostname||M.hostname===""?M.hostname:O.hostname,O.search=M.search,O.query=M.query,se=ue;else if(ue.length)se||(se=[]),se.pop(),se=se.concat(ue),O.search=M.search,O.query=M.query;else if(!S(M.search)){if(ne){O.hostname=O.host=se.shift();var G=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;G&&(O.auth=G.shift(),O.host=O.hostname=G.shift())}return O.search=M.search,O.query=M.query,(!T(O.pathname)||!T(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.href=O.format(),O}if(!se.length)return O.pathname=null,O.search?O.path="/"+O.search:O.path=null,O.href=O.format(),O;for(var K=se.slice(-1)[0],le=(O.host||M.host)&&(K==="."||K==="..")||K==="",re=0,ae=se.length;ae>=0;ae--)K=se[ae],K=="."?se.splice(ae,1):K===".."?(se.splice(ae,1),re++):re&&(se.splice(ae,1),re--);if(!te&&!ie)for(;re--;re)se.unshift("..");te&&se[0]!==""&&(!se[0]||se[0].charAt(0)!=="/")&&se.unshift(""),le&&se.join("/").substr(-1)!=="/"&&se.push("");var ee=se[0]===""||se[0]&&se[0].charAt(0)==="/";if(ne){O.hostname=O.host=ee?"":se.length?se.shift():"";var G=O.host&&O.host.indexOf("@")>0?O.host.split("@"):!1;G&&(O.auth=G.shift(),O.host=O.hostname=G.shift())}return te=te||O.host&&se.length,te&&!ee&&se.unshift(""),se.length?O.pathname=se.join("/"):(O.pathname=null,O.path=null),(!T(O.pathname)||!T(O.search))&&(O.path=(O.pathname?O.pathname:"")+(O.search?O.search:"")),O.auth=M.auth||O.auth,O.slashes=O.slashes||M.slashes,O.href=O.format(),O},n.prototype.parseHost=function(){var M=this.host,R=o.exec(M);R&&(R=R[0],R!==":"&&(this.port=R.substr(1)),M=M.substr(0,M.length-R.length)),M&&(this.hostname=M)};function C(M){return typeof M=="string"}function D(M){return typeof M=="object"&&M!==null}function T(M){return M===null}function S(M){return M==null}},function(i,t,r){var u;(function(n,a){/*! https://mths.be/punycode v1.3.2 by @mathias */(function(o){typeof t=="object"&&t&&t.nodeType,typeof n=="object"&&n&&n.nodeType;var h=typeof a=="object"&&a;h.global===h||h.window===h||h.self;var g,l=2147483647,c=36,d=1,F=26,p=38,f=700,m=72,v=128,w="-",x=/^xn--/,A=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=c-d,C=Math.floor,D=String.fromCharCode;function T(ue){throw RangeError(y[ue])}function S(ue,ne){for(var G=ue.length,K=[];G--;)K[G]=ne(ue[G]);return K}function M(ue,ne){var G=ue.split("@"),K="";G.length>1&&(K=G[0]+"@",ue=G[1]),ue=ue.replace(b,".");var le=ue.split("."),re=S(le,ne).join(".");return K+re}function R(ue){for(var ne=[],G=0,K=ue.length,le,re;G<K;)le=ue.charCodeAt(G++),le>=55296&&le<=56319&&G<K?(re=ue.charCodeAt(G++),(re&64512)==56320?ne.push(((le&1023)<<10)+(re&1023)+65536):(ne.push(le),G--)):ne.push(le);return ne}function O(ue){return S(ue,function(ne){var G="";return ne>65535&&(ne-=65536,G+=D(ne>>>10&1023|55296),ne=56320|ne&1023),G+=D(ne),G}).join("")}function H(ue){return ue-48<10?ue-22:ue-65<26?ue-65:ue-97<26?ue-97:c}function Y(ue,ne){return ue+22+75*(ue<26)-((ne!=0)<<5)}function J(ue,ne,G){var K=0;for(ue=G?C(ue/f):ue>>1,ue+=C(ue/ne);ue>k*F>>1;K+=c)ue=C(ue/k);return C(K+(k+1)*ue/(ue+p))}function Z(ue){var ne=[],G=ue.length,K,le=0,re=v,ae=m,ee,ce,xe,Ee,W,z,$,P,B;for(ee=ue.lastIndexOf(w),ee<0&&(ee=0),ce=0;ce<ee;++ce)ue.charCodeAt(ce)>=128&&T("not-basic"),ne.push(ue.charCodeAt(ce));for(xe=ee>0?ee+1:0;xe<G;){for(Ee=le,W=1,z=c;xe>=G&&T("invalid-input"),$=H(ue.charCodeAt(xe++)),($>=c||$>C((l-le)/W))&&T("overflow"),le+=$*W,P=z<=ae?d:z>=ae+F?F:z-ae,!($<P);z+=c)B=c-P,W>C(l/B)&&T("overflow"),W*=B;K=ne.length+1,ae=J(le-Ee,K,Ee==0),C(le/K)>l-re&&T("overflow"),re+=C(le/K),le%=K,ne.splice(le++,0,re)}return O(ne)}function te(ue){var ne,G,K,le,re,ae,ee,ce,xe,Ee,W,z=[],$,P,B,X;for(ue=R(ue),$=ue.length,ne=v,G=0,re=m,ae=0;ae<$;++ae)W=ue[ae],W<128&&z.push(D(W));for(K=le=z.length,le&&z.push(w);K<$;){for(ee=l,ae=0;ae<$;++ae)W=ue[ae],W>=ne&&W<ee&&(ee=W);for(P=K+1,ee-ne>C((l-G)/P)&&T("overflow"),G+=(ee-ne)*P,ne=ee,ae=0;ae<$;++ae)if(W=ue[ae],W<ne&&++G>l&&T("overflow"),W==ne){for(ce=G,xe=c;Ee=xe<=re?d:xe>=re+F?F:xe-re,!(ce<Ee);xe+=c)X=ce-Ee,B=c-Ee,z.push(D(Y(Ee+X%B,0))),ce=C(X/B);z.push(D(Y(ce,0))),re=J(G,P,K==le),G=0,++K}++G,++ne}return z.join("")}function ie(ue){return M(ue,function(ne){return x.test(ne)?Z(ne.slice(4).toLowerCase()):ne})}function se(ue){return M(ue,function(ne){return A.test(ne)?"xn--"+te(ne):ne})}g={version:"1.3.2",ucs2:{decode:R,encode:O},decode:Z,encode:te,toASCII:se,toUnicode:ie},u=function(){return g}.call(t,r,t,n),u!==void 0&&(n.exports=u)})()}).call(t,r(6)(i),function(){return this}())},function(i,t){i.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children=[],r.webpackPolyfill=1),r}},function(i,t,r){t.decode=t.parse=r(8),t.encode=t.stringify=r(9)},function(i,t){function r(u,n){return Object.prototype.hasOwnProperty.call(u,n)}i.exports=function(u,n,a,o){n=n||"&",a=a||"=";var h={};if(typeof u!="string"||u.length===0)return h;var g=/\+/g;u=u.split(n);var l=1e3;o&&typeof o.maxKeys=="number"&&(l=o.maxKeys);var c=u.length;l>0&&c>l&&(c=l);for(var d=0;d<c;++d){var F=u[d].replace(g,"%20"),p=F.indexOf(a),f,m,v,w;p>=0?(f=F.substr(0,p),m=F.substr(p+1)):(f=F,m=""),v=decodeURIComponent(f),w=decodeURIComponent(m),r(h,v)?Array.isArray(h[v])?h[v].push(w):h[v]=[h[v],w]:h[v]=w}return h}},function(i,t){var r=function(u){switch(typeof u){case"string":return u;case"boolean":return u?"true":"false";case"number":return isFinite(u)?u:"";default:return""}};i.exports=function(u,n,a,o){return n=n||"&",a=a||"=",u===null&&(u=void 0),typeof u=="object"?Object.keys(u).map(function(h){var g=encodeURIComponent(r(h))+a;return Array.isArray(u[h])?u[h].map(function(l){return g+encodeURIComponent(r(l))}).join(n):g+encodeURIComponent(r(u[h]))}).join(n):o?encodeURIComponent(r(o))+a+encodeURIComponent(r(u)):""}},function(i,t){i.exports=function r(u,n){if(u===n)return!0;var a=Array.isArray(u),o=Array.isArray(n),h;if(a&&o){if(u.length!=n.length)return!1;for(h=0;h<u.length;h++)if(!r(u[h],n[h]))return!1;return!0}if(a!=o)return!1;if(u&&n&&typeof u=="object"&&typeof n=="object"){var g=Object.keys(u);if(g.length!==Object.keys(n).length)return!1;var l=u instanceof Date,c=n instanceof Date;if(l&&c)return u.getTime()==n.getTime();if(l!=c)return!1;var d=u instanceof RegExp,F=n instanceof RegExp;if(d&&F)return u.toString()==n.toString();if(d!=F)return!1;for(h=0;h<g.length;h++)if(!Object.prototype.hasOwnProperty.call(n,g[h]))return!1;for(h=0;h<g.length;h++)if(!r(u[g[h]],n[g[h]]))return!1;return!0}return!1}},function(i,t,r){i.exports={copy:u,checkDataType:n,checkDataTypes:a,coerceToTypes:h,toHash:g,getProperty:d,escapeQuotes:F,equal:r(10),ucs2length:r(12),varOccurences:p,varReplace:f,cleanUpCode:x,finalCleanUpCode:R,schemaHasRules:O,schemaHasRulesExcept:H,toQuotedString:Y,getPathExpr:J,getPath:Z,getData:se,unescapeFragment:ne,escapeFragment:G,escapeJsonPointer:K};function u(re,ae){ae=ae||{};for(var ee in re)ae[ee]=re[ee];return ae}function n(re,ae,ee){var ce=ee?" !== ":" === ",xe=ee?" || ":" && ",Ee=ee?"!":"",W=ee?"":"!";switch(re){case"null":return ae+ce+"null";case"array":return Ee+"Array.isArray("+ae+")";case"object":return"("+Ee+ae+xe+"typeof "+ae+ce+'"object"'+xe+W+"Array.isArray("+ae+"))";case"integer":return"(typeof "+ae+ce+'"number"'+xe+W+"("+ae+" % 1)"+xe+ae+ce+ae+")";default:return"typeof "+ae+ce+'"'+re+'"'}}function a(re,ae){switch(re.length){case 1:return n(re[0],ae,!0);default:var ee="",ce=g(re);ce.array&&ce.object&&(ee=ce.null?"(":"(!"+ae+" || ",ee+="typeof "+ae+' !== "object")',delete ce.null,delete ce.array,delete ce.object),ce.number&&delete ce.integer;for(var xe in ce)ee+=(ee?" && ":"")+n(xe,ae,!0);return ee}}var o=g(["string","number","integer","boolean","null"]);function h(re,ae){if(Array.isArray(ae)){for(var ee=[],ce=0;ce<ae.length;ce++){var xe=ae[ce];(o[xe]||re==="array"&&xe==="array")&&(ee[ee.length]=xe)}if(ee.length)return ee}else{if(o[ae])return[ae];if(re==="array"&&ae==="array")return["array"]}}function g(re){for(var ae={},ee=0;ee<re.length;ee++)ae[re[ee]]=!0;return ae}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function d(re){return typeof re=="number"?"["+re+"]":l.test(re)?"."+re:"['"+F(re)+"']"}function F(re){return re.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function p(re,ae){ae+="[^0-9]";var ee=re.match(new RegExp(ae,"g"));return ee?ee.length:0}function f(re,ae,ee){return ae+="([^0-9])",ee=ee.replace(/\$/g,"$$$$"),re.replace(new RegExp(ae,"g"),ee+"$1")}var m=/else\s*{\s*}/g,v=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,w=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g;function x(re){return re.replace(m,"").replace(v,"").replace(w,"if (!($1))")}var A=/[^v\.]errors/g,b=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,y=/var errors = 0;|var vErrors = null;/g,k="return errors === 0;",C="validate.errors = null; return true;",D=/if \(errors === 0\) return data;\s*else throw new ValidationError\(vErrors\);/,T="return data;",S=/[^A-Za-z_$]rootData[^A-Za-z0-9_$]/g,M=/if \(rootData === undefined\) rootData = data;/;function R(re,ae){var ee=re.match(A);return ee&&ee.length==2&&(re=ae?re.replace(y,"").replace(D,T):re.replace(b,"").replace(k,C)),ee=re.match(S),!ee||ee.length!==3?re:re.replace(M,"")}function O(re,ae){if(typeof re=="boolean")return!re;for(var ee in re)if(ae[ee])return!0}function H(re,ae,ee){if(typeof re=="boolean")return!re&&ee!="not";for(var ce in re)if(ce!=ee&&ae[ce])return!0}function Y(re){return"'"+F(re)+"'"}function J(re,ae,ee,ce){var xe=ee?"'/' + "+ae+(ce?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):ce?"'[' + "+ae+" + ']'":"'[\\'' + "+ae+" + '\\']'";return ue(re,xe)}function Z(re,ae,ee){var ce=Y(ee?"/"+K(ae):d(ae));return ue(re,ce)}var te=/^\/(?:[^~]|~0|~1)*$/,ie=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function se(re,ae,ee){var ce,xe,Ee,W;if(re==="")return"rootData";if(re[0]=="/"){if(!te.test(re))throw new Error("Invalid JSON-pointer: "+re);xe=re,Ee="rootData"}else{if(W=re.match(ie),!W)throw new Error("Invalid JSON-pointer: "+re);if(ce=+W[1],xe=W[2],xe=="#"){if(ce>=ae)throw new Error("Cannot access property/index "+ce+" levels up, current level is "+ae);return ee[ae-ce]}if(ce>ae)throw new Error("Cannot access data "+ce+" levels up, current level is "+ae);if(Ee="data"+(ae-ce||""),!xe)return Ee}for(var z=Ee,$=xe.split("/"),P=0;P<$.length;P++){var B=$[P];B&&(Ee+=d(le(B)),z+=" && "+Ee)}return z}function ue(re,ae){return re=='""'?ae:(re+" + "+ae).replace(/' \+ '/g,"")}function ne(re){return le(decodeURIComponent(re))}function G(re){return encodeURIComponent(K(re))}function K(re){return re.replace(/~/g,"~0").replace(/\//g,"~1")}function le(re){return re.replace(/~1/g,"/").replace(/~0/g,"~")}},function(i,t){i.exports=function(u){for(var n=0,a=u.length,o=0,h;o<a;)n++,h=u.charCodeAt(o++),h>=55296&&h<=56319&&o<a&&(h=u.charCodeAt(o),(h&64512)==56320&&o++);return n}},function(i,t,r){var u=r(11);i.exports=n;function n(a){u.copy(a,this)}},function(i,t){var r=i.exports=function(a,o,h){typeof o=="function"&&(h=o,o={}),u(o,h,a,"",a)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function u(a,o,h,g,l,c,d,F,p){if(h&&typeof h=="object"&&!Array.isArray(h)){o(h,g,l,c,d,F,p);for(var f in h){var m=h[f];if(Array.isArray(m)){if(f in r.arrayKeywords)for(var v=0;v<m.length;v++)u(a,o,m[v],g+"/"+f+"/"+v,l,g,f,h,v)}else if(f in r.propsKeywords){if(m&&typeof m=="object")for(var w in m)u(a,o,m[w],g+"/"+f+"/"+n(w),l,g,f,h,w)}else(f in r.keywords||a.allKeys&&!(f in r.skipKeywords))&&u(a,o,m,g+"/"+f,l,g,f,h)}}}function n(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}},function(i,t,r){var u=r(3);i.exports={Validation:o(n),MissingRef:o(a)};function n(h){this.message="validation failed",this.errors=h,this.ajv=this.validation=!0}a.message=function(h,g){return"can't resolve reference "+g+" from id "+h};function a(h,g,l){this.message=l||a.message(h,g),this.missingRef=u.url(h,g),this.missingSchema=u.normalizeId(u.fullPath(this.missingRef))}function o(h){return h.prototype=Object.create(Error.prototype),h.prototype.constructor=h,h}},function(i,t,r){var u=typeof JSON<"u"?JSON:r(17);i.exports=function(o,h){h||(h={}),typeof h=="function"&&(h={cmp:h});var g=h.space||"";typeof g=="number"&&(g=Array(g+1).join(" "));var l=typeof h.cycles=="boolean"?h.cycles:!1,c=h.replacer||function(p,f){return f},d=h.cmp&&function(p){return function(f){return function(m,v){var w={key:m,value:f[m]},x={key:v,value:f[v]};return p(w,x)}}}(h.cmp),F=[];return function p(f,m,v,w){var x=g?`
`+new Array(w+1).join(g):"",A=g?": ":":";if(v&&v.toJSON&&typeof v.toJSON=="function"&&(v=v.toJSON()),v=c.call(f,m,v),v!==void 0){if(typeof v!="object"||v===null)return u.stringify(v);if(n(v)){for(var b=[],y=0;y<v.length;y++){var k=p(v,y,v[y],w+1)||u.stringify(null);b.push(x+g+k)}return"["+b.join(",")+x+"]"}else{if(F.indexOf(v)!==-1){if(l)return u.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}else F.push(v);for(var C=a(v).sort(d&&d(v)),b=[],y=0;y<C.length;y++){var m=C[y],D=p(v,m,v[m],w+1);if(D){var T=u.stringify(m)+A+D;b.push(x+g+T)}}return F.splice(F.indexOf(v),1),"{"+b.join(",")+x+"}"}}}({"":o},"",o,0)};var n=Array.isArray||function(o){return{}.toString.call(o)==="[object Array]"},a=Object.keys||function(o){var h=Object.prototype.hasOwnProperty||function(){return!0},g=[];for(var l in o)h.call(o,l)&&g.push(l);return g}},function(i,t,r){t.parse=r(18),t.stringify=r(19)},function(i,t){var r,u,n={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
`,r:"\r",t:"	"},a,o=function(m){throw{name:"SyntaxError",message:m,at:r,text:a}},h=function(m){return m&&m!==u&&o("Expected '"+m+"' instead of '"+u+"'"),u=a.charAt(r),r+=1,u},g=function(){var m,v="";for(u==="-"&&(v="-",h("-"));u>="0"&&u<="9";)v+=u,h();if(u===".")for(v+=".";h()&&u>="0"&&u<="9";)v+=u;if(u==="e"||u==="E")for(v+=u,h(),(u==="-"||u==="+")&&(v+=u,h());u>="0"&&u<="9";)v+=u,h();if(m=+v,!isFinite(m))o("Bad number");else return m},l=function(){var m,v,w="",x;if(u==='"')for(;h();){if(u==='"')return h(),w;if(u==="\\")if(h(),u==="u"){for(x=0,v=0;v<4&&(m=parseInt(h(),16),!!isFinite(m));v+=1)x=x*16+m;w+=String.fromCharCode(x)}else if(typeof n[u]=="string")w+=n[u];else break;else w+=u}o("Bad string")},c=function(){for(;u&&u<=" ";)h()},d=function(){switch(u){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}o("Unexpected '"+u+"'")},F,p=function(){var m=[];if(u==="["){if(h("["),c(),u==="]")return h("]"),m;for(;u;){if(m.push(F()),c(),u==="]")return h("]"),m;h(","),c()}}o("Bad array")},f=function(){var m,v={};if(u==="{"){if(h("{"),c(),u==="}")return h("}"),v;for(;u;){if(m=l(),c(),h(":"),Object.hasOwnProperty.call(v,m)&&o('Duplicate key "'+m+'"'),v[m]=F(),c(),u==="}")return h("}"),v;h(","),c()}}o("Bad object")};F=function(){switch(c(),u){case"{":return f();case"[":return p();case'"':return l();case"-":return g();default:return u>="0"&&u<="9"?g():d()}},i.exports=function(m,v){var w;return a=m,r=0,u=" ",w=F(),c(),u&&o("Syntax error"),typeof v=="function"?function x(A,b){var y,k,C=A[b];if(C&&typeof C=="object")for(y in C)Object.prototype.hasOwnProperty.call(C,y)&&(k=x(C,y),k!==void 0?C[y]=k:delete C[y]);return v.call(A,b,C)}({"":w},""):w}},function(i,t){var r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,u,n,a={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},o;function h(l){return r.lastIndex=0,r.test(l)?'"'+l.replace(r,function(c){var d=a[c];return typeof d=="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+l+'"'}function g(l,c){var d,F,p,f,m=u,v,w=c[l];switch(w&&typeof w=="object"&&typeof w.toJSON=="function"&&(w=w.toJSON(l)),typeof o=="function"&&(w=o.call(c,l,w)),typeof w){case"string":return h(w);case"number":return isFinite(w)?String(w):"null";case"boolean":case"null":return String(w);case"object":if(!w)return"null";if(u+=n,v=[],Object.prototype.toString.apply(w)==="[object Array]"){for(f=w.length,d=0;d<f;d+=1)v[d]=g(d,w)||"null";return p=v.length===0?"[]":u?`[
`+u+v.join(`,
`+u)+`
`+m+"]":"["+v.join(",")+"]",u=m,p}if(o&&typeof o=="object")for(f=o.length,d=0;d<f;d+=1)F=o[d],typeof F=="string"&&(p=g(F,w),p&&v.push(h(F)+(u?": ":":")+p));else for(F in w)Object.prototype.hasOwnProperty.call(w,F)&&(p=g(F,w),p&&v.push(h(F)+(u?": ":":")+p));return p=v.length===0?"{}":u?`{
`+u+v.join(`,
`+u)+`
`+m+"}":"{"+v.join(",")+"}",u=m,p}}i.exports=function(l,c,d){var F;if(u="",n="",typeof d=="number")for(F=0;F<d;F+=1)n+=" ";else typeof d=="string"&&(n=d);if(o=c,c&&typeof c!="function"&&(typeof c!="object"||typeof c.length!="number"))throw new Error("JSON.stringify");return g("",{"":l})}},function(i,t){i.exports=function(u,n,a){var o="",h=u.schema.$async===!0,g=u.util.schemaHasRulesExcept(u.schema,u.RULES.all,"$ref"),l=u.self._getId(u.schema);if(u.isTop){if(h){u.async=!0;var c=u.opts.async=="es7";u.yieldAwait=c?"await":"yield"}o+=" var validate = ",h?c?o+=" (async function ":(u.opts.async!="*"&&(o+="co.wrap"),o+="(function* "):o+=" (function ",o+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",l&&(u.opts.sourceCode||u.opts.processCode)&&(o+=" "+("/*# sourceURL="+l+" */")+" ")}if(typeof u.schema=="boolean"||!(g||u.schema.$ref)){var n="false schema",d=u.level,F=u.dataLevel,p=u.schema[n],f=u.schemaPath+u.util.getProperty(n),m=u.errSchemaPath+"/"+n,y=!u.opts.allErrors,D,v="data"+(F||""),b="valid"+d;if(u.schema===!1){u.isTop?y=!0:o+=" var "+b+" = false; ";var w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(D||"false schema")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(m)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'boolean schema is false' "),u.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+u.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var x=o;o=w.pop(),!u.compositeRule&&y?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else u.isTop?h?o+=" return data; ":o+=" validate.errors = null; return true; ":o+=" var "+b+" = true; ";return u.isTop&&(o+=" }); return validate; "),o}if(u.isTop){var A=u.isTop,d=u.level=0,F=u.dataLevel=0,v="data";u.rootId=u.resolve.fullPath(u.self._getId(u.root.schema)),u.baseId=u.baseId||u.rootId,delete u.isTop,u.dataPathArr=[void 0],o+=" var vErrors = null; ",o+=" var errors = 0;     ",o+=" if (rootData === undefined) rootData = data; "}else{var d=u.level,F=u.dataLevel,v="data"+(F||"");if(l&&(u.baseId=u.resolve.url(u.baseId,l)),h&&!u.async)throw new Error("async schema in sync schema");o+=" var errs_"+d+" = errors;"}var b="valid"+d,y=!u.opts.allErrors,k="",C="",D,T=u.schema.type,S=Array.isArray(T);if(S&&T.length==1&&(T=T[0],S=!1),u.schema.$ref&&g){if(u.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+u.errSchemaPath+'" (see option extendRefs)');u.opts.extendRefs!==!0&&(g=!1,console.warn('$ref: keywords ignored in schema at path "'+u.errSchemaPath+'"'))}if(T){if(u.opts.coerceTypes)var M=u.util.coerceToTypes(u.opts.coerceTypes,T);var R=u.RULES.types[T];if(M||S||R===!0||R&&!ye(R)){var f=u.schemaPath+".type",m=u.errSchemaPath+"/type",f=u.schemaPath+".type",m=u.errSchemaPath+"/type",O=S?"checkDataTypes":"checkDataType";if(o+=" if ("+u.util[O](T,v,!0)+") { ",M){var H="dataType"+d,Y="coerced"+d;o+=" var "+H+" = typeof "+v+"; ",u.opts.coerceTypes=="array"&&(o+=" if ("+H+" == 'object' && Array.isArray("+v+")) "+H+" = 'array'; "),o+=" var "+Y+" = undefined; ";var J="",Z=M;if(Z)for(var te,ie=-1,se=Z.length-1;ie<se;)te=Z[ie+=1],ie&&(o+=" if ("+Y+" === undefined) { ",J+="}"),u.opts.coerceTypes=="array"&&te!="array"&&(o+=" if ("+H+" == 'array' && "+v+".length == 1) { "+Y+" = "+v+" = "+v+"[0]; "+H+" = typeof "+v+";  } "),te=="string"?o+=" if ("+H+" == 'number' || "+H+" == 'boolean') "+Y+" = '' + "+v+"; else if ("+v+" === null) "+Y+" = ''; ":te=="number"||te=="integer"?(o+=" if ("+H+" == 'boolean' || "+v+" === null || ("+H+" == 'string' && "+v+" && "+v+" == +"+v+" ",te=="integer"&&(o+=" && !("+v+" % 1)"),o+=")) "+Y+" = +"+v+"; "):te=="boolean"?o+=" if ("+v+" === 'false' || "+v+" === 0 || "+v+" === null) "+Y+" = false; else if ("+v+" === 'true' || "+v+" === 1) "+Y+" = true; ":te=="null"?o+=" if ("+v+" === '' || "+v+" === 0 || "+v+" === false) "+Y+" = null; ":u.opts.coerceTypes=="array"&&te=="array"&&(o+=" if ("+H+" == 'string' || "+H+" == 'number' || "+H+" == 'boolean' || "+v+" == null) "+Y+" = ["+v+"]; ");o+=" "+J+" if ("+Y+" === undefined) {   ";var w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(D||"type")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(m)+" , params: { type: '",S?o+=""+T.join(","):o+=""+T,o+="' } ",u.opts.messages!==!1&&(o+=" , message: 'should be ",S?o+=""+T.join(","):o+=""+T,o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var x=o;o=w.pop(),!u.compositeRule&&y?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else {  ";var ue=F?"data"+(F-1||""):"parentData",ne=F?u.dataPathArr[F]:"parentDataProperty";o+=" "+v+" = "+Y+"; ",F||(o+="if ("+ue+" !== undefined)"),o+=" "+ue+"["+ne+"] = "+Y+"; } "}else{var w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(D||"type")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(m)+" , params: { type: '",S?o+=""+T.join(","):o+=""+T,o+="' } ",u.opts.messages!==!1&&(o+=" , message: 'should be ",S?o+=""+T.join(","):o+=""+T,o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var x=o;o=w.pop(),!u.compositeRule&&y?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}o+=" } "}}if(u.schema.$ref&&!g)o+=" "+u.RULES.all.$ref.code(u,"$ref")+" ",y&&(o+=" } if (errors === ",A?o+="0":o+="errs_"+d,o+=") { ",C+="}");else{u.opts.v5&&u.schema.patternGroups&&console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.');var G=u.RULES;if(G){for(var R,K=-1,le=G.length-1;K<le;)if(R=G[K+=1],ye(R)){if(R.type&&(o+=" if ("+u.util.checkDataType(R.type,v)+") { "),u.opts.useDefaults&&!u.compositeRule){if(R.type=="object"&&u.schema.properties){var p=u.schema.properties,re=Object.keys(p),ae=re;if(ae)for(var ee,ce=-1,xe=ae.length-1;ce<xe;){ee=ae[ce+=1];var Ee=p[ee];if(Ee.default!==void 0){var W=v+u.util.getProperty(ee);o+="  if ("+W+" === undefined) "+W+" = ",u.opts.useDefaults=="shared"?o+=" "+u.useDefault(Ee.default)+" ":o+=" "+JSON.stringify(Ee.default)+" ",o+="; "}}}else if(R.type=="array"&&Array.isArray(u.schema.items)){var z=u.schema.items;if(z){for(var Ee,ie=-1,$=z.length-1;ie<$;)if(Ee=z[ie+=1],Ee.default!==void 0){var W=v+"["+ie+"]";o+="  if ("+W+" === undefined) "+W+" = ",u.opts.useDefaults=="shared"?o+=" "+u.useDefault(Ee.default)+" ":o+=" "+JSON.stringify(Ee.default)+" ",o+="; "}}}}var P=R.rules;if(P){for(var B,X=-1,oe=P.length-1;X<oe;)if(B=P[X+=1],Te(B)){var we=B.code(u,B.keyword,R.type);we&&(o+=" "+we+" ",y&&(k+="}"))}}if(y&&(o+=" "+k+" ",k=""),R.type&&(o+=" } ",T&&T===R.type&&!M)){o+=" else { ";var f=u.schemaPath+".type",m=u.errSchemaPath+"/type",w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(D||"type")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(m)+" , params: { type: '",S?o+=""+T.join(","):o+=""+T,o+="' } ",u.opts.messages!==!1&&(o+=" , message: 'should be ",S?o+=""+T.join(","):o+=""+T,o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+f+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+v+" "),o+=" } "):o+=" {} ";var x=o;o=w.pop(),!u.compositeRule&&y?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } "}y&&(o+=" if (errors === ",A?o+="0":o+="errs_"+d,o+=") { ",C+="}")}}}y&&(o+=" "+C+" "),A?(h?(o+=" if (errors === 0) return data;           ",o+=" else throw new ValidationError(vErrors); "):(o+=" validate.errors = vErrors; ",o+=" return errors === 0;       "),o+=" }); return validate;"):o+=" var "+b+" = errors === errs_"+d+";",o=u.util.cleanUpCode(o),A&&(o=u.util.finalCleanUpCode(o,h));function ye(Re){for(var st=Re.rules,lt=0;lt<st.length;lt++)if(Te(st[lt]))return!0}function Te(Re){return u.schema[Re.keyword]!==void 0||Re.implements&&Ye(Re)}function Ye(Re){for(var st=Re.implements,lt=0;lt<st.length;lt++)if(u.schema[st[lt]]!==void 0)return!0}return o}},function(i,t){var r=Array.prototype.slice;i.exports=u.default=u.co=u,u.wrap=function(F){return p.__generatorFunction__=F,p;function p(){return u.call(this,F.apply(this,arguments))}};function u(F){var p=this,f=r.call(arguments,1);return new Promise(function(m,v){if(typeof F=="function"&&(F=F.apply(p,f)),!F||typeof F.next!="function")return m(F);w();function w(b){var y;try{y=F.next(b)}catch(k){return v(k)}A(y)}function x(b){var y;try{y=F.throw(b)}catch(k){return v(k)}A(y)}function A(b){if(b.done)return m(b.value);var y=n.call(p,b.value);return y&&g(y)?y.then(w,x):x(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(b.value)+'"'))}})}function n(F){return!F||g(F)?F:c(F)||l(F)?u.call(this,F):typeof F=="function"?a.call(this,F):Array.isArray(F)?o.call(this,F):d(F)?h.call(this,F):F}function a(F){var p=this;return new Promise(function(f,m){F.call(p,function(v,w){if(v)return m(v);arguments.length>2&&(w=r.call(arguments,1)),f(w)})})}function o(F){return Promise.all(F.map(n,this))}function h(F){for(var p=new F.constructor,f=Object.keys(F),m=[],v=0;v<f.length;v++){var w=f[v],x=n.call(this,F[w]);x&&g(x)?A(x,w):p[w]=F[w]}return Promise.all(m).then(function(){return p});function A(b,y){p[y]=void 0,m.push(b.then(function(k){p[y]=k}))}}function g(F){return typeof F.then=="function"}function l(F){return typeof F.next=="function"&&typeof F.throw=="function"}function c(F){var p=F.constructor;return p?p.name==="GeneratorFunction"||p.displayName==="GeneratorFunction"?!0:l(p.prototype):!1}function d(F){return Object==F.constructor}},function(i,t){var r=i.exports=function(){this._cache={}};r.prototype.put=function(n,a){this._cache[n]=a},r.prototype.get=function(n){return this._cache[n]},r.prototype.del=function(n){delete this._cache[n]},r.prototype.clear=function(){this._cache={}}},function(i,t,r){var u=r(11),n=/^\d\d\d\d-(\d\d)-(\d\d)$/,a=[0,31,29,31,30,31,30,31,31,30,31,30,31],o=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,h=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,g=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'"()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#.\/;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\:[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\:[1-9][0-9]{0,3}|\*)?)*\})*$/i,d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+\-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,F=/^(?:urn\:uuid\:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,p=/^(?:\/(?:[^~\/]|~0|~1)*)*$|^\#(?:\/(?:[a-z0-9_\-\.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,f=/^(?:0|[1-9][0-9]*)(?:\#|(?:\/(?:[^~\/]|~0|~1)*)*)$/;i.exports=m;function m(T){return T=T=="full"?"full":"fast",u.copy(m[T])}m.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?:\:|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":c,url:d,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:h,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:D,uuid:F,"json-pointer":p,"relative-json-pointer":f},m.full={date:v,time:w,"date-time":A,uri:k,"uri-reference":l,"uri-template":c,url:d,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:b,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:D,uuid:F,"json-pointer":p,"relative-json-pointer":f};function v(T){var S=T.match(n);if(!S)return!1;var M=+S[1],R=+S[2];return M>=1&&M<=12&&R>=1&&R<=a[M]}function w(T,S){var M=T.match(o);if(!M)return!1;var R=M[1],O=M[2],H=M[3],Y=M[5];return R<=23&&O<=59&&H<=59&&(!S||Y)}var x=/t|\s/i;function A(T){var S=T.split(x);return S.length==2&&v(S[0])&&w(S[1],!0)}function b(T){return T.length<=255&&h.test(T)}var y=/\/|\:/;function k(T){return y.test(T)&&g.test(T)}var C=/[^\\]\\Z/;function D(T){if(C.test(T))return!1;try{return new RegExp(T),!0}catch{return!1}}},function(i,t,r){var u=r(25),n=r(11).toHash;i.exports=function(){var o=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","contains","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf"]}],h=["type"],g=["additionalItems","$schema","id","title","description","default","definitions"],l=["number","integer","string","array","object","boolean","null"];return o.all=n(h),o.types=n(l),o.forEach(function(c){c.rules=c.rules.map(function(d){var F;if(typeof d=="object"){var p=Object.keys(d)[0];F=d[p],d=p,F.forEach(function(m){h.push(m),o.all[m]=!0})}h.push(d);var f=o.all[d]={keyword:d,code:u[d],implements:F};return f}),c.type&&(o.types[c.type]=c)}),o.keywords=n(h.concat(g)),o.custom={},o}},function(i,t,r){i.exports={$ref:r(26),allOf:r(27),anyOf:r(28),const:r(29),contains:r(30),dependencies:r(31),enum:r(32),format:r(33),items:r(34),maximum:r(35),minimum:r(35),maxItems:r(36),minItems:r(36),maxLength:r(37),minLength:r(37),maxProperties:r(38),minProperties:r(38),multipleOf:r(39),not:r(40),oneOf:r(41),pattern:r(42),properties:r(43),propertyNames:r(44),required:r(45),uniqueItems:r(46),validate:r(20)}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.errSchemaPath+"/"+n,d=!u.opts.allErrors,F="data"+(g||""),p="valid"+h,f,m;if(l=="#"||l=="#/")u.isRoot?(f=u.async,m="validate"):(f=u.root.schema.$async===!0,m="root.refVal[0]");else{var v=u.resolveRef(u.baseId,l,u.isRoot);if(v===void 0){var w=u.MissingRefError.message(u.baseId,l);if(u.opts.missingRefs=="fail"){console.error(w);var x=x||[];x.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(c)+" , params: { ref: '"+u.util.escapeQuotes(l)+"' } ",u.opts.messages!==!1&&(o+=" , message: 'can\\'t resolve reference "+u.util.escapeQuotes(l)+"' "),u.opts.verbose&&(o+=" , schema: "+u.util.toQuotedString(l)+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+F+" "),o+=" } "):o+=" {} ";var A=o;o=x.pop(),!u.compositeRule&&d?u.async?o+=" throw new ValidationError(["+A+"]); ":o+=" validate.errors = ["+A+"]; return false; ":o+=" var err = "+A+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(o+=" if (false) { ")}else if(u.opts.missingRefs=="ignore")console.warn(w),d&&(o+=" if (true) { ");else throw new u.MissingRefError(u.baseId,l,w)}else if(v.inline){var b=u.util.copy(u);b.level++;var y="valid"+b.level;b.schema=v.schema,b.schemaPath="",b.errSchemaPath=l;var k=u.validate(b).replace(/validate\.schema/g,v.code);o+=" "+k+" ",d&&(o+=" if ("+y+") { ")}else f=v.$async===!0,m=v.code}if(m){var x=x||[];x.push(o),o="",u.opts.passContext?o+=" "+m+".call(this, ":o+=" "+m+"( ",o+=" "+F+", (dataPath || '')",u.errorPath!='""'&&(o+=" + "+u.errorPath);var C=g?"data"+(g-1||""):"parentData",D=g?u.dataPathArr[g]:"parentDataProperty";o+=" , "+C+" , "+D+", rootData)  ";var T=o;if(o=x.pop(),f){if(!u.async)throw new Error("async schema referenced by sync schema");d&&(o+=" var "+p+"; "),o+=" try { "+u.yieldAwait+" "+T+"; ",d&&(o+=" "+p+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",d&&(o+=" "+p+" = false; "),o+=" } ",d&&(o+=" if ("+p+") { ")}else o+=" if (!"+T+") { if (vErrors === null) vErrors = "+m+".errors; else vErrors = vErrors.concat("+m+".errors); errors = vErrors.length; } ",d&&(o+=" else { ")}return o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.schema[n],g=u.schemaPath+u.util.getProperty(n),l=u.errSchemaPath+"/"+n,c=!u.opts.allErrors,d=u.util.copy(u),F="";d.level++;var p="valid"+d.level,f=d.baseId,m=!0,v=h;if(v)for(var w,x=-1,A=v.length-1;x<A;)w=v[x+=1],u.util.schemaHasRules(w,u.RULES.all)&&(m=!1,d.schema=w,d.schemaPath=g+"["+x+"]",d.errSchemaPath=l+"/"+x,o+="  "+u.validate(d)+" ",d.baseId=f,c&&(o+=" if ("+p+") { ",F+="}"));return c&&(m?o+=" if (true) { ":o+=" "+F.slice(0,-1)+" "),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m="errs__"+h,v=u.util.copy(u),w="";v.level++;var x="valid"+v.level,A=l.every(function(S){return u.util.schemaHasRules(S,u.RULES.all)});if(A){var b=v.baseId;o+=" var "+m+" = errors; var "+f+" = false;  ";var y=u.compositeRule;u.compositeRule=v.compositeRule=!0;var k=l;if(k)for(var C,D=-1,T=k.length-1;D<T;)C=k[D+=1],v.schema=C,v.schemaPath=c+"["+D+"]",v.errSchemaPath=d+"/"+D,o+="  "+u.validate(v)+" ",v.baseId=b,o+=" "+f+" = "+f+" || "+x+"; if (!"+f+") { ",w+="}";u.compositeRule=v.compositeRule=y,o+=" "+w+" if (!"+f+") {   var err =   ",u.createErrors!==!1?(o+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should match some schema in anyOf' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!u.compositeRule&&F&&(u.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; "),o+=" } else {  errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } ",u.opts.allErrors&&(o+=" } "),o=u.util.cleanUpCode(o)}else F&&(o+=" if (true) { ");return o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m=u.opts.$data&&l&&l.$data;m&&(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; "),m||(o+=" var schema"+h+" = validate.schema"+c+";"),o+="var "+f+" = equal("+p+", schema"+h+"); if (!"+f+") {   ";var v=v||[];v.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'const' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should be equal to constant' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var w=o;return o=v.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+w+"]); ":o+=" validate.errors = ["+w+"]; return false; ":o+=" var err = "+w+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" }",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m="errs__"+h,v=u.util.copy(u),w="";v.level++;var x="valid"+v.level,A="i"+h,b=v.dataLevel=u.dataLevel+1,y="data"+b,k=u.baseId,C=u.util.schemaHasRules(l,u.RULES.all);if(o+="var "+m+" = errors;var "+f+";",C){var D=u.compositeRule;u.compositeRule=v.compositeRule=!0,v.schema=l,v.schemaPath=c,v.errSchemaPath=d,o+=" var "+x+" = false; for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { ",v.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers,!0);var T=p+"["+A+"]";v.dataPathArr[b]=A;var S=u.validate(v);v.baseId=k,u.util.varOccurences(S,y)<2?o+=" "+u.util.varReplace(S,y,T)+" ":o+=" var "+y+" = "+T+"; "+S+" ",o+=" if ("+x+") break; }  ",u.compositeRule=v.compositeRule=D,o+=" "+w+" if (!"+x+") {"}else o+=" if ("+p+".length == 0) {";var M=M||[];M.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should contain a valid item' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var R=o;return o=M.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+R+"]); ":o+=" validate.errors = ["+R+"]; return false; ":o+=" var err = "+R+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { ",C&&(o+="  errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; } "),u.opts.allErrors&&(o+=" } "),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="errs__"+h,m=u.util.copy(u),v="";m.level++;var w="valid"+m.level,x={},A={},b=u.opts.ownProperties;for(D in l){var y=l[D],k=Array.isArray(y)?A:x;k[D]=y}o+="var "+f+" = errors;";var C=u.errorPath;o+="var missing"+h+";";for(var D in A)if(k=A[D],k.length){if(o+=" if ( "+p+u.util.getProperty(D)+" !== undefined ",b&&(o+=" && Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(D)+"') "),F){o+=" && ( ";var T=k;if(T)for(var S,M=-1,R=T.length-1;M<R;){S=T[M+=1],M&&(o+=" || ");var O=u.util.getProperty(S),H=p+O;o+=" ( ( "+H+" === undefined ",b&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(S)+"') "),o+=") && (missing"+h+" = "+u.util.toQuotedString(u.opts.jsonPointers?S:O)+") ) "}o+=")) {  ";var Y="missing"+h,J="' + "+Y+" + '";u.opts._errorDataPathProperty&&(u.errorPath=u.opts.jsonPointers?u.util.getPathExpr(C,Y,!0):C+" + "+Y);var Z=Z||[];Z.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { property: '"+u.util.escapeQuotes(D)+"', missingProperty: '"+J+"', depsCount: "+k.length+", deps: '"+u.util.escapeQuotes(k.length==1?k[0]:k.join(", "))+"' } ",u.opts.messages!==!1&&(o+=" , message: 'should have ",k.length==1?o+="property "+u.util.escapeQuotes(k[0]):o+="properties "+u.util.escapeQuotes(k.join(", ")),o+=" when property "+u.util.escapeQuotes(D)+" is present' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var te=o;o=Z.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+te+"]); ":o+=" validate.errors = ["+te+"]; return false; ":o+=" var err = "+te+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{o+=" ) { ";var ie=k;if(ie)for(var S,se=-1,ue=ie.length-1;se<ue;){S=ie[se+=1];var O=u.util.getProperty(S),J=u.util.escapeQuotes(S),H=p+O;u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPath(C,S,u.opts.jsonPointers)),o+=" if ( "+H+" === undefined ",b&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(S)+"') "),o+=") {  var err =   ",u.createErrors!==!1?(o+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { property: '"+u.util.escapeQuotes(D)+"', missingProperty: '"+J+"', depsCount: "+k.length+", deps: '"+u.util.escapeQuotes(k.length==1?k[0]:k.join(", "))+"' } ",u.opts.messages!==!1&&(o+=" , message: 'should have ",k.length==1?o+="property "+u.util.escapeQuotes(k[0]):o+="properties "+u.util.escapeQuotes(k.join(", ")),o+=" when property "+u.util.escapeQuotes(D)+" is present' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}o+=" }   ",F&&(v+="}",o+=" else { ")}u.errorPath=C;var ne=m.baseId;for(var D in x){var y=x[D];u.util.schemaHasRules(y,u.RULES.all)&&(o+=" "+w+" = true; if ( "+p+u.util.getProperty(D)+" !== undefined ",b&&(o+=" && Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(D)+"') "),o+=") { ",m.schema=y,m.schemaPath=c+u.util.getProperty(D),m.errSchemaPath=d+"/"+u.util.escapeFragment(D),o+="  "+u.validate(m)+" ",m.baseId=ne,o+=" }  ",F&&(o+=" if ("+w+") { ",v+="}"))}return F&&(o+="   "+v+" if ("+f+" == errors) {"),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m=u.opts.$data&&l&&l.$data;m&&(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ");var v="i"+h,w="schema"+h;m||(o+=" var "+w+" = validate.schema"+c+";"),o+="var "+f+";",m&&(o+=" if (schema"+h+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+h+")) "+f+" = false; else {"),o+=""+f+" = false;for (var "+v+"=0; "+v+"<"+w+".length; "+v+"++) if (equal("+p+", "+w+"["+v+"])) { "+f+" = true; break; }",m&&(o+="  }  "),o+=" if (!"+f+") {   ";var x=x||[];x.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { allowedValues: schema"+h+" } ",u.opts.messages!==!1&&(o+=" , message: 'should be equal to one of the allowed values' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var A=o;return o=x.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+A+"]); ":o+=" validate.errors = ["+A+"]; return false; ":o+=" var err = "+A+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" }",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||"");if(u.opts.format===!1)return F&&(o+=" if (true) { "),o;var f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=u.opts.unknownFormats,w=Array.isArray(v);if(f){var x="format"+h,A="isObject"+h,b="formatType"+h;o+=" var "+x+" = formats["+m+"]; var "+A+" = typeof "+x+" == 'object' && !("+x+" instanceof RegExp) && "+x+".validate; var "+b+" = "+A+" && "+x+".type || 'string'; if ("+A+") { ",u.async&&(o+=" var async"+h+" = "+x+".async; "),o+=" "+x+" = "+x+".validate; } if (  ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),o+=" (",v!="ignore"&&(o+=" ("+m+" && !"+x+" ",w&&(o+=" && self._opts.unknownFormats.indexOf("+m+") == -1 "),o+=") || "),o+=" ("+x+" && "+b+" == '"+a+"' && !(typeof "+x+" == 'function' ? ",u.async?o+=" (async"+h+" ? "+u.yieldAwait+" "+x+"("+p+") : "+x+"("+p+")) ":o+=" "+x+"("+p+") ",o+=" : "+x+".test("+p+"))))) {"}else{var x=u.formats[l];if(!x){if(v=="ignore")return console.warn('unknown format "'+l+'" ignored in schema at path "'+u.errSchemaPath+'"'),F&&(o+=" if (true) { "),o;if(w&&v.indexOf(l)>=0)return F&&(o+=" if (true) { "),o;throw new Error('unknown format "'+l+'" is used in schema at path "'+u.errSchemaPath+'"')}var A=typeof x=="object"&&!(x instanceof RegExp)&&x.validate,b=A&&x.type||"string";if(A){var y=x.async===!0;x=x.validate}if(b!=a)return F&&(o+=" if (true) { "),o;if(y){if(!u.async)throw new Error("async format in sync schema");var k="formats"+u.util.getProperty(l)+".validate";o+=" if (!("+u.yieldAwait+" "+k+"("+p+"))) { "}else{o+=" if (! ";var k="formats"+u.util.getProperty(l);A&&(k+=".validate"),typeof x=="function"?o+=" "+k+"("+p+") ":o+=" "+k+".test("+p+") ",o+=") { "}}var C=C||[];C.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'format' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { format:  ",f?o+=""+m:o+=""+u.util.toQuotedString(l),o+="  } ",u.opts.messages!==!1&&(o+=` , message: 'should match format "`,f?o+="' + "+m+" + '":o+=""+u.util.escapeQuotes(l),o+=`"' `),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+u.util.toQuotedString(l),o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var D=o;return o=C.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+D+"]); ":o+=" validate.errors = ["+D+"]; return false; ":o+=" var err = "+D+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m="errs__"+h,v=u.util.copy(u),w="";v.level++;var x="valid"+v.level,A="i"+h,b=v.dataLevel=u.dataLevel+1,y="data"+b,k=u.baseId;if(o+="var "+m+" = errors;var "+f+";",Array.isArray(l)){var C=u.schema.additionalItems;if(C===!1){o+=" "+f+" = "+p+".length <= "+l.length+"; ";var D=d;d=u.errSchemaPath+"/additionalItems",o+="  if (!"+f+") {   ";var T=T||[];T.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { limit: "+l.length+" } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have more than "+l.length+" items' "),u.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var S=o;o=T.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+S+"]); ":o+=" validate.errors = ["+S+"]; return false; ":o+=" var err = "+S+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",d=D,F&&(w+="}",o+=" else { ")}var M=l;if(M){for(var R,O=-1,H=M.length-1;O<H;)if(R=M[O+=1],u.util.schemaHasRules(R,u.RULES.all)){o+=" "+x+" = true; if ("+p+".length > "+O+") { ";var Y=p+"["+O+"]";v.schema=R,v.schemaPath=c+"["+O+"]",v.errSchemaPath=d+"/"+O,v.errorPath=u.util.getPathExpr(u.errorPath,O,u.opts.jsonPointers,!0),v.dataPathArr[b]=O;var J=u.validate(v);v.baseId=k,u.util.varOccurences(J,y)<2?o+=" "+u.util.varReplace(J,y,Y)+" ":o+=" var "+y+" = "+Y+"; "+J+" ",o+=" }  ",F&&(o+=" if ("+x+") { ",w+="}")}}if(typeof C=="object"&&u.util.schemaHasRules(C,u.RULES.all)){v.schema=C,v.schemaPath=u.schemaPath+".additionalItems",v.errSchemaPath=u.errSchemaPath+"/additionalItems",o+=" "+x+" = true; if ("+p+".length > "+l.length+") {  for (var "+A+" = "+l.length+"; "+A+" < "+p+".length; "+A+"++) { ",v.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers,!0);var Y=p+"["+A+"]";v.dataPathArr[b]=A;var J=u.validate(v);v.baseId=k,u.util.varOccurences(J,y)<2?o+=" "+u.util.varReplace(J,y,Y)+" ":o+=" var "+y+" = "+Y+"; "+J+" ",F&&(o+=" if (!"+x+") break; "),o+=" } }  ",F&&(o+=" if ("+x+") { ",w+="}")}}else if(u.util.schemaHasRules(l,u.RULES.all)){v.schema=l,v.schemaPath=c,v.errSchemaPath=d,o+="  for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { ",v.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers,!0);var Y=p+"["+A+"]";v.dataPathArr[b]=A;var J=u.validate(v);v.baseId=k,u.util.varOccurences(J,y)<2?o+=" "+u.util.varReplace(J,y,Y)+" ":o+=" var "+y+" = "+Y+"; "+J+" ",F&&(o+=" if (!"+x+") break; "),o+=" }"}return F&&(o+=" "+w+" if ("+m+" == errors) {"),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,k,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=n=="maximum",w=v?"exclusiveMaximum":"exclusiveMinimum",x=u.schema[w],A=u.opts.$data&&x&&x.$data,b=v?"<":">",y=v?">":"<",k=void 0;if(A){var C=u.util.getData(x.$data,g,u.dataPathArr),D="exclusive"+h,T="exclType"+h,S="exclIsNumber"+h,M="op"+h,R="' + "+M+" + '";o+=" var schemaExcl"+h+" = "+C+"; ",C="schemaExcl"+h,o+=" var "+D+"; var "+T+" = typeof "+C+"; if ("+T+" != 'boolean' && "+T+" != 'undefined' && "+T+" != 'number') { ";var k=w,O=O||[];O.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(k||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: '"+w+" should be boolean' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var H=o;o=O.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+H+"]); ":o+=" validate.errors = ["+H+"]; return false; ":o+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),o+=" "+T+" == 'number' ? ( ("+D+" = "+m+" === undefined || "+C+" "+b+"= "+m+") ? "+p+" "+y+"= "+C+" : "+p+" "+y+" "+m+" ) : ( ("+D+" = "+C+" === true) ? "+p+" "+y+"= "+m+" : "+p+" "+y+" "+m+" ) || "+p+" !== "+p+") { var op"+h+" = "+D+" ? '"+b+"' : '"+b+"=';"}else{var S=typeof x=="number",R=b;if(S&&f){var M="'"+R+"'";o+=" if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),o+=" ( "+m+" === undefined || "+x+" "+b+"= "+m+" ? "+p+" "+y+"= "+x+" : "+p+" "+y+" "+m+" ) || "+p+" !== "+p+") { "}else{S&&l===void 0?(D=!0,k=w,d=u.errSchemaPath+"/"+w,m=x,y+="="):(S&&(m=Math[v?"min":"max"](x,l)),x===(S?m:!0)?(D=!0,k=w,d=u.errSchemaPath+"/"+w,y+="="):(D=!1,R+="="));var M="'"+R+"'";o+=" if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),o+=" "+p+" "+y+" "+m+" || "+p+" !== "+p+") { "}}k=k||n;var O=O||[];O.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(k||"_limit")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { comparison: "+M+", limit: "+m+", exclusive: "+D+" } ",u.opts.messages!==!1&&(o+=" , message: 'should be "+R+" ",f?o+="' + "+m:o+=""+m+"'"),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var H=o;return o=O.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+H+"]); ":o+=" validate.errors = ["+H+"]; return false; ":o+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,w,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=n=="maxItems"?">":"<";o+="if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),o+=" "+p+".length "+v+" "+m+") { ";var w=n,x=x||[];x.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(w||"_limitItems")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { limit: "+m+" } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have ",n=="maxItems"?o+="more":o+="less",o+=" than ",f?o+="' + "+m+" + '":o+=""+l,o+=" items' "),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var A=o;return o=x.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+A+"]); ":o+=" validate.errors = ["+A+"]; return false; ":o+=" var err = "+A+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,w,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=n=="maxLength"?">":"<";o+="if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),u.opts.unicode===!1?o+=" "+p+".length ":o+=" ucs2length("+p+") ",o+=" "+v+" "+m+") { ";var w=n,x=x||[];x.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(w||"_limitLength")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { limit: "+m+" } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT be ",n=="maxLength"?o+="longer":o+="shorter",o+=" than ",f?o+="' + "+m+" + '":o+=""+l,o+=" characters' "),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var A=o;return o=x.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+A+"]); ":o+=" validate.errors = ["+A+"]; return false; ":o+=" var err = "+A+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,w,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=n=="maxProperties"?">":"<";o+="if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'number') || "),o+=" Object.keys("+p+").length "+v+" "+m+") { ";var w=n,x=x||[];x.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(w||"_limitProperties")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { limit: "+m+" } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have ",n=="maxProperties"?o+="more":o+="less",o+=" than ",f?o+="' + "+m+" + '":o+=""+l,o+=" properties' "),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var A=o;return o=x.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+A+"]); ":o+=" validate.errors = ["+A+"]; return false; ":o+=" var err = "+A+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l,o+="var division"+h+";if (",f&&(o+=" "+m+" !== undefined && ( typeof "+m+" != 'number' || "),o+=" (division"+h+" = "+p+" / "+m+", ",u.opts.multipleOfPrecision?o+=" Math.abs(Math.round(division"+h+") - division"+h+") > 1e-"+u.opts.multipleOfPrecision+" ":o+=" division"+h+" !== parseInt(division"+h+") ",o+=" ) ",f&&(o+="  )  "),o+=" ) {   ";var v=v||[];v.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { multipleOf: "+m+" } ",u.opts.messages!==!1&&(o+=" , message: 'should be multiple of ",f?o+="' + "+m:o+=""+m+"'"),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var w=o;return o=v.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+w+"]); ":o+=" validate.errors = ["+w+"]; return false; ":o+=" var err = "+w+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="errs__"+h,m=u.util.copy(u);m.level++;var v="valid"+m.level;if(u.util.schemaHasRules(l,u.RULES.all)){m.schema=l,m.schemaPath=c,m.errSchemaPath=d,o+=" var "+f+" = errors;  ";var w=u.compositeRule;u.compositeRule=m.compositeRule=!0,m.createErrors=!1;var x;m.opts.allErrors&&(x=m.opts.allErrors,m.opts.allErrors=!1),o+=" "+u.validate(m)+" ",m.createErrors=!0,x&&(m.opts.allErrors=x),u.compositeRule=m.compositeRule=w,o+=" if ("+v+") {   ";var A=A||[];A.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'not' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should NOT be valid' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var b=o;o=A.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+b+"]); ":o+=" validate.errors = ["+b+"]; return false; ":o+=" var err = "+b+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else {  errors = "+f+"; if (vErrors !== null) { if ("+f+") vErrors.length = "+f+"; else vErrors = null; } ",u.opts.allErrors&&(o+=" } ")}else o+="  var err =   ",u.createErrors!==!1?(o+=" { keyword: 'not' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should NOT be valid' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",F&&(o+=" if (false) { ");return o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m="errs__"+h,v=u.util.copy(u),w="";v.level++;var x="valid"+v.level;o+="var "+m+" = errors;var prevValid"+h+" = false;var "+f+" = false;";var A=v.baseId,b=u.compositeRule;u.compositeRule=v.compositeRule=!0;var y=l;if(y)for(var k,C=-1,D=y.length-1;C<D;)k=y[C+=1],u.util.schemaHasRules(k,u.RULES.all)?(v.schema=k,v.schemaPath=c+"["+C+"]",v.errSchemaPath=d+"/"+C,o+="  "+u.validate(v)+" ",v.baseId=A):o+=" var "+x+" = true; ",C&&(o+=" if ("+x+" && prevValid"+h+") "+f+" = false; else { ",w+="}"),o+=" if ("+x+") "+f+" = prevValid"+h+" = true;";return u.compositeRule=v.compositeRule=b,o+=""+w+"if (!"+f+") {   var err =   ",u.createErrors!==!1?(o+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: {} ",u.opts.messages!==!1&&(o+=" , message: 'should match exactly one schema in oneOf' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!u.compositeRule&&F&&(u.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; "),o+="} else {  errors = "+m+"; if (vErrors !== null) { if ("+m+") vErrors.length = "+m+"; else vErrors = null; }",u.opts.allErrors&&(o+=" } "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f=u.opts.$data&&l&&l.$data,m;f?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",m="schema"+h):m=l;var v=f?"(new RegExp("+m+"))":u.usePattern(l);o+="if ( ",f&&(o+=" ("+m+" !== undefined && typeof "+m+" != 'string') || "),o+=" !"+v+".test("+p+") ) {   ";var w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { pattern:  ",f?o+=""+m:o+=""+u.util.toQuotedString(l),o+="  } ",u.opts.messages!==!1&&(o+=` , message: 'should match pattern "`,f?o+="' + "+m+" + '":o+=""+u.util.escapeQuotes(l),o+=`"' `),u.opts.verbose&&(o+=" , schema:  ",f?o+="validate.schema"+c:o+=""+u.util.toQuotedString(l),o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var x=o;return o=w.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",F&&(o+=" else { "),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m="errs__"+h,v=u.util.copy(u),w="";v.level++;var x="valid"+v.level,A="key"+h,b="idx"+h,y=v.dataLevel=u.dataLevel+1,k="data"+y,C="dataProperties"+h,D=Object.keys(l||{}),T=u.schema.patternProperties||{},S=Object.keys(T),M=u.schema.additionalProperties,R=D.length||S.length,O=M===!1,H=typeof M=="object"&&Object.keys(M).length,Y=u.opts.removeAdditional,J=O||H||Y,Z=u.opts.ownProperties,te=u.baseId,ie=u.schema.required;if(ie&&!(u.opts.v5&&ie.$data)&&ie.length<u.opts.loopRequired)var se=u.util.toHash(ie);if(u.opts.patternGroups)var ue=u.schema.patternGroups||{},ne=Object.keys(ue);if(o+="var "+m+" = errors;var "+x+" = true;",Z&&(o+=" var "+C+" = undefined;"),J){if(Z?o+=" "+C+" = "+C+" || Object.keys("+p+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+A+" = "+C+"["+b+"]; ":o+=" for (var "+A+" in "+p+") { ",R){if(o+=" var isAdditional"+h+" = !(false ",D.length)if(D.length>5)o+=" || validate.schema"+c+"["+A+"] ";else{var G=D;if(G)for(var K,le=-1,re=G.length-1;le<re;)K=G[le+=1],o+=" || "+A+" == "+u.util.toQuotedString(K)+" "}if(S.length){var ae=S;if(ae)for(var ee,ce=-1,xe=ae.length-1;ce<xe;)ee=ae[ce+=1],o+=" || "+u.usePattern(ee)+".test("+A+") "}if(u.opts.patternGroups&&ne.length){var Ee=ne;if(Ee)for(var W,ce=-1,z=Ee.length-1;ce<z;)W=Ee[ce+=1],o+=" || "+u.usePattern(W)+".test("+A+") "}o+=" ); if (isAdditional"+h+") { "}if(Y=="all")o+=" delete "+p+"["+A+"]; ";else{var $=u.errorPath,P="' + "+A+" + '";if(u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers)),O)if(Y)o+=" delete "+p+"["+A+"]; ";else{o+=" "+x+" = false; ";var B=d;d=u.errSchemaPath+"/additionalProperties";var X=X||[];X.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { additionalProperty: '"+P+"' } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have additional properties' "),u.opts.verbose&&(o+=" , schema: false , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var oe=o;o=X.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+oe+"]); ":o+=" validate.errors = ["+oe+"]; return false; ":o+=" var err = "+oe+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=B,F&&(o+=" break; ")}else if(H)if(Y=="failing"){o+=" var "+m+" = errors;  ";var we=u.compositeRule;u.compositeRule=v.compositeRule=!0,v.schema=M,v.schemaPath=u.schemaPath+".additionalProperties",v.errSchemaPath=u.errSchemaPath+"/additionalProperties",v.errorPath=u.opts._errorDataPathProperty?u.errorPath:u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers);var ye=p+"["+A+"]";v.dataPathArr[y]=A;var Te=u.validate(v);v.baseId=te,u.util.varOccurences(Te,k)<2?o+=" "+u.util.varReplace(Te,k,ye)+" ":o+=" var "+k+" = "+ye+"; "+Te+" ",o+=" if (!"+x+") { errors = "+m+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+p+"["+A+"]; }  ",u.compositeRule=v.compositeRule=we}else{v.schema=M,v.schemaPath=u.schemaPath+".additionalProperties",v.errSchemaPath=u.errSchemaPath+"/additionalProperties",v.errorPath=u.opts._errorDataPathProperty?u.errorPath:u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers);var ye=p+"["+A+"]";v.dataPathArr[y]=A;var Te=u.validate(v);v.baseId=te,u.util.varOccurences(Te,k)<2?o+=" "+u.util.varReplace(Te,k,ye)+" ":o+=" var "+k+" = "+ye+"; "+Te+" ",F&&(o+=" if (!"+x+") break; ")}u.errorPath=$}R&&(o+=" } "),o+=" }  ",F&&(o+=" if ("+x+") { ",w+="}")}var Ye=u.opts.useDefaults&&!u.compositeRule;if(D.length){var Re=D;if(Re)for(var K,st=-1,lt=Re.length-1;st<lt;){K=Re[st+=1];var qt=l[K];if(u.util.schemaHasRules(qt,u.RULES.all)){var At=u.util.getProperty(K),ye=p+At,Nt=Ye&&qt.default!==void 0;v.schema=qt,v.schemaPath=c+At,v.errSchemaPath=d+"/"+u.util.escapeFragment(K),v.errorPath=u.util.getPath(u.errorPath,K,u.opts.jsonPointers),v.dataPathArr[y]=u.util.toQuotedString(K);var Te=u.validate(v);if(v.baseId=te,u.util.varOccurences(Te,k)<2){Te=u.util.varReplace(Te,k,ye);var dr=ye}else{var dr=k;o+=" var "+k+" = "+ye+"; "}if(Nt)o+=" "+Te+" ";else{if(se&&se[K]){o+=" if ( "+dr+" === undefined ",Z&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(K)+"') "),o+=") { "+x+" = false; ";var $=u.errorPath,B=d,Rr=u.util.escapeQuotes(K);u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPath($,K,u.opts.jsonPointers)),d=u.errSchemaPath+"/required";var X=X||[];X.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+Rr+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+Rr+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var oe=o;o=X.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+oe+"]); ":o+=" validate.errors = ["+oe+"]; return false; ":o+=" var err = "+oe+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d=B,u.errorPath=$,o+=" } else { "}else F?(o+=" if ( "+dr+" === undefined ",Z&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(K)+"') "),o+=") { "+x+" = true; } else { "):(o+=" if ("+dr+" !== undefined ",Z&&(o+=" &&   Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(K)+"') "),o+=" ) { ");o+=" "+Te+" } "}}F&&(o+=" if ("+x+") { ",w+="}")}}if(S.length){var Kr=S;if(Kr)for(var ee,T0=-1,Ls=Kr.length-1;T0<Ls;){ee=Kr[T0+=1];var qt=T[ee];if(u.util.schemaHasRules(qt,u.RULES.all)){v.schema=qt,v.schemaPath=u.schemaPath+".patternProperties"+u.util.getProperty(ee),v.errSchemaPath=u.errSchemaPath+"/patternProperties/"+u.util.escapeFragment(ee),Z?o+=" "+C+" = "+C+" || Object.keys("+p+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+A+" = "+C+"["+b+"]; ":o+=" for (var "+A+" in "+p+") { ",o+=" if ("+u.usePattern(ee)+".test("+A+")) { ",v.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers);var ye=p+"["+A+"]";v.dataPathArr[y]=A;var Te=u.validate(v);v.baseId=te,u.util.varOccurences(Te,k)<2?o+=" "+u.util.varReplace(Te,k,ye)+" ":o+=" var "+k+" = "+ye+"; "+Te+" ",F&&(o+=" if (!"+x+") break; "),o+=" } ",F&&(o+=" else "+x+" = true; "),o+=" }  ",F&&(o+=" if ("+x+") { ",w+="}")}}}if(u.opts.patternGroups&&ne.length){var lr=ne;if(lr)for(var W,hr=-1,Tu=lr.length-1;hr<Tu;){W=lr[hr+=1];var Pu=ue[W],qt=Pu.schema;if(u.util.schemaHasRules(qt,u.RULES.all)){v.schema=qt,v.schemaPath=u.schemaPath+".patternGroups"+u.util.getProperty(W)+".schema",v.errSchemaPath=u.errSchemaPath+"/patternGroups/"+u.util.escapeFragment(W)+"/schema",o+=" var pgPropCount"+h+" = 0;  ",Z?o+=" "+C+" = "+C+" || Object.keys("+p+"); for (var "+b+"=0; "+b+"<"+C+".length; "+b+"++) { var "+A+" = "+C+"["+b+"]; ":o+=" for (var "+A+" in "+p+") { ",o+=" if ("+u.usePattern(W)+".test("+A+")) { pgPropCount"+h+"++; ",v.errorPath=u.util.getPathExpr(u.errorPath,A,u.opts.jsonPointers);var ye=p+"["+A+"]";v.dataPathArr[y]=A;var Te=u.validate(v);v.baseId=te,u.util.varOccurences(Te,k)<2?o+=" "+u.util.varReplace(Te,k,ye)+" ":o+=" var "+k+" = "+ye+"; "+Te+" ",F&&(o+=" if (!"+x+") break; "),o+=" } ",F&&(o+=" else "+x+" = true; "),o+=" }  ",F&&(o+=" if ("+x+") { ",w+="}");var P0=Pu.minimum,$0=Pu.maximum;if(P0!==void 0||$0!==void 0){o+=" var "+f+" = true; ";var B=d;if(P0!==void 0){var I0=P0,Ts="minimum",Ci="less";o+=" "+f+" = pgPropCount"+h+" >= "+P0+"; ",d=u.errSchemaPath+"/patternGroups/minimum",o+="  if (!"+f+") {   ";var X=X||[];X.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { reason: '"+Ts+"', limit: "+I0+", pattern: '"+u.util.escapeQuotes(W)+"' } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have "+Ci+" than "+I0+' properties matching pattern "'+u.util.escapeQuotes(W)+`"' `),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var oe=o;o=X.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+oe+"]); ":o+=" validate.errors = ["+oe+"]; return false; ":o+=" var err = "+oe+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",$0!==void 0&&(o+=" else ")}if($0!==void 0){var I0=$0,Ts="maximum",Ci="more";o+=" "+f+" = pgPropCount"+h+" <= "+$0+"; ",d=u.errSchemaPath+"/patternGroups/maximum",o+="  if (!"+f+") {   ";var X=X||[];X.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { reason: '"+Ts+"', limit: "+I0+", pattern: '"+u.util.escapeQuotes(W)+"' } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have "+Ci+" than "+I0+' properties matching pattern "'+u.util.escapeQuotes(W)+`"' `),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var oe=o;o=X.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+oe+"]); ":o+=" validate.errors = ["+oe+"]; return false; ":o+=" var err = "+oe+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } "}d=B,F&&(o+=" if ("+f+") { ",w+="}")}}}}return F&&(o+=" "+w+" if ("+m+" == errors) {"),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="errs__"+h,m=u.util.copy(u),v="";m.level++;var w="valid"+m.level;if(u.util.schemaHasRules(l,u.RULES.all)){m.schema=l,m.schemaPath=c,m.errSchemaPath=d;var x="key"+h,A="idx"+h,b="i"+h,y="' + "+x+" + '",k=m.dataLevel=u.dataLevel+1,C="data"+k,D="dataProperties"+h,T=u.opts.ownProperties,S=u.baseId;o+=" var "+f+" = errors; ",T&&(o+=" var "+D+" = undefined; "),T?o+=" "+D+" = "+D+" || Object.keys("+p+"); for (var "+A+"=0; "+A+"<"+D+".length; "+A+"++) { var "+x+" = "+D+"["+A+"]; ":o+=" for (var "+x+" in "+p+") { ",o+=" var startErrs"+h+" = errors; ";var M=x,R=u.compositeRule;u.compositeRule=m.compositeRule=!0;var O=u.validate(m);m.baseId=S,u.util.varOccurences(O,C)<2?o+=" "+u.util.varReplace(O,C,M)+" ":o+=" var "+C+" = "+M+"; "+O+" ",u.compositeRule=m.compositeRule=R,o+=" if (!"+w+") { for (var "+b+"=startErrs"+h+"; "+b+"<errors; "+b+"++) { vErrors["+b+"].propertyName = "+x+"; }   var err =   ",u.createErrors!==!1?(o+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { propertyName: '"+y+"' } ",u.opts.messages!==!1&&(o+=" , message: 'property name \\'"+y+"\\' is invalid' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!u.compositeRule&&F&&(u.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; "),F&&(o+=" break; "),o+=" } }"}return F&&(o+=" "+v+" if ("+f+" == errors) {"),o=u.util.cleanUpCode(o),o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m=u.opts.$data&&l&&l.$data;m&&(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ");var v="schema"+h;if(!m)if(l.length<u.opts.loopRequired&&u.schema.properties&&Object.keys(u.schema.properties).length){var w=[],x=l;if(x)for(var A,b=-1,y=x.length-1;b<y;){A=x[b+=1];var k=u.schema.properties[A];k&&u.util.schemaHasRules(k,u.RULES.all)||(w[w.length]=A)}}else var w=l;if(m||w.length){var C=u.errorPath,D=m||w.length>=u.opts.loopRequired,T=u.opts.ownProperties;if(F)if(o+=" var missing"+h+"; ",D){m||(o+=" var "+v+" = validate.schema"+c+"; ");var S="i"+h,M="schema"+h+"["+S+"]",R="' + "+M+" + '";u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPathExpr(C,M,u.opts.jsonPointers)),o+=" var "+f+" = true; ",m&&(o+=" if (schema"+h+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+h+")) "+f+" = false; else {"),o+=" for (var "+S+" = 0; "+S+" < "+v+".length; "+S+"++) { "+f+" = "+p+"["+v+"["+S+"]] !== undefined ",T&&(o+=" &&   Object.prototype.hasOwnProperty.call("+p+", "+v+"["+S+"]) "),o+="; if (!"+f+") break; } ",m&&(o+="  }  "),o+="  if (!"+f+") {   ";var O=O||[];O.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+R+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var H=o;o=O.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+H+"]); ":o+=" validate.errors = ["+H+"]; return false; ":o+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { "}else{o+=" if ( ";var Y=w;if(Y)for(var J,S=-1,Z=Y.length-1;S<Z;){J=Y[S+=1],S&&(o+=" || ");var te=u.util.getProperty(J),ie=p+te;o+=" ( ( "+ie+" === undefined ",T&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(J)+"') "),o+=") && (missing"+h+" = "+u.util.toQuotedString(u.opts.jsonPointers?J:te)+") ) "}o+=") {  ";var M="missing"+h,R="' + "+M+" + '";u.opts._errorDataPathProperty&&(u.errorPath=u.opts.jsonPointers?u.util.getPathExpr(C,M,!0):C+" + "+M);var O=O||[];O.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+R+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var H=o;o=O.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+H+"]); ":o+=" validate.errors = ["+H+"]; return false; ":o+=" var err = "+H+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } else { "}else if(D){m||(o+=" var "+v+" = validate.schema"+c+"; ");var S="i"+h,M="schema"+h+"["+S+"]",R="' + "+M+" + '";u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPathExpr(C,M,u.opts.jsonPointers)),m&&(o+=" if ("+v+" && !Array.isArray("+v+")) {  var err =   ",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+R+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+v+" !== undefined) { "),o+=" for (var "+S+" = 0; "+S+" < "+v+".length; "+S+"++) { if ("+p+"["+v+"["+S+"]] === undefined ",T&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", "+v+"["+S+"]) "),o+=") {  var err =   ",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+R+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",m&&(o+="  }  ")}else{var se=w;if(se)for(var J,ue=-1,ne=se.length-1;ue<ne;){J=se[ue+=1];var te=u.util.getProperty(J),R=u.util.escapeQuotes(J),ie=p+te;u.opts._errorDataPathProperty&&(u.errorPath=u.util.getPath(C,J,u.opts.jsonPointers)),o+=" if ( "+ie+" === undefined ",T&&(o+=" || ! Object.prototype.hasOwnProperty.call("+p+", '"+u.util.escapeQuotes(J)+"') "),o+=") {  var err =   ",u.createErrors!==!1?(o+=" { keyword: 'required' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { missingProperty: '"+R+"' } ",u.opts.messages!==!1&&(o+=" , message: '",u.opts._errorDataPathProperty?o+="is a required property":o+="should have required property \\'"+R+"\\'",o+="' "),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}u.errorPath=C}else F&&(o+=" if (true) {");return o}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p="data"+(g||""),f="valid"+h,m=u.opts.$data&&l&&l.$data,v;if(m?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",v="schema"+h):v=l,(l||m)&&u.opts.uniqueItems!==!1){m&&(o+=" var "+f+"; if ("+v+" === false || "+v+" === undefined) "+f+" = true; else if (typeof "+v+" != 'boolean') "+f+" = false; else { "),o+=" var "+f+" = true; if ("+p+".length > 1) { var i = "+p+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } } ",m&&(o+="  }  "),o+=" if (!"+f+") {   ";var w=w||[];w.push(o),o="",u.createErrors!==!1?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { i: i, j: j } ",u.opts.messages!==!1&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),u.opts.verbose&&(o+=" , schema:  ",m?o+="validate.schema"+c:o+=""+l,o+="         , parentSchema: validate.schema"+u.schemaPath+" , data: "+p+" "),o+=" } "):o+=" {} ";var x=o;o=w.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+x+"]); ":o+=" validate.errors = ["+x+"]; return false; ":o+=" var err = "+x+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",F&&(o+=" else { ")}else F&&(o+=" if (true) { ");return o}},function(i,t){var r=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];i.exports=function(u,n){for(var a=0;a<n.length;a++){u=JSON.parse(JSON.stringify(u));var o=n[a].split("/"),h=u,g;for(g=1;g<o.length;g++)h=h[o[g]];for(g=0;g<r.length;g++){var l=r[g],c=h[l];c&&(h[l]={anyOf:[c,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]})}}return u}},function(i,t){var r="http://json-schema.org/draft-06/schema";i.exports=function(u){var n=u._opts.defaultMeta,a=typeof n=="string"?{$ref:n}:u.getSchema(r)?{$ref:r}:{};u.addKeyword("patternGroups",{metaSchema:{type:"object",additionalProperties:{type:"object",required:["schema"],properties:{maximum:{type:"integer",minimum:0},minimum:{type:"integer",minimum:0},schema:a},additionalProperties:!1}}}),u.RULES.all.properties.implements.push("patternGroups")}},function(i,t,r){var u=r(15).MissingRef;i.exports=n;function n(a,o,h){var g=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof o=="function"&&(h=o,o=void 0);var l=c(a).then(function(){var F=g._addSchema(a,void 0,o);return F.validate||d(F)});return h&&l.then(function(F){h(null,F)},h),l;function c(F){var p=F.$schema;return p&&!g.getSchema(p)?n.call(g,{$ref:p},!0):Promise.resolve()}function d(F){try{return g._compile(F)}catch(f){if(f instanceof u)return p(f);throw f}function p(f){var m=f.missingSchema;if(x(m))throw new Error("Schema "+m+" is loaded but "+f.missingRef+" cannot be resolved");var v=g._loadingSchemas[m];return v||(v=g._loadingSchemas[m]=g._opts.loadSchema(m),v.then(w,w)),v.then(function(A){if(!x(m))return c(A).then(function(){x(m)||g.addSchema(A,m,void 0,o)})}).then(function(){return d(F)});function w(){delete g._loadingSchemas[m]}function x(A){return g._refs[A]||g._schemas[A]}}}}},function(i,t,r){var u=/^[a-z_$][a-z0-9_$\-]*$/i,n=r(51);i.exports={add:a,get:o,remove:h};function a(g,l){var c=this.RULES;if(c.keywords[g])throw new Error("Keyword "+g+" is already defined");if(!u.test(g))throw new Error("Keyword "+g+" is not a valid identifier");if(l){if(l.macro&&l.valid!==void 0)throw new Error('"valid" option cannot be used with macro keywords');var d=l.type;if(Array.isArray(d)){var F,p=d.length;for(F=0;F<p;F++)w(d[F]);for(F=0;F<p;F++)v(g,d[F],l)}else d&&w(d),v(g,d,l);var f=l.$data===!0&&this._opts.$data;if(f&&!l.validate)throw new Error('$data support: "validate" function is not defined');var m=l.metaSchema;m&&(f&&(m={anyOf:[m,{$ref:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#"}]}),l.validateSchema=this.compile(m,!0))}c.keywords[g]=c.all[g]=!0;function v(x,A,b){for(var y,k=0;k<c.length;k++){var C=c[k];if(C.type==A){y=C;break}}y||(y={type:A,rules:[]},c.push(y));var D={keyword:x,definition:b,custom:!0,code:n,implements:b.implements};y.rules.push(D),c.custom[x]=D}function w(x){if(!c.types[x])throw new Error("Unknown type "+x)}}function o(g){var l=this.RULES.custom[g];return l?l.definition:this.RULES.keywords[g]||!1}function h(g){var l=this.RULES;delete l.keywords[g],delete l.all[g],delete l.custom[g];for(var c=0;c<l.length;c++)for(var d=l[c].rules,F=0;F<d.length;F++)if(d[F].keyword==g){d.splice(F,1);break}}},function(i,t){i.exports=function(u,n,a){var o=" ",h=u.level,g=u.dataLevel,l=u.schema[n],c=u.schemaPath+u.util.getProperty(n),d=u.errSchemaPath+"/"+n,F=!u.opts.allErrors,p,f="data"+(g||""),m="valid"+h,v="errs__"+h,w=u.opts.$data&&l&&l.$data,x;w?(o+=" var schema"+h+" = "+u.util.getData(l.$data,g,u.dataPathArr)+"; ",x="schema"+h):x=l;var A=this,b="definition"+h,y=A.definition,k="",C,D,T,S,M;if(w&&y.$data){M="keywordValidate"+h;var R=y.validateSchema;o+=" var "+b+" = RULES.custom['"+n+"'].definition; var "+M+" = "+b+".validate;"}else{if(S=u.useCustomRule(A,l,u.schema,u),!S)return;x="validate.schema"+c,M=S.code,C=y.compile,D=y.inline,T=y.macro}var O=M+".errors",H="i"+h,Y="ruleErr"+h,J=y.async;if(J&&!u.async)throw new Error("async keyword in sync schema");if(D||T||(o+=""+O+" = null;"),o+="var "+v+" = errors;var "+m+";",w&&y.$data&&(k+="}",o+=" if ("+x+" === undefined) { "+m+" = true; } else { ",R&&(k+="}",o+=" "+m+" = "+b+".validateSchema("+x+"); if ("+m+") { ")),D)y.statements?o+=" "+S.validate+" ":o+=" "+m+" = "+S.validate+"; ";else if(T){var Z=u.util.copy(u),k="";Z.level++;var te="valid"+Z.level;Z.schema=S.validate,Z.schemaPath="";var ie=u.compositeRule;u.compositeRule=Z.compositeRule=!0;var se=u.validate(Z).replace(/validate\.schema/g,M);u.compositeRule=Z.compositeRule=ie,o+=" "+se}else{var ue=ue||[];ue.push(o),o="",o+="  "+M+".call( ",u.opts.passContext?o+="this":o+="self",C||y.schema===!1?o+=" , "+f+" ":o+=" , "+x+" , "+f+" , validate.schema"+u.schemaPath+" ",o+=" , (dataPath || '')",u.errorPath!='""'&&(o+=" + "+u.errorPath);var ne=g?"data"+(g-1||""):"parentData",G=g?u.dataPathArr[g]:"parentDataProperty";o+=" , "+ne+" , "+G+" , rootData )  ";var K=o;o=ue.pop(),y.errors===!1?(o+=" "+m+" = ",J&&(o+=""+u.yieldAwait),o+=""+K+"; "):J?(O="customErrors"+h,o+=" var "+O+" = null; try { "+m+" = "+u.yieldAwait+K+"; } catch (e) { "+m+" = false; if (e instanceof ValidationError) "+O+" = e.errors; else throw e; } "):o+=" "+O+" = null; "+m+" = "+K+"; "}if(y.modifying&&(o+=" if ("+ne+") "+f+" = "+ne+"["+G+"];"),o+=""+k,y.valid)F&&(o+=" if (true) { ");else{o+=" if ( ",y.valid===void 0?(o+=" !",T?o+=""+te:o+=""+m):o+=" "+!y.valid+" ",o+=") { ",p=A.keyword;var ue=ue||[];ue.push(o),o="";var ue=ue||[];ue.push(o),o="",u.createErrors!==!1?(o+=" { keyword: '"+(p||"custom")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { keyword: '"+A.keyword+"' } ",u.opts.messages!==!1&&(o+=` , message: 'should pass "`+A.keyword+`" keyword validation' `),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ";var le=o;o=ue.pop(),!u.compositeRule&&F?u.async?o+=" throw new ValidationError(["+le+"]); ":o+=" validate.errors = ["+le+"]; return false; ":o+=" var err = "+le+";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var re=o;o=ue.pop(),D?y.errors?y.errors!="full"&&(o+="  for (var "+H+"="+v+"; "+H+"<errors; "+H+"++) { var "+Y+" = vErrors["+H+"]; if ("+Y+".dataPath === undefined) "+Y+".dataPath = (dataPath || '') + "+u.errorPath+"; if ("+Y+".schemaPath === undefined) { "+Y+'.schemaPath = "'+d+'"; } ',u.opts.verbose&&(o+=" "+Y+".schema = "+x+"; "+Y+".data = "+f+"; "),o+=" } "):y.errors===!1?o+=" "+re+" ":(o+=" if ("+v+" == errors) { "+re+" } else {  for (var "+H+"="+v+"; "+H+"<errors; "+H+"++) { var "+Y+" = vErrors["+H+"]; if ("+Y+".dataPath === undefined) "+Y+".dataPath = (dataPath || '') + "+u.errorPath+"; if ("+Y+".schemaPath === undefined) { "+Y+'.schemaPath = "'+d+'"; } ',u.opts.verbose&&(o+=" "+Y+".schema = "+x+"; "+Y+".data = "+f+"; "),o+=" } } "):T?(o+="   var err =   ",u.createErrors!==!1?(o+=" { keyword: '"+(p||"custom")+"' , dataPath: (dataPath || '') + "+u.errorPath+" , schemaPath: "+u.util.toQuotedString(d)+" , params: { keyword: '"+A.keyword+"' } ",u.opts.messages!==!1&&(o+=` , message: 'should pass "`+A.keyword+`" keyword validation' `),u.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+u.schemaPath+" , data: "+f+" "),o+=" } "):o+=" {} ",o+=";  if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!u.compositeRule&&F&&(u.async?o+=" throw new ValidationError(vErrors); ":o+=" validate.errors = vErrors; return false; ")):y.errors===!1?o+=" "+re+" ":(o+=" if (Array.isArray("+O+")) { if (vErrors === null) vErrors = "+O+"; else vErrors = vErrors.concat("+O+"); errors = vErrors.length;  for (var "+H+"="+v+"; "+H+"<errors; "+H+"++) { var "+Y+" = vErrors["+H+"]; if ("+Y+".dataPath === undefined) "+Y+".dataPath = (dataPath || '') + "+u.errorPath+";  "+Y+'.schemaPath = "'+d+'";  ',u.opts.verbose&&(o+=" "+Y+".schema = "+x+"; "+Y+".data = "+f+"; "),o+=" } } else { "+re+" } "),o+=" } ",F&&(o+=" else { ")}return o}},function(i,t){i.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#",description:"Meta-schema for $data reference (JSON-schema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}},function(i,t){i.exports={$schema:"http://json-schema.org/draft-06/schema#",$id:"http://json-schema.org/draft-06/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:{},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:{}}},function(i,t,r){var u=r(55),n=r(56),a=r(59),o=r(60),h=r(61),g=r(64),l=r(57),c=r(65),d={};d.create=function(F,p){if(!F)throw new Error("No container element provided.");this.container=F,this.dom={},this.highlighter=new u,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.errorNodes=[],this.node=null,this.focusTarget=null,this._setOptions(p),p.autocomplete&&(this.autocomplete=new c(p.autocomplete)),this.options.history&&this.options.mode!=="view"&&(this.history=new n(this)),this._createFrame(),this._createTable()},d.destroy=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&(this.container.removeChild(this.frame),this.frame=null),this.container=null,this.dom=null,this.clear(),this.node=null,this.focusTarget=null,this.selection=null,this.multiselection=null,this.errorNodes=null,this.validateSchema=null,this._debouncedValidate=null,this.history&&(this.history.destroy(),this.history=null),this.searchBox&&(this.searchBox.destroy(),this.searchBox=null),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null)},d._setOptions=function(F){if(this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null,schemaRefs:null,autocomplete:null},F)for(var p in F)F.hasOwnProperty(p)&&(this.options[p]=F[p]);this.setSchema(this.options.schema,this.options.schemaRefs),this._debouncedValidate=l.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL)},d.set=function(F,p){if(p&&(console.warn('Second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=p),F instanceof Function||F===void 0)this.clear();else{this.content.removeChild(this.table);var f={field:this.options.name,value:F},m=new h(this,f);this._setRoot(m),this.validate();var v=!1;this.node.expand(v),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},d.get=function(){if(this.focusTarget){var F=h.getNodeFromTarget(this.focusTarget);F&&F.blur()}if(this.node)return this.node.getValue()},d.getText=function(){return JSON.stringify(this.get())},d.setText=function(F){try{this.set(l.parse(F))}catch{var p=l.sanitize(F);this.set(l.parse(p))}},d.setName=function(F){this.options.name=F,this.node&&this.node.updateField(this.options.name)},d.getName=function(){return this.options.name},d.focus=function(){var F=this.content.querySelector("[contenteditable=true]");F?F.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(F=this.frame.querySelector("button"),F&&F.focus())},d.clear=function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},d._setRoot=function(F){this.clear(),this.node=F,this.tbody.appendChild(F.getDom())},d.search=function(F){var p;return this.node?(this.content.removeChild(this.table),p=this.node.search(F),this.content.appendChild(this.table)):p=[],p},d.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},d.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},d._onAction=function(F,p){this.history&&this.history.add(F,p),this._onChange()},d._onChange=function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(F){console.error("Error in onChange callback: ",F)}},d.validate=function(){this.errorNodes&&this.errorNodes.forEach(function(v){v.setError(null)});var F=this.node;if(F){var p=F.validate(),f=[];if(this.validateSchema){var m=this.validateSchema(F.getValue());m||(f=this.validateSchema.errors.map(function(v){return l.improveSchemaError(v)}).map(function(w){return{node:F.findNode(w.dataPath),error:w}}).filter(function(w){return w.node!=null}))}this.errorNodes=p.concat(f).reduce(function(w,x){return x.node.findParents().map(function(A){return{node:A,child:x.node,error:{message:A.type==="object"?"Contains invalid properties":"Contains invalid items"}}}).concat(w,[x])},[]).map(function(w){return w.node.setError(w.error,w.child),w.node})}},d.refresh=function(){this.node&&this.node.updateDom({recurse:!0})},d.startAutoScroll=function(F){var p=this,f=this.content,m=l.getAbsoluteTop(f),v=f.clientHeight,w=m+v,x=24,A=50;F<m+x&&f.scrollTop>0?this.autoScrollStep=(m+x-F)/3:F>w-x&&v+f.scrollTop<f.scrollHeight?this.autoScrollStep=(w-x-F)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){p.autoScrollStep?f.scrollTop-=p.autoScrollStep:p.stopAutoScroll()},A)):this.stopAutoScroll()},d.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},d.setSelection=function(F){F&&("scrollTop"in F&&this.content&&(this.content.scrollTop=F.scrollTop),F.nodes&&this.select(F.nodes),F.range&&l.setSelectionOffset(F.range),F.dom&&F.dom.focus())},d.getSelection=function(){var F=l.getSelectionOffset();return F&&F.container.nodeName!=="DIV"&&(F=null),{dom:this.focusTarget,range:F,nodes:this.multiselection.nodes.slice(0),scrollTop:this.content?this.content.scrollTop:0}},d.scrollTo=function(F,p){var f=this.content;if(f){var m=this;m.animateTimeout&&(clearTimeout(m.animateTimeout),delete m.animateTimeout),m.animateCallback&&(m.animateCallback(!1),delete m.animateCallback);var v=f.clientHeight,w=f.scrollHeight-v,x=Math.min(Math.max(F-v/4,0),w),A=function(){var b=f.scrollTop,y=x-b;Math.abs(y)>3?(f.scrollTop+=y/3,m.animateCallback=p,m.animateTimeout=setTimeout(A,50)):(p&&p(!0),f.scrollTop=x,delete m.animateTimeout,delete m.animateCallback)};A()}else p&&p(!1)},d._createFrame=function(){this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame);var F=this;function p(A){F._onEvent&&F._onEvent(A)}this.frame.onclick=function(A){var b=A.target;p(A),b.nodeName=="BUTTON"&&A.preventDefault()},this.frame.oninput=p,this.frame.onchange=p,this.frame.onkeydown=p,this.frame.onkeyup=p,this.frame.oncut=p,this.frame.onpaste=p,this.frame.onmousedown=p,this.frame.onmouseup=p,this.frame.onmouseover=p,this.frame.onmouseout=p,l.addEventListener(this.frame,"focus",p,!0),l.addEventListener(this.frame,"blur",p,!0),this.frame.onfocusin=p,this.frame.onfocusout=p,this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var f=document.createElement("button");f.type="button",f.className="jsoneditor-expand-all",f.title="Expand all fields",f.onclick=function(){F.expandAll()},this.menu.appendChild(f);var m=document.createElement("button");if(m.type="button",m.title="Collapse all fields",m.className="jsoneditor-collapse-all",m.onclick=function(){F.collapseAll()},this.menu.appendChild(m),this.history){var v=document.createElement("button");v.type="button",v.className="jsoneditor-undo jsoneditor-separator",v.title="Undo last action (Ctrl+Z)",v.onclick=function(){F._onUndo()},this.menu.appendChild(v),this.dom.undo=v;var w=document.createElement("button");w.type="button",w.className="jsoneditor-redo",w.title="Redo (Ctrl+Shift+Z)",w.onclick=function(){F._onRedo()},this.menu.appendChild(w),this.dom.redo=w,this.history.onChange=function(){v.disabled=!F.history.canUndo(),w.disabled=!F.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var x=this;this.modeSwitcher=new g(this.menu,this.options.modes,this.options.mode,function(b){x.modeSwitcher.destroy(),x.setMode(b),x.modeSwitcher.focus()})}this.options.search&&(this.searchBox=new a(this,this.menu))},d._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},d._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},d._onEvent=function(F){F.type=="keydown"&&this._onKeyDown(F),F.type=="focus"&&(this.focusTarget=F.target),F.type=="mousedown"&&this._startDragDistance(F),(F.type=="mousemove"||F.type=="mouseup"||F.type=="click")&&this._updateDragDistance(F);var p=h.getNodeFromTarget(F.target);if(p&&p.selected){if(F.type=="click"){if(F.target==p.dom.menu){this.showContextMenu(F.target);return}F.hasMoved||this.deselect()}F.type=="mousedown"&&h.onDragStart(this.multiselection.nodes,F)}else F.type=="mousedown"&&(this.deselect(),p&&F.target==p.dom.drag?h.onDragStart(p,F):(!p||F.target!=p.dom.field&&F.target!=p.dom.value&&F.target!=p.dom.select)&&this._onMultiSelectStart(F));p&&p.onEvent(F)},d._startDragDistance=function(F){this.dragDistanceEvent={initialTarget:F.target,initialPageX:F.pageX,initialPageY:F.pageY,dragDistance:0,hasMoved:!1}},d._updateDragDistance=function(F){this.dragDistanceEvent||this._startDragDistance(F);var p=F.pageX-this.dragDistanceEvent.initialPageX,f=F.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(p*p+f*f),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||this.dragDistanceEvent.dragDistance>10,F.dragDistance=this.dragDistanceEvent.dragDistance,F.hasMoved=this.dragDistanceEvent.hasMoved,F.dragDistance},d._onMultiSelectStart=function(F){var p=h.getNodeFromTarget(F.target);if(!(this.options.mode!=="tree"||this.options.onEditable!==void 0)){this.multiselection={start:p||null,end:null,nodes:[]},this._startDragDistance(F);var f=this;this.mousemove||(this.mousemove=l.addEventListener(window,"mousemove",function(m){f._onMultiSelect(m)})),this.mouseup||(this.mouseup=l.addEventListener(window,"mouseup",function(m){f._onMultiSelectEnd(m)}))}},d._onMultiSelect=function(F){if(F.preventDefault(),this._updateDragDistance(F),!!F.hasMoved){var p=h.getNodeFromTarget(F.target);p&&(this.multiselection.start==null&&(this.multiselection.start=p),this.multiselection.end=p),this.deselect();var f=this.multiselection.start,m=this.multiselection.end||this.multiselection.start;f&&m&&(this.multiselection.nodes=this._findTopLevelNodes(f,m),this.select(this.multiselection.nodes))}},d._onMultiSelectEnd=function(F){this.multiselection.nodes[0]&&this.multiselection.nodes[0].dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&(l.removeEventListener(window,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(l.removeEventListener(window,"mouseup",this.mouseup),delete this.mouseup)},d.deselect=function(F){this.multiselection.nodes.forEach(function(p){p.setSelected(!1)}),this.multiselection.nodes=[],F&&(this.multiselection.start=null,this.multiselection.end=null)},d.select=function(F){if(!Array.isArray(F))return this.select([F]);if(F){this.deselect(),this.multiselection.nodes=F.slice(0);var p=F[0];F.forEach(function(f){f.setSelected(!0,f===p)})}},d._findTopLevelNodes=function(F,p){for(var f=F.getNodePath(),m=p.getNodePath(),v=0;v<f.length&&f[v]===m[v];)v++;var w=f[v-1],x=f[v],A=m[v];if((!x||!A)&&(w.parent?(x=w,A=w,w=w.parent):(x=w.childs[0],A=w.childs[w.childs.length-1])),w&&x&&A){var b=w.childs.indexOf(x),y=w.childs.indexOf(A),k=Math.min(b,y),C=Math.max(b,y);return w.childs.slice(k,C+1)}else return[]},d._onKeyDown=function(F){var p=F.which||F.keyCode,f=F.altKey,m=F.ctrlKey,v=F.metaKey,w=F.shiftKey,x=!1;if(p==9){var A=this;setTimeout(function(){l.selectContentEditable(A.focusTarget)},0)}if(this.searchBox){if(m&&p==70)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),x=!0;else if(p==114||m&&p==71){var b=!0;w?this.searchBox.previous(b):this.searchBox.next(b),x=!0}}if(this.history&&(m&&!w&&p==90?(this._onUndo(),x=!0):m&&w&&p==90&&(this._onRedo(),x=!0)),this.options.autocomplete&&!x&&!m&&!f&&!v&&(F.key.length==1||p==8||p==46)){x=!1;var y="";F.target.className.indexOf("jsoneditor-value")>=0&&(y="value"),F.target.className.indexOf("jsoneditor-field")>=0&&(y="field");var k=h.getNodeFromTarget(F.target);setTimeout(function(C,D){if(D.innerText.length>0){var T=this.options.autocomplete.getOptions(D.innerText,C.getPath(),y,C.editor);typeof T.then=="function"?T.then(function(S){S.options?this.autocomplete.show(D,S.startFrom,S.options):this.autocomplete.show(D,0,S)}.bind(this)):T.options?this.autocomplete.show(D,T.startFrom,T.options):this.autocomplete.show(D,0,T)}else this.autocomplete.hideDropDown()}.bind(this,k,F.target),50)}x&&(F.preventDefault(),F.stopPropagation())},d._createTable=function(){var F=document.createElement("div");F.className="jsoneditor-outer",this.contentOuter=F,this.content=document.createElement("div"),this.content.className="jsoneditor-tree",F.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table);var p;this.colgroupContent=document.createElement("colgroup"),this.options.mode==="tree"&&(p=document.createElement("col"),p.width="24px",this.colgroupContent.appendChild(p)),p=document.createElement("col"),p.width="24px",this.colgroupContent.appendChild(p),p=document.createElement("col"),this.colgroupContent.appendChild(p),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(F)},d.showContextMenu=function(F,p){var f=[],m=this;f.push({text:"Duplicate",title:"Duplicate selected fields (Ctrl+D)",className:"jsoneditor-duplicate",click:function(){h.onDuplicate(m.multiselection.nodes)}}),f.push({text:"Remove",title:"Remove selected fields (Ctrl+Del)",className:"jsoneditor-remove",click:function(){h.onRemove(m.multiselection.nodes)}});var v=new o(f,{close:p});v.show(F,this.content)},i.exports=[{mode:"tree",mixin:d,data:"json"},{mode:"view",mixin:d,data:"json"},{mode:"form",mixin:d,data:"json"}]},function(i,t){function r(){this.locked=!1}r.prototype.highlight=function(u){this.locked||(this.node!=u&&(this.node&&this.node.setHighlight(!1),this.node=u,this.node.setHighlight(!0)),this._cancelUnhighlight())},r.prototype.unhighlight=function(){if(!this.locked){var u=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){u.node.setHighlight(!1),u.node=void 0,u.unhighlightTimer=void 0},0))}},r.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},r.prototype.lock=function(){this.locked=!0},r.prototype.unlock=function(){this.locked=!1},i.exports=r},function(i,t,r){r(57);function u(n){this.editor=n,this.history=[],this.index=-1,this.clear(),this.actions={editField:{undo:function(a){a.node.updateField(a.oldValue)},redo:function(a){a.node.updateField(a.newValue)}},editValue:{undo:function(a){a.node.updateValue(a.oldValue)},redo:function(a){a.node.updateValue(a.newValue)}},changeType:{undo:function(a){a.node.changeType(a.oldType)},redo:function(a){a.node.changeType(a.newType)}},appendNodes:{undo:function(a){a.nodes.forEach(function(o){a.parent.removeChild(o)})},redo:function(a){a.nodes.forEach(function(o){a.parent.appendChild(o)})}},insertBeforeNodes:{undo:function(a){a.nodes.forEach(function(o){a.parent.removeChild(o)})},redo:function(a){a.nodes.forEach(function(o){a.parent.insertBefore(o,a.beforeNode)})}},insertAfterNodes:{undo:function(a){a.nodes.forEach(function(o){a.parent.removeChild(o)})},redo:function(a){var o=a.afterNode;a.nodes.forEach(function(h){a.parent.insertAfter(a.node,o),o=h})}},removeNodes:{undo:function(a){var o=a.parent,h=o.childs[a.index]||o.append;a.nodes.forEach(function(g){o.insertBefore(g,h)})},redo:function(a){a.nodes.forEach(function(o){a.parent.removeChild(o)})}},duplicateNodes:{undo:function(a){a.nodes.forEach(function(o){a.parent.removeChild(o)})},redo:function(a){var o=a.afterNode;a.nodes.forEach(function(h){a.parent.insertAfter(h,o),o=h})}},moveNodes:{undo:function(a){a.nodes.forEach(function(o){a.oldBeforeNode.parent.moveBefore(o,a.oldBeforeNode)})},redo:function(a){a.nodes.forEach(function(o){a.newBeforeNode.parent.moveBefore(o,a.newBeforeNode)})}},sort:{undo:function(a){var o=a.node;o.hideChilds(),o.sort=a.oldSort,o.childs=a.oldChilds,o.showChilds()},redo:function(a){var o=a.node;o.hideChilds(),o.sort=a.newSort,o.childs=a.newChilds,o.showChilds()}}}}u.prototype.onChange=function(){},u.prototype.add=function(n,a){this.index++,this.history[this.index]={action:n,params:a,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()},u.prototype.clear=function(){this.history=[],this.index=-1,this.onChange()},u.prototype.canUndo=function(){return this.index>=0},u.prototype.canRedo=function(){return this.index<this.history.length-1},u.prototype.undo=function(){if(this.canUndo()){var n=this.history[this.index];if(n){var a=this.actions[n.action];a&&a.undo?(a.undo(n.params),n.params.oldSelection&&this.editor.setSelection(n.params.oldSelection)):console.error(new Error('unknown action "'+n.action+'"'))}this.index--,this.onChange()}},u.prototype.redo=function(){if(this.canRedo()){this.index++;var n=this.history[this.index];if(n){var a=this.actions[n.action];a&&a.redo?(a.redo(n.params),n.params.newSelection&&this.editor.setSelection(n.params.newSelection)):console.error(new Error('unknown action "'+n.action+'"'))}this.onChange()}},u.prototype.destroy=function(){this.editor=null,this.history=[],this.index=-1},i.exports=u},function(i,t,r){var u=r(58);t.parse=function(h){try{return JSON.parse(h)}catch(g){throw t.validate(h),g}},t.sanitize=function(o){var h=[],g=0,l=o.match(/^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);l&&(o=l[3]);var c={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t"};function d(){return o.charAt(g)}function F(){return o.charAt(g+1)}function p(){return o.charAt(g-1)}function f(){for(var b=h.length-1;b>=0;){var y=h[b];if(y!==" "&&y!==`
`&&y!=="\r"&&y!=="	")return y;b--}return""}function m(){for(g+=2;g<o.length&&(d()!=="*"||F()!=="/");)g++;g+=2}function v(){for(g+=2;g<o.length&&d()!==`
`;)g++}function w(b){h.push('"'),g++;for(var y=d();g<o.length&&y!==b;)y==='"'&&p()!=="\\"?h.push('\\"'):c.hasOwnProperty(y)?h.push(c[y]):(y==="\\"&&(g++,y=d(),y!=="'"&&h.push("\\")),h.push(y)),g++,y=d();y===b&&(h.push('"'),g++)}function x(){for(var b=["null","true","false"],y="",k=d(),C=/[a-zA-Z_$\d]/;C.test(k);)y+=k,g++,k=d();b.indexOf(y)===-1?h.push('"'+y+'"'):h.push(y)}for(;g<o.length;){var A=d();A==="/"&&F()==="*"?m():A==="/"&&F()==="/"?v():A==="'"||A==='"'?w(A):/[a-zA-Z_$]/.test(A)&&["{",","].indexOf(f())!==-1?x():(h.push(A),g++)}return h.join("")},t.escapeUnicodeChars=function(o){return o.replace(/[\u007F-\uFFFF]/g,function(h){return"\\u"+("0000"+h.charCodeAt(0).toString(16)).slice(-4)})},t.validate=function(h){typeof u<"u"?u.parse(h):JSON.parse(h)},t.extend=function(h,g){for(var l in g)g.hasOwnProperty(l)&&(h[l]=g[l]);return h},t.clear=function(h){for(var g in h)h.hasOwnProperty(g)&&delete h[g];return h},t.type=function(h){return h===null?"null":h===void 0?"undefined":h instanceof Number||typeof h=="number"?"number":h instanceof String||typeof h=="string"?"string":h instanceof Boolean||typeof h=="boolean"?"boolean":h instanceof RegExp||typeof h=="regexp"?"regexp":t.isArray(h)?"array":"object"};var n=/^https?:\/\/\S+$/;t.isUrl=function(h){return(typeof h=="string"||h instanceof String)&&n.test(h)},t.isArray=function(o){return Object.prototype.toString.call(o)==="[object Array]"},t.getAbsoluteLeft=function(h){var g=h.getBoundingClientRect();return g.left+window.pageXOffset||document.scrollLeft||0},t.getAbsoluteTop=function(h){var g=h.getBoundingClientRect();return g.top+window.pageYOffset||document.scrollTop||0},t.addClassName=function(h,g){var l=h.className.split(" ");l.indexOf(g)==-1&&(l.push(g),h.className=l.join(" "))},t.removeClassName=function(h,g){var l=h.className.split(" "),c=l.indexOf(g);c!=-1&&(l.splice(c,1),h.className=l.join(" "))},t.stripFormatting=function(h){for(var g=h.childNodes,l=0,c=g.length;l<c;l++){var d=g[l];d.style&&d.removeAttribute("style");var F=d.attributes;if(F)for(var p=F.length-1;p>=0;p--){var f=F[p];f.specified===!0&&d.removeAttribute(f.name)}t.stripFormatting(d)}},t.setEndOfContentEditable=function(h){var g,l;document.createRange&&(g=document.createRange(),g.selectNodeContents(h),g.collapse(!1),l=window.getSelection(),l.removeAllRanges(),l.addRange(g))},t.selectContentEditable=function(h){if(!(!h||h.nodeName!="DIV")){var g,l;window.getSelection&&document.createRange&&(l=document.createRange(),l.selectNodeContents(h),g=window.getSelection(),g.removeAllRanges(),g.addRange(l))}},t.getSelection=function(){if(window.getSelection){var h=window.getSelection();if(h.getRangeAt&&h.rangeCount)return h.getRangeAt(0)}return null},t.setSelection=function(h){if(h&&window.getSelection){var g=window.getSelection();g.removeAllRanges(),g.addRange(h)}},t.getSelectionOffset=function(){var h=t.getSelection();return h&&"startOffset"in h&&"endOffset"in h&&h.startContainer&&h.startContainer==h.endContainer?{startOffset:h.startOffset,endOffset:h.endOffset,container:h.startContainer.parentNode}:null},t.setSelectionOffset=function(h){if(document.createRange&&window.getSelection){var g=window.getSelection();if(g){var l=document.createRange();h.container.firstChild||h.container.appendChild(document.createTextNode("")),l.setStart(h.container.firstChild,h.startOffset),l.setEnd(h.container.firstChild,h.endOffset),t.setSelection(l)}}},t.getInnerText=function(h,g){var l=g==null;if(l&&(g={text:"",flush:function(){var w=this.text;return this.text="",w},set:function(w){this.text=w}}),h.nodeValue)return g.flush()+h.nodeValue;if(h.hasChildNodes()){for(var c=h.childNodes,d="",F=0,p=c.length;F<p;F++){var f=c[F];if(f.nodeName=="DIV"||f.nodeName=="P"){var m=c[F-1],v=m?m.nodeName:void 0;v&&v!="DIV"&&v!="P"&&v!="BR"&&(d+=`
`,g.flush()),d+=t.getInnerText(f,g),g.set(`
`)}else f.nodeName=="BR"?(d+=g.flush(),g.set(`
`)):d+=t.getInnerText(f,g)}return d}else if(h.nodeName=="P"&&t.getInternetExplorerVersion()!=-1)return g.flush();return""},t.getInternetExplorerVersion=function(){if(a==-1){var h=-1;if(navigator.appName=="Microsoft Internet Explorer"){var g=navigator.userAgent,l=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");l.exec(g)!=null&&(h=parseFloat(RegExp.$1))}a=h}return a},t.isFirefox=function(){return navigator.userAgent.indexOf("Firefox")!=-1};var a=-1;t.addEventListener=function(h,g,l,c){if(h.addEventListener)return c===void 0&&(c=!1),g==="mousewheel"&&t.isFirefox()&&(g="DOMMouseScroll"),h.addEventListener(g,l,c),l;if(h.attachEvent){var d=function(){return l.call(h,window.event)};return h.attachEvent("on"+g,d),d}},t.removeEventListener=function(h,g,l,c){h.removeEventListener?(c===void 0&&(c=!1),g==="mousewheel"&&t.isFirefox()&&(g="DOMMouseScroll"),h.removeEventListener(g,l,c)):h.detachEvent&&h.detachEvent("on"+g,l)},t.parsePath=function o(h){var g,l;if(h.length===0)return[];var c=h.match(/^\.(\w+)/);if(c)g=c[1],l=h.substr(g.length+1);else if(h[0]==="["){var d=h.indexOf("]");if(d===-1)throw new SyntaxError("Character ] expected in path");if(d===1)throw new SyntaxError("Index expected after [");var F=h.substring(1,d);F[0]==="'"&&(F='"'+F.substring(1,F.length-1)+'"'),g=F==="*"?F:JSON.parse(F),l=h.substr(d+1)}else throw new SyntaxError("Failed to parse path");return[g].concat(o(l))},t.improveSchemaError=function(o){if(o.keyword==="enum"&&Array.isArray(o.schema)){var h=o.schema;if(h){if(h=h.map(function(l){return JSON.stringify(l)}),h.length>5){var g=["("+(h.length-5)+" more...)"];h=h.slice(0,5),h.push(g)}o.message="should be equal to one of: "+h.join(", ")}}return o.keyword==="additionalProperties"&&(o.message="should NOT have additional property: "+o.params.additionalProperty),o},t.insideRect=function(o,h,g){var l=g!==void 0?g:0;return h.left-l>=o.left&&h.right+l<=o.right&&h.top-l>=o.top&&h.bottom+l<=o.bottom},t.debounce=function(h,g,l){var c;return function(){var d=this,F=arguments,p=function(){c=null,l||h.apply(d,F)},f=l&&!c;clearTimeout(c),c=setTimeout(p,g),f&&h.apply(d,F)}},t.textDiff=function(h,g){for(var l=g.length,c=0,d=h.length,F=g.length;g.charAt(c)===h.charAt(c)&&c<l;)c++;for(;g.charAt(F-1)===h.charAt(d-1)&&F>c&&d>0;)F--,d--;return{start:c,end:F}},typeof Element<"u"&&function(o){o.forEach(function(h){h.hasOwnProperty("remove")||Object.defineProperty(h,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode!=null&&this.parentNode.removeChild(this)}})})}([Element.prototype,CharacterData.prototype,DocumentType.prototype]),String.prototype.startsWith||(String.prototype.startsWith=function(o,h){return h=h||0,this.substr(h,o.length)===o})},function(i,t,r){var u=function(){var n={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(h,g,l,c,d,F,p){var f=F.length-1;switch(d){case 1:this.$=h.replace(/\\(\\|")/g,"$1").replace(/\\n/g,`
`).replace(/\\r/g,"\r").replace(/\\t/g,"	").replace(/\\v/g,"\v").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(h);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=F[f-1];case 13:this.$={};break;case 14:this.$=F[f-1];break;case 15:this.$=[F[f-2],F[f]];break;case 16:this.$={},this.$[F[f][0]]=F[f][1];break;case 17:this.$=F[f-2],F[f-2][F[f][0]]=F[f][1];break;case 18:this.$=[];break;case 19:this.$=F[f-1];break;case 20:this.$=[F[f]];break;case 21:this.$=F[f-2],F[f-2].push(F[f]);break}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(h,g){throw new Error(h)},parse:function(h){var g=this,l=[0],c=[null],d=[],F=this.table,p="",f=0,m=0,v=0,w=2,x=1;this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var A=this.lexer.yylloc;d.push(A),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function b(Z){l.length=l.length-2*Z,c.length=c.length-Z,d.length=d.length-Z}function y(){var Z;return Z=g.lexer.lex()||1,typeof Z!="number"&&(Z=g.symbols_[Z]||Z),Z}for(var k,C,D,T,S,M={},R,O,H,Y;;){if(D=l[l.length-1],this.defaultActions[D]?T=this.defaultActions[D]:(k==null&&(k=y()),T=F[D]&&F[D][k]),typeof T>"u"||!T.length||!T[0]){if(!v){Y=[];for(R in F[D])this.terminals_[R]&&R>2&&Y.push("'"+this.terminals_[R]+"'");var J="";this.lexer.showPosition?J="Parse error on line "+(f+1)+`:
`+this.lexer.showPosition()+`
Expecting `+Y.join(", ")+", got '"+this.terminals_[k]+"'":J="Parse error on line "+(f+1)+": Unexpected "+(k==1?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(J,{text:this.lexer.match,token:this.terminals_[k]||k,line:this.lexer.yylineno,loc:A,expected:Y})}if(v==3){if(k==x)throw new Error(J||"Parsing halted.");m=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,A=this.lexer.yylloc,k=y()}for(;!(w.toString()in F[D]);){if(D==0)throw new Error(J||"Parsing halted.");b(1),D=l[l.length-1]}C=k,k=w,D=l[l.length-1],T=F[D]&&F[D][w],v=3}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+k);switch(T[0]){case 1:l.push(k),c.push(this.lexer.yytext),d.push(this.lexer.yylloc),l.push(T[1]),k=null,C?(k=C,C=null):(m=this.lexer.yyleng,p=this.lexer.yytext,f=this.lexer.yylineno,A=this.lexer.yylloc,v>0&&v--);break;case 2:if(O=this.productions_[T[1]][1],M.$=c[c.length-O],M._$={first_line:d[d.length-(O||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(O||1)].first_column,last_column:d[d.length-1].last_column},S=this.performAction.call(M,p,m,f,this.yy,T[1],c,d),typeof S<"u")return S;O&&(l=l.slice(0,-1*O*2),c=c.slice(0,-1*O),d=d.slice(0,-1*O)),l.push(this.productions_[T[1]][0]),c.push(M.$),d.push(M._$),H=F[l[l.length-2]][l[l.length-1]],l.push(H);break;case 3:return!0}}return!0}},a=function(){var o={EOF:1,parseError:function(g,l){if(this.yy.parseError)this.yy.parseError(g,l);else throw new Error(g)},setInput:function(h){return this._input=h,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.match+=h,this.matched+=h;var g=h.match(/\n/);return g&&this.yylineno++,this._input=this._input.slice(1),h},unput:function(h){return this._input=h+this._input,this},more:function(){return this._more=!0,this},less:function(h){this._input=this.match.slice(h)+this._input},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),g=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+g+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,g,l,c,d;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),p=0;p<F.length&&(l=this._input.match(this.rules[F[p]]),!(l&&(!g||l[0].length>g[0].length)&&(g=l,c=p,!this.options.flex)));p++);if(g)return d=g[0].match(/\n.*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-1:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(g[0].length),this.matched+=g[0],h=this.performAction.call(this,this.yy,this,F[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h||void 0;if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var g=this.next();return typeof g<"u"?g:this.lex()},begin:function(g){this.conditionStack.push(g)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(g){this.begin(g)}};return o.options={},o.performAction=function(g,l,c,d){switch(c){case 0:break;case 1:return 6;case 2:return l.yytext=l.yytext.substr(1,l.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},o.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],o.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},o}();return n.lexer=a,n}();t.parser=u,t.parse=u.parse.bind(u)},function(i,t){function r(u,n){var a=this;this.editor=u,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.dom={},this.dom.container=n;var o=document.createElement("table");this.dom.table=o,o.className="jsoneditor-search",n.appendChild(o);var h=document.createElement("tbody");this.dom.tbody=h,o.appendChild(h);var g=document.createElement("tr");h.appendChild(g);var l=document.createElement("td");g.appendChild(l);var c=document.createElement("div");this.dom.results=c,c.className="jsoneditor-results",l.appendChild(c),l=document.createElement("td"),g.appendChild(l);var d=document.createElement("div");this.dom.input=d,d.className="jsoneditor-frame",d.title="Search fields and values",l.appendChild(d);var F=document.createElement("table");d.appendChild(F);var p=document.createElement("tbody");F.appendChild(p),g=document.createElement("tr"),p.appendChild(g);var f=document.createElement("button");f.type="button",f.className="jsoneditor-refresh",l=document.createElement("td"),l.appendChild(f),g.appendChild(l);var m=document.createElement("input");this.dom.search=m,m.oninput=function(x){a._onDelayedSearch(x)},m.onchange=function(x){a._onSearch()},m.onkeydown=function(x){a._onKeyDown(x)},m.onkeyup=function(x){a._onKeyUp(x)},f.onclick=function(x){m.select()},l=document.createElement("td"),l.appendChild(m),g.appendChild(l);var v=document.createElement("button");v.type="button",v.title="Next result (Enter)",v.className="jsoneditor-next",v.onclick=function(){a.next()},l=document.createElement("td"),l.appendChild(v),g.appendChild(l);var w=document.createElement("button");w.type="button",w.title="Previous result (Shift+Enter)",w.className="jsoneditor-previous",w.onclick=function(){a.previous()},l=document.createElement("td"),l.appendChild(w),g.appendChild(l)}r.prototype.next=function(u){if(this.results!=null){var n=this.resultIndex!=null?this.resultIndex+1:0;n>this.results.length-1&&(n=0),this._setActiveResult(n,u)}},r.prototype.previous=function(u){if(this.results!=null){var n=this.results.length-1,a=this.resultIndex!=null?this.resultIndex-1:n;a<0&&(a=n),this._setActiveResult(a,u)}},r.prototype._setActiveResult=function(u,n){if(this.activeResult){var a=this.activeResult.node,o=this.activeResult.elem;o=="field"?delete a.searchFieldActive:delete a.searchValueActive,a.updateDom()}if(!this.results||!this.results[u]){this.resultIndex=void 0,this.activeResult=void 0;return}this.resultIndex=u;var h=this.results[this.resultIndex].node,g=this.results[this.resultIndex].elem;g=="field"?h.searchFieldActive=!0:h.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],h.updateDom(),h.scrollTo(function(){n&&h.focus(g)})},r.prototype._clearDelay=function(){this.timeout!=null&&(clearTimeout(this.timeout),delete this.timeout)},r.prototype._onDelayedSearch=function(u){this._clearDelay();var n=this;this.timeout=setTimeout(function(a){n._onSearch()},this.delay)},r.prototype._onSearch=function(u){this._clearDelay();var n=this.dom.search.value,a=n.length>0?n:void 0;if(a!=this.lastText||u)if(this.lastText=a,this.results=this.editor.search(a),this._setActiveResult(void 0),a!=null){var o=this.results.length;switch(o){case 0:this.dom.results.innerHTML="no&nbsp;results";break;case 1:this.dom.results.innerHTML="1&nbsp;result";break;default:this.dom.results.innerHTML=o+"&nbsp;results";break}}else this.dom.results.innerHTML=""},r.prototype._onKeyDown=function(u){var n=u.which;n==27?(this.dom.search.value="",this._onSearch(),u.preventDefault(),u.stopPropagation()):n==13&&(u.ctrlKey?this._onSearch(!0):u.shiftKey?this.previous():this.next(),u.preventDefault(),u.stopPropagation())},r.prototype._onKeyUp=function(u){var n=u.keyCode;n!=27&&n!=13&&this._onDelayedSearch(u)},r.prototype.clear=function(){this.dom.search.value="",this._onSearch()},r.prototype.destroy=function(){this.editor=null,this.dom.container.removeChild(this.dom.table),this.dom=null,this.results=null,this.activeResult=null,this._clearDelay()},i.exports=r},function(i,t,r){var u=r(57);function n(o){return o.getRootNode&&o.getRootNode()||window}function a(o,h){this.dom={};var g=this,l=this.dom;this.anchor=void 0,this.items=o,this.eventListeners={},this.selection=void 0,this.onClose=h?h.close:void 0;var c=document.createElement("div");c.className="jsoneditor-contextmenu-root",l.root=c;var d=document.createElement("div");d.className="jsoneditor-contextmenu",l.menu=d,c.appendChild(d);var F=document.createElement("ul");F.className="jsoneditor-menu",d.appendChild(F),l.list=F,l.items=[];var p=document.createElement("button");p.type="button",l.focusButton=p;var f=document.createElement("li");f.style.overflow="hidden",f.style.height="0",f.appendChild(p),F.appendChild(f);function m(v,w,x){x.forEach(function(A){if(A.type=="separator"){var b=document.createElement("div");b.className="jsoneditor-separator",k=document.createElement("li"),k.appendChild(b),v.appendChild(k)}else{var y={},k=document.createElement("li");v.appendChild(k);var C=document.createElement("button");if(C.type="button",C.className=A.className,y.button=C,A.title&&(C.title=A.title),A.click&&(C.onclick=function(Y){Y.preventDefault(),g.hide(),A.click()}),k.appendChild(C),A.submenu){var D=document.createElement("div");D.className="jsoneditor-icon",C.appendChild(D);var T=document.createElement("div");T.className="jsoneditor-text"+(A.click?"":" jsoneditor-right-margin"),T.appendChild(document.createTextNode(A.text)),C.appendChild(T);var S;if(A.click){C.className+=" jsoneditor-default";var M=document.createElement("button");M.type="button",y.buttonExpand=M,M.className="jsoneditor-expand",M.innerHTML='<div class="jsoneditor-expand"></div>',k.appendChild(M),A.submenuTitle&&(M.title=A.submenuTitle),S=M}else{var R=document.createElement("div");R.className="jsoneditor-expand",C.appendChild(R),S=C}S.onclick=function(Y){Y.preventDefault(),g._onExpandItem(y),S.focus()};var O=[];y.subItems=O;var H=document.createElement("ul");y.ul=H,H.className="jsoneditor-menu",H.style.height="0",k.appendChild(H),m(H,O,A.submenu)}else C.innerHTML='<div class="jsoneditor-icon"></div><div class="jsoneditor-text">'+A.text+"</div>";w.push(y)}})}m(F,this.dom.items,o),this.maxHeight=0,o.forEach(function(v){var w=(o.length+(v.submenu?v.submenu.length:0))*24;g.maxHeight=Math.max(g.maxHeight,w)})}a.prototype._getVisibleButtons=function(){var o=[],h=this;return this.dom.items.forEach(function(g){o.push(g.button),g.buttonExpand&&o.push(g.buttonExpand),g.subItems&&g==h.expandedItem&&g.subItems.forEach(function(l){o.push(l.button),l.buttonExpand&&o.push(l.buttonExpand)})}),o},a.visibleMenu=void 0,a.prototype.show=function(o,h){this.hide();var g=!0;if(h){var l=o.getBoundingClientRect(),c=h.getBoundingClientRect();l.bottom+this.maxHeight<c.bottom||l.top-this.maxHeight>c.top&&(g=!1)}if(g){var d=o.offsetHeight;this.dom.menu.style.left="0px",this.dom.menu.style.top=d+"px",this.dom.menu.style.bottom=""}else this.dom.menu.style.left="0px",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px";this.rootNode=n(o);var F=o.parentNode;F.insertBefore(this.dom.root,F.firstChild);var p=this,f=this.dom.list;this.eventListeners.mousedown=u.addEventListener(this.rootNode,"mousedown",function(m){var v=m.target;v!=f&&!p._isChildOf(v,f)&&(p.hide(),m.stopPropagation(),m.preventDefault())}),this.eventListeners.keydown=u.addEventListener(this.rootNode,"keydown",function(m){p._onKeyDown(m)}),this.selection=u.getSelection(),this.anchor=o,setTimeout(function(){p.dom.focusButton.focus()},0),a.visibleMenu&&a.visibleMenu.hide(),a.visibleMenu=this},a.prototype.hide=function(){this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose&&this.onClose());for(var o in this.eventListeners)if(this.eventListeners.hasOwnProperty(o)){var h=this.eventListeners[o];h&&u.removeEventListener(this.rootNode,o,h),delete this.eventListeners[o]}a.visibleMenu==this&&(a.visibleMenu=void 0)},a.prototype._onExpandItem=function(o){var h=this,g=o==this.expandedItem,l=this.expandedItem;if(l&&(l.ul.style.height="0",l.ul.style.padding="",setTimeout(function(){h.expandedItem!=l&&(l.ul.style.display="",u.removeClassName(l.ul.parentNode,"jsoneditor-selected"))},300),this.expandedItem=void 0),!g){var c=o.ul;c.style.display="block",c.clientHeight,setTimeout(function(){if(h.expandedItem==o){for(var d=0,F=0;F<c.childNodes.length;F++)d+=c.childNodes[F].clientHeight;c.style.height=d+"px",c.style.padding="5px 10px"}},0),u.addClassName(c.parentNode,"jsoneditor-selected"),this.expandedItem=o}},a.prototype._onKeyDown=function(o){var h=o.target,g=o.which,l=!1,c,d,F,p;g==27?(this.selection&&u.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),l=!0):g==9?o.shiftKey?(c=this._getVisibleButtons(),d=c.indexOf(h),d==0&&(c[c.length-1].focus(),l=!0)):(c=this._getVisibleButtons(),d=c.indexOf(h),d==c.length-1&&(c[0].focus(),l=!0)):g==37?(h.className=="jsoneditor-expand"&&(c=this._getVisibleButtons(),d=c.indexOf(h),F=c[d-1],F&&F.focus()),l=!0):g==38?(c=this._getVisibleButtons(),d=c.indexOf(h),F=c[d-1],F&&F.className=="jsoneditor-expand"&&(F=c[d-2]),F||(F=c[c.length-1]),F&&F.focus(),l=!0):g==39?(c=this._getVisibleButtons(),d=c.indexOf(h),p=c[d+1],p&&p.className=="jsoneditor-expand"&&p.focus(),l=!0):g==40&&(c=this._getVisibleButtons(),d=c.indexOf(h),p=c[d+1],p&&p.className=="jsoneditor-expand"&&(p=c[d+2]),p||(p=c[0]),p&&(p.focus(),l=!0),l=!0),l&&(o.stopPropagation(),o.preventDefault())},a.prototype._isChildOf=function(o,h){for(var g=o.parentNode;g;){if(g==h)return!0;g=g.parentNode}return!1},i.exports=a},function(i,t,r){var u=r(62),n=r(60),a=r(63),o=r(57);function h(l,c){this.editor=l,this.dom={},this.expanded=!1,c&&c instanceof Object?(this.setField(c.field,c.fieldEditable),this.setValue(c.value,c.type)):(this.setField(""),this.setValue(null)),this._debouncedOnChangeValue=o.debounce(this._onChangeValue.bind(this),h.prototype.DEBOUNCE_INTERVAL),this._debouncedOnChangeField=o.debounce(this._onChangeField.bind(this),h.prototype.DEBOUNCE_INTERVAL)}h.prototype.DEBOUNCE_INTERVAL=150,h.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field=this.editor.options.mode==="tree",this.editable.value=this.editor.options.mode!=="view",(this.editor.options.mode==="tree"||this.editor.options.mode==="form")&&typeof this.editor.options.onEditable=="function")){var l=this.editor.options.onEditable({field:this.field,value:this.value,path:this.getPath()});typeof l=="boolean"?(this.editable.field=l,this.editable.value=l):(typeof l.field=="boolean"&&(this.editable.field=l.field),typeof l.value=="boolean"&&(this.editable.value=l.value))}},h.prototype.getPath=function(){for(var l=this,c=[];l;){var d=l.parent?l.parent.type!="array"?l.field:l.index:void 0;d!==void 0&&c.unshift(d),l=l.parent}return c},h.prototype.findNode=function(l){for(var c=o.parsePath(l),d=this;d&&c.length>0;){var F=c.shift();if(typeof F=="number"){if(d.type!=="array")throw new Error("Cannot get child node at index "+F+": node is no array");d=d.childs[F]}else{if(d.type!=="object")throw new Error("Cannot get child node "+F+": node is no object");d=d.childs.filter(function(p){return p.field===F})[0]}}return d},h.prototype.findParents=function(){for(var l=[],c=this.parent;c;)l.unshift(c),c=c.parent;return l},h.prototype.setError=function(l,c){this.getDom(),this.error=l;var d=this.dom.tdError;if(l){d||(d=document.createElement("td"),this.dom.tdError=d,this.dom.tdValue.parentNode.appendChild(d));var F=document.createElement("div");F.className="jsoneditor-popover jsoneditor-right",F.appendChild(document.createTextNode(l.message));var p=document.createElement("button");for(p.type="button",p.className="jsoneditor-schema-error",p.appendChild(F),p.onmouseover=p.onfocus=function(){for(var m=["right","above","below","left"],v=0;v<m.length;v++){var w=m[v];F.className="jsoneditor-popover jsoneditor-"+w;var x=this.editor.content.getBoundingClientRect(),A=F.getBoundingClientRect(),b=20,y=o.insideRect(x,A,b);if(y)break}}.bind(this),c&&(p.onclick=function(){c.findParents().forEach(function(m){m.expand(!1)}),c.scrollTo(function(){c.focus()})});d.firstChild;)d.removeChild(d.firstChild);d.appendChild(p)}else d&&(this.dom.tdError.parentNode.removeChild(this.dom.tdError),delete this.dom.tdError)},h.prototype.getIndex=function(){return this.parent?this.parent.childs.indexOf(this):-1},h.prototype.setParent=function(l){this.parent=l},h.prototype.setField=function(l,c){this.field=l,this.previousField=l,this.fieldEditable=c===!0},h.prototype.getField=function(){return this.field===void 0&&this._getDomField(),this.field},h.prototype.setValue=function(l,c){var d,F,p=this.childs;if(p)for(;p.length;)this.removeChild(p[0]);if(this.type=this._getType(l),c&&c!=this.type)if(c=="string"&&this.type=="auto")this.type=c;else throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+c+'"');if(this.type=="array"){this.childs=[];for(var f=0,m=l.length;f<m;f++)d=l[f],d!==void 0&&!(d instanceof Function)&&(F=new h(this.editor,{value:d}),this.appendChild(F));this.value=""}else if(this.type=="object"){this.childs=[];for(var v in l)l.hasOwnProperty(v)&&(d=l[v],d!==void 0&&!(d instanceof Function)&&(F=new h(this.editor,{field:v,value:d}),this.appendChild(F)));this.value="",this.editor.options.sortObjectKeys===!0&&this.sort("asc")}else this.childs=void 0,this.value=l;this.previousValue=this.value},h.prototype.getValue=function(){if(this.type=="array"){var l=[];return this.childs.forEach(function(d){l.push(d.getValue())}),l}else if(this.type=="object"){var c={};return this.childs.forEach(function(d){c[d.getField()]=d.getValue()}),c}else return this.value===void 0&&this._getDomValue(),this.value},h.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},h.prototype.getNodePath=function(){var l=this.parent?this.parent.getNodePath():[];return l.push(this),l},h.prototype.clone=function(){var l=new h(this.editor);if(l.type=this.type,l.field=this.field,l.fieldInnerText=this.fieldInnerText,l.fieldEditable=this.fieldEditable,l.value=this.value,l.valueInnerText=this.valueInnerText,l.expanded=this.expanded,this.childs){var c=[];this.childs.forEach(function(d){var F=d.clone();F.setParent(l),c.push(F)}),l.childs=c}else l.childs=void 0;return l},h.prototype.expand=function(l){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-expanded"),this.showChilds(),l!==!1&&this.childs.forEach(function(c){c.expand(l)}))},h.prototype.collapse=function(l){this.childs&&(this.hideChilds(),l!==!1&&this.childs.forEach(function(c){c.collapse(l)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-collapsed"),this.expanded=!1)},h.prototype.showChilds=function(){var l=this.childs;if(l&&this.expanded){var c=this.dom.tr,d=c?c.parentNode:void 0;if(d){var F=this.getAppend(),p=c.nextSibling;p?d.insertBefore(F,p):d.appendChild(F),this.childs.forEach(function(f){d.insertBefore(f.getDom(),F),f.showChilds()})}}},h.prototype.hide=function(){var l=this.dom.tr,c=l?l.parentNode:void 0;c&&c.removeChild(l),this.hideChilds()},h.prototype.hideChilds=function(){var l=this.childs;if(l&&this.expanded){var c=this.getAppend();c.parentNode&&c.parentNode.removeChild(c),this.childs.forEach(function(d){d.hide()})}},h.prototype.appendChild=function(l){if(this._hasChilds()){if(l.setParent(this),l.fieldEditable=this.type=="object",this.type=="array"&&(l.index=this.childs.length),this.childs.push(l),this.expanded){var c=l.getDom(),d=this.getAppend(),F=d?d.parentNode:void 0;d&&F&&F.insertBefore(c,d),l.showChilds()}this.updateDom({updateIndexes:!0}),l.updateDom({recurse:!0})}},h.prototype.moveBefore=function(l,c){if(this._hasChilds()){var d=this.dom.tr?this.dom.tr.parentNode:void 0;if(d){var F=document.createElement("tr");F.style.height=d.clientHeight+"px",d.appendChild(F)}l.parent&&l.parent.removeChild(l),c instanceof g?this.appendChild(l):this.insertBefore(l,c),d&&d.removeChild(F)}},h.prototype.moveTo=function(l,c){if(l.parent==this){var d=this.childs.indexOf(l);d<c&&c++}var F=this.childs[c]||this.append;this.moveBefore(l,F)},h.prototype.insertBefore=function(l,c){if(this._hasChilds()){if(c==this.append)l.setParent(this),l.fieldEditable=this.type=="object",this.childs.push(l);else{var d=this.childs.indexOf(c);if(d==-1)throw new Error("Node not found");l.setParent(this),l.fieldEditable=this.type=="object",this.childs.splice(d,0,l)}if(this.expanded){var F=l.getDom(),p=c.getDom(),f=p?p.parentNode:void 0;p&&f&&f.insertBefore(F,p),l.showChilds()}this.updateDom({updateIndexes:!0}),l.updateDom({recurse:!0})}},h.prototype.insertAfter=function(l,c){if(this._hasChilds()){var d=this.childs.indexOf(c),F=this.childs[d+1];F?this.insertBefore(l,F):this.appendChild(l)}},h.prototype.search=function(l){var c=[],d,F=l?l.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,this.field!=null){var p=String(this.field).toLowerCase();d=p.indexOf(F),d!=-1&&(this.searchField=!0,c.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var f=[];this.childs.forEach(function(w){f=f.concat(w.search(l))}),c=c.concat(f)}if(F!=null){var m=!1;f.length==0?this.collapse(m):this.expand(m)}}else{if(this.value!=null){var v=String(this.value).toLowerCase();d=v.indexOf(F),d!=-1&&(this.searchValue=!0,c.push({node:this,elem:"value"}))}this._updateDomValue()}return c},h.prototype.scrollTo=function(l){if(!this.dom.tr||!this.dom.tr.parentNode)for(var c=this.parent,d=!1;c;)c.expand(d),c=c.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,l)},h.focusElement=void 0,h.prototype.focus=function(l){if(h.focusElement=l,this.dom.tr&&this.dom.tr.parentNode){var c=this.dom;switch(l){case"drag":c.drag?c.drag.focus():c.menu.focus();break;case"menu":c.menu.focus();break;case"expand":this._hasChilds()?c.expand.focus():c.field&&this.fieldEditable?(c.field.focus(),o.selectContentEditable(c.field)):c.value&&!this._hasChilds()?(c.value.focus(),o.selectContentEditable(c.value)):c.menu.focus();break;case"field":c.field&&this.fieldEditable?(c.field.focus(),o.selectContentEditable(c.field)):c.value&&!this._hasChilds()?(c.value.focus(),o.selectContentEditable(c.value)):this._hasChilds()?c.expand.focus():c.menu.focus();break;case"value":default:c.select?c.select.focus():c.value&&!this._hasChilds()?(c.value.focus(),o.selectContentEditable(c.value)):c.field&&this.fieldEditable?(c.field.focus(),o.selectContentEditable(c.field)):this._hasChilds()?c.expand.focus():c.menu.focus();break}}},h.select=function(l){setTimeout(function(){o.selectContentEditable(l)},0)},h.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},h.prototype.containsNode=function(l){if(this==l)return!0;var c=this.childs;if(c){for(var d=0,F=c.length;d<F;d++)if(c[d].containsNode(l))return!0}return!1},h.prototype._move=function(l,c){if(l!=c){if(l.containsNode(this))throw new Error("Cannot move a field into a child of itself");l.parent&&l.parent.removeChild(l);var d=l.clone();l.clearDom(),c?this.insertBefore(d,c):this.appendChild(d)}},h.prototype.removeChild=function(l){if(this.childs){var c=this.childs.indexOf(l);if(c!=-1){l.hide(),delete l.searchField,delete l.searchValue;var d=this.childs.splice(c,1)[0];return d.parent=null,this.updateDom({updateIndexes:!0}),d}}},h.prototype._remove=function(l){this.removeChild(l)},h.prototype.changeType=function(l){var c=this.type;if(c!=l){if((l=="string"||l=="auto")&&(c=="string"||c=="auto"))this.type=l;else{var d=this.dom.tr?this.dom.tr.parentNode:void 0,F;this.expanded?F=this.getAppend():F=this.getDom();var p=F&&F.parentNode?F.nextSibling:void 0;this.hide(),this.clearDom(),this.type=l,l=="object"?(this.childs||(this.childs=[]),this.childs.forEach(function(f,m){f.clearDom(),delete f.index,f.fieldEditable=!0,f.field==null&&(f.field="")}),(c=="string"||c=="auto")&&(this.expanded=!0)):l=="array"?(this.childs||(this.childs=[]),this.childs.forEach(function(f,m){f.clearDom(),f.fieldEditable=!1,f.index=m}),(c=="string"||c=="auto")&&(this.expanded=!0)):this.expanded=!1,d&&(p?d.insertBefore(this.getDom(),p):d.appendChild(this.getDom())),this.showChilds()}(l=="auto"||l=="string")&&(l=="string"?this.value=String(this.value):this.value=this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},h.prototype._getDomValue=function(l){if(this.dom.value&&this.type!="array"&&this.type!="object"&&(this.valueInnerText=o.getInnerText(this.dom.value)),this.valueInnerText!=null)try{var c;if(this.type=="string")c=this._unescapeHTML(this.valueInnerText);else{var d=this._unescapeHTML(this.valueInnerText);c=this._stringCast(d)}c!==this.value&&(this.value=c,this._debouncedOnChangeValue())}catch(F){if(this.value=void 0,l!==!0)throw F}},h.prototype._onChangeValue=function(){var l=this.editor.getSelection();if(l.range){var c=o.textDiff(String(this.value),String(this.previousValue));l.range.startOffset=c.start,l.range.endOffset=c.end}var d=this.editor.getSelection();if(d.range){var F=o.textDiff(String(this.previousValue),String(this.value));d.range.startOffset=F.start,d.range.endOffset=F.end}this.editor._onAction("editValue",{node:this,oldValue:this.previousValue,newValue:this.value,oldSelection:l,newSelection:d}),this.previousValue=this.value},h.prototype._onChangeField=function(){var l=this.editor.getSelection();if(l.range){var c=o.textDiff(this.field,this.previousField);l.range.startOffset=c.start,l.range.endOffset=c.end}var d=this.editor.getSelection();if(d.range){var F=o.textDiff(this.previousField,this.field);d.range.startOffset=F.start,d.range.endOffset=F.end}this.editor._onAction("editField",{node:this,oldValue:this.previousField,newValue:this.field,oldSelection:l,newSelection:d}),this.previousField=this.field},h.prototype._updateDomValue=function(){var l=this.dom.value;if(l){var c=["jsoneditor-value"],d=this.value,F=this.type=="auto"?o.type(d):this.type,p=F=="string"&&o.isUrl(d);c.push("jsoneditor-"+F),p&&c.push("jsoneditor-url");var f=String(this.value)==""&&this.type!="array"&&this.type!="object";if(f&&c.push("jsoneditor-empty"),this.searchValueActive&&c.push("jsoneditor-highlight-active"),this.searchValue&&c.push("jsoneditor-highlight"),l.className=c.join(" "),F=="array"||F=="object"){var m=this.childs?this.childs.length:0;l.title=this.type+" containing "+m+" items"}else p&&this.editable.value?l.title="Ctrl+Click or Ctrl+Enter to open url in new window":l.title="";if(F==="boolean"&&this.editable.value?(this.dom.checkbox||(this.dom.checkbox=document.createElement("input"),this.dom.checkbox.type="checkbox",this.dom.tdCheckbox=document.createElement("td"),this.dom.tdCheckbox.className="jsoneditor-tree",this.dom.tdCheckbox.appendChild(this.dom.checkbox),this.dom.tdValue.parentNode.insertBefore(this.dom.tdCheckbox,this.dom.tdValue)),this.dom.checkbox.checked=this.value):this.dom.tdCheckbox&&(this.dom.tdCheckbox.parentNode.removeChild(this.dom.tdCheckbox),delete this.dom.tdCheckbox,delete this.dom.checkbox),this.enum&&this.editable.value){if(!this.dom.select){this.dom.select=document.createElement("select"),this.id=this.field+"_"+new Date().getUTCMilliseconds(),this.dom.select.id=this.id,this.dom.select.name=this.dom.select.id,this.dom.select.option=document.createElement("option"),this.dom.select.option.value="",this.dom.select.option.innerHTML="--",this.dom.select.appendChild(this.dom.select.option);for(var v=0;v<this.enum.length;v++)this.dom.select.option=document.createElement("option"),this.dom.select.option.value=this.enum[v],this.dom.select.option.innerHTML=this.enum[v],this.dom.select.option.value==this.value&&(this.dom.select.option.selected=!0),this.dom.select.appendChild(this.dom.select.option);this.dom.tdSelect=document.createElement("td"),this.dom.tdSelect.className="jsoneditor-tree",this.dom.tdSelect.appendChild(this.dom.select),this.dom.tdValue.parentNode.insertBefore(this.dom.tdSelect,this.dom.tdValue)}this.schema&&!this.schema.hasOwnProperty("oneOf")&&!this.schema.hasOwnProperty("anyOf")&&!this.schema.hasOwnProperty("allOf")?(this.valueFieldHTML=this.dom.tdValue.innerHTML,this.dom.tdValue.style.visibility="hidden",this.dom.tdValue.innerHTML=""):delete this.valueFieldHTML}else this.dom.tdSelect&&(this.dom.tdSelect.parentNode.removeChild(this.dom.tdSelect),delete this.dom.tdSelect,delete this.dom.select,this.dom.tdValue.innerHTML=this.valueFieldHTML,this.dom.tdValue.style.visibility="",delete this.valueFieldHTML);o.stripFormatting(l)}},h.prototype._updateDomField=function(){var l=this.dom.field;if(l){var c=String(this.field)==""&&this.parent.type!="array";c?o.addClassName(l,"jsoneditor-empty"):o.removeClassName(l,"jsoneditor-empty"),this.searchFieldActive?o.addClassName(l,"jsoneditor-highlight-active"):o.removeClassName(l,"jsoneditor-highlight-active"),this.searchField?o.addClassName(l,"jsoneditor-highlight"):o.removeClassName(l,"jsoneditor-highlight"),o.stripFormatting(l)}},h.prototype._getDomField=function(l){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=o.getInnerText(this.dom.field)),this.fieldInnerText!=null)try{var c=this._unescapeHTML(this.fieldInnerText);c!==this.field&&(this.field=c,this._debouncedOnChangeField())}catch(d){if(this.field=void 0,l!==!0)throw d}},h.prototype.validate=function(){var l=[];if(this.type==="object"){for(var c={},d=[],F=0;F<this.childs.length;F++){var p=this.childs[F];c.hasOwnProperty(p.field)&&d.push(p.field),c[p.field]=!0}d.length>0&&(l=this.childs.filter(function(m){return d.indexOf(m.field)!==-1}).map(function(m){return{node:m,error:{message:'duplicate key "'+m.field+'"'}}}))}if(this.childs)for(var F=0;F<this.childs.length;F++){var f=this.childs[F].validate();f.length>0&&(l=l.concat(f))}return l},h.prototype.clearDom=function(){this.dom={}},h.prototype.getDom=function(){var l=this.dom;if(l.tr)return l.tr;if(this._updateEditability(),l.tr=document.createElement("tr"),l.tr.node=this,this.editor.options.mode==="tree"){var c=document.createElement("td");if(this.editable.field&&this.parent){var d=document.createElement("button");d.type="button",l.drag=d,d.className="jsoneditor-dragarea",d.title="Drag to move this field (Alt+Shift+Arrows)",c.appendChild(d)}l.tr.appendChild(c);var F=document.createElement("td"),p=document.createElement("button");p.type="button",l.menu=p,p.className="jsoneditor-contextmenu",p.title="Click to open the actions menu (Ctrl+M)",F.appendChild(l.menu),l.tr.appendChild(F)}var f=document.createElement("td");return l.tr.appendChild(f),l.tree=this._createDomTree(),f.appendChild(l.tree),this.updateDom({updateIndexes:!0}),l.tr},h.onDragStart=function(l,c){if(!Array.isArray(l))return h.onDragStart([l],c);if(l.length!==0){var d=l[0],F=l[l.length-1],p=h.getNodeFromTarget(c.target),f=F._nextSibling(),m=d.editor,v=o.getAbsoluteTop(p.dom.tr)-o.getAbsoluteTop(d.dom.tr);m.mousemove||(m.mousemove=o.addEventListener(window,"mousemove",function(w){h.onDrag(l,w)})),m.mouseup||(m.mouseup=o.addEventListener(window,"mouseup",function(w){h.onDragEnd(l,w)})),m.highlighter.lock(),m.drag={oldCursor:document.body.style.cursor,oldSelection:m.getSelection(),oldBeforeNode:f,mouseX:c.pageX,offsetY:v,level:d.getLevel()},document.body.style.cursor="move",c.preventDefault()}},h.onDrag=function(l,c){if(!Array.isArray(l))return h.onDrag([l],c);if(l.length!==0){var d=l[0].editor,F=c.pageY-d.drag.offsetY,p=c.pageX,f,m,v,w,x,A,b,y,k,C,D,T,S,M,R=!1,O=l[0];if(f=O.dom.tr,k=o.getAbsoluteTop(f),T=f.offsetHeight,F<k){m=f;do m=m.previousSibling,b=h.getNodeFromTarget(m),C=m?o.getAbsoluteTop(m):0;while(m&&F<C);b&&!b.parent&&(b=void 0),b||(A=f.parentNode.firstChild,m=A?A.nextSibling:void 0,b=h.getNodeFromTarget(m),b==O&&(b=void 0)),b&&(m=b.dom.tr,C=m?o.getAbsoluteTop(m):0,F>C+T&&(b=void 0)),b&&(l.forEach(function(ue){b.parent.moveBefore(ue,b)}),R=!0)}else{var H=l[l.length-1];if(x=H.expanded&&H.append?H.append.getDom():H.dom.tr,w=x?x.nextSibling:void 0,w){D=o.getAbsoluteTop(w),v=w;do y=h.getNodeFromTarget(v),v&&(S=v.nextSibling?o.getAbsoluteTop(v.nextSibling):0,M=v?S-D:0,y.parent.childs.length==l.length&&y.parent.childs[l.length-1]==H&&(k+=27)),v=v.nextSibling;while(v&&F>k+M);if(y&&y.parent){var Y=p-d.drag.mouseX,J=Math.round(Y/24/2),Z=d.drag.level+J,te=y.getLevel();for(m=y.dom.tr.previousSibling;te<Z&&m;){b=h.getNodeFromTarget(m);var ie=l.some(function(ue){return ue===b||b._isChildOf(ue)});if(!ie)if(b instanceof g){var se=b.parent.childs;if(se.length!=l.length||se[l.length-1]!=H)y=h.getNodeFromTarget(m),te=y.getLevel();else break}else break;m=m.previousSibling}x.nextSibling!=y.dom.tr&&(l.forEach(function(ue){y.parent.moveBefore(ue,y)}),R=!0)}}}R&&(d.drag.mouseX=p,d.drag.level=O.getLevel()),d.startAutoScroll(F),c.preventDefault()}},h.onDragEnd=function(l,c){if(!Array.isArray(l))return h.onDrag([l],c);if(l.length!==0){var d=l[0],F=d.editor,p=d.parent,f=p.childs.indexOf(d),m=p.childs[f+l.length]||p.append;l[0]&&l[0].dom.menu.focus();var v={nodes:l,oldSelection:F.drag.oldSelection,newSelection:F.getSelection(),oldBeforeNode:F.drag.oldBeforeNode,newBeforeNode:m};v.oldBeforeNode!=v.newBeforeNode&&F._onAction("moveNodes",v),document.body.style.cursor=F.drag.oldCursor,F.highlighter.unlock(),l.forEach(function(w){c.target!==w.dom.drag&&c.target!==w.dom.menu&&F.highlighter.unhighlight()}),delete F.drag,F.mousemove&&(o.removeEventListener(window,"mousemove",F.mousemove),delete F.mousemove),F.mouseup&&(o.removeEventListener(window,"mouseup",F.mouseup),delete F.mouseup),F.stopAutoScroll(),c.preventDefault()}},h.prototype._isChildOf=function(l){for(var c=this.parent;c;){if(c==l)return!0;c=c.parent}return!1},h.prototype._createDomField=function(){return document.createElement("div")},h.prototype.setHighlight=function(l){this.dom.tr&&(l?o.addClassName(this.dom.tr,"jsoneditor-highlight"):o.removeClassName(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(l),this.childs&&this.childs.forEach(function(c){c.setHighlight(l)}))},h.prototype.setSelected=function(l,c){this.selected=l,this.dom.tr&&(l?o.addClassName(this.dom.tr,"jsoneditor-selected"):o.removeClassName(this.dom.tr,"jsoneditor-selected"),c?o.addClassName(this.dom.tr,"jsoneditor-first"):o.removeClassName(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(l),this.childs&&this.childs.forEach(function(d){d.setSelected(l)}))},h.prototype.updateValue=function(l){this.value=l,this.updateDom()},h.prototype.updateField=function(l){this.field=l,this.updateDom()},h.prototype.updateDom=function(l){var c=this.dom.tree;c&&(c.style.marginLeft=this.getLevel()*24+"px");var d=this.dom.field;if(d){this.fieldEditable?(d.contentEditable=this.editable.field,d.spellcheck=!1,d.className="jsoneditor-field"):d.className="jsoneditor-readonly";var F;this.index!=null?F=this.index:this.field!=null?F=this.field:this._hasChilds()?F=this.type:F="",d.innerHTML=this._escapeHTML(F),this._updateSchema()}var p=this.dom.value;if(p){var f=this.childs?this.childs.length:0;this.type=="array"?(p.innerHTML="["+f+"]",o.addClassName(this.dom.tr,"jsoneditor-expandable")):this.type=="object"?(p.innerHTML="{"+f+"}",o.addClassName(this.dom.tr,"jsoneditor-expandable")):(p.innerHTML=this._escapeHTML(this.value),o.removeClassName(this.dom.tr,"jsoneditor-expandable"))}this._updateDomField(),this._updateDomValue(),l&&l.updateIndexes===!0&&this._updateDomIndexes(),l&&l.recurse===!0&&this.childs&&this.childs.forEach(function(m){m.updateDom(l)}),this.append&&this.append.updateDom()},h.prototype._updateSchema=function(){this.editor&&this.editor.options&&(this.schema=this.editor.options.schema?h._findSchema(this.editor.options.schema,this.getPath()):null,this.schema?this.enum=h._findEnum(this.schema):delete this.enum)},h._findEnum=function(l){if(l.enum)return l.enum;var c=l.oneOf||l.anyOf||l.allOf;if(c){var d=c.filter(function(F){return F.enum});if(d.length>0)return d[0].enum}return null},h._findSchema=function(l,c){var d=l,F=d,p=l.oneOf||l.anyOf||l.allOf;p||(p=[l]);for(var f=0;f<p.length;f++){d=p[f];for(var m=0;m<c.length&&d;m++){var v=c[m];typeof v=="string"&&d.properties?(d=d.properties[v]||null,d&&(F=h._findSchema(d,c.slice(m,c.length)))):typeof v=="number"&&d.items&&(d=d.items,d&&(F=h._findSchema(d,c.slice(m,c.length))))}}return F},h.prototype._updateDomIndexes=function(){var l=this.dom.value,c=this.childs;l&&c&&(this.type=="array"?c.forEach(function(d,F){d.index=F;var p=d.dom.field;p&&(p.innerHTML=F)}):this.type=="object"&&c.forEach(function(d){d.index!=null&&(delete d.index,d.field==null&&(d.field=""))}))},h.prototype._createDomValue=function(){var l;return this.type=="array"?(l=document.createElement("div"),l.innerHTML="[...]"):this.type=="object"?(l=document.createElement("div"),l.innerHTML="{...}"):!this.editable.value&&o.isUrl(this.value)?(l=document.createElement("a"),l.href=this.value,l.target="_blank",l.innerHTML=this._escapeHTML(this.value)):(l=document.createElement("div"),l.contentEditable=this.editable.value,l.spellcheck=!1,l.innerHTML=this._escapeHTML(this.value)),l},h.prototype._createDomExpandButton=function(){var l=document.createElement("button");return l.type="button",this._hasChilds()?(l.className=this.expanded?"jsoneditor-expanded":"jsoneditor-collapsed",l.title=`Click to expand/collapse this field (Ctrl+E). 
Ctrl+Click to expand/collapse including all childs.`):(l.className="jsoneditor-invisible",l.title=""),l},h.prototype._createDomTree=function(){var l=this.dom,c=document.createElement("table"),d=document.createElement("tbody");c.style.borderCollapse="collapse",c.className="jsoneditor-values",c.appendChild(d);var F=document.createElement("tr");d.appendChild(F);var p=document.createElement("td");p.className="jsoneditor-tree",F.appendChild(p),l.expand=this._createDomExpandButton(),p.appendChild(l.expand),l.tdExpand=p;var f=document.createElement("td");f.className="jsoneditor-tree",F.appendChild(f),l.field=this._createDomField(),f.appendChild(l.field),l.tdField=f;var m=document.createElement("td");m.className="jsoneditor-tree",F.appendChild(m),this.type!="object"&&this.type!="array"&&(m.appendChild(document.createTextNode(":")),m.className="jsoneditor-separator"),l.tdSeparator=m;var v=document.createElement("td");return v.className="jsoneditor-tree",F.appendChild(v),l.value=this._createDomValue(),v.appendChild(l.value),l.tdValue=v,c},h.prototype.onEvent=function(l){var c=l.type,d=l.target||l.srcElement,F=this.dom,p=this,f=this._hasChilds();if((d==F.drag||d==F.menu)&&(c=="mouseover"?this.editor.highlighter.highlight(this):c=="mouseout"&&this.editor.highlighter.unhighlight()),c=="click"&&d==F.menu){var m=p.editor.highlighter;m.highlight(p),m.lock(),o.addClassName(F.menu,"jsoneditor-selected"),this.showContextMenu(F.menu,function(){o.removeClassName(F.menu,"jsoneditor-selected"),m.unlock(),m.unhighlight()})}if(c=="click"&&(d==F.expand||(p.editor.options.mode==="view"||p.editor.options.mode==="form")&&d.nodeName==="DIV")&&f){var v=l.ctrlKey;this._onExpand(v)}c=="change"&&d==F.checkbox&&(this.dom.value.innerHTML=!this.value,this._getDomValue()),c=="change"&&d==F.select&&(this.dom.value.innerHTML=F.select.value,this._getDomValue(),this._updateDomValue());var w=F.value;if(d==w)switch(c){case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(w.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":l.ctrlKey&&this.editable.value&&o.isUrl(this.value)&&(l.preventDefault(),window.open(this.value,"_blank"));break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){p._getDomValue(!0),p._updateDomValue()},1);break}var x=F.field;if(d==x)switch(c){case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(x.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateSchema(),this._updateDomField(),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){p._getDomField(!0),p._updateDomField()},1);break}var A=F.tree;if(d==A.parentNode&&c=="click"&&!l.hasMoved){var b=l.offsetX!=null?l.offsetX<(this.getLevel()+1)*24:l.pageX<o.getAbsoluteLeft(F.tdSeparator);b||f?x&&(o.setEndOfContentEditable(x),x.focus()):w&&!this.enum&&(o.setEndOfContentEditable(w),w.focus())}(d==F.tdExpand&&!f||d==F.tdField||d==F.tdSeparator)&&c=="click"&&!l.hasMoved&&x&&(o.setEndOfContentEditable(x),x.focus()),c=="keydown"&&this.onKeyDown(l)},h.prototype.onKeyDown=function(l){var c=l.which||l.keyCode,d=l.target||l.srcElement,F=l.ctrlKey,p=l.shiftKey,f=l.altKey,m=!1,v,w,x,A,b=this.editor.options.mode==="tree",y,k,C,D,T=this.editor.multiselection.nodes.length>0?this.editor.multiselection.nodes:[this],S=T[0],M=T[T.length-1];if(c==13){if(d==this.dom.value)(!this.editable.value||l.ctrlKey)&&o.isUrl(this.value)&&(window.open(this.value,"_blank"),m=!0);else if(d==this.dom.expand){var R=this._hasChilds();if(R){var O=l.ctrlKey;this._onExpand(O),d.focus(),m=!0}}}else if(c==68)F&&b&&(h.onDuplicate(T),m=!0);else if(c==69)F&&(this._onExpand(p),d.focus(),m=!0);else if(c==77&&b)F&&(this.showContextMenu(d),m=!0);else if(c==46&&b)F&&(h.onRemove(T),m=!0);else if(c==45&&b)F&&!p?(this._onInsertBefore(),m=!0):F&&p&&(this._onInsertAfter(),m=!0);else if(c==35){if(f){var H=this._lastNode();H&&H.focus(h.focusElement||this._getElementName(d)),m=!0}}else if(c==36){if(f){var Y=this._firstNode();Y&&Y.focus(h.focusElement||this._getElementName(d)),m=!0}}else if(c==37){if(f&&!p){var J=this._previousElement(d);J&&this.focus(this._getElementName(J)),m=!0}else if(f&&p&&b){if(M.expanded){var Z=M.getAppend();x=Z?Z.nextSibling:void 0}else{var te=M.getDom();x=te.nextSibling}x&&(w=h.getNodeFromTarget(x),A=x.nextSibling,ue=h.getNodeFromTarget(A),w&&w instanceof g&&M.parent.childs.length!=1&&ue&&ue.parent&&(y=this.editor.getSelection(),k=M._nextSibling(),T.forEach(function(ne){ue.parent.moveBefore(ne,ue)}),this.focus(h.focusElement||this._getElementName(d)),this.editor._onAction("moveNodes",{nodes:T,oldBeforeNode:k,newBeforeNode:ue,oldSelection:y,newSelection:this.editor.getSelection()})))}}else if(c==38)f&&!p?(v=this._previousNode(),v&&(this.editor.deselect(!0),v.focus(h.focusElement||this._getElementName(d))),m=!0):!f&&F&&p&&b?(v=this._previousNode(),v&&(D=this.editor.multiselection,D.start=D.start||this,D.end=v,C=this.editor._findTopLevelNodes(D.start,D.end),this.editor.select(C),v.focus("field")),m=!0):f&&p&&b&&(v=S._previousNode(),v&&v.parent&&(y=this.editor.getSelection(),k=M._nextSibling(),T.forEach(function(ne){v.parent.moveBefore(ne,v)}),this.focus(h.focusElement||this._getElementName(d)),this.editor._onAction("moveNodes",{nodes:T,oldBeforeNode:k,newBeforeNode:v,oldSelection:y,newSelection:this.editor.getSelection()})),m=!0);else if(c==39){if(f&&!p){var ie=this._nextElement(d);ie&&this.focus(this._getElementName(ie)),m=!0}else if(f&&p&&b){te=S.getDom();var se=te.previousSibling;se&&(v=h.getNodeFromTarget(se),v&&v.parent&&v instanceof g&&!v.isVisible()&&(y=this.editor.getSelection(),k=M._nextSibling(),T.forEach(function(ne){v.parent.moveBefore(ne,v)}),this.focus(h.focusElement||this._getElementName(d)),this.editor._onAction("moveNodes",{nodes:T,oldBeforeNode:k,newBeforeNode:v,oldSelection:y,newSelection:this.editor.getSelection()})))}}else if(c==40){if(f&&!p)w=this._nextNode(),w&&(this.editor.deselect(!0),w.focus(h.focusElement||this._getElementName(d))),m=!0;else if(!f&&F&&p&&b)w=this._nextNode(),w&&(D=this.editor.multiselection,D.start=D.start||this,D.end=w,C=this.editor._findTopLevelNodes(D.start,D.end),this.editor.select(C),w.focus("field")),m=!0;else if(f&&p&&b){M.expanded?w=M.append?M.append._nextNode():void 0:w=M._nextNode();var ue=w&&(w._nextNode()||w.parent.append);ue&&ue.parent&&(y=this.editor.getSelection(),k=M._nextSibling(),T.forEach(function(ne){ue.parent.moveBefore(ne,ue)}),this.focus(h.focusElement||this._getElementName(d)),this.editor._onAction("moveNodes",{nodes:T,oldBeforeNode:k,newBeforeNode:ue,oldSelection:y,newSelection:this.editor.getSelection()})),m=!0}}m&&(l.preventDefault(),l.stopPropagation())},h.prototype._onExpand=function(l){if(l){var c=this.dom.tr.parentNode,d=c.parentNode,F=d.scrollTop;d.removeChild(c)}this.expanded?this.collapse(l):this.expand(l),l&&(d.appendChild(c),d.scrollTop=F)},h.onRemove=function(l){if(!Array.isArray(l))return h.onRemove([l]);if(l&&l.length>0){var c=l[0],d=c.parent,F=c.editor,p=c.getIndex();F.highlighter.unhighlight();var f=F.getSelection();h.blurNodes(l);var m=F.getSelection();l.forEach(function(v){v.parent._remove(v)}),F._onAction("removeNodes",{nodes:l.slice(0),parent:d,index:p,oldSelection:f,newSelection:m})}},h.onDuplicate=function(l){if(!Array.isArray(l))return h.onDuplicate([l]);if(l&&l.length>0){var c=l[l.length-1],d=c.parent,F=c.editor;F.deselect(F.multiselection.nodes);var p=F.getSelection(),f=c,m=l.map(function(w){var x=w.clone();return d.insertAfter(x,f),f=x,x});l.length===1?m[0].focus():F.select(m);var v=F.getSelection();F._onAction("duplicateNodes",{afterNode:c,nodes:m,parent:d,oldSelection:p,newSelection:v})}},h.prototype._onInsertBefore=function(l,c,d){var F=this.editor.getSelection(),p=new h(this.editor,{field:l??"",value:c??"",type:d});p.expand(!0),this.parent.insertBefore(p,this),this.editor.highlighter.unhighlight(),p.focus("field");var f=this.editor.getSelection();this.editor._onAction("insertBeforeNodes",{nodes:[p],beforeNode:this,parent:this.parent,oldSelection:F,newSelection:f})},h.prototype._onInsertAfter=function(l,c,d){var F=this.editor.getSelection(),p=new h(this.editor,{field:l??"",value:c??"",type:d});p.expand(!0),this.parent.insertAfter(p,this),this.editor.highlighter.unhighlight(),p.focus("field");var f=this.editor.getSelection();this.editor._onAction("insertAfterNodes",{nodes:[p],afterNode:this,parent:this.parent,oldSelection:F,newSelection:f})},h.prototype._onAppend=function(l,c,d){var F=this.editor.getSelection(),p=new h(this.editor,{field:l??"",value:c??"",type:d});p.expand(!0),this.parent.appendChild(p),this.editor.highlighter.unhighlight(),p.focus("field");var f=this.editor.getSelection();this.editor._onAction("appendNodes",{nodes:[p],parent:this.parent,oldSelection:F,newSelection:f})},h.prototype._onChangeType=function(l){var c=this.type;if(l!=c){var d=this.editor.getSelection();this.changeType(l);var F=this.editor.getSelection();this.editor._onAction("changeType",{node:this,oldType:c,newType:l,oldSelection:d,newSelection:F})}},h.prototype.sort=function(l){if(this._hasChilds()){var c=l=="desc"?-1:1,d=this.type=="array"?"value":"field";this.hideChilds();var F=this.childs,p=this.sortOrder;this.childs=this.childs.concat(),this.childs.sort(function(f,m){return c*u(f[d],m[d])}),this.sortOrder=c==1?"asc":"desc",this.editor._onAction("sort",{node:this,oldChilds:F,oldSort:p,newChilds:this.childs,newSort:this.sortOrder}),this.showChilds()}},h.prototype.getAppend=function(){return this.append||(this.append=new g(this.editor),this.append.setParent(this)),this.append.getDom()},h.getNodeFromTarget=function(l){for(;l;){if(l.node)return l.node;l=l.parentNode}},h.blurNodes=function(l){if(!Array.isArray(l)){h.blurNodes([l]);return}var c=l[0],d=c.parent,F=c.getIndex();d.childs[F+l.length]?d.childs[F+l.length].focus():d.childs[F-1]?d.childs[F-1].focus():d.focus()},h.prototype._nextSibling=function(){var l=this.parent.childs.indexOf(this);return this.parent.childs[l+1]||this.parent.append},h.prototype._previousNode=function(){var l=null,c=this.getDom();if(c&&c.parentNode){var d=c;do d=d.previousSibling,l=h.getNodeFromTarget(d);while(d&&l instanceof g&&!l.isVisible())}return l},h.prototype._nextNode=function(){var l=null,c=this.getDom();if(c&&c.parentNode){var d=c;do d=d.nextSibling,l=h.getNodeFromTarget(d);while(d&&l instanceof g&&!l.isVisible())}return l},h.prototype._firstNode=function(){var l=null,c=this.getDom();if(c&&c.parentNode){var d=c.parentNode.firstChild;l=h.getNodeFromTarget(d)}return l},h.prototype._lastNode=function(){var l=null,c=this.getDom();if(c&&c.parentNode){var d=c.parentNode.lastChild;for(l=h.getNodeFromTarget(d);d&&l instanceof g&&!l.isVisible();)d=d.previousSibling,l=h.getNodeFromTarget(d)}return l},h.prototype._previousElement=function(l){var c=this.dom;switch(l){case c.value:if(this.fieldEditable)return c.field;case c.field:if(this._hasChilds())return c.expand;case c.expand:return c.menu;case c.menu:if(c.drag)return c.drag;default:return null}},h.prototype._nextElement=function(l){var c=this.dom;switch(l){case c.drag:return c.menu;case c.menu:if(this._hasChilds())return c.expand;case c.expand:if(this.fieldEditable)return c.field;case c.field:if(!this._hasChilds())return c.value;default:return null}},h.prototype._getElementName=function(l){var c=this.dom;for(var d in c)if(c.hasOwnProperty(d)&&c[d]==l)return d;return null},h.prototype._hasChilds=function(){return this.type=="array"||this.type=="object"},h.TYPE_TITLES={auto:'Field type "auto". The field type is automatically determined from the value and can be a string, number, boolean, or null.',object:'Field type "object". An object contains an unordered set of key/value pairs.',array:'Field type "array". An array contains an ordered collection of values.',string:'Field type "string". Field type is not determined from the value, but always returned as string.'},h.prototype.addTemplates=function(l,c){var d=this,F=d.editor.options.templates;if(F!=null){F.length&&l.push({type:"separator"});var p=function(m,v){d._onAppend(m,v)},f=function(m,v){d._onInsertBefore(m,v)};F.forEach(function(m){l.push({text:m.text,className:m.className||"jsoneditor-type-object",title:m.title,click:c?p.bind(this,m.field,m.value):f.bind(this,m.field,m.value)})})}},h.prototype.showContextMenu=function(l,c){var d=this,F=h.TYPE_TITLES,p=[];if(this.editable.value&&p.push({text:"Type",title:"Change the type of this field",className:"jsoneditor-type-"+this.type,submenu:[{text:"Auto",className:"jsoneditor-type-auto"+(this.type=="auto"?" jsoneditor-selected":""),title:F.auto,click:function(){d._onChangeType("auto")}},{text:"Array",className:"jsoneditor-type-array"+(this.type=="array"?" jsoneditor-selected":""),title:F.array,click:function(){d._onChangeType("array")}},{text:"Object",className:"jsoneditor-type-object"+(this.type=="object"?" jsoneditor-selected":""),title:F.object,click:function(){d._onChangeType("object")}},{text:"String",className:"jsoneditor-type-string"+(this.type=="string"?" jsoneditor-selected":""),title:F.string,click:function(){d._onChangeType("string")}}]}),this._hasChilds()){var f=this.sortOrder=="asc"?"desc":"asc";p.push({text:"Sort",title:"Sort the childs of this "+this.type,className:"jsoneditor-sort-"+f,click:function(){d.sort(f)},submenu:[{text:"Ascending",className:"jsoneditor-sort-asc",title:"Sort the childs of this "+this.type+" in ascending order",click:function(){d.sort("asc")}},{text:"Descending",className:"jsoneditor-sort-desc",title:"Sort the childs of this "+this.type+" in descending order",click:function(){d.sort("desc")}}]})}if(this.parent&&this.parent._hasChilds()){p.length&&p.push({type:"separator"});var m=d.parent.childs;if(d==m[m.length-1]){var v=[{text:"Auto",className:"jsoneditor-type-auto",title:F.auto,click:function(){d._onAppend("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:F.array,click:function(){d._onAppend("",[])}},{text:"Object",className:"jsoneditor-type-object",title:F.object,click:function(){d._onAppend("",{})}},{text:"String",className:"jsoneditor-type-string",title:F.string,click:function(){d._onAppend("","","string")}}];d.addTemplates(v,!0),p.push({text:"Append",title:"Append a new field with type 'auto' after this field (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"jsoneditor-append",click:function(){d._onAppend("","","auto")},submenu:v})}var w=[{text:"Auto",className:"jsoneditor-type-auto",title:F.auto,click:function(){d._onInsertBefore("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:F.array,click:function(){d._onInsertBefore("",[])}},{text:"Object",className:"jsoneditor-type-object",title:F.object,click:function(){d._onInsertBefore("",{})}},{text:"String",className:"jsoneditor-type-string",title:F.string,click:function(){d._onInsertBefore("","","string")}}];d.addTemplates(w,!1),p.push({text:"Insert",title:"Insert a new field with type 'auto' before this field (Ctrl+Ins)",submenuTitle:"Select the type of the field to be inserted",className:"jsoneditor-insert",click:function(){d._onInsertBefore("","","auto")},submenu:w}),this.editable.field&&(p.push({text:"Duplicate",title:"Duplicate this field (Ctrl+D)",className:"jsoneditor-duplicate",click:function(){h.onDuplicate(d)}}),p.push({text:"Remove",title:"Remove this field (Ctrl+Del)",className:"jsoneditor-remove",click:function(){h.onRemove(d)}}))}var x=new n(p,{close:c});x.show(l,this.editor.content)},h.prototype._getType=function(l){return l instanceof Array?"array":l instanceof Object?"object":typeof l=="string"&&typeof this._stringCast(l)!="string"?"string":"auto"},h.prototype._stringCast=function(l){var c=l.toLowerCase(),d=Number(l),F=parseFloat(l);return l==""?"":c=="null"?null:c=="true"?!0:c=="false"?!1:!isNaN(d)&&!isNaN(F)?d:l},h.prototype._escapeHTML=function(l){if(typeof l!="string")return String(l);var c=String(l).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/  /g," &nbsp;").replace(/^ /,"&nbsp;").replace(/ $/,"&nbsp;"),d=JSON.stringify(c),F=d.substring(1,d.length-1);return this.editor.options.escapeUnicode===!0&&(F=o.escapeUnicodeChars(F)),F},h.prototype._unescapeHTML=function(l){var c='"'+this._escapeJSON(l)+'"',d=o.parse(c);return d.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;|\u00A0/g," ").replace(/&amp;/g,"&")},h.prototype._escapeJSON=function(l){for(var c="",d=0;d<l.length;){var F=l.charAt(d);F==`
`?c+="\\n":F=="\\"?(c+=F,d++,F=l.charAt(d),(F===""||'"\\/bfnrtu'.indexOf(F)==-1)&&(c+="\\"),c+=F):F=='"'?c+='\\"':c+=F,d++}return c};var g=a(h);i.exports=h},function(i,t){i.exports=function r(u,n){var a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,h=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,g=/^0x[0-9a-f]+$/i,l=/^0/,c=function(y){return r.insensitive&&(""+y).toLowerCase()||""+y},d=c(u).replace(o,"")||"",F=c(n).replace(o,"")||"",p=d.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),f=F.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(d.match(g),16)||p.length!==1&&d.match(h)&&Date.parse(d),v=parseInt(F.match(g),16)||m&&F.match(h)&&Date.parse(F)||null,w,x;if(v){if(m<v)return-1;if(m>v)return 1}for(var A=0,b=Math.max(p.length,f.length);A<b;A++){if(w=!(p[A]||"").match(l)&&parseFloat(p[A])||p[A]||0,x=!(f[A]||"").match(l)&&parseFloat(f[A])||f[A]||0,isNaN(w)!==isNaN(x))return isNaN(w)?1:-1;if(typeof w!=typeof x&&(w+="",x+=""),w<x)return-1;if(w>x)return 1}return 0}},function(i,t,r){var u=r(57),n=r(60);function a(o){function h(g){this.editor=g,this.dom={}}return h.prototype=new o,h.prototype.getDom=function(){var g=this.dom;if(g.tr)return g.tr;this._updateEditability();var l=document.createElement("tr");if(l.node=this,g.tr=l,this.editor.options.mode==="tree"){g.tdDrag=document.createElement("td");var c=document.createElement("td");g.tdMenu=c;var d=document.createElement("button");d.type="button",d.className="jsoneditor-contextmenu",d.title="Click to open the actions menu (Ctrl+M)",g.menu=d,c.appendChild(g.menu)}var F=document.createElement("td"),p=document.createElement("div");return p.innerHTML="(empty)",p.className="jsoneditor-readonly",F.appendChild(p),g.td=F,g.text=p,this.updateDom(),l},h.prototype.updateDom=function(){var g=this.dom,l=g.td;l&&(l.style.paddingLeft=this.getLevel()*24+26+"px");var c=g.text;c&&(c.innerHTML="(empty "+this.parent.type+")");var d=g.tr;this.isVisible()?g.tr.firstChild||(g.tdDrag&&d.appendChild(g.tdDrag),g.tdMenu&&d.appendChild(g.tdMenu),d.appendChild(l)):g.tr.firstChild&&(g.tdDrag&&d.removeChild(g.tdDrag),g.tdMenu&&d.removeChild(g.tdMenu),d.removeChild(l))},h.prototype.isVisible=function(){return this.parent.childs.length==0},h.prototype.showContextMenu=function(g,l){var c=this,d=o.TYPE_TITLES,F=[{text:"Auto",className:"jsoneditor-type-auto",title:d.auto,click:function(){c._onAppend("","","auto")}},{text:"Array",className:"jsoneditor-type-array",title:d.array,click:function(){c._onAppend("",[])}},{text:"Object",className:"jsoneditor-type-object",title:d.object,click:function(){c._onAppend("",{})}},{text:"String",className:"jsoneditor-type-string",title:d.string,click:function(){c._onAppend("","","string")}}];c.addTemplates(F,!0);var p=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"jsoneditor-insert",click:function(){c._onAppend("","","auto")},submenu:F}],f=new n(p,{close:l});f.show(g,this.editor.content)},h.prototype.onEvent=function(g){var l=g.type,c=g.target||g.srcElement,d=this.dom,F=d.menu;if(c==F&&(l=="mouseover"?this.editor.highlighter.highlight(this.parent):l=="mouseout"&&this.editor.highlighter.unhighlight()),l=="click"&&c==d.menu){var p=this.editor.highlighter;p.highlight(this.parent),p.lock(),u.addClassName(d.menu,"jsoneditor-selected"),this.showContextMenu(d.menu,function(){u.removeClassName(d.menu,"jsoneditor-selected"),p.unlock(),p.unhighlight()})}l=="keydown"&&this.onKeyDown(g)},h}i.exports=a},function(i,t,r){var u=r(60);function n(a,o,h,g){for(var l={code:{text:"Code",title:"Switch to code highlighter",click:function(){g("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){g("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){g("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){g("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){g("view")}}},c=[],d=0;d<o.length;d++){var F=o[d],p=l[F];if(!p)throw new Error('Unknown mode "'+F+'"');p.className="jsoneditor-type-modes"+(h==F?" jsoneditor-selected":""),c.push(p)}var f=l[h];if(!f)throw new Error('Unknown mode "'+h+'"');var m=f.text,v=document.createElement("button");v.type="button",v.className="jsoneditor-modes jsoneditor-separator",v.innerHTML=m+" &#x25BE;",v.title="Switch editor mode",v.onclick=function(){var x=new u(c);x.show(v)};var w=document.createElement("div");w.className="jsoneditor-modes",w.style.position="relative",w.appendChild(v),a.appendChild(w),this.dom={container:a,box:v,frame:w}}n.prototype.focus=function(){this.dom.box.focus()},n.prototype.destroy=function(){this.dom&&this.dom.frame&&this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom=null},i.exports=n},function(i,t){function r(u){u=u||{},u.confirmKeys=u.confirmKeys||[39,35,9];var n="",a="",o=document.createElement("div");o.style.position="relative",o.style.outline="0",o.style.border="0",o.style.margin="0",o.style.padding="0";var h=document.createElement("div");h.className="autocomplete dropdown",h.style.position="absolute",h.style.visibility="hidden";var g,l,c=function(w,x){var A=[],b=0,y=-1,k=function(){this.style.outline="1px solid #ddd"},C=function(){this.style.outline="0"},D=function(){T.hide(),T.onmouseselection(this.__hint,T.rs)},T={rs:x,hide:function(){w.style.visibility="hidden"},refresh:function(S,M){w.style.visibility="hidden",b=0,w.innerHTML="";var R=window.innerHeight||document.documentElement.clientHeight,O=w.parentNode.getBoundingClientRect(),H=O.top-6,Y=R-O.bottom-6;A=[];for(var J=0;J<M.length;J++)if(M[J].indexOf(S)===0){var Z=document.createElement("div");Z.className="item",Z.onmouseover=k,Z.onmouseout=C,Z.onmousedown=D,Z.__hint=M[J],Z.innerHTML=S+"<b>"+M[J].substring(S.length)+"</b>",A.push(Z),w.appendChild(Z)}A.length!==0&&(A.length===1&&S===A[0].__hint||A.length<2||(T.highlight(0),H>Y*3?(w.style.maxHeight=H+"px",w.style.top="",w.style.bottom="100%"):(w.style.top="100%",w.style.bottom="",w.style.maxHeight=Y+"px"),w.style.visibility="visible"))},highlight:function(S){y!=-1&&A[y]&&(A[y].className="item"),A[S].className="item hover",y=S},move:function(S){return w.style.visibility==="hidden"?"":(b+S===-1||b+S===A.length||(b+=S,T.highlight(b)),A[b].__hint)},onmouseselection:function(){}};return T};function d(w){var x,A;document.createRange?(x=document.createRange(),x.selectNodeContents(w),x.collapse(!1),A=window.getSelection(),A.removeAllRanges(),A.addRange(x)):document.selection&&(x=document.body.createTextRange(),x.moveToElementText(w),x.collapse(!1),x.select())}function F(w){return g===void 0&&(g=document.createElement("span"),g.style.visibility="hidden",g.style.position="fixed",g.style.outline="0",g.style.margin="0",g.style.padding="0",g.style.border="0",g.style.left="0",g.style.whiteSpace="pre",g.style.fontSize=n,g.style.fontFamily=a,g.style.fontWeight="normal",document.body.appendChild(g)),g.innerHTML=String(w).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),g.getBoundingClientRect().right}var p={onArrowDown:function(){},onArrowUp:function(){},onEnter:function(){},onTab:function(){},startFrom:0,options:[],element:null,elementHint:null,elementStyle:null,wrapper:o,show:function(w,x,A){this.startFrom=x,this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null),n==""&&(n=window.getComputedStyle(w).getPropertyValue("font-size")),a==""&&(a=window.getComputedStyle(w).getPropertyValue("font-family")),w.getBoundingClientRect().right-w.getBoundingClientRect().left,h.style.marginLeft="0",h.style.marginTop=w.getBoundingClientRect().height+"px",this.options=A,this.element!=w&&(this.element=w,this.elementStyle={zIndex:this.element.style.zIndex,position:this.element.style.position,backgroundColor:this.element.style.backgroundColor,borderColor:this.element.style.borderColor}),this.element.style.zIndex=3,this.element.style.position="relative",this.element.style.backgroundColor="transparent",this.element.style.borderColor="transparent",this.elementHint=w.cloneNode(),this.elementHint.className="autocomplete hint",this.elementHint.style.zIndex=2,this.elementHint.style.position="absolute",this.elementHint.onfocus=function(){this.element.focus()}.bind(this),this.element.addEventListener&&(this.element.removeEventListener("keydown",m),this.element.addEventListener("keydown",m,!1),this.element.removeEventListener("blur",v),this.element.addEventListener("blur",v,!1)),o.appendChild(this.elementHint),o.appendChild(h),w.parentElement.appendChild(o),this.repaint(w)},setText:function(w){this.element.innerText=w},getText:function(){return this.element.innerText},hideDropDown:function(){this.wrapper.remove(),this.elementHint&&(this.elementHint.remove(),this.elementHint=null,f.hide(),this.element.style.zIndex=this.elementStyle.zIndex,this.element.style.position=this.elementStyle.position,this.element.style.backgroundColor=this.elementStyle.backgroundColor,this.element.style.borderColor=this.elementStyle.borderColor)},repaint:function(w){var x=w.innerText;x=x.replace(`
`,""),this.startFrom,this.options;var A=this.options.length,b=x.substring(this.startFrom);l=x.substring(0,this.startFrom);for(var y=0;y<A;y++){var k=this.options[y];if(k.indexOf(b)===0){this.elementHint.innerText=l+k;break}}h.style.left=F(l)+"px",f.refresh(b,this.options),this.elementHint.style.width=F(this.elementHint.innerText)+10+"px";var C=h.style.visibility=="hidden";C||(this.elementHint.style.width=F(this.elementHint.innerText)+h.clientWidth+"px")}},f=c(h,p),m=function(w){w=w||window.event;var x=w.keyCode;if(this.elementHint!=null&&x!=33&&x!=34){if(x==27){p.hideDropDown(),p.element.focus(),w.preventDefault(),w.stopPropagation();return}if(u.confirmKeys.indexOf(x)>=0){x==9&&this.elementHint.innerText.length==0&&p.onTab(),this.elementHint.innerText.length>0&&this.element.innerText!=this.elementHint.innerText&&(this.element.innerText=this.elementHint.innerText,p.hideDropDown(),d(this.element),x==9&&(p.element.focus(),w.preventDefault(),w.stopPropagation()));return}if(x==13){if(this.elementHint.innerText.length==0)p.onEnter();else{var A=h.style.visibility=="hidden";if(f.hide(),A){p.hideDropDown(),p.element.focus(),p.onEnter();return}this.element.innerText=this.elementHint.innerText,p.hideDropDown(),d(this.element),w.preventDefault(),w.stopPropagation()}return}if(x==40){var b=f.move(1);b==""&&p.onArrowDown(),this.elementHint.innerText=l+b,w.preventDefault(),w.stopPropagation();return}if(x==38){var b=f.move(-1);b==""&&p.onArrowUp(),this.elementHint.innerText=l+b,w.preventDefault(),w.stopPropagation();return}}}.bind(p),v=function(w){p.hideDropDown()}.bind(p);return f.onmouseselection=function(w,x){x.element.innerText=x.elementHint.innerText=l+w,x.hideDropDown(),window.setTimeout(function(){x.element.focus(),d(x.element)},1)},p}i.exports=r},function(i,t,r){var u=r(67),n=r(64),a=r(57),o={},h=3,g="ace/theme/jsoneditor";o.create=function(l,c){c=c||{},this.options=c,c.indentation?this.indentation=Number(c.indentation):this.indentation=2;var d=c.ace?c.ace:u;if(this.mode=c.mode=="code"?"code":"text",this.mode=="code"&&typeof d>"u"&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=c.theme||g,this.theme===g&&d)try{r(74)}catch(b){console.error(b)}var F=this;this.container=l,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this._debouncedValidate=a.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=l.clientWidth,this.height=l.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(b){b.preventDefault()},this.frame.onkeydown=function(b){F._onKeyDown(b)},this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var p=document.createElement("button");p.type="button",p.className="jsoneditor-format",p.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(p),p.onclick=function(){try{F.format(),F._onChange()}catch(b){F._onError(b)}};var f=document.createElement("button");f.type="button",f.className="jsoneditor-compact",f.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(f),f.onclick=function(){try{F.compact(),F._onChange()}catch(b){F._onError(b)}},this.options&&this.options.modes&&this.options.modes.length&&(this.modeSwitcher=new n(this.menu,this.options.modes,this.options.mode,function(y){F.setMode(y),F.modeSwitcher.focus()}));var m={},v=this.options.onEditable&&typeof(this.options.onEditable==="function")&&!this.options.onEditable(m);if(this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),this.mode=="code"){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var w=d.edit(this.editorDom);w.$blockScrolling=1/0,w.setTheme(this.theme),w.setOptions({readOnly:v}),w.setShowPrintMargin(!1),w.setFontSize(13),w.getSession().setMode("ace/mode/json"),w.getSession().setTabSize(this.indentation),w.getSession().setUseSoftTabs(!0),w.getSession().setUseWrapMode(!0),w.commands.bindKey("Ctrl-L",null),w.commands.bindKey("Command-L",null),this.aceEditor=w,this.hasOwnProperty("editor")||Object.defineProperty(this,"editor",{get:function(){return console.warn('Property "editor" has been renamed to "aceEditor".'),F.aceEditor},set:function(b){console.warn('Property "editor" has been renamed to "aceEditor".'),F.aceEditor=b}});var x=document.createElement("a");x.appendChild(document.createTextNode("powered by ace")),x.href="http://ace.ajax.org",x.target="_blank",x.className="jsoneditor-poweredBy",x.onclick=function(){window.open(x.href,x.target)},this.menu.appendChild(x),w.on("change",this._onChange.bind(this))}else{var A=document.createElement("textarea");A.className="jsoneditor-text",A.spellcheck=!1,this.content.appendChild(A),this.textarea=A,this.textarea.readOnly=v,this.textarea.oninput===null?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this)}this.setSchema(this.options.schema,this.options.schemaRefs)},o._onChange=function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(l){console.error("Error in onChange callback: ",l)}},o._onKeyDown=function(l){var c=l.which||l.keyCode,d=!1;c==220&&l.ctrlKey&&(l.shiftKey?(this.compact(),this._onChange()):(this.format(),this._onChange()),d=!0),d&&(l.preventDefault(),l.stopPropagation())},o.destroy=function(){this.aceEditor&&(this.aceEditor.destroy(),this.aceEditor=null),this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame),this.modeSwitcher&&(this.modeSwitcher.destroy(),this.modeSwitcher=null),this.textarea=null,this._debouncedValidate=null},o.compact=function(){var l=this.get(),c=JSON.stringify(l);this.setText(c)},o.format=function(){var l=this.get(),c=JSON.stringify(l,null,this.indentation);this.setText(c)},o.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},o.resize=function(){if(this.aceEditor){var l=!1;this.aceEditor.resize(l)}},o.set=function(l){this.setText(JSON.stringify(l,null,this.indentation))},o.get=function(){var l=this.getText(),c;try{c=a.parse(l)}catch{l=a.sanitize(l),c=a.parse(l)}return c},o.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},o.setText=function(l){var c;if(this.options.escapeUnicode===!0?c=a.escapeUnicodeChars(l):c=l,this.textarea&&(this.textarea.value=c),this.aceEditor){var d=this.options.onChange;this.options.onChange=null,this.aceEditor.setValue(c,-1),this.options.onChange=d}this.validate()},o.validate=function(){this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.content.style.marginBottom="",this.content.style.paddingBottom="");var l=!1,c=[],d;try{d=this.get(),l=!0}catch{}if(l&&this.validateSchema){var F=this.validateSchema(d);F||(c=this.validateSchema.errors.map(function(x){return a.improveSchemaError(x)}))}if(c.length>0){var p=c.length>h;if(p){c=c.slice(0,h);var f=this.validateSchema.errors.length-h;c.push("("+f+" more errors...)")}var m=document.createElement("div");m.innerHTML='<table class="jsoneditor-text-errors"><tbody>'+c.map(function(x){var A;return typeof x=="string"?A='<td colspan="2"><pre>'+x+"</pre></td>":A="<td>"+x.dataPath+"</td><td>"+x.message+"</td>",'<tr><td><button class="jsoneditor-schema-error"></button></td>'+A+"</tr>"}).join("")+"</tbody></table>",this.dom.validationErrors=m,this.frame.appendChild(m);var v=m.clientHeight;this.content.style.marginBottom=-v+"px",this.content.style.paddingBottom=v+"px"}if(this.aceEditor){var w=!1;this.aceEditor.resize(w)}},i.exports=[{mode:"text",mixin:o,data:"text",load:o.format},{mode:"code",mixin:o,data:"text",load:o.format}]},function(i,t,r){var u;if(window.ace)u=window.ace;else try{u=r(68),r(71),r(73)}catch{}i.exports=u},function(i,t,r){(function(){var u="ace",n=function(){return this}();!n&&typeof window<"u"&&(n=window);var a=function(d,F,p){if(typeof d!="string"){a.original?a.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(p=F),a.modules[d]||(a.payloads[d]=p,a.modules[d]=null)};a.modules={},a.payloads={};var o=function(d,F,p){if(typeof F=="string"){var f=l(d,F);if(f!=null)return p&&p(),f}else if(Object.prototype.toString.call(F)==="[object Array]"){for(var m=[],v=0,w=F.length;v<w;++v){var x=l(d,F[v]);if(x==null&&h.original)return;m.push(x)}return p&&p.apply(null,m)||!0}},h=function(d,F){var p=o("",d,F);return p==null&&h.original?h.original.apply(this,arguments):p},g=function(d,F){if(F.indexOf("!")!==-1){var p=F.split("!");return g(d,p[0])+"!"+g(d,p[1])}if(F.charAt(0)=="."){var f=d.split("/").slice(0,-1).join("/");for(F=f+"/"+F;F.indexOf(".")!==-1&&m!=F;){var m=F;F=F.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return F},l=function(d,F){F=g(d,F);var p=a.modules[F];if(!p){if(p=a.payloads[F],typeof p=="function"){var f={},m={id:F,uri:"",exports:f,packaged:!0},v=function(x,A){return o(F,x,A)},w=p(v,f,m);f=w||m.exports,a.modules[F]=f,delete a.payloads[F]}p=a.modules[F]=f||p}return p};function c(d){var F=n;d&&(n[d]||(n[d]={}),F=n[d]),(!F.define||!F.define.packaged)&&(a.original=F.define,F.define=a,F.define.packaged=!0),(!F.acequire||!F.acequire.packaged)&&(h.original=F.acequire,F.acequire=h,F.acequire.packaged=!0)}c(u)})(),ace.define("ace/lib/regexp",["require","exports","module"],function(u,n,a){var o={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},h=o.exec.call(/()??/,"")[1]===void 0,g=function(){var d=/^/g;return o.test.call(d,""),!d.lastIndex}();if(g&&h)return;RegExp.prototype.exec=function(d){var F=o.exec.apply(this,arguments),p,f;if(typeof d=="string"&&F){if(!h&&F.length>1&&c(F,"")>-1&&(f=RegExp(this.source,o.replace.call(l(this),"g","")),o.replace.call(d.slice(F.index),f,function(){for(var v=1;v<arguments.length-2;v++)arguments[v]===void 0&&(F[v]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var m=1;m<F.length;m++)p=this._xregexp.captureNames[m-1],p&&(F[p]=F[m]);!g&&this.global&&!F[0].length&&this.lastIndex>F.index&&this.lastIndex--}return F},g||(RegExp.prototype.test=function(d){var F=o.exec.call(this,d);return F&&this.global&&!F[0].length&&this.lastIndex>F.index&&this.lastIndex--,!!F});function l(d){return(d.global?"g":"")+(d.ignoreCase?"i":"")+(d.multiline?"m":"")+(d.extended?"x":"")+(d.sticky?"y":"")}function c(d,F,p){if(Array.prototype.indexOf)return d.indexOf(F,p);for(var f=p||0;f<d.length;f++)if(d[f]===F)return f;return-1}}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(u,n,a){function o(){}Function.prototype.bind||(Function.prototype.bind=function(K){var le=this;if(typeof le!="function")throw new TypeError("Function.prototype.bind called on incompatible "+le);var re=c.call(arguments,1),ae=function(){if(this instanceof ae){var ee=le.apply(this,re.concat(c.call(arguments)));return Object(ee)===ee?ee:this}else return le.apply(K,re.concat(c.call(arguments)))};return le.prototype&&(o.prototype=le.prototype,ae.prototype=new o,o.prototype=null),ae});var h=Function.prototype.call,g=Array.prototype,l=Object.prototype,c=g.slice,d=h.bind(l.toString),F=h.bind(l.hasOwnProperty),p,f,m,v,w;if((w=F(l,"__defineGetter__"))&&(p=h.bind(l.__defineGetter__),f=h.bind(l.__defineSetter__),m=h.bind(l.__lookupGetter__),v=h.bind(l.__lookupSetter__)),[1,2].splice(0).length!=2)if(function(){function G(re){var ae=new Array(re+2);return ae[0]=ae[1]=0,ae}var K=[],le;if(K.splice.apply(K,G(20)),K.splice.apply(K,G(26)),le=K.length,K.splice(5,0,"XXX"),le+1==K.length)return!0}()){var x=Array.prototype.splice;Array.prototype.splice=function(G,K){return arguments.length?x.apply(this,[G===void 0?0:G,K===void 0?this.length-G:K].concat(c.call(arguments,2))):[]}}else Array.prototype.splice=function(G,K){var le=this.length;G>0?G>le&&(G=le):G==null?G=0:G<0&&(G=Math.max(le+G,0)),G+K<le||(K=le-G);var re=this.slice(G,G+K),ae=c.call(arguments,2),ee=ae.length;if(G===le)ee&&this.push.apply(this,ae);else{var ce=Math.min(K,le-G),xe=G+ce,Ee=xe+ee-ce,W=le-xe,z=le-ce;if(Ee<xe)for(var $=0;$<W;++$)this[Ee+$]=this[xe+$];else if(Ee>xe)for($=W;$--;)this[Ee+$]=this[xe+$];if(ee&&G===z)this.length=z,this.push.apply(this,ae);else for(this.length=z+ee,$=0;$<ee;++$)this[G+$]=ae[$]}return re};Array.isArray||(Array.isArray=function(K){return d(K)=="[object Array]"});var A=Object("a"),b=A[0]!="a"||!(0 in A);if(Array.prototype.forEach||(Array.prototype.forEach=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=arguments[1],ee=-1,ce=re.length>>>0;if(d(K)!="[object Function]")throw new TypeError;for(;++ee<ce;)ee in re&&K.call(ae,re[ee],ee,le)}),Array.prototype.map||(Array.prototype.map=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0,ee=Array(ae),ce=arguments[1];if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");for(var xe=0;xe<ae;xe++)xe in re&&(ee[xe]=K.call(ce,re[xe],xe,le));return ee}),Array.prototype.filter||(Array.prototype.filter=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0,ee=[],ce,xe=arguments[1];if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");for(var Ee=0;Ee<ae;Ee++)Ee in re&&(ce=re[Ee],K.call(xe,ce,Ee,le)&&ee.push(ce));return ee}),Array.prototype.every||(Array.prototype.every=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0,ee=arguments[1];if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");for(var ce=0;ce<ae;ce++)if(ce in re&&!K.call(ee,re[ce],ce,le))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0,ee=arguments[1];if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");for(var ce=0;ce<ae;ce++)if(ce in re&&K.call(ee,re[ce],ce,le))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0;if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");if(!ae&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var ee=0,ce;if(arguments.length>=2)ce=arguments[1];else do{if(ee in re){ce=re[ee++];break}if(++ee>=ae)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;ee<ae;ee++)ee in re&&(ce=K.call(void 0,ce,re[ee],ee,le));return ce}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(K){var le=ne(this),re=b&&d(this)=="[object String]"?this.split(""):le,ae=re.length>>>0;if(d(K)!="[object Function]")throw new TypeError(K+" is not a function");if(!ae&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var ee,ce=ae-1;if(arguments.length>=2)ee=arguments[1];else do{if(ce in re){ee=re[ce--];break}if(--ce<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do ce in this&&(ee=K.call(void 0,ee,re[ce],ce,le));while(ce--);return ee}),(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)&&(Array.prototype.indexOf=function(K){var le=b&&d(this)=="[object String]"?this.split(""):ne(this),re=le.length>>>0;if(!re)return-1;var ae=0;for(arguments.length>1&&(ae=ue(arguments[1])),ae=ae>=0?ae:Math.max(0,re+ae);ae<re;ae++)if(ae in le&&le[ae]===K)return ae;return-1}),(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)&&(Array.prototype.lastIndexOf=function(K){var le=b&&d(this)=="[object String]"?this.split(""):ne(this),re=le.length>>>0;if(!re)return-1;var ae=re-1;for(arguments.length>1&&(ae=Math.min(ae,ue(arguments[1]))),ae=ae>=0?ae:re-Math.abs(ae);ae>=0;ae--)if(ae in le&&K===le[ae])return ae;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(K){return K.__proto__||(K.constructor?K.constructor.prototype:l)}),!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(K,le){if(typeof K!="object"&&typeof K!="function"||K===null)throw new TypeError(y+K);if(F(K,le)){var re,ae,ee;if(re={enumerable:!0,configurable:!0},w){var ce=K.__proto__;K.__proto__=l;var ae=m(K,le),ee=v(K,le);if(K.__proto__=ce,ae||ee)return ae&&(re.get=ae),ee&&(re.set=ee),re}return re.value=K[le],re}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(K){return Object.keys(K)}),!Object.create){var k;Object.prototype.__proto__===null?k=function(){return{__proto__:null}}:k=function(){var G={};for(var K in G)G[K]=null;return G.constructor=G.hasOwnProperty=G.propertyIsEnumerable=G.isPrototypeOf=G.toLocaleString=G.toString=G.valueOf=G.__proto__=null,G},Object.create=function(K,le){var re;if(K===null)re=k();else{if(typeof K!="object")throw new TypeError("typeof prototype["+typeof K+"] != 'object'");var ae=function(){};ae.prototype=K,re=new ae,re.__proto__=K}return le!==void 0&&Object.defineProperties(re,le),re}}function C(G){try{return Object.defineProperty(G,"sentinel",{}),"sentinel"in G}catch{}}if(Object.defineProperty){var D=C({}),T=typeof document>"u"||C(document.createElement("div"));if(!D||!T)var S=Object.defineProperty}if(!Object.defineProperty||S){var M="Property description must be an object: ",R="Object.defineProperty called on non-object: ",O="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(K,le,re){if(typeof K!="object"&&typeof K!="function"||K===null)throw new TypeError(R+K);if(typeof re!="object"&&typeof re!="function"||re===null)throw new TypeError(M+re);if(S)try{return S.call(Object,K,le,re)}catch{}if(F(re,"value"))if(w&&(m(K,le)||v(K,le))){var ae=K.__proto__;K.__proto__=l,delete K[le],K[le]=re.value,K.__proto__=ae}else K[le]=re.value;else{if(!w)throw new TypeError(O);F(re,"get")&&p(K,le,re.get),F(re,"set")&&f(K,le,re.set)}return K}}Object.defineProperties||(Object.defineProperties=function(K,le){for(var re in le)F(le,re)&&Object.defineProperty(K,re,le[re]);return K}),Object.seal||(Object.seal=function(K){return K}),Object.freeze||(Object.freeze=function(K){return K});try{Object.freeze(function(){})}catch{Object.freeze=function(le){return function(ae){return typeof ae=="function"?ae:le(ae)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(K){return K}),Object.isSealed||(Object.isSealed=function(K){return!1}),Object.isFrozen||(Object.isFrozen=function(K){return!1}),Object.isExtensible||(Object.isExtensible=function(K){if(Object(K)===K)throw new TypeError;for(var le="";F(K,le);)le+="?";K[le]=!0;var re=F(K,le);return delete K[le],re}),!Object.keys){var H=!0,Y=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],J=Y.length;for(var Z in{toString:null})H=!1;Object.keys=function(K){if(typeof K!="object"&&typeof K!="function"||K===null)throw new TypeError("Object.keys called on a non-object");var le=[];for(var re in K)F(K,re)&&le.push(re);if(H)for(var ae=0,ee=J;ae<ee;ae++){var ce=Y[ae];F(K,ce)&&le.push(ce)}return le}}Date.now||(Date.now=function(){return new Date().getTime()});var te=`	
\v\f\r   ᠎             　\u2028\u2029\uFEFF`;if(!String.prototype.trim||te.trim()){te="["+te+"]";var ie=new RegExp("^"+te+te+"*"),se=new RegExp(te+te+"*$");String.prototype.trim=function(){return String(this).replace(ie,"").replace(se,"")}}function ue(G){return G=+G,G!==G?G=0:G!==0&&G!==1/0&&G!==-(1/0)&&(G=(G>0||-1)*Math.floor(Math.abs(G))),G}var ne=function(G){if(G==null)throw new TypeError("can't convert "+G+" to object");return Object(G)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(u,n,a){u("./regexp"),u("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(u,n,a){var o="http://www.w3.org/1999/xhtml";if(n.getDocumentHead=function(h){return h||(h=document),h.head||h.getElementsByTagName("head")[0]||h.documentElement},n.createElement=function(h,g){return document.createElementNS?document.createElementNS(g||o,h):document.createElement(h)},n.hasCssClass=function(h,g){var l=(h.className+"").split(/\s+/g);return l.indexOf(g)!==-1},n.addCssClass=function(h,g){n.hasCssClass(h,g)||(h.className+=" "+g)},n.removeCssClass=function(h,g){for(var l=h.className.split(/\s+/g);;){var c=l.indexOf(g);if(c==-1)break;l.splice(c,1)}h.className=l.join(" ")},n.toggleCssClass=function(h,g){for(var l=h.className.split(/\s+/g),c=!0;;){var d=l.indexOf(g);if(d==-1)break;c=!1,l.splice(d,1)}return c&&l.push(g),h.className=l.join(" "),c},n.setCssClass=function(h,g,l){l?n.addCssClass(h,g):n.removeCssClass(h,g)},n.hasCssString=function(h,g){var l=0,c;if(g=g||document,g.createStyleSheet&&(c=g.styleSheets)){for(;l<c.length;)if(c[l++].owningElement.id===h)return!0}else if(c=g.getElementsByTagName("style")){for(;l<c.length;)if(c[l++].id===h)return!0}return!1},n.importCssString=function(g,l,c){if(c=c||document,l&&n.hasCssString(l,c))return null;var d;l&&(g+=`
/*# sourceURL=ace/css/`+l+" */"),c.createStyleSheet?(d=c.createStyleSheet(),d.cssText=g,l&&(d.owningElement.id=l)):(d=n.createElement("style"),d.appendChild(c.createTextNode(g)),l&&(d.id=l),n.getDocumentHead(c).appendChild(d))},n.importCssStylsheet=function(h,g){if(g.createStyleSheet)g.createStyleSheet(h);else{var l=n.createElement("link");l.rel="stylesheet",l.href=h,n.getDocumentHead(g).appendChild(l)}},n.getInnerWidth=function(h){return parseInt(n.computedStyle(h,"paddingLeft"),10)+parseInt(n.computedStyle(h,"paddingRight"),10)+h.clientWidth},n.getInnerHeight=function(h){return parseInt(n.computedStyle(h,"paddingTop"),10)+parseInt(n.computedStyle(h,"paddingBottom"),10)+h.clientHeight},n.scrollbarWidth=function(h){var g=n.createElement("ace_inner");g.style.width="100%",g.style.minWidth="0px",g.style.height="200px",g.style.display="block";var l=n.createElement("ace_outer"),c=l.style;c.position="absolute",c.left="-10000px",c.overflow="hidden",c.width="200px",c.minWidth="0px",c.height="150px",c.display="block",l.appendChild(g);var d=h.documentElement;d.appendChild(l);var F=g.offsetWidth;c.overflow="scroll";var p=g.offsetWidth;return F==p&&(p=l.clientWidth),d.removeChild(l),F-p},typeof document>"u"){n.importCssString=function(){};return}window.pageYOffset!==void 0?(n.getPageScrollTop=function(){return window.pageYOffset},n.getPageScrollLeft=function(){return window.pageXOffset}):(n.getPageScrollTop=function(){return document.body.scrollTop},n.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?n.computedStyle=function(h,g){return g?(window.getComputedStyle(h,"")||{})[g]||"":window.getComputedStyle(h,"")||{}}:n.computedStyle=function(h,g){return g?h.currentStyle[g]:h.currentStyle},n.setInnerHtml=function(h,g){var l=h.cloneNode(!1);return l.innerHTML=g,h.parentNode.replaceChild(l,h),l},"textContent"in document.documentElement?(n.setInnerText=function(h,g){h.textContent=g},n.getInnerText=function(h){return h.textContent}):(n.setInnerText=function(h,g){h.innerText=g},n.getInnerText=function(h){return h.innerText}),n.getParentWindow=function(h){return h.defaultView||h.parentWindow}}),ace.define("ace/lib/oop",["require","exports","module"],function(u,n,a){n.inherits=function(o,h){o.super_=h,o.prototype=Object.create(h.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(o,h){for(var g in h)o[g]=h[g];return o},n.implement=function(o,h){n.mixin(o,h)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(u,n,a){u("./fixoldbrowsers");var o=u("./oop"),h=function(){var g={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},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:"*"}},l,c;for(c in g.FUNCTION_KEYS)l=g.FUNCTION_KEYS[c].toLowerCase(),g[l]=parseInt(c,10);for(c in g.PRINTABLE_KEYS)l=g.PRINTABLE_KEYS[c].toLowerCase(),g[l]=parseInt(c,10);return o.mixin(g,g.MODIFIER_KEYS),o.mixin(g,g.PRINTABLE_KEYS),o.mixin(g,g.FUNCTION_KEYS),g.enter=g.return,g.escape=g.esc,g.del=g.delete,g[173]="-",function(){for(var d=["cmd","ctrl","alt","shift"],F=Math.pow(2,d.length);F--;)g.KEY_MODS[F]=d.filter(function(p){return F&g.KEY_MODS[p]}).join("-")+"-"}(),g.KEY_MODS[0]="",g.KEY_MODS[-1]="input-",g}();o.mixin(n,h),n.keyCodeToString=function(g){var l=h[g];return typeof l!="string"&&(l=String.fromCharCode(g)),l.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(u,n,a){if(n.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},n.getOS=function(){return n.isMac?n.OS.MAC:n.isLinux?n.OS.LINUX:n.OS.WINDOWS},typeof navigator=="object"){var o=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),h=navigator.userAgent;n.isWin=o=="win",n.isMac=o=="mac",n.isLinux=o=="linux",n.isIE=navigator.appName=="Microsoft Internet Explorer"||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((h.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((h.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),n.isOldIE=n.isIE&&n.isIE<9,n.isGecko=n.isMozilla=(window.Controllers||window.controllers)&&window.navigator.product==="Gecko",n.isOldGecko=n.isGecko&&parseInt((h.match(/rv:(\d+)/)||[])[1],10)<4,n.isOpera=window.opera&&Object.prototype.toString.call(window.opera)=="[object Opera]",n.isWebKit=parseFloat(h.split("WebKit/")[1])||void 0,n.isChrome=parseFloat(h.split(" Chrome/")[1])||void 0,n.isAIR=h.indexOf("AdobeAIR")>=0,n.isIPad=h.indexOf("iPad")>=0,n.isTouchPad=h.indexOf("TouchPad")>=0,n.isChromeOS=h.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(u,n,a){var o=u("./keys"),h=u("./useragent"),g=null,l=0;n.addListener=function(f,m,v){if(f.addEventListener)return f.addEventListener(m,v,!1);if(f.attachEvent){var w=function(){v.call(f,window.event)};v._wrapper=w,f.attachEvent("on"+m,w)}},n.removeListener=function(f,m,v){if(f.removeEventListener)return f.removeEventListener(m,v,!1);f.detachEvent&&f.detachEvent("on"+m,v._wrapper||v)},n.stopEvent=function(f){return n.stopPropagation(f),n.preventDefault(f),!1},n.stopPropagation=function(f){f.stopPropagation?f.stopPropagation():f.cancelBubble=!0},n.preventDefault=function(f){f.preventDefault?f.preventDefault():f.returnValue=!1},n.getButton=function(f){return f.type=="dblclick"?0:f.type=="contextmenu"||h.isMac&&f.ctrlKey&&!f.altKey&&!f.shiftKey?2:f.preventDefault?f.button:{1:0,2:2,4:1}[f.button]},n.capture=function(f,m,v){function w(x){m&&m(x),v&&v(x),n.removeListener(document,"mousemove",m,!0),n.removeListener(document,"mouseup",w,!0),n.removeListener(document,"dragstart",w,!0)}return n.addListener(document,"mousemove",m,!0),n.addListener(document,"mouseup",w,!0),n.addListener(document,"dragstart",w,!0),w},n.addTouchMoveListener=function(f,m){if("ontouchmove"in f){var v,w;n.addListener(f,"touchstart",function(x){var A=x.changedTouches[0];v=A.clientX,w=A.clientY}),n.addListener(f,"touchmove",function(x){var A=1,b=x.changedTouches[0];x.wheelX=-(b.clientX-v)/A,x.wheelY=-(b.clientY-w)/A,v=b.clientX,w=b.clientY,m(x)})}},n.addMouseWheelListener=function(f,m){"onmousewheel"in f?n.addListener(f,"mousewheel",function(v){var w=8;v.wheelDeltaX!==void 0?(v.wheelX=-v.wheelDeltaX/w,v.wheelY=-v.wheelDeltaY/w):(v.wheelX=0,v.wheelY=-v.wheelDelta/w),m(v)}):"onwheel"in f?n.addListener(f,"wheel",function(v){var w=.35;switch(v.deltaMode){case v.DOM_DELTA_PIXEL:v.wheelX=v.deltaX*w||0,v.wheelY=v.deltaY*w||0;break;case v.DOM_DELTA_LINE:case v.DOM_DELTA_PAGE:v.wheelX=(v.deltaX||0)*5,v.wheelY=(v.deltaY||0)*5;break}m(v)}):n.addListener(f,"DOMMouseScroll",function(v){v.axis&&v.axis==v.HORIZONTAL_AXIS?(v.wheelX=(v.detail||0)*5,v.wheelY=0):(v.wheelX=0,v.wheelY=(v.detail||0)*5),m(v)})},n.addMultiMouseDownListener=function(f,m,v,w){var x=0,A,b,y,k={2:"dblclick",3:"tripleclick",4:"quadclick"};function C(T){if(n.getButton(T)!==0?x=0:T.detail>1?(x++,x>4&&(x=1)):x=1,h.isIE){var S=Math.abs(T.clientX-A)>5||Math.abs(T.clientY-b)>5;(!y||S)&&(x=1),y&&clearTimeout(y),y=setTimeout(function(){y=null},m[x-1]||600),x==1&&(A=T.clientX,b=T.clientY)}if(T._clicks=x,v[w]("mousedown",T),x>4)x=0;else if(x>1)return v[w](k[x],T)}function D(T){x=2,y&&clearTimeout(y),y=setTimeout(function(){y=null},m[x-1]||600),v[w]("mousedown",T),v[w](k[x],T)}Array.isArray(f)||(f=[f]),f.forEach(function(T){n.addListener(T,"mousedown",C),h.isOldIE&&n.addListener(T,"dblclick",D)})};var c=h.isMac&&h.isOpera&&!("KeyboardEvent"in window)?function(f){return 0|(f.metaKey?1:0)|(f.altKey?2:0)|(f.shiftKey?4:0)|(f.ctrlKey?8:0)}:function(f){return 0|(f.ctrlKey?1:0)|(f.altKey?2:0)|(f.shiftKey?4:0)|(f.metaKey?8:0)};n.getModifierString=function(f){return o.KEY_MODS[c(f)]};function d(f,m,v){var w=c(m);if(!h.isMac&&g){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(w|=8),g.altGr)if((3&w)!=3)g.altGr=0;else return;if(v===18||v===17){var x="location"in m?m.location:m.keyLocation;if(v===17&&x===1)g[v]==1&&(l=m.timeStamp);else if(v===18&&w===3&&x===2){var A=m.timeStamp-l;A<50&&(g.altGr=!0)}}}if(v in o.MODIFIER_KEYS&&(v=-1),w&8&&v>=91&&v<=93&&(v=-1),!w&&v===13){var x="location"in m?m.location:m.keyLocation;if(x===3&&(f(m,w,-v),m.defaultPrevented))return}if(h.isChromeOS&&w&8){if(f(m,w,v),m.defaultPrevented)return;w&=-9}return!w&&!(v in o.FUNCTION_KEYS)&&!(v in o.PRINTABLE_KEYS)?!1:f(m,w,v)}n.addCommandKeyListener=function(f,m){var v=n.addListener;if(h.isOldGecko||h.isOpera&&!("KeyboardEvent"in window)){var w=null;v(f,"keydown",function(A){w=A.keyCode}),v(f,"keypress",function(A){return d(m,A,w)})}else{var x=null;v(f,"keydown",function(A){g[A.keyCode]=(g[A.keyCode]||0)+1;var b=d(m,A,A.keyCode);return x=A.defaultPrevented,b}),v(f,"keypress",function(A){x&&(A.ctrlKey||A.altKey||A.shiftKey||A.metaKey)&&(n.stopEvent(A),x=null)}),v(f,"keyup",function(A){g[A.keyCode]=null}),g||(F(),v(window,"focus",F))}};function F(){g=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!h.isOldIE){var p=1;n.nextTick=function(f,m){m=m||window;var v="zero-timeout-message-"+p;n.addListener(m,"message",function w(x){x.data==v&&(n.stopPropagation(x),n.removeListener(m,"message",w),f())}),m.postMessage(v,"*")}}n.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),n.nextFrame?n.nextFrame=n.nextFrame.bind(window):n.nextFrame=function(f){setTimeout(f,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(u,n,a){n.last=function(g){return g[g.length-1]},n.stringReverse=function(g){return g.split("").reverse().join("")},n.stringRepeat=function(g,l){for(var c="";l>0;)l&1&&(c+=g),(l>>=1)&&(g+=g);return c};var o=/^\s\s*/,h=/\s\s*$/;n.stringTrimLeft=function(g){return g.replace(o,"")},n.stringTrimRight=function(g){return g.replace(h,"")},n.copyObject=function(g){var l={};for(var c in g)l[c]=g[c];return l},n.copyArray=function(g){for(var l=[],c=0,d=g.length;c<d;c++)g[c]&&typeof g[c]=="object"?l[c]=this.copyObject(g[c]):l[c]=g[c];return l},n.deepCopy=function g(l){if(typeof l!="object"||!l)return l;var c;if(Array.isArray(l)){c=[];for(var d=0;d<l.length;d++)c[d]=g(l[d]);return c}if(Object.prototype.toString.call(l)!=="[object Object]")return l;c={};for(var d in l)c[d]=g(l[d]);return c},n.arrayToMap=function(g){for(var l={},c=0;c<g.length;c++)l[g[c]]=1;return l},n.createMap=function(g){var l=Object.create(null);for(var c in g)l[c]=g[c];return l},n.arrayRemove=function(g,l){for(var c=0;c<=g.length;c++)l===g[c]&&g.splice(c,1)},n.escapeRegExp=function(g){return g.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},n.escapeHTML=function(g){return g.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},n.getMatchOffsets=function(g,l){var c=[];return g.replace(l,function(d){c.push({offset:arguments[arguments.length-2],length:d.length})}),c},n.deferredCall=function(g){var l=null,c=function(){l=null,g()},d=function(F){return d.cancel(),l=setTimeout(c,F||0),d};return d.schedule=d,d.call=function(){return this.cancel(),g(),d},d.cancel=function(){return clearTimeout(l),l=null,d},d.isPending=function(){return l},d},n.delayedCall=function(g,l){var c=null,d=function(){c=null,g()},F=function(p){c==null&&(c=setTimeout(d,p||l))};return F.delay=function(p){c&&clearTimeout(c),c=setTimeout(d,p||l)},F.schedule=F,F.call=function(){this.cancel(),g()},F.cancel=function(){c&&clearTimeout(c),c=null},F.isPending=function(){return c},F}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang"],function(u,n,a){var o=u("../lib/event"),h=u("../lib/useragent"),g=u("../lib/dom"),l=u("../lib/lang"),c=h.isChrome<18,d=h.isIE,F=function(p,f){var m=g.createElement("textarea");m.className="ace_text-input",h.isTouchPad&&m.setAttribute("x-palm-disable-auto-cap",!0),m.setAttribute("wrap","off"),m.setAttribute("autocorrect","off"),m.setAttribute("autocapitalize","off"),m.setAttribute("spellcheck",!1),m.style.opacity="0",h.isOldIE&&(m.style.top="-1000px"),p.insertBefore(m,p.firstChild);var v="",w=!1,x=!1,A=!1,b="",y=!0;try{var k=document.activeElement===m}catch{}o.addListener(m,"blur",function(z){f.onBlur(z),k=!1}),o.addListener(m,"focus",function(z){k=!0,f.onFocus(z),T()}),this.focus=function(){if(b)return m.focus();var z=m.style.top;m.style.position="fixed",m.style.top="0px",m.focus(),setTimeout(function(){m.style.position="",m.style.top=="0px"&&(m.style.top=z)},0)},this.blur=function(){m.blur()},this.isFocused=function(){return k};var C=l.delayedCall(function(){k&&T(y)}),D=l.delayedCall(function(){A||(m.value=v,k&&T())});function T(z){if(!A){if(A=!0,Z)$=0,P=z?0:m.value.length-1;else var $=z?2:1,P=2;try{m.setSelectionRange($,P)}catch{}A=!1}}function S(){A||(m.value=v,h.isWebKit&&D.schedule())}h.isWebKit||f.addEventListener("changeSelection",function(){f.selection.isEmpty()!=y&&(y=!y,C.schedule())}),S(),k&&f.onFocus();var M=function(z){return z.selectionStart===0&&z.selectionEnd===z.value.length};if(!m.setSelectionRange&&m.createTextRange&&(m.setSelectionRange=function(z,$){var P=this.createTextRange();P.collapse(!0),P.moveStart("character",z),P.moveEnd("character",$),P.select()},M=function(z){try{var $=z.ownerDocument.selection.createRange()}catch{}return!$||$.parentElement()!=z?!1:$.text==z.value}),h.isOldIE){var R=!1,O=function(z){if(!R){var $=m.value;if(!(A||!$||$==v)){if(z&&$==v[0])return H.schedule();ie($),R=!0,S(),R=!1}}},H=l.delayedCall(O);o.addListener(m,"propertychange",O);var Y={13:1,27:1};o.addListener(m,"keyup",function(z){if(A&&(!m.value||Y[z.keyCode])&&setTimeout(ee,0),(m.value.charCodeAt(0)||0)<129)return H.call();A?ae():re()}),o.addListener(m,"keydown",function(z){H.schedule(50)})}var J=function(z){w?w=!1:M(m)?(f.selectAll(),T()):Z&&T(f.selection.isEmpty())},Z=null;this.setInputHandler=function(z){Z=z},this.getInputHandler=function(){return Z};var te=!1,ie=function(z){Z&&(z=Z(z),Z=null),x?(T(),z&&f.onPaste(z),x=!1):z==v.charAt(0)?te?f.execCommand("del",{source:"ace"}):f.execCommand("backspace",{source:"ace"}):(z.substring(0,2)==v?z=z.substr(2):z.charAt(0)==v.charAt(0)?z=z.substr(1):z.charAt(z.length-1)==v.charAt(0)&&(z=z.slice(0,-1)),z.charAt(z.length-1)==v.charAt(0)&&(z=z.slice(0,-1)),z&&f.onTextInput(z)),te&&(te=!1)},se=function(z){if(!A){var $=m.value;ie($),S()}},ue=function(z,$,P){var B=z.clipboardData||window.clipboardData;if(!(!B||c)){var X=d||P?"Text":"text/plain";try{return $?B.setData(X,$)!==!1:B.getData(X)}catch(oe){if(!P)return ue(oe,$,!0)}}},ne=function(z,$){var P=f.getCopyText();if(!P)return o.preventDefault(z);ue(z,P)?($?f.onCut():f.onCopy(),o.preventDefault(z)):(w=!0,m.value=P,m.select(),setTimeout(function(){w=!1,S(),T(),$?f.onCut():f.onCopy()}))},G=function(z){ne(z,!0)},K=function(z){ne(z,!1)},le=function(z){var $=ue(z);typeof $=="string"?($&&f.onPaste($,z),h.isIE&&setTimeout(T),o.preventDefault(z)):(m.value="",x=!0)};o.addCommandKeyListener(m,f.onCommandKey.bind(f)),o.addListener(m,"select",J),o.addListener(m,"input",se),o.addListener(m,"cut",G),o.addListener(m,"copy",K),o.addListener(m,"paste",le),(!("oncut"in m)||!("oncopy"in m)||!("onpaste"in m))&&o.addListener(p,"keydown",function(z){if(!(h.isMac&&!z.metaKey||!z.ctrlKey))switch(z.keyCode){case 67:K(z);break;case 86:le(z);break;case 88:G(z);break}});var re=function(z){A||!f.onCompositionStart||f.$readOnly||(A={},A.canUndo=f.session.$undoManager,f.onCompositionStart(),setTimeout(ae,0),f.on("mousedown",ee),A.canUndo&&!f.selection.isEmpty()&&(f.insert(""),f.session.markUndoGroup(),f.selection.clearSelection()),f.session.markUndoGroup())},ae=function(){if(!(!A||!f.onCompositionUpdate||f.$readOnly)){var z=m.value.replace(/\x01/g,"");if(A.lastValue!==z&&(f.onCompositionUpdate(z),A.lastValue&&f.undo(),A.canUndo&&(A.lastValue=z),A.lastValue)){var $=f.selection.getRange();f.insert(A.lastValue),f.session.markUndoGroup(),A.range=f.selection.getRange(),f.selection.setRange($),f.selection.clearSelection()}}},ee=function(z){if(!(!f.onCompositionEnd||f.$readOnly)){var $=A;A=!1;var P=setTimeout(function(){P=null;var B=m.value.replace(/\x01/g,"");A||(B==$.lastValue?S():!$.lastValue&&B&&(S(),ie(B)))});Z=function(X){return P&&clearTimeout(P),X=X.replace(/\x01/g,""),X==$.lastValue?"":($.lastValue&&P&&f.undo(),X)},f.onCompositionEnd(),f.removeListener("mousedown",ee),z.type=="compositionend"&&$.range&&f.selection.setRange($.range),h.isChrome&&h.isChrome>=53&&se()}},ce=l.delayedCall(ae,50);o.addListener(m,"compositionstart",re),h.isGecko?o.addListener(m,"text",function(){ce.schedule()}):(o.addListener(m,"keyup",function(){ce.schedule()}),o.addListener(m,"keydown",function(){ce.schedule()})),o.addListener(m,"compositionend",ee),this.getElement=function(){return m},this.setReadOnly=function(z){m.readOnly=z},this.onContextMenu=function(z){te=!0,T(f.selection.isEmpty()),f._emit("nativecontextmenu",{target:f,domEvent:z}),this.moveToMouse(z,!0)},this.moveToMouse=function(z,$){if(!(!$&&h.isOldIE)){b||(b=m.style.cssText),m.style.cssText=($?"z-index:100000;":"")+"height:"+m.style.height+";"+(h.isIE?"opacity:0.1;":"");var P=f.container.getBoundingClientRect(),B=g.computedStyle(f.container),X=P.top+(parseInt(B.borderTopWidth)||0),oe=P.left+(parseInt(P.borderLeftWidth)||0),we=P.bottom-X-m.clientHeight-2,ye=function(Te){m.style.left=Te.clientX-oe-2+"px",m.style.top=Math.min(Te.clientY-X-2,we)+"px"};ye(z),z.type=="mousedown"&&(f.renderer.$keepTextAreaAtCursor&&(f.renderer.$keepTextAreaAtCursor=null),clearTimeout(xe),h.isWin&&!h.isOldIE&&o.capture(f.container,ye,Ee))}},this.onContextMenuClose=Ee;var xe;function Ee(){clearTimeout(xe),xe=setTimeout(function(){b&&(m.style.cssText=b,b=""),f.renderer.$keepTextAreaAtCursor==null&&(f.renderer.$keepTextAreaAtCursor=!0,f.renderer.$moveTextAreaToCursor())},h.isOldIE?200:0)}var W=function(z){f.textInput.onContextMenu(z),Ee()};o.addListener(m,"mouseup",W),o.addListener(m,"mousedown",function(z){z.preventDefault(),Ee()}),o.addListener(f.renderer.scroller,"contextmenu",W),o.addListener(m,"contextmenu",W)};n.TextInput=F}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(u,n,a){u("../lib/dom"),u("../lib/event"),u("../lib/useragent");var o=0;function h(c){c.$clickSelection=null;var d=c.editor;d.setDefaultHandler("mousedown",this.onMouseDown.bind(c)),d.setDefaultHandler("dblclick",this.onDoubleClick.bind(c)),d.setDefaultHandler("tripleclick",this.onTripleClick.bind(c)),d.setDefaultHandler("quadclick",this.onQuadClick.bind(c)),d.setDefaultHandler("mousewheel",this.onMouseWheel.bind(c)),d.setDefaultHandler("touchmove",this.onTouchMove.bind(c));var F=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];F.forEach(function(p){c[p]=this[p]},this),c.selectByLines=this.extendSelectionBy.bind(c,"getLineRange"),c.selectByWords=this.extendSelectionBy.bind(c,"getWordRange")}(function(){this.onMouseDown=function(c){var d=c.inSelection(),F=c.getDocumentPosition();this.mousedownEvent=c;var p=this.editor,f=c.getButton();if(f!==0){var m=p.getSelectionRange(),v=m.isEmpty();p.$blockScrolling++,(v||f==1)&&p.selection.moveToPosition(F),p.$blockScrolling--,f==2&&p.textInput.onContextMenu(c.domEvent);return}if(this.mousedownEvent.time=Date.now(),d&&!p.isFocused()&&(p.focus(),this.$focusTimout&&!this.$clickSelection&&!p.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(c);return}return this.captureMouse(c),this.startSelect(F,c.domEvent._clicks>1),c.preventDefault()},this.startSelect=function(c,d){c=c||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var F=this.editor;F.$blockScrolling++,this.mousedownEvent.getShiftKey()?F.selection.selectToPosition(c):d||F.selection.moveToPosition(c),d||this.select(),F.renderer.scroller.setCapture&&F.renderer.scroller.setCapture(),F.setStyle("ace_selecting"),this.setState("select"),F.$blockScrolling--},this.select=function(){var c,d=this.editor,F=d.renderer.screenToTextCoordinates(this.x,this.y);if(d.$blockScrolling++,this.$clickSelection){var p=this.$clickSelection.comparePoint(F);if(p==-1)c=this.$clickSelection.end;else if(p==1)c=this.$clickSelection.start;else{var f=l(this.$clickSelection,F);F=f.cursor,c=f.anchor}d.selection.setSelectionAnchor(c.row,c.column)}d.selection.selectToPosition(F),d.$blockScrolling--,d.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(c){var d,F=this.editor,p=F.renderer.screenToTextCoordinates(this.x,this.y),f=F.selection[c](p.row,p.column);if(F.$blockScrolling++,this.$clickSelection){var m=this.$clickSelection.comparePoint(f.start),v=this.$clickSelection.comparePoint(f.end);if(m==-1&&v<=0)d=this.$clickSelection.end,(f.end.row!=p.row||f.end.column!=p.column)&&(p=f.start);else if(v==1&&m>=0)d=this.$clickSelection.start,(f.start.row!=p.row||f.start.column!=p.column)&&(p=f.end);else if(m==-1&&v==1)p=f.end,d=f.start;else{var w=l(this.$clickSelection,p);p=w.cursor,d=w.anchor}F.selection.setSelectionAnchor(d.row,d.column)}F.selection.selectToPosition(p),F.$blockScrolling--,F.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(){var c=g(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),d=Date.now();(c>o||d-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(c){var d=c.getDocumentPosition(),F=this.editor,p=F.session,f=p.getBracketRange(d);f?(f.isEmpty()&&(f.start.column--,f.end.column++),this.setState("select")):(f=F.selection.getWordRange(d.row,d.column),this.setState("selectByWords")),this.$clickSelection=f,this.select()},this.onTripleClick=function(c){var d=c.getDocumentPosition(),F=this.editor;this.setState("selectByLines");var p=F.getSelectionRange();p.isMultiLine()&&p.contains(d.row,d.column)?(this.$clickSelection=F.selection.getLineRange(p.start.row),this.$clickSelection.end=F.selection.getLineRange(p.end.row).end):this.$clickSelection=F.selection.getLineRange(d.row),this.select()},this.onQuadClick=function(c){var d=this.editor;d.selectAll(),this.$clickSelection=d.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(c){if(!c.getAccelKey()){c.getShiftKey()&&c.wheelY&&!c.wheelX&&(c.wheelX=c.wheelY,c.wheelY=0);var d=c.domEvent.timeStamp,F=d-(this.$lastScrollTime||0),p=this.editor,f=p.renderer.isScrollableBy(c.wheelX*c.speed,c.wheelY*c.speed);if(f||F<200)return this.$lastScrollTime=d,p.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}},this.onTouchMove=function(c){var d=c.domEvent.timeStamp,F=d-(this.$lastScrollTime||0),p=this.editor,f=p.renderer.isScrollableBy(c.wheelX*c.speed,c.wheelY*c.speed);if(f||F<200)return this.$lastScrollTime=d,p.renderer.scrollBy(c.wheelX*c.speed,c.wheelY*c.speed),c.stop()}}).call(h.prototype),n.DefaultHandlers=h;function g(c,d,F,p){return Math.sqrt(Math.pow(F-c,2)+Math.pow(p-d,2))}function l(c,d){if(c.start.row==c.end.row)var F=2*d.column-c.start.column-c.end.column;else if(c.start.row==c.end.row-1&&!c.start.column&&!c.end.column)var F=d.column-4;else var F=2*d.row-c.start.row-c.end.row;return F<0?{cursor:c.start,anchor:c.end}:{cursor:c.end,anchor:c.start}}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(u,n,a){u("./lib/oop");var o=u("./lib/dom");function h(g){this.isOpen=!1,this.$element=null,this.$parentNode=g}(function(){this.$init=function(){return this.$element=o.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(g){o.setInnerText(this.getElement(),g)},this.setHtml=function(g){this.getElement().innerHTML=g},this.setPosition=function(g,l){this.getElement().style.left=g+"px",this.getElement().style.top=l+"px"},this.setClassName=function(g){o.addCssClass(this.getElement(),g)},this.show=function(g,l,c){g!=null&&this.setText(g),l!=null&&c!=null&&this.setPosition(l,c),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}}).call(h.prototype),n.Tooltip=h}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(u,n,a){var o=u("../lib/dom"),h=u("../lib/oop"),g=u("../lib/event"),l=u("../tooltip").Tooltip;function c(F){var p=F.editor,f=p.renderer.$gutterLayer,m=new d(p.container);F.editor.setDefaultHandler("guttermousedown",function(k){if(!(!p.isFocused()||k.getButton()!=0)){var C=f.getRegion(k);if(C!="foldWidgets"){var D=k.getDocumentPosition().row,T=p.session.selection;if(k.getShiftKey())T.selectTo(D,0);else{if(k.domEvent.detail==2)return p.selectAll(),k.preventDefault();F.$clickSelection=p.selection.getLineRange(D)}return F.setState("selectByLines"),F.captureMouse(k),k.preventDefault()}}});var v,w,x;function A(){var k=w.getDocumentPosition().row,C=f.$annotations[k];if(!C)return b();var D=p.session.getLength();if(k==D){var T=p.renderer.pixelToScreenCoordinates(0,w.y).row,S=w.$pos;if(T>p.session.documentToScreenRow(S.row,S.column))return b()}if(x!=C)if(x=C.text.join("<br/>"),m.setHtml(x),m.show(),p._signal("showGutterTooltip",m),p.on("mousewheel",b),F.$tooltipFollowsMouse)y(w);else{var M=w.domEvent.target,R=M.getBoundingClientRect(),O=m.getElement().style;O.left=R.right+"px",O.top=R.bottom+"px"}}function b(){v&&(v=clearTimeout(v)),x&&(m.hide(),x=null,p._signal("hideGutterTooltip",m),p.removeEventListener("mousewheel",b))}function y(k){m.setPosition(k.x,k.y)}F.editor.setDefaultHandler("guttermousemove",function(k){var C=k.domEvent.target||k.domEvent.srcElement;if(o.hasCssClass(C,"ace_fold-widget"))return b();x&&F.$tooltipFollowsMouse&&y(k),w=k,!v&&(v=setTimeout(function(){v=null,w&&!F.isMousePressed?A():b()},50))}),g.addListener(p.renderer.$gutter,"mouseout",function(k){w=null,!(!x||v)&&(v=setTimeout(function(){v=null,b()},50))}),p.on("changeSession",b)}function d(F){l.call(this,F)}h.inherits(d,l),function(){this.setPosition=function(F,p){var f=window.innerWidth||document.documentElement.clientWidth,m=window.innerHeight||document.documentElement.clientHeight,v=this.getWidth(),w=this.getHeight();F+=15,p+=15,F+v>f&&(F-=F+v-f),p+w>m&&(p-=20+w),l.prototype.setPosition.call(this,F,p)}}.call(d.prototype),n.GutterHandler=c}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(u,n,a){var o=u("../lib/event"),h=u("../lib/useragent"),g=n.MouseEvent=function(l,c){this.domEvent=l,this.editor=c,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){o.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){o.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,c=l.getSelectionRange();if(c.isEmpty())this.$inSelection=!1;else{var d=this.getDocumentPosition();this.$inSelection=c.contains(d.row,d.column)}return this.$inSelection},this.getButton=function(){return o.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=h.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(g.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(u,n,a){var o=u("../lib/dom"),h=u("../lib/event"),g=u("../lib/useragent"),l=200,c=200,d=5;function F(f){var m=f.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",g.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var w=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];w.forEach(function(K){f[K]=this[K]},this),m.addEventListener("mousedown",this.onMouseDown.bind(f));var x=m.container,A,b,y,k,C,D,T=0,S,M,R,O,H;this.onDragStart=function(K){if(this.cancelDrag||!x.draggable){var le=this;return setTimeout(function(){le.startSelect(),le.captureMouse(K)},0),K.preventDefault()}C=m.getSelectionRange();var re=K.dataTransfer;re.effectAllowed=m.getReadOnly()?"copy":"copyMove",g.isOpera&&(m.container.appendChild(v),v.scrollTop=0),re.setDragImage&&re.setDragImage(v,0,0),g.isOpera&&m.container.removeChild(v),re.clearData(),re.setData("Text",m.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(K){if(x.draggable=!1,M=!1,this.setState(null),!m.getReadOnly()){var le=K.dataTransfer.dropEffect;!S&&le=="move"&&m.session.remove(m.getSelectionRange()),m.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(K){if(!(m.getReadOnly()||!ne(K.dataTransfer)))return b=K.clientX,y=K.clientY,A||te(),T++,K.dataTransfer.dropEffect=S=G(K),h.preventDefault(K)},this.onDragOver=function(K){if(!(m.getReadOnly()||!ne(K.dataTransfer)))return b=K.clientX,y=K.clientY,A||(te(),T++),se!==null&&(se=null),K.dataTransfer.dropEffect=S=G(K),h.preventDefault(K)},this.onDragLeave=function(K){if(T--,T<=0&&A)return ie(),S=null,h.preventDefault(K)},this.onDrop=function(K){if(D){var le=K.dataTransfer;if(M)switch(S){case"move":C.contains(D.row,D.column)?C={start:D,end:D}:C=m.moveText(C,D);break;case"copy":C=m.moveText(C,D,!0);break}else{var re=le.getData("Text");C={start:D,end:m.session.insert(D,re)},m.focus(),S=null}return ie(),h.preventDefault(K)}},h.addListener(x,"dragstart",this.onDragStart.bind(f)),h.addListener(x,"dragend",this.onDragEnd.bind(f)),h.addListener(x,"dragenter",this.onDragEnter.bind(f)),h.addListener(x,"dragover",this.onDragOver.bind(f)),h.addListener(x,"dragleave",this.onDragLeave.bind(f)),h.addListener(x,"drop",this.onDrop.bind(f));function Y(K,le){var re=Date.now(),ae=!le||K.row!=le.row,ee=!le||K.column!=le.column;if(!O||ae||ee)m.$blockScrolling+=1,m.moveCursorToPosition(K),m.$blockScrolling-=1,O=re,H={x:b,y};else{var ce=p(H.x,H.y,b,y);ce>d?O=null:re-O>=c&&(m.renderer.scrollCursorIntoView(),O=null)}}function J(K,le){var re=Date.now(),ae=m.renderer.layerConfig.lineHeight,ee=m.renderer.layerConfig.characterWidth,ce=m.renderer.scroller.getBoundingClientRect(),xe={x:{left:b-ce.left,right:ce.right-b},y:{top:y-ce.top,bottom:ce.bottom-y}},Ee=Math.min(xe.x.left,xe.x.right),W=Math.min(xe.y.top,xe.y.bottom),z={row:K.row,column:K.column};Ee/ee<=2&&(z.column+=xe.x.left<xe.x.right?-3:2),W/ae<=1&&(z.row+=xe.y.top<xe.y.bottom?-1:1);var $=K.row!=z.row,P=K.column!=z.column,B=!le||K.row!=le.row;$||P&&!B?R?re-R>=l&&m.renderer.scrollCursorIntoView(z):R=re:R=null}function Z(){var K=D;D=m.renderer.screenToTextCoordinates(b,y),Y(D,K),J(D,K)}function te(){C=m.selection.toOrientedRange(),A=m.session.addMarker(C,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(k),Z(),k=setInterval(Z,20),T=0,h.addListener(document,"mousemove",ue)}function ie(){clearInterval(k),m.session.removeMarker(A),A=null,m.$blockScrolling+=1,m.selection.fromOrientedRange(C),m.$blockScrolling-=1,m.isFocused()&&!M&&m.renderer.$cursorLayer.setBlinking(!m.getReadOnly()),C=null,D=null,T=0,R=null,O=null,h.removeListener(document,"mousemove",ue)}var se=null;function ue(){se==null&&(se=setTimeout(function(){se!=null&&A&&ie()},20))}function ne(K){var le=K.types;return!le||Array.prototype.some.call(le,function(re){return re=="text/plain"||re=="Text"})}function G(K){var le=["copy","copymove","all","uninitialized"],re=["move","copymove","linkmove","all","uninitialized"],ae=g.isMac?K.altKey:K.ctrlKey,ee="uninitialized";try{ee=K.dataTransfer.effectAllowed.toLowerCase()}catch{}var ce="none";return ae&&le.indexOf(ee)>=0?ce="copy":re.indexOf(ee)>=0?ce="move":le.indexOf(ee)>=0&&(ce="copy"),ce}}(function(){this.dragWait=function(){var f=Date.now()-this.mousedownEvent.time;f>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var f=this.editor.container;f.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(f){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var f=this.editor,m=f.container;m.draggable=!0,f.renderer.$cursorLayer.setBlinking(!1),f.setStyle("ace_dragging");var v=g.isWin?"default":"move";f.renderer.setCursorStyle(v),this.setState("dragReady")},this.onMouseDrag=function(f){var m=this.editor.container;if(g.isIE&&this.state=="dragReady"){var v=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);v>3&&m.dragDrop()}if(this.state==="dragWait"){var v=p(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);v>0&&(m.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(f){if(this.$dragEnabled){this.mousedownEvent=f;var m=this.editor,v=f.inSelection(),w=f.getButton(),x=f.domEvent.detail||1;if(x===1&&w===0&&v){if(f.editor.inMultiSelectMode&&(f.getAccelKey()||f.getShiftKey()))return;this.mousedownEvent.time=Date.now();var A=f.domEvent.target||f.domEvent.srcElement;if("unselectable"in A&&(A.unselectable="on"),m.getDragDelay()){if(g.isWebKit){this.cancelDrag=!0;var b=m.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(f,this.onMouseDrag.bind(this)),f.defaultPrevented=!0}}}}).call(F.prototype);function p(f,m,v,w){return Math.sqrt(Math.pow(v-f,2)+Math.pow(w-m,2))}n.DragdropHandler=F}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(u,n,a){var o=u("./dom");n.get=function(h,g){var l=new XMLHttpRequest;l.open("GET",h,!0),l.onreadystatechange=function(){l.readyState===4&&g(l.responseText)},l.send(null)},n.loadScript=function(h,g){var l=o.getDocumentHead(),c=document.createElement("script");c.src=h,l.appendChild(c),c.onload=c.onreadystatechange=function(d,F){(F||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,F||g())}},n.qualifyURL=function(h){var g=document.createElement("a");return g.href=h,g.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(u,n,a){var o={},h=function(){this.propagationStopped=!0},g=function(){this.defaultPrevented=!0};o._emit=o._dispatchEvent=function(l,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var d=this._eventRegistry[l]||[],F=this._defaultHandlers[l];if(!(!d.length&&!F)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=l),c.stopPropagation||(c.stopPropagation=h),c.preventDefault||(c.preventDefault=g),d=d.slice();for(var p=0;p<d.length&&(d[p](c,this),!c.propagationStopped);p++);if(F&&!c.defaultPrevented)return F(c,this)}},o._signal=function(l,c){var d=(this._eventRegistry||{})[l];if(d){d=d.slice();for(var F=0;F<d.length;F++)d[F](c,this)}},o.once=function(l,c){var d=this;c&&this.addEventListener(l,function F(){d.removeEventListener(l,F),c.apply(null,arguments)})},o.setDefaultHandler=function(l,c){var d=this._defaultHandlers;if(d||(d=this._defaultHandlers={_disabled_:{}}),d[l]){var F=d[l],p=d._disabled_[l];p||(d._disabled_[l]=p=[]),p.push(F);var f=p.indexOf(c);f!=-1&&p.splice(f,1)}d[l]=c},o.removeDefaultHandler=function(l,c){var d=this._defaultHandlers;if(d){var F=d._disabled_[l];if(d[l]==c)d[l],F&&this.setDefaultHandler(l,F.pop());else if(F){var p=F.indexOf(c);p!=-1&&F.splice(p,1)}}},o.on=o.addEventListener=function(l,c,d){this._eventRegistry=this._eventRegistry||{};var F=this._eventRegistry[l];return F||(F=this._eventRegistry[l]=[]),F.indexOf(c)==-1&&F[d?"unshift":"push"](c),c},o.off=o.removeListener=o.removeEventListener=function(l,c){this._eventRegistry=this._eventRegistry||{};var d=this._eventRegistry[l];if(d){var F=d.indexOf(c);F!==-1&&d.splice(F,1)}},o.removeAllListeners=function(l){this._eventRegistry&&(this._eventRegistry[l]=[])},n.EventEmitter=o}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(u,n,a){"no use strict";var o=u("./oop"),h=u("./event_emitter").EventEmitter,g={setOptions:function(F){Object.keys(F).forEach(function(p){this.setOption(p,F[p])},this)},getOptions:function(F){var p={};return F?Array.isArray(F)||(p=F,F=Object.keys(p)):F=Object.keys(this.$options),F.forEach(function(f){p[f]=this.getOption(f)},this),p},setOption:function(F,p){if(this["$"+F]!==p){var f=this.$options[F];if(!f)return l('misspelled option "'+F+'"');if(f.forwardTo)return this[f.forwardTo]&&this[f.forwardTo].setOption(F,p);f.handlesSet||(this["$"+F]=p),f&&f.set&&f.set.call(this,p)}},getOption:function(F){var p=this.$options[F];return p?p.forwardTo?this[p.forwardTo]&&this[p.forwardTo].getOption(F):p&&p.get?p.get.call(this):this["$"+F]:l('misspelled option "'+F+'"')}};function l(F){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}function c(F,p){var f=new Error(F);f.data=p,typeof console=="object"&&console.error&&console.error(f),setTimeout(function(){throw f})}var d=function(){this.$defaultOptions={}};(function(){o.implement(this,h),this.defineOptions=function(F,p,f){return F.$options||(this.$defaultOptions[p]=F.$options={}),Object.keys(f).forEach(function(m){var v=f[m];typeof v=="string"&&(v={forwardTo:v}),v.name||(v.name=m),F.$options[v.name]=v,"initialValue"in v&&(F["$"+v.name]=v.initialValue)}),o.implement(F,g),this},this.resetOptions=function(F){Object.keys(F.$options).forEach(function(p){var f=F.$options[p];"value"in f&&F.setOption(p,f.value)})},this.setDefaultValue=function(F,p,f){var m=this.$defaultOptions[F]||(this.$defaultOptions[F]={});m[p]&&(m.forwardTo?this.setDefaultValue(m.forwardTo,p,f):m[p].value=f)},this.setDefaultValues=function(F,p){Object.keys(p).forEach(function(f){this.setDefaultValue(F,f,p[f])},this)},this.warn=l,this.reportError=c}).call(d.prototype),n.AppConfig=d}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"],function(u,n,a){"no use strict";var o=u("./lib/lang");u("./lib/oop");var h=u("./lib/net"),g=u("./lib/app_config").AppConfig;a.exports=n=new g;var l=function(){return this||typeof window<"u"&&window}(),c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};n.get=function(p){if(!c.hasOwnProperty(p))throw new Error("Unknown config key: "+p);return c[p]},n.set=function(p,f){if(!c.hasOwnProperty(p))throw new Error("Unknown config key: "+p);c[p]=f},n.all=function(){return o.copyObject(c)},n.moduleUrl=function(p,f){if(c.$moduleUrls[p])return c.$moduleUrls[p];var m=p.split("/");f=f||m[m.length-2]||"";var v=f=="snippets"?"/":"-",w=m[m.length-1];if(f=="worker"&&v=="-"){var x=new RegExp("^"+f+"[\\-_]|[\\-_]"+f+"$","g");w=w.replace(x,"")}(!w||w==f)&&m.length>1&&(w=m[m.length-2]);var A=c[f+"Path"];return A==null?A=c.basePath:v=="/"&&(f=v=""),A&&A.slice(-1)!="/"&&(A+="/"),A+f+v+w+this.get("suffix")},n.setModuleUrl=function(p,f){return c.$moduleUrls[p]=f},n.$loading={},n.loadModule=function(p,f){var m,v;Array.isArray(p)&&(v=p[0],p=p[1]);try{m=u(p)}catch{}if(m&&!n.$loading[p])return f&&f(m);if(n.$loading[p]||(n.$loading[p]=[]),n.$loading[p].push(f),!(n.$loading[p].length>1)){var w=function(){u([p],function(x){n._emit("load.module",{name:p,module:x});var A=n.$loading[p];n.$loading[p]=null,A.forEach(function(b){b&&b(x)})})};if(!n.get("packaged"))return w();h.loadScript(n.moduleUrl(p,v),w)}},d(!0);function d(p){if(!(!l||!l.document)){c.packaged=p||u.packaged||a.packaged||l.define&&r(69).packaged;for(var f={},m="",v=document.currentScript||document._currentScript,w=v&&v.ownerDocument||document,x=w.getElementsByTagName("script"),A=0;A<x.length;A++){var b=x[A],y=b.src||b.getAttribute("src");if(y){for(var k=b.attributes,C=0,D=k.length;C<D;C++){var T=k[C];T.name.indexOf("data-ace-")===0&&(f[F(T.name.replace(/^data-ace-/,""))]=T.value)}var S=y.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);S&&(m=S[1])}}m&&(f.base=f.base||m,f.packaged=!0),f.basePath=f.base,f.workerPath=f.workerPath||f.base,f.modePath=f.modePath||f.base,f.themePath=f.themePath||f.base,delete f.base;for(var M in f)typeof f[M]<"u"&&n.set(M,f[M])}}n.init=d;function F(p){return p.replace(/-(.)/g,function(f,m){return m.toUpperCase()})}}),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/config"],function(u,n,a){var o=u("../lib/event"),h=u("../lib/useragent"),g=u("./default_handlers").DefaultHandlers,l=u("./default_gutter_handler").GutterHandler,c=u("./mouse_event").MouseEvent,d=u("./dragdrop_handler").DragdropHandler,F=u("../config"),p=function(f){var m=this;this.editor=f,new g(this),new l(this),new d(this);var v=function(A){var b=!document.hasFocus||!document.hasFocus()||!f.isFocused()&&document.activeElement==(f.textInput&&f.textInput.getElement());b&&window.focus(),f.focus()},w=f.renderer.getMouseEventTarget();o.addListener(w,"click",this.onMouseEvent.bind(this,"click")),o.addListener(w,"mousemove",this.onMouseMove.bind(this,"mousemove")),o.addMultiMouseDownListener([w,f.renderer.scrollBarV&&f.renderer.scrollBarV.inner,f.renderer.scrollBarH&&f.renderer.scrollBarH.inner,f.textInput&&f.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),o.addMouseWheelListener(f.container,this.onMouseWheel.bind(this,"mousewheel")),o.addTouchMoveListener(f.container,this.onTouchMove.bind(this,"touchmove"));var x=f.renderer.$gutter;o.addListener(x,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),o.addListener(x,"click",this.onMouseEvent.bind(this,"gutterclick")),o.addListener(x,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),o.addListener(x,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),o.addListener(w,"mousedown",v),o.addListener(x,"mousedown",v),h.isIE&&f.renderer.scrollBarV&&(o.addListener(f.renderer.scrollBarV.element,"mousedown",v),o.addListener(f.renderer.scrollBarH.element,"mousedown",v)),f.on("mousemove",function(A){if(!(m.state||m.$dragDelay||!m.$dragEnabled)){var b=f.renderer.screenToTextCoordinates(A.x,A.y),y=f.session.selection.getRange(),k=f.renderer;!y.isEmpty()&&y.insideStart(b.row,b.column)?k.setCursorStyle("default"):k.setCursorStyle("")}})};(function(){this.onMouseEvent=function(f,m){this.editor._emit(f,new c(m,this.editor))},this.onMouseMove=function(f,m){var v=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!v||!v.length||this.editor._emit(f,new c(m,this.editor))},this.onMouseWheel=function(f,m){var v=new c(m,this.editor);v.speed=this.$scrollSpeed*2,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(f,v)},this.onTouchMove=function(f,m){var v=new c(m,this.editor);v.speed=1,v.wheelX=m.wheelX,v.wheelY=m.wheelY,this.editor._emit(f,v)},this.setState=function(f){this.state=f},this.captureMouse=function(f,m){this.x=f.x,this.y=f.y,this.isMousePressed=!0;var v=this.editor.renderer;v.$keepTextAreaAtCursor&&(v.$keepTextAreaAtCursor=null);var w=this,x=function(k){if(k){if(h.isWebKit&&!k.which&&w.releaseMouse)return w.releaseMouse();w.x=k.clientX,w.y=k.clientY,m&&m(k),w.mouseEvent=new c(k,w.editor),w.$mouseMoved=!0}},A=function(k){clearInterval(y),b(),w[w.state+"End"]&&w[w.state+"End"](k),w.state="",v.$keepTextAreaAtCursor==null&&(v.$keepTextAreaAtCursor=!0,v.$moveTextAreaToCursor()),w.isMousePressed=!1,w.$onCaptureMouseMove=w.releaseMouse=null,k&&w.onMouseEvent("mouseup",k)},b=function(){w[w.state]&&w[w.state](),w.$mouseMoved=!1};if(h.isOldIE&&f.domEvent.type=="dblclick")return setTimeout(function(){A(f)});w.$onCaptureMouseMove=x,w.releaseMouse=o.capture(this.editor.container,x,A);var y=setInterval(b,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var f=function(m){m&&m.domEvent&&m.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",f),m&&m.domEvent&&o.stopEvent(m.domEvent))}.bind(this);setTimeout(f,10),this.editor.on("nativecontextmenu",f)}}).call(p.prototype),F.defineOptions(p.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:h.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),n.MouseHandler=p}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(u,n,a){function o(h){h.on("click",function(g){var l=g.getDocumentPosition(),c=h.session,d=c.getFoldAt(l.row,l.column,1);d&&(g.getAccelKey()?c.removeFold(d):c.expandFold(d),g.stop())}),h.on("gutterclick",function(g){var l=h.renderer.$gutterLayer.getRegion(g);if(l=="foldWidgets"){var c=g.getDocumentPosition().row,d=h.session;d.foldWidgets&&d.foldWidgets[c]&&h.session.onFoldWidgetClick(c,g),h.isFocused()||h.focus(),g.stop()}}),h.on("gutterdblclick",function(g){var l=h.renderer.$gutterLayer.getRegion(g);if(l=="foldWidgets"){var c=g.getDocumentPosition().row,d=h.session,F=d.getParentFoldRangeData(c,!0),p=F.range||F.firstRange;if(p){c=p.start.row;var f=d.getFoldAt(c,d.getLine(c).length,1);f?d.removeFold(f):(d.addFold("...",p),h.renderer.scrollCursorIntoView({row:p.start.row,column:0}))}g.stop()}})}n.FoldHandler=o}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(u,n,a){var o=u("../lib/keys"),h=u("../lib/event"),g=function(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)};(function(){this.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},this.setKeyboardHandler=function(l){var c=this.$handlers;if(c[c.length-1]!=l){for(;c[c.length-1]&&c[c.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(c[c.length-1]);this.addKeyboardHandler(l,1)}},this.addKeyboardHandler=function(l,c){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var d=this.$handlers.indexOf(l);d!=-1&&this.$handlers.splice(d,1),c==null?this.$handlers.push(l):this.$handlers.splice(c,0,l),d==-1&&l.attach&&l.attach(this.$editor)}},this.removeKeyboardHandler=function(l){var c=this.$handlers.indexOf(l);return c==-1?!1:(this.$handlers.splice(c,1),l.detach&&l.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var l=this.$data,c=l.editor;return this.$handlers.map(function(d){return d.getStatusText&&d.getStatusText(c,l)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(l,c,d,F){for(var p,f=!1,m=this.$editor.commands,v=this.$handlers.length;v--&&(p=this.$handlers[v].handleKeyboard(this.$data,l,c,d,F),!(!(!p||!p.command)&&(p.command=="null"?f=!0:f=m.exec(p.command,this.$editor,p.args,F),f&&F&&l!=-1&&p.passEvent!=!0&&p.command.passEvent!=!0&&h.stopEvent(F),f))););return!f&&l==-1&&(p={command:"insertstring"},f=m.exec("insertstring",this.$editor,c)),f&&this.$editor._signal&&this.$editor._signal("keyboardActivity",p),f},this.onCommandKey=function(l,c,d){var F=o.keyCodeToString(d);this.$callKeyboardHandlers(c,F,d,l)},this.onTextInput=function(l){this.$callKeyboardHandlers(-1,l)}}).call(g.prototype),n.KeyBinding=g}),ace.define("ace/range",["require","exports","module"],function(u,n,a){var o=function(g,l){return g.row-l.row||g.column-l.column},h=function(g,l,c,d){this.start={row:g,column:l},this.end={row:c,column:d}};(function(){this.isEqual=function(g){return this.start.row===g.start.row&&this.end.row===g.end.row&&this.start.column===g.start.column&&this.end.column===g.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(g,l){return this.compare(g,l)==0},this.compareRange=function(g){var l,c=g.end,d=g.start;return l=this.compare(c.row,c.column),l==1?(l=this.compare(d.row,d.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(d.row,d.column),l==-1?-1:l==1?42:0)},this.comparePoint=function(g){return this.compare(g.row,g.column)},this.containsRange=function(g){return this.comparePoint(g.start)==0&&this.comparePoint(g.end)==0},this.intersects=function(g){var l=this.compareRange(g);return l==-1||l==0||l==1},this.isEnd=function(g,l){return this.end.row==g&&this.end.column==l},this.isStart=function(g,l){return this.start.row==g&&this.start.column==l},this.setStart=function(g,l){typeof g=="object"?(this.start.column=g.column,this.start.row=g.row):(this.start.row=g,this.start.column=l)},this.setEnd=function(g,l){typeof g=="object"?(this.end.column=g.column,this.end.row=g.row):(this.end.row=g,this.end.column=l)},this.inside=function(g,l){return this.compare(g,l)==0?!(this.isEnd(g,l)||this.isStart(g,l)):!1},this.insideStart=function(g,l){return this.compare(g,l)==0?!this.isEnd(g,l):!1},this.insideEnd=function(g,l){return this.compare(g,l)==0?!this.isStart(g,l):!1},this.compare=function(g,l){return!this.isMultiLine()&&g===this.start.row?l<this.start.column?-1:l>this.end.column?1:0:g<this.start.row?-1:g>this.end.row?1:this.start.row===g?l>=this.start.column?0:-1:this.end.row===g?l<=this.end.column?0:1:0},this.compareStart=function(g,l){return this.start.row==g&&this.start.column==l?-1:this.compare(g,l)},this.compareEnd=function(g,l){return this.end.row==g&&this.end.column==l?1:this.compare(g,l)},this.compareInside=function(g,l){return this.end.row==g&&this.end.column==l?1:this.start.row==g&&this.start.column==l?-1:this.compare(g,l)},this.clipRows=function(g,l){if(this.end.row>l)var c={row:l+1,column:0};else if(this.end.row<g)var c={row:g,column:0};if(this.start.row>l)var d={row:l+1,column:0};else if(this.start.row<g)var d={row:g,column:0};return h.fromPoints(d||this.start,c||this.end)},this.extend=function(g,l){var c=this.compare(g,l);if(c==0)return this;if(c==-1)var d={row:g,column:l};else var F={row:g,column:l};return h.fromPoints(d||this.start,F||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 h.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new h(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new h(this.start.row,0,this.end.row,0)},this.toScreenRange=function(g){var l=g.documentToScreenPosition(this.start),c=g.documentToScreenPosition(this.end);return new h(l.row,l.column,c.row,c.column)},this.moveBy=function(g,l){this.start.row+=g,this.start.column+=l,this.end.row+=g,this.end.column+=l}}).call(h.prototype),h.fromPoints=function(g,l){return new h(g.row,g.column,l.row,l.column)},h.comparePoints=o,h.comparePoints=function(g,l){return g.row-l.row||g.column-l.column},n.Range=h}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(u,n,a){var o=u("./lib/oop"),h=u("./lib/lang"),g=u("./lib/event_emitter").EventEmitter,l=u("./range").Range,c=function(d){this.session=d,this.doc=d.getDocument(),this.clearSelection(),this.lead=this.selectionLead=this.doc.createAnchor(0,0),this.anchor=this.selectionAnchor=this.doc.createAnchor(0,0);var F=this;this.lead.on("change",function(p){F._emit("changeCursor"),F.$isEmpty||F._emit("changeSelection"),!F.$keepDesiredColumnOnChange&&p.old.column!=p.value.column&&(F.$desiredColumn=null)}),this.selectionAnchor.on("change",function(){F.$isEmpty||F._emit("changeSelection")})};(function(){o.implement(this,g),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return this.isEmpty()?!1:this.getRange().isMultiLine()},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(d,F){this.anchor.setPosition(d,F),this.$isEmpty&&(this.$isEmpty=!1,this._emit("changeSelection"))},this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.shiftSelection=function(d){if(this.$isEmpty){this.moveCursorTo(this.lead.row,this.lead.column+d);return}var F=this.getSelectionAnchor(),p=this.getSelectionLead(),f=this.isBackwards();(!f||F.column!==0)&&this.setSelectionAnchor(F.row,F.column+d),(f||p.column!==0)&&this.$moveSelection(function(){this.moveCursorTo(p.row,p.column+d)})},this.isBackwards=function(){var d=this.anchor,F=this.lead;return d.row>F.row||d.row==F.row&&d.column>F.column},this.getRange=function(){var d=this.anchor,F=this.lead;return this.isEmpty()?l.fromPoints(F,F):this.isBackwards()?l.fromPoints(F,d):l.fromPoints(d,F)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var d=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(d,this.doc.getLine(d).length)},this.setRange=this.setSelectionRange=function(d,F){F?(this.setSelectionAnchor(d.end.row,d.end.column),this.selectTo(d.start.row,d.start.column)):(this.setSelectionAnchor(d.start.row,d.start.column),this.selectTo(d.end.row,d.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(d){var F=this.lead;this.$isEmpty&&this.setSelectionAnchor(F.row,F.column),d.call(this)},this.selectTo=function(d,F){this.$moveSelection(function(){this.moveCursorTo(d,F)})},this.selectToPosition=function(d){this.$moveSelection(function(){this.moveCursorToPosition(d)})},this.moveTo=function(d,F){this.clearSelection(),this.moveCursorTo(d,F)},this.moveToPosition=function(d){this.clearSelection(),this.moveCursorToPosition(d)},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(d,F){if(typeof F>"u"){var p=d||this.lead;d=p.row,F=p.column}return this.session.getWordRange(d,F)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var d=this.getCursor(),F=this.session.getAWordRange(d.row,d.column);this.setSelectionRange(F)},this.getLineRange=function(d,F){var p=typeof d=="number"?d:this.lead.row,f,m=this.session.getFoldLine(p);return m?(p=m.start.row,f=m.end.row):f=p,F===!0?new l(p,0,f,this.session.getLine(f).length):new l(p,0,f+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var d=this.lead.getPosition(),F;if(F=this.session.getFoldAt(d.row,d.column,-1))this.moveCursorTo(F.start.row,F.start.column);else if(d.column===0)d.row>0&&this.moveCursorTo(d.row-1,this.doc.getLine(d.row-1).length);else{var p=this.session.getTabSize();this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(d.column-p,d.column).split(" ").length-1==p?this.moveCursorBy(0,-p):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var d=this.lead.getPosition(),F;if(F=this.session.getFoldAt(d.row,d.column,1))this.moveCursorTo(F.end.row,F.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var p=this.session.getTabSize(),d=this.lead;this.session.isTabStop(d)&&this.doc.getLine(d.row).slice(d.column,d.column+p).split(" ").length-1==p?this.moveCursorBy(0,p):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var d=this.lead.row,F=this.lead.column,p=this.session.documentToScreenRow(d,F),f=this.session.screenToDocumentPosition(p,0),m=this.session.getDisplayLine(d,null,f.row,f.column),v=m.match(/^\s*/);v[0].length!=F&&!this.session.$useEmacsStyleLineStart&&(f.column+=v[0].length),this.moveCursorToPosition(f)},this.moveCursorLineEnd=function(){var d=this.lead,F=this.session.getDocumentLastRowColumnPosition(d.row,d.column);if(this.lead.column==F.column){var p=this.session.getLine(F.row);if(F.column==p.length){var f=p.search(/\s+$/);f>0&&(F.column=f)}}this.moveCursorTo(F.row,F.column)},this.moveCursorFileEnd=function(){var d=this.doc.getLength()-1,F=this.doc.getLine(d).length;this.moveCursorTo(d,F)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var d=this.lead.row,F=this.lead.column,p=this.doc.getLine(d),f=p.substring(F);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var m=this.session.getFoldAt(d,F,1);if(m){this.moveCursorTo(m.end.row,m.end.column);return}if(this.session.nonTokenRe.exec(f)&&(F+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,f=p.substring(F)),F>=p.length){this.moveCursorTo(d,p.length),this.moveCursorRight(),d<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(f)&&(F+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,F)},this.moveCursorLongWordLeft=function(){var d=this.lead.row,F=this.lead.column,p;if(p=this.session.getFoldAt(d,F,-1)){this.moveCursorTo(p.start.row,p.start.column);return}var f=this.session.getFoldStringAt(d,F,-1);f==null&&(f=this.doc.getLine(d).substring(0,F));var m=h.stringReverse(f);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(m)&&(F-=this.session.nonTokenRe.lastIndex,m=m.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),F<=0){this.moveCursorTo(d,0),this.moveCursorLeft(),d>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(m)&&(F-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(d,F)},this.$shortWordEndIndex=function(d){var F=0,p,f=/\s/,m=this.session.tokenRe;if(m.lastIndex=0,this.session.tokenRe.exec(d))F=this.session.tokenRe.lastIndex;else{for(;(p=d[F])&&f.test(p);)F++;if(F<1){for(m.lastIndex=0;(p=d[F])&&!m.test(p);)if(m.lastIndex=0,F++,f.test(p))if(F>2){F--;break}else{for(;(p=d[F])&&f.test(p);)F++;if(F>2)break}}}return m.lastIndex=0,F},this.moveCursorShortWordRight=function(){var d=this.lead.row,F=this.lead.column,p=this.doc.getLine(d),f=p.substring(F),m=this.session.getFoldAt(d,F,1);if(m)return this.moveCursorTo(m.end.row,m.end.column);if(F==p.length){var v=this.doc.getLength();do d++,f=this.doc.getLine(d);while(d<v&&/^\s*$/.test(f));/^\s+/.test(f)||(f=""),F=0}var w=this.$shortWordEndIndex(f);this.moveCursorTo(d,F+w)},this.moveCursorShortWordLeft=function(){var d=this.lead.row,F=this.lead.column,p;if(p=this.session.getFoldAt(d,F,-1))return this.moveCursorTo(p.start.row,p.start.column);var f=this.session.getLine(d).substring(0,F);if(F===0){do d--,f=this.doc.getLine(d);while(d>0&&/^\s*$/.test(f));F=f.length,/\s+$/.test(f)||(f="")}var m=h.stringReverse(f),v=this.$shortWordEndIndex(m);return this.moveCursorTo(d,F-v)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(d,F){var p=this.session.documentToScreenPosition(this.lead.row,this.lead.column);F===0&&(this.$desiredColumn?p.column=this.$desiredColumn:this.$desiredColumn=p.column);var f=this.session.screenToDocumentPosition(p.row+d,p.column);d!==0&&F===0&&f.row===this.lead.row&&f.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[f.row]&&(f.row>0||d>0)&&f.row++,this.moveCursorTo(f.row,f.column+F,F===0)},this.moveCursorToPosition=function(d){this.moveCursorTo(d.row,d.column)},this.moveCursorTo=function(d,F,p){var f=this.session.getFoldAt(d,F,1);f&&(d=f.start.row,F=f.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(d,F),this.$keepDesiredColumnOnChange=!1,p||(this.$desiredColumn=null)},this.moveCursorToScreen=function(d,F,p){var f=this.session.screenToDocumentPosition(d,F);this.moveCursorTo(f.row,f.column,p)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(d){this.setSelectionRange(d,d.cursor==d.start),this.$desiredColumn=d.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(d){var F=this.getRange();return d?(d.start.column=F.start.column,d.start.row=F.start.row,d.end.column=F.end.column,d.end.row=F.end.row):d=F,d.cursor=this.isBackwards()?d.start:d.end,d.desiredColumn=this.$desiredColumn,d},this.getRangeOfMovements=function(d){var F=this.getCursor();try{d(this);var p=this.getCursor();return l.fromPoints(F,p)}catch{return l.fromPoints(F,F)}finally{this.moveCursorToPosition(F)}},this.toJSON=function(){if(this.rangeCount)var d=this.ranges.map(function(F){var p=F.clone();return p.isBackwards=F.cursor==F.start,p});else{var d=this.getRange();d.isBackwards=this.isBackwards()}return d},this.fromJSON=function(d){if(d.start==null)if(this.rangeList){this.toSingleRange(d[0]);for(var F=d.length;F--;){var p=l.fromPoints(d[F].start,d[F].end);d[F].isBackwards&&(p.cursor=p.start),this.addRange(p,!0)}return}else d=d[0];this.rangeList&&this.toSingleRange(d),this.setSelectionRange(d,d.isBackwards)},this.isEqual=function(d){if((d.length||this.rangeCount)&&d.length!=this.rangeCount)return!1;if(!d.length||!this.ranges)return this.getRange().isEqual(d);for(var F=this.ranges.length;F--;)if(!this.ranges[F].isEqual(d[F]))return!1;return!0}}).call(c.prototype),n.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(u,n,a){var o=u("./config"),h=2e3,g=function(l){this.states=l,this.regExps={},this.matchMappings={};for(var c in this.states){for(var d=this.states[c],F=[],p=0,f=this.matchMappings[c]={defaultToken:"text"},m="g",v=[],w=0;w<d.length;w++){var x=d[w];if(x.defaultToken&&(f.defaultToken=x.defaultToken),x.caseInsensitive&&(m="gi"),x.regex!=null){x.regex instanceof RegExp&&(x.regex=x.regex.toString().slice(1,-1));var A=x.regex,b=new RegExp("(?:("+A+")|(.))").exec("a").length-2;Array.isArray(x.token)?x.token.length==1||b==1?x.token=x.token[0]:b-1!=x.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:x,groupCount:b-1}),x.token=x.token[0]):(x.tokenArray=x.token,x.token=null,x.onMatch=this.$arrayTokens):typeof x.token=="function"&&!x.onMatch&&(b>1?x.onMatch=this.$applyToken:x.onMatch=x.token),b>1&&(/\\\d/.test(x.regex)?A=x.regex.replace(/\\([0-9]+)/g,function(y,k){return"\\"+(parseInt(k,10)+p+1)}):(b=1,A=this.removeCapturingGroups(x.regex)),!x.splitRegex&&typeof x.token!="string"&&v.push(x)),f[p]=w,p+=b,F.push(A),x.onMatch||(x.onMatch=null)}}F.length||(f[0]=0,F.push("$")),v.forEach(function(y){y.splitRegex=this.createSplitterRegexp(y.regex,m)},this),this.regExps[c]=new RegExp("("+F.join(")|(")+")|($)",m)}};(function(){this.$setMaxTokenCount=function(l){h=l|0},this.$applyToken=function(l){var c=this.splitRegex.exec(l).slice(1),d=this.token.apply(this,c);if(typeof d=="string")return[{type:d,value:l}];for(var F=[],p=0,f=d.length;p<f;p++)c[p]&&(F[F.length]={type:d[p],value:c[p]});return F},this.$arrayTokens=function(l){if(!l)return[];var c=this.splitRegex.exec(l);if(!c)return"text";for(var d=[],F=this.tokenArray,p=0,f=F.length;p<f;p++)c[p+1]&&(d[d.length]={type:F[p],value:c[p+1]});return d},this.removeCapturingGroups=function(l){var c=l.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(d,F){return F?"(?:":d});return c},this.createSplitterRegexp=function(l,c){if(l.indexOf("(?=")!=-1){var d=0,F=!1,p={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(f,m,v,w,x,A){return F?F=x!="]":x?F=!0:w?(d==p.stack&&(p.end=A+1,p.stack=-1),d--):v&&(d++,v.length!=1&&(p.stack=d,p.start=A)),f}),p.end!=null&&/^\)*$/.test(l.substr(p.end))&&(l=l.substring(0,p.start)+l.substr(p.end))}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(c||"").replace("g",""))},this.getLineTokens=function(l,c){if(c&&typeof c!="string"){var d=c.slice(0);c=d[0],c==="#tmp"&&(d.shift(),c=d.shift())}else var d=[];var F=c||"start",p=this.states[F];p||(F="start",p=this.states[F]);var f=this.matchMappings[F],m=this.regExps[F];m.lastIndex=0;for(var v,w=[],x=0,A=0,b={type:null,value:""};v=m.exec(l);){var y=f.defaultToken,k=null,C=v[0],D=m.lastIndex;if(D-C.length>x){var T=l.substring(x,D-C.length);b.type==y?b.value+=T:(b.type&&w.push(b),b={type:y,value:T})}for(var S=0;S<v.length-2;S++)if(v[S+1]!==void 0){k=p[f[S]],k.onMatch?y=k.onMatch(C,F,d):y=k.token,k.next&&(typeof k.next=="string"?F=k.next:F=k.next(F,d),p=this.states[F],p||(this.reportError("state doesn't exist",F),F="start",p=this.states[F]),f=this.matchMappings[F],x=D,m=this.regExps[F],m.lastIndex=D);break}if(C){if(typeof y=="string")(!k||k.merge!==!1)&&b.type===y?b.value+=C:(b.type&&w.push(b),b={type:y,value:C});else if(y){b.type&&w.push(b),b={type:null,value:""};for(var S=0;S<y.length;S++)w.push(y[S])}}if(x==l.length)break;if(x=D,A++>h){for(A>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:c,line:l});x<l.length;)b.type&&w.push(b),b={value:l.substring(x,x+=2e3),type:"overflow"};F="start",d=[];break}}return b.type&&w.push(b),d.length>1&&d[0]!==F&&d.unshift("#tmp",F),{tokens:w,state:d.length?d:F}},this.reportError=o.reportError}).call(g.prototype),n.Tokenizer=g}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(u,n,a){var o=u("../lib/lang"),h=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(c,d){if(!d){for(var F in c)this.$rules[F]=c[F];return}for(var F in c){for(var p=c[F],f=0;f<p.length;f++){var m=p[f];(m.next||m.onMatch)&&(typeof m.next=="string"&&m.next.indexOf(d)!==0&&(m.next=d+m.next),m.nextState&&m.nextState.indexOf(d)!==0&&(m.nextState=d+m.nextState))}this.$rules[d+F]=p}},this.getRules=function(){return this.$rules},this.embedRules=function(c,d,F,p,f){var m=typeof c=="function"?new c().getRules():c;if(p)for(var v=0;v<p.length;v++)p[v]=d+p[v];else{p=[];for(var w in m)p.push(d+w)}if(this.addRules(m,d),F)for(var x=Array.prototype[f?"push":"unshift"],v=0;v<p.length;v++)x.apply(this.$rules[p[v]],o.deepCopy(F));this.$embeds||(this.$embeds=[]),this.$embeds.push(d)},this.getEmbeds=function(){return this.$embeds};var g=function(c,d){return(c!="start"||d.length)&&d.unshift(this.nextState,c),this.nextState},l=function(c,d){return d.shift(),d.shift()||"start"};this.normalizeRules=function(){var c=0,d=this.$rules;function F(p){var f=d[p];f.processed=!0;for(var m=0;m<f.length;m++){var v=f[m],w=null;Array.isArray(v)&&(w=v,v={}),!v.regex&&v.start&&(v.regex=v.start,v.next||(v.next=[]),v.next.push({defaultToken:v.token},{token:v.token+".end",regex:v.end||v.start,next:"pop"}),v.token=v.token+".start",v.push=!0);var x=v.next||v.push;if(x&&Array.isArray(x)){var A=v.stateName;A||(A=v.token,typeof A!="string"&&(A=A[0]||""),d[A]&&(A+=c++)),d[A]=x,v.next=A,F(A)}else x=="pop"&&(v.next=l);if(v.push&&(v.nextState=v.next||v.push,v.next=g,delete v.push),v.rules)for(var b in v.rules)d[b]?d[b].push&&d[b].push.apply(d[b],v.rules[b]):d[b]=v.rules[b];var y=typeof v=="string"?v:typeof v.include=="string"?v.include:"";if(y&&(w=d[y]),w){var k=[m,1].concat(w);v.noEscape&&(k=k.filter(function(C){return!C.next})),f.splice.apply(f,k),m--}v.keywordMap&&(v.token=this.createKeywordMapper(v.keywordMap,v.defaultToken||"text",v.caseInsensitive),delete v.defaultToken)}}Object.keys(d).forEach(F,this)},this.createKeywordMapper=function(c,d,F,p){var f=Object.create(null);return Object.keys(c).forEach(function(m){var v=c[m];F&&(v=v.toLowerCase());for(var w=v.split(p||"|"),x=w.length;x--;)f[w[x]]=m}),Object.getPrototypeOf(f)&&(f.__proto__=null),this.$keywordList=Object.keys(f),c=null,F?function(m){return f[m.toLowerCase()]||d}:function(m){return f[m]||d}},this.getKeywords=function(){return this.$keywords}}).call(h.prototype),n.TextHighlightRules=h}),ace.define("ace/mode/behaviour",["require","exports","module"],function(u,n,a){var o=function(){this.$behaviours={}};(function(){this.add=function(h,g,l){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[h]:this.$behaviours[h]={}}this.$behaviours[h][g]=l},this.addBehaviours=function(h){for(var g in h)for(var l in h[g])this.add(g,l,h[g][l])},this.remove=function(h){this.$behaviours&&this.$behaviours[h]&&delete this.$behaviours[h]},this.inherit=function(h,g){if(typeof h=="function")var l=new h().getBehaviours(g);else var l=h.getBehaviours(g);this.addBehaviours(l)},this.getBehaviours=function(h){if(h){for(var g={},l=0;l<h.length;l++)this.$behaviours[h[l]]&&(g[h[l]]=this.$behaviours[h[l]]);return g}else return this.$behaviours}}).call(o.prototype),n.Behaviour=o}),ace.define("ace/token_iterator",["require","exports","module"],function(u,n,a){var o=function(h,g,l){this.$session=h,this.$row=g,this.$rowTokens=h.getTokens(g);var c=h.getTokenAt(g,l);this.$tokenIndex=c?c.index:-1};(function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,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(){this.$tokenIndex+=1;for(var h;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-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 h=this.$rowTokens,g=this.$tokenIndex,l=h[g].start;if(l!==void 0)return l;for(l=0;g>0;)g-=1,l+=h[g].value.length;return l},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}}}).call(o.prototype),n.TokenIterator=o}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(u,n,a){var o=u("../../lib/oop"),h=u("../behaviour").Behaviour,g=u("../../token_iterator").TokenIterator,l=u("../../lib/lang"),c=["text","paren.rparen","punctuation.operator"],d=["text","paren.rparen","punctuation.operator","comment"],F,p={},f=function(w){var x=-1;if(w.multiSelect&&(x=w.selection.index,p.rangeCount!=w.multiSelect.rangeCount&&(p={rangeCount:w.multiSelect.rangeCount})),p[x])return F=p[x];F=p[x]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},m=function(w,x,A,b){var y=w.end.row-w.start.row;return{text:A+x+b,selection:[0,w.start.column+1,y,w.end.column+(y?0:1)]}},v=function(){this.add("braces","insertion",function(w,x,A,b,y){var k=A.getCursorPosition(),C=b.doc.getLine(k.row);if(y=="{"){f(A);var D=A.getSelectionRange(),T=b.doc.getTextRange(D);if(T!==""&&T!=="{"&&A.getWrapBehavioursEnabled())return m(D,T,"{","}");if(v.isSaneInsertion(A,b))return/[\]\}\)]/.test(C[k.column])||A.inMultiSelectMode?(v.recordAutoInsert(A,b,"}"),{text:"{}",selection:[1,1]}):(v.recordMaybeInsert(A,b,"{"),{text:"{",selection:[1,1]})}else if(y=="}"){f(A);var S=C.substring(k.column,k.column+1);if(S=="}"){var M=b.$findOpeningBracket("}",{column:k.column+1,row:k.row});if(M!==null&&v.isAutoInsertedClosing(k,C,y))return v.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(y==`
`||y==`\r
`){f(A);var R="";v.isMaybeInsertedClosing(k,C)&&(R=l.stringRepeat("}",F.maybeInsertedBrackets),v.clearMaybeInsertedClosing());var S=C.substring(k.column,k.column+1);if(S==="}"){var O=b.findMatchingBracket({row:k.row,column:k.column+1},"}");if(!O)return null;var H=this.$getIndent(b.getLine(O.row))}else if(R)var H=this.$getIndent(C);else{v.clearMaybeInsertedClosing();return}var Y=H+b.getTabString();return{text:`
`+Y+`
`+H+R,selection:[1,Y.length,1,Y.length]}}else v.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(w,x,A,b,y){var k=b.doc.getTextRange(y);if(!y.isMultiLine()&&k=="{"){f(A);var C=b.doc.getLine(y.start.row),D=C.substring(y.end.column,y.end.column+1);if(D=="}")return y.end.column++,y;F.maybeInsertedBrackets--}}),this.add("parens","insertion",function(w,x,A,b,y){if(y=="("){f(A);var k=A.getSelectionRange(),C=b.doc.getTextRange(k);if(C!==""&&A.getWrapBehavioursEnabled())return m(k,C,"(",")");if(v.isSaneInsertion(A,b))return v.recordAutoInsert(A,b,")"),{text:"()",selection:[1,1]}}else if(y==")"){f(A);var D=A.getCursorPosition(),T=b.doc.getLine(D.row),S=T.substring(D.column,D.column+1);if(S==")"){var M=b.$findOpeningBracket(")",{column:D.column+1,row:D.row});if(M!==null&&v.isAutoInsertedClosing(D,T,y))return v.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(w,x,A,b,y){var k=b.doc.getTextRange(y);if(!y.isMultiLine()&&k=="("){f(A);var C=b.doc.getLine(y.start.row),D=C.substring(y.start.column+1,y.start.column+2);if(D==")")return y.end.column++,y}}),this.add("brackets","insertion",function(w,x,A,b,y){if(y=="["){f(A);var k=A.getSelectionRange(),C=b.doc.getTextRange(k);if(C!==""&&A.getWrapBehavioursEnabled())return m(k,C,"[","]");if(v.isSaneInsertion(A,b))return v.recordAutoInsert(A,b,"]"),{text:"[]",selection:[1,1]}}else if(y=="]"){f(A);var D=A.getCursorPosition(),T=b.doc.getLine(D.row),S=T.substring(D.column,D.column+1);if(S=="]"){var M=b.$findOpeningBracket("]",{column:D.column+1,row:D.row});if(M!==null&&v.isAutoInsertedClosing(D,T,y))return v.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(w,x,A,b,y){var k=b.doc.getTextRange(y);if(!y.isMultiLine()&&k=="["){f(A);var C=b.doc.getLine(y.start.row),D=C.substring(y.start.column+1,y.start.column+2);if(D=="]")return y.end.column++,y}}),this.add("string_dquotes","insertion",function(w,x,A,b,y){if(y=='"'||y=="'"){if(this.lineCommentStart&&this.lineCommentStart.indexOf(y)!=-1)return;f(A);var k=y,C=A.getSelectionRange(),D=b.doc.getTextRange(C);if(D!==""&&D!=="'"&&D!='"'&&A.getWrapBehavioursEnabled())return m(C,D,k,k);if(!D){var T=A.getCursorPosition(),S=b.doc.getLine(T.row),M=S.substring(T.column-1,T.column),R=S.substring(T.column,T.column+1),O=b.getTokenAt(T.row,T.column),H=b.getTokenAt(T.row,T.column+1);if(M=="\\"&&O&&/escape/.test(O.type))return null;var Y=O&&/string|escape/.test(O.type),J=!H||/string|escape/.test(H.type),Z;if(R==k)Z=Y!==J,Z&&/string\.end/.test(H.type)&&(Z=!1);else{if(Y&&!J||Y&&J)return null;var te=b.$mode.tokenRe;te.lastIndex=0;var ie=te.test(M);te.lastIndex=0;var se=te.test(M);if(ie||se||R&&!/[\s;,.})\]\\]/.test(R))return null;Z=!0}return{text:Z?k+k:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(w,x,A,b,y){var k=b.doc.getTextRange(y);if(!y.isMultiLine()&&(k=='"'||k=="'")){f(A);var C=b.doc.getLine(y.start.row),D=C.substring(y.start.column+1,y.start.column+2);if(D==k)return y.end.column++,y}})};v.isSaneInsertion=function(w,x){var A=w.getCursorPosition(),b=new g(x,A.row,A.column);if(!this.$matchTokenType(b.getCurrentToken()||"text",c)){var y=new g(x,A.row,A.column+1);if(!this.$matchTokenType(y.getCurrentToken()||"text",c))return!1}return b.stepForward(),b.getCurrentTokenRow()!==A.row||this.$matchTokenType(b.getCurrentToken()||"text",d)},v.$matchTokenType=function(w,x){return x.indexOf(w.type||w)>-1},v.recordAutoInsert=function(w,x,A){var b=w.getCursorPosition(),y=x.doc.getLine(b.row);this.isAutoInsertedClosing(b,y,F.autoInsertedLineEnd[0])||(F.autoInsertedBrackets=0),F.autoInsertedRow=b.row,F.autoInsertedLineEnd=A+y.substr(b.column),F.autoInsertedBrackets++},v.recordMaybeInsert=function(w,x,A){var b=w.getCursorPosition(),y=x.doc.getLine(b.row);this.isMaybeInsertedClosing(b,y)||(F.maybeInsertedBrackets=0),F.maybeInsertedRow=b.row,F.maybeInsertedLineStart=y.substr(0,b.column)+A,F.maybeInsertedLineEnd=y.substr(b.column),F.maybeInsertedBrackets++},v.isAutoInsertedClosing=function(w,x,A){return F.autoInsertedBrackets>0&&w.row===F.autoInsertedRow&&A===F.autoInsertedLineEnd[0]&&x.substr(w.column)===F.autoInsertedLineEnd},v.isMaybeInsertedClosing=function(w,x){return F.maybeInsertedBrackets>0&&w.row===F.maybeInsertedRow&&x.substr(w.column)===F.maybeInsertedLineEnd&&x.substr(0,w.column)==F.maybeInsertedLineStart},v.popAutoInsertedClosing=function(){F.autoInsertedLineEnd=F.autoInsertedLineEnd.substr(1),F.autoInsertedBrackets--},v.clearMaybeInsertedClosing=function(){F&&(F.maybeInsertedBrackets=0,F.maybeInsertedRow=-1)},o.inherits(v,h),n.CstyleBehaviour=v}),ace.define("ace/unicode",["require","exports","module"],function(u,n,a){n.packages={},o({L:"0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",Ll:"0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A",Lu:"0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A",Lt:"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC",Lm:"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F",Lo:"01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC",M:"0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26",Mn:"0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26",Mc:"0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC",Me:"0488048906DE20DD-20E020E2-20E4A670-A672",N:"0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nd:"0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19",Nl:"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF",No:"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835",P:"0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65",Pd:"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D",Ps:"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62",Pe:"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63",Pi:"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20",Pf:"00BB2019201D203A2E032E052E0A2E0D2E1D2E21",Pc:"005F203F20402054FE33FE34FE4D-FE4FFF3F",Po:"0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65",S:"0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD",Sm:"002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC",Sc:"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6",Sk:"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3",So:"00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD",Z:"002000A01680180E2000-200A20282029202F205F3000",Zs:"002000A01680180E2000-200A202F205F3000",Zl:"2028",Zp:"2029",C:"0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF",Cc:"0000-001F007F-009F",Cf:"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB",Co:"E000-F8FF",Cs:"D800-DFFF",Cn:"03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF"});function o(h){var g=/\w{4}/g;for(var l in h)n.packages[l]=h[l].replace(g,"\\u$&")}}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(u,n,a){var o=u("../tokenizer").Tokenizer,h=u("./text_highlight_rules").TextHighlightRules,g=u("./behaviour/cstyle").CstyleBehaviour,l=u("../unicode"),c=u("../lib/lang"),d=u("../token_iterator").TokenIterator,F=u("../range").Range,p=function(){this.HighlightRules=h};(function(){this.$defaultBehaviour=new g,this.tokenRe=new RegExp("^["+l.packages.L+l.packages.Mn+l.packages.Mc+l.packages.Nd+l.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.packages.L+l.packages.Mn+l.packages.Mc+l.packages.Nd+l.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new o(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(f,m,v,w){var x=m.doc,A=!0,b=!0,y=1/0,k=m.getTabSize(),C=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var S=this.lineCommentStart.map(c.escapeRegExp).join("|"),D=this.lineCommentStart[0];else var S=c.escapeRegExp(this.lineCommentStart),D=this.lineCommentStart;S=new RegExp("^(\\s*)(?:"+S+") ?"),C=m.getUseSoftTabs();var O=function(ne,G){var K=ne.match(S);if(K){var le=K[1].length,re=K[0].length;!J(ne,le,re)&&K[0][re-1]==" "&&re--,x.removeInLine(G,le,re)}},Y=D+" ",R=function(ne,G){(!A||/\S/.test(ne))&&(J(ne,y,y)?x.insertInLine({row:G,column:y},Y):x.insertInLine({row:G,column:y},D))},H=function(ne,G){return S.test(ne)},J=function(ne,G,K){for(var le=0;G--&&ne.charAt(G)==" ";)le++;if(le%k!=0)return!1;for(var le=0;ne.charAt(K++)==" ";)le++;return k>2?le%k!=k-1:le%k==0}}else{if(!this.blockComment)return!1;var D=this.blockComment.start,T=this.blockComment.end,S=new RegExp("^(\\s*)(?:"+c.escapeRegExp(D)+")"),M=new RegExp("(?:"+c.escapeRegExp(T)+")\\s*$"),R=function(ie,se){H(ie,se)||(!A||/\S/.test(ie))&&(x.insertInLine({row:se,column:ie.length},T),x.insertInLine({row:se,column:y},D))},O=function(ie,se){var ue;(ue=ie.match(M))&&x.removeInLine(se,ie.length-ue[0].length,ie.length),(ue=ie.match(S))&&x.removeInLine(se,ue[1].length,ue[0].length)},H=function(ie,se){if(S.test(ie))return!0;for(var ue=m.getTokens(se),ne=0;ne<ue.length;ne++)if(ue[ne].type==="comment")return!0}}function Z(ie){for(var se=v;se<=w;se++)ie(x.getLine(se),se)}var te=1/0;Z(function(ie,se){var ue=ie.search(/\S/);ue!==-1?(ue<y&&(y=ue),b&&!H(ie,se)&&(b=!1)):te>ie.length&&(te=ie.length)}),y==1/0&&(y=te,A=!1,b=!1),C&&y%k!=0&&(y=Math.floor(y/k)*k),Z(b?O:R)},this.toggleBlockComment=function(f,m,v,w){var x=this.blockComment;if(x){!x.start&&x[0]&&(x=x[0]);var A=new d(m,w.row,w.column),b=A.getCurrentToken();m.selection;var y=m.selection.toOrientedRange(),k,C;if(b&&/comment/.test(b.type)){for(var D,T;b&&/comment/.test(b.type);){var S=b.value.indexOf(x.start);if(S!=-1){var M=A.getCurrentTokenRow(),R=A.getCurrentTokenColumn()+S;D=new F(M,R,M,R+x.start.length);break}b=A.stepBackward()}for(var A=new d(m,w.row,w.column),b=A.getCurrentToken();b&&/comment/.test(b.type);){var S=b.value.indexOf(x.end);if(S!=-1){var M=A.getCurrentTokenRow(),R=A.getCurrentTokenColumn()+S;T=new F(M,R,M,R+x.end.length);break}b=A.stepForward()}T&&m.remove(T),D&&(m.remove(D),k=D.start.row,C=-x.start.length)}else C=x.start.length,k=v.start.row,m.insert(v.end,x.end),m.insert(v.start,x.start);y.start.row==k&&(y.start.column+=C),y.end.row==k&&(y.end.column+=C),m.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(f,m,v){return this.$getIndent(m)},this.checkOutdent=function(f,m,v){return!1},this.autoOutdent=function(f,m,v){},this.$getIndent=function(f){return f.match(/^\s*/)[0]},this.createWorker=function(f){return null},this.createModeDelegates=function(f){this.$embeds=[],this.$modes={};for(var m in f)f[m]&&(this.$embeds.push(m),this.$modes[m]=new f[m]);for(var v=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=0;m<v.length;m++)(function(x){var A=v[m],b=x[A];x[v[m]]=function(){return this.$delegator(A,arguments,b)}})(this)},this.$delegator=function(f,m,v){var w=m[0];typeof w!="string"&&(w=w[0]);for(var x=0;x<this.$embeds.length;x++)if(this.$modes[this.$embeds[x]]){var A=w.split(this.$embeds[x]);if(!A[0]&&A[1]){m[0]=A[1];var b=this.$modes[this.$embeds[x]];return b[f].apply(b,m)}}var y=v.apply(this,m);return v?y:void 0},this.transformAction=function(f,m,v,w,x){if(this.$behaviour){var A=this.$behaviour.getBehaviours();for(var b in A)if(A[b][m]){var y=A[b][m].apply(this,arguments);if(y)return y}}},this.getKeywords=function(f){if(!this.completionKeywords){var m=this.$tokenizer.rules,v=[];for(var w in m)for(var x=m[w],A=0,b=x.length;A<b;A++)if(typeof x[A].token=="string")/keyword|support|storage/.test(x[A].token)&&v.push(x[A].regex);else if(typeof x[A].token=="object"){for(var y=0,k=x[A].token.length;y<k;y++)if(/keyword|support|storage/.test(x[A].token[y])){var w=x[A].regex.match(/\(.+?\)/g)[y];v.push(w.substr(1,w.length-2))}}this.completionKeywords=v}return f?v.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(f,m,v,w){var x=this.$keywordList||this.$createKeywordList();return x.map(function(A){return{name:A,value:A,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(p.prototype),n.Mode=p}),ace.define("ace/apply_delta",["require","exports","module"],function(u,n,a){n.applyDelta=function(o,h,g){var l=h.start.row,c=h.start.column,d=o[l]||"";switch(h.action){case"insert":var F=h.lines;if(F.length===1)o[l]=d.substring(0,c)+h.lines[0]+d.substring(c);else{var p=[l,1].concat(h.lines);o.splice.apply(o,p),o[l]=d.substring(0,c)+o[l],o[l+h.lines.length-1]+=d.substring(c)}break;case"remove":var f=h.end.column,m=h.end.row;l===m?o[l]=d.substring(0,c)+d.substring(f):o.splice(l,m-l+1,d.substring(0,c)+o[m].substring(f));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(u,n,a){var o=u("./lib/oop"),h=u("./lib/event_emitter").EventEmitter,g=n.Anchor=function(l,c,d){this.$onChange=this.onChange.bind(this),this.attach(l),typeof d>"u"?this.setPosition(c.row,c.column):this.setPosition(c,d)};(function(){o.implement(this,h),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(d){if(!(d.start.row==d.end.row&&d.start.row!=this.row)&&!(d.start.row>this.row)){var F=c(d,{row:this.row,column:this.column},this.$insertRight);this.setPosition(F.row,F.column,!0)}};function l(d,F,p){var f=p?d.column<=F.column:d.column<F.column;return d.row<F.row||d.row==F.row&&f}function c(d,F,p){var f=d.action=="insert",m=(f?1:-1)*(d.end.row-d.start.row),v=(f?1:-1)*(d.end.column-d.start.column),w=d.start,x=f?w:d.end;return l(F,w,p)?{row:F.row,column:F.column}:l(x,F,!p)?{row:F.row+m,column:F.column+(F.row==x.row?v:0)}:{row:w.row,column:w.column}}this.setPosition=function(d,F,p){var f;if(p?f={row:d,column:F}:f=this.$clipPositionToDocument(d,F),!(this.row==f.row&&this.column==f.column)){var m={row:this.row,column:this.column};this.row=f.row,this.column=f.column,this._signal("change",{old:m,value:f})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(d){this.document=d||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(d,F){var p={};return d>=this.document.getLength()?(p.row=Math.max(0,this.document.getLength()-1),p.column=this.document.getLine(p.row).length):d<0?(p.row=0,p.column=0):(p.row=d,p.column=Math.min(this.document.getLine(p.row).length,Math.max(0,F))),F<0&&(p.column=0),p}}).call(g.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(u,n,a){var o=u("./lib/oop"),h=u("./apply_delta").applyDelta,g=u("./lib/event_emitter").EventEmitter,l=u("./range").Range,c=u("./anchor").Anchor,d=function(F){this.$lines=[""],F.length===0?this.$lines=[""]:Array.isArray(F)?this.insertMergedLines({row:0,column:0},F):this.insert({row:0,column:0},F)};(function(){o.implement(this,g),this.setValue=function(F){var p=this.getLength()-1;this.remove(new l(0,0,p,this.getLine(p).length)),this.insert({row:0,column:0},F)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(F,p){return new c(this,F,p)},"aaa".split(/a/).length===0?this.$split=function(F){return F.replace(/\r\n|\r/g,`
`).split(`
`)}:this.$split=function(F){return F.split(/\r\n|\r|\n/)},this.$detectNewLine=function(F){var p=F.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=p?p[1]:`
`,this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r
`;case"unix":return`
`;default:return this.$autoNewLine||`
`}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(F){this.$newLineMode!==F&&(this.$newLineMode=F,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(F){return F==`\r
`||F=="\r"||F==`
`},this.getLine=function(F){return this.$lines[F]||""},this.getLines=function(F,p){return this.$lines.slice(F,p+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(F){return this.getLinesForRange(F).join(this.getNewLineCharacter())},this.getLinesForRange=function(F){var p;if(F.start.row===F.end.row)p=[this.getLine(F.start.row).substring(F.start.column,F.end.column)];else{p=this.getLines(F.start.row,F.end.row),p[0]=(p[0]||"").substring(F.start.column);var f=p.length-1;F.end.row-F.start.row==f&&(p[f]=p[f].substring(0,F.end.column))}return p},this.insertLines=function(F,p){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(F,p)},this.removeLines=function(F,p){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(F,p)},this.insertNewLine=function(F){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(F,["",""])},this.insert=function(F,p){return this.getLength()<=1&&this.$detectNewLine(p),this.insertMergedLines(F,this.$split(p))},this.insertInLine=function(F,p){var f=this.clippedPos(F.row,F.column),m=this.pos(F.row,F.column+p.length);return this.applyDelta({start:f,end:m,action:"insert",lines:[p]},!0),this.clonePos(m)},this.clippedPos=function(F,p){var f=this.getLength();F===void 0?F=f:F<0?F=0:F>=f&&(F=f-1,p=void 0);var m=this.getLine(F);return p==null&&(p=m.length),p=Math.min(Math.max(p,0),m.length),{row:F,column:p}},this.clonePos=function(F){return{row:F.row,column:F.column}},this.pos=function(F,p){return{row:F,column:p}},this.$clipPosition=function(F){var p=this.getLength();return F.row>=p?(F.row=Math.max(0,p-1),F.column=this.getLine(p-1).length):(F.row=Math.max(0,F.row),F.column=Math.min(Math.max(F.column,0),this.getLine(F.row).length)),F},this.insertFullLines=function(F,p){F=Math.min(Math.max(F,0),this.getLength());var f=0;F<this.getLength()?(p=p.concat([""]),f=0):(p=[""].concat(p),F--,f=this.$lines[F].length),this.insertMergedLines({row:F,column:f},p)},this.insertMergedLines=function(F,p){var f=this.clippedPos(F.row,F.column),m={row:f.row+p.length-1,column:(p.length==1?f.column:0)+p[p.length-1].length};return this.applyDelta({start:f,end:m,action:"insert",lines:p}),this.clonePos(m)},this.remove=function(F){var p=this.clippedPos(F.start.row,F.start.column),f=this.clippedPos(F.end.row,F.end.column);return this.applyDelta({start:p,end:f,action:"remove",lines:this.getLinesForRange({start:p,end:f})}),this.clonePos(p)},this.removeInLine=function(F,p,f){var m=this.clippedPos(F,p),v=this.clippedPos(F,f);return this.applyDelta({start:m,end:v,action:"remove",lines:this.getLinesForRange({start:m,end:v})},!0),this.clonePos(m)},this.removeFullLines=function(F,p){F=Math.min(Math.max(0,F),this.getLength()-1),p=Math.min(Math.max(0,p),this.getLength()-1);var f=p==this.getLength()-1&&F>0,m=p<this.getLength()-1,v=f?F-1:F,w=f?this.getLine(v).length:0,x=m?p+1:p,A=m?0:this.getLine(x).length,b=new l(v,w,x,A),y=this.$lines.slice(F,p+1);return this.applyDelta({start:b.start,end:b.end,action:"remove",lines:this.getLinesForRange(b)}),y},this.removeNewLine=function(F){F<this.getLength()-1&&F>=0&&this.applyDelta({start:this.pos(F,this.getLine(F).length),end:this.pos(F+1,0),action:"remove",lines:["",""]})},this.replace=function(F,p){if(F instanceof l||(F=l.fromPoints(F.start,F.end)),p.length===0&&F.isEmpty())return F.start;if(p==this.getTextRange(F))return F.end;this.remove(F);var f;return p?f=this.insert(F.start,p):f=F.start,f},this.applyDeltas=function(F){for(var p=0;p<F.length;p++)this.applyDelta(F[p])},this.revertDeltas=function(F){for(var p=F.length-1;p>=0;p--)this.revertDelta(F[p])},this.applyDelta=function(F,p){var f=F.action=="insert";(f?F.lines.length<=1&&!F.lines[0]:!l.comparePoints(F.start,F.end))||(f&&F.lines.length>2e4&&this.$splitAndapplyLargeDelta(F,2e4),h(this.$lines,F,p),this._signal("change",F))},this.$splitAndapplyLargeDelta=function(F,p){var f=F.lines,m=f.length,v=F.start.row,w=F.start.column,x=0,A=0;do{x=A,A+=p-1;var b=f.slice(x,A);if(A>m){F.lines=b,F.start.row=v+x,F.start.column=w;break}b.push(""),this.applyDelta({start:this.pos(v+x,w),end:this.pos(v+A,w=0),action:F.action,lines:b},!0)}while(!0)},this.revertDelta=function(F){this.applyDelta({start:this.clonePos(F.start),end:this.clonePos(F.end),action:F.action=="insert"?"remove":"insert",lines:F.lines.slice()})},this.indexToPosition=function(F,p){for(var f=this.$lines||this.getAllLines(),m=this.getNewLineCharacter().length,v=p||0,w=f.length;v<w;v++)if(F-=f[v].length+m,F<0)return{row:v,column:F+f[v].length+m};return{row:w-1,column:f[w-1].length}},this.positionToIndex=function(F,p){for(var f=this.$lines||this.getAllLines(),m=this.getNewLineCharacter().length,v=0,w=Math.min(F.row,f.length),x=p||0;x<w;++x)v+=f[x].length+m;return v+F.column}}).call(d.prototype),n.Document=d}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(u,n,a){var o=u("./lib/oop"),h=u("./lib/event_emitter").EventEmitter,g=function(l,c){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var d=this;this.$worker=function(){if(d.running){for(var F=new Date,p=d.currentLine,f=-1,m=d.doc,v=p;d.lines[p];)p++;var w=m.getLength(),x=0;for(d.running=!1;p<w;){d.$tokenizeRow(p),f=p;do p++;while(d.lines[p]);if(x++,x%5===0&&new Date-F>20){d.running=setTimeout(d.$worker,20);break}}d.currentLine=p,v<=f&&d.fireUpdateEvent(v,f)}}};(function(){o.implement(this,h),this.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(l,c){var d={first:l,last:c};this._signal("update",{data:d})},this.start=function(l){this.currentLine=Math.min(l||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(l){var c=l.start.row,d=l.end.row-c;if(d===0)this.lines[c]=null;else if(l.action=="remove")this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var F=Array(d+1);F.unshift(c,1),this.lines.splice.apply(this.lines,F),this.states.splice.apply(this.states,F)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},this.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},this.$tokenizeRow=function(l){var c=this.doc.getLine(l),d=this.states[l-1],F=this.tokenizer.getLineTokens(c,d,l);return this.states[l]+""!=F.state+""?(this.states[l]=F.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=F.tokens}}).call(g.prototype),n.BackgroundTokenizer=g}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(u,n,a){var o=u("./lib/lang");u("./lib/oop");var h=u("./range").Range,g=function(l,c,d){this.setRegexp(l),this.clazz=c,this.type=d||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},this.update=function(l,c,d,F){if(this.regExp)for(var p=F.firstRow,f=F.lastRow,m=p;m<=f;m++){var v=this.cache[m];v==null&&(v=o.getMatchOffsets(d.getLine(m),this.regExp),v.length>this.MAX_RANGES&&(v=v.slice(0,this.MAX_RANGES)),v=v.map(function(x){return new h(m,x.offset,m,x.offset+x.length)}),this.cache[m]=v.length?v:"");for(var w=v.length;w--;)c.drawSingleLineMarker(l,v[w].toScreenRange(d),this.clazz,F)}}}).call(g.prototype),n.SearchHighlight=g}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(u,n,a){var o=u("../range").Range;function h(g,l){this.foldData=g,Array.isArray(l)?this.folds=l:l=this.folds=[l];var c=l[l.length-1];this.range=new o(l[0].start.row,l[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(d){d.setFoldLine(this)},this)}(function(){this.shiftRow=function(g){this.start.row+=g,this.end.row+=g,this.folds.forEach(function(l){l.start.row+=g,l.end.row+=g})},this.addFold=function(g){if(g.sameRow){if(g.start.row<this.startRow||g.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(g),this.folds.sort(function(l,c){return-l.range.compareEnd(c.start.row,c.start.column)}),this.range.compareEnd(g.start.row,g.start.column)>0?(this.end.row=g.end.row,this.end.column=g.end.column):this.range.compareStart(g.end.row,g.end.column)<0&&(this.start.row=g.start.row,this.start.column=g.start.column)}else if(g.start.row==this.end.row)this.folds.push(g),this.end.row=g.end.row,this.end.column=g.end.column;else if(g.end.row==this.start.row)this.folds.unshift(g),this.start.row=g.start.row,this.start.column=g.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");g.foldLine=this},this.containsRow=function(g){return g>=this.start.row&&g<=this.end.row},this.walk=function(g,l,c){var d=0,F=this.folds,p,f,m,v=!0;l==null&&(l=this.end.row,c=this.end.column);for(var w=0;w<F.length;w++){if(p=F[w],f=p.range.compareStart(l,c),f==-1){g(null,l,c,d,v);return}if(m=g(null,p.start.row,p.start.column,d,v),m=!m&&g(p.placeholder,p.start.row,p.start.column,d),m||f===0)return;v=!p.sameRow,d=p.end.column}g(null,l,c,d,v)},this.getNextFoldTo=function(g,l){for(var c,d,F=0;F<this.folds.length;F++){if(c=this.folds[F],d=c.range.compareEnd(g,l),d==-1)return{fold:c,kind:"after"};if(d===0)return{fold:c,kind:"inside"}}return null},this.addRemoveChars=function(g,l,c){var d=this.getNextFoldTo(g,l),F,p;if(d){if(F=d.fold,d.kind=="inside"&&F.start.column!=l&&F.start.row!=g)window.console&&window.console.log(g,l,F);else if(F.start.row==g){p=this.folds;var f=p.indexOf(F);for(f===0&&(this.start.column+=c),f;f<p.length;f++){if(F=p[f],F.start.column+=c,!F.sameRow)return;F.end.column+=c}this.end.column+=c}}},this.split=function(g,l){var c=this.getNextFoldTo(g,l);if(!c||c.kind=="inside")return null;var d=c.fold,F=this.folds,p=this.foldData,f=F.indexOf(d),m=F[f-1];this.end.row=m.end.row,this.end.column=m.end.column,F=F.splice(f,F.length-f);var v=new h(p,F);return p.splice(p.indexOf(this)+1,0,v),v},this.merge=function(g){for(var l=g.folds,c=0;c<l.length;c++)this.addFold(l[c]);var d=this.foldData;d.splice(d.indexOf(g),1)},this.toString=function(){var g=[this.range.toString()+": ["];return this.folds.forEach(function(l){g.push("  "+l.toString())}),g.push("]"),g.join(`
`)},this.idxToPosition=function(g){for(var l=0,c=0;c<this.folds.length;c++){var d=this.folds[c];if(g-=d.start.column-l,g<0)return{row:d.start.row,column:d.start.column+g};if(g-=d.placeholder.length,g<0)return d.start;l=d.end.column}return{row:this.end.row,column:this.end.column+g}}}).call(h.prototype),n.FoldLine=h}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(u,n,a){var o=u("./range").Range,h=o.comparePoints,g=function(){this.ranges=[]};(function(){this.comparePoints=h,this.pointIndex=function(l,c,d){for(var F=this.ranges,p=d||0;p<F.length;p++){var f=F[p],m=h(l,f.end);if(!(m>0)){var v=h(l,f.start);return m===0?c&&v!==0?-p-2:p:v>0||v===0&&!c?p:-p-1}}return-p-1},this.add=function(l){var c=!l.isEmpty(),d=this.pointIndex(l.start,c);d<0&&(d=-d-1);var F=this.pointIndex(l.end,c,d);return F<0?F=-F-1:F++,this.ranges.splice(d,F-d,l)},this.addList=function(l){for(var c=[],d=l.length;d--;)c.push.apply(c,this.add(l[d]));return c},this.substractPoint=function(l){var c=this.pointIndex(l);if(c>=0)return this.ranges.splice(c,1)},this.merge=function(){var l=[],c=this.ranges;c=c.sort(function(m,v){return h(m.start,v.start)});for(var d=c[0],F,p=1;p<c.length;p++){F=d,d=c[p];var f=h(F.end,d.start);f<0||f==0&&!F.isEmpty()&&!d.isEmpty()||(h(F.end,d.end)<0&&(F.end.row=d.end.row,F.end.column=d.end.column),c.splice(p,1),l.push(d),d=F,p--)}return this.ranges=c,l},this.contains=function(l,c){return this.pointIndex({row:l,column:c})>=0},this.containsPoint=function(l){return this.pointIndex(l)>=0},this.rangeAtPoint=function(l){var c=this.pointIndex(l);if(c>=0)return this.ranges[c]},this.clipRows=function(l,c){var d=this.ranges;if(d[0].start.row>c||d[d.length-1].start.row<l)return[];var F=this.pointIndex({row:l,column:0});F<0&&(F=-F-1);var p=this.pointIndex({row:c,column:0},F);p<0&&(p=-p-1);for(var f=[],m=F;m<p;m++)f.push(d[m]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(l){this.session&&this.detach(),this.session=l,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(l){if(l.action=="insert")var c=l.start,d=l.end;else var d=l.start,c=l.end;for(var F=c.row,p=d.row,f=p-F,m=-c.column+d.column,v=this.ranges,w=0,x=v.length;w<x;w++){var A=v[w];if(!(A.end.row<F)){if(A.start.row>F)break;if(A.start.row==F&&A.start.column>=c.column&&(A.start.column==c.column&&this.$insertRight||(A.start.column+=m,A.start.row+=f)),A.end.row==F&&A.end.column>=c.column){if(A.end.column==c.column&&this.$insertRight)continue;A.end.column==c.column&&m>0&&w<x-1&&A.end.column>A.start.column&&A.end.column==v[w+1].start.column&&(A.end.column-=m),A.end.column+=m,A.end.row+=f}}}if(f!=0&&w<x)for(;w<x;w++){var A=v[w];A.start.row+=f,A.end.row+=f}}}).call(g.prototype),n.RangeList=g}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(u,n,a){u("../range").Range;var o=u("../range_list").RangeList,h=u("../lib/oop"),g=n.Fold=function(p,f){this.foldLine=null,this.placeholder=f,this.range=p,this.start=p.start,this.end=p.end,this.sameRow=p.start.row==p.end.row,this.subFolds=this.ranges=[]};h.inherits(g,o),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(p){this.foldLine=p,this.subFolds.forEach(function(f){f.setFoldLine(p)})},this.clone=function(){var p=this.range.clone(),f=new g(p,this.placeholder);return this.subFolds.forEach(function(m){f.subFolds.push(m.clone())}),f.collapseChildren=this.collapseChildren,f},this.addSubFold=function(p){if(!this.range.isEqual(p)){if(!this.range.containsRange(p))throw new Error("A fold can't intersect already existing fold"+p.range+this.range);c(p,this.start);for(var w=p.start.row,x=p.start.column,f=0,m=-1;f<this.subFolds.length&&(m=this.subFolds[f].range.compare(w,x),m==1);f++);var v=this.subFolds[f];if(m==0)return v.addSubFold(p);for(var w=p.range.end.row,x=p.range.end.column,A=f,m=-1;A<this.subFolds.length&&(m=this.subFolds[A].range.compare(w,x),m==1);A++);if(this.subFolds[A],m==0)throw new Error("A fold can't intersect already existing fold"+p.range+this.range);return this.subFolds.splice(f,A-f,p),p.setFoldLine(this.foldLine),p}},this.restoreRange=function(p){return F(p,this.start)}}.call(g.prototype);function l(p,f){p.row-=f.row,p.row==0&&(p.column-=f.column)}function c(p,f){l(p.start,f),l(p.end,f)}function d(p,f){p.row==0&&(p.column+=f.column),p.row+=f.row}function F(p,f){d(p.start,f),d(p.end,f)}}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"],function(u,n,a){var o=u("../range").Range,h=u("./fold_line").FoldLine,g=u("./fold").Fold,l=u("../token_iterator").TokenIterator;function c(){this.getFoldAt=function(d,F,p){var f=this.getFoldLine(d);if(!f)return null;for(var m=f.folds,v=0;v<m.length;v++){var w=m[v];if(w.range.contains(d,F)){if(p==1&&w.range.isEnd(d,F))continue;if(p==-1&&w.range.isStart(d,F))continue;return w}}},this.getFoldsInRange=function(d){var F=d.start,p=d.end,f=this.$foldData,m=[];F.column+=1,p.column-=1;for(var v=0;v<f.length;v++){var w=f[v].range.compareRange(d);if(w!=2){if(w==-2)break;for(var x=f[v].folds,A=0;A<x.length;A++){var b=x[A];if(w=b.range.compareRange(d),w==-2)break;if(w==2)continue;if(w==42)break;m.push(b)}}}return F.column-=1,p.column+=1,m},this.getFoldsInRangeList=function(d){if(Array.isArray(d)){var F=[];d.forEach(function(p){F=F.concat(this.getFoldsInRange(p))},this)}else var F=this.getFoldsInRange(d);return F},this.getAllFolds=function(){for(var d=[],F=this.$foldData,p=0;p<F.length;p++)for(var f=0;f<F[p].folds.length;f++)d.push(F[p].folds[f]);return d},this.getFoldStringAt=function(d,F,p,f){if(f=f||this.getFoldLine(d),!f)return null;for(var m={end:{column:0}},v,w,x=0;x<f.folds.length;x++){w=f.folds[x];var A=w.range.compareEnd(d,F);if(A==-1){v=this.getLine(w.start.row).substring(m.end.column,w.start.column);break}else if(A===0)return null;m=w}return v||(v=this.getLine(w.start.row).substring(m.end.column)),p==-1?v.substring(0,F-m.end.column):p==1?v.substring(F-m.end.column):v},this.getFoldLine=function(d,F){var p=this.$foldData,f=0;for(F&&(f=p.indexOf(F)),f==-1&&(f=0),f;f<p.length;f++){var m=p[f];if(m.start.row<=d&&m.end.row>=d)return m;if(m.end.row>d)return null}return null},this.getNextFoldLine=function(d,F){var p=this.$foldData,f=0;for(F&&(f=p.indexOf(F)),f==-1&&(f=0),f;f<p.length;f++){var m=p[f];if(m.end.row>=d)return m}return null},this.getFoldedRowCount=function(d,F){for(var p=this.$foldData,f=F-d+1,m=0;m<p.length;m++){var v=p[m],w=v.end.row,x=v.start.row;if(w>=F){x<F&&(x>=d?f-=F-x:f=0);break}else w>=d&&(x>=d?f-=w-x:f-=w-d+1)}return f},this.$addFoldLine=function(d){return this.$foldData.push(d),this.$foldData.sort(function(F,p){return F.start.row-p.start.row}),d},this.addFold=function(d,F){var p=this.$foldData,f=!1,m;d instanceof g?m=d:(m=new g(F,d),m.collapseChildren=F.collapseChildren),this.$clipRangeToDocument(m.range);var v=m.start.row,w=m.start.column,x=m.end.row,A=m.end.column;if(!(v<x||v==x&&w<=A-2))throw new Error("The range has to be at least 2 characters width");var b=this.getFoldAt(v,w,1),y=this.getFoldAt(x,A,-1);if(b&&y==b)return b.addSubFold(m);b&&!b.range.isStart(v,w)&&this.removeFold(b),y&&!y.range.isEnd(x,A)&&this.removeFold(y);var k=this.getFoldsInRange(m.range);k.length>0&&(this.removeFolds(k),k.forEach(function(S){m.addSubFold(S)}));for(var C=0;C<p.length;C++){var D=p[C];if(x==D.start.row){D.addFold(m),f=!0;break}else if(v==D.end.row){if(D.addFold(m),f=!0,!m.sameRow){var T=p[C+1];if(T&&T.start.row==x){D.merge(T);break}}break}else if(x<=D.start.row)break}return f||(D=this.$addFoldLine(new h(this.$foldData,m))),this.$useWrapMode?this.$updateWrapData(D.start.row,D.start.row):this.$updateRowLengthCache(D.start.row,D.start.row),this.$modified=!0,this._signal("changeFold",{data:m,action:"add"}),m},this.addFolds=function(d){d.forEach(function(F){this.addFold(F)},this)},this.removeFold=function(d){var F=d.foldLine,p=F.start.row,f=F.end.row,m=this.$foldData,v=F.folds;if(v.length==1)m.splice(m.indexOf(F),1);else if(F.range.isEnd(d.end.row,d.end.column))v.pop(),F.end.row=v[v.length-1].end.row,F.end.column=v[v.length-1].end.column;else if(F.range.isStart(d.start.row,d.start.column))v.shift(),F.start.row=v[0].start.row,F.start.column=v[0].start.column;else if(d.sameRow)v.splice(v.indexOf(d),1);else{var w=F.split(d.start.row,d.start.column);v=w.folds,v.shift(),w.start.row=v[0].start.row,w.start.column=v[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(p,f):this.$updateRowLengthCache(p,f)),this.$modified=!0,this._signal("changeFold",{data:d,action:"remove"})},this.removeFolds=function(d){for(var F=[],p=0;p<d.length;p++)F.push(d[p]);F.forEach(function(f){this.removeFold(f)},this),this.$modified=!0},this.expandFold=function(d){this.removeFold(d),d.subFolds.forEach(function(F){d.restoreRange(F),this.addFold(F)},this),d.collapseChildren>0&&this.foldAll(d.start.row+1,d.end.row,d.collapseChildren-1),d.subFolds=[]},this.expandFolds=function(d){d.forEach(function(F){this.expandFold(F)},this)},this.unfold=function(d,F){var p,f;if(d==null?(p=new o(0,0,this.getLength(),0),F=!0):typeof d=="number"?p=new o(d,0,d,this.getLine(d).length):"row"in d?p=o.fromPoints(d,d):p=d,f=this.getFoldsInRangeList(p),F)this.removeFolds(f);else for(var m=f;m.length;)this.expandFolds(m),m=this.getFoldsInRangeList(p);if(f.length)return f},this.isRowFolded=function(d,F){return!!this.getFoldLine(d,F)},this.getRowFoldEnd=function(d,F){var p=this.getFoldLine(d,F);return p?p.end.row:d},this.getRowFoldStart=function(d,F){var p=this.getFoldLine(d,F);return p?p.start.row:d},this.getFoldDisplayLine=function(d,F,p,f,m){f==null&&(f=d.start.row),m==null&&(m=0),F==null&&(F=d.end.row),p==null&&(p=this.getLine(F).length);var v=this.doc,w="";return d.walk(function(x,A,b,y){if(!(A<f)){if(A==f){if(b<m)return;y=Math.max(m,y)}x!=null?w+=x:w+=v.getLine(A).substring(y,b)}},F,p),w},this.getDisplayLine=function(d,F,p,f){var m=this.getFoldLine(d);if(m)return this.getFoldDisplayLine(m,d,F,p,f);var v;return v=this.doc.getLine(d),v.substring(f||0,F||v.length)},this.$cloneFoldData=function(){var d=[];return d=this.$foldData.map(function(F){var p=F.folds.map(function(f){return f.clone()});return new h(d,p)}),d},this.toggleFold=function(d){var F=this.selection,p=F.getRange(),f,m;if(p.isEmpty()){var v=p.start;if(f=this.getFoldAt(v.row,v.column),f){this.expandFold(f);return}else(m=this.findMatchingBracket(v))?p.comparePoint(m)==1?p.end=m:(p.start=m,p.start.column++,p.end.column--):(m=this.findMatchingBracket({row:v.row,column:v.column+1}))?(p.comparePoint(m)==1?p.end=m:p.start=m,p.start.column++):p=this.getCommentFoldRange(v.row,v.column)||p}else{var w=this.getFoldsInRange(p);if(d&&w.length){this.expandFolds(w);return}else w.length==1&&(f=w[0])}if(f||(f=this.getFoldAt(p.start.row,p.start.column)),f&&f.range.toString()==p.toString()){this.expandFold(f);return}var x="...";if(!p.isMultiLine()){if(x=this.getTextRange(p),x.length<4)return;x=x.trim().substring(0,2)+".."}this.addFold(x,p)},this.getCommentFoldRange=function(d,F,p){var f=new l(this,d,F),m=f.getCurrentToken();if(m&&/^comment|string/.test(m.type)){var v=new o,w=new RegExp(m.type.replace(/\..*/,"\\."));if(p!=1){do m=f.stepBackward();while(m&&w.test(m.type));f.stepForward()}if(v.start.row=f.getCurrentTokenRow(),v.start.column=f.getCurrentTokenColumn()+2,f=new l(this,d,F),p!=-1){do m=f.stepForward();while(m&&w.test(m.type));m=f.stepBackward()}else m=f.getCurrentToken();return v.end.row=f.getCurrentTokenRow(),v.end.column=f.getCurrentTokenColumn()+m.value.length-2,v}},this.foldAll=function(d,F,p){p==null&&(p=1e5);var f=this.foldWidgets;if(f){F=F||this.getLength(),d=d||0;for(var m=d;m<F;m++)if(f[m]==null&&(f[m]=this.getFoldWidget(m)),f[m]=="start"){var v=this.getFoldWidgetRange(m);if(v&&v.isMultiLine()&&v.end.row<=F&&v.start.row>=d){m=v.end.row;try{var w=this.addFold("...",v);w&&(w.collapseChildren=p)}catch{}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(d){if(!this.$foldStyles[d])throw new Error("invalid fold style: "+d+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=d){this.$foldStyle=d,d=="manual"&&this.unfold();var F=this.$foldMode;this.$setFolding(null),this.$setFolding(F)}},this.$setFolding=function(d){if(this.$foldMode!=d){if(this.$foldMode=d,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!d||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=d.getFoldWidget.bind(d,this,this.$foldStyle),this.getFoldWidgetRange=d.getFoldWidgetRange.bind(d,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.getParentFoldRangeData=function(d,F){var p=this.foldWidgets;if(!p||F&&p[d])return{};for(var f=d-1,m;f>=0;){var v=p[f];if(v==null&&(v=p[f]=this.getFoldWidget(f)),v=="start"){var w=this.getFoldWidgetRange(f);if(m||(m=w),w&&w.end.row>=d)break}f--}return{range:f!==-1&&w,firstRange:m}},this.onFoldWidgetClick=function(d,F){F=F.domEvent;var p={children:F.shiftKey,all:F.ctrlKey||F.metaKey,siblings:F.altKey},f=this.$toggleFoldWidget(d,p);if(!f){var m=F.target||F.srcElement;m&&/ace_fold-widget/.test(m.className)&&(m.className+=" ace_invalid")}},this.$toggleFoldWidget=function(d,F){if(this.getFoldWidget){var p=this.getFoldWidget(d),f=this.getLine(d),m=p==="end"?-1:1,v=this.getFoldAt(d,m===-1?0:f.length,m);if(v)return F.children||F.all?this.removeFold(v):this.expandFold(v),v;var w=this.getFoldWidgetRange(d,!0);if(w&&!w.isMultiLine()&&(v=this.getFoldAt(w.start.row,w.start.column,1),v&&w.isEqual(v.range)))return this.removeFold(v),v;if(F.siblings){var x=this.getParentFoldRangeData(d);if(x.range)var A=x.range.start.row+1,b=x.range.end.row;this.foldAll(A,b,F.all?1e4:0)}else F.children?(b=w?w.end.row:this.getLength(),this.foldAll(d+1,b,F.all?1e4:0)):w&&(F.all&&(w.collapseChildren=1e4),this.addFold("...",w));return w}},this.toggleFoldWidget=function(d){var F=this.selection.getCursor().row;F=this.getRowFoldStart(F);var p=this.$toggleFoldWidget(F,{});if(!p){var f=this.getParentFoldRangeData(F,!0);if(p=f.range||f.firstRange,p){F=p.start.row;var m=this.getFoldAt(F,this.getLine(F).length,1);m?this.removeFold(m):this.addFold("...",p)}}},this.updateFoldWidgets=function(d){var F=d.start.row,p=d.end.row-F;if(p===0)this.foldWidgets[F]=null;else if(d.action=="remove")this.foldWidgets.splice(F,p+1,null);else{var f=Array(p+1);f.unshift(F,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}},this.tokenizerUpdateFoldWidgets=function(d){var F=d.data;F.first!=F.last&&this.foldWidgets.length>F.first&&this.foldWidgets.splice(F.first,this.foldWidgets.length)}}n.Folding=c}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(u,n,a){var o=u("../token_iterator").TokenIterator,h=u("../range").Range;function g(){this.findMatchingBracket=function(l,c){if(l.column==0)return null;var d=c||this.getLine(l.row).charAt(l.column-1);if(d=="")return null;var F=d.match(/([\(\[\{])|([\)\]\}])/);return F?F[1]?this.$findClosingBracket(F[1],l):this.$findOpeningBracket(F[2],l):null},this.getBracketRange=function(l){var c=this.getLine(l.row),d=!0,F,p=c.charAt(l.column-1),f=p&&p.match(/([\(\[\{])|([\)\]\}])/);if(f||(p=c.charAt(l.column),l={row:l.row,column:l.column+1},f=p&&p.match(/([\(\[\{])|([\)\]\}])/),d=!1),!f)return null;if(f[1]){var m=this.$findClosingBracket(f[1],l);if(!m)return null;F=h.fromPoints(l,m),d||(F.end.column++,F.start.column--),F.cursor=F.end}else{var m=this.$findOpeningBracket(f[2],l);if(!m)return null;F=h.fromPoints(m,l),d||(F.start.column++,F.end.column--),F.cursor=F.start}return F},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(l,c,d){var F=this.$brackets[l],p=1,f=new o(this,c.row,c.column),m=f.getCurrentToken();if(m||(m=f.stepForward()),!!m){d||(d=new RegExp("(\\.?"+m.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var v=c.column-f.getCurrentTokenColumn()-2,w=m.value;;){for(;v>=0;){var x=w.charAt(v);if(x==F){if(p-=1,p==0)return{row:f.getCurrentTokenRow(),column:v+f.getCurrentTokenColumn()}}else x==l&&(p+=1);v-=1}do m=f.stepBackward();while(m&&!d.test(m.type));if(m==null)break;w=m.value,v=w.length-1}return null}},this.$findClosingBracket=function(l,c,d){var F=this.$brackets[l],p=1,f=new o(this,c.row,c.column),m=f.getCurrentToken();if(m||(m=f.stepForward()),!!m){d||(d=new RegExp("(\\.?"+m.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var v=c.column-f.getCurrentTokenColumn();;){for(var w=m.value,x=w.length;v<x;){var A=w.charAt(v);if(A==F){if(p-=1,p==0)return{row:f.getCurrentTokenRow(),column:v+f.getCurrentTokenColumn()}}else A==l&&(p+=1);v+=1}do m=f.stepForward();while(m&&!d.test(m.type));if(m==null)break;v=0}return null}}}n.BracketMatch=g}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","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(u,n,a){var o=u("./lib/oop"),h=u("./lib/lang"),g=u("./config"),l=u("./lib/event_emitter").EventEmitter,c=u("./selection").Selection,d=u("./mode/text").Mode,F=u("./range").Range,p=u("./document").Document,f=u("./background_tokenizer").BackgroundTokenizer,m=u("./search_highlight").SearchHighlight,v=function(w,x){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++v.$uid,this.$foldData.toString=function(){return this.join(`
`)},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof w!="object"||!w.getLine)&&(w=new p(w)),this.setDocument(w),this.selection=new c(this),g.resetOptions(this),this.setMode(x),g._signal("session",this)};(function(){o.implement(this,l),this.setDocument=function(S){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=S,S.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(S){if(!S){this.$docRowCache=[],this.$screenRowCache=[];return}var M=this.$docRowCache.length,R=this.$getRowCacheIndex(this.$docRowCache,S)+1;M>R&&(this.$docRowCache.splice(R,M),this.$screenRowCache.splice(R,M))},this.$getRowCacheIndex=function(S,M){for(var R=0,O=S.length-1;R<=O;){var H=R+O>>1,Y=S[H];if(M>Y)R=H+1;else if(M<Y)O=H-1;else return H}return R-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(S){var M=S.data;this.$resetRowCache(M.start.row)},this.onChange=function(S){this.$modified=!0,this.$resetRowCache(S.start.row);var M=this.$updateInternalDataOnChange(S);!this.$fromUndo&&this.$undoManager&&!S.ignore&&(this.$deltasDoc.push(S),M&&M.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:M}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(S),this._signal("change",S)},this.setValue=function(S){this.doc.setValue(S),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],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(S){return this.bgTokenizer.getState(S)},this.getTokens=function(S){return this.bgTokenizer.getTokens(S)},this.getTokenAt=function(S,M){var R=this.bgTokenizer.getTokens(S),O,H=0;if(M==null)Y=R.length-1,H=this.getLine(S).length;else for(var Y=0;Y<R.length&&(H+=R[Y].value.length,!(H>=M));Y++);return O=R[Y],O?(O.index=Y,O.start=H-O.value.length,O):null},this.setUndoManager=function(S){if(this.$undoManager=S,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),S){var M=this;this.$syncInformUndoManager=function(){M.$informUndoManager.cancel(),M.$deltasFold.length&&(M.$deltas.push({group:"fold",deltas:M.$deltasFold}),M.$deltasFold=[]),M.$deltasDoc.length&&(M.$deltas.push({group:"doc",deltas:M.$deltasDoc}),M.$deltasDoc=[]),M.$deltas.length>0&&S.execute({action:"aceupdate",args:[M.$deltas,M],merge:M.mergeUndoDeltas}),M.mergeUndoDeltas=!1,M.$deltas=[]},this.$informUndoManager=h.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?h.stringRepeat(" ",this.getTabSize()):"	"},this.setUseSoftTabs=function(S){this.setOption("useSoftTabs",S)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(S){this.setOption("tabSize",S)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(S){return this.$useSoftTabs&&S.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(S){this.setOption("overwrite",S)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(S,M){this.$decorations[S]||(this.$decorations[S]=""),this.$decorations[S]+=" "+M,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(S,M){this.$decorations[S]=(this.$decorations[S]||"").replace(" "+M,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(S){this.$breakpoints=[];for(var M=0;M<S.length;M++)this.$breakpoints[S[M]]="ace_breakpoint";this._signal("changeBreakpoint",{})},this.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},this.setBreakpoint=function(S,M){M===void 0&&(M="ace_breakpoint"),M?this.$breakpoints[S]=M:delete this.$breakpoints[S],this._signal("changeBreakpoint",{})},this.clearBreakpoint=function(S){delete this.$breakpoints[S],this._signal("changeBreakpoint",{})},this.addMarker=function(S,M,R,O){var H=this.$markerId++,Y={range:S,type:R||"line",renderer:typeof R=="function"?R:null,clazz:M,inFront:!!O,id:H};return O?(this.$frontMarkers[H]=Y,this._signal("changeFrontMarker")):(this.$backMarkers[H]=Y,this._signal("changeBackMarker")),H},this.addDynamicMarker=function(S,M){if(S.update){var R=this.$markerId++;return S.id=R,S.inFront=!!M,M?(this.$frontMarkers[R]=S,this._signal("changeFrontMarker")):(this.$backMarkers[R]=S,this._signal("changeBackMarker")),S}},this.removeMarker=function(S){var M=this.$frontMarkers[S]||this.$backMarkers[S];if(M){var R=M.inFront?this.$frontMarkers:this.$backMarkers;M&&(delete R[S],this._signal(M.inFront?"changeFrontMarker":"changeBackMarker"))}},this.getMarkers=function(S){return S?this.$frontMarkers:this.$backMarkers},this.highlight=function(S){if(!this.$searchHighlight){var M=new m(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(M)}this.$searchHighlight.setRegexp(S)},this.highlightLines=function(S,M,R,O){typeof M!="number"&&(R=M,M=S),R||(R="ace_step");var H=new F(S,0,M,1/0);return H.id=this.addMarker(H,R,"fullLine",O),H},this.setAnnotations=function(S){this.$annotations=S,this._signal("changeAnnotation",{})},this.getAnnotations=function(){return this.$annotations||[]},this.clearAnnotations=function(){this.setAnnotations([])},this.$detectNewLine=function(S){var M=S.match(/^.*?(\r?\n)/m);M?this.$autoNewLine=M[1]:this.$autoNewLine=`
`},this.getWordRange=function(S,M){var R=this.getLine(S),O=!1;if(M>0&&(O=!!R.charAt(M-1).match(this.tokenRe)),O||(O=!!R.charAt(M).match(this.tokenRe)),O)var H=this.tokenRe;else if(/^\s+$/.test(R.slice(M-1,M+1)))var H=/\s/;else var H=this.nonTokenRe;var Y=M;if(Y>0){do Y--;while(Y>=0&&R.charAt(Y).match(H));Y++}for(var J=M;J<R.length&&R.charAt(J).match(H);)J++;return new F(S,Y,S,J)},this.getAWordRange=function(S,M){for(var R=this.getWordRange(S,M),O=this.getLine(R.end.row);O.charAt(R.end.column).match(/[ \t]/);)R.end.column+=1;return R},this.setNewLineMode=function(S){this.doc.setNewLineMode(S)},this.getNewLineMode=function(){return this.doc.getNewLineMode()},this.setUseWorker=function(S){this.setOption("useWorker",S)},this.getUseWorker=function(){return this.$useWorker},this.onReloadTokenizer=function(S){var M=S.data;this.bgTokenizer.start(M.first),this._signal("tokenizerUpdate",S)},this.$modes={},this.$mode=null,this.$modeId=null,this.setMode=function(S,M){if(S&&typeof S=="object"){if(S.getTokenizer)return this.$onChangeMode(S);var R=S,O=R.path}else O=S||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new d),this.$modes[O]&&!R){this.$onChangeMode(this.$modes[O]),M&&M();return}this.$modeId=O,g.loadModule(["mode",O],function(H){if(this.$modeId!==O)return M&&M();this.$modes[O]&&!R?this.$onChangeMode(this.$modes[O]):H&&H.Mode&&(H=new H.Mode(R),R||(this.$modes[O]=H,H.$id=O),this.$onChangeMode(H)),M&&M()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},this.$onChangeMode=function(S,M){if(M||(this.$modeId=S.$id),this.$mode!==S){this.$mode=S,this.$stopWorker(),this.$useWorker&&this.$startWorker();var R=S.getTokenizer();if(R.addEventListener!==void 0){var O=this.onReloadTokenizer.bind(this);R.addEventListener("update",O)}if(this.bgTokenizer)this.bgTokenizer.setTokenizer(R);else{this.bgTokenizer=new f(R);var H=this;this.bgTokenizer.addEventListener("update",function(Y){H._signal("tokenizerUpdate",Y)})}this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=S.tokenRe,this.nonTokenRe=S.nonTokenRe,M||(S.attachToSession&&S.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(S.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode"))}},this.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},this.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(S){g.warn("Could not load worker",S),this.$worker=null}},this.getMode=function(){return this.$mode},this.$scrollTop=0,this.setScrollTop=function(S){this.$scrollTop===S||isNaN(S)||(this.$scrollTop=S,this._signal("changeScrollTop",S))},this.getScrollTop=function(){return this.$scrollTop},this.$scrollLeft=0,this.setScrollLeft=function(S){this.$scrollLeft===S||isNaN(S)||(this.$scrollLeft=S,this._signal("changeScrollLeft",S))},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(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var S=0;return this.lineWidgets.forEach(function(M){M&&M.screenWidth>S&&(S=M.screenWidth)}),this.lineWidgetWidth=S},this.$computeWidth=function(S){if(this.$modified||S){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var M=this.doc.getAllLines(),R=this.$rowLengthCache,O=0,H=0,Y=this.$foldData[H],J=Y?Y.start.row:1/0,Z=M.length,te=0;te<Z;te++){if(te>J){if(te=Y.end.row+1,te>=Z)break;Y=this.$foldData[H++],J=Y?Y.start.row:1/0}R[te]==null&&(R[te]=this.$getStringScreenWidth(M[te])[0]),R[te]>O&&(O=R[te])}this.screenWidth=O}},this.getLine=function(S){return this.doc.getLine(S)},this.getLines=function(S,M){return this.doc.getLines(S,M)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(S){return this.doc.getTextRange(S||this.selection.getRange())},this.insert=function(S,M){return this.doc.insert(S,M)},this.remove=function(S){return this.doc.remove(S)},this.removeFullLines=function(S,M){return this.doc.removeFullLines(S,M)},this.undoChanges=function(S,M){if(S.length){this.$fromUndo=!0;for(var R=null,O=S.length-1;O!=-1;O--){var H=S[O];H.group=="doc"?(this.doc.revertDeltas(H.deltas),R=this.$getUndoSelection(H.deltas,!0,R)):H.deltas.forEach(function(Y){this.addFolds(Y.folds)},this)}return this.$fromUndo=!1,R&&this.$undoSelect&&!M&&this.selection.setSelectionRange(R),R}},this.redoChanges=function(S,M){if(S.length){this.$fromUndo=!0;for(var R=null,O=0;O<S.length;O++){var H=S[O];H.group=="doc"&&(this.doc.applyDeltas(H.deltas),R=this.$getUndoSelection(H.deltas,!1,R))}return this.$fromUndo=!1,R&&this.$undoSelect&&!M&&this.selection.setSelectionRange(R),R}},this.setUndoSelect=function(S){this.$undoSelect=S},this.$getUndoSelection=function(S,M,R){function O(ie){return M?ie.action!=="insert":ie.action==="insert"}var H=S[0],Y,J;O(H)?Y=F.fromPoints(H.start,H.end):Y=F.fromPoints(H.start,H.start);for(var Z=1;Z<S.length;Z++)H=S[Z],O(H)?(J=H.start,Y.compare(J.row,J.column)==-1&&Y.setStart(J),J=H.end,Y.compare(J.row,J.column)==1&&Y.setEnd(J)):(J=H.start,Y.compare(J.row,J.column)==-1&&(Y=F.fromPoints(H.start,H.start)));if(R!=null){F.comparePoints(R.start,Y.start)===0&&(R.start.column+=Y.end.column-Y.start.column,R.end.column+=Y.end.column-Y.start.column);var te=R.compareRange(Y);te==1?Y.setStart(R.start):te==-1&&Y.setEnd(R.end)}return Y},this.replace=function(S,M){return this.doc.replace(S,M)},this.moveText=function(S,M,R){var O=this.getTextRange(S),H=this.getFoldsInRange(S),Y=F.fromPoints(M,M);if(!R){this.remove(S);var J=S.start.row-S.end.row,Z=J?-S.end.column:S.start.column-S.end.column;Z&&(Y.start.row==S.end.row&&Y.start.column>S.end.column&&(Y.start.column+=Z),Y.end.row==S.end.row&&Y.end.column>S.end.column&&(Y.end.column+=Z)),J&&Y.start.row>=S.end.row&&(Y.start.row+=J,Y.end.row+=J)}if(Y.end=this.insert(Y.start,O),H.length){var te=S.start,ie=Y.start,J=ie.row-te.row,Z=ie.column-te.column;this.addFolds(H.map(function(ne){return ne=ne.clone(),ne.start.row==te.row&&(ne.start.column+=Z),ne.end.row==te.row&&(ne.end.column+=Z),ne.start.row+=J,ne.end.row+=J,ne}))}return Y},this.indentRows=function(S,M,R){R=R.replace(/\t/g,this.getTabString());for(var O=S;O<=M;O++)this.doc.insertInLine({row:O,column:0},R)},this.outdentRows=function(S){for(var M=S.collapseRows(),R=new F(0,0,0,0),O=this.getTabSize(),H=M.start.row;H<=M.end.row;++H){var Y=this.getLine(H);R.start.row=H,R.end.row=H;for(var J=0;J<O&&Y.charAt(J)==" ";++J);J<O&&Y.charAt(J)=="	"?(R.start.column=J,R.end.column=J+1):(R.start.column=0,R.end.column=J),this.remove(R)}},this.$moveLines=function(S,M,R){if(S=this.getRowFoldStart(S),M=this.getRowFoldEnd(M),R<0){var O=this.getRowFoldStart(S+R);if(O<0)return 0;var H=O-S}else if(R>0){var O=this.getRowFoldEnd(M+R);if(O>this.doc.getLength()-1)return 0;var H=O-M}else{S=this.$clipRowToDocument(S),M=this.$clipRowToDocument(M);var H=M-S+1}var Y=new F(S,0,M,Number.MAX_VALUE),J=this.getFoldsInRange(Y).map(function(te){return te=te.clone(),te.start.row+=H,te.end.row+=H,te}),Z=R==0?this.doc.getLines(S,M):this.doc.removeFullLines(S,M);return this.doc.insertFullLines(S+H,Z),J.length&&this.addFolds(J),H},this.moveLinesUp=function(S,M){return this.$moveLines(S,M,-1)},this.moveLinesDown=function(S,M){return this.$moveLines(S,M,1)},this.duplicateLines=function(S,M){return this.$moveLines(S,M,0)},this.$clipRowToDocument=function(S){return Math.max(0,Math.min(S,this.doc.getLength()-1))},this.$clipColumnToRow=function(S,M){return M<0?0:Math.min(this.doc.getLine(S).length,M)},this.$clipPositionToDocument=function(S,M){if(M=Math.max(0,M),S<0)S=0,M=0;else{var R=this.doc.getLength();S>=R?(S=R-1,M=this.doc.getLine(R-1).length):M=Math.min(this.doc.getLine(S).length,M)}return{row:S,column:M}},this.$clipRangeToDocument=function(S){S.start.row<0?(S.start.row=0,S.start.column=0):S.start.column=this.$clipColumnToRow(S.start.row,S.start.column);var M=this.doc.getLength()-1;return S.end.row>M?(S.end.row=M,S.end.column=this.doc.getLine(M).length):S.end.column=this.$clipColumnToRow(S.end.row,S.end.column),S},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(S){if(S!=this.$useWrapMode){if(this.$useWrapMode=S,this.$modified=!0,this.$resetRowCache(0),S){var M=this.getLength();this.$wrapData=Array(M),this.$updateWrapData(0,M-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(S,M){(this.$wrapLimitRange.min!==S||this.$wrapLimitRange.max!==M)&&(this.$wrapLimitRange={min:S,max:M},this.$modified=!0,this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(S,M){var R=this.$wrapLimitRange;R.max<0&&(R={min:M,max:M});var O=this.$constrainWrapLimit(S,R.min,R.max);return O!=this.$wrapLimit&&O>1?(this.$wrapLimit=O,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(S,M,R){return M&&(S=Math.max(M,S)),R&&(S=Math.min(R,S)),S},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(S){this.setWrapLimitRange(S,S)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(S){var M=this.$useWrapMode,R=S.action,O=S.start,H=S.end,Y=O.row,J=H.row,Z=J-Y,te=null;if(this.$updating=!0,Z!=0)if(R==="remove"){this[M?"$wrapData":"$rowLengthCache"].splice(Y,Z);var ie=this.$foldData;te=this.getFoldsInRange(S),this.removeFolds(te);var se=this.getFoldLine(H.row),ue=0;if(se){se.addRemoveChars(H.row,H.column,O.column-H.column),se.shiftRow(-Z);var ne=this.getFoldLine(Y);ne&&ne!==se&&(ne.merge(se),se=ne),ue=ie.indexOf(se)+1}for(ue;ue<ie.length;ue++){var se=ie[ue];se.start.row>=H.row&&se.shiftRow(-Z)}J=Y}else{var G=Array(Z);G.unshift(Y,0);var K=M?this.$wrapData:this.$rowLengthCache;K.splice.apply(K,G);var ie=this.$foldData,se=this.getFoldLine(Y),ue=0;if(se){var le=se.range.compareInside(O.row,O.column);le==0?(se=se.split(O.row,O.column),se&&(se.shiftRow(Z),se.addRemoveChars(J,0,H.column-O.column))):le==-1&&(se.addRemoveChars(Y,0,H.column-O.column),se.shiftRow(Z)),ue=ie.indexOf(se)+1}for(ue;ue<ie.length;ue++){var se=ie[ue];se.start.row>=Y&&se.shiftRow(Z)}}else{Z=Math.abs(S.start.column-S.end.column),R==="remove"&&(te=this.getFoldsInRange(S),this.removeFolds(te),Z=-Z);var se=this.getFoldLine(Y);se&&se.addRemoveChars(Y,O.column,Z)}return M&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,M?this.$updateWrapData(Y,J):this.$updateRowLengthCache(Y,J),te},this.$updateRowLengthCache=function(S,M,R){this.$rowLengthCache[S]=null,this.$rowLengthCache[M]=null},this.$updateWrapData=function(S,M){var R=this.doc.getAllLines(),O=this.getTabSize(),H=this.$wrapData,Y=this.$wrapLimit,J,Z,te=S;for(M=Math.min(M,R.length-1);te<=M;)Z=this.getFoldLine(te,Z),Z?(J=[],Z.walk(function(ie,se,ue,ne){var G;if(ie!=null){G=this.$getDisplayTokens(ie,J.length),G[0]=A;for(var K=1;K<G.length;K++)G[K]=b}else G=this.$getDisplayTokens(R[se].substring(ne,ue),J.length);J=J.concat(G)}.bind(this),Z.end.row,R[Z.end.row].length+1),H[Z.start.row]=this.$computeWrapSplits(J,Y,O),te=Z.end.row+1):(J=this.$getDisplayTokens(R[te]),H[te]=this.$computeWrapSplits(J,Y,O),te++)};var w=1,x=2,A=3,b=4,y=9,k=10,C=11,D=12;this.$computeWrapSplits=function(S,M,R){if(S.length==0)return[];var O=[],H=S.length,Y=0,J=0,Z=this.$wrapAsCode,te=this.$indentedSoftWrap,ie=M<=Math.max(2*R,8)||te===!1?0:Math.floor(M/2);function se(){var le=0;if(ie===0)return le;if(te)for(var re=0;re<S.length;re++){var ae=S[re];if(ae==k)le+=1;else if(ae==C)le+=R;else{if(ae==D)continue;break}}return Z&&te!==!1&&(le+=R),Math.min(le,ie)}function ue(le){var re=S.slice(Y,le),ae=re.length;re.join("").replace(/12/g,function(){ae-=1}).replace(/2/g,function(){ae-=1}),O.length||(ne=se(),O.indent=ne),J+=ae,O.push(J),Y=le}for(var ne=0;H-Y>M-ne;){var G=Y+M-ne;if(S[G-1]>=k&&S[G]>=k){ue(G);continue}if(S[G]==A||S[G]==b){for(G;G!=Y-1&&S[G]!=A;G--);if(G>Y){ue(G);continue}for(G=Y+M,G;G<S.length&&S[G]==b;G++);if(G==S.length)break;ue(G);continue}for(var K=Math.max(G-(M-(M>>2)),Y-1);G>K&&S[G]<A;)G--;if(Z){for(;G>K&&S[G]<A;)G--;for(;G>K&&S[G]==y;)G--}else for(;G>K&&S[G]<k;)G--;if(G>K){ue(++G);continue}G=Y+M,S[G]==x&&G--,ue(G-ne)}return O},this.$getDisplayTokens=function(S,M){var R=[],O;M=M||0;for(var H=0;H<S.length;H++){var Y=S.charCodeAt(H);if(Y==9){O=this.getScreenTabSize(R.length+M),R.push(C);for(var J=1;J<O;J++)R.push(D)}else Y==32?R.push(k):Y>39&&Y<48||Y>57&&Y<64?R.push(y):Y>=4352&&T(Y)?R.push(w,x):R.push(w)}return R},this.$getStringScreenWidth=function(S,M,R){if(M==0)return[0,0];M==null&&(M=1/0),R=R||0;var O,H;for(H=0;H<S.length&&(O=S.charCodeAt(H),O==9?R+=this.getScreenTabSize(R):O>=4352&&T(O)?R+=2:R+=1,!(R>M));H++);return[R,H]},this.lineWidgets=null,this.getRowLength=function(S){if(this.lineWidgets)var M=this.lineWidgets[S]&&this.lineWidgets[S].rowCount||0;else M=0;return!this.$useWrapMode||!this.$wrapData[S]?1+M:this.$wrapData[S].length+1+M},this.getRowLineCount=function(S){return!this.$useWrapMode||!this.$wrapData[S]?1:this.$wrapData[S].length+1},this.getRowWrapIndent=function(S){if(this.$useWrapMode){var M=this.screenToDocumentPosition(S,Number.MAX_VALUE),R=this.$wrapData[M.row];return R.length&&R[0]<M.column?R.indent:0}else return 0},this.getScreenLastRowColumn=function(S){var M=this.screenToDocumentPosition(S,Number.MAX_VALUE);return this.documentToScreenColumn(M.row,M.column)},this.getDocumentLastRowColumn=function(S,M){var R=this.documentToScreenRow(S,M);return this.getScreenLastRowColumn(R)},this.getDocumentLastRowColumnPosition=function(S,M){var R=this.documentToScreenRow(S,M);return this.screenToDocumentPosition(R,Number.MAX_VALUE/10)},this.getRowSplitData=function(S){if(this.$useWrapMode)return this.$wrapData[S]},this.getScreenTabSize=function(S){return this.$tabSize-S%this.$tabSize},this.screenToDocumentRow=function(S,M){return this.screenToDocumentPosition(S,M).row},this.screenToDocumentColumn=function(S,M){return this.screenToDocumentPosition(S,M).column},this.screenToDocumentPosition=function(S,M){if(S<0)return{row:0,column:0};var R,O=0,H=0,Y,J=0,Z=0,te=this.$screenRowCache,ie=this.$getRowCacheIndex(te,S),se=te.length;if(se&&ie>=0)var J=te[ie],O=this.$docRowCache[ie],ue=S>te[se-1];else var ue=!se;for(var ne=this.getLength()-1,G=this.getNextFoldLine(O),K=G?G.start.row:1/0;J<=S&&(Z=this.getRowLength(O),!(J+Z>S||O>=ne));)J+=Z,O++,O>K&&(O=G.end.row+1,G=this.getNextFoldLine(O,G),K=G?G.start.row:1/0),ue&&(this.$docRowCache.push(O),this.$screenRowCache.push(J));if(G&&G.start.row<=O)R=this.getFoldDisplayLine(G),O=G.start.row;else{if(J+Z<=S||O>ne)return{row:ne,column:this.getLine(ne).length};R=this.getLine(O),G=null}var le=0;if(this.$useWrapMode){var re=this.$wrapData[O];if(re){var ae=Math.floor(S-J);Y=re[ae],ae>0&&re.length&&(le=re.indent,H=re[ae-1]||re[re.length-1],R=R.substring(H))}}return H+=this.$getStringScreenWidth(R,M-le)[1],this.$useWrapMode&&H>=Y&&(H=Y-1),G?G.idxToPosition(H):{row:O,column:H}},this.documentToScreenPosition=function(S,M){if(typeof M>"u")var R=this.$clipPositionToDocument(S.row,S.column);else R=this.$clipPositionToDocument(S,M);S=R.row,M=R.column;var O=0,H=null,Y=null;Y=this.getFoldAt(S,M,1),Y&&(S=Y.start.row,M=Y.start.column);var J,Z=0,te=this.$docRowCache,ie=this.$getRowCacheIndex(te,S),se=te.length;if(se&&ie>=0)var Z=te[ie],O=this.$screenRowCache[ie],ue=S>te[se-1];else var ue=!se;for(var ne=this.getNextFoldLine(Z),G=ne?ne.start.row:1/0;Z<S;){if(Z>=G){if(J=ne.end.row+1,J>S)break;ne=this.getNextFoldLine(J,ne),G=ne?ne.start.row:1/0}else J=Z+1;O+=this.getRowLength(Z),Z=J,ue&&(this.$docRowCache.push(Z),this.$screenRowCache.push(O))}var K="";ne&&Z>=G?(K=this.getFoldDisplayLine(ne,S,M),H=ne.start.row):(K=this.getLine(S).substring(0,M),H=S);var le=0;if(this.$useWrapMode){var re=this.$wrapData[H];if(re){for(var ae=0;K.length>=re[ae];)O++,ae++;K=K.substring(re[ae-1]||0,K.length),le=ae>0?re.indent:0}}return{row:O,column:le+this.$getStringScreenWidth(K)[0]}},this.documentToScreenColumn=function(S,M){return this.documentToScreenPosition(S,M).column},this.documentToScreenRow=function(S,M){return this.documentToScreenPosition(S,M).row},this.getScreenLength=function(){var S=0,M=null;if(this.$useWrapMode)for(var H=this.$wrapData.length,Y=0,O=0,M=this.$foldData[O++],J=M?M.start.row:1/0;Y<H;){var Z=this.$wrapData[Y];S+=Z?Z.length+1:1,Y++,Y>J&&(Y=M.end.row+1,M=this.$foldData[O++],J=M?M.start.row:1/0)}else{S=this.getLength();for(var R=this.$foldData,O=0;O<R.length;O++)M=R[O],S-=M.end.row-M.start.row}return this.lineWidgets&&(S+=this.$getWidgetScreenLength()),S},this.$setFontMetrics=function(S){this.$enableVarChar&&(this.$getStringScreenWidth=function(M,R,O){if(R===0)return[0,0];R||(R=1/0),O=O||0;var H,Y;for(Y=0;Y<M.length&&(H=M.charAt(Y),H==="	"?O+=this.getScreenTabSize(O):O+=S.getCharacterWidth(H),!(O>R));Y++);return[O,Y]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()};function T(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}}).call(v.prototype),u("./edit_session/folding").Folding.call(v.prototype),u("./edit_session/bracket_match").BracketMatch.call(v.prototype),g.defineOptions(v.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var x=typeof w=="number"?w:null;this.setWrapLimitRange(x,x),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$modified=!0,this.$resetRowCache(0),this.$updateWrapData(0,this.getLength()-1)))},initialValue:"auto"},indentedSoftWrap:{initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){isNaN(w)||this.$tabSize===w||(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId}}}),n.EditSession=v}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(u,n,a){var o=u("./lib/lang"),h=u("./lib/oop"),g=u("./range").Range,l=function(){this.$options={}};(function(){this.set=function(d){return h.mixin(this.$options,d),this},this.getOptions=function(){return o.copyObject(this.$options)},this.setOptions=function(d){this.$options=d},this.find=function(d){var F=this.$options,p=this.$matchIterator(d,F);if(!p)return!1;var f=null;return p.forEach(function(m,v,w){if(m.start)f=m;else{var x=m.offset+(w||0);if(f=new g(v,x,v,x+m.length),!m.length&&F.start&&F.start.start&&F.skipCurrent!=!1&&f.isEqual(F.start))return f=null,!1}return!0}),f},this.findAll=function(d){var F=this.$options;if(!F.needle)return[];this.$assembleRegExp(F);var p=F.range,f=p?d.getLines(p.start.row,p.end.row):d.doc.getAllLines(),m=[],v=F.re;if(F.$isMultiLine){var w=v.length,x=f.length-w,A;e:for(var b=v.offset||0;b<=x;b++){for(var y=0;y<w;y++)if(f[b+y].search(v[y])==-1)continue e;var k=f[b],C=f[b+w-1],D=k.length-k.match(v[0])[0].length,T=C.match(v[w-1])[0].length;A&&A.end.row===b&&A.end.column>D||(m.push(A=new g(b,D,b+w-1,T)),w>2&&(b=b+w-2))}}else for(var S=0;S<f.length;S++)for(var M=o.getMatchOffsets(f[S],v),y=0;y<M.length;y++){var R=M[y];m.push(new g(S,R.offset,S,R.offset+R.length))}if(p){for(var O=p.start.column,H=p.start.column,S=0,y=m.length-1;S<y&&m[S].start.column<O&&m[S].start.row==p.start.row;)S++;for(;S<y&&m[y].end.column>H&&m[y].end.row==p.end.row;)y--;for(m=m.slice(S,y+1),S=0,y=m.length;S<y;S++)m[S].start.row+=p.start.row,m[S].end.row+=p.start.row}return m},this.replace=function(d,F){var p=this.$options,f=this.$assembleRegExp(p);if(p.$isMultiLine)return F;if(f){var m=f.exec(d);if(!m||m[0].length!=d.length)return null;if(F=d.replace(f,F),p.preserveCase){F=F.split("");for(var v=Math.min(d.length,d.length);v--;){var w=d[v];w&&w.toLowerCase()!=w?F[v]=F[v].toUpperCase():F[v]=F[v].toLowerCase()}F=F.join("")}return F}},this.$matchIterator=function(d,F){var p=this.$assembleRegExp(F);if(!p)return!1;var f;if(F.$isMultiLine)var m=p.length,v=function(x,A,b){var y=x.search(p[0]);if(y!=-1){for(var k=1;k<m;k++)if(x=d.getLine(A+k),x.search(p[k])==-1)return;var C=x.match(p[m-1])[0].length,D=new g(A,y,A+m-1,C);if(p.offset==1?(D.start.row--,D.start.column=Number.MAX_VALUE):b&&(D.start.column+=b),f(D))return!0}};else if(F.backwards)var v=function(A,b,y){for(var k=o.getMatchOffsets(A,p),C=k.length-1;C>=0;C--)if(f(k[C],b,y))return!0};else var v=function(A,b,y){for(var k=o.getMatchOffsets(A,p),C=0;C<k.length;C++)if(f(k[C],b,y))return!0};var w=this.$lineIterator(d,F);return{forEach:function(x){f=x,w.forEach(v)}}},this.$assembleRegExp=function(d,F){if(d.needle instanceof RegExp)return d.re=d.needle;var p=d.needle;if(!d.needle)return d.re=!1;d.regExp||(p=o.escapeRegExp(p)),d.wholeWord&&(p=c(p,d));var f=d.caseSensitive?"gm":"gmi";if(d.$isMultiLine=!F&&/[\n\r]/.test(p),d.$isMultiLine)return d.re=this.$assembleMultilineRegExp(p,f);try{var m=new RegExp(p,f)}catch{m=!1}return d.re=m},this.$assembleMultilineRegExp=function(d,F){for(var p=d.replace(/\r\n|\r|\n/g,`$
^`).split(`
`),f=[],m=0;m<p.length;m++)try{f.push(new RegExp(p[m],F))}catch{return!1}return p[0]==""?(f.shift(),f.offset=1):f.offset=0,f},this.$lineIterator=function(d,F){var p=F.backwards==!0,f=F.skipCurrent!=!1,m=F.range,v=F.start;v||(v=m?m[p?"end":"start"]:d.selection.getRange()),v.start&&(v=v[f!=p?"end":"start"]);var w=m?m.start.row:0,x=m?m.end.row:d.getLength()-1,A=p?function(b){var y=v.row,k=d.getLine(y).substring(0,v.column);if(!b(k,y)){for(y--;y>=w;y--)if(b(d.getLine(y),y))return;if(F.wrap!=!1){for(y=x,w=v.row;y>=w;y--)if(b(d.getLine(y),y))return}}}:function(b){var y=v.row,k=d.getLine(y).substr(v.column);if(!b(k,y,v.column)){for(y=y+1;y<=x;y++)if(b(d.getLine(y),y))return;if(F.wrap!=!1){for(y=w,x=v.row;y<=x;y++)if(b(d.getLine(y),y))return}}};return{forEach:A}}}).call(l.prototype);function c(d,F){function p(f){return/\w/.test(f)||F.regExp?"\\b":""}return p(d[0])+d+p(d[d.length-1])}n.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(u,n,a){var o=u("../lib/keys"),h=u("../lib/useragent"),g=o.KEY_MODS;function l(d,F){this.platform=F||(h.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(d),this.$singleCommand=!0}function c(d,F){l.call(this,d,F),this.$singleCommand=!1}c.prototype=l.prototype,function(){this.addCommand=function(F){this.commands[F.name]&&this.removeCommand(F),this.commands[F.name]=F,F.bindKey&&this._buildKeyHash(F)},this.removeCommand=function(F,p){var f=F&&(typeof F=="string"?F:F.name);F=this.commands[f],p||delete this.commands[f];var m=this.commandKeyBinding;for(var v in m){var w=m[v];if(w==F)delete m[v];else if(Array.isArray(w)){var x=w.indexOf(F);x!=-1&&(w.splice(x,1),w.length==1&&(m[v]=w[0]))}}},this.bindKey=function(F,p,f){if(typeof F=="object"&&F&&(f==null&&(f=F.position),F=F[this.platform]),!!F){if(typeof p=="function")return this.addCommand({exec:p,bindKey:F,name:p.name||F});F.split("|").forEach(function(m){var v="";if(m.indexOf(" ")!=-1){var w=m.split(/\s+/);m=w.pop(),w.forEach(function(b){var y=this.parseKeys(b),k=g[y.hashId]+y.key;v+=(v?" ":"")+k,this._addCommandToBinding(v,"chainKeys")},this),v+=" "}var x=this.parseKeys(m),A=g[x.hashId]+x.key;this._addCommandToBinding(v+A,p,f)},this)}};function d(F){return typeof F=="object"&&F.bindKey&&F.bindKey.position||0}this._addCommandToBinding=function(F,p,f){var m=this.commandKeyBinding,v;if(!p)delete m[F];else if(!m[F]||this.$singleCommand)m[F]=p;else{Array.isArray(m[F])?(v=m[F].indexOf(p))!=-1&&m[F].splice(v,1):m[F]=[m[F]],typeof f!="number"&&(f||p.isDefault?f=-100:f=d(p));var w=m[F];for(v=0;v<w.length;v++){var x=w[v],A=d(x);if(A>f)break}w.splice(v,0,p)}},this.addCommands=function(F){F&&Object.keys(F).forEach(function(p){var f=F[p];if(f){if(typeof f=="string")return this.bindKey(f,p);typeof f=="function"&&(f={exec:f}),typeof f=="object"&&(f.name||(f.name=p),this.addCommand(f))}},this)},this.removeCommands=function(F){Object.keys(F).forEach(function(p){this.removeCommand(F[p])},this)},this.bindKeys=function(F){Object.keys(F).forEach(function(p){this.bindKey(p,F[p])},this)},this._buildKeyHash=function(F){this.bindKey(F.bindKey,F)},this.parseKeys=function(F){var p=F.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(A){return A}),f=p.pop(),m=o[f];if(o.FUNCTION_KEYS[m])f=o.FUNCTION_KEYS[m].toLowerCase();else if(p.length){if(p.length==1&&p[0]=="shift")return{key:f.toUpperCase(),hashId:-1}}else return{key:f,hashId:-1};for(var v=0,w=p.length;w--;){var x=o.KEY_MODS[p[w]];if(x==null)return typeof console<"u"&&console.error("invalid modifier "+p[w]+" in "+F),!1;v|=x}return{key:f,hashId:v}},this.findKeyCommand=function(p,f){var m=g[p]+f;return this.commandKeyBinding[m]},this.handleKeyboard=function(F,p,f,m){if(!(m<0)){var v=g[p]+f,w=this.commandKeyBinding[v];return F.$keyChain&&(F.$keyChain+=" "+v,w=this.commandKeyBinding[F.$keyChain]||w),w&&(w=="chainKeys"||w[w.length-1]=="chainKeys")?(F.$keyChain=F.$keyChain||v,{command:"null"}):(F.$keyChain&&((!p||p==4)&&f.length==1?F.$keyChain=F.$keyChain.slice(0,-v.length-1):(p==-1||m>0)&&(F.$keyChain="")),{command:w})}},this.getStatusText=function(F,p){return p.$keyChain||""}}.call(l.prototype),n.HashHandler=l,n.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(u,n,a){var o=u("../lib/oop"),h=u("../keyboard/hash_handler").MultiHashHandler,g=u("../lib/event_emitter").EventEmitter,l=function(c,d){h.call(this,d,c),this.byName=this.commands,this.setDefaultHandler("exec",function(F){return F.command.exec(F.editor,F.args||{})})};o.inherits(l,h),function(){o.implement(this,g),this.exec=function(c,d,F){if(Array.isArray(c)){for(var p=c.length;p--;)if(this.exec(c[p],d,F))return!0;return!1}if(typeof c=="string"&&(c=this.commands[c]),!c||d&&d.$readOnly&&!c.readOnly)return!1;var f={editor:d,command:c,args:F};return f.returnValue=this._emit("exec",f),this._signal("afterExec",f),f.returnValue!==!1},this.toggleRecording=function(c){if(!this.$inReplay)return c&&c._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(d){this.macro.push([d.command,d.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(c){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(c);try{this.$inReplay=!0,this.macro.forEach(function(d){typeof d=="string"?this.exec(d,c):this.exec(d[0],c,d[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(c){return c.map(function(d){return typeof d[0]!="string"&&(d[0]=d[0].name),d[1]||(d=d[0]),d})}}.call(l.prototype),n.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(u,n,a){var o=u("../lib/lang"),h=u("../config"),g=u("../range").Range;function l(c,d){return{win:c,mac:d}}n.commands=[{name:"showSettingsMenu",bindKey:l("Ctrl-,","Command-,"),exec:function(c){h.loadModule("ace/ext/settings_menu",function(d){d.init(c),c.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:l("Alt-E","F4"),exec:function(c){h.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(c){h.loadModule("ace/ext/error_marker",function(d){d.showErrorMarker(c,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:l("Ctrl-A","Command-A"),exec:function(c){c.selectAll()},readOnly:!0},{name:"centerselection",bindKey:l(null,"Ctrl-L"),exec:function(c){c.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:l("Ctrl-L","Command-L"),exec:function(c){var d=parseInt(prompt("Enter line number:"),10);isNaN(d)||c.gotoLine(d)},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(c){c.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(c){c.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:l("F2","F2"),exec:function(c){c.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:l("Alt-F2","Alt-F2"),exec:function(c){c.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(c){c.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:l("Alt-0","Command-Option-0"),exec:function(c){c.session.foldAll(),c.session.unfold(c.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(c){c.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:l("Ctrl-K","Command-G"),exec:function(c){c.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(c){c.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:l("Alt-K","Ctrl-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(c){c.selection.isEmpty()?c.selection.selectWord():c.findPrevious()},readOnly:!0},{name:"find",bindKey:l("Ctrl-F","Command-F"),exec:function(c){h.loadModule("ace/ext/searchbox",function(d){d.Search(c)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(c){c.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(c){c.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(c){c.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(c){c.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",bindKey:l("Up","Up|Ctrl-P"),exec:function(c,d){c.navigateUp(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(c){c.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(c){c.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(c){c.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:l("Down","Down|Ctrl-N"),exec:function(c,d){c.navigateDown(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(c){c.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:l("Ctrl-Left","Option-Left"),exec:function(c){c.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(c){c.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(c){c.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:l("Left","Left|Ctrl-B"),exec:function(c,d){c.navigateLeft(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(c){c.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:l("Ctrl-Right","Option-Right"),exec:function(c){c.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(c){c.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:l("Shift-Right","Shift-Right"),exec:function(c){c.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:l("Right","Right|Ctrl-F"),exec:function(c,d){c.navigateRight(d.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(c){c.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:l(null,"Option-PageDown"),exec:function(c){c.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(c){c.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(c){c.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:l(null,"Option-PageUp"),exec:function(c){c.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(c){c.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:l("Ctrl-Up",null),exec:function(c){c.renderer.scrollBy(0,-2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:l("Ctrl-Down",null),exec:function(c){c.renderer.scrollBy(0,2*c.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(c){c.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(c){c.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(c){c.commands.toggleRecording(c)},readOnly:!0},{name:"replaymacro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(c){c.commands.replay(c)},readOnly:!0},{name:"jumptomatching",bindKey:l("Ctrl-P","Ctrl-P"),exec:function(c){c.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",bindKey:l("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(c){c.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(c){c.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",exec:function(c){},readOnly:!0},{name:"cut",exec:function(c){var d=c.getSelectionRange();c._emit("cut",d),c.selection.isEmpty()||(c.session.remove(d),c.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",exec:function(c,d){c.$handlePaste(d)},scrollIntoView:"cursor"},{name:"removeline",bindKey:l("Ctrl-D","Command-D"),exec:function(c){c.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(c){c.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(c){c.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:l("Ctrl-/","Command-/"),exec:function(c){c.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(c){c.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(c){c.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(c){c.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(c){h.loadModule("ace/ext/searchbox",function(d){d.Search(c,!0)})}},{name:"undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(c){c.undo()}},{name:"redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(c){c.redo()}},{name:"copylinesup",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(c){c.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:l("Alt-Up","Option-Up"),exec:function(c){c.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(c){c.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:l("Alt-Down","Option-Down"),exec:function(c){c.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(c){c.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(c){c.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:l("Shift-Delete",null),exec:function(c){if(c.selection.isEmpty())c.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(c){c.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:l("Alt-Delete","Ctrl-K"),exec:function(c){c.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(c){c.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(c){c.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(c){c.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:l("Tab","Tab"),exec:function(c){c.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(c){c.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(c){c.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(c,d){c.insert(d)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(c,d){c.insert(o.stringRepeat(d.text||"",d.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:l(null,"Ctrl-O"),exec:function(c){c.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:l("Ctrl-T","Ctrl-T"),exec:function(c){c.transposeLetters()},multiSelectAction:function(c){c.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(c){c.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(c){c.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(c){var d=c.selection.getRange();d.start.column=d.end.column=0,d.end.row++,c.selection.setRange(d,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:l(null,null),exec:function(c){for(var d=c.selection.isBackwards(),F=d?c.selection.getSelectionLead():c.selection.getSelectionAnchor(),p=d?c.selection.getSelectionAnchor():c.selection.getSelectionLead(),f=c.session.doc.getLine(F.row).length,m=c.session.doc.getTextRange(c.selection.getRange()),v=m.replace(/\n\s*/," ").length,w=c.session.doc.getLine(F.row),x=F.row+1;x<=p.row+1;x++){var A=o.stringTrimLeft(o.stringTrimRight(c.session.doc.getLine(x)));A.length!==0&&(A=" "+A),w+=A}p.row+1<c.session.doc.getLength()-1&&(w+=c.session.doc.getNewLineCharacter()),c.clearSelection(),c.session.doc.replace(new g(F.row,0,p.row+2,0),w),v>0?(c.selection.moveCursorTo(F.row,F.column),c.selection.selectTo(F.row,F.column+v)):(f=c.session.doc.getLine(F.row).length>f?f+1:f,c.selection.moveCursorTo(F.row,f))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:l(null,null),exec:function(c){var d=c.session.doc.getLength()-1,F=c.session.doc.getLine(d).length,p=c.selection.rangeList.ranges,f=[];p.length<1&&(p=[c.selection.getRange()]);for(var m=0;m<p.length;m++)m==p.length-1&&(p[m].end.row===d&&p[m].end.column===F||f.push(new g(p[m].end.row,p[m].end.column,d,F))),m===0?p[m].start.row===0&&p[m].start.column===0||f.push(new g(0,0,p[m].start.row,p[m].start.column)):f.push(new g(p[m-1].end.row,p[m-1].end.column,p[m].start.row,p[m].start.column));c.exitMultiSelectMode(),c.clearSelection();for(var m=0;m<f.length;m++)c.selection.addRange(f[m],!1)},readOnly:!0,scrollIntoView:"none"}]}),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"],function(u,n,a){u("./lib/fixoldbrowsers");var o=u("./lib/oop"),h=u("./lib/dom"),g=u("./lib/lang"),l=u("./lib/useragent"),c=u("./keyboard/textinput").TextInput,d=u("./mouse/mouse_handler").MouseHandler,F=u("./mouse/fold_handler").FoldHandler,p=u("./keyboard/keybinding").KeyBinding,f=u("./edit_session").EditSession,m=u("./search").Search,v=u("./range").Range,w=u("./lib/event_emitter").EventEmitter,x=u("./commands/command_manager").CommandManager,A=u("./commands/default_commands").commands,b=u("./config"),y=u("./token_iterator").TokenIterator,k=function(C,D){var T=C.getContainerElement();this.container=T,this.renderer=C,this.commands=new x(l.isMac?"mac":"win",A),this.textInput=new c(C.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new p(this),this.$mouseHandler=new d(this),new F(this),this.$blockScrolling=0,this.$search=new m().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(S,M){M._$emitInputEvent.schedule(31)}),this.setSession(D||new f("")),b.resetOptions(this),b._signal("editor",this)};(function(){o.implement(this,w),this.$initOperationListeners=function(){this.selections=[],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)),this.on("change",function(){this.curOp||this.startOperation(),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||this.startOperation(),this.curOp.selectionChanged=!0}.bind(this),!0)},this.curOp=null,this.prevOp={},this.startOperation=function(C){if(this.curOp){if(!C||this.curOp.command)return;this.prevOp=this.curOp}C||(this.previousCommand=null,C={}),this.$opResetTimer.schedule(),this.curOp={command:C.command||{},args:C.args,scrollTop:this.renderer.scrollTop},this.curOp.command.name&&this.curOp.command.scrollIntoView!==void 0&&this.$blockScrolling++},this.endOperation=function(C){if(this.curOp){if(C&&C.returnValue===!1)return this.curOp=null;this._signal("beforeEndOperation");var D=this.curOp.command;D.name&&this.$blockScrolling>0&&this.$blockScrolling--;var T=D&&D.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 S=this.selection.getRange(),M=this.renderer.layerConfig;(S.start.row>=M.lastRow||S.end.row<=M.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}T=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(C){if(this.$mergeUndoDeltas){var D=this.prevOp,T=this.$mergeableCommands,S=D.command&&C.command.name==D.command.name;if(C.command.name=="insertstring"){var M=C.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),S=S&&this.mergeNextCommand&&(!/\s/.test(M)||/\s/.test(D.args)),this.mergeNextCommand=!0}else S=S&&T.indexOf(C.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(S=!1),S?this.session.mergeUndoDeltas=!0:T.indexOf(C.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(C,D){if(C&&typeof C=="string"){this.$keybindingId=C;var T=this;b.loadModule(["keybinding",C],function(S){T.$keybindingId==C&&T.keyBinding.setKeyboardHandler(S&&S.handler),D&&D()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(C),D&&D()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(C){if(this.session!=C){this.curOp&&this.endOperation(),this.curOp={};var D=this.session;if(D){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);var T=this.session.getSelection();T.off("changeCursor",this.$onCursorChange),T.off("changeSelection",this.$onSelectionChange)}this.session=C,C?(this.$onDocumentChange=this.onDocumentChange.bind(this),C.on("change",this.$onDocumentChange),this.renderer.setSession(C),this.$onChangeMode=this.onChangeMode.bind(this),C.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),C.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),C.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),C.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),C.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),C.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=C.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,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(C)),this._signal("changeSession",{session:C,oldSession:D}),this.curOp=null,D&&D._signal("changeEditor",{oldEditor:this}),C&&C._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(C,D){return this.session.doc.setValue(C),D?D==1?this.navigateFileEnd():D==-1&&this.navigateFileStart():this.selectAll(),C},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(C){this.renderer.onResize(C)},this.setTheme=function(C,D){this.renderer.setTheme(C,D)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(C){this.renderer.setStyle(C)},this.unsetStyle=function(C){this.renderer.unsetStyle(C)},this.getFontSize=function(){return this.getOption("fontSize")||h.computedStyle(this.container,"fontSize")},this.setFontSize=function(C){this.setOption("fontSize",C)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var C=this;this.$highlightPending=!0,setTimeout(function(){C.$highlightPending=!1;var D=C.session;if(!(!D||!D.bgTokenizer)){var T=D.findMatchingBracket(C.getCursorPosition());if(T)var S=new v(T.row,T.column,T.row,T.column+1);else if(D.$mode.getMatching)var S=D.$mode.getMatching(C.session);S&&(D.$bracketHighlight=D.addMarker(S,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var C=this;this.$highlightTagPending=!0,setTimeout(function(){C.$highlightTagPending=!1;var D=C.session;if(!(!D||!D.bgTokenizer)){var T=C.getCursorPosition(),S=new y(C.session,T.row,T.column),M=S.getCurrentToken();if(!M||!/\b(?:tag-open|tag-name)/.test(M.type)){D.removeMarker(D.$tagHighlight),D.$tagHighlight=null;return}if(!(M.type.indexOf("tag-open")!=-1&&(M=S.stepForward(),!M))){var R=M.value,O=0,H=S.stepBackward();if(H.value=="<")do H=M,M=S.stepForward(),M&&M.value===R&&M.type.indexOf("tag-name")!==-1&&(H.value==="<"?O++:H.value==="</"&&O--);while(M&&O>=0);else{do M=H,H=S.stepBackward(),M&&M.value===R&&M.type.indexOf("tag-name")!==-1&&(H.value==="<"?O++:H.value==="</"&&O--);while(H&&O<=0);S.stepForward()}if(!M){D.removeMarker(D.$tagHighlight),D.$tagHighlight=null;return}var Y=S.getCurrentTokenRow(),J=S.getCurrentTokenColumn(),Z=new v(Y,J,Y,J+M.value.length),te=D.$backMarkers[D.$tagHighlight];D.$tagHighlight&&te!=null&&Z.compareRange(te.range)!==0&&(D.removeMarker(D.$tagHighlight),D.$tagHighlight=null),Z&&!D.$tagHighlight&&(D.$tagHighlight=D.addMarker(Z,"ace_bracket","text"))}}},50)}},this.focus=function(){var C=this;setTimeout(function(){C.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(C){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",C))},this.onBlur=function(C){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",C))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(C){var D=this.session.$useWrapMode,T=C.start.row==C.end.row?C.end.row:1/0;this.renderer.updateLines(C.start.row,T,D),this._signal("change",C),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(C){var D=C.data;this.renderer.updateLines(D.first,D.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.$blockScrolling||(b.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var C=this.getSession(),D;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(D=this.getCursorPosition()),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(D=!1)),C.$highlightLineMarker&&!D)C.removeMarker(C.$highlightLineMarker.id),C.$highlightLineMarker=null;else if(!C.$highlightLineMarker&&D){var T=new v(D.row,D.column,D.row,1/0);T.id=C.addMarker(T,"ace_active-line","screenLine"),C.$highlightLineMarker=T}else D&&(C.$highlightLineMarker.start.row=D.row,C.$highlightLineMarker.end.row=D.row,C.$highlightLineMarker.start.column=D.column,C._signal("changeBackMarker"))},this.onSelectionChange=function(C){var D=this.session;if(D.$selectionMarker&&D.removeMarker(D.$selectionMarker),D.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var T=this.selection.getRange(),S=this.getSelectionStyle();D.$selectionMarker=D.addMarker(T,"ace_selection",S)}var M=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(M),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var C=this.session,D=this.getSelectionRange();if(!(D.isEmpty()||D.isMultiLine())){var T=D.start.column-1,S=D.end.column+1,M=C.getLine(D.start.row),R=M.length,O=M.substring(Math.max(T,0),Math.min(S,R));if(!(T>=0&&/^[\w\d]/.test(O)||S<=R&&/[\w\d]$/.test(O))&&(O=M.substring(D.start.column,D.end.column),!!/^[\w\d]+$/.test(O))){var H=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:O});return H}}},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(C){this.renderer.updateText(),this._emit("changeMode",C)},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 C=this.getSelectedText();return this._signal("copy",C),C},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(C,D){var T={text:C,event:D};this.commands.exec("paste",this,T)},this.$handlePaste=function(C){typeof C=="string"&&(C={text:C}),this._signal("paste",C);var D=C.text;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)this.insert(D);else{var T=D.split(/\r\n|\r|\n/),S=this.selection.rangeList.ranges;if(T.length>S.length||T.length<2||!T[1])return this.commands.exec("insertstring",this,D);for(var M=S.length;M--;){var R=S[M];R.isEmpty()||this.session.remove(R),this.session.insert(R.start,T[M])}}},this.execCommand=function(C,D){return this.commands.exec(C,this,D)},this.insert=function(C,D){var T=this.session,S=T.getMode(),M=this.getCursorPosition();if(this.getBehavioursEnabled()&&!D){var R=S.transformAction(T.getState(M.row),"insertion",this,T,C);R&&(C!==R.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),C=R.text)}if(C=="	"&&(C=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var O=new v.fromPoints(M,M);O.end.column+=C.length,this.session.remove(O)}}else{var O=this.getSelectionRange();M=this.session.remove(O),this.clearSelection()}if(C==`
`||C==`\r
`){var Z=T.getLine(M.row);if(M.column>Z.search(/\S|$/)){var H=Z.substr(M.column).search(/\S|$/);T.doc.removeInLine(M.row,M.column,M.column+H)}}this.clearSelection();var Y=M.column,J=T.getState(M.row),Z=T.getLine(M.row),te=S.checkOutdent(J,Z,C);if(T.insert(M,C),R&&R.selection&&(R.selection.length==2?this.selection.setSelectionRange(new v(M.row,Y+R.selection[0],M.row,Y+R.selection[1])):this.selection.setSelectionRange(new v(M.row+R.selection[0],R.selection[1],M.row+R.selection[2],R.selection[3]))),T.getDocument().isNewLine(C)){var ie=S.getNextLineIndent(J,Z.slice(0,M.column),T.getTabString());T.insert({row:M.row+1,column:0},ie)}te&&S.autoOutdent(J,T,M.row)},this.onTextInput=function(C){this.keyBinding.onTextInput(C)},this.onCommandKey=function(C,D,T){this.keyBinding.onCommandKey(C,D,T)},this.setOverwrite=function(C){this.session.setOverwrite(C)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(C){this.setOption("scrollSpeed",C)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(C){this.setOption("dragDelay",C)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(C){this.setOption("selectionStyle",C)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(C){this.setOption("highlightActiveLine",C)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(C){this.setOption("highlightSelectedWord",C)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(C){this.renderer.setAnimatedScroll(C)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(C){this.renderer.setShowInvisibles(C)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(C){this.renderer.setDisplayIndentGuides(C)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(C){this.renderer.setShowPrintMargin(C)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(C){this.renderer.setPrintMarginColumn(C)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(C){this.setOption("readOnly",C)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(C){this.setOption("behavioursEnabled",C)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(C){this.setOption("wrapBehavioursEnabled",C)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(C){this.setOption("showFoldWidgets",C)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(C){this.selection.isEmpty()&&(C=="left"?this.selection.selectLeft():this.selection.selectRight());var D=this.getSelectionRange();if(this.getBehavioursEnabled()){var T=this.session,S=T.getState(D.start.row),M=T.getMode().transformAction(S,"deletion",this,T,D);if(D.end.column===0){var R=T.getTextRange(D);if(R[R.length-1]==`
`){var O=T.getLine(D.end.row);/^\s+$/.test(O)&&(D.end.column=O.length)}}M&&(D=M)}this.session.remove(D),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.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var C=this.getSelectionRange();C.start.column==C.end.column&&C.start.row==C.end.row&&(C.end.column=0,C.end.row++),this.session.remove(C),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var C=this.getCursorPosition();this.insert(`
`),this.moveCursorToPosition(C)},this.transposeLetters=function(){if(this.selection.isEmpty()){var C=this.getCursorPosition(),D=C.column;if(D!==0){var T=this.session.getLine(C.row),S,M;D<T.length?(S=T.charAt(D)+T.charAt(D-1),M=new v(C.row,D-1,C.row,D+1)):(S=T.charAt(D-1)+T.charAt(D-2),M=new v(C.row,D-2,C.row,D)),this.session.replace(M,S)}}},this.toLowerCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),T=this.session.getTextRange(D);this.session.replace(D,T.toLowerCase()),this.selection.setSelectionRange(C)},this.toUpperCase=function(){var C=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var D=this.getSelectionRange(),T=this.session.getTextRange(D);this.session.replace(D,T.toUpperCase()),this.selection.setSelectionRange(C)},this.indent=function(){var C=this.session,D=this.getSelectionRange();if(D.start.row<D.end.row){var T=this.$getSelectedRows();C.indentRows(T.first,T.last,"	");return}else if(D.start.column<D.end.column){var S=C.getTextRange(D);if(!/^\s+$/.test(S)){var T=this.$getSelectedRows();C.indentRows(T.first,T.last,"	");return}}var M=C.getLine(D.start.row),R=D.start,O=C.getTabSize(),H=C.documentToScreenColumn(R.row,R.column);if(this.session.getUseSoftTabs())var Y=O-H%O,J=g.stringRepeat(" ",Y);else{for(var Y=H%O;M[D.start.column-1]==" "&&Y;)D.start.column--,Y--;this.selection.setSelectionRange(D),J="	"}return this.insert(J)},this.blockIndent=function(){var C=this.$getSelectedRows();this.session.indentRows(C.first,C.last,"	")},this.blockOutdent=function(){var C=this.session.getSelection();this.session.outdentRows(C.getRange())},this.sortLines=function(){var C=this.$getSelectedRows(),D=this.session,T=[];for(M=C.first;M<=C.last;M++)T.push(D.getLine(M));T.sort(function(O,H){return O.toLowerCase()<H.toLowerCase()?-1:O.toLowerCase()>H.toLowerCase()?1:0});for(var S=new v(0,0,0,0),M=C.first;M<=C.last;M++){var R=D.getLine(M);S.start.row=M,S.end.row=M,S.end.column=R.length,D.replace(S,T[M-C.first])}},this.toggleCommentLines=function(){var C=this.session.getState(this.getCursorPosition().row),D=this.$getSelectedRows();this.session.getMode().toggleCommentLines(C,this.session,D.first,D.last)},this.toggleBlockComment=function(){var C=this.getCursorPosition(),D=this.session.getState(C.row),T=this.getSelectionRange();this.session.getMode().toggleBlockComment(D,this.session,T,C)},this.getNumberAt=function(C,D){var T=/[\-]?[0-9]+(?:\.[0-9]+)?/g;T.lastIndex=0;for(var S=this.session.getLine(C);T.lastIndex<D;){var M=T.exec(S);if(M.index<=D&&M.index+M[0].length>=D){var R={value:M[0],start:M.index,end:M.index+M[0].length};return R}}return null},this.modifyNumber=function(C){var D=this.selection.getCursor().row,T=this.selection.getCursor().column,S=new v(D,T-1,D,T),M=this.session.getTextRange(S);if(!isNaN(parseFloat(M))&&isFinite(M)){var R=this.getNumberAt(D,T);if(R){var O=R.value.indexOf(".")>=0?R.start+R.value.indexOf(".")+1:R.end,H=R.start+R.value.length-O,Y=parseFloat(R.value);Y*=Math.pow(10,H),O!==R.end&&T<O?C*=Math.pow(10,R.end-T-1):C*=Math.pow(10,R.end-T),Y+=C,Y/=Math.pow(10,H);var J=Y.toFixed(H),Z=new v(D,R.start,D,R.end);this.session.replace(Z,J),this.moveCursorTo(D,Math.max(R.start+1,T+J.length-R.value.length))}}},this.removeLines=function(){var C=this.$getSelectedRows();this.session.removeFullLines(C.first,C.last),this.clearSelection()},this.duplicateSelection=function(){var C=this.selection,D=this.session,T=C.getRange(),S=C.isBackwards();if(T.isEmpty()){var M=T.start.row;D.duplicateLines(M,M)}else{var R=S?T.start:T.end,O=D.insert(R,D.getTextRange(T),!1);T.start=R,T.end=O,C.setSelectionRange(T,S)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(C,D,T){return this.session.moveText(C,D,T)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(C,D){var T,S,M=this.selection;if(!M.inMultiSelectMode||this.inVirtualSelectionMode){var R=M.toOrientedRange();T=this.$getSelectedRows(R),S=this.session.$moveLines(T.first,T.last,D?0:C),D&&C==-1&&(S=0),R.moveBy(S,0),M.fromOrientedRange(R)}else{var O=M.rangeList.ranges;M.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var H=0,Y=0,J=O.length,Z=0;Z<J;Z++){var te=Z;O[Z].moveBy(H,0),T=this.$getSelectedRows(O[Z]);for(var ie=T.first,se=T.last;++Z<J;){Y&&O[Z].moveBy(Y,0);var ue=this.$getSelectedRows(O[Z]);if(D&&ue.first!=se)break;if(!D&&ue.first>se+1)break;se=ue.last}for(Z--,H=this.session.$moveLines(ie,se,D?0:C),D&&C==-1&&(te=Z+1);te<=Z;)O[te].moveBy(H,0),te++;D||(H=0),Y+=H}M.fromOrientedRange(M.ranges[0]),M.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(C){return C=(C||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(C.start.row),last:this.session.getRowFoldEnd(C.end.row)}},this.onCompositionStart=function(C){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(C){this.renderer.setCompositionText(C)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(C){return C>=this.getFirstVisibleRow()&&C<=this.getLastVisibleRow()},this.isRowFullyVisible=function(C){return C>=this.renderer.getFirstFullyVisibleRow()&&C<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(C,D){var T=this.renderer,S=this.renderer.layerConfig,M=C*Math.floor(S.height/S.lineHeight);this.$blockScrolling++,D===!0?this.selection.$moveSelection(function(){this.moveCursorBy(M,0)}):D===!1&&(this.selection.moveCursorBy(M,0),this.selection.clearSelection()),this.$blockScrolling--;var R=T.scrollTop;T.scrollBy(0,M*S.lineHeight),D!=null&&T.scrollCursorIntoView(null,.5),T.animateScrolling(R)},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(C){this.renderer.scrollToRow(C)},this.scrollToLine=function(C,D,T,S){this.renderer.scrollToLine(C,D,T,S)},this.centerSelection=function(){var C=this.getSelectionRange(),D={row:Math.floor(C.start.row+(C.end.row-C.start.row)/2),column:Math.floor(C.start.column+(C.end.column-C.start.column)/2)};this.renderer.alignCursor(D,.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.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(C,D){this.selection.moveCursorTo(C,D)},this.moveCursorToPosition=function(C){this.selection.moveCursorToPosition(C)},this.jumpToMatching=function(C,D){var T=this.getCursorPosition(),S=new y(this.session,T.row,T.column),M=S.getCurrentToken(),R=M||S.stepForward();if(R){var O,H=!1,Y={},J=T.column-R.start,Z,te={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(R.value.match(/[{}()\[\]]/g)){for(;J<R.value.length&&!H;J++)if(te[R.value[J]])switch(Z=te[R.value[J]]+"."+R.type.replace("rparen","lparen"),isNaN(Y[Z])&&(Y[Z]=0),R.value[J]){case"(":case"[":case"{":Y[Z]++;break;case")":case"]":case"}":Y[Z]--,Y[Z]===-1&&(O="bracket",H=!0);break}}else R&&R.type.indexOf("tag-name")!==-1&&(isNaN(Y[R.value])&&(Y[R.value]=0),M.value==="<"?Y[R.value]++:M.value==="</"&&Y[R.value]--,Y[R.value]===-1&&(O="tag",H=!0));H||(M=R,R=S.stepForward(),J=0)}while(R&&!H);if(O){var ie,se;if(O==="bracket")ie=this.session.getBracketRange(T),ie||(ie=new v(S.getCurrentTokenRow(),S.getCurrentTokenColumn()+J-1,S.getCurrentTokenRow(),S.getCurrentTokenColumn()+J-1),se=ie.start,(D||se.row===T.row&&Math.abs(se.column-T.column)<2)&&(ie=this.session.getBracketRange(se)));else if(O==="tag"){if(R&&R.type.indexOf("tag-name")!==-1)var ue=R.value;else return;if(ie=new v(S.getCurrentTokenRow(),S.getCurrentTokenColumn()-2,S.getCurrentTokenRow(),S.getCurrentTokenColumn()-2),ie.compare(T.row,T.column)===0){H=!1;do R=M,M=S.stepBackward(),M&&(M.type.indexOf("tag-close")!==-1&&ie.setEnd(S.getCurrentTokenRow(),S.getCurrentTokenColumn()+1),R.value===ue&&R.type.indexOf("tag-name")!==-1&&(M.value==="<"?Y[ue]++:M.value==="</"&&Y[ue]--,Y[ue]===0&&(H=!0)));while(M&&!H)}R&&R.type.indexOf("tag-name")&&(se=ie.start,se.row==T.row&&Math.abs(se.column-T.column)<2&&(se=ie.end))}se=ie&&ie.cursor||se,se&&(C?ie&&D?this.selection.setRange(ie):ie&&ie.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(se.row,se.column):this.selection.moveTo(se.row,se.column))}}},this.gotoLine=function(C,D,T){this.selection.clearSelection(),this.session.unfold({row:C-1,column:D||0}),this.$blockScrolling+=1,this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(C-1,D||0),this.$blockScrolling-=1,this.isRowFullyVisible(C-1)||this.scrollToLine(C-1,!0,T)},this.navigateTo=function(C,D){this.selection.moveTo(C,D)},this.navigateUp=function(C){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(-C||-1,0)},this.navigateDown=function(C){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var D=this.selection.anchor.getPosition();return this.moveCursorToPosition(D)}this.selection.clearSelection(),this.selection.moveCursorBy(C||1,0)},this.navigateLeft=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorLeft();else{var D=this.getSelectionRange().start;this.moveCursorToPosition(D)}this.clearSelection()},this.navigateRight=function(C){if(this.selection.isEmpty())for(C=C||1;C--;)this.selection.moveCursorRight();else{var D=this.getSelectionRange().end;this.moveCursorToPosition(D)}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(C,D){D&&this.$search.set(D);var T=this.$search.find(this.session),S=0;return T&&(this.$tryReplace(T,C)&&(S=1),T!==null&&(this.selection.setSelectionRange(T),this.renderer.scrollSelectionIntoView(T.start,T.end))),S},this.replaceAll=function(C,D){D&&this.$search.set(D);var T=this.$search.findAll(this.session),S=0;if(!T.length)return S;this.$blockScrolling+=1;var M=this.getSelectionRange();this.selection.moveTo(0,0);for(var R=T.length-1;R>=0;--R)this.$tryReplace(T[R],C)&&S++;return this.selection.setSelectionRange(M),this.$blockScrolling-=1,S},this.$tryReplace=function(C,D){var T=this.session.getTextRange(C);return D=this.$search.replace(T,D),D!==null?(C.end=this.session.replace(C,D),C):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(C,D,T){D||(D={}),typeof C=="string"||C instanceof RegExp?D.needle=C:typeof C=="object"&&o.mixin(D,C);var S=this.selection.getRange();D.needle==null&&(C=this.session.getTextRange(S)||this.$search.$options.needle,C||(S=this.session.getWordRange(S.start.row,S.start.column),C=this.session.getTextRange(S)),this.$search.set({needle:C})),this.$search.set(D),D.start||this.$search.set({start:S});var M=this.$search.find(this.session);if(D.preventScroll)return M;if(M)return this.revealRange(M,T),M;D.backwards?S.start=S.end:S.end=S.start,this.selection.setRange(S)},this.findNext=function(C,D){this.find({skipCurrent:!0,backwards:!1},C,D)},this.findPrevious=function(C,D){this.find(C,{skipCurrent:!0,backwards:!0},D)},this.revealRange=function(C,D){this.$blockScrolling+=1,this.session.unfold(C),this.selection.setSelectionRange(C),this.$blockScrolling-=1;var T=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(C.start,C.end,.5),D!==!1&&this.renderer.animateScrolling(T)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(C){if(C){var D,T=this,S=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var M=this.$scrollAnchor;M.style.cssText="position:absolute",this.container.insertBefore(M,this.container.firstChild);var R=this.on("changeSelection",function(){S=!0}),O=this.renderer.on("beforeRender",function(){S&&(D=T.renderer.container.getBoundingClientRect())}),H=this.renderer.on("afterRender",function(){if(S&&D&&(T.isFocused()||T.searchBox&&T.searchBox.isFocused())){var Y=T.renderer,J=Y.$cursorLayer.$pixelPos,Z=Y.layerConfig,te=J.top-Z.offset;J.top>=0&&te+D.top<0?S=!0:J.top<Z.height&&J.top+D.top+Z.lineHeight>window.innerHeight?S=!1:S=null,S!=null&&(M.style.top=te+"px",M.style.left=J.left+"px",M.style.height=Z.lineHeight+"px",M.scrollIntoView(S)),S=D=null}});this.setAutoScrollEditorIntoView=function(Y){Y||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",R),this.renderer.off("afterRender",H),this.renderer.off("beforeRender",O))}}},this.$resetCursorStyle=function(){var C=this.$cursorStyle||"ace",D=this.renderer.$cursorLayer;D&&(D.setSmoothBlinking(/smooth/.test(C)),D.isBlinking=!this.$readOnly&&C!="wide",h.setCssClass(D.element,"ace_slim-cursors",/slim/.test(C)))}}).call(k.prototype),b.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(C){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:C})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(C){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(C){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(C){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(C){this.setAutoScrollEditorIntoView(C)}},keyboardHandler:{set:function(C){this.setKeyboardHandler(C)},get:function(){return this.keybindingId},handlesSet:!0},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),n.Editor=k}),ace.define("ace/undomanager",["require","exports","module"],function(u,n,a){var o=function(){this.reset()};(function(){this.execute=function(c){var d=c.args[0];this.$doc=c.args[1],c.merge&&this.hasUndo()&&(this.dirtyCounter--,d=this.$undoStack.pop().concat(d)),this.$undoStack.push(d),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(c){var d=this.$undoStack.pop(),F=null;return d&&(F=this.$doc.undoChanges(d,c),this.$redoStack.push(d),this.dirtyCounter--),F},this.redo=function(c){var d=this.$redoStack.pop(),F=null;return d&&(F=this.$doc.redoChanges(this.$deserializeDeltas(d),c),this.$undoStack.push(d),this.dirtyCounter++),F},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return this.dirtyCounter===0},this.$serializeDeltas=function(c){return l(c,h)},this.$deserializeDeltas=function(c){return l(c,g)};function h(c){return{action:c.action,start:c.start,end:c.end,lines:c.lines.length==1?null:c.lines,text:c.lines.length==1?c.lines[0]:null}}function g(c){return{action:c.action,start:c.start,end:c.end,lines:c.lines||[c.text]}}function l(c,d){for(var F=new Array(c.length),p=0;p<c.length;p++){for(var f=c[p],m={group:f.group,deltas:new Array(f.length)},v=0;v<f.deltas.length;v++){var w=f.deltas[v];m.deltas[v]=d(w)}F[p]=m}return F}}).call(o.prototype),n.UndoManager=o}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(u,n,a){var o=u("../lib/dom"),h=u("../lib/oop"),g=u("../lib/lang"),l=u("../lib/event_emitter").EventEmitter,c=function(d){this.element=o.createElement("div"),this.element.className="ace_layer ace_gutter-layer",d.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){h.implement(this,l),this.setSession=function(d){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=d,d&&d.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(d,F){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(d,F)},this.removeGutterDecoration=function(d,F){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(d,F)},this.setAnnotations=function(d){this.$annotations=[];for(var F=0;F<d.length;F++){var p=d[F],f=p.row,m=this.$annotations[f];m||(m=this.$annotations[f]={text:[]});var v=p.text;v=v?g.escapeHTML(v):p.html||"",m.text.indexOf(v)===-1&&m.text.push(v);var w=p.type;w=="error"?m.className=" ace_error":w=="warning"&&m.className!=" ace_error"?m.className=" ace_warning":w=="info"&&!m.className&&(m.className=" ace_info")}},this.$updateAnnotations=function(d){if(this.$annotations.length){var F=d.start.row,p=d.end.row-F;if(p!==0)if(d.action=="remove")this.$annotations.splice(F,p+1,null);else{var f=new Array(p+1);f.unshift(F,1),this.$annotations.splice.apply(this.$annotations,f)}}},this.update=function(d){for(var F=this.session,p=d.firstRow,f=Math.min(d.lastRow+d.gutterOffset,F.getLength()-1),m=F.getNextFoldLine(p),v=m?m.start.row:1/0,w=this.$showFoldWidgets&&F.foldWidgets,x=F.$breakpoints,A=F.$decorations,b=F.$firstLineNumber,y=0,k=F.gutterRenderer||this.$renderer,C=null,D=-1,T=p;;){if(T>v&&(T=m.end.row+1,m=F.getNextFoldLine(T,m),v=m?m.start.row:1/0),T>f){for(;this.$cells.length>D+1;)C=this.$cells.pop(),this.element.removeChild(C.element);break}C=this.$cells[++D],C||(C={element:null,textNode:null,foldWidget:null},C.element=o.createElement("div"),C.textNode=document.createTextNode(""),C.element.appendChild(C.textNode),this.element.appendChild(C.element),this.$cells[D]=C);var S="ace_gutter-cell ";x[T]&&(S+=x[T]),A[T]&&(S+=A[T]),this.$annotations[T]&&(S+=this.$annotations[T].className),C.element.className!=S&&(C.element.className=S);var M=F.getRowLength(T)*d.lineHeight+"px";if(M!=C.element.style.height&&(C.element.style.height=M),w){var R=w[T];R==null&&(R=w[T]=F.getFoldWidget(T))}if(R){C.foldWidget||(C.foldWidget=o.createElement("span"),C.element.appendChild(C.foldWidget));var S="ace_fold-widget ace_"+R;R=="start"&&T==v&&T<m.end.row?S+=" ace_closed":S+=" ace_open",C.foldWidget.className!=S&&(C.foldWidget.className=S);var M=d.lineHeight+"px";C.foldWidget.style.height!=M&&(C.foldWidget.style.height=M)}else C.foldWidget&&(C.element.removeChild(C.foldWidget),C.foldWidget=null);var O=y=k?k.getText(F,T):T+b;O!=C.textNode.data&&(C.textNode.data=O),T++}this.element.style.height=d.minHeight+"px",(this.$fixedWidth||F.$useWrapMode)&&(y=F.getLength()+b);var H=k?k.getWidth(F,y,d):y.toString().length*d.characterWidth,Y=this.$padding||this.$computePadding();H+=Y.left+Y.right,H!==this.gutterWidth&&!isNaN(H)&&(this.gutterWidth=H,this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._emit("changeGutterWidth",H))},this.$fixedWidth=!1,this.$showLineNumbers=!0,this.$renderer="",this.setShowLineNumbers=function(d){this.$renderer=!d&&{getWidth:function(){return""},getText:function(){return""}}},this.getShowLineNumbers=function(){return this.$showLineNumbers},this.$showFoldWidgets=!0,this.setShowFoldWidgets=function(d){d?o.addCssClass(this.element,"ace_folding-enabled"):o.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=d,this.$padding=null},this.getShowFoldWidgets=function(){return this.$showFoldWidgets},this.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var d=o.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=parseInt(d.paddingLeft)+1||0,this.$padding.right=parseInt(d.paddingRight)||0,this.$padding},this.getRegion=function(d){var F=this.$padding||this.$computePadding(),p=this.element.getBoundingClientRect();if(d.x<F.left+p.left)return"markers";if(this.$showFoldWidgets&&d.x>p.right-F.right)return"foldWidgets"}}).call(c.prototype),n.Gutter=c}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(u,n,a){var o=u("../range").Range,h=u("../lib/dom"),g=function(l){this.element=h.createElement("div"),this.element.className="ace_layer ace_marker-layer",l.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(c){this.$padding=c},this.setSession=function(c){this.session=c},this.setMarkers=function(c){this.markers=c},this.update=function(d){var d=d||this.config;if(d){this.config=d;var F=[];for(var p in this.markers){var f=this.markers[p];if(!f.range){f.update(F,this,this.session,d);continue}var m=f.range.clipRows(d.firstRow,d.lastRow);if(!m.isEmpty())if(m=m.toScreenRange(this.session),f.renderer){var v=this.$getTop(m.start.row,d),w=this.$padding+m.start.column*d.characterWidth;f.renderer(F,m,w,v,d)}else f.type=="fullLine"?this.drawFullLineMarker(F,m,f.clazz,d):f.type=="screenLine"?this.drawScreenLineMarker(F,m,f.clazz,d):m.isMultiLine()?f.type=="text"?this.drawTextMarker(F,m,f.clazz,d):this.drawMultiLineMarker(F,m,f.clazz,d):this.drawSingleLineMarker(F,m,f.clazz+" ace_start ace_br15",d)}this.element.innerHTML=F.join("")}},this.$getTop=function(c,d){return(c-d.firstRowScreen)*d.lineHeight};function l(c,d,F,p){return(c?1:0)|(d?2:0)|(F?4:0)|(p?8:0)}this.drawTextMarker=function(c,d,F,p,f){for(var m=this.session,v=d.start.row,w=d.end.row,x=v,A=0,b=0,y=m.getScreenLastRowColumn(x),k=new o(x,d.start.column,x,b);x<=w;x++)k.start.row=k.end.row=x,k.start.column=x==v?d.start.column:m.getRowWrapIndent(x),k.end.column=y,A=b,b=y,y=x+1<w?m.getScreenLastRowColumn(x+1):x==w?0:d.end.column,this.drawSingleLineMarker(c,k,F+(x==v?" ace_start":"")+" ace_br"+l(x==v||x==v+1&&d.start.column,A<b,b>y,x==w),p,x==w?0:1,f)},this.drawMultiLineMarker=function(c,d,F,p,f){var m=this.$padding,v=p.lineHeight,w=this.$getTop(d.start.row,p),x=m+d.start.column*p.characterWidth;f=f||"",c.push("<div class='",F," ace_br1 ace_start' style='","height:",v,"px;","right:0;","top:",w,"px;","left:",x,"px;",f,"'></div>"),w=this.$getTop(d.end.row,p);var A=d.end.column*p.characterWidth;if(c.push("<div class='",F," ace_br12' style='","height:",v,"px;","width:",A,"px;","top:",w,"px;","left:",m,"px;",f,"'></div>"),v=(d.end.row-d.start.row-1)*p.lineHeight,!(v<=0)){w=this.$getTop(d.start.row+1,p);var b=(d.start.column?1:0)|(d.end.column?0:8);c.push("<div class='",F,b?" ace_br"+b:"","' style='","height:",v,"px;","right:0;","top:",w,"px;","left:",m,"px;",f,"'></div>")}},this.drawSingleLineMarker=function(c,d,F,p,f,m){var v=p.lineHeight,w=(d.end.column+(f||0)-d.start.column)*p.characterWidth,x=this.$getTop(d.start.row,p),A=this.$padding+d.start.column*p.characterWidth;c.push("<div class='",F,"' style='","height:",v,"px;","width:",w,"px;","top:",x,"px;","left:",A,"px;",m||"","'></div>")},this.drawFullLineMarker=function(c,d,F,p,f){var m=this.$getTop(d.start.row,p),v=p.lineHeight;d.start.row!=d.end.row&&(v+=this.$getTop(d.end.row,p)-m),c.push("<div class='",F,"' style='","height:",v,"px;","top:",m,"px;","left:0;right:0;",f||"","'></div>")},this.drawScreenLineMarker=function(c,d,F,p,f){var m=this.$getTop(d.start.row,p),v=p.lineHeight;c.push("<div class='",F,"' style='","height:",v,"px;","top:",m,"px;","left:0;right:0;",f||"","'></div>")}}).call(g.prototype),n.Marker=g}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(u,n,a){var o=u("../lib/oop"),h=u("../lib/dom"),g=u("../lib/lang");u("../lib/useragent");var l=u("../lib/event_emitter").EventEmitter,c=function(d){this.element=h.createElement("div"),this.element.className="ace_layer ace_text-layer",d.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){o.implement(this,l),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.$updateEolChar=function(){var d=this.session.doc.getNewLineCharacter()==`
`?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=d)return this.EOL_CHAR=d,!0},this.setPadding=function(d){this.$padding=d,this.element.style.padding="0 "+d+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(d){this.$fontMetrics=d,this.$fontMetrics.on("changeCharacterSize",function(F){this._signal("changeCharacterSize",F)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(d){this.session=d,d&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(d){return this.showInvisibles==d?!1:(this.showInvisibles=d,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(d){return this.displayIndentGuides==d?!1:(this.displayIndentGuides=d,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var d=this.session.getTabSize();this.tabSize=d;for(var F=this.$tabStrings=[0],p=1;p<d+1;p++)this.showInvisibles?F.push("<span class='ace_invisible ace_invisible_tab'>"+g.stringRepeat(this.TAB_CHAR,p)+"</span>"):F.push(g.stringRepeat(" ",p));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var f="ace_indent-guide",m="",v="";if(this.showInvisibles){f+=" ace_invisible",m=" ace_invisible_space",v=" ace_invisible_tab";var w=g.stringRepeat(this.SPACE_CHAR,this.tabSize),x=g.stringRepeat(this.TAB_CHAR,this.tabSize)}else var w=g.stringRepeat(" ",this.tabSize),x=w;this.$tabStrings[" "]="<span class='"+f+m+"'>"+w+"</span>",this.$tabStrings["	"]="<span class='"+f+v+"'>"+x+"</span>"}},this.updateLines=function(d,F,p){(this.config.lastRow!=d.lastRow||this.config.firstRow!=d.firstRow)&&this.scrollLines(d),this.config=d;for(var f=Math.max(F,d.firstRow),m=Math.min(p,d.lastRow),v=this.element.childNodes,w=0,x=d.firstRow;x<f;x++){var A=this.session.getFoldLine(x);if(A)if(A.containsRow(f)){f=A.start.row;break}else x=A.end.row;w++}for(var x=f,A=this.session.getNextFoldLine(x),b=A?A.start.row:1/0;x>b&&(x=A.end.row+1,A=this.session.getNextFoldLine(x,A),b=A?A.start.row:1/0),!(x>m);){var y=v[w++];if(y){var k=[];this.$renderLine(k,x,!this.$useLineGroups(),x==b?A:!1),y.style.height=d.lineHeight*this.session.getRowLength(x)+"px",y.innerHTML=k.join("")}x++}},this.scrollLines=function(d){var F=this.config;if(this.config=d,!F||F.lastRow<d.firstRow)return this.update(d);if(d.lastRow<F.firstRow)return this.update(d);var p=this.element;if(F.firstRow<d.firstRow)for(var f=this.session.getFoldedRowCount(F.firstRow,d.firstRow-1);f>0;f--)p.removeChild(p.firstChild);if(F.lastRow>d.lastRow)for(var f=this.session.getFoldedRowCount(d.lastRow+1,F.lastRow);f>0;f--)p.removeChild(p.lastChild);if(d.firstRow<F.firstRow){var m=this.$renderLinesFragment(d,d.firstRow,F.firstRow-1);p.firstChild?p.insertBefore(m,p.firstChild):p.appendChild(m)}if(d.lastRow>F.lastRow){var m=this.$renderLinesFragment(d,F.lastRow+1,d.lastRow);p.appendChild(m)}},this.$renderLinesFragment=function(d,F,p){for(var f=this.element.ownerDocument.createDocumentFragment(),m=F,v=this.session.getNextFoldLine(m),w=v?v.start.row:1/0;m>w&&(m=v.end.row+1,v=this.session.getNextFoldLine(m,v),w=v?v.start.row:1/0),!(m>p);){var x=h.createElement("div"),A=[];if(this.$renderLine(A,m,!1,m==w?v:!1),x.innerHTML=A.join(""),this.$useLineGroups())x.className="ace_line_group",f.appendChild(x),x.style.height=d.lineHeight*this.session.getRowLength(m)+"px";else for(;x.firstChild;)f.appendChild(x.firstChild);m++}return f},this.update=function(d){this.config=d;for(var F=[],p=d.firstRow,f=d.lastRow,m=p,v=this.session.getNextFoldLine(m),w=v?v.start.row:1/0;m>w&&(m=v.end.row+1,v=this.session.getNextFoldLine(m,v),w=v?v.start.row:1/0),!(m>f);)this.$useLineGroups()&&F.push("<div class='ace_line_group' style='height:",d.lineHeight*this.session.getRowLength(m),"px'>"),this.$renderLine(F,m,!1,m==w?v:!1),this.$useLineGroups()&&F.push("</div>"),m++;this.element.innerHTML=F.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(d,F,p,f){var m=this,v=/\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\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]/g,w=function(y,k,C,D,T){if(k)return m.showInvisibles?"<span class='ace_invisible ace_invisible_space'>"+g.stringRepeat(m.SPACE_CHAR,y.length)+"</span>":y;if(y=="&")return"&#38;";if(y=="<")return"&#60;";if(y==">")return"&#62;";if(y=="	"){var S=m.session.getScreenTabSize(F+D);return F+=S-1,m.$tabStrings[S]}else if(y=="　"){var M=m.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",R=m.showInvisibles?m.SPACE_CHAR:"";return F+=1,"<span class='"+M+"' style='width:"+m.config.characterWidth*2+"px'>"+R+"</span>"}else return C?"<span class='ace_invisible ace_invisible_space ace_invalid'>"+m.SPACE_CHAR+"</span>":(F+=1,"<span class='ace_cjk' style='width:"+m.config.characterWidth*2+"px'>"+y+"</span>")},x=f.replace(v,w);if(this.$textToken[p.type])d.push(x);else{var A="ace_"+p.type.replace(/\./g," ace_"),b="";p.type=="fold"&&(b=" style='width:"+p.value.length*this.config.characterWidth+"px;' "),d.push("<span class='",A,"'",b,">",x,"</span>")}return F+f.length},this.renderIndentGuide=function(d,F,p){var f=F.search(this.$indentGuideRe);return f<=0||f>=p?F:F[0]==" "?(f-=f%this.tabSize,d.push(g.stringRepeat(this.$tabStrings[" "],f/this.tabSize)),F.substr(f)):F[0]=="	"?(d.push(g.stringRepeat(this.$tabStrings["	"],f)),F.substr(f)):F},this.$renderWrappedLine=function(d,F,p,f){for(var m=0,v=0,w=p[0],x=0,A=0;A<F.length;A++){var b=F[A],y=b.value;if(A==0&&this.displayIndentGuides){if(m=y.length,y=this.renderIndentGuide(d,y,w),!y)continue;m-=y.length}if(m+y.length<w)x=this.$renderToken(d,x,b,y),m+=y.length;else{for(;m+y.length>=w;)x=this.$renderToken(d,x,b,y.substring(0,w-m)),y=y.substring(w-m),m=w,f||d.push("</div>","<div class='ace_line' style='height:",this.config.lineHeight,"px'>"),d.push(g.stringRepeat(" ",p.indent)),v++,x=0,w=p[v]||Number.MAX_VALUE;y.length!=0&&(m+=y.length,x=this.$renderToken(d,x,b,y))}}},this.$renderSimpleLine=function(d,F){var p=0,f=F[0],m=f.value;this.displayIndentGuides&&(m=this.renderIndentGuide(d,m)),m&&(p=this.$renderToken(d,p,f,m));for(var v=1;v<F.length;v++)f=F[v],m=f.value,p=this.$renderToken(d,p,f,m)},this.$renderLine=function(d,F,p,f){if(!f&&f!=!1&&(f=this.session.getFoldLine(F)),f)var m=this.$getFoldLineTokens(F,f);else var m=this.session.getTokens(F);if(p||d.push("<div class='ace_line' style='height:",this.config.lineHeight*(this.$useLineGroups()?1:this.session.getRowLength(F)),"px'>"),m.length){var v=this.session.getRowSplitData(F);v&&v.length?this.$renderWrappedLine(d,m,v,p):this.$renderSimpleLine(d,m)}this.showInvisibles&&(f&&(F=f.end.row),d.push("<span class='ace_invisible ace_invisible_eol'>",F==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"</span>")),p||d.push("</div>")},this.$getFoldLineTokens=function(d,F){var p=this.session,f=[];function m(w,x,A){for(var b=0,y=0;y+w[b].value.length<x;)if(y+=w[b].value.length,b++,b==w.length)return;if(y!=x){var k=w[b].value.substring(x-y);k.length>A-x&&(k=k.substring(0,A-x)),f.push({type:w[b].type,value:k}),y=x+k.length,b+=1}for(;y<A&&b<w.length;){var k=w[b].value;k.length+y>A?f.push({type:w[b].type,value:k.substring(0,A-y)}):f.push(w[b]),y+=k.length,b+=1}}var v=p.getTokens(d);return F.walk(function(w,x,A,b,y){w!=null?f.push({type:"fold",value:w}):(y&&(v=p.getTokens(x)),v.length&&m(v,b,A))},F.end.row,this.session.getLine(F.end.row).length),f},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(c.prototype),n.Text=c}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(u,n,a){var o=u("../lib/dom"),h,g=function(l){this.element=o.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),h===void 0&&(h=!("opacity"in this.element.style)),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),o.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=(h?this.$updateVisibility:this.$updateOpacity).bind(this)};(function(){this.$updateVisibility=function(l){for(var c=this.cursors,d=c.length;d--;)c[d].style.visibility=l?"":"hidden"},this.$updateOpacity=function(l){for(var c=this.cursors,d=c.length;d--;)c[d].style.opacity=l?"":"0"},this.$padding=0,this.setPadding=function(l){this.$padding=l},this.setSession=function(l){this.session=l},this.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},this.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},this.setSmoothBlinking=function(l){l!=this.smoothBlinking&&!h&&(this.smoothBlinking=l,o.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.$updateCursors=this.$updateOpacity.bind(this),this.restartTimer())},this.addCursor=function(){var l=o.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},this.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},this.hideCursor=function(){this.isVisible=!1,o.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,o.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&o.removeCssClass(this.element,"ace_smooth-blinking"),l(!0),!(!this.isBlinking||!this.blinkInterval||!this.isVisible)){this.smoothBlinking&&setTimeout(function(){o.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var c=function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){l(!0),c()},this.blinkInterval),c()}},this.getPixelPosition=function(l,c){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var d=this.session.documentToScreenPosition(l),F=this.$padding+d.column*this.config.characterWidth,p=(d.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:F,top:p}},this.update=function(l){this.config=l;var c=this.session.$selectionMarkers,d=0,F=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var d=0,p=c.length;d<p;d++){var f=this.getPixelPosition(c[d].cursor,!0);if(!((f.top>l.height+l.offset||f.top<0)&&d>1)){var m=(this.cursors[F++]||this.addCursor()).style;this.drawCursor?this.drawCursor(m,f,l,c[d],this.session):(m.left=f.left+"px",m.top=f.top+"px",m.width=l.characterWidth+"px",m.height=l.lineHeight+"px")}}for(;this.cursors.length>F;)this.removeCursor();var v=this.session.getOverwrite();this.$setOverwrite(v),this.$pixelPos=f,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?o.addCssClass(this.element,"ace_overwrite-cursors"):o.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(g.prototype),n.Cursor=g}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(u,n,a){var o=u("./lib/oop"),h=u("./lib/dom"),g=u("./lib/event"),l=u("./lib/event_emitter").EventEmitter,c=32768,d=function(f){this.element=h.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=h.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),f.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,g.addListener(this.element,"scroll",this.onScroll.bind(this)),g.addListener(this.element,"mousedown",g.preventDefault)};(function(){o.implement(this,l),this.setVisible=function(f){this.element.style.display=f?"":"none",this.isVisible=f,this.coeff=1}}).call(d.prototype);var F=function(f,m){d.call(this,f),this.scrollTop=0,this.scrollHeight=0,m.$scrollbarWidth=this.width=h.scrollbarWidth(f.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};o.inherits(F,d),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var f=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-f)/(this.coeff-f)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(f){this.element.style.height=f+"px"},this.setInnerHeight=this.setScrollHeight=function(f){this.scrollHeight=f,f>c?(this.coeff=c/f,f=c):this.coeff!=1&&(this.coeff=1),this.inner.style.height=f+"px"},this.setScrollTop=function(f){this.scrollTop!=f&&(this.skipEvent=!0,this.scrollTop=f,this.element.scrollTop=f*this.coeff)}}.call(F.prototype);var p=function(f,m){d.call(this,f),this.scrollLeft=0,this.height=m.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};o.inherits(p,d),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(f){this.element.style.width=f+"px"},this.setInnerWidth=function(f){this.inner.style.width=f+"px"},this.setScrollWidth=function(f){this.inner.style.width=f+"px"},this.setScrollLeft=function(f){this.scrollLeft!=f&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=f)}}.call(p.prototype),n.ScrollBar=F,n.ScrollBarV=F,n.ScrollBarH=p,n.VScrollBar=F,n.HScrollBar=p}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(u,n,a){var o=u("./lib/event"),h=function(g,l){this.onRender=g,this.pending=!1,this.changes=0,this.window=l||window};(function(){this.schedule=function(g){if(this.changes=this.changes|g,!this.pending&&this.changes){this.pending=!0;var l=this;o.nextFrame(function(){l.pending=!1;for(var c;c=l.changes;)l.changes=0,l.onRender(c)},this.window)}}}).call(h.prototype),n.RenderLoop=h}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(u,n,a){var o=u("../lib/oop"),h=u("../lib/dom"),g=u("../lib/lang"),l=u("../lib/useragent"),c=u("../lib/event_emitter").EventEmitter,d=0,F=n.FontMetrics=function(p){this.el=h.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=h.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=h.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),p.appendChild(this.el),d||this.$testFractionalRect(),this.$measureNode.innerHTML=g.stringRepeat("X",d),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){o.implement(this,c),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var p=h.createElement("div");this.$setMeasureNodeStyles(p.style),p.style.width="0.2px",document.documentElement.appendChild(p);var f=p.getBoundingClientRect().width;f>0&&f<1?d=50:d=100,p.parentNode.removeChild(p)},this.$setMeasureNodeStyles=function(p,f){p.width=p.height="auto",p.left=p.top="0px",p.visibility="hidden",p.position="absolute",p.whiteSpace="pre",l.isIE<8?p["font-family"]="inherit":p.font="inherit",p.overflow=f?"hidden":"visible"},this.checkForSizeChanges=function(){var p=this.$measureSizes();if(p&&(this.$characterSize.width!==p.width||this.$characterSize.height!==p.height)){this.$measureNode.style.fontWeight="bold";var f=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=p,this.charSizes=Object.create(null),this.allowBoldFonts=f&&f.width===p.width&&f.height===p.height,this._emit("changeCharacterSize",{data:p})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var p=this;return this.$pollSizeChangesTimer=setInterval(function(){p.checkForSizeChanges()},500)},this.setPolling=function(p){p?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(){if(d===50){var p=null;try{p=this.$measureNode.getBoundingClientRect()}catch{p={width:0,height:0}}var f={height:p.height,width:p.width/d}}else var f={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/d};return f.width===0||f.height===0?null:f},this.$measureCharWidth=function(p){this.$main.innerHTML=g.stringRepeat(p,d);var f=this.$main.getBoundingClientRect();return f.width/d},this.getCharacterWidth=function(p){var f=this.charSizes[p];return f===void 0&&(f=this.charSizes[p]=this.$measureCharWidth(p)/this.$characterSize.width),f},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(F.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","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"],function(u,n,a){var o=u("./lib/oop"),h=u("./lib/dom"),g=u("./config"),l=u("./lib/useragent"),c=u("./layer/gutter").Gutter,d=u("./layer/marker").Marker,F=u("./layer/text").Text,p=u("./layer/cursor").Cursor,f=u("./scrollbar").HScrollBar,m=u("./scrollbar").VScrollBar,v=u("./renderloop").RenderLoop,w=u("./layer/font_metrics").FontMetrics,x=u("./lib/event_emitter").EventEmitter,A=`.ace_editor {		position: relative;		overflow: hidden;		font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;		direction: ltr;		text-align: left;		}		.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;		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		box-sizing: border-box;		min-width: 100%;		}		.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;		}		.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 {		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 {		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;		text-indent: -1em;		-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: inherit;		color: inherit;		z-index: 1000;		opacity: 1;		text-indent: 0;		}		.ace_layer {		z-index: 1;		position: absolute;		overflow: hidden;		word-wrap: normal;		white-space: pre;		height: 100%;		width: 100%;		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		box-sizing: border-box;		pointer-events: none;		}		.ace_gutter-layer {		position: relative;		width: auto;		text-align: right;		pointer-events: auto;		}		.ace_text-layer {		font: inherit !important;		}		.ace_cjk {		display: inline-block;		text-align: center;		}		.ace_cursor-layer {		z-index: 4;		}		.ace_cursor {		z-index: 4;		position: absolute;		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		box-sizing: border-box;		border-left: 2px solid;		transform: translatez(0);		}		.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_smooth-blinking .ace_cursor {		-webkit-transition: opacity 0.18s;		transition: opacity 0.18s;		}		.ace_editor.ace_multiselect .ace_cursor {		border-left-width: 1px;		}		.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_active-line {		position: absolute;		z-index: 2;		}		.ace_marker-layer .ace_selected-word {		position: absolute;		z-index: 4;		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		box-sizing: border-box;		}		.ace_line .ace_fold {		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		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: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));		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;		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		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 {		-moz-box-sizing: border-box;		-webkit-box-sizing: border-box;		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_fold-widget.ace_invalid {		background-color: #FFB4B4;		border-color: #DE5555;		}		.ace_fade-fold-widgets .ace_fold-widget {		-webkit-transition: opacity 0.4s ease 0.05s;		transition: opacity 0.4s ease 0.05s;		opacity: 0;		}		.ace_fade-fold-widgets:hover .ace_fold-widget {		-webkit-transition: opacity 0.05s ease 0.05s;		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_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;}		`;h.importCssString(A,"ace_editor.css");var b=function(y,k){var C=this;this.container=y||h.createElement("div"),this.$keepTextAreaAtCursor=!l.isOldIE,h.addCssClass(this.container,"ace_editor"),this.setTheme(k),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new d(this.content);var D=this.$textLayer=new F(this.content);this.canvas=D.element,this.$markerFront=new d(this.content),this.$cursorLayer=new p(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new m(this.container,this),this.scrollBarH=new f(this.container,this),this.scrollBarV.addEventListener("scroll",function(T){C.$scrollAnimation||C.session.setScrollTop(T.data-C.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(T){C.$scrollAnimation||C.session.setScrollLeft(T.data-C.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new w(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(T){C.updateCharacterSize(),C.onResize(!0,C.gutterWidth,C.$size.width,C.$size.height),C._signal("changeCharacterSize",T)}),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.$loop=new v(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),g.resetOptions(this),g._emit("renderer",this)};(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,o.implement(this,x),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()},this.setSession=function(y){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=y,y&&this.scrollMargin.top&&y.getScrollTop()<=0&&y.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(y),this.$markerBack.setSession(y),this.$markerFront.setSession(y),this.$gutterLayer.setSession(y),this.$textLayer.setSession(y),y&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(y,k,C){if(k===void 0&&(k=1/0),this.$changedLines?(this.$changedLines.firstRow>y&&(this.$changedLines.firstRow=y),this.$changedLines.lastRow<k&&(this.$changedLines.lastRow=k)):this.$changedLines={firstRow:y,lastRow:k},this.$changedLines.lastRow<this.layerConfig.firstRow)if(C)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;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.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(y){y?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(y,k,C,D){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=y?1:0;var T=this.container;D||(D=T.clientHeight||T.scrollHeight),C||(C=T.clientWidth||T.scrollWidth);var S=this.$updateCachedSize(y,k,C,D);if(!this.$size.scrollerHeight||!C&&!D)return this.resizing=0;y&&(this.$gutterLayer.$padding=null),y?this.$renderChanges(S|this.$changes,!0):this.$loop.schedule(S|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(y,k,C,D){D-=this.$extraHeight||0;var T=0,S=this.$size,M={width:S.width,height:S.height,scrollerHeight:S.scrollerHeight,scrollerWidth:S.scrollerWidth};return D&&(y||S.height!=D)&&(S.height=D,T|=this.CHANGE_SIZE,S.scrollerHeight=S.height,this.$horizScroll&&(S.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",T=T|this.CHANGE_SCROLL),C&&(y||S.width!=C)&&(T|=this.CHANGE_SIZE,S.width=C,k==null&&(k=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=k,this.scrollBarH.element.style.left=this.scroller.style.left=k+"px",S.scrollerWidth=Math.max(0,C-k-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||y)&&(T|=this.CHANGE_FULL)),S.$dirty=!C||!D,T&&this._signal("resize",M),T},this.onGutterResize=function(){var y=this.$showGutter?this.$gutter.offsetWidth:0;y!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,y,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var y=this.$size.scrollerWidth-this.$padding*2,k=Math.floor(y/this.characterWidth);return this.session.adjustWrapLimit(k,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(y){this.setOption("animatedScroll",y)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(y){this.setOption("showInvisibles",y)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(y){this.setOption("displayIndentGuides",y)},this.setShowPrintMargin=function(y){this.setOption("showPrintMargin",y)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(y){this.setOption("printMarginColumn",y)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(y){return this.setOption("showGutter",y)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(y){this.setOption("fadeFoldWidgets",y)},this.setHighlightGutterLine=function(y){this.setOption("highlightGutterLine",y)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var y=this.$cursorLayer.$pixelPos,k=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var C=this.session.selection.getCursor();C.column=0,y=this.$cursorLayer.getPixelPosition(C,!0),k*=this.session.getRowLength(C.row)}this.$gutterLineHighlight.style.top=y.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=k+"px"},this.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var y=h.createElement("div");y.className="ace_layer ace_print-margin-layer",this.$printMarginEl=h.createElement("div"),this.$printMarginEl.className="ace_print-margin",y.appendChild(this.$printMarginEl),this.content.insertBefore(y,this.content.firstChild)}var k=this.$printMarginEl.style;k.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",k.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var y=this.layerConfig,k=this.$cursorLayer.$pixelPos.top,C=this.$cursorLayer.$pixelPos.left;k-=y.offset;var D=this.textarea.style,T=this.lineHeight;if(k<0||k>y.height-T){D.top=D.left="0";return}var S=this.characterWidth;if(this.$composition){var M=this.textarea.value.replace(/^\x01+/,"");S*=this.session.$getStringScreenWidth(M)[0]+2,T+=2}C-=this.scrollLeft,C>this.$size.scrollerWidth-S&&(C=this.$size.scrollerWidth-S),C+=this.gutterWidth,D.height=T+"px",D.width=S+"px",D.left=Math.min(C,this.$size.scrollerWidth-S)+"px",D.top=Math.min(k,this.$size.height-T)+"px"}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var y=this.layerConfig,k=y.lastRow,C=this.session.documentToScreenRow(k,0)*y.lineHeight;return C-this.session.getScrollTop()>y.height-y.lineHeight?k-1:k},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(y){this.$padding=y,this.$textLayer.setPadding(y),this.$cursorLayer.setPadding(y),this.$markerFront.setPadding(y),this.$markerBack.setPadding(y),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(y,k,C,D){var T=this.scrollMargin;T.top=y|0,T.bottom=k|0,T.right=D|0,T.left=C|0,T.v=T.top+T.bottom,T.h=T.left+T.right,T.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-T.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(y){this.setOption("hScrollBarAlwaysVisible",y)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(y){this.setOption("vScrollBarAlwaysVisible",y)},this.$updateScrollBarV=function(){var y=this.layerConfig.maxHeight,k=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(y-=(k-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>y-k&&(y=this.scrollTop+k,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(y+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(y,k){if(this.$changes&&(y|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!y&&!k){this.$changes|=y;return}if(this.$size.$dirty)return this.$changes|=y,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var C=this.layerConfig;if(y&this.CHANGE_FULL||y&this.CHANGE_SIZE||y&this.CHANGE_TEXT||y&this.CHANGE_LINES||y&this.CHANGE_SCROLL||y&this.CHANGE_H_SCROLL){if(y|=this.$computeLayerConfig(),C.firstRow!=this.layerConfig.firstRow&&C.firstRowScreen==this.layerConfig.firstRowScreen){var D=this.scrollTop+(C.firstRow-this.layerConfig.firstRow)*this.lineHeight;D>0&&(this.scrollTop=D,y=y|this.CHANGE_SCROLL,y|=this.$computeLayerConfig())}C=this.layerConfig,this.$updateScrollBarV(),y&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-C.offset+"px",this.content.style.marginTop=-C.offset+"px",this.content.style.width=C.width+2*this.$padding+"px",this.content.style.height=C.minHeight+"px"}if(y&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),y&this.CHANGE_FULL){this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this._signal("afterRender");return}if(y&this.CHANGE_SCROLL){y&this.CHANGE_TEXT||y&this.CHANGE_LINES?this.$textLayer.update(C):this.$textLayer.scrollLines(C),this.$showGutter&&this.$gutterLayer.update(C),this.$markerBack.update(C),this.$markerFront.update(C),this.$cursorLayer.update(C),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),this._signal("afterRender");return}y&this.CHANGE_TEXT?(this.$textLayer.update(C),this.$showGutter&&this.$gutterLayer.update(C)):y&this.CHANGE_LINES?(this.$updateLines()||y&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(C):(y&this.CHANGE_TEXT||y&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(C),y&this.CHANGE_CURSOR&&(this.$cursorLayer.update(C),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),y&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(C),y&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(C),this._signal("afterRender")},this.$autosize=function(){var y=this.session.getScreenLength()*this.lineHeight,k=this.$maxLines*this.lineHeight,C=Math.min(k,Math.max((this.$minLines||1)*this.lineHeight,y))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(C+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&C>this.$maxPixelHeight&&(C=this.$maxPixelHeight);var D=y>k;if(C!=this.desiredHeight||this.$size.height!=this.desiredHeight||D!=this.$vScroll){D!=this.$vScroll&&(this.$vScroll=D,this.scrollBarV.setVisible(D));var T=this.container.clientWidth;this.container.style.height=C+"px",this.$updateCachedSize(!0,this.$gutterWidth,T,C),this.desiredHeight=C,this._signal("autosize")}},this.$computeLayerConfig=function(){var y=this.session,k=this.$size,C=k.height<=2*this.lineHeight,D=this.session.getScreenLength(),T=D*this.lineHeight,S=this.$getLongestLine(),M=!C&&(this.$hScrollBarAlwaysVisible||k.scrollerWidth-S-2*this.$padding<0),R=this.$horizScroll!==M;R&&(this.$horizScroll=M,this.scrollBarH.setVisible(M));var O=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var H=this.scrollTop%this.lineHeight,Y=k.scrollerHeight+this.lineHeight,J=!this.$maxLines&&this.$scrollPastEnd?(k.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;T+=J;var Z=this.scrollMargin;this.session.setScrollTop(Math.max(-Z.top,Math.min(this.scrollTop,T-k.scrollerHeight+Z.bottom))),this.session.setScrollLeft(Math.max(-Z.left,Math.min(this.scrollLeft,S+2*this.$padding-k.scrollerWidth+Z.right)));var te=!C&&(this.$vScrollBarAlwaysVisible||k.scrollerHeight-T+J<0||this.scrollTop>Z.top),ie=O!==te;ie&&(this.$vScroll=te,this.scrollBarV.setVisible(te));var se=Math.ceil(Y/this.lineHeight)-1,ue=Math.max(0,Math.round((this.scrollTop-H)/this.lineHeight)),ne=ue+se,G,K,le=this.lineHeight;ue=y.screenToDocumentRow(ue,0);var re=y.getFoldLine(ue);re&&(ue=re.start.row),G=y.documentToScreenRow(ue,0),K=y.getRowLength(ue)*le,ne=Math.min(y.screenToDocumentRow(ne,0),y.getLength()-1),Y=k.scrollerHeight+y.getRowLength(ne)*le+K,H=this.scrollTop-G*le;var ae=0;return this.layerConfig.width!=S&&(ae=this.CHANGE_H_SCROLL),(R||ie)&&(ae=this.$updateCachedSize(!0,this.gutterWidth,k.width,k.height),this._signal("scrollbarVisibilityChanged"),ie&&(S=this.$getLongestLine())),this.layerConfig={width:S,padding:this.$padding,firstRow:ue,firstRowScreen:G,lastRow:ne,lineHeight:le,characterWidth:this.characterWidth,minHeight:Y,maxHeight:T,offset:H,gutterOffset:le?Math.max(0,Math.ceil((H+k.height-k.scrollerHeight)/le)):0,height:this.$size.scrollerHeight},ae},this.$updateLines=function(){var y=this.$changedLines.firstRow,k=this.$changedLines.lastRow;this.$changedLines=null;var C=this.layerConfig;if(!(y>C.lastRow+1)&&!(k<C.firstRow)){if(k===1/0){this.$showGutter&&this.$gutterLayer.update(C),this.$textLayer.update(C);return}return this.$textLayer.updateLines(C,y,k),!0}},this.$getLongestLine=function(){var y=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(y+=1),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(y*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(y,k){this.$gutterLayer.addGutterDecoration(y,k)},this.removeGutterDecoration=function(y,k){this.$gutterLayer.removeGutterDecoration(y,k)},this.updateBreakpoints=function(y){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(y){this.$gutterLayer.setAnnotations(y),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(y,k,C){this.scrollCursorIntoView(y,C),this.scrollCursorIntoView(k,C)},this.scrollCursorIntoView=function(y,k,C){if(this.$size.scrollerHeight!==0){var D=this.$cursorLayer.getPixelPosition(y),T=D.left,S=D.top,M=C&&C.top||0,R=C&&C.bottom||0,O=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;O+M>S?(k&&O+M>S+this.lineHeight&&(S-=k*this.$size.scrollerHeight),S===0&&(S=-this.scrollMargin.top),this.session.setScrollTop(S)):O+this.$size.scrollerHeight-R<S+this.lineHeight&&(k&&O+this.$size.scrollerHeight-R<S-this.lineHeight&&(S+=k*this.$size.scrollerHeight),this.session.setScrollTop(S+this.lineHeight-this.$size.scrollerHeight));var H=this.scrollLeft;H>T?(T<this.$padding+2*this.layerConfig.characterWidth&&(T=-this.scrollMargin.left),this.session.setScrollLeft(T)):H+this.$size.scrollerWidth<T+this.characterWidth?this.session.setScrollLeft(Math.round(T+this.characterWidth-this.$size.scrollerWidth)):H<=this.$padding&&T-H<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(y){this.session.setScrollTop(y*this.lineHeight)},this.alignCursor=function(y,k){typeof y=="number"&&(y={row:y,column:0});var C=this.$cursorLayer.getPixelPosition(y),D=this.$size.scrollerHeight-this.lineHeight,T=C.top-D*(k||0);return this.session.setScrollTop(T),T},this.STEPS=8,this.$calcSteps=function(y,k){var C=0,D=this.STEPS,T=[],S=function(M,R,O){return O*(Math.pow(M-1,3)+1)+R};for(C=0;C<D;++C)T.push(S(C/this.STEPS,y,k-y));return T},this.scrollToLine=function(y,k,C,D){var T=this.$cursorLayer.getPixelPosition({row:y,column:0}),S=T.top;k&&(S-=this.$size.scrollerHeight/2);var M=this.scrollTop;this.session.setScrollTop(S),C!==!1&&this.animateScrolling(M,D)},this.animateScrolling=function(y,k){var C=this.scrollTop;if(this.$animatedScroll){var D=this;if(y!=C){if(this.$scrollAnimation){var T=this.$scrollAnimation.steps;if(T.length&&(y=T[0],y==C))return}var S=D.$calcSteps(y,C);this.$scrollAnimation={from:y,to:C,steps:S},clearInterval(this.$timer),D.session.setScrollTop(S.shift()),D.session.$scrollTop=C,this.$timer=setInterval(function(){S.length?(D.session.setScrollTop(S.shift()),D.session.$scrollTop=C):C!=null?(D.session.$scrollTop=-1,D.session.setScrollTop(C),C=null):(D.$timer=clearInterval(D.$timer),D.$scrollAnimation=null,k&&k())},10)}}},this.scrollToY=function(y){this.scrollTop!==y&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=y)},this.scrollToX=function(y){this.scrollLeft!==y&&(this.scrollLeft=y),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(y,k){this.session.setScrollTop(k),this.session.setScrollLeft(k)},this.scrollBy=function(y,k){k&&this.session.setScrollTop(this.session.getScrollTop()+k),y&&this.session.setScrollLeft(this.session.getScrollLeft()+y)},this.isScrollableBy=function(y,k){if(k<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||k>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||y<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||y>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(y,k){var C=this.scroller.getBoundingClientRect(),D=(y+this.scrollLeft-C.left-this.$padding)/this.characterWidth,T=Math.floor((k+this.scrollTop-C.top)/this.lineHeight),S=Math.round(D);return{row:T,column:S,side:D-S>0?1:-1}},this.screenToTextCoordinates=function(y,k){var C=this.scroller.getBoundingClientRect(),D=Math.round((y+this.scrollLeft-C.left-this.$padding)/this.characterWidth),T=(k+this.scrollTop-C.top)/this.lineHeight;return this.session.screenToDocumentPosition(T,Math.max(D,0))},this.textToScreenCoordinates=function(y,k){var C=this.scroller.getBoundingClientRect(),D=this.session.documentToScreenPosition(y,k),T=this.$padding+Math.round(D.column*this.characterWidth),S=D.row*this.lineHeight;return{pageX:C.left+T-this.scrollLeft,pageY:C.top+S-this.scrollTop}},this.visualizeFocus=function(){h.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){h.removeCssClass(this.container,"ace_focus")},this.showComposition=function(y){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,h.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(y){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(h.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(y,k){var C=this;if(this.$themeId=y,C._dispatchEvent("themeChange",{theme:y}),!y||typeof y=="string"){var D=y||this.$options.theme.initialValue;g.loadModule(["theme",D],T)}else T(y);function T(S){if(C.$themeId!=y)return k&&k();if(!S||!S.cssClass)throw new Error("couldn't load module "+y+" or it didn't call define");h.importCssString(S.cssText,S.cssClass,C.container.ownerDocument),C.theme&&h.removeCssClass(C.container,C.theme.cssClass);var M="padding"in S?S.padding:"padding"in(C.theme||{})?4:C.$padding;C.$padding&&M!=C.$padding&&C.setPadding(M),C.$theme=S.cssClass,C.theme=S,h.addCssClass(C.container,S.cssClass),h.setCssClass(C.container,"ace_dark",S.isDark),C.$size&&(C.$size.width=0,C.$updateSizeAsync()),C._dispatchEvent("themeLoaded",{theme:S}),k&&k()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(y,k){h.setCssClass(this.container,y,k!==!1)},this.unsetStyle=function(y){h.removeCssClass(this.container,y)},this.setCursorStyle=function(y){this.scroller.style.cursor!=y&&(this.scroller.style.cursor=y)},this.setMouseCursor=function(y){this.scroller.style.cursor=y},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(b.prototype),g.defineOptions(b.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(y){this.$textLayer.setShowInvisibles(y)&&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(y){typeof y=="number"&&(this.$printMarginColumn=y),this.$showPrintMargin=!!y,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(y){this.$gutter.style.display=y?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(y){h.setCssClass(this.$gutter,"ace_fade-fold-widgets",y)},initialValue:!1},showFoldWidgets:{set:function(y){this.$gutterLayer.setShowFoldWidgets(y)},initialValue:!0},showLineNumbers:{set:function(y){this.$gutterLayer.setShowLineNumbers(y),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(y){this.$textLayer.setDisplayIndentGuides(y)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(y){if(!this.$gutterLineHighlight){this.$gutterLineHighlight=h.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",this.$gutter.appendChild(this.$gutterLineHighlight);return}this.$gutterLineHighlight.style.display=y?"":"none",this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight()},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(y){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(y){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(y){typeof y=="number"&&(y=y+"px"),this.container.style.fontSize=y,this.updateFontSize()},initialValue:12},fontFamily:{set:function(y){this.container.style.fontFamily=y,this.updateFontSize()}},maxLines:{set:function(y){this.updateFull()}},minLines:{set:function(y){this.updateFull()}},maxPixelHeight:{set:function(y){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(y){y=+y||0,this.$scrollPastEnd!=y&&(this.$scrollPastEnd=y,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(y){this.$gutterLayer.$fixedWidth=!!y,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(y){this.setTheme(y)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),n.VirtualRenderer=b}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(u,n,a){var o=u("../lib/oop"),h=u("../lib/net"),g=u("../lib/event_emitter").EventEmitter,l=u("../config"),c=function(F,p,f,m){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),u.nameToUrl&&!u.toUrl&&(u.toUrl=u.nameToUrl),l.get("packaged")||!u.toUrl)m=m||l.moduleUrl(p.id,"worker");else{var v=this.$normalizePath;m=m||v(u.toUrl("ace/worker/worker.js",null,"_"));var w={};F.forEach(function(D){w[D]=v(u.toUrl(D,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var x=p.src,A=r(70),b=new A([x],{type:"application/javascript"}),y=(window.URL||window.webkitURL).createObjectURL(b);this.$worker=new Worker(y)}catch(D){if(D instanceof window.DOMException){var b=this.$workerBlob(m),k=window.URL||window.webkitURL,C=k.createObjectURL(b);this.$worker=new Worker(C),k.revokeObjectURL(C)}else throw D}this.$worker.postMessage({init:!0,tlns:w,module:p.id,classname:f}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){o.implement(this,g),this.onMessage=function(F){var p=F.data;switch(p.type){case"event":this._signal(p.name,{data:p.data});break;case"call":var f=this.callbacks[p.id];f&&(f(p.data),delete this.callbacks[p.id]);break;case"error":this.reportError(p.data);break;case"log":window.console&&console.log&&console.log.apply(console,p.data);break}},this.reportError=function(F){window.console&&console.error&&console.error(F)},this.$normalizePath=function(F){return h.qualifyURL(F)},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(F,p){this.$worker.postMessage({command:F,args:p})},this.call=function(F,p,f){if(f){var m=this.callbackId++;this.callbacks[m]=f,p.push(m)}this.send(F,p)},this.emit=function(F,p){try{this.$worker.postMessage({event:F,data:{data:p.data}})}catch(f){console.error(f.stack)}},this.attachToDocument=function(F){this.$doc&&this.terminate(),this.$doc=F,this.call("setValue",[F.getValue()]),F.on("change",this.changeListener)},this.changeListener=function(F){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),F.action=="insert"?this.deltaQueue.push(F.start,F.lines):this.deltaQueue.push(F.start,F.end)},this.$sendDeltaQueue=function(){var F=this.deltaQueue;F&&(this.deltaQueue=null,F.length>50&&F.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:F}))},this.$workerBlob=function(F){var p="importScripts('"+h.qualifyURL(F)+"');";try{return new Blob([p],{type:"application/javascript"})}catch{var f=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,m=new f;return m.append(p),m.getBlob("application/javascript")}}}).call(c.prototype);var d=function(F,p,f){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var m=null,v=!1,w=Object.create(g),x=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(b){x.messageBuffer.push(b),m&&(v?setTimeout(A):A())},this.setEmitSync=function(b){v=b};var A=function(){var b=x.messageBuffer.shift();b.command?m[b.command].apply(m,b.args):b.event&&w._signal(b.event,b.data)};w.postMessage=function(b){x.onMessage({data:b})},w.callback=function(b,y){this.postMessage({type:"call",id:y,data:b})},w.emit=function(b,y){this.postMessage({type:"event",name:b,data:y})},l.loadModule(["worker",p],function(b){for(m=new b[f](w);x.messageBuffer.length;)A()})};d.prototype=c.prototype,n.UIWorkerClient=d,n.WorkerClient=c}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(u,n,a){var o=u("./range").Range,h=u("./lib/event_emitter").EventEmitter,g=u("./lib/oop"),l=function(c,d,F,p,f,m){var v=this;this.length=d,this.session=c,this.doc=c.getDocument(),this.mainClass=f,this.othersClass=m,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=p,this.$onCursorChange=function(){setTimeout(function(){v.onCursorChange()})},this.$pos=F;var w=c.getUndoManager().$undoStack||c.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=w.length,this.setup(),c.selection.on("changeCursor",this.$onCursorChange)};(function(){g.implement(this,h),this.setup=function(){var c=this,d=this.doc,F=this.session;this.selectionBefore=F.selection.toJSON(),F.selection.inMultiSelectMode&&F.selection.toSingleRange(),this.pos=d.createAnchor(this.$pos.row,this.$pos.column);var p=this.pos;p.$insertRight=!0,p.detach(),p.markerId=F.addMarker(new o(p.row,p.column,p.row,p.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(f){var m=d.createAnchor(f.row,f.column);m.$insertRight=!0,m.detach(),c.others.push(m)}),F.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var c=this.session,d=this;this.othersActive=!0,this.others.forEach(function(F){F.markerId=c.addMarker(new o(F.row,F.column,F.row,F.column+d.length),d.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var c=0;c<this.others.length;c++)this.session.removeMarker(this.others[c].markerId)}},this.onUpdate=function(c){if(this.$updating)return this.updateAnchors(c);var d=c;if(d.start.row===d.end.row&&d.start.row===this.pos.row){this.$updating=!0;var F=c.action==="insert"?d.end.column-d.start.column:d.start.column-d.end.column,p=d.start.column>=this.pos.column&&d.start.column<=this.pos.column+this.length+1,f=d.start.column-this.pos.column;if(this.updateAnchors(c),p&&(this.length+=F),p&&!this.session.$fromUndo){if(c.action==="insert")for(var m=this.others.length-1;m>=0;m--){var v=this.others[m],w={row:v.row,column:v.column+f};this.doc.insertMergedLines(w,c.lines)}else if(c.action==="remove")for(var m=this.others.length-1;m>=0;m--){var v=this.others[m],w={row:v.row,column:v.column+f};this.doc.remove(new o(w.row,w.column,w.row,w.column-F))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(c){this.pos.onChange(c);for(var d=this.others.length;d--;)this.others[d].onChange(c);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var c=this,d=this.session,F=function(f,m){d.removeMarker(f.markerId),f.markerId=d.addMarker(new o(f.row,f.column,f.row,f.column+c.length),m,null,!1)};F(this.pos,this.mainClass);for(var p=this.others.length;p--;)F(this.others[p],this.othersClass)}},this.onCursorChange=function(c){if(!(this.$updating||!this.session)){var d=this.session.selection.getCursor();d.row===this.pos.row&&d.column>=this.pos.column&&d.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",c)):(this.hideOtherMarkers(),this._emit("cursorLeave",c))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var c=this.session.getUndoManager(),d=(c.$undoStack||c.$undostack).length-this.$undoStackDepth,F=0;F<d;F++)c.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}}).call(l.prototype),n.PlaceHolder=l}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(u,n,a){var o=u("../lib/event"),h=u("../lib/useragent");function g(c,d){return c.row==d.row&&c.column==d.column}function l(c){var d=c.domEvent,F=d.altKey,p=d.shiftKey,f=d.ctrlKey,m=c.getAccelKey(),v=c.getButton();if(f&&h.isMac&&(v=d.button),c.editor.inMultiSelectMode&&v==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!f&&!F&&!m){v===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(v===0){var w=c.editor,x=w.selection,A=w.inMultiSelectMode,b=c.getDocumentPosition(),y=x.getCursor(),k=c.inSelection()||x.isEmpty()&&g(b,y),C=c.x,D=c.y,T=function(ne){C=ne.clientX,D=ne.clientY},S=w.session,M=w.renderer.pixelToScreenCoordinates(C,D),R=M,O;if(w.$mouseHandler.$enableJumpToDef)f&&F||m&&F?O=p?"block":"add":F&&w.$blockSelectEnabled&&(O="block");else if(m&&!F){if(O="add",!A&&p)return}else F&&w.$blockSelectEnabled&&(O="block");if(O&&h.isMac&&d.ctrlKey&&w.$mouseHandler.cancelContextMenu(),O=="add"){if(!A&&k)return;if(!A){var H=x.toOrientedRange();w.addSelectionMarker(H)}var Y=x.rangeList.rangeAtPoint(b);w.$blockScrolling++,w.inVirtualSelectionMode=!0,p&&(Y=null,H=x.ranges[0]||H,w.removeSelectionMarker(H)),w.once("mouseup",function(){var ne=x.toOrientedRange();Y&&ne.isEmpty()&&g(Y.cursor,ne.cursor)?x.substractPoint(ne.cursor):(p?x.substractPoint(H.cursor):H&&(w.removeSelectionMarker(H),x.addRange(H)),x.addRange(ne)),w.$blockScrolling--,w.inVirtualSelectionMode=!1})}else if(O=="block"){c.stop(),w.inVirtualSelectionMode=!0;var J,Z=[],te=function(){var ne=w.renderer.pixelToScreenCoordinates(C,D),G=S.screenToDocumentPosition(ne.row,ne.column);g(R,ne)&&g(G,x.lead)||(R=ne,w.$blockScrolling++,w.selection.moveToPosition(G),w.renderer.scrollCursorIntoView(),w.removeSelectionMarkers(Z),Z=x.rectangularRangeBlock(R,M),w.$mouseHandler.$clickSelection&&Z.length==1&&Z[0].isEmpty()&&(Z[0]=w.$mouseHandler.$clickSelection.clone()),Z.forEach(w.addSelectionMarker,w),w.updateSelectionMarkers(),w.$blockScrolling--)};w.$blockScrolling++,A&&!m?x.toSingleRange():!A&&m&&(J=x.toOrientedRange(),w.addSelectionMarker(J)),p?M=S.documentToScreenPosition(x.lead):x.moveToPosition(b),w.$blockScrolling--,R={row:-1,column:-1};var ie=function(ne){clearInterval(ue),w.removeSelectionMarkers(Z),Z.length||(Z=[x.toOrientedRange()]),w.$blockScrolling++,J&&(w.removeSelectionMarker(J),x.toSingleRange(J));for(var G=0;G<Z.length;G++)x.addRange(Z[G]);w.inVirtualSelectionMode=!1,w.$mouseHandler.$clickSelection=null,w.$blockScrolling--},se=te;o.capture(w.container,T,ie);var ue=setInterval(function(){se()},20);return c.preventDefault()}}}n.onMouseDown=l}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(u,n,a){n.defaultCommands=[{name:"addCursorAbove",exec:function(h){h.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",exec:function(h){h.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",exec:function(h){h.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",exec:function(h){h.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",exec:function(h){h.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",exec:function(h){h.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",exec:function(h){h.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",exec:function(h){h.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"splitIntoLines",exec:function(h){h.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"alignCursors",exec:function(h){h.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",exec:function(h){h.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],n.multiSelectCommands=[{name:"singleSelection",bindKey:"esc",exec:function(h){h.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(h){return h&&h.inMultiSelectMode}}];var o=u("../keyboard/hash_handler").HashHandler;n.keyboardHandler=new o(n.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(u,n,a){var o=u("./range_list").RangeList,h=u("./range").Range,g=u("./selection").Selection,l=u("./mouse/multi_select_handler").onMouseDown,c=u("./lib/event"),d=u("./lib/lang"),F=u("./commands/multi_select_commands");n.commands=F.defaultCommands.concat(F.multiSelectCommands);var p=u("./search").Search,f=new p;function m(y,k,C){return f.$options.wrap=!0,f.$options.needle=k,f.$options.backwards=C==-1,f.find(y)}var v=u("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(v.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,k){if(y){if(!this.inMultiSelectMode&&this.rangeCount===0){var C=this.toOrientedRange();if(this.rangeList.add(C),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),k||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(C),this.$onAddRange(C)}y.cursor||(y.cursor=y.end);var D=this.rangeList.add(y);return this.$onAddRange(y),D.length&&this.$onRemoveRange(D),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),k||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var k=this.rangeList.removeAll();k.length&&this.$onRemoveRange(k),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var k=this.rangeList.substractPoint(y);if(k)return this.$onRemoveRange(k),k[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length?this.$onRemoveRange(y):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var k=this.rangeList.ranges.pop();y.push(k),this.rangeCount=0}for(var C=y.length;C--;){var D=this.ranges.indexOf(y[C]);this.ranges.splice(D,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),k=k||this.ranges[0],k&&!k.isEqual(this.getRange())&&this.fromOrientedRange(k)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new o,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var y=this.rangeList.ranges,k=y[y.length-1],C=h.fromPoints(y[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var C=this.getRange(),D=this.isBackwards(),T=C.start.row,S=C.end.row;if(T==S){if(D)var M=C.end,R=C.start;else var M=C.start,R=C.end;this.addRange(h.fromPoints(R,R)),this.addRange(h.fromPoints(M,M));return}var O=[],H=this.getLineRange(T,!0);H.start.column=C.start.column,O.push(H);for(var Y=T+1;Y<S;Y++)O.push(this.getLineRange(Y,!0));H=this.getLineRange(S,!0),H.end.column=C.end.column,O.push(H),O.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var y=this.rangeList.ranges,k=y[y.length-1],C=h.fromPoints(y[0].start,k.end);this.toSingleRange(),this.setSelectionRange(C,k.cursor==k.start)}else{var D=this.session.documentToScreenPosition(this.selectionLead),T=this.session.documentToScreenPosition(this.selectionAnchor),S=this.rectangularRangeBlock(D,T);S.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,k,C){var D=[],T=y.column<k.column;if(T)var S=y.column,M=k.column;else var S=k.column,M=y.column;var R=y.row<k.row;if(R)var O=y.row,H=k.row;else var O=k.row,H=y.row;S<0&&(S=0),O<0&&(O=0),O==H&&(C=!0);for(var Y=O;Y<=H;Y++){var J=h.fromPoints(this.session.screenToDocumentPosition(Y,S),this.session.screenToDocumentPosition(Y,M));if(J.isEmpty()){if(Z&&x(J.end,Z))break;var Z=J.end}J.cursor=T?J.start:J.end,D.push(J)}if(R&&D.reverse(),!C){for(var te=D.length-1;D[te].isEmpty()&&te>0;)te--;if(te>0)for(var ie=0;D[ie].isEmpty();)ie++;for(var se=te;se>=ie;se--)D[se].isEmpty()&&D.splice(se,1)}return D}}.call(g.prototype);var w=u("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var k=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",k),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(y.marker){this.session.removeMarker(y.marker);var k=this.session.$selectionMarkers.indexOf(y);k!=-1&&this.session.$selectionMarkers.splice(k,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var k=this.session.$selectionMarkers,C=y.length;C--;){var D=y[C];if(D.marker){this.session.removeMarker(D.marker);var T=k.indexOf(D);T!=-1&&k.splice(T,1)}}this.session.selectionMarkerCount=k.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(F.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(F.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var k=y.command,C=y.editor;if(C.multiSelect){if(k.multiSelectAction)k.multiSelectAction=="forEach"?D=C.forEachSelection(k,y.args):k.multiSelectAction=="forEachLine"?D=C.forEachSelection(k,y.args,!0):k.multiSelectAction=="single"?(C.exitMultiSelectMode(),D=k.exec(C,y.args||{})):D=k.multiSelectAction(C,y.args||{});else{var D=k.exec(C,y.args||{});C.multiSelect.addRange(C.multiSelect.toOrientedRange()),C.multiSelect.mergeOverlappingRanges()}return D}},this.forEachSelection=function(y,k,C){if(!this.inVirtualSelectionMode){var D=C&&C.keepOrder,T=C==!0||C&&C.$byLines,S=this.session,M=this.selection,R=M.rangeList,O=(D?M:R).ranges,H;if(!O.length)return y.exec?y.exec(this,k||{}):y(this,k||{});var Y=M._eventRegistry;M._eventRegistry={};var J=new g(S);this.inVirtualSelectionMode=!0;for(var Z=O.length;Z--;){if(T)for(;Z>0&&O[Z].start.row==O[Z-1].end.row;)Z--;J.fromOrientedRange(O[Z]),J.index=Z,this.selection=S.selection=J;var te=y.exec?y.exec(this,k||{}):y(this,k||{});!H&&te!==void 0&&(H=te),J.toOrientedRange(O[Z])}J.detach(),this.selection=S.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=Y,M.mergeOverlappingRanges();var ie=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),ie&&ie.from==ie.to&&this.renderer.animateScrolling(ie.from),H}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var k=this.multiSelect.rangeList.ranges,C=[],D=0;D<k.length;D++)C.push(this.session.getTextRange(k[D]));var T=this.session.getDocument().getNewLineCharacter();y=C.join(T),y.length==(C.length-1)*T.length&&(y="")}else this.selection.isEmpty()||(y=this.session.getTextRange(this.getSelectionRange()));return y},this.$checkMultiselectChange=function(y,k){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var C=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&k==this.multiSelect.anchor)return;var D=k==this.multiSelect.anchor?C.cursor==C.start?C.end:C.start:C.cursor;(D.row!=k.row||this.session.$clipPositionToDocument(D.row,D.column).column!=k.column)&&this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange())}},this.findAll=function(y,k,C){if(k=k||{},k.needle=y||k.needle,k.needle==null){var D=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();k.needle=this.session.getTextRange(D)}this.$search.set(k);var T=this.$search.findAll(this.session);if(!T.length)return 0;this.$blockScrolling+=1;var S=this.multiSelect;C||S.toSingleRange(T[0]);for(var M=T.length;M--;)S.addRange(T[M],!0);return D&&S.rangeList.rangeAtPoint(D.start)&&S.addRange(D,!0),this.$blockScrolling-=1,T.length},this.selectMoreLines=function(y,k){var C=this.selection.toOrientedRange(),D=C.cursor==C.end,T=this.session.documentToScreenPosition(C.cursor);this.selection.$desiredColumn&&(T.column=this.selection.$desiredColumn);var S=this.session.screenToDocumentPosition(T.row+y,T.column);if(C.isEmpty())var R=S;else var M=this.session.documentToScreenPosition(D?C.end:C.start),R=this.session.screenToDocumentPosition(M.row+y,M.column);if(D){var O=h.fromPoints(S,R);O.cursor=O.start}else{var O=h.fromPoints(R,S);O.cursor=O.end}if(O.desiredColumn=T.column,!this.selection.inMultiSelectMode)this.selection.addRange(C);else if(k)var H=C.cursor;this.selection.addRange(O),H&&this.selection.substractPoint(H)},this.transposeSelections=function(y){for(var k=this.session,C=k.multiSelect,D=C.ranges,T=D.length;T--;){var S=D[T];if(S.isEmpty()){var M=k.getWordRange(S.start.row,S.start.column);S.start.row=M.start.row,S.start.column=M.start.column,S.end.row=M.end.row,S.end.column=M.end.column}}C.mergeOverlappingRanges();for(var R=[],T=D.length;T--;){var S=D[T];R.unshift(k.getTextRange(S))}y<0?R.unshift(R.pop()):R.push(R.shift());for(var T=D.length;T--;){var S=D[T],M=S.clone();k.replace(S,R[T]),S.start.row=M.start.row,S.start.column=M.start.column}},this.selectMore=function(y,k,C){var D=this.session,T=D.multiSelect,S=T.toOrientedRange();if(!(S.isEmpty()&&(S=D.getWordRange(S.start.row,S.start.column),S.cursor=y==-1?S.start:S.end,this.multiSelect.addRange(S),C))){var M=D.getTextRange(S),R=m(D,M,y);R&&(R.cursor=y==-1?R.start:R.end,this.$blockScrolling+=1,this.session.unfold(R),this.multiSelect.addRange(R),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),k&&this.multiSelect.substractPoint(S.cursor)}},this.alignCursors=function(){var y=this.session,k=y.multiSelect,C=k.ranges,D=-1,T=C.filter(function(se){if(se.cursor.row==D)return!0;D=se.cursor.row});if(!C.length||T.length==C.length-1){var S=this.selection.getRange(),M=S.start.row,R=S.end.row,O=M==R;if(O){var H=this.session.getLength(),Y;do Y=this.session.getLine(R);while(/[=:]/.test(Y)&&++R<H);do Y=this.session.getLine(M);while(/[=:]/.test(Y)&&--M>0);M<0&&(M=0),R>=H&&(R=H-1)}var J=this.session.removeFullLines(M,R);J=this.$reAlignText(J,O),this.session.insert({row:M,column:0},J.join(`
`)+`
`),O||(S.start.column=0,S.end.column=J[J.length-1].length),this.selection.setRange(S)}else{T.forEach(function(se){k.substractPoint(se.cursor)});var Z=0,te=1/0,ie=C.map(function(se){var ue=se.cursor,ne=y.getLine(ue.row),G=ne.substr(ue.column).search(/\S/g);return G==-1&&(G=0),ue.column>Z&&(Z=ue.column),G<te&&(te=G),G});C.forEach(function(se,ue){var ne=se.cursor,G=Z-ne.column,K=ie[ue]-te;G>K?y.insert(ne,d.stringRepeat(" ",G-K)):y.remove(new h(ne.row,ne.column,ne.row,ne.column-G+K)),se.start.column=se.end.column=Z,se.start.row=se.end.row=ne.row,se.cursor=se.end}),k.fromOrientedRange(C[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,k){var C=!0,D=!0,T,S,M;return y.map(function(J){var Z=J.match(/(\s*)(.*?)(\s*)([=:].*)/);return Z?T==null?(T=Z[1].length,S=Z[2].length,M=Z[3].length,Z):(T+S+M!=Z[1].length+Z[2].length+Z[3].length&&(D=!1),T!=Z[1].length&&(C=!1),T>Z[1].length&&(T=Z[1].length),S<Z[2].length&&(S=Z[2].length),M>Z[3].length&&(M=Z[3].length),Z):[J]}).map(k?O:C?D?H:O:Y);function R(J){return d.stringRepeat(" ",J)}function O(J){return J[2]?R(T)+J[2]+R(S-J[2].length+M)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}function H(J){return J[2]?R(T+S-J[2].length)+J[2]+R(M)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}function Y(J){return J[2]?R(T)+J[2]+R(M)+J[4].replace(/^([=:])\s+/,"$1 "):J[0]}}}).call(w.prototype);function x(y,k){return y.row==k.row&&y.column==k.column}n.onSessionChange=function(y){var k=y.session;k&&!k.multiSelect&&(k.$selectionMarkers=[],k.selection.$initRangeList(),k.multiSelect=k.selection),this.multiSelect=k&&k.multiSelect;var C=y.oldSession;C&&(C.multiSelect.off("addRange",this.$onAddRange),C.multiSelect.off("removeRange",this.$onRemoveRange),C.multiSelect.off("multiSelect",this.$onMultiSelect),C.multiSelect.off("singleSelect",this.$onSingleSelect),C.multiSelect.lead.off("change",this.$checkMultiselectChange),C.multiSelect.anchor.off("change",this.$checkMultiselectChange)),k&&(k.multiSelect.on("addRange",this.$onAddRange),k.multiSelect.on("removeRange",this.$onRemoveRange),k.multiSelect.on("multiSelect",this.$onMultiSelect),k.multiSelect.on("singleSelect",this.$onSingleSelect),k.multiSelect.lead.on("change",this.$checkMultiselectChange),k.multiSelect.anchor.on("change",this.$checkMultiselectChange)),k&&this.inMultiSelectMode!=k.selection.inMultiSelectMode&&(k.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function A(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=n.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",l),y.commands.addCommands(F.defaultCommands),b(y))}function b(y){var k=y.textInput.getElement(),C=!1;c.addListener(k,"keydown",function(T){var S=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);y.$blockSelectEnabled&&S?C||(y.renderer.setMouseCursor("crosshair"),C=!0):C&&D()}),c.addListener(k,"keyup",D),c.addListener(k,"blur",D);function D(T){C&&(y.renderer.setMouseCursor(""),C=!1)}}n.MultiSelect=A,u("./config").defineOptions(w.prototype,"editor",{enableMultiselect:{set:function(y){A(this),y?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",l)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",l))},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(u,n,a){var o=u("../../range").Range,h=n.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(g,l,c){var d=g.getLine(c);return this.foldingStartMarker.test(d)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(g,l,c){return null},this.indentationBlock=function(g,l,c){var d=/\S/,F=g.getLine(l),p=F.search(d);if(p!=-1){for(var f=c||F.length,m=g.getLength(),v=l,w=l;++l<m;){var x=g.getLine(l).search(d);if(x!=-1){if(x<=p)break;w=l}}if(w>v){var A=g.getLine(w).length;return new o(v,f,w,A)}}},this.openingBracketBlock=function(g,l,c,d,F){var p={row:c,column:d+1},f=g.$findClosingBracket(l,p,F);if(f){var m=g.foldWidgets[f.row];return m==null&&(m=g.getFoldWidget(f.row)),m=="start"&&f.row>p.row&&(f.row--,f.column=g.getLine(f.row).length),o.fromPoints(p,f)}},this.closingBracketBlock=function(g,l,c,d,F){var p={row:c,column:d},f=g.$findOpeningBracket(l,p);if(f)return f.column++,p.column--,o.fromPoints(f,p)}}).call(h.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(u,n,a){n.isDark=!1,n.cssClass="ace-tm",n.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;		}		';var o=u("../lib/dom");o.importCssString(n.cssText,n.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(u,n,a){u("./lib/oop");var o=u("./lib/dom");u("./range").Range;function h(g){this.session=g,this.session.widgetManager=this,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)}(function(){this.getRowLength=function(g){var l;return this.lineWidgets?l=this.lineWidgets[g]&&this.lineWidgets[g].rowCount||0:l=0,!this.$useWrapMode||!this.$wrapData[g]?1+l:this.$wrapData[g].length+1+l},this.$getWidgetScreenLength=function(){var g=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(g+=l.rowCount)}),g},this.$onChangeEditor=function(g){this.attach(g.editor)},this.attach=function(g){g&&g.widgetManager&&g.widgetManager!=this&&g.widgetManager.detach(),this.editor!=g&&(this.detach(),this.editor=g,g&&(g.widgetManager=this,g.renderer.on("beforeRender",this.measureWidgets),g.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(g){var l=this.editor;if(l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(d){d&&d.el&&d.el.parentNode&&(d._inDocument=!1,d.el.parentNode.removeChild(d.el))})}},this.updateOnFold=function(g,l){var c=l.lineWidgets;if(!(!c||!g.action)){for(var d=g.data,F=d.start.row,p=d.end.row,f=g.action=="add",m=F+1;m<p;m++)c[m]&&(c[m].hidden=f);c[p]&&(f?c[F]?c[p].hidden=f:c[F]=c[p]:(c[F]==c[p]&&(c[F]=void 0),c[p].hidden=f))}},this.updateOnChange=function(g){var l=this.session.lineWidgets;if(l){var c=g.start.row,d=g.end.row-c;if(d!==0)if(g.action=="remove"){var F=l.splice(c+1,d);F.forEach(function(f){f&&this.removeLineWidget(f)},this),this.$updateRows()}else{var p=new Array(d);p.unshift(c,0),l.splice.apply(l,p),this.$updateRows()}}},this.$updateRows=function(){var g=this.session.lineWidgets;if(g){var l=!0;g.forEach(function(c,d){if(c)for(l=!1,c.row=d;c.$oldWidget;)c.$oldWidget.row=d,c=c.$oldWidget}),l&&(this.session.lineWidgets=null)}},this.addLineWidget=function(g){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[g.row];l&&(g.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[g.row]=g,g.session=this.session;var c=this.editor.renderer;g.html&&!g.el&&(g.el=o.createElement("div"),g.el.innerHTML=g.html),g.el&&(o.addCssClass(g.el,"ace_lineWidgetContainer"),g.el.style.position="absolute",g.el.style.zIndex=5,c.container.appendChild(g.el),g._inDocument=!0),g.coverGutter||(g.el.style.zIndex=3),g.pixelHeight==null&&(g.pixelHeight=g.el.offsetHeight),g.rowCount==null&&(g.rowCount=g.pixelHeight/c.layerConfig.lineHeight);var d=this.session.getFoldAt(g.row,0);if(g.$fold=d,d){var F=this.session.lineWidgets;g.row==d.end.row&&!F[d.start.row]?F[d.start.row]=g:g.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:g.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(g),g},this.removeLineWidget=function(g){if(g._inDocument=!1,g.session=null,g.el&&g.el.parentNode&&g.el.parentNode.removeChild(g.el),g.editor&&g.editor.destroy)try{g.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[g.row];if(l==g)this.session.lineWidgets[g.row]=g.$oldWidget,g.$oldWidget&&this.onWidgetChanged(g.$oldWidget);else for(;l;){if(l.$oldWidget==g){l.$oldWidget=g.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:g.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(g){for(var l=this.session.lineWidgets,c=l&&l[g],d=[];c;)d.push(c),c=c.$oldWidget;return d},this.onWidgetChanged=function(g){this.session._changedWidgets.push(g),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(g,l){var c=this.session._changedWidgets,d=l.layerConfig;if(!(!c||!c.length)){for(var F=1/0,p=0;p<c.length;p++){var f=c[p];if(!(!f||!f.el)&&f.session==this.session){if(!f._inDocument){if(this.session.lineWidgets[f.row]!=f)continue;f._inDocument=!0,l.container.appendChild(f.el)}f.h=f.el.offsetHeight,f.fixedWidth||(f.w=f.el.offsetWidth,f.screenWidth=Math.ceil(f.w/d.characterWidth));var m=f.h/d.lineHeight;f.coverLine&&(m-=this.session.getRowLineCount(f.row),m<0&&(m=0)),f.rowCount!=m&&(f.rowCount=m,f.row<F&&(F=f.row))}}F!=1/0&&(this.session._emit("changeFold",{data:{start:{row:F}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},this.renderWidgets=function(g,l){var c=l.layerConfig,d=this.session.lineWidgets;if(d){for(var F=Math.min(this.firstRow,c.firstRow),p=Math.max(this.lastRow,c.lastRow,d.length);F>0&&!d[F];)F--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,l.$cursorLayer.config=c;for(var f=F;f<=p;f++){var m=d[f];if(!(!m||!m.el)){if(m.hidden){m.el.style.top=-100-(m.pixelHeight||0)+"px";continue}m._inDocument||(m._inDocument=!0,l.container.appendChild(m.el));var v=l.$cursorLayer.getPixelPosition({row:f,column:0},!0).top;m.coverLine||(v+=c.lineHeight*this.session.getRowLineCount(m.row)),m.el.style.top=v-c.offset+"px";var w=m.coverGutter?0:l.gutterWidth;m.fixedWidth||(w-=l.scrollLeft),m.el.style.left=w+"px",m.fullWidth&&m.screenWidth&&(m.el.style.minWidth=c.width+2*c.padding+"px"),m.fixedWidth?m.el.style.right=l.scrollBar.getWidth()+"px":m.el.style.right=""}}}}}).call(h.prototype),n.LineWidgets=h}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(u,n,a){var o=u("../line_widgets").LineWidgets,h=u("../lib/dom"),g=u("../range").Range;function l(d,F,p){for(var f=0,m=d.length-1;f<=m;){var v=f+m>>1,w=p(F,d[v]);if(w>0)f=v+1;else if(w<0)m=v-1;else return v}return-(f+1)}function c(d,F,p){var f=d.getAnnotations().sort(g.comparePoints);if(f.length){var m=l(f,{row:F,column:-1},g.comparePoints);m<0&&(m=-m-1),m>=f.length?m=p>0?0:f.length-1:m===0&&p<0&&(m=f.length-1);var v=f[m];if(!(!v||!p)){if(v.row===F){do v=f[m+=p];while(v&&v.row===F);if(!v)return f.slice()}var w=[];F=v.row;do w[p<0?"unshift":"push"](v),v=f[m+=p];while(v&&v.row==F);return w.length&&w}}}n.showErrorMarker=function(d,F){var p=d.session;p.widgetManager||(p.widgetManager=new o(p),p.widgetManager.attach(d));var f=d.getCursorPosition(),m=f.row,v=p.widgetManager.getWidgetsAtRow(m).filter(function(T){return T.type=="errorMarker"})[0];v?v.destroy():m-=F;var w=c(p,m,F),x;if(w){var A=w[0];f.column=(A.pos&&typeof A.column!="number"?A.pos.sc:A.column)||0,f.row=A.row,x=d.renderer.$gutterLayer.$annotations[f.row]}else{if(v)return;x={text:["Looks good!"],className:"ace_ok"}}d.session.unfold(f.row),d.selection.moveToPosition(f);var b={row:f.row,fixedWidth:!0,coverGutter:!0,el:h.createElement("div"),type:"errorMarker"},y=b.el.appendChild(h.createElement("div")),k=b.el.appendChild(h.createElement("div"));k.className="error_widget_arrow "+x.className;var C=d.renderer.$cursorLayer.getPixelPosition(f).left;k.style.left=C+d.renderer.gutterWidth-5+"px",b.el.className="error_widget_wrapper",y.className="error_widget "+x.className,y.innerHTML=x.text.join("<br>"),y.appendChild(h.createElement("div"));var D=function(T,S,M){if(S===0&&(M==="esc"||M==="return"))return b.destroy(),{command:"null"}};b.destroy=function(){d.$mouseHandler.isMousePressed||(d.keyBinding.removeKeyboardHandler(D),p.widgetManager.removeLineWidget(b),d.off("changeSelection",b.destroy),d.off("changeSession",b.destroy),d.off("mouseup",b.destroy),d.off("change",b.destroy))},d.keyBinding.addKeyboardHandler(D),d.on("changeSelection",b.destroy),d.on("changeSession",b.destroy),d.on("mouseup",b.destroy),d.on("change",b.destroy),d.session.widgetManager.addLineWidget(b),b.el.onmousedown=d.focus.bind(d),d.renderer.scrollCursorIntoView(null,.5,{bottom:b.el.offsetHeight})},h.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/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(u,n,a){u("./lib/fixoldbrowsers");var o=u("./lib/dom"),h=u("./lib/event"),g=u("./editor").Editor,l=u("./edit_session").EditSession,c=u("./undomanager").UndoManager,d=u("./virtual_renderer").VirtualRenderer;u("./worker/worker_client"),u("./keyboard/hash_handler"),u("./placeholder"),u("./multi_select"),u("./mode/folding/fold_mode"),u("./theme/textmate"),u("./ext/error_marker"),n.config=u("./config"),n.acequire=u,n.define=r(69),n.edit=function(F){if(typeof F=="string"){var p=F;if(F=document.getElementById(p),!F)throw new Error("ace.edit can't find div #"+p)}if(F&&F.env&&F.env.editor instanceof g)return F.env.editor;var f="";if(F&&/input|textarea/i.test(F.tagName)){var m=F;f=m.value,F=o.createElement("pre"),m.parentNode.replaceChild(F,m)}else F&&(f=o.getInnerText(F),F.innerHTML="");var v=n.createEditSession(f),w=new g(new d(F));w.setSession(v);var x={document:v,editor:w,onResize:w.resize.bind(w,null)};return m&&(x.textarea=m),h.addListener(window,"resize",x.onResize),w.on("destroy",function(){h.removeListener(window,"resize",x.onResize),x.editor.container.env=null}),w.container.env=w.env=x,w},n.createEditSession=function(F,p){var f=new l(F,p);return f.setUndoManager(new c),f},n.EditSession=l,n.UndoManager=c,n.version="1.2.6"}),function(){ace.acequire(["ace/ace"],function(u){u&&(u.config.init(!0),u.define=ace.define),window.ace||(window.ace=u);for(var n in u)u.hasOwnProperty(n)&&(window.ace[n]=u[n])})}(),i.exports=window.ace.acequire("ace/ace")},function(i,t){i.exports=function(){throw new Error("define cannot be used indirect")}},function(i,t){(function(r){i.exports=u();function u(){if(r.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch{}var n=r.WebKitBlobBuilder||r.MozBlobBuilder||r.MSBlobBuilder;return function(a,o){var h=new n,g=o.endings,l=o.type;if(g)for(var c=0,d=a.length;c<d;++c)h.append(a[c],g);else for(var c=0,d=a.length;c<d;++c)h.append(a[c]);return l?h.getBlob(l):h.getBlob()}}}).call(t,function(){return this}())},function(i,t,r){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(u,n,a){var o=u("../lib/oop"),h=u("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};o.inherits(g,h),n.JsonHighlightRules=g}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(u,n,a){var o=u("../range").Range,h=function(){};(function(){this.checkOutdent=function(g,l){return/^\s+$/.test(g)?/^\s*\}/.test(l):!1},this.autoOutdent=function(g,l){var c=g.getLine(l),d=c.match(/^(\s*\})/);if(!d)return 0;var F=d[1].length,p=g.findMatchingBracket({row:l,column:F});if(!p||p.row==l)return 0;var f=this.$getIndent(g.getLine(p.row));g.replace(new o(l,0,l,F-1),f)},this.$getIndent=function(g){return g.match(/^\s*/)[0]}}).call(h.prototype),n.MatchingBraceOutdent=h}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(u,n,a){var o=u("../../lib/oop"),h=u("../../range").Range,g=u("./fold_mode").FoldMode,l=n.FoldMode=function(c){c&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+c.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+c.end)))};o.inherits(l,g),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(c,d,F){var p=c.getLine(F);if(this.singleLineBlockCommentRe.test(p)&&!this.startRegionRe.test(p)&&!this.tripleStarBlockCommentRe.test(p))return"";var f=this._getFoldWidgetBase(c,d,F);return!f&&this.startRegionRe.test(p)?"start":f},this.getFoldWidgetRange=function(c,d,F,p){var f=c.getLine(F);if(this.startRegionRe.test(f))return this.getCommentRegionBlock(c,f,F);var w=f.match(this.foldingStartMarker);if(w){var m=w.index;if(w[1])return this.openingBracketBlock(c,w[1],F,m);var v=c.getCommentFoldRange(F,m+w[0].length,1);return v&&!v.isMultiLine()&&(p?v=this.getSectionRange(c,F):d!="all"&&(v=null)),v}if(d!=="markbegin"){var w=f.match(this.foldingStopMarker);if(w){var m=w.index+w[0].length;return w[1]?this.closingBracketBlock(c,w[1],F,m):c.getCommentFoldRange(F,m,-1)}}},this.getSectionRange=function(c,d){var F=c.getLine(d),p=F.search(/\S/),f=d,m=F.length;d=d+1;for(var v=d,w=c.getLength();++d<w;){F=c.getLine(d);var x=F.search(/\S/);if(x!==-1){if(p>x)break;var A=this.getFoldWidgetRange(c,"all",d);if(A){if(A.start.row<=f)break;if(A.isMultiLine())d=A.end.row;else if(p==x)break}v=d}}return new h(f,m,v,c.getLine(v).length)},this.getCommentRegionBlock=function(c,d,F){for(var p=d.search(/\s*$/),f=c.getLength(),m=F,v=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,w=1;++F<f;){d=c.getLine(F);var x=v.exec(d);if(x&&(x[1]?w--:w++,!w))break}var A=F;if(A>m)return new h(m,p,A,d.length)}}.call(l.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(u,n,a){var o=u("../lib/oop"),h=u("./text").Mode,g=u("./json_highlight_rules").JsonHighlightRules,l=u("./matching_brace_outdent").MatchingBraceOutdent,c=u("./behaviour/cstyle").CstyleBehaviour,d=u("./folding/cstyle").FoldMode,F=u("../worker/worker_client").WorkerClient,p=function(){this.HighlightRules=g,this.$outdent=new l,this.$behaviour=new c,this.foldingRules=new d};o.inherits(p,h),function(){this.getNextLineIndent=function(f,m,v){var w=this.$getIndent(m);if(f=="start"){var x=m.match(/^.*[\{\(\[]\s*$/);x&&(w+=v)}return w},this.checkOutdent=function(f,m,v){return this.$outdent.checkOutdent(m,v)},this.autoOutdent=function(f,m,v){this.$outdent.autoOutdent(m,v)},this.createWorker=function(f){var m=new F(["ace"],r(72),"JsonWorker");return m.attachToDocument(f.getDocument()),m.on("annotate",function(v){f.setAnnotations(v.data)}),m.on("terminate",function(){f.clearAnnotations()}),m},this.$id="ace/mode/json"}.call(p.prototype),n.Mode=p})},function(i,t){i.exports.id="ace/mode/json_worker",i.exports.src=`"no use strict";(function(window){function resolveModuleId(id,paths){for(var testPath=id,tail="";testPath;){var alias=paths[testPath];if("string"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\/*$/,"/")+(tail||alias.main||alias.name);if(alias===!1)return"";var i=testPath.lastIndexOf("/");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log("unable to load "+id);var path=resolveModuleId(id,window.acequire.tlns);return".js"!=path.slice(-3)&&(path+=".js"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error("Unknown command:"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||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 Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/apply_delta",["require","exports","module"],function(acequire,exports){"use strict";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||"";switch(delta.action){case"insert":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case"remove":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.column<point2.column;return point1.row<point2.row||point1.row==point2.row&&bColIsAfter}function $getTransformedPoint(delta,point,moveIfEqual){var deltaIsInsert="insert"==delta.action,deltaRowShift=(deltaIsInsert?1:-1)*(delta.end.row-delta.start.row),deltaColShift=(deltaIsInsert?1:-1)*(delta.end.column-delta.start.column),deltaStart=delta.start,deltaEnd=deltaIsInsert?deltaStart:delta.end;return $pointsInOrder(point,deltaStart,moveIfEqual)?{row:point.row,column:point.column}:$pointsInOrder(deltaEnd,point,!moveIfEqual)?{row:point.row+deltaRowShift,column:point.column+(point.row==deltaEnd.row?deltaColShift:0)}:{row:deltaStart.row,column:deltaStart.column}}oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(delta){if(!(delta.start.row==delta.end.row&&delta.start.row!=this.row||delta.start.row>this.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),applyDelta=acequire("./apply_delta").applyDelta,EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(textOrLines){this.$lines=[""],0===textOrLines.length?this.$lines=[""]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[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(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(position,["",""])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:"insert",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([""]),column=0):(lines=[""].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:"insert",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:"remove",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:"remove",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:"remove",lines:["",""]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert="insert"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal("change",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(""),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:"insert"==delta.action?"remove":"insert",lines:delta.lines.slice()})},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function deepCopy(obj){if("object"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if("[object Object]"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(obj[key]);return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^\${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},exports.getMatchOffsets=function(string,regExp){var matches=[];return string.replace(regExp,function(str){matches.push({offset:arguments[arguments.length-2],length:str.length})}),matches},exports.deferredCall=function(fcn){var timer=null,callback=function(){timer=null,fcn()},deferred=function(timeout){return deferred.cancel(),timer=setTimeout(callback,timeout||0),deferred};return deferred.schedule=deferred,deferred.call=function(){return this.cancel(),fcn(),deferred},deferred.cancel=function(){return clearTimeout(timer),timer=null,deferred},deferred.isPending=function(){return timer},deferred},exports.delayedCall=function(fcn,defaultTimeout){var timer=null,callback=function(){timer=null,fcn()},_self=function(timeout){null==timer&&(timer=setTimeout(callback,timeout||defaultTimeout))};return _self.delay=function(timeout){timer&&clearTimeout(timer),timer=setTimeout(callback,timeout||defaultTimeout)},_self.schedule=_self,_self.call=function(){this.cancel(),fcn()},_self.cancel=function(){timer&&clearTimeout(timer),timer=null},_self.isPending=function(){return timer},_self}}),ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(acequire,exports){"use strict";acequire("../range").Range;var Document=acequire("../document").Document,lang=acequire("../lib/lang"),Mirror=exports.Mirror=function(sender){this.sender=sender;var doc=this.doc=new Document(""),deferredUpdate=this.deferredUpdate=lang.delayedCall(this.onUpdate.bind(this)),_self=this;sender.on("change",function(e){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:"insert",start:data[i],lines:data[i+1]};else var d={action:"remove",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(function(){this.$timeout=500,this.setTimeout=function(timeout){this.$timeout=timeout},this.setValue=function(value){this.doc.setValue(value),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(callbackId){this.sender.callback(this.doc.getValue(),callbackId)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define("ace/mode/json/json_parse",["require","exports","module"],function(){"use strict";var at,ch,text,value,escapee={'"':'"',"\\\\":"\\\\","/":"/",b:"\\b",f:"\\f",n:"\\n",r:"\\r",t:"	"},error=function(m){throw{name:"SyntaxError",message:m,at:at,text:text}},next=function(c){return c&&c!==ch&&error("Expected '"+c+"' instead of '"+ch+"'"),ch=text.charAt(at),at+=1,ch},number=function(){var number,string="";for("-"===ch&&(string="-",next("-"));ch>="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if('"'===ch)for(;next();){if('"'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected '"+ch+"'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error('Duplicate key "'+key+'"'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case'"':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue(),errors=[];try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);errors.push({row:pos.row,column:pos.column,text:e.message,type:"error"})}this.sender.emit("annotate",errors)}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0
}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;for(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != 'object'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws="	\\n\v\\f\\r   ᠎             　\\u2028\\u2029\uFEFF";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can't convert "+o+" to object");return Object(o)}});`},function(i,t){ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(r,u,n){var a=r("../lib/dom"),o=r("../lib/lang"),h=r("../lib/event"),g="		.ace_search {		background-color: #ddd;		border: 1px solid #cbcbcb;		border-top: 0 none;		max-width: 325px;		overflow: hidden;		margin: 0;		padding: 4px;		padding-right: 6px;		padding-bottom: 0;		position: absolute;		top: 0px;		z-index: 99;		white-space: normal;		}		.ace_search.left {		border-left: 0 none;		border-radius: 0px 0px 5px 0px;		left: 0;		}		.ace_search.right {		border-radius: 0px 0px 0px 5px;		border-right: 0 none;		right: 0;		}		.ace_search_form, .ace_replace_form {		border-radius: 3px;		border: 1px solid #cbcbcb;		float: left;		margin-bottom: 4px;		overflow: hidden;		}		.ace_search_form.ace_nomatch {		outline: 1px solid red;		}		.ace_search_field {		background-color: white;		color: black;		border-right: 1px solid #cbcbcb;		border: 0 none;		-webkit-box-sizing: border-box;		-moz-box-sizing: border-box;		box-sizing: border-box;		float: left;		height: 22px;		outline: 0;		padding: 0 7px;		width: 214px;		margin: 0;		}		.ace_searchbtn,		.ace_replacebtn {		background: #fff;		border: 0 none;		border-left: 1px solid #dcdcdc;		cursor: pointer;		float: left;		height: 22px;		margin: 0;		position: relative;		}		.ace_searchbtn:last-child,		.ace_replacebtn:last-child {		border-top-right-radius: 3px;		border-bottom-right-radius: 3px;		}		.ace_searchbtn:disabled {		background: none;		cursor: default;		}		.ace_searchbtn {		background-position: 50% 50%;		background-repeat: no-repeat;		width: 27px;		}		.ace_searchbtn.prev {		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=);    		}		.ace_searchbtn.next {		background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=);    		}		.ace_searchbtn_close {		background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;		border-radius: 50%;		border: 0 none;		color: #656565;		cursor: pointer;		float: right;		font: 16px/16px Arial;		height: 14px;		margin: 5px 1px 9px 5px;		padding: 0;		text-align: center;		width: 14px;		}		.ace_searchbtn_close:hover {		background-color: #656565;		background-position: 50% 100%;		color: white;		}		.ace_replacebtn.prev {		width: 54px		}		.ace_replacebtn.next {		width: 27px		}		.ace_button {		margin-left: 2px;		cursor: pointer;		-webkit-user-select: none;		-moz-user-select: none;		-o-user-select: none;		-ms-user-select: none;		user-select: none;		overflow: hidden;		opacity: 0.7;		border: 1px solid rgba(100,100,100,0.23);		padding: 1px;		-moz-box-sizing: border-box;		box-sizing:    border-box;		color: black;		}		.ace_button:hover {		background-color: #eee;		opacity:1;		}		.ace_button:active {		background-color: #ddd;		}		.ace_button.checked {		border-color: #3399ff;		opacity:1;		}		.ace_search_options{		margin-bottom: 3px;		text-align: right;		-webkit-user-select: none;		-moz-user-select: none;		-o-user-select: none;		-ms-user-select: none;		user-select: none;		}",l=r("../keyboard/hash_handler").HashHandler,c=r("../lib/keys");a.importCssString(g,"ace_searchbox");var d='<div class="ace_search right">		    <button type="button" action="hide" class="ace_searchbtn_close"></button>		    <div class="ace_search_form">		        <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>		        <button type="button" action="findNext" class="ace_searchbtn next"></button>		        <button type="button" action="findPrev" class="ace_searchbtn prev"></button>		        <button type="button" action="findAll" class="ace_searchbtn" title="Alt-Enter">All</button>		    </div>		    <div class="ace_replace_form">		        <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>		        <button type="button" action="replaceAndFindNext" class="ace_replacebtn">Replace</button>		        <button type="button" action="replaceAll" class="ace_replacebtn">All</button>		    </div>		    <div class="ace_search_options">		        <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>		        <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>		        <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>		    </div>		</div>'.replace(/>\s+/g,">"),F=function(p,f,m){var v=a.createElement("div");v.innerHTML=d,this.element=v.firstChild,this.$init(),this.setEditor(p)};(function(){this.setEditor=function(p){p.searchBox=this,p.container.appendChild(this.element),this.editor=p},this.$initElements=function(p){this.searchBox=p.querySelector(".ace_search_form"),this.replaceBox=p.querySelector(".ace_replace_form"),this.searchOptions=p.querySelector(".ace_search_options"),this.regExpOption=p.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=p.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=p.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var p=this.element;this.$initElements(p);var f=this;h.addListener(p,"mousedown",function(m){setTimeout(function(){f.activeInput.focus()},0),h.stopPropagation(m)}),h.addListener(p,"click",function(m){var v=m.target||m.srcElement,w=v.getAttribute("action");w&&f[w]?f[w]():f.$searchBarKb.commands[w]&&f.$searchBarKb.commands[w].exec(f),h.stopPropagation(m)}),h.addCommandKeyListener(p,function(m,v,w){var x=c.keyCodeToString(w),A=f.$searchBarKb.findKeyCommand(v,x);A&&A.exec&&(A.exec(f),h.stopEvent(m))}),this.$onChange=o.delayedCall(function(){f.find(!1,!1)}),h.addListener(this.searchInput,"input",function(){f.$onChange.schedule(20)}),h.addListener(this.searchInput,"focus",function(){f.activeInput=f.searchInput,f.searchInput.value&&f.highlight()}),h.addListener(this.replaceInput,"focus",function(){f.activeInput=f.replaceInput,f.searchInput.value&&f.highlight()})},this.$closeSearchBarKb=new l([{bindKey:"Esc",name:"closeSearchBar",exec:function(p){p.searchBox.hide()}}]),this.$searchBarKb=new l,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f":function(p){var f=p.isReplace=!p.isReplace;p.replaceBox.style.display=f?"":"none",p.searchInput.focus()},"Ctrl-H|Command-Option-F":function(p){p.replaceBox.style.display="",p.replaceInput.focus()},"Ctrl-G|Command-G":function(p){p.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(p){p.findPrev()},esc:function(p){setTimeout(function(){p.hide()})},Return:function(p){p.activeInput==p.replaceInput&&p.replace(),p.findNext()},"Shift-Return":function(p){p.activeInput==p.replaceInput&&p.replace(),p.findPrev()},"Alt-Return":function(p){p.activeInput==p.replaceInput&&p.replaceAll(),p.findAll()},Tab:function(p){(p.activeInput==p.replaceInput?p.searchInput:p.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(p){p.regExpOption.checked=!p.regExpOption.checked,p.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(p){p.caseSensitiveOption.checked=!p.caseSensitiveOption.checked,p.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(p){p.wholeWordOption.checked=!p.wholeWordOption.checked,p.$syncOptions()}}]),this.$syncOptions=function(){a.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),a.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),a.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(p){this.editor.session.highlight(p||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(p,f,m){var v=this.editor.find(this.searchInput.value,{skipCurrent:p,backwards:f,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:m}),w=!v&&this.searchInput.value;a.setCssClass(this.searchBox,"ace_nomatch",w),this.editor._emit("findSearchBox",{match:!w}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var p=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),f=!p&&this.searchInput.value;a.setCssClass(this.searchBox,"ace_nomatch",f),this.editor._emit("findSearchBox",{match:!f}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(p,f){this.element.style.display="",this.replaceBox.style.display=f?"":"none",this.isReplace=f,p&&(this.searchInput.value=p),this.find(!1,!1,!0),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var p=document.activeElement;return p==this.searchInput||p==this.replaceInput}}).call(F.prototype),u.SearchBox=F,u.Search=function(p,f){var m=p.searchBox||new F(p);m.show(p.session.getTextRange(),f)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(i,t){ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(r,u,n){u.isDark=!1,u.cssClass="ace-jsoneditor",u.cssText='.ace-jsoneditor .ace_gutter {		background: #ebebeb;		color: #333		}				.ace-jsoneditor.ace_editor {		font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif;		line-height: 1.3;		background-color: #fff;		}		.ace-jsoneditor .ace_print-margin {		width: 1px;		background: #e8e8e8		}		.ace-jsoneditor .ace_scroller {		background-color: #FFFFFF		}		.ace-jsoneditor .ace_text-layer {		color: gray		}		.ace-jsoneditor .ace_variable {		color: #1a1a1a		}		.ace-jsoneditor .ace_cursor {		border-left: 2px solid #000000		}		.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {		border-left: 0px;		border-bottom: 1px solid #000000		}		.ace-jsoneditor .ace_marker-layer .ace_selection {		background: lightgray		}		.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {		box-shadow: 0 0 3px 0px #FFFFFF;		border-radius: 2px		}		.ace-jsoneditor .ace_marker-layer .ace_step {		background: rgb(255, 255, 0)		}		.ace-jsoneditor .ace_marker-layer .ace_bracket {		margin: -1px 0 0 -1px;		border: 1px solid #BFBFBF		}		.ace-jsoneditor .ace_marker-layer .ace_active-line {		background: #FFFBD1		}		.ace-jsoneditor .ace_gutter-active-line {		background-color : #dcdcdc		}		.ace-jsoneditor .ace_marker-layer .ace_selected-word {		border: 1px solid lightgray		}		.ace-jsoneditor .ace_invisible {		color: #BFBFBF		}		.ace-jsoneditor .ace_keyword,		.ace-jsoneditor .ace_meta,		.ace-jsoneditor .ace_support.ace_constant.ace_property-value {		color: #AF956F		}		.ace-jsoneditor .ace_keyword.ace_operator {		color: #484848		}		.ace-jsoneditor .ace_keyword.ace_other.ace_unit {		color: #96DC5F		}		.ace-jsoneditor .ace_constant.ace_language {		color: darkorange		}		.ace-jsoneditor .ace_constant.ace_numeric {		color: red		}		.ace-jsoneditor .ace_constant.ace_character.ace_entity {		color: #BF78CC		}		.ace-jsoneditor .ace_invalid {		color: #FFFFFF;		background-color: #FF002A;		}		.ace-jsoneditor .ace_fold {		background-color: #AF956F;		border-color: #000000		}		.ace-jsoneditor .ace_storage,		.ace-jsoneditor .ace_support.ace_class,		.ace-jsoneditor .ace_support.ace_function,		.ace-jsoneditor .ace_support.ace_other,		.ace-jsoneditor .ace_support.ace_type {		color: #C52727		}		.ace-jsoneditor .ace_string {		color: green		}		.ace-jsoneditor .ace_comment {		color: #BCC8BA		}		.ace-jsoneditor .ace_entity.ace_name.ace_tag,		.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {		color: #606060		}		.ace-jsoneditor .ace_markup.ace_underline {		text-decoration: underline		}		.ace-jsoneditor .ace_indent-guide {		background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y		}';var a=r("../lib/dom");a.importCssString(u.cssText,u.cssClass)})}])})})(mb);var lM=mb.exports;const cM=ga(lM);var Yg=We.extend({className:"g-widget-metadata-row",events:{"click .g-widget-metadata-edit-button":"editMetadata"},initialize:function(s){if(!Fe.has(this.parentView.modes,s.mode))throw new Error("Unsupported metadatum mode "+s.mode+" detected.");this.mode=s.mode,this.key=s.key,this.value=s.value,this.accessLevel=s.accessLevel,this.parentView=s.parentView,this.fieldName=s.fieldName,this.apiPath=s.apiPath,this.onMetadataEdited=s.onMetadataEdited,this.onMetadataAdded=s.onMetadataAdded},_validate:function(s,e,i){var t=this.parentView.modes[e];if(Fe.has(t,"validation")&&Fe.has(t.validation,"from")&&Fe.has(t.validation.from,s)){var r=t.validation.from[s][0],u=t.validation.from[s][1];if(!r(i))return _e.trigger("g:alert",{text:u,type:"warning"}),!1}return!0},toggleEditor:function(s,e,i,t){var r=i instanceof na?"json":"simple",u=(t||{}).value||i.$el.attr("g-value");if(this._validate(r,e,u)){var n=i.$el;i.destroy(),n.addClass("editing").empty();var a=Fe.extend({el:n,item:this.parentView.item,key:n.attr("g-key"),value:n.attr("g-value"),accessLevel:this.accessLevel,newDatum:!1,parentView:this,fieldName:this.fieldName,apiPath:this.apiPath,onMetadataEdited:this.onMetadataEdited,onMetadataAdded:this.onMetadataAdded},t||{});this.parentView.modes[e].editor(a).render()}},editMetadata:function(){this.$el.addClass("editing"),this.$el.empty();var s={item:this.parentView.item,key:this.$el.attr("g-key"),value:this.$el.attr("g-value"),accessLevel:this.accessLevel,newDatum:!1,parentView:this,fieldName:this.fieldName,apiPath:this.apiPath,onMetadataEdited:this.onMetadataEdited,onMetadataAdded:this.onMetadataAdded};if(this.mode==="json")try{var e=JSON.parse(this.$el.attr("g-value"));e!==void 0&&!Fe.isObject(e)&&(s.value=e)}catch{}this.parentView.modes[this.mode].editor(s).render().$el.appendTo(this.$el)},render:function(){return this.$el.attr({"g-key":this.key,"g-value":Fe.bind(this.parentView.modes[this.mode].displayValue,this)()}).empty(),this.$el.html(this.parentView.modes[this.mode].template({key:this.key,value:Fe.bind(this.parentView.modes[this.mode].displayValue,this)(),accessLevel:this.accessLevel,AccessType:Xe})),this}}),Oo=We.extend({events:{"click .g-widget-metadata-cancel-button":"cancelEdit","click .g-widget-metadata-save-button":"save","click .g-widget-metadata-delete-button":"deleteMetadatum","click .g-widget-metadata-toggle-button":function(s){var e;this instanceof na?e="simple":e="json",this.parentView.toggleEditor(s,e,this,{key:this.$el.find(".g-widget-metadata-key-input").val(),value:this.getCurrentValue()})}},initialize:function(s){this.item=s.item,this.key=s.key||"",this.fieldName=s.fieldName||"meta",this.value=s.value!==void 0?s.value:"",this.accessLevel=s.accessLevel,this.newDatum=s.newDatum,this.fieldName=s.fieldName,this.apiPath=s.apiPath,this.onMetadataEdited=s.onMetadataEdited,this.onMetadataAdded=s.onMetadataAdded},editTemplate:nM,getCurrentValue:function(){return this.$el.find(".g-widget-metadata-value-input").val()},deleteMetadatum:function(s){s.stopImmediatePropagation();var i=me(s.currentTarget).parent().parent(),t={text:"Are you sure you want to delete the metadatum <b>"+Fe.escape(this.key)+"</b>?",escapedHtml:!0,yesText:"Delete",confirmCallback:()=>{this.item.removeMetadata(this.key,function(){i.remove()},null,{field:this.fieldName,path:this.apiPath})}};tr(t)},cancelEdit:function(s){s.stopImmediatePropagation();var i=me(s.currentTarget).parent().parent();this.newDatum?i.remove():this.parentView.render()},save:function(s,e){s.stopImmediatePropagation();var t=me(s.currentTarget).parent(),r=t.find(".g-widget-metadata-key-input").val(),u=e!==void 0?e:t.find(".g-widget-metadata-value-input").val();if(this.newDatum&&r===""){_e.trigger("g:alert",{text:"A key is required for all metadata.",type:"warning"});return}var n=()=>{this.key=r,this.value=u,this.parentView.key=this.key,this.parentView.value=this.value,this instanceof na?this.parentView.mode="json":this.parentView.mode="simple",this.parentView.render(),this.newDatum=!1},a=function(o){_e.trigger("g:alert",{text:o.message,type:"danger"})};this.newDatum?this.onMetadataAdded?this.onMetadataAdded(r,u,n,a):this.item.addMetadata(r,u,n,a,{field:this.fieldName,path:this.apiPath}):this.onMetadataEdited?this.onMetadataEdited(r,this.key,u,n,a):this.item.editMetadata(r,this.key,u,n,a,{field:this.fieldName,path:this.apiPath})},render:function(){return this.$el.html(this.editTemplate({item:this.item,key:this.key,value:this.value,accessLevel:this.accessLevel,newDatum:this.newDatum,AccessType:Xe})),this.$el.find(".g-widget-metadata-key-input").trigger("focus"),this}}),na=Oo.extend({editTemplate:QD,getCurrentValue:function(){return this.editor.getText()},save:function(s){try{Oo.prototype.save.call(this,s,this.editor.get())}catch{_e.trigger("g:alert",{text:"The field contains invalid JSON and can not be saved.",type:"warning"})}},render:function(){Oo.prototype.render.apply(this,arguments);const s=this.$el.find(".g-json-editor");return this.editor=new cM(s[0],{mode:"tree",modes:["code","tree"],onError:()=>{_e.trigger("g:alert",{text:"The field contains invalid JSON and can not be viewed in Tree Mode.",type:"warning"})}}),this.value!==void 0&&(this.editor.setText(JSON.stringify(this.value)),this.editor.expandAll()),this}}),oa=We.extend({events:{"click .g-add-json-metadata":function(s){this.addMetadata(s,"json")},"click .g-add-simple-metadata":function(s){this.addMetadata(s,"simple")}},initialize:function(s){this.item=s.item,this.fieldName=s.fieldName||"meta",this.title=s.title||"Metadata",this.apiPath=s.apiPath,this.accessLevel=s.accessLevel,this.onMetadataEdited=s.onMetadataEdited,this.onMetadataAdded=s.onMetadataAdded,this.item.on("g:changed",function(){this.render()},this),this.render()},modes:{simple:{editor:function(s){return new Oo(s)},displayValue:function(){return this.value},template:aM},json:{editor:function(s){return s.value!==void 0&&(s.value=JSON.parse(s.value)),new na(s)},displayValue:function(){return JSON.stringify(this.value,null,4)},validation:{from:{simple:[function(s){try{return JSON.parse(s),!0}catch{}return!1},"The simple field is not valid JSON and can not be converted."]}},template:tM}},setItem:function(s){return this.item=s,this},getModeFromValue:function(s){return Fe.isString(s)?"simple":"json"},addMetadata:function(s,e){var i=this.modes[e].editor,t=e==="json"?"{}":"",r=new Yg({className:"g-widget-metadata-row editing",mode:e,key:"",value:t,item:this.item,fieldName:this.fieldName,apiPath:this.apiPath,accessLevel:this.accessLevel,parentView:this,onMetadataEdited:this.onMetadataEdited,onMetadataAdded:this.onMetadataAdded});r.$el.appendTo(this.$(".g-widget-metadata-container")),new i({item:this.item,key:"",value:t,fieldName:this.fieldName,apiPath:this.apiPath,accessLevel:this.accessLevel,newDatum:!0,parentView:r,onMetadataEdited:this.onMetadataEdited,onMetadataAdded:this.onMetadataAdded}).render().$el.appendTo(r.$el)},render:function(){var s=this.item.get(this.fieldName)||{},e=Object.keys(s);return e.sort(lm),this.$el.html(sM({item:this.item,title:this.title,accessLevel:this.accessLevel,AccessType:Xe})),Fe.each(e,function(i){this.$el.find(".g-widget-metadata-container").append(new Yg({mode:this.getModeFromValue(s[i]),key:i,value:s[i],accessLevel:this.accessLevel,parentView:this,fieldName:this.fieldName,apiPath:this.apiPath,onMetadataEdited:this.onMetadataEdited,onMetadataAdded:this.onMetadataAdded}).render().$el)},this),this}});function Vg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Ju(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Ju(s){var e=""+s,i=dM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var dM=/["&<>]/;function vb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void vb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function hM(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l,c){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-subtitle"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",g&&l&&(u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-dialog-subtitle">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",l==="folder"?(u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-folder-open"></i>'):l==="item"?(u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-doc-text-inv"></i>'):l==="file"&&(u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-doc-inv"></i>'),u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Ju((t=g.name())==null?"":t)+"</div>")},u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-browse-or-drop"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-drop-zone">',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-docs"></i>',u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+" ",u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Ju((t=a)==null?"":t)+"</div>",u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="form-group hide">',u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+"<input"+(' id="g-files" type="file"'+Vg("multiple",o?"multiple":null,!0,!1))+"/></div>"},u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-progress"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-current-progress-message"></div>',u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-progress-current progress progress-striped hide">',u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="progress-bar progress-bar-info" role="progressbar"></div></div>',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-overall-progress-message">',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Ju((t=h)==null?"":t)+"</div>",u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-progress-overall progress progress-striped hide">',u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="progress-bar progress-bar-info" role="progressbar"></div></div>',u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-upload-error-message g-validation-failed-message"></div>'},u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-start-button"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+"<button"+(' class="g-start-upload btn btn-small btn-primary disabled" type="submit"'+Vg("disabled",!0,!0,!1))+">",u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-upload"></i>',u=31,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+" Start Upload</button>"},u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<div class="modal-dialog">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<div class="modal-content">',u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<form class="modal-form" id="g-upload-form" role="form">',u=6,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<div class="modal-header">',u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+"&times;</button>",u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<h4 class="modal-title">',u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+Ju((t=c)==null?"":t)+"</h4>",u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",i["g-upload-widget-subtitle"](),e=e+"</div>",u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<div class="modal-body">',u=11,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",i["g-upload-widget-browse-or-drop"](),u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",i["g-upload-widget-progress"](),e=e+"</div>",u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<div class="modal-footer">',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",e=e+"Close</a>",u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidget.pug",i["g-upload-widget-start-button"](),e=e+"</div></form></div></div>"}).call(this,"browseText"in n?n.browseText:typeof browseText<"u"?browseText:void 0,"multiFile"in n?n.multiFile:typeof multiFile<"u"?multiFile:void 0,"noneSelectedText"in n?n.noneSelectedText:typeof noneSelectedText<"u"?noneSelectedText:void 0,"parent"in n?n.parent:typeof parent<"u"?parent:void 0,"parentType"in n?n.parentType:typeof parentType<"u"?parentType:void 0,"title"in n?n.title:typeof title<"u"?title:void 0)}catch(a){vb(a,r,u)}return e}function Xg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Zu(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Zu(s){var e=""+s,i=gM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var gM=/["&<>]/;function bb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void bb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function FM(s){var e="",i={},t,r,u;try{var n=s||{};(function(a,o,h,g,l,c){u=1,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-subtitle"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=2,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",g&&l&&(u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-dialog-subtitle">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",l==="folder"?(u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-folder-open"></i>'):l==="item"?(u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-doc-text-inv"></i>'):l==="file"&&(u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-doc-inv"></i>'),u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Zu((t=g.name())==null?"":t)+"</div>")},u=12,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-browse-or-drop"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=13,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-drop-zone">',u=14,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-docs"></i>',u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+" ",u=15,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Zu((t=a)==null?"":t)+"</div>",u=16,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="form-group hide">',u=17,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+"<input"+(' id="g-files" type="file"'+Xg("multiple",o?"multiple":null,!0,!1))+"/></div>"},u=19,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-progress"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=20,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-current-progress-message"></div>',u=21,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-progress-current progress progress-striped hide">',u=22,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="progress-bar progress-bar-info" role="progressbar"></div></div>',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-overall-progress-message">',u=23,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+Zu((t=h)==null?"":t)+"</div>",u=24,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-progress-overall progress progress-striped hide">',u=25,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="progress-bar progress-bar-info" role="progressbar"></div></div>',u=26,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<div class="g-upload-error-message g-validation-failed-message"></div>'},u=28,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",i["g-upload-widget-start-button"]=t=function(){var d=this&&this.block,F=this&&this.attributes||{};u=29,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+"<button"+(' class="g-start-upload btn btn-small btn-primary disabled" type="submit"'+Xg("disabled",!0,!0,!1))+">",u=30,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+'<i class="icon-upload"></i>',u=31,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetMixins.pug",e=e+" Start Upload</button>"},u=3,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",e=e+'<form id="g-upload-form">',u=4,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",c&&(u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",e=e+"<h4>",u=5,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",e=e+Zu((t=c)==null?"":t)+"</h4>"),u=6,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",i["g-upload-widget-subtitle"](),u=7,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",i["g-upload-widget-browse-or-drop"](),u=8,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",i["g-upload-widget-progress"](),u=9,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",e=e+'<div class="g-nonmodal-upload-buttons-container">',u=10,r="/home/circleci/project/girder/girder/web/src/templates/widgets/uploadWidgetNonModal.pug",i["g-upload-widget-start-button"](),e=e+"</div></form>"}).call(this,"browseText"in n?n.browseText:typeof browseText<"u"?browseText:void 0,"multiFile"in n?n.multiFile:typeof multiFile<"u"?multiFile:void 0,"noneSelectedText"in n?n.noneSelectedText:typeof noneSelectedText<"u"?noneSelectedText:void 0,"parent"in n?n.parent:typeof parent<"u"?parent:void 0,"parentType"in n?n.parentType:typeof parentType<"u"?parentType:void 0,"title"in n?n.title:typeof title<"u"?title:void 0)}catch(a){bb(a,r,u)}return e}var Ka=We.extend({events:{"submit #g-upload-form":function(s){s.preventDefault(),this.startUpload()},"click .g-resume-upload":function(){this.$(".g-upload-error-message").html(""),this.currentFile.resumeUpload()},"click .g-restart-upload":function(){this.$(".g-upload-error-message").html(""),this.uploadNextFile()},"change #g-files":function(){var s=this.$("#g-files")[0].files;s.length&&(this.files=s,this.filesChanged())},"click .g-drop-zone":function(){this.$("#g-files").trigger("click")},"dragenter .g-drop-zone":function(s){s.stopPropagation(),s.preventDefault(),s.originalEvent.dataTransfer.dropEffect="copy",this.$(".g-drop-zone").addClass("g-dropzone-show").html('<i class="icon-bullseye"/> Drop files here')},"dragleave .g-drop-zone":function(s){s.stopPropagation(),s.preventDefault(),this.$(".g-drop-zone").removeClass("g-dropzone-show").html('<i class="icon-docs"/> Browse or drop files')},"dragover .g-drop-zone":function(s){var e=s.originalEvent.dataTransfer;if(e){var i=e.effectAllowed;e.dropEffect=i==="move"||i==="linkMove"?"move":"copy",s.preventDefault()}},"drop .g-drop-zone":"filesDropped"},initialize:function(s){s.noParent?(this.parent=null,this.parentType=null):(this.parent=s.parent||s.folder,this.parentType=s.parentType||"folder"),this.files=[],this.totalSize=0,this.title=Fe.has(s,"title")?s.title:"Upload files",this.modal=Fe.has(s,"modal")?s.modal:!0,this.multiFile=Fe.has(s,"multiFile")?s.multiFile:this.parentType!=="file",this.overrideStart=s.overrideStart||!1,this.otherParams=s.otherParams||{},this._browseText=this.multiFile?"Browse or drop files here":"Browse or drop a file here",this._noneSelectedText=this.multiFile?"No files selected":"No file selected"},render:function(){var s={parent:this.parent,parentType:this.parentType,title:this.title,multiFile:this.multiFile,browseText:this._browseText,noneSelectedText:this._noneSelectedText};if(this.modal){this.$el.html(hM(s));var e;this.parentType==="file"&&(e=this.parent.get("_id")),this.$el.girderModal(this).on("hidden.bs.modal",()=>{me(".g-resume-upload").length&&this.currentFile&&this.currentFile.abortUpload(),ar("upload",void 0,e)}),br("upload",void 0,e)}else this.$el.html(FM(s));return this},filesDropped:function(s){s.stopPropagation(),s.preventDefault(),this.$(".g-drop-zone").removeClass("g-dropzone-show").html(`<i class="icon-docs"/> ${this._browseText}`);var e=s.originalEvent.dataTransfer;if(!Fe.every(e.items,i=>this._isFile(i))){this.$(".g-upload-error-message").html("Only files may be uploaded.");return}this.files=e.files,!this.multiFile&&this.files.length>1&&(this.files=[this.files[0]]),this.filesChanged()},filesChanged:function(){if(this.files.length===0)this.$(".g-overall-progress-message").text(this._noneSelectedText),this.setUploadEnabled(!1);else{this.totalSize=0,Fe.each(this.files,function(e){this.totalSize+=e.size},this);var s;this.files.length>1?s="Selected "+this.files.length+" files":s="Selected <b>"+this.files[0].name+"</b>",this.$(".g-overall-progress-message").html('<i class="icon-ok"/> '+s+"  ("+Yt(this.totalSize)+") -- Press start button"),this.setUploadEnabled(!0),this.$(".g-progress-overall,.g-progress-current").addClass("hide"),this.$(".g-current-progress-message").empty(),this.$(".g-upload-error-message").empty()}this.trigger("g:filesChanged",this.files)},startUpload:function(){this.setUploadEnabled(!1),this.$(".g-drop-zone").addClass("hide"),this.$(".g-progress-overall").removeClass("hide"),this.$(".g-upload-error-message").empty(),this.multiFile&&this.$(".g-progress-current").removeClass("hide"),this.currentIndex=0,this.overallProgress=0,this.trigger("g:uploadStarted"),this.overrideStart||this.uploadNextFile()},setUploadEnabled:function(s){this.$(".g-start-upload").girderEnable(s)},uploadNextFile:function(){if(this.currentIndex>=this.files.length){this.modal&&this.$el.modal("hide"),this.trigger("g:uploadFinished",{files:this.files,totalSize:this.totalSize});return}if(this.currentFile=this.parentType==="file"?this.parent:new Ua,this.currentFile.on("g:upload.complete",function(){this.files[this.currentIndex].id=this.currentFile.id,this.currentIndex+=1,this.uploadNextFile()},this).on("g:upload.chunkSent",function(e){this.overallProgress+=e.bytes},this).on("g:upload.progress",function(e){var i=e.startByte+e.loaded;this.$(".g-progress-current>.progress-bar").css("width",Math.ceil(100*i/e.total)+"%"),this.$(".g-progress-overall>.progress-bar").css("width",Math.ceil(100*(this.overallProgress+e.loaded)/this.totalSize)+"%"),this.$(".g-current-progress-message").html('<i class="icon-doc-text"/>'+(this.currentIndex+1)+" of "+this.files.length+" - <b>"+e.file.name+"</b>: "+Yt(i)+" / "+Yt(e.total)),this.$(".g-overall-progress-message").html("Overall progress: "+Yt(this.overallProgress+e.loaded)+" / "+Yt(this.totalSize))},this).on("g:upload.error",function(e){var i=e.message+' <a class="g-resume-upload">Click to resume upload</a>';me(".g-upload-error-message").html(i)},this).on("g:upload.errorStarting",function(e){var i=e.message+' <a class="g-restart-upload">Click to restart upload</a>';me(".g-upload-error-message").html(i)},this),this.parentType==="file")this.currentFile.updateContents(this.files[this.currentIndex]);else{var s=this.otherParams;Fe.isFunction(this.otherParams)&&(s=this.otherParams(this)),this.currentFile.upload(this.parent,this.files[this.currentIndex],null,s)}},_isFile:function(s){var e=s.getAsEntry;if(Fe.isFunction(e)||(e=s.webkitGetAsEntry),!Fe.isFunction(e))return!0;var i=e.call(s);return i&&i.isFile}});function Gg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Qu(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Qu(s){var e=""+s,i=pM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var pM=/["&<>]/;function wb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void wb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function fM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,g,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug";var g=0;r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",function(){var l=h;if(typeof l.length=="number")for(var c=0,d=l.length;c<d;c++){var F=l[c];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+"<li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+"<a"+(' class="g-breadcrumb-link"'+Gg("g-index",g,!0,!1))+">",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",F.resourceName==="user"?(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-user"></i>'):F.resourceName==="collection"&&(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-sitemap"></i>'),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+Qu((i=F.name())==null?"":i)+"</a></li>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",g+=1}else{var d=0;for(var c in l){d++;var F=l[c];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+"<li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+"<a"+(' class="g-breadcrumb-link"'+Gg("g-index",g,!0,!1))+">",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",F.resourceName==="user"?(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-user"></i>'):F.resourceName==="collection"&&(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-sitemap"></i>'),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+Qu((i=F.name())==null?"":i)+"</a></li>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",g+=1}}}.call(this),r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",n&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<li class="active">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",n.resourceName==="user"?(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-user"></i>'):n.resourceName==="collection"&&(r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-sitemap"></i>'),r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+Qu((i=n.name())==null?"":i)+"</li>"),r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",a&&(r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<a class="g-description-preview">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+Qu((i=a)==null?"":i)+"</a>"),r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="pull-right">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-child-count-container hide">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-subfolder-count-container" title="total folders">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-folder"></i>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-subfolder-count"></div></div>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",g>0&&(r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-item-count-container" title="total items">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-item-count"></div></div>'),e=e+"</div>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",g>0&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<div class="g-level-up-button-container">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<a class="g-hierarchy-level-up" title="Go up one level">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyBreadcrumb.pug",e=e+'<i class="icon-level-up"></i></a></div>'),e=e+"</div>"}).call(this,"current"in u?u.current:typeof current<"u"?current:void 0,"descriptionText"in u?u.descriptionText:typeof descriptionText<"u"?descriptionText:void 0,"idx"in u?u.idx:typeof idx<"u"?idx:void 0,"links"in u?u.links:typeof links<"u"?links:void 0)}catch(n){wb(n,t,r)}return e}function oc(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=yb(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function yb(s){var e=""+s,i=mM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var mM=/["&<>]/;function xb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void xb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function vM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<div class="g-hierarchy-pages-header">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<div class="g-hierarchycenter">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<ul class="pagination pagination-sm">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",n>1&&!a?(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<li class="g-page-prev">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<a id="g-previous-paginated">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"« Prev</a></li>"):(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<li class="g-page-prev disabled">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<a id="g-previous-paginated">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"« Prev</a></li>"),r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"<li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"<span>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"Page:",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"<input"+(' id="g-page-selection-input"'+oc("disabled",a,!0,!1)+' type="number" min="1"'+oc("max",o,!0,!1)+oc("value",n,!0,!1))+"/>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"<span>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"of ",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+yb((i=o)==null?"":i)+"</span></span></li>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",n+1<=o&&!a?(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<li class="g-page-next">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<a id="g-next-paginated">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"Next »</a></li>"):(r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<li class="g-page-next disabled">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+'<a id="g-next-paginated">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyPaginated.pug",e=e+"Next »</a></li>"),e=e+"</ul></div></div>"}).call(this,"currentPage"in u?u.currentPage:typeof currentPage<"u"?currentPage:void 0,"disabled"in u?u.disabled:typeof disabled<"u"?disabled:void 0,"totalPages"in u?u.totalPages:typeof totalPages<"u"?totalPages:void 0)}catch(n){xb(n,t,r)}return e}function qg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Gs(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Gs(s){var e=""+s,i=bM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var bM=/["&<>]/;function Cb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Cb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function wM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c,d,F,p){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-hierarchy-widget">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-hierarchy-breadcrumb-bar">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<ol class="breadcrumb"></ol></div>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",d&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-hierarchy-actions-header">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",o&&(r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<input class="g-select-all" type="checkbox" title="Select / Unselect all"/>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="btn-group">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-checked-actions-button btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" disabled="disabled" title="Checked actions">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-check"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-down-dir"></i></button>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<ul class="g-checked-actions-menu dropdown-menu" role="menu"></ul></div>'),r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-folder-header-buttons">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",p==="folder"?(r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-folder-info-button btn btn-sm btn-info" title="Show folder info">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-info"></i></button>',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",g>=n.WRITE&&(r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-upload-here-button btn btn-sm btn-success" title="Upload here">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-upload"></i></button>'),r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",g>=n.ADMIN&&(r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-folder-access-button g-edit-access btn btn-sm btn-warning" title="Access control">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-lock"></i></button>')):p==="collection"&&(r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-collection-info-button btn btn-sm btn-info" title="Show collection info">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-info"></i></button>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",g>=n.ADMIN&&(r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-edit-access btn btn-sm btn-warning" title="Access control">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-lock"></i></button>')),r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="btn-group">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"<button"+(' class="g-folder-actions-button btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"'+qg("title",`${a(p)} actions`,!0,!1))+">",r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",p==="collection"?(r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-sitemap"></i>'):p==="user"?(r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-user"></i>'):p==="folder"&&(r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-folder-open"></i>'),r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-down-dir"></i></button>',r=42,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<ul class="g-folder-actions-menu dropdown-menu pull-right" role="menu">',r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li class="dropdown-header" role="presentation">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",p==="collection"?(r=45,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-sitemap"></i>'):p==="user"?(r=47,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-user"></i>'):p==="folder"&&(r=49,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-folder-open"></i>'),r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+" ",r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+Gs((i=l.name())==null?"":i)+"</li>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",(p==="folder"||p==="collection")&&(r=52,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li role="presentation">',r=53,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"<a"+(' class="g-download-folder" role="menuitem"'+qg("href",l.downloadUrl(),!0,!1))+">",r=54,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-download"></i>',r=55,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"Download ",r=55,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+Gs((i=p)==null?"":i)+"</a></li>"),r=56,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",g>=n.WRITE&&(r=57,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li role="presentation">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<a class="g-create-subfolder" role="menuitem">',r=59,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-folder"></i>',r=60,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"Create folder here</a></li>",r=61,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",(p==="folder"||p==="collection")&&(r=62,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",p==="folder"&&(r=63,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li role="presentation">',r=64,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<a class="g-create-item" role="menuitem">',r=65,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-doc"></i>',r=66,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"Create item here</a></li>"),r=67,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li role="presentation">',r=68,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<a class="g-edit-folder" role="menuitem">',r=69,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-edit"></i>',r=70,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"Edit ",r=70,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+Gs((i=p)==null?"":i)+"</a></li>")),r=71,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",g>=n.ADMIN&&(p==="folder"||p==="collection")&&(r=72,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li class="divider" role="presentation"></li>',r=73,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li role="presentation">',r=74,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<a class="g-delete-folder" role="menuitem">',r=75,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-trash"></i>',r=76,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+"Delete this ",r=76,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+Gs((i=p)==null?"":i)+"</a></li>"),e=e+"</ul></div></div>",r=77,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-clear-right"></div></div>'),r=78,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",c&&(r=79,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-select-folder-container">',r=80,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<ul class="g-folder-list">',r=81,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<li class="g-folder-list-entry" public="true">',r=82,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<button class="g-select-folder btn btn-sm btn-info">',r=83,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-folder"></i>',r=84,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+" Select this ",r=84,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+Gs((i=p)==null?"":i),r=84,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+".",r=85,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-right-dir"></i></button></li></ul></div>'),r=86,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-folder-list-container"></div>',r=87,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-item-list-container"></div>',r=88,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-empty-parent-message g-info-message-container hide">',r=89,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<i class="icon-info-circled"></i>',r=90,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",h?(r=91,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+" This folder has no suitable items."):(r=93,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+" This folder is empty."),e=e+"</div>",r=94,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-hierarachy-paginated-bar"></div></div>',r=95,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",F&&(r=96,t="/home/circleci/project/girder/girder/web/src/templates/widgets/hierarchyWidget.pug",e=e+'<div class="g-folder-metadata"></div>')}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"capitalize"in u?u.capitalize:typeof capitalize<"u"?capitalize:void 0,"checkboxes"in u?u.checkboxes:typeof checkboxes<"u"?checkboxes:void 0,"itemFilter"in u?u.itemFilter:typeof itemFilter<"u"?itemFilter:void 0,"level"in u?u.level:typeof level<"u"?level:void 0,"model"in u?u.model:typeof model<"u"?model:void 0,"onFolderSelect"in u?u.onFolderSelect:typeof onFolderSelect<"u"?onFolderSelect:void 0,"showActions"in u?u.showActions:typeof showActions<"u"?showActions:void 0,"showMetadata"in u?u.showMetadata:typeof showMetadata<"u"?showMetadata:void 0,"type"in u?u.type:typeof type<"u"?type:void 0)}catch(n){Cb(n,t,r)}return e}var St=null,yM=We.extend({events:{"click a.g-breadcrumb-link":function(s){var e=me(s.currentTarget);this.trigger("g:breadcrumbClicked",parseInt(e.attr("g-index"),10))}},initialize:function(s){this.objects=s.objects},render:function(){var s=this.objects.slice(0),e=s.pop(),i=me(M0(e.get("description")||"")).text();return this.$el.html(fM({links:s,current:e,descriptionText:i})),this}}),xM=We.extend({events:{"change #g-page-selection-input":function(s){const e=Number(s.target.value);this.itemListWidget&&e<=this.itemListWidget.getNumPages()&&e>0&&(this.disabled=!0,this.itemListWidget.setPage(e).done(()=>{this.disabled=!1,this.render()})),this.render()},"click li.g-page-next:not(.disabled) a#g-next-paginated":function(){this.disabled=!0,this.itemListWidget.setPage(Number(this.$("#g-page-selection-input").val())+1).done(()=>{this.disabled=!1,this.render()}),this.render()},"click li.g-page-prev:not(.disabled) a#g-previous-paginated":function(){this.disabled=!0,this.itemListWidget.setPage(Number(this.$("#g-page-selection-input").val())-1).done(()=>{this.disabled=!1,this.render()}),this.render()}},initialize:function(s){this.itemListWidget=s.itemListWidget,this.disabled=!1},render:function(){return this.$el.html(vM({totalPages:this.itemListWidget&&this.itemListWidget.getNumPages(),currentPage:this.itemListWidget&&this.itemListWidget.getCurrentPage(),disabled:this.disabled})),this}}),CM=We.extend({events:{"click a.g-create-subfolder":"createFolderDialog","click a.g-edit-folder":"editFolderDialog","click button.g-select-folder":"selectFolder","click a.g-delete-folder":"deleteFolderDialog","click .g-folder-info-button":"showInfoDialog","click .g-collection-info-button":"showInfoDialog","click .g-description-preview":"showInfoDialog","click a.g-create-item":"createItemDialog","click .g-upload-here-button":"uploadDialog","click .g-edit-access":"editAccess","click .g-hierarchy-level-up":"upOneLevel","click a.g-download-checked":"downloadChecked","click a.g-pick-checked":"pickChecked","click a.g-move-picked":"movePickedResources","click a.g-copy-picked":"copyPickedResources","click a.g-clear-picked":"clearPickedResources","click a.g-delete-checked":"deleteCheckedDialog","click .g-list-checkbox":"checkboxListener","change .g-select-all":function(s){this.folderListView.checkAll(s.currentTarget.checked),this.itemListView&&this.itemListView.checkAll(s.currentTarget.checked)}},initialize:function(s){this.parentModel=s.parentModel,this.upload=s.upload,this._showActions=Fe.has(s,"showActions")?s.showActions:!0,this._showItems=Fe.has(s,"showItems")?s.showItems:!0,this._itemFilter=s.itemFilter,this._checkboxes=Fe.has(s,"checkboxes")?s.checkboxes:!0,this._downloadLinks=Fe.has(s,"downloadLinks")?s.downloadLinks:!0,this._viewLinks=Fe.has(s,"viewLinks")?s.viewLinks:!0,this._showSizes=Fe.has(s,"showSizes")?s.showSizes:!0,this._showMetadata=Fe.has(s,"showMetadata")?s.showMetadata:!0,this._routing=Fe.has(s,"routing")?s.routing:!0,this._appendPages=Fe.has(s,"appendPages")?s.appendPages:!1,this._onItemClick=s.onItemClick||function(e){He.navigate("item/"+e.get("_id"),{trigger:!0})},this._defaultSelectedResource=s.defaultSelectedResource,this._highlightItem=Fe.has(s,"highlightItem")?s.highlightItem:!1,this._paginated=Fe.has(s,"paginated")?s.paginated:!1,this._onFolderSelect=s.onFolderSelect,this.folderAccess=s.folderAccess,this.folderCreate=s.folderCreate,this.folderEdit=s.folderEdit,this.itemCreate=s.itemCreate,this.breadcrumbs=[this.parentModel],this.breadcrumbView=new yM({objects:this.breadcrumbs,parentView:this}),this.breadcrumbView.on("g:breadcrumbClicked",function(e){this.breadcrumbs=this.breadcrumbs.slice(0,e+1),this.setCurrentModel(this.breadcrumbs[e]),this._setRoute()},this),this.checkedMenuWidget=new Jv({pickedCount:this.getPickedCount(),pickedCopyAllowed:this.getPickedCopyAllowed(),pickedMoveAllowed:this.getPickedMoveAllowed(),pickedDesc:this.getPickedDescription(),parentView:this}),this.folderListView=new ab({folderFilter:this._itemFilter,parentType:this.parentModel.resourceName,parentId:this.parentModel.get("_id"),checkboxes:this._checkboxes,parentView:this}),this.folderListView.on("g:folderClicked",function(e){this.descend(e),this.uploadWidget&&(this.uploadWidget.folder=e)},this).off("g:checkboxesChanged").on("g:checkboxesChanged",this.updateChecked,this).off("g:changed").on("g:changed",function(){this.folderCount=this.folderListView.collection.length,this._childCountCheck()},this),this.parentModel.resourceName==="folder"?this._fetchToRoot(this.parentModel):(this.itemCount=0,this.render()),_e.on("g:login",()=>{this.constructor.resetPickedResources()},this)},_childCountCheck:function(){var s=this.$(".g-empty-parent-message").addClass("hide");this.folderCount===0&&this.itemCount===0&&s.removeClass("hide")},_initFolderViewSubwidgets:function(){this.itemListView||(this.itemListView=new cb({itemFilter:this._itemFilter,folderId:this.parentModel.id,public:this.parentModel.get("public"),accessLevel:this.parentModel.getAccessLevel(),checkboxes:this._checkboxes,downloadLinks:this._downloadLinks,viewLinks:this._viewLinks,showSizes:this._showSizes,selectedItem:this._defaultSelectedResource,highlightItem:this._highlightItem,paginated:this._paginated,parentView:this}),this.listenTo(this.itemListView,"g:itemClicked",this._onItemClick),this.listenTo(this.itemListView,"g:checkboxesChanged",this.updateChecked),this.listenTo(this.itemListView,"g:changed",()=>{this.itemCount=this.itemListView.collection.length,this._childCountCheck(),this._paginated&&this.hierarchyPaginated&&this.itemListView.getNumPages()>1?(this.parentModel.resourceName!=="collection"&&this.hierarchyPaginated.setElement(this.$(".g-hierarachy-paginated-bar")).render(),this.$(".g-hierarchy-breadcrumb-bar").addClass("g-hierarchy-sticky"),this.$(".g-hierarachy-paginated-bar").addClass("g-hierarchy-sticky"),this.$(".g-hierarchy-breadcrumb-bar").css({top:0}),this.$(".g-hierarachy-paginated-bar").css({bottom:0}),this.$(".g-hierarachy-paginated-bar").removeClass("hidden")):this.$(".g-hierarachy-paginated-bar").addClass("hidden")}),this.listenTo(this.itemListView,"g:paginated",()=>{this._paginated&&!this.hierarchyPaginated&&(this.hierarchyPaginated=new xM({parentView:this,itemListWidget:this.itemListView}))})),this.metadataWidget||(this.metadataWidget=new oa({item:this.parentModel,parentView:this,accessLevel:this.parentModel.getAccessLevel()}))},_setRoute:function(){if(this._routing){var s=this.breadcrumbs[0].resourceName+"/"+this.breadcrumbs[0].get("_id");this.parentModel.resourceName==="folder"&&(s+="/folder/"+this.parentModel.get("_id")),He.navigate(s),_e.trigger("g:hierarchy.route",{route:s})}},_fetchToRoot:function(s){s.getRootPath().done(e=>{const i=e.map(t=>new bm[cm(t.type)](t.object));this.breadcrumbs.unshift(...i),this.render()})},render:function(){return this.folderCount=null,this.itemCount=null,this.$el.html(wM({type:this.parentModel.resourceName,model:this.parentModel,level:this.parentModel.getAccessLevel(),AccessType:Xe,onFolderSelect:this._onFolderSelect,showActions:this._showActions,showMetadata:this._showMetadata,checkboxes:this._checkboxes,capitalize:dm,itemFilter:this._itemFilter})),this.$(".g-folder-actions-menu>li>a").length===0&&this.$(".g-folder-actions-button").girderEnable(!1),this.breadcrumbView.setElement(this.$(".g-hierarchy-breadcrumb-bar>ol")).render(),this.checkedMenuWidget.dropdownToggle=this.$(".g-checked-actions-button"),this.checkedMenuWidget.setElement(this.$(".g-checked-actions-menu")).render(),this.folderListView.setElement(this.$(".g-folder-list-container")).render(),this.hierarchyPaginated&&this.parentModel.resourceName!=="collection"&&this.hierarchyPaginated.setElement(this.$(".g-hierarachy-paginated-bar")).render(),this.parentModel.resourceName==="folder"&&this._showItems&&(this._initFolderViewSubwidgets(),this.itemListView.setElement(this.$(".g-item-list-container")).render(),this.metadataWidget.setItem(this.parentModel),this.metadataWidget.accessLevel=this.parentModel.getAccessLevel(),this._showMetadata&&this.metadataWidget.setElement(this.$(".g-folder-metadata")).render()),this.parentModel.resourceName==="collection"&&this._showMetadata&&(this.metadataWidget||(this.metadataWidget=new oa({item:this.parentModel,parentView:this,accessLevel:this.parentModel.getAccessLevel()})),this.metadataWidget.setItem(this.parentModel),this.metadataWidget.accessLevel=this.parentModel.getAccessLevel(),this.metadataWidget.setElement(this.$(".g-folder-metadata")).render()),this.upload?this.uploadDialog():this.folderAccess?this.editAccess():this.folderCreate?this.createFolderDialog():this.folderEdit?this.editFolderDialog():this.itemCreate&&this.createItemDialog(),this.fetchAndShowChildCount(),this},descend:function(s){this.breadcrumbs.push(s),this.setCurrentModel(s)},upOneLevel:function(){this.breadcrumbs.pop(),this.setCurrentModel(this.breadcrumbs[this.breadcrumbs.length-1])},selectFolder:function(){Fe.isFunction(this._onFolderSelect)&&this._onFolderSelect(this.parentModel)},createFolderDialog:function(){new ud({el:me("#g-dialog-container"),parentModel:this.parentModel,parentView:this}).on("g:saved",function(s){this.folderListView.insertFolder(s),this.parentModel.has("nFolders")&&this.parentModel.increment("nFolders"),this.updateChecked()},this).render()},createItemDialog:function(){new Vh({el:me("#g-dialog-container"),parentModel:this.parentModel,parentView:this}).on("g:saved",function(s){this.itemListView.insertItem(s),this.parentModel.has("nItems")&&this.parentModel.increment("nItems"),this.updateChecked()},this).render()},editFolderDialog:function(){this.parentModel.resourceName==="folder"?new ud({el:me("#g-dialog-container"),parentModel:this.parentModel,folder:this.parentModel,parentView:this}).on("g:saved",function(){_e.trigger("g:alert",{icon:"ok",text:"Folder info updated.",type:"success",timeout:4e3}),this.breadcrumbView.render()},this).on("g:fileUploaded",function(s){var e=new Ms({_id:s.model.get("itemId")});e.once("g:fetched",function(){this.itemListView.insertItem(e),this.parentModel.has("nItems")&&this.parentModel.increment("nItems"),this.updateChecked()},this).fetch()},this).render():this.parentModel.resourceName==="collection"&&new qa({el:me("#g-dialog-container"),model:this.parentModel,parentView:this}).on("g:saved",function(){this.breadcrumbView.render(),this.trigger("g:collectionChanged")},this).render()},deleteFolderDialog:function(){var s=this.parentModel.resourceName,e={text:"Are you sure you want to delete the "+s+" <b>"+this.parentModel.escape("name")+"</b>?",escapedHtml:!0,yesText:"Delete",confirmCallback:()=>{this.parentModel.on("g:deleted",function(){s==="collection"?He.navigate("collections",{trigger:!0}):s==="folder"&&(this.breadcrumbs.pop(),this.setCurrentModel(this.breadcrumbs.slice(-1)[0]))},this).destroy({throwError:!0,progress:!0})}};s==="collection"&&(this.parentModel.get("nFolders")!==0||this.parentModel.get("size")!==0)&&(e=Fe.extend({name:this.parentModel.escape("name"),additionalText:"<b>"+this.parentModel.escape("name")+"</b> contains <b>"+this.parentModel.escape("nFolders")+" folders</b> taking up <b>"+Yt(parseInt(this.parentModel.get("size"),10))+"</b>",msgConfirmation:!0},e)),tr(e)},showInfoDialog:function(){var s={el:me("#g-dialog-container"),model:this.parentModel,parentView:this};this.parentModel.resourceName==="collection"?new Qv(s).render():this.parentModel.resourceName==="folder"&&new nb(s).render()},fetchAndShowChildCount:function(){this.$(".g-child-count-container").addClass("hide");var s=()=>{const e=Lc(this.parentModel.get("nFolders"));this.$(".g-child-count-container").removeClass("hide"),this.$(".g-subfolder-count").text(e);const i=e===1?`${e} total folder`:`${e} total folders`;if(this.$(".g-subfolder-count-container").attr("title",i),this.parentModel.has("nItems")){const t=Lc(this.parentModel.get("nItems"));this.$(".g-item-count").text(t);const r=t===1?`${t} total item`:`${t} total items`;this.$(".g-item-count-container").attr("title",r)}};return this.parentModel.has("nFolders")?s():(this.parentModel.set("nFolders",0),this.parentModel.once("g:fetched.details",function(){s()},this).fetch({extraPath:"details"})),this.parentModel.off("change:nItems",s,this).on("change:nItems",s,this).off("change:nFolders",s,this).on("change:nFolders",s,this),this},setCurrentModel:function(s,e){e=e||{},this.parentModel=s,this.breadcrumbView.objects=this.breadcrumbs,this.folderListView.initialize({parentType:s.resourceName,parentId:s.get("_id"),checkboxes:this._checkboxes,folderFilter:this._itemFilter}),this.updateChecked(),s.resourceName==="folder"&&(this.itemListView&&this.itemListView.initialize({folderId:s.get("_id"),checkboxes:this._checkboxes,downloadLinks:this._downloadLinks,viewLinks:this._viewLinks,itemFilter:this._itemFilter,showSizes:this._showSizes,paginated:this._paginated,public:this.parentModel.get("public"),accessLevel:this.parentModel.getAccessLevel()}),this._initFolderViewSubwidgets()),this.render(),(!Fe.has(e,"setRoute")||e.setRoute)&&this._setRoute(),this.trigger("g:setCurrentModel")},_describeResources:function(s){for(var e=["folder","item"],i=[],t=0;t<e.length;t+=1){var r=e[t];s[r]&&s[r].length&&i.push(s[r].length+" "+r+(s[r].length!==1?"s":""))}switch(i.length){case 0:return"nothing";case 1:return i[0];case 2:return i[0]+" and "+i[1]}},deleteCheckedDialog:function(){var s=this.folderListView.checked,e;this.itemListView&&this.itemListView.checked.length&&(e=this.itemListView.checked);var i=this._describeResources({folder:s,item:e}),t={text:"Are you sure you want to delete the checked resources ("+i+")?",yesText:"Delete",confirmCallback:()=>{var r=this._getCheckedResourceParam(),u=this._getCheckedResourceSize();Ve({url:"resource",method:"POST",data:{resources:r,progress:!0},headers:{"X-HTTP-Method-Override":"DELETE"}}).done(()=>{e&&e.length&&this.parentModel.has("nItems")&&this.parentModel.increment("nItems",-e.length),s.length&&this.parentModel.has("nFolders")&&this.parentModel.increment("nFolders",-s.length),this.parentModel.has("size")&&u.items&&this.parentModel.increment("size",-u.items),this.setCurrentModel(this.parentModel,{setRoute:!1})})}};tr(t)},uploadDialog:function(){var s=me("#g-dialog-container");new Ka({el:s,parent:this.parentModel,parentType:this.parentType,parentView:this}).on("g:uploadFinished",function(e){ar("upload"),this.upload=!1,this.parentModel.has("nItems")&&this.parentModel.increment("nItems",e.files.length),this.parentModel.has("size")&&this.parentModel.increment("size",e.totalSize),this.setCurrentModel(this.parentModel,{setRoute:!1})},this).render()},updateChecked:function(){var s=this.folderListView.checked,e=[],i=Xe.ADMIN;Fe.every(s,function(u){var n=this.folderListView.collection.get(u);return i=Math.min(i,n.getAccessLevel()),i>Xe.READ},this);var t=Xe.ADMIN;this.itemListView&&(e=this.itemListView.checked,e.length&&(t=Math.min(t,this.parentModel.getAccessLevel())));const r=s.length+e.length>0;this.$(".g-folder-actions-button").girderEnable(!r),this.checkedMenuWidget.update({minFolderLevel:i,minItemLevel:t,folderCount:s.length,itemCount:e.length,pickedCount:this.getPickedCount(),pickedCopyAllowed:this.getPickedCopyAllowed(),pickedMoveAllowed:this.getPickedMoveAllowed(),pickedDesc:this.getPickedDescription()})},getPickedCount:function(){var s=0;return St&&St.resources&&Fe.each(St.resources,function(e){s+=e.length}),s},getPickedCopyAllowed:function(){return!(!St||this.parentModel.resourceName!=="folder"&&St.resources.item&&St.resources.item.length||this.parentModel.getAccessLevel()<Xe.WRITE)},getPickedMoveAllowed:function(){return!(!this.getPickedCopyAllowed()||St.minFolderLevel<Xe.ADMIN||St.minItemLevel<Xe.WRITE)},getPickedDescription:function(){return!St||!St.resources?"":this._describeResources(St.resources)},_getCheckedResourceParam:function(s){var e={folder:[],item:[]},i=this.folderListView.checked;if(Fe.each(i,function(r){var u=this.folderListView.collection.get(r);e.folder.push(u.id)},this),this.itemListView){var t=this.itemListView.checked;Fe.each(t,function(r){var u=this.itemListView.collection.get(r);e.item.push(u.id)},this)}return Fe.each(e,function(r,u){r.length||delete e[u]}),s?e:JSON.stringify(e)},_getCheckedResourceSize:function(){var s={items:0,folders:0},e=this.folderListView.checked;if(Fe.each(e,function(t){var r=this.folderListView.collection.get(t);s.folders+=r.get("size")||0},this),this.itemListView){var i=this.itemListView.checked;Fe.each(i,function(t){var r=this.itemListView.collection.get(t);s.items+=r.get("size")||0},this)}return s},downloadChecked:function(){var s=ks()+"/resource/download",e=this._getCheckedResourceParam(),i={resources:e};this.redirectViaForm("POST",s,i)},pickChecked:function(){St||(St={resources:{},minItemLevel:Xe.ADMIN,minFolderLevel:Xe.ADMIN});var s=this.folderListView.checked;if(Fe.every(s,function(a){var o=this.folderListView.collection.get(a);return St.minFolderLevel=Math.min(St.minFolderLevel,o.getAccessLevel()),St.minFolderLevel>Xe.READ},this),this.itemListView){var e=this.itemListView.checked;e.length&&(St.minItemLevel=Math.min(St.minItemLevel,this.parentModel.getAccessLevel()))}var i=this._getCheckedResourceParam(!0),t=this._describeResources(i),r=St.resources;Fe.each(r,function(a,o){i[o]?i[o]=Fe.union(a,i[o]):i[o]=a}),St.resources=i,this.updateChecked();var u=this.getPickedDescription(),n=u+" picked.";t!==u&&(n=t+" added to picked resources.  Now "+n),_e.trigger("g:alert",{icon:"ok",text:n,type:"info",timeout:4e3})},_incrementCounts:function(s,e){this.parentModel.has("nItems")&&this.parentModel.increment("nItems",e),this.parentModel.has("nFolders")&&this.parentModel.increment("nFolders",s)},movePickedResources:function(){if(this.getPickedMoveAllowed()){var s=JSON.stringify(St.resources),e=(St.resources.folder||[]).length,i=(St.resources.item||[]).length;Ve({url:"resource/move",method:"PUT",data:{resources:s,parentType:this.parentModel.resourceName,parentId:this.parentModel.get("_id"),progress:!0}}).done(()=>{this._incrementCounts(e,i),this.setCurrentModel(this.parentModel,{setRoute:!1})}),this.clearPickedResources()}},copyPickedResources:function(){if(this.getPickedCopyAllowed()){var s=JSON.stringify(St.resources),e=(St.resources.folder||[]).length,i=(St.resources.item||[]).length;Ve({url:"resource/copy",method:"POST",data:{resources:s,parentType:this.parentModel.resourceName,parentId:this.parentModel.get("_id"),progress:!0}}).done(()=>{this._incrementCounts(e,i),this.setCurrentModel(this.parentModel,{setRoute:!1})}),this.clearPickedResources()}},clearPickedResources:function(s){this.constructor.resetPickedResources(),this.updateChecked(),s&&_e.trigger("g:alert",{icon:"ok",text:"Cleared picked resources",type:"info",timeout:4e3})},redirectViaForm:function(s,e,i){var t=me("<form/>").attr({action:e,method:s});Fe.each(i,function(r,u){t.append(me("<input/>").attr({type:"text",name:u,value:r}))}),me(t).appendTo("body").trigger("submit").remove()},editAccess:function(){new Xa({el:me("#g-dialog-container"),modelType:this.parentModel.resourceName,model:this.parentModel,parentView:this}).on("g:accessListSaved",function(s){s.recurse&&this.refreshFolderList()},this)},refreshFolderList:function(){this.folderListView.collection.fetch(null,!0)},selectItem:function(s){this.itemListView.selectItem(s)},getSelectedItem:function(){return this.itemListView.getSelectedItem()},checkboxListener:function(s){var e=me(s.currentTarget);if(this._lastCheckbox&&s.shiftKey){var i=this.$el.find(":checkbox"),t=i.index(this._lastCheckbox),r=i.index(e);i.slice(Math.min(t,r),Math.max(t,r)+1).prop("checked",e.prop("checked")),this.folderListView.recomputeChecked(),this.itemListView&&this.itemListView.recomputeChecked(),this.updateChecked()}this._lastCheckbox=e}},{resetPickedResources:function(s){St=s||null},getPickedResources:function(){return St}});const Du=CM;function zt(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=en(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function en(s){var e=""+s,i=EM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var EM=/["&<>]/;function Eb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Eb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function AM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",g=g||{id:""},r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<select"+(' class="form-control" id="g-root-selector"'+zt("required",!0,!0,!1))+">",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",g.id||(r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(' value=""'+zt("disabled",!0,!0,!1)+zt("selected",!0,!0,!1)+zt("hidden",!0,!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"Select a root...</option>"),r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",function(){var l=n;if(typeof l.length=="number")for(var c=0,d=l.length;c<d;c++){var F=l[c];if(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",F==="Home"&&h)r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",h.id,!0,!1)+zt("selected",g.id===h.id,!0,!1))+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"Home</option>";else if(F in o){r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug";var p=o[F];r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<optgroup"+zt("label",F,!0,!1)+">",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",function(){var f=p.models;if(typeof f.length=="number")for(var m=0,v=f.length;m<v;m++){var w=f[m];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",(!h||w.id!==h.id)&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",w.id,!0,!1)+zt("data-group",F,!0,!1)+zt("selected",w.id===g.id,!0,!1))+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+en((i=a(w))==null?"":i)+"</option>")}else{var v=0;for(var m in f){v++;var w=f[m];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",(!h||w.id!==h.id)&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",w.id,!0,!1)+zt("data-group",F,!0,!1)+zt("selected",w.id===g.id,!0,!1))+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+en((i=a(w))==null?"":i)+"</option>")}}}.call(this),e=e+"</optgroup>"}}else{var d=0;for(var c in l){d++;var F=l[c];if(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",F==="Home"&&h)r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",h.id,!0,!1)+zt("selected",g.id===h.id,!0,!1))+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"Home</option>";else if(F in o){r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug";var p=o[F];r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<optgroup"+zt("label",F,!0,!1)+">",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",function(){var x=p.models;if(typeof x.length=="number")for(var A=0,b=x.length;A<b;A++){var y=x[A];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",(!h||y.id!==h.id)&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",y.id,!0,!1)+zt("data-group",F,!0,!1)+zt("selected",y.id===g.id,!0,!1))+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+en((i=a(y))==null?"":i)+"</option>")}else{var b=0;for(var A in x){b++;var y=x[A];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",(!h||y.id!==h.id)&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+"<option"+(zt("value",y.id,!0,!1)+zt("data-group",F,!0,!1)+zt("selected",y.id===g.id,!0,!1))+">",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/rootSelectorWidget.pug",e=e+en((i=a(y))==null?"":i)+"</option>")}}}.call(this),e=e+"</optgroup>"}}}}.call(this),e=e+"</select>"}).call(this,"display"in u?u.display:typeof display<"u"?display:void 0,"format"in u?u.format:typeof format<"u"?format:void 0,"groups"in u?u.groups:typeof groups<"u"?groups:void 0,"home"in u?u.home:typeof home<"u"?home:void 0,"selected"in u?u.selected:typeof selected<"u"?selected:void 0)}catch(n){Eb(n,t,r)}return e}var Ab=We.extend({events:{"change #g-root-selector":"_selectRoot"},initialize:function(s){s=s||{},this.pageLimit=s.pageLimit||25,this.groups={Collections:new Sh,Users:new ou},this.groups.Collections.pageLimit=s.pageLimit,this.groups.Users.pageLimit=s.pageLimit,this.groups.Users.sortField="login",Fe.extend(this.groups,s.groups),Fe.each(this.groups,e=>{this.listenTo(e,"g:changed",()=>{this._updateGroup(e)})}),this.home=s.home,this.listenTo(_e,"g:login",this.fetch),this.selected=s.selected,this.selectByResource=s.selectByResource,this.display=s.display||["Home","Collections","Users"],this.fetch()},render:function(){return this._home=this.home||it(),this.selectByResource&&this.setRootByBaseParent(this.selectByResource),this.$el.html(AM({home:this._home,groups:this.groups,display:this.display,selected:this.selected,format:this._formatName})),this},setRootByBaseParent:function(s){Fe.isObject(s)&&(s.attributes||{}).baseParentId!==void 0&&(s=s.attributes.baseParentId),Fe.isString(s)&&Fe.each(this.groups,e=>{e.get(s)!==void 0&&(this.selected=e.get(s))})},_selectRoot:function(){var s=this.$(":selected"),e=s.val(),i=s.data("group")||null;this.selected=null,Fe.has(this.groups,i)?this.selected=this.groups[i].get(e):this._home&&this._home.id===e&&(this.selected=this._home),this.trigger("g:selected",{root:this.selected,group:i})},_updateGroup:function(s){this.trigger("g:group",{collection:s}),this.render()},_formatName:function(s){var e=s.id;switch(s.get("_modelType")){case"user":e=s.get("login");break;case"folder":case"collection":e=s.get("name");break}return e},fetch:function(){var s=this.reset;Fe.each(this.groups,function(e){e.fetch(null,s)})}});function wo(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=qs(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function qs(s){var e=""+s,i=kM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var kM=/["&<>]/;function kb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void kb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function SM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="modal-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+"&times;</button>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<h4 class="modal-title">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+qs((i=c)==null?"":i)+"</h4></div>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="modal-body g-browser-widget">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="g-hierarchy-root-container form-group"></div>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="g-hierarchy-widget-container g-wait-for-root form-group hidden"></div>',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",o&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="g-input-element form-group">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<label class="control-label" for="g-input-element">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+qs((i=o.label)==null?"":i)+"</label>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+"<input"+(' class="form-control" id="g-input-element" type="text"'+wo("placeholder",o.placeholder,!0,!1)+wo("value",o.default,!0,!1))+"/></div>"),r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="help-block g-wait-for-root hidden">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+qs((i=a)==null?"":i)+"</div>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",h&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="g-selected-model g-wait-for-root form-group hidden">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<label class="control-label" for="g-selected-model">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+"Selected ",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+qs((i=g?"item":"folder")==null?"":i)+"</label>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+"<input"+(' class="form-control" id="g-selected-model" type="text"'+wo("readonly",!0,!0,!1)+wo("value",n,!0,!1))+"/></div>"),r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="g-validation-failed-message hidden"></div></div>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<div class="modal-footer">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+"Cancel</a>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<button class="g-submit-button btn btn-small btn-primary" type="submit">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+'<i class="icon-edit"></i>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/browserWidget.pug",e=e+qs((i=l)==null?"":i)+"</button></div></div></div>"}).call(this,"defaultSelectedResource"in u?u.defaultSelectedResource:typeof defaultSelectedResource<"u"?defaultSelectedResource:void 0,"help"in u?u.help:typeof help<"u"?help:void 0,"input"in u?u.input:typeof input<"u"?input:void 0,"preview"in u?u.preview:typeof preview<"u"?preview:void 0,"selectItem"in u?u.selectItem:typeof selectItem<"u"?selectItem:void 0,"submit"in u?u.submit:typeof submit<"u"?submit:void 0,"title"in u?u.title:typeof title<"u"?title:void 0)}catch(n){kb(n,t,r)}return e}var Xh=We.extend({events:{"click .g-submit-button":function(){this._validate()}},initialize:function(s){s=s||{},this.titleText=s.titleText||"Select an item",this.validate=s.validate||Fe.constant(me.Deferred().resolve().promise()),this.helpText=s.helpText,this.showItems=s.showItems,this.showPreview=Fe.isUndefined(s.showPreview)?!0:!!s.showPreview,this.submitText=s.submitText||"Save",this.root=s.root,this.defaultSelectedResource=s.defaultSelectedResource,this.input=s.input,this.selectItem=!!s.selectItem,this.showMetadata=!!s.showMetadata,this.highlightItem=!!s.highlightItem,this.paginated=!!s.paginated,this._selected=null,this.defaultSelectedResource&&(s.rootSelectorSettings||(s.rootSelectorSettings={}),s.rootSelectorSettings.selectByResource||(s.rootSelectorSettings.selectByResource=this.defaultSelectedResource)),this._rootSelectionView=new Ab(Fe.extend({parentView:this},s.rootSelectorSettings)),this.listenTo(this._rootSelectionView,"g:selected",function(e){this.root=e.root,this._renderHierarchyView()}),this.defaultSelectedResource&&!this.root&&this._calculateDefaultSelectedRoot()},render:function(){const s=this.defaultSelectedResource&&this.defaultSelectedResource.get("name");return this.$el.html(SM({title:this.titleText,help:this.helpText,preview:this.showPreview,submit:this.submitText,input:this.input,selectItem:this.selectItem,defaultSelectedResource:s})).girderModal(this),this._renderRootSelection(),this},selectedModel:function(){return this._selected},_renderRootSelection:function(){this._rootSelectionView.setElement(this.$(".g-hierarchy-root-container")).render(),this._renderHierarchyView()},_renderHierarchyView:function(){this._hierarchyView&&(this.stopListening(this._hierarchyView),this._hierarchyView.off(),this.$(".g-hierarchy-widget-container").empty()),this.root&&(this.$(".g-wait-for-root").removeClass("hidden"),this._hierarchyView=new Du({el:this.$(".g-hierarchy-widget-container"),parentView:this,parentModel:this.root,checkboxes:!1,routing:!1,showActions:!1,showItems:this.showItems,onItemClick:Fe.bind(this._selectItem,this),defaultSelectedResource:this.defaultSelectedResource,highlightItem:this.highlightItem,paginated:this.paginated,showMetadata:this.showMetadata}),this.listenTo(this._hierarchyView,"g:setCurrentModel",this._selectModel),this._selectModel())},_resetSelection:function(s){this._selected=s,this.$(".g-validation-failed-message").addClass("hidden"),this.$(".g-selected-model").removeClass("has-error"),this.$(".g-input-element").removeClass("has-error"),this.$("#g-selected-model").val(""),this._selected&&(this.$("#g-selected-model").val(this._selected.get("name")),this.highlightItem&&this.selectItem?this._hierarchyView.selectItem(this._selected):this._hierarchyView.selectFolder(this._selected))},_selectItem:function(s){this.selectItem&&this._resetSelection(s)},_selectModel:function(){this.selectItem||this._resetSelection(this._hierarchyView.parentModel)},_validate:function(){let s;this.input&&this.input.validate?(s=this.input.validate(this.$("#g-input-element").val()),s===void 0?(console.warn("Static validation is deprecated, return a promise instead"),s=me.Deferred().resolve().promise()):Fe.isFunction(s.then)||(console.warn("Static validation is deprecated, return a promise instead"),s=me.Deferred().reject(s).promise())):s=me.Deferred().resolve().promise();const e=this.selectedModel();let i=this.validate(e);i===void 0?(console.warn("Static validation is deprecated, return a promise instead"),i=me.Deferred().resolve().promise()):Fe.isFunction(i.then)||(console.warn("Static validation is deprecated, return a promise instead"),i=me.Deferred().reject(i).promise());let t=null,r=null;me.when(s.catch(u=>{t=u}),i.catch(u=>{r=u})).done(()=>{this.$(".g-selected-model").removeClass("has-error"),this.$(".g-input-element").removeClass("has-error"),this.$(".g-validation-failed-message").addClass("hidden").html(""),!t&&!r?(this.root=this._hierarchyView.parentModel,this.$el.modal("hide"),this.trigger("g:saved",e,this.$("#g-input-element").val())):!t&&r?(this.$(".g-selected-model").addClass("has-error"),this.$(".g-validation-failed-message").removeClass("hidden").text(r)):t&&!r?(this.$(".g-input-element").addClass("has-error"),this.$(".g-validation-failed-message").removeClass("hidden").text(t)):t&&r&&(this.$(".g-selected-model").addClass("has-error"),this.$(".g-input-element").addClass("has-error"),this.$(".g-validation-failed-message").removeClass("hidden").html(Fe.escape(t)+"<br>"+Fe.escape(r)))})},_calculateDefaultSelectedRoot:function(){if(!this.selectItem){this.root=this.defaultSelectedResource;return}const s={folder:Oi,collection:b0,user:pr};let e="folder",i=null;if(this.defaultSelectedResource.get("folderId")?i=this.defaultSelectedResource.get("folderId"):this.defaultSelectedResource.get("parentCollection")&&(e=this.defaultSelectedResource.get("parentCollection"),i=this.defaultSelectedResource.get("parentId")),s[e]&&i){const t=new s[e];t.set({_id:i}).on("g:fetched",function(){this.root=t,this.render()},this).on("g:error",function(){this.render()},this).fetch()}}});function jM(s){var e=""+s,i=DM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var DM=/["&<>]/;function Sb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Sb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function MM(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="g-body-title">',r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Import existing data from the filesystem</div>",r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="g-body-subtitle">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+jM((i=n.name())==null?"":i)+"</div>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="g-import-instructions">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Use this page to import existing data from this assetstore's filesystem.",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Specify a root directory on the filesystem, and it will be imported recursively.",r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"The directory does not need to be under the assetstore's root dir. You must also",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"specify a destination collection, user, or folder ID under which to place the",r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"imported data. Files that are imported are not managed directly by the server.",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"They will not be copied, but will be served from their existing location. When",r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"the referencing files in Girder are deleted, the underlying imported file will",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"not be removed.",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+`
`,r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"</div>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<form class="g-filesystem-import-form">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="form-group">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<label for="g-filesystem-import-path">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Import path (absolute path to directory or file)</label>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<input class="form-control input-sm" id="g-filesystem-import-path" type="text"/></div>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="form-group">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<label for="g-filesystem-import-dest-type">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Destination type</label>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<select class="form-control" id="g-filesystem-import-dest-type">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<option value="folder">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Folder</option>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<option value="user">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"User</option>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<option value="collection">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Collection</option></select></div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="form-group">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<label for="g-filesystem-import-dest-id">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Destination ID</label>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="input-group input-group-sm">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<input class="form-control input-sm" id="g-filesystem-import-dest-id" type="text" placeholder="Existing folder, user, or collection ID to use as the destination"/>',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="input-group-btn">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<button class="g-open-browser btn btn-default" type="button">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<i class="icon-folder-open"></i></button></div></div></div>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="form-group">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<label for="g-filesystem-import-leaf-items">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"Leaf Folders as Items</label>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<select class="form-control" id="g-filesystem-import-leaf-items">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<option value="false">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"False</option>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<option value="true">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+"True</option></select></div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<div class="g-validation-failed-message"></div>',r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<button class="g-submit-assetstore-import btn btn-success" type="submit">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+'<i class="icon-link-ext"></i>',r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/filesystemImport.pug",e=e+" Begin import</button></form>"}).call(this,"assetstore"in u?u.assetstore:typeof assetstore<"u"?assetstore:void 0)}catch(n){Sb(n,t,r)}return e}var jb=We.extend({events:{"submit .g-filesystem-import-form":function(s){s.preventDefault();var e=this.$("#g-filesystem-import-dest-id").val().trim().split(/\s/)[0],i=this.$("#g-filesystem-import-dest-type").val(),t=this.$("#g-filesystem-import-leaf-items").val();this.$(".g-validation-failed-message").empty(),this.assetstore.off("g:imported").on("g:imported",function(){He.navigate(i+"/"+e,{trigger:!0})},this).on("g:error",function(r){this.$(".g-validation-failed-message").text(r.responseJSON.message)},this).import({importPath:this.$("#g-filesystem-import-path").val().trim(),leafFoldersAsItems:t,destinationId:e,destinationType:i,progress:!0})},"click .g-open-browser":"_openBrowser"},initialize:function(s){this._browserWidgetView=new Xh({parentView:this,titleText:"Destination",helpText:"Browse to a location to select it as the destination.",submitText:"Select Destination",validate:function(e){const i=me.Deferred();return e?i.resolve():i.reject("Please select a valid root."),i.promise()}}),this.listenTo(this._browserWidgetView,"g:saved",function(e){this.$("#g-filesystem-import-dest-id").val(e.id),this.$("#g-filesystem-import-dest-type").val(e.get("_modelType")),Ve({url:`resource/${e.id}/path`,method:"GET",data:{type:e.get("_modelType")}}).done(i=>{this.$("#g-filesystem-import-dest-id").val()===e.id&&this.$("#g-filesystem-import-dest-id").val(`${e.id} (${i})`)})}),this.assetstore=s.assetstore,this.render()},render:function(){return this.$el.html(MM({assetstore:this.assetstore})),this},_openBrowser:function(){this._browserWidgetView.setElement(me("#g-dialog-container")).render()}});function Kg(s){var e=""+s,i=_M.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var _M=/["&<>]/;function Db(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Db(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function LM(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="g-body-title">',r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Import existing data from S3</div>",r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="g-body-subtitle">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+Kg((i=n.get("name"))==null?"":i)+"</div>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="g-import-instructions g-s3import-instructions">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Use this page to import existing data from this assetstore's S3 bucket",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"(",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"<b>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+Kg((i=n.get("bucket"))==null?"":i)+"</b>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"). You may import a specific directory of keys",r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"within the bucket, or a specific key by path. If you wish to import the entire",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"bucket into the selected destination, simply leave the import path field blank.",r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"If you specify a directory, it will be imported recursively. You must also",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"specify a destination collection, user, or folder ID under which to place the",r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"imported data.",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+`
`,r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"</div>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<form class="g-s3-import-form">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="form-group">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<label for="g-s3-import-path">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Import path (key or directory)</label>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<input class="form-control input-sm" id="g-s3-import-path" type="text"/></div>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="form-group">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<label for="g-s3-import-dest-type">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Destination type</label>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<select class="form-control" id="g-s3-import-dest-type">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<option value="folder">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Folder</option>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<option value="user">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"User</option>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<option value="collection">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Collection</option></select></div>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="form-group">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<label for="g-s3-import-dest-id">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+"Destination ID</label>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="input-group input-group-sm">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<input class="form-control input-sm" id="g-s3-import-dest-id" type="text" placeholder="Existing folder, user, or collection ID to use as the destination"/>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="input-group-btn">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<button class="g-open-browser btn btn-default" type="button">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<i class="icon-folder-open"></i></button></div></div></div>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<div class="g-validation-failed-message"></div>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<button class="g-submit-assetstore-import g-submit-s3-import btn btn-success" type="submit">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+'<i class="icon-link-ext"></i>',r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/s3Import.pug",e=e+" Begin import</button></form>"}).call(this,"assetstore"in u?u.assetstore:typeof assetstore<"u"?assetstore:void 0)}catch(n){Db(n,t,r)}return e}var Mb=We.extend({events:{"submit .g-s3-import-form":function(s){s.preventDefault();var e=this.$("#g-s3-import-dest-id").val().trim().split(/\s/)[0],i=this.$("#g-s3-import-dest-type").val();this.$(".g-validation-failed-message").empty(),this.assetstore.off("g:imported").on("g:imported",function(){He.navigate(i+"/"+e,{trigger:!0})},this).on("g:error",function(t){this.$(".g-validation-failed-message").text(t.responseJSON.message)},this).import({importPath:this.$("#g-s3-import-path").val().trim(),destinationId:e,destinationType:i,progress:!0})},"click .g-open-browser":"_openBrowser"},initialize:function(s){this._browserWidgetView=new Xh({parentView:this,titleText:"Destination",helpText:"Browse to a location to select it as the destination.",submitText:"Select Destination",validate:function(e){const i=me.Deferred();return e?i.resolve():i.reject("Please select a valid root."),i.promise()}}),this.listenTo(this._browserWidgetView,"g:saved",function(e){this.$("#g-s3-import-dest-id").val(e.id),this.$("#g-s3-import-dest-type").val(e.get("_modelType")),Ve({url:`resource/${e.id}/path`,method:"GET",data:{type:e.get("_modelType")}}).done(i=>{this.$("#g-s3-import-dest-id").val()===e.id&&this.$("#g-s3-import-dest-id").val(`${e.id} (${i})`)})}),this.assetstore=s.assetstore,this.render()},render:function(){return this.$el.html(LM({assetstore:this.assetstore})),this},_openBrowser:function(){this._browserWidgetView.setElement(me("#g-dialog-container")).render()}}),Ja={};Ja[bi.FILESYSTEM]=jb;Ja[bi.S3]=Mb;var Gh=We.extend({events:{"click .g-set-current":"setCurrentAssetstore","click .g-delete-assetstore":"deleteAssetstore","click .g-edit-assetstore":"editAssetstore"},initialize:function(s){kr("fetch"),this.plots=[],this.assetstoreEdit=s.assetstoreEdit||!1,this.importableTypes=[bi.FILESYSTEM,bi.S3].concat(s.importableTypes||[]),this.newAssetstoreWidget=new Qm({parentView:this}).on("g:created",this.addAssetstore,this),this.collection=new gm,this.collection.on("g:changed",function(){this.render()},this).fetch()},destroy:function(){this._destroyPlots(),We.prototype.destroy.call(this)},_destroyPlots:function(){for(const s of this.plots)s.destroy();this.plots=[]},render:function(){if(!it()||!it().get("admin")){this.$el.text("Must be logged in as admin to view this page.");return}return this._destroyPlots(),this.$el.html(ZS({assetstores:this.collection.toArray(),types:bi,importableTypes:this.importableTypes,getAssetstoreImportRoute:this.getAssetstoreImportRoute})),this.newAssetstoreWidget.setElement(this.$("#g-new-assetstore-container")).render(),Fe.each(this.$(".g-assetstore-capacity-chart"),this.capacityChart,this),this.assetstoreEdit&&(this.editAssetstoreDialog(this.assetstoreEdit),this.assetstoreEdit=!1),this},addAssetstore:function(s){this.collection.add(s),this.render()},capacityChart:function(s){var e=this.collection.get(me(s).attr("cid")),i=e.get("capacity"),t=i.total-i.free,r=[["Used ("+Yt(t)+")",t],["Free ("+Yt(i.free)+")",i.free]],u=new FD(s,{series:r.map(n=>n[1]),chart:{type:"pie",animations:{enabled:!1}},labels:r.map(n=>n[0]),plotOptions:{pie:{startAngle:-90,endAngle:270,expandOnClick:!1,dataLabels:{enabled:!0}}},dataLabels:{style:{colors:["#000","#000"]},dropShadow:{enabled:!1}},legend:{position:"right"}});u.render(),this.plots.push(u)},setCurrentAssetstore:function(s){var e=me(s.currentTarget),i=this.collection.get(e.attr("cid"));i.set({current:!0}),i.off("g:saved").on("g:saved",function(){_e.trigger("g:alert",{icon:"ok",text:"Changed current assetstore.",type:"success",timeout:4e3}),this.collection.fetch({},!0)},this).off("g:error").on("g:error",function(t){_e.trigger("g:alert",{icon:"cancel",text:t.responseJSON.message,type:"danger"})}).save()},deleteAssetstore:function(s){var e=me(s.currentTarget),i=this.collection.get(e.attr("cid"));tr({text:"Are you sure you want to delete the assetstore <b>"+i.escape("name")+"</b>?  There are no files stored in it, and no data will be lost.",escapedHtml:!0,yesText:"Delete",confirmCallback:()=>{i.on("g:deleted",function(){_e.trigger("g:alert",{icon:"ok",text:"Assetstore deleted.",type:"success",timeout:4e3}),this.collection.fetch({},!0)},this).off("g:error").on("g:error",function(t){_e.trigger("g:alert",{icon:"attention",text:t.responseJSON.message,type:"danger",timeout:4e3})},this).destroy()}})},editAssetstore:function(s){var e=me(s.currentTarget).attr("cid");this.editAssetstoreDialog(e)},editAssetstoreDialog:function(s){var e=this.collection.get(s),i=me("#g-dialog-container"),t=new _h({el:i,model:e,parentView:this}).off("g:saved").on("g:saved",function(){this.render()},this);t.render()}},{import:function(s){var e=new za({_id:s});e.once("g:fetched",function(){var i=Ja[e.get("type")];if(i)_e.trigger("g:navigateTo",i,{assetstore:e});else throw new Error("No such view")}).fetch()}});function TM(s){var e=""+s,i=PM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var PM=/["&<>]/;function _b(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void _b(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function Lb(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+'<ul class="pagination pagination-sm">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+'<li class="g-page-prev disabled">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+"<a>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+"&laquo; Prev</a></li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+'<li class="active">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+'<a class="g-page-number">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+"Page ",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+TM((i=n.pageNum()+1)==null?"":i)+"</a></li>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+'<li class="g-page-next disabled">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+"<a>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/paginateWidget.pug",e=e+"Next &raquo;</a></li></ul>"}).call(this,"collection"in u?u.collection:typeof collection<"u"?collection:void 0)}catch(n){_b(n,t,r)}return e}var Mu=We.extend({events:{"click .g-page-next:not(.disabled)":function(){this.collection.fetchNextPage()},"click .g-page-prev:not(.disabled)":function(){this.collection.fetchPreviousPage()}},initialize:function(s){this.collection=s.collection},render:function(){return this.$el.html(Lb({collection:this.collection})),this.$(".g-page-next").girderEnable(this.collection.hasNextPage()),this.$(".g-page-prev").girderEnable(this.collection.hasPreviousPage()),this}});function Ai(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=J0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function J0(s){var e=""+s,i=$M.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var $M=/["&<>]/;function Tb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Tb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function IM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-list-header">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-pagination"></div>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<form class="g-collection-search-form form-inline" role="form">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="form-group g-collections-search-container"></div></form>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",g()&&(r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<button class="g-collection-create-button btn btn-sm btn-default">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-plus-squared"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+" Create collection</button>"),e=e+"</div>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",function(){var l=a;if(typeof l.length=="number")for(var c=0,d=l.length;c<d;c++){var F=l[c];r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<div"+(' class="g-collection-list-entry g-top-level-list-entry"'+Ai("public",F.get("public")?"true":"false",!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-right-column">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-created">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-clock"></i>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Created on",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<span class="g-collection-created-date">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+" ",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=o(F.get("created"),n))==null?"":i)+"</span></div>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.has("size")&&(r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-space-used">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-floppy"></i>',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Currently using",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<span class="g-user-space-used">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+" ",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=h(F.get("size")))==null?"":i)+"</span></div>"),e=e+"</div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-list-public-status-icon">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.get("public")?(r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-globe" title="Public collection"></i>'):(r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-lock" title="Private collection"></i>'),e=e+"</div>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-top-level-list-title-container">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-title">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<a"+(' class="g-collection-link"'+Ai("g-collection-cid",F.cid,!0,!1))+">",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<b>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=F.name())==null?"":i)+"</b></a>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<span"+(' class="g-text-fade"'+Ai("public",F.get("public")?"true":"false",!0,!1))+"></span></div>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.get("description")&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-subtitle">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<a"+(' class="g-show-description" state="hidden"'+Ai("cid",F.cid,!0,!1))+">",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<span>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Show description</span>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-down-dir"></i></a></div>'),e=e+"</div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-clear-right"></div>',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<div"+(' class="g-collection-description hide"'+Ai("cid",F.cid,!0,!1))+"></div></div>"}else{var d=0;for(var c in l){d++;var F=l[c];r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<div"+(' class="g-collection-list-entry g-top-level-list-entry"'+Ai("public",F.get("public")?"true":"false",!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-right-column">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-created">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-clock"></i>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Created on",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<span class="g-collection-created-date">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+" ",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=o(F.get("created"),n))==null?"":i)+"</span></div>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.has("size")&&(r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-space-used">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-floppy"></i>',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Currently using",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<span class="g-user-space-used">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+" ",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=h(F.get("size")))==null?"":i)+"</span></div>"),e=e+"</div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-list-public-status-icon">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.get("public")?(r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-globe" title="Public collection"></i>'):(r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-lock" title="Private collection"></i>'),e=e+"</div>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-top-level-list-title-container">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-title">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<a"+(' class="g-collection-link"'+Ai("g-collection-cid",F.cid,!0,!1))+">",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<b>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+J0((i=F.name())==null?"":i)+"</b></a>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<span"+(' class="g-text-fade"'+Ai("public",F.get("public")?"true":"false",!0,!1))+"></span></div>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",F.get("description")&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-collection-subtitle">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<a"+(' class="g-show-description" state="hidden"'+Ai("cid",F.cid,!0,!1))+">",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<span>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"Show description</span>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<i class="icon-down-dir"></i></a></div>'),e=e+"</div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+'<div class="g-clear-right"></div>',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionList.pug",e=e+"<div"+(' class="g-collection-description hide"'+Ai("cid",F.cid,!0,!1))+"></div></div>"}}}.call(this)}).call(this,"DATE_MINUTE"in u?u.DATE_MINUTE:typeof DATE_MINUTE<"u"?DATE_MINUTE:void 0,"collections"in u?u.collections:typeof collections<"u"?collections:void 0,"formatDate"in u?u.formatDate:typeof formatDate<"u"?formatDate:void 0,"formatSize"in u?u.formatSize:typeof formatSize<"u"?formatSize:void 0,"getCurrentUser"in u?u.getCurrentUser:typeof getCurrentUser<"u"?getCurrentUser:void 0)}catch(n){Tb(n,t,r)}return e}var Pb=We.extend({events:{"click a.g-collection-link":function(s){var e=me(s.currentTarget).attr("g-collection-cid");He.navigate("collection/"+this.collection.get(e).id,{trigger:!0})},"click button.g-collection-create-button":"createCollectionDialog","submit .g-collections-search-form":function(s){s.preventDefault()},"click .g-show-description":"_toggleDescription"},initialize:function(s){kr("fetch"),this.collection=new Sh,this.collection.on("g:changed",function(){this.render()},this).fetch(),this.paginateWidget=new Mu({collection:this.collection,parentView:this}),this.searchWidget=new Ut({placeholder:"Search collections...",types:["collection"],parentView:this}).on("g:resultClicked",this._gotoCollection,this),this.create=s.dialog==="create"},createCollectionDialog:function(){var s=me("#g-dialog-container");new qa({el:s,parentView:this}).on("g:saved",function(e){He.navigate("collection/"+e.get("_id"),{trigger:!0})},this).render()},render:function(){return this.$el.html(IM({collections:this.collection.toArray(),getCurrentUser:it,formatDate:D0,DATE_MINUTE:kh,formatSize:Yt})),this.paginateWidget.setElement(this.$(".g-collection-pagination")).render(),this.searchWidget.setElement(this.$(".g-collections-search-container")).render(),this.create&&this.createCollectionDialog(),this},_gotoCollection:function(s){var e=new b0;e.set("_id",s.id).on("g:fetched",function(){He.navigate("/collection/"+e.get("_id"),{trigger:!0})},this).fetch()},_toggleDescription:function(s){const e=me(s.currentTarget),i=e.attr("cid"),t=this.$(`.g-collection-description[cid="${i}"]`);e.attr("state")==="hidden"?(M0(this.collection.get(i).get("description"),t),t.removeClass("hide"),e.attr("state","visible"),e.find("i").removeClass("icon-down-dir").addClass("icon-up-dir"),e.find("span").text("Hide description")):(t.addClass("hide"),e.attr("state","hidden"),e.find("i").removeClass("icon-up-dir").addClass("icon-down-dir"),e.find("span").text("Show description"))}});function RM(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=$b(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function $b(s){var e=""+s,i=BM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var BM=/["&<>]/;function Ib(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Ib(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function OM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="g-collection-header">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="btn-group pull-right">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<button class="g-collection-actions-button btn btn-default dropdown-toggle" data-toggle="dropdown" title="Collection actions">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-sitemap"></i>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+" Actions",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-down-dir"></i></button>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<ul class="g-collection-actions-menu dropdown-menu pull-right" role="menu">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li role="presentation">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+"<a"+(' class="g-download-collection" role="menuitem"'+RM("href",a.downloadUrl(),!0,!1))+">",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-download"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+"Download collection</a></li>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",a.getAccessLevel()>=n.WRITE&&(r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li role="presentation">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<a class="g-edit-collection" role="menuitem">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-edit"></i>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+"Edit collection</a></li>"),r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",a.getAccessLevel()>=n.ADMIN&&(r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li role="presentation">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<a class="g-collection-access-control" role="menuitem">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-lock"></i>',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+"Access control</a></li>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<li role="presentation">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<a class="g-delete-collection" role="menuitem">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<i class="icon-trash"></i>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+"Delete collection</a></li>"),e=e+"</ul></div>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="g-collection-name g-body-title">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+$b((i=a.name())==null?"":i)+"</div>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",a.get("description")&&(r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="g-collection-description">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+((i=o(a.get("description")))==null?"":i)+"</div>"),r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="g-clear-right"></div></div>',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/collectionPage.pug",e=e+'<div class="g-collection-hierarchy-container"></div>'}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"collection"in u?u.collection:typeof collection<"u"?collection:void 0,"renderMarkdown"in u?u.renderMarkdown:typeof renderMarkdown<"u"?renderMarkdown:void 0)}catch(n){Ib(n,t,r)}return e}var Za=We.extend({events:{"click .g-edit-collection":"editCollection","click .g-collection-access-control":"editAccess","click .g-delete-collection":"deleteConfirmation"},initialize:function(s){kr("fetch"),this.upload=s.upload||!1,this.access=s.access||!1,this.edit=s.edit||!1,this.folderAccess=s.folderAccess||!1,this.folderCreate=s.folderCreate||!1,this.folderEdit=s.folderEdit||!1,this.itemCreate=s.itemCreate||!1,s.collection?(this.model=s.collection,s.folderId?(this.folder=new Oi,this.folder.set({_id:s.folderId}).on("g:fetched",function(){this.render()},this).on("g:error",function(){this.folder=null,this.render()},this).fetch()):this.render()):s.id&&(this.model=new b0,this.model.set("_id",s.id),this.model.on("g:fetched",function(){this.render()},this).fetch())},editCollection:function(){var s=me("#g-dialog-container");this.editCollectionWidget||(this.editCollectionWidget=new qa({el:s,model:this.model,parentView:this}).on("g:saved",function(){this.render()},this)),this.editCollectionWidget.render()},render:function(){return this.$el.html(OM({collection:this.model,AccessType:Xe,renderMarkdown:M0})),this.hierarchyWidget?this.hierarchyWidget.setElement(this.$(".g-collection-hierarchy-container")).render():this.hierarchyWidget=new Du({el:this.$(".g-collection-hierarchy-container"),parentModel:this.folder||this.model,upload:this.upload,folderAccess:this.folderAccess,folderEdit:this.folderEdit,folderCreate:this.folderCreate,itemCreate:this.itemCreate,parentView:this}).on("g:setCurrentModel",()=>{this.$(".g-collection-header .g-collection-actions-button").hide()}),this.upload=!1,this.folderAccess=!1,this.folderEdit=!1,this.folderCreate=!1,this.itemCreate=!1,this.edit?this.editCollection():this.access&&this.editAccess(),this},editAccess:function(){new Xa({el:me("#g-dialog-container"),modelType:"collection",model:this.model,parentView:this}).on("g:accessListSaved",function(s){s.recurse&&this.hierarchyWidget.refreshFolderList()},this)},deleteConfirmation:function(){let s={text:"Are you sure you want to delete the collection <b>"+this.model.escape("name")+this.model.escape("nFolders")+"</b>?",yesText:"Delete",escapedHtml:!0,confirmCallback:()=>{this.model.on("g:deleted",function(){_e.trigger("g:alert",{icon:"ok",text:"Collection deleted.",type:"success",timeout:4e3}),He.navigate("collections",{trigger:!0})}).destroy()}};(this.model.get("nFolders")!==0||this.model.get("size")!==0)&&(s=Fe.extend({additionalText:"<b>"+this.model.escape("name")+"</b> contains <b>"+this.model.escape("nFolders")+" folders</b> taking up <b>"+Yt(parseInt(this.model.get("size"),10))+"</b>",msgConfirmation:!0,name:this.model.escape("name")},s)),tr(s)}},{fetchAndInit:function(s,e){var i=new b0;i.set({_id:s}).on("g:fetched",function(){_e.trigger("g:navigateTo",Za,Fe.extend({collection:i},e||{}))},this).fetch()}}),qh=We.extend({initialize:function(s){kr("fetch"),this.folder=s.folder,this.upload=s.upload||!1,this.folderAccess=s.folderAccess||!1,this.folderCreate=s.folderCreate||!1,this.folderEdit=s.folderEdit||!1,this.itemCreate=s.itemCreate||!1,this.render()},render:function(){return this.hierarchyWidget=new Du({el:this.$el,parentModel:this.folder,upload:this.upload,folderAccess:this.folderAccess,folderEdit:this.folderEdit,folderCreate:this.folderCreate,itemCreate:this.itemCreate,parentView:this}),this}},{fetchAndInit:function(s,e){var i=new Oi;i.set({_id:s}).on("g:fetched",function(){_e.trigger("g:navigateTo",qh,Fe.extend({folder:i},e||{}))},this).fetch()}});const Jg={}.GIRDER_VERSION||null,Rb=Jg===null?null:`${Jg}`;function ac(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Z0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Z0(s){var e=""+s,i=NM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var NM=/["&<>]/;function Bb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Bb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function WM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-header">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-logo-container">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<img class="g-frontpage-logo" src="Girder_Mark.png"/></div>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-title-container">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-title">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=a)==null?"":i)+"</div>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-subtitle">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"Data management platform</div></div></div>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-body">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-paragraph">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<div class="g-frontpage-welcome-text-content">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<b class="g-frontpage-welcome-text">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"Welcome to ",r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=a)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"!</b></div>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<ul>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",o?(r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"You are currently logged in as",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<b>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" ",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=o.get("login"))==null?"":i)+"</b>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+".",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<ul>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To explore the data hosted on this server, start with the",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a class="g-collections-link" href="#collections">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" Collections</a>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" page.</li>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To explore your data, go to your",r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<a"+(' class="g-my-folders-link"'+ac("href",`#user/${o.id}`,!0,!1))+">",r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" personal data space</a>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" or your",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<a"+(' class="g-my-account-link"'+ac("href",`#useraccount/${o.id}/info`,!0,!1))+">",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" user account page</a>",r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+".</li></ul></li>"):(r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"You are currently browsing anonymously.</li>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<ul>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To explore the data hosted on this server, start with the",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a class="g-collections-link" href="#collections">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" Collections</a>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" page.</li>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To create an account, use the",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a class="g-register-link">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" Register</a>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" link in the upper right corner.</li>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"If you already have an account you can",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a class="g-login-link">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" log in</a>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" with the link in the upper right corner.</li></ul>"),r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",a==="Girder"?(r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"Girder is"):(r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=a)==null?"":i),r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" is powered by Girder,"),r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"Kitware's open-source platform for data management, analytics, and",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+`
`,r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"visualization. To learn more about how Kitware and Girder can help to solve your",r=57,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+`
`,r=57,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"data challenges, read our series of",r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a target="_blank" href="https://blog.kitware.com/tag/girder/">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" blog posts</a>",r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"or",r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a target="_blank" href="http://www.kitware.com/contact-us">',r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" contact us</a>",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"directly.",r=63,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<ul>",r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To learn more about Girder's software, including how you can host your own",r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+`
`,r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"instance either locally or in the cloud, see the",r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a target="_blank" href="http://girder.readthedocs.io/en/latest/user-guide.html">',r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" User Guide</a>",r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+", the",r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a target="_blank" href="http://girder.readthedocs.io/en/latest">',r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" full documentation</a>",r=70,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+", or visit the",r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<a target="_blank" href="https://github.com/girder/girder">',r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" GitHub repository</a>",r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+".</li></ul></li>",r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"To use the REST API to interact with this server, check out the",r=76,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<a"+ac("href",n,!0,!1)+">",r=76,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" interactive web API docs</a>",r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+".</li>",r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",h&&(r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"<li>",r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+"This instance of ",r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=a)==null?"":i),r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+" was built from version",r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+'<code class="g-version">',r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+Z0((i=h)==null?"":i)+"</code>",r=83,t="/home/circleci/project/girder/girder/web/src/templates/body/frontPage.pug",e=e+".</li>"),e=e+"</ul></div></div>"}).call(this,"apiRoot"in u?u.apiRoot:typeof apiRoot<"u"?apiRoot:void 0,"brandName"in u?u.brandName:typeof brandName<"u"?brandName:void 0,"currentUser"in u?u.currentUser:typeof currentUser<"u"?currentUser:void 0,"version"in u?u.version:typeof version<"u"?version:void 0)}catch(n){Bb(n,t,r)}return e}var aa=We.extend({events:{"click .g-register-link":function(){_e.trigger("g:registerUi")},"click .g-login-link":function(){_e.trigger("g:loginUi")},"click .g-quicksearch-link":function(){me(".g-quick-search-container .g-search-field").trigger("focus")}},initialize:function(s){kr("fetch"),this.brandName=s.brandName||"Girder",this.render()},render:function(){return this.$el.html(WM({apiRoot:ks(),currentUser:it(),version:Rb,brandName:this.brandName})),this}});function n0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=zM(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function zM(s){var e=""+s,i=HM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var HM=/["&<>]/;function Ob(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Ob(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function UM(s){var e="",i,t;try{var r=s||{};(function(u,n,a,o,h){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<form class="modal-form" id="g-group-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<h4 class="modal-title">',t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",a?(t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Edit group"):(t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Create group"),e=e+"</h4></div>",t=11,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="modal-body">',t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="g-public-container">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="radio">',t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<label>",t=15,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<input"+(' id="g-access-private" type="radio" name="privacy"'+n0("checked",h?void 0:"checked",!0,!1))+"/>",t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<i class="icon-lock"></i>',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Private &mdash; Only members can see this group</label></div>",t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="radio">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<label>",t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<input"+(' id="g-access-public" type="radio" name="privacy"'+n0("checked",h?"checked":void 0,!0,!1))+"/>",t=23,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<i class="icon-globe"></i>',t=24,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Public &mdash; Anyone can see this group</label></div></div>",t=25,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="form-group">',t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<label class="control-label" for="g-name">',t=26,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Name</label>",t=27,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<input class="input-sm form-control" id="g-name" type="text" placeholder="Enter group name"/></div>',t=28,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="form-group">',t=29,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<label class="control-label" for="g-description">',t=29,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Description (optional)</label>",t=30,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<textarea class="input-sm form-control" id="g-description" placeholder="Enter group description"></textarea></div>',t=31,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",o&&(t=32,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="form-group">',t=33,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<label class="control-label" for="g-add-to-group">',t=33,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Allow members to be directly added to this group</label>",t=34,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<select class="form-control input-sm" id="g-add-to-group">',t=35,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",n==="yesadmin"?(t=36,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="default"'+n0("selected",u==="default",!0,!1))+">",t=36,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Default - Yes, allow group administrators to add members</option>"):n==="yesmod"?(t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="default"'+n0("selected",u==="default",!0,!1))+">",t=38,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Default - Yes, allow group administrators and moderators to add members</option>"):(t=40,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="default"'+n0("selected",u==="default",!0,!1))+">",t=40,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Default - No</option>"),t=41,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="no"'+n0("selected",u==="no",!0,!1))+">",t=41,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"No - members must be invited and accept invitations</option>",t=42,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",o==="mod"&&(t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="yesmod"'+n0("selected",u==="yesmod",!0,!1))+">",t=43,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Yes - allow group administrators and moderators to directly add members</option>"),t=44,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"<option"+(' value="yesadmin"'+n0("selected",u==="yesadmin",!0,!1))+">",t=44,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Yes - allow group administrators to directly add members</option></select></div>"),t=45,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=46,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<div class="modal-footer">',t=47,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=47,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Cancel</a>",t=48,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<button class="g-save-group btn btn-small btn-primary" type="submit">',t=49,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",a?(t=50,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<i class="icon-edit"></i>',t=51,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Save"):(t=53,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+'<i class="icon-plus-squared"></i>',t=54,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editGroupWidget.pug",e=e+"Create"),e=e+"</button></div></form></div></div>"}).call(this,"addAllowed"in r?r.addAllowed:typeof addAllowed<"u"?addAllowed:void 0,"addToGroupPolicy"in r?r.addToGroupPolicy:typeof addToGroupPolicy<"u"?addToGroupPolicy:void 0,"group"in r?r.group:typeof group<"u"?group:void 0,"groupAddAllowed"in r?r.groupAddAllowed:typeof groupAddAllowed<"u"?groupAddAllowed:void 0,"publicFlag"in r?r.publicFlag:typeof publicFlag<"u"?publicFlag:void 0)}catch(u){Ob(u,i,t)}return e}var Kh=We.extend({events:{"submit #g-group-edit-form":function(s){s.preventDefault();var e={name:this.$("#g-name").val(),description:this.$("#g-description").val(),public:this.$("#g-access-public").is(":checked")};this.$("#g-add-to-group").length&&(e.addAllowed=this.$("#g-add-to-group").val()),this.model?this.updateGroup(e):this.createGroup(e),this.$("button.g-save-group").girderEnable(!1),this.$(".g-validation-failed-message").text("")},"change .g-public-container .radio input":"privacyChanged"},initialize:function(s){this.model=s.model||null},render:function(){var s=this.model?this.model.get("public"):!1,e,i=this.model?this.model.get("_addToGroupPolicy"):null;it().get("admin")&&(i==="nomod"||i==="yesmod"?e="mod":(i==="noadmin"||i==="yesadmin")&&(e="admin"));var t=this.$el.html(UM({group:this.model,publicFlag:s,addToGroupPolicy:i,groupAddAllowed:e,addAllowed:this.model?this.model.get("addAllowed"):!1})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-name").trigger("focus"),this.model?br("edit"):br("create")}).on("hidden.bs.modal",()=>{this.create?ar("create"):ar("edit")}).on("ready.girder.modal",()=>{this.model?(this.$("#g-name").val(this.model.get("name")),this.$("#g-description").val(this.model.get("description")),this.create=!1):this.create=!0});return t.trigger(me.Event("ready.girder.modal",{relatedTarget:t})),this.$("#g-name").trigger("focus"),this.privacyChanged(),this},createGroup:function(s){var e=new bs;e.set(s),e.on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",e)},this).on("g:error",function(i){this.$(".g-validation-failed-message").text(i.responseJSON.message),this.$("button.g-save-group").girderEnable(!0),this.$("#g-"+i.responseJSON.field).trigger("focus")},this).save()},updateGroup:function(s){this.model.set(s),this.model.off().on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",this.model)},this).on("g:error",function(e){this.$(".g-validation-failed-message").text(e.responseJSON.message),this.$("button.g-save-group").girderEnable(!0),this.$("#g-"+e.responseJSON.field).trigger("focus")},this).save()},privacyChanged:function(){this.$(".g-public-container .radio").removeClass("g-selected");var s=this.$(".g-public-container .radio input:checked");s.parents(".radio").addClass("g-selected")}});function yo(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Q0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Q0(s){var e=""+s,i=YM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var YM=/["&<>]/;function Nb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Nb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function VM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-groups-list-header">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-pagination"></div>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<form class="g-group-search-form form-inline" role="form">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="form-group g-groups-search-container"></div></form>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",o()&&(r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<button class="g-group-create-button btn btn-sm btn-default">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-plus-squared"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+" Create Group</button>"),e=e+"</div>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",function(){var g=h;if(typeof g.length=="number")for(var l=0,c=g.length;l<c;l++){var d=g[l];r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<div"+(' class="g-group-list-entry g-top-level-list-entry"'+yo("public",d.get("public")?"true":"false",!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-right-column">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-created">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-clock"></i>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"Created on",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<span class="g-group-created-date">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+" ",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=a(d.get("created"),n))==null?"":i)+"</span></div></div>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-list-public-status-icon">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",d.get("public")?(r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-globe" title="Public group"></i>'):(r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-lock" title="Private group"></i>'),e=e+"</div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-top-level-list-title-container">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-title">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<a"+(' class="g-group-link"'+yo("g-group-cid",d.cid,!0,!1))+">",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<b>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=d.name())==null?"":i)+"</b></a></div>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-subtitle">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<span class="g-group-description">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=d.get("description"))==null?"":i)+"</span></div></div>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-clear-right"></div></div>'}else{var c=0;for(var l in g){c++;var d=g[l];r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<div"+(' class="g-group-list-entry g-top-level-list-entry"'+yo("public",d.get("public")?"true":"false",!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-right-column">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-created">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-clock"></i>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"Created on",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<span class="g-group-created-date">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+" ",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=a(d.get("created"),n))==null?"":i)+"</span></div></div>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-list-public-status-icon">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",d.get("public")?(r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-globe" title="Public group"></i>'):(r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<i class="icon-lock" title="Private group"></i>'),e=e+"</div>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-top-level-list-title-container">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-title">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<a"+(' class="g-group-link"'+yo("g-group-cid",d.cid,!0,!1))+">",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+"<b>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=d.name())==null?"":i)+"</b></a></div>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-group-subtitle">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<span class="g-group-description">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+Q0((i=d.get("description"))==null?"":i)+"</span></div></div>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/groupList.pug",e=e+'<div class="g-clear-right"></div></div>'}}}.call(this)}).call(this,"DATE_DAY"in u?u.DATE_DAY:typeof DATE_DAY<"u"?DATE_DAY:void 0,"formatDate"in u?u.formatDate:typeof formatDate<"u"?formatDate:void 0,"getCurrentUser"in u?u.getCurrentUser:typeof getCurrentUser<"u"?getCurrentUser:void 0,"groups"in u?u.groups:typeof groups<"u"?groups:void 0)}catch(n){Nb(n,t,r)}return e}var Wb=We.extend({events:{"click a.g-group-link":function(s){var e=me(s.currentTarget).attr("g-group-cid");He.navigate("group/"+this.collection.get(e).id,{trigger:!0})},"submit .g-group-search-form":function(s){s.preventDefault()},"click .g-group-create-button":function(){this.createGroupDialog()}},initialize:function(s){kr("fetch"),this.collection=new pm,this.collection.on("g:changed",function(){this.render()},this).fetch(),this.paginateWidget=new Mu({collection:this.collection,parentView:this}),this.searchWidget=new Ut({placeholder:"Search groups...",types:["group"],parentView:this}).on("g:resultClicked",this._gotoGroup,this),this.create=s.dialog==="create"},render:function(){return this.$el.html(VM({groups:this.collection.toArray(),getCurrentUser:it,formatDate:D0,DATE_DAY:Oa})),this.paginateWidget.setElement(this.$(".g-group-pagination")).render(),this.searchWidget.setElement(this.$(".g-groups-search-container")).render(),this.create&&(this.createGroupDialog(),this.create=!1),this},createGroupDialog:function(){new Kh({el:me("#g-dialog-container"),parentView:this}).off("g:saved").on("g:saved",function(s){var e=it().get("groups")||[];e.push(s.get("_id")),it().set("groups",e),He.navigate("group/"+s.get("_id"),{trigger:!0})},this).render()},_gotoGroup:function(s){var e=new bs;e.set("_id",s.id).on("g:fetched",function(){He.navigate("group/"+e.get("_id"),{trigger:!0})},this).fetch()}});function Zg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ad(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function ad(s){var e=""+s,i=XM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var XM=/["&<>]/;function zb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void zb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function GM(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<div class="btn-group">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<a class="g-sort-order-button g-up btn btn-sm" title="Sort order">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<i class="icon-sort-name-up"></i></a>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<a class="g-sort-order-button g-down btn btn-sm" title="Sort order">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<i class="icon-sort-name-down"></i></a>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<button class="g-collection-sort-actions btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" title="Sort by Field">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+"Sort by",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<i class="icon-down-dir"></i></button>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<ul class="g-collection-sort-menu dropdown-menu" role="menu">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",function(){var a=n;if(typeof a.length=="number")for(var o=0,h=a.length;o<h;o++){var g=a[o];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<li role="presentation">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+"<a"+(' class="g-collection-sort-link" role="menuitem"'+Zg("g-sort",o,!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+ad((i=g)==null?"":i)+"</a></li>"}else{var h=0;for(var o in a){h++;var g=a[o];r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+'<li role="presentation">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+"<a"+(' class="g-collection-sort-link" role="menuitem"'+Zg("g-sort",o,!0,!1))+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/sortCollectionWidget.pug",e=e+ad((i=g)==null?"":i)+"</a></li>"}}}.call(this),e=e+"</ul></div>"}).call(this,"fields"in u?u.fields:typeof fields<"u"?fields:void 0)}catch(n){zb(n,t,r)}return e}var qM=We.extend({events:{"click a.g-collection-sort-link":function(s){var e=me(s.currentTarget).attr("g-sort");this.collection.sortField=e,this.collection.fetch({},!0)},"click a.g-sort-order-button":function(){this.collection.sortDir===cn?this.collection.sortDir=Wf:this.collection.sortDir=cn,this.collection.fetch({},!0)}},initialize:function(s){this.collection=s.collection,this.fields=s.fields},render:function(){return this.$el.html(GM({collection:this.collection,fields:this.fields})),this.collection.sortDir===cn?this.$(".g-down").addClass("hide"):this.$(".g-up").addClass("hide"),this}});function lc(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ki(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function ki(s){var e=""+s,i=KM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var KM=/["&<>]/;function Hb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Hb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function JM(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug";const c=a&&a.get("admin");r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug";const d=l===1?`${l} total user`:`${l} total users`;r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-list-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-pagination"></div>',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",a&&(r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"<div"+(' class="g-user-count-container"'+lc("title",d,!0,!1))+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-user"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-count">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=l)==null?"":i)+"</span></div>"),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-sort"></div>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<form class="g-user-search-form form-inline" role="form">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="form-group g-users-search-container"></div></form>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",c&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<button class="g-user-create-button btn btn-sm btn-default">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-plus-squared"></i>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" Create user</button>"),e=e+"</div>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",function(){var F=g;if(typeof F.length=="number")for(var p=0,f=F.length;p<f;p++){var m=F[p];r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-list-entry">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-right-column">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-joined">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-clock"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Joined on",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-joined-date">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=o(m.get("created"),n))==null?"":i)+"</span></div>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",m.get("size")!==void 0&&(r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-space-used">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-floppy"></i>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Currently using",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-space-used">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=h(m.get("size")))==null?"":i)+"</span></div>"),r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",m.get("status")==="disabled"?(r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-status">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-cancel-circled"></i>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Account disabled</div>"):m.get("status")==="pending"&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-status">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-attention-circled"></i>',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Account pending approval</div>"),e=e+"</div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-title">',r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"<a"+(' class="g-user-link"'+lc("g-user-cid",m.cid,!0,!1))+">",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"<b>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=m.name())==null?"":i)+"</b></a></div>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-subtitle">',r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-login">',r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=m.get("login"))==null?"":i)+"</span></div>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-clear-right"></div></div>'}else{var f=0;for(var p in F){f++;var m=F[p];r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-list-entry">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-right-column">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-joined">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-clock"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Joined on",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-joined-date">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=o(m.get("created"),n))==null?"":i)+"</span></div>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",m.get("size")!==void 0&&(r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-space-used">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-floppy"></i>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Currently using",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-space-used">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=h(m.get("size")))==null?"":i)+"</span></div>"),r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",m.get("status")==="disabled"?(r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-status">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-cancel-circled"></i>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Account disabled</div>"):m.get("status")==="pending"&&(r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-status">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<i class="icon-attention-circled"></i>',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"Account pending approval</div>"),e=e+"</div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-title">',r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"<a"+(' class="g-user-link"'+lc("g-user-cid",m.cid,!0,!1))+">",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+"<b>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=m.name())==null?"":i)+"</b></a></div>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-user-subtitle">',r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<span class="g-user-login">',r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+" ",r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+ki((i=m.get("login"))==null?"":i)+"</span></div>",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/userList.pug",e=e+'<div class="g-clear-right"></div></div>'}}}.call(this)}).call(this,"DATE_DAY"in u?u.DATE_DAY:typeof DATE_DAY<"u"?DATE_DAY:void 0,"currentUser"in u?u.currentUser:typeof currentUser<"u"?currentUser:void 0,"formatDate"in u?u.formatDate:typeof formatDate<"u"?formatDate:void 0,"formatSize"in u?u.formatSize:typeof formatSize<"u"?formatSize:void 0,"users"in u?u.users:typeof users<"u"?users:void 0,"usersCount"in u?u.usersCount:typeof usersCount<"u"?usersCount:void 0)}catch(n){Hb(n,t,r)}return e}var Jh=We.extend({events:{"click a.g-user-link":function(s){var e=me(s.currentTarget).attr("g-user-cid");He.navigate("user/"+this.collection.get(e).id,{trigger:!0})},"click button.g-user-create-button":"createUserDialog","submit .g-user-search-form":function(s){s.preventDefault()}},initialize:function(s){kr("fetch"),this.collection=new ou;const e=[];if(e.push(this.collection.fetch()),this.paginateWidget=new Mu({collection:this.collection,parentView:this}),this.sortCollectionWidget=new qM({collection:this.collection,parentView:this,fields:{lastName:"Last Name",created:"Creation Date",size:"Used Space"}}),this.searchWidget=new Ut({placeholder:"Search users...",types:["user"],modes:"prefix",parentView:this}).on("g:resultClicked",this._gotoUser,this),it()){const i=ou.getTotalCount().done(t=>{this.usersCount=t});e.push(i)}this.register=s.dialog==="register"&&it()&&it().get("admin"),me.when(...e).done(()=>{this.listenTo(this.collection,"g:changed",this.render),this.render()})},render:function(){return this.$el.html(JM({users:this.collection.toArray(),currentUser:it(),usersCount:this.usersCount,formatDate:D0,formatSize:Yt,DATE_DAY:Oa})),this.paginateWidget.setElement(this.$(".g-user-pagination")).render(),this.sortCollectionWidget.setElement(this.$(".g-user-sort")).render(),this.searchWidget.setElement(this.$(".g-users-search-container")).render(),this.register&&this.createUserDialog(),this},_gotoUser:function(s){var e=new pr;e.set("_id",s.id).on("g:fetched",function(){He.navigate("user/"+e.get("_id"),{trigger:!0})},this).fetch()},createUserDialog:function(){var s=me("#g-dialog-container");new Dh({el:s,parentView:this}).on("g:userCreated",function(e){He.navigate("user/"+e.user.id,{trigger:!0})},this).render()}});function cc(s){var e=""+s,i=ZM.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var ZM=/["&<>]/;function Ub(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Ub(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function QM(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<div class="g-user-header">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",a.getAccessLevel()>=n.WRITE&&(r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<div class="btn-group pull-right">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<button class="g-user-actions-button btn btn-default dropdown-toggle" data-toggle="dropdown" title="Item actions">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-user"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+" Actions",r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-down-dir"></i></button>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<ul class="g-item-actions-menu dropdown-menu pull-right" role="menu">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li role="presentation">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<a class="g-edit-user" role="menuitem">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-edit"></i>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+"Edit user</a></li>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",a.getAccessLevel()>=n.ADMIN&&(r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",a.get("status")==="pending"?(r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li role="presentation">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<a class="g-approve-user" role="menuitem">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-ok-squared"></i>',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+"Approve account</a></li>"):a.get("status")==="enabled"?(r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li role="presentation">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<a class="g-disable-user" role="menuitem">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-cancel"></i>',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+"Disable account</a></li>"):a.get("status")==="disabled"&&(r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li role="presentation">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<a class="g-enable-user" role="menuitem">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-ok"></i>',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+"Enable account</a></li>"),r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<li role="presentation">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<a class="g-delete-user" role="menuitem">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<i class="icon-trash"></i>',r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+"Delete user</a></li>"),e=e+"</ul></div>"),r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<div class="g-user-name g-body-title">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+cc((i=a.get("firstName"))==null?"":i),r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+" ",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+cc((i=a.get("lastName"))==null?"":i)+"</div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<div class="g-user-login g-body-subtitle">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+cc((i=a.get("login"))==null?"":i)+"</div></div>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userPage.pug",e=e+'<div class="g-user-hierarchy-container"></div>'}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"user"in u?u.user:typeof user<"u"?user:void 0)}catch(n){Ub(n,t,r)}return e}var _u=We.extend({events:{"click a.g-edit-user":function(){var s="useraccount/"+this.model.get("_id")+"/info";He.navigate(s,{trigger:!0})},"click a.g-delete-user":function(){tr({text:"Are you sure you want to delete the user <b>"+this.model.escape("login")+"</b>?",yesText:"Delete",escapedHtml:!0,confirmCallback:()=>{this.model.on("g:deleted",function(){He.navigate("",{trigger:!0})}).destroy()}})},"click a.g-approve-user":function(){this._setAndSave({status:"enabled"},"Approved user account.")},"click a.g-disable-user":function(){this._setAndSave({status:"disabled"},"Disabled user account.")},"click a.g-enable-user":function(){this._setAndSave({status:"enabled"},"Enabled user account.")}},initialize:function(s){kr("fetch"),this.folderId=s.folderId||null,this.upload=s.upload||!1,this.folderAccess=s.folderAccess||!1,this.folderCreate=s.folderCreate||!1,this.folderEdit=s.folderEdit||!1,this.itemCreate=s.itemCreate||!1,s.user?(this.model=s.user,s.folderId?(this.folder=new Oi,this.folder.set({_id:s.folderId}).on("g:fetched",function(){this.render()},this).on("g:error",function(){this.folder=null,this.render()},this).fetch()):this.render()):s.id&&(this.model=new pr,this.model.set("_id",s.id),this.model.on("g:fetched",function(){this.render()},this).fetch())},render:function(){return this.$el.html(QM({user:this.model,AccessType:Xe})),this.hierarchyWidget?this.hierarchyWidget.setElement(this.$(".g-user-hierarchy-container")).render():this.hierarchyWidget=new Du({el:this.$(".g-user-hierarchy-container"),parentModel:this.folder||this.model,upload:this.upload,folderAccess:this.folderAccess,folderEdit:this.folderEdit,folderCreate:this.folderCreate,itemCreate:this.itemCreate,parentView:this}),this.upload=!1,this.folderAccess=!1,this.folderEdit=!1,this.folderCreate=!1,this.itemCreate=!1,this},_setAndSave:function(s,e){this.model.set(s),this.model.off("g:saved").on("g:saved",function(){_e.trigger("g:alert",{icon:"ok",text:e,type:"success",timeout:4e3}),this.render()},this).off("g:error").on("g:error",function(i){_e.trigger("g:alert",{icon:"cancel",text:i.responseJSON.message,type:"danger"})}).save()}},{fetchAndInit:function(s,e){var i=new pr;i.set({_id:s}).on("g:fetched",function(){_e.trigger("g:navigateTo",_u,Fe.extend({user:i},e||{}))},this).on("g:error",function(){_e.trigger("g:navigateTo",Jh)},this).fetch()}});function xo(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=tn(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function tn(s){var e=""+s,i=e_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var e_=/["&<>]/;function Yb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Yb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function t_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<div class="g-group-admins-header g-group-list-header" title="Group administrators can edit group properties and can add, invite, and remove group members, moderators, and administrators.">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-star"></i>',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"Administrators</span></div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<div class="g-group-admins-body">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<ul class="g-group-admins">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",function(){var h=a;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<li"+(xo("userid",c.id,!0,!1)+xo("username",c.name,!0,!1))+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-member-name">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-user"></i>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+tn((i=c.name)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+" (",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+tn((i=c.login)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+")</span></a>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",o>=n.ADMIN&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<span class="dropdown">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-group-admin-demote dropdown-toggle" title="Demote user" data-toggle="dropdown">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-down-big"></i>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-down-dir"></i></a>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<ul class="dropdown-menu pull-right" role="menu">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<li role="presentation">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-demote-moderator" role="menuitem">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-minus"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"Demote to moderator</span></a></li>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<li role="presentation">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-demote-member" role="menuitem">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-minus"></i>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"Demote to member</span></a></li></ul></span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-group-admin-remove" title="Remove user from the group">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}else{var l=0;for(var g in h){l++;var c=h[g];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<li"+(xo("userid",c.id,!0,!1)+xo("username",c.name,!0,!1))+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-member-name">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-user"></i>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+tn((i=c.name)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+" (",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+tn((i=c.login)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+")</span></a>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",o>=n.ADMIN&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<span class="dropdown">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-group-admin-demote dropdown-toggle" title="Demote user" data-toggle="dropdown">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-down-big"></i>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-down-dir"></i></a>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<ul class="dropdown-menu pull-right" role="menu">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<li role="presentation">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-demote-moderator" role="menuitem">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-minus"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"Demote to moderator</span></a></li>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<li role="presentation">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-demote-member" role="menuitem">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-minus"></i>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"Demote to member</span></a></li></ul></span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<a class="g-group-admin-remove" title="Remove user from the group">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}}}.call(this),r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",a.length||(r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<div class="g-member-list-empty">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+'<i class="icon-info-circled"></i>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"<span>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupAdminList.pug",e=e+"There are no administrators in this group.</span></div>"),e=e+"</ul></div>"}).call(this,"accessType"in u?u.accessType:typeof accessType<"u"?accessType:void 0,"admins"in u?u.admins:typeof admins<"u"?admins:void 0,"level"in u?u.level:typeof level<"u"?level:void 0)}catch(n){Yb(n,t,r)}return e}var Vb=We.extend({events:{"click .g-demote-moderator":function(s){var e=me(s.currentTarget).parents(".g-group-admins>li"),i=e.attr("userid");tr({text:"Are you sure you want to demote <b>"+Fe.escape(e.attr("username"))+"</b> to a moderator?",escapedHtml:!0,confirmCallback:()=>{var t=new pr({_id:i});this.model.off("g:promoted").on("g:promoted",()=>{this.trigger("g:moderatorAdded")},this).promoteUser(t,Xe.WRITE)}})},"click .g-demote-member":function(s){var e=me(s.currentTarget).parents(".g-group-admins>li");tr({text:"Are you sure you want to remove admin privileges from <b>"+Fe.escape(e.attr("username"))+"</b>?",escapedHtml:!0,confirmCallback:()=>{this.trigger("g:demoteUser",e.attr("userid"))}})},"click a.g-group-admin-remove":function(s){var e=me(s.currentTarget).parents("li");tr({text:"Are you sure you want to remove <b> "+Fe.escape(e.attr("username"))+"</b> from this group?",escapedHtml:!0,confirmCallback:()=>{this.trigger("g:removeMember",e.attr("userid"))}})},"click a.g-member-name":function(s){_e.trigger("g:navigateTo",_u,{id:me(s.currentTarget).parents("li").attr("userid")})}},initialize:function(s){this.model=s.group,this.admins=s.admins},render:function(){return this.$el.html(t_({group:this.model,level:this.model.get("_accessLevel"),admins:this.admins,accessType:Xe})),this}});function Co(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=rn(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function rn(s){var e=""+s,i=r_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var r_=/["&<>]/;function Xb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Xb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function i_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<ul class="g-group-invites">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",function(){var h=a;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"<li"+(Co("cid",c.cid,!0,!1)+Co("username",c.name(),!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<a class="g-member-name">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<i class="icon-user"></i>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"<span>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+rn((i=c.name())==null?"":i),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+" (",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+rn((i=c.get("login"))==null?"":i),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+")</span></a>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",o>=n.WRITE&&(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<a class="g-group-uninvite" title="Uninvite this user">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}else{var l=0;for(var g in h){l++;var c=h[g];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"<li"+(Co("cid",c.cid,!0,!1)+Co("username",c.name(),!0,!1))+">",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<a class="g-member-name">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<i class="icon-user"></i>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"<span>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+rn((i=c.name())==null?"":i),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+" (",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+rn((i=c.get("login"))==null?"":i),r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+")</span></a>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",o>=n.WRITE&&(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<a class="g-group-uninvite" title="Uninvite this user">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}}}.call(this),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",a.length||(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<div class="g-member-list-empty">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+'<i class="icon-info-circled"></i>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"<span>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteList.pug",e=e+"There are no pending invitations to this group.</span></div>"),e=e+"</ul>"}).call(this,"accessType"in u?u.accessType:typeof accessType<"u"?accessType:void 0,"invitees"in u?u.invitees:typeof invitees<"u"?invitees:void 0,"level"in u?u.level:typeof level<"u"?level:void 0)}catch(n){Xb(n,t,r)}return e}var Gb=We.extend({events:{"click .g-group-uninvite":function(s){var e=me(s.currentTarget).parents("li");tr({text:"Are you sure you want to remove the invitation for <b>"+Fe.escape(e.attr("username"))+"</b>?",escapedHtml:!0,confirmCallback:()=>{var i=this.collection.get(e.attr("cid"));this.group.off("g:removed").on("g:removed",()=>{this.collection.remove(i),this.render(),this.parentView.render()}).removeMember(i.get("_id"))}})},"click a.g-member-name":function(s){var e=this.collection.get(me(s.currentTarget).parents("li").attr("cid"));He.navigate("user/"+e.get("_id"),{trigger:!0})}},initialize:function(s){this.collection=s.invitees,this.group=s.group},render:function(){return this.$el.html(i_({level:this.group.get("_accessLevel"),invitees:this.collection.toArray(),accessType:Xe})),this}});function s_(s){var e=""+s,i=u_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var u_=/["&<>]/;function qb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void qb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function n_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="modal-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"&times;</button>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<h4 class="modal-title">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite user to group</h4>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-dialog-subtitle">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-user"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+s_((i=h.text)==null?"":i)+"</span></div></div>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="modal-body">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<label class="control-label">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Select a role for this user</label>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-group" id="g-invite-role-container">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel panel-default">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-invite-role-container" data-target="#g-invite-role-member">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-title">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<a>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as member</a></div></div>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-collapse collapse in" id="g-invite-role-member">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-body">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<p>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Group members are able to gain all privileges granted to",r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"the group itself on other resources. They are able to view the",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"group, but may not change properties of the group.</p>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-invite-as-member btn btn-primary">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-mail"></i>',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as member</span></div>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",o&&(r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-add-as-member btn btn-warning g-add-user-button">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-plus"></i>',r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Add as member</span></div>"),e=e+"</div></div></div>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",a>=n.ADMIN&&(r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel panel-default">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-invite-role-container" data-target="#g-invite-role-moderator">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-title">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<a>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as moderator</a></div></div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-collapse collapse" id="g-invite-role-moderator">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-body">',r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<p>",r=42,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Group moderators are members of the group who are also",r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"granted the power to add and remove users from the group.</p>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-invite-as-moderator btn btn-primary">',r=45,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-mail"></i>',r=46,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as moderator</span></div>",r=47,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",o&&(r=48,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-add-as-moderator btn btn-warning g-add-user-button">',r=49,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-plus"></i>',r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Add as moderator</span></div>"),e=e+"</div></div></div>"),r=52,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",a>=n.ADMIN&&(r=53,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel panel-default">',r=54,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-invite-role-container" data-target="#g-invite-role-admin">',r=57,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-title">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<a>",r=58,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as administrator</a></div></div>",r=59,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-collapse collapse" id="g-invite-role-admin">',r=60,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="panel-body">',r=61,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<p>",r=62,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Group administrators have all the power of group moderators,",r=63,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=63,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"and additionally can promote group members to moderators",r=64,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=64,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"or administrators. They also have the power to delete the",r=65,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+`
`,r=65,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"group entirely.</p>",r=66,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-invite-as-admin btn btn-primary">',r=67,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-mail"></i>',r=68,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=68,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Invite as administrator</span></div>",r=69,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",o&&(r=70,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-add-as-admin btn btn-warning g-add-user-button">',r=71,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<i class="icon-plus"></i>',r=72,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"<span>",r=72,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Add as administrator</span></div>"),e=e+"</div></div></div>"),e=e+"</div>",r=74,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="g-validation-failed-message"></div></div>',r=75,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<div class="modal-footer">',r=76,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',r=76,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupInviteDialog.pug",e=e+"Cancel</a></div></div></div>"}).call(this,"accessType"in u?u.accessType:typeof accessType<"u"?accessType:void 0,"level"in u?u.level:typeof level<"u"?level:void 0,"mayAdd"in u?u.mayAdd:typeof mayAdd<"u"?mayAdd:void 0,"user"in u?u.user:typeof user<"u"?user:void 0)}catch(n){qb(n,t,r)}return e}function Qg(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=sn(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function sn(s){var e=""+s,i=o_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var o_=/["&<>]/;function Kb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Kb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function a_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-group-members-header g-group-list-header">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-users"></i>',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"Members</span>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",a>=n.WRITE&&(r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<form class="g-group-invite-form form-inline" role="form">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-mail-alt"></i></span>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="form-group g-group-invite-container"></div></form>'),r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-member-pagination"></div></div>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-group-members-body">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<ul class="g-group-members">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",function(){var h=o;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<li"+Qg("cid",c.cid,!0,!1)+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-member-name">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-user"></i>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+sn((i=c.name())==null?"":i),r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+" (",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+sn((i=c.get("login"))==null?"":i),r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+")</span></a>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",a>=n.ADMIN&&(r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<span class="dropdown">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-group-member-promote dropdown-toggle" title="Promote user" data-toggle="dropdown">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-up-big"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-down-dir"></i></a>',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<ul class="dropdown-menu pull-right" role="menu">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<li role="presentation">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-promote-moderator" role="menuitem">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-plus"></i>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"Promote to moderator</span></a></li>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<li role="presentation">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-promote-admin" role="menuitem">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-plus"></i>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"Promote to administrator</span></a></li></ul></span>"),r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",a>=n.WRITE&&(r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-group-member-remove" title="Remove user from the group">',r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}else{var l=0;for(var g in h){l++;var c=h[g];r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<li"+Qg("cid",c.cid,!0,!1)+">",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-member-name">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-user"></i>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+sn((i=c.name())==null?"":i),r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+" (",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+sn((i=c.get("login"))==null?"":i),r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+")</span></a>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",a>=n.ADMIN&&(r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<span class="dropdown">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-group-member-promote dropdown-toggle" title="Promote user" data-toggle="dropdown">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-up-big"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-down-dir"></i></a>',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<ul class="dropdown-menu pull-right" role="menu">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<li role="presentation">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-promote-moderator" role="menuitem">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-plus"></i>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"Promote to moderator</span></a></li>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<li role="presentation">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-promote-admin" role="menuitem">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-plus"></i>',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"Promote to administrator</span></a></li></ul></span>"),r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",a>=n.WRITE&&(r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<a class="g-group-member-remove" title="Remove user from the group">',r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}}}.call(this),r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",o.length||(r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<div class="g-member-list-empty">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+'<i class="icon-info-circled"></i>',r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"<span>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupMemberList.pug",e=e+"There are no members in this group.</span></div>"),e=e+"</ul></div>"}).call(this,"accessType"in u?u.accessType:typeof accessType<"u"?accessType:void 0,"level"in u?u.level:typeof level<"u"?level:void 0,"members"in u?u.members:typeof members<"u"?members:void 0)}catch(n){Kb(n,t,r)}return e}var l_=We.extend({events:{"click .g-invite-as-member":function(){this._sendInvitation(Xe.READ)},"click .g-invite-as-moderator":function(){this._sendInvitation(Xe.WRITE)},"click .g-invite-as-admin":function(){this._sendInvitation(Xe.ADMIN)},"click .g-add-as-member":function(){this._sendInvitation(Xe.READ,!0)},"click .g-add-as-moderator":function(){this._sendInvitation(Xe.WRITE,!0)},"click .g-add-as-admin":function(){this._sendInvitation(Xe.ADMIN,!0)}},initialize:function(s){this.group=s.group,this.user=s.user},render:function(){return this.$el.html(n_({group:this.group,user:this.user,level:this.group.get("_accessLevel"),accessType:Xe,mayAdd:this.group.mayAddMembers()})).girderModal(this),this},_sendInvitation:function(s,e){this.$el.modal("hide"),this.trigger("g:sendInvite",{user:this.user,group:this.group,level:s,force:e})}}),Jb=We.extend({events:{"click a.g-member-name":function(s){var e=this.membersColl.get(me(s.currentTarget).parents("li").attr("cid"));He.navigate("user/"+e.get("_id"),{trigger:!0})},"click a.g-group-member-remove":function(s){var e=this.membersColl.get(me(s.currentTarget).parents("li").attr("cid"));tr({text:"Are you sure you want to remove <b> "+Fe.escape(e.name())+"</b> from this group?",escapedHtml:!0,confirmCallback:()=>{this.trigger("g:removeMember",e)}})},"click .g-promote-moderator":function(s){var e=me(s.currentTarget).parents(".g-group-members>li").attr("cid"),i=this.membersColl.get(e);this.model.off("g:promoted").on("g:promoted",function(){this.trigger("g:moderatorAdded")},this).promoteUser(i,Xe.WRITE)},"click .g-promote-admin":function(s){var e=me(s.currentTarget).parents(".g-group-members>li").attr("cid"),i=this.membersColl.get(e);this.model.off("g:promoted").on("g:promoted",function(){this.trigger("g:adminAdded")},this).promoteUser(i,Xe.ADMIN)}},initialize:function(s){this.model=s.group,this.modsAndAdmins=Fe.union(Fe.pluck(s.admins,"id"),Fe.pluck(s.moderators,"id")),this.membersColl=new ou,this.membersColl.altUrl="group/"+this.model.get("_id")+"/member",this.membersColl.on("g:changed",function(){this.render()},this).fetch()},render:function(){for(var s=[],e=0;e<this.membersColl.models.length;e+=1){var i=this.membersColl.models[e];me.inArray(i.id,this.modsAndAdmins)<0&&s.push(i)}return this.$el.html(a_({group:this.model,members:s,level:this.model.get("_accessLevel"),accessType:Xe})),new Mu({el:this.$(".g-member-pagination"),collection:this.membersColl,parentView:this}).render(),this.userSearch=new Ut({el:this.$(".g-group-invite-container"),placeholder:"Invite a user to join...",types:["user"],parentView:this}).off().on("g:resultClicked",this._inviteUser,this).render(),this},_inviteUser:function(s){this.userSearch.resetState(),new l_({el:me("#g-dialog-container"),group:this.model,user:s,parentView:this}).on("g:sendInvite",function(e){this.trigger("g:sendInvite",e)},this).render()}});function Eo(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=un(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function un(s){var e=""+s,i=c_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var c_=/["&<>]/;function Zb(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Zb(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function d_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<div class="g-group-mods-header g-group-list-header" title="Group moderators can invite and approve group members.">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-shield"></i>',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<span>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"Moderators</span></div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<div class="g-group-mods-body">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<ul class="g-group-mods">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",function(){var h=o;if(typeof h.length=="number")for(var g=0,l=h.length;g<l;g++){var c=h[g];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<li"+(Eo("userid",c.id,!0,!1)+Eo("username",c.name,!0,!1))+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-member-name">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-user"></i>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<span>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+un((i=c.name)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+" (",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+un((i=c.login)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+")</span></a>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",a>=n.ADMIN&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-promote" title="Promote to administrator">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-up-big"></i></a>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-demote" title="Demote to member">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-down-big"></i></a>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-remove" title="Remove user from the group">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}else{var l=0;for(var g in h){l++;var c=h[g];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<li"+(Eo("userid",c.id,!0,!1)+Eo("username",c.name,!0,!1))+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-member-name">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-user"></i>',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<span>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+un((i=c.name)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+" (",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+un((i=c.login)==null?"":i),r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+")</span></a>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<div class="g-group-member-controls pull-right">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",a>=n.ADMIN&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-promote" title="Promote to administrator">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-up-big"></i></a>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-demote" title="Demote to member">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-down-big"></i></a>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<a class="g-group-mod-remove" title="Remove user from the group">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-block"></i></a>'),e=e+"</div></li>"}}}.call(this),r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",o.length||(r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<div class="g-member-list-empty">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+'<i class="icon-info-circled"></i>',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"<span>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/groupModList.pug",e=e+"There are no moderators in this group.</span></div>"),e=e+"</ul></div>"}).call(this,"accessType"in u?u.accessType:typeof accessType<"u"?accessType:void 0,"level"in u?u.level:typeof level<"u"?level:void 0,"moderators"in u?u.moderators:typeof moderators<"u"?moderators:void 0)}catch(n){Zb(n,t,r)}return e}var Qb=We.extend({events:{"click .g-group-mod-promote":function(s){var e=me(s.currentTarget).parents("li").attr("userid"),i=new pr({_id:e});this.model.off("g:promoted").on("g:promoted",function(){this.trigger("g:adminAdded")},this).promoteUser(i,Xe.ADMIN)},"click .g-group-mod-demote":function(s){var e=me(s.currentTarget).parents("li");tr({text:"Are you sure you want to remove moderator privileges from <b>"+Fe.escape(e.attr("username"))+"</b>?",escapedHtml:!0,confirmCallback:()=>{this.trigger("g:demoteUser",e.attr("userid"))}})},"click a.g-group-mod-remove":function(s){var e=me(s.currentTarget).parents("li");tr({text:"Are you sure you want to remove <b> "+Fe.escape(e.attr("username"))+"</b> from this group?",escapedHtml:!0,confirmCallback:()=>{this.trigger("g:removeMember",e.attr("userid"))}})},"click a.g-member-name":function(s){_e.trigger("g:navigateTo",_u,{id:me(s.currentTarget).parents("li").attr("userid")})}},initialize:function(s){this.model=s.group,this.moderators=s.moderators},render:function(){return this.$el.html(d_({group:this.model,level:this.model.get("_accessLevel"),moderators:this.moderators,accessType:Xe})),this}});function eF(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=es(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function es(s){var e=""+s,i=h_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var h_=/["&<>]/;function ew(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ew(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function g_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c,d){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-header">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="btn-group pull-right">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",(l||g||a()||o.get("_accessLevel")>=n.ADMIN)&&(r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<button class="g-group-actions-button btn btn-default dropdown-toggle" data-toggle="dropdown" title="Group actions">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-users"></i>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Actions",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-down-dir"></i></button>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<ul class="g-group-actions-menu dropdown-menu pull-right" role="menu">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",l?(r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li role="presentation">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-leave" role="menuitem">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-block"></i>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Leave group</a></li>"):g?(r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li role="presentation">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-join" role="menuitem">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-login"></i>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Join group</a></li>"):a()&&(r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li role="presentation">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-invite" role="menuitem">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-export"></i>',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Request membership</a></li>"),r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("_accessLevel")>=n.ADMIN&&(r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li role="presentation">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-edit-group" role="menuitem">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-edit"></i>',r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Edit group</a></li>"),r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("_accessLevel")>=n.ADMIN&&(r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li role="presentation">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-delete" role="menuitem">',r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-trash"></i>',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Delete group</a></li>"),e=e+"</ul>"),e=e+"</div>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-name g-body-title">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=o.name())==null?"":i)+"</div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-description g-body-subtitle">',r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=o.get("description"))==null?"":i)+"</div>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-clear-right"></div></div>',r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",a()&&(r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",l?(r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-status-container g-member">',r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-ok"></i>',r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",h?(r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You are an ",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<b>",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"administrator</b>",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" of this group."):c?(r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You are a ",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<b>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"moderator</b>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" of this group."):(r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You are a ",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<b>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"member</b>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" of this group."),e=e+"</div>"):g?(r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-status-container g-invited">',r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-mail-alt"></i>',r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You have been invited to this group.",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-join">',r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Join group</a></div>"):d?(r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-status-container g-requested-invite">',r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-comment"></i>',r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You have requested to join this group.</div>"):(r=62,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-status-container g-nonmember">',r=63,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-minus-circled"></i>',r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You are not a member of this group.",r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-invite">',r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Request membership</a></div>"),r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("_accessLevel")>=n.ADMIN&&!h&&(r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-status-container g-admin">',r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-star"></i>',r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" You have ",r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<b>",r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"administrator</b>",r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" privileges.</div>")),r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<ul class="g-group-tabs nav nav-tabs">',r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<li class="active">',r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a href="#g-group-tab-roles" data-toggle="tab" name="roles">',r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-th-list"></i>',r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Roles</a></li>",r=76,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<li>",r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a href="#g-group-tab-pending" data-toggle="tab" name="pending">',r=78,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-inbox"></i>',r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"Pending",r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div id="g-group-tab-pending-status"></div></a></li></ul>',r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="tab-content">',r=83,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="tab-pane active" id="g-group-tab-roles">',r=84,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-admins-container"></div>',r=85,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-mods-container"></div>',r=86,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-members-container"></div></div>',r=87,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="tab-pane" id="g-group-tab-pending">',r=88,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-requests-container">',r=89,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-requests-header g-group-list-header">',r=90,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-comment"></i>',r=91,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Requests for membership</div>",r=93,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-requests-body">',r=94,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<ul class="g-group-requests">',r=95,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",function(){var F=o.get("requests");if(typeof F.length=="number")for(var p=0,f=F.length;p<f;p++){var m=F[p];r=96,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<li"+eF("userid",m.id,!0,!1)+">",r=97,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-member-name">',r=98,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-user"></i>',r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" ",r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=m.name)==null?"":i),r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" (",r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=m.login)==null?"":i),r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+")</a>",r=100,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-member-controls pull-right">',r=101,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("_accessLevel")>=n.WRITE&&(r=102,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-accept" title="Add to group">',r=103,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-thumbs-up"></i></a>',r=104,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-deny" title="Deny request">',r=105,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-thumbs-down"></i></a>'),e=e+"</div></li>"}else{var f=0;for(var p in F){f++;var m=F[p];r=96,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+"<li"+eF("userid",m.id,!0,!1)+">",r=97,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-member-name">',r=98,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-user"></i>',r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" ",r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=m.name)==null?"":i),r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" (",r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+es((i=m.login)==null?"":i),r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+")</a>",r=100,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-member-controls pull-right">',r=101,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("_accessLevel")>=n.WRITE&&(r=102,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-accept" title="Add to group">',r=103,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-thumbs-up"></i></a>',r=104,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<a class="g-group-request-deny" title="Deny request">',r=105,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-thumbs-down"></i></a>'),e=e+"</div></li>"}}}.call(this),r=106,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",o.get("requests").length||(r=107,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-member-list-empty">',r=108,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-info-circled"></i>',r=109,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" There are no outstanding invitation requests for this group.</div>"),e=e+"</ul></div></div>",r=111,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-invites-container">',r=112,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-invites-header g-group-list-header">',r=113,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<i class="icon-mail-alt"></i>',r=114,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+" Sent invitations</div>",r=116,t="/home/circleci/project/girder/girder/web/src/templates/body/groupPage.pug",e=e+'<div class="g-group-invites-body"></div></div></div></div>'}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"getCurrentUser"in u?u.getCurrentUser:typeof getCurrentUser<"u"?getCurrentUser:void 0,"group"in u?u.group:typeof group<"u"?group:void 0,"isAdmin"in u?u.isAdmin:typeof isAdmin<"u"?isAdmin:void 0,"isInvited"in u?u.isInvited:typeof isInvited<"u"?isInvited:void 0,"isMember"in u?u.isMember:typeof isMember<"u"?isMember:void 0,"isModerator"in u?u.isModerator:typeof isModerator<"u"?isModerator:void 0,"isRequested"in u?u.isRequested:typeof isRequested<"u"?isRequested:void 0)}catch(n){ew(n,t,r)}return e}var Qa=We.extend({events:{"click .g-edit-group":"editGroup","click .g-group-join":"joinGroup","click .g-group-leave":"leaveGroup","click .g-group-delete":"deleteGroup","click .g-group-request-invite":"requestInvitation","click .g-group-request-accept":"acceptMembershipRequest","click .g-group-request-deny":"denyMembershipRequest","click #g-group-tab-pending a.g-member-name":function(s){var e=me(s.currentTarget).parents("li").attr("userid");He.navigate("user/"+e,{trigger:!0})}},initialize:function(s){kr("fetch"),this.tab=s.tab||"roles",this.edit=s.edit||!1,s.group?(this.model=s.group,this.model.on("g:accessFetched",function(){this.render()},this).fetchAccess()):s.id&&(this.model=new bs,this.model.set("_id",s.id),this.model.on("g:fetched",function(){this.model.on("g:accessFetched",function(){this.render()},this).fetchAccess()},this).fetch())},editGroup:function(){var s=me("#g-dialog-container");this.editGroupWidget||(this.editGroupWidget=new Kh({el:s,model:this.model,parentView:this}).off("g:saved").on("g:saved",function(){this.render()},this)),this.editGroupWidget.render()},deleteGroup:function(){tr({text:"Are you sure you want to delete the group <b>"+this.model.escape("name")+"</b>?",escapedHtml:!0,confirmCallback:()=>{this.model.on("g:deleted",function(){He.navigate("groups",{trigger:!0})}).destroy()}})},render:function(){if(this.isMember=!1,this.isInvited=!1,this.isRequested=!1,this.isModerator=!1,this.isAdmin=!1,it()&&(Fe.every(it().get("groups"),function(e){return e===this.model.get("_id")?(this.isMember=!0,!1):!0},this),Fe.every(it().get("groupInvites"),function(e){return e.groupId===this.model.get("_id")?(this.isInvited=!0,!1):!0},this),Fe.every(this.model.get("requests")||[],function(e){return e.id===it().get("_id")?(this.isRequested=!0,!1):!0},this)),this.isMember&&Fe.every(this.model.get("access").users||[],function(e){return e.id===it().get("_id")?(e.level===Xe.WRITE?this.isModerator=!0:e.level===Xe.ADMIN&&(this.isAdmin=!0),!1):!0},this),this.$el.html(g_({group:this.model,getCurrentUser:it,AccessType:Xe,isInvited:this.isInvited,isRequested:this.isRequested,isMember:this.isMember,isModerator:this.isModerator,isAdmin:this.isAdmin})),this.invitees)this._renderInvitesWidget();else{var s=this.$(".g-group-invites-body");new Vn({el:s,parentView:this}).render(),this.invitees=new ou,this.invitees.altUrl="group/"+this.model.get("_id")+"/invitation",this.invitees.on("g:changed",()=>{this._renderInvitesWidget(),this.updatePendingStatus()},this).fetch()}return this._updateRolesLists(),He.navigate("group/"+this.model.get("_id")+"/"+this.tab,{replace:!0}),this.edit&&(this.model.get("_accessLevel")>=Xe.ADMIN&&this.editGroup(),this.edit=!1),Fe.each(me(".g-group-tabs>li>a"),e=>{var i=me(e);i.tab().on("shown.bs.tab",t=>{this.tab=me(t.currentTarget).attr("name"),He.navigate("group/"+this.model.get("_id")+"/"+this.tab)}),i.attr("name")===this.tab&&i.tab("show")}),this},_renderInvitesWidget:function(){new Gb({el:this.$(".g-group-invites-body"),invitees:this.invitees,group:this.model,parentView:this}).render(),this.updatePendingStatus()},updatePendingStatus:function(){var s=this.invitees.length+this.model.get("requests").length;me("#g-group-tab-pending-status").text(" ("+s+")")},joinGroup:function(){this.model.off("g:joined").on("g:joined",function(){this.invitees.fetch(null,!0)},this).joinGroup()},leaveGroup:function(){tr({text:"Are you sure you want to leave this group?",confirmCallback:()=>{this.model.off("g:removed").on("g:removed",()=>{this.render()}).removeMember(it().get("_id"))}})},removeMember:function(s){var e=s;me.type(s)!=="string"&&(e=s.get("_id")),this.model.off("g:removed").on("g:removed",function(){this.render()},this).removeMember(e)},requestInvitation:function(){this.model.off("g:inviteRequested").on("g:inviteRequested",function(){this.render()},this).requestInvitation()},acceptMembershipRequest:function(s){var e=me(s.currentTarget).parents("li").attr("userid");this.model.off("g:invited").on("g:invited",this.render,this).sendInvitation(e,Xe.READ,!0)},denyMembershipRequest:function(s){var e=me(s.currentTarget).parents("li").attr("userid");this.model.off("g:removed").on("g:removed",this.render,this).removeMember(e)},_updateRolesLists:function(){var s=[],e=[];Fe.each(this.model.get("access").users,function(i){i.level===Xe.WRITE?s.push(i):i.level===Xe.ADMIN&&e.push(i)},this),this.adminsWidget=new Vb({el:this.$(".g-group-admins-container"),group:this.model,admins:e,parentView:this}).off().on("g:demoteUser",function(i){this.model.off("g:demoted").on("g:demoted",this.render,this).demoteUser(i,Xe.ADMIN)},this).on("g:removeMember",this.removeMember,this).on("g:moderatorAdded",this.render,this).render(),this.modsWidget=new Qb({el:this.$(".g-group-mods-container"),group:this.model,moderators:s,parentView:this}).on("g:demoteUser",function(i){this.model.off("g:demoted").on("g:demoted",this.render,this).demoteUser(i,Xe.WRITE)},this).on("g:removeMember",this.removeMember,this).on("g:adminAdded",this.render,this).render(),this.membersWidget=new Jb({el:this.$(".g-group-members-container"),group:this.model,admins:e,moderators:s,parentView:this}).on("g:sendInvite",function(i){var t={force:i.force||!1};this.model.off("g:invited").on("g:invited",function(){this.invitees.fetch(null,!0),i.force&&this.model.fetchAccess()},this).off("g:error").on("g:error",function(r){_e.trigger("g:alert",{text:r.responseJSON.message,type:"warning"})},this).sendInvitation(i.user.id,i.level,!1,t)},this).on("g:removeMember",this.removeMember,this).on("g:moderatorAdded",this.render,this).on("g:adminAdded",this.render,this)}},{fetchAndInit:function(s,e){var i=new bs;i.set({_id:s}).once("g:fetched",function(){_e.trigger("g:navigateTo",Qa,Fe.extend({group:i},e||{}))},this).fetch()}});function tF(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=F_(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function F_(s){var e=""+s,i=p_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var p_=/["&<>]/;function tw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void tw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function f_(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="modal-dialog">',t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="modal-content">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<form class="modal-form" id="g-file-edit-form" role="form">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="modal-header">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"&times;</button>",t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<h4 class="modal-title">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"Edit file</h4></div>",t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="modal-body">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="form-group">',t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<label class="control-label" for="g-name">',t=9,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"Name</label>",t=10,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"<input"+(' class="input-sm form-control" id="g-name" type="text" placeholder="Enter file name"'+tF("value",u.name(),!0,!1))+"/></div>",t=12,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="form-group">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<label class="control-label" for="g-mimetype">',t=13,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"MIME type</label>",t=14,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"<input"+(' class="input-sm form-control" id="g-mimetype" type="text" placeholder="Enter MIME type"'+tF("value",u.get("mimeType"),!0,!1))+"/></div>",t=16,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',t=17,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<div class="modal-footer">',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',t=18,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"Cancel</a>",t=19,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<button class="g-save-file btn btn-small btn-primary" type="submit">',t=20,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+'<i class="icon-edit"></i>',t=21,i="/home/circleci/project/girder/girder/web/src/templates/widgets/editFileWidget.pug",e=e+"Save</button></div></form></div></div>"}).call(this,"file"in r?r.file:typeof file<"u"?file:void 0)}catch(u){tw(u,i,t)}return e}var rw=We.extend({events:{"submit #g-file-edit-form":function(){var s={name:this.$("#g-name").val(),mimeType:this.$("#g-mimetype").val()};return this.file.set(s),this.file.off(null,null,this).on("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",this.file)},this).on("g:error",function(e){this.$(".g-validation-failed-message").text(e.responseJSON.message),this.$("button.g-save-file").girderEnable(!0),this.$("#g-"+e.responseJSON.field).trigger("focus")},this).save(),this.$("button.g-save-file").girderEnable(!1),this.$(".g-validation-failed-message").empty(),!1}},initialize:function(s){this.file=s.file||null},render:function(){return this.file.get("mimeType")===void 0&&this.file.set("mimeType",""),this.$el.html(f_({file:this.file})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-name").trigger("select").trigger("focus")}).on("hidden.bs.modal",()=>{ar("fileedit",void 0,this.file.get("_id"))}),br("fileedit",void 0,this.file.get("_id")),this}});function Hs(s){var e=""+s,i=m_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var m_=/["&<>]/;function iw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void iw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function v_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="modal-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"&times;</button>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<h4 class="modal-title">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"File information</h4>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-dialog-subtitle">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<i class="icon-doc-inv"></i>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"<span>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i=a.name())==null?"":i)+"</span></div></div>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="modal-body">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-file-info-lines">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-file-info-line" property="created">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<i class="icon-clock"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"<span>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i="Created ")==null?"":i)+"</span>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<span class="g-bold-part">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i=o(a.get("created"),n))==null?"":i)+"</span></div>",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-file-info-line" property="mimeType">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<i class="icon-info"></i>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"<span>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"MIME type:</span>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<span class="g-bold-part">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+" ",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i=a.get("mimeType")||"unknown")==null?"":i)+"</span></div>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",a.has("size")&&(r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-file-info-line" property="size">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<i class="icon-hdd"></i>',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"<span>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"Size:</span>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<span class="g-bold-part">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+" ",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i=a.get("size"))==null?"":i),r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+" bytes</span></div>"),r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="g-file-info-line" property="id">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<i class="icon-share"></i>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"<span>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"Unique ID:</span>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<span class="g-bold-part">',r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+" ",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+Hs((i=a.id)==null?"":i)+"</span></div></div></div>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<div class="modal-footer">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileInfoDialog.pug",e=e+"Close</a></div></div></div>"}).call(this,"DATE_SECOND"in u?u.DATE_SECOND:typeof DATE_SECOND<"u"?DATE_SECOND:void 0,"file"in u?u.file:typeof file<"u"?file:void 0,"formatDate"in u?u.formatDate:typeof formatDate<"u"?formatDate:void 0)}catch(n){iw(n,t,r)}return e}var sw=We.extend({initialize:function(s){this.parentItem=s.parentItem},render:function(){return this.$el.html(v_({file:this.model,formatDate:D0,DATE_SECOND:xu})).girderModal(this),this}});function Qr(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ts(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function ts(s){var e=""+s,i=b_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var b_=/["&<>]/;function uw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void uw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function w_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<ul class="g-file-list">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",function(){var l=a;if(typeof l.length=="number")for(var c=0,d=l.length;c<d;c++){var F=l[c];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<li class="g-file-list-entry">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-file-list-link"'+Qr("cid",F.cid,!0,!1)+' title="Download file"'+Qr("target",F.get("linkUrl")?"_blank":"_self",!0,!1)+Qr("href",F.downloadUrl(),!0,!1)+' rel="noopener noreferrer"')+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",F.get("linkUrl")?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-link"></i>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<span class="g-file-name">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=F.name())==null?"":i)+"</span>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-link-ext"></i>'):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-doc-inv"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=F.name())==null?"":i)),e=e+"</a>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-view-inline" title="View in browser" target="_blank" rel="noopener noreferrer"'+Qr("href",F.downloadUrl({contentDisposition:"inline"}),!0,!1))+">",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-eye"></i></a>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-show-info"'+Qr("file-cid",F.cid,!0,!1)+' title="Show info"')+">",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-info"></i></a>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",F.has("size")&&(r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<div class="g-file-size">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=o(F.get("size")))==null?"":i)+"</div>"),r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<div"+(' class="g-file-actions-container"'+Qr("file-cid",F.cid,!0,!1))+">",r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",g&&g.get("_accessLevel")>=n.WRITE&&(r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-update-info" title="Edit file info">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-edit"></i></a>',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-update-contents" title="Replace file contents">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-upload"></i></a>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-delete-file" title="Delete file">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-cancel"></i></a>'),e=e+"</div></li>"}else{var d=0;for(var c in l){d++;var F=l[c];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<li class="g-file-list-entry">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-file-list-link"'+Qr("cid",F.cid,!0,!1)+' title="Download file"'+Qr("target",F.get("linkUrl")?"_blank":"_self",!0,!1)+Qr("href",F.downloadUrl(),!0,!1)+' rel="noopener noreferrer"')+">",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",F.get("linkUrl")?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-link"></i>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<span class="g-file-name">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=F.name())==null?"":i)+"</span>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-link-ext"></i>'):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-doc-inv"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=F.name())==null?"":i)),e=e+"</a>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-view-inline" title="View in browser" target="_blank" rel="noopener noreferrer"'+Qr("href",F.downloadUrl({contentDisposition:"inline"}),!0,!1))+">",r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-eye"></i></a>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<a"+(' class="g-show-info"'+Qr("file-cid",F.cid,!0,!1)+' title="Show info"')+">",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-info"></i></a>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",F.has("size")&&(r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<div class="g-file-size">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+ts((i=o(F.get("size")))==null?"":i)+"</div>"),r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"<div"+(' class="g-file-actions-container"'+Qr("file-cid",F.cid,!0,!1))+">",r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",g&&g.get("_accessLevel")>=n.WRITE&&(r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-update-info" title="Edit file info">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-edit"></i></a>',r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-update-contents" title="Replace file contents">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-upload"></i></a>',r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-delete-file" title="Delete file">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-cancel"></i></a>'),e=e+"</div></li>"}}}.call(this),r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",h&&(r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<li class="g-show-more">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<a class="g-show-more-files">',r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+'<i class="icon-level-down"></i>',r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/fileList.pug",e=e+"Show more files...</a></li>"),e=e+"</ul>"}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"files"in u?u.files:typeof files<"u"?files:void 0,"formatSize"in u?u.formatSize:typeof formatSize<"u"?formatSize:void 0,"hasMore"in u?u.hasMore:typeof hasMore<"u"?hasMore:void 0,"parentItem"in u?u.parentItem:typeof parentItem<"u"?parentItem:void 0)}catch(n){uw(n,t,r)}return e}var nw=We.extend({events:{"click a.g-show-more-files":function(){this.collection.fetchNextPage()},"click a.g-show-info":function(s){var e=me(s.currentTarget).attr("file-cid");new sw({el:me("#g-dialog-container"),model:this.collection.get(e),parentItem:this.parentItem,parentView:this}).render()},"click a.g-update-contents":function(s){var e=me(s.currentTarget).parent().attr("file-cid");this.uploadDialog(e)},"click a.g-update-info":function(s){var e=me(s.currentTarget).parent().attr("file-cid");this.editFileDialog(e)},"click a.g-delete-file":function(s){var e=me(s.currentTarget).parent().attr("file-cid"),i=this.collection.get(e);tr({text:"Are you sure you want to delete the file <b>"+i.escape("name")+"</b>?",yesText:"Delete",escapedHtml:!0,confirmCallback:()=>{i.once("g:deleted",function(){_e.trigger("g:alert",{icon:"ok",type:"success",text:"File deleted.",timeout:4e3}),this.render()},this).once("g:error",function(){_e.trigger("g:alert",{icon:"cancel",text:"Failed to delete file.",type:"danger",timeout:4e3})}).destroy()}})}},initialize:function(s){this.upload=s.upload,this.fileEdit=s.fileEdit,this.checked=[],this.collection=new jh,this.collection.altUrl="item/"+(s.itemId||s.item.get("_id"))+"/files",this.collection.append=!0,this.collection.on("g:changed",function(){this.render(),this.trigger("g:changed")},this).fetch(),this.parentItem=s.item},editFileDialog:function(s){this.editFileWidget=new rw({el:me("#g-dialog-container"),file:this.collection.get(s),parentView:this}).off("g:saved",null,this).on("g:saved",function(){this.render()},this),this.editFileWidget.render()},uploadDialog:function(s){new Ka({el:me("#g-dialog-container"),title:"Replace file contents",parent:this.collection.get(s),parentType:"file",parentView:this}).on("g:uploadFinished",function(){_e.trigger("g:alert",{icon:"ok",text:"File contents updated.",type:"success",timeout:4e3})},this).render()},render:function(){return this.checked=[],this.$el.html(w_({files:this.collection.toArray(),hasMore:this.collection.hasNextPage(),AccessType:Xe,formatSize:Yt,parentItem:this.parentItem})),this.fileEdit?(this.editFileDialog(this.fileEdit),this.fileEdit=!1):this.upload&&(this.uploadDialog(this.upload),this.upload=!1),this},insertFile:function(s){this.collection.add(s),this.render(),this.trigger("g:changed")}});function Ao(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=rs(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function rs(s){var e=""+s,i=y_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var y_=/["&<>]/;function ow(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ow(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function x_(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<ol class="breadcrumb">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",function(){var a=n;if(typeof a.length=="number")for(var o=0,h=a.length;o<h;o++){var g=a[o];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+"<li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+"<a"+(' class="g-item-breadcrumb-link"'+Ao("data-id",g.object._id,!0,!1)+Ao("data-type",g.type,!0,!1))+">",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",g.type==="user"?(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<i class="icon-user"></i>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.login)==null?"":i)):g.type==="collection"?(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<i class="icon-sitemap"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.name)==null?"":i)):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.name)==null?"":i)),e=e+"</a></li>"}else{var h=0;for(var o in a){h++;var g=a[o];r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+"<li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+"<a"+(' class="g-item-breadcrumb-link"'+Ao("data-id",g.object._id,!0,!1)+Ao("data-type",g.type,!0,!1))+">",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",g.type==="user"?(r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<i class="icon-user"></i>',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.login)==null?"":i)):g.type==="collection"?(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<i class="icon-sitemap"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.name)==null?"":i)):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+rs((i=g.object.name)==null?"":i)),e=e+"</a></li>"}}}.call(this),r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<div class="pull-right">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<a class="g-hierarchy-level-up" title="Go to parent folder">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/itemBreadcrumb.pug",e=e+'<i class="icon-level-up"></i></a></div></ol>'}).call(this,"parentChain"in u?u.parentChain:typeof parentChain<"u"?parentChain:void 0)}catch(n){ow(n,t,r)}return e}var aw=We.extend({events:{"click a.g-item-breadcrumb-link":function(s){var e=me(s.currentTarget);He.navigate(e.data("type")+"/"+e.data("id"),{trigger:!0})},"click a.g-hierarchy-level-up":function(){var s=this.parentChain.pop().object;He.navigate("folder/"+s._id,{trigger:!0})}},initialize:function(s){this.parentChain=s.parentChain,this.render()},render:function(){return this.$el.html(x_({parentChain:this.parentChain})),this}});function C_(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=l0(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function l0(s){var e=""+s,i=E_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var E_=/["&<>]/;function lw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void lw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function A_(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h,g,l,c){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-breadcrumb-container"></div>',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="pull-right">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",o>=n.WRITE&&(r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<button class="g-upload-into-item btn btn-sm btn-success" title="Upload files into item">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-upload"></i></button>'),r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="btn-group">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<button class="g-item-actions-button btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" title="Item actions">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-doc-text-inv"></i>',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+" Actions",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-down-dir"></i></button>',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<ul class="g-item-actions-menu dropdown-menu pull-right" role="menu">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<li role="presentation">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"<a"+(' class="g-download-item" role="menuitem"'+C_("href",l.downloadUrl(),!0,!1))+">",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-download"></i>',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Download item</a></li>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",o>=n.WRITE&&(r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<li role="presentation">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<a class="g-edit-item" role="menuitem">',r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-edit"></i>',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Edit item</a></li>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<li class="divider" role="presentation"></li>',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<li role="presentation">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<a class="g-delete-item" role="menuitem">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-trash"></i>',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Delete item</a></li>"),e=e+"</ul></div></div>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-name g-body-title">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=l.name())==null?"":i)+"</div></div>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-description">',r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+((i=c(l.get("description")))==null?"":i)+"</div>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-info">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-info-header">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-info"></i>',r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Info</div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-size g-info-list-entry">',r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-hdd"></i>',r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",l.get("size")<1024?(r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=l.get("size"))==null?"":i),r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+" bytes"):(r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=g(l.get("size")))==null?"":i),r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+" (",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=l.get("size"))==null?"":i),r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+" bytes)"),e=e+"</div>",r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-created g-info-list-entry">',r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-clock"></i>',r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Created on ",r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=h(l.get("created"),a))==null?"":i)+"</div>",r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-updated g-info-list-entry">',r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-clock"></i>',r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Updated on ",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=h(l.get("updated"),a))==null?"":i)+"</div>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-id g-info-list-entry">',r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-share"></i>',r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+"Unique ID: ",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+l0((i=l.id)==null?"":i)+"</div></div>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-metadata"></div>',r=57,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-files">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-files-header">',r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<i class="icon-docs"></i>',r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+" Files &amp; links</div>",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/itemPage.pug",e=e+'<div class="g-item-files-container"></div></div>'}).call(this,"AccessType"in u?u.AccessType:typeof AccessType<"u"?AccessType:void 0,"DATE_SECOND"in u?u.DATE_SECOND:typeof DATE_SECOND<"u"?DATE_SECOND:void 0,"accessLevel"in u?u.accessLevel:typeof accessLevel<"u"?accessLevel:void 0,"formatDate"in u?u.formatDate:typeof formatDate<"u"?formatDate:void 0,"formatSize"in u?u.formatSize:typeof formatSize<"u"?formatSize:void 0,"item"in u?u.item:typeof item<"u"?item:void 0,"renderMarkdown"in u?u.renderMarkdown:typeof renderMarkdown<"u"?renderMarkdown:void 0)}catch(n){lw(n,t,r)}return e}var Zh=We.extend({events:{"click .g-edit-item":"editItem","click .g-delete-item":"deleteItem","click .g-upload-into-item":"uploadIntoItem"},initialize:function(s){kr("fetch"),this.edit=s.edit||!1,this.fileEdit=s.fileEdit||!1,this.upload=s.upload||!1,s.item?(this.model=s.item,this.render()):console.error("Implement fetch then render item")},uploadIntoItem:function(){new Ka({el:me("#g-dialog-container"),parent:this.model,parentType:"item",parentView:this}).on("g:uploadFinished",function(){ar("upload"),this.upload=!1,_e.trigger("g:alert",{icon:"ok",text:"Files added.",type:"success",timeout:4e3}),this.fileListWidget.collection.fetch(null,!0)},this).render()},editItem:function(){var s=me("#g-dialog-container");this.editItemWidget||(this.editItemWidget=new Vh({el:s,item:this.model,parentView:this}).off("g:saved").on("g:saved",function(){this.render()},this)),this.editItemWidget.render()},deleteItem:function(){var s=this.model.get("folderId"),e=this.model.get("baseParentType")+"/"+this.model.get("baseParentId")+"/folder/"+s;tr({text:"Are you sure you want to delete <b>"+this.model.escape("name")+"</b>?",yesText:"Delete",escapedHtml:!0,confirmCallback:()=>{this.model.on("g:deleted",()=>{He.navigate(e,{trigger:!0})}).off("g:error").on("g:error",()=>{this.render(),_e.trigger("g:alert",{icon:"cancel",text:"Failed to delete item.",type:"danger",timeout:4e3})},this).destroy()}})},render:function(){return this.model.getAccessLevel(s=>{this.accessLevel=s,this.$el.html(A_({item:this.model,accessLevel:s,AccessType:Xe,formatSize:Yt,formatDate:D0,renderMarkdown:M0,DATE_SECOND:xu})),this.fileListWidget=new nw({el:this.$(".g-item-files-container"),item:this.model,fileEdit:this.fileEdit,upload:this.upload,parentView:this}),this.fileListWidget.once("g:changed",function(){this.trigger("g:rendered")},this),this.fileEdit=!1,this.upload=!1,this.metadataWidget=new oa({el:this.$(".g-item-metadata"),item:this.model,accessLevel:s,parentView:this}),this.model.getRootPath(e=>{this.breadcrumbWidget=new aw({el:this.$(".g-item-breadcrumb-container"),parentChain:e,parentView:this})}),this.edit&&(this.editItem(),this.edit=!1)}),this}},{fetchAndInit:function(s,e){var i=new Ms;i.set({_id:s}).on("g:fetched",function(){_e.trigger("g:navigateTo",Zh,Fe.extend({item:i},e||{}))},this).fetch()}});function Us(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Ui(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Ui(s){var e=""+s,i=k_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var k_=/["&<>]/;function cw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void cw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function S_(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-body-title">',r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"Plugins</div>",r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-plugin-list-container">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",function(){var a=n;if(typeof a.length=="number")for(var o=0,h=a.length;o<h;o++){var g=a[o];r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug";var l=g.value.version?g.value.version.indexOf("0.")===0:!0;r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<div"+(' class="g-plugin-list-item"'+Us("data-name",g.key,!0,!1))+">",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-plugin-name">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.url?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<a"+(Us("href",g.value.url,!0,!1)+' target="_blank"')+">",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.name)==null?"":i)+"</a>"):(r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<span>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.name)==null?"":i)+"</span>"),r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.version&&(r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<span class="g-plugin-version">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"Version ",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.version)==null?"":i)+"</span>"),r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",l&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<span class="g-plugin-list-item-notice g-plugin-list-item-experimental-notice" title="WARNING: this plugin is an alpha version and is subject to breaking changes; use at your own risk.">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"Experimental</span>"),r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.configRoute&&(r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<a"+(' class="g-plugin-config-link"'+Us("g-route",g.value.configRoute,!0,!1)+' title="Configure Plugin"')+">",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<i class="icon-cog"></i></a>'),e=e+"</div>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-plugin-description">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.description)==null?"":i)+"</div></div>"}else{var h=0;for(var o in a){h++;var g=a[o];r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug";var l=g.value.version?g.value.version.indexOf("0.")===0:!0;r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<div"+(' class="g-plugin-list-item"'+Us("data-name",g.key,!0,!1))+">",r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-plugin-name">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.url?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<a"+(Us("href",g.value.url,!0,!1)+' target="_blank"')+">",r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.name)==null?"":i)+"</a>"):(r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<span>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.name)==null?"":i)+"</span>"),r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.version&&(r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<span class="g-plugin-version">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"Version ",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.version)==null?"":i)+"</span>"),r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",l&&(r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<span class="g-plugin-list-item-notice g-plugin-list-item-experimental-notice" title="WARNING: this plugin is an alpha version and is subject to breaking changes; use at your own risk.">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"Experimental</span>"),r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",g.value.configRoute&&(r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+"<a"+(' class="g-plugin-config-link"'+Us("g-route",g.value.configRoute,!0,!1)+' title="Configure Plugin"')+">",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<i class="icon-cog"></i></a>'),e=e+"</div>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+'<div class="g-plugin-description">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/plugins.pug",e=e+Ui((i=g.value.description)==null?"":i)+"</div></div>"}}}.call(this),e=e+"</div>"}).call(this,"allPlugins"in u?u.allPlugins:typeof allPlugins<"u"?allPlugins:void 0)}catch(n){cw(n,t,r)}return e}var dw=We.extend({events:{"click a.g-plugin-config-link":function(s){var e=me(s.currentTarget).attr("g-route");He.navigate(e,{trigger:!0})}},initialize:function(s){kr("fetch"),s.all?(this.allPlugins=s.all,this.render()):Ve({url:"system/plugins",method:"GET"}).done(e=>{this.allPlugins=e.all,this.render()}).fail(()=>{He.navigate("/",{trigger:!0})})},render:function(){return Fe.each(this.allPlugins,function(s,e){s.configRoute=ym(e)},this),this.$el.html(S_({allPlugins:this._sortPlugins(this.allPlugins)})),this},_sortPlugins:function(s){var e=Fe.map(s,function(i,t){return{key:t,value:i}});return e.sort(function(i,t){return i.value.name.localeCompare(t.value.name)}),e}}),j_=ms.extend({resourceName:"system/setting/collection_creation_policy",fetchAccess:function(){return Ve({url:`${this.resourceName}/access`,method:"GET"}).done(s=>(this.set("access",s),this.trigger("g:accessFetched"),s)).fail(s=>{this.trigger("g:error",s)})}});function pt(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=hw(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function hw(s){var e=""+s,i=D_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var D_=/["&<>]/;function gw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void gw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function M_(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-body-title">',r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"System configuration</div>",r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<form class="g-settings-form" role="form">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-settings-form-container">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<h4>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Instance Branding</h4>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-brand-name">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Brand Name</label>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-brand-name" type="text"'+pt("value",a["core.brand_name"]||"",!0,!1)+' title="The brand name of the application."')+"/></div>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-contact-email-address">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Contact email address</label>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-contact-email-address" type="text"'+pt("value",a["core.contact_email_address"]||"",!0,!1)+' title="The contact email address for users to obtain support with this instance."')+"/></div>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-banner-color">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Banner Color</label>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div id="g-core-banner-color-container">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-banner-color" type="color"'+pt("value",a["core.banner_color"],!0,!1)+' title="The banner color of the application."')+"/>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<button class="form-control input-sm" id="g-core-banner-default-color" type="button" title="Default color">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"default</button></div></div></div>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-privacy-notice">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Privacy Notice Link</label>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-privacy-notice" type="text"'+pt("value",a["core.privacy_notice"]||"",!0,!1)+' title="The privacy notice link."')+"/></div>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-cookie-lifetime">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Cookie duration (days)</label>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-cookie-lifetime" type="text"'+pt("value",a["core.cookie_lifetime"]||"",!0,!1)+' title="How long users will stay logged in."')+"/></div>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-settings-form-container">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<h4>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Administrative Policy</h4>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-registration-policy">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Registration policy</label>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<select class="form-control input-sm" id="g-core-registration-policy">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="open"'+pt("selected",a["core.registration_policy"]==="open",!0,!1))+">",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Open registration</option>",r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="closed"'+pt("selected",a["core.registration_policy"]==="closed",!0,!1))+">",r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Closed registration</option>",r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="approve"'+pt("selected",a["core.registration_policy"]==="approve",!0,!1))+">",r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Admin approval required</option></select></div>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-email-verification">',r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Email verification</label>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<select class="form-control input-sm" id="g-core-email-verification">',r=47,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="required"'+pt("selected",a["core.email_verification"]==="required",!0,!1))+">",r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Required</option>",r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="optional"'+pt("selected",a["core.email_verification"]==="optional",!0,!1))+">",r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Optional</option>",r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="disabled"'+pt("selected",a["core.email_verification"]==="disabled",!0,!1))+">",r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Disabled</option></select></div>",r=53,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-add-to-group-policy">',r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Allow members to be directly added to groups</label>",r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<select class="form-control input-sm" id="g-core-add-to-group-policy">',r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="never"'+pt("selected",a["core.add_to_group_policy"]==="never",!0,!1))+">",r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"No, members must be invited and accept invitations</option>",r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="noadmin"'+pt("selected",a["core.add_to_group_policy"]==="noadmin",!0,!1))+">",r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"No, except for group administrators when enabled per group</option>",r=62,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="nomod"'+pt("selected",a["core.add_to_group_policy"]==="nomod",!0,!1))+">",r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"No, except for group administrators and moderators when enabled per group</option>",r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="yesadmin"'+pt("selected",a["core.add_to_group_policy"]==="yesadmin",!0,!1))+">",r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Yes, by group administrators unless disabled per group</option>",r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="yesmod"'+pt("selected",a["core.add_to_group_policy"]==="yesmod",!0,!1))+">",r=70,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Yes, by group administrators and moderators unless disabled per group</option></select></div>",r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-collection-create-policy-container">',r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<label>",r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Collection creation policy</label>",r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<p>",r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Allow additional users and groups to create collections.</p>",r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<input class="g-setting-switch" type="checkbox" checked="checked" data-size="mini" data-on-color="primary"/>',r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="access-widget-container"></div>',r=78,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<textarea class="hide" id="g-core-collection-create-policy">',r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+hw((i=n.stringify(a["core.collection_create_policy"]))==null?"":i)+"</textarea></div>",r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-user-default-folders">',r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Create default folders for new users</label>",r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<select class="form-control input-sm" id="g-core-user-default-folders">',r=83,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="none"'+pt("selected",a["core.user_default_folders"]==="none",!0,!1))+">",r=84,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"No</option>",r=85,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="public_private"'+pt("selected",a["core.user_default_folders"]==="public_private",!0,!1))+">",r=86,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'Yes, "Public" and "Private"</option></select></div>',r=87,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=88,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="checkbox">',r=89,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-api-keys">',r=90,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' id="g-core-api-keys" type="checkbox"'+pt("checked",a["core.api_keys"],!0,!1))+"/>",r=91,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Enable API keys</label></div></div>",r=92,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=93,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="checkbox">',r=94,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-enable-password-login">',r=95,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' id="g-core-enable-password-login" type="checkbox"'+pt("checked",a["core.enable_password_login"],!0,!1))+"/>",r=97,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Enable password login</label></div></div></div>",r=98,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-settings-form-container">',r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<h4>",r=99,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Email Creation</h4>",r=100,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=101,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-email-from-address">',r=101,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Email from address</label>",r=102,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-email-from-address" type="text"'+pt("value",a["core.email_from_address"]||"",!0,!1)+' title="The email address the system will use when sending emails."')+"/></div>",r=105,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=106,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-email-host">',r=106,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Email host</label>",r=107,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-email-host" type="text"'+pt("value",a["core.email_host"]||"",!0,!1)+' title="The host email server that is shown as a link in the footer of emails."')+"/></div></div>",r=110,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-settings-form-container">',r=111,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<h4>",r=111,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Email Delivery</h4>",r=112,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=113,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-smtp-host">',r=113,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"SMTP host</label>",r=114,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-smtp-host" type="text"'+pt("value",a["core.smtp_host"]||"",!0,!1)+' title="The hostname of the SMTP server used to send emails."')+"/></div>",r=117,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=118,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-smtp-port">',r=118,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"SMTP port</label>",r=119,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-smtp-port" type="text"'+pt("value",a["core.smtp.port"]||"",!0,!1)+' title="The port number of the SMTP server used to send emails."')+"/></div>",r=122,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=123,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-smtp-encryption">',r=123,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"SMTP encryption</label>",r=124,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<select class="form-control input-sm" id="g-core-smtp-encryption">',r=125,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="none"'+pt("selected",a["core.smtp.encryption"]==="none",!0,!1))+">",r=126,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"None</option>",r=127,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="starttls"'+pt("selected",a["core.smtp.encryption"]==="starttls",!0,!1))+">",r=128,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Use STARTTLS</option>",r=129,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<option"+(' value="ssl"'+pt("selected",a["core.smtp.encryption"]==="ssl",!0,!1))+">",r=130,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Use SSL/TLS</option></select></div>",r=131,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=132,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-smtp-username">',r=132,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"SMTP username</label>",r=133,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-smtp-username" type="text"'+pt("value",a["core.smtp.username"]||"",!0,!1)+' title="The username, if any, used to authenticate to the SMTP server used to send emails."')+"/></div>",r=136,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=137,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-smtp-password">',r=137,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"SMTP password</label>",r=138,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-smtp-password" type="password"'+pt("value",a["core.smtp.password"]||"",!0,!1)+' title="The password, if any, used to authenticate to the SMTP server used to send emails."')+"/></div></div>",r=142,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel-group" id="g-configuration-accordion">',r=143,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel panel-default">',r=144,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel-heading" data-toggle="collapse" data-parent="#g-configuration-accordion" data-target="#g-advanced-settings-tab">',r=147,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel-title">',r=148,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<a>",r=149,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<b>",r=149,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Advanced Settings</b></a></div></div>",r=150,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel-collapse collapse" id="g-advanced-settings-tab">',r=151,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="panel-body">',r=152,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<p>",r=152,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"These settings should only be changed if you are certain of what you are doing.</p>",r=153,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=154,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-server-root">',r=154,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Server root URL</label>",r=155,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-server-root" type="text"'+pt("value",a["core.server_root"]||"",!0,!1)+' placeholder="Detect automatically"')+"/></div>",r=158,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=159,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-upload-minimum-chunk-size">',r=159,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Upload minimum chunk size (bytes)</label>",r=160,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<br/>",r=161,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<span>",r=161,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"This applies to Filesystem assetstores.</span>",r=162,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-upload-minimum-chunk-size" type="text"'+pt("value",a["core.upload_minimum_chunk_size"]||"",!0,!1)+' title="For large files, the minimum size of all but the last chunk."')+"/></div>",r=165,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=166,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<label>",r=166,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Server Notification Stream</label>",r=167,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<br/>",r=168,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<span>",r=168,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Disabling this may improve server performance with many concurrent web client users.</span>",r=169,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="checkbox">',r=170,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-enable-notification-stream">',r=171,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' id="g-core-enable-notification-stream" type="checkbox"'+pt("checked",a["core.enable_notification_stream"],!0,!1))+"/>",r=173,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"Enabled</label></div></div>",r=174,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-settings-form-container">',r=175,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<h4>",r=175,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"CORS</h4>",r=176,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<p>",r=177,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"CORS (Cross-origin resource sharing) allows access from other websites.",r=178,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+`
`,r=178,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"These settings are described in",r=179,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+`
`,r=179,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"detail ",r=179,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<a href="http://girder.readthedocs.org/en/latest/security.html#cors-cross-origin-resource-sharing" target="_blank">',r=179,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"here</a>",r=179,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+".</p>",r=180,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=181,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-cors-allow-origin">',r=181,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"CORS Allowed Origins</label>",r=182,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-cors-allow-origin" type="text"'+pt("value",a["core.cors.allow_origin"]||"",!0,!1)+' title="A comma-separated list of allowed base URLs that can make cross-site requests. This may include *."')+"/></div>",r=185,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=186,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-cors-allow-methods">',r=186,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"CORS Allowed Methods</label>",r=187,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-cors-allow-methods" type="text"'+pt("value",a["core.cors.allow_methods"]||"",!0,!1)+' placeholder="Default: allow all methods" title="A comma-separated list of allowed methods"')+"/></div>",r=191,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=192,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<label for="g-core-cors-allow-headers">',r=192,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"CORS Allowed Headers</label>",r=193,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<input"+(' class="form-control input-sm" id="g-core-cors-allow-headers" type="text"'+pt("value",a["core.cors.allow_headers"]||"",!0,!1)+' title="A comma-separated list of allowed headers."')+"/></div></div></div></div></div></div>",r=196,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"<p></p>",r=197,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="form-group">',r=198,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<button class="g-submit-settings btn btn-default btn-sm">',r=198,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"",r=198,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<i class="icon-ok"></i>',r=198,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+"  Save</button></div>",r=199,t="/home/circleci/project/girder/girder/web/src/templates/body/systemConfiguration.pug",e=e+'<div class="g-validation-failed-message" id="g-settings-error-message"></div></form>'}).call(this,"JSON"in u?u.JSON:typeof JSON<"u"?JSON:void 0,"settings"in u?u.settings:typeof settings<"u"?settings:void 0)}catch(n){gw(n,t,r)}return e}/**
  * bootstrap-switch - Turn checkboxes and radio buttons into toggle switches.
  *
  * @version v3.3.5
  * @homepage https://bttstrp.github.io/bootstrap-switch
  * @author Mattia Larentis <mattia@larentis.eu> (http://larentis.eu)
  * @license MIT
  */(function(s){(function(e,i){i(vd())})(Li,function(e){var i=t(e);function t(b){return b&&b.__esModule?b:{default:b}}var r=Object.assign||function(b){for(var y=1;y<arguments.length;y++){var k=arguments[y];for(var C in k)Object.prototype.hasOwnProperty.call(k,C)&&(b[C]=k[C])}return b};function u(b,y){if(!(b instanceof y))throw new TypeError("Cannot call a class as a function")}var n=function(){function b(y,k){for(var C=0;C<k.length;C++){var D=k[C];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(y,D.key,D)}}return function(y,k,C){return k&&b(y.prototype,k),C&&b(y,C),y}}(),a=i.default||window.jQuery||window.$;function o(b,y){var k=b.state,C=b.size,D=b.disabled,T=b.readonly,S=b.indeterminate,M=b.inverse;return[k?"on":"off",C,D?"disabled":void 0,T?"readonly":void 0,S?"indeterminate":void 0,M?"inverse":void 0,y?"id-"+y:void 0].filter(function(R){return R==null})}function h(){return{state:this.$element.is(":checked"),size:this.$element.data("size"),animate:this.$element.data("animate"),disabled:this.$element.is(":disabled"),readonly:this.$element.is("[readonly]"),indeterminate:this.$element.data("indeterminate"),inverse:this.$element.data("inverse"),radioAllOff:this.$element.data("radio-all-off"),onColor:this.$element.data("on-color"),offColor:this.$element.data("off-color"),onText:this.$element.data("on-text"),offText:this.$element.data("off-text"),labelText:this.$element.data("label-text"),handleWidth:this.$element.data("handle-width"),labelWidth:this.$element.data("label-width"),baseClass:this.$element.data("base-class"),wrapperClass:this.$element.data("wrapper-class")}}function g(){var b=this,y=this.$on.add(this.$off).add(this.$label).css("width",""),k=this.options.handleWidth==="auto"?Math.round(Math.max(this.$on.width(),this.$off.width())):this.options.handleWidth;return y.width(k),this.$label.width(function(C,D){return b.options.labelWidth!=="auto"?b.options.labelWidth:D<k?k:D}),this.privateHandleWidth=this.$on.outerWidth(),this.privateLabelWidth=this.$label.outerWidth(),this.$container.width(this.privateHandleWidth*2+this.privateLabelWidth),this.$wrapper.width(this.privateHandleWidth+this.privateLabelWidth)}function l(){var b=this,y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.ope;this.$container.css("margin-left",function(){var k=[0,"-"+b.privateHandleWidth+"px"];return b.options.indeterminate?"-"+b.privateHandleWidth/2+"px":y?b.options.inverse?k[1]:k[0]:b.options.inverse?k[0]:k[1]})}function c(b){return this.options.baseClass+"-"+b}function d(){var b=this,y=function(){b.setPrevOptions(),g.call(b),l.call(b),setTimeout(function(){return b.options.animate&&b.$wrapper.addClass(c.call(b,"animate"))},50)};if(this.$wrapper.is(":visible")){y();return}var k=window.setInterval(function(){return b.$wrapper.is(":visible")&&(y()||!0)&&window.clearInterval(k)},50)}function F(){var b=this;return this.$element.on({"setPreviousOptions.bootstrapSwitch":function(){return b.setPrevOptions()},"previousState.bootstrapSwitch":function(){b.options=b.prevOptions,b.options.indeterminate&&b.$wrapper.addClass(c.call(b,"indeterminate")),b.$element.prop("checked",b.options.state).trigger("change.bootstrapSwitch",!0)},"change.bootstrapSwitch":function(k,C){k.preventDefault(),k.stopImmediatePropagation();var D=b.$element.is(":checked");l.call(b,D),D!==b.options.state&&(b.options.state=D,b.$wrapper.toggleClass(c.call(b,"off")).toggleClass(c.call(b,"on")),C||(b.$element.is(":radio")&&a('[name="'+b.$element.attr("name")+'"]').not(b.$element).prop("checked",!1).trigger("change.bootstrapSwitch",!0),b.$element.trigger("switchChange.bootstrapSwitch",[D])))},"focus.bootstrapSwitch":function(k){k.preventDefault(),b.$wrapper.addClass(c.call(b,"focused"))},"blur.bootstrapSwitch":function(k){k.preventDefault(),b.$wrapper.removeClass(c.call(b,"focused"))},"keydown.bootstrapSwitch":function(k){!k.which||b.options.disabled||b.options.readonly||(k.which===37||k.which===39)&&(k.preventDefault(),k.stopImmediatePropagation(),b.state(k.which===39))}})}function p(){var b=this;return this.$on.on("click.bootstrapSwitch",function(y){return y.preventDefault(),y.stopPropagation(),b.state(!1),b.$element.trigger("focus.bootstrapSwitch")}),this.$off.on("click.bootstrapSwitch",function(y){return y.preventDefault(),y.stopPropagation(),b.state(!0),b.$element.trigger("focus.bootstrapSwitch")})}function f(){var b=this,y=void 0,k=void 0,C={click:function(T){T.stopPropagation()},"mousedown.bootstrapSwitch touchstart.bootstrapSwitch":function(T){y||b.options.disabled||b.options.readonly||(T.preventDefault(),T.stopPropagation(),y=(T.pageX||T.originalEvent.touches[0].pageX)-parseInt(b.$container.css("margin-left"),10),b.options.animate&&b.$wrapper.removeClass(c.call(b,"animate")),b.$element.trigger("focus.bootstrapSwitch"))},"mousemove.bootstrapSwitch touchmove.bootstrapSwitch":function(T){if(y!=null){var S=(T.pageX||T.originalEvent.touches[0].pageX)-y;T.preventDefault(),!(S<-b.privateHandleWidth||S>0)&&(k=S,b.$container.css("margin-left",k+"px"))}},"mouseup.bootstrapSwitch touchend.bootstrapSwitch":function(T){if(y){if(T.preventDefault(),b.options.animate&&b.$wrapper.addClass(c.call(b,"animate")),k){var S=k>-(b.privateHandleWidth/2);k=!1,b.state(b.options.inverse?!S:S)}else b.state(!b.options.state);y=!1}},"mouseleave.bootstrapSwitch":function(){b.$label.trigger("mouseup.bootstrapSwitch")}};this.$label.on(C)}function m(){var b=this,y=this.$element.closest("label");y.on("click",function(k){k.preventDefault(),k.stopImmediatePropagation(),k.target===y[0]&&b.toggleState()})}function v(){function b(){return a(this).data("bootstrap-switch")}function y(){return a(this).bootstrapSwitch("state",this.checked)}var k=this.$element.closest("form");k.data("bootstrap-switch")||k.on("reset.bootstrapSwitch",function(){window.setTimeout(function(){k.find("input").filter(b).each(y)},1)}).data("bootstrap-switch",!0)}function w(b){var y=this;return a.isArray(b)?b.map(function(k){return c.call(y,k)}):[c.call(this,b)]}var x=function(){function b(y){var k=this,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};u(this,b),this.$element=a(y),this.options=a.extend({},a.fn.bootstrapSwitch.defaults,h.call(this),C),this.prevOptions={},this.$wrapper=a("<div>",{class:function(){return o(k.options,k.$element.attr("id")).map(function(T){return c.call(k,T)}).concat([k.options.baseClass],w.call(k,k.options.wrapperClass)).join(" ")}}),this.$container=a("<div>",{class:c.call(this,"container")}),this.$on=a("<span>",{html:this.options.onText,class:c.call(this,"handle-on")+" "+c.call(this,this.options.onColor)}),this.$off=a("<span>",{html:this.options.offText,class:c.call(this,"handle-off")+" "+c.call(this,this.options.offColor)}),this.$label=a("<span>",{html:this.options.labelText,class:c.call(this,"label")}),this.$element.on("init.bootstrapSwitch",function(){return k.options.onInit(y)}),this.$element.on("switchChange.bootstrapSwitch",function(){for(var D=arguments.length,T=Array(D),S=0;S<D;S++)T[S]=arguments[S];var M=k.options.onSwitchChange.apply(y,T);M===!1&&(k.$element.is(":radio")?a('[name="'+k.$element.attr("name")+'"]').trigger("previousState.bootstrapSwitch",!0):k.$element.trigger("previousState.bootstrapSwitch",!0))}),this.$container=this.$element.wrap(this.$container).parent(),this.$wrapper=this.$container.wrap(this.$wrapper).parent(),this.$element.before(this.options.inverse?this.$off:this.$on).before(this.$label).before(this.options.inverse?this.$on:this.$off),this.options.indeterminate&&this.$element.prop("indeterminate",!0),d.call(this),F.call(this),p.call(this),f.call(this),v.call(this),m.call(this),this.$element.trigger("init.bootstrapSwitch",this.options.state)}return n(b,[{key:"setPrevOptions",value:function(){this.prevOptions=r({},this.options)}},{key:"state",value:function(k,C){return typeof k>"u"?this.options.state:this.options.disabled||this.options.readonly||this.options.state&&!this.options.radioAllOff&&this.$element.is(":radio")?this.$element:(this.$element.is(":radio")?a('[name="'+this.$element.attr("name")+'"]').trigger("setPreviousOptions.bootstrapSwitch"):this.$element.trigger("setPreviousOptions.bootstrapSwitch"),this.options.indeterminate&&this.indeterminate(!1),this.$element.prop("checked",!!k).trigger("change.bootstrapSwitch",C),this.$element)}},{key:"toggleState",value:function(k){return this.options.disabled||this.options.readonly?this.$element:this.options.indeterminate?(this.indeterminate(!1),this.state(!0)):this.$element.prop("checked",!this.options.state).trigger("change.bootstrapSwitch",k)}},{key:"size",value:function(k){return typeof k>"u"?this.options.size:(this.options.size!=null&&this.$wrapper.removeClass(c.call(this,this.options.size)),k&&this.$wrapper.addClass(c.call(this,k)),g.call(this),l.call(this),this.options.size=k,this.$element)}},{key:"animate",value:function(k){return typeof k>"u"?this.options.animate:this.options.animate===!!k?this.$element:this.toggleAnimate()}},{key:"toggleAnimate",value:function(){return this.options.animate=!this.options.animate,this.$wrapper.toggleClass(c.call(this,"animate")),this.$element}},{key:"disabled",value:function(k){return typeof k>"u"?this.options.disabled:this.options.disabled===!!k?this.$element:this.toggleDisabled()}},{key:"toggleDisabled",value:function(){return this.options.disabled=!this.options.disabled,this.$element.prop("disabled",this.options.disabled),this.$wrapper.toggleClass(c.call(this,"disabled")),this.$element}},{key:"readonly",value:function(k){return typeof k>"u"?this.options.readonly:this.options.readonly===!!k?this.$element:this.toggleReadonly()}},{key:"toggleReadonly",value:function(){return this.options.readonly=!this.options.readonly,this.$element.prop("readonly",this.options.readonly),this.$wrapper.toggleClass(c.call(this,"readonly")),this.$element}},{key:"indeterminate",value:function(k){return typeof k>"u"?this.options.indeterminate:this.options.indeterminate===!!k?this.$element:this.toggleIndeterminate()}},{key:"toggleIndeterminate",value:function(){return this.options.indeterminate=!this.options.indeterminate,this.$element.prop("indeterminate",this.options.indeterminate),this.$wrapper.toggleClass(c.call(this,"indeterminate")),l.call(this),this.$element}},{key:"inverse",value:function(k){return typeof k>"u"?this.options.inverse:this.options.inverse===!!k?this.$element:this.toggleInverse()}},{key:"toggleInverse",value:function(){this.$wrapper.toggleClass(c.call(this,"inverse"));var k=this.$on.clone(!0),C=this.$off.clone(!0);return this.$on.replaceWith(C),this.$off.replaceWith(k),this.$on=C,this.$off=k,this.options.inverse=!this.options.inverse,this.$element}},{key:"onColor",value:function(k){return typeof k>"u"?this.options.onColor:(this.options.onColor&&this.$on.removeClass(c.call(this,this.options.onColor)),this.$on.addClass(c.call(this,k)),this.options.onColor=k,this.$element)}},{key:"offColor",value:function(k){return typeof k>"u"?this.options.offColor:(this.options.offColor&&this.$off.removeClass(c.call(this,this.options.offColor)),this.$off.addClass(c.call(this,k)),this.options.offColor=k,this.$element)}},{key:"onText",value:function(k){return typeof k>"u"?this.options.onText:(this.$on.html(k),g.call(this),l.call(this),this.options.onText=k,this.$element)}},{key:"offText",value:function(k){return typeof k>"u"?this.options.offText:(this.$off.html(k),g.call(this),l.call(this),this.options.offText=k,this.$element)}},{key:"labelText",value:function(k){return typeof k>"u"?this.options.labelText:(this.$label.html(k),g.call(this),this.options.labelText=k,this.$element)}},{key:"handleWidth",value:function(k){return typeof k>"u"?this.options.handleWidth:(this.options.handleWidth=k,g.call(this),l.call(this),this.$element)}},{key:"labelWidth",value:function(k){return typeof k>"u"?this.options.labelWidth:(this.options.labelWidth=k,g.call(this),l.call(this),this.$element)}},{key:"baseClass",value:function(){return this.options.baseClass}},{key:"wrapperClass",value:function(k){if(typeof k>"u")return this.options.wrapperClass;var C=k||a.fn.bootstrapSwitch.defaults.wrapperClass;return this.$wrapper.removeClass(w.call(this,this.options.wrapperClass).join(" ")),this.$wrapper.addClass(w.call(this,C).join(" ")),this.options.wrapperClass=C,this.$element}},{key:"radioAllOff",value:function(k){if(typeof k>"u")return this.options.radioAllOff;var C=!!k;return this.options.radioAllOff===C?this.$element:(this.options.radioAllOff=C,this.$element)}},{key:"onInit",value:function(k){return typeof k>"u"?this.options.onInit:(this.options.onInit=k||a.fn.bootstrapSwitch.defaults.onInit,this.$element)}},{key:"onSwitchChange",value:function(k){return typeof k>"u"?this.options.onSwitchChange:(this.options.onSwitchChange=k||a.fn.bootstrapSwitch.defaults.onSwitchChange,this.$element)}},{key:"destroy",value:function(){var k=this.$element.closest("form");return k.length&&k.off("reset.bootstrapSwitch").removeData("bootstrap-switch"),this.$container.children().not(this.$element).remove(),this.$element.unwrap().unwrap().off(".bootstrapSwitch").removeData("bootstrap-switch"),this.$element}}]),b}();function A(b){for(var y=arguments.length,k=Array(y>1?y-1:0),C=1;C<y;C++)k[C-1]=arguments[C];function D(T,S){var M=a(S),R=M.data("bootstrap-switch"),O=R||new x(S,b);return R||M.data("bootstrap-switch",O),typeof b=="string"?O[b].apply(O,k):T}return Array.prototype.reduce.call(this,D,this)}a.fn.bootstrapSwitch=A,a.fn.bootstrapSwitch.Constructor=x,a.fn.bootstrapSwitch.defaults={state:!0,size:null,animate:!0,disabled:!1,readonly:!1,indeterminate:!1,inverse:!1,radioAllOff:!1,onColor:"primary",offColor:"default",onText:"ON",offText:"OFF",labelText:"&nbsp",handleWidth:"auto",labelWidth:"auto",baseClass:"bootstrap-switch",wrapperClass:"wrapper",onInit:function(){},onSwitchChange:function(){}}})})();var Fw=We.extend({events:{"submit .g-settings-form":function(s){s.preventDefault(),this.$(".g-submit-settings").girderEnable(!1),this.$("#g-settings-error-message").empty(),this.$("#g-core-collection-create-policy").val(JSON.stringify(this._covertCollectionCreationPolicy()));var e=Fe.map(this.settingsKeys,i=>{const t=this.$("#g-"+i.replace(/[_.]/g,"-"));return Fe.contains(["core.api_keys","core.enable_password_login","core.enable_notification_stream"],i)?{key:i,value:t.is(":checked")}:{key:i,value:t.val()||null}});Ve({method:"PUT",url:"system/setting",data:{list:JSON.stringify(e)},error:null}).done(()=>{this.$(".g-submit-settings").girderEnable(!0),_e.trigger("g:alert",{icon:"ok",text:"Settings saved.",type:"success",timeout:4e3})}).fail(i=>{this.$(".g-submit-settings").girderEnable(!0),this.$("#g-settings-error-message").text(i.responseJSON.message)})},"click #g-core-banner-default-color":function(){this.$("#g-core-banner-color").val(this.defaults["core.banner_color"])}},initialize:function(){kr("fetch");var s=["core.api_keys","core.contact_email_address","core.brand_name","core.banner_color","core.privacy_notice","core.cookie_lifetime","core.enable_password_login","core.email_from_address","core.email_host","core.registration_policy","core.email_verification","core.server_root","core.smtp_host","core.smtp.port","core.smtp.encryption","core.smtp.username","core.smtp.password","core.upload_minimum_chunk_size","core.enable_notification_stream","core.cors.allow_origin","core.cors.allow_methods","core.cors.allow_headers","core.add_to_group_policy","core.collection_create_policy","core.user_default_folders"];this.settingsKeys=s,Ve({url:"system/setting",method:"GET",data:{list:JSON.stringify(s)}}).done(e=>{this.settings=e,this.render()})},render:function(){this.$el.html(M_({settings:this.settings,JSON:window.JSON}));var s=this.settings["core.collection_create_policy"]?this.settings["core.collection_create_policy"].open:!1;return this.$(".g-setting-switch").bootstrapSwitch().bootstrapSwitch("state",s).off("switchChange.bootstrapSwitch").on("switchChange.bootstrapSwitch",(e,i)=>{i?this._renderCollectionCreationPolicyAccessWidget():(this.accessWidget.destroy(),this.accessWidget=null)}),s&&this._renderCollectionCreationPolicyAccessWidget(),this},_renderCollectionCreationPolicyAccessWidget:function(){var s=new j_;this.accessWidget=new Xa({el:this.$(".g-collection-create-policy-container .access-widget-container"),modelType:"collection_creation_policy",model:s,parentView:this,modal:!1,hideRecurseOption:!0,hideSaveButton:!0,hidePrivacyEditor:!0,hideAccessType:!0,noAccessFlag:!0})},_covertCollectionCreationPolicy:function(){var s=null;if(this.$(".g-setting-switch").bootstrapSwitch("state")){s={open:this.$(".g-setting-switch").bootstrapSwitch("state")};var e=this.accessWidget.getAccessList();Fe.each(Fe.keys(e),i=>{s[i]=Fe.pluck(e[i],"id")})}else s=this.settings["core.collection_create_policy"],s.open=!1;return s}});function X0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ld(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function ld(s){var e=""+s,i=__.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var __=/["&<>]/;function pw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void pw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function L_(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="modal-dialog">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="modal-content">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<form class="modal-form" id="g-api-key-edit-form" role="form">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="modal-header">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<button class="close" data-dismiss="modal" aria-hidden="true" type="button">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"&times;</button>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<h4 class="modal-title">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",n?(r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Edit API key"):(r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Create new API key"),e=e+"</h4></div>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="modal-body">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="form-group">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<label class="control-label" for="g-api-key-name">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Name</label>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<input class="input-sm form-control" id="g-api-key-name" type="text" placeholder="Enter a name for this API key"/></div>',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="form-group">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<label class="control-label" for="g-api-key-token-duration">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Token duration in days (optional)</label>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<input class="input-sm form-control" id="g-api-key-token-duration" placeholder="Enter number of days"/></div>',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<label class="control-label">',r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Permission scope for this key</label>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="g-scope-selection-container">',r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="radio">',r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<label>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<input"+(' id="g-scope-mode-full" type="radio" name="scopeType" value="full"'+X0("checked",!0,!0,!1))+"/>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Allow all actions on behalf of my user</label></div>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="radio">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<label>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<input id="g-scope-mode-custom" type="radio" name="scopeType" value="custom"/>',r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Only allow specific permissions for this key:</label></div>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",function(){var o=a;if(typeof o.length=="number")for(var h=0,g=o.length;h<g;h++){var l=o[h];r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="checkbox disabled">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<label"+(' class="g-custom-scope-description"'+X0("title",l.description,!0,!1))+">",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<input"+(' class="g-custom-scope-checkbox" type="checkbox"'+X0("value",l.id,!0,!1)+X0("disabled",!0,!0,!1))+"/>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<span>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+ld((i=l.name)==null?"":i)+"</span></label></div>"}else{var g=0;for(var h in o){g++;var l=o[h];r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="checkbox disabled">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<label"+(' class="g-custom-scope-description"'+X0("title",l.description,!0,!1))+">",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<input"+(' class="g-custom-scope-checkbox" type="checkbox"'+X0("value",l.id,!0,!1)+X0("disabled",!0,!0,!1))+"/>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"<span>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+ld((i=l.name)==null?"":i)+"</span></label></div>"}}}.call(this),e=e+"</div>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="g-validation-failed-message"></div></div>',r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<div class="modal-footer">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<a class="btn btn-small btn-default" data-dismiss="modal">',r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+"Cancel</a>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<button class="g-save-api-key btn btn-small btn-primary" type="submit">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",n?(r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<i class="icon-edit"></i>',r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+" Save"):(r=42,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+'<i class="icon-plus-squared"></i>',r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/editApiKeyWidget.pug",e=e+" Create"),e=e+"</button></div></form></div></div>"}).call(this,"apiKey"in u?u.apiKey:typeof apiKey<"u"?apiKey:void 0,"tokenScopes"in u?u.tokenScopes:typeof tokenScopes<"u"?tokenScopes:void 0)}catch(n){pw(n,t,r)}return e}var fw=We.extend({events:{"submit #g-api-key-edit-form":function(s){s.preventDefault();var e={name:this.$("#g-api-key-name").val(),tokenDuration:this.$("#g-api-key-token-duration").val(),scope:null};this._getSelectedScopeMode()==="custom"&&(e.scope=Fe.map(this.$(".g-custom-scope-checkbox:checked"),function(i){return me(i).val()})),this.saveModel(this.model,e),this.$("button.g-save-api-key").girderEnable(!1),this.$(".g-validation-failed-message").text("")},"change .g-scope-selection-container .radio input":function(){var s=this._getSelectedScopeMode();s==="full"?this.$(".g-custom-scope-checkbox").girderEnable(!1).parent().parent().girderEnable(!1):s==="custom"&&this.$(".g-custom-scope-checkbox").girderEnable(!0).parent().parent().girderEnable(!0)}},initialize:function(s){this.model=s.model||null,this.scopeInfo=null,this._shouldRender=!1,Ve({url:"token/scopes"}).done(e=>{this.scopeInfo=e,this._shouldRender&&(this._shouldRender=!1,this.render())})},render:function(){if(!this.scopeInfo){this._shouldRender=!0;return}let s=this.scopeInfo.custom;it().get("admin")&&(s=s.concat(this.scopeInfo.adminCustom));var e=this.$el.html(L_({apiKey:this.model,tokenScopes:s})).girderModal(this).on("shown.bs.modal",()=>{this.$("#g-api-key-name").trigger("focus")}).on("ready.girder.modal",()=>{this.model&&(this.$("#g-api-key-name").val(this.model.get("name")),this.$("#g-api-key-token-duration").val(this.model.get("tokenDuration")||""),this.model.get("scope")&&(this.$("#g-scope-mode-custom").attr("checked","checked").trigger("change"),this.$(".g-custom-scope-checkbox").girderEnable(!0),Fe.each(this.model.get("scope"),function(i){this.$('.g-custom-scope-checkbox[value="'+i+'"]').attr("checked","checked")},this)))});return e.trigger(me.Event("ready.girder.modal",{relatedTarget:e})),this.$("#g-api-key-name").trigger("focus"),this},saveModel:function(s,e){s=s||new yh,s.set(e),s.once("g:saved",function(){this.$el.modal("hide"),this.trigger("g:saved",s)},this).off("g:error",null,this).on("g:error",function(i){this.$(".g-validation-failed-message").text(i.responseJSON.message),this.$("button.g-save-api-key").girderEnable(!0)},this).save()},_getSelectedScopeMode:function(){return this.$(".g-scope-selection-container .radio input:checked").attr("value")}});function o0(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Yi(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Yi(s){var e=""+s,i=T_.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var T_=/["&<>]/;function mw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void mw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function P_(s){var e="",i,t,r;try{var u=s||{};(function(n,a){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",n.length===0?(r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<div class="g-api-keys-empty-message">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"You have no existing API keys. Click the button below to create one.</div>"):(r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<div class="g-api-key-list-header">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Your API keys</div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<table class="g-api-key-table">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<thead>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<tr>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="name">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Name</th>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="key">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Key</th>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="scope">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Scope</th>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="active">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Active</th>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="tokenDuration">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Token duration</th>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="lastUse">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Last used</th>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<th col="actions">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Actions</th></tr></thead>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<tbody>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",function(){var o=n;if(typeof o.length=="number")for(var h=0,g=o.length;h<g;h++){var l=o[h];if(r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<tr"+(' class="g-api-key-container"'+o0("api-key-id",l.id,!0,!1)+o0("cid",l.cid,!0,!1))+">",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="name">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("name"))==null?"":i)+"</td>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="key">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<a"+(' class="g-show-api-key" data-toggle="popover"'+o0("data-content",l.get("key"),!0,!1))+">",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"show</a></td>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="scope">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("scope")?(r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Custom scopes</span>"):(r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Full access</span>"),e=e+"</td>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="active">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("active")?"Yes":"No")==null?"":i)+"</td>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="tokenDuration">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("tokenDuration")?(r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("tokenDuration"))==null?"":i),r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+" days</span>"):(r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Default</span>"),e=e+"</td>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="lastUse">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("lastUse")){r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug";var c=a(l.get("lastUse"));r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span"+o0("title",c,!0,!1)+">",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=c.fromNow())==null?"":i)+"</span>"}else r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Never</span>";e=e+"</td>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="actions">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-primary g-api-key-edit" title="Edit">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-edit"></i></button>',r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("active")?(r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-warning g-api-key-toggle-active" title="Deactivate">',r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-minus-circled"></i></button>'):(r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-success g-api-key-toggle-active" title="Activate">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-plus-circled"></i></button>'),r=45,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-danger g-api-key-delete" title="Delete key">',r=46,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-cancel"></i></button></td></tr>'}else{var g=0;for(var h in o){g++;var l=o[h];if(r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<tr"+(' class="g-api-key-container"'+o0("api-key-id",l.id,!0,!1)+o0("cid",l.cid,!0,!1))+">",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="name">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("name"))==null?"":i)+"</td>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="key">',r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<a"+(' class="g-show-api-key" data-toggle="popover"'+o0("data-content",l.get("key"),!0,!1))+">",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"show</a></td>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="scope">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("scope")?(r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Custom scopes</span>"):(r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Full access</span>"),e=e+"</td>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="active">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("active")?"Yes":"No")==null?"":i)+"</td>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="tokenDuration">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("tokenDuration")?(r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=l.get("tokenDuration"))==null?"":i),r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+" days</span>"):(r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Default</span>"),e=e+"</td>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="lastUse">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("lastUse")){r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug";var c=a(l.get("lastUse"));r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span"+o0("title",c,!0,!1)+">",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+Yi((i=c.fromNow())==null?"":i)+"</span>"}else r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"<span>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Never</span>";e=e+"</td>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<td col="actions">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-primary g-api-key-edit" title="Edit">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-edit"></i></button>',r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",l.get("active")?(r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-warning g-api-key-toggle-active" title="Deactivate">',r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-minus-circled"></i></button>'):(r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-success g-api-key-toggle-active" title="Activate">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-plus-circled"></i></button>'),r=45,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-sm btn-danger g-api-key-delete" title="Delete key">',r=46,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<i class="icon-cancel"></i></button></td></tr>'}}}.call(this),e=e+"</tbody></table>"),r=48,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<div class="g-paginate-container"></div>',r=49,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<div class="g-api-key-list-bottom-buttons">',r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+'<button class="btn btn-default g-api-key-new">',r=50,t="/home/circleci/project/girder/girder/web/src/templates/widgets/apiKeyList.pug",e=e+"Create new key</button></div>"}).call(this,"apiKeys"in u?u.apiKeys:typeof apiKeys<"u"?apiKeys:void 0,"moment"in u?u.moment:typeof moment<"u"?moment:void 0)}catch(n){mw(n,t,r)}return e}var vw=We.extend({events:{"click .g-api-key-toggle-active":function(s){var e=this._getModelFromEvent(s),i=()=>{e.once("g:setActive",function(){this.render()},this).setActive(!e.get("active"))};e.get("active")?tr({text:"Deactivating this API key will delete any existing tokens created with it, and will not be usable until it is activated again. Are you sure you want to deactivate it?",yesText:"Yes",yesClass:"btn-warning",escapedHtml:!0,confirmCallback:i}):i()},"click .g-api-key-new":function(){this._renderEditWidget()},"click .g-api-key-edit":function(s){var e=this._getModelFromEvent(s);this._renderEditWidget(e)},"click .g-api-key-delete":function(s){var e=this._getModelFromEvent(s);tr({text:"Are you sure you want to delete the API key <b>"+e.escape("name")+"</b>? Any client applications using this key will no longer be able to authenticate.",yesText:"Delete",escapedHtml:!0,confirmCallback:()=>{e.on("g:deleted",function(){_e.trigger("g:alert",{icon:"ok",text:"API key deleted.",type:"success",timeout:3e3}),this.render()},this).destroy()}})}},initialize:function(s){this.model=s.user,this.fetched=!1,this.collection=new hm,this.collection.on("g:changed",function(){this.fetched=!0,this.render(),this.trigger("g:changed")},this).fetch({userId:this.model.id}),this.paginateWidget=new Mu({collection:this.collection,parentView:this})},render:function(){if(this.fetched)return this.$el.html(P_({apiKeys:this.collection.toArray(),moment:ze})),this.$(".g-show-api-key").popover({container:this.$(".g-api-key-table"),placement:"top"}),this.paginateWidget.setElement(this.$(".g-paginate-container")).render(),this},_getModelFromEvent:function(s){var e=me(s.currentTarget).parents(".g-api-key-container").attr("cid");return this.collection.get(e)},_renderEditWidget:function(s){this.editApiKeyWidget||(this.editApiKeyWidget=new fw({el:me("#g-dialog-container"),parentView:this}).on("g:saved",function(e){this.collection.get(e.cid)||this.collection.add(e),this.render()},this)),this.editApiKeyWidget.model=s||null,this.editApiKeyWidget.render()}}),Xn={},$_=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},bw={},_0={},I_={}.toString,Qh=Array.isArray||function(s){return I_.call(s)=="[object Array]"},R_=Qh;function B_(){try{var s=new Uint8Array(1);return s.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},s.foo()===42}catch{return!1}}Ft.TYPED_ARRAY_SUPPORT=B_();var rF=Ft.TYPED_ARRAY_SUPPORT?2147483647:1073741823;function Ft(s,e,i){return!Ft.TYPED_ARRAY_SUPPORT&&!(this instanceof Ft)?new Ft(s,e,i):typeof s=="number"?ww(this,s):Y_(this,s,e,i)}Ft.TYPED_ARRAY_SUPPORT&&(Ft.prototype.__proto__=Uint8Array.prototype,Ft.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Ft[Symbol.species]===Ft&&Object.defineProperty(Ft,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}));function e2(s){if(s>=rF)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+rF.toString(16)+" bytes");return s|0}function O_(s){return s!==s}function du(s,e){var i;return Ft.TYPED_ARRAY_SUPPORT?(i=new Uint8Array(e),i.__proto__=Ft.prototype):(i=s,i===null&&(i=new Ft(e)),i.length=e),i}function ww(s,e){var i=du(s,e<0?0:e2(e)|0);if(!Ft.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)i[t]=0;return i}function N_(s,e){var i=xw(e)|0,t=du(s,i),r=t.write(e);return r!==i&&(t=t.slice(0,r)),t}function cd(s,e){for(var i=e.length<0?0:e2(e.length)|0,t=du(s,i),r=0;r<i;r+=1)t[r]=e[r]&255;return t}function W_(s,e,i,t){if(i<0||e.byteLength<i)throw new RangeError("'offset' is out of bounds");if(e.byteLength<i+(t||0))throw new RangeError("'length' is out of bounds");var r;return i===void 0&&t===void 0?r=new Uint8Array(e):t===void 0?r=new Uint8Array(e,i):r=new Uint8Array(e,i,t),Ft.TYPED_ARRAY_SUPPORT?r.__proto__=Ft.prototype:r=cd(s,r),r}function z_(s,e){if(Ft.isBuffer(e)){var i=e2(e.length)|0,t=du(s,i);return t.length===0||e.copy(t,0,0,i),t}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||O_(e.length)?du(s,0):cd(s,e);if(e.type==="Buffer"&&Array.isArray(e.data))return cd(s,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function yw(s,e){e=e||1/0;for(var i,t=s.length,r=null,u=[],n=0;n<t;++n){if(i=s.charCodeAt(n),i>55295&&i<57344){if(!r){if(i>56319){(e-=3)>-1&&u.push(239,191,189);continue}else if(n+1===t){(e-=3)>-1&&u.push(239,191,189);continue}r=i;continue}if(i<56320){(e-=3)>-1&&u.push(239,191,189),r=i;continue}i=(r-55296<<10|i-56320)+65536}else r&&(e-=3)>-1&&u.push(239,191,189);if(r=null,i<128){if((e-=1)<0)break;u.push(i)}else if(i<2048){if((e-=2)<0)break;u.push(i>>6|192,i&63|128)}else if(i<65536){if((e-=3)<0)break;u.push(i>>12|224,i>>6&63|128,i&63|128)}else if(i<1114112){if((e-=4)<0)break;u.push(i>>18|240,i>>12&63|128,i>>6&63|128,i&63|128)}else throw new Error("Invalid code point")}return u}function xw(s){if(Ft.isBuffer(s))return s.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(s)||s instanceof ArrayBuffer))return s.byteLength;typeof s!="string"&&(s=""+s);var e=s.length;return e===0?0:yw(s).length}function H_(s,e,i,t){for(var r=0;r<t&&!(r+i>=e.length||r>=s.length);++r)e[r+i]=s[r];return r}function U_(s,e,i,t){return H_(yw(e,s.length-i),s,i,t)}function Y_(s,e,i,t){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?W_(s,e,i,t):typeof e=="string"?N_(s,e):z_(s,e)}Ft.prototype.write=function(e,i,t){i===void 0?(t=this.length,i=0):t===void 0&&typeof i=="string"?(t=this.length,i=0):isFinite(i)&&(i=i|0,isFinite(t)?t=t|0:t=void 0);var r=this.length-i;if((t===void 0||t>r)&&(t=r),e.length>0&&(t<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");return U_(this,e,i,t)};Ft.prototype.slice=function(e,i){var t=this.length;e=~~e,i=i===void 0?t:~~i,e<0?(e+=t,e<0&&(e=0)):e>t&&(e=t),i<0?(i+=t,i<0&&(i=0)):i>t&&(i=t),i<e&&(i=e);var r;if(Ft.TYPED_ARRAY_SUPPORT)r=this.subarray(e,i),r.__proto__=Ft.prototype;else{var u=i-e;r=new Ft(u,void 0);for(var n=0;n<u;++n)r[n]=this[n+e]}return r};Ft.prototype.copy=function(e,i,t,r){if(t||(t=0),!r&&r!==0&&(r=this.length),i>=e.length&&(i=e.length),i||(i=0),r>0&&r<t&&(r=t),r===t||e.length===0||this.length===0)return 0;if(i<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-i<r-t&&(r=e.length-i+t);var u=r-t,n;if(this===e&&t<i&&i<r)for(n=u-1;n>=0;--n)e[n+i]=this[n+t];else if(u<1e3||!Ft.TYPED_ARRAY_SUPPORT)for(n=0;n<u;++n)e[n+i]=this[n+t];else Uint8Array.prototype.set.call(e,this.subarray(t,t+u),i);return u};Ft.prototype.fill=function(e,i,t){if(typeof e=="string"){if(typeof i=="string"?(i=0,t=this.length):typeof t=="string"&&(t=this.length),e.length===1){var r=e.charCodeAt(0);r<256&&(e=r)}}else typeof e=="number"&&(e=e&255);if(i<0||this.length<i||this.length<t)throw new RangeError("Out of range index");if(t<=i)return this;i=i>>>0,t=t===void 0?this.length:t>>>0,e||(e=0);var u;if(typeof e=="number")for(u=i;u<t;++u)this[u]=e;else{var n=Ft.isBuffer(e)?e:new Ft(e),a=n.length;for(u=0;u<t-i;++u)this[u+i]=n[u%a]}return this};Ft.concat=function(e,i){if(!R_(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return du(null,0);var t;if(i===void 0)for(i=0,t=0;t<e.length;++t)i+=e[t].length;var r=ww(null,i),u=0;for(t=0;t<e.length;++t){var n=e[t];if(!Ft.isBuffer(n))throw new TypeError('"list" argument must be an Array of Buffers');n.copy(r,u),u+=n.length}return r};Ft.byteLength=xw;Ft.prototype._isBuffer=!0;Ft.isBuffer=function(e){return!!(e!=null&&e._isBuffer)};_0.alloc=function(s){var e=new Ft(s);return e.fill(0),e};_0.from=function(s){return new Ft(s)};var qr={},t2,V_=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];qr.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};qr.getSymbolTotalCodewords=function(e){return V_[e]};qr.getBCHDigit=function(s){for(var e=0;s!==0;)e++,s>>>=1;return e};qr.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');t2=e};qr.isKanjiModeEnabled=function(){return typeof t2<"u"};qr.toSJIS=function(e){return t2(e)};var el={};(function(s){s.L={bit:1},s.M={bit:0},s.Q={bit:3},s.H={bit:2};function e(i){if(typeof i!="string")throw new Error("Param is not a string");var t=i.toLowerCase();switch(t){case"l":case"low":return s.L;case"m":case"medium":return s.M;case"q":case"quartile":return s.Q;case"h":case"high":return s.H;default:throw new Error("Unknown EC Level: "+i)}}s.isValid=function(t){return t&&typeof t.bit<"u"&&t.bit>=0&&t.bit<4},s.from=function(t,r){if(s.isValid(t))return t;try{return e(t)}catch{return r}}})(el);function Cw(){this.buffer=[],this.length=0}Cw.prototype={get:function(s){var e=Math.floor(s/8);return(this.buffer[e]>>>7-s%8&1)===1},put:function(s,e){for(var i=0;i<e;i++)this.putBit((s>>>e-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(s){var e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),s&&(this.buffer[e]|=128>>>this.length%8),this.length++}};var X_=Cw,iF=_0;function Gn(s){if(!s||s<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=s,this.data=iF.alloc(s*s),this.reservedBit=iF.alloc(s*s)}Gn.prototype.set=function(s,e,i,t){var r=s*this.size+e;this.data[r]=i,t&&(this.reservedBit[r]=!0)};Gn.prototype.get=function(s,e){return this.data[s*this.size+e]};Gn.prototype.xor=function(s,e,i){this.data[s*this.size+e]^=i};Gn.prototype.isReserved=function(s,e){return this.reservedBit[s*this.size+e]};var G_=Gn,Ew={};(function(s){var e=qr.getSymbolSize;s.getRowColCoords=function(t){if(t===1)return[];for(var r=Math.floor(t/7)+2,u=e(t),n=u===145?26:Math.ceil((u-13)/(2*r-2))*2,a=[u-7],o=1;o<r-1;o++)a[o]=a[o-1]-n;return a.push(6),a.reverse()},s.getPositions=function(t){for(var r=[],u=s.getRowColCoords(t),n=u.length,a=0;a<n;a++)for(var o=0;o<n;o++)a===0&&o===0||a===0&&o===n-1||a===n-1&&o===0||r.push([u[a],u[o]]);return r}})(Ew);var Aw={},q_=qr.getSymbolSize,sF=7;Aw.getPositions=function(e){var i=q_(e);return[[0,0],[i-sF,0],[0,i-sF]]};var kw={};(function(s){s.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var e={N1:3,N2:3,N3:40,N4:10};s.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},s.from=function(r){return s.isValid(r)?parseInt(r,10):void 0},s.getPenaltyN1=function(r){for(var u=r.size,n=0,a=0,o=0,h=null,g=null,l=0;l<u;l++){a=o=0,h=g=null;for(var c=0;c<u;c++){var d=r.get(l,c);d===h?a++:(a>=5&&(n+=e.N1+(a-5)),h=d,a=1),d=r.get(c,l),d===g?o++:(o>=5&&(n+=e.N1+(o-5)),g=d,o=1)}a>=5&&(n+=e.N1+(a-5)),o>=5&&(n+=e.N1+(o-5))}return n},s.getPenaltyN2=function(r){for(var u=r.size,n=0,a=0;a<u-1;a++)for(var o=0;o<u-1;o++){var h=r.get(a,o)+r.get(a,o+1)+r.get(a+1,o)+r.get(a+1,o+1);(h===4||h===0)&&n++}return n*e.N2},s.getPenaltyN3=function(r){for(var u=r.size,n=0,a=0,o=0,h=0;h<u;h++){a=o=0;for(var g=0;g<u;g++)a=a<<1&2047|r.get(h,g),g>=10&&(a===1488||a===93)&&n++,o=o<<1&2047|r.get(g,h),g>=10&&(o===1488||o===93)&&n++}return n*e.N3},s.getPenaltyN4=function(r){for(var u=0,n=r.data.length,a=0;a<n;a++)u+=r.data[a];var o=Math.abs(Math.ceil(u*100/n/5)-10);return o*e.N4};function i(t,r,u){switch(t){case s.Patterns.PATTERN000:return(r+u)%2===0;case s.Patterns.PATTERN001:return r%2===0;case s.Patterns.PATTERN010:return u%3===0;case s.Patterns.PATTERN011:return(r+u)%3===0;case s.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(u/3))%2===0;case s.Patterns.PATTERN101:return r*u%2+r*u%3===0;case s.Patterns.PATTERN110:return(r*u%2+r*u%3)%2===0;case s.Patterns.PATTERN111:return(r*u%3+(r+u)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}s.applyMask=function(r,u){for(var n=u.size,a=0;a<n;a++)for(var o=0;o<n;o++)u.isReserved(o,a)||u.xor(o,a,i(r,o,a))},s.getBestMask=function(r,u){for(var n=Object.keys(s.Patterns).length,a=0,o=1/0,h=0;h<n;h++){u(h),s.applyMask(h,r);var g=s.getPenaltyN1(r)+s.getPenaltyN2(r)+s.getPenaltyN3(r)+s.getPenaltyN4(r);s.applyMask(h,r),g<o&&(o=g,a=h)}return a}})(kw);var tl={},p0=el,ko=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],So=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];tl.getBlocksCount=function(e,i){switch(i){case p0.L:return ko[(e-1)*4+0];case p0.M:return ko[(e-1)*4+1];case p0.Q:return ko[(e-1)*4+2];case p0.H:return ko[(e-1)*4+3];default:return}};tl.getTotalCodewordsCount=function(e,i){switch(i){case p0.L:return So[(e-1)*4+0];case p0.M:return So[(e-1)*4+1];case p0.Q:return So[(e-1)*4+2];case p0.H:return So[(e-1)*4+3];default:return}};var Sw={},rl={},jw=_0,gn=jw.alloc(512),la=jw.alloc(256);(function(){for(var e=1,i=0;i<255;i++)gn[i]=e,la[e]=i,e<<=1,e&256&&(e^=285);for(i=255;i<512;i++)gn[i]=gn[i-255]})();rl.log=function(e){if(e<1)throw new Error("log("+e+")");return la[e]};rl.exp=function(e){return gn[e]};rl.mul=function(e,i){return e===0||i===0?0:gn[la[e]+la[i]]};(function(s){var e=_0,i=rl;s.mul=function(r,u){for(var n=e.alloc(r.length+u.length-1),a=0;a<r.length;a++)for(var o=0;o<u.length;o++)n[a+o]^=i.mul(r[a],u[o]);return n},s.mod=function(r,u){for(var n=e.from(r);n.length-u.length>=0;){for(var a=n[0],o=0;o<u.length;o++)n[o]^=i.mul(u[o],a);for(var h=0;h<n.length&&n[h]===0;)h++;n=n.slice(h)}return n},s.generateECPolynomial=function(r){for(var u=e.from([1]),n=0;n<r;n++)u=s.mul(u,[1,i.exp(n)]);return u}})(Sw);var Dw={},il={};il.byteLength=Z_;il.toByteArray=eL;il.fromByteArray=iL;var _i=[],ti=[],K_=typeof Uint8Array<"u"?Uint8Array:Array,dc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ys=0,J_=dc.length;Ys<J_;++Ys)_i[Ys]=dc[Ys],ti[dc.charCodeAt(Ys)]=Ys;ti["-".charCodeAt(0)]=62;ti["_".charCodeAt(0)]=63;function Mw(s){var e=s.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=s.indexOf("=");i===-1&&(i=e);var t=i===e?0:4-i%4;return[i,t]}function Z_(s){var e=Mw(s),i=e[0],t=e[1];return(i+t)*3/4-t}function Q_(s,e,i){return(e+i)*3/4-i}function eL(s){var e,i=Mw(s),t=i[0],r=i[1],u=new K_(Q_(s,t,r)),n=0,a=r>0?t-4:t,o;for(o=0;o<a;o+=4)e=ti[s.charCodeAt(o)]<<18|ti[s.charCodeAt(o+1)]<<12|ti[s.charCodeAt(o+2)]<<6|ti[s.charCodeAt(o+3)],u[n++]=e>>16&255,u[n++]=e>>8&255,u[n++]=e&255;return r===2&&(e=ti[s.charCodeAt(o)]<<2|ti[s.charCodeAt(o+1)]>>4,u[n++]=e&255),r===1&&(e=ti[s.charCodeAt(o)]<<10|ti[s.charCodeAt(o+1)]<<4|ti[s.charCodeAt(o+2)]>>2,u[n++]=e>>8&255,u[n++]=e&255),u}function tL(s){return _i[s>>18&63]+_i[s>>12&63]+_i[s>>6&63]+_i[s&63]}function rL(s,e,i){for(var t,r=[],u=e;u<i;u+=3)t=(s[u]<<16&16711680)+(s[u+1]<<8&65280)+(s[u+2]&255),r.push(tL(t));return r.join("")}function iL(s){for(var e,i=s.length,t=i%3,r=[],u=16383,n=0,a=i-t;n<a;n+=u)r.push(rL(s,n,n+u>a?a:n+u));return t===1?(e=s[i-1],r.push(_i[e>>2]+_i[e<<4&63]+"==")):t===2&&(e=(s[i-2]<<8)+s[i-1],r.push(_i[e>>10]+_i[e>>4&63]+_i[e<<2&63]+"=")),r.join("")}var r2={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */r2.read=function(s,e,i,t,r){var u,n,a=r*8-t-1,o=(1<<a)-1,h=o>>1,g=-7,l=i?r-1:0,c=i?-1:1,d=s[e+l];for(l+=c,u=d&(1<<-g)-1,d>>=-g,g+=a;g>0;u=u*256+s[e+l],l+=c,g-=8);for(n=u&(1<<-g)-1,u>>=-g,g+=t;g>0;n=n*256+s[e+l],l+=c,g-=8);if(u===0)u=1-h;else{if(u===o)return n?NaN:(d?-1:1)*(1/0);n=n+Math.pow(2,t),u=u-h}return(d?-1:1)*n*Math.pow(2,u-t)};r2.write=function(s,e,i,t,r,u){var n,a,o,h=u*8-r-1,g=(1<<h)-1,l=g>>1,c=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=t?0:u-1,F=t?1:-1,p=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,n=g):(n=Math.floor(Math.log(e)/Math.LN2),e*(o=Math.pow(2,-n))<1&&(n--,o*=2),n+l>=1?e+=c/o:e+=c*Math.pow(2,1-l),e*o>=2&&(n++,o/=2),n+l>=g?(a=0,n=g):n+l>=1?(a=(e*o-1)*Math.pow(2,r),n=n+l):(a=e*Math.pow(2,l-1)*Math.pow(2,r),n=0));r>=8;s[i+d]=a&255,d+=F,a/=256,r-=8);for(n=n<<r|a,h+=r;h>0;s[i+d]=n&255,d+=F,n/=256,h-=8);s[i+d-F]|=p*128};/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */(function(s){var e=il,i=r2,t=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;s.Buffer=a,s.SlowBuffer=v,s.INSPECT_MAX_BYTES=50;var r=2147483647;s.kMaxLength=r,a.TYPED_ARRAY_SUPPORT=u(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function u(){try{var $=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf($,P),$.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function n($){if($>r)throw new RangeError('The value "'+$+'" is invalid for option "size"');var P=new Uint8Array($);return Object.setPrototypeOf(P,a.prototype),P}function a($,P,B){if(typeof $=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return l($)}return o($,P,B)}a.poolSize=8192;function o($,P,B){if(typeof $=="string")return c($,P);if(ArrayBuffer.isView($))return F($);if($==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(Ee($,ArrayBuffer)||$&&Ee($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ee($,SharedArrayBuffer)||$&&Ee($.buffer,SharedArrayBuffer)))return p($,P,B);if(typeof $=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var X=$.valueOf&&$.valueOf();if(X!=null&&X!==$)return a.from(X,P,B);var oe=f($);if(oe)return oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof $[Symbol.toPrimitive]=="function")return a.from($[Symbol.toPrimitive]("string"),P,B);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}a.from=function($,P,B){return o($,P,B)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h($){if(typeof $!="number")throw new TypeError('"size" argument must be of type number');if($<0)throw new RangeError('The value "'+$+'" is invalid for option "size"')}function g($,P,B){return h($),$<=0?n($):P!==void 0?typeof B=="string"?n($).fill(P,B):n($).fill(P):n($)}a.alloc=function($,P,B){return g($,P,B)};function l($){return h($),n($<0?0:m($)|0)}a.allocUnsafe=function($){return l($)},a.allocUnsafeSlow=function($){return l($)};function c($,P){if((typeof P!="string"||P==="")&&(P="utf8"),!a.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var B=w($,P)|0,X=n(B),oe=X.write($,P);return oe!==B&&(X=X.slice(0,oe)),X}function d($){for(var P=$.length<0?0:m($.length)|0,B=n(P),X=0;X<P;X+=1)B[X]=$[X]&255;return B}function F($){if(Ee($,Uint8Array)){var P=new Uint8Array($);return p(P.buffer,P.byteOffset,P.byteLength)}return d($)}function p($,P,B){if(P<0||$.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if($.byteLength<P+(B||0))throw new RangeError('"length" is outside of buffer bounds');var X;return P===void 0&&B===void 0?X=new Uint8Array($):B===void 0?X=new Uint8Array($,P):X=new Uint8Array($,P,B),Object.setPrototypeOf(X,a.prototype),X}function f($){if(a.isBuffer($)){var P=m($.length)|0,B=n(P);return B.length===0||$.copy(B,0,0,P),B}if($.length!==void 0)return typeof $.length!="number"||W($.length)?n(0):d($);if($.type==="Buffer"&&Array.isArray($.data))return d($.data)}function m($){if($>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return $|0}function v($){return+$!=$&&($=0),a.alloc(+$)}a.isBuffer=function(P){return P!=null&&P._isBuffer===!0&&P!==a.prototype},a.compare=function(P,B){if(Ee(P,Uint8Array)&&(P=a.from(P,P.offset,P.byteLength)),Ee(B,Uint8Array)&&(B=a.from(B,B.offset,B.byteLength)),!a.isBuffer(P)||!a.isBuffer(B))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===B)return 0;for(var X=P.length,oe=B.length,we=0,ye=Math.min(X,oe);we<ye;++we)if(P[we]!==B[we]){X=P[we],oe=B[we];break}return X<oe?-1:oe<X?1:0},a.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(P,B){if(!Array.isArray(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return a.alloc(0);var X;if(B===void 0)for(B=0,X=0;X<P.length;++X)B+=P[X].length;var oe=a.allocUnsafe(B),we=0;for(X=0;X<P.length;++X){var ye=P[X];if(Ee(ye,Uint8Array))we+ye.length>oe.length?a.from(ye).copy(oe,we):Uint8Array.prototype.set.call(oe,ye,we);else if(a.isBuffer(ye))ye.copy(oe,we);else throw new TypeError('"list" argument must be an Array of Buffers');we+=ye.length}return oe};function w($,P){if(a.isBuffer($))return $.length;if(ArrayBuffer.isView($)||Ee($,ArrayBuffer))return $.byteLength;if(typeof $!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);var B=$.length,X=arguments.length>2&&arguments[2]===!0;if(!X&&B===0)return 0;for(var oe=!1;;)switch(P){case"ascii":case"latin1":case"binary":return B;case"utf8":case"utf-8":return re($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B*2;case"hex":return B>>>1;case"base64":return ce($).length;default:if(oe)return X?-1:re($).length;P=(""+P).toLowerCase(),oe=!0}}a.byteLength=w;function x($,P,B){var X=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((B===void 0||B>this.length)&&(B=this.length),B<=0)||(B>>>=0,P>>>=0,B<=P))return"";for($||($="utf8");;)switch($){case"hex":return Z(this,P,B);case"utf8":case"utf-8":return R(this,P,B);case"ascii":return Y(this,P,B);case"latin1":case"binary":return J(this,P,B);case"base64":return M(this,P,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te(this,P,B);default:if(X)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),X=!0}}a.prototype._isBuffer=!0;function A($,P,B){var X=$[P];$[P]=$[B],$[B]=X}a.prototype.swap16=function(){var P=this.length;if(P%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;B<P;B+=2)A(this,B,B+1);return this},a.prototype.swap32=function(){var P=this.length;if(P%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var B=0;B<P;B+=4)A(this,B,B+3),A(this,B+1,B+2);return this},a.prototype.swap64=function(){var P=this.length;if(P%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var B=0;B<P;B+=8)A(this,B,B+7),A(this,B+1,B+6),A(this,B+2,B+5),A(this,B+3,B+4);return this},a.prototype.toString=function(){var P=this.length;return P===0?"":arguments.length===0?R(this,0,P):x.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(P){if(!a.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P?!0:a.compare(this,P)===0},a.prototype.inspect=function(){var P="",B=s.INSPECT_MAX_BYTES;return P=this.toString("hex",0,B).replace(/(.{2})/g,"$1 ").trim(),this.length>B&&(P+=" ... "),"<Buffer "+P+">"},t&&(a.prototype[t]=a.prototype.inspect),a.prototype.compare=function(P,B,X,oe,we){if(Ee(P,Uint8Array)&&(P=a.from(P,P.offset,P.byteLength)),!a.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(B===void 0&&(B=0),X===void 0&&(X=P?P.length:0),oe===void 0&&(oe=0),we===void 0&&(we=this.length),B<0||X>P.length||oe<0||we>this.length)throw new RangeError("out of range index");if(oe>=we&&B>=X)return 0;if(oe>=we)return-1;if(B>=X)return 1;if(B>>>=0,X>>>=0,oe>>>=0,we>>>=0,this===P)return 0;for(var ye=we-oe,Te=X-B,Ye=Math.min(ye,Te),Re=this.slice(oe,we),st=P.slice(B,X),lt=0;lt<Ye;++lt)if(Re[lt]!==st[lt]){ye=Re[lt],Te=st[lt];break}return ye<Te?-1:Te<ye?1:0};function b($,P,B,X,oe){if($.length===0)return-1;if(typeof B=="string"?(X=B,B=0):B>2147483647?B=2147483647:B<-2147483648&&(B=-2147483648),B=+B,W(B)&&(B=oe?0:$.length-1),B<0&&(B=$.length+B),B>=$.length){if(oe)return-1;B=$.length-1}else if(B<0)if(oe)B=0;else return-1;if(typeof P=="string"&&(P=a.from(P,X)),a.isBuffer(P))return P.length===0?-1:y($,P,B,X,oe);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?oe?Uint8Array.prototype.indexOf.call($,P,B):Uint8Array.prototype.lastIndexOf.call($,P,B):y($,[P],B,X,oe);throw new TypeError("val must be string, number or Buffer")}function y($,P,B,X,oe){var we=1,ye=$.length,Te=P.length;if(X!==void 0&&(X=String(X).toLowerCase(),X==="ucs2"||X==="ucs-2"||X==="utf16le"||X==="utf-16le")){if($.length<2||P.length<2)return-1;we=2,ye/=2,Te/=2,B/=2}function Ye(At,Nt){return we===1?At[Nt]:At.readUInt16BE(Nt*we)}var Re;if(oe){var st=-1;for(Re=B;Re<ye;Re++)if(Ye($,Re)===Ye(P,st===-1?0:Re-st)){if(st===-1&&(st=Re),Re-st+1===Te)return st*we}else st!==-1&&(Re-=Re-st),st=-1}else for(B+Te>ye&&(B=ye-Te),Re=B;Re>=0;Re--){for(var lt=!0,qt=0;qt<Te;qt++)if(Ye($,Re+qt)!==Ye(P,qt)){lt=!1;break}if(lt)return Re}return-1}a.prototype.includes=function(P,B,X){return this.indexOf(P,B,X)!==-1},a.prototype.indexOf=function(P,B,X){return b(this,P,B,X,!0)},a.prototype.lastIndexOf=function(P,B,X){return b(this,P,B,X,!1)};function k($,P,B,X){B=Number(B)||0;var oe=$.length-B;X?(X=Number(X),X>oe&&(X=oe)):X=oe;var we=P.length;X>we/2&&(X=we/2);for(var ye=0;ye<X;++ye){var Te=parseInt(P.substr(ye*2,2),16);if(W(Te))return ye;$[B+ye]=Te}return ye}function C($,P,B,X){return xe(re(P,$.length-B),$,B,X)}function D($,P,B,X){return xe(ae(P),$,B,X)}function T($,P,B,X){return xe(ce(P),$,B,X)}function S($,P,B,X){return xe(ee(P,$.length-B),$,B,X)}a.prototype.write=function(P,B,X,oe){if(B===void 0)oe="utf8",X=this.length,B=0;else if(X===void 0&&typeof B=="string")oe=B,X=this.length,B=0;else if(isFinite(B))B=B>>>0,isFinite(X)?(X=X>>>0,oe===void 0&&(oe="utf8")):(oe=X,X=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var we=this.length-B;if((X===void 0||X>we)&&(X=we),P.length>0&&(X<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");for(var ye=!1;;)switch(oe){case"hex":return k(this,P,B,X);case"utf8":case"utf-8":return C(this,P,B,X);case"ascii":case"latin1":case"binary":return D(this,P,B,X);case"base64":return T(this,P,B,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,P,B,X);default:if(ye)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),ye=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M($,P,B){return P===0&&B===$.length?e.fromByteArray($):e.fromByteArray($.slice(P,B))}function R($,P,B){B=Math.min($.length,B);for(var X=[],oe=P;oe<B;){var we=$[oe],ye=null,Te=we>239?4:we>223?3:we>191?2:1;if(oe+Te<=B){var Ye,Re,st,lt;switch(Te){case 1:we<128&&(ye=we);break;case 2:Ye=$[oe+1],(Ye&192)===128&&(lt=(we&31)<<6|Ye&63,lt>127&&(ye=lt));break;case 3:Ye=$[oe+1],Re=$[oe+2],(Ye&192)===128&&(Re&192)===128&&(lt=(we&15)<<12|(Ye&63)<<6|Re&63,lt>2047&&(lt<55296||lt>57343)&&(ye=lt));break;case 4:Ye=$[oe+1],Re=$[oe+2],st=$[oe+3],(Ye&192)===128&&(Re&192)===128&&(st&192)===128&&(lt=(we&15)<<18|(Ye&63)<<12|(Re&63)<<6|st&63,lt>65535&&lt<1114112&&(ye=lt))}}ye===null?(ye=65533,Te=1):ye>65535&&(ye-=65536,X.push(ye>>>10&1023|55296),ye=56320|ye&1023),X.push(ye),oe+=Te}return H(X)}var O=4096;function H($){var P=$.length;if(P<=O)return String.fromCharCode.apply(String,$);for(var B="",X=0;X<P;)B+=String.fromCharCode.apply(String,$.slice(X,X+=O));return B}function Y($,P,B){var X="";B=Math.min($.length,B);for(var oe=P;oe<B;++oe)X+=String.fromCharCode($[oe]&127);return X}function J($,P,B){var X="";B=Math.min($.length,B);for(var oe=P;oe<B;++oe)X+=String.fromCharCode($[oe]);return X}function Z($,P,B){var X=$.length;(!P||P<0)&&(P=0),(!B||B<0||B>X)&&(B=X);for(var oe="",we=P;we<B;++we)oe+=z[$[we]];return oe}function te($,P,B){for(var X=$.slice(P,B),oe="",we=0;we<X.length-1;we+=2)oe+=String.fromCharCode(X[we]+X[we+1]*256);return oe}a.prototype.slice=function(P,B){var X=this.length;P=~~P,B=B===void 0?X:~~B,P<0?(P+=X,P<0&&(P=0)):P>X&&(P=X),B<0?(B+=X,B<0&&(B=0)):B>X&&(B=X),B<P&&(B=P);var oe=this.subarray(P,B);return Object.setPrototypeOf(oe,a.prototype),oe};function ie($,P,B){if($%1!==0||$<0)throw new RangeError("offset is not uint");if($+P>B)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(P,B,X){P=P>>>0,B=B>>>0,X||ie(P,B,this.length);for(var oe=this[P],we=1,ye=0;++ye<B&&(we*=256);)oe+=this[P+ye]*we;return oe},a.prototype.readUintBE=a.prototype.readUIntBE=function(P,B,X){P=P>>>0,B=B>>>0,X||ie(P,B,this.length);for(var oe=this[P+--B],we=1;B>0&&(we*=256);)oe+=this[P+--B]*we;return oe},a.prototype.readUint8=a.prototype.readUInt8=function(P,B){return P=P>>>0,B||ie(P,1,this.length),this[P]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(P,B){return P=P>>>0,B||ie(P,2,this.length),this[P]|this[P+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(P,B){return P=P>>>0,B||ie(P,2,this.length),this[P]<<8|this[P+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+this[P+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),this[P]*16777216+(this[P+1]<<16|this[P+2]<<8|this[P+3])},a.prototype.readIntLE=function(P,B,X){P=P>>>0,B=B>>>0,X||ie(P,B,this.length);for(var oe=this[P],we=1,ye=0;++ye<B&&(we*=256);)oe+=this[P+ye]*we;return we*=128,oe>=we&&(oe-=Math.pow(2,8*B)),oe},a.prototype.readIntBE=function(P,B,X){P=P>>>0,B=B>>>0,X||ie(P,B,this.length);for(var oe=B,we=1,ye=this[P+--oe];oe>0&&(we*=256);)ye+=this[P+--oe]*we;return we*=128,ye>=we&&(ye-=Math.pow(2,8*B)),ye},a.prototype.readInt8=function(P,B){return P=P>>>0,B||ie(P,1,this.length),this[P]&128?(255-this[P]+1)*-1:this[P]},a.prototype.readInt16LE=function(P,B){P=P>>>0,B||ie(P,2,this.length);var X=this[P]|this[P+1]<<8;return X&32768?X|4294901760:X},a.prototype.readInt16BE=function(P,B){P=P>>>0,B||ie(P,2,this.length);var X=this[P+1]|this[P]<<8;return X&32768?X|4294901760:X},a.prototype.readInt32LE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},a.prototype.readInt32BE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},a.prototype.readFloatLE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),i.read(this,P,!0,23,4)},a.prototype.readFloatBE=function(P,B){return P=P>>>0,B||ie(P,4,this.length),i.read(this,P,!1,23,4)},a.prototype.readDoubleLE=function(P,B){return P=P>>>0,B||ie(P,8,this.length),i.read(this,P,!0,52,8)},a.prototype.readDoubleBE=function(P,B){return P=P>>>0,B||ie(P,8,this.length),i.read(this,P,!1,52,8)};function se($,P,B,X,oe,we){if(!a.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>oe||P<we)throw new RangeError('"value" argument is out of bounds');if(B+X>$.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(P,B,X,oe){if(P=+P,B=B>>>0,X=X>>>0,!oe){var we=Math.pow(2,8*X)-1;se(this,P,B,X,we,0)}var ye=1,Te=0;for(this[B]=P&255;++Te<X&&(ye*=256);)this[B+Te]=P/ye&255;return B+X},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(P,B,X,oe){if(P=+P,B=B>>>0,X=X>>>0,!oe){var we=Math.pow(2,8*X)-1;se(this,P,B,X,we,0)}var ye=X-1,Te=1;for(this[B+ye]=P&255;--ye>=0&&(Te*=256);)this[B+ye]=P/Te&255;return B+X},a.prototype.writeUint8=a.prototype.writeUInt8=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,1,255,0),this[B]=P&255,B+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,2,65535,0),this[B]=P&255,this[B+1]=P>>>8,B+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,2,65535,0),this[B]=P>>>8,this[B+1]=P&255,B+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,4,4294967295,0),this[B+3]=P>>>24,this[B+2]=P>>>16,this[B+1]=P>>>8,this[B]=P&255,B+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,4,4294967295,0),this[B]=P>>>24,this[B+1]=P>>>16,this[B+2]=P>>>8,this[B+3]=P&255,B+4},a.prototype.writeIntLE=function(P,B,X,oe){if(P=+P,B=B>>>0,!oe){var we=Math.pow(2,8*X-1);se(this,P,B,X,we-1,-we)}var ye=0,Te=1,Ye=0;for(this[B]=P&255;++ye<X&&(Te*=256);)P<0&&Ye===0&&this[B+ye-1]!==0&&(Ye=1),this[B+ye]=(P/Te>>0)-Ye&255;return B+X},a.prototype.writeIntBE=function(P,B,X,oe){if(P=+P,B=B>>>0,!oe){var we=Math.pow(2,8*X-1);se(this,P,B,X,we-1,-we)}var ye=X-1,Te=1,Ye=0;for(this[B+ye]=P&255;--ye>=0&&(Te*=256);)P<0&&Ye===0&&this[B+ye+1]!==0&&(Ye=1),this[B+ye]=(P/Te>>0)-Ye&255;return B+X},a.prototype.writeInt8=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,1,127,-128),P<0&&(P=255+P+1),this[B]=P&255,B+1},a.prototype.writeInt16LE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,2,32767,-32768),this[B]=P&255,this[B+1]=P>>>8,B+2},a.prototype.writeInt16BE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,2,32767,-32768),this[B]=P>>>8,this[B+1]=P&255,B+2},a.prototype.writeInt32LE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,4,2147483647,-2147483648),this[B]=P&255,this[B+1]=P>>>8,this[B+2]=P>>>16,this[B+3]=P>>>24,B+4},a.prototype.writeInt32BE=function(P,B,X){return P=+P,B=B>>>0,X||se(this,P,B,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[B]=P>>>24,this[B+1]=P>>>16,this[B+2]=P>>>8,this[B+3]=P&255,B+4};function ue($,P,B,X,oe,we){if(B+X>$.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("Index out of range")}function ne($,P,B,X,oe){return P=+P,B=B>>>0,oe||ue($,P,B,4),i.write($,P,B,X,23,4),B+4}a.prototype.writeFloatLE=function(P,B,X){return ne(this,P,B,!0,X)},a.prototype.writeFloatBE=function(P,B,X){return ne(this,P,B,!1,X)};function G($,P,B,X,oe){return P=+P,B=B>>>0,oe||ue($,P,B,8),i.write($,P,B,X,52,8),B+8}a.prototype.writeDoubleLE=function(P,B,X){return G(this,P,B,!0,X)},a.prototype.writeDoubleBE=function(P,B,X){return G(this,P,B,!1,X)},a.prototype.copy=function(P,B,X,oe){if(!a.isBuffer(P))throw new TypeError("argument should be a Buffer");if(X||(X=0),!oe&&oe!==0&&(oe=this.length),B>=P.length&&(B=P.length),B||(B=0),oe>0&&oe<X&&(oe=X),oe===X||P.length===0||this.length===0)return 0;if(B<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),P.length-B<oe-X&&(oe=P.length-B+X);var we=oe-X;return this===P&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(B,X,oe):Uint8Array.prototype.set.call(P,this.subarray(X,oe),B),we},a.prototype.fill=function(P,B,X,oe){if(typeof P=="string"){if(typeof B=="string"?(oe=B,B=0,X=this.length):typeof X=="string"&&(oe=X,X=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!a.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(P.length===1){var we=P.charCodeAt(0);(oe==="utf8"&&we<128||oe==="latin1")&&(P=we)}}else typeof P=="number"?P=P&255:typeof P=="boolean"&&(P=Number(P));if(B<0||this.length<B||this.length<X)throw new RangeError("Out of range index");if(X<=B)return this;B=B>>>0,X=X===void 0?this.length:X>>>0,P||(P=0);var ye;if(typeof P=="number")for(ye=B;ye<X;++ye)this[ye]=P;else{var Te=a.isBuffer(P)?P:a.from(P,oe),Ye=Te.length;if(Ye===0)throw new TypeError('The value "'+P+'" is invalid for argument "value"');for(ye=0;ye<X-B;++ye)this[ye+B]=Te[ye%Ye]}return this};var K=/[^+/0-9A-Za-z-_]/g;function le($){if($=$.split("=")[0],$=$.trim().replace(K,""),$.length<2)return"";for(;$.length%4!==0;)$=$+"=";return $}function re($,P){P=P||1/0;for(var B,X=$.length,oe=null,we=[],ye=0;ye<X;++ye){if(B=$.charCodeAt(ye),B>55295&&B<57344){if(!oe){if(B>56319){(P-=3)>-1&&we.push(239,191,189);continue}else if(ye+1===X){(P-=3)>-1&&we.push(239,191,189);continue}oe=B;continue}if(B<56320){(P-=3)>-1&&we.push(239,191,189),oe=B;continue}B=(oe-55296<<10|B-56320)+65536}else oe&&(P-=3)>-1&&we.push(239,191,189);if(oe=null,B<128){if((P-=1)<0)break;we.push(B)}else if(B<2048){if((P-=2)<0)break;we.push(B>>6|192,B&63|128)}else if(B<65536){if((P-=3)<0)break;we.push(B>>12|224,B>>6&63|128,B&63|128)}else if(B<1114112){if((P-=4)<0)break;we.push(B>>18|240,B>>12&63|128,B>>6&63|128,B&63|128)}else throw new Error("Invalid code point")}return we}function ae($){for(var P=[],B=0;B<$.length;++B)P.push($.charCodeAt(B)&255);return P}function ee($,P){for(var B,X,oe,we=[],ye=0;ye<$.length&&!((P-=2)<0);++ye)B=$.charCodeAt(ye),X=B>>8,oe=B%256,we.push(oe),we.push(X);return we}function ce($){return e.toByteArray(le($))}function xe($,P,B,X){for(var oe=0;oe<X&&!(oe+B>=P.length||oe>=$.length);++oe)P[oe+B]=$[oe];return oe}function Ee($,P){return $ instanceof P||$!=null&&$.constructor!=null&&$.constructor.name!=null&&$.constructor.name===P.name}function W($){return $!==$}var z=function(){for(var $="0123456789abcdef",P=new Array(256),B=0;B<16;++B)for(var X=B*16,oe=0;oe<16;++oe)P[X+oe]=$[B]+$[oe];return P}()})(Dw);var uF=_0,_w=Sw,sL=Dw.Buffer;function i2(s){this.genPoly=void 0,this.degree=s,this.degree&&this.initialize(this.degree)}i2.prototype.initialize=function(e){this.degree=e,this.genPoly=_w.generateECPolynomial(this.degree)};i2.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");var i=uF.alloc(this.degree),t=sL.concat([e,i],e.length+this.degree),r=_w.mod(t,this.genPoly),u=this.degree-r.length;if(u>0){var n=uF.alloc(this.degree);return r.copy(n,u),n}return r};var uL=i2,Lw={},L0={},s2={};s2.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var Ni={},Tw="[0-9]+",nL="[A-Z $%*+\\-./:]+",Ln="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Ln=Ln.replace(/u/g,"\\u");var oL="(?:(?![A-Z0-9 $%*+\\-./:]|"+Ln+`)(?:.|[\r
]))+`;Ni.KANJI=new RegExp(Ln,"g");Ni.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ni.BYTE=new RegExp(oL,"g");Ni.NUMERIC=new RegExp(Tw,"g");Ni.ALPHANUMERIC=new RegExp(nL,"g");var aL=new RegExp("^"+Ln+"$"),lL=new RegExp("^"+Tw+"$"),cL=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ni.testKanji=function(e){return aL.test(e)};Ni.testNumeric=function(e){return lL.test(e)};Ni.testAlphanumeric=function(e){return cL.test(e)};(function(s){var e=s2,i=Ni;s.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},s.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},s.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},s.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},s.MIXED={bit:-1},s.getCharCountIndicator=function(u,n){if(!u.ccBits)throw new Error("Invalid mode: "+u);if(!e.isValid(n))throw new Error("Invalid version: "+n);return n>=1&&n<10?u.ccBits[0]:n<27?u.ccBits[1]:u.ccBits[2]},s.getBestModeForData=function(u){return i.testNumeric(u)?s.NUMERIC:i.testAlphanumeric(u)?s.ALPHANUMERIC:i.testKanji(u)?s.KANJI:s.BYTE},s.toString=function(u){if(u&&u.id)return u.id;throw new Error("Invalid mode")},s.isValid=function(u){return u&&u.bit&&u.ccBits};function t(r){if(typeof r!="string")throw new Error("Param is not a string");var u=r.toLowerCase();switch(u){case"numeric":return s.NUMERIC;case"alphanumeric":return s.ALPHANUMERIC;case"kanji":return s.KANJI;case"byte":return s.BYTE;default:throw new Error("Unknown mode: "+r)}}s.from=function(u,n){if(s.isValid(u))return u;try{return t(u)}catch{return n}}})(L0);(function(s){var e=qr,i=tl,t=el,r=L0,u=s2,n=Qh,a=7973,o=e.getBCHDigit(a);function h(d,F,p){for(var f=1;f<=40;f++)if(F<=s.getCapacity(f,p,d))return f}function g(d,F){return r.getCharCountIndicator(d,F)+4}function l(d,F){var p=0;return d.forEach(function(f){var m=g(f.mode,F);p+=m+f.getBitsLength()}),p}function c(d,F){for(var p=1;p<=40;p++){var f=l(d,p);if(f<=s.getCapacity(p,F,r.MIXED))return p}}s.from=function(F,p){return u.isValid(F)?parseInt(F,10):p},s.getCapacity=function(F,p,f){if(!u.isValid(F))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=r.BYTE);var m=e.getSymbolTotalCodewords(F),v=i.getTotalCodewordsCount(F,p),w=(m-v)*8;if(f===r.MIXED)return w;var x=w-g(f,F);switch(f){case r.NUMERIC:return Math.floor(x/10*3);case r.ALPHANUMERIC:return Math.floor(x/11*2);case r.KANJI:return Math.floor(x/13);case r.BYTE:default:return Math.floor(x/8)}},s.getBestVersionForData=function(F,p){var f,m=t.from(p,t.M);if(n(F)){if(F.length>1)return c(F,m);if(F.length===0)return 1;f=F[0]}else f=F;return h(f.mode,f.getLength(),m)},s.getEncodedBits=function(F){if(!u.isValid(F)||F<7)throw new Error("Invalid QR Code version");for(var p=F<<12;e.getBCHDigit(p)-o>=0;)p^=a<<e.getBCHDigit(p)-o;return F<<12|p}})(Lw);var Pw={},dd=qr,$w=1335,dL=21522,nF=dd.getBCHDigit($w);Pw.getEncodedBits=function(e,i){for(var t=e.bit<<3|i,r=t<<10;dd.getBCHDigit(r)-nF>=0;)r^=$w<<dd.getBCHDigit(r)-nF;return(t<<10|r)^dL};var Iw={},hL=L0;function hu(s){this.mode=hL.NUMERIC,this.data=s.toString()}hu.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};hu.prototype.getLength=function(){return this.data.length};hu.prototype.getBitsLength=function(){return hu.getBitsLength(this.data.length)};hu.prototype.write=function(e){var i,t,r;for(i=0;i+3<=this.data.length;i+=3)t=this.data.substr(i,3),r=parseInt(t,10),e.put(r,10);var u=this.data.length-i;u>0&&(t=this.data.substr(i),r=parseInt(t,10),e.put(r,u*3+1))};var gL=hu,FL=L0,hc=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function gu(s){this.mode=FL.ALPHANUMERIC,this.data=s}gu.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};gu.prototype.getLength=function(){return this.data.length};gu.prototype.getBitsLength=function(){return gu.getBitsLength(this.data.length)};gu.prototype.write=function(e){var i;for(i=0;i+2<=this.data.length;i+=2){var t=hc.indexOf(this.data[i])*45;t+=hc.indexOf(this.data[i+1]),e.put(t,11)}this.data.length%2&&e.put(hc.indexOf(this.data[i]),6)};var pL=gu,fL=_0,mL=L0;function Fu(s){this.mode=mL.BYTE,this.data=fL.from(s)}Fu.getBitsLength=function(e){return e*8};Fu.prototype.getLength=function(){return this.data.length};Fu.prototype.getBitsLength=function(){return Fu.getBitsLength(this.data.length)};Fu.prototype.write=function(s){for(var e=0,i=this.data.length;e<i;e++)s.put(this.data[e],8)};var vL=Fu,bL=L0,wL=qr;function pu(s){this.mode=bL.KANJI,this.data=s}pu.getBitsLength=function(e){return e*13};pu.prototype.getLength=function(){return this.data.length};pu.prototype.getBitsLength=function(){return pu.getBitsLength(this.data.length)};pu.prototype.write=function(s){var e;for(e=0;e<this.data.length;e++){var i=wL.toSJIS(this.data[e]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),s.put(i,13)}};var yL=pu,Rw={exports:{}};(function(s){var e={single_source_shortest_paths:function(i,t,r){var u={},n={};n[t]=0;var a=e.PriorityQueue.make();a.push(t,0);for(var o,h,g,l,c,d,F,p,f;!a.empty();){o=a.pop(),h=o.value,l=o.cost,c=i[h]||{};for(g in c)c.hasOwnProperty(g)&&(d=c[g],F=l+d,p=n[g],f=typeof n[g]>"u",(f||p>F)&&(n[g]=F,a.push(g,F),u[g]=h))}if(typeof r<"u"&&typeof n[r]>"u"){var m=["Could not find a path from ",t," to ",r,"."].join("");throw new Error(m)}return u},extract_shortest_path_from_predecessor_list:function(i,t){for(var r=[],u=t;u;)r.push(u),i[u],u=i[u];return r.reverse(),r},find_path:function(i,t,r){var u=e.single_source_shortest_paths(i,t,r);return e.extract_shortest_path_from_predecessor_list(u,r)},PriorityQueue:{make:function(i){var t=e.PriorityQueue,r={},u;i=i||{};for(u in t)t.hasOwnProperty(u)&&(r[u]=t[u]);return r.queue=[],r.sorter=i.sorter||t.default_sorter,r},default_sorter:function(i,t){return i.cost-t.cost},push:function(i,t){var r={value:i,cost:t};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};s.exports=e})(Rw);var xL=Rw.exports;(function(s){var e=L0,i=gL,t=pL,r=vL,u=yL,n=Ni,a=qr,o=xL;function h(m){return unescape(encodeURIComponent(m)).length}function g(m,v,w){for(var x=[],A;(A=m.exec(w))!==null;)x.push({data:A[0],index:A.index,mode:v,length:A[0].length});return x}function l(m){var v=g(n.NUMERIC,e.NUMERIC,m),w=g(n.ALPHANUMERIC,e.ALPHANUMERIC,m),x,A;a.isKanjiModeEnabled()?(x=g(n.BYTE,e.BYTE,m),A=g(n.KANJI,e.KANJI,m)):(x=g(n.BYTE_KANJI,e.BYTE,m),A=[]);var b=v.concat(w,x,A);return b.sort(function(y,k){return y.index-k.index}).map(function(y){return{data:y.data,mode:y.mode,length:y.length}})}function c(m,v){switch(v){case e.NUMERIC:return i.getBitsLength(m);case e.ALPHANUMERIC:return t.getBitsLength(m);case e.KANJI:return u.getBitsLength(m);case e.BYTE:return r.getBitsLength(m)}}function d(m){return m.reduce(function(v,w){var x=v.length-1>=0?v[v.length-1]:null;return x&&x.mode===w.mode?(v[v.length-1].data+=w.data,v):(v.push(w),v)},[])}function F(m){for(var v=[],w=0;w<m.length;w++){var x=m[w];switch(x.mode){case e.NUMERIC:v.push([x,{data:x.data,mode:e.ALPHANUMERIC,length:x.length},{data:x.data,mode:e.BYTE,length:x.length}]);break;case e.ALPHANUMERIC:v.push([x,{data:x.data,mode:e.BYTE,length:x.length}]);break;case e.KANJI:v.push([x,{data:x.data,mode:e.BYTE,length:h(x.data)}]);break;case e.BYTE:v.push([{data:x.data,mode:e.BYTE,length:h(x.data)}])}}return v}function p(m,v){for(var w={},x={start:{}},A=["start"],b=0;b<m.length;b++){for(var y=m[b],k=[],C=0;C<y.length;C++){var D=y[C],T=""+b+C;k.push(T),w[T]={node:D,lastCount:0},x[T]={};for(var S=0;S<A.length;S++){var M=A[S];w[M]&&w[M].node.mode===D.mode?(x[M][T]=c(w[M].lastCount+D.length,D.mode)-c(w[M].lastCount,D.mode),w[M].lastCount+=D.length):(w[M]&&(w[M].lastCount=D.length),x[M][T]=c(D.length,D.mode)+4+e.getCharCountIndicator(D.mode,v))}}A=k}for(S=0;S<A.length;S++)x[A[S]].end=0;return{map:x,table:w}}function f(m,v){var w,x=e.getBestModeForData(m);if(w=e.from(v,x),w!==e.BYTE&&w.bit<x.bit)throw new Error('"'+m+'" cannot be encoded with mode '+e.toString(w)+`.
 Suggested mode is: `+e.toString(x));switch(w===e.KANJI&&!a.isKanjiModeEnabled()&&(w=e.BYTE),w){case e.NUMERIC:return new i(m);case e.ALPHANUMERIC:return new t(m);case e.KANJI:return new u(m);case e.BYTE:return new r(m)}}s.fromArray=function(v){return v.reduce(function(w,x){return typeof x=="string"?w.push(f(x,null)):x.data&&w.push(f(x.data,x.mode)),w},[])},s.fromString=function(v,w){for(var x=l(v,a.isKanjiModeEnabled()),A=F(x),b=p(A,w),y=o.find_path(b.map,"start","end"),k=[],C=1;C<y.length-1;C++)k.push(b.table[y[C]].node);return s.fromArray(d(k))},s.rawSplit=function(v){return s.fromArray(l(v,a.isKanjiModeEnabled()))}})(Iw);var oF=_0,sl=qr,gc=el,CL=X_,EL=G_,AL=Ew,kL=Aw,hd=kw,gd=tl,SL=uL,ca=Lw,jL=Pw,DL=L0,Fc=Iw,ML=Qh;function _L(s,e){for(var i=s.size,t=kL.getPositions(e),r=0;r<t.length;r++)for(var u=t[r][0],n=t[r][1],a=-1;a<=7;a++)if(!(u+a<=-1||i<=u+a))for(var o=-1;o<=7;o++)n+o<=-1||i<=n+o||(a>=0&&a<=6&&(o===0||o===6)||o>=0&&o<=6&&(a===0||a===6)||a>=2&&a<=4&&o>=2&&o<=4?s.set(u+a,n+o,!0,!0):s.set(u+a,n+o,!1,!0))}function LL(s){for(var e=s.size,i=8;i<e-8;i++){var t=i%2===0;s.set(i,6,t,!0),s.set(6,i,t,!0)}}function TL(s,e){for(var i=AL.getPositions(e),t=0;t<i.length;t++)for(var r=i[t][0],u=i[t][1],n=-2;n<=2;n++)for(var a=-2;a<=2;a++)n===-2||n===2||a===-2||a===2||n===0&&a===0?s.set(r+n,u+a,!0,!0):s.set(r+n,u+a,!1,!0)}function PL(s,e){for(var i=s.size,t=ca.getEncodedBits(e),r,u,n,a=0;a<18;a++)r=Math.floor(a/3),u=a%3+i-8-3,n=(t>>a&1)===1,s.set(r,u,n,!0),s.set(u,r,n,!0)}function pc(s,e,i){var t=s.size,r=jL.getEncodedBits(e,i),u,n;for(u=0;u<15;u++)n=(r>>u&1)===1,u<6?s.set(u,8,n,!0):u<8?s.set(u+1,8,n,!0):s.set(t-15+u,8,n,!0),u<8?s.set(8,t-u-1,n,!0):u<9?s.set(8,15-u-1+1,n,!0):s.set(8,15-u-1,n,!0);s.set(t-8,8,1,!0)}function $L(s,e){for(var i=s.size,t=-1,r=i-1,u=7,n=0,a=i-1;a>0;a-=2)for(a===6&&a--;;){for(var o=0;o<2;o++)if(!s.isReserved(r,a-o)){var h=!1;n<e.length&&(h=(e[n]>>>u&1)===1),s.set(r,a-o,h),u--,u===-1&&(n++,u=7)}if(r+=t,r<0||i<=r){r-=t,t=-t;break}}}function IL(s,e,i){var t=new CL;i.forEach(function(h){t.put(h.mode.bit,4),t.put(h.getLength(),DL.getCharCountIndicator(h.mode,s)),h.write(t)});var r=sl.getSymbolTotalCodewords(s),u=gd.getTotalCodewordsCount(s,e),n=(r-u)*8;for(t.getLengthInBits()+4<=n&&t.put(0,4);t.getLengthInBits()%8!==0;)t.putBit(0);for(var a=(n-t.getLengthInBits())/8,o=0;o<a;o++)t.put(o%2?17:236,8);return RL(t,s,e)}function RL(s,e,i){for(var t=sl.getSymbolTotalCodewords(e),r=gd.getTotalCodewordsCount(e,i),u=t-r,n=gd.getBlocksCount(e,i),a=t%n,o=n-a,h=Math.floor(t/n),g=Math.floor(u/n),l=g+1,c=h-g,d=new SL(c),F=0,p=new Array(n),f=new Array(n),m=0,v=oF.from(s.buffer),w=0;w<n;w++){var x=w<o?g:l;p[w]=v.slice(F,F+x),f[w]=d.encode(p[w]),F+=x,m=Math.max(m,x)}var A=oF.alloc(t),b=0,y,k;for(y=0;y<m;y++)for(k=0;k<n;k++)y<p[k].length&&(A[b++]=p[k][y]);for(y=0;y<c;y++)for(k=0;k<n;k++)A[b++]=f[k][y];return A}function BL(s,e,i,t){var r;if(ML(s))r=Fc.fromArray(s);else if(typeof s=="string"){var u=e;if(!u){var n=Fc.rawSplit(s);u=ca.getBestVersionForData(n,i)}r=Fc.fromString(s,u||40)}else throw new Error("Invalid data");var a=ca.getBestVersionForData(r,i);if(!a)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=a;else if(e<a)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+a+`.
`);var o=IL(e,i,r),h=sl.getSymbolSize(e),g=new EL(h);return _L(g,e),LL(g),TL(g,e),pc(g,i,0),e>=7&&PL(g,e),$L(g,o),isNaN(t)&&(t=hd.getBestMask(g,pc.bind(null,g,i))),hd.applyMask(t,g),pc(g,i,t),{modules:g,version:e,errorCorrectionLevel:i,maskPattern:t,segments:r}}bw.create=function(e,i){if(typeof e>"u"||e==="")throw new Error("No input text");var t=gc.M,r,u;return typeof i<"u"&&(t=gc.from(i.errorCorrectionLevel,gc.M),r=ca.from(i.version),u=hd.from(i.maskPattern),i.toSJISFunc&&sl.setToSJISFunction(i.toSJISFunc)),BL(e,r,t,u)};var Bw={},u2={};(function(s){function e(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");var t=i.slice().replace("#","").split("");if(t.length<3||t.length===5||t.length>8)throw new Error("Invalid hex color: "+i);(t.length===3||t.length===4)&&(t=Array.prototype.concat.apply([],t.map(function(u){return[u,u]}))),t.length===6&&t.push("F","F");var r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+t.slice(0,6).join("")}}s.getOptions=function(t){t||(t={}),t.color||(t.color={});var r=typeof t.margin>"u"||t.margin===null||t.margin<0?4:t.margin,u=t.width&&t.width>=21?t.width:void 0,n=t.scale||4;return{width:u,scale:u?4:n,margin:r,color:{dark:e(t.color.dark||"#000000ff"),light:e(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},s.getScale=function(t,r){return r.width&&r.width>=t+r.margin*2?r.width/(t+r.margin*2):r.scale},s.getImageWidth=function(t,r){var u=s.getScale(t,r);return Math.floor((t+r.margin*2)*u)},s.qrToImageData=function(t,r,u){for(var n=r.modules.size,a=r.modules.data,o=s.getScale(n,u),h=Math.floor((n+u.margin*2)*o),g=u.margin*o,l=[u.color.light,u.color.dark],c=0;c<h;c++)for(var d=0;d<h;d++){var F=(c*h+d)*4,p=u.color.light;if(c>=g&&d>=g&&c<h-g&&d<h-g){var f=Math.floor((c-g)/o),m=Math.floor((d-g)/o);p=l[a[f*n+m]?1:0]}t[F++]=p.r,t[F++]=p.g,t[F++]=p.b,t[F]=p.a}}})(u2);(function(s){var e=u2;function i(r,u,n){r.clearRect(0,0,u.width,u.height),u.style||(u.style={}),u.height=n,u.width=n,u.style.height=n+"px",u.style.width=n+"px"}function t(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}s.render=function(u,n,a){var o=a,h=n;typeof o>"u"&&(!n||!n.getContext)&&(o=n,n=void 0),n||(h=t()),o=e.getOptions(o);var g=e.getImageWidth(u.modules.size,o),l=h.getContext("2d"),c=l.createImageData(g,g);return e.qrToImageData(c.data,u,o),i(l,h,g),l.putImageData(c,0,0),h},s.renderToDataURL=function(u,n,a){var o=a;typeof o>"u"&&(!n||!n.getContext)&&(o=n,n=void 0),o||(o={});var h=s.render(u,n,o),g=o.type||"image/png",l=o.rendererOpts||{};return h.toDataURL(g,l.quality)}})(Bw);var Ow={},OL=u2;function aF(s,e){var i=s.a/255,t=e+'="'+s.hex+'"';return i<1?t+" "+e+'-opacity="'+i.toFixed(2).slice(1)+'"':t}function fc(s,e,i){var t=s+e;return typeof i<"u"&&(t+=" "+i),t}function NL(s,e,i){for(var t="",r=0,u=!1,n=0,a=0;a<s.length;a++){var o=Math.floor(a%e),h=Math.floor(a/e);!o&&!u&&(u=!0),s[a]?(n++,a>0&&o>0&&s[a-1]||(t+=u?fc("M",o+i,.5+h+i):fc("m",r,0),r=0,u=!1),o+1<e&&s[a+1]||(t+=fc("h",n),n=0)):r++}return t}Ow.render=function(e,i,t){var r=OL.getOptions(i),u=e.modules.size,n=e.modules.data,a=u+r.margin*2,o=r.color.light.a?"<path "+aF(r.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",h="<path "+aF(r.color.dark,"stroke")+' d="'+NL(n,u,r.margin)+'"/>',g='viewBox="0 0 '+a+" "+a+'"',l=r.width?'width="'+r.width+'" height="'+r.width+'" ':"",c='<svg xmlns="http://www.w3.org/2000/svg" '+l+g+' shape-rendering="crispEdges">'+o+h+`</svg>
`;return typeof t=="function"&&t(null,c),c};var WL=$_,Fd=bw,Nw=Bw,zL=Ow;function n2(s,e,i,t,r){var u=[].slice.call(arguments,1),n=u.length,a=typeof u[n-1]=="function";if(!a&&!WL())throw new Error("Callback required as last argument");if(a){if(n<2)throw new Error("Too few arguments provided");n===2?(r=i,i=e,e=t=void 0):n===3&&(e.getContext&&typeof r>"u"?(r=t,t=void 0):(r=t,t=i,i=e,e=void 0))}else{if(n<1)throw new Error("Too few arguments provided");return n===1?(i=e,e=t=void 0):n===2&&!e.getContext&&(t=i,i=e,e=void 0),new Promise(function(h,g){try{var l=Fd.create(i,t);h(s(l,e,t))}catch(c){g(c)}})}try{var o=Fd.create(i,t);r(null,s(o,e,t))}catch(h){r(h)}}Xn.create=Fd.create;Xn.toCanvas=n2.bind(null,Nw.render);Xn.toDataURL=n2.bind(null,Nw.renderToDataURL);Xn.toString=n2.bind(null,function(s,e,i){return zL.render(s,i)});var Lu={},da={exports:{}};/*! https://mths.be/punycode v1.3.2 by @mathias */da.exports;(function(s,e){(function(i){var t=e&&!e.nodeType&&e,r=s&&!s.nodeType&&s,u=typeof Li=="object"&&Li;(u.global===u||u.window===u||u.self===u)&&(i=u);var n,a=2147483647,o=36,h=1,g=26,l=38,c=700,d=72,F=128,p="-",f=/^xn--/,m=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,w={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=o-h,A=Math.floor,b=String.fromCharCode,y;function k(te){throw RangeError(w[te])}function C(te,ie){for(var se=te.length,ue=[];se--;)ue[se]=ie(te[se]);return ue}function D(te,ie){var se=te.split("@"),ue="";se.length>1&&(ue=se[0]+"@",te=se[1]),te=te.replace(v,".");var ne=te.split("."),G=C(ne,ie).join(".");return ue+G}function T(te){for(var ie=[],se=0,ue=te.length,ne,G;se<ue;)ne=te.charCodeAt(se++),ne>=55296&&ne<=56319&&se<ue?(G=te.charCodeAt(se++),(G&64512)==56320?ie.push(((ne&1023)<<10)+(G&1023)+65536):(ie.push(ne),se--)):ie.push(ne);return ie}function S(te){return C(te,function(ie){var se="";return ie>65535&&(ie-=65536,se+=b(ie>>>10&1023|55296),ie=56320|ie&1023),se+=b(ie),se}).join("")}function M(te){return te-48<10?te-22:te-65<26?te-65:te-97<26?te-97:o}function R(te,ie){return te+22+75*(te<26)-((ie!=0)<<5)}function O(te,ie,se){var ue=0;for(te=se?A(te/c):te>>1,te+=A(te/ie);te>x*g>>1;ue+=o)te=A(te/x);return A(ue+(x+1)*te/(te+l))}function H(te){var ie=[],se=te.length,ue,ne=0,G=F,K=d,le,re,ae,ee,ce,xe,Ee,W,z;for(le=te.lastIndexOf(p),le<0&&(le=0),re=0;re<le;++re)te.charCodeAt(re)>=128&&k("not-basic"),ie.push(te.charCodeAt(re));for(ae=le>0?le+1:0;ae<se;){for(ee=ne,ce=1,xe=o;ae>=se&&k("invalid-input"),Ee=M(te.charCodeAt(ae++)),(Ee>=o||Ee>A((a-ne)/ce))&&k("overflow"),ne+=Ee*ce,W=xe<=K?h:xe>=K+g?g:xe-K,!(Ee<W);xe+=o)z=o-W,ce>A(a/z)&&k("overflow"),ce*=z;ue=ie.length+1,K=O(ne-ee,ue,ee==0),A(ne/ue)>a-G&&k("overflow"),G+=A(ne/ue),ne%=ue,ie.splice(ne++,0,G)}return S(ie)}function Y(te){var ie,se,ue,ne,G,K,le,re,ae,ee,ce,xe=[],Ee,W,z,$;for(te=T(te),Ee=te.length,ie=F,se=0,G=d,K=0;K<Ee;++K)ce=te[K],ce<128&&xe.push(b(ce));for(ue=ne=xe.length,ne&&xe.push(p);ue<Ee;){for(le=a,K=0;K<Ee;++K)ce=te[K],ce>=ie&&ce<le&&(le=ce);for(W=ue+1,le-ie>A((a-se)/W)&&k("overflow"),se+=(le-ie)*W,ie=le,K=0;K<Ee;++K)if(ce=te[K],ce<ie&&++se>a&&k("overflow"),ce==ie){for(re=se,ae=o;ee=ae<=G?h:ae>=G+g?g:ae-G,!(re<ee);ae+=o)$=re-ee,z=o-ee,xe.push(b(R(ee+$%z,0))),re=A($/z);xe.push(b(R(re,0))),G=O(se,W,ue==ne),se=0,++ue}++se,++ie}return xe.join("")}function J(te){return D(te,function(ie){return f.test(ie)?H(ie.slice(4).toLowerCase()):ie})}function Z(te){return D(te,function(ie){return m.test(ie)?"xn--"+Y(ie):ie})}if(n={version:"1.3.2",ucs2:{decode:T,encode:S},decode:H,encode:Y,toASCII:Z,toUnicode:J},t&&r)if(s.exports==t)r.exports=n;else for(y in n)n.hasOwnProperty(y)&&(t[y]=n[y]);else i.punycode=n})(Li)})(da,da.exports);var HL=da.exports,UL={isString:function(s){return typeof s=="string"},isObject:function(s){return typeof s=="object"&&s!==null},isNull:function(s){return s===null},isNullOrUndefined:function(s){return s==null}},Tn={};function YL(s,e){return Object.prototype.hasOwnProperty.call(s,e)}var VL=function(s,e,i,t){e=e||"&",i=i||"=";var r={};if(typeof s!="string"||s.length===0)return r;var u=/\+/g;s=s.split(e);var n=1e3;t&&typeof t.maxKeys=="number"&&(n=t.maxKeys);var a=s.length;n>0&&a>n&&(a=n);for(var o=0;o<a;++o){var h=s[o].replace(u,"%20"),g=h.indexOf(i),l,c,d,F;g>=0?(l=h.substr(0,g),c=h.substr(g+1)):(l=h,c=""),d=decodeURIComponent(l),F=decodeURIComponent(c),YL(r,d)?Array.isArray(r[d])?r[d].push(F):r[d]=[r[d],F]:r[d]=F}return r},Vu=function(s){switch(typeof s){case"string":return s;case"boolean":return s?"true":"false";case"number":return isFinite(s)?s:"";default:return""}},XL=function(s,e,i,t){return e=e||"&",i=i||"=",s===null&&(s=void 0),typeof s=="object"?Object.keys(s).map(function(r){var u=encodeURIComponent(Vu(r))+i;return Array.isArray(s[r])?s[r].map(function(n){return u+encodeURIComponent(Vu(n))}).join(e):u+encodeURIComponent(Vu(s[r]))}).join(e):t?encodeURIComponent(Vu(t))+i+encodeURIComponent(Vu(s)):""};Tn.decode=Tn.parse=VL;Tn.encode=Tn.stringify=XL;var GL=HL,Di=UL;Lu.parse=qn;Lu.resolve=sT;Lu.resolveObject=uT;Lu.format=iT;Lu.Url=oi;function oi(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var qL=/^([a-z0-9.+-]+:)/i,KL=/:[0-9]*$/,JL=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ZL=["<",">",'"',"`"," ","\r",`
`,"	"],QL=["{","}","|","\\","^","`"].concat(ZL),pd=["'"].concat(QL),lF=["%","/","?",";","#"].concat(pd),cF=["/","?","#"],eT=255,dF=/^[+a-z0-9A-Z_-]{0,63}$/,tT=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rT={javascript:!0,"javascript:":!0},fd={javascript:!0,"javascript:":!0},iu={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},md=Tn;function qn(s,e,i){if(s&&Di.isObject(s)&&s instanceof oi)return s;var t=new oi;return t.parse(s,e,i),t}oi.prototype.parse=function(s,e,i){if(!Di.isString(s))throw new TypeError("Parameter 'url' must be a string, not "+typeof s);var t=s.indexOf("?"),r=t!==-1&&t<s.indexOf("#")?"?":"#",u=s.split(r),n=/\\/g;u[0]=u[0].replace(n,"/"),s=u.join(r);var a=s;if(a=a.trim(),!i&&s.split("#").length===1){var o=JL.exec(a);if(o)return this.path=a,this.href=a,this.pathname=o[1],o[2]?(this.search=o[2],e?this.query=md.parse(this.search.substr(1)):this.query=this.search.substr(1)):e&&(this.search="",this.query={}),this}var h=qL.exec(a);if(h){h=h[0];var g=h.toLowerCase();this.protocol=g,a=a.substr(h.length)}if(i||h||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var l=a.substr(0,2)==="//";l&&!(h&&fd[h])&&(a=a.substr(2),this.slashes=!0)}if(!fd[h]&&(l||h&&!iu[h])){for(var c=-1,d=0;d<cF.length;d++){var F=a.indexOf(cF[d]);F!==-1&&(c===-1||F<c)&&(c=F)}var p,f;c===-1?f=a.lastIndexOf("@"):f=a.lastIndexOf("@",c),f!==-1&&(p=a.slice(0,f),a=a.slice(f+1),this.auth=decodeURIComponent(p)),c=-1;for(var d=0;d<lF.length;d++){var F=a.indexOf(lF[d]);F!==-1&&(c===-1||F<c)&&(c=F)}c===-1&&(c=a.length),this.host=a.slice(0,c),a=a.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var v=this.hostname.split(/\./),d=0,w=v.length;d<w;d++){var x=v[d];if(x&&!x.match(dF)){for(var A="",b=0,y=x.length;b<y;b++)x.charCodeAt(b)>127?A+="x":A+=x[b];if(!A.match(dF)){var k=v.slice(0,d),C=v.slice(d+1),D=x.match(tT);D&&(k.push(D[1]),C.unshift(D[2])),C.length&&(a="/"+C.join(".")+a),this.hostname=k.join(".");break}}}this.hostname.length>eT?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=GL.toASCII(this.hostname));var T=this.port?":"+this.port:"",S=this.hostname||"";this.host=S+T,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),a[0]!=="/"&&(a="/"+a))}if(!rT[g])for(var d=0,w=pd.length;d<w;d++){var M=pd[d];if(a.indexOf(M)!==-1){var R=encodeURIComponent(M);R===M&&(R=escape(M)),a=a.split(M).join(R)}}var O=a.indexOf("#");O!==-1&&(this.hash=a.substr(O),a=a.slice(0,O));var H=a.indexOf("?");if(H!==-1?(this.search=a.substr(H),this.query=a.substr(H+1),e&&(this.query=md.parse(this.query)),a=a.slice(0,H)):e&&(this.search="",this.query={}),a&&(this.pathname=a),iu[g]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var T=this.pathname||"",Y=this.search||"";this.path=T+Y}return this.href=this.format(),this};function iT(s){return Di.isString(s)&&(s=qn(s)),s instanceof oi?s.format():oi.prototype.format.call(s)}oi.prototype.format=function(){var s=this.auth||"";s&&(s=encodeURIComponent(s),s=s.replace(/%3A/i,":"),s+="@");var e=this.protocol||"",i=this.pathname||"",t=this.hash||"",r=!1,u="";this.host?r=s+this.host:this.hostname&&(r=s+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&Di.isObject(this.query)&&Object.keys(this.query).length&&(u=md.stringify(this.query));var n=this.search||u&&"?"+u||"";return e&&e.substr(-1)!==":"&&(e+=":"),this.slashes||(!e||iu[e])&&r!==!1?(r="//"+(r||""),i&&i.charAt(0)!=="/"&&(i="/"+i)):r||(r=""),t&&t.charAt(0)!=="#"&&(t="#"+t),n&&n.charAt(0)!=="?"&&(n="?"+n),i=i.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),n=n.replace("#","%23"),e+r+i+n+t};function sT(s,e){return qn(s,!1,!0).resolve(e)}oi.prototype.resolve=function(s){return this.resolveObject(qn(s,!1,!0)).format()};function uT(s,e){return s?qn(s,!1,!0).resolveObject(e):e}oi.prototype.resolveObject=function(s){if(Di.isString(s)){var e=new oi;e.parse(s,!1,!0),s=e}for(var i=new oi,t=Object.keys(this),r=0;r<t.length;r++){var u=t[r];i[u]=this[u]}if(i.hash=s.hash,s.href==="")return i.href=i.format(),i;if(s.slashes&&!s.protocol){for(var n=Object.keys(s),a=0;a<n.length;a++){var o=n[a];o!=="protocol"&&(i[o]=s[o])}return iu[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(s.protocol&&s.protocol!==i.protocol){if(!iu[s.protocol]){for(var h=Object.keys(s),g=0;g<h.length;g++){var l=h[g];i[l]=s[l]}return i.href=i.format(),i}if(i.protocol=s.protocol,!s.host&&!fd[s.protocol]){for(var w=(s.pathname||"").split("/");w.length&&!(s.host=w.shift()););s.host||(s.host=""),s.hostname||(s.hostname=""),w[0]!==""&&w.unshift(""),w.length<2&&w.unshift(""),i.pathname=w.join("/")}else i.pathname=s.pathname;if(i.search=s.search,i.query=s.query,i.host=s.host||"",i.auth=s.auth,i.hostname=s.hostname||s.host,i.port=s.port,i.pathname||i.search){var c=i.pathname||"",d=i.search||"";i.path=c+d}return i.slashes=i.slashes||s.slashes,i.href=i.format(),i}var F=i.pathname&&i.pathname.charAt(0)==="/",p=s.host||s.pathname&&s.pathname.charAt(0)==="/",f=p||F||i.host&&s.pathname,m=f,v=i.pathname&&i.pathname.split("/")||[],w=s.pathname&&s.pathname.split("/")||[],x=i.protocol&&!iu[i.protocol];if(x&&(i.hostname="",i.port=null,i.host&&(v[0]===""?v[0]=i.host:v.unshift(i.host)),i.host="",s.protocol&&(s.hostname=null,s.port=null,s.host&&(w[0]===""?w[0]=s.host:w.unshift(s.host)),s.host=null),f=f&&(w[0]===""||v[0]==="")),p)i.host=s.host||s.host===""?s.host:i.host,i.hostname=s.hostname||s.hostname===""?s.hostname:i.hostname,i.search=s.search,i.query=s.query,v=w;else if(w.length)v||(v=[]),v.pop(),v=v.concat(w),i.search=s.search,i.query=s.query;else if(!Di.isNullOrUndefined(s.search)){if(x){i.hostname=i.host=v.shift();var A=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;A&&(i.auth=A.shift(),i.host=i.hostname=A.shift())}return i.search=s.search,i.query=s.query,(!Di.isNull(i.pathname)||!Di.isNull(i.search))&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!v.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var b=v.slice(-1)[0],y=(i.host||s.host||v.length>1)&&(b==="."||b==="..")||b==="",k=0,C=v.length;C>=0;C--)b=v[C],b==="."?v.splice(C,1):b===".."?(v.splice(C,1),k++):k&&(v.splice(C,1),k--);if(!f&&!m)for(;k--;k)v.unshift("..");f&&v[0]!==""&&(!v[0]||v[0].charAt(0)!=="/")&&v.unshift(""),y&&v.join("/").substr(-1)!=="/"&&v.push("");var D=v[0]===""||v[0]&&v[0].charAt(0)==="/";if(x){i.hostname=i.host=D?"":v.length?v.shift():"";var A=i.host&&i.host.indexOf("@")>0?i.host.split("@"):!1;A&&(i.auth=A.shift(),i.host=i.hostname=A.shift())}return f=f||i.host&&v.length,f&&!D&&v.unshift(""),v.length?i.pathname=v.join("/"):(i.pathname=null,i.path=null),(!Di.isNull(i.pathname)||!Di.isNull(i.search))&&(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=s.auth||i.auth,i.slashes=i.slashes||s.slashes,i.href=i.format(),i};oi.prototype.parseHost=function(){var s=this.host,e=KL.exec(s);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),s=s.substr(0,s.length-e.length)),s&&(this.hostname=s)};var nT=Lu,gi={INVALID_ISSUER:0,INVALID_LABEL:1,INVALID_PROTOCOL:2,MISSING_ACCOUNT_NAME:3,MISSING_COUNTER:4,MISSING_ISSUER:5,MISSING_SECRET_KEY:6,UNKNOWN_OTP:7,INVALID_DIGITS:8,UNKNOWN_ALGORITHM:9},oT=[6,8],aT=["SHA1","SHA256","SHA512","MD5"];function Tr(s){this.name="OtpauthInvalidURL",this.message="Given otpauth:// URL is invalid. (Error "+s+")",this.errorType=s}Tr.prototype=new Error;Tr.prototype.constructor=Tr;var lT={parse:function(e){var i={},t=nT.parse(e,!0);if(t.protocol!=="otpauth:")throw new Tr(gi.INVALID_PROTOCOL);var r=decodeURIComponent(t.host);if(r!=="hotp"&&r!=="totp")throw new Tr(gi.UNKNOWN_OTP);i.type=r;var u=decodeURIComponent(t.pathname.substring(1)),n=u.split(":"),a="",o="";if(n.length===1)o=n[0];else if(n.length===2)a=n[0],o=n[1];else throw new Tr(gi.INVALID_LABEL);if(o.length<1)throw new Tr(gi.MISSING_ACCOUNT_NAME);if(n.length===2&&a.length<1)throw new Tr(gi.INVALID_ISSUER);i.account=o;var h=t.query;if(!h.secret)throw new Tr(gi.MISSING_SECRET_KEY);if(i.key=h.secret,h.issuer&&a&&h.issuer!==a)throw new Tr(gi.INVALID_ISSUER);if(i.issuer=a||h.issuer||"",i.digits=6,h.digits){var g=parseInt(h.digits,10);if(oT.indexOf(g)==-1)throw new Tr(gi.INVALID_DIGITS);i.digits=g}if(h.algorithm){if(aT.indexOf(h.algorithm)==-1)throw new Tr(gi.UNKNOWN_ALGORITHM);i.algorithm=h.algorithm}if(r==="totp"&&h.period&&(i.period=parseFloat(h.period)),r==="hotp")if(h.counter)i.counter=parseInt(h.counter,10);else throw new Tr(gi.MISSING_COUNTER);return i},ErrorType:gi,OtpauthInvalidURL:Tr};const cT=ga(lT);function Ww(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Ww(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function dT(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpBegin.pug",e=e+"<h2>",t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpBegin.pug",e=e+"Enable Two-factor authentication</h2>",t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpBegin.pug",e=e+'<button class="btn btn-primary" id="g-user-otp-initialize-enable" type="submit">',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpBegin.pug",e=e+" Begin</button>"}catch(r){Ww(r,i,t)}return e}function mc(s){var e=""+s,i=hT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var hT=/["&<>]/;function zw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void zw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function gT(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h2>",r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Enable Two-factor authentication</h2>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<ol class="g-account-otp-steps">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<li class="g-account-otp-step">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h3>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Install an authenticator app on your mobile device.</h3>",r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<div>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"There are many compatible apps, including, but not limited to",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+`
`,r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<a href="https://support.google.com/accounts/answer/1066447?hl=en" target="_blank" rel="noopener">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Google Authenticator</a>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+",",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+`
`,r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<a href="https://guide.duo.com/third-party-accounts" target="_blank" rel="noopener">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Duo Mobile</a>",r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+", and",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+`
`,r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<a href="https://freeotp.github.io/" target="_blank" rel="noopener">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"FreeOTP</a>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+".</div></li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<li class="g-account-otp-step">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h3>",r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Enter your key into the authenticator app</h3>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<div class="g-account-otp-scan-qr">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h4>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Scan with your mobile device's camera:</h4>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<canvas id="g-user-otp-qr"></canvas></div>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<div class="g-account-otp-enter-manual">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h4>",r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Advanced Users:",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<span>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"You may enter your information manually, instead:</span></h4>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<table>",r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<tr>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<th>",r=21,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Service</th>",r=22,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<td>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<code>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+mc((i=n.issuer)==null?"":i)+"</code></td></tr>",r=24,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<tr>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<th>",r=25,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Account</th>",r=26,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<td>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<code>",r=27,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+mc((i=n.account)==null?"":i)+"</code></td></tr>",r=28,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<tr>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<th>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Key</th>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<td>",r=31,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<!-- Split into 4-character chunks for human readability-->",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<code>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+mc((i=n.key.match(/.{1,4}/g).join("-"))==null?"":i)+"</code></td></tr>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<tr>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<th>",r=34,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Type</th>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<td>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<span>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<code>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Time-based</code>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+" / ",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<code>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"TOTP</code>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"</span></td></tr></table></div></li>",r=37,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<li class="g-account-otp-step">',r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<h3>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Enter the authentication code from your app</h3>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<input id="g-user-otp-token" type="text" minlength="6" maxlength="6" placeholder="Your 6-digit code"/>',r=40,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"<div>",r=41,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<span class="g-validation-failed-message" id="g-account-otp-error"></span></div></li></ol>',r=42,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<div class="g-user-otp-footer">',r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<a class="btn btn-default" id="g-user-otp-cancel-enable">',r=43,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Cancel</a>",r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+'<button class="btn btn-primary btn-success" id="g-user-otp-finalize-enable" type="submit">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpEnable.pug",e=e+"Enable Two-Factor</button></div>"}).call(this,"totpInfo"in u?u.totpInfo:typeof totpInfo<"u"?totpInfo:void 0)}catch(n){zw(n,t,r)}return e}function Hw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Hw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function FT(s){var e="",i,t;try{t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+'<h2 class="g-user-otp-heading-enable">',t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+"Two-factor authentication is currently enabled</h2>",t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+'<h3 class="g-user-otp-heading-disable">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+"Disable Two-factor authentication</h3>",t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+'<button class="btn btn-primary" id="g-user-otp-disable" type="submit">',t=6,i="/home/circleci/project/girder/girder/web/src/templates/widgets/userOtpDisable.pug",e=e+" Disable</button>"}catch(r){Hw(r,i,t)}return e}const pT=We.extend({events:{"click #g-user-otp-initialize-enable":function(){this.model.initializeEnableOtp().done(s=>{this.totpUri=s,this.render()})},"click #g-user-otp-finalize-enable":function(){const s=this.$("#g-user-otp-token").val().trim();if(s.length!==6){this.$("#g-account-otp-error").text("Enter a 6-digit token.");return}else this.$("#g-account-otp-error").text("");this.model.finializeEnableOtp(s).done(()=>{this.totpUri=void 0,this.render()}).fail(e=>{this.$("#g-account-otp-error").text(e.responseJSON.message)})},"click #g-user-otp-cancel-enable":function(){this.totpUri=void 0,this.render()},"click #g-user-otp-disable":function(){this.model.disableOtp().done(()=>{this.render()})}},initialize:function(s){this.model=s.user},render:function(){return this.model.get("otp")?this._renderDisable():this.totpUri?this._renderConfirmation():this._renderBegin(),this},_renderBegin:function(){this.$el.html(dT())},_renderConfirmation:function(){const s=cT.parse(this.totpUri);this.$el.html(gT({totpInfo:s})),Xn.toCanvas(this.$("#g-user-otp-qr")[0],this.totpUri,{errorCorrectionLevel:"H"})},_renderDisable:function(){this.$el.html(FT())}});function Xu(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=No(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function No(s){var e=""+s,i=fT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var fT=/["&<>]/;function Uw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Uw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function mT(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-account-header">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-user-name g-body-title">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+No((i=h.name())==null?"":i)+"</div>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-user-description g-body-subtitle">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+No((i=h.get("login"))==null?"":i)+"</div></div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<ul class="g-account-tabs nav nav-tabs">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<li class="active">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<a href="#g-account-tab-info" data-toggle="tab" name="info">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-info-circled"></i>',r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+" Profile</a></li>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<a href="#g-account-tab-password" data-toggle="tab" name="password">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-lock"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Password</a></li>",r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<li>",r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<a href="#g-account-tab-api-keys" data-toggle="tab" name="apikeys">',r=16,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-key-inv"></i>',r=17,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"API keys</a></li>",r=18,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<li>",r=19,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<a href="#g-account-tab-otp" data-toggle="tab" name="otp">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-mobile"></i>',r=21,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Two-factor authentication</a></li></ul>",r=23,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="tab-content">',r=24,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="tab-pane active" id="g-account-tab-info">',r=25,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-user-info-container g-user-settings-container">',r=26,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<form id="g-user-info-form" role="form">',r=27,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-login">',r=28,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Login</label>",r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<p class="form-control-static">',r=29,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+No((i=h.get("login"))==null?"":i)+"</p></div>",r=30,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-email">',r=31,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Email</label>",r=32,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<input"+(' class="input-sm form-control" id="g-email" type="text"'+Xu("value",h.get("email"),!0,!1))+"/></div>",r=33,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-firstName">',r=34,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"First name</label>",r=35,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<input"+(' class="input-sm form-control" id="g-firstName" type="text"'+Xu("value",h.get("firstName"),!0,!1))+"/></div>",r=36,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-lastName">',r=37,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Last name</label>",r=38,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<input"+(' class="input-sm form-control" id="g-lastName" type="text"'+Xu("value",h.get("lastName"),!0,!1))+"/></div>",r=39,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",n().get("admin")&&(r=40,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-admin">',r=41,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"User is site admin</label>",r=42,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<input"+(' class="input-sm-form-control" id="g-admin" type="checkbox"'+Xu("checked",h.get("admin"),!0,!1))+"/></div>"),r=43,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<button class="btn btn-default btn-sm" type="submit">',r=44,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-edit"></i>',r=45,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Save</button>",r=46,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-validation-failed-message" id="g-user-info-error-msg"></div></form></div></div>',r=48,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="tab-pane" id="g-account-tab-password">',r=49,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-password-change-container g-user-settings-container">',r=50,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<form id="g-password-change-form" role="form">',r=51,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",o?(r=52,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"<input"+(' class="input-sm form-control" id="g-password-old" type="hidden"'+Xu("value",o,!0,!1))+"/>"):a&&(r=54,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-password-old">',r=55,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Current password</label>",r=56,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<input class="input-sm form-control" id="g-password-old" type="password" placeholder="Enter current password"/></div>'),r=57,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-password-new">',r=58,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"New password</label>",r=59,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<input class="input-sm form-control" id="g-password-new" type="password" placeholder="Enter new password"/></div>',r=60,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="form-group">',r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<label for="g-password-retype">',r=61,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Retype new password</label>",r=62,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<input class="input-sm form-control" id="g-password-retype" type="password" placeholder="Retype new password"/></div>',r=63,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<button class="btn btn-default btn-sm" type="submit">',r=64,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<i class="icon-lock"></i>',r=65,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Change</button>",r=66,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-validation-failed-message" id="g-password-change-error-msg"></div></form></div></div>',r=67,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="tab-pane" id="g-account-tab-api-keys">',r=68,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-api-keys-container g-user-settings-container">',r=69,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-api-keys-info-text">',r=70,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"API keys can be used to grant limited or total access to client applications on your behalf.",r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=71,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Clients can use these keys to create tokens that can be used for authenticated access. You may",r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=72,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"limit the tokens created with a given key to certain authorization scopes, or allow the tokens",r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=73,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"complete access to everything your user can do. You may also choose the maximum time that",r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=74,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"tokens created with a given key will last before expiration. If you do not specify a duration,",r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=75,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"the default expiration for user login sessions will be used.",r=76,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=76,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"</div>",r=77,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-api-keys-list-container"></div></div></div>',r=78,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="tab-pane" id="g-account-tab-otp">',r=79,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-user-settings-container">',r=80,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-account-otp-info-text">',r=81,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"Two-factor authentication adds another level of authentication to your account log-in.",r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+`
`,r=82,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+"</div>",r=83,t="/home/circleci/project/girder/girder/web/src/templates/body/userAccount.pug",e=e+'<div class="g-account-otp-container"></div></div></div></div>'}).call(this,"getCurrentUser"in u?u.getCurrentUser:typeof getCurrentUser<"u"?getCurrentUser:void 0,"isCurrentUser"in u?u.isCurrentUser:typeof isCurrentUser<"u"?isCurrentUser:void 0,"temporaryToken"in u?u.temporaryToken:typeof temporaryToken<"u"?temporaryToken:void 0,"user"in u?u.user:typeof user<"u"?user:void 0)}catch(n){Uw(n,t,r)}return e}var ul=We.extend({events:{"submit #g-user-info-form":function(s){s.preventDefault(),this.$("#g-user-info-error-msg").empty();var e={email:this.$("#g-email").val(),firstName:this.$("#g-firstName").val(),lastName:this.$("#g-lastName").val()};this.$("#g-admin").length>0&&(e.admin=this.$("#g-admin").is(":checked")),this.user.set(e),this.user.off("g:error").on("g:error",function(i){var t=i.responseJSON.message;this.$("#g-"+i.responseJSON.field).trigger("focus"),this.$("#g-user-info-error-msg").text(t)},this).off("g:saved").on("g:saved",function(){_e.trigger("g:alert",{icon:"ok",text:"Info saved.",type:"success",timeout:4e3})},this).save()},"submit #g-password-change-form":function(s){if(s.preventDefault(),this.$("#g-password-change-error-msg").empty(),this.$("#g-password-new").val()!==this.$("#g-password-retype").val()){this.$("#g-password-change-error-msg").text("Passwords do not match, try again."),this.$("#g-password-retype,#g-password-new").val(""),this.$("#g-password-new").trigger("focus");return}this.user.off("g:error").on("g:error",function(e){var i=e.responseJSON.message;this.$("#g-password-change-error-msg").text(i)},this).off("g:passwordChanged").on("g:passwordChanged",function(){_e.trigger("g:alert",{icon:"ok",text:"Password changed.",type:"success",timeout:4e3}),this.$("#g-password-old,#g-password-new,#g-password-retype").val("")},this),this.isCurrentUser?this.user.changePassword(this.$("#g-password-old").val(),this.$("#g-password-new").val()):this.user.adminChangePassword(this.$("#g-password-new").val())}},initialize:function(s){if(this.tab=s.tab||"info",this.user=s.user||it(),this.isCurrentUser=it()&&s.user.id===it().id,this.model=this.user,this.temporary=s.temporary,!this.user||this.user.getAccessLevel()<Xe.WRITE){He.navigate("",{trigger:!0});return}kr("fetch"),this.apiKeyListWidget=new vw({user:this.user,parentView:this}),this.userOtpManagementWidget=new pT({user:this.user,parentView:this}),this.render()},render:function(){if(it()===null){He.navigate("",{trigger:!0});return}return this.$el.html(mT({user:this.model,isCurrentUser:this.isCurrentUser,getCurrentUser:it,temporaryToken:this.temporary})),Fe.each(me(".g-account-tabs>li>a"),function(s){var e=me(s);e.tab().on("shown.bs.tab",i=>{this.tab=me(i.currentTarget).attr("name"),He.navigate("useraccount/"+this.model.id+"/"+this.tab),this.tab==="apikeys"?this.apiKeyListWidget.setElement(this.$(".g-api-keys-list-container")).render():this.tab==="otp"&&this.userOtpManagementWidget.setElement(this.$(".g-account-otp-container")).render()}),e.attr("name")===this.tab&&e.tab("show")},this),this}},{fetchAndInit:function(s,e){var i=new pr;i.set({_id:s}).on("g:fetched",function(){_e.trigger("g:navigateTo",ul,{user:i,tab:e})},this).on("g:error",function(){He.navigate("",{trigger:!0})},this).fetch()}}),vT=We.extend({events:{"click .g-page-next:not(.disabled)":function(){this._updateHasNextPage(!0)},"click .g-page-prev:not(.disabled)":function(){this._updateHasPreviousPage(!0)}},initialize:function(s){this._type=s.type,this._query=s.query,this._mode=s.mode,this._limit=s.limit,this._offset=0,this._currentPage=0,this._hasNextPage=!1,this._hasPreviousPage=!1,this.results=null,this._updateHasNextPage()},render:function(){return this.$el.html(Lb({collection:this})),this.$(".g-page-next").girderEnable(this._hasNextPage),this.$(".g-page-prev").girderEnable(this._hasPreviousPage),!this._hasNextPage&&!this._hasPreviousPage?this.$el.hide():this.$el.show(),this},pageNum:function(){return this._currentPage},_updateHasPreviousPage:function(s=!1){return this._currentPage?s?this._fetchPreviousPage(s).done(()=>this._fetchPreviousPage()):this._fetchPreviousPage():this._fetchPreviousPage()},_updateHasNextPage:function(s=!1){return s?this._fetchNextPage(s).done(()=>this._fetchNextPage()):this._fetchNextPage()},_fetchPreviousPage:function(s=!1){var e=this._limit*(this._currentPage-1);if(e<0)this._hasPreviousPage=!1,this.render();else return this._fetch(e).done(i=>{var t=i[this._type];t.length?(this._hasPreviousPage=!0,s&&(this.results=t,this.trigger("g:changed"),this._currentPage--,this._updateHasNextPage())):this._hasPreviousPage=!1,this.render()})},_fetchNextPage:function(s=!1){var e=this._limit*(this._currentPage+1);return this._fetch(e).done(i=>{var t=i[this._type];t.length?(this._hasNextPage=!0,s&&(this.results=t,this.trigger("g:changed"),this._currentPage++,this._updateHasPreviousPage())):this._hasNextPage=!1,this.render()})},_fetch:function(s){return Ve({url:"resource/search",data:{q:this._query,mode:this._mode,types:JSON.stringify(Fe.intersection([this._type],Ut.getModeTypes(this._mode))),limit:this._limit,offset:s}})}});function bT(s){var e=""+s,i=wT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var wT=/["&<>]/;function Yw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Yw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function yT(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-results-header-container">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-results-title-container">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<i class="g-search-results-title-element icon-search"></i>',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<span class="g-search-results-title g-search-results-title-element">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+"Results : ",r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+bT((i=n)==null?"":i)+"</span></div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-results-header">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-results-advance-search"></div></div></div>',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-results-container"></div>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-pending">',r=11,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<i class="icon-spin4 animate-spin"></i></div>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<div class="g-search-no-results" style="display: none;">',r=14,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+'<i class="icon-block"></i>',r=15,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResults.pug",e=e+" No results found</div>"}).call(this,"query"in u?u.query:typeof query<"u"?query:void 0)}catch(n){Yw(n,t,r)}return e}function jo(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=Fi(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function Vw(s,e){return Array.isArray(s)?xT(s,e):s&&typeof s=="object"?CT(s):s||""}function xT(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=Vw(s[n]))&&(u&&e[n]&&(i=Fi(i)),t=t+r+i,r=" ");return t}function CT(s){var e="",i="";for(var t in s)t&&s[t]&&ET.call(s,t)&&(e=e+i+t,i=" ");return e}function Fi(s){var e=""+s,i=AT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var ET=Object.prototype.hasOwnProperty,AT=/["&<>]/;function Xw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Xw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function kT(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+'<div class="g-search-result-type-header-container">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+"<i"+jo("class",Vw(["g-search-result-type-header","g-search-result-type-icon",`icon-${a}`],[!1,!1,!0]),!1,!1)+"></i>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+'<div class="g-search-result-type-header g-search-results-type-title">',r=4,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=n)==null?"":i)+"</div></div>",r=5,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+'<ul class="g-search-results-type">',r=6,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",function(){var g=o;if(typeof g.length=="number")for(var l=0,c=g.length;l<c;l++){var d=g[l];r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+'<li class="g-search-result">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+"<a"+jo("href",`#${h}/${d._id}`,!0,!1)+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",h==="user"?(r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.firstName)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+" ",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.lastName)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+" (",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.login)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+")"):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.name)==null?"":i)),e=e+"</a></li>"}else{var c=0;for(var l in g){c++;var d=g[l];r=7,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+'<li class="g-search-result">',r=8,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+"<a"+jo("href",`#${h}/${d._id}`,!0,!1)+">",r=9,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",h==="user"?(r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.firstName)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+" ",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.lastName)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+" (",r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.login)==null?"":i),r=10,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+")"):(r=12,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+Fi((i=d.name)==null?"":i)),e=e+"</a></li>"}}}.call(this),e=e+"</ul>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/body/searchResultsType.pug",e=e+"<div"+(' class="g-search-results-paginate"'+jo("id",`${h}Paginate`,!0,!1))+"></div>"}).call(this,"collectionName"in u?u.collectionName:typeof collectionName<"u"?collectionName:void 0,"icon"in u?u.icon:typeof icon<"u"?icon:void 0,"results"in u?u.results:typeof results<"u"?results:void 0,"type"in u?u.type:typeof type<"u"?type:void 0)}catch(n){Xw(n,t,r)}return e}var Gw=We.extend({initialize:function(s){this._query=s.query||"",this._mode=s.mode||"text",this._sizeOneElement=28,this.pageLimit=10,this._request=Ve({url:"resource/search",data:{q:this._query,mode:this._mode,types:JSON.stringify(Ut.getModeTypes(this._mode)),limit:this.pageLimit}}),this.render()},_getTypeOrdering:function(s){const e=["collection","folder","item","group","user"],i=Fe.intersection(e,s),t=Fe.difference(s,e).sort();return i.concat(t)},render:function(){return this.$el.html(yT({query:this._query})),this._subviews={},this._request.done(s=>{this.$(".g-search-pending").hide();const e=Fe.keys(s),i=this._getTypeOrdering(e);Fe.each(i,t=>{s[t].length&&(this._subviews[t]=new ST({parentView:this,query:this._query,mode:this._mode,type:t,limit:this.pageLimit,initResults:s[t],sizeOneElement:this._sizeOneElement}).render(),this._subviews[t].$el.appendTo(this.$(".g-search-results-container")))}),Fe.isEmpty(this._subviews)&&this.$(".g-search-no-results").show()}),this}}),ST=We.extend({className:"g-search-results-type-container",initialize:function(s){this._query=s.query,this._mode=s.mode,this._type=s.type,this._initResults=s.initResults||[],this._pageLimit=s.limit||10,this._sizeOneElement=s.sizeOneElement||30,this._paginateWidget=new vT({parentView:this,type:this._type,query:this._query,mode:this._mode,limit:this._pageLimit}).on("g:changed",()=>{this._results=this._paginateWidget.results,this.render()}),this._results=this._initResults},_getTypeName:function(s){return{collection:"Collections",group:"Groups",user:"Users",folder:"Folders",item:"Items"}[s]||s},_getTypeIcon:function(s){return{user:"user",group:"users",collection:"sitemap",folder:"folder",item:"doc-text-inv"}[s]||"icon-attention-alt"},render:function(){return this.$el.html(kT({results:this._results,collectionName:this._getTypeName(this._type),type:this._type,icon:this._getTypeIcon(this._type)})),this.$(".g-search-results-type").css("min-height",`${this._initResults.length*this._sizeOneElement}px`),this._paginateWidget.setElement(this.$(`#${this._type}Paginate`)).render(),this}});He.route("admin","admin",function(){_e.trigger("g:navigateTo",qm)});He.route("assetstores","assetstores",function(s){_e.trigger("g:navigateTo",Gh,{assetstoreEdit:s.dialog==="assetstoreedit"?s.dialogid:!1})});He.route("assetstore/:id/import","assetstoreImport",function(s){Gh.import(s)});He.route("collections","collections",function(s){_e.trigger("g:navigateTo",Pb,s||{}),_e.trigger("g:highlightItem","CollectionsView")});He.route("collection/:id","collectionAccess",function(s,e){Za.fetchAndInit(s,{access:e.dialog==="access",edit:e.dialog==="edit",folderCreate:e.dialog==="foldercreate",dialog:e.dialog})});He.route("collection/:id/folder/:id","collectionFolder",function(s,e,i){Za.fetchAndInit(s,{folderId:e,upload:i.dialog==="upload",access:i.dialog==="access",edit:i.dialog==="edit",folderAccess:i.dialog==="folderaccess",folderCreate:i.dialog==="foldercreate",folderEdit:i.dialog==="folderedit",itemCreate:i.dialog==="itemcreate"})});He.route("folder/:id","folder",function(s,e){qh.fetchAndInit(s,{upload:e.dialog==="upload",folderAccess:e.dialog==="folderaccess",folderCreate:e.dialog==="foldercreate",folderEdit:e.dialog==="folderedit",itemCreate:e.dialog==="itemcreate"})});He.route("","index",function(){_e.trigger("g:navigateTo",aa)});He.route("groups","groups",function(s){_e.trigger("g:navigateTo",Wb,s||{}),_e.trigger("g:highlightItem","GroupsView")});He.route("group/:id","groupView",function(s,e){Qa.fetchAndInit(s,{edit:e.dialog==="edit"})});He.route("group/:id/:tab","groupView",function(s,e,i){Qa.fetchAndInit(s,{edit:i.dialog==="edit",tab:e})});He.route("item/:id","item",function(s,e){Zh.fetchAndInit(s,{edit:e.dialog==="itemedit",fileEdit:e.dialog==="fileedit"?e.dialogid:!1,upload:e.dialog==="upload"?e.dialogid:!1})});He.route("plugins","plugins",function(){_e.trigger("g:navigateTo",dw)});He.route("settings","settings",function(){_e.trigger("g:navigateTo",Fw)});He.route("useraccount/:id/:tab","accountTab",function(s,e){ul.fetchAndInit(s,e)});He.route("useraccount/:id/token/:token","accountToken",function(s,e){pr.fromTemporaryToken(s,e).done(()=>{_e.trigger("g:navigateTo",ul,{user:it(),tab:"password",temporary:e})}).fail(()=>{He.navigate("",{trigger:!0})})});He.route("useraccount/:id/verification/:token","accountVerify",function(s,e){Ve({url:`user/${s}/verification`,method:"PUT",data:{token:e},error:null}).done(i=>{i.authToken&&(i.user.token=i.authToken.token,Ti.close(),S0(new pr(i.user)),Ti.open(),_e.trigger("g:login-changed")),_e.trigger("g:navigateTo",aa),_e.trigger("g:alert",{icon:"ok",text:"Email verified.",type:"success",timeout:4e3})}).fail(()=>{_e.trigger("g:navigateTo",aa),_e.trigger("g:alert",{icon:"cancel",text:"Could not verify email.",type:"danger",timeout:4e3})})});He.route("users","users",function(s){_e.trigger("g:navigateTo",Jh,s||{}),_e.trigger("g:highlightItem","UsersView")});He.route("user/:id","user",function(s,e){_u.fetchAndInit(s,{folderCreate:e.dialog==="foldercreate",dialog:e.dialog})});He.route("user/:id/folder/:id","userFolder",function(s,e,i){_u.fetchAndInit(s,{folderId:e,upload:i.dialog==="upload",folderAccess:i.dialog==="folderaccess",folderCreate:i.dialog==="foldercreate",folderEdit:i.dialog==="folderedit",itemCreate:i.dialog==="itemcreate"})});He.route("search/results","SearchResults",function(s){_e.trigger("g:navigateTo",Gw,{query:s.query,mode:s.mode})});var qw=We.extend({initialize:function(s){this._started=!1,s=s||{},this.contactEmail=s.contactEmail||null,this.privacyNoticeHref=s.privacyNoticeHref||null,this.brandName=s.brandName||null,this.bannerColor=s.bannerColor||null,this.registrationPolicy=s.registrationPolicy||null,this.enablePasswordLogin=Fe.has(s,"enablePasswordLogin")?s.enablePasswordLogin:!0,(s.start===void 0||s.start)&&this.start()},start:function(s){var e=new me.Deferred().resolve(null).promise();if(this._started)return e;s=Fe.defaults(s||{},{fetch:!0,render:!0,history:!0});var i=t=>{this._createLayout(),t&&(S0(new pr(t)),Ti.open()),this._started=!0,s.render&&this.render(),s.history&&(er.history.stop(),er.history.start({pushState:!1}))};return s.fetch?e=wh().done(i):i(null),this.bindGirderEvents(),e},bindGirderEvents:function(){_e.off(null,null,this),_e.on("g:navigateTo",this.navigateTo,this),_e.on("g:loginUi",this.loginDialog,this),_e.on("g:registerUi",this.registerDialog,this),_e.on("g:resetPasswordUi",this.resetPasswordDialog,this),_e.on("g:alert",this.alert,this),_e.on("g:login",this.login,this)},_createLayout:function(){this.headerView=new $m({parentView:this,brandName:this.brandName,bannerColor:this.bannerColor,registrationPolicy:this.registrationPolicy}),this.globalNavView=new Am({parentView:this}),this.footerView=new Cm({parentView:this,contactEmail:this.contactEmail,privacyNoticeHref:this.privacyNoticeHref}),this.progressListView=new zm({eventStream:Ti,parentView:this}),this.layoutRenderMap={},this.layoutRenderMap[Gu.DEFAULT]=this._defaultLayout,this.layoutRenderMap[Gu.EMPTY]=this._emptyLayout},_layout:"default",_defaultLayout:{show:function(){this.$("#g-app-header-container,#g-global-nav-container,#g-app-footer-container").show(),this.$("#g-app-body-container").addClass("g-default-layout")},hide:function(){this.$("#g-app-header-container,#g-global-nav-container,#g-app-footer-container").hide(),this.$("#g-app-body-container").removeClass("g-default-layout")}},_emptyLayout:{show:function(){this.$("#g-app-body-container").addClass("g-empty-layout")},hide:function(){this.$("#g-app-body-container").removeClass("g-empty-layout")}},render:function(){if(this._started)return this.$el.html(US()),this.globalNavView.setElement(this.$("#g-global-nav-container")).render(),this.headerView.setElement(this.$("#g-app-header-container")).render(),this.footerView.setElement(this.$("#g-app-footer-container")).render(),this.progressListView.setElement(this.$("#g-app-progress-container")).render(),this},navigateTo:function(s,e,i){return this.globalNavView.deactivateAll(),e=e||{},i=i||{},i.layout?this._layout!==i.layout&&(Fe.has(this.layoutRenderMap,i.layout)?(this.layoutRenderMap[this._layout].hide.call(this,i),this._layout=i.layout,this.layoutRenderMap[this._layout].show.call(this,i)):console.error("Attempting to set unknown layout type: "+i.layout)):this._layout!==Gu.DEFAULT&&(this.layoutRenderMap[this._layout].hide.call(this,i),this._layout=Gu.DEFAULT,this.layoutRenderMap[this._layout].show.call(this,i)),s?(this.bodyView&&this.bodyView.destroy(),e=Fe.extend(e,{el:this.$("#g-app-body-container"),parentView:this,brandName:this.brandName}),this.bodyView=new s(e),i.renderNow&&this.bodyView.render()):console.error("Undefined page."),this},closeDialogIfUser:function(){return it()?(me(".modal").girderModal("close"),!0):!1},loginDialog:function(){this.closeDialogIfUser()||(this.loginView||(this.loginView=new Rm({el:this.$("#g-dialog-container"),parentView:this,registrationPolicy:this.registrationPolicy,enablePasswordLogin:this.enablePasswordLogin})),this.loginView.render())},registerDialog:function(){this.closeDialogIfUser()||(this.registerView||(this.registerView=new Dh({el:this.$("#g-dialog-container"),parentView:this})),this.registerView.render())},resetPasswordDialog:function(){this.closeDialogIfUser()||(this.resetPasswordView||(this.resetPasswordView=new Ym({el:this.$("#g-dialog-container"),parentView:this,registrationPolicy:this.registrationPolicy})),this.resetPasswordView.render())},alert:function(s){var e=me(HS({text:s.text,type:s.type||"info",icon:s.icon}));me("#g-alerts-container").append(e),e.fadeIn(500),s.timeout===void 0&&(s.timeout=6e3),s.timeout>0&&window.setTimeout(function(){e.fadeOut(750,function(){me(this).remove()})},s.timeout)},login:function(){var s=Wa(er.history.fragment).base;er.history.fragment=null,Ti.close(),it()?(Ti.open(),He.navigate(s,{trigger:!0})):He.navigate("/",{trigger:!0})}});const jT=Object.freeze(Object.defineProperty({__proto__:null,AdminView:qm,AssetstoresView:Gh,CollectionView:Za,CollectionsView:Pb,FilesystemImportView:jb,FolderView:qh,FrontPageView:aa,GroupView:Qa,GroupsView:Wb,ItemView:Zh,PluginsView:dw,S3ImportView:Mb,SearchResultsView:Gw,SystemConfigurationView:Fw,UserAccountView:ul,UserView:_u,UsersView:Jh,assetstoreImportViewMap:Ja},Symbol.toStringTag,{value:"Module"})),DT=Object.freeze(Object.defineProperty({__proto__:null,FooterView:Cm,GlobalNavView:Am,HeaderUserView:jm,HeaderView:$m,LoginView:Rm,ProgressListView:zm,RegisterView:Dh,ResetPasswordView:Ym},Symbol.toStringTag,{value:"Module"}));function hF(s){var e=""+s,i=MT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var MT=/["&<>]/;function Kw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Kw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function _T(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="form-group">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<label class="control-label">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+hF((i=n)==null?"":i)+"</label>",r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",a?(r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group date g-datetime-widget-from">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<input class="input-sm form-control" type="text"/>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group-addon">',r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<span class="icon-calendar"></span></div></div>'):(r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group date">',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<input class="input-sm form-control g-datetime-widget-from" type="text"/></div>'),e=e+"</div>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="form-group">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<label class="control-label">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+hF((i=o)==null?"":i)+"</label>",r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",a?(r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group date g-datetime-widget-to">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<input class="input-sm form-control" type="text"/>',r=16,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group-addon">',r=17,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<span class="icon-calendar"></span></div></div>'):(r=19,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<div class="input-group date">',r=20,t="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeRangeWidget.pug",e=e+'<input class="input-sm form-control g-datetime-widget-to" type="text"/></div>'),e=e+"</div>"}).call(this,"fromLabel"in u?u.fromLabel:typeof fromLabel<"u"?fromLabel:void 0,"showIcon"in u?u.showIcon:typeof showIcon<"u"?showIcon:void 0,"toLabel"in u?u.toLabel:typeof toLabel<"u"?toLabel:void 0)}catch(n){Kw(n,t,r)}return e}var LT=We.extend({initialize:function(s){this.defaultFromDate=s.defaultFromDate||!1,this.defaultToDate=s.defaultToDate||!1,this.showIcon=Fe.has(s,"showIcon")?s.showIcon:!0,this.fromLabel=s.fromLabel||"Start date",this.toLabel=s.toLabel||"End date"},render:function(){this.$el.html(_T({showIcon:this.showIcon,fromLabel:this.fromLabel,toLabel:this.toLabel}));var s={showClear:!0,showTodayButton:!0,icons:{time:"icon-clock",date:"icon-calendar",up:"icon-up-open",down:"icon-down-open",previous:"icon-left-open",next:"icon-right-open",clear:"icon-trash",close:"icon-cancel",today:"icon-target"}};return s.useCurrent="day",s.defaultDate=this.defaultFromDate,this.$(".g-datetime-widget-from").datetimepicker(s),s.useCurrent=!1,s.defaultDate=this.defaultToDate,this.$(".g-datetime-widget-to").datetimepicker(s),this.$(".g-datetime-widget-from").on("dp.change",e=>{var i=this._picker(".g-datetime-widget-to");i.minDate(e.date)}),this.$(".g-datetime-widget-to").on("dp.change",e=>{var i=this._picker(".g-datetime-widget-from");i.maxDate(e.date)}),this},setFromDate:function(s){this._setDate(".g-datetime-widget-from",s)},setToDate:function(s){this._setDate(".g-datetime-widget-to",s)},_setDate:function(s,e){var i=this._picker(s);if(Fe.isEmpty(e))i.clear();else if(Fe.isString(e)){var t=ze.utc(e).local();i.date(t)}else i.date(e)},fromDate:function(){return this._date(".g-datetime-widget-from")},toDate:function(){return this._date(".g-datetime-widget-to")},fromDateString:function(){return this._dateString(".g-datetime-widget-from")},toDateString:function(){return this._dateString(".g-datetime-widget-to")},_picker:function(s){var e=this.$(s).data("DateTimePicker");return e},_date:function(s){var e=this._picker(s),i=e.date();return i!==null&&(i=ze(i),i.utc()),i},_dateString:function(s){var e=this._date(s);return e===null?"":e.format()}});function Jw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Jw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function TT(s){var e="",i,t;try{var r=s||{};(function(u){t=1,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",u?(t=2,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<div class="input-group date g-datetime-widget">',t=3,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<input class="input-sm form-control" type="text"/>',t=4,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<span class="input-group-addon">',t=5,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<span class="icon-calendar"></span></span></div>'):(t=7,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<div class="input-group">',t=8,i="/home/circleci/project/girder/girder/web/src/templates/widgets/dateTimeWidget.pug",e=e+'<input class="input-sm form-control g-datetime-widget" type="text"/></div>')}).call(this,"showIcon"in r?r.showIcon:typeof showIcon<"u"?showIcon:void 0)}catch(u){Jw(u,i,t)}return e}var PT=We.extend({initialize:function(s){this.defaultDate=s.defaultDate||!1,this.showIcon=Fe.has(s,"showIcon")?s.showIcon:!0},render:function(){return this.$el.html(TT({showIcon:this.showIcon})),this.$(".g-datetime-widget").datetimepicker({showClear:!0,showTodayButton:!0,useCurrent:"day",icons:{time:"icon-clock",date:"icon-calendar",up:"icon-up-open",down:"icon-down-open",previous:"icon-left-open",next:"icon-right-open",clear:"icon-trash",close:"icon-cancel",today:"icon-target"},defaultDate:this.defaultDate}),this},setDate:function(s){var e=this._picker();if(Fe.isEmpty(s))e.clear();else if(Fe.isString(s)){var i=ze.utc(s).local();e.date(i)}else e.date(s)},date:function(){var s=this._picker(),e=s.date();return e!==null&&(e=ze(e),e.utc()),e},dateString:function(){var s=this.date();return s===null?"":s.format()},_picker:function(){var s=this.$(".g-datetime-widget").data("DateTimePicker");return s}});function $T(s){var e=""+s,i=IT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var IT=/["&<>]/;function Zw(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void Zw(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function RT(s){var e="",i,t,r;try{var u=s||{};(function(n){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<div class="g-plugin-config-breadcrumbs">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<ol class="breadcrumb">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+"<li>",r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<a class="g-admin-console-link">',r=5,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<i class="icon-wrench"></i>',r=6,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+"Admin console</a></li>",r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+"<li>",r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<a class="g-plugins-link">',r=9,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<i class="icon-puzzle"></i>',r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+"Plugins</a></li>",r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<li class="active">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+'<i class="icon-cog"></i>',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/pluginConfigBreadcrumb.pug",e=e+$T((i=n)==null?"":i)+"</li></ol></div>"}).call(this,"pluginName"in u?u.pluginName:typeof pluginName<"u"?pluginName:void 0)}catch(n){Zw(n,t,r)}return e}var BT=We.extend({events:{"click a.g-admin-console-link":function(){He.navigate("admin",{trigger:!0})},"click a.g-plugins-link":function(){He.navigate("plugins",{trigger:!0})}},initialize:function(s){this.pluginName=s.pluginName},render:function(){return this.$el.html(RT({pluginName:this.pluginName})),this}});function ei(s,e,i,t){if(e===!1||e==null||!e&&(s==="class"||s==="style"))return"";if(e===!0)return" "+(t?s:s+'="'+s+'"');var r=typeof e;return r!=="object"&&r!=="function"||typeof e.toJSON!="function"||(e=e.toJSON()),typeof e=="string"||(e=JSON.stringify(e),i||e.indexOf('"')===-1)?(i&&(e=ha(e))," "+s+'="'+e+'"'):" "+s+"='"+e.replace(/'/g,"&#39;")+"'"}function nn(s,e){return Array.isArray(s)?OT(s,e):s&&typeof s=="object"?NT(s):s||""}function OT(s,e){for(var i,t="",r="",u=Array.isArray(e),n=0;n<s.length;n++)(i=nn(s[n]))&&(u&&e[n]&&(i=ha(i)),t=t+r+i,r=" ");return t}function NT(s){var e="",i="";for(var t in s)t&&s[t]&&Qw.call(s,t)&&(e=e+i+t,i=" ");return e}function ha(s){var e=""+s,i=WT.exec(e);if(!i)return s;var t,r,u,n="";for(t=i.index,r=0;t<e.length;t++){switch(e.charCodeAt(t)){case 34:u="&quot;";break;case 38:u="&amp;";break;case 60:u="&lt;";break;case 62:u="&gt;";break;default:continue}r!==t&&(n+=e.substring(r,t)),r=t+1,n+=u}return r!==t?n+e.substring(r,t):n}var Qw=Object.prototype.hasOwnProperty,WT=/["&<>]/;function ey(s,e,i,t){if(!(s instanceof Error))throw s;if(!(typeof window>"u"&&e||t))throw s.message+=" on line "+i,s;var r,u,n,a;try{t=t||require("fs").readFileSync(e,{encoding:"utf8"}),r=3,u=t.split(`
`),n=Math.max(i-r,0),a=Math.min(u.length,i+r)}catch(o){return s.message+=" - could not read from "+e+" ("+o.message+")",void ey(s,null,i)}r=u.slice(n,a).map(function(o,h){var g=h+n+1;return(g==i?"  > ":"    ")+g+"| "+o}).join(`
`),s.path=e;try{s.message=(e||"Pug")+":"+i+`
`+r+`

`+s.message}catch{}throw s}function Do(s){if(!s)return"";if(typeof s=="object"){var e="";for(var i in s)Qw.call(s,i)&&(e=e+i+":"+s[i]+";");return e}return s+""}function zT(s){var e="",i,t,r;try{var u=s||{};(function(n,a,o,h){r=1,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+'<div class="g-timeline-widget-wrapper">',r=2,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+'<div class="g-timeline-container">',r=3,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",function(){var g=o;if(typeof g.length=="number")for(var l=0,c=g.length;l<c;l++){var d=g[l];r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+"<div"+(ei("class",nn(["g-timeline-segment",d.class],[!1,!0]),!1,!1)+ei("title",d.tooltip,!0,!1)+ei("style",Do(`left: ${d.left}; width: ${d.width}; ${d.color}`),!0,!1))+"></div>"}else{var c=0;for(var l in g){c++;var d=g[l];r=4,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+"<div"+(ei("class",nn(["g-timeline-segment",d.class],[!1,!0]),!1,!1)+ei("title",d.tooltip,!0,!1)+ei("style",Do(`left: ${d.left}; width: ${d.width}; ${d.color}`),!0,!1))+"></div>"}}}.call(this),r=7,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",function(){var g=a;if(typeof g.length=="number")for(var l=0,c=g.length;l<c;l++){var d=g[l];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+"<div"+(ei("class",nn(["g-timeline-point",d.class],[!1,!0]),!1,!1)+ei("title",d.tooltip,!0,!1)+ei("style",Do(`left: calc(${d.left} - 10px); ${d.color}`),!0,!1))+"></div>"}else{var c=0;for(var l in g){c++;var d=g[l];r=8,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+"<div"+(ei("class",nn(["g-timeline-point",d.class],[!1,!0]),!1,!1)+ei("title",d.tooltip,!0,!1)+ei("style",Do(`left: calc(${d.left} - 10px); ${d.color}`),!0,!1))+"></div>"}}}.call(this),e=e+"</div>",r=10,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",(h!==void 0||n!==void 0)&&(r=11,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+'<div class="g-timeline-labels-container">',r=12,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",h!==void 0&&(r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+'<div class="g-timeline-start-label">',r=13,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+ha((i=h)==null?"":i)+"</div>"),r=14,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",n!==void 0&&(r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+'<div class="g-timeline-end-label">',r=15,t="/home/circleci/project/girder/girder/web/src/templates/widgets/timeline.pug",e=e+ha((i=n)==null?"":i)+"</div>"),e=e+"</div>"),e=e+"</div>"}).call(this,"endLabel"in u?u.endLabel:typeof endLabel<"u"?endLabel:void 0,"points"in u?u.points:typeof points<"u"?points:void 0,"segments"in u?u.segments:typeof segments<"u"?segments:void 0,"startLabel"in u?u.startLabel:typeof startLabel<"u"?startLabel:void 0)}catch(n){ey(n,t,r)}return e}var HT=We.extend({initialize:function(s){this.startTime=s.startTime,this.endTime=s.endTime,this.segments=s.segments||[],this.points=s.points||[],this.numeric=!!s.numeric,this.startLabel=s.startLabel,this.endLabel=s.endLabel,this.defaultSegmentClass=s.defaultSegmentClass||"g-segment-default",this.defaultPointClass=s.defaultPointClass||"g-point-default",this._processData()},_processData:function(){if(this.numeric||(this.startTime=new Date(this.startTime),this.endTime=new Date(this.endTime)),this.endTime<=this.startTime){console.error("Timeline widget: end time must be after start time."),this._processedSegments=[],this._processedPoints=[];return}var s=this.endTime-this.startTime;this._processedSegments=Fe.map(this.segments,function(e){var i=this.numeric?e.start:new Date(e.start),t=this.numeric?e.end:new Date(e.end),r=e.class?[e.class]:[this.defaultSegmentClass],u=e.color?`background-color: ${e.color}`:"";return{class:r.join(" "),left:(100*(i-this.startTime)/s).toFixed(1)+"%",width:(100*(t-i)/s).toFixed(1)+"%",tooltip:this._segmentTooltip(e,{range:this.numeric?t-i:(t-i)/1e3}),color:u}},this),this._processedPoints=Fe.map(this.points,function(e){var i=this.numeric?e.time:new Date(e.time),t=e.class?[e.class]:[this.defaultPointClass],r=e.color?`background-color: ${e.color}`:"";return{class:t.join(" "),left:(100*(i-this.startTime)/s).toFixed(1)+"%",tooltip:this._pointTooltip(e,{time:i}),color:r}},this)},_segmentTooltip:function(s,e){return s.tooltip?s.tooltip.replace("%r",e.range):null},_pointTooltip:function(s,e){return s.tooltip?this.numeric?s.tooltip.replace("%t",e.time):s.tooltip.replace("%t",e.time.toISOString()):null},render:function(){return this.$el.html(zT({segments:this._processedSegments,points:this._processedPoints,startLabel:this.startLabel,endLabel:this.endLabel})),this}});const UT=Object.freeze(Object.defineProperty({__proto__:null,AccessWidget:Xa,ApiKeyListWidget:vw,BrowserWidget:Xh,CheckedMenuWidget:Jv,CollectionInfoWidget:Qv,DateTimeRangeWidget:LT,DateTimeWidget:PT,EditApiKeyWidget:fw,EditAssetstoreWidget:_h,EditCollectionWidget:qa,EditFileWidget:rw,EditFolderWidget:ud,EditGroupWidget:Kh,EditItemWidget:Vh,FileInfoWidget:sw,FileListWidget:nw,FolderInfoWidget:nb,FolderListWidget:ab,GroupAdminsWidget:Vb,GroupInvitesWidget:Gb,GroupMembersWidget:Jb,GroupModsWidget:Qb,HierarchyWidget:Du,ItemBreadcrumbWidget:aw,ItemListWidget:cb,LoadingAnimation:Vn,MarkdownWidget:Ga,MetadataWidget:oa,NewAssetstoreWidget:Qm,PaginateWidget:Mu,PluginConfigBreadcrumbWidget:BT,RootSelectorWidget:Ab,SearchFieldWidget:Ut,TaskProgressWidget:Nm,TimelineWidget:HT,UploadWidget:Ka},Symbol.toStringTag,{value:"Module"})),YT=Object.freeze(Object.defineProperty({__proto__:null,App:qw,View:We,body:jT,layout:DT,widgets:UT},Symbol.toStringTag,{value:"Module"})),VT=async(s,e="body")=>new Promise((i,t)=>{me(()=>{$f(s),_e.trigger("g:appload.before"),Ve({url:"system/public_settings",method:"GET"}).done(r=>{const u=new qw({el:e,parentView:null,contactEmail:r["core.contact_email_address"],privacyNoticeHref:r["core.privacy_notice"],brandName:r["core.brand_name"],bannerColor:r["core.banner_color"],registrationPolicy:r["core.registration_policy"],enablePasswordLogin:r["core.enable_password_login"]});u.render(),document.title=r["core.brand_name"],_e.trigger("g:appload.after",u),i(u)}).fail(r=>{_e.trigger("g:error",r),t(new Error("Could not retrieve public settings from server."))})})}),ty={$:me,_:Fe,Backbone:er,moment:ze,initializeDefaultApp:VT,auth:FE,collections:Ok,constants:pE,dialog:Xk,events:_e,misc:Ik,models:bm,plugins:{},pluginUtils:qk,rest:dE,router:He,utilities:Qk,version:Rb,views:YT};window.girder=ty;const Mo={}.VITE_API_ROOT??"/api/v1";(async()=>{const s=Mo.startsWith("/")?window.origin:new URL(Mo).origin,i=await(await fetch(`${Mo}/system/plugin_static_files`)).json();i.css.forEach(t=>{const r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=new URL(t,s).href,document.head.appendChild(r)});for(const t of i.js)await new Promise(r=>{const u=document.createElement("script");u.type="text/javascript",u.src=new URL(t,s).href,document.head.appendChild(u),u.addEventListener("load",function(){r()})});await ty.initializeDefaultApp(Mo)})()});export default XT();
//# sourceMappingURL=index-a2a47249.js.map
