diff --git a/static/assets/app.js b/static/assets/app.js index 70ecb524f..fee222021 100644 --- a/static/assets/app.js +++ b/static/assets/app.js @@ -1,51 +1,51 @@ -import{a as $g}from"./chunk-GJ6CDUB5.js";import{a as Y,b as Ee,c as ps,d as dS,e as mi,f as vo,g as hc,i as $a,j as lt}from"./chunk-MGYUK2XN.js";var ST=vo((ile,kT)=>{"use strict";var qh=Object.prototype.hasOwnProperty,wT=Object.prototype.toString,mT=Object.defineProperty,gT=Object.getOwnPropertyDescriptor,bT=function(e){return typeof Array.isArray=="function"?Array.isArray(e):wT.call(e)==="[object Array]"},yT=function(e){if(!e||wT.call(e)!=="[object Object]")return!1;var i=qh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&qh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||qh.call(e,r)},xT=function(e,i){mT&&i.name==="__proto__"?mT(e,i.name,{enumerable:!0,configurable:!0,value:i.newValue,writable:!0}):e[i.name]=i.newValue},vT=function(e,i){if(i==="__proto__")if(qh.call(e,i)){if(gT)return gT(e,i).value}else return;return e[i]};kT.exports=function t(){var e,i,n,r,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{});var Jp=vo((Kp,TR)=>{(function(t,e){typeof Kp=="object"?TR.exports=Kp=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(Kp,function(){var t=t||function(e,i){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof ps=="function")try{n=SR()}catch(w){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function w(){}return function(T){var A;return w.prototype=T,A=new w,w.prototype=null,A}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(w){var T=o(this);return w&&T.mixIn(w),(!T.hasOwnProperty("init")||this.init===T.init)&&(T.init=function(){T.$super.init.apply(this,arguments)}),T.init.prototype=T,T.$super=this,T},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var T in w)w.hasOwnProperty(T)&&(this[T]=w[T]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(w,T){w=this.words=w||[],T!=i?this.sigBytes=T:this.sigBytes=w.length*4},toString:function(w){return(w||f).stringify(this)},concat:function(w){var T=this.words,A=w.words,L=this.sigBytes,D=w.sigBytes;if(this.clamp(),L%4)for(var P=0;P>>2]>>>24-P%4*8&255;T[L+P>>>2]|=q<<24-(L+P)%4*8}else for(var le=0;le>>2]=A[le>>>2];return this.sigBytes+=D,this},clamp:function(){var w=this.words,T=this.sigBytes;w[T>>>2]&=4294967295<<32-T%4*8,w.length=e.ceil(T/4)},clone:function(){var w=l.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var T=[],A=0;A>>2]>>>24-D%4*8&255;L.push((P>>>4).toString(16)),L.push((P&15).toString(16))}return L.join("")},parse:function(w){for(var T=w.length,A=[],L=0;L>>3]|=parseInt(w.substr(L,2),16)<<24-L%8*4;return new c.init(A,T/2)}},d=u.Latin1={stringify:function(w){for(var T=w.words,A=w.sigBytes,L=[],D=0;D>>2]>>>24-D%4*8&255;L.push(String.fromCharCode(P))}return L.join("")},parse:function(w){for(var T=w.length,A=[],L=0;L>>2]|=(w.charCodeAt(L)&255)<<24-L%4*8;return new c.init(A,T)}},O=u.Utf8={stringify:function(w){try{return decodeURIComponent(escape(d.stringify(w)))}catch(T){throw new Error("Malformed UTF-8 data")}},parse:function(w){return d.parse(unescape(encodeURIComponent(w)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=O.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var T,A=this._data,L=A.words,D=A.sigBytes,P=this.blockSize,q=P*4,le=D/q;w?le=e.ceil(le):le=e.max((le|0)-this._minBufferSize,0);var G=le*P,M=e.min(G*4,D);if(G){for(var ie=0;ie{(function(t,e){typeof em=="object"?ER.exports=em=e(Jp()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(em,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[];(function(){for(var O=0;O<64;O++)a[O]=e.abs(e.sin(O+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,m){for(var x=0;x<16;x++){var v=m+x,w=O[v];O[v]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,A=O[m+0],L=O[m+1],D=O[m+2],P=O[m+3],q=O[m+4],le=O[m+5],G=O[m+6],M=O[m+7],ie=O[m+8],ne=O[m+9],re=O[m+10],de=O[m+11],pe=O[m+12],ve=O[m+13],j=O[m+14],ue=O[m+15],Z=T[0],C=T[1],W=T[2],oe=T[3];Z=c(Z,C,W,oe,A,7,a[0]),oe=c(oe,Z,C,W,L,12,a[1]),W=c(W,oe,Z,C,D,17,a[2]),C=c(C,W,oe,Z,P,22,a[3]),Z=c(Z,C,W,oe,q,7,a[4]),oe=c(oe,Z,C,W,le,12,a[5]),W=c(W,oe,Z,C,G,17,a[6]),C=c(C,W,oe,Z,M,22,a[7]),Z=c(Z,C,W,oe,ie,7,a[8]),oe=c(oe,Z,C,W,ne,12,a[9]),W=c(W,oe,Z,C,re,17,a[10]),C=c(C,W,oe,Z,de,22,a[11]),Z=c(Z,C,W,oe,pe,7,a[12]),oe=c(oe,Z,C,W,ve,12,a[13]),W=c(W,oe,Z,C,j,17,a[14]),C=c(C,W,oe,Z,ue,22,a[15]),Z=u(Z,C,W,oe,L,5,a[16]),oe=u(oe,Z,C,W,G,9,a[17]),W=u(W,oe,Z,C,de,14,a[18]),C=u(C,W,oe,Z,A,20,a[19]),Z=u(Z,C,W,oe,le,5,a[20]),oe=u(oe,Z,C,W,re,9,a[21]),W=u(W,oe,Z,C,ue,14,a[22]),C=u(C,W,oe,Z,q,20,a[23]),Z=u(Z,C,W,oe,ne,5,a[24]),oe=u(oe,Z,C,W,j,9,a[25]),W=u(W,oe,Z,C,P,14,a[26]),C=u(C,W,oe,Z,ie,20,a[27]),Z=u(Z,C,W,oe,ve,5,a[28]),oe=u(oe,Z,C,W,D,9,a[29]),W=u(W,oe,Z,C,M,14,a[30]),C=u(C,W,oe,Z,pe,20,a[31]),Z=f(Z,C,W,oe,le,4,a[32]),oe=f(oe,Z,C,W,ie,11,a[33]),W=f(W,oe,Z,C,de,16,a[34]),C=f(C,W,oe,Z,j,23,a[35]),Z=f(Z,C,W,oe,L,4,a[36]),oe=f(oe,Z,C,W,q,11,a[37]),W=f(W,oe,Z,C,M,16,a[38]),C=f(C,W,oe,Z,re,23,a[39]),Z=f(Z,C,W,oe,ve,4,a[40]),oe=f(oe,Z,C,W,A,11,a[41]),W=f(W,oe,Z,C,P,16,a[42]),C=f(C,W,oe,Z,G,23,a[43]),Z=f(Z,C,W,oe,ne,4,a[44]),oe=f(oe,Z,C,W,pe,11,a[45]),W=f(W,oe,Z,C,ue,16,a[46]),C=f(C,W,oe,Z,D,23,a[47]),Z=d(Z,C,W,oe,A,6,a[48]),oe=d(oe,Z,C,W,M,10,a[49]),W=d(W,oe,Z,C,j,15,a[50]),C=d(C,W,oe,Z,le,21,a[51]),Z=d(Z,C,W,oe,pe,6,a[52]),oe=d(oe,Z,C,W,P,10,a[53]),W=d(W,oe,Z,C,re,15,a[54]),C=d(C,W,oe,Z,L,21,a[55]),Z=d(Z,C,W,oe,ie,6,a[56]),oe=d(oe,Z,C,W,ue,10,a[57]),W=d(W,oe,Z,C,G,15,a[58]),C=d(C,W,oe,Z,ve,21,a[59]),Z=d(Z,C,W,oe,q,6,a[60]),oe=d(oe,Z,C,W,de,10,a[61]),W=d(W,oe,Z,C,D,15,a[62]),C=d(C,W,oe,Z,ne,21,a[63]),T[0]=T[0]+Z|0,T[1]=T[1]+C|0,T[2]=T[2]+W|0,T[3]=T[3]+oe|0},_doFinalize:function(){var O=this._data,m=O.words,x=this._nDataBytes*8,v=O.sigBytes*8;m[v>>>5]|=128<<24-v%32;var w=e.floor(x/4294967296),T=x;m[(v+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,m[(v+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,O.sigBytes=(m.length+1)*4,this._process();for(var A=this._hash,L=A.words,D=0;D<4;D++){var P=L[D];L[D]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return A},clone:function(){var O=o.clone.call(this);return O._hash=this._hash.clone(),O}});function c(O,m,x,v,w,T,A){var L=O+(m&x|~m&v)+w+A;return(L<>>32-T)+m}function u(O,m,x,v,w,T,A){var L=O+(m&v|x&~v)+w+A;return(L<>>32-T)+m}function f(O,m,x,v,w,T,A){var L=O+(m^x^v)+w+A;return(L<>>32-T)+m}function d(O,m,x,v,w,T,A){var L=O+(x^(m|~v))+w+A;return(L<>>32-T)+m}i.MD5=o._createHelper(l),i.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5})});var QR=vo((tm,CR)=>{(function(t,e){typeof tm=="object"?CR.exports=tm=e(Jp()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(tm,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[],l=[];(function(){function f(x){for(var v=e.sqrt(x),w=2;w<=v;w++)if(!(x%w))return!1;return!0}function d(x){return(x-(x|0))*4294967296|0}for(var O=2,m=0;m<64;)f(O)&&(m<8&&(a[m]=d(e.pow(O,1/2))),l[m]=d(e.pow(O,1/3)),m++),O++})();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(f,d){for(var O=this._hash.words,m=O[0],x=O[1],v=O[2],w=O[3],T=O[4],A=O[5],L=O[6],D=O[7],P=0;P<64;P++){if(P<16)c[P]=f[d+P]|0;else{var q=c[P-15],le=(q<<25|q>>>7)^(q<<14|q>>>18)^q>>>3,G=c[P-2],M=(G<<15|G>>>17)^(G<<13|G>>>19)^G>>>10;c[P]=le+c[P-7]+M+c[P-16]}var ie=T&A^~T&L,ne=m&x^m&v^x&v,re=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),de=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),pe=D+de+ie+l[P]+c[P],ve=re+ne;D=L,L=A,A=T,T=w+pe|0,w=v,v=x,x=m,m=pe+ve|0}O[0]=O[0]+m|0,O[1]=O[1]+x|0,O[2]=O[2]+v|0,O[3]=O[3]+w|0,O[4]=O[4]+T|0,O[5]=O[5]+A|0,O[6]=O[6]+L|0,O[7]=O[7]+D|0},_doFinalize:function(){var f=this._data,d=f.words,O=this._nDataBytes*8,m=f.sigBytes*8;return d[m>>>5]|=128<<24-m%32,d[(m+64>>>9<<4)+14]=e.floor(O/4294967296),d[(m+64>>>9<<4)+15]=O,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});i.SHA256=o._createHelper(u),i.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256})});var AR=vo((im,_R)=>{(function(t,e){typeof im=="object"?_R.exports=im=e(Jp()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(im,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,u=this._map;a.clamp();for(var f=[],d=0;d>>2]>>>24-d%4*8&255,m=l[d+1>>>2]>>>24-(d+1)%4*8&255,x=l[d+2>>>2]>>>24-(d+2)%4*8&255,v=O<<16|m<<8|x,w=0;w<4&&d+w*.75>>6*(3-w)&63));var T=u.charAt(64);if(T)for(;f.length%4;)f.push(T);return f.join("")},parse:function(a){var l=a.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var f=0;f>>6-d%4*2,x=O|m;u[f>>>2]|=x<<24-f%4*8,f++}return n.create(u,f)}}(),t.enc.Base64})});var g7=vo((m7,D2)=>{(function(t){if(typeof m7=="object"&&typeof D2!="undefined")D2.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=t()}})(function(){var t,e,i;return function(){function n(r,o,s){function a(u,f){if(!o[u]){if(!r[u]){var d=typeof ps=="function"&&ps;if(!f&&d)return d(u,!0);if(l)return l(u,!0);var O=new Error("Cannot find module '"+u+"'");throw O.code="MODULE_NOT_FOUND",O}var m=o[u]={exports:{}};r[u][0].call(m.exports,function(x){var v=r[u][1][x];return a(v||x)},m,m.exports,n,r,o,s)}return o[u].exports}for(var l=typeof ps=="function"&&ps,c=0;cv._averageHeight){var q=v._renderChunk();v._lastRepaint=L,q!==!1&&typeof w.afterRender=="function"&&w.afterRender()}}};T()}return s(O,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(x,v){var w;if(Object.assign(this._config,c,v),!x||x.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=x;var T=this._config,A=this._scroller||T.scroller||document.createElement(T.scrollerTagName||"tr");if(typeof T.useFragment!="boolean"&&(this._config.useFragment=!0),!T.generate)throw new Error("Missing required `generate` function");if(!u(T.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(T.itemHeight)&&!u(T.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());u(T.itemHeight)?this._itemHeights=Array(T.total).fill(T.itemHeight):this._itemHeights=T.itemHeight,Object.keys(c).filter(function(ve){return ve in T}).forEach(function(ve){var j=T[ve],ue=u(j);if(j&&typeof j!="string"&&typeof j!="number"){var Z="Invalid optional `"+ve+"`, expected string or number";throw new Error(Z)}else ue&&(T[ve]=j+"px")});var L=!!T.horizontal,D=T[L?"width":"height"];if(D){var P=u(D),q=P?!1:D.slice(-1)==="%",le=P?D:parseInt(D.replace(/px|%/,""),10),G=window[L?"innerWidth":"innerHeight"];q?this._containerSize=G*le/100:this._containerSize=u(D)?D:le}var M=T.scrollContainer,ie=T.itemHeight*T.total,ne=this._maxElementHeight;ie>ne&&console.warn(["HyperList: The maximum element height",ne+"px has","been exceeded; please reduce your item height."].join(" "));var re={width:""+T.width,height:M?ie+"px":""+T.height,overflow:M?"none":"auto",position:"relative"};O.mergeStyle(x,re),M&&O.mergeStyle(T.scrollContainer,{overflow:"auto"});var de=(w={opacity:"0",position:"absolute"},a(w,L?"height":"width","1px"),a(w,L?"width":"height",ie+"px"),w);O.mergeStyle(A,de),this._scroller||x.appendChild(A);var pe=this._computeScrollPadding();this._scrollPaddingBottom=pe.bottom,this._scrollPaddingTop=pe.top,this._scroller=A,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(T.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof T.afterRender=="function"&&T.afterRender()}},{key:"_getRow",value:function(x){var v=this._config,w=v.generate(x),T=w.height;if(T!==void 0&&u(T)?(w=w.element,T!==this._itemHeights[x]&&(this._itemHeights[x]=T,this._computePositions(x),this._scrollHeight=this._computeScrollHeight(x))):T=this._itemHeights[x],!w||w.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+x);f(w,v.rowClassName||"vrow");var A=this._itemPositions[x]+this._scrollPaddingTop;return O.mergeStyle(w,a({position:"absolute"},v.horizontal?"left":"top",A+"px")),w}},{key:"_getScrollPosition",value:function(){var x=this._config;return typeof x.overrideScrollPosition=="function"?x.overrideScrollPosition():this._element[x.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(x){var v=this._config,w=this._element,T=this._getScrollPosition(),A=v.total,L=v.reverse?this._getReverseFrom(T):this._getFrom(T)-1;if((L<0||L-this._screenItemsLen<0)&&(L=0),!x&&this._lastFrom===L)return!1;this._lastFrom=L;var D=L+this._cachedItemsLen;(D>A||D+this._cachedItemsLen>A)&&(D=A);var P=v.useFragment?document.createDocumentFragment():[],q=this._scroller;P[v.useFragment?"appendChild":"push"](q);for(var le=L;le0&&arguments[0]!==void 0?arguments[0]:1,v=this._config,w=v.total,T=v.reverse;x<1&&!T&&(x=1);for(var A=x;A0&&this._itemPositions[v]{(function(t,e){"use strict";function i(){n.width=t.innerWidth,n.height=5*c.barThickness;var f=n.getContext("2d");f.shadowBlur=c.shadowBlur,f.shadowColor=c.shadowColor;var d,O=f.createLinearGradient(0,0,n.width,0);for(d in c.barColors)O.addColorStop(d,c.barColors[d]);f.lineWidth=c.barThickness,f.beginPath(),f.moveTo(0,c.barThickness/2),f.lineTo(Math.ceil(r*n.width),c.barThickness/2),f.strokeStyle=O,f.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},u={config:function(f){for(var d in f)c.hasOwnProperty(d)&&(c[d]=f[d])},show:function(f){var d,O;o||(f?l=l||setTimeout(()=>u.show(),f):(o=!0,a!==null&&t.cancelAnimationFrame(a),n||((O=(n=e.createElement("canvas")).style).position="fixed",O.top=O.left=O.right=O.margin=O.padding=0,O.zIndex=100001,O.display="none",c.className&&n.classList.add(c.className),d="resize",f=i,(O=t).addEventListener?O.addEventListener(d,f,!1):O.attachEvent?O.attachEvent("on"+d,f):O["on"+d]=f),n.parentElement||e.body.appendChild(n),n.style.opacity=1,n.style.display="block",u.progress(0),c.autoRun&&function m(){s=t.requestAnimationFrame(m),u.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(f){return f===void 0||(typeof f=="string"&&(f=(0<=f.indexOf("+")||0<=f.indexOf("-")?r:0)+parseFloat(f)),r=1typeof t=="function"?t:function(){return t},dD=typeof self!="undefined"?self:null,Oc=typeof window!="undefined"?window:null,ms=dD||Oc||ms,OD="2.0.0",tr={connecting:0,open:1,closing:2,closed:3},pD=1e4,mD=1e3,Gi={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Tr={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Xg={longpoll:"longpoll",websocket:"websocket"},gD={complete:4},Th=class{constructor(t,e,i,n){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},OS=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},bD=class{constructor(t,e,i){this.state=Gi.closed,this.topic=t,this.params=pc(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Th(this,Tr.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new OS(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Gi.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Gi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Gi.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Gi.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Th(this,Tr.leave,pc({}),this.timeout).send(),this.state=Gi.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Tr.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(Tr.close,t)}onError(t){return this.on(Tr.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e=="undefined"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Th(this,t,function(){return e},i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Gi.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Tr.close,"leave")},i=new Th(this,Tr.leave,pc({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}isMember(t,e,i,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Gi.joining,this.joinPush.resend(t))}trigger(t,e,i,n){let r=this.onMessage(t,e,i,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===t);for(let s=0;s{let a=this.parseJSON(t.responseText);s&&s(a)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,i,n,r,o,s,a){return t.open(e,i,!0),t.timeout=o,t.setRequestHeader("Content-Type",n),t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===gD.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},s&&(t.ontimeout=s),t.send(r),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e?`${e}[${n}]`:n,o=t[n];typeof o=="object"?i.push(this.serialize(o,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},yD=t=>{let e="",i=new Uint8Array(t),n=i.byteLength;for(let r=0;rthis.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Xg.websocket),"$1/"+Xg.longpoll)}endpointURL(){return Ph.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=tr.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===tr.open||this.readyState===tr.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),t=>{if(t){var{status:e,token:i,messages:n}=t;this.token=i}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=tr.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(t){typeof t!="string"&&(t=yD(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",t.join(` -`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let r of this.reqs)r.abort();this.readyState=tr.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,i,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=Ph.request(t,this.endpointURL(),e,i,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var Eh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,n,r,o,s]=JSON.parse(t);return e({join_ref:i,ref:n,topic:r,event:o,payload:s})}},binaryEncode(t){let{join_ref:e,ref:i,event:n,topic:r,payload:o}=t,s=this.META_LENGTH+e.length+i.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,i.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(i,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(r,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(n,f=>l.setUint8(c++,f.charCodeAt(0)));var u=new Uint8Array(a.byteLength+o.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(o),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),n=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(t.slice(s,s+n));s=s+n;let l=i.decode(t.slice(s,s+r));s=s+r;let c=i.decode(t.slice(s,s+o));s=s+o;let u=t.slice(s,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(t.slice(a,a+n));a=a+n;let c=i.decode(t.slice(a,a+r));a=a+r;let u=i.decode(t.slice(a,a+o));a=a+o;let f=i.decode(t.slice(a,a+s));a=a+s;let d=t.slice(a,t.byteLength),O={status:f,response:d};return{join_ref:l,ref:c,topic:u,event:Tr.reply,payload:O}},decodeBroadcast(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=i.decode(t.slice(o,o+n));o=o+n;let a=i.decode(t.slice(o,o+r));o=o+r;let l=t.slice(o,t.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Ch=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||pD,this.transport=e.transport||ms.WebSocket||dc,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||ms&&ms.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Eh.encode.bind(Eh),this.defaultDecoder=Eh.decode.bind(Eh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==dc?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;Oc&&Oc.addEventListener&&(Oc.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),i=this.connectClock)}),Oc.addEventListener("pageshow",n=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(n,r,o)=>{console.log(`${n}: ${r}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=pc(e.params||{}),this.endPoint=`${t}/${Xg.websocket}`,this.vsn=e.vsn||OD,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new OS(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return dc}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Ph.appendParams(Ph.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(t,e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=pc(t)),!this.conn&&(this.longPollFallbackMs&&this.transport!==dc?this.connectWithFallback(dc,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),t(Date.now()-i))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,n=!0,r,o,s=a=>{this.log("transport",`falling back to ${t.name}...`,a),this.off([r,o]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${t.name}`))return s("memorized");this.fallbackTimer=setTimeout(s,e),o=this.onError(a=>{this.log("transport","error",a),n&&!i&&(clearTimeout(this.fallbackTimer),s(a))}),this.onOpen(()=>{if(i=!0,!n)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t.name}`,"true"),this.log("transport",`established ${t.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,e),this.ping(a=>{this.log("transport","connected to primary after",a),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),mD,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(t,e+1)},150*e)}waitForSocketClosed(t,e=1){if(e===5||!this.conn||this.conn.readyState===tr.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(t,e+1)},150*e)}onConnClose(t){let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(t))}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(t,e,i)}),(e===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Tr.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case tr.connecting:return"connecting";case tr.open:return"open";case tr.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new bD(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:n,ref:r,join_ref:o}=t;this.log("push",`${e} ${i} (${o}, ${r})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${i} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;ai.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};var VS="consecutive-reloads",xD=10,vD=5e3,wD=1e4,kD=3e4,ZS=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],Pr="data-phx-component",Rg="data-phx-link",SD="track-static",TD="data-phx-link-state",Ia="data-phx-ref-loading",On="data-phx-ref-src",Ki="data-phx-ref-lock",BS="track-uploads",Cr="data-phx-upload-ref",Zg="data-phx-preflighted-refs",ED="data-phx-done-refs",pS="drop-target",Ng="data-phx-active-refs",Ih="phx:live-file:updated",YS="data-phx-skip",FS="data-phx-id",mS="data-phx-prune",gS="phx-connected",gs="phx-loading",Xa="phx-error",bS="phx-client-error",mc="phx-server-error",xs="data-phx-parent-id",Bg="data-phx-main",So="data-phx-root-id",qg="viewport-top",jg="viewport-bottom",yS="trigger-action",zh="phx-has-focused",PD=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],HS=["checkbox","radio"],Pc="phx-has-submitted",rr="data-phx-session",vs=`[${rr}]`,xS="data-phx-sticky",ys="data-phx-static",Wg="data-phx-readonly",La="data-phx-disabled",vS="disable-with",Uh="data-phx-disable-with-restore",gc="hook",CD="debounce",QD="throttle",Tc="update",Lg="stream",bc="data-phx-stream",_D="key",ir="phxPrivate",wS="auto-recover",Qh="phx:live-socket:debug",Ig="phx:live-socket:profiling",Dg="phx:live-socket:latency-sim",_h="phx:nav-history-position",AD="progress",kS="mounted",SS="__phoenix_reload_status__",$D=1,TS=3,XD=200,RD="phx-",LD=3e4,yc="debounce-trigger",xc="throttled",ES="debounce-prev-key",ID={debounce:300,throttle:300},PS=[Ia,On,Ki],Ah="d",nr="s",zg="r",Ei="c",CS="e",QS="r",_S="t",DD="p",AS="stream",zD=class{constructor(t,e,i){let{chunk_size:n,chunk_timeout:r}=e;this.liveSocket=i,this.entry=t,this.offset=0,this.chunkSize=n,this.chunkTimeout=r,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${t.ref}`,{token:t.metadata()})}error(t){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(t))}upload(){this.uploadChannel.onError(t=>this.error(t)),this.uploadChannel.join().receive("ok",t=>this.readNextChunk()).receive("error",t=>this.error(t))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let t=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return zi("Read error: "+i.target.error)},t.readAsArrayBuffer(e)}pushChunk(t){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",t,this.chunkTimeout).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},zi=(t,e)=>console.error&&console.error(t,e),Er=t=>{let e=typeof t;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(t)};function UD(){let t=new Set,e=document.querySelectorAll("*[id]");for(let i=0,n=e.length;i{t.liveSocket.isDebugEnabled()&&console.log(`${t.id} ${e}: ${i} - `,n)},vc=t=>typeof t=="function"?t:function(){return t},Dh=t=>JSON.parse(JSON.stringify(t)),Ec=(t,e,i)=>{do{if(t.matches(`[${e}]`)&&!t.disabled)return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1&&!(i&&i.isSameNode(t)||t.matches(vs)));return null},Ra=t=>t!==null&&typeof t=="object"&&!(t instanceof Array),ND=(t,e)=>JSON.stringify(t)===JSON.stringify(e),$S=t=>{for(let e in t)return!1;return!0},ko=(t,e)=>t&&e(t),qD=function(t,e,i,n){t.forEach(r=>{new zD(r,i.config,n).upload()})},jD={canPushState(){return typeof history.pushState!="undefined"},dropLocal(t,e,i){return t.removeItem(this.localKey(e,i))},updateLocal(t,e,i,n,r){let o=this.getLocal(t,e,i),s=this.localKey(e,i),a=o===null?n:r(o);return t.setItem(s,JSON.stringify(a)),a},getLocal(t,e,i){return JSON.parse(t.getItem(this.localKey(e,i)))},updateCurrentState(t){this.canPushState()&&history.replaceState(t(history.state||{}),"",window.location.href)},pushState(t,e,i){if(this.canPushState()){if(i!==window.location.href){if(e.type=="redirect"&&e.scroll){let n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[t+"State"](e,"",i||null),window.requestAnimationFrame(()=>{let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)})}}else this.redirect(i)},setCookie(t,e,i){let n=typeof i=="number"?` max-age=${i};`:"";document.cookie=`${t}=${e};${n} path=/`},getCookie(t){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${t}s*=s*([^;]*).*$)|^.*$`),"$1")},deleteCookie(t){document.cookie=`${t}=; max-age=-1; path=/`},redirect(t,e){e&&this.setCookie("__phoenix_flash__",e,60),window.location=t},localKey(t,e){return`${t}-${e}`},getHashTargetEl(t){let e=t.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},Di=jD,bs={byId(t){return document.getElementById(t)||zi(`no id found for ${t}`)},removeClass(t,e){t.classList.remove(e),t.classList.length===0&&t.removeAttribute("class")},all(t,e,i){if(!t)return[];let n=Array.from(t.querySelectorAll(e));return i?n.forEach(i):n},childNodeLength(t){let e=document.createElement("template");return e.innerHTML=t,e.content.childElementCount},isUploadInput(t){return t.type==="file"&&t.getAttribute(Cr)!==null},isAutoUpload(t){return t.hasAttribute("data-phx-auto-upload")},findUploadInputs(t){let e=t.id,i=this.all(document,`input[type="file"][${Cr}][form="${e}"]`);return this.all(t,`input[type="file"][${Cr}]`).concat(i)},findComponentNodeList(t,e){return this.filterWithinSameLiveView(this.all(t,`[${Pr}="${e}"]`),t)},isPhxDestroyed(t){return!!(t.id&&bs.private(t,"destroyed"))},wantsNewTab(t){let e=t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button===1,i=t.target instanceof HTMLAnchorElement&&t.target.hasAttribute("download"),n=t.target.hasAttribute("target")&&t.target.getAttribute("target").toLowerCase()==="_blank",r=t.target.hasAttribute("target")&&!t.target.getAttribute("target").startsWith("_");return e||n||i||r},isUnloadableFormSubmit(t){return t.target&&t.target.getAttribute("method")==="dialog"||t.submitter&&t.submitter.getAttribute("formmethod")==="dialog"?!1:!t.defaultPrevented&&!this.wantsNewTab(t)},isNewPageClick(t,e){let i=t.target instanceof HTMLAnchorElement?t.target.getAttribute("href"):null,n;if(t.defaultPrevented||i===null||this.wantsNewTab(t)||i.startsWith("mailto:")||i.startsWith("tel:")||t.target.isContentEditable)return!1;try{n=new URL(i)}catch(r){try{n=new URL(i,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(t){this.isPhxChild(t)&&t.setAttribute(rr,""),this.putPrivate(t,"destroyed",!0)},findPhxChildrenInFragment(t,e){let i=document.createElement("template");return i.innerHTML=t,this.findPhxChildren(i.content,e)},isIgnored(t,e){return(t.getAttribute(e)||t.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(t,e,i){return t.getAttribute&&i.indexOf(t.getAttribute(e))>=0},findPhxSticky(t){return this.all(t,`[${xS}]`)},findPhxChildren(t,e){return this.all(t,`${vs}[${xs}="${e}"]`)},findExistingParentCIDs(t,e){let i=new Set,n=new Set;return e.forEach(r=>{this.filterWithinSameLiveView(this.all(t,`[${Pr}="${r}"]`),t).forEach(o=>{i.add(r),this.all(o,`[${Pr}]`).map(s=>parseInt(s.getAttribute(Pr))).forEach(s=>n.add(s))})}),n.forEach(r=>i.delete(r)),i},filterWithinSameLiveView(t,e){return e.querySelector(vs)?t.filter(i=>this.withinSameLiveView(i,e)):t},withinSameLiveView(t,e){for(;t=t.parentNode;){if(t.isSameNode(e))return!0;if(t.getAttribute(rr)!==null)return!1}},private(t,e){return t[ir]&&t[ir][e]},deletePrivate(t,e){t[ir]&&delete t[ir][e]},putPrivate(t,e,i){t[ir]||(t[ir]={}),t[ir][e]=i},updatePrivate(t,e,i,n){let r=this.private(t,e);r===void 0?this.putPrivate(t,e,n(i)):this.putPrivate(t,e,n(r))},syncPendingAttrs(t,e){t.hasAttribute(On)&&(ZS.forEach(i=>{t.classList.contains(i)&&e.classList.add(i)}),PS.filter(i=>t.hasAttribute(i)).forEach(i=>{e.setAttribute(i,t.getAttribute(i))}))},copyPrivates(t,e){e[ir]&&(t[ir]=e[ir])},putTitle(t){let e=document.querySelector("title");if(e){let{prefix:i,suffix:n,default:r}=e.dataset,o=typeof t!="string"||t.trim()==="";if(o&&typeof r!="string")return;let s=o?r:t;document.title=`${i||""}${s||""}${n||""}`}else document.title=t},debounce(t,e,i,n,r,o,s,a){let l=t.getAttribute(i),c=t.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let u=l||c;switch(u){case null:return a();case"blur":this.once(t,"debounce-blur")&&t.addEventListener("blur",()=>{s()&&a()});return;default:let f=parseInt(u),d=()=>c?this.deletePrivate(t,xc):a(),O=this.incCycle(t,yc,d);if(isNaN(f))return zi(`invalid throttle/debounce value: ${u}`);if(c){let x=!1;if(e.type==="keydown"){let v=this.private(t,ES);this.putPrivate(t,ES,e.key),x=v!==e.key}if(!x&&this.private(t,xc))return!1;{a();let v=setTimeout(()=>{s()&&this.triggerCycle(t,yc)},f);this.putPrivate(t,xc,v)}}else setTimeout(()=>{s()&&this.triggerCycle(t,yc,O)},f);let m=t.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([x])=>{let v=m.querySelector(`[name="${x}"]`);this.incCycle(v,yc),this.deletePrivate(v,xc)})}),this.once(t,"bind-debounce")&&t.addEventListener("blur",()=>{clearTimeout(this.private(t,xc)),this.triggerCycle(t,yc)})}},triggerCycle(t,e,i){let[n,r]=this.private(t,e);i||(i=n),i===n&&(this.incCycle(t,e),r())},once(t,e){return this.private(t,e)===!0?!1:(this.putPrivate(t,e,!0),!0)},incCycle(t,e,i=function(){}){let[n]=this.private(t,e)||[0,i];return n++,this.putPrivate(t,e,[n,i]),n},maintainPrivateHooks(t,e,i,n){t.hasAttribute&&t.hasAttribute("data-phx-hook")&&!e.hasAttribute("data-phx-hook")&&e.setAttribute("data-phx-hook",t.getAttribute("data-phx-hook")),e.hasAttribute&&(e.hasAttribute(i)||e.hasAttribute(n))&&e.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},putCustomElHook(t,e){t.isConnected?t.setAttribute("data-phx-hook",""):console.error(` +import{a as Xg}from"./chunk-GJ6CDUB5.js";import{a as Y,b as Ee,c as ms,d as OS,e as gi,f as wo,g as hc,i as Xa,j as lt}from"./chunk-MGYUK2XN.js";var ST=wo((nle,kT)=>{"use strict";var jh=Object.prototype.hasOwnProperty,wT=Object.prototype.toString,mT=Object.defineProperty,gT=Object.getOwnPropertyDescriptor,bT=function(e){return typeof Array.isArray=="function"?Array.isArray(e):wT.call(e)==="[object Array]"},yT=function(e){if(!e||wT.call(e)!=="[object Object]")return!1;var i=jh.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&jh.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!n)return!1;var r;for(r in e);return typeof r=="undefined"||jh.call(e,r)},xT=function(e,i){mT&&i.name==="__proto__"?mT(e,i.name,{enumerable:!0,configurable:!0,value:i.newValue,writable:!0}):e[i.name]=i.newValue},vT=function(e,i){if(i==="__proto__")if(jh.call(e,i)){if(gT)return gT(e,i).value}else return;return e[i]};kT.exports=function t(){var e,i,n,r,o,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l{});var tm=wo((em,SR)=>{(function(t,e){typeof em=="object"?SR.exports=em=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(em,function(){var t=t||function(e,i){var n;if(typeof window!="undefined"&&window.crypto&&(n=window.crypto),typeof self!="undefined"&&self.crypto&&(n=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window!="undefined"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global!="undefined"&&global.crypto&&(n=global.crypto),!n&&typeof ms=="function")try{n=kR()}catch(w){}var r=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch(w){}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch(w){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function w(){}return function(T){var A;return w.prototype=T,A=new w,w.prototype=null,A}}(),s={},a=s.lib={},l=a.Base=function(){return{extend:function(w){var T=o(this);return w&&T.mixIn(w),(!T.hasOwnProperty("init")||this.init===T.init)&&(T.init=function(){T.$super.init.apply(this,arguments)}),T.init.prototype=T,T.$super=this,T},create:function(){var w=this.extend();return w.init.apply(w,arguments),w},init:function(){},mixIn:function(w){for(var T in w)w.hasOwnProperty(T)&&(this[T]=w[T]);w.hasOwnProperty("toString")&&(this.toString=w.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=l.extend({init:function(w,T){w=this.words=w||[],T!=i?this.sigBytes=T:this.sigBytes=w.length*4},toString:function(w){return(w||f).stringify(this)},concat:function(w){var T=this.words,A=w.words,L=this.sigBytes,D=w.sigBytes;if(this.clamp(),L%4)for(var P=0;P>>2]>>>24-P%4*8&255;T[L+P>>>2]|=N<<24-(L+P)%4*8}else for(var le=0;le>>2]=A[le>>>2];return this.sigBytes+=D,this},clamp:function(){var w=this.words,T=this.sigBytes;w[T>>>2]&=4294967295<<32-T%4*8,w.length=e.ceil(T/4)},clone:function(){var w=l.clone.call(this);return w.words=this.words.slice(0),w},random:function(w){for(var T=[],A=0;A>>2]>>>24-D%4*8&255;L.push((P>>>4).toString(16)),L.push((P&15).toString(16))}return L.join("")},parse:function(w){for(var T=w.length,A=[],L=0;L>>3]|=parseInt(w.substr(L,2),16)<<24-L%8*4;return new c.init(A,T/2)}},d=u.Latin1={stringify:function(w){for(var T=w.words,A=w.sigBytes,L=[],D=0;D>>2]>>>24-D%4*8&255;L.push(String.fromCharCode(P))}return L.join("")},parse:function(w){for(var T=w.length,A=[],L=0;L>>2]|=(w.charCodeAt(L)&255)<<24-L%4*8;return new c.init(A,T)}},O=u.Utf8={stringify:function(w){try{return decodeURIComponent(escape(d.stringify(w)))}catch(T){throw new Error("Malformed UTF-8 data")}},parse:function(w){return d.parse(unescape(encodeURIComponent(w)))}},m=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(w){typeof w=="string"&&(w=O.parse(w)),this._data.concat(w),this._nDataBytes+=w.sigBytes},_process:function(w){var T,A=this._data,L=A.words,D=A.sigBytes,P=this.blockSize,N=P*4,le=D/N;w?le=e.ceil(le):le=e.max((le|0)-this._minBufferSize,0);var H=le*P,M=e.min(H*4,D);if(H){for(var ie=0;ie{(function(t,e){typeof im=="object"?TR.exports=im=e(tm()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(im,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[];(function(){for(var O=0;O<64;O++)a[O]=e.abs(e.sin(O+1))*4294967296|0})();var l=s.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(O,m){for(var x=0;x<16;x++){var v=m+x,w=O[v];O[v]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var T=this._hash.words,A=O[m+0],L=O[m+1],D=O[m+2],P=O[m+3],N=O[m+4],le=O[m+5],H=O[m+6],M=O[m+7],ie=O[m+8],ne=O[m+9],re=O[m+10],de=O[m+11],pe=O[m+12],ve=O[m+13],j=O[m+14],ue=O[m+15],Z=T[0],C=T[1],W=T[2],oe=T[3];Z=c(Z,C,W,oe,A,7,a[0]),oe=c(oe,Z,C,W,L,12,a[1]),W=c(W,oe,Z,C,D,17,a[2]),C=c(C,W,oe,Z,P,22,a[3]),Z=c(Z,C,W,oe,N,7,a[4]),oe=c(oe,Z,C,W,le,12,a[5]),W=c(W,oe,Z,C,H,17,a[6]),C=c(C,W,oe,Z,M,22,a[7]),Z=c(Z,C,W,oe,ie,7,a[8]),oe=c(oe,Z,C,W,ne,12,a[9]),W=c(W,oe,Z,C,re,17,a[10]),C=c(C,W,oe,Z,de,22,a[11]),Z=c(Z,C,W,oe,pe,7,a[12]),oe=c(oe,Z,C,W,ve,12,a[13]),W=c(W,oe,Z,C,j,17,a[14]),C=c(C,W,oe,Z,ue,22,a[15]),Z=u(Z,C,W,oe,L,5,a[16]),oe=u(oe,Z,C,W,H,9,a[17]),W=u(W,oe,Z,C,de,14,a[18]),C=u(C,W,oe,Z,A,20,a[19]),Z=u(Z,C,W,oe,le,5,a[20]),oe=u(oe,Z,C,W,re,9,a[21]),W=u(W,oe,Z,C,ue,14,a[22]),C=u(C,W,oe,Z,N,20,a[23]),Z=u(Z,C,W,oe,ne,5,a[24]),oe=u(oe,Z,C,W,j,9,a[25]),W=u(W,oe,Z,C,P,14,a[26]),C=u(C,W,oe,Z,ie,20,a[27]),Z=u(Z,C,W,oe,ve,5,a[28]),oe=u(oe,Z,C,W,D,9,a[29]),W=u(W,oe,Z,C,M,14,a[30]),C=u(C,W,oe,Z,pe,20,a[31]),Z=f(Z,C,W,oe,le,4,a[32]),oe=f(oe,Z,C,W,ie,11,a[33]),W=f(W,oe,Z,C,de,16,a[34]),C=f(C,W,oe,Z,j,23,a[35]),Z=f(Z,C,W,oe,L,4,a[36]),oe=f(oe,Z,C,W,N,11,a[37]),W=f(W,oe,Z,C,M,16,a[38]),C=f(C,W,oe,Z,re,23,a[39]),Z=f(Z,C,W,oe,ve,4,a[40]),oe=f(oe,Z,C,W,A,11,a[41]),W=f(W,oe,Z,C,P,16,a[42]),C=f(C,W,oe,Z,H,23,a[43]),Z=f(Z,C,W,oe,ne,4,a[44]),oe=f(oe,Z,C,W,pe,11,a[45]),W=f(W,oe,Z,C,ue,16,a[46]),C=f(C,W,oe,Z,D,23,a[47]),Z=d(Z,C,W,oe,A,6,a[48]),oe=d(oe,Z,C,W,M,10,a[49]),W=d(W,oe,Z,C,j,15,a[50]),C=d(C,W,oe,Z,le,21,a[51]),Z=d(Z,C,W,oe,pe,6,a[52]),oe=d(oe,Z,C,W,P,10,a[53]),W=d(W,oe,Z,C,re,15,a[54]),C=d(C,W,oe,Z,L,21,a[55]),Z=d(Z,C,W,oe,ie,6,a[56]),oe=d(oe,Z,C,W,ue,10,a[57]),W=d(W,oe,Z,C,H,15,a[58]),C=d(C,W,oe,Z,ve,21,a[59]),Z=d(Z,C,W,oe,N,6,a[60]),oe=d(oe,Z,C,W,de,10,a[61]),W=d(W,oe,Z,C,D,15,a[62]),C=d(C,W,oe,Z,ne,21,a[63]),T[0]=T[0]+Z|0,T[1]=T[1]+C|0,T[2]=T[2]+W|0,T[3]=T[3]+oe|0},_doFinalize:function(){var O=this._data,m=O.words,x=this._nDataBytes*8,v=O.sigBytes*8;m[v>>>5]|=128<<24-v%32;var w=e.floor(x/4294967296),T=x;m[(v+64>>>9<<4)+15]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,m[(v+64>>>9<<4)+14]=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,O.sigBytes=(m.length+1)*4,this._process();for(var A=this._hash,L=A.words,D=0;D<4;D++){var P=L[D];L[D]=(P<<8|P>>>24)&16711935|(P<<24|P>>>8)&4278255360}return A},clone:function(){var O=o.clone.call(this);return O._hash=this._hash.clone(),O}});function c(O,m,x,v,w,T,A){var L=O+(m&x|~m&v)+w+A;return(L<>>32-T)+m}function u(O,m,x,v,w,T,A){var L=O+(m&v|x&~v)+w+A;return(L<>>32-T)+m}function f(O,m,x,v,w,T,A){var L=O+(m^x^v)+w+A;return(L<>>32-T)+m}function d(O,m,x,v,w,T,A){var L=O+(x^(m|~v))+w+A;return(L<>>32-T)+m}i.MD5=o._createHelper(l),i.HmacMD5=o._createHmacHelper(l)}(Math),t.MD5})});var CR=wo((nm,PR)=>{(function(t,e){typeof nm=="object"?PR.exports=nm=e(tm()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(nm,function(t){return function(e){var i=t,n=i.lib,r=n.WordArray,o=n.Hasher,s=i.algo,a=[],l=[];(function(){function f(x){for(var v=e.sqrt(x),w=2;w<=v;w++)if(!(x%w))return!1;return!0}function d(x){return(x-(x|0))*4294967296|0}for(var O=2,m=0;m<64;)f(O)&&(m<8&&(a[m]=d(e.pow(O,1/2))),l[m]=d(e.pow(O,1/3)),m++),O++})();var c=[],u=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(f,d){for(var O=this._hash.words,m=O[0],x=O[1],v=O[2],w=O[3],T=O[4],A=O[5],L=O[6],D=O[7],P=0;P<64;P++){if(P<16)c[P]=f[d+P]|0;else{var N=c[P-15],le=(N<<25|N>>>7)^(N<<14|N>>>18)^N>>>3,H=c[P-2],M=(H<<15|H>>>17)^(H<<13|H>>>19)^H>>>10;c[P]=le+c[P-7]+M+c[P-16]}var ie=T&A^~T&L,ne=m&x^m&v^x&v,re=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),de=(T<<26|T>>>6)^(T<<21|T>>>11)^(T<<7|T>>>25),pe=D+de+ie+l[P]+c[P],ve=re+ne;D=L,L=A,A=T,T=w+pe|0,w=v,v=x,x=m,m=pe+ve|0}O[0]=O[0]+m|0,O[1]=O[1]+x|0,O[2]=O[2]+v|0,O[3]=O[3]+w|0,O[4]=O[4]+T|0,O[5]=O[5]+A|0,O[6]=O[6]+L|0,O[7]=O[7]+D|0},_doFinalize:function(){var f=this._data,d=f.words,O=this._nDataBytes*8,m=f.sigBytes*8;return d[m>>>5]|=128<<24-m%32,d[(m+64>>>9<<4)+14]=e.floor(O/4294967296),d[(m+64>>>9<<4)+15]=O,f.sigBytes=d.length*4,this._process(),this._hash},clone:function(){var f=o.clone.call(this);return f._hash=this._hash.clone(),f}});i.SHA256=o._createHelper(u),i.HmacSHA256=o._createHmacHelper(u)}(Math),t.SHA256})});var _R=wo((rm,QR)=>{(function(t,e){typeof rm=="object"?QR.exports=rm=e(tm()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(rm,function(t){return function(){var e=t,i=e.lib,n=i.WordArray,r=e.enc,o=r.Base64={stringify:function(a){var l=a.words,c=a.sigBytes,u=this._map;a.clamp();for(var f=[],d=0;d>>2]>>>24-d%4*8&255,m=l[d+1>>>2]>>>24-(d+1)%4*8&255,x=l[d+2>>>2]>>>24-(d+2)%4*8&255,v=O<<16|m<<8|x,w=0;w<4&&d+w*.75>>6*(3-w)&63));var T=u.charAt(64);if(T)for(;f.length%4;)f.push(T);return f.join("")},parse:function(a){var l=a.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var f=0;f>>6-d%4*2,x=O|m;u[f>>>2]|=x<<24-f%4*8,f++}return n.create(u,f)}}(),t.enc.Base64})});var m7=wo((p7,z2)=>{(function(t){if(typeof p7=="object"&&typeof z2!="undefined")z2.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.HyperList=t()}})(function(){var t,e,i;return function(){function n(r,o,s){function a(u,f){if(!o[u]){if(!r[u]){var d=typeof ms=="function"&&ms;if(!f&&d)return d(u,!0);if(l)return l(u,!0);var O=new Error("Cannot find module '"+u+"'");throw O.code="MODULE_NOT_FOUND",O}var m=o[u]={exports:{}};r[u][0].call(m.exports,function(x){var v=r[u][1][x];return a(v||x)},m,m.exports,n,r,o,s)}return o[u].exports}for(var l=typeof ms=="function"&&ms,c=0;cv._averageHeight){var N=v._renderChunk();v._lastRepaint=L,N!==!1&&typeof w.afterRender=="function"&&w.afterRender()}}};T()}return s(O,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(x,v){var w;if(Object.assign(this._config,c,v),!x||x.nodeType!==1)throw new Error("HyperList requires a valid DOM Node container");this._element=x;var T=this._config,A=this._scroller||T.scroller||document.createElement(T.scrollerTagName||"tr");if(typeof T.useFragment!="boolean"&&(this._config.useFragment=!0),!T.generate)throw new Error("Missing required `generate` function");if(!u(T.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(T.itemHeight)&&!u(T.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());u(T.itemHeight)?this._itemHeights=Array(T.total).fill(T.itemHeight):this._itemHeights=T.itemHeight,Object.keys(c).filter(function(ve){return ve in T}).forEach(function(ve){var j=T[ve],ue=u(j);if(j&&typeof j!="string"&&typeof j!="number"){var Z="Invalid optional `"+ve+"`, expected string or number";throw new Error(Z)}else ue&&(T[ve]=j+"px")});var L=!!T.horizontal,D=T[L?"width":"height"];if(D){var P=u(D),N=P?!1:D.slice(-1)==="%",le=P?D:parseInt(D.replace(/px|%/,""),10),H=window[L?"innerWidth":"innerHeight"];N?this._containerSize=H*le/100:this._containerSize=u(D)?D:le}var M=T.scrollContainer,ie=T.itemHeight*T.total,ne=this._maxElementHeight;ie>ne&&console.warn(["HyperList: The maximum element height",ne+"px has","been exceeded; please reduce your item height."].join(" "));var re={width:""+T.width,height:M?ie+"px":""+T.height,overflow:M?"none":"auto",position:"relative"};O.mergeStyle(x,re),M&&O.mergeStyle(T.scrollContainer,{overflow:"auto"});var de=(w={opacity:"0",position:"absolute"},a(w,L?"height":"width","1px"),a(w,L?"width":"height",ie+"px"),w);O.mergeStyle(A,de),this._scroller||x.appendChild(A);var pe=this._computeScrollPadding();this._scrollPaddingBottom=pe.bottom,this._scrollPaddingTop=pe.top,this._scroller=A,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(T.total).fill(0),this._computePositions(0),this._renderChunk(this._lastRepaint!==null),typeof T.afterRender=="function"&&T.afterRender()}},{key:"_getRow",value:function(x){var v=this._config,w=v.generate(x),T=w.height;if(T!==void 0&&u(T)?(w=w.element,T!==this._itemHeights[x]&&(this._itemHeights[x]=T,this._computePositions(x),this._scrollHeight=this._computeScrollHeight(x))):T=this._itemHeights[x],!w||w.nodeType!==1)throw new Error("Generator did not return a DOM Node for index: "+x);f(w,v.rowClassName||"vrow");var A=this._itemPositions[x]+this._scrollPaddingTop;return O.mergeStyle(w,a({position:"absolute"},v.horizontal?"left":"top",A+"px")),w}},{key:"_getScrollPosition",value:function(){var x=this._config;return typeof x.overrideScrollPosition=="function"?x.overrideScrollPosition():this._element[x.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(x){var v=this._config,w=this._element,T=this._getScrollPosition(),A=v.total,L=v.reverse?this._getReverseFrom(T):this._getFrom(T)-1;if((L<0||L-this._screenItemsLen<0)&&(L=0),!x&&this._lastFrom===L)return!1;this._lastFrom=L;var D=L+this._cachedItemsLen;(D>A||D+this._cachedItemsLen>A)&&(D=A);var P=v.useFragment?document.createDocumentFragment():[],N=this._scroller;P[v.useFragment?"appendChild":"push"](N);for(var le=L;le0&&arguments[0]!==void 0?arguments[0]:1,v=this._config,w=v.total,T=v.reverse;x<1&&!T&&(x=1);for(var A=x;A0&&this._itemPositions[v]{(function(t,e){"use strict";function i(){n.width=t.innerWidth,n.height=5*c.barThickness;var f=n.getContext("2d");f.shadowBlur=c.shadowBlur,f.shadowColor=c.shadowColor;var d,O=f.createLinearGradient(0,0,n.width,0);for(d in c.barColors)O.addColorStop(d,c.barColors[d]);f.lineWidth=c.barThickness,f.beginPath(),f.moveTo(0,c.barThickness/2),f.lineTo(Math.ceil(r*n.width),c.barThickness/2),f.strokeStyle=O,f.stroke()}var n,r,o,s=null,a=null,l=null,c={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},u={config:function(f){for(var d in f)c.hasOwnProperty(d)&&(c[d]=f[d])},show:function(f){var d,O;o||(f?l=l||setTimeout(()=>u.show(),f):(o=!0,a!==null&&t.cancelAnimationFrame(a),n||((O=(n=e.createElement("canvas")).style).position="fixed",O.top=O.left=O.right=O.margin=O.padding=0,O.zIndex=100001,O.display="none",c.className&&n.classList.add(c.className),d="resize",f=i,(O=t).addEventListener?O.addEventListener(d,f,!1):O.attachEvent?O.attachEvent("on"+d,f):O["on"+d]=f),n.parentElement||e.body.appendChild(n),n.style.opacity=1,n.style.display="block",u.progress(0),c.autoRun&&function m(){s=t.requestAnimationFrame(m),u.progress("+"+.05*Math.pow(1-Math.sqrt(r),2))}()))},progress:function(f){return f===void 0||(typeof f=="string"&&(f=(0<=f.indexOf("+")||0<=f.indexOf("-")?r:0)+parseFloat(f)),r=1typeof t=="function"?t:function(){return t},hD=typeof self!="undefined"?self:null,Oc=typeof window!="undefined"?window:null,gs=hD||Oc||gs,dD="2.0.0",ir={connecting:0,open:1,closing:2,closed:3},OD=1e4,pD=1e3,Ki={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Er={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Rg={longpoll:"longpoll",websocket:"websocket"},mD={complete:4},Th=class{constructor(t,e,i,n){this.channel=t,this.event=e,this.payload=i||function(){return{}},this.receivedResp=null,this.timeout=n,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:i}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},pS=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},gD=class{constructor(t,e,i){this.state=Ki.closed,this.topic=t,this.params=pc(e||{}),this.socket=i,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Th(this,Er.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new pS(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=Ki.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(n=>n.send()),this.pushBuffer=[]}),this.joinPush.receive("error",()=>{this.state=Ki.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=Ki.closed,this.socket.remove(this)}),this.onError(n=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,n),this.isJoining()&&this.joinPush.reset(),this.state=Ki.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new Th(this,Er.leave,pc({}),this.timeout).send(),this.state=Ki.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Er.reply,(n,r)=>{this.trigger(this.replyEventName(r),n)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(Er.close,t)}onError(t){return this.on(Er.error,e=>t(e))}on(t,e){let i=this.bindingRef++;return this.bindings.push({event:t,ref:i,callback:e}),i}off(t,e){this.bindings=this.bindings.filter(i=>!(i.event===t&&(typeof e=="undefined"||e===i.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,i=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let n=new Th(this,t,function(){return e},i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=Ki.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Er.close,"leave")},i=new Th(this,Er.leave,pc({}),t);return i.receive("ok",()=>e()).receive("timeout",()=>e()),i.send(),this.canPush()||i.trigger("ok",{}),i}onMessage(t,e,i){return e}isMember(t,e,i,n){return this.topic!==t?!1:n&&n!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:i,joinRef:n}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=Ki.joining,this.joinPush.resend(t))}trigger(t,e,i,n){let r=this.onMessage(t,e,i,n);if(e&&!r)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let o=this.bindings.filter(s=>s.event===t);for(let s=0;s{let a=this.parseJSON(t.responseText);s&&s(a)},o&&(t.ontimeout=o),t.onprogress=()=>{},t.send(n),t}static xhrRequest(t,e,i,n,r,o,s,a){return t.open(e,i,!0),t.timeout=o,t.setRequestHeader("Content-Type",n),t.onerror=()=>a&&a(null),t.onreadystatechange=()=>{if(t.readyState===mD.complete&&a){let l=this.parseJSON(t.responseText);a(l)}},s&&(t.ontimeout=s),t.send(r),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let i=[];for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let r=e?`${e}[${n}]`:n,o=t[n];typeof o=="object"?i.push(this.serialize(o,r)):i.push(encodeURIComponent(r)+"="+encodeURIComponent(o))}return i.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let i=t.match(/\?/)?"&":"?";return`${t}${i}${this.serialize(e)}`}},bD=t=>{let e="",i=new Uint8Array(t),n=i.byteLength;for(let r=0;rthis.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Rg.websocket),"$1/"+Rg.longpoll)}endpointURL(){return Ph.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,i){this.close(t,e,i),this.readyState=ir.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===ir.open||this.readyState===ir.connecting}poll(){this.ajax("GET","application/json",null,()=>this.ontimeout(),t=>{if(t){var{status:e,token:i,messages:n}=t;this.token=i}else e=0;switch(e){case 200:n.forEach(r=>{setTimeout(()=>this.onmessage({data:r}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=ir.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${e}`)}})}send(t){typeof t!="string"&&(t=bD(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t){this.awaitingBatchAck=!0,this.ajax("POST","application/x-ndjson",t.join(` +`),()=>this.onerror("timeout"),e=>{this.awaitingBatchAck=!1,!e||e.status!==200?(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1)):this.batchBuffer.length>0&&(this.batchSend(this.batchBuffer),this.batchBuffer=[])})}close(t,e,i){for(let r of this.reqs)r.abort();this.readyState=ir.closed;let n=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:i});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent!="undefined"?this.onclose(new CloseEvent("close",n)):this.onclose(n)}ajax(t,e,i,n,r){let o,s=()=>{this.reqs.delete(o),n()};o=Ph.request(t,this.endpointURL(),e,i,this.timeout,s,a=>{this.reqs.delete(o),this.isActive()&&r(a)}),this.reqs.add(o)}};var Eh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let i=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(i))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[i,n,r,o,s]=JSON.parse(t);return e({join_ref:i,ref:n,topic:r,event:o,payload:s})}},binaryEncode(t){let{join_ref:e,ref:i,event:n,topic:r,payload:o}=t,s=this.META_LENGTH+e.length+i.length+r.length+n.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),l=new DataView(a),c=0;l.setUint8(c++,this.KINDS.push),l.setUint8(c++,e.length),l.setUint8(c++,i.length),l.setUint8(c++,r.length),l.setUint8(c++,n.length),Array.from(e,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(i,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(r,f=>l.setUint8(c++,f.charCodeAt(0))),Array.from(n,f=>l.setUint8(c++,f.charCodeAt(0)));var u=new Uint8Array(a.byteLength+o.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(o),a.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),i=e.getUint8(0),n=new TextDecoder;switch(i){case this.KINDS.push:return this.decodePush(t,e,n);case this.KINDS.reply:return this.decodeReply(t,e,n);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,n)}},decodePush(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=i.decode(t.slice(s,s+n));s=s+n;let l=i.decode(t.slice(s,s+r));s=s+r;let c=i.decode(t.slice(s,s+o));s=s+o;let u=t.slice(s,t.byteLength);return{join_ref:a,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=e.getUint8(3),s=e.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,l=i.decode(t.slice(a,a+n));a=a+n;let c=i.decode(t.slice(a,a+r));a=a+r;let u=i.decode(t.slice(a,a+o));a=a+o;let f=i.decode(t.slice(a,a+s));a=a+s;let d=t.slice(a,t.byteLength),O={status:f,response:d};return{join_ref:l,ref:c,topic:u,event:Er.reply,payload:O}},decodeBroadcast(t,e,i){let n=e.getUint8(1),r=e.getUint8(2),o=this.HEADER_LENGTH+2,s=i.decode(t.slice(o,o+n));o=o+n;let a=i.decode(t.slice(o,o+r));o=o+r;let l=t.slice(o,t.byteLength);return{join_ref:null,ref:null,topic:s,event:a,payload:l}}},Ch=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||OD,this.transport=e.transport||gs.WebSocket||dc,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null,this.sessionStore=e.sessionStorage||gs&&gs.sessionStorage,this.establishedConnections=0,this.defaultEncoder=Eh.encode.bind(Eh),this.defaultDecoder=Eh.decode.bind(Eh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==dc?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;Oc&&Oc.addEventListener&&(Oc.addEventListener("pagehide",n=>{this.conn&&(this.disconnect(),i=this.connectClock)}),Oc.addEventListener("pageshow",n=>{i===this.connectClock&&(i=null,this.connect())})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=n=>e.rejoinAfterMs?e.rejoinAfterMs(n):[1e3,2e3,5e3][n-1]||1e4,this.reconnectAfterMs=n=>e.reconnectAfterMs?e.reconnectAfterMs(n):[10,50,100,150,200,250,500,1e3,2e3][n-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(n,r,o)=>{console.log(`${n}: ${r}`,o)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=pc(e.params||{}),this.endPoint=`${t}/${Rg.websocket}`,this.vsn=e.vsn||dD,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new pS(()=>{this.teardown(()=>this.connect())},this.reconnectAfterMs)}getLongPollTransport(){return dc}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Ph.appendParams(Ph.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,i){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(t,e,i)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=pc(t)),!this.conn&&(this.longPollFallbackMs&&this.transport!==dc?this.connectWithFallback(dc,this.longPollFallbackMs):this.transportConnect())}log(t,e,i){this.logger&&this.logger(t,e,i)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),i=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let n=this.onMessage(r=>{r.ref===e&&(this.off([n]),t(Date.now()-i))});return!0}transportConnect(){this.connectClock++,this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let i=!1,n=!0,r,o,s=a=>{this.log("transport",`falling back to ${t.name}...`,a),this.off([r,o]),n=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${t.name}`))return s("memorized");this.fallbackTimer=setTimeout(s,e),o=this.onError(a=>{this.log("transport","error",a),n&&!i&&(clearTimeout(this.fallbackTimer),s(a))}),this.onOpen(()=>{if(i=!0,!n)return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${t.name}`,"true"),this.log("transport",`established ${t.name} fallback`);clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(s,e),this.ping(a=>{this.log("transport","connected to primary after",a),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`${this.transport.name} connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach(([,t])=>t())}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.triggerChanError(),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),pD,"heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,i){if(!this.conn)return t&&t();this.waitForBufferDone(()=>{this.conn&&(e?this.conn.close(e,i||""):this.conn.close()),this.waitForSocketClosed(()=>{this.conn&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e=1){if(e===5||!this.conn||!this.conn.bufferedAmount){t();return}setTimeout(()=>{this.waitForBufferDone(t,e+1)},150*e)}waitForSocketClosed(t,e=1){if(e===5||!this.conn||this.conn.readyState===ir.closed){t();return}setTimeout(()=>{this.waitForSocketClosed(t,e+1)},150*e)}onConnClose(t){let e=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),this.clearHeartbeats(),!this.closeWasClean&&e!==1e3&&this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(([,i])=>i(t))}onConnError(t){this.hasLogger()&&this.log("transport",t);let e=this.transport,i=this.establishedConnections;this.stateChangeCallbacks.error.forEach(([,n])=>{n(t,e,i)}),(e===this.transport||i>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(Er.error)})}connectionState(){switch(this.conn&&this.conn.readyState){case ir.connecting:return"connecting";case ir.open:return"open";case ir.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([i])=>t.indexOf(i)===-1)}channel(t,e={}){let i=new gD(t,e,this);return this.channels.push(i),i}push(t){if(this.hasLogger()){let{topic:e,event:i,payload:n,ref:r,join_ref:o}=t;this.log("push",`${e} ${i} (${o}, ${r})`,n)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs))}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:i,event:n,payload:r,ref:o,join_ref:s}=e;o&&o===this.pendingHeartbeatRef&&(this.clearHeartbeats(),this.pendingHeartbeatRef=null,this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${i} ${n} ${o&&"("+o+")"||""}`,r);for(let a=0;ai.topic===t&&(i.isJoined()||i.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};var VS="consecutive-reloads",yD=10,xD=5e3,vD=1e4,wD=3e4,ZS=["phx-click-loading","phx-change-loading","phx-submit-loading","phx-keydown-loading","phx-keyup-loading","phx-blur-loading","phx-focus-loading","phx-hook-loading"],Cr="data-phx-component",Lg="data-phx-link",kD="track-static",SD="data-phx-link-state",Da="data-phx-ref-loading",pn="data-phx-ref-src",qt="data-phx-ref-lock",BS="track-uploads",Qr="data-phx-upload-ref",Bg="data-phx-preflighted-refs",TD="data-phx-done-refs",mS="drop-target",qg="data-phx-active-refs",Ih="phx:live-file:updated",YS="data-phx-skip",FS="data-phx-id",gS="data-phx-prune",bS="phx-connected",bs="phx-loading",Ra="phx-error",yS="phx-client-error",mc="phx-server-error",vs="data-phx-parent-id",Yg="data-phx-main",To="data-phx-root-id",jg="viewport-top",Wg="viewport-bottom",ED="trigger-action",zh="phx-has-focused",PD=["text","textarea","number","email","password","search","tel","url","date","time","datetime-local","color","range"],HS=["checkbox","radio"],Ec="phx-has-submitted",or="data-phx-session",ws=`[${or}]`,xS="data-phx-sticky",xs="data-phx-static",Vg="data-phx-readonly",Ia="data-phx-disabled",vS="disable-with",Uh="data-phx-disable-with-restore",gc="hook",CD="debounce",QD="throttle",Mh="update",Ig="stream",bc="data-phx-stream",_D="key",nr="phxPrivate",wS="auto-recover",Qh="phx:live-socket:debug",Dg="phx:live-socket:profiling",zg="phx:live-socket:latency-sim",_h="phx:nav-history-position",AD="progress",kS="mounted",SS="__phoenix_reload_status__",$D=1,TS=3,XD=200,RD="phx-",LD=3e4,yc="debounce-trigger",xc="throttled",ES="debounce-prev-key",ID={debounce:300,throttle:300},PS=[Da,pn,qt],Ah="d",rr="s",Ug="r",Pi="c",CS="e",QS="r",_S="t",DD="p",AS="stream",zD=class{constructor(t,e,i){let{chunk_size:n,chunk_timeout:r}=e;this.liveSocket=i,this.entry=t,this.offset=0,this.chunkSize=n,this.chunkTimeout=r,this.chunkTimer=null,this.errored=!1,this.uploadChannel=i.channel(`lvu:${t.ref}`,{token:t.metadata()})}error(t){this.errored||(this.uploadChannel.leave(),this.errored=!0,clearTimeout(this.chunkTimer),this.entry.error(t))}upload(){this.uploadChannel.onError(t=>this.error(t)),this.uploadChannel.join().receive("ok",t=>this.readNextChunk()).receive("error",t=>this.error(t))}isDone(){return this.offset>=this.entry.file.size}readNextChunk(){let t=new window.FileReader,e=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=i=>{if(i.target.error===null)this.offset+=i.target.result.byteLength,this.pushChunk(i.target.result);else return Ui("Read error: "+i.target.error)},t.readAsArrayBuffer(e)}pushChunk(t){this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",t,this.chunkTimeout).receive("ok",()=>{this.entry.progress(this.offset/this.entry.file.size*100),this.isDone()||(this.chunkTimer=setTimeout(()=>this.readNextChunk(),this.liveSocket.getLatencySim()||0))}).receive("error",({reason:e})=>this.error(e))}},Ui=(t,e)=>console.error&&console.error(t,e),Pr=t=>{let e=typeof t;return e==="number"||e==="string"&&/^(0|[1-9]\d*)$/.test(t)};function UD(){let t=new Set,e=document.querySelectorAll("*[id]");for(let i=0,n=e.length;i{let n=document.getElementById(i);n&&n.parentElement&&n.parentElement.getAttribute("phx-update")!=="stream"&&e.add(`The stream container with id "${n.parentElement.id}" is missing the phx-update="stream" attribute. Ensure it is set for streams to work properly.`)}),e.forEach(i=>console.error(i))}var ND=(t,e,i,n)=>{t.liveSocket.isDebugEnabled()&&console.log(`${t.id} ${e}: ${i} - `,n)},vc=t=>typeof t=="function"?t:function(){return t},Dh=t=>JSON.parse(JSON.stringify(t)),Tc=(t,e,i)=>{do{if(t.matches(`[${e}]`)&&!t.disabled)return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1&&!(i&&i.isSameNode(t)||t.matches(ws)));return null},La=t=>t!==null&&typeof t=="object"&&!(t instanceof Array),qD=(t,e)=>JSON.stringify(t)===JSON.stringify(e),$S=t=>{for(let e in t)return!1;return!0},So=(t,e)=>t&&e(t),jD=function(t,e,i,n){t.forEach(r=>{new zD(r,i.config,n).upload()})},WD={canPushState(){return typeof history.pushState!="undefined"},dropLocal(t,e,i){return t.removeItem(this.localKey(e,i))},updateLocal(t,e,i,n,r){let o=this.getLocal(t,e,i),s=this.localKey(e,i),a=o===null?n:r(o);return t.setItem(s,JSON.stringify(a)),a},getLocal(t,e,i){return JSON.parse(t.getItem(this.localKey(e,i)))},updateCurrentState(t){this.canPushState()&&history.replaceState(t(history.state||{}),"",window.location.href)},pushState(t,e,i){if(this.canPushState()){if(i!==window.location.href){if(e.type=="redirect"&&e.scroll){let n=history.state||{};n.scroll=e.scroll,history.replaceState(n,"",window.location.href)}delete e.scroll,history[t+"State"](e,"",i||null),window.requestAnimationFrame(()=>{let n=this.getHashTargetEl(window.location.hash);n?n.scrollIntoView():e.type==="redirect"&&window.scroll(0,0)})}}else this.redirect(i)},setCookie(t,e,i){let n=typeof i=="number"?` max-age=${i};`:"";document.cookie=`${t}=${e};${n} path=/`},getCookie(t){return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${t}s*=s*([^;]*).*$)|^.*$`),"$1")},deleteCookie(t){document.cookie=`${t}=; max-age=-1; path=/`},redirect(t,e){e&&this.setCookie("__phoenix_flash__",e,60),window.location=t},localKey(t,e){return`${t}-${e}`},getHashTargetEl(t){let e=t.toString().substring(1);if(e!=="")return document.getElementById(e)||document.querySelector(`a[name="${e}"]`)}},zi=WD,ys={byId(t){return document.getElementById(t)||Ui(`no id found for ${t}`)},removeClass(t,e){t.classList.remove(e),t.classList.length===0&&t.removeAttribute("class")},all(t,e,i){if(!t)return[];let n=Array.from(t.querySelectorAll(e));return i?n.forEach(i):n},childNodeLength(t){let e=document.createElement("template");return e.innerHTML=t,e.content.childElementCount},isUploadInput(t){return t.type==="file"&&t.getAttribute(Qr)!==null},isAutoUpload(t){return t.hasAttribute("data-phx-auto-upload")},findUploadInputs(t){let e=t.id,i=this.all(document,`input[type="file"][${Qr}][form="${e}"]`);return this.all(t,`input[type="file"][${Qr}]`).concat(i)},findComponentNodeList(t,e){return this.filterWithinSameLiveView(this.all(t,`[${Cr}="${e}"]`),t)},isPhxDestroyed(t){return!!(t.id&&ys.private(t,"destroyed"))},wantsNewTab(t){let e=t.ctrlKey||t.shiftKey||t.metaKey||t.button&&t.button===1,i=t.target instanceof HTMLAnchorElement&&t.target.hasAttribute("download"),n=t.target.hasAttribute("target")&&t.target.getAttribute("target").toLowerCase()==="_blank",r=t.target.hasAttribute("target")&&!t.target.getAttribute("target").startsWith("_");return e||n||i||r},isUnloadableFormSubmit(t){return t.target&&t.target.getAttribute("method")==="dialog"||t.submitter&&t.submitter.getAttribute("formmethod")==="dialog"?!1:!t.defaultPrevented&&!this.wantsNewTab(t)},isNewPageClick(t,e){let i=t.target instanceof HTMLAnchorElement?t.target.getAttribute("href"):null,n;if(t.defaultPrevented||i===null||this.wantsNewTab(t)||i.startsWith("mailto:")||i.startsWith("tel:")||t.target.isContentEditable)return!1;try{n=new URL(i)}catch(r){try{n=new URL(i,e)}catch(o){return!0}}return n.host===e.host&&n.protocol===e.protocol&&n.pathname===e.pathname&&n.search===e.search?n.hash===""&&!n.href.endsWith("#"):n.protocol.startsWith("http")},markPhxChildDestroyed(t){this.isPhxChild(t)&&t.setAttribute(or,""),this.putPrivate(t,"destroyed",!0)},findPhxChildrenInFragment(t,e){let i=document.createElement("template");return i.innerHTML=t,this.findPhxChildren(i.content,e)},isIgnored(t,e){return(t.getAttribute(e)||t.getAttribute("data-phx-update"))==="ignore"},isPhxUpdate(t,e,i){return t.getAttribute&&i.indexOf(t.getAttribute(e))>=0},findPhxSticky(t){return this.all(t,`[${xS}]`)},findPhxChildren(t,e){return this.all(t,`${ws}[${vs}="${e}"]`)},findExistingParentCIDs(t,e){let i=new Set,n=new Set;return e.forEach(r=>{this.filterWithinSameLiveView(this.all(t,`[${Cr}="${r}"]`),t).forEach(o=>{i.add(r),this.filterWithinSameLiveView(this.all(o,`[${Cr}]`),o).map(s=>parseInt(s.getAttribute(Cr))).forEach(s=>n.add(s))})}),n.forEach(r=>i.delete(r)),i},filterWithinSameLiveView(t,e){return e.querySelector(ws)?t.filter(i=>this.withinSameLiveView(i,e)):t},withinSameLiveView(t,e){for(;t=t.parentNode;){if(t.isSameNode(e))return!0;if(t.getAttribute(or)!==null)return!1}},private(t,e){return t[nr]&&t[nr][e]},deletePrivate(t,e){t[nr]&&delete t[nr][e]},putPrivate(t,e,i){t[nr]||(t[nr]={}),t[nr][e]=i},updatePrivate(t,e,i,n){let r=this.private(t,e);r===void 0?this.putPrivate(t,e,n(i)):this.putPrivate(t,e,n(r))},syncPendingAttrs(t,e){t.hasAttribute(pn)&&(ZS.forEach(i=>{t.classList.contains(i)&&e.classList.add(i)}),PS.filter(i=>t.hasAttribute(i)).forEach(i=>{e.setAttribute(i,t.getAttribute(i))}))},copyPrivates(t,e){e[nr]&&(t[nr]=e[nr])},putTitle(t){let e=document.querySelector("title");if(e){let{prefix:i,suffix:n,default:r}=e.dataset,o=typeof t!="string"||t.trim()==="";if(o&&typeof r!="string")return;let s=o?r:t;document.title=`${i||""}${s||""}${n||""}`}else document.title=t},debounce(t,e,i,n,r,o,s,a){let l=t.getAttribute(i),c=t.getAttribute(r);l===""&&(l=n),c===""&&(c=o);let u=l||c;switch(u){case null:return a();case"blur":this.once(t,"debounce-blur")&&t.addEventListener("blur",()=>{s()&&a()});return;default:let f=parseInt(u),d=()=>c?this.deletePrivate(t,xc):a(),O=this.incCycle(t,yc,d);if(isNaN(f))return Ui(`invalid throttle/debounce value: ${u}`);if(c){let x=!1;if(e.type==="keydown"){let v=this.private(t,ES);this.putPrivate(t,ES,e.key),x=v!==e.key}if(!x&&this.private(t,xc))return!1;{a();let v=setTimeout(()=>{s()&&this.triggerCycle(t,yc)},f);this.putPrivate(t,xc,v)}}else setTimeout(()=>{s()&&this.triggerCycle(t,yc,O)},f);let m=t.form;m&&this.once(m,"bind-debounce")&&m.addEventListener("submit",()=>{Array.from(new FormData(m).entries(),([x])=>{let v=m.querySelector(`[name="${x}"]`);this.incCycle(v,yc),this.deletePrivate(v,xc)})}),this.once(t,"bind-debounce")&&t.addEventListener("blur",()=>{clearTimeout(this.private(t,xc)),this.triggerCycle(t,yc)})}},triggerCycle(t,e,i){let[n,r]=this.private(t,e);i||(i=n),i===n&&(this.incCycle(t,e),r())},once(t,e){return this.private(t,e)===!0?!1:(this.putPrivate(t,e,!0),!0)},incCycle(t,e,i=function(){}){let[n]=this.private(t,e)||[0,i];return n++,this.putPrivate(t,e,[n,i]),n},maintainPrivateHooks(t,e,i,n){t.hasAttribute&&t.hasAttribute("data-phx-hook")&&!e.hasAttribute("data-phx-hook")&&e.setAttribute("data-phx-hook",t.getAttribute("data-phx-hook")),e.hasAttribute&&(e.hasAttribute(i)||e.hasAttribute(n))&&e.setAttribute("data-phx-hook","Phoenix.InfiniteScroll")},putCustomElHook(t,e){t.isConnected?t.setAttribute("data-phx-hook",""):console.error(` hook attached to non-connected DOM element ensure you are calling createHook within your connectedCallback. ${t.outerHTML} - `),this.putPrivate(t,"custom-el-hook",e)},getCustomElHook(t){return this.private(t,"custom-el-hook")},isUsedInput(t){return t.nodeType===Node.ELEMENT_NODE&&(this.private(t,zh)||this.private(t,Pc))},resetForm(t){Array.from(t.elements).forEach(e=>{this.deletePrivate(e,zh),this.deletePrivate(e,Pc)})},isPhxChild(t){return t.getAttribute&&t.getAttribute(xs)},isPhxSticky(t){return t.getAttribute&&t.getAttribute(xS)!==null},isChildOfAny(t,e){return!!e.find(i=>i.contains(t))},firstPhxChild(t){return this.isPhxChild(t)?t:this.all(t,`[${xs}]`)[0]},dispatchEvent(t,e,i={}){let n=!0;t.nodeName==="INPUT"&&t.type==="file"&&e==="click"&&(n=!1);let s={bubbles:i.bubbles===void 0?n:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=e==="click"?new MouseEvent("click",s):new CustomEvent(e,s);t.dispatchEvent(a)},cloneNode(t,e){if(typeof e=="undefined")return t.cloneNode(!0);{let i=t.cloneNode(!1);return i.innerHTML=e,i}},mergeAttrs(t,e,i={}){let n=new Set(i.exclude||[]),r=i.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;if(n.has(l))l==="value"&&t.value===e.value&&t.setAttribute("value",e.getAttribute(l));else{let c=e.getAttribute(l);t.getAttribute(l)!==c&&(!r||r&&l.startsWith("data-"))&&t.setAttribute(l,c)}}let s=t.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&!PS.includes(l)&&t.removeAttribute(l):e.hasAttribute(l)||t.removeAttribute(l)}},mergeFocusedInput(t,e){t instanceof HTMLSelectElement||bs.mergeAttrs(t,e,{exclude:["value"]}),e.readOnly?t.setAttribute("readonly",!0):t.removeAttribute("readonly")},hasSelectionRange(t){return t.setSelectionRange&&(t.type==="text"||t.type==="textarea")},restoreFocus(t,e,i){if(t instanceof HTMLSelectElement&&t.focus(),!bs.isTextualInput(t))return;t.matches(":focus")||t.focus(),this.hasSelectionRange(t)&&t.setSelectionRange(e,i)},isFormInput(t){return/^(?:input|select|textarea)$/i.test(t.tagName)&&t.type!=="button"},syncAttrsToProps(t){t instanceof HTMLInputElement&&HS.indexOf(t.type.toLocaleLowerCase())>=0&&(t.checked=t.getAttribute("checked")!==null)},isTextualInput(t){return PD.indexOf(t.type)>=0},isNowTriggerFormExternal(t,e){return t.getAttribute&&t.getAttribute(e)!==null&&document.body.contains(t)},cleanChildNodes(t,e){if(bs.isPhxUpdate(t,e,["append","prepend"])){let i=[];t.childNodes.forEach(n=>{n.id||(!(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()==="")&&n.nodeType!==Node.COMMENT_NODE&&zi(`only HTML element tags with an id are allowed inside containers with phx-update. + `),this.putPrivate(t,"custom-el-hook",e)},getCustomElHook(t){return this.private(t,"custom-el-hook")},isUsedInput(t){return t.nodeType===Node.ELEMENT_NODE&&(this.private(t,zh)||this.private(t,Ec))},resetForm(t){Array.from(t.elements).forEach(e=>{this.deletePrivate(e,zh),this.deletePrivate(e,Ec)})},isPhxChild(t){return t.getAttribute&&t.getAttribute(vs)},isPhxSticky(t){return t.getAttribute&&t.getAttribute(xS)!==null},isChildOfAny(t,e){return!!e.find(i=>i.contains(t))},firstPhxChild(t){return this.isPhxChild(t)?t:this.all(t,`[${vs}]`)[0]},dispatchEvent(t,e,i={}){let n=!0;t.nodeName==="INPUT"&&t.type==="file"&&e==="click"&&(n=!1);let s={bubbles:i.bubbles===void 0?n:!!i.bubbles,cancelable:!0,detail:i.detail||{}},a=e==="click"?new MouseEvent("click",s):new CustomEvent(e,s);t.dispatchEvent(a)},cloneNode(t,e){if(typeof e=="undefined")return t.cloneNode(!0);{let i=t.cloneNode(!1);return i.innerHTML=e,i}},mergeAttrs(t,e,i={}){let n=new Set(i.exclude||[]),r=i.isIgnored,o=e.attributes;for(let a=o.length-1;a>=0;a--){let l=o[a].name;if(n.has(l))l==="value"&&t.value===e.value&&t.setAttribute("value",e.getAttribute(l));else{let c=e.getAttribute(l);t.getAttribute(l)!==c&&(!r||r&&l.startsWith("data-"))&&t.setAttribute(l,c)}}let s=t.attributes;for(let a=s.length-1;a>=0;a--){let l=s[a].name;r?l.startsWith("data-")&&!e.hasAttribute(l)&&!PS.includes(l)&&t.removeAttribute(l):e.hasAttribute(l)||t.removeAttribute(l)}},mergeFocusedInput(t,e){t instanceof HTMLSelectElement||ys.mergeAttrs(t,e,{exclude:["value"]}),e.readOnly?t.setAttribute("readonly",!0):t.removeAttribute("readonly")},hasSelectionRange(t){return t.setSelectionRange&&(t.type==="text"||t.type==="textarea")},restoreFocus(t,e,i){if(t instanceof HTMLSelectElement&&t.focus(),!ys.isTextualInput(t))return;t.matches(":focus")||t.focus(),this.hasSelectionRange(t)&&t.setSelectionRange(e,i)},isFormInput(t){return/^(?:input|select|textarea)$/i.test(t.tagName)&&t.type!=="button"},syncAttrsToProps(t){t instanceof HTMLInputElement&&HS.indexOf(t.type.toLocaleLowerCase())>=0&&(t.checked=t.getAttribute("checked")!==null)},isTextualInput(t){return PD.indexOf(t.type)>=0},isNowTriggerFormExternal(t,e){return t.getAttribute&&t.getAttribute(e)!==null&&document.body.contains(t)},cleanChildNodes(t,e){if(ys.isPhxUpdate(t,e,["append","prepend"])){let i=[];t.childNodes.forEach(n=>{n.id||(!(n.nodeType===Node.TEXT_NODE&&n.nodeValue.trim()==="")&&n.nodeType!==Node.COMMENT_NODE&&Ui(`only HTML element tags with an id are allowed inside containers with phx-update. removing illegal node: "${(n.outerHTML||n.nodeValue).trim()}" -`),i.push(n))}),i.forEach(n=>n.remove())}},replaceRootContainer(t,e,i){let n=new Set(["id",rr,ys,Bg,So]);if(t.tagName.toLowerCase()===e.toLowerCase())return Array.from(t.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>t.removeAttribute(r.name)),Object.keys(i).filter(r=>!n.has(r.toLowerCase())).forEach(r=>t.setAttribute(r,i[r])),t;{let r=document.createElement(e);return Object.keys(i).forEach(o=>r.setAttribute(o,i[o])),n.forEach(o=>r.setAttribute(o,t.getAttribute(o))),r.innerHTML=t.innerHTML,t.replaceWith(r),r}},getSticky(t,e,i){let n=(bs.private(t,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof i=="function"?i():i},deleteSticky(t,e){this.updatePrivate(t,"sticky",[],i=>i.filter(([n,r])=>n!==e))},putSticky(t,e,i){let n=i(t);this.updatePrivate(t,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,i,n]:r.push([e,i,n]),r})},applyStickyOperations(t){let e=bs.private(t,"sticky");e&&e.forEach(([i,n,r])=>this.putSticky(t,i,n))}},H=bs,wc=class{static isActive(t,e){let i=e._phxRef===void 0,r=t.getAttribute(Ng).split(",").indexOf(Kt.genFileRef(e))>=0;return e.size>0&&(i||r)}static isPreflighted(t,e){return t.getAttribute(Zg).split(",").indexOf(Kt.genFileRef(e))>=0&&this.isActive(t,e)}static isPreflightInProgress(t){return t._preflightInProgress===!0}static markPreflightInProgress(t){t._preflightInProgress=!0}constructor(t,e,i,n){this.ref=Kt.genFileRef(e),this.fileEl=t,this.file=e,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Ih,this._onElUpdated),this.autoUpload=n}metadata(){return this.meta}progress(t){this._progress=Math.floor(t),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Kt.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(t="failed"){this.fileEl.removeEventListener(Ih,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:t}),this.isAutoUpload()||Kt.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(t){this._onDone=()=>{this.fileEl.removeEventListener(Ih,this._onElUpdated),t()}}onElUpdated(){this.fileEl.getAttribute(Ng).split(",").indexOf(this.ref)===-1&&(Kt.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(t){if(this.meta.uploader){let e=t[this.meta.uploader]||zi(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:qD}}zipPostFlight(t){this.meta=t.entries[this.ref],this.meta||zi(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:t})}},WD=0,Kt=class Vg{static genFileRef(e){let i=e._phxRef;return i!==void 0?i:(e._phxRef=(WD++).toString(),e._phxRef)}static getEntryDataURL(e,i,n){let r=this.activeFiles(e).find(o=>this.genFileRef(o)===i);n(URL.createObjectURL(r))}static hasUploadsInProgress(e){let i=0;return H.findUploadInputs(e).forEach(n=>{n.getAttribute(Zg)!==n.getAttribute(ED)&&i++}),i>0}static serializeUploads(e){let i=this.activeFiles(e),n={};return i.forEach(r=>{let o={path:e.name},s=e.getAttribute(Cr);n[s]=n[s]||[],o.ref=this.genFileRef(r),o.last_modified=r.lastModified,o.name=r.name||o.ref,o.relative_path=r.webkitRelativePath,o.type=r.type,o.size=r.size,typeof r.meta=="function"&&(o.meta=r.meta()),n[s].push(o)}),n}static clearFiles(e){e.value=null,e.removeAttribute(Cr),H.putPrivate(e,"files",[])}static untrackFile(e,i){H.putPrivate(e,"files",H.private(e,"files").filter(n=>!Object.is(n,i)))}static trackFiles(e,i,n){if(e.getAttribute("multiple")!==null){let r=i.filter(o=>!this.activeFiles(e).find(s=>Object.is(s,o)));H.updatePrivate(e,"files",[],o=>o.concat(r)),e.value=null}else n&&n.files.length>0&&(e.files=n.files),H.putPrivate(e,"files",i)}static activeFileInputs(e){let i=H.findUploadInputs(e);return Array.from(i).filter(n=>n.files&&this.activeFiles(n).length>0)}static activeFiles(e){return(H.private(e,"files")||[]).filter(i=>wc.isActive(e,i))}static inputsAwaitingPreflight(e){let i=H.findUploadInputs(e);return Array.from(i).filter(n=>this.filesAwaitingPreflight(n).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(i=>!wc.isPreflighted(e,i)&&!wc.isPreflightInProgress(i))}static markPreflightInProgress(e){e.forEach(i=>wc.markPreflightInProgress(i.file))}constructor(e,i,n){this.autoUpload=H.isAutoUpload(e),this.view=i,this.onComplete=n,this._entries=Array.from(Vg.filesAwaitingPreflight(e)||[]).map(r=>new wc(e,r,i,this.autoUpload)),Vg.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(e,i,n){this._entries=this._entries.map(o=>(o.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(o.zipPostFlight(e),o.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),o));let r=this._entries.reduce((o,s)=>{if(!s.meta)return o;let{name:a,callback:l}=s.uploader(n.uploaders);return o[a]=o[a]||{callback:l,entries:[]},o[a].entries.push(s),o},{});for(let o in r){let{callback:s,entries:a}=r[o];s(a,i,e,n)}}},VD={anyOf(t,e){return e.find(i=>t instanceof i)},isFocusable(t,e){return t instanceof HTMLAnchorElement&&t.rel!=="ignore"||t instanceof HTMLAreaElement&&t.href!==void 0||!t.disabled&&this.anyOf(t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||t instanceof HTMLIFrameElement||t.tabIndex>0||!e&&t.getAttribute("tabindex")!==null&&t.getAttribute("aria-hidden")!=="true"},attemptFocus(t,e){if(this.isFocusable(t,e))try{t.focus()}catch(i){}return!!document.activeElement&&document.activeElement.isSameNode(t)},focusFirstInteractive(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(t){let e=t.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Da=VD,GS={LiveFileUpload:{activeRefs(){return this.el.getAttribute(Ng)},preflightedRefs(){return this.el.getAttribute(Zg)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let t=this.preflightedRefs();this.preflightedWas!==t&&(this.preflightedWas=t,t===""&&this.__view().cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(Ih))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Cr)),Kt.getEntryDataURL(this.inputEl,this.ref,t=>{this.url=t,this.el.src=t})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",()=>Da.focusLast(this.el)),this.focusEnd.addEventListener("focus",()=>Da.focusFirst(this.el)),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Da.focusFirst(this.el)}}},KS=t=>["HTML","BODY"].indexOf(t.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(t).overflowY)>=0?t:KS(t.parentElement),XS=t=>t?t.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,Yg=t=>t?t.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,Fg=t=>t?t.getBoundingClientRect().top:0,ZD=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Fg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Yg(e)},BD=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.bottom)>=Fg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.bottom)<=Yg(e)},RS=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Fg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Yg(e)};GS.InfiniteScroll={mounted(){this.scrollContainer=KS(this.el);let t=XS(this.scrollContainer),e=!1,i=500,n=null,r=this.throttle(i,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(i,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{RS(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),s=this.throttle(i,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{RS(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=a=>{let l=XS(this.scrollContainer);if(n)return t=l,n();let c=this.el.getBoundingClientRect(),u=this.el.getAttribute(this.liveSocket.binding("viewport-top")),f=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),d=this.el.lastElementChild,O=this.el.firstElementChild,m=lt;m&&u&&!e&&c.top>=0?(e=!0,r(u,O)):x&&e&&c.top<=0&&(e=!1),u&&m&&ZD(O,this.scrollContainer)?o(u,O):f&&x&&BD(d,this.scrollContainer)&&s(f,d),t=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(t,e){let i=0,n;return(...r)=>{let o=Date.now(),s=t-(o-i);s<=0||s>t?(n&&(clearTimeout(n),n=null),i=o,e(...r)):n||(n=setTimeout(()=>{i=Date.now(),n=null,e(...r)},s))}}};var YD=GS,FD=class{constructor(t){this.el=t,this.loadingRef=t.hasAttribute(Ia)?parseInt(t.getAttribute(Ia),10):null,this.lockRef=t.hasAttribute(Ki)?parseInt(t.getAttribute(Ki),10):null}maybeUndo(t,e,i){this.isWithin(t)&&(this.undoLocks(t,e,i),this.undoLoading(t,e),this.isFullyResolvedBy(t)&&this.el.removeAttribute(On))}isWithin(t){return!(this.loadingRef!==null&&this.loadingRef>t&&this.lockRef!==null&&this.lockRef>t)}undoLocks(t,e,i){if(!this.isLockUndoneBy(t))return;let n=H.private(this.el,Ki);n&&(i(n),H.deletePrivate(this.el,Ki)),this.el.removeAttribute(Ki);let r={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${this.lockRef}`,r))}undoLoading(t,e){if(!this.isLoadingUndoneBy(t)){this.canUndoLoading(t)&&this.el.classList.contains("phx-submit-loading")&&this.el.classList.remove("phx-change-loading");return}if(this.canUndoLoading(t)){this.el.removeAttribute(Ia);let i=this.el.getAttribute(La),n=this.el.getAttribute(Wg);n!==null&&(this.el.readOnly=n==="true",this.el.removeAttribute(Wg)),i!==null&&(this.el.disabled=i==="true",this.el.removeAttribute(La));let r=this.el.getAttribute(Uh);r!==null&&(this.el.innerText=r,this.el.removeAttribute(Uh));let o={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${this.loadingRef}`,o))}ZS.forEach(i=>{(i!=="phx-submit-loading"||this.canUndoLoading(t))&&H.removeClass(this.el,i)})}isLoadingUndoneBy(t){return this.loadingRef===null?!1:this.loadingRef<=t}isLockUndoneBy(t){return this.lockRef===null?!1:this.lockRef<=t}isFullyResolvedBy(t){return(this.loadingRef===null||this.loadingRef<=t)&&(this.lockRef===null||this.lockRef<=t)}canUndoLoading(t){return this.lockRef===null||this.lockRef<=t}},HD=class{constructor(t,e,i){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(t.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=i,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let t=H.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?ko(document.getElementById(e.previousElementId),i=>{ko(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",n)})}):ko(document.getElementById(e.elementId),i=>{i.previousElementSibling==null||t.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{ko(document.getElementById(e),i=>t.insertAdjacentElement("afterbegin",i))})}},LS=11;function GD(t,e){var i=e.attributes,n,r,o,s,a;if(!(e.nodeType===LS||t.nodeType===LS)){for(var l=i.length-1;l>=0;l--)n=i[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=t.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),t.setAttributeNS(o,r,s))):(a=t.getAttribute(r),a!==s&&t.setAttribute(r,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)n=c[u],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||t.removeAttributeNS(o,r)):e.hasAttribute(r)||t.removeAttribute(r)}}var $h,KD="http://www.w3.org/1999/xhtml",Ui=typeof document=="undefined"?void 0:document,JD=!!Ui&&"content"in Ui.createElement("template"),e8=!!Ui&&Ui.createRange&&"createContextualFragment"in Ui.createRange();function t8(t){var e=Ui.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function i8(t){$h||($h=Ui.createRange(),$h.selectNode(Ui.body));var e=$h.createContextualFragment(t);return e.childNodes[0]}function n8(t){var e=Ui.createElement("body");return e.innerHTML=t,e.childNodes[0]}function r8(t){return t=t.trim(),JD?t8(t):e8?i8(t):n8(t)}function Xh(t,e){var i=t.nodeName,n=e.nodeName,r,o;return i===n?!0:(r=i.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?i===n.toUpperCase():o<=90&&r>=97?n===i.toUpperCase():!1)}function o8(t,e){return!e||e===KD?Ui.createElement(t):Ui.createElementNS(e,t)}function s8(t,e){for(var i=t.firstChild;i;){var n=i.nextSibling;e.appendChild(i),i=n}return e}function Ug(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var IS={OPTION:function(t,e){var i=t.parentNode;if(i){var n=i.nodeName.toUpperCase();n==="OPTGROUP"&&(i=i.parentNode,n=i&&i.nodeName.toUpperCase()),n==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Ug(t,e,"selected")},INPUT:function(t,e){Ug(t,e,"checked"),Ug(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var n=t.firstChild;if(n){var r=n.nodeValue;if(r==i||!i&&r==t.placeholder)return;n.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,n=0,r=t.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){i=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}t.selectedIndex=i}}},kc=1,DS=11,zS=3,US=8;function wo(){}function a8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function l8(t){return function(i,n,r){if(r||(r={}),typeof n=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=n;n=Ui.createElement("html"),n.innerHTML=o}else n=r8(n);else n.nodeType===DS&&(n=n.firstElementChild);var s=r.getNodeKey||a8,a=r.onBeforeNodeAdded||wo,l=r.onNodeAdded||wo,c=r.onBeforeElUpdated||wo,u=r.onElUpdated||wo,f=r.onBeforeNodeDiscarded||wo,d=r.onNodeDiscarded||wo,O=r.onBeforeElChildrenUpdated||wo,m=r.skipFromChildren||wo,x=r.addChild||function(j,ue){return j.appendChild(ue)},v=r.childrenOnly===!0,w=Object.create(null),T=[];function A(j){T.push(j)}function L(j,ue){if(j.nodeType===kc)for(var Z=j.firstChild;Z;){var C=void 0;ue&&(C=s(Z))?A(C):(d(Z),Z.firstChild&&L(Z,ue)),Z=Z.nextSibling}}function D(j,ue,Z){f(j)!==!1&&(ue&&ue.removeChild(j),d(j),L(j,Z))}function P(j){if(j.nodeType===kc||j.nodeType===DS)for(var ue=j.firstChild;ue;){var Z=s(ue);Z&&(w[Z]=ue),P(ue),ue=ue.nextSibling}}P(i);function q(j){l(j);for(var ue=j.firstChild;ue;){var Z=ue.nextSibling,C=s(ue);if(C){var W=w[C];W&&Xh(ue,W)?(ue.parentNode.replaceChild(W,ue),G(W,ue)):q(ue)}else q(ue);ue=Z}}function le(j,ue,Z){for(;ue;){var C=ue.nextSibling;(Z=s(ue))?A(Z):D(ue,j,!0),ue=C}}function G(j,ue,Z){var C=s(ue);if(C&&delete w[C],!Z){var W=c(j,ue);if(W===!1||(W instanceof HTMLElement&&(j=W,P(j)),t(j,ue),u(j),O(j,ue)===!1))return}j.nodeName!=="TEXTAREA"?M(j,ue):IS.TEXTAREA(j,ue)}function M(j,ue){var Z=m(j,ue),C=ue.firstChild,W=j.firstChild,oe,I,Ne,We,Ve;e:for(;C;){for(We=C.nextSibling,oe=s(C);!Z&&W;){if(Ne=W.nextSibling,C.isSameNode&&C.isSameNode(W)){C=We,W=Ne;continue e}I=s(W);var Et=W.nodeType,Xe=void 0;if(Et===C.nodeType&&(Et===kc?(oe?oe!==I&&((Ve=w[oe])?Ne===Ve?Xe=!1:(j.insertBefore(Ve,W),I?A(I):D(W,j,!0),W=Ve,I=s(W)):Xe=!1):I&&(Xe=!1),Xe=Xe!==!1&&Xh(W,C),Xe&&G(W,C)):(Et===zS||Et==US)&&(Xe=!0,W.nodeValue!==C.nodeValue&&(W.nodeValue=C.nodeValue))),Xe){C=We,W=Ne;continue e}I?A(I):D(W,j,!0),W=Ne}if(oe&&(Ve=w[oe])&&Xh(Ve,C))Z||x(j,Ve),G(Ve,C);else{var Rt=a(C);Rt!==!1&&(Rt&&(C=Rt),C.actualize&&(C=C.actualize(j.ownerDocument||Ui)),x(j,C),q(C))}C=We,W=Ne}le(j,W,I);var Lt=IS[j.nodeName];Lt&&Lt(j,ue)}var ie=i,ne=ie.nodeType,re=n.nodeType;if(!v){if(ne===kc)re===kc?Xh(i,n)||(d(i),ie=s8(i,o8(n.nodeName,n.namespaceURI))):ie=n;else if(ne===zS||ne===US){if(re===ne)return ie.nodeValue!==n.nodeValue&&(ie.nodeValue=n.nodeValue),ie;ie=n}}if(ie===n)d(i);else{if(n.isSameNode&&n.isSameNode(ie))return;if(G(ie,n,v),T)for(var de=0,pe=T.length;de{if(H.syncPendingAttrs(l,c),!t.isSameNode(l)&&l.hasAttribute(Ki)||H.isIgnored(l,s))return!1;if(n&&n.isSameNode(l)&&H.isFormInput(l))return H.mergeFocusedInput(l,c),!1;H.isNowTriggerFormExternal(c,i.binding(yS))&&(a=c)}}),a&&(i.unload(),Object.getPrototypeOf(a).submit.call(a)),i.silenceEvents(()=>H.restoreFocus(n,r,o))}constructor(t,e,i,n,r,o){this.view=t,this.liveSocket=t.liveSocket,this.container=e,this.id=i,this.rootID=t.root.id,this.html=n,this.streams=r,this.streamInserts={},this.streamComponentRestore={},this.targetCID=o,this.cidPatch=Er(this.targetCID),this.pendingRemoves=[],this.phxRemove=this.liveSocket.binding("remove"),this.targetContainer=this.isCIDPatch()?this.targetCIDContainer(n):e,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[],aftertransitionsDiscarded:[]}}before(t,e){this.callbacks[`before${t}`].push(e)}after(t,e){this.callbacks[`after${t}`].push(e)}trackBefore(t,...e){this.callbacks[`before${t}`].forEach(i=>i(...e))}trackAfter(t,...e){this.callbacks[`after${t}`].forEach(i=>i(...e))}markPrunableContentForRemoval(){let t=this.liveSocket.binding(Tc);H.all(this.container,`[${t}=append] > *, [${t}=prepend] > *`,e=>{e.setAttribute(mS,"")})}perform(t){let{view:e,liveSocket:i,html:n,container:r,targetContainer:o}=this;if(this.isCIDPatch()&&!o)return;let s=i.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&H.hasSelectionRange(s)?s:{},c=i.binding(Tc),u=i.binding(qg),f=i.binding(jg),d=i.binding(yS),O=[],m=[],x=[],v=null;function w(T,A,L=!1){let D={childrenOnly:T.getAttribute(Pr)===null&&!L,getNodeKey:P=>H.isPhxDestroyed(P)?null:t?P.id:P.id||P.getAttribute&&P.getAttribute(FS),skipFromChildren:P=>P.getAttribute(c)===Lg,addChild:(P,q)=>{let{ref:le,streamAt:G}=this.getStreamInsert(q);if(le===void 0)return P.appendChild(q);if(this.setStreamRef(q,le),G===0)P.insertAdjacentElement("afterbegin",q);else if(G===-1){let M=P.lastElementChild;if(M&&!M.hasAttribute(bc)){let ie=Array.from(P.children).find(ne=>!ne.hasAttribute(bc));P.insertBefore(q,ie)}else P.appendChild(q)}else if(G>0){let M=Array.from(P.children)[G];P.insertBefore(q,M)}},onBeforeNodeAdded:P=>{H.maintainPrivateHooks(P,P,u,f),this.trackBefore("added",P);let q=P;return this.streamComponentRestore[P.id]&&(q=this.streamComponentRestore[P.id],delete this.streamComponentRestore[P.id],w.call(this,q,P,!0)),q},onNodeAdded:P=>{P.getAttribute&&this.maybeReOrderStream(P,!0),P instanceof HTMLImageElement&&P.srcset?P.srcset=P.srcset:P instanceof HTMLVideoElement&&P.autoplay&&P.play(),H.isNowTriggerFormExternal(P,d)&&(v=P),(H.isPhxChild(P)&&e.ownsElement(P)||H.isPhxSticky(P)&&e.ownsElement(P.parentNode))&&this.trackAfter("phxChildAdded",P),O.push(P)},onNodeDiscarded:P=>this.onNodeDiscarded(P),onBeforeNodeDiscarded:P=>P.getAttribute&&P.getAttribute(mS)!==null?!0:!(P.parentElement!==null&&P.id&&H.isPhxUpdate(P.parentElement,c,[Lg,"append","prepend"])||this.maybePendingRemove(P)||this.skipCIDSibling(P)),onElUpdated:P=>{H.isNowTriggerFormExternal(P,d)&&(v=P),m.push(P),this.maybeReOrderStream(P,!1)},onBeforeElUpdated:(P,q)=>{if(P.id&&P.isSameNode(T)&&P.id!==q.id)return D.onNodeDiscarded(P),P.replaceWith(q),D.onNodeAdded(q);if(H.syncPendingAttrs(P,q),H.maintainPrivateHooks(P,q,u,f),H.cleanChildNodes(q,c),this.skipCIDSibling(q))return this.maybeReOrderStream(P),!1;if(H.isPhxSticky(P))return[rr,ys,So].map(M=>[M,P.getAttribute(M),q.getAttribute(M)]).forEach(([M,ie,ne])=>{ne&&ie!==ne&&P.setAttribute(M,ne)}),!1;if(H.isIgnored(P,c)||P.form&&P.form.isSameNode(v))return this.trackBefore("updated",P,q),H.mergeAttrs(P,q,{isIgnored:H.isIgnored(P,c)}),m.push(P),H.applyStickyOperations(P),!1;if(P.type==="number"&&P.validity&&P.validity.badInput)return!1;let le=s&&P.isSameNode(s)&&H.isFormInput(P),G=le&&this.isChangedSelect(P,q);if(P.hasAttribute(On)){H.isUploadInput(P)&&(H.mergeAttrs(P,q,{isIgnored:!0}),this.trackBefore("updated",P,q),m.push(P)),H.applyStickyOperations(P);let ie=P.hasAttribute(Ki)?H.private(P,Ki)||P.cloneNode(!0):null;ie&&(H.putPrivate(P,Ki,ie),le||(P=ie))}if(H.isPhxChild(q)){let M=P.getAttribute(rr);return H.mergeAttrs(P,q,{exclude:[ys]}),M!==""&&P.setAttribute(rr,M),P.setAttribute(So,this.rootID),H.applyStickyOperations(P),!1}return H.copyPrivates(q,P),le&&P.type!=="hidden"&&!G?(this.trackBefore("updated",P,q),H.mergeFocusedInput(P,q),H.syncAttrsToProps(P),m.push(P),H.applyStickyOperations(P),!1):(G&&P.blur(),H.isPhxUpdate(q,c,["append","prepend"])&&x.push(new HD(P,q,q.getAttribute(c))),H.syncAttrsToProps(q),H.applyStickyOperations(q),this.trackBefore("updated",P,q),P)}};MS(T,A,D)}return this.trackBefore("added",r),this.trackBefore("updated",r,r),i.time("morphdom",()=>{this.streams.forEach(([T,A,L,D])=>{A.forEach(([P,q,le])=>{this.streamInserts[P]={ref:T,streamAt:q,limit:le,reset:D}}),D!==void 0&&H.all(r,`[${bc}="${T}"]`,P=>{this.removeStreamChildElement(P)}),L.forEach(P=>{let q=r.querySelector(`[id="${P}"]`);q&&this.removeStreamChildElement(q)})}),t&&H.all(this.container,`[${c}=${Lg}]`,T=>{this.liveSocket.owner(T,A=>{A===this.view&&Array.from(T.children).forEach(L=>{this.removeStreamChildElement(L)})})}),w.call(this,o,n)}),i.isDebugEnabled()&&(UD(),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. -`,T)})),x.length>0&&i.time("post-morph append/prepend restoration",()=>{x.forEach(T=>T.perform())}),i.silenceEvents(()=>H.restoreFocus(s,a,l)),H.dispatchEvent(document,"phx:update"),O.forEach(T=>this.trackAfter("added",T)),m.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),v&&(i.unload(),Object.getPrototypeOf(v).submit.call(v)),!0}onNodeDiscarded(t){(H.isPhxChild(t)||H.isPhxSticky(t))&&this.liveSocket.destroyViewByEl(t),this.trackAfter("discarded",t)}maybePendingRemove(t){return t.getAttribute&&t.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(t),!0):!1}removeStreamChildElement(t){this.streamInserts[t.id]?(this.streamComponentRestore[t.id]=t,t.remove()):this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t))}getStreamInsert(t){return(t.id?this.streamInserts[t.id]:{})||{}}setStreamRef(t,e){H.putSticky(t,bc,i=>i.setAttribute(bc,e))}maybeReOrderStream(t,e){let{ref:i,streamAt:n,reset:r}=this.getStreamInsert(t);if(n!==void 0&&(this.setStreamRef(t,i),!(!r&&!e)&&t.parentElement)){if(n===0)t.parentElement.insertBefore(t,t.parentElement.firstElementChild);else if(n>0){let o=Array.from(t.parentElement.children),s=o.indexOf(t);if(n>=o.length-1)t.parentElement.appendChild(t);else{let a=o[n];s>n?t.parentElement.insertBefore(t,a):t.parentElement.insertBefore(t,a.nextElementSibling)}}this.maybeLimitStream(t)}}maybeLimitStream(t){let{limit:e}=this.getStreamInsert(t),i=e!==null&&Array.from(t.parentElement.children);e&&e<0&&i.length>e*-1?i.slice(0,i.length+e).forEach(n=>this.removeStreamChildElement(n)):e&&e>=0&&i.length>e&&i.slice(e).forEach(n=>this.removeStreamChildElement(n))}transitionPendingRemoves(){let{pendingRemoves:t,liveSocket:e}=this;t.length>0&&e.transitionRemoves(t,!1,()=>{t.forEach(i=>{let n=H.firstPhxChild(i);n&&e.destroyViewByEl(n),i.remove()}),this.trackAfter("transitionsDiscarded",t)})}isChangedSelect(t,e){return!(t instanceof HTMLSelectElement)||t.multiple?!1:t.options.length!==e.options.length?!0:(e.value=t.value,!t.isEqualNode(e))}isCIDPatch(){return this.cidPatch}skipCIDSibling(t){return t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(YS)}targetCIDContainer(t){if(!this.isCIDPatch())return;let[e,...i]=H.findComponentNodeList(this.container,this.targetCID);return i.length===0&&H.childNodeLength(t)===1?e:e&&e.parentNode}indexOf(t,e){return Array.from(t.children).indexOf(e)}},u8=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),f8=new Set(["'",'"']),NS=(t,e,i)=>{let n=0,r=!1,o,s,a,l,c,u,f=t.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(f===null)throw new Error(`malformed html ${t}`);for(n=f[0].length,o=f[1],a=f[2],l=n,n;n";n++)if(t.charAt(n)==="="){let m=t.slice(n-3,n)===" id";n++;let x=t.charAt(n);if(f8.has(x)){let v=n;for(n++,n;n=o.length+a.length;){let m=t.charAt(d);if(r)m==="-"&&t.slice(d-3,d)===""&&t.slice(d-2,d)==="--")r=!0,d-=3;else{if(m===">")break;d-=1}}s=t.slice(d+1,t.length);let O=Object.keys(e).map(m=>e[m]===!0?m:`${m}="${e[m]}"`).join(" ");if(i){let m=c?` id="${c}"`:"";u8.has(a)?u=`<${a}${m}${O===""?"":" "}${O}/>`:u=`<${a}${m}${O===""?"":" "}${O}>`}else{let m=t.slice(l,d+1);u=`<${a}${O===""?"":" "}${O}${m}`}return[u,o,s]},qS=class{static extract(t){let{[QS]:e,[CS]:i,[_S]:n}=t;return delete t[QS],delete t[CS],delete t[_S],{diff:t,title:n,reply:e||null,events:i||[]}}constructor(t,e){this.viewId=t,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(t){let[e,i]=this.recursiveToString(this.rendered,this.rendered[Ei],t,!0,{});return[e,i]}recursiveToString(t,e=t[Ei],i,n,r){i=i?new Set(i):null;let o={buffer:"",components:e,onlyCids:i,streams:new Set};return this.toOutputBuffer(t,null,o,n,r),[o.buffer,o.streams]}componentCIDs(t){return Object.keys(t[Ei]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(t){return t[Ei]?Object.keys(t).length===1:!1}getComponent(t,e){return t[Ei][e]}resetRender(t){this.rendered[Ei][t]&&(this.rendered[Ei][t].reset=!0)}mergeDiff(t){let e=t[Ei],i={};if(delete t[Ei],this.rendered=this.mutableMerge(this.rendered,t),this.rendered[Ei]=this.rendered[Ei]||{},e){let n=this.rendered[Ei];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,i);for(let r in e)n[r]=e[r];t[Ei]=e}}cachedFindComponent(t,e,i,n,r){if(r[t])return r[t];{let o,s,a=e[nr];if(Er(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],i,n,r):l=i[-a],s=l[nr],o=this.cloneMerge(l,e,!0),o[nr]=s}else o=e[nr]!==void 0||i[t]===void 0?e:this.cloneMerge(i[t],e,!1);return r[t]=o,o}}mutableMerge(t,e){return e[nr]!==void 0?e:(this.doMutableMerge(t,e),t)}doMutableMerge(t,e){for(let i in e){let n=e[i],r=t[i];Ra(n)&&n[nr]===void 0&&Ra(r)?this.doMutableMerge(r,n):t[i]=n}t[zg]&&(t.newRender=!0)}cloneMerge(t,e,i){let n=Y(Y({},t),e);for(let r in n){let o=e[r],s=t[r];Ra(o)&&o[nr]===void 0&&Ra(s)?n[r]=this.cloneMerge(s,o,i):o===void 0&&Ra(s)&&(n[r]=this.cloneMerge(s,{},i))}return i?(delete n.magicId,delete n.newRender):t[zg]&&(n.newRender=!0),n}componentToString(t){let[e,i]=this.recursiveCIDToString(this.rendered[Ei],t,null),[n,r,o]=NS(e,{});return[n,i]}pruneCIDs(t){t.forEach(e=>delete this.rendered[Ei][e])}get(){return this.rendered}isNewFingerprint(t={}){return!!t[nr]}templateStatic(t,e){return typeof t=="number"?e[t]:t}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(t,e,i,n,r={}){if(t[Ah])return this.comprehensionToBuffer(t,e,i);let{[nr]:o}=t;o=this.templateStatic(o,e);let s=t[zg],a=i.buffer;s&&(i.buffer=""),n&&s&&!t.magicId&&(t.newRender=!0,t.magicId=this.nextMagicID()),i.buffer+=o[0];for(let l=1;l0||l.length>0||c)&&(delete t[AS],t[Ah]=[],i.streams.add(o))}dynamicToBuffer(t,e,i,n){if(typeof t=="number"){let[r,o]=this.recursiveCIDToString(i.components,t,i.onlyCids);i.buffer+=r,i.streams=new Set([...i.streams,...o])}else Ra(t)?this.toOutputBuffer(t,e,i,n,{}):i.buffer+=t}recursiveCIDToString(t,e,i){let n=t[e]||zi(`no component for CID ${e}`,t),r={[Pr]:e},o=i&&!i.has(e);n.newRender=!o,n.magicId=`c${e}-${this.parentViewId()}`;let s=!n.reset,[a,l]=this.recursiveToString(n,t,i,s,r);return delete n.reset,[a,l]}},jS=[],WS=200,h8={exec(t,e,i,n,r,o){let[s,a]=o||[null,{callback:o&&o.callback}];(i.charAt(0)==="["?JSON.parse(i):[[s,a]]).forEach(([c,u])=>{c===s&&(u=Y(Y({},a),u),u.callback=u.callback||a.callback),this.filterToEls(n.liveSocket,r,u).forEach(f=>{this[`exec_${c}`](t,e,i,n,r,f,u)})})},isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0)},isInViewport(t){let e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return e.right>0&&e.bottom>0&&e.left{let u=c.getAttribute(s);if(!u)throw new Error(`expected ${s} to contain JS command on "${a}"`);n.liveSocket.execJS(c,u,e)})},exec_dispatch(t,e,i,n,r,o,{event:s,detail:a,bubbles:l}){a=a||{},a.dispatcher=r,H.dispatchEvent(o,s,{detail:a,bubbles:l})},exec_push(t,e,i,n,r,o,s){let{event:a,data:l,target:c,page_loading:u,loading:f,value:d,dispatcher:O,callback:m}=s,x={loading:f,value:d,target:c,page_loading:!!u},v=e==="change"&&O?O:r,w=c||v.getAttribute(n.binding("target"))||v,T=(A,L)=>{if(A.isConnected())if(e==="change"){let{newCid:D,_target:P}=s;P=P||(H.isFormInput(r)?r.name:void 0),P&&(x._target=P),A.pushInput(r,L,D,a||i,x,m)}else if(e==="submit"){let{submitter:D}=s;A.submitForm(r,L,a||i,D,x,m)}else A.pushEvent(e,r,L,a||i,l,x,m)};s.targetView&&s.targetCtx?T(s.targetView,s.targetCtx):n.withinTargets(w,T)},exec_navigate(t,e,i,n,r,o,{href:s,replace:a}){n.liveSocket.historyRedirect(t,s,a?"replace":"push",null,r)},exec_patch(t,e,i,n,r,o,{href:s,replace:a}){n.liveSocket.pushHistoryPatch(t,s,a?"replace":"push",r)},exec_focus(t,e,i,n,r,o){window.requestAnimationFrame(()=>Da.attemptFocus(o))},exec_focus_first(t,e,i,n,r,o){window.requestAnimationFrame(()=>Da.focusFirstInteractive(o)||Da.focusFirst(o))},exec_push_focus(t,e,i,n,r,o){window.requestAnimationFrame(()=>jS.push(o||r))},exec_pop_focus(t,e,i,n,r,o){window.requestAnimationFrame(()=>{let s=jS.pop();s&&s.focus()})},exec_add_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.addOrRemoveClasses(o,s,[],a,l,n,c)},exec_remove_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.addOrRemoveClasses(o,[],s,a,l,n,c)},exec_toggle_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.toggleClasses(o,s,a,l,n,c)},exec_toggle_attr(t,e,i,n,r,o,{attr:[s,a,l]}){this.toggleAttr(o,s,a,l)},exec_transition(t,e,i,n,r,o,{time:s,transition:a,blocking:l}){this.addOrRemoveClasses(o,[],[],a,s,n,l)},exec_toggle(t,e,i,n,r,o,{display:s,ins:a,outs:l,time:c,blocking:u}){this.toggle(e,n,o,s,a,l,c,u)},exec_show(t,e,i,n,r,o,{display:s,transition:a,time:l,blocking:c}){this.show(e,n,o,s,a,l,c)},exec_hide(t,e,i,n,r,o,{display:s,transition:a,time:l,blocking:c}){this.hide(e,n,o,s,a,l,c)},exec_set_attr(t,e,i,n,r,o,{attr:[s,a]}){this.setOrRemoveAttrs(o,[[s,a]],[])},exec_remove_attr(t,e,i,n,r,o,{attr:s}){this.setOrRemoveAttrs(o,[],[s])},show(t,e,i,n,r,o,s){this.isVisible(i)||this.toggle(t,e,i,n,r,null,o,s)},hide(t,e,i,n,r,o,s){this.isVisible(i)&&this.toggle(t,e,i,n,null,r,o,s)},toggle(t,e,i,n,r,o,s,a){s=s||WS;let[l,c,u]=r||[[],[],[]],[f,d,O]=o||[[],[],[]];if(l.length>0||f.length>0)if(this.isVisible(i)){let m=()=>{this.addOrRemoveClasses(i,d,l.concat(c).concat(u)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,f,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,O,d))})},x=()=>{this.addOrRemoveClasses(i,[],f.concat(O)),H.putSticky(i,"toggle",v=>v.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))};i.dispatchEvent(new Event("phx:hide-start")),a===!1?(m(),setTimeout(x,s)):e.transition(s,m,x)}else{if(t==="remove")return;let m=()=>{this.addOrRemoveClasses(i,c,f.concat(d).concat(O));let v=n||this.defaultDisplay(i);H.putSticky(i,"toggle",w=>w.style.display=v),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,l,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,u,c))})},x=()=>{this.addOrRemoveClasses(i,[],l.concat(u)),i.dispatchEvent(new Event("phx:show-end"))};i.dispatchEvent(new Event("phx:show-start")),a===!1?(m(),setTimeout(x,s)):e.transition(s,m,x)}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),H.putSticky(i,"toggle",m=>m.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let m=n||this.defaultDisplay(i);H.putSticky(i,"toggle",x=>x.style.display=m),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(t,e,i,n,r,o){window.requestAnimationFrame(()=>{let[s,a]=H.getSticky(t,"classes",[[],[]]),l=e.filter(u=>s.indexOf(u)<0&&!t.classList.contains(u)),c=e.filter(u=>a.indexOf(u)<0&&t.classList.contains(u));this.addOrRemoveClasses(t,l,c,i,n,r,o)})},toggleAttr(t,e,i,n){t.hasAttribute(e)?n!==void 0?t.getAttribute(e)===i?this.setOrRemoveAttrs(t,[[e,n]],[]):this.setOrRemoveAttrs(t,[[e,i]],[]):this.setOrRemoveAttrs(t,[],[e]):this.setOrRemoveAttrs(t,[[e,i]],[])},addOrRemoveClasses(t,e,i,n,r,o,s){r=r||WS;let[a,l,c]=n||[[],[],[]];if(a.length>0){let u=()=>{this.addOrRemoveClasses(t,l,[].concat(a).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})},f=()=>this.addOrRemoveClasses(t,e.concat(c),i.concat(a).concat(l));s===!1?(u(),setTimeout(f,r)):o.transition(r,u,f);return}window.requestAnimationFrame(()=>{let[u,f]=H.getSticky(t,"classes",[[],[]]),d=e.filter(v=>u.indexOf(v)<0&&!t.classList.contains(v)),O=i.filter(v=>f.indexOf(v)<0&&t.classList.contains(v)),m=u.filter(v=>i.indexOf(v)<0).concat(d),x=f.filter(v=>e.indexOf(v)<0).concat(O);H.putSticky(t,"classes",v=>(v.classList.remove(...x),v.classList.add(...m),[m,x]))})},setOrRemoveAttrs(t,e,i){let[n,r]=H.getSticky(t,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(i),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(i);H.putSticky(t,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,u])=>l.setAttribute(c,u)),[s,a]))},hasAllClasses(t,e){return e.every(i=>t.classList.contains(i))},isToggledOut(t,e){return!this.isVisible(t)||this.hasAllClasses(t,e)},filterToEls(t,e,{to:i}){let n=()=>{if(typeof i=="string")return document.querySelectorAll(i);if(i.closest){let r=e.closest(i.closest);return r?[r]:[]}else if(i.inner)return e.querySelectorAll(i.inner)};return i?t.jsQuerySelectorAll(e,i,n):[e]},defaultDisplay(t){return{tr:"table-row",td:"table-cell"}[t.tagName.toLowerCase()]||"block"},transitionClasses(t){if(!t)return null;let[e,i,n]=Array.isArray(t)?t:[t.split(" "),[],[]];return e=Array.isArray(e)?e:e.split(" "),i=Array.isArray(i)?i:i.split(" "),n=Array.isArray(n)?n:n.split(" "),[e,i,n]}},bt=h8,Mg="hookId",d8=1,Sc=class{static makeID(){return d8++}static elementID(t){return H.private(t,Mg)}constructor(t,e,i){this.el=e,this.__attachView(t),this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,H.putPrivate(this.el,Mg,this.constructor.makeID());for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__attachView(t){t?(this.__view=()=>t,this.liveSocket=t.liveSocket):(this.__view=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)},this.liveSocket=null)}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed(),H.deletePrivate(this.el,Mg)}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}js(){let t=this;return{exec(e){t.__view().liveSocket.execJS(t.el,e,"hook")},show(e,i={}){let n=t.__view().liveSocket.owner(e);bt.show("hook",n,e,i.display,i.transition,i.time,i.blocking)},hide(e,i={}){let n=t.__view().liveSocket.owner(e);bt.hide("hook",n,e,null,i.transition,i.time,i.blocking)},toggle(e,i={}){let n=t.__view().liveSocket.owner(e);i.in=bt.transitionClasses(i.in),i.out=bt.transitionClasses(i.out),bt.toggle("hook",n,e,i.display,i.in,i.out,i.time,i.blocking)},addClass(e,i,n={}){i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,i,[],n.transition,n.time,r,n.blocking)},removeClass(e,i,n={}){n.transition=bt.transitionClasses(n.transition),i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,[],i,n.transition,n.time,r,n.blocking)},toggleClass(e,i,n={}){n.transition=bt.transitionClasses(n.transition),i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.toggleClasses(e,i,n.transition,n.time,r,n.blocking)},transition(e,i,n={}){let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,[],[],bt.transitionClasses(i),n.time,r,n.blocking)},setAttribute(e,i,n){bt.setOrRemoveAttrs(e,[[i,n]],[])},removeAttribute(e,i){bt.setOrRemoveAttrs(e,[],[i])},toggleAttribute(e,i,n,r){bt.toggleAttr(e,i,n,r)}}}pushEvent(t,e={},i){return i===void 0?new Promise((n,r)=>{try{this.__view().pushHookEvent(this.el,null,t,e,(s,a)=>n(s))===!1&&r(new Error("unable to push hook event. LiveView not connected"))}catch(o){r(o)}}):this.__view().pushHookEvent(this.el,null,t,e,i)}pushEventTo(t,e,i={},n){return n===void 0?new Promise((r,o)=>{try{this.__view().withinTargets(t,(s,a)=>{s.pushHookEvent(this.el,a,e,i,(c,u)=>r(c))===!1&&o(new Error("unable to push hook event. LiveView not connected"))})}catch(s){o(s)}}):this.__view().withinTargets(t,(r,o)=>r.pushHookEvent(this.el,o,e,i,n))}handleEvent(t,e){let i=(n,r)=>r?t:e(n.detail);return window.addEventListener(`phx:${t}`,i),this.__listeners.add(i),i}removeHandleEvent(t){let e=t(null,!0);window.removeEventListener(`phx:${e}`,t),this.__listeners.delete(t)}upload(t,e){return this.__view().dispatchUploads(null,t,e)}uploadTo(t,e,i){return this.__view().withinTargets(t,(n,r)=>{n.dispatchUploads(r,e,i)})}__cleanup__(){this.__listeners.forEach(t=>this.removeHandleEvent(t))}},O8=(t,e)=>{let i=t.endsWith("[]"),n=i?t.slice(0,-2):t;return n=n.replace(/([^\[\]]+)(\]?$)/,`${e}$1$2`),i&&(n+="[]"),n},Lh=(t,e,i=[])=>{let u=e,{submitter:n}=u,r=mi(u,["submitter"]),o;if(n&&n.name){let f=document.createElement("input");f.type="hidden";let d=n.getAttribute("form");d&&f.setAttribute("form",d),f.name=n.name,f.value=n.value,n.parentElement.insertBefore(f,n),o=f}let s=new FormData(t),a=[];s.forEach((f,d,O)=>{f instanceof File&&a.push(d)}),a.forEach(f=>s.delete(f));let l=new URLSearchParams,c=Array.from(t.elements);for(let[f,d]of s.entries())if(i.length===0||i.indexOf(f)>=0){let O=c.filter(v=>v.name===f),m=!O.some(v=>H.private(v,zh)||H.private(v,Pc)),x=O.every(v=>v.type==="hidden");m&&!(n&&n.name==f)&&!x&&l.append(O8(f,"_unused_"),""),l.append(f,d)}n&&o&&n.parentElement.removeChild(o);for(let f in r)l.append(f,r[f]);return l.toString()},p8=class JS{static closestView(e){let i=e.closest(vs);return i?H.private(i,"view"):null}constructor(e,i,n,r,o){this.isDead=!1,this.liveSocket=i,this.flash=r,this.parent=n,this.root=n?n.root:this,this.el=e,H.putPrivate(this.el,"view",this),this.id=this.el.id,this.ref=0,this.lastAckRef=null,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinAttempts=0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(s){s&&s()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let s=this.href&&this.expandURL(this.href);return{redirect:this.redirect?s:void 0,url:this.redirect?void 0:s||void 0,params:this.connectParams(o),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(Bg)}connectParams(e){let i=this.liveSocket.params(this.el),n=H.all(document,`[${this.binding(SD)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="string");return n.length>0&&(i._track_static=n),i._mounts=this.joinCount,i._mount_attempts=this.joinAttempts,i._live_referer=e,this.joinAttempts++,i}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(rr)}getStatic(){let e=this.el.getAttribute(ys);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let i=()=>{e();for(let n in this.viewHooks)this.destroyHook(this.viewHooks[n])};H.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",i).receive("error",i).receive("timeout",i)}setContainerClasses(...e){this.el.classList.remove(gS,gs,Xa,bS,mc),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let i in this.viewHooks)this.viewHooks[i].__disconnected();this.setContainerClasses(gs)}}execAll(e){H.all(this.el,`[${e}]`,i=>this.liveSocket.execJS(i,i.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(gS),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,i){this.liveSocket.log(this,e,i)}transition(e,i,n=function(){}){this.liveSocket.transition(e,i,n)}withinTargets(e,i,n=document,r){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,o=>i(o,e));if(Er(e))H.findComponentNodeList(r||this.el,e).length===0?zi(`no component found matching phx-target of ${e}`):i(this,parseInt(e));else{let o=Array.from(n.querySelectorAll(e));o.length===0&&zi(`nothing found matching the phx-target selector "${e}"`),o.forEach(s=>this.liveSocket.owner(s,a=>i(a,s)))}}applyDiff(e,i,n){this.log(e,()=>["",Dh(i)]);let{diff:r,reply:o,events:s,title:a}=qS.extract(i);n({diff:r,reply:o,events:s}),(typeof a=="string"||e=="mount")&&window.requestAnimationFrame(()=>H.putTitle(a))}onJoin(e){let{rendered:i,container:n,liveview_version:r}=e;if(n){let[o,s]=n;this.el=H.replaceRootContainer(this.el,o,s)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),this.isMain()&&window.history.state===null&&this.liveSocket.replaceRootHistory(),r!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${r}. To avoid issues, please ensure that your assets use the same version as the server.`),Di.dropLocal(this.liveSocket.localStorage,window.location.pathname,VS),this.applyDiff("mount",i,({diff:o,events:s})=>{this.rendered=new qS(this.id,o);let[a,l]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.joinAttempts=0,this.maybeRecoverForms(a,()=>{this.onJoinComplete(e,a,l,s)})})}dropPendingRefs(){H.all(document,`[${On}="${this.refSrc()}"]`,e=>{e.removeAttribute(Ia),e.removeAttribute(On),e.removeAttribute(Ki)})}onJoinComplete({live_patch:e},i,n,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,i,n,r);H.findPhxChildrenInFragment(i,this.id).filter(s=>{let a=s.id&&this.el.querySelector(`[id="${s.id}"]`),l=a&&a.getAttribute(ys);return l&&s.setAttribute(ys,l),a&&a.setAttribute(So,this.root.id),this.joinChild(s)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,n,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,i,n,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,n,r)])}attachTrueDocEl(){this.el=H.byId(this.id),this.el.setAttribute(So,this.root.id)}execNewMounted(e=this.el){let i=this.binding(qg),n=this.binding(jg);H.all(e,`[${i}], [${n}]`,r=>{this.ownsElement(r)&&(H.maintainPrivateHooks(r,r,i,n),this.maybeAddNewHook(r))}),H.all(e,`[${this.binding(gc)}], [data-phx-${gc}]`,r=>{this.ownsElement(r)&&this.maybeAddNewHook(r)}),H.all(e,`[${this.binding(kS)}]`,r=>{this.ownsElement(r)&&this.maybeMounted(r)})}applyJoinPatch(e,i,n,r){this.attachTrueDocEl();let o=new Rh(this,this.el,this.id,i,n,null);if(o.markPrunableContentForRemoval(),this.performPatch(o,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),this.applyPendingUpdates(),e){let{kind:s,to:a}=e;this.liveSocket.historyPatch(a,s)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,i){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,i]);let n=this.getHook(e),r=n&&H.isIgnored(e,this.binding(Tc));if(n&&!e.isEqualNode(i)&&!(r&&ND(e.dataset,i.dataset)))return n.__beforeUpdate(),n}maybeMounted(e){let i=e.getAttribute(this.binding(kS)),n=i&&H.private(e,"mounted");i&&!n&&(this.liveSocket.execJS(e,i),H.putPrivate(e,"mounted",!0))}maybeAddNewHook(e){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,i,n=!1){let r=[],o=!1,s=new Set;return this.liveSocket.triggerDOM("onPatchStart",[e.targetContainer]),e.after("added",a=>{this.liveSocket.triggerDOM("onNodeAdded",[a]);let l=this.binding(qg),c=this.binding(jg);H.maintainPrivateHooks(a,a,l,c),this.maybeAddNewHook(a),a.getAttribute&&this.maybeMounted(a)}),e.after("phxChildAdded",a=>{H.isPhxSticky(a)?this.liveSocket.joinRootViews():o=!0}),e.before("updated",(a,l)=>{this.triggerBeforeUpdateHook(a,l)&&s.add(a.id)}),e.after("updated",a=>{s.has(a.id)&&this.getHook(a).__updated()}),e.after("discarded",a=>{a.nodeType===Node.ELEMENT_NODE&&r.push(a)}),e.after("transitionsDiscarded",a=>this.afterElementsRemoved(a,i)),e.perform(n),this.afterElementsRemoved(r,i),this.liveSocket.triggerDOM("onPatchEnd",[e.targetContainer]),o}afterElementsRemoved(e,i){let n=[];e.forEach(r=>{let o=H.all(r,`[${Pr}]`),s=H.all(r,`[${this.binding(gc)}], [data-phx-hook]`);o.concat(r).forEach(a=>{let l=this.componentID(a);Er(l)&&n.indexOf(l)===-1&&n.push(l)}),s.concat(r).forEach(a=>{let l=this.getHook(a);l&&this.destroyHook(l)})}),i&&this.maybePushComponentsDestroyed(n)}joinNewChildren(){H.findPhxChildren(this.el,this.id).forEach(e=>this.joinChild(e))}maybeRecoverForms(e,i){let n=this.binding("change"),r=this.root.formsForRecovery,o=document.createElement("template");o.innerHTML=e;let s=o.content.firstElementChild;s.id=this.id,s.setAttribute(So,this.root.id),s.setAttribute(rr,this.getSession()),s.setAttribute(ys,this.getStatic()),s.setAttribute(xs,this.parent?this.parent.id:null);let a=H.all(o.content,"form").filter(l=>l.id&&r[l.id]).filter(l=>!this.pendingForms.has(l.id)).filter(l=>r[l.id].getAttribute(n)===l.getAttribute(n)).map(l=>[r[l.id],l]);if(a.length===0)return i();a.forEach(([l,c],u)=>{this.pendingForms.add(c.id),this.pushFormRecovery(l,c,o.content.firstElementChild,()=>{this.pendingForms.delete(c.id),u===a.length-1&&i()})})}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){var i;return e.id===this.id?this:(i=this.children[e.getAttribute(xs)])==null?void 0:i[e.id]}destroyDescendent(e){for(let i in this.root.children)for(let n in this.root.children[i])if(n===e)return this.root.children[i][n].destroy()}joinChild(e){if(!this.getChildById(e.id)){let n=new JS(e,this.liveSocket,this);return this.root.children[this.id][n.id]=n,n.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,i])=>{e.isDestroyed()||i()}),this.pendingJoinOps=[]})}update(e,i){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:i});this.rendered.mergeDiff(e);let n=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{H.findExistingParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach(o=>{this.componentPatch(this.rendered.getComponent(e,o),o)&&(n=!0)})}):$S(e)||this.liveSocket.time("full patch complete",()=>{let[r,o]=this.renderContainer(e,"update"),s=new Rh(this,this.el,this.id,r,o,null);n=this.performPatch(s,!0)}),this.liveSocket.dispatchEvents(i),n&&this.joinNewChildren()}renderContainer(e,i){return this.liveSocket.time(`toString diff (${i})`,()=>{let n=this.el.tagName,r=e?this.rendered.componentCIDs(e):null,[o,s]=this.rendered.toString(r);return[`<${n}>${o}`,s]})}componentPatch(e,i){if($S(e))return!1;let[n,r]=this.rendered.componentToString(i),o=new Rh(this,this.el,this.id,n,r,i);return this.performPatch(o,!0)}getHook(e){return this.viewHooks[Sc.elementID(e)]}addHook(e){let i=Sc.elementID(e);if(i&&!this.viewHooks[i]){let n=H.getCustomElHook(e)||zi(`no hook found for custom element: ${e.id}`);return this.viewHooks[i]=n,n.__attachView(this),n}else{if(i||!e.getAttribute)return;{let n=e.getAttribute(`data-phx-${gc}`)||e.getAttribute(this.binding(gc));if(n&&!this.ownsElement(e))return;let r=this.liveSocket.getHookCallbacks(n);if(r){e.id||zi(`no DOM ID for hook "${n}". Hooks require a unique ID on each element.`,e);let o=new Sc(this,e,r);return this.viewHooks[Sc.elementID(o.el)]=o,o}else n!==null&&zi(`unknown hook found for "${n}"`,e)}}}destroyHook(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[Sc.elementID(e.el)]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:e,events:i})=>this.update(e,i)),this.pendingDiffs=[],this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let i=this.root.children[this.id]||{};for(let n in i)e(this.getChildById(n))}onChannel(e,i){this.liveSocket.onChannel(this.channel,e,n=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>i(n)]):this.liveSocket.requestDOMUpdate(()=>i(n))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:i,events:n})=>this.update(i,n))})}),this.onChannel("redirect",({to:e,flash:i})=>this.onRedirect({to:e,flash:i})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:i,kind:n,flash:r}=e,o=this.expandURL(i),s=new CustomEvent("phx:server-navigate",{detail:{to:i,kind:n,flash:r}});this.liveSocket.historyRedirect(s,o,n,r)}onLivePatch(e){let{to:i,kind:n}=e;this.href=this.expandURL(i),this.liveSocket.historyPatch(i,n)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:i,reloadToken:n}){this.liveSocket.redirect(e,i,n)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}joinPush(){return this.joinPush=this.joinPush||this.channel.join(),this.joinPush}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=i=>{i=i||function(){},e?e(this.joinCount,i):i()},this.wrapPush(()=>this.channel.join(),{ok:i=>this.liveSocket.requestDOMUpdate(()=>this.onJoin(i)),error:i=>this.onJoinError(i),timeout:()=>this.onJoinError({reason:"timeout"})})}onJoinError(e){if(e.reason==="reload"){this.log("error",()=>[`failed mount with ${e.status}. Falling back to page reload`,e]),this.onRedirect({to:this.root.href,reloadToken:e.token});return}else if(e.reason==="unauthorized"||e.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.onRedirect({to:this.root.href});return}if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);if(this.log("error",()=>["unable to join",e]),this.isMain())this.displayError([gs,Xa,mc]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this);else{this.joinAttempts>=TS&&(this.root.displayError([gs,Xa,mc]),this.log("error",()=>[`giving up trying to mount after ${TS} tries`,e]),this.destroy());let i=H.byId(this.el.id);i?(H.mergeAttrs(i,this.el),this.displayError([gs,Xa,mc]),this.el=i):this.destroy()}}onClose(e){if(!this.isDestroyed()){if(this.isMain()&&this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(XD)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([gs,Xa,mc]):this.displayError([gs,Xa,bS]))}displayError(e){this.isMain()&&H.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...e),this.execAll(this.binding("disconnected"))}wrapPush(e,i){let n=this.liveSocket.getLatencySim(),r=n?o=>setTimeout(()=>!this.isDestroyed()&&o(),n):o=>!this.isDestroyed()&&o();r(()=>{e().receive("ok",o=>r(()=>i.ok&&i.ok(o))).receive("error",o=>r(()=>i.error&&i.error(o))).receive("timeout",()=>r(()=>i.timeout&&i.timeout()))})}pushWithReply(e,i,n){if(!this.isConnected())return Promise.reject({error:"noconnection"});let[r,[o],s]=e?e():[null,[],{}],a=this.joinCount,l=function(){};return s.page_loading&&(l=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof n.cid!="number"&&delete n.cid,new Promise((c,u)=>{this.wrapPush(()=>this.channel.push(i,n,LD),{ok:f=>{r!==null&&(this.lastAckRef=r);let d=O=>{f.redirect&&this.onRedirect(f.redirect),f.live_patch&&this.onLivePatch(f.live_patch),f.live_redirect&&this.onLiveRedirect(f.live_redirect),l(),c({resp:f,reply:O})};f.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",f.diff,({diff:O,reply:m,events:x})=>{r!==null&&this.undoRefs(r,n.event),this.update(O,x),d(m)})}):(r!==null&&this.undoRefs(r,n.event),d(null))},error:f=>u({error:f}),timeout:()=>{u({timeout:!0}),this.joinCount===a&&this.liveSocket.reloadWithJitter(this,()=>{this.log("timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}})})}undoRefs(e,i,n){if(!this.isConnected())return;let r=`[${On}="${this.refSrc()}"]`;n?(n=new Set(n),H.all(document,r,o=>{n&&!n.has(o)||(H.all(o,r,s=>this.undoElRef(s,e,i)),this.undoElRef(o,e,i))})):H.all(document,r,o=>this.undoElRef(o,e,i))}undoElRef(e,i,n){new FD(e).maybeUndo(i,n,o=>{let s=this.triggerBeforeUpdateHook(e,o);Rh.patchWithClonedTree(e,o,this.liveSocket),H.all(e,`[${On}="${this.refSrc()}"]`,a=>this.undoElRef(a,i,n)),this.execNewMounted(e),s&&s.__updated()})}refSrc(){return this.el.id}putRef(e,i,n,r={}){let o=this.ref++,s=this.binding(vS);if(r.loading){let a=H.all(document,r.loading).map(l=>({el:l,lock:!0,loading:!0}));e=e.concat(a)}for(let{el:a,lock:l,loading:c}of e){if(!l&&!c)throw new Error("putRef requires lock or loading");if(a.setAttribute(On,this.refSrc()),c&&a.setAttribute(Ia,o),l&&a.setAttribute(Ki,o),!c||r.submitter&&!(a===r.submitter||a===r.form))continue;let u=new Promise(m=>{a.addEventListener(`phx:undo-lock:${o}`,()=>m(O),{once:!0})}),f=new Promise(m=>{a.addEventListener(`phx:undo-loading:${o}`,()=>m(O),{once:!0})});a.classList.add(`phx-${n}-loading`);let d=a.getAttribute(s);d!==null&&(a.getAttribute(Uh)||a.setAttribute(Uh,a.innerText),d!==""&&(a.innerText=d),a.setAttribute(La,a.getAttribute(La)||a.disabled),a.setAttribute("disabled",""));let O={event:i,eventType:n,ref:o,isLoading:c,isLocked:l,lockElements:e.filter(({lock:m})=>m).map(({el:m})=>m),loadingElements:e.filter(({loading:m})=>m).map(({el:m})=>m),unlock:m=>{m=Array.isArray(m)?m:[m],this.undoRefs(o,i,m)},lockComplete:u,loadingComplete:f,lock:m=>new Promise(x=>{if(this.isAcked(o))return x(O);m.setAttribute(Ki,o),m.setAttribute(On,this.refSrc()),m.addEventListener(`phx:lock-stop:${o}`,()=>x(O),{once:!0})})};a.dispatchEvent(new CustomEvent("phx:push",{detail:O,bubbles:!0,cancelable:!1})),i&&a.dispatchEvent(new CustomEvent(`phx:push:${i}`,{detail:O,bubbles:!0,cancelable:!1}))}return[o,e.map(({el:a})=>a),r]}isAcked(e){return this.lastAckRef!==null&&this.lastAckRef>=e}componentID(e){let i=e.getAttribute&&e.getAttribute(Pr);return i?parseInt(i):null}targetComponentID(e,i,n={}){if(Er(i))return i;let r=n.target||e.getAttribute(this.binding("target"));return Er(r)?parseInt(r):i&&(r!==null||n.target)?this.closestComponentID(i):null}closestComponentID(e){return Er(e)?e:e?ko(e.closest(`[${Pr}]`),i=>this.ownsElement(i)&&this.componentID(i)):null}pushHookEvent(e,i,n,r,o){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",n,r]),!1;let[s,a,l]=this.putRef([{el:e,loading:!0,lock:!0}],n,"hook");return this.pushWithReply(()=>[s,a,l],"event",{type:"hook",event:n,value:r,cid:this.closestComponentID(i)}).then(({resp:c,reply:u})=>o(u,s)),s}extractMeta(e,i,n){let r=this.binding("value-");for(let o=0;o=0&&!e.checked&&delete i.value),n){i||(i={});for(let o in n)i[o]=n[o]}return i}pushEvent(e,i,n,r,o,s={},a){this.pushWithReply(()=>this.putRef([{el:i,loading:!0,lock:!0}],r,e,s),"event",{type:e,event:r,value:this.extractMeta(i,o,s.value),cid:this.targetComponentID(i,n,s)}).then(({reply:l})=>a&&a(l))}pushFileProgress(e,i,n,r=function(){}){this.liveSocket.withinOwners(e.form,(o,s)=>{o.pushWithReply(null,"progress",{event:e.getAttribute(o.binding(AD)),ref:e.getAttribute(Cr),entry_ref:i,progress:n,cid:o.targetComponentID(e.form,s)}).then(({resp:a})=>r(a))})}pushInput(e,i,n,r,o,s){if(!e.form)throw new Error("form events require the input to be inside a form");let a,l=Er(n)?n:this.targetComponentID(e.form,i,o),c=()=>this.putRef([{el:e,loading:!0,lock:!0},{el:e.form,loading:!0,lock:!0}],r,"change",o),u,f=this.extractMeta(e.form);e instanceof HTMLButtonElement&&(f.submitter=e),e.getAttribute(this.binding("change"))?u=Lh(e.form,Y({_target:o._target},f),[e.name]):u=Lh(e.form,Y({_target:o._target},f)),H.isUploadInput(e)&&e.files&&e.files.length>0&&Kt.trackFiles(e,Array.from(e.files)),a=Kt.serializeUploads(e);let d={type:"form",event:r,value:u,uploads:a,cid:l};this.pushWithReply(c,"event",d).then(({resp:O})=>{if(H.isUploadInput(e)&&H.isAutoUpload(e)){if(Kt.filesAwaitingPreflight(e).length>0){let[m,x]=c();this.undoRefs(m,r,[e.form]),this.uploadFiles(e.form,r,i,m,l,v=>{s&&s(O),this.triggerAwaitingSubmit(e.form,r),this.undoRefs(m,r)})}}else s&&s(O)})}triggerAwaitingSubmit(e,i){let n=this.getScheduledSubmit(e);if(n){let[r,o,s,a]=n;this.cancelSubmit(e,i),a()}}getScheduledSubmit(e){return this.formSubmits.find(([i,n,r,o])=>i.isSameNode(e))}scheduleSubmit(e,i,n,r){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,i,n,r])}cancelSubmit(e,i){this.formSubmits=this.formSubmits.filter(([n,r,o,s])=>n.isSameNode(e)?(this.undoRefs(r,i),!1):!0)}disableForm(e,i,n={}){let r=m=>!(Ec(m,`${this.binding(Tc)}=ignore`,m.form)||Ec(m,"data-phx-update=ignore",m.form)),o=m=>m.hasAttribute(this.binding(vS)),s=m=>m.tagName=="BUTTON",a=m=>["INPUT","TEXTAREA","SELECT"].includes(m.tagName),l=Array.from(e.elements),c=l.filter(o),u=l.filter(s).filter(r),f=l.filter(a).filter(r);u.forEach(m=>{m.setAttribute(La,m.disabled),m.disabled=!0}),f.forEach(m=>{m.setAttribute(Wg,m.readOnly),m.readOnly=!0,m.files&&(m.setAttribute(La,m.disabled),m.disabled=!0)});let d=c.concat(u).concat(f).map(m=>({el:m,loading:!0,lock:!0})),O=[{el:e,loading:!0,lock:!1}].concat(d).reverse();return this.putRef(O,i,"submit",n)}pushFormSubmit(e,i,n,r,o,s){let a=()=>this.disableForm(e,n,Ee(Y({},o),{form:e,submitter:r})),l=this.targetComponentID(e,i);if(Kt.hasUploadsInProgress(e)){let[c,u]=a(),f=()=>this.pushFormSubmit(e,i,n,r,o,s);return this.scheduleSubmit(e,c,o,f)}else if(Kt.inputsAwaitingPreflight(e).length>0){let[c,u]=a(),f=()=>[c,u,o];this.uploadFiles(e,n,i,c,l,d=>{if(Kt.inputsAwaitingPreflight(e).length>0)return this.undoRefs(c,n);let O=this.extractMeta(e),m=Lh(e,Y({submitter:r},O));this.pushWithReply(f,"event",{type:"form",event:n,value:m,cid:l}).then(({resp:x})=>s(x))})}else if(!(e.hasAttribute(On)&&e.classList.contains("phx-submit-loading"))){let c=this.extractMeta(e),u=Lh(e,Y({submitter:r},c));this.pushWithReply(a,"event",{type:"form",event:n,value:u,cid:l}).then(({resp:f})=>s(f))}}uploadFiles(e,i,n,r,o,s){let a=this.joinCount,l=Kt.activeFileInputs(e),c=l.length;l.forEach(u=>{let f=new Kt(u,this,()=>{c--,c===0&&s()}),d=f.entries().map(m=>m.toPreflightPayload());if(d.length===0){c--;return}let O={ref:u.getAttribute(Cr),entries:d,cid:this.targetComponentID(u.form,n)};this.log("upload",()=>["sending preflight request",O]),this.pushWithReply(null,"allow_upload",O).then(({resp:m})=>{if(this.log("upload",()=>["got preflight response",m]),f.entries().forEach(x=>{m.entries&&!m.entries[x.ref]&&this.handleFailedEntryPreflight(x.ref,"failed preflight",f)}),m.error||Object.keys(m.entries).length===0)this.undoRefs(r,i),(m.error||[]).map(([v,w])=>{this.handleFailedEntryPreflight(v,w,f)});else{let x=v=>{this.channel.onError(()=>{this.joinCount===a&&v()})};f.initAdapterUpload(m,x,this.liveSocket)}})})}handleFailedEntryPreflight(e,i,n){if(n.isAutoUpload()){let r=n.entries().find(o=>o.ref===e.toString());r&&r.cancel()}else n.entries().map(r=>r.cancel());this.log("upload",()=>[`error for entry ${e}`,i])}dispatchUploads(e,i,n){let r=this.targetCtxElement(e)||this.el,o=H.findUploadInputs(r).filter(s=>s.name===i);o.length===0?zi(`no live file inputs found matching the name "${i}"`):o.length>1?zi(`duplicate live file inputs found matching the name "${i}"`):H.dispatchEvent(o[0],BS,{detail:{files:n}})}targetCtxElement(e){if(Er(e)){let[i]=H.findComponentNodeList(this.el,e);return i}else return e||null}pushFormRecovery(e,i,n,r){let o=this.binding("change"),s=i.getAttribute(this.binding("target"))||i,a=i.getAttribute(this.binding(wS))||i.getAttribute(this.binding("change")),l=Array.from(e.elements).filter(f=>H.isFormInput(f)&&f.name&&!f.hasAttribute(o));if(l.length===0)return;l.forEach(f=>f.hasAttribute(Cr)&&Kt.clearFiles(f));let c=l.find(f=>f.type!=="hidden")||l[0],u=0;this.withinTargets(s,(f,d)=>{let O=this.targetComponentID(i,d);u++;let m=new CustomEvent("phx:form-recovery",{detail:{sourceElement:e}});bt.exec(m,"change",a,this,c,["push",{_target:c.name,targetView:f,targetCtx:d,newCid:O,callback:()=>{u--,u===0&&r()}}])},n,n)}pushLinkPatch(e,i,n,r){let o=this.liveSocket.setPendingLink(i),s=e.isTrusted&&e.type!=="popstate",a=n?()=>this.putRef([{el:n,loading:s,lock:!0}],null,"click"):null,l=()=>this.liveSocket.redirect(window.location.href),c=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i;this.pushWithReply(a,"live_patch",{url:c}).then(({resp:u})=>{this.liveSocket.requestDOMUpdate(()=>{u.link_redirect?this.liveSocket.replaceMain(i,null,r,o):(this.liveSocket.commitPendingLink(o)&&(this.href=i),this.applyPendingUpdates(),r&&r(o))})},({error:u,timeout:f})=>l())}getFormsForRecovery(){if(this.joinCount===0)return{};let e=this.binding("change");return H.all(this.el,`form[${e}]`).filter(i=>i.id).filter(i=>i.elements.length>0).filter(i=>i.getAttribute(this.binding(wS))!=="ignore").map(i=>i.cloneNode(!0)).reduce((i,n)=>(i[n.id]=n,i),{})}maybePushComponentsDestroyed(e){let i=e.filter(n=>H.findComponentNodeList(this.el,n).length===0);i.length>0&&(i.forEach(n=>this.rendered.resetRender(n)),this.pushWithReply(null,"cids_will_destroy",{cids:i}).then(()=>{this.liveSocket.requestDOMUpdate(()=>{let n=i.filter(r=>H.findComponentNodeList(this.el,r).length===0);n.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:n}).then(({resp:r})=>{this.rendered.pruneCIDs(r.cids)})})}))}ownsElement(e){let i=e.closest(vs);return e.getAttribute(xs)===this.id||i&&i.id===this.id||!i&&this.isDead}submitForm(e,i,n,r,o={}){H.putPrivate(e,Pc,!0),Array.from(e.elements).forEach(a=>H.putPrivate(a,Pc,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,i,n,r,o,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}};var eT=class{constructor(t,e,i={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` +`),i.push(n))}),i.forEach(n=>n.remove())}},replaceRootContainer(t,e,i){let n=new Set(["id",or,xs,Yg,To]);if(t.tagName.toLowerCase()===e.toLowerCase())return Array.from(t.attributes).filter(r=>!n.has(r.name.toLowerCase())).forEach(r=>t.removeAttribute(r.name)),Object.keys(i).filter(r=>!n.has(r.toLowerCase())).forEach(r=>t.setAttribute(r,i[r])),t;{let r=document.createElement(e);return Object.keys(i).forEach(o=>r.setAttribute(o,i[o])),n.forEach(o=>r.setAttribute(o,t.getAttribute(o))),r.innerHTML=t.innerHTML,t.replaceWith(r),r}},getSticky(t,e,i){let n=(ys.private(t,"sticky")||[]).find(([r])=>e===r);if(n){let[r,o,s]=n;return s}else return typeof i=="function"?i():i},deleteSticky(t,e){this.updatePrivate(t,"sticky",[],i=>i.filter(([n,r])=>n!==e))},putSticky(t,e,i){let n=i(t);this.updatePrivate(t,"sticky",[],r=>{let o=r.findIndex(([s])=>e===s);return o>=0?r[o]=[e,i,n]:r.push([e,i,n]),r})},applyStickyOperations(t){let e=ys.private(t,"sticky");e&&e.forEach(([i,n,r])=>this.putSticky(t,i,n))},isLocked(t){return t.hasAttribute&&t.hasAttribute(qt)}},G=ys,wc=class{static isActive(t,e){let i=e._phxRef===void 0,r=t.getAttribute(qg).split(",").indexOf(Jt.genFileRef(e))>=0;return e.size>0&&(i||r)}static isPreflighted(t,e){return t.getAttribute(Bg).split(",").indexOf(Jt.genFileRef(e))>=0&&this.isActive(t,e)}static isPreflightInProgress(t){return t._preflightInProgress===!0}static markPreflightInProgress(t){t._preflightInProgress=!0}constructor(t,e,i,n){this.ref=Jt.genFileRef(e),this.fileEl=t,this.file=e,this.view=i,this.meta=null,this._isCancelled=!1,this._isDone=!1,this._progress=0,this._lastProgressSent=-1,this._onDone=function(){},this._onElUpdated=this.onElUpdated.bind(this),this.fileEl.addEventListener(Ih,this._onElUpdated),this.autoUpload=n}metadata(){return this.meta}progress(t){this._progress=Math.floor(t),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,()=>{Jt.untrackFile(this.fileEl,this.file),this._onDone()})):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}isCancelled(){return this._isCancelled}cancel(){this.file._preflightInProgress=!1,this._isCancelled=!0,this._isDone=!0,this._onDone()}isDone(){return this._isDone}error(t="failed"){this.fileEl.removeEventListener(Ih,this._onElUpdated),this.view.pushFileProgress(this.fileEl,this.ref,{error:t}),this.isAutoUpload()||Jt.clearFiles(this.fileEl)}isAutoUpload(){return this.autoUpload}onDone(t){this._onDone=()=>{this.fileEl.removeEventListener(Ih,this._onElUpdated),t()}}onElUpdated(){this.fileEl.getAttribute(qg).split(",").indexOf(this.ref)===-1&&(Jt.untrackFile(this.fileEl,this.file),this.cancel())}toPreflightPayload(){return{last_modified:this.file.lastModified,name:this.file.name,relative_path:this.file.webkitRelativePath,size:this.file.size,type:this.file.type,ref:this.ref,meta:typeof this.file.meta=="function"?this.file.meta():void 0}}uploader(t){if(this.meta.uploader){let e=t[this.meta.uploader]||Ui(`no uploader configured for ${this.meta.uploader}`);return{name:this.meta.uploader,callback:e}}else return{name:"channel",callback:jD}}zipPostFlight(t){this.meta=t.entries[this.ref],this.meta||Ui(`no preflight upload response returned with ref ${this.ref}`,{input:this.fileEl,response:t})}},VD=0,Jt=class Zg{static genFileRef(e){let i=e._phxRef;return i!==void 0?i:(e._phxRef=(VD++).toString(),e._phxRef)}static getEntryDataURL(e,i,n){let r=this.activeFiles(e).find(o=>this.genFileRef(o)===i);n(URL.createObjectURL(r))}static hasUploadsInProgress(e){let i=0;return G.findUploadInputs(e).forEach(n=>{n.getAttribute(Bg)!==n.getAttribute(TD)&&i++}),i>0}static serializeUploads(e){let i=this.activeFiles(e),n={};return i.forEach(r=>{let o={path:e.name},s=e.getAttribute(Qr);n[s]=n[s]||[],o.ref=this.genFileRef(r),o.last_modified=r.lastModified,o.name=r.name||o.ref,o.relative_path=r.webkitRelativePath,o.type=r.type,o.size=r.size,typeof r.meta=="function"&&(o.meta=r.meta()),n[s].push(o)}),n}static clearFiles(e){e.value=null,e.removeAttribute(Qr),G.putPrivate(e,"files",[])}static untrackFile(e,i){G.putPrivate(e,"files",G.private(e,"files").filter(n=>!Object.is(n,i)))}static trackFiles(e,i,n){if(e.getAttribute("multiple")!==null){let r=i.filter(o=>!this.activeFiles(e).find(s=>Object.is(s,o)));G.updatePrivate(e,"files",[],o=>o.concat(r)),e.value=null}else n&&n.files.length>0&&(e.files=n.files),G.putPrivate(e,"files",i)}static activeFileInputs(e){let i=G.findUploadInputs(e);return Array.from(i).filter(n=>n.files&&this.activeFiles(n).length>0)}static activeFiles(e){return(G.private(e,"files")||[]).filter(i=>wc.isActive(e,i))}static inputsAwaitingPreflight(e){let i=G.findUploadInputs(e);return Array.from(i).filter(n=>this.filesAwaitingPreflight(n).length>0)}static filesAwaitingPreflight(e){return this.activeFiles(e).filter(i=>!wc.isPreflighted(e,i)&&!wc.isPreflightInProgress(i))}static markPreflightInProgress(e){e.forEach(i=>wc.markPreflightInProgress(i.file))}constructor(e,i,n){this.autoUpload=G.isAutoUpload(e),this.view=i,this.onComplete=n,this._entries=Array.from(Zg.filesAwaitingPreflight(e)||[]).map(r=>new wc(e,r,i,this.autoUpload)),Zg.markPreflightInProgress(this._entries),this.numEntriesInProgress=this._entries.length}isAutoUpload(){return this.autoUpload}entries(){return this._entries}initAdapterUpload(e,i,n){this._entries=this._entries.map(o=>(o.isCancelled()?(this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()):(o.zipPostFlight(e),o.onDone(()=>{this.numEntriesInProgress--,this.numEntriesInProgress===0&&this.onComplete()})),o));let r=this._entries.reduce((o,s)=>{if(!s.meta)return o;let{name:a,callback:l}=s.uploader(n.uploaders);return o[a]=o[a]||{callback:l,entries:[]},o[a].entries.push(s),o},{});for(let o in r){let{callback:s,entries:a}=r[o];s(a,i,e,n)}}},ZD={anyOf(t,e){return e.find(i=>t instanceof i)},isFocusable(t,e){return t instanceof HTMLAnchorElement&&t.rel!=="ignore"||t instanceof HTMLAreaElement&&t.href!==void 0||!t.disabled&&this.anyOf(t,[HTMLInputElement,HTMLSelectElement,HTMLTextAreaElement,HTMLButtonElement])||t instanceof HTMLIFrameElement||t.tabIndex>0||!e&&t.getAttribute("tabindex")!==null&&t.getAttribute("aria-hidden")!=="true"},attemptFocus(t,e){if(this.isFocusable(t,e))try{t.focus()}catch(i){}return!!document.activeElement&&document.activeElement.isSameNode(t)},focusFirstInteractive(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e,!0)||this.focusFirstInteractive(e,!0))return!0;e=e.nextElementSibling}},focusFirst(t){let e=t.firstElementChild;for(;e;){if(this.attemptFocus(e)||this.focusFirst(e))return!0;e=e.nextElementSibling}},focusLast(t){let e=t.lastElementChild;for(;e;){if(this.attemptFocus(e)||this.focusLast(e))return!0;e=e.previousElementSibling}}},Ji=ZD,GS={LiveFileUpload:{activeRefs(){return this.el.getAttribute(qg)},preflightedRefs(){return this.el.getAttribute(Bg)},mounted(){this.preflightedWas=this.preflightedRefs()},updated(){let t=this.preflightedRefs();this.preflightedWas!==t&&(this.preflightedWas=t,t===""&&this.__view().cancelSubmit(this.el.form)),this.activeRefs()===""&&(this.el.value=null),this.el.dispatchEvent(new CustomEvent(Ih))}},LiveImgPreview:{mounted(){this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(Qr)),Jt.getEntryDataURL(this.inputEl,this.ref,t=>{this.url=t,this.el.src=t})},destroyed(){URL.revokeObjectURL(this.url)}},FocusWrap:{mounted(){this.focusStart=this.el.firstElementChild,this.focusEnd=this.el.lastElementChild,this.focusStart.addEventListener("focus",t=>{if(!t.relatedTarget||!this.el.contains(t.relatedTarget)){let e=t.target.nextElementSibling;Ji.attemptFocus(e)||Ji.focusFirst(e)}else Ji.focusLast(this.el)}),this.focusEnd.addEventListener("focus",t=>{if(!t.relatedTarget||!this.el.contains(t.relatedTarget)){let e=t.target.previousElementSibling;Ji.attemptFocus(e)||Ji.focusLast(e)}else Ji.focusFirst(this.el)}),this.el.addEventListener("phx:show-end",()=>this.el.focus()),window.getComputedStyle(this.el).display!=="none"&&Ji.focusFirst(this.el)}}},KS=t=>["HTML","BODY"].indexOf(t.nodeName.toUpperCase())>=0?null:["scroll","auto"].indexOf(getComputedStyle(t).overflowY)>=0?t:KS(t.parentElement),XS=t=>t?t.scrollTop:document.documentElement.scrollTop||document.body.scrollTop,Fg=t=>t?t.getBoundingClientRect().bottom:window.innerHeight||document.documentElement.clientHeight,Hg=t=>t?t.getBoundingClientRect().top:0,BD=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Hg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Fg(e)},YD=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.bottom)>=Hg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.bottom)<=Fg(e)},RS=(t,e)=>{let i=t.getBoundingClientRect();return Math.ceil(i.top)>=Hg(e)&&Math.ceil(i.left)>=0&&Math.floor(i.top)<=Fg(e)};GS.InfiniteScroll={mounted(){this.scrollContainer=KS(this.el);let t=XS(this.scrollContainer),e=!1,i=500,n=null,r=this.throttle(i,(a,l)=>{n=()=>!0,this.liveSocket.execJSHookPush(this.el,a,{id:l.id,_overran:!0},()=>{n=null})}),o=this.throttle(i,(a,l)=>{n=()=>l.scrollIntoView({block:"start"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{RS(l,this.scrollContainer)||l.scrollIntoView({block:"start"})})})}),s=this.throttle(i,(a,l)=>{n=()=>l.scrollIntoView({block:"end"}),this.liveSocket.execJSHookPush(this.el,a,{id:l.id},()=>{n=null,window.requestAnimationFrame(()=>{RS(l,this.scrollContainer)||l.scrollIntoView({block:"end"})})})});this.onScroll=a=>{let l=XS(this.scrollContainer);if(n)return t=l,n();let c=this.el.getBoundingClientRect(),u=this.el.getAttribute(this.liveSocket.binding("viewport-top")),f=this.el.getAttribute(this.liveSocket.binding("viewport-bottom")),d=this.el.lastElementChild,O=this.el.firstElementChild,m=lt;m&&u&&!e&&c.top>=0?(e=!0,r(u,O)):x&&e&&c.top<=0&&(e=!1),u&&m&&BD(O,this.scrollContainer)?o(u,O):f&&x&&YD(d,this.scrollContainer)&&s(f,d),t=l},this.scrollContainer?this.scrollContainer.addEventListener("scroll",this.onScroll):window.addEventListener("scroll",this.onScroll)},destroyed(){this.scrollContainer?this.scrollContainer.removeEventListener("scroll",this.onScroll):window.removeEventListener("scroll",this.onScroll)},throttle(t,e){let i=0,n;return(...r)=>{let o=Date.now(),s=t-(o-i);s<=0||s>t?(n&&(clearTimeout(n),n=null),i=o,e(...r)):n||(n=setTimeout(()=>{i=Date.now(),n=null,e(...r)},s))}}};var FD=GS,LS=class{static onUnlock(t,e){if(!G.isLocked(t)&&!t.closest(`[${qt}]`))return e();let i=t.closest(`[${qt}]`),n=i.closest(`[${qt}]`).getAttribute(qt);i.addEventListener(`phx:undo-lock:${n}`,()=>{e()},{once:!0})}constructor(t){this.el=t,this.loadingRef=t.hasAttribute(Da)?parseInt(t.getAttribute(Da),10):null,this.lockRef=t.hasAttribute(qt)?parseInt(t.getAttribute(qt),10):null}maybeUndo(t,e,i){this.isWithin(t)&&(this.undoLocks(t,e,i),this.undoLoading(t,e),this.isFullyResolvedBy(t)&&this.el.removeAttribute(pn))}isWithin(t){return!(this.loadingRef!==null&&this.loadingRef>t&&this.lockRef!==null&&this.lockRef>t)}undoLocks(t,e,i){if(!this.isLockUndoneBy(t))return;let n=G.private(this.el,qt);n&&(i(n),G.deletePrivate(this.el,qt)),this.el.removeAttribute(qt);let r={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-lock:${this.lockRef}`,r))}undoLoading(t,e){if(!this.isLoadingUndoneBy(t)){this.canUndoLoading(t)&&this.el.classList.contains("phx-submit-loading")&&this.el.classList.remove("phx-change-loading");return}if(this.canUndoLoading(t)){this.el.removeAttribute(Da);let i=this.el.getAttribute(Ia),n=this.el.getAttribute(Vg);n!==null&&(this.el.readOnly=n==="true",this.el.removeAttribute(Vg)),i!==null&&(this.el.disabled=i==="true",this.el.removeAttribute(Ia));let r=this.el.getAttribute(Uh);r!==null&&(this.el.innerText=r,this.el.removeAttribute(Uh));let o={detail:{ref:t,event:e},bubbles:!0,cancelable:!1};this.el.dispatchEvent(new CustomEvent(`phx:undo-loading:${this.loadingRef}`,o))}ZS.forEach(i=>{(i!=="phx-submit-loading"||this.canUndoLoading(t))&&G.removeClass(this.el,i)})}isLoadingUndoneBy(t){return this.loadingRef===null?!1:this.loadingRef<=t}isLockUndoneBy(t){return this.lockRef===null?!1:this.lockRef<=t}isFullyResolvedBy(t){return(this.loadingRef===null||this.loadingRef<=t)&&(this.lockRef===null||this.lockRef<=t)}canUndoLoading(t){return this.lockRef===null||this.lockRef<=t}},HD=class{constructor(t,e,i){let n=new Set,r=new Set([...e.children].map(s=>s.id)),o=[];Array.from(t.children).forEach(s=>{if(s.id&&(n.add(s.id),r.has(s.id))){let a=s.previousElementSibling&&s.previousElementSibling.id;o.push({elementId:s.id,previousElementId:a})}}),this.containerId=e.id,this.updateType=i,this.elementsToModify=o,this.elementIdsToAdd=[...r].filter(s=>!n.has(s))}perform(){let t=G.byId(this.containerId);this.elementsToModify.forEach(e=>{e.previousElementId?So(document.getElementById(e.previousElementId),i=>{So(document.getElementById(e.elementId),n=>{n.previousElementSibling&&n.previousElementSibling.id==i.id||i.insertAdjacentElement("afterend",n)})}):So(document.getElementById(e.elementId),i=>{i.previousElementSibling==null||t.insertAdjacentElement("afterbegin",i)})}),this.updateType=="prepend"&&this.elementIdsToAdd.reverse().forEach(e=>{So(document.getElementById(e),i=>t.insertAdjacentElement("afterbegin",i))})}},IS=11;function GD(t,e){var i=e.attributes,n,r,o,s,a;if(!(e.nodeType===IS||t.nodeType===IS)){for(var l=i.length-1;l>=0;l--)n=i[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=t.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),t.setAttributeNS(o,r,s))):(a=t.getAttribute(r),a!==s&&t.setAttribute(r,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)n=c[u],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||t.removeAttributeNS(o,r)):e.hasAttribute(r)||t.removeAttribute(r)}}var $h,KD="http://www.w3.org/1999/xhtml",Mi=typeof document=="undefined"?void 0:document,JD=!!Mi&&"content"in Mi.createElement("template"),e8=!!Mi&&Mi.createRange&&"createContextualFragment"in Mi.createRange();function t8(t){var e=Mi.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function i8(t){$h||($h=Mi.createRange(),$h.selectNode(Mi.body));var e=$h.createContextualFragment(t);return e.childNodes[0]}function n8(t){var e=Mi.createElement("body");return e.innerHTML=t,e.childNodes[0]}function r8(t){return t=t.trim(),JD?t8(t):e8?i8(t):n8(t)}function Xh(t,e){var i=t.nodeName,n=e.nodeName,r,o;return i===n?!0:(r=i.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?i===n.toUpperCase():o<=90&&r>=97?n===i.toUpperCase():!1)}function o8(t,e){return!e||e===KD?Mi.createElement(t):Mi.createElementNS(e,t)}function s8(t,e){for(var i=t.firstChild;i;){var n=i.nextSibling;e.appendChild(i),i=n}return e}function Mg(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var DS={OPTION:function(t,e){var i=t.parentNode;if(i){var n=i.nodeName.toUpperCase();n==="OPTGROUP"&&(i=i.parentNode,n=i&&i.nodeName.toUpperCase()),n==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Mg(t,e,"selected")},INPUT:function(t,e){Mg(t,e,"checked"),Mg(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var n=t.firstChild;if(n){var r=n.nodeValue;if(r==i||!i&&r==t.placeholder)return;n.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,n=0,r=t.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){i=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}t.selectedIndex=i}}},kc=1,zS=11,US=3,MS=8;function ko(){}function a8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function l8(t){return function(i,n,r){if(r||(r={}),typeof n=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=n;n=Mi.createElement("html"),n.innerHTML=o}else n=r8(n);else n.nodeType===zS&&(n=n.firstElementChild);var s=r.getNodeKey||a8,a=r.onBeforeNodeAdded||ko,l=r.onNodeAdded||ko,c=r.onBeforeElUpdated||ko,u=r.onElUpdated||ko,f=r.onBeforeNodeDiscarded||ko,d=r.onNodeDiscarded||ko,O=r.onBeforeElChildrenUpdated||ko,m=r.skipFromChildren||ko,x=r.addChild||function(j,ue){return j.appendChild(ue)},v=r.childrenOnly===!0,w=Object.create(null),T=[];function A(j){T.push(j)}function L(j,ue){if(j.nodeType===kc)for(var Z=j.firstChild;Z;){var C=void 0;ue&&(C=s(Z))?A(C):(d(Z),Z.firstChild&&L(Z,ue)),Z=Z.nextSibling}}function D(j,ue,Z){f(j)!==!1&&(ue&&ue.removeChild(j),d(j),L(j,Z))}function P(j){if(j.nodeType===kc||j.nodeType===zS)for(var ue=j.firstChild;ue;){var Z=s(ue);Z&&(w[Z]=ue),P(ue),ue=ue.nextSibling}}P(i);function N(j){l(j);for(var ue=j.firstChild;ue;){var Z=ue.nextSibling,C=s(ue);if(C){var W=w[C];W&&Xh(ue,W)?(ue.parentNode.replaceChild(W,ue),H(W,ue)):N(ue)}else N(ue);ue=Z}}function le(j,ue,Z){for(;ue;){var C=ue.nextSibling;(Z=s(ue))?A(Z):D(ue,j,!0),ue=C}}function H(j,ue,Z){var C=s(ue);if(C&&delete w[C],!Z){var W=c(j,ue);if(W===!1||(W instanceof HTMLElement&&(j=W,P(j)),t(j,ue),u(j),O(j,ue)===!1))return}j.nodeName!=="TEXTAREA"?M(j,ue):DS.TEXTAREA(j,ue)}function M(j,ue){var Z=m(j,ue),C=ue.firstChild,W=j.firstChild,oe,I,Ne,We,Ve;e:for(;C;){for(We=C.nextSibling,oe=s(C);!Z&&W;){if(Ne=W.nextSibling,C.isSameNode&&C.isSameNode(W)){C=We,W=Ne;continue e}I=s(W);var Et=W.nodeType,Xe=void 0;if(Et===C.nodeType&&(Et===kc?(oe?oe!==I&&((Ve=w[oe])?Ne===Ve?Xe=!1:(j.insertBefore(Ve,W),I?A(I):D(W,j,!0),W=Ve,I=s(W)):Xe=!1):I&&(Xe=!1),Xe=Xe!==!1&&Xh(W,C),Xe&&H(W,C)):(Et===US||Et==MS)&&(Xe=!0,W.nodeValue!==C.nodeValue&&(W.nodeValue=C.nodeValue))),Xe){C=We,W=Ne;continue e}I?A(I):D(W,j,!0),W=Ne}if(oe&&(Ve=w[oe])&&Xh(Ve,C))Z||x(j,Ve),H(Ve,C);else{var Rt=a(C);Rt!==!1&&(Rt&&(C=Rt),C.actualize&&(C=C.actualize(j.ownerDocument||Mi)),x(j,C),N(C))}C=We,W=Ne}le(j,W,I);var Lt=DS[j.nodeName];Lt&&Lt(j,ue)}var ie=i,ne=ie.nodeType,re=n.nodeType;if(!v){if(ne===kc)re===kc?Xh(i,n)||(d(i),ie=s8(i,o8(n.nodeName,n.namespaceURI))):ie=n;else if(ne===US||ne===MS){if(re===ne)return ie.nodeValue!==n.nodeValue&&(ie.nodeValue=n.nodeValue),ie;ie=n}}if(ie===n)d(i);else{if(n.isSameNode&&n.isSameNode(ie))return;if(H(ie,n,v),T)for(var de=0,pe=T.length;dei(...e))}trackAfter(t,...e){this.callbacks[`after${t}`].forEach(i=>i(...e))}markPrunableContentForRemoval(){let t=this.liveSocket.binding(Mh);G.all(this.container,`[${t}=append] > *, [${t}=prepend] > *`,e=>{e.setAttribute(gS,"")})}perform(t){let{view:e,liveSocket:i,html:n,container:r,targetContainer:o}=this;if(this.isCIDPatch()&&!o)return;let s=i.getActiveElement(),{selectionStart:a,selectionEnd:l}=s&&G.hasSelectionRange(s)?s:{},c=i.binding(Mh),u=i.binding(jg),f=i.binding(Wg),d=i.binding(ED),O=[],m=[],x=[],v=null;function w(T,A,L=this.withChildren){let D={childrenOnly:T.getAttribute(Cr)===null&&!L,getNodeKey:P=>G.isPhxDestroyed(P)?null:t?P.id:P.id||P.getAttribute&&P.getAttribute(FS),skipFromChildren:P=>P.getAttribute(c)===Ig,addChild:(P,N)=>{let{ref:le,streamAt:H}=this.getStreamInsert(N);if(le===void 0)return P.appendChild(N);if(this.setStreamRef(N,le),H===0)P.insertAdjacentElement("afterbegin",N);else if(H===-1){let M=P.lastElementChild;if(M&&!M.hasAttribute(bc)){let ie=Array.from(P.children).find(ne=>!ne.hasAttribute(bc));P.insertBefore(N,ie)}else P.appendChild(N)}else if(H>0){let M=Array.from(P.children)[H];P.insertBefore(N,M)}},onBeforeNodeAdded:P=>{G.maintainPrivateHooks(P,P,u,f),this.trackBefore("added",P);let N=P;return this.streamComponentRestore[P.id]&&(N=this.streamComponentRestore[P.id],delete this.streamComponentRestore[P.id],w.call(this,N,P,!0)),N},onNodeAdded:P=>{P.getAttribute&&this.maybeReOrderStream(P,!0),P instanceof HTMLImageElement&&P.srcset?P.srcset=P.srcset:P instanceof HTMLVideoElement&&P.autoplay&&P.play(),G.isNowTriggerFormExternal(P,d)&&(v=P),(G.isPhxChild(P)&&e.ownsElement(P)||G.isPhxSticky(P)&&e.ownsElement(P.parentNode))&&this.trackAfter("phxChildAdded",P),O.push(P)},onNodeDiscarded:P=>this.onNodeDiscarded(P),onBeforeNodeDiscarded:P=>P.getAttribute&&P.getAttribute(gS)!==null?!0:!(P.parentElement!==null&&P.id&&G.isPhxUpdate(P.parentElement,c,[Ig,"append","prepend"])||this.maybePendingRemove(P)||this.skipCIDSibling(P)),onElUpdated:P=>{G.isNowTriggerFormExternal(P,d)&&(v=P),m.push(P),this.maybeReOrderStream(P,!1)},onBeforeElUpdated:(P,N)=>{if(P.id&&P.isSameNode(T)&&P.id!==N.id)return D.onNodeDiscarded(P),P.replaceWith(N),D.onNodeAdded(N);if(G.syncPendingAttrs(P,N),G.maintainPrivateHooks(P,N,u,f),G.cleanChildNodes(N,c),this.skipCIDSibling(N))return this.maybeReOrderStream(P),!1;if(G.isPhxSticky(P))return[or,xs,To].map(M=>[M,P.getAttribute(M),N.getAttribute(M)]).forEach(([M,ie,ne])=>{ne&&ie!==ne&&P.setAttribute(M,ne)}),!1;if(G.isIgnored(P,c)||P.form&&P.form.isSameNode(v))return this.trackBefore("updated",P,N),G.mergeAttrs(P,N,{isIgnored:G.isIgnored(P,c)}),m.push(P),G.applyStickyOperations(P),!1;if(P.type==="number"&&P.validity&&P.validity.badInput)return!1;let le=s&&P.isSameNode(s)&&G.isFormInput(P),H=le&&this.isChangedSelect(P,N);if(P.hasAttribute(pn)&&P.getAttribute(qt)!=this.undoRef){G.isUploadInput(P)&&(G.mergeAttrs(P,N,{isIgnored:!0}),this.trackBefore("updated",P,N),m.push(P)),G.applyStickyOperations(P);let ie=P.hasAttribute(qt)?G.private(P,qt)||P.cloneNode(!0):null;ie&&(G.putPrivate(P,qt,ie),le||(P=ie))}if(G.isPhxChild(N)){let M=P.getAttribute(or);return G.mergeAttrs(P,N,{exclude:[xs]}),M!==""&&P.setAttribute(or,M),P.setAttribute(To,this.rootID),G.applyStickyOperations(P),!1}return this.undoRef&&G.private(N,qt)&&G.putPrivate(P,qt,G.private(N,qt)),G.copyPrivates(N,P),le&&P.type!=="hidden"&&!H?(this.trackBefore("updated",P,N),G.mergeFocusedInput(P,N),G.syncAttrsToProps(P),m.push(P),G.applyStickyOperations(P),!1):(H&&P.blur(),G.isPhxUpdate(N,c,["append","prepend"])&&x.push(new HD(P,N,N.getAttribute(c))),G.syncAttrsToProps(N),G.applyStickyOperations(N),this.trackBefore("updated",P,N),P)}};u8(T,A,D)}return this.trackBefore("added",r),this.trackBefore("updated",r,r),i.time("morphdom",()=>{this.streams.forEach(([T,A,L,D])=>{A.forEach(([P,N,le])=>{this.streamInserts[P]={ref:T,streamAt:N,limit:le,reset:D}}),D!==void 0&&G.all(r,`[${bc}="${T}"]`,P=>{this.removeStreamChildElement(P)}),L.forEach(P=>{let N=r.querySelector(`[id="${P}"]`);N&&this.removeStreamChildElement(N)})}),t&&G.all(this.container,`[${c}=${Ig}]`,T=>{Array.from(T.children).forEach(A=>{this.removeStreamChildElement(A)})}),w.call(this,o,n)}),i.isDebugEnabled()&&(UD(),MD(this.streamInserts),Array.from(document.querySelectorAll("input[name=id]")).forEach(T=>{T.form&&console.error(`Detected an input with name="id" inside a form! This will cause problems when patching the DOM. +`,T)})),x.length>0&&i.time("post-morph append/prepend restoration",()=>{x.forEach(T=>T.perform())}),i.silenceEvents(()=>G.restoreFocus(s,a,l)),G.dispatchEvent(document,"phx:update"),O.forEach(T=>this.trackAfter("added",T)),m.forEach(T=>this.trackAfter("updated",T)),this.transitionPendingRemoves(),v&&(i.unload(),Object.getPrototypeOf(v).submit.call(v)),!0}onNodeDiscarded(t){(G.isPhxChild(t)||G.isPhxSticky(t))&&this.liveSocket.destroyViewByEl(t),this.trackAfter("discarded",t)}maybePendingRemove(t){return t.getAttribute&&t.getAttribute(this.phxRemove)!==null?(this.pendingRemoves.push(t),!0):!1}removeStreamChildElement(t){this.view.ownsElement(t)&&(this.streamInserts[t.id]?(this.streamComponentRestore[t.id]=t,t.remove()):this.maybePendingRemove(t)||(t.remove(),this.onNodeDiscarded(t)))}getStreamInsert(t){return(t.id?this.streamInserts[t.id]:{})||{}}setStreamRef(t,e){G.putSticky(t,bc,i=>i.setAttribute(bc,e))}maybeReOrderStream(t,e){let{ref:i,streamAt:n,reset:r}=this.getStreamInsert(t);if(n!==void 0&&(this.setStreamRef(t,i),!(!r&&!e)&&t.parentElement)){if(n===0)t.parentElement.insertBefore(t,t.parentElement.firstElementChild);else if(n>0){let o=Array.from(t.parentElement.children),s=o.indexOf(t);if(n>=o.length-1)t.parentElement.appendChild(t);else{let a=o[n];s>n?t.parentElement.insertBefore(t,a):t.parentElement.insertBefore(t,a.nextElementSibling)}}this.maybeLimitStream(t)}}maybeLimitStream(t){let{limit:e}=this.getStreamInsert(t),i=e!==null&&Array.from(t.parentElement.children);e&&e<0&&i.length>e*-1?i.slice(0,i.length+e).forEach(n=>this.removeStreamChildElement(n)):e&&e>=0&&i.length>e&&i.slice(e).forEach(n=>this.removeStreamChildElement(n))}transitionPendingRemoves(){let{pendingRemoves:t,liveSocket:e}=this;t.length>0&&e.transitionRemoves(t,()=>{t.forEach(i=>{let n=G.firstPhxChild(i);n&&e.destroyViewByEl(n),i.remove()}),this.trackAfter("transitionsDiscarded",t)})}isChangedSelect(t,e){return!(t instanceof HTMLSelectElement)||t.multiple?!1:t.options.length!==e.options.length?!0:(e.value=t.value,!t.isEqualNode(e))}isCIDPatch(){return this.cidPatch}skipCIDSibling(t){return t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(YS)}targetCIDContainer(t){if(!this.isCIDPatch())return;let[e,...i]=G.findComponentNodeList(this.container,this.targetCID);return i.length===0&&G.childNodeLength(t)===1?e:e&&e.parentNode}indexOf(t,e){return Array.from(t.children).indexOf(e)}},f8=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h8=new Set(["'",'"']),NS=(t,e,i)=>{let n=0,r=!1,o,s,a,l,c,u,f=t.match(/^(\s*(?:\s*)*)<([^\s\/>]+)/);if(f===null)throw new Error(`malformed html ${t}`);for(n=f[0].length,o=f[1],a=f[2],l=n,n;n";n++)if(t.charAt(n)==="="){let m=t.slice(n-3,n)===" id";n++;let x=t.charAt(n);if(h8.has(x)){let v=n;for(n++,n;n=o.length+a.length;){let m=t.charAt(d);if(r)m==="-"&&t.slice(d-3,d)===""&&t.slice(d-2,d)==="--")r=!0,d-=3;else{if(m===">")break;d-=1}}s=t.slice(d+1,t.length);let O=Object.keys(e).map(m=>e[m]===!0?m:`${m}="${e[m]}"`).join(" ");if(i){let m=c?` id="${c}"`:"";f8.has(a)?u=`<${a}${m}${O===""?"":" "}${O}/>`:u=`<${a}${m}${O===""?"":" "}${O}>`}else{let m=t.slice(l,d+1);u=`<${a}${O===""?"":" "}${O}${m}`}return[u,o,s]},qS=class{static extract(t){let{[QS]:e,[CS]:i,[_S]:n}=t;return delete t[QS],delete t[CS],delete t[_S],{diff:t,title:n,reply:e||null,events:i||[]}}constructor(t,e){this.viewId=t,this.rendered={},this.magicId=0,this.mergeDiff(e)}parentViewId(){return this.viewId}toString(t){let[e,i]=this.recursiveToString(this.rendered,this.rendered[Pi],t,!0,{});return[e,i]}recursiveToString(t,e=t[Pi],i,n,r){i=i?new Set(i):null;let o={buffer:"",components:e,onlyCids:i,streams:new Set};return this.toOutputBuffer(t,null,o,n,r),[o.buffer,o.streams]}componentCIDs(t){return Object.keys(t[Pi]||{}).map(e=>parseInt(e))}isComponentOnlyDiff(t){return t[Pi]?Object.keys(t).length===1:!1}getComponent(t,e){return t[Pi][e]}resetRender(t){this.rendered[Pi][t]&&(this.rendered[Pi][t].reset=!0)}mergeDiff(t){let e=t[Pi],i={};if(delete t[Pi],this.rendered=this.mutableMerge(this.rendered,t),this.rendered[Pi]=this.rendered[Pi]||{},e){let n=this.rendered[Pi];for(let r in e)e[r]=this.cachedFindComponent(r,e[r],n,e,i);for(let r in e)n[r]=e[r];t[Pi]=e}}cachedFindComponent(t,e,i,n,r){if(r[t])return r[t];{let o,s,a=e[rr];if(Pr(a)){let l;a>0?l=this.cachedFindComponent(a,n[a],i,n,r):l=i[-a],s=l[rr],o=this.cloneMerge(l,e,!0),o[rr]=s}else o=e[rr]!==void 0||i[t]===void 0?e:this.cloneMerge(i[t],e,!1);return r[t]=o,o}}mutableMerge(t,e){return e[rr]!==void 0?e:(this.doMutableMerge(t,e),t)}doMutableMerge(t,e){for(let i in e){let n=e[i],r=t[i];La(n)&&n[rr]===void 0&&La(r)?this.doMutableMerge(r,n):t[i]=n}t[Ug]&&(t.newRender=!0)}cloneMerge(t,e,i){let n=Y(Y({},t),e);for(let r in n){let o=e[r],s=t[r];La(o)&&o[rr]===void 0&&La(s)?n[r]=this.cloneMerge(s,o,i):o===void 0&&La(s)&&(n[r]=this.cloneMerge(s,{},i))}return i?(delete n.magicId,delete n.newRender):t[Ug]&&(n.newRender=!0),n}componentToString(t){let[e,i]=this.recursiveCIDToString(this.rendered[Pi],t,null),[n,r,o]=NS(e,{});return[n,i]}pruneCIDs(t){t.forEach(e=>delete this.rendered[Pi][e])}get(){return this.rendered}isNewFingerprint(t={}){return!!t[rr]}templateStatic(t,e){return typeof t=="number"?e[t]:t}nextMagicID(){return this.magicId++,`m${this.magicId}-${this.parentViewId()}`}toOutputBuffer(t,e,i,n,r={}){if(t[Ah])return this.comprehensionToBuffer(t,e,i);let{[rr]:o}=t;o=this.templateStatic(o,e);let s=t[Ug],a=i.buffer;s&&(i.buffer=""),n&&s&&!t.magicId&&(t.newRender=!0,t.magicId=this.nextMagicID()),i.buffer+=o[0];for(let l=1;l0||l.length>0||c)&&(delete t[AS],t[Ah]=[],i.streams.add(o))}dynamicToBuffer(t,e,i,n){if(typeof t=="number"){let[r,o]=this.recursiveCIDToString(i.components,t,i.onlyCids);i.buffer+=r,i.streams=new Set([...i.streams,...o])}else La(t)?this.toOutputBuffer(t,e,i,n,{}):i.buffer+=t}recursiveCIDToString(t,e,i){let n=t[e]||Ui(`no component for CID ${e}`,t),r={[Cr]:e},o=i&&!i.has(e);n.newRender=!o,n.magicId=`c${e}-${this.parentViewId()}`;let s=!n.reset,[a,l]=this.recursiveToString(n,t,i,s,r);return delete n.reset,[a,l]}},jS=[],WS=200,d8={exec(t,e,i,n,r,o){let[s,a]=o||[null,{callback:o&&o.callback}];(i.charAt(0)==="["?JSON.parse(i):[[s,a]]).forEach(([c,u])=>{c===s&&(u=Y(Y({},a),u),u.callback=u.callback||a.callback),this.filterToEls(n.liveSocket,r,u).forEach(f=>{this[`exec_${c}`](t,e,i,n,r,f,u)})})},isVisible(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length>0)},isInViewport(t){let e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;return e.right>0&&e.bottom>0&&e.left{if(A.isConnected())if(e==="change"){let{newCid:D,_target:P}=s;P=P||(G.isFormInput(r)?r.name:void 0),P&&(x._target=P),A.pushInput(r,L,D,a||i,x,m)}else if(e==="submit"){let{submitter:D}=s;A.submitForm(r,L,a||i,D,x,m)}else A.pushEvent(e,r,L,a||i,l,x,m)};s.targetView&&s.targetCtx?T(s.targetView,s.targetCtx):n.withinTargets(w,T)},exec_navigate(t,e,i,n,r,o,{href:s,replace:a}){n.liveSocket.historyRedirect(t,s,a?"replace":"push",null,r)},exec_patch(t,e,i,n,r,o,{href:s,replace:a}){n.liveSocket.pushHistoryPatch(t,s,a?"replace":"push",r)},exec_focus(t,e,i,n,r,o){Ji.attemptFocus(o),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>Ji.attemptFocus(o))})},exec_focus_first(t,e,i,n,r,o){Ji.focusFirstInteractive(o)||Ji.focusFirst(o),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>Ji.focusFirstInteractive(o)||Ji.focusFirst(o))})},exec_push_focus(t,e,i,n,r,o){jS.push(o||r)},exec_pop_focus(t,e,i,n,r,o){let s=jS.pop();s&&(s.focus(),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>s.focus())}))},exec_add_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.addOrRemoveClasses(o,s,[],a,l,n,c)},exec_remove_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.addOrRemoveClasses(o,[],s,a,l,n,c)},exec_toggle_class(t,e,i,n,r,o,{names:s,transition:a,time:l,blocking:c}){this.toggleClasses(o,s,a,l,n,c)},exec_toggle_attr(t,e,i,n,r,o,{attr:[s,a,l]}){this.toggleAttr(o,s,a,l)},exec_transition(t,e,i,n,r,o,{time:s,transition:a,blocking:l}){this.addOrRemoveClasses(o,[],[],a,s,n,l)},exec_toggle(t,e,i,n,r,o,{display:s,ins:a,outs:l,time:c,blocking:u}){this.toggle(e,n,o,s,a,l,c,u)},exec_show(t,e,i,n,r,o,{display:s,transition:a,time:l,blocking:c}){this.show(e,n,o,s,a,l,c)},exec_hide(t,e,i,n,r,o,{display:s,transition:a,time:l,blocking:c}){this.hide(e,n,o,s,a,l,c)},exec_set_attr(t,e,i,n,r,o,{attr:[s,a]}){this.setOrRemoveAttrs(o,[[s,a]],[])},exec_remove_attr(t,e,i,n,r,o,{attr:s}){this.setOrRemoveAttrs(o,[],[s])},show(t,e,i,n,r,o,s){this.isVisible(i)||this.toggle(t,e,i,n,r,null,o,s)},hide(t,e,i,n,r,o,s){this.isVisible(i)&&this.toggle(t,e,i,n,null,r,o,s)},toggle(t,e,i,n,r,o,s,a){s=s||WS;let[l,c,u]=r||[[],[],[]],[f,d,O]=o||[[],[],[]];if(l.length>0||f.length>0)if(this.isVisible(i)){let m=()=>{this.addOrRemoveClasses(i,d,l.concat(c).concat(u)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,f,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(i,O,d))})},x=()=>{this.addOrRemoveClasses(i,[],f.concat(O)),G.putSticky(i,"toggle",v=>v.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))};i.dispatchEvent(new Event("phx:hide-start")),a===!1?(m(),setTimeout(x,s)):e.transition(s,m,x)}else{if(t==="remove")return;let m=()=>{this.addOrRemoveClasses(i,c,f.concat(d).concat(O));let v=n||this.defaultDisplay(i);window.requestAnimationFrame(()=>{this.addOrRemoveClasses(i,l,[]),window.requestAnimationFrame(()=>{G.putSticky(i,"toggle",w=>w.style.display=v),this.addOrRemoveClasses(i,u,c)})})},x=()=>{this.addOrRemoveClasses(i,[],l.concat(u)),i.dispatchEvent(new Event("phx:show-end"))};i.dispatchEvent(new Event("phx:show-start")),a===!1?(m(),setTimeout(x,s)):e.transition(s,m,x)}else this.isVisible(i)?window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:hide-start")),G.putSticky(i,"toggle",m=>m.style.display="none"),i.dispatchEvent(new Event("phx:hide-end"))}):window.requestAnimationFrame(()=>{i.dispatchEvent(new Event("phx:show-start"));let m=n||this.defaultDisplay(i);G.putSticky(i,"toggle",x=>x.style.display=m),i.dispatchEvent(new Event("phx:show-end"))})},toggleClasses(t,e,i,n,r,o){window.requestAnimationFrame(()=>{let[s,a]=G.getSticky(t,"classes",[[],[]]),l=e.filter(u=>s.indexOf(u)<0&&!t.classList.contains(u)),c=e.filter(u=>a.indexOf(u)<0&&t.classList.contains(u));this.addOrRemoveClasses(t,l,c,i,n,r,o)})},toggleAttr(t,e,i,n){t.hasAttribute(e)?n!==void 0?t.getAttribute(e)===i?this.setOrRemoveAttrs(t,[[e,n]],[]):this.setOrRemoveAttrs(t,[[e,i]],[]):this.setOrRemoveAttrs(t,[],[e]):this.setOrRemoveAttrs(t,[[e,i]],[])},addOrRemoveClasses(t,e,i,n,r,o,s){r=r||WS;let[a,l,c]=n||[[],[],[]];if(a.length>0){let u=()=>{this.addOrRemoveClasses(t,l,[].concat(a).concat(c)),window.requestAnimationFrame(()=>{this.addOrRemoveClasses(t,a,[]),window.requestAnimationFrame(()=>this.addOrRemoveClasses(t,c,l))})},f=()=>this.addOrRemoveClasses(t,e.concat(c),i.concat(a).concat(l));s===!1?(u(),setTimeout(f,r)):o.transition(r,u,f);return}window.requestAnimationFrame(()=>{let[u,f]=G.getSticky(t,"classes",[[],[]]),d=e.filter(v=>u.indexOf(v)<0&&!t.classList.contains(v)),O=i.filter(v=>f.indexOf(v)<0&&t.classList.contains(v)),m=u.filter(v=>i.indexOf(v)<0).concat(d),x=f.filter(v=>e.indexOf(v)<0).concat(O);G.putSticky(t,"classes",v=>(v.classList.remove(...x),v.classList.add(...m),[m,x]))})},setOrRemoveAttrs(t,e,i){let[n,r]=G.getSticky(t,"attrs",[[],[]]),o=e.map(([l,c])=>l).concat(i),s=n.filter(([l,c])=>!o.includes(l)).concat(e),a=r.filter(l=>!o.includes(l)).concat(i);G.putSticky(t,"attrs",l=>(a.forEach(c=>l.removeAttribute(c)),s.forEach(([c,u])=>l.setAttribute(c,u)),[s,a]))},hasAllClasses(t,e){return e.every(i=>t.classList.contains(i))},isToggledOut(t,e){return!this.isVisible(t)||this.hasAllClasses(t,e)},filterToEls(t,e,{to:i}){let n=()=>{if(typeof i=="string")return document.querySelectorAll(i);if(i.closest){let r=e.closest(i.closest);return r?[r]:[]}else if(i.inner)return e.querySelectorAll(i.inner)};return i?t.jsQuerySelectorAll(e,i,n):[e]},defaultDisplay(t){return{tr:"table-row",td:"table-cell"}[t.tagName.toLowerCase()]||"block"},transitionClasses(t){if(!t)return null;let[e,i,n]=Array.isArray(t)?t:[t.split(" "),[],[]];return e=Array.isArray(e)?e:e.split(" "),i=Array.isArray(i)?i:i.split(" "),n=Array.isArray(n)?n:n.split(" "),[e,i,n]}},bt=d8,Ng="hookId",O8=1,Sc=class{static makeID(){return O8++}static elementID(t){return G.private(t,Ng)}constructor(t,e,i){this.el=e,this.__attachView(t),this.__callbacks=i,this.__listeners=new Set,this.__isDisconnected=!1,G.putPrivate(this.el,Ng,this.constructor.makeID());for(let n in this.__callbacks)this[n]=this.__callbacks[n]}__attachView(t){t?(this.__view=()=>t,this.liveSocket=t.liveSocket):(this.__view=()=>{throw new Error(`hook not yet attached to a live view: ${this.el.outerHTML}`)},this.liveSocket=null)}__mounted(){this.mounted&&this.mounted()}__updated(){this.updated&&this.updated()}__beforeUpdate(){this.beforeUpdate&&this.beforeUpdate()}__destroyed(){this.destroyed&&this.destroyed(),G.deletePrivate(this.el,Ng)}__reconnected(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}__disconnected(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}js(){let t=this;return{exec(e){t.__view().liveSocket.execJS(t.el,e,"hook")},show(e,i={}){let n=t.__view().liveSocket.owner(e);bt.show("hook",n,e,i.display,i.transition,i.time,i.blocking)},hide(e,i={}){let n=t.__view().liveSocket.owner(e);bt.hide("hook",n,e,null,i.transition,i.time,i.blocking)},toggle(e,i={}){let n=t.__view().liveSocket.owner(e);i.in=bt.transitionClasses(i.in),i.out=bt.transitionClasses(i.out),bt.toggle("hook",n,e,i.display,i.in,i.out,i.time,i.blocking)},addClass(e,i,n={}){i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,i,[],n.transition,n.time,r,n.blocking)},removeClass(e,i,n={}){n.transition=bt.transitionClasses(n.transition),i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,[],i,n.transition,n.time,r,n.blocking)},toggleClass(e,i,n={}){n.transition=bt.transitionClasses(n.transition),i=Array.isArray(i)?i:i.split(" ");let r=t.__view().liveSocket.owner(e);bt.toggleClasses(e,i,n.transition,n.time,r,n.blocking)},transition(e,i,n={}){let r=t.__view().liveSocket.owner(e);bt.addOrRemoveClasses(e,[],[],bt.transitionClasses(i),n.time,r,n.blocking)},setAttribute(e,i,n){bt.setOrRemoveAttrs(e,[[i,n]],[])},removeAttribute(e,i){bt.setOrRemoveAttrs(e,[],[i])},toggleAttribute(e,i,n,r){bt.toggleAttr(e,i,n,r)}}}pushEvent(t,e={},i){return i===void 0?new Promise((n,r)=>{try{this.__view().pushHookEvent(this.el,null,t,e,(s,a)=>n(s))===!1&&r(new Error("unable to push hook event. LiveView not connected"))}catch(o){r(o)}}):this.__view().pushHookEvent(this.el,null,t,e,i)}pushEventTo(t,e,i={},n){return n===void 0?new Promise((r,o)=>{try{this.__view().withinTargets(t,(s,a)=>{s.pushHookEvent(this.el,a,e,i,(c,u)=>r(c))===!1&&o(new Error("unable to push hook event. LiveView not connected"))})}catch(s){o(s)}}):this.__view().withinTargets(t,(r,o)=>r.pushHookEvent(this.el,o,e,i,n))}handleEvent(t,e){let i=(n,r)=>r?t:e(n.detail);return window.addEventListener(`phx:${t}`,i),this.__listeners.add(i),i}removeHandleEvent(t){let e=t(null,!0);window.removeEventListener(`phx:${e}`,t),this.__listeners.delete(t)}upload(t,e){return this.__view().dispatchUploads(null,t,e)}uploadTo(t,e,i){return this.__view().withinTargets(t,(n,r)=>{n.dispatchUploads(r,e,i)})}__cleanup__(){this.__listeners.forEach(t=>this.removeHandleEvent(t))}},p8=(t,e)=>{let i=t.endsWith("[]"),n=i?t.slice(0,-2):t;return n=n.replace(/([^\[\]]+)(\]?$)/,`${e}$1$2`),i&&(n+="[]"),n},Lh=(t,e,i=[])=>{let u=e,{submitter:n}=u,r=gi(u,["submitter"]),o;if(n&&n.name){let f=document.createElement("input");f.type="hidden";let d=n.getAttribute("form");d&&f.setAttribute("form",d),f.name=n.name,f.value=n.value,n.parentElement.insertBefore(f,n),o=f}let s=new FormData(t),a=[];s.forEach((f,d,O)=>{f instanceof File&&a.push(d)}),a.forEach(f=>s.delete(f));let l=new URLSearchParams,c=Array.from(t.elements);for(let[f,d]of s.entries())if(i.length===0||i.indexOf(f)>=0){let O=c.filter(v=>v.name===f),m=!O.some(v=>G.private(v,zh)||G.private(v,Ec)),x=O.every(v=>v.type==="hidden");m&&!(n&&n.name==f)&&!x&&l.append(p8(f,"_unused_"),""),l.append(f,d)}n&&o&&n.parentElement.removeChild(o);for(let f in r)l.append(f,r[f]);return l.toString()},m8=class JS{static closestView(e){let i=e.closest(ws);return i?G.private(i,"view"):null}constructor(e,i,n,r,o){this.isDead=!1,this.liveSocket=i,this.flash=r,this.parent=n,this.root=n?n.root:this,this.el=e,G.putPrivate(this.el,"view",this),this.id=this.el.id,this.ref=0,this.lastAckRef=null,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pendingForms=new Set,this.redirect=!1,this.href=null,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinAttempts=0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(s){s&&s()},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.formsForRecovery={},this.channel=this.liveSocket.channel(`lv:${this.id}`,()=>{let s=this.href&&this.expandURL(this.href);return{redirect:this.redirect?s:void 0,url:this.redirect?void 0:s||void 0,params:this.connectParams(o),session:this.getSession(),static:this.getStatic(),flash:this.flash}})}setHref(e){this.href=e}setRedirect(e){this.redirect=!0,this.href=e}isMain(){return this.el.hasAttribute(Yg)}connectParams(e){let i=this.liveSocket.params(this.el),n=G.all(document,`[${this.binding(kD)}]`).map(r=>r.src||r.href).filter(r=>typeof r=="string");return n.length>0&&(i._track_static=n),i._mounts=this.joinCount,i._mount_attempts=this.joinAttempts,i._live_referer=e,this.joinAttempts++,i}isConnected(){return this.channel.canPush()}getSession(){return this.el.getAttribute(or)}getStatic(){let e=this.el.getAttribute(xs);return e===""?null:e}destroy(e=function(){}){this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);let i=()=>{e();for(let n in this.viewHooks)this.destroyHook(this.viewHooks[n])};G.markPhxChildDestroyed(this.el),this.log("destroyed",()=>["the child has been removed from the parent"]),this.channel.leave().receive("ok",i).receive("error",i).receive("timeout",i)}setContainerClasses(...e){this.el.classList.remove(bS,bs,Ra,yS,mc),this.el.classList.add(...e)}showLoader(e){if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout(()=>this.showLoader(),e);else{for(let i in this.viewHooks)this.viewHooks[i].__disconnected();this.setContainerClasses(bs)}}execAll(e){G.all(this.el,`[${e}]`,i=>this.liveSocket.execJS(i,i.getAttribute(e)))}hideLoader(){clearTimeout(this.loaderTimer),this.setContainerClasses(bS),this.execAll(this.binding("connected"))}triggerReconnected(){for(let e in this.viewHooks)this.viewHooks[e].__reconnected()}log(e,i){this.liveSocket.log(this,e,i)}transition(e,i,n=function(){}){this.liveSocket.transition(e,i,n)}withinTargets(e,i,n=document,r){if(e instanceof HTMLElement||e instanceof SVGElement)return this.liveSocket.owner(e,o=>i(o,e));if(Pr(e))G.findComponentNodeList(r||this.el,e).length===0?Ui(`no component found matching phx-target of ${e}`):i(this,parseInt(e));else{let o=Array.from(n.querySelectorAll(e));o.length===0&&Ui(`nothing found matching the phx-target selector "${e}"`),o.forEach(s=>this.liveSocket.owner(s,a=>i(a,s)))}}applyDiff(e,i,n){this.log(e,()=>["",Dh(i)]);let{diff:r,reply:o,events:s,title:a}=qS.extract(i);n({diff:r,reply:o,events:s}),(typeof a=="string"||e=="mount")&&window.requestAnimationFrame(()=>G.putTitle(a))}onJoin(e){let{rendered:i,container:n,liveview_version:r}=e;if(n){let[o,s]=n;this.el=G.replaceRootContainer(this.el,o,s)}this.childJoins=0,this.joinPending=!0,this.flash=null,this.root===this&&(this.formsForRecovery=this.getFormsForRecovery()),this.isMain()&&window.history.state===null&&zi.pushState("replace",{type:"patch",id:this.id,position:this.liveSocket.currentHistoryPosition}),r!==this.liveSocket.version()&&console.error(`LiveView asset version mismatch. JavaScript version ${this.liveSocket.version()} vs. server ${r}. To avoid issues, please ensure that your assets use the same version as the server.`),zi.dropLocal(this.liveSocket.localStorage,window.location.pathname,VS),this.applyDiff("mount",i,({diff:o,events:s})=>{this.rendered=new qS(this.id,o);let[a,l]=this.renderContainer(null,"join");this.dropPendingRefs(),this.joinCount++,this.joinAttempts=0,this.maybeRecoverForms(a,()=>{this.onJoinComplete(e,a,l,s)})})}dropPendingRefs(){G.all(document,`[${pn}="${this.refSrc()}"]`,e=>{e.removeAttribute(Da),e.removeAttribute(pn),e.removeAttribute(qt)})}onJoinComplete({live_patch:e},i,n,r){if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(e,i,n,r);G.findPhxChildrenInFragment(i,this.id).filter(s=>{let a=s.id&&this.el.querySelector(`[id="${s.id}"]`),l=a&&a.getAttribute(xs);return l&&s.setAttribute(xs,l),a&&a.setAttribute(To,this.root.id),this.joinChild(s)}).length===0?this.parent?(this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,n,r)]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(e,i,n,r)):this.root.pendingJoinOps.push([this,()=>this.applyJoinPatch(e,i,n,r)])}attachTrueDocEl(){this.el=G.byId(this.id),this.el.setAttribute(To,this.root.id)}execNewMounted(e=this.el){let i=this.binding(jg),n=this.binding(Wg);G.all(e,`[${i}], [${n}]`,r=>{this.ownsElement(r)&&(G.maintainPrivateHooks(r,r,i,n),this.maybeAddNewHook(r))}),G.all(e,`[${this.binding(gc)}], [data-phx-${gc}]`,r=>{this.ownsElement(r)&&this.maybeAddNewHook(r)}),G.all(e,`[${this.binding(kS)}]`,r=>{this.ownsElement(r)&&this.maybeMounted(r)})}applyJoinPatch(e,i,n,r){this.attachTrueDocEl();let o=new Rh(this,this.el,this.id,i,n,null);if(o.markPrunableContentForRemoval(),this.performPatch(o,!1,!0),this.joinNewChildren(),this.execNewMounted(),this.joinPending=!1,this.liveSocket.dispatchEvents(r),this.applyPendingUpdates(),e){let{kind:s,to:a}=e;this.liveSocket.historyPatch(a,s)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}triggerBeforeUpdateHook(e,i){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,i]);let n=this.getHook(e),r=n&&G.isIgnored(e,this.binding(Mh));if(n&&!e.isEqualNode(i)&&!(r&&qD(e.dataset,i.dataset)))return n.__beforeUpdate(),n}maybeMounted(e){let i=e.getAttribute(this.binding(kS)),n=i&&G.private(e,"mounted");i&&!n&&(this.liveSocket.execJS(e,i),G.putPrivate(e,"mounted",!0))}maybeAddNewHook(e){let i=this.addHook(e);i&&i.__mounted()}performPatch(e,i,n=!1){let r=[],o=!1,s=new Set;return this.liveSocket.triggerDOM("onPatchStart",[e.targetContainer]),e.after("added",a=>{this.liveSocket.triggerDOM("onNodeAdded",[a]);let l=this.binding(jg),c=this.binding(Wg);G.maintainPrivateHooks(a,a,l,c),this.maybeAddNewHook(a),a.getAttribute&&this.maybeMounted(a)}),e.after("phxChildAdded",a=>{G.isPhxSticky(a)?this.liveSocket.joinRootViews():o=!0}),e.before("updated",(a,l)=>{this.triggerBeforeUpdateHook(a,l)&&s.add(a.id)}),e.after("updated",a=>{s.has(a.id)&&this.getHook(a).__updated()}),e.after("discarded",a=>{a.nodeType===Node.ELEMENT_NODE&&r.push(a)}),e.after("transitionsDiscarded",a=>this.afterElementsRemoved(a,i)),e.perform(n),this.afterElementsRemoved(r,i),this.liveSocket.triggerDOM("onPatchEnd",[e.targetContainer]),o}afterElementsRemoved(e,i){let n=[];e.forEach(r=>{let o=G.all(r,`[${Cr}]`),s=G.all(r,`[${this.binding(gc)}], [data-phx-hook]`);o.concat(r).forEach(a=>{let l=this.componentID(a);Pr(l)&&n.indexOf(l)===-1&&n.push(l)}),s.concat(r).forEach(a=>{let l=this.getHook(a);l&&this.destroyHook(l)})}),i&&this.maybePushComponentsDestroyed(n)}joinNewChildren(){G.findPhxChildren(this.el,this.id).forEach(e=>this.joinChild(e))}maybeRecoverForms(e,i){let n=this.binding("change"),r=this.root.formsForRecovery,o=document.createElement("template");o.innerHTML=e;let s=o.content.firstElementChild;s.id=this.id,s.setAttribute(To,this.root.id),s.setAttribute(or,this.getSession()),s.setAttribute(xs,this.getStatic()),s.setAttribute(vs,this.parent?this.parent.id:null);let a=G.all(o.content,"form").filter(l=>l.id&&r[l.id]).filter(l=>!this.pendingForms.has(l.id)).filter(l=>r[l.id].getAttribute(n)===l.getAttribute(n)).map(l=>[r[l.id],l]);if(a.length===0)return i();a.forEach(([l,c],u)=>{this.pendingForms.add(c.id),this.pushFormRecovery(l,c,o.content.firstElementChild,()=>{this.pendingForms.delete(c.id),u===a.length-1&&i()})})}getChildById(e){return this.root.children[this.id][e]}getDescendentByEl(e){var i;return e.id===this.id?this:(i=this.children[e.getAttribute(vs)])==null?void 0:i[e.id]}destroyDescendent(e){for(let i in this.root.children)for(let n in this.root.children[i])if(n===e)return this.root.children[i][n].destroy()}joinChild(e){if(!this.getChildById(e.id)){let n=new JS(e,this.liveSocket,this);return this.root.children[this.id][n.id]=n,n.join(),this.childJoins++,!0}}isJoinPending(){return this.joinPending}ackJoin(e){this.childJoins--,this.childJoins===0&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}onAllChildJoinsComplete(){this.pendingForms.clear(),this.formsForRecovery={},this.joinCallback(()=>{this.pendingJoinOps.forEach(([e,i])=>{e.isDestroyed()||i()}),this.pendingJoinOps=[]})}update(e,i){if(this.isJoinPending()||this.liveSocket.hasPendingLink()&&this.root.isMain())return this.pendingDiffs.push({diff:e,events:i});this.rendered.mergeDiff(e);let n=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",()=>{G.findExistingParentCIDs(this.el,this.rendered.componentCIDs(e)).forEach(o=>{this.componentPatch(this.rendered.getComponent(e,o),o)&&(n=!0)})}):$S(e)||this.liveSocket.time("full patch complete",()=>{let[r,o]=this.renderContainer(e,"update"),s=new Rh(this,this.el,this.id,r,o,null);n=this.performPatch(s,!0)}),this.liveSocket.dispatchEvents(i),n&&this.joinNewChildren()}renderContainer(e,i){return this.liveSocket.time(`toString diff (${i})`,()=>{let n=this.el.tagName,r=e?this.rendered.componentCIDs(e):null,[o,s]=this.rendered.toString(r);return[`<${n}>${o}`,s]})}componentPatch(e,i){if($S(e))return!1;let[n,r]=this.rendered.componentToString(i),o=new Rh(this,this.el,this.id,n,r,i);return this.performPatch(o,!0)}getHook(e){return this.viewHooks[Sc.elementID(e)]}addHook(e){let i=Sc.elementID(e);if(!(e.getAttribute&&!this.ownsElement(e)))if(i&&!this.viewHooks[i]){let n=G.getCustomElHook(e)||Ui(`no hook found for custom element: ${e.id}`);return this.viewHooks[i]=n,n.__attachView(this),n}else{if(i||!e.getAttribute)return;{let n=e.getAttribute(`data-phx-${gc}`)||e.getAttribute(this.binding(gc)),r=this.liveSocket.getHookCallbacks(n);if(r){e.id||Ui(`no DOM ID for hook "${n}". Hooks require a unique ID on each element.`,e);let o=new Sc(this,e,r);return this.viewHooks[Sc.elementID(o.el)]=o,o}else n!==null&&Ui(`unknown hook found for "${n}"`,e)}}}destroyHook(e){let i=Sc.elementID(e.el);e.__destroyed(),e.__cleanup__(),delete this.viewHooks[i]}applyPendingUpdates(){this.pendingDiffs.forEach(({diff:e,events:i})=>this.update(e,i)),this.pendingDiffs=[],this.eachChild(e=>e.applyPendingUpdates())}eachChild(e){let i=this.root.children[this.id]||{};for(let n in i)e(this.getChildById(n))}onChannel(e,i){this.liveSocket.onChannel(this.channel,e,n=>{this.isJoinPending()?this.root.pendingJoinOps.push([this,()=>i(n)]):this.liveSocket.requestDOMUpdate(()=>i(n))})}bindChannel(){this.liveSocket.onChannel(this.channel,"diff",e=>{this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",e,({diff:i,events:n})=>this.update(i,n))})}),this.onChannel("redirect",({to:e,flash:i})=>this.onRedirect({to:e,flash:i})),this.onChannel("live_patch",e=>this.onLivePatch(e)),this.onChannel("live_redirect",e=>this.onLiveRedirect(e)),this.channel.onError(e=>this.onError(e)),this.channel.onClose(e=>this.onClose(e))}destroyAllChildren(){this.eachChild(e=>e.destroy())}onLiveRedirect(e){let{to:i,kind:n,flash:r}=e,o=this.expandURL(i),s=new CustomEvent("phx:server-navigate",{detail:{to:i,kind:n,flash:r}});this.liveSocket.historyRedirect(s,o,n,r)}onLivePatch(e){let{to:i,kind:n}=e;this.href=this.expandURL(i),this.liveSocket.historyPatch(i,n)}expandURL(e){return e.startsWith("/")?`${window.location.protocol}//${window.location.host}${e}`:e}onRedirect({to:e,flash:i,reloadToken:n}){this.liveSocket.redirect(e,i,n)}isDestroyed(){return this.destroyed}joinDead(){this.isDead=!0}joinPush(){return this.joinPush=this.joinPush||this.channel.join(),this.joinPush}join(e){this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel(),this.isMain()&&(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=i=>{i=i||function(){},e?e(this.joinCount,i):i()},this.wrapPush(()=>this.channel.join(),{ok:i=>this.liveSocket.requestDOMUpdate(()=>this.onJoin(i)),error:i=>this.onJoinError(i),timeout:()=>this.onJoinError({reason:"timeout"})})}onJoinError(e){if(e.reason==="reload"){this.log("error",()=>[`failed mount with ${e.status}. Falling back to page reload`,e]),this.onRedirect({to:this.root.href,reloadToken:e.token});return}else if(e.reason==="unauthorized"||e.reason==="stale"){this.log("error",()=>["unauthorized live_redirect. Falling back to page request",e]),this.onRedirect({to:this.root.href});return}if((e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect)return this.onRedirect(e.redirect);if(e.live_redirect)return this.onLiveRedirect(e.live_redirect);if(this.log("error",()=>["unable to join",e]),this.isMain())this.displayError([bs,Ra,mc]),this.liveSocket.isConnected()&&this.liveSocket.reloadWithJitter(this);else{this.joinAttempts>=TS&&(this.root.displayError([bs,Ra,mc]),this.log("error",()=>[`giving up trying to mount after ${TS} tries`,e]),this.destroy());let i=G.byId(this.el.id);i?(G.mergeAttrs(i,this.el),this.displayError([bs,Ra,mc]),this.el=i):this.destroy()}}onClose(e){if(!this.isDestroyed()){if(this.isMain()&&this.liveSocket.hasPendingLink()&&e!=="leave")return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(XD)}}onError(e){this.onClose(e),this.liveSocket.isConnected()&&this.log("error",()=>["view crashed",e]),this.liveSocket.isUnloaded()||(this.liveSocket.isConnected()?this.displayError([bs,Ra,mc]):this.displayError([bs,Ra,yS]))}displayError(e){this.isMain()&&G.dispatchEvent(window,"phx:page-loading-start",{detail:{to:this.href,kind:"error"}}),this.showLoader(),this.setContainerClasses(...e),this.execAll(this.binding("disconnected"))}wrapPush(e,i){let n=this.liveSocket.getLatencySim(),r=n?o=>setTimeout(()=>!this.isDestroyed()&&o(),n):o=>!this.isDestroyed()&&o();r(()=>{e().receive("ok",o=>r(()=>i.ok&&i.ok(o))).receive("error",o=>r(()=>i.error&&i.error(o))).receive("timeout",()=>r(()=>i.timeout&&i.timeout()))})}pushWithReply(e,i,n){if(!this.isConnected())return Promise.reject({error:"noconnection"});let[r,[o],s]=e?e():[null,[],{}],a=this.joinCount,l=function(){};return s.page_loading&&(l=this.liveSocket.withPageLoading({kind:"element",target:o})),typeof n.cid!="number"&&delete n.cid,new Promise((c,u)=>{this.wrapPush(()=>this.channel.push(i,n,LD),{ok:f=>{r!==null&&(this.lastAckRef=r);let d=O=>{f.redirect&&this.onRedirect(f.redirect),f.live_patch&&this.onLivePatch(f.live_patch),f.live_redirect&&this.onLiveRedirect(f.live_redirect),l(),c({resp:f,reply:O})};f.diff?this.liveSocket.requestDOMUpdate(()=>{this.applyDiff("update",f.diff,({diff:O,reply:m,events:x})=>{r!==null&&this.undoRefs(r,n.event),this.update(O,x),d(m)})}):(r!==null&&this.undoRefs(r,n.event),d(null))},error:f=>u({error:f}),timeout:()=>{u({timeout:!0}),this.joinCount===a&&this.liveSocket.reloadWithJitter(this,()=>{this.log("timeout",()=>["received timeout while communicating with server. Falling back to hard refresh for recovery"])})}})})}undoRefs(e,i,n){if(!this.isConnected())return;let r=`[${pn}="${this.refSrc()}"]`;n?(n=new Set(n),G.all(document,r,o=>{n&&!n.has(o)||(G.all(o,r,s=>this.undoElRef(s,e,i)),this.undoElRef(o,e,i))})):G.all(document,r,o=>this.undoElRef(o,e,i))}undoElRef(e,i,n){new LS(e).maybeUndo(i,n,o=>{let s=new Rh(this,e,this.id,o,[],null,{undoRef:i}),a=this.performPatch(s,!0);G.all(e,`[${pn}="${this.refSrc()}"]`,l=>this.undoElRef(l,i,n)),a&&this.joinNewChildren()})}refSrc(){return this.el.id}putRef(e,i,n,r={}){let o=this.ref++,s=this.binding(vS);if(r.loading){let a=G.all(document,r.loading).map(l=>({el:l,lock:!0,loading:!0}));e=e.concat(a)}for(let{el:a,lock:l,loading:c}of e){if(!l&&!c)throw new Error("putRef requires lock or loading");if(a.setAttribute(pn,this.refSrc()),c&&a.setAttribute(Da,o),l&&a.setAttribute(qt,o),!c||r.submitter&&!(a===r.submitter||a===r.form))continue;let u=new Promise(m=>{a.addEventListener(`phx:undo-lock:${o}`,()=>m(O),{once:!0})}),f=new Promise(m=>{a.addEventListener(`phx:undo-loading:${o}`,()=>m(O),{once:!0})});a.classList.add(`phx-${n}-loading`);let d=a.getAttribute(s);d!==null&&(a.getAttribute(Uh)||a.setAttribute(Uh,a.innerText),d!==""&&(a.innerText=d),a.setAttribute(Ia,a.getAttribute(Ia)||a.disabled),a.setAttribute("disabled",""));let O={event:i,eventType:n,ref:o,isLoading:c,isLocked:l,lockElements:e.filter(({lock:m})=>m).map(({el:m})=>m),loadingElements:e.filter(({loading:m})=>m).map(({el:m})=>m),unlock:m=>{m=Array.isArray(m)?m:[m],this.undoRefs(o,i,m)},lockComplete:u,loadingComplete:f,lock:m=>new Promise(x=>{if(this.isAcked(o))return x(O);m.setAttribute(qt,o),m.setAttribute(pn,this.refSrc()),m.addEventListener(`phx:lock-stop:${o}`,()=>x(O),{once:!0})})};a.dispatchEvent(new CustomEvent("phx:push",{detail:O,bubbles:!0,cancelable:!1})),i&&a.dispatchEvent(new CustomEvent(`phx:push:${i}`,{detail:O,bubbles:!0,cancelable:!1}))}return[o,e.map(({el:a})=>a),r]}isAcked(e){return this.lastAckRef!==null&&this.lastAckRef>=e}componentID(e){let i=e.getAttribute&&e.getAttribute(Cr);return i?parseInt(i):null}targetComponentID(e,i,n={}){if(Pr(i))return i;let r=n.target||e.getAttribute(this.binding("target"));return Pr(r)?parseInt(r):i&&(r!==null||n.target)?this.closestComponentID(i):null}closestComponentID(e){return Pr(e)?e:e?So(e.closest(`[${Cr}]`),i=>this.ownsElement(i)&&this.componentID(i)):null}pushHookEvent(e,i,n,r,o){if(!this.isConnected())return this.log("hook",()=>["unable to push hook event. LiveView not connected",n,r]),!1;let[s,a,l]=this.putRef([{el:e,loading:!0,lock:!0}],n,"hook");return this.pushWithReply(()=>[s,a,l],"event",{type:"hook",event:n,value:r,cid:this.closestComponentID(i)}).then(({resp:c,reply:u})=>o(u,s)),s}extractMeta(e,i,n){let r=this.binding("value-");for(let o=0;o=0&&!e.checked&&delete i.value),n){i||(i={});for(let o in n)i[o]=n[o]}return i}pushEvent(e,i,n,r,o,s={},a){this.pushWithReply(()=>this.putRef([{el:i,loading:!0,lock:!0}],r,e,s),"event",{type:e,event:r,value:this.extractMeta(i,o,s.value),cid:this.targetComponentID(i,n,s)}).then(({reply:l})=>a&&a(l))}pushFileProgress(e,i,n,r=function(){}){this.liveSocket.withinOwners(e.form,(o,s)=>{o.pushWithReply(null,"progress",{event:e.getAttribute(o.binding(AD)),ref:e.getAttribute(Qr),entry_ref:i,progress:n,cid:o.targetComponentID(e.form,s)}).then(({resp:a})=>r(a))})}pushInput(e,i,n,r,o,s){if(!e.form)throw new Error("form events require the input to be inside a form");let a,l=Pr(n)?n:this.targetComponentID(e.form,i,o),c=()=>this.putRef([{el:e,loading:!0,lock:!0},{el:e.form,loading:!0,lock:!0}],r,"change",o),u,f=this.extractMeta(e.form);e instanceof HTMLButtonElement&&(f.submitter=e),e.getAttribute(this.binding("change"))?u=Lh(e.form,Y({_target:o._target},f),[e.name]):u=Lh(e.form,Y({_target:o._target},f)),G.isUploadInput(e)&&e.files&&e.files.length>0&&Jt.trackFiles(e,Array.from(e.files)),a=Jt.serializeUploads(e);let d={type:"form",event:r,value:u,uploads:a,cid:l};this.pushWithReply(c,"event",d).then(({resp:O})=>{G.isUploadInput(e)&&G.isAutoUpload(e)?LS.onUnlock(e,()=>{if(Jt.filesAwaitingPreflight(e).length>0){let[m,x]=c();this.undoRefs(m,r,[e.form]),this.uploadFiles(e.form,r,i,m,l,v=>{s&&s(O),this.triggerAwaitingSubmit(e.form,r),this.undoRefs(m,r)})}}):s&&s(O)})}triggerAwaitingSubmit(e,i){let n=this.getScheduledSubmit(e);if(n){let[r,o,s,a]=n;this.cancelSubmit(e,i),a()}}getScheduledSubmit(e){return this.formSubmits.find(([i,n,r,o])=>i.isSameNode(e))}scheduleSubmit(e,i,n,r){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,i,n,r])}cancelSubmit(e,i){this.formSubmits=this.formSubmits.filter(([n,r,o,s])=>n.isSameNode(e)?(this.undoRefs(r,i),!1):!0)}disableForm(e,i,n={}){let r=m=>!(Tc(m,`${this.binding(Mh)}=ignore`,m.form)||Tc(m,"data-phx-update=ignore",m.form)),o=m=>m.hasAttribute(this.binding(vS)),s=m=>m.tagName=="BUTTON",a=m=>["INPUT","TEXTAREA","SELECT"].includes(m.tagName),l=Array.from(e.elements),c=l.filter(o),u=l.filter(s).filter(r),f=l.filter(a).filter(r);u.forEach(m=>{m.setAttribute(Ia,m.disabled),m.disabled=!0}),f.forEach(m=>{m.setAttribute(Vg,m.readOnly),m.readOnly=!0,m.files&&(m.setAttribute(Ia,m.disabled),m.disabled=!0)});let d=c.concat(u).concat(f).map(m=>({el:m,loading:!0,lock:!0})),O=[{el:e,loading:!0,lock:!1}].concat(d).reverse();return this.putRef(O,i,"submit",n)}pushFormSubmit(e,i,n,r,o,s){let a=()=>this.disableForm(e,n,Ee(Y({},o),{form:e,submitter:r})),l=this.targetComponentID(e,i);if(Jt.hasUploadsInProgress(e)){let[c,u]=a(),f=()=>this.pushFormSubmit(e,i,n,r,o,s);return this.scheduleSubmit(e,c,o,f)}else if(Jt.inputsAwaitingPreflight(e).length>0){let[c,u]=a(),f=()=>[c,u,o];this.uploadFiles(e,n,i,c,l,d=>{if(Jt.inputsAwaitingPreflight(e).length>0)return this.undoRefs(c,n);let O=this.extractMeta(e),m=Lh(e,Y({submitter:r},O));this.pushWithReply(f,"event",{type:"form",event:n,value:m,cid:l}).then(({resp:x})=>s(x))})}else if(!(e.hasAttribute(pn)&&e.classList.contains("phx-submit-loading"))){let c=this.extractMeta(e),u=Lh(e,Y({submitter:r},c));this.pushWithReply(a,"event",{type:"form",event:n,value:u,cid:l}).then(({resp:f})=>s(f))}}uploadFiles(e,i,n,r,o,s){let a=this.joinCount,l=Jt.activeFileInputs(e),c=l.length;l.forEach(u=>{let f=new Jt(u,this,()=>{c--,c===0&&s()}),d=f.entries().map(m=>m.toPreflightPayload());if(d.length===0){c--;return}let O={ref:u.getAttribute(Qr),entries:d,cid:this.targetComponentID(u.form,n)};this.log("upload",()=>["sending preflight request",O]),this.pushWithReply(null,"allow_upload",O).then(({resp:m})=>{if(this.log("upload",()=>["got preflight response",m]),f.entries().forEach(x=>{m.entries&&!m.entries[x.ref]&&this.handleFailedEntryPreflight(x.ref,"failed preflight",f)}),m.error||Object.keys(m.entries).length===0)this.undoRefs(r,i),(m.error||[]).map(([v,w])=>{this.handleFailedEntryPreflight(v,w,f)});else{let x=v=>{this.channel.onError(()=>{this.joinCount===a&&v()})};f.initAdapterUpload(m,x,this.liveSocket)}})})}handleFailedEntryPreflight(e,i,n){if(n.isAutoUpload()){let r=n.entries().find(o=>o.ref===e.toString());r&&r.cancel()}else n.entries().map(r=>r.cancel());this.log("upload",()=>[`error for entry ${e}`,i])}dispatchUploads(e,i,n){let r=this.targetCtxElement(e)||this.el,o=G.findUploadInputs(r).filter(s=>s.name===i);o.length===0?Ui(`no live file inputs found matching the name "${i}"`):o.length>1?Ui(`duplicate live file inputs found matching the name "${i}"`):G.dispatchEvent(o[0],BS,{detail:{files:n}})}targetCtxElement(e){if(Pr(e)){let[i]=G.findComponentNodeList(this.el,e);return i}else return e||null}pushFormRecovery(e,i,n,r){let o=this.binding("change"),s=i.getAttribute(this.binding("target"))||i,a=i.getAttribute(this.binding(wS))||i.getAttribute(this.binding("change")),l=Array.from(e.elements).filter(f=>G.isFormInput(f)&&f.name&&!f.hasAttribute(o));if(l.length===0)return;l.forEach(f=>f.hasAttribute(Qr)&&Jt.clearFiles(f));let c=l.find(f=>f.type!=="hidden")||l[0],u=0;this.withinTargets(s,(f,d)=>{let O=this.targetComponentID(i,d);u++;let m=new CustomEvent("phx:form-recovery",{detail:{sourceElement:e}});bt.exec(m,"change",a,this,c,["push",{_target:c.name,targetView:f,targetCtx:d,newCid:O,callback:()=>{u--,u===0&&r()}}])},n,n)}pushLinkPatch(e,i,n,r){let o=this.liveSocket.setPendingLink(i),s=e.isTrusted&&e.type!=="popstate",a=n?()=>this.putRef([{el:n,loading:s,lock:!0}],null,"click"):null,l=()=>this.liveSocket.redirect(window.location.href),c=i.startsWith("/")?`${location.protocol}//${location.host}${i}`:i;this.pushWithReply(a,"live_patch",{url:c}).then(({resp:u})=>{this.liveSocket.requestDOMUpdate(()=>{u.link_redirect?this.liveSocket.replaceMain(i,null,r,o):(this.liveSocket.commitPendingLink(o)&&(this.href=i),this.applyPendingUpdates(),r&&r(o))})},({error:u,timeout:f})=>l())}getFormsForRecovery(){if(this.joinCount===0)return{};let e=this.binding("change");return G.all(this.el,`form[${e}]`).filter(i=>i.id).filter(i=>i.elements.length>0).filter(i=>i.getAttribute(this.binding(wS))!=="ignore").map(i=>i.cloneNode(!0)).reduce((i,n)=>(i[n.id]=n,i),{})}maybePushComponentsDestroyed(e){let i=e.filter(n=>G.findComponentNodeList(this.el,n).length===0);i.length>0&&(i.forEach(n=>this.rendered.resetRender(n)),this.pushWithReply(null,"cids_will_destroy",{cids:i}).then(()=>{this.liveSocket.requestDOMUpdate(()=>{let n=i.filter(r=>G.findComponentNodeList(this.el,r).length===0);n.length>0&&this.pushWithReply(null,"cids_destroyed",{cids:n}).then(({resp:r})=>{this.rendered.pruneCIDs(r.cids)})})}))}ownsElement(e){let i=e.closest(ws);return e.getAttribute(vs)===this.id||i&&i.id===this.id||!i&&this.isDead}submitForm(e,i,n,r,o={}){G.putPrivate(e,Ec,!0),Array.from(e.elements).forEach(a=>G.putPrivate(a,Ec,!0)),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,i,n,r,o,()=>{this.liveSocket.restorePreviouslyActiveFocus()})}binding(e){return this.liveSocket.binding(e)}};var eT=class{constructor(t,e,i={}){if(this.unloaded=!1,!e||e.constructor.name==="Object")throw new Error(` a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example: import {Socket} from "phoenix" import {LiveSocket} from "phoenix_live_view" let liveSocket = new LiveSocket("/live", Socket, {...}) - `);this.socket=new e(t,i),this.bindingPrefix=i.bindingPrefix||RD,this.opts=i,this.params=vc(i.params||{}),this.viewLogger=i.viewLogger,this.metadataCallbacks=i.metadata||{},this.defaults=Object.assign(Dh(ID),i.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.outgoingMainEl=null,this.clickStartedAtTarget=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=Dh(window.location),this.hooks=i.hooks||{},this.uploaders=i.uploaders||{},this.loaderTimeout=i.loaderTimeout||$D,this.reloadWithJitterTimer=null,this.maxReloads=i.maxReloads||xD,this.reloadJitterMin=i.reloadJitterMin||vD,this.reloadJitterMax=i.reloadJitterMax||wD,this.failsafeJitter=i.failsafeJitter||kD,this.localStorage=i.localStorage||window.localStorage,this.sessionStorage=i.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.boundEventNames=new Set,this.serverCloseRef=null,this.domCallbacks=Object.assign({jsQuerySelectorAll:null,onPatchStart:vc(),onPatchEnd:vc(),onNodeAdded:vc(),onBeforeElUpdated:vc()},i.dom||{}),this.transitions=new m8,this.currentHistoryPosition=parseInt(this.sessionStorage.getItem(_h))||0,window.addEventListener("pagehide",n=>{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.0.2"}isProfileEnabled(){return this.sessionStorage.getItem(Ig)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Qh)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Qh)==="false"}enableDebug(){this.sessionStorage.setItem(Qh,"true")}enableProfiling(){this.sessionStorage.setItem(Ig,"true")}disableDebug(){this.sessionStorage.setItem(Qh,"false")}disableProfiling(){this.sessionStorage.removeItem(Ig)}enableLatencySim(t){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(Dg,t)}disableLatencySim(){this.sessionStorage.removeItem(Dg)}getLatencySim(){let t=this.sessionStorage.getItem(Dg);return t?parseInt(t):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.resetReloadStatus(),this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(t){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(t)}replaceTransport(t){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(t),this.connect()}execJS(t,e,i=null){let n=new CustomEvent("phx:exec",{detail:{sourceElement:t}});this.owner(t,r=>bt.exec(n,i,e,r,t))}execJSHookPush(t,e,i,n){this.withinOwners(t,r=>{let o=new CustomEvent("phx:exec",{detail:{sourceElement:t}});bt.exec(o,"hook",e,r,t,["push",{data:i,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(t,e){this.domCallbacks[t](...e)}time(t,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(t);let i=e();return console.timeEnd(t),i}log(t,e,i){if(this.viewLogger){let[n,r]=i();this.viewLogger(t,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=i();MD(t,e,n,r)}}requestDOMUpdate(t){this.transitions.after(t)}transition(t,e,i=function(){}){this.transitions.addTransition(t,e,i)}onChannel(t,e,i){t.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>i(n),r):i(n)})}reloadWithJitter(t,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-i+1))+i,o=Di.updateLocal(this.localStorage,window.location.pathname,VS,0,s=>s+1);o>=this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{t.isDestroyed()||t.isConnected()||(t.destroy(),e?e():this.log(t,"join",()=>[`encountered ${o} consecutive reloads`]),o>=this.maxReloads&&this.log(t,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(t){return t&&t.startsWith("Phoenix.")?YD[t.split(".")[1]]:this.hooks[t]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(t){return`${this.getBindingPrefix()}${t}`}channel(t,e){return this.socket.channel(t,e)}joinDeadView(){let t=document.body;if(t&&!this.isPhxView(t)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(t);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>{var i;e.execNewMounted(),this.maybeScroll((i=history.state)==null?void 0:i.scroll)})}}joinRootViews(){let t=!1;return H.all(document,`${vs}:not([${xs}])`,e=>{if(!this.getRootById(e.id)){let i=this.newRootView(e);i.setHref(this.getHref()),i.join(),e.hasAttribute(Bg)&&(this.main=i)}t=!0}),t}redirect(t,e,i){i&&Di.setCookie(SS,i,60),this.unload(),Di.redirect(t,e)}replaceMain(t,e,i=null,n=this.setPendingLink(t)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=H.all(this.outgoingMainEl,`[${this.binding("remove")}]`),s=H.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(s,e,r),this.main.setRedirect(t),this.transitionRemoves(o,!0),this.main.join((a,l)=>{a===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{o.forEach(c=>c.remove()),H.findPhxSticky(document).forEach(c=>s.appendChild(c)),this.outgoingMainEl.replaceWith(s),this.outgoingMainEl=null,i&&i(n),l()})})}transitionRemoves(t,e,i){let n=this.binding("remove");if(e){let o=H.findPhxSticky(document)||[];t=t.filter(s=>!H.isChildOfAny(s,o))}let r=o=>{o.preventDefault(),o.stopImmediatePropagation()};t.forEach(o=>{for(let s of this.boundEventNames)o.addEventListener(s,r,!0);this.execJS(o,o.getAttribute(n),"remove")}),this.requestDOMUpdate(()=>{t.forEach(o=>{for(let s of this.boundEventNames)o.removeEventListener(s,r,!0)}),i&&i()})}isPhxView(t){return t.getAttribute&&t.getAttribute(rr)!==null}newRootView(t,e,i){let n=new p8(t,this,null,e,i);return this.roots[n.id]=n,n}owner(t,e){let i=ko(t.closest(vs),n=>this.getViewByEl(n))||this.main;return i&&e?e(i):i}withinOwners(t,e){this.owner(t,i=>e(i,t))}getViewByEl(t){let e=t.getAttribute(So);return ko(this.getRootById(e),i=>i.getDescendentByEl(t))}getRootById(t){return this.roots[t]}destroyAllViews(){for(let t in this.roots)this.roots[t].destroy(),delete this.roots[t];this.main=null}destroyViewByEl(t){let e=this.getRootById(t.getAttribute(So));e&&e.id===t.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(t.id)}getActiveElement(){return document.activeElement}dropActiveElement(t){this.prevActive&&t.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:t}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),t||this.bindNav(),this.bindClicks(),t||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,i,n,r,o,s)=>{let a=r.getAttribute(this.binding(_D)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=Y({key:e.key},this.eventMeta(i,e,r));bt.exec(e,i,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,i,n,r,o,s)=>{if(!s){let a=Y({key:e.key},this.eventMeta(i,e,r));bt.exec(e,i,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,i,n,r,o,s)=>{if(s==="window"){let a=this.eventMeta(i,e,r);bt.exec(e,i,o,n,r,["push",{data:a}])}}),this.on("dragover",e=>e.preventDefault()),this.on("drop",e=>{e.preventDefault();let i=ko(Ec(e.target,this.binding(pS)),o=>o.getAttribute(this.binding(pS))),n=i&&document.getElementById(i),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(Kt.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(BS,e=>{let i=e.target;if(!H.isUploadInput(i))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);Kt.trackFiles(i,n),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(t,e,i){let n=this.metadataCallbacks[t];return n?n(e,i):{}}setPendingLink(t){return this.linkRef++,this.pendingLink=t,this.resetReloadStatus(),this.linkRef}resetReloadStatus(){Di.deleteCookie(SS)}commitPendingLink(t){return this.linkRef!==t?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(t,e){for(let i in t){let n=t[i];this.on(n,r=>{let o=this.binding(i),s=this.binding(`window-${i}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,i,l,r.target,a,null)})}):H.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,u=>{e(r,i,u,l,c,"window")})})})})}}bindClicks(){this.on("mousedown",t=>this.clickStartedAtTarget=t.target),this.bindClick("click","click")}bindClick(t,e){let i=this.binding(e);window.addEventListener(t,n=>{let r=null;n.detail===0&&(this.clickStartedAtTarget=n.target);let o=this.clickStartedAtTarget||n.target;r=Ec(n.target,i),this.dispatchClickAway(n,o),this.clickStartedAtTarget=null;let s=r&&r.getAttribute(i);if(!s){H.isNewPageClick(n,window.location)&&this.unload();return}r.getAttribute("href")==="#"&&n.preventDefault(),!r.hasAttribute(On)&&this.debounce(r,n,"click",()=>{this.withinOwners(r,a=>{bt.exec(n,"click",s,a,r,["push",{data:this.eventMeta("click",n,r)}])})})},!1)}dispatchClickAway(t,e){let i=this.binding("click-away");H.all(document,`[${i}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(n,r=>{let o=n.getAttribute(i);bt.isVisible(n)&&bt.isInViewport(n)&&bt.exec(t,"click",o,r,n,["push",{data:this.eventMeta("click",t,t.target)}])})})}bindNav(){if(!Di.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let t=null;window.addEventListener("scroll",e=>{clearTimeout(t),t=setTimeout(()=>{Di.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:i,backType:n,id:r,root:o,scroll:s,position:a}=e.state||{},l=window.location.href,c=a>this.currentHistoryPosition;i=c?i:n||i,this.currentHistoryPosition=a||0,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),H.dispatchEvent(window,"phx:navigate",{detail:{href:l,patch:i==="patch",pop:!0,direction:c?"forward":"backward"}}),this.requestDOMUpdate(()=>{this.main.isConnected()&&i==="patch"&&r===this.main.id?this.main.pushLinkPatch(e,l,null,()=>{this.maybeScroll(s)}):this.replaceMain(l,null,()=>{o&&this.replaceRootHistory(),this.maybeScroll(s)})})},!1),window.addEventListener("click",e=>{let i=Ec(e.target,Rg),n=i&&i.getAttribute(Rg);if(!n||!this.isConnected()||!this.main||H.wantsNewTab(e))return;let r=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,o=i.getAttribute(TD);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(e,r,o,i);else if(n==="redirect")this.historyRedirect(e,r,o,null,i);else throw new Error(`expected ${Rg} to be "patch" or "redirect", got: ${n}`);let s=i.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(i,s,"click"))})},!1)}maybeScroll(t){typeof t=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}dispatchEvent(t,e={}){H.dispatchEvent(window,`phx:${t}`,{detail:e})}dispatchEvents(t){t.forEach(([e,i])=>this.dispatchEvent(e,i))}withPageLoading(t,e){H.dispatchEvent(window,"phx:page-loading-start",{detail:t});let i=()=>H.dispatchEvent(window,"phx:page-loading-stop",{detail:t});return e?e(i):i}pushHistoryPatch(t,e,i,n){if(!this.isConnected()||!this.main.isMain())return Di.redirect(e);this.withPageLoading({to:e,kind:"patch"},r=>{this.main.pushLinkPatch(t,e,n,o=>{this.historyPatch(e,i,o),r()})})}historyPatch(t,e,i=this.setPendingLink(t)){this.commitPendingLink(i)&&(this.currentHistoryPosition++,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),Di.updateCurrentState(n=>Ee(Y({},n),{backType:"patch"})),Di.pushState(e,{type:"patch",id:this.main.id,position:this.currentHistoryPosition},t),H.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:t,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location))}historyRedirect(t,e,i,n,r){if(r&&t.isTrusted&&t.type!=="popstate"&&r.classList.add("phx-click-loading"),!this.isConnected()||!this.main.isMain())return Di.redirect(e,n);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:s,host:a}=window.location;e=`${s}//${a}${e}`}let o=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},s=>{this.replaceMain(e,n,a=>{a===this.linkRef&&(this.currentHistoryPosition++,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),Di.updateCurrentState(l=>Ee(Y({},l),{backType:"redirect"})),Di.pushState(i,{type:"redirect",id:this.main.id,scroll:o,position:this.currentHistoryPosition},e),H.dispatchEvent(window,"phx:navigate",{detail:{href:e,patch:!1,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location)),s()})})}replaceRootHistory(){Di.pushState("replace",{root:!0,type:"patch",id:this.main.id,position:this.currentHistoryPosition})}registerNewLocation(t){let{pathname:e,search:i}=this.currentLocation;return e+i===t.pathname+t.search?!1:(this.currentLocation=Dh(t),!0)}bindForms(){let t=0,e=!1;this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit")),r=i.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,i.preventDefault(),this.withinOwners(i.target,o=>{o.disableForm(i.target),window.requestAnimationFrame(()=>{H.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))}),this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit"));if(!n){H.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,r=>{bt.exec(i,"submit",n,r,i.target,["push",{submitter:i.submitter}])})});for(let i of["change","input"])this.on(i,n=>{if(n instanceof CustomEvent&&n.target.form===void 0){if(n.detail&&n.detail.dispatcher)throw new Error(`dispatching a custom ${i} event is only supported on input elements inside a form`);return}let r=this.binding("change"),o=n.target;if(n.isComposing){let O=`composition-listener-${i}`;H.private(o,O)||(H.putPrivate(o,O,!0),o.addEventListener("compositionend",()=>{o.dispatchEvent(new Event(i,{bubbles:!0})),H.deletePrivate(o,O)},{once:!0}));return}let s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,u=t;t++;let{at:f,type:d}=H.private(o,"prev-iteration")||{};f===u-1&&i==="change"&&d==="input"||(H.putPrivate(o,"prev-iteration",{at:u,type:i}),this.debounce(o,n,i,()=>{this.withinOwners(c,O=>{H.putPrivate(o,zh,!0),bt.exec(n,"change",l,O,o,["push",{_target:n.target.name,dispatcher:c}])})}))});this.on("reset",i=>{let n=i.target;H.resetForm(n);let r=Array.from(n.elements).find(o=>o.type==="reset");r&&window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(t,e,i,n){if(i==="blur"||i==="focusout")return n();let r=this.binding(CD),o=this.binding(QD),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(t,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(t);H.debounce(t,e,r,s,o,a,c,()=>{n()})})}silenceEvents(t){this.silenced=!0,t(),this.silenced=!1}on(t,e){this.boundEventNames.add(t),window.addEventListener(t,i=>{this.silenced||e(i)})}jsQuerySelectorAll(t,e,i){let n=this.domCallbacks.jsQuerySelectorAll;return n?n(t,e,i):i()}},m8=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(t=>{clearTimeout(t),this.transitions.delete(t)}),this.flushPendingOps()}after(t){this.size()===0?t():this.pushPendingOp(t)}addTransition(t,e,i){e();let n=setTimeout(()=>{this.transitions.delete(n),i(),this.flushPendingOps()},t);this.transitions.add(n)}pushPendingOp(t){this.pendingOps.push(t)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let t=this.pendingOps.shift();t&&(t(),this.flushPendingOps())}};var tT="livebook:";function ws(t){try{let e=localStorage.getItem(tT+t);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function za(t,e){try{let i=JSON.stringify(e);localStorage.setItem(tT+t,i)}catch(i){console.error(`Failed to write to local storage, reason: ${i.message}`)}}var iT="app_auth_token:";function nT(t,e){za(iT+t,e)}function rT(){let t=window.location.pathname;if(t.startsWith("/apps/")){let e=t.split("/")[2],i=ws(iT+e);if(i)return i}return null}var g8={mounted(){this.handleEvent("persist_app_auth",({slug:t,token:e})=>{nT(t,e),this.pushEvent("app_auth_persisted")})}},oT=g8;function Ot(t,e){let i={};for(let n of e){let r=`data-p-${n}`;if(!t.hasAttribute(r))throw new Error(`Missing attribute "${r}" on element <${t.tagName}:${t.id}>`);let o=t.getAttribute(r);i[b8(n)]=JSON.parse(o)}return i}function b8(t){let[e,...i]=t.split("-");return[e,...i.map(n=>n.charAt(0).toUpperCase()+n.slice(1))].join("")}function sT(t,e,i){let r=new ArrayBuffer(44+t.byteLength),o=new DataView(r),s=t.byteLength/4,a=4,l=e*a,c=i*l,u=s*l,f=0;function d(w){o.setUint32(f,w,!1),f+=4}function O(w){o.setUint32(f,w,!0),f+=4}function m(w){o.setUint16(f,w,!0),f+=2}function x(w){o.setFloat32(f,w,!0),f+=4}d(1380533830),O(36+u),d(1463899717),d(1718449184),O(16),m(3),m(e),O(i),O(c),m(l),m(a*8),d(1684108385),O(u);let v=new Float32Array(t);for(let w=0;w{this.inputEl.click()}),this.inputEl.addEventListener("change",t=>{let[e]=t.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault();let[e]=t.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",t=>{this.el.classList.add(...Hg)}),this.el.addEventListener("dragleave",t=>{this.el.contains(t.relatedTarget)||this.el.classList.remove(...Hg)}),this.el.addEventListener("drop",t=>{this.el.classList.remove(...Hg)}),this.recordButton.addEventListener("click",t=>{this.startRecording()}),this.stopButton.addEventListener("click",t=>{this.stopRecording()}),this.cancelButton.addEventListener("click",t=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return Ot(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{this.mediaRecorder=new MediaRecorder(t),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(t=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),t&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(t){let e=new FileReader;e.onload=i=>{this.loadEncodedAudio(i.target.result)},e.readAsArrayBuffer(t)},loadEncodedAudio(t){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(t,i=>{let n=x8(i);this.pushAudio(n)})},pushAudio(t){let e={num_channels:t.numChannels,sampling_rate:t.samplingRate},i=this.encodeAudio(t),n=new Blob([i]);n.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[n])},encodeAudio(t){if(this.props.format==="pcm_f32")return v8(t.data,this.props.endianness);if(this.props.format==="wav")return sT(t.data,t.numChannels,t.samplingRate)}};function x8(t){let e=t.numberOfChannels,i=t.sampleRate,n=t.length,r=4*e*n,o=new ArrayBuffer(r),s=new Float32Array(o);for(let a=0;a=0;l--)n=i[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=t.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),t.setAttributeNS(o,r,s))):(a=t.getAttribute(r),a!==s&&t.setAttribute(r,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)n=c[u],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||t.removeAttributeNS(o,r)):e.hasAttribute(r)||t.removeAttribute(r)}}var Mh,S8="http://www.w3.org/1999/xhtml",Mi=typeof document=="undefined"?void 0:document,T8=!!Mi&&"content"in Mi.createElement("template"),E8=!!Mi&&Mi.createRange&&"createContextualFragment"in Mi.createRange();function P8(t){var e=Mi.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function C8(t){Mh||(Mh=Mi.createRange(),Mh.selectNode(Mi.body));var e=Mh.createContextualFragment(t);return e.childNodes[0]}function Q8(t){var e=Mi.createElement("body");return e.innerHTML=t,e.childNodes[0]}function _8(t){return t=t.trim(),T8?P8(t):E8?C8(t):Q8(t)}function Nh(t,e){var i=t.nodeName,n=e.nodeName,r,o;return i===n?!0:(r=i.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?i===n.toUpperCase():o<=90&&r>=97?n===i.toUpperCase():!1)}function A8(t,e){return!e||e===S8?Mi.createElement(t):Mi.createElementNS(e,t)}function $8(t,e){for(var i=t.firstChild;i;){var n=i.nextSibling;e.appendChild(i),i=n}return e}function Gg(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var fT={OPTION:function(t,e){var i=t.parentNode;if(i){var n=i.nodeName.toUpperCase();n==="OPTGROUP"&&(i=i.parentNode,n=i&&i.nodeName.toUpperCase()),n==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Gg(t,e,"selected")},INPUT:function(t,e){Gg(t,e,"checked"),Gg(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var n=t.firstChild;if(n){var r=n.nodeValue;if(r==i||!i&&r==t.placeholder)return;n.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,n=0,r=t.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){i=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}t.selectedIndex=i}}},Qc=1,hT=11,dT=3,OT=8;function To(){}function X8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function R8(t){return function(i,n,r){if(r||(r={}),typeof n=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=n;n=Mi.createElement("html"),n.innerHTML=o}else n=_8(n);else n.nodeType===hT&&(n=n.firstElementChild);var s=r.getNodeKey||X8,a=r.onBeforeNodeAdded||To,l=r.onNodeAdded||To,c=r.onBeforeElUpdated||To,u=r.onElUpdated||To,f=r.onBeforeNodeDiscarded||To,d=r.onNodeDiscarded||To,O=r.onBeforeElChildrenUpdated||To,m=r.skipFromChildren||To,x=r.addChild||function(j,ue){return j.appendChild(ue)},v=r.childrenOnly===!0,w=Object.create(null),T=[];function A(j){T.push(j)}function L(j,ue){if(j.nodeType===Qc)for(var Z=j.firstChild;Z;){var C=void 0;ue&&(C=s(Z))?A(C):(d(Z),Z.firstChild&&L(Z,ue)),Z=Z.nextSibling}}function D(j,ue,Z){f(j)!==!1&&(ue&&ue.removeChild(j),d(j),L(j,Z))}function P(j){if(j.nodeType===Qc||j.nodeType===hT)for(var ue=j.firstChild;ue;){var Z=s(ue);Z&&(w[Z]=ue),P(ue),ue=ue.nextSibling}}P(i);function q(j){l(j);for(var ue=j.firstChild;ue;){var Z=ue.nextSibling,C=s(ue);if(C){var W=w[C];W&&Nh(ue,W)?(ue.parentNode.replaceChild(W,ue),G(W,ue)):q(ue)}else q(ue);ue=Z}}function le(j,ue,Z){for(;ue;){var C=ue.nextSibling;(Z=s(ue))?A(Z):D(ue,j,!0),ue=C}}function G(j,ue,Z){var C=s(ue);if(C&&delete w[C],!Z){var W=c(j,ue);if(W===!1||(W instanceof HTMLElement&&(j=W,P(j)),t(j,ue),u(j),O(j,ue)===!1))return}j.nodeName!=="TEXTAREA"?M(j,ue):fT.TEXTAREA(j,ue)}function M(j,ue){var Z=m(j,ue),C=ue.firstChild,W=j.firstChild,oe,I,Ne,We,Ve;e:for(;C;){for(We=C.nextSibling,oe=s(C);!Z&&W;){if(Ne=W.nextSibling,C.isSameNode&&C.isSameNode(W)){C=We,W=Ne;continue e}I=s(W);var Et=W.nodeType,Xe=void 0;if(Et===C.nodeType&&(Et===Qc?(oe?oe!==I&&((Ve=w[oe])?Ne===Ve?Xe=!1:(j.insertBefore(Ve,W),I?A(I):D(W,j,!0),W=Ve,I=s(W)):Xe=!1):I&&(Xe=!1),Xe=Xe!==!1&&Nh(W,C),Xe&&G(W,C)):(Et===dT||Et==OT)&&(Xe=!0,W.nodeValue!==C.nodeValue&&(W.nodeValue=C.nodeValue))),Xe){C=We,W=Ne;continue e}I?A(I):D(W,j,!0),W=Ne}if(oe&&(Ve=w[oe])&&Nh(Ve,C))Z||x(j,Ve),G(Ve,C);else{var Rt=a(C);Rt!==!1&&(Rt&&(C=Rt),C.actualize&&(C=C.actualize(j.ownerDocument||Mi)),x(j,C),q(C))}C=We,W=Ne}le(j,W,I);var Lt=fT[j.nodeName];Lt&&Lt(j,ue)}var ie=i,ne=ie.nodeType,re=n.nodeType;if(!v){if(ne===Qc)re===Qc?Nh(i,n)||(d(i),ie=$8(i,A8(n.nodeName,n.namespaceURI))):ie=n;else if(ne===dT||ne===OT){if(re===ne)return ie.nodeValue!==n.nodeValue&&(ie.nodeValue=n.nodeValue),ie;ie=n}}if(ie===n)d(i);else{if(n.isSameNode&&n.isSameNode(ie))return;if(G(ie,n,v),T)for(var de=0,pe=T.length;des.length,l;a&&s.push(r);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&i)throw u;return r(u)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){i||(i=!0,e(s,...a))}function o(s){r(null,s)}}function e0(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ET(t.position):"start"in t||"end"in t?ET(t):"line"in t||"column"in t?Jg(t):""}function Jg(t){return PT(t&&t.line)+":"+PT(t&&t.column)}function ET(t){return Jg(t&&t.start)+"-"+Jg(t&&t.end)}function PT(t){return t&&typeof t=="number"?t:1}var Vt=class extends Error{constructor(e,i,n){super(),typeof i=="string"&&(n=i,i=void 0);let r="",o={},s=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o=Y({},i)),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?o.ruleId=n:(o.source=n.slice(0,l),o.ruleId=n.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=e0(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Vt.prototype.file="";Vt.prototype.name="";Vt.prototype.reason="";Vt.prototype.message="";Vt.prototype.stack="";Vt.prototype.column=void 0;Vt.prototype.line=void 0;Vt.prototype.ancestors=void 0;Vt.prototype.cause=void 0;Vt.prototype.fatal=void 0;Vt.prototype.place=void 0;Vt.prototype.ruleId=void 0;Vt.prototype.source=void 0;var In={basename:D8,dirname:z8,extname:U8,join:M8,sep:"/"};function D8(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Ac(t);let i=0,n=-1,r=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(o){i=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":t.slice(i,n)}if(e===t)return"";let s=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(o){i=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(n=r):(a=-1,n=s));return i===n?n=s:n<0&&(n=t.length),t.slice(i,n)}function z8(t){if(Ac(t),t.length===0)return".";let e=-1,i=t.length,n;for(;--i;)if(t.codePointAt(i)===47){if(n){e=i;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function U8(t){Ac(t);let e=t.length,i=-1,n=0,r=-1,o=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){n=e+1;break}continue}i<0&&(s=!0,i=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||i<0||o===0||o===1&&r===i-1&&r===n+1?"":t.slice(r,i)}function M8(...t){let e=-1,i;for(;++e0&&t.codePointAt(t.length-1)===47&&(i+="/"),e?"/"+i:i}function q8(t,e){let i="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=i.lastIndexOf("/"),l!==i.length-1){l<0?(i="",n=0):(i=i.slice(0,l),n=i.length-1-i.lastIndexOf("/")),r=s,o=0;continue}}else if(i.length>0){i="",n=0,r=s,o=0;continue}}e&&(i=i.length>0?i+"/..":"..",n=2)}else i.length>0?i+="/"+t.slice(r+1,s):i=t.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return i}function Ac(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var CT={cwd:j8};function j8(){return"/"}function Ua(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function QT(t){if(typeof t=="string")t=new URL(t);else if(!Ua(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return W8(t)}function W8(t){if(t.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=t.pathname,i=-1;for(;++i0){let[O,...m]=u,x=n[d][1];_c(x)&&_c(O)&&(O=(0,Wh.default)(!0,x,O)),n[d]=[c,O,...m]}}}},Vh=new a0().freeze();function r0(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function o0(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function s0(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(t){if(!_c(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function XT(t,e,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function jh(t){return B8(t)?t:new Eo(t)}function B8(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Y8(t){return typeof t=="string"||F8(t)}function F8(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var H8={};function l0(t,e){let i=e||H8,n=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,r=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return LT(t,n,r)}function LT(t,e,i){if(G8(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return RT(t.children,e,i)}return Array.isArray(t)?RT(t,e,i):""}function RT(t,e,i){let n=[],r=-1;for(;++rr?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o0?(si(t,t.length,0,e),t):e}var DT={}.hasOwnProperty;function zT(t){let e={},i=-1;for(;++i13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"\uFFFD":String.fromCharCode(i)}function Qr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ez=Po(new RegExp("\\p{P}","u")),Ji=Po(/[A-Za-z]/),Ci=Po(/[\dA-Za-z]/),UT=Po(/[#-'*+\--9=?A-Z^-~]/);function $c(t){return t!==null&&(t<32||t===127)}var Xc=Po(/\d/),MT=Po(/[\dA-Fa-f]/),c0=Po(/[!-/:-@[-`{-~]/);function Te(t){return t!==null&&t<-2}function qt(t){return t!==null&&(t<0||t===32)}function Le(t){return t===-2||t===-1||t===32}function NT(t){return c0(t)||ez(t)}var qT=Po(/\s/);function Po(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ie(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Le(l)?(t.enter(i),a(l)):e(l)}function a(l){return Le(l)&&o++s))return;let q=e.events.length,le=q,G,M;for(;le--;)if(e.events[le][0]==="exit"&&e.events[le][1].type==="chunkFlow"){if(G){M=e.events[le][1].end;break}G=!0}for(w(n),P=q;PA;){let D=i[L];e.containerState=D[1],D[0].exit.call(e,t)}i.length=A}function T(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function nz(t,e,i){return Ie(t,t.attempt(this.parser.constructs.document,e,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function u0(t){if(t===null||qt(t)||qT(t))return 1;if(NT(t))return 2}function Na(t,e,i){let n=[],r=-1;for(;++r1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;let f=Object.assign({},t[n][1].end),d=Object.assign({},t[i][1].start);ZT(f,-l),ZT(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[n][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[i][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[n][1].end),end:Object.assign({},t[i][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[n][1].end=Object.assign({},s.start),t[i][1].start=Object.assign({},a.end),c=[],t[n][1].end.offset-t[n][1].start.offset&&(c=Pi(c,[["enter",t[n][1],e],["exit",t[n][1],e]])),c=Pi(c,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Pi(c,Na(e.parser.constructs.insideSpan.null,t.slice(n+1,i),e)),c=Pi(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[i][1].end.offset-t[i][1].start.offset?(u=2,c=Pi(c,[["enter",t[i][1],e],["exit",t[i][1],e]])):u=0,si(t,n-1,i-n+3,c),i=n+c.length-u-2;break}}for(i=-1;++i0&&Le(P)?Ie(t,T,"linePrefix",o+1)(P):T(P)}function T(P){return P===null||Te(P)?t.check(BT,x,L)(P):(t.enter("codeFlowValue"),A(P))}function A(P){return P===null||Te(P)?(t.exit("codeFlowValue"),T(P)):(t.consume(P),A)}function L(P){return t.exit("codeFenced"),e(P)}function D(P,q,le){let G=0;return M;function M(pe){return P.enter("lineEnding"),P.consume(pe),P.exit("lineEnding"),ie}function ie(pe){return P.enter("codeFencedFence"),Le(pe)?Ie(P,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(pe):ne(pe)}function ne(pe){return pe===a?(P.enter("codeFencedFenceSequence"),re(pe)):le(pe)}function re(pe){return pe===a?(G++,P.consume(pe),re):G>=s?(P.exit("codeFencedFenceSequence"),Le(pe)?Ie(P,de,"whitespace")(pe):de(pe)):le(pe)}function de(pe){return pe===null||Te(pe)?(P.exit("codeFencedFence"),q(pe)):le(pe)}}}function Oz(t,e,i){let n=this;return r;function r(s){return s===null?i(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?i(s):e(s)}}var Lc={name:"codeIndented",tokenize:mz},pz={tokenize:gz,partial:!0};function mz(t,e,i){let n=this;return r;function r(c){return t.enter("codeIndented"),Ie(t,o,"linePrefix",5)(c)}function o(c){let u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):i(c)}function s(c){return c===null?l(c):Te(c)?t.attempt(pz,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Te(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function gz(t,e,i){let n=this;return r;function r(s){return n.parser.lazy[n.now().line]?i(s):Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r):Ie(t,o,"linePrefix",5)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Te(s)?r(s):i(s)}}var h0={name:"codeText",tokenize:xz,resolve:bz,previous:yz};function bz(t){let e=t.length-4,i=3,n,r;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=i;++n=4?e(s):t.interrupt(n.parser.constructs.flow,i,e)(s)}}function Kh(t,e,i,n,r,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return f;function f(w){return w===60?(t.enter(n),t.enter(r),t.enter(o),t.consume(w),t.exit(o),d):w===null||w===32||w===41||$c(w)?i(w):(t.enter(n),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),x(w))}function d(w){return w===62?(t.enter(o),t.consume(w),t.exit(o),t.exit(r),t.exit(n),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),O(w))}function O(w){return w===62?(t.exit("chunkString"),t.exit(a),d(w)):w===null||w===60||Te(w)?i(w):(t.consume(w),w===92?m:O)}function m(w){return w===60||w===62||w===92?(t.consume(w),O):O(w)}function x(w){return!u&&(w===null||w===41||qt(w))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(n),e(w)):u999||O===null||O===91||O===93&&!l||O===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?i(O):O===93?(t.exit(o),t.enter(r),t.consume(O),t.exit(r),t.exit(n),e):Te(O)?(t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(O))}function f(O){return O===null||O===91||O===93||Te(O)||a++>999?(t.exit("chunkString"),u(O)):(t.consume(O),l||(l=!Le(O)),O===92?d:f)}function d(O){return O===91||O===92||O===93?(t.consume(O),a++,f):f(O)}}function ed(t,e,i,n,r,o){let s;return a;function a(d){return d===34||d===39||d===40?(t.enter(n),t.enter(r),t.consume(d),t.exit(r),s=d===40?41:d,l):i(d)}function l(d){return d===s?(t.enter(r),t.consume(d),t.exit(r),t.exit(n),e):(t.enter(o),c(d))}function c(d){return d===s?(t.exit(o),l(s)):d===null?i(d):Te(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ie(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Te(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===s||d===92?(t.consume(d),u):u(d)}}function ks(t,e){let i;return n;function n(r){return Te(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),i=!0,n):Le(r)?Ie(t,n,i?"linePrefix":"lineSuffix")(r):e(r)}}var O0={name:"definition",tokenize:Pz},Ez={tokenize:Cz,partial:!0};function Pz(t,e,i){let n=this,r;return o;function o(O){return t.enter("definition"),s(O)}function s(O){return Jh.call(n,t,a,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function a(O){return r=Qr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),O===58?(t.enter("definitionMarker"),t.consume(O),t.exit("definitionMarker"),l):i(O)}function l(O){return qt(O)?ks(t,c)(O):c(O)}function c(O){return Kh(t,u,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function u(O){return t.attempt(Ez,f,f)(O)}function f(O){return Le(O)?Ie(t,d,"whitespace")(O):d(O)}function d(O){return O===null||Te(O)?(t.exit("definition"),n.parser.defined.push(r),e(O)):i(O)}}function Cz(t,e,i){return n;function n(a){return qt(a)?ks(t,r)(a):i(a)}function r(a){return ed(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Le(a)?Ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||Te(a)?e(a):i(a)}}var p0={name:"hardBreakEscape",tokenize:Qz};function Qz(t,e,i){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),r}function r(o){return Te(o)?(t.exit("hardBreakEscape"),e(o)):i(o)}}var m0={name:"headingAtx",tokenize:Az,resolve:_z};function _z(t,e){let i=t.length-2,n=3,r,o;return t[n][1].type==="whitespace"&&(n+=2),i-2>n&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(n===i-1||i-4>n&&t[i-2][1].type==="whitespace")&&(i-=n+1===i?2:4),i>n&&(r={type:"atxHeadingText",start:t[n][1].start,end:t[i][1].end},o={type:"chunkText",start:t[n][1].start,end:t[i][1].end,contentType:"text"},si(t,n,i-n+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),t}function Az(t,e,i){let n=0;return r;function r(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(t.consume(u),s):u===null||qt(u)?(t.exit("atxHeadingSequence"),a(u)):i(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Te(u)?(t.exit("atxHeading"),e(u)):Le(u)?Ie(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||qt(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var YT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],g0=["pre","script","style","textarea"];var b0={name:"htmlFlow",tokenize:Lz,resolveTo:Rz,concrete:!0},$z={tokenize:Dz,partial:!0},Xz={tokenize:Iz,partial:!0};function Rz(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Lz(t,e,i){let n=this,r,o,s,a,l;return c;function c(I){return u(I)}function u(I){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(I),f}function f(I){return I===33?(t.consume(I),d):I===47?(t.consume(I),o=!0,x):I===63?(t.consume(I),r=3,n.interrupt?e:C):Ji(I)?(t.consume(I),s=String.fromCharCode(I),v):i(I)}function d(I){return I===45?(t.consume(I),r=2,O):I===91?(t.consume(I),r=5,a=0,m):Ji(I)?(t.consume(I),r=4,n.interrupt?e:C):i(I)}function O(I){return I===45?(t.consume(I),n.interrupt?e:C):i(I)}function m(I){let Ne="CDATA[";return I===Ne.charCodeAt(a++)?(t.consume(I),a===Ne.length?n.interrupt?e:ne:m):i(I)}function x(I){return Ji(I)?(t.consume(I),s=String.fromCharCode(I),v):i(I)}function v(I){if(I===null||I===47||I===62||qt(I)){let Ne=I===47,We=s.toLowerCase();return!Ne&&!o&&g0.includes(We)?(r=1,n.interrupt?e(I):ne(I)):YT.includes(s.toLowerCase())?(r=6,Ne?(t.consume(I),w):n.interrupt?e(I):ne(I)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?i(I):o?T(I):A(I))}return I===45||Ci(I)?(t.consume(I),s+=String.fromCharCode(I),v):i(I)}function w(I){return I===62?(t.consume(I),n.interrupt?e:ne):i(I)}function T(I){return Le(I)?(t.consume(I),T):M(I)}function A(I){return I===47?(t.consume(I),M):I===58||I===95||Ji(I)?(t.consume(I),L):Le(I)?(t.consume(I),A):M(I)}function L(I){return I===45||I===46||I===58||I===95||Ci(I)?(t.consume(I),L):D(I)}function D(I){return I===61?(t.consume(I),P):Le(I)?(t.consume(I),D):A(I)}function P(I){return I===null||I===60||I===61||I===62||I===96?i(I):I===34||I===39?(t.consume(I),l=I,q):Le(I)?(t.consume(I),P):le(I)}function q(I){return I===l?(t.consume(I),l=null,G):I===null||Te(I)?i(I):(t.consume(I),q)}function le(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||qt(I)?D(I):(t.consume(I),le)}function G(I){return I===47||I===62||Le(I)?A(I):i(I)}function M(I){return I===62?(t.consume(I),ie):i(I)}function ie(I){return I===null||Te(I)?ne(I):Le(I)?(t.consume(I),ie):i(I)}function ne(I){return I===45&&r===2?(t.consume(I),ve):I===60&&r===1?(t.consume(I),j):I===62&&r===4?(t.consume(I),W):I===63&&r===3?(t.consume(I),C):I===93&&r===5?(t.consume(I),Z):Te(I)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check($z,oe,re)(I)):I===null||Te(I)?(t.exit("htmlFlowData"),re(I)):(t.consume(I),ne)}function re(I){return t.check(Xz,de,oe)(I)}function de(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),pe}function pe(I){return I===null||Te(I)?re(I):(t.enter("htmlFlowData"),ne(I))}function ve(I){return I===45?(t.consume(I),C):ne(I)}function j(I){return I===47?(t.consume(I),s="",ue):ne(I)}function ue(I){if(I===62){let Ne=s.toLowerCase();return g0.includes(Ne)?(t.consume(I),W):ne(I)}return Ji(I)&&s.length<8?(t.consume(I),s+=String.fromCharCode(I),ue):ne(I)}function Z(I){return I===93?(t.consume(I),C):ne(I)}function C(I){return I===62?(t.consume(I),W):I===45&&r===2?(t.consume(I),C):ne(I)}function W(I){return I===null||Te(I)?(t.exit("htmlFlowData"),oe(I)):(t.consume(I),W)}function oe(I){return t.exit("htmlFlow"),e(I)}}function Iz(t,e,i){let n=this;return r;function r(s){return Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):i(s)}function o(s){return n.parser.lazy[n.now().line]?i(s):e(s)}}function Dz(t,e,i){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(Co,e,i)}}var y0={name:"htmlText",tokenize:zz};function zz(t,e,i){let n=this,r,o,s;return a;function a(C){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(C),l}function l(C){return C===33?(t.consume(C),c):C===47?(t.consume(C),D):C===63?(t.consume(C),A):Ji(C)?(t.consume(C),le):i(C)}function c(C){return C===45?(t.consume(C),u):C===91?(t.consume(C),o=0,m):Ji(C)?(t.consume(C),T):i(C)}function u(C){return C===45?(t.consume(C),O):i(C)}function f(C){return C===null?i(C):C===45?(t.consume(C),d):Te(C)?(s=f,j(C)):(t.consume(C),f)}function d(C){return C===45?(t.consume(C),O):f(C)}function O(C){return C===62?ve(C):C===45?d(C):f(C)}function m(C){let W="CDATA[";return C===W.charCodeAt(o++)?(t.consume(C),o===W.length?x:m):i(C)}function x(C){return C===null?i(C):C===93?(t.consume(C),v):Te(C)?(s=x,j(C)):(t.consume(C),x)}function v(C){return C===93?(t.consume(C),w):x(C)}function w(C){return C===62?ve(C):C===93?(t.consume(C),w):x(C)}function T(C){return C===null||C===62?ve(C):Te(C)?(s=T,j(C)):(t.consume(C),T)}function A(C){return C===null?i(C):C===63?(t.consume(C),L):Te(C)?(s=A,j(C)):(t.consume(C),A)}function L(C){return C===62?ve(C):A(C)}function D(C){return Ji(C)?(t.consume(C),P):i(C)}function P(C){return C===45||Ci(C)?(t.consume(C),P):q(C)}function q(C){return Te(C)?(s=q,j(C)):Le(C)?(t.consume(C),q):ve(C)}function le(C){return C===45||Ci(C)?(t.consume(C),le):C===47||C===62||qt(C)?G(C):i(C)}function G(C){return C===47?(t.consume(C),ve):C===58||C===95||Ji(C)?(t.consume(C),M):Te(C)?(s=G,j(C)):Le(C)?(t.consume(C),G):ve(C)}function M(C){return C===45||C===46||C===58||C===95||Ci(C)?(t.consume(C),M):ie(C)}function ie(C){return C===61?(t.consume(C),ne):Te(C)?(s=ie,j(C)):Le(C)?(t.consume(C),ie):G(C)}function ne(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(t.consume(C),r=C,re):Te(C)?(s=ne,j(C)):Le(C)?(t.consume(C),ne):(t.consume(C),de)}function re(C){return C===r?(t.consume(C),r=void 0,pe):C===null?i(C):Te(C)?(s=re,j(C)):(t.consume(C),re)}function de(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||qt(C)?G(C):(t.consume(C),de)}function pe(C){return C===47||C===62||qt(C)?G(C):i(C)}function ve(C){return C===62?(t.consume(C),t.exit("htmlTextData"),t.exit("htmlText"),e):i(C)}function j(C){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),ue}function ue(C){return Le(C)?Ie(t,Z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):Z(C)}function Z(C){return t.enter("htmlTextData"),s(C)}}var Ss={name:"labelEnd",tokenize:Wz,resolveTo:jz,resolveAll:qz},Uz={tokenize:Vz},Mz={tokenize:Zz},Nz={tokenize:Bz};function qz(t){let e=-1;for(;++e=3&&(c===null||Te(c))?(t.exit("thematicBreak"),e(c)):i(c)}function l(c){return c===r?(t.consume(c),n++,l):(t.exit("thematicBreakSequence"),Le(c)?Ie(t,a,"whitespace")(c):a(c))}}var gi={name:"list",tokenize:eU,continuation:{tokenize:tU},exit:nU},Kz={tokenize:rU,partial:!0},Jz={tokenize:iU,partial:!0};function eU(t,e,i){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(O){let m=n.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||O===n.containerState.marker:Xc(O)){if(n.containerState.type||(n.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),O===42||O===45?t.check(Ts,i,c)(O):c(O);if(!n.interrupt||O===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(O)}return i(O)}function l(O){return Xc(O)&&++s<10?(t.consume(O),l):(!n.interrupt||s<2)&&(n.containerState.marker?O===n.containerState.marker:O===41||O===46)?(t.exit("listItemValue"),c(O)):i(O)}function c(O){return t.enter("listItemMarker"),t.consume(O),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||O,t.check(Co,n.interrupt?i:u,t.attempt(Kz,d,f))}function u(O){return n.containerState.initialBlankLine=!0,o++,d(O)}function f(O){return Le(O)?(t.enter("listItemPrefixWhitespace"),t.consume(O),t.exit("listItemPrefixWhitespace"),d):i(O)}function d(O){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(O)}}function tU(t,e,i){let n=this;return n.containerState._closeFlow=void 0,t.check(Co,r,o);function r(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ie(t,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!Le(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(Jz,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ie(t,t.attempt(gi,e,i),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function iU(t,e,i){let n=this;return Ie(t,r,"listItemIndent",n.containerState.size+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):i(o)}}function nU(t){t.exit(this.containerState.type)}function rU(t,e,i){let n=this;return Ie(t,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){let s=n.events[n.events.length-1];return!Le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):i(o)}}var td={name:"setextUnderline",tokenize:sU,resolveTo:oU};function oU(t,e){let i=t.length,n,r,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){n=i;break}t[i][1].type==="paragraph"&&(r=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);let s={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",o?(t.splice(r,0,["enter",s,e]),t.splice(o+1,0,["exit",t[n][1],e]),t[n][1].end=Object.assign({},t[o][1].end)):t[n][1]=s,t.push(["exit",s,e]),t}function sU(t,e,i){let n=this,r;return o;function o(c){let u=n.events.length,f;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){f=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(t.enter("setextHeadingLine"),r=c,s(c)):i(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===r?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Le(c)?Ie(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Te(c)?(t.exit("setextHeadingLine"),e(c)):i(c)}}var FT={tokenize:aU};function aU(t){let e=this,i=t.attempt(Co,n,t.attempt(this.parser.constructs.flowInitial,r,Ie(t,t.attempt(this.parser.constructs.flow,r,t.attempt(d0,r)),"linePrefix")));return i;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,i}function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,i}}var HT={resolveAll:e3()},GT=JT("string"),KT=JT("text");function JT(t){return{tokenize:e,resolveAll:e3(t==="text"?lU:void 0)};function e(i){let n=this,r=this.parser.constructs[t],o=i.attempt(r,s,a);return s;function s(u){return c(u)?o(u):a(u)}function a(u){if(u===null){i.consume(u);return}return i.enter("data"),i.consume(u),l}function l(u){return c(u)?(i.exit("data"),o(u)):(i.consume(u),l)}function c(u){if(u===null)return!0;let f=r[u],d=-1;if(f)for(;++d-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(t[r].slice(0,o))}return s}function uU(t,e){let i=-1,n=[],r;for(;++i{this.unloaded=!0}),this.socket.onOpen(()=>{this.isUnloaded()&&window.location.reload()})}version(){return"1.0.5"}isProfileEnabled(){return this.sessionStorage.getItem(Dg)==="true"}isDebugEnabled(){return this.sessionStorage.getItem(Qh)==="true"}isDebugDisabled(){return this.sessionStorage.getItem(Qh)==="false"}enableDebug(){this.sessionStorage.setItem(Qh,"true")}enableProfiling(){this.sessionStorage.setItem(Dg,"true")}disableDebug(){this.sessionStorage.setItem(Qh,"false")}disableProfiling(){this.sessionStorage.removeItem(Dg)}enableLatencySim(t){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem(zg,t)}disableLatencySim(){this.sessionStorage.removeItem(zg)}getLatencySim(){let t=this.sessionStorage.getItem(zg);return t?parseInt(t):null}getSocket(){return this.socket}connect(){window.location.hostname==="localhost"&&!this.isDebugDisabled()&&this.enableDebug();let t=()=>{this.resetReloadStatus(),this.joinRootViews()?(this.bindTopLevelEvents(),this.socket.connect()):this.main?this.socket.connect():this.bindTopLevelEvents({dead:!0}),this.joinDeadView()};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",()=>t())}disconnect(t){clearTimeout(this.reloadWithJitterTimer),this.serverCloseRef&&(this.socket.off(this.serverCloseRef),this.serverCloseRef=null),this.socket.disconnect(t)}replaceTransport(t){clearTimeout(this.reloadWithJitterTimer),this.socket.replaceTransport(t),this.connect()}execJS(t,e,i=null){let n=new CustomEvent("phx:exec",{detail:{sourceElement:t}});this.owner(t,r=>bt.exec(n,i,e,r,t))}execJSHookPush(t,e,i,n){this.withinOwners(t,r=>{let o=new CustomEvent("phx:exec",{detail:{sourceElement:t}});bt.exec(o,"hook",e,r,t,["push",{data:i,callback:n}])})}unload(){this.unloaded||(this.main&&this.isConnected()&&this.log(this.main,"socket",()=>["disconnect for page nav"]),this.unloaded=!0,this.destroyAllViews(),this.disconnect())}triggerDOM(t,e){this.domCallbacks[t](...e)}time(t,e){if(!this.isProfileEnabled()||!console.time)return e();console.time(t);let i=e();return console.timeEnd(t),i}log(t,e,i){if(this.viewLogger){let[n,r]=i();this.viewLogger(t,e,n,r)}else if(this.isDebugEnabled()){let[n,r]=i();ND(t,e,n,r)}}requestDOMUpdate(t){this.transitions.after(t)}transition(t,e,i=function(){}){this.transitions.addTransition(t,e,i)}onChannel(t,e,i){t.on(e,n=>{let r=this.getLatencySim();r?setTimeout(()=>i(n),r):i(n)})}reloadWithJitter(t,e){clearTimeout(this.reloadWithJitterTimer),this.disconnect();let i=this.reloadJitterMin,n=this.reloadJitterMax,r=Math.floor(Math.random()*(n-i+1))+i,o=zi.updateLocal(this.localStorage,window.location.pathname,VS,0,s=>s+1);o>=this.maxReloads&&(r=this.failsafeJitter),this.reloadWithJitterTimer=setTimeout(()=>{t.isDestroyed()||t.isConnected()||(t.destroy(),e?e():this.log(t,"join",()=>[`encountered ${o} consecutive reloads`]),o>=this.maxReloads&&this.log(t,"join",()=>[`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]),this.hasPendingLink()?window.location=this.pendingLink:window.location.reload())},r)}getHookCallbacks(t){return t&&t.startsWith("Phoenix.")?FD[t.split(".")[1]]:this.hooks[t]}isUnloaded(){return this.unloaded}isConnected(){return this.socket.isConnected()}getBindingPrefix(){return this.bindingPrefix}binding(t){return`${this.getBindingPrefix()}${t}`}channel(t,e){return this.socket.channel(t,e)}joinDeadView(){let t=document.body;if(t&&!this.isPhxView(t)&&!this.isPhxView(document.firstElementChild)){let e=this.newRootView(t);e.setHref(this.getHref()),e.joinDead(),this.main||(this.main=e),window.requestAnimationFrame(()=>{var i;e.execNewMounted(),this.maybeScroll((i=history.state)==null?void 0:i.scroll)})}}joinRootViews(){let t=!1;return G.all(document,`${ws}:not([${vs}])`,e=>{if(!this.getRootById(e.id)){let i=this.newRootView(e);G.isPhxSticky(e)||i.setHref(this.getHref()),i.join(),e.hasAttribute(Yg)&&(this.main=i)}t=!0}),t}redirect(t,e,i){i&&zi.setCookie(SS,i,60),this.unload(),zi.redirect(t,e)}replaceMain(t,e,i=null,n=this.setPendingLink(t)){let r=this.currentLocation.href;this.outgoingMainEl=this.outgoingMainEl||this.main.el;let o=G.findPhxSticky(document)||[],s=G.all(this.outgoingMainEl,`[${this.binding("remove")}]`).filter(l=>!G.isChildOfAny(l,o)),a=G.cloneNode(this.outgoingMainEl,"");this.main.showLoader(this.loaderTimeout),this.main.destroy(),this.main=this.newRootView(a,e,r),this.main.setRedirect(t),this.transitionRemoves(s),this.main.join((l,c)=>{l===1&&this.commitPendingLink(n)&&this.requestDOMUpdate(()=>{s.forEach(u=>u.remove()),o.forEach(u=>a.appendChild(u)),this.outgoingMainEl.replaceWith(a),this.outgoingMainEl=null,i&&i(n),c()})})}transitionRemoves(t,e){let i=this.binding("remove"),n=r=>{r.preventDefault(),r.stopImmediatePropagation()};t.forEach(r=>{for(let o of this.boundEventNames)r.addEventListener(o,n,!0);this.execJS(r,r.getAttribute(i),"remove")}),this.requestDOMUpdate(()=>{t.forEach(r=>{for(let o of this.boundEventNames)r.removeEventListener(o,n,!0)}),e&&e()})}isPhxView(t){return t.getAttribute&&t.getAttribute(or)!==null}newRootView(t,e,i){let n=new m8(t,this,null,e,i);return this.roots[n.id]=n,n}owner(t,e){let i=So(t.closest(ws),n=>this.getViewByEl(n))||this.main;return i&&e?e(i):i}withinOwners(t,e){this.owner(t,i=>e(i,t))}getViewByEl(t){let e=t.getAttribute(To);return So(this.getRootById(e),i=>i.getDescendentByEl(t))}getRootById(t){return this.roots[t]}destroyAllViews(){for(let t in this.roots)this.roots[t].destroy(),delete this.roots[t];this.main=null}destroyViewByEl(t){let e=this.getRootById(t.getAttribute(To));e&&e.id===t.id?(e.destroy(),delete this.roots[e.id]):e&&e.destroyDescendent(t.id)}getActiveElement(){return document.activeElement}dropActiveElement(t){this.prevActive&&t.ownsElement(this.prevActive)&&(this.prevActive=null)}restorePreviouslyActiveFocus(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}blurActiveElement(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}bindTopLevelEvents({dead:t}={}){this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,this.serverCloseRef=this.socket.onClose(e=>{if(e&&e.code===1e3&&this.main)return this.reloadWithJitter(this.main)}),document.body.addEventListener("click",function(){}),window.addEventListener("pageshow",e=>{e.persisted&&(this.getSocket().disconnect(),this.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())},!0),t||this.bindNav(),this.bindClicks(),t||this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(e,i,n,r,o,s)=>{let a=r.getAttribute(this.binding(_D)),l=e.key&&e.key.toLowerCase();if(a&&a.toLowerCase()!==l)return;let c=Y({key:e.key},this.eventMeta(i,e,r));bt.exec(e,i,o,n,r,["push",{data:c}])}),this.bind({blur:"focusout",focus:"focusin"},(e,i,n,r,o,s)=>{if(!s){let a=Y({key:e.key},this.eventMeta(i,e,r));bt.exec(e,i,o,n,r,["push",{data:a}])}}),this.bind({blur:"blur",focus:"focus"},(e,i,n,r,o,s)=>{if(s==="window"){let a=this.eventMeta(i,e,r);bt.exec(e,i,o,n,r,["push",{data:a}])}}),this.on("dragover",e=>e.preventDefault()),this.on("drop",e=>{e.preventDefault();let i=So(Tc(e.target,this.binding(mS)),o=>o.getAttribute(this.binding(mS))),n=i&&document.getElementById(i),r=Array.from(e.dataTransfer.files||[]);!n||n.disabled||r.length===0||!(n.files instanceof FileList)||(Jt.trackFiles(n,r,e.dataTransfer),n.dispatchEvent(new Event("input",{bubbles:!0})))}),this.on(BS,e=>{let i=e.target;if(!G.isUploadInput(i))return;let n=Array.from(e.detail.files||[]).filter(r=>r instanceof File||r instanceof Blob);Jt.trackFiles(i,n),i.dispatchEvent(new Event("input",{bubbles:!0}))}))}eventMeta(t,e,i){let n=this.metadataCallbacks[t];return n?n(e,i):{}}setPendingLink(t){return this.linkRef++,this.pendingLink=t,this.resetReloadStatus(),this.linkRef}resetReloadStatus(){zi.deleteCookie(SS)}commitPendingLink(t){return this.linkRef!==t?!1:(this.href=this.pendingLink,this.pendingLink=null,!0)}getHref(){return this.href}hasPendingLink(){return!!this.pendingLink}bind(t,e){for(let i in t){let n=t[i];this.on(n,r=>{let o=this.binding(i),s=this.binding(`window-${i}`),a=r.target.getAttribute&&r.target.getAttribute(o);a?this.debounce(r.target,r,n,()=>{this.withinOwners(r.target,l=>{e(r,i,l,r.target,a,null)})}):G.all(document,`[${s}]`,l=>{let c=l.getAttribute(s);this.debounce(l,r,n,()=>{this.withinOwners(l,u=>{e(r,i,u,l,c,"window")})})})})}}bindClicks(){this.on("mousedown",t=>this.clickStartedAtTarget=t.target),this.bindClick("click","click")}bindClick(t,e){let i=this.binding(e);window.addEventListener(t,n=>{let r=null;n.detail===0&&(this.clickStartedAtTarget=n.target);let o=this.clickStartedAtTarget||n.target;r=Tc(n.target,i),this.dispatchClickAway(n,o),this.clickStartedAtTarget=null;let s=r&&r.getAttribute(i);if(!s){G.isNewPageClick(n,window.location)&&this.unload();return}r.getAttribute("href")==="#"&&n.preventDefault(),!r.hasAttribute(pn)&&this.debounce(r,n,"click",()=>{this.withinOwners(r,a=>{bt.exec(n,"click",s,a,r,["push",{data:this.eventMeta("click",n,r)}])})})},!1)}dispatchClickAway(t,e){let i=this.binding("click-away");G.all(document,`[${i}]`,n=>{n.isSameNode(e)||n.contains(e)||this.withinOwners(n,r=>{let o=n.getAttribute(i);bt.isVisible(n)&&bt.isInViewport(n)&&bt.exec(t,"click",o,r,n,["push",{data:this.eventMeta("click",t,t.target)}])})})}bindNav(){if(!zi.canPushState())return;history.scrollRestoration&&(history.scrollRestoration="manual");let t=null;window.addEventListener("scroll",e=>{clearTimeout(t),t=setTimeout(()=>{zi.updateCurrentState(i=>Object.assign(i,{scroll:window.scrollY}))},100)}),window.addEventListener("popstate",e=>{if(!this.registerNewLocation(window.location))return;let{type:i,backType:n,id:r,scroll:o,position:s}=e.state||{},a=window.location.href,l=s>this.currentHistoryPosition;i=l?i:n||i,this.currentHistoryPosition=s||0,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),G.dispatchEvent(window,"phx:navigate",{detail:{href:a,patch:i==="patch",pop:!0,direction:l?"forward":"backward"}}),this.requestDOMUpdate(()=>{let c=()=>{this.maybeScroll(o)};this.main.isConnected()&&i==="patch"&&r===this.main.id?this.main.pushLinkPatch(e,a,null,c):this.replaceMain(a,null,c)})},!1),window.addEventListener("click",e=>{let i=Tc(e.target,Lg),n=i&&i.getAttribute(Lg);if(!n||!this.isConnected()||!this.main||G.wantsNewTab(e))return;let r=i.href instanceof SVGAnimatedString?i.href.baseVal:i.href,o=i.getAttribute(SD);e.preventDefault(),e.stopImmediatePropagation(),this.pendingLink!==r&&this.requestDOMUpdate(()=>{if(n==="patch")this.pushHistoryPatch(e,r,o,i);else if(n==="redirect")this.historyRedirect(e,r,o,null,i);else throw new Error(`expected ${Lg} to be "patch" or "redirect", got: ${n}`);let s=i.getAttribute(this.binding("click"));s&&this.requestDOMUpdate(()=>this.execJS(i,s,"click"))})},!1)}maybeScroll(t){typeof t=="number"&&requestAnimationFrame(()=>{window.scrollTo(0,t)})}dispatchEvent(t,e={}){G.dispatchEvent(window,`phx:${t}`,{detail:e})}dispatchEvents(t){t.forEach(([e,i])=>this.dispatchEvent(e,i))}withPageLoading(t,e){G.dispatchEvent(window,"phx:page-loading-start",{detail:t});let i=()=>G.dispatchEvent(window,"phx:page-loading-stop",{detail:t});return e?e(i):i}pushHistoryPatch(t,e,i,n){if(!this.isConnected()||!this.main.isMain())return zi.redirect(e);this.withPageLoading({to:e,kind:"patch"},r=>{this.main.pushLinkPatch(t,e,n,o=>{this.historyPatch(e,i,o),r()})})}historyPatch(t,e,i=this.setPendingLink(t)){this.commitPendingLink(i)&&(this.currentHistoryPosition++,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),zi.updateCurrentState(n=>Ee(Y({},n),{backType:"patch"})),zi.pushState(e,{type:"patch",id:this.main.id,position:this.currentHistoryPosition},t),G.dispatchEvent(window,"phx:navigate",{detail:{patch:!0,href:t,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location))}historyRedirect(t,e,i,n,r){let o=r&&t.isTrusted&&t.type!=="popstate";if(o&&r.classList.add("phx-click-loading"),!this.isConnected()||!this.main.isMain())return zi.redirect(e,n);if(/^\/$|^\/[^\/]+.*$/.test(e)){let{protocol:a,host:l}=window.location;e=`${a}//${l}${e}`}let s=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},a=>{this.replaceMain(e,n,l=>{l===this.linkRef&&(this.currentHistoryPosition++,this.sessionStorage.setItem(_h,this.currentHistoryPosition.toString()),zi.updateCurrentState(c=>Ee(Y({},c),{backType:"redirect"})),zi.pushState(i,{type:"redirect",id:this.main.id,scroll:s,position:this.currentHistoryPosition},e),G.dispatchEvent(window,"phx:navigate",{detail:{href:e,patch:!1,pop:!1,direction:"forward"}}),this.registerNewLocation(window.location)),o&&r.classList.remove("phx-click-loading"),a()})})}registerNewLocation(t){let{pathname:e,search:i}=this.currentLocation;return e+i===t.pathname+t.search?!1:(this.currentLocation=Dh(t),!0)}bindForms(){let t=0,e=!1;this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit")),r=i.target.getAttribute(this.binding("change"));!e&&r&&!n&&(e=!0,i.preventDefault(),this.withinOwners(i.target,o=>{o.disableForm(i.target),window.requestAnimationFrame(()=>{G.isUnloadableFormSubmit(i)&&this.unload(),i.target.submit()})}))}),this.on("submit",i=>{let n=i.target.getAttribute(this.binding("submit"));if(!n){G.isUnloadableFormSubmit(i)&&this.unload();return}i.preventDefault(),i.target.disabled=!0,this.withinOwners(i.target,r=>{bt.exec(i,"submit",n,r,i.target,["push",{submitter:i.submitter}])})});for(let i of["change","input"])this.on(i,n=>{if(n instanceof CustomEvent&&n.target.form===void 0){if(n.detail&&n.detail.dispatcher)throw new Error(`dispatching a custom ${i} event is only supported on input elements inside a form`);return}let r=this.binding("change"),o=n.target;if(n.isComposing){let O=`composition-listener-${i}`;G.private(o,O)||(G.putPrivate(o,O,!0),o.addEventListener("compositionend",()=>{o.dispatchEvent(new Event(i,{bubbles:!0})),G.deletePrivate(o,O)},{once:!0}));return}let s=o.getAttribute(r),a=o.form&&o.form.getAttribute(r),l=s||a;if(!l||o.type==="number"&&o.validity&&o.validity.badInput)return;let c=s?o:o.form,u=t;t++;let{at:f,type:d}=G.private(o,"prev-iteration")||{};f===u-1&&i==="change"&&d==="input"||(G.putPrivate(o,"prev-iteration",{at:u,type:i}),this.debounce(o,n,i,()=>{this.withinOwners(c,O=>{G.putPrivate(o,zh,!0),bt.exec(n,"change",l,O,o,["push",{_target:n.target.name,dispatcher:c}])})}))});this.on("reset",i=>{let n=i.target;G.resetForm(n);let r=Array.from(n.elements).find(o=>o.type==="reset");r&&window.requestAnimationFrame(()=>{r.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))})})}debounce(t,e,i,n){if(i==="blur"||i==="focusout")return n();let r=this.binding(CD),o=this.binding(QD),s=this.defaults.debounce.toString(),a=this.defaults.throttle.toString();this.withinOwners(t,l=>{let c=()=>!l.isDestroyed()&&document.body.contains(t);G.debounce(t,e,r,s,o,a,c,()=>{n()})})}silenceEvents(t){this.silenced=!0,t(),this.silenced=!1}on(t,e){this.boundEventNames.add(t),window.addEventListener(t,i=>{this.silenced||e(i)})}jsQuerySelectorAll(t,e,i){let n=this.domCallbacks.jsQuerySelectorAll;return n?n(t,e,i):i()}},g8=class{constructor(){this.transitions=new Set,this.pendingOps=[]}reset(){this.transitions.forEach(t=>{clearTimeout(t),this.transitions.delete(t)}),this.flushPendingOps()}after(t){this.size()===0?t():this.pushPendingOp(t)}addTransition(t,e,i){e();let n=setTimeout(()=>{this.transitions.delete(n),i(),this.flushPendingOps()},t);this.transitions.add(n)}pushPendingOp(t){this.pendingOps.push(t)}size(){return this.transitions.size}flushPendingOps(){if(this.size()>0)return;let t=this.pendingOps.shift();t&&(t(),this.flushPendingOps())}};var tT="livebook:";function ks(t){try{let e=localStorage.getItem(tT+t);if(e)return JSON.parse(e)}catch(e){console.error(`Failed to load from local storage, reason: ${e.message}`)}}function za(t,e){try{let i=JSON.stringify(e);localStorage.setItem(tT+t,i)}catch(i){console.error(`Failed to write to local storage, reason: ${i.message}`)}}var iT="app_auth_token:";function nT(t,e){za(iT+t,e)}function rT(){let t=window.location.pathname;if(t.startsWith("/apps/")){let e=t.split("/")[2],i=ks(iT+e);if(i)return i}return null}var b8={mounted(){this.handleEvent("persist_app_auth",({slug:t,token:e})=>{nT(t,e),this.pushEvent("app_auth_persisted")})}},oT=b8;function Ot(t,e){let i={};for(let n of e){let r=`data-p-${n}`;if(!t.hasAttribute(r))throw new Error(`Missing attribute "${r}" on element <${t.tagName}:${t.id}>`);let o=t.getAttribute(r);i[y8(n)]=JSON.parse(o)}return i}function y8(t){let[e,...i]=t.split("-");return[e,...i.map(n=>n.charAt(0).toUpperCase()+n.slice(1))].join("")}function sT(t,e,i){let r=new ArrayBuffer(44+t.byteLength),o=new DataView(r),s=t.byteLength/4,a=4,l=e*a,c=i*l,u=s*l,f=0;function d(w){o.setUint32(f,w,!1),f+=4}function O(w){o.setUint32(f,w,!0),f+=4}function m(w){o.setUint16(f,w,!0),f+=2}function x(w){o.setFloat32(f,w,!0),f+=4}d(1380533830),O(36+u),d(1463899717),d(1718449184),O(16),m(3),m(e),O(i),O(c),m(l),m(a*8),d(1684108385),O(u);let v=new Float32Array(t);for(let w=0;w{this.inputEl.click()}),this.inputEl.addEventListener("change",t=>{let[e]=t.target.files;e&&this.loadFile(e)}),this.el.addEventListener("dragover",t=>{t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}),this.el.addEventListener("drop",t=>{t.stopPropagation(),t.preventDefault();let[e]=t.dataTransfer.files;e&&!this.isRecording()&&this.loadFile(e)}),this.el.addEventListener("dragenter",t=>{this.el.classList.add(...Gg)}),this.el.addEventListener("dragleave",t=>{this.el.contains(t.relatedTarget)||this.el.classList.remove(...Gg)}),this.el.addEventListener("drop",t=>{this.el.classList.remove(...Gg)}),this.recordButton.addEventListener("click",t=>{this.startRecording()}),this.stopButton.addEventListener("click",t=>{this.stopRecording()}),this.cancelButton.addEventListener("click",t=>{this.stopRecording(!1)})},updated(){this.props=this.getProps(),this.audioEl.src=this.props.audioUrl},getProps(){return Ot(this.el,["id","phx-target","sampling-rate","endianness","format","audio-url"])},startRecording(){this.audioEl.classList.add("hidden"),this.uploadButton.classList.add("hidden"),this.recordButton.classList.add("hidden"),this.stopButton.classList.remove("hidden"),this.cancelButton.classList.remove("hidden"),this.audioChunks=[],navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{this.mediaRecorder=new MediaRecorder(t),this.mediaRecorder.addEventListener("dataavailable",e=>{this.audioChunks.push(e.data)}),this.mediaRecorder.start()})},stopRecording(t=!0){this.audioEl.classList.remove("hidden"),this.uploadButton.classList.remove("hidden"),this.recordButton.classList.remove("hidden"),this.stopButton.classList.add("hidden"),this.cancelButton.classList.add("hidden"),t&&this.mediaRecorder.addEventListener("stop",e=>{new Blob(this.audioChunks).arrayBuffer().then(n=>{this.loadEncodedAudio(n)})}),this.mediaRecorder.stop()},isRecording(){return this.mediaRecorder&&this.mediaRecorder.state==="recording"},loadFile(t){let e=new FileReader;e.onload=i=>{this.loadEncodedAudio(i.target.result)},e.readAsArrayBuffer(t)},loadEncodedAudio(t){this.pushEventTo(this.props.phxTarget,"decoding",{}),new AudioContext({sampleRate:this.props.samplingRate}).decodeAudioData(t,i=>{let n=v8(i);this.pushAudio(n)})},pushAudio(t){let e={num_channels:t.numChannels,sampling_rate:t.samplingRate},i=this.encodeAudio(t),n=new Blob([i]);n.meta=()=>e,this.uploadTo(this.props.phxTarget,"file",[n])},encodeAudio(t){if(this.props.format==="pcm_f32")return w8(t.data,this.props.endianness);if(this.props.format==="wav")return sT(t.data,t.numChannels,t.samplingRate)}};function v8(t){let e=t.numberOfChannels,i=t.sampleRate,n=t.length,r=4*e*n,o=new ArrayBuffer(r),s=new Float32Array(o);for(let a=0;a=0;l--)n=i[l],r=n.name,o=n.namespaceURI,s=n.value,o?(r=n.localName||r,a=t.getAttributeNS(o,r),a!==s&&(n.prefix==="xmlns"&&(r=n.name),t.setAttributeNS(o,r,s))):(a=t.getAttribute(r),a!==s&&t.setAttribute(r,s));for(var c=t.attributes,u=c.length-1;u>=0;u--)n=c[u],r=n.name,o=n.namespaceURI,o?(r=n.localName||r,e.hasAttributeNS(o,r)||t.removeAttributeNS(o,r)):e.hasAttribute(r)||t.removeAttribute(r)}}var Nh,T8="http://www.w3.org/1999/xhtml",Ni=typeof document=="undefined"?void 0:document,E8=!!Ni&&"content"in Ni.createElement("template"),P8=!!Ni&&Ni.createRange&&"createContextualFragment"in Ni.createRange();function C8(t){var e=Ni.createElement("template");return e.innerHTML=t,e.content.childNodes[0]}function Q8(t){Nh||(Nh=Ni.createRange(),Nh.selectNode(Ni.body));var e=Nh.createContextualFragment(t);return e.childNodes[0]}function _8(t){var e=Ni.createElement("body");return e.innerHTML=t,e.childNodes[0]}function A8(t){return t=t.trim(),E8?C8(t):P8?Q8(t):_8(t)}function qh(t,e){var i=t.nodeName,n=e.nodeName,r,o;return i===n?!0:(r=i.charCodeAt(0),o=n.charCodeAt(0),r<=90&&o>=97?i===n.toUpperCase():o<=90&&r>=97?n===i.toUpperCase():!1)}function $8(t,e){return!e||e===T8?Ni.createElement(t):Ni.createElementNS(e,t)}function X8(t,e){for(var i=t.firstChild;i;){var n=i.nextSibling;e.appendChild(i),i=n}return e}function Kg(t,e,i){t[i]!==e[i]&&(t[i]=e[i],t[i]?t.setAttribute(i,""):t.removeAttribute(i))}var fT={OPTION:function(t,e){var i=t.parentNode;if(i){var n=i.nodeName.toUpperCase();n==="OPTGROUP"&&(i=i.parentNode,n=i&&i.nodeName.toUpperCase()),n==="SELECT"&&!i.hasAttribute("multiple")&&(t.hasAttribute("selected")&&!e.selected&&(t.setAttribute("selected","selected"),t.removeAttribute("selected")),i.selectedIndex=-1)}Kg(t,e,"selected")},INPUT:function(t,e){Kg(t,e,"checked"),Kg(t,e,"disabled"),t.value!==e.value&&(t.value=e.value),e.hasAttribute("value")||t.removeAttribute("value")},TEXTAREA:function(t,e){var i=e.value;t.value!==i&&(t.value=i);var n=t.firstChild;if(n){var r=n.nodeValue;if(r==i||!i&&r==t.placeholder)return;n.nodeValue=i}},SELECT:function(t,e){if(!e.hasAttribute("multiple")){for(var i=-1,n=0,r=t.firstChild,o,s;r;)if(s=r.nodeName&&r.nodeName.toUpperCase(),s==="OPTGROUP")o=r,r=o.firstChild;else{if(s==="OPTION"){if(r.hasAttribute("selected")){i=n;break}n++}r=r.nextSibling,!r&&o&&(r=o.nextSibling,o=null)}t.selectedIndex=i}}},Cc=1,hT=11,dT=3,OT=8;function Eo(){}function R8(t){if(t)return t.getAttribute&&t.getAttribute("id")||t.id}function L8(t){return function(i,n,r){if(r||(r={}),typeof n=="string")if(i.nodeName==="#document"||i.nodeName==="HTML"||i.nodeName==="BODY"){var o=n;n=Ni.createElement("html"),n.innerHTML=o}else n=A8(n);else n.nodeType===hT&&(n=n.firstElementChild);var s=r.getNodeKey||R8,a=r.onBeforeNodeAdded||Eo,l=r.onNodeAdded||Eo,c=r.onBeforeElUpdated||Eo,u=r.onElUpdated||Eo,f=r.onBeforeNodeDiscarded||Eo,d=r.onNodeDiscarded||Eo,O=r.onBeforeElChildrenUpdated||Eo,m=r.skipFromChildren||Eo,x=r.addChild||function(j,ue){return j.appendChild(ue)},v=r.childrenOnly===!0,w=Object.create(null),T=[];function A(j){T.push(j)}function L(j,ue){if(j.nodeType===Cc)for(var Z=j.firstChild;Z;){var C=void 0;ue&&(C=s(Z))?A(C):(d(Z),Z.firstChild&&L(Z,ue)),Z=Z.nextSibling}}function D(j,ue,Z){f(j)!==!1&&(ue&&ue.removeChild(j),d(j),L(j,Z))}function P(j){if(j.nodeType===Cc||j.nodeType===hT)for(var ue=j.firstChild;ue;){var Z=s(ue);Z&&(w[Z]=ue),P(ue),ue=ue.nextSibling}}P(i);function N(j){l(j);for(var ue=j.firstChild;ue;){var Z=ue.nextSibling,C=s(ue);if(C){var W=w[C];W&&qh(ue,W)?(ue.parentNode.replaceChild(W,ue),H(W,ue)):N(ue)}else N(ue);ue=Z}}function le(j,ue,Z){for(;ue;){var C=ue.nextSibling;(Z=s(ue))?A(Z):D(ue,j,!0),ue=C}}function H(j,ue,Z){var C=s(ue);if(C&&delete w[C],!Z){var W=c(j,ue);if(W===!1||(W instanceof HTMLElement&&(j=W,P(j)),t(j,ue),u(j),O(j,ue)===!1))return}j.nodeName!=="TEXTAREA"?M(j,ue):fT.TEXTAREA(j,ue)}function M(j,ue){var Z=m(j,ue),C=ue.firstChild,W=j.firstChild,oe,I,Ne,We,Ve;e:for(;C;){for(We=C.nextSibling,oe=s(C);!Z&&W;){if(Ne=W.nextSibling,C.isSameNode&&C.isSameNode(W)){C=We,W=Ne;continue e}I=s(W);var Et=W.nodeType,Xe=void 0;if(Et===C.nodeType&&(Et===Cc?(oe?oe!==I&&((Ve=w[oe])?Ne===Ve?Xe=!1:(j.insertBefore(Ve,W),I?A(I):D(W,j,!0),W=Ve,I=s(W)):Xe=!1):I&&(Xe=!1),Xe=Xe!==!1&&qh(W,C),Xe&&H(W,C)):(Et===dT||Et==OT)&&(Xe=!0,W.nodeValue!==C.nodeValue&&(W.nodeValue=C.nodeValue))),Xe){C=We,W=Ne;continue e}I?A(I):D(W,j,!0),W=Ne}if(oe&&(Ve=w[oe])&&qh(Ve,C))Z||x(j,Ve),H(Ve,C);else{var Rt=a(C);Rt!==!1&&(Rt&&(C=Rt),C.actualize&&(C=C.actualize(j.ownerDocument||Ni)),x(j,C),N(C))}C=We,W=Ne}le(j,W,I);var Lt=fT[j.nodeName];Lt&&Lt(j,ue)}var ie=i,ne=ie.nodeType,re=n.nodeType;if(!v){if(ne===Cc)re===Cc?qh(i,n)||(d(i),ie=X8(i,$8(n.nodeName,n.namespaceURI))):ie=n;else if(ne===dT||ne===OT){if(re===ne)return ie.nodeValue!==n.nodeValue&&(ie.nodeValue=n.nodeValue),ie;ie=n}}if(ie===n)d(i);else{if(n.isSameNode&&n.isSameNode(ie))return;if(H(ie,n,v),T)for(var de=0,pe=T.length;des.length,l;a&&s.push(r);try{l=t.apply(this,s)}catch(c){let u=c;if(a&&i)throw u;return r(u)}a||(l instanceof Promise?l.then(o,r):l instanceof Error?r(l):o(l))}function r(s,...a){i||(i=!0,e(s,...a))}function o(s){r(null,s)}}function t0(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ET(t.position):"start"in t||"end"in t?ET(t):"line"in t||"column"in t?e0(t):""}function e0(t){return PT(t&&t.line)+":"+PT(t&&t.column)}function ET(t){return e0(t&&t.start)+"-"+e0(t&&t.end)}function PT(t){return t&&typeof t=="number"?t:1}var Zt=class extends Error{constructor(e,i,n){super(),typeof i=="string"&&(n=i,i=void 0);let r="",o={},s=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o=Y({},i)),typeof e=="string"?r=e:!o.cause&&e&&(s=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof n=="string"){let l=n.indexOf(":");l===-1?o.ruleId=n:(o.source=n.slice(0,l),o.ruleId=n.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){let l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}let a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=t0(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}};Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;var Dn={basename:z8,dirname:U8,extname:M8,join:N8,sep:"/"};function z8(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');_c(t);let i=0,n=-1,r=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(o){i=r+1;break}}else n<0&&(o=!0,n=r+1);return n<0?"":t.slice(i,n)}if(e===t)return"";let s=-1,a=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(o){i=r+1;break}}else s<0&&(o=!0,s=r+1),a>-1&&(t.codePointAt(r)===e.codePointAt(a--)?a<0&&(n=r):(a=-1,n=s));return i===n?n=s:n<0&&(n=t.length),t.slice(i,n)}function U8(t){if(_c(t),t.length===0)return".";let e=-1,i=t.length,n;for(;--i;)if(t.codePointAt(i)===47){if(n){e=i;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function M8(t){_c(t);let e=t.length,i=-1,n=0,r=-1,o=0,s;for(;e--;){let a=t.codePointAt(e);if(a===47){if(s){n=e+1;break}continue}i<0&&(s=!0,i=e+1),a===46?r<0?r=e:o!==1&&(o=1):r>-1&&(o=-1)}return r<0||i<0||o===0||o===1&&r===i-1&&r===n+1?"":t.slice(r,i)}function N8(...t){let e=-1,i;for(;++e0&&t.codePointAt(t.length-1)===47&&(i+="/"),e?"/"+i:i}function j8(t,e){let i="",n=0,r=-1,o=0,s=-1,a,l;for(;++s<=t.length;){if(s2){if(l=i.lastIndexOf("/"),l!==i.length-1){l<0?(i="",n=0):(i=i.slice(0,l),n=i.length-1-i.lastIndexOf("/")),r=s,o=0;continue}}else if(i.length>0){i="",n=0,r=s,o=0;continue}}e&&(i=i.length>0?i+"/..":"..",n=2)}else i.length>0?i+="/"+t.slice(r+1,s):i=t.slice(r+1,s),n=s-r-1;r=s,o=0}else a===46&&o>-1?o++:o=-1}return i}function _c(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var CT={cwd:W8};function W8(){return"/"}function Ua(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function QT(t){if(typeof t=="string")t=new URL(t);else if(!Ua(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return V8(t)}function V8(t){if(t.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let e=t.pathname,i=-1;for(;++i0){let[O,...m]=u,x=n[d][1];Qc(x)&&Qc(O)&&(O=(0,Vh.default)(!0,x,O)),n[d]=[c,O,...m]}}}},Zh=new l0().freeze();function o0(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function s0(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function a0(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $T(t){if(!Qc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function XT(t,e,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Wh(t){return Y8(t)?t:new Po(t)}function Y8(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function F8(t){return typeof t=="string"||H8(t)}function H8(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var G8={};function c0(t,e){let i=e||G8,n=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,r=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return LT(t,n,r)}function LT(t,e,i){if(K8(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return RT(t.children,e,i)}return Array.isArray(t)?RT(t,e,i):""}function RT(t,e,i){let n=[],r=-1;for(;++rr?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o0?(ai(t,t.length,0,e),t):e}var DT={}.hasOwnProperty;function zT(t){let e={},i=-1;for(;++i13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"\uFFFD":String.fromCharCode(i)}function _r(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var tz=Co(new RegExp("\\p{P}","u")),en=Co(/[A-Za-z]/),Qi=Co(/[\dA-Za-z]/),UT=Co(/[#-'*+\--9=?A-Z^-~]/);function Ac(t){return t!==null&&(t<32||t===127)}var $c=Co(/\d/),MT=Co(/[\dA-Fa-f]/),u0=Co(/[!-/:-@[-`{-~]/);function Te(t){return t!==null&&t<-2}function jt(t){return t!==null&&(t<0||t===32)}function Le(t){return t===-2||t===-1||t===32}function NT(t){return u0(t)||tz(t)}var qT=Co(/\s/);function Co(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ie(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Le(l)?(t.enter(i),a(l)):e(l)}function a(l){return Le(l)&&o++s))return;let N=e.events.length,le=N,H,M;for(;le--;)if(e.events[le][0]==="exit"&&e.events[le][1].type==="chunkFlow"){if(H){M=e.events[le][1].end;break}H=!0}for(w(n),P=N;PA;){let D=i[L];e.containerState=D[1],D[0].exit.call(e,t)}i.length=A}function T(){r.write([null]),o=void 0,r=void 0,e.containerState._closeFlow=void 0}}function rz(t,e,i){return Ie(t,t.attempt(this.parser.constructs.document,e,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function f0(t){if(t===null||jt(t)||qT(t))return 1;if(NT(t))return 2}function Na(t,e,i){let n=[],r=-1;for(;++r1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;let f=Object.assign({},t[n][1].end),d=Object.assign({},t[i][1].start);ZT(f,-l),ZT(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},t[n][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[i][1].start),end:d},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[n][1].end),end:Object.assign({},t[i][1].start)},r={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},t[n][1].end=Object.assign({},s.start),t[i][1].start=Object.assign({},a.end),c=[],t[n][1].end.offset-t[n][1].start.offset&&(c=Ci(c,[["enter",t[n][1],e],["exit",t[n][1],e]])),c=Ci(c,[["enter",r,e],["enter",s,e],["exit",s,e],["enter",o,e]]),c=Ci(c,Na(e.parser.constructs.insideSpan.null,t.slice(n+1,i),e)),c=Ci(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",r,e]]),t[i][1].end.offset-t[i][1].start.offset?(u=2,c=Ci(c,[["enter",t[i][1],e],["exit",t[i][1],e]])):u=0,ai(t,n-1,i-n+3,c),i=n+c.length-u-2;break}}for(i=-1;++i0&&Le(P)?Ie(t,T,"linePrefix",o+1)(P):T(P)}function T(P){return P===null||Te(P)?t.check(BT,x,L)(P):(t.enter("codeFlowValue"),A(P))}function A(P){return P===null||Te(P)?(t.exit("codeFlowValue"),T(P)):(t.consume(P),A)}function L(P){return t.exit("codeFenced"),e(P)}function D(P,N,le){let H=0;return M;function M(pe){return P.enter("lineEnding"),P.consume(pe),P.exit("lineEnding"),ie}function ie(pe){return P.enter("codeFencedFence"),Le(pe)?Ie(P,ne,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(pe):ne(pe)}function ne(pe){return pe===a?(P.enter("codeFencedFenceSequence"),re(pe)):le(pe)}function re(pe){return pe===a?(H++,P.consume(pe),re):H>=s?(P.exit("codeFencedFenceSequence"),Le(pe)?Ie(P,de,"whitespace")(pe):de(pe)):le(pe)}function de(pe){return pe===null||Te(pe)?(P.exit("codeFencedFence"),N(pe)):le(pe)}}}function pz(t,e,i){let n=this;return r;function r(s){return s===null?i(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o)}function o(s){return n.parser.lazy[n.now().line]?i(s):e(s)}}var Rc={name:"codeIndented",tokenize:gz},mz={tokenize:bz,partial:!0};function gz(t,e,i){let n=this;return r;function r(c){return t.enter("codeIndented"),Ie(t,o,"linePrefix",5)(c)}function o(c){let u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):i(c)}function s(c){return c===null?l(c):Te(c)?t.attempt(mz,s,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Te(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function bz(t,e,i){let n=this;return r;function r(s){return n.parser.lazy[n.now().line]?i(s):Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r):Ie(t,o,"linePrefix",5)(s)}function o(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(s):Te(s)?r(s):i(s)}}var d0={name:"codeText",tokenize:vz,resolve:yz,previous:xz};function yz(t){let e=t.length-4,i=3,n,r;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=i;++n=4?e(s):t.interrupt(n.parser.constructs.flow,i,e)(s)}}function Jh(t,e,i,n,r,o,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return f;function f(w){return w===60?(t.enter(n),t.enter(r),t.enter(o),t.consume(w),t.exit(o),d):w===null||w===32||w===41||Ac(w)?i(w):(t.enter(n),t.enter(s),t.enter(a),t.enter("chunkString",{contentType:"string"}),x(w))}function d(w){return w===62?(t.enter(o),t.consume(w),t.exit(o),t.exit(r),t.exit(n),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),O(w))}function O(w){return w===62?(t.exit("chunkString"),t.exit(a),d(w)):w===null||w===60||Te(w)?i(w):(t.consume(w),w===92?m:O)}function m(w){return w===60||w===62||w===92?(t.consume(w),O):O(w)}function x(w){return!u&&(w===null||w===41||jt(w))?(t.exit("chunkString"),t.exit(a),t.exit(s),t.exit(n),e(w)):u999||O===null||O===91||O===93&&!l||O===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?i(O):O===93?(t.exit(o),t.enter(r),t.consume(O),t.exit(r),t.exit(n),e):Te(O)?(t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),f(O))}function f(O){return O===null||O===91||O===93||Te(O)||a++>999?(t.exit("chunkString"),u(O)):(t.consume(O),l||(l=!Le(O)),O===92?d:f)}function d(O){return O===91||O===92||O===93?(t.consume(O),a++,f):f(O)}}function td(t,e,i,n,r,o){let s;return a;function a(d){return d===34||d===39||d===40?(t.enter(n),t.enter(r),t.consume(d),t.exit(r),s=d===40?41:d,l):i(d)}function l(d){return d===s?(t.enter(r),t.consume(d),t.exit(r),t.exit(n),e):(t.enter(o),c(d))}function c(d){return d===s?(t.exit(o),l(s)):d===null?i(d):Te(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ie(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Te(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?f:u)}function f(d){return d===s||d===92?(t.consume(d),u):u(d)}}function Ss(t,e){let i;return n;function n(r){return Te(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),i=!0,n):Le(r)?Ie(t,n,i?"linePrefix":"lineSuffix")(r):e(r)}}var p0={name:"definition",tokenize:Cz},Pz={tokenize:Qz,partial:!0};function Cz(t,e,i){let n=this,r;return o;function o(O){return t.enter("definition"),s(O)}function s(O){return ed.call(n,t,a,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function a(O){return r=_r(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),O===58?(t.enter("definitionMarker"),t.consume(O),t.exit("definitionMarker"),l):i(O)}function l(O){return jt(O)?Ss(t,c)(O):c(O)}function c(O){return Jh(t,u,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function u(O){return t.attempt(Pz,f,f)(O)}function f(O){return Le(O)?Ie(t,d,"whitespace")(O):d(O)}function d(O){return O===null||Te(O)?(t.exit("definition"),n.parser.defined.push(r),e(O)):i(O)}}function Qz(t,e,i){return n;function n(a){return jt(a)?Ss(t,r)(a):i(a)}function r(a){return td(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Le(a)?Ie(t,s,"whitespace")(a):s(a)}function s(a){return a===null||Te(a)?e(a):i(a)}}var m0={name:"hardBreakEscape",tokenize:_z};function _z(t,e,i){return n;function n(o){return t.enter("hardBreakEscape"),t.consume(o),r}function r(o){return Te(o)?(t.exit("hardBreakEscape"),e(o)):i(o)}}var g0={name:"headingAtx",tokenize:$z,resolve:Az};function Az(t,e){let i=t.length-2,n=3,r,o;return t[n][1].type==="whitespace"&&(n+=2),i-2>n&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(n===i-1||i-4>n&&t[i-2][1].type==="whitespace")&&(i-=n+1===i?2:4),i>n&&(r={type:"atxHeadingText",start:t[n][1].start,end:t[i][1].end},o={type:"chunkText",start:t[n][1].start,end:t[i][1].end,contentType:"text"},ai(t,n,i-n+1,[["enter",r,e],["enter",o,e],["exit",o,e],["exit",r,e]])),t}function $z(t,e,i){let n=0;return r;function r(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(t.consume(u),s):u===null||jt(u)?(t.exit("atxHeadingSequence"),a(u)):i(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Te(u)?(t.exit("atxHeading"),e(u)):Le(u)?Ie(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||jt(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}var YT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],b0=["pre","script","style","textarea"];var y0={name:"htmlFlow",tokenize:Iz,resolveTo:Lz,concrete:!0},Xz={tokenize:zz,partial:!0},Rz={tokenize:Dz,partial:!0};function Lz(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Iz(t,e,i){let n=this,r,o,s,a,l;return c;function c(I){return u(I)}function u(I){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(I),f}function f(I){return I===33?(t.consume(I),d):I===47?(t.consume(I),o=!0,x):I===63?(t.consume(I),r=3,n.interrupt?e:C):en(I)?(t.consume(I),s=String.fromCharCode(I),v):i(I)}function d(I){return I===45?(t.consume(I),r=2,O):I===91?(t.consume(I),r=5,a=0,m):en(I)?(t.consume(I),r=4,n.interrupt?e:C):i(I)}function O(I){return I===45?(t.consume(I),n.interrupt?e:C):i(I)}function m(I){let Ne="CDATA[";return I===Ne.charCodeAt(a++)?(t.consume(I),a===Ne.length?n.interrupt?e:ne:m):i(I)}function x(I){return en(I)?(t.consume(I),s=String.fromCharCode(I),v):i(I)}function v(I){if(I===null||I===47||I===62||jt(I)){let Ne=I===47,We=s.toLowerCase();return!Ne&&!o&&b0.includes(We)?(r=1,n.interrupt?e(I):ne(I)):YT.includes(s.toLowerCase())?(r=6,Ne?(t.consume(I),w):n.interrupt?e(I):ne(I)):(r=7,n.interrupt&&!n.parser.lazy[n.now().line]?i(I):o?T(I):A(I))}return I===45||Qi(I)?(t.consume(I),s+=String.fromCharCode(I),v):i(I)}function w(I){return I===62?(t.consume(I),n.interrupt?e:ne):i(I)}function T(I){return Le(I)?(t.consume(I),T):M(I)}function A(I){return I===47?(t.consume(I),M):I===58||I===95||en(I)?(t.consume(I),L):Le(I)?(t.consume(I),A):M(I)}function L(I){return I===45||I===46||I===58||I===95||Qi(I)?(t.consume(I),L):D(I)}function D(I){return I===61?(t.consume(I),P):Le(I)?(t.consume(I),D):A(I)}function P(I){return I===null||I===60||I===61||I===62||I===96?i(I):I===34||I===39?(t.consume(I),l=I,N):Le(I)?(t.consume(I),P):le(I)}function N(I){return I===l?(t.consume(I),l=null,H):I===null||Te(I)?i(I):(t.consume(I),N)}function le(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||jt(I)?D(I):(t.consume(I),le)}function H(I){return I===47||I===62||Le(I)?A(I):i(I)}function M(I){return I===62?(t.consume(I),ie):i(I)}function ie(I){return I===null||Te(I)?ne(I):Le(I)?(t.consume(I),ie):i(I)}function ne(I){return I===45&&r===2?(t.consume(I),ve):I===60&&r===1?(t.consume(I),j):I===62&&r===4?(t.consume(I),W):I===63&&r===3?(t.consume(I),C):I===93&&r===5?(t.consume(I),Z):Te(I)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(Xz,oe,re)(I)):I===null||Te(I)?(t.exit("htmlFlowData"),re(I)):(t.consume(I),ne)}function re(I){return t.check(Rz,de,oe)(I)}function de(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),pe}function pe(I){return I===null||Te(I)?re(I):(t.enter("htmlFlowData"),ne(I))}function ve(I){return I===45?(t.consume(I),C):ne(I)}function j(I){return I===47?(t.consume(I),s="",ue):ne(I)}function ue(I){if(I===62){let Ne=s.toLowerCase();return b0.includes(Ne)?(t.consume(I),W):ne(I)}return en(I)&&s.length<8?(t.consume(I),s+=String.fromCharCode(I),ue):ne(I)}function Z(I){return I===93?(t.consume(I),C):ne(I)}function C(I){return I===62?(t.consume(I),W):I===45&&r===2?(t.consume(I),C):ne(I)}function W(I){return I===null||Te(I)?(t.exit("htmlFlowData"),oe(I)):(t.consume(I),W)}function oe(I){return t.exit("htmlFlow"),e(I)}}function Dz(t,e,i){let n=this;return r;function r(s){return Te(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),o):i(s)}function o(s){return n.parser.lazy[n.now().line]?i(s):e(s)}}function zz(t,e,i){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(Qo,e,i)}}var x0={name:"htmlText",tokenize:Uz};function Uz(t,e,i){let n=this,r,o,s;return a;function a(C){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(C),l}function l(C){return C===33?(t.consume(C),c):C===47?(t.consume(C),D):C===63?(t.consume(C),A):en(C)?(t.consume(C),le):i(C)}function c(C){return C===45?(t.consume(C),u):C===91?(t.consume(C),o=0,m):en(C)?(t.consume(C),T):i(C)}function u(C){return C===45?(t.consume(C),O):i(C)}function f(C){return C===null?i(C):C===45?(t.consume(C),d):Te(C)?(s=f,j(C)):(t.consume(C),f)}function d(C){return C===45?(t.consume(C),O):f(C)}function O(C){return C===62?ve(C):C===45?d(C):f(C)}function m(C){let W="CDATA[";return C===W.charCodeAt(o++)?(t.consume(C),o===W.length?x:m):i(C)}function x(C){return C===null?i(C):C===93?(t.consume(C),v):Te(C)?(s=x,j(C)):(t.consume(C),x)}function v(C){return C===93?(t.consume(C),w):x(C)}function w(C){return C===62?ve(C):C===93?(t.consume(C),w):x(C)}function T(C){return C===null||C===62?ve(C):Te(C)?(s=T,j(C)):(t.consume(C),T)}function A(C){return C===null?i(C):C===63?(t.consume(C),L):Te(C)?(s=A,j(C)):(t.consume(C),A)}function L(C){return C===62?ve(C):A(C)}function D(C){return en(C)?(t.consume(C),P):i(C)}function P(C){return C===45||Qi(C)?(t.consume(C),P):N(C)}function N(C){return Te(C)?(s=N,j(C)):Le(C)?(t.consume(C),N):ve(C)}function le(C){return C===45||Qi(C)?(t.consume(C),le):C===47||C===62||jt(C)?H(C):i(C)}function H(C){return C===47?(t.consume(C),ve):C===58||C===95||en(C)?(t.consume(C),M):Te(C)?(s=H,j(C)):Le(C)?(t.consume(C),H):ve(C)}function M(C){return C===45||C===46||C===58||C===95||Qi(C)?(t.consume(C),M):ie(C)}function ie(C){return C===61?(t.consume(C),ne):Te(C)?(s=ie,j(C)):Le(C)?(t.consume(C),ie):H(C)}function ne(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(t.consume(C),r=C,re):Te(C)?(s=ne,j(C)):Le(C)?(t.consume(C),ne):(t.consume(C),de)}function re(C){return C===r?(t.consume(C),r=void 0,pe):C===null?i(C):Te(C)?(s=re,j(C)):(t.consume(C),re)}function de(C){return C===null||C===34||C===39||C===60||C===61||C===96?i(C):C===47||C===62||jt(C)?H(C):(t.consume(C),de)}function pe(C){return C===47||C===62||jt(C)?H(C):i(C)}function ve(C){return C===62?(t.consume(C),t.exit("htmlTextData"),t.exit("htmlText"),e):i(C)}function j(C){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),ue}function ue(C){return Le(C)?Ie(t,Z,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):Z(C)}function Z(C){return t.enter("htmlTextData"),s(C)}}var Ts={name:"labelEnd",tokenize:Vz,resolveTo:Wz,resolveAll:jz},Mz={tokenize:Zz},Nz={tokenize:Bz},qz={tokenize:Yz};function jz(t){let e=-1;for(;++e=3&&(c===null||Te(c))?(t.exit("thematicBreak"),e(c)):i(c)}function l(c){return c===r?(t.consume(c),n++,l):(t.exit("thematicBreakSequence"),Le(c)?Ie(t,a,"whitespace")(c):a(c))}}var bi={name:"list",tokenize:tU,continuation:{tokenize:iU},exit:rU},Jz={tokenize:oU,partial:!0},eU={tokenize:nU,partial:!0};function tU(t,e,i){let n=this,r=n.events[n.events.length-1],o=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return a;function a(O){let m=n.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||O===n.containerState.marker:$c(O)){if(n.containerState.type||(n.containerState.type=m,t.enter(m,{_container:!0})),m==="listUnordered")return t.enter("listItemPrefix"),O===42||O===45?t.check(Es,i,c)(O):c(O);if(!n.interrupt||O===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(O)}return i(O)}function l(O){return $c(O)&&++s<10?(t.consume(O),l):(!n.interrupt||s<2)&&(n.containerState.marker?O===n.containerState.marker:O===41||O===46)?(t.exit("listItemValue"),c(O)):i(O)}function c(O){return t.enter("listItemMarker"),t.consume(O),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||O,t.check(Qo,n.interrupt?i:u,t.attempt(Jz,d,f))}function u(O){return n.containerState.initialBlankLine=!0,o++,d(O)}function f(O){return Le(O)?(t.enter("listItemPrefixWhitespace"),t.consume(O),t.exit("listItemPrefixWhitespace"),d):i(O)}function d(O){return n.containerState.size=o+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(O)}}function iU(t,e,i){let n=this;return n.containerState._closeFlow=void 0,t.check(Qo,r,o);function r(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ie(t,e,"listItemIndent",n.containerState.size+1)(a)}function o(a){return n.containerState.furtherBlankLines||!Le(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(eU,e,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ie(t,t.attempt(bi,e,i),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function nU(t,e,i){let n=this;return Ie(t,r,"listItemIndent",n.containerState.size+1);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(o):i(o)}}function rU(t){t.exit(this.containerState.type)}function oU(t,e,i){let n=this;return Ie(t,r,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(o){let s=n.events[n.events.length-1];return!Le(o)&&s&&s[1].type==="listItemPrefixWhitespace"?e(o):i(o)}}var id={name:"setextUnderline",tokenize:aU,resolveTo:sU};function sU(t,e){let i=t.length,n,r,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){n=i;break}t[i][1].type==="paragraph"&&(r=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);let s={type:"setextHeading",start:Object.assign({},t[r][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[r][1].type="setextHeadingText",o?(t.splice(r,0,["enter",s,e]),t.splice(o+1,0,["exit",t[n][1],e]),t[n][1].end=Object.assign({},t[o][1].end)):t[n][1]=s,t.push(["exit",s,e]),t}function aU(t,e,i){let n=this,r;return o;function o(c){let u=n.events.length,f;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){f=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(t.enter("setextHeadingLine"),r=c,s(c)):i(c)}function s(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===r?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Le(c)?Ie(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Te(c)?(t.exit("setextHeadingLine"),e(c)):i(c)}}var FT={tokenize:lU};function lU(t){let e=this,i=t.attempt(Qo,n,t.attempt(this.parser.constructs.flowInitial,r,Ie(t,t.attempt(this.parser.constructs.flow,r,t.attempt(O0,r)),"linePrefix")));return i;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,i}function r(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,i}}var HT={resolveAll:e3()},GT=JT("string"),KT=JT("text");function JT(t){return{tokenize:e,resolveAll:e3(t==="text"?cU:void 0)};function e(i){let n=this,r=this.parser.constructs[t],o=i.attempt(r,s,a);return s;function s(u){return c(u)?o(u):a(u)}function a(u){if(u===null){i.consume(u);return}return i.enter("data"),i.consume(u),l}function l(u){return c(u)?(i.exit("data"),o(u)):(i.consume(u),l)}function c(u){if(u===null)return!0;let f=r[u],d=-1;if(f)for(;++d-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}o>0&&s.push(t[r].slice(0,o))}return s}function fU(t,e){let i=-1,n=[],r;for(;++ibU,contentInitial:()=>hU,disable:()=>yU,document:()=>fU,flow:()=>OU,flowInitial:()=>dU,insideSpan:()=>gU,string:()=>pU,text:()=>mU});var fU={42:gi,43:gi,45:gi,48:gi,49:gi,50:gi,51:gi,52:gi,53:gi,54:gi,55:gi,56:gi,57:gi,62:Bh},hU={91:O0},dU={[-2]:Lc,[-1]:Lc,32:Lc},OU={35:m0,42:Ts,45:[td,Ts],60:b0,61:td,95:Ts,96:Hh,126:Hh},pU={38:Fh,92:Yh},mU={[-5]:Ic,[-4]:Ic,[-3]:Ic,33:x0,38:Fh,42:Rc,60:[f0,y0],91:v0,92:[p0,Yh],93:Ss,95:Rc,96:h0},gU={null:[Rc,HT]},bU={null:[42,95]},yU={null:[]};function k0(t){let i=zT([w0,...(t||{}).extensions||[]]),n={defined:[],lazy:{},constructs:i,content:r(jT),document:r(VT),flow:r(FT),string:r(GT),text:r(KT)};return n;function r(o){return s;function s(a){return t3(n,o,a)}}}function S0(t){for(;!Gh(t););return t}var i3=/[\0\t\n\r]/g;function T0(){let t=1,e="",i=!0,n;return r;function r(o,s,a){let l=[],c,u,f,d,O;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",i&&(o.charCodeAt(0)===65279&&f++,i=void 0);f0){let Hi=Pe.tokenStack[Pe.tokenStack.length-1];(Hi[1]||s3).call(Pe,void 0,Hi[0])}for(ye.position={start:Qo(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Qo(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e-1&&t.test(String.fromCharCode(i))}}function C0(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var or=function(t){if(t==null)return QU;if(typeof t=="function")return nd(t);if(typeof t=="object")return Array.isArray(t)?EU(t):PU(t);if(typeof t=="string")return CU(t);throw new Error("Expected function, string, or object as test")};function EU(t){let e=[],i=-1;for(;++i":""))+")"})}return d;function d(){let O=f3,m,x,v;if((!e||o(l,c,u[u.length-1]||void 0))&&(O=AU(i(l,u)),O[0]===Es))return O;if("children"in l&&l.children){let w=l;if(w.children&&O[0]!==Wa)for(x=(n?w.children.length:-1)+s,v=u.concat(w);x>-1&&x0?{type:"text",value:P}:void 0),P===!1?d.lastIndex=L+1:(m!==L&&T.push({type:"text",value:c.value.slice(m,L)}),Array.isArray(P)?T.push(...P):P&&T.push(P),m=L+A[0].length,w=!0),!d.global)break;A=d.exec(c.value)}return w?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],n=i.indexOf(")"),r=ja(t,"("),o=ja(t,")");for(;n!==-1&&r>o;)t+=i.slice(0,n+1),i=i.slice(n+1),n=i.indexOf(")"),o++;return[t,i]}function h3(t,e){let i=t.input.charCodeAt(t.index-1);return(t.index===0||u3(i)||c3(i))&&(!e||i!==47)}function L0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}d3.peek=JU;function I0(){return{enter:{gfmFootnoteDefinition:VU,gfmFootnoteDefinitionLabelString:ZU,gfmFootnoteCall:FU,gfmFootnoteCallString:HU},exit:{gfmFootnoteDefinition:YU,gfmFootnoteDefinitionLabelString:BU,gfmFootnoteCall:KU,gfmFootnoteCallString:GU}}}function D0(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:e9,footnoteReference:d3}}}function VU(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function ZU(){this.buffer()}function BU(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=L0(this.sliceSerialize(t)).toLowerCase()}function YU(t){this.exit(t)}function FU(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function HU(){this.buffer()}function GU(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=L0(this.sliceSerialize(t)).toLowerCase()}function KU(t){this.exit(t)}function d3(t,e,i,n){let r=i.createTracker(n),o=r.move("[^"),s=i.enter("footnoteReference"),a=i.enter("reference");return o+=r.move(i.safe(i.associationId(t),Ee(Y({},r.current()),{before:o,after:"]"}))),a(),s(),o+=r.move("]"),o}function JU(){return"["}function e9(t,e,i,n){let r=i.createTracker(n),o=r.move("[^"),s=i.enter("footnoteDefinition"),a=i.enter("label");return o+=r.move(i.safe(i.associationId(t),Ee(Y({},r.current()),{before:o,after:"]"}))),a(),o+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),o+=r.move(i.indentLines(i.containerFlow(t,r.current()),t9)),s(),o}function t9(t,e,i){return e===0?t:(i?"":" ")+t}var i9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O3.peek=o9;function z0(){return{canContainEols:["delete"],enter:{strikethrough:n9},exit:{strikethrough:r9}}}function U0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:i9}],handlers:{delete:O3}}}function n9(t){this.enter({type:"delete",children:[]},t)}function r9(t){this.exit(t)}function O3(t,e,i,n){let r=i.createTracker(n),o=i.enter("strikethrough"),s=r.move("~~");return s+=i.containerPhrasing(t,Ee(Y({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function o9(){return"~"}function m3(t,e={}){let i=(e.align||[]).concat(),n=e.stringLength||a9,r=[],o=[],s=[],a=[],l=0,c=-1;for(;++cl&&(l=t[c].length);++va[v])&&(a[v]=T)}m.push(w)}o[c]=m,s[c]=x}let u=-1;if(typeof i=="object"&&"length"in i)for(;++ua[u]&&(a[u]=w),d[u]=w),f[u]=T}o.splice(1,0,f),s.splice(1,0,d),c=-1;let O=[];for(;++c "),o.shift(2);let s=i.indentLines(i.containerFlow(t,o.current()),l9);return r(),s}function l9(t,e,i){return">"+(i?"":" ")+t}function x3(t,e){return y3(t,e.inConstruct,!0)&&!y3(t,e.notInConstruct,!1)}function y3(t,e,i){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return i;let n=-1;for(;++nyU,contentInitial:()=>dU,disable:()=>xU,document:()=>hU,flow:()=>pU,flowInitial:()=>OU,insideSpan:()=>bU,string:()=>mU,text:()=>gU});var hU={42:bi,43:bi,45:bi,48:bi,49:bi,50:bi,51:bi,52:bi,53:bi,54:bi,55:bi,56:bi,57:bi,62:Yh},dU={91:p0},OU={[-2]:Rc,[-1]:Rc,32:Rc},pU={35:g0,42:Es,45:[id,Es],60:y0,61:id,95:Es,96:Gh,126:Gh},mU={38:Hh,92:Fh},gU={[-5]:Lc,[-4]:Lc,[-3]:Lc,33:v0,38:Hh,42:Xc,60:[h0,x0],91:w0,92:[m0,Fh],93:Ts,95:Xc,96:d0},bU={null:[Xc,HT]},yU={null:[42,95]},xU={null:[]};function S0(t){let i=zT([k0,...(t||{}).extensions||[]]),n={defined:[],lazy:{},constructs:i,content:r(jT),document:r(VT),flow:r(FT),string:r(GT),text:r(KT)};return n;function r(o){return s;function s(a){return t3(n,o,a)}}}function T0(t){for(;!Kh(t););return t}var i3=/[\0\t\n\r]/g;function E0(){let t=1,e="",i=!0,n;return r;function r(o,s,a){let l=[],c,u,f,d,O;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),f=0,e="",i&&(o.charCodeAt(0)===65279&&f++,i=void 0);f0){let Gi=Pe.tokenStack[Pe.tokenStack.length-1];(Gi[1]||s3).call(Pe,void 0,Gi[0])}for(ye.position={start:_o(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:_o(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e-1&&t.test(String.fromCharCode(i))}}function Q0(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var sr=function(t){if(t==null)return _U;if(typeof t=="function")return rd(t);if(typeof t=="object")return Array.isArray(t)?PU(t):CU(t);if(typeof t=="string")return QU(t);throw new Error("Expected function, string, or object as test")};function PU(t){let e=[],i=-1;for(;++i":""))+")"})}return d;function d(){let O=f3,m,x,v;if((!e||o(l,c,u[u.length-1]||void 0))&&(O=$U(i(l,u)),O[0]===Ps))return O;if("children"in l&&l.children){let w=l;if(w.children&&O[0]!==Wa)for(x=(n?w.children.length:-1)+s,v=u.concat(w);x>-1&&x0?{type:"text",value:P}:void 0),P===!1?d.lastIndex=L+1:(m!==L&&T.push({type:"text",value:c.value.slice(m,L)}),Array.isArray(P)?T.push(...P):P&&T.push(P),m=L+A[0].length,w=!0),!d.global)break;A=d.exec(c.value)}return w?(m?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let i=e[0],n=i.indexOf(")"),r=ja(t,"("),o=ja(t,")");for(;n!==-1&&r>o;)t+=i.slice(0,n+1),i=i.slice(n+1),n=i.indexOf(")"),o++;return[t,i]}function h3(t,e){let i=t.input.charCodeAt(t.index-1);return(t.index===0||u3(i)||c3(i))&&(!e||i!==47)}function I0(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}d3.peek=e9;function D0(){return{enter:{gfmFootnoteDefinition:ZU,gfmFootnoteDefinitionLabelString:BU,gfmFootnoteCall:HU,gfmFootnoteCallString:GU},exit:{gfmFootnoteDefinition:FU,gfmFootnoteDefinitionLabelString:YU,gfmFootnoteCall:JU,gfmFootnoteCallString:KU}}}function z0(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:t9,footnoteReference:d3}}}function ZU(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function BU(){this.buffer()}function YU(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=I0(this.sliceSerialize(t)).toLowerCase()}function FU(t){this.exit(t)}function HU(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function GU(){this.buffer()}function KU(t){let e=this.resume(),i=this.stack[this.stack.length-1];i.type,i.label=e,i.identifier=I0(this.sliceSerialize(t)).toLowerCase()}function JU(t){this.exit(t)}function d3(t,e,i,n){let r=i.createTracker(n),o=r.move("[^"),s=i.enter("footnoteReference"),a=i.enter("reference");return o+=r.move(i.safe(i.associationId(t),Ee(Y({},r.current()),{before:o,after:"]"}))),a(),s(),o+=r.move("]"),o}function e9(){return"["}function t9(t,e,i,n){let r=i.createTracker(n),o=r.move("[^"),s=i.enter("footnoteDefinition"),a=i.enter("label");return o+=r.move(i.safe(i.associationId(t),Ee(Y({},r.current()),{before:o,after:"]"}))),a(),o+=r.move("]:"+(t.children&&t.children.length>0?" ":"")),r.shift(4),o+=r.move(i.indentLines(i.containerFlow(t,r.current()),i9)),s(),o}function i9(t,e,i){return e===0?t:(i?"":" ")+t}var n9=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];O3.peek=s9;function U0(){return{canContainEols:["delete"],enter:{strikethrough:r9},exit:{strikethrough:o9}}}function M0(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:n9}],handlers:{delete:O3}}}function r9(t){this.enter({type:"delete",children:[]},t)}function o9(t){this.exit(t)}function O3(t,e,i,n){let r=i.createTracker(n),o=i.enter("strikethrough"),s=r.move("~~");return s+=i.containerPhrasing(t,Ee(Y({},r.current()),{before:s,after:"~"})),s+=r.move("~~"),o(),s}function s9(){return"~"}function m3(t,e={}){let i=(e.align||[]).concat(),n=e.stringLength||l9,r=[],o=[],s=[],a=[],l=0,c=-1;for(;++cl&&(l=t[c].length);++va[v])&&(a[v]=T)}m.push(w)}o[c]=m,s[c]=x}let u=-1;if(typeof i=="object"&&"length"in i)for(;++ua[u]&&(a[u]=w),d[u]=w),f[u]=T}o.splice(1,0,f),s.splice(1,0,d),c=-1;let O=[];for(;++c "),o.shift(2);let s=i.indentLines(i.containerFlow(t,o.current()),c9);return r(),s}function c9(t,e,i){return">"+(i?"":" ")+t}function x3(t,e){return y3(t,e.inConstruct,!0)&&!y3(t,e.notInConstruct,!1)}function y3(t,e,i){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return i;let n=-1;for(;++ns&&(s=o):o=1,r=n+e.length,n=i.indexOf(e,r);return s}function v3(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function w3(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function k3(t,e,i,n){let r=w3(i),o=t.value||"",s=r==="`"?"GraveAccent":"Tilde";if(v3(t,i)){let f=i.enter("codeIndented"),d=i.indentLines(o,c9);return f(),d}let a=i.createTracker(n),l=r.repeat(Math.max(od(o,r)+1,3)),c=i.enter("codeFenced"),u=a.move(l);if(t.lang){let f=i.enter(`codeFencedLang${s}`);u+=a.move(i.safe(t.lang,Y({before:u,after:" ",encode:["`"]},a.current()))),f()}if(t.lang&&t.meta){let f=i.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(i.safe(t.meta,Y({before:u,after:` +`}function sd(t,e){let i=String(t),n=i.indexOf(e),r=n,o=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===r?++o>s&&(s=o):o=1,r=n+e.length,n=i.indexOf(e,r);return s}function v3(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function w3(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function k3(t,e,i,n){let r=w3(i),o=t.value||"",s=r==="`"?"GraveAccent":"Tilde";if(v3(t,i)){let f=i.enter("codeIndented"),d=i.indentLines(o,u9);return f(),d}let a=i.createTracker(n),l=r.repeat(Math.max(sd(o,r)+1,3)),c=i.enter("codeFenced"),u=a.move(l);if(t.lang){let f=i.enter(`codeFencedLang${s}`);u+=a.move(i.safe(t.lang,Y({before:u,after:" ",encode:["`"]},a.current()))),f()}if(t.lang&&t.meta){let f=i.enter(`codeFencedMeta${s}`);u+=a.move(" "),u+=a.move(i.safe(t.meta,Y({before:u,after:` `,encode:["`"]},a.current()))),f()}return u+=a.move(` `),o&&(u+=a.move(o+` -`)),u+=a.move(l),c(),u}function c9(t,e,i){return(i?"":" ")+t}function Za(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function S3(t,e,i,n){let r=Za(i),o=r==='"'?"Quote":"Apostrophe",s=i.enter("definition"),a=i.enter("label"),l=i.createTracker(n),c=l.move("[");return c+=l.move(i.safe(i.associationId(t),Y({before:c,after:"]"},l.current()))),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(t.url,Y({before:c,after:">"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,Y({before:c,after:t.title?" ":` -`},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(i.safe(t.title,Y({before:c,after:r},l.current()))),c+=l.move(r),a()),s(),c}function T3(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}N0.peek=u9;function N0(t,e,i,n){let r=T3(i),o=i.enter("emphasis"),s=i.createTracker(n),a=s.move(r);return a+=s.move(i.containerPhrasing(t,Y({before:a,after:r},s.current()))),a+=s.move(r),o(),a}function u9(t,e,i){return i.options.emphasis||"*"}function bi(t,e,i,n){let r,o,s;typeof e=="function"&&typeof i!="function"?(o=void 0,s=e,r=i):(o=e,s=i,r=n),Ps(t,o,a,r);function a(l,c){let u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return s(l,f,u)}}var f9={};function Dc(t,e){let i=e||f9,n=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,r=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return P3(t,n,r)}function P3(t,e,i){if(h9(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return E3(t.children,e,i)}return Array.isArray(t)?E3(t,e,i):""}function E3(t,e,i){let n=[],r=-1;for(;++r"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,Y({before:c,after:t.title?" ":` +`},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(i.safe(t.title,Y({before:c,after:r},l.current()))),c+=l.move(r),a()),s(),c}function T3(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}q0.peek=f9;function q0(t,e,i,n){let r=T3(i),o=i.enter("emphasis"),s=i.createTracker(n),a=s.move(r);return a+=s.move(i.containerPhrasing(t,Y({before:a,after:r},s.current()))),a+=s.move(r),o(),a}function f9(t,e,i){return i.options.emphasis||"*"}function yi(t,e,i,n){let r,o,s;typeof e=="function"&&typeof i!="function"?(o=void 0,s=e,r=i):(o=e,s=i,r=n),Cs(t,o,a,r);function a(l,c){let u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return s(l,f,u)}}var h9={};function Ic(t,e){let i=e||h9,n=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,r=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return P3(t,n,r)}function P3(t,e,i){if(d9(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return E3(t.children,e,i)}return Array.isArray(t)?E3(t,e,i):""}function E3(t,e,i){let n=[],r=-1;for(;++r"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,Y({before:c,after:t.title?" ":")"},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(i.safe(t.title,Y({before:c,after:r},l.current()))),c+=l.move(r),a()),c+=l.move(")"),s(),c}function O9(){return"!"}W0.peek=p9;function W0(t,e,i,n){let r=t.referenceType,o=i.enter("imageReference"),s=i.enter("label"),a=i.createTracker(n),l=a.move("!["),c=i.safe(t.alt,Y({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),Y({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),r==="full"||!c||c!==f?l+=a.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function p9(){return"!"}V0.peek=m9;function V0(t,e,i){let n=t.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o\u007F]/.test(t.url))}B0.peek=g9;function B0(t,e,i,n){let r=Za(i),o=r==='"'?"Quote":"Apostrophe",s=i.createTracker(n),a,l;if(Z0(t,i)){let u=i.stack;i.stack=[],a=i.enter("autolink");let f=s.move("<");return f+=s.move(i.containerPhrasing(t,Y({before:f,after:">"},s.current()))),f+=s.move(">"),a(),i.stack=u,f}a=i.enter("link"),l=i.enter("label");let c=s.move("[");return c+=s.move(i.containerPhrasing(t,Y({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=i.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(i.safe(t.url,Y({before:c,after:">"},s.current()))),c+=s.move(">")):(l=i.enter("destinationRaw"),c+=s.move(i.safe(t.url,Y({before:c,after:t.title?" ":")"},s.current())))),l(),t.title&&(l=i.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(i.safe(t.title,Y({before:c,after:r},s.current()))),c+=s.move(r),l()),c+=s.move(")"),a(),c}function g9(t,e,i){return Z0(t,i)?"<":"["}Y0.peek=b9;function Y0(t,e,i,n){let r=t.referenceType,o=i.enter("linkReference"),s=i.enter("label"),a=i.createTracker(n),l=a.move("["),c=i.containerPhrasing(t,Y({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),Y({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),r==="full"||!c||c!==f?l+=a.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function b9(){return"["}function Ba(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function _3(t){let e=Ba(t),i=t.options.bulletOther;if(!i)return e==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+i+"`) to be different");return i}function A3(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function sd(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function $3(t,e,i,n){let r=i.enter("list"),o=i.bulletCurrent,s=t.ordered?A3(i):Ba(i),a=t.ordered?s==="."?")":".":_3(i),l=e&&i.bulletLastUsed?s===i.bulletLastUsed:!1;if(!t.ordered){let u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(l=!0),sd(i)===s&&u){let f=-1;for(;++f-1?e.start:1)+(i.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=i.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=i.enter("listItem"),c=i.indentLines(i.containerFlow(t,a.current()),u);return l(),c;function u(f,d,O){return d?(O?"":" ".repeat(s))+f:(O?o:o+" ".repeat(s-o.length))+f}}function L3(t,e,i,n){let r=i.enter("paragraph"),o=i.enter("phrasing"),s=i.containerPhrasing(t,n);return o(),r(),s}var F0=or(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function I3(t,e,i,n){return(t.children.some(function(s){return F0(s)})?i.containerPhrasing:i.containerFlow).call(i,t,n)}function D3(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}H0.peek=y9;function H0(t,e,i,n){let r=D3(i),o=i.enter("strong"),s=i.createTracker(n),a=s.move(r+r);return a+=s.move(i.containerPhrasing(t,Y({before:a,after:r},s.current()))),a+=s.move(r+r),o(),a}function y9(t,e,i){return i.options.strong||"*"}function z3(t,e,i,n){return i.safe(t.value,n)}function U3(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function M3(t,e,i){let n=(sd(i)+(i.options.ruleSpaces?" ":"")).repeat(U3(i));return i.options.ruleSpaces?n.slice(0,-1):n}var zc={blockquote:b3,break:M0,code:k3,definition:S3,emphasis:N0,hardBreak:M0,heading:Q3,html:q0,image:j0,imageReference:W0,inlineCode:V0,link:B0,linkReference:Y0,list:$3,listItem:R3,paragraph:L3,root:I3,strong:H0,text:z3,thematicBreak:M3};function K0(){return{enter:{table:x9,tableData:N3,tableHeader:N3,tableRow:w9},exit:{codeText:k9,table:v9,tableData:G0,tableHeader:G0,tableRow:G0}}}function x9(t){let e=t._align;this.enter({type:"table",align:e.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function v9(t){this.exit(t),this.data.inTable=void 0}function w9(t){this.enter({type:"tableRow",children:[]},t)}function G0(t){this.exit(t)}function N3(t){this.enter({type:"tableCell",children:[]},t)}function k9(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,S9));let i=this.stack[this.stack.length-1];i.type,i.value=e,this.exit(t)}function S9(t,e){return e==="|"?e:t}function J0(t){let e=t||{},i=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`},o.current()));return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?s+" "+c:s,i.options.closeAtx&&(c+=" "+s),l(),a(),c}j0.peek=O9;function j0(t){return t.value||""}function O9(){return"<"}W0.peek=p9;function W0(t,e,i,n){let r=Za(i),o=r==='"'?"Quote":"Apostrophe",s=i.enter("image"),a=i.enter("label"),l=i.createTracker(n),c=l.move("![");return c+=l.move(i.safe(t.alt,Y({before:c,after:"]"},l.current()))),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=i.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(i.safe(t.url,Y({before:c,after:">"},l.current()))),c+=l.move(">")):(a=i.enter("destinationRaw"),c+=l.move(i.safe(t.url,Y({before:c,after:t.title?" ":")"},l.current())))),a(),t.title&&(a=i.enter(`title${o}`),c+=l.move(" "+r),c+=l.move(i.safe(t.title,Y({before:c,after:r},l.current()))),c+=l.move(r),a()),c+=l.move(")"),s(),c}function p9(){return"!"}V0.peek=m9;function V0(t,e,i,n){let r=t.referenceType,o=i.enter("imageReference"),s=i.enter("label"),a=i.createTracker(n),l=a.move("!["),c=i.safe(t.alt,Y({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),Y({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),r==="full"||!c||c!==f?l+=a.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function m9(){return"!"}Z0.peek=g9;function Z0(t,e,i){let n=t.value||"",r="`",o=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(n);)r+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++o\u007F]/.test(t.url))}Y0.peek=b9;function Y0(t,e,i,n){let r=Za(i),o=r==='"'?"Quote":"Apostrophe",s=i.createTracker(n),a,l;if(B0(t,i)){let u=i.stack;i.stack=[],a=i.enter("autolink");let f=s.move("<");return f+=s.move(i.containerPhrasing(t,Y({before:f,after:">"},s.current()))),f+=s.move(">"),a(),i.stack=u,f}a=i.enter("link"),l=i.enter("label");let c=s.move("[");return c+=s.move(i.containerPhrasing(t,Y({before:c,after:"]("},s.current()))),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=i.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(i.safe(t.url,Y({before:c,after:">"},s.current()))),c+=s.move(">")):(l=i.enter("destinationRaw"),c+=s.move(i.safe(t.url,Y({before:c,after:t.title?" ":")"},s.current())))),l(),t.title&&(l=i.enter(`title${o}`),c+=s.move(" "+r),c+=s.move(i.safe(t.title,Y({before:c,after:r},s.current()))),c+=s.move(r),l()),c+=s.move(")"),a(),c}function b9(t,e,i){return B0(t,i)?"<":"["}F0.peek=y9;function F0(t,e,i,n){let r=t.referenceType,o=i.enter("linkReference"),s=i.enter("label"),a=i.createTracker(n),l=a.move("["),c=i.containerPhrasing(t,Y({before:l,after:"]"},a.current()));l+=a.move(c+"]["),s();let u=i.stack;i.stack=[],s=i.enter("reference");let f=i.safe(i.associationId(t),Y({before:l,after:"]"},a.current()));return s(),i.stack=u,o(),r==="full"||!c||c!==f?l+=a.move(f+"]"):r==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function y9(){return"["}function Ba(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function _3(t){let e=Ba(t),i=t.options.bulletOther;if(!i)return e==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+i+"`) to be different");return i}function A3(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function ad(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function $3(t,e,i,n){let r=i.enter("list"),o=i.bulletCurrent,s=t.ordered?A3(i):Ba(i),a=t.ordered?s==="."?")":".":_3(i),l=e&&i.bulletLastUsed?s===i.bulletLastUsed:!1;if(!t.ordered){let u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(l=!0),ad(i)===s&&u){let f=-1;for(;++f-1?e.start:1)+(i.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let s=o.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);let a=i.createTracker(n);a.move(o+" ".repeat(s-o.length)),a.shift(s);let l=i.enter("listItem"),c=i.indentLines(i.containerFlow(t,a.current()),u);return l(),c;function u(f,d,O){return d?(O?"":" ".repeat(s))+f:(O?o:o+" ".repeat(s-o.length))+f}}function L3(t,e,i,n){let r=i.enter("paragraph"),o=i.enter("phrasing"),s=i.containerPhrasing(t,n);return o(),r(),s}var H0=sr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","link","linkReference","strong","text"]);function I3(t,e,i,n){return(t.children.some(function(s){return H0(s)})?i.containerPhrasing:i.containerFlow).call(i,t,n)}function D3(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}G0.peek=x9;function G0(t,e,i,n){let r=D3(i),o=i.enter("strong"),s=i.createTracker(n),a=s.move(r+r);return a+=s.move(i.containerPhrasing(t,Y({before:a,after:r},s.current()))),a+=s.move(r+r),o(),a}function x9(t,e,i){return i.options.strong||"*"}function z3(t,e,i,n){return i.safe(t.value,n)}function U3(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function M3(t,e,i){let n=(ad(i)+(i.options.ruleSpaces?" ":"")).repeat(U3(i));return i.options.ruleSpaces?n.slice(0,-1):n}var Dc={blockquote:b3,break:N0,code:k3,definition:S3,emphasis:q0,hardBreak:N0,heading:Q3,html:j0,image:W0,imageReference:V0,inlineCode:Z0,link:Y0,linkReference:F0,list:$3,listItem:R3,paragraph:L3,root:I3,strong:G0,text:z3,thematicBreak:M3};function J0(){return{enter:{table:v9,tableData:N3,tableHeader:N3,tableRow:k9},exit:{codeText:S9,table:w9,tableData:K0,tableHeader:K0,tableRow:K0}}}function v9(t){let e=t._align;this.enter({type:"table",align:e.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function w9(t){this.exit(t),this.data.inTable=void 0}function k9(t){this.enter({type:"tableRow",children:[]},t)}function K0(t){this.exit(t)}function N3(t){this.enter({type:"tableCell",children:[]},t)}function S9(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,T9));let i=this.stack[this.stack.length-1];i.type,i.value=e,this.exit(t)}function T9(t,e){return e==="|"?e:t}function eb(t){let e=t||{},i=e.tableCellPadding,n=e.tablePipeAlign,r=e.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:a}};function s(O,m,x,v){return c(u(O,x,v),O.align)}function a(O,m,x,v){let w=f(O,x,v),T=c([w]);return T.slice(0,T.indexOf(` -`))}function l(O,m,x,v){let w=x.enter("tableCell"),T=x.enter("phrasing"),A=x.containerPhrasing(O,Ee(Y({},v),{before:o,after:o}));return T(),w(),A}function c(O,m){return m3(O,{align:m,alignDelimiters:n,padding:i,stringLength:r})}function u(O,m,x){let v=O.children,w=-1,T=[],A=m.enter("table");for(;++wr?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}var A9={tokenize:I9,partial:!0},B3={tokenize:D9,partial:!0},Y3={tokenize:z9,partial:!0},F3={tokenize:U9,partial:!0},$9={tokenize:M9,partial:!0},H3={tokenize:R9,previous:K3},G3={tokenize:L9,previous:J3},_r={tokenize:X9,previous:e5},sr={};function sb(){return{text:sr}}var Qs=48;for(;Qs<123;)sr[Qs]=_r,Qs++,Qs===58?Qs=65:Qs===91&&(Qs=97);sr[43]=_r;sr[45]=_r;sr[46]=_r;sr[95]=_r;sr[72]=[_r,G3];sr[104]=[_r,G3];sr[87]=[_r,H3];sr[119]=[_r,H3];function X9(t,e,i){let n=this,r,o;return s;function s(f){return!ob(f)||!e5.call(n,n.previous)||ab(n.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return ob(f)?(t.consume(f),a):f===64?(t.consume(f),l):i(f)}function l(f){return f===46?t.check($9,u,c)(f):f===45||f===95||ad(f)?(o=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),r=!0,l}function u(f){return o&&r&&Ya(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):i(f)}}function R9(t,e,i){let n=this;return r;function r(s){return s!==87&&s!==119||!K3.call(n,n.previous)||ab(n.events)?i(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(A9,t.attempt(B3,t.attempt(Y3,o),i),i)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function L9(t,e,i){let n=this,r="",o=!1;return s;function s(f){return(f===72||f===104)&&J3.call(n,n.previous)&&!ab(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),r+=String.fromCodePoint(f),t.consume(f),a):i(f)}function a(f){if(Ya(f)&&r.length<5)return r+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let d=r.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return i(f)}function l(f){return f===47?(t.consume(f),o?c:(o=!0,l)):i(f)}function c(f){return f===null||Z3(f)||Cs(f)||Fa(f)||rb(f)?i(f):t.attempt(B3,t.attempt(Y3,u),i)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function I9(t,e,i){let n=0;return r;function r(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),r):s===46&&n===3?(t.consume(s),o):i(s)}function o(s){return s===null?i(s):e(s)}}function D9(t,e,i){let n,r,o;return s;function s(c){return c===46||c===95?t.check(F3,l,a)(c):c===null||Cs(c)||Fa(c)||c!==45&&rb(c)?l(c):(o=!0,t.consume(c),s)}function a(c){return c===95?n=!0:(r=n,n=void 0),t.consume(c),s}function l(c){return r||n||!o?i(c):e(c)}}function z9(t,e){let i=0,n=0;return r;function r(s){return s===40?(i++,t.consume(s),r):s===41&&n0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}var lpe=$o(new RegExp("\\p{P}","u")),cpe=$o(/[A-Za-z]/),upe=$o(/[\dA-Za-z]/),fpe=$o(/[#-'*+\--9=?A-Z^-~]/);var hpe=$o(/\d/),dpe=$o(/[\dA-Fa-f]/),Ope=$o(/[!-/:-@[-`{-~]/);function t5(t){return t!==null&&t<-2}function Uc(t){return t!==null&&(t<0||t===32)}function Mc(t){return t===-2||t===-1||t===32}var ppe=$o(/\s/);function $o(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Nc(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Mc(l)?(t.enter(i),a(l)):e(l)}function a(l){return Mc(l)&&o++999||f===93&&!s||f===null||f===91||Uc(f))return i(f);if(f===93){t.exit("chunkString");let d=t.exit("gfmFootnoteCallString");return r.includes(ld(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):i(f)}return Uc(f)||(s=!0),o++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),o++,c):c(f)}}function Z9(t,e,i){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):i(m)}function u(m){if(s>999||m===93&&!a||m===null||m===91||Uc(m))return i(m);if(m===93){t.exit("chunkString");let x=t.exit("gfmFootnoteDefinitionLabelString");return o=ld(n.sliceSerialize(x)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Uc(m)||(a=!0),s++,t.consume(m),m===92?f:u}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,u):u(m)}function d(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(o)||r.push(o),Nc(t,O,"gfmFootnoteDefinitionWhitespace")):i(m)}function O(m){return e(m)}}function B9(t,e,i){return t.check(lb,e,t.attempt(q9,e,i))}function Y9(t){t.exit("gfmFootnoteDefinition")}function F9(t,e,i){let n=this;return Nc(t,r,"gfmFootnoteDefinitionIndent",5);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):i(o)}}function cd(t,e,i,n){let r=t.length,o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}function ub(t){if(t===null||i5(t)||r5(t))return 1;if(n5(t))return 2}function o5(t,e,i){let n=[],r=-1;for(;++r1?l(m):(s.consume(m),f++,O);if(f<2&&!i)return l(m);let v=s.exit("strikethroughSequenceTemporary"),w=ub(m);return v._open=!w||w===2&&!!x,v._close=!x||x===2&&!!w,a(m)}}}var Ype=Ro(new RegExp("\\p{P}","u")),Fpe=Ro(/[A-Za-z]/),Hpe=Ro(/[\dA-Za-z]/),Gpe=Ro(/[#-'*+\--9=?A-Z^-~]/);var Kpe=Ro(/\d/),Jpe=Ro(/[\dA-Fa-f]/),eme=Ro(/[!-/:-@[-`{-~]/);function qc(t){return t!==null&&t<-2}function hb(t){return t!==null&&(t<0||t===32)}function Ar(t){return t===-2||t===-1||t===32}var tme=Ro(/\s/);function Ro(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ha(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Ar(l)?(t.enter(i),a(l)):e(l)}function a(l){return Ar(l)&&o++0;)i-=1,n.push(e.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),e.length=this.map[i][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}};function K9(t,e,i,n){let r=0;if(!(i===0&&n.length===0)){for(;r-1;){let de=n.events[ie][1].type;if(de==="lineEnding"||de==="linePrefix")ie--;else break}let ne=ie>-1?n.events[ie][1].type:null,re=ne==="tableHead"||ne==="tableRow"?P:l;return re===P&&n.parser.lazy[n.now().line]?i(M):re(M)}function l(M){return t.enter("tableHead"),t.enter("tableRow"),c(M)}function c(M){return M===124||(s=!0,o+=1),u(M)}function u(M){return M===null?i(M):qc(M)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),O):i(M):Ar(M)?Ha(t,u,"whitespace")(M):(o+=1,s&&(s=!1,r+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),s=!0,u):(t.enter("data"),f(M)))}function f(M){return M===null||M===124||hb(M)?(t.exit("data"),u(M)):(t.consume(M),M===92?d:f)}function d(M){return M===92||M===124?(t.consume(M),f):f(M)}function O(M){return n.interrupt=!1,n.parser.lazy[n.now().line]?i(M):(t.enter("tableDelimiterRow"),s=!1,Ar(M)?Ha(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):m(M))}function m(M){return M===45||M===58?v(M):M===124?(s=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),x):D(M)}function x(M){return Ar(M)?Ha(t,v,"whitespace")(M):v(M)}function v(M){return M===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),w):M===45?(o+=1,w(M)):M===null||qc(M)?L(M):D(M)}function w(M){return M===45?(t.enter("tableDelimiterFiller"),T(M)):D(M)}function T(M){return M===45?(t.consume(M),T):M===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),A):(t.exit("tableDelimiterFiller"),A(M))}function A(M){return Ar(M)?Ha(t,L,"whitespace")(M):L(M)}function L(M){return M===124?m(M):M===null||qc(M)?!s||r!==o?D(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(M)):D(M)}function D(M){return i(M)}function P(M){return t.enter("tableRow"),q(M)}function q(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),q):M===null||qc(M)?(t.exit("tableRow"),e(M)):Ar(M)?Ha(t,q,"whitespace")(M):(t.enter("data"),le(M))}function le(M){return M===null||M===124||hb(M)?(t.exit("data"),q(M)):(t.consume(M),M===92?G:le)}function G(M){return M===92||M===124?(t.consume(M),le):le(M)}}function eM(t,e){let i=-1,n=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,f,d=new ud;for(;++ii[2]+1){let m=i[2]+1,x=i[3]-i[2]-1;t.add(m,x,[])}}t.add(i[3]+1,0,[["exit",f,e]])}return r!==void 0&&(o.end=Object.assign({},Ga(e.events,r)),t.add(r,0,[["exit",o,e]]),o=void 0),o}function a5(t,e,i,n,r){let o=[],s=Ga(e.events,i);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(i+1,0,o)}function Ga(t,e){let i=t[e],n=i[0]==="enter"?"start":"end";return i[1][n]}var Ome=Lo(new RegExp("\\p{P}","u")),pme=Lo(/[A-Za-z]/),mme=Lo(/[\dA-Za-z]/),gme=Lo(/[#-'*+\--9=?A-Z^-~]/);var bme=Lo(/\d/),yme=Lo(/[\dA-Fa-f]/),xme=Lo(/[!-/:-@[-`{-~]/);function l5(t){return t!==null&&t<-2}function c5(t){return t!==null&&(t<0||t===32)}function jc(t){return t===-2||t===-1||t===32}var vme=Lo(/\s/);function Lo(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function u5(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return jc(l)?(t.enter(i),a(l)):e(l)}function a(l){return jc(l)&&o++r?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}var $9={tokenize:D9,partial:!0},B3={tokenize:z9,partial:!0},Y3={tokenize:U9,partial:!0},F3={tokenize:M9,partial:!0},X9={tokenize:N9,partial:!0},H3={tokenize:L9,previous:K3},G3={tokenize:I9,previous:J3},Ar={tokenize:R9,previous:e5},ar={};function ab(){return{text:ar}}var _s=48;for(;_s<123;)ar[_s]=Ar,_s++,_s===58?_s=65:_s===91&&(_s=97);ar[43]=Ar;ar[45]=Ar;ar[46]=Ar;ar[95]=Ar;ar[72]=[Ar,G3];ar[104]=[Ar,G3];ar[87]=[Ar,H3];ar[119]=[Ar,H3];function R9(t,e,i){let n=this,r,o;return s;function s(f){return!sb(f)||!e5.call(n,n.previous)||lb(n.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(f))}function a(f){return sb(f)?(t.consume(f),a):f===64?(t.consume(f),l):i(f)}function l(f){return f===46?t.check(X9,u,c)(f):f===45||f===95||ld(f)?(o=!0,t.consume(f),l):u(f)}function c(f){return t.consume(f),r=!0,l}function u(f){return o&&r&&Ya(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(f)):i(f)}}function L9(t,e,i){let n=this;return r;function r(s){return s!==87&&s!==119||!K3.call(n,n.previous)||lb(n.events)?i(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($9,t.attempt(B3,t.attempt(Y3,o),i),i)(s))}function o(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function I9(t,e,i){let n=this,r="",o=!1;return s;function s(f){return(f===72||f===104)&&J3.call(n,n.previous)&&!lb(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),r+=String.fromCodePoint(f),t.consume(f),a):i(f)}function a(f){if(Ya(f)&&r.length<5)return r+=String.fromCodePoint(f),t.consume(f),a;if(f===58){let d=r.toLowerCase();if(d==="http"||d==="https")return t.consume(f),l}return i(f)}function l(f){return f===47?(t.consume(f),o?c:(o=!0,l)):i(f)}function c(f){return f===null||Z3(f)||Qs(f)||Fa(f)||ob(f)?i(f):t.attempt(B3,t.attempt(Y3,u),i)(f)}function u(f){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(f)}}function D9(t,e,i){let n=0;return r;function r(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),r):s===46&&n===3?(t.consume(s),o):i(s)}function o(s){return s===null?i(s):e(s)}}function z9(t,e,i){let n,r,o;return s;function s(c){return c===46||c===95?t.check(F3,l,a)(c):c===null||Qs(c)||Fa(c)||c!==45&&ob(c)?l(c):(o=!0,t.consume(c),s)}function a(c){return c===95?n=!0:(r=n,n=void 0),t.consume(c),s}function l(c){return r||n||!o?i(c):e(c)}}function U9(t,e){let i=0,n=0;return r;function r(s){return s===40?(i++,t.consume(s),r):s===41&&n0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}var cpe=Xo(new RegExp("\\p{P}","u")),upe=Xo(/[A-Za-z]/),fpe=Xo(/[\dA-Za-z]/),hpe=Xo(/[#-'*+\--9=?A-Z^-~]/);var dpe=Xo(/\d/),Ope=Xo(/[\dA-Fa-f]/),ppe=Xo(/[!-/:-@[-`{-~]/);function t5(t){return t!==null&&t<-2}function zc(t){return t!==null&&(t<0||t===32)}function Uc(t){return t===-2||t===-1||t===32}var mpe=Xo(/\s/);function Xo(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Mc(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return Uc(l)?(t.enter(i),a(l)):e(l)}function a(l){return Uc(l)&&o++999||f===93&&!s||f===null||f===91||zc(f))return i(f);if(f===93){t.exit("chunkString");let d=t.exit("gfmFootnoteCallString");return r.includes(cd(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(f),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):i(f)}return zc(f)||(s=!0),o++,t.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(t.consume(f),o++,c):c(f)}}function B9(t,e,i){let n=this,r=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),o,s=0,a;return l;function l(m){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):i(m)}function u(m){if(s>999||m===93&&!a||m===null||m===91||zc(m))return i(m);if(m===93){t.exit("chunkString");let x=t.exit("gfmFootnoteDefinitionLabelString");return o=cd(n.sliceSerialize(x)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(m),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return zc(m)||(a=!0),s++,t.consume(m),m===92?f:u}function f(m){return m===91||m===92||m===93?(t.consume(m),s++,u):u(m)}function d(m){return m===58?(t.enter("definitionMarker"),t.consume(m),t.exit("definitionMarker"),r.includes(o)||r.push(o),Mc(t,O,"gfmFootnoteDefinitionWhitespace")):i(m)}function O(m){return e(m)}}function Y9(t,e,i){return t.check(cb,e,t.attempt(j9,e,i))}function F9(t){t.exit("gfmFootnoteDefinition")}function H9(t,e,i){let n=this;return Mc(t,r,"gfmFootnoteDefinitionIndent",5);function r(o){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(o):i(o)}}function ud(t,e,i,n){let r=t.length,o=0,s;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,i=i>0?i:0,n.length<1e4)s=Array.from(n),s.unshift(e,i),t.splice(...s);else for(i&&t.splice(e,i);o-1&&t.test(String.fromCharCode(i))}}function fb(t){if(t===null||i5(t)||r5(t))return 1;if(n5(t))return 2}function o5(t,e,i){let n=[],r=-1;for(;++r1?l(m):(s.consume(m),f++,O);if(f<2&&!i)return l(m);let v=s.exit("strikethroughSequenceTemporary"),w=fb(m);return v._open=!w||w===2&&!!x,v._close=!x||x===2&&!!w,a(m)}}}var Fpe=Lo(new RegExp("\\p{P}","u")),Hpe=Lo(/[A-Za-z]/),Gpe=Lo(/[\dA-Za-z]/),Kpe=Lo(/[#-'*+\--9=?A-Z^-~]/);var Jpe=Lo(/\d/),eme=Lo(/[\dA-Fa-f]/),tme=Lo(/[!-/:-@[-`{-~]/);function Nc(t){return t!==null&&t<-2}function db(t){return t!==null&&(t<0||t===32)}function $r(t){return t===-2||t===-1||t===32}var ime=Lo(/\s/);function Lo(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ha(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return $r(l)?(t.enter(i),a(l)):e(l)}function a(l){return $r(l)&&o++0;)i-=1,n.push(e.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),e.length=this.map[i][0];n.push([...e]),e.length=0;let r=n.pop();for(;r;)e.push(...r),r=n.pop();this.map.length=0}};function J9(t,e,i,n){let r=0;if(!(i===0&&n.length===0)){for(;r-1;){let de=n.events[ie][1].type;if(de==="lineEnding"||de==="linePrefix")ie--;else break}let ne=ie>-1?n.events[ie][1].type:null,re=ne==="tableHead"||ne==="tableRow"?P:l;return re===P&&n.parser.lazy[n.now().line]?i(M):re(M)}function l(M){return t.enter("tableHead"),t.enter("tableRow"),c(M)}function c(M){return M===124||(s=!0,o+=1),u(M)}function u(M){return M===null?i(M):Nc(M)?o>1?(o=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),O):i(M):$r(M)?Ha(t,u,"whitespace")(M):(o+=1,s&&(s=!1,r+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),s=!0,u):(t.enter("data"),f(M)))}function f(M){return M===null||M===124||db(M)?(t.exit("data"),u(M)):(t.consume(M),M===92?d:f)}function d(M){return M===92||M===124?(t.consume(M),f):f(M)}function O(M){return n.interrupt=!1,n.parser.lazy[n.now().line]?i(M):(t.enter("tableDelimiterRow"),s=!1,$r(M)?Ha(t,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):m(M))}function m(M){return M===45||M===58?v(M):M===124?(s=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),x):D(M)}function x(M){return $r(M)?Ha(t,v,"whitespace")(M):v(M)}function v(M){return M===58?(o+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),w):M===45?(o+=1,w(M)):M===null||Nc(M)?L(M):D(M)}function w(M){return M===45?(t.enter("tableDelimiterFiller"),T(M)):D(M)}function T(M){return M===45?(t.consume(M),T):M===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),A):(t.exit("tableDelimiterFiller"),A(M))}function A(M){return $r(M)?Ha(t,L,"whitespace")(M):L(M)}function L(M){return M===124?m(M):M===null||Nc(M)?!s||r!==o?D(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(M)):D(M)}function D(M){return i(M)}function P(M){return t.enter("tableRow"),N(M)}function N(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),N):M===null||Nc(M)?(t.exit("tableRow"),e(M)):$r(M)?Ha(t,N,"whitespace")(M):(t.enter("data"),le(M))}function le(M){return M===null||M===124||db(M)?(t.exit("data"),N(M)):(t.consume(M),M===92?H:le)}function H(M){return M===92||M===124?(t.consume(M),le):le(M)}}function tM(t,e){let i=-1,n=!0,r=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,f,d=new fd;for(;++ii[2]+1){let m=i[2]+1,x=i[3]-i[2]-1;t.add(m,x,[])}}t.add(i[3]+1,0,[["exit",f,e]])}return r!==void 0&&(o.end=Object.assign({},Ga(e.events,r)),t.add(r,0,[["exit",o,e]]),o=void 0),o}function a5(t,e,i,n,r){let o=[],s=Ga(e.events,i);r&&(r.end=Object.assign({},s),o.push(["exit",r,e])),n.end=Object.assign({},s),o.push(["exit",n,e]),t.add(i+1,0,o)}function Ga(t,e){let i=t[e],n=i[0]==="enter"?"start":"end";return i[1][n]}var pme=Io(new RegExp("\\p{P}","u")),mme=Io(/[A-Za-z]/),gme=Io(/[\dA-Za-z]/),bme=Io(/[#-'*+\--9=?A-Z^-~]/);var yme=Io(/\d/),xme=Io(/[\dA-Fa-f]/),vme=Io(/[!-/:-@[-`{-~]/);function l5(t){return t!==null&&t<-2}function c5(t){return t!==null&&(t<0||t===32)}function qc(t){return t===-2||t===-1||t===32}var wme=Io(/\s/);function Io(t){return e;function e(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function u5(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return qc(l)?(t.enter(i),a(l)):e(l)}function a(l){return qc(l)&&o++-1&&t.test(String.fromCharCode(i))}}function Wc(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return gb(l)?(t.enter(i),a(l)):e(l)}function a(l){return gb(l)&&o++-1&&t.test(String.fromCharCode(i))}}function jc(t,e,i,n){let r=n?n-1:Number.POSITIVE_INFINITY,o=0;return s;function s(l){return bb(l)?(t.enter(i),a(l)):e(l)}function a(l){return bb(l)&&o++-1&&t.test(String.fromCharCode(i))}}function pn(t){let e=[],i=-1,n=0,r=0;for(;++i55295&&o<57344){let a=t.charCodeAt(i+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(t.slice(n,i),encodeURIComponent(s)),n=i+r+1,s=""),r&&(i+=r,r=0)}return e.join("")+t.slice(n)}function x5(t,e){let i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),r=pn(n.toLowerCase()),o=t.footnoteOrder.indexOf(n),s,a=t.footnoteCounts.get(n);a===void 0?(a=0,t.footnoteOrder.push(n),s=t.footnoteOrder.length):s=o+1,a+=1,t.footnoteCounts.set(n,a);let l={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+r,id:i+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function v5(t,e){let i={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function w5(t,e){if(t.options.allowDangerousHtml){let i={type:"raw",value:e.value};return t.patch(e,i),t.applyData(e,i)}}function Od(t,e){let i=e.referenceType,n="]";if(i==="collapsed"?n+="[]":i==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];let r=t.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push({type:"text",value:n}),r}function k5(t,e){let i=String(e.identifier).toUpperCase(),n=t.definitionById.get(i);if(!n)return Od(t,e);let r={src:pn(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,o),t.applyData(e,o)}function S5(t,e){let i={src:pn(e.url)};e.alt!==null&&e.alt!==void 0&&(i.alt=e.alt),e.title!==null&&e.title!==void 0&&(i.title=e.title);let n={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,n),t.applyData(e,n)}function T5(t,e){let i={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,i);let n={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(e,n),t.applyData(e,n)}function E5(t,e){let i=String(e.identifier).toUpperCase(),n=t.definitionById.get(i);if(!n)return Od(t,e);let r={href:pn(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function P5(t,e){let i={href:pn(e.url)};e.title!==null&&e.title!==void 0&&(i.title=e.title);let n={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function C5(t,e,i){let n=t.all(e),r=i?uM(i):Q5(e),o={},s=[];if(typeof e.checked=="boolean"){let u=n[0],f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a-1&&t.test(String.fromCharCode(i))}}function mn(t){let e=[],i=-1,n=0,r=0;for(;++i55295&&o<57344){let a=t.charCodeAt(i+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),r=1):s="\uFFFD"}else s=String.fromCharCode(o);s&&(e.push(t.slice(n,i),encodeURIComponent(s)),n=i+r+1,s=""),r&&(i+=r,r=0)}return e.join("")+t.slice(n)}function x5(t,e){let i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),r=mn(n.toLowerCase()),o=t.footnoteOrder.indexOf(n),s,a=t.footnoteCounts.get(n);a===void 0?(a=0,t.footnoteOrder.push(n),s=t.footnoteOrder.length):s=o+1,a+=1,t.footnoteCounts.set(n,a);let l={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+r,id:i+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);let c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function v5(t,e){let i={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function w5(t,e){if(t.options.allowDangerousHtml){let i={type:"raw",value:e.value};return t.patch(e,i),t.applyData(e,i)}}function pd(t,e){let i=e.referenceType,n="]";if(i==="collapsed"?n+="[]":i==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];let r=t.all(e),o=r[0];o&&o.type==="text"?o.value="["+o.value:r.unshift({type:"text",value:"["});let s=r[r.length-1];return s&&s.type==="text"?s.value+=n:r.push({type:"text",value:n}),r}function k5(t,e){let i=String(e.identifier).toUpperCase(),n=t.definitionById.get(i);if(!n)return pd(t,e);let r={src:mn(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,o),t.applyData(e,o)}function S5(t,e){let i={src:mn(e.url)};e.alt!==null&&e.alt!==void 0&&(i.alt=e.alt),e.title!==null&&e.title!==void 0&&(i.title=e.title);let n={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,n),t.applyData(e,n)}function T5(t,e){let i={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,i);let n={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(e,n),t.applyData(e,n)}function E5(t,e){let i=String(e.identifier).toUpperCase(),n=t.definitionById.get(i);if(!n)return pd(t,e);let r={href:mn(n.url||"")};n.title!==null&&n.title!==void 0&&(r.title=n.title);let o={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,o),t.applyData(e,o)}function P5(t,e){let i={href:mn(e.url)};e.title!==null&&e.title!==void 0&&(i.title=e.title);let n={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function C5(t,e,i){let n=t.all(e),r=i?fM(i):Q5(e),o={},s=[];if(typeof e.checked=="boolean"){let u=n[0],f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a1:e}function _5(t,e){let i={},n=t.all(e),r=-1;for(typeof e.start=="number"&&e.start!==1&&(i.start=e.start);++r0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Vc(t){let e=mn(t),i=_s(t);if(e&&i)return{start:e,end:i}}function L5(t,e){let i=t.all(e),n=i.shift(),r=[];if(n){let s={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],s),r.push(s)}if(i.length>0){let s={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},a=mn(e.children[1]),l=_s(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}let o={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function I5(t,e,i){let n=i?i.children:void 0,o=(n?n.indexOf(e):1)===0?"th":"td",s=i&&i.type==="table"?i.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l0,!0),n[0]),r=n.index+n[0].length,n=i.exec(e);return o.push(z5(e.slice(r),r>0,!1)),o.join("")}function z5(t,e,i){let n=0,r=t.length;if(e){let o=t.codePointAt(n);for(;o===9||o===32;)n++,o=t.codePointAt(n)}if(i){let o=t.codePointAt(r-1);for(;o===9||o===32;)r--,o=t.codePointAt(r-1)}return r>n?t.slice(n,r):""}function M5(t,e){let i={type:"text",value:U5(String(e.value))};return t.patch(e,i),t.applyData(e,i)}function N5(t,e){let i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,i),t.applyData(e,i)}var q5={blockquote:p5,break:m5,code:g5,delete:b5,emphasis:y5,footnoteReference:x5,heading:v5,html:w5,imageReference:k5,image:S5,inlineCode:T5,linkReference:E5,link:P5,listItem:C5,list:_5,paragraph:A5,root:$5,strong:X5,table:L5,tableCell:D5,tableRow:I5,text:M5,thematicBreak:N5,toml:pd,yaml:pd,definition:pd,footnoteDefinition:pd};function pd(){}var j5=typeof self=="object"?self:globalThis,fM=(t,e)=>{let i=(r,o)=>(t.set(o,r),r),n=r=>{if(t.has(r))return t.get(r);let[o,s]=e[r];switch(o){case 0:case-1:return i(s,r);case 1:{let a=i([],r);for(let l of s)a.push(n(l));return a}case 2:{let a=i({},r);for(let[l,c]of s)a[n(l)]=n(c);return a}case 3:return i(new Date(s),r);case 4:{let{source:a,flags:l}=s;return i(new RegExp(a,l),r)}case 5:{let a=i(new Map,r);for(let[l,c]of s)a.set(n(l),n(c));return a}case 6:{let a=i(new Set,r);for(let l of s)a.add(n(l));return a}case 7:{let{name:a,message:l}=s;return i(new j5[a](l),r)}case 8:return i(BigInt(s),r);case"BigInt":return i(Object(BigInt(s)),r)}return i(new j5[o](s),r)};return n},kb=t=>fM(new Map,t)(0);var Ka="",{toString:hM}={},{keys:dM}=Object,Fc=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let i=hM.call(t).slice(8,-1);switch(i){case"Array":return[1,Ka];case"Object":return[2,Ka];case"Date":return[3,Ka];case"RegExp":return[4,Ka];case"Map":return[5,Ka];case"Set":return[6,Ka]}return i.includes("Array")?[1,i]:i.includes("Error")?[7,i]:[2,i]},xd=([t,e])=>t===0&&(e==="function"||e==="symbol"),OM=(t,e,i,n)=>{let r=(s,a)=>{let l=n.push(s)-1;return i.set(a,l),l},o=s=>{if(i.has(s))return i.get(s);let[a,l]=Fc(s);switch(a){case 0:{let u=s;switch(l){case"bigint":a=8,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return r([-1],s)}return r([a,u],s)}case 1:{if(l)return r([l,[...s]],s);let u=[],f=r([a,u],s);for(let d of s)u.push(o(d));return f}case 2:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let u=[],f=r([a,u],s);for(let d of dM(s))(t||!xd(Fc(s[d])))&&u.push([o(d),o(s[d])]);return f}case 3:return r([a,s.toISOString()],s);case 4:{let{source:u,flags:f}=s;return r([a,{source:u,flags:f}],s)}case 5:{let u=[],f=r([a,u],s);for(let[d,O]of s)(t||!(xd(Fc(d))||xd(Fc(O))))&&u.push([o(d),o(O)]);return f}case 6:{let u=[],f=r([a,u],s);for(let d of s)(t||!xd(Fc(d)))&&u.push(o(d));return f}}let{message:c}=s;return r([a,{name:l,message:c}],s)};return o},Sb=(t,{json:e,lossy:i}={})=>{let n=[];return OM(!(e||i),!!e,new Map,n)(t),n};var Dn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?kb(Sb(t,e)):structuredClone(t):(t,e)=>kb(Sb(t,e));function pM(t,e){let i=[{type:"text",value:"\u21A9"}];return e>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),i}function mM(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function W5(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||pM,n=t.options.footnoteBackLabel||mM,r=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l0&&m.push({type:"text",value:" "});let T=typeof i=="string"?i:i(l,O);typeof T=="string"&&(T={type:"text",value:T}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,O),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){let T=v.children[v.children.length-1];T&&T.type==="text"?T.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else u.push(...m);let w={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:Ee(Y({},Dn(s)),{id:"footnote-label"}),children:[{type:"text",value:r}]},{type:"text",value:` +`});let c={type:"element",tagName:"li",properties:o,children:s};return t.patch(e,c),t.applyData(e,c)}function fM(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let i=t.children,n=-1;for(;!e&&++n1:e}function _5(t,e){let i={},n=t.all(e),r=-1;for(typeof e.start=="number"&&e.start!==1&&(i.start=e.start);++r0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function Wc(t){let e=gn(t),i=As(t);if(e&&i)return{start:e,end:i}}function L5(t,e){let i=t.all(e),n=i.shift(),r=[];if(n){let s={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],s),r.push(s)}if(i.length>0){let s={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},a=gn(e.children[1]),l=As(e.children[e.children.length-1]);a&&l&&(s.position={start:a,end:l}),r.push(s)}let o={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,o),t.applyData(e,o)}function I5(t,e,i){let n=i?i.children:void 0,o=(n?n.indexOf(e):1)===0?"th":"td",s=i&&i.type==="table"?i.align:void 0,a=s?s.length:e.children.length,l=-1,c=[];for(;++l0,!0),n[0]),r=n.index+n[0].length,n=i.exec(e);return o.push(z5(e.slice(r),r>0,!1)),o.join("")}function z5(t,e,i){let n=0,r=t.length;if(e){let o=t.codePointAt(n);for(;o===9||o===32;)n++,o=t.codePointAt(n)}if(i){let o=t.codePointAt(r-1);for(;o===9||o===32;)r--,o=t.codePointAt(r-1)}return r>n?t.slice(n,r):""}function M5(t,e){let i={type:"text",value:U5(String(e.value))};return t.patch(e,i),t.applyData(e,i)}function N5(t,e){let i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,i),t.applyData(e,i)}var q5={blockquote:p5,break:m5,code:g5,delete:b5,emphasis:y5,footnoteReference:x5,heading:v5,html:w5,imageReference:k5,image:S5,inlineCode:T5,linkReference:E5,link:P5,listItem:C5,list:_5,paragraph:A5,root:$5,strong:X5,table:L5,tableCell:D5,tableRow:I5,text:M5,thematicBreak:N5,toml:md,yaml:md,definition:md,footnoteDefinition:md};function md(){}var j5=typeof self=="object"?self:globalThis,hM=(t,e)=>{let i=(r,o)=>(t.set(o,r),r),n=r=>{if(t.has(r))return t.get(r);let[o,s]=e[r];switch(o){case 0:case-1:return i(s,r);case 1:{let a=i([],r);for(let l of s)a.push(n(l));return a}case 2:{let a=i({},r);for(let[l,c]of s)a[n(l)]=n(c);return a}case 3:return i(new Date(s),r);case 4:{let{source:a,flags:l}=s;return i(new RegExp(a,l),r)}case 5:{let a=i(new Map,r);for(let[l,c]of s)a.set(n(l),n(c));return a}case 6:{let a=i(new Set,r);for(let l of s)a.add(n(l));return a}case 7:{let{name:a,message:l}=s;return i(new j5[a](l),r)}case 8:return i(BigInt(s),r);case"BigInt":return i(Object(BigInt(s)),r)}return i(new j5[o](s),r)};return n},Sb=t=>hM(new Map,t)(0);var Ka="",{toString:dM}={},{keys:OM}=Object,Yc=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let i=dM.call(t).slice(8,-1);switch(i){case"Array":return[1,Ka];case"Object":return[2,Ka];case"Date":return[3,Ka];case"RegExp":return[4,Ka];case"Map":return[5,Ka];case"Set":return[6,Ka]}return i.includes("Array")?[1,i]:i.includes("Error")?[7,i]:[2,i]},vd=([t,e])=>t===0&&(e==="function"||e==="symbol"),pM=(t,e,i,n)=>{let r=(s,a)=>{let l=n.push(s)-1;return i.set(a,l),l},o=s=>{if(i.has(s))return i.get(s);let[a,l]=Yc(s);switch(a){case 0:{let u=s;switch(l){case"bigint":a=8,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return r([-1],s)}return r([a,u],s)}case 1:{if(l)return r([l,[...s]],s);let u=[],f=r([a,u],s);for(let d of s)u.push(o(d));return f}case 2:{if(l)switch(l){case"BigInt":return r([l,s.toString()],s);case"Boolean":case"Number":case"String":return r([l,s.valueOf()],s)}if(e&&"toJSON"in s)return o(s.toJSON());let u=[],f=r([a,u],s);for(let d of OM(s))(t||!vd(Yc(s[d])))&&u.push([o(d),o(s[d])]);return f}case 3:return r([a,s.toISOString()],s);case 4:{let{source:u,flags:f}=s;return r([a,{source:u,flags:f}],s)}case 5:{let u=[],f=r([a,u],s);for(let[d,O]of s)(t||!(vd(Yc(d))||vd(Yc(O))))&&u.push([o(d),o(O)]);return f}case 6:{let u=[],f=r([a,u],s);for(let d of s)(t||!vd(Yc(d)))&&u.push(o(d));return f}}let{message:c}=s;return r([a,{name:l,message:c}],s)};return o},Tb=(t,{json:e,lossy:i}={})=>{let n=[];return pM(!(e||i),!!e,new Map,n)(t),n};var zn=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Sb(Tb(t,e)):structuredClone(t):(t,e)=>Sb(Tb(t,e));function mM(t,e){let i=[{type:"text",value:"\u21A9"}];return e>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),i}function gM(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function W5(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||mM,n=t.options.footnoteBackLabel||gM,r=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},a=[],l=-1;for(;++l0&&m.push({type:"text",value:" "});let T=typeof i=="string"?i:i(l,O);typeof T=="string"&&(T={type:"text",value:T}),m.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,O),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}let v=u[u.length-1];if(v&&v.type==="element"&&v.tagName==="p"){let T=v.children[v.children.length-1];T&&T.type==="text"?T.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else u.push(...m);let w={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,w),a.push(w)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:Ee(Y({},zn(s)),{id:"footnote-label"}),children:[{type:"text",value:r}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:t.wrap(a,!0)},{type:"text",value:` -`}]}}var Tb={}.hasOwnProperty,gM={};function Z5(t,e){let i=e||gM,n=new Map,r=new Map,o=new Map,s=Y(Y({},q5),i.handlers),a={all:c,applyData:yM,definitionById:n,footnoteById:r,footnoteCounts:o,footnoteOrder:[],handlers:s,one:l,options:i,patch:bM,wrap:vM};return bi(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){let f=u.type==="definition"?n:r,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),a;function l(u,f){let d=u.type,O=a.handlers[d];if(Tb.call(a.handlers,d)&&O)return O(a,u,f);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in u){let x=u,{children:v}=x,w=mi(x,["children"]),T=Dn(w);return T.children=a.all(u),T}return Dn(u)}return(a.options.unknownHandler||xM)(a,u,f)}function c(u){let f=[];if("children"in u){let d=u.children,O=-1;for(;++O0&&i.push({type:"text",value:` -`}),i}function V5(t){let e=0,i=t.charCodeAt(e);for(;i===9||i===32;)e++,i=t.charCodeAt(e);return t.slice(e)}function vd(t,e){let i=Z5(t,e),n=i.one(t,void 0),r=W5(i),o=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return r&&("children"in o,o.children.push({type:"text",value:` -`},r)),o}function wd(t,e){return t&&"run"in t?async function(i,n){let r=vd(i,Y({file:n},e));await t.run(r,n)}:function(i,n){return vd(i,Y({file:n},t||e))}}var Xr=class{constructor(e,i,n){this.property=e,this.normal=i,n&&(this.space=n)}};Xr.prototype.property={};Xr.prototype.normal={};Xr.prototype.space=null;function Eb(t,e){let i={},n={},r=-1;for(;++rDe,booleanish:()=>It,commaOrSpaceSeparated:()=>Ni,commaSeparated:()=>zo,number:()=>me,overloadedBoolean:()=>Pb,spaceSeparated:()=>ut});var wM=0,De=As(),It=As(),Pb=As(),me=As(),ut=As(),zo=As(),Ni=As();function As(){return 2**++wM}var Cb=Object.keys(Hc),$s=class extends yi{constructor(e,i,n,r){let o=-1;if(super(e,i),B5(this,"space",r),typeof n=="number")for(;++o4&&i.slice(0,4)==="data"&&SM.test(e)){if(e.charAt(4)==="-"){let o=e.slice(5).replace(H5,PM);n="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=e.slice(4);if(!H5.test(o)){let s=o.replace(TM,EM);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}r=$s}return new r(n,e)}function EM(t){return"-"+t.toLowerCase()}function PM(t){return t.charAt(1).toUpperCase()}var Ir=Eb([_b,Qb,Ab,$b,Y5],"html"),bn=Eb([_b,Qb,Ab,$b,F5],"svg");function Xb(t){let e=[],i=String(t||""),n=i.indexOf(","),r=0,o=!1;for(;!o;){n===-1&&(n=i.length,o=!0);let s=i.slice(r,n).trim();(s||!o)&&e.push(s),r=n+1,n=i.indexOf(",",r)}return e}function Td(t,e){let i=e||{};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}var G5=/[#.]/g;function Rb(t,e){let i=t||"",n={},r=0,o,s;for(;r-1&&oo)return{line:s+1,column:o-(s>0?i[s-1]:0)+1,offset:o}}}function r(o){let s=o&&o.line,a=o&&o.column;if(typeof s=="number"&&typeof a=="number"&&!Number.isNaN(s)&&!Number.isNaN(a)&&s-1 in i){let l=(i[s-2]||0)+a-1||0;if(l>-1&&l=55296&&t<=57343}function r4(t){return t>=56320&&t<=57343}function o4(t,e){return(t-55296)*1024+9216+e}function _d(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function Ad(t){return t>=64976&&t<=65007||VM.has(t)}var ee;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ee=ee||(ee={}));var BM=65536,$d=class{constructor(e){this.handler=e,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=BM,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e){let{line:i,col:n,offset:r}=this;return{code:e,startLine:i,endLine:i,startCol:n,endCol:n,startOffset:r,endOffset:r}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let i=this.html.charCodeAt(this.pos+1);if(r4(i))return this.pos++,this._addGap(),o4(e,i)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(ee.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,i){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=i}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,i){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(i)return this.html.startsWith(e,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let n=this.html.charCodeAt(i);return n===_.CARRIAGE_RETURN?_.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;let e=this.html.charCodeAt(this.pos);return e===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):e===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Qd(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===_.LINE_FEED||e===_.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){_d(e)?this._err(ee.controlCharacterInInputStream):Ad(e)&&this._err(ee.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.posYe,getTokenAttr:()=>eu});var Ye;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(Ye=Ye||(Ye={}));function eu(t,e){for(let i=t.attrs.length-1;i>=0;i--)if(t.attrs[i].name===e)return t.attrs[i].value;return null}var ar=new Uint16Array('\u1D41<\xD5\u0131\u028A\u049D\u057B\u05D0\u0675\u06DE\u07A2\u07D6\u080F\u0A4A\u0A91\u0DA1\u0E6D\u0F09\u0F26\u10CA\u1228\u12E1\u1415\u149D\u14C3\u14DF\u1525\0\0\0\0\0\0\u156B\u16CD\u198D\u1C12\u1DDD\u1F7E\u2060\u21B0\u228D\u23C0\u23FB\u2442\u2824\u2912\u2D08\u2E48\u2FCE\u3016\u32BA\u3639\u37AC\u38FE\u3A28\u3A71\u3AE0\u3B2E\u0800EMabcfglmnoprstu\\bfms\x7F\x84\x8B\x90\x95\x98\xA6\xB3\xB9\xC8\xCFlig\u803B\xC6\u40C6P\u803B&\u4026cute\u803B\xC1\u40C1reve;\u4102\u0100iyx}rc\u803B\xC2\u40C2;\u4410r;\uC000\u{1D504}rave\u803B\xC0\u40C0pha;\u4391acr;\u4100d;\u6A53\u0100gp\x9D\xA1on;\u4104f;\uC000\u{1D538}plyFunction;\u6061ing\u803B\xC5\u40C5\u0100cs\xBE\xC3r;\uC000\u{1D49C}ign;\u6254ilde\u803B\xC3\u40C3ml\u803B\xC4\u40C4\u0400aceforsu\xE5\xFB\xFE\u0117\u011C\u0122\u0127\u012A\u0100cr\xEA\xF2kslash;\u6216\u0176\xF6\xF8;\u6AE7ed;\u6306y;\u4411\u0180crt\u0105\u010B\u0114ause;\u6235noullis;\u612Ca;\u4392r;\uC000\u{1D505}pf;\uC000\u{1D539}eve;\u42D8c\xF2\u0113mpeq;\u624E\u0700HOacdefhilorsu\u014D\u0151\u0156\u0180\u019E\u01A2\u01B5\u01B7\u01BA\u01DC\u0215\u0273\u0278\u027Ecy;\u4427PY\u803B\xA9\u40A9\u0180cpy\u015D\u0162\u017Aute;\u4106\u0100;i\u0167\u0168\u62D2talDifferentialD;\u6145leys;\u612D\u0200aeio\u0189\u018E\u0194\u0198ron;\u410Cdil\u803B\xC7\u40C7rc;\u4108nint;\u6230ot;\u410A\u0100dn\u01A7\u01ADilla;\u40B8terDot;\u40B7\xF2\u017Fi;\u43A7rcle\u0200DMPT\u01C7\u01CB\u01D1\u01D6ot;\u6299inus;\u6296lus;\u6295imes;\u6297o\u0100cs\u01E2\u01F8kwiseContourIntegral;\u6232eCurly\u0100DQ\u0203\u020FoubleQuote;\u601Duote;\u6019\u0200lnpu\u021E\u0228\u0247\u0255on\u0100;e\u0225\u0226\u6237;\u6A74\u0180git\u022F\u0236\u023Aruent;\u6261nt;\u622FourIntegral;\u622E\u0100fr\u024C\u024E;\u6102oduct;\u6210nterClockwiseContourIntegral;\u6233oss;\u6A2Fcr;\uC000\u{1D49E}p\u0100;C\u0284\u0285\u62D3ap;\u624D\u0580DJSZacefios\u02A0\u02AC\u02B0\u02B4\u02B8\u02CB\u02D7\u02E1\u02E6\u0333\u048D\u0100;o\u0179\u02A5trahd;\u6911cy;\u4402cy;\u4405cy;\u440F\u0180grs\u02BF\u02C4\u02C7ger;\u6021r;\u61A1hv;\u6AE4\u0100ay\u02D0\u02D5ron;\u410E;\u4414l\u0100;t\u02DD\u02DE\u6207a;\u4394r;\uC000\u{1D507}\u0100af\u02EB\u0327\u0100cm\u02F0\u0322ritical\u0200ADGT\u0300\u0306\u0316\u031Ccute;\u40B4o\u0174\u030B\u030D;\u42D9bleAcute;\u42DDrave;\u4060ilde;\u42DCond;\u62C4ferentialD;\u6146\u0470\u033D\0\0\0\u0342\u0354\0\u0405f;\uC000\u{1D53B}\u0180;DE\u0348\u0349\u034D\u40A8ot;\u60DCqual;\u6250ble\u0300CDLRUV\u0363\u0372\u0382\u03CF\u03E2\u03F8ontourIntegra\xEC\u0239o\u0274\u0379\0\0\u037B\xBB\u0349nArrow;\u61D3\u0100eo\u0387\u03A4ft\u0180ART\u0390\u0396\u03A1rrow;\u61D0ightArrow;\u61D4e\xE5\u02CAng\u0100LR\u03AB\u03C4eft\u0100AR\u03B3\u03B9rrow;\u67F8ightArrow;\u67FAightArrow;\u67F9ight\u0100AT\u03D8\u03DErrow;\u61D2ee;\u62A8p\u0241\u03E9\0\0\u03EFrrow;\u61D1ownArrow;\u61D5erticalBar;\u6225n\u0300ABLRTa\u0412\u042A\u0430\u045E\u047F\u037Crrow\u0180;BU\u041D\u041E\u0422\u6193ar;\u6913pArrow;\u61F5reve;\u4311eft\u02D2\u043A\0\u0446\0\u0450ightVector;\u6950eeVector;\u695Eector\u0100;B\u0459\u045A\u61BDar;\u6956ight\u01D4\u0467\0\u0471eeVector;\u695Fector\u0100;B\u047A\u047B\u61C1ar;\u6957ee\u0100;A\u0486\u0487\u62A4rrow;\u61A7\u0100ct\u0492\u0497r;\uC000\u{1D49F}rok;\u4110\u0800NTacdfglmopqstux\u04BD\u04C0\u04C4\u04CB\u04DE\u04E2\u04E7\u04EE\u04F5\u0521\u052F\u0536\u0552\u055D\u0560\u0565G;\u414AH\u803B\xD0\u40D0cute\u803B\xC9\u40C9\u0180aiy\u04D2\u04D7\u04DCron;\u411Arc\u803B\xCA\u40CA;\u442Dot;\u4116r;\uC000\u{1D508}rave\u803B\xC8\u40C8ement;\u6208\u0100ap\u04FA\u04FEcr;\u4112ty\u0253\u0506\0\0\u0512mallSquare;\u65FBerySmallSquare;\u65AB\u0100gp\u0526\u052Aon;\u4118f;\uC000\u{1D53C}silon;\u4395u\u0100ai\u053C\u0549l\u0100;T\u0542\u0543\u6A75ilde;\u6242librium;\u61CC\u0100ci\u0557\u055Ar;\u6130m;\u6A73a;\u4397ml\u803B\xCB\u40CB\u0100ip\u056A\u056Fsts;\u6203onentialE;\u6147\u0280cfios\u0585\u0588\u058D\u05B2\u05CCy;\u4424r;\uC000\u{1D509}lled\u0253\u0597\0\0\u05A3mallSquare;\u65FCerySmallSquare;\u65AA\u0370\u05BA\0\u05BF\0\0\u05C4f;\uC000\u{1D53D}All;\u6200riertrf;\u6131c\xF2\u05CB\u0600JTabcdfgorst\u05E8\u05EC\u05EF\u05FA\u0600\u0612\u0616\u061B\u061D\u0623\u066C\u0672cy;\u4403\u803B>\u403Emma\u0100;d\u05F7\u05F8\u4393;\u43DCreve;\u411E\u0180eiy\u0607\u060C\u0610dil;\u4122rc;\u411C;\u4413ot;\u4120r;\uC000\u{1D50A};\u62D9pf;\uC000\u{1D53E}eater\u0300EFGLST\u0635\u0644\u064E\u0656\u065B\u0666qual\u0100;L\u063E\u063F\u6265ess;\u62DBullEqual;\u6267reater;\u6AA2ess;\u6277lantEqual;\u6A7Eilde;\u6273cr;\uC000\u{1D4A2};\u626B\u0400Aacfiosu\u0685\u068B\u0696\u069B\u069E\u06AA\u06BE\u06CARDcy;\u442A\u0100ct\u0690\u0694ek;\u42C7;\u405Eirc;\u4124r;\u610ClbertSpace;\u610B\u01F0\u06AF\0\u06B2f;\u610DizontalLine;\u6500\u0100ct\u06C3\u06C5\xF2\u06A9rok;\u4126mp\u0144\u06D0\u06D8ownHum\xF0\u012Fqual;\u624F\u0700EJOacdfgmnostu\u06FA\u06FE\u0703\u0707\u070E\u071A\u071E\u0721\u0728\u0744\u0778\u078B\u078F\u0795cy;\u4415lig;\u4132cy;\u4401cute\u803B\xCD\u40CD\u0100iy\u0713\u0718rc\u803B\xCE\u40CE;\u4418ot;\u4130r;\u6111rave\u803B\xCC\u40CC\u0180;ap\u0720\u072F\u073F\u0100cg\u0734\u0737r;\u412AinaryI;\u6148lie\xF3\u03DD\u01F4\u0749\0\u0762\u0100;e\u074D\u074E\u622C\u0100gr\u0753\u0758ral;\u622Bsection;\u62C2isible\u0100CT\u076C\u0772omma;\u6063imes;\u6062\u0180gpt\u077F\u0783\u0788on;\u412Ef;\uC000\u{1D540}a;\u4399cr;\u6110ilde;\u4128\u01EB\u079A\0\u079Ecy;\u4406l\u803B\xCF\u40CF\u0280cfosu\u07AC\u07B7\u07BC\u07C2\u07D0\u0100iy\u07B1\u07B5rc;\u4134;\u4419r;\uC000\u{1D50D}pf;\uC000\u{1D541}\u01E3\u07C7\0\u07CCr;\uC000\u{1D4A5}rcy;\u4408kcy;\u4404\u0380HJacfos\u07E4\u07E8\u07EC\u07F1\u07FD\u0802\u0808cy;\u4425cy;\u440Cppa;\u439A\u0100ey\u07F6\u07FBdil;\u4136;\u441Ar;\uC000\u{1D50E}pf;\uC000\u{1D542}cr;\uC000\u{1D4A6}\u0580JTaceflmost\u0825\u0829\u082C\u0850\u0863\u09B3\u09B8\u09C7\u09CD\u0A37\u0A47cy;\u4409\u803B<\u403C\u0280cmnpr\u0837\u083C\u0841\u0844\u084Dute;\u4139bda;\u439Bg;\u67EAlacetrf;\u6112r;\u619E\u0180aey\u0857\u085C\u0861ron;\u413Ddil;\u413B;\u441B\u0100fs\u0868\u0970t\u0500ACDFRTUVar\u087E\u08A9\u08B1\u08E0\u08E6\u08FC\u092F\u095B\u0390\u096A\u0100nr\u0883\u088FgleBracket;\u67E8row\u0180;BR\u0899\u089A\u089E\u6190ar;\u61E4ightArrow;\u61C6eiling;\u6308o\u01F5\u08B7\0\u08C3bleBracket;\u67E6n\u01D4\u08C8\0\u08D2eeVector;\u6961ector\u0100;B\u08DB\u08DC\u61C3ar;\u6959loor;\u630Aight\u0100AV\u08EF\u08F5rrow;\u6194ector;\u694E\u0100er\u0901\u0917e\u0180;AV\u0909\u090A\u0910\u62A3rrow;\u61A4ector;\u695Aiangle\u0180;BE\u0924\u0925\u0929\u62B2ar;\u69CFqual;\u62B4p\u0180DTV\u0937\u0942\u094CownVector;\u6951eeVector;\u6960ector\u0100;B\u0956\u0957\u61BFar;\u6958ector\u0100;B\u0965\u0966\u61BCar;\u6952ight\xE1\u039Cs\u0300EFGLST\u097E\u098B\u0995\u099D\u09A2\u09ADqualGreater;\u62DAullEqual;\u6266reater;\u6276ess;\u6AA1lantEqual;\u6A7Dilde;\u6272r;\uC000\u{1D50F}\u0100;e\u09BD\u09BE\u62D8ftarrow;\u61DAidot;\u413F\u0180npw\u09D4\u0A16\u0A1Bg\u0200LRlr\u09DE\u09F7\u0A02\u0A10eft\u0100AR\u09E6\u09ECrrow;\u67F5ightArrow;\u67F7ightArrow;\u67F6eft\u0100ar\u03B3\u0A0Aight\xE1\u03BFight\xE1\u03CAf;\uC000\u{1D543}er\u0100LR\u0A22\u0A2CeftArrow;\u6199ightArrow;\u6198\u0180cht\u0A3E\u0A40\u0A42\xF2\u084C;\u61B0rok;\u4141;\u626A\u0400acefiosu\u0A5A\u0A5D\u0A60\u0A77\u0A7C\u0A85\u0A8B\u0A8Ep;\u6905y;\u441C\u0100dl\u0A65\u0A6FiumSpace;\u605Flintrf;\u6133r;\uC000\u{1D510}nusPlus;\u6213pf;\uC000\u{1D544}c\xF2\u0A76;\u439C\u0480Jacefostu\u0AA3\u0AA7\u0AAD\u0AC0\u0B14\u0B19\u0D91\u0D97\u0D9Ecy;\u440Acute;\u4143\u0180aey\u0AB4\u0AB9\u0ABEron;\u4147dil;\u4145;\u441D\u0180gsw\u0AC7\u0AF0\u0B0Eative\u0180MTV\u0AD3\u0ADF\u0AE8ediumSpace;\u600Bhi\u0100cn\u0AE6\u0AD8\xEB\u0AD9eryThi\xEE\u0AD9ted\u0100GL\u0AF8\u0B06reaterGreate\xF2\u0673essLes\xF3\u0A48Line;\u400Ar;\uC000\u{1D511}\u0200Bnpt\u0B22\u0B28\u0B37\u0B3Areak;\u6060BreakingSpace;\u40A0f;\u6115\u0680;CDEGHLNPRSTV\u0B55\u0B56\u0B6A\u0B7C\u0BA1\u0BEB\u0C04\u0C5E\u0C84\u0CA6\u0CD8\u0D61\u0D85\u6AEC\u0100ou\u0B5B\u0B64ngruent;\u6262pCap;\u626DoubleVerticalBar;\u6226\u0180lqx\u0B83\u0B8A\u0B9Bement;\u6209ual\u0100;T\u0B92\u0B93\u6260ilde;\uC000\u2242\u0338ists;\u6204reater\u0380;EFGLST\u0BB6\u0BB7\u0BBD\u0BC9\u0BD3\u0BD8\u0BE5\u626Fqual;\u6271ullEqual;\uC000\u2267\u0338reater;\uC000\u226B\u0338ess;\u6279lantEqual;\uC000\u2A7E\u0338ilde;\u6275ump\u0144\u0BF2\u0BFDownHump;\uC000\u224E\u0338qual;\uC000\u224F\u0338e\u0100fs\u0C0A\u0C27tTriangle\u0180;BE\u0C1A\u0C1B\u0C21\u62EAar;\uC000\u29CF\u0338qual;\u62ECs\u0300;EGLST\u0C35\u0C36\u0C3C\u0C44\u0C4B\u0C58\u626Equal;\u6270reater;\u6278ess;\uC000\u226A\u0338lantEqual;\uC000\u2A7D\u0338ilde;\u6274ested\u0100GL\u0C68\u0C79reaterGreater;\uC000\u2AA2\u0338essLess;\uC000\u2AA1\u0338recedes\u0180;ES\u0C92\u0C93\u0C9B\u6280qual;\uC000\u2AAF\u0338lantEqual;\u62E0\u0100ei\u0CAB\u0CB9verseElement;\u620CghtTriangle\u0180;BE\u0CCB\u0CCC\u0CD2\u62EBar;\uC000\u29D0\u0338qual;\u62ED\u0100qu\u0CDD\u0D0CuareSu\u0100bp\u0CE8\u0CF9set\u0100;E\u0CF0\u0CF3\uC000\u228F\u0338qual;\u62E2erset\u0100;E\u0D03\u0D06\uC000\u2290\u0338qual;\u62E3\u0180bcp\u0D13\u0D24\u0D4Eset\u0100;E\u0D1B\u0D1E\uC000\u2282\u20D2qual;\u6288ceeds\u0200;EST\u0D32\u0D33\u0D3B\u0D46\u6281qual;\uC000\u2AB0\u0338lantEqual;\u62E1ilde;\uC000\u227F\u0338erset\u0100;E\u0D58\u0D5B\uC000\u2283\u20D2qual;\u6289ilde\u0200;EFT\u0D6E\u0D6F\u0D75\u0D7F\u6241qual;\u6244ullEqual;\u6247ilde;\u6249erticalBar;\u6224cr;\uC000\u{1D4A9}ilde\u803B\xD1\u40D1;\u439D\u0700Eacdfgmoprstuv\u0DBD\u0DC2\u0DC9\u0DD5\u0DDB\u0DE0\u0DE7\u0DFC\u0E02\u0E20\u0E22\u0E32\u0E3F\u0E44lig;\u4152cute\u803B\xD3\u40D3\u0100iy\u0DCE\u0DD3rc\u803B\xD4\u40D4;\u441Eblac;\u4150r;\uC000\u{1D512}rave\u803B\xD2\u40D2\u0180aei\u0DEE\u0DF2\u0DF6cr;\u414Cga;\u43A9cron;\u439Fpf;\uC000\u{1D546}enCurly\u0100DQ\u0E0E\u0E1AoubleQuote;\u601Cuote;\u6018;\u6A54\u0100cl\u0E27\u0E2Cr;\uC000\u{1D4AA}ash\u803B\xD8\u40D8i\u016C\u0E37\u0E3Cde\u803B\xD5\u40D5es;\u6A37ml\u803B\xD6\u40D6er\u0100BP\u0E4B\u0E60\u0100ar\u0E50\u0E53r;\u603Eac\u0100ek\u0E5A\u0E5C;\u63DEet;\u63B4arenthesis;\u63DC\u0480acfhilors\u0E7F\u0E87\u0E8A\u0E8F\u0E92\u0E94\u0E9D\u0EB0\u0EFCrtialD;\u6202y;\u441Fr;\uC000\u{1D513}i;\u43A6;\u43A0usMinus;\u40B1\u0100ip\u0EA2\u0EADncareplan\xE5\u069Df;\u6119\u0200;eio\u0EB9\u0EBA\u0EE0\u0EE4\u6ABBcedes\u0200;EST\u0EC8\u0EC9\u0ECF\u0EDA\u627Aqual;\u6AAFlantEqual;\u627Cilde;\u627Eme;\u6033\u0100dp\u0EE9\u0EEEuct;\u620Fortion\u0100;a\u0225\u0EF9l;\u621D\u0100ci\u0F01\u0F06r;\uC000\u{1D4AB};\u43A8\u0200Ufos\u0F11\u0F16\u0F1B\u0F1FOT\u803B"\u4022r;\uC000\u{1D514}pf;\u611Acr;\uC000\u{1D4AC}\u0600BEacefhiorsu\u0F3E\u0F43\u0F47\u0F60\u0F73\u0FA7\u0FAA\u0FAD\u1096\u10A9\u10B4\u10BEarr;\u6910G\u803B\xAE\u40AE\u0180cnr\u0F4E\u0F53\u0F56ute;\u4154g;\u67EBr\u0100;t\u0F5C\u0F5D\u61A0l;\u6916\u0180aey\u0F67\u0F6C\u0F71ron;\u4158dil;\u4156;\u4420\u0100;v\u0F78\u0F79\u611Cerse\u0100EU\u0F82\u0F99\u0100lq\u0F87\u0F8Eement;\u620Builibrium;\u61CBpEquilibrium;\u696Fr\xBB\u0F79o;\u43A1ght\u0400ACDFTUVa\u0FC1\u0FEB\u0FF3\u1022\u1028\u105B\u1087\u03D8\u0100nr\u0FC6\u0FD2gleBracket;\u67E9row\u0180;BL\u0FDC\u0FDD\u0FE1\u6192ar;\u61E5eftArrow;\u61C4eiling;\u6309o\u01F5\u0FF9\0\u1005bleBracket;\u67E7n\u01D4\u100A\0\u1014eeVector;\u695Dector\u0100;B\u101D\u101E\u61C2ar;\u6955loor;\u630B\u0100er\u102D\u1043e\u0180;AV\u1035\u1036\u103C\u62A2rrow;\u61A6ector;\u695Biangle\u0180;BE\u1050\u1051\u1055\u62B3ar;\u69D0qual;\u62B5p\u0180DTV\u1063\u106E\u1078ownVector;\u694FeeVector;\u695Cector\u0100;B\u1082\u1083\u61BEar;\u6954ector\u0100;B\u1091\u1092\u61C0ar;\u6953\u0100pu\u109B\u109Ef;\u611DndImplies;\u6970ightarrow;\u61DB\u0100ch\u10B9\u10BCr;\u611B;\u61B1leDelayed;\u69F4\u0680HOacfhimoqstu\u10E4\u10F1\u10F7\u10FD\u1119\u111E\u1151\u1156\u1161\u1167\u11B5\u11BB\u11BF\u0100Cc\u10E9\u10EEHcy;\u4429y;\u4428FTcy;\u442Ccute;\u415A\u0280;aeiy\u1108\u1109\u110E\u1113\u1117\u6ABCron;\u4160dil;\u415Erc;\u415C;\u4421r;\uC000\u{1D516}ort\u0200DLRU\u112A\u1134\u113E\u1149ownArrow\xBB\u041EeftArrow\xBB\u089AightArrow\xBB\u0FDDpArrow;\u6191gma;\u43A3allCircle;\u6218pf;\uC000\u{1D54A}\u0272\u116D\0\0\u1170t;\u621Aare\u0200;ISU\u117B\u117C\u1189\u11AF\u65A1ntersection;\u6293u\u0100bp\u118F\u119Eset\u0100;E\u1197\u1198\u628Fqual;\u6291erset\u0100;E\u11A8\u11A9\u6290qual;\u6292nion;\u6294cr;\uC000\u{1D4AE}ar;\u62C6\u0200bcmp\u11C8\u11DB\u1209\u120B\u0100;s\u11CD\u11CE\u62D0et\u0100;E\u11CD\u11D5qual;\u6286\u0100ch\u11E0\u1205eeds\u0200;EST\u11ED\u11EE\u11F4\u11FF\u627Bqual;\u6AB0lantEqual;\u627Dilde;\u627FTh\xE1\u0F8C;\u6211\u0180;es\u1212\u1213\u1223\u62D1rset\u0100;E\u121C\u121D\u6283qual;\u6287et\xBB\u1213\u0580HRSacfhiors\u123E\u1244\u1249\u1255\u125E\u1271\u1276\u129F\u12C2\u12C8\u12D1ORN\u803B\xDE\u40DEADE;\u6122\u0100Hc\u124E\u1252cy;\u440By;\u4426\u0100bu\u125A\u125C;\u4009;\u43A4\u0180aey\u1265\u126A\u126Fron;\u4164dil;\u4162;\u4422r;\uC000\u{1D517}\u0100ei\u127B\u1289\u01F2\u1280\0\u1287efore;\u6234a;\u4398\u0100cn\u128E\u1298kSpace;\uC000\u205F\u200ASpace;\u6009lde\u0200;EFT\u12AB\u12AC\u12B2\u12BC\u623Cqual;\u6243ullEqual;\u6245ilde;\u6248pf;\uC000\u{1D54B}ipleDot;\u60DB\u0100ct\u12D6\u12DBr;\uC000\u{1D4AF}rok;\u4166\u0AE1\u12F7\u130E\u131A\u1326\0\u132C\u1331\0\0\0\0\0\u1338\u133D\u1377\u1385\0\u13FF\u1404\u140A\u1410\u0100cr\u12FB\u1301ute\u803B\xDA\u40DAr\u0100;o\u1307\u1308\u619Fcir;\u6949r\u01E3\u1313\0\u1316y;\u440Eve;\u416C\u0100iy\u131E\u1323rc\u803B\xDB\u40DB;\u4423blac;\u4170r;\uC000\u{1D518}rave\u803B\xD9\u40D9acr;\u416A\u0100di\u1341\u1369er\u0100BP\u1348\u135D\u0100ar\u134D\u1350r;\u405Fac\u0100ek\u1357\u1359;\u63DFet;\u63B5arenthesis;\u63DDon\u0100;P\u1370\u1371\u62C3lus;\u628E\u0100gp\u137B\u137Fon;\u4172f;\uC000\u{1D54C}\u0400ADETadps\u1395\u13AE\u13B8\u13C4\u03E8\u13D2\u13D7\u13F3rrow\u0180;BD\u1150\u13A0\u13A4ar;\u6912ownArrow;\u61C5ownArrow;\u6195quilibrium;\u696Eee\u0100;A\u13CB\u13CC\u62A5rrow;\u61A5own\xE1\u03F3er\u0100LR\u13DE\u13E8eftArrow;\u6196ightArrow;\u6197i\u0100;l\u13F9\u13FA\u43D2on;\u43A5ing;\u416Ecr;\uC000\u{1D4B0}ilde;\u4168ml\u803B\xDC\u40DC\u0480Dbcdefosv\u1427\u142C\u1430\u1433\u143E\u1485\u148A\u1490\u1496ash;\u62ABar;\u6AEBy;\u4412ash\u0100;l\u143B\u143C\u62A9;\u6AE6\u0100er\u1443\u1445;\u62C1\u0180bty\u144C\u1450\u147Aar;\u6016\u0100;i\u144F\u1455cal\u0200BLST\u1461\u1465\u146A\u1474ar;\u6223ine;\u407Ceparator;\u6758ilde;\u6240ThinSpace;\u600Ar;\uC000\u{1D519}pf;\uC000\u{1D54D}cr;\uC000\u{1D4B1}dash;\u62AA\u0280cefos\u14A7\u14AC\u14B1\u14B6\u14BCirc;\u4174dge;\u62C0r;\uC000\u{1D51A}pf;\uC000\u{1D54E}cr;\uC000\u{1D4B2}\u0200fios\u14CB\u14D0\u14D2\u14D8r;\uC000\u{1D51B};\u439Epf;\uC000\u{1D54F}cr;\uC000\u{1D4B3}\u0480AIUacfosu\u14F1\u14F5\u14F9\u14FD\u1504\u150F\u1514\u151A\u1520cy;\u442Fcy;\u4407cy;\u442Ecute\u803B\xDD\u40DD\u0100iy\u1509\u150Drc;\u4176;\u442Br;\uC000\u{1D51C}pf;\uC000\u{1D550}cr;\uC000\u{1D4B4}ml;\u4178\u0400Hacdefos\u1535\u1539\u153F\u154B\u154F\u155D\u1560\u1564cy;\u4416cute;\u4179\u0100ay\u1544\u1549ron;\u417D;\u4417ot;\u417B\u01F2\u1554\0\u155BoWidt\xE8\u0AD9a;\u4396r;\u6128pf;\u6124cr;\uC000\u{1D4B5}\u0BE1\u1583\u158A\u1590\0\u15B0\u15B6\u15BF\0\0\0\0\u15C6\u15DB\u15EB\u165F\u166D\0\u1695\u169B\u16B2\u16B9\0\u16BEcute\u803B\xE1\u40E1reve;\u4103\u0300;Ediuy\u159C\u159D\u15A1\u15A3\u15A8\u15AD\u623E;\uC000\u223E\u0333;\u623Frc\u803B\xE2\u40E2te\u80BB\xB4\u0306;\u4430lig\u803B\xE6\u40E6\u0100;r\xB2\u15BA;\uC000\u{1D51E}rave\u803B\xE0\u40E0\u0100ep\u15CA\u15D6\u0100fp\u15CF\u15D4sym;\u6135\xE8\u15D3ha;\u43B1\u0100ap\u15DFc\u0100cl\u15E4\u15E7r;\u4101g;\u6A3F\u0264\u15F0\0\0\u160A\u0280;adsv\u15FA\u15FB\u15FF\u1601\u1607\u6227nd;\u6A55;\u6A5Clope;\u6A58;\u6A5A\u0380;elmrsz\u1618\u1619\u161B\u161E\u163F\u164F\u1659\u6220;\u69A4e\xBB\u1619sd\u0100;a\u1625\u1626\u6221\u0461\u1630\u1632\u1634\u1636\u1638\u163A\u163C\u163E;\u69A8;\u69A9;\u69AA;\u69AB;\u69AC;\u69AD;\u69AE;\u69AFt\u0100;v\u1645\u1646\u621Fb\u0100;d\u164C\u164D\u62BE;\u699D\u0100pt\u1654\u1657h;\u6222\xBB\xB9arr;\u637C\u0100gp\u1663\u1667on;\u4105f;\uC000\u{1D552}\u0380;Eaeiop\u12C1\u167B\u167D\u1682\u1684\u1687\u168A;\u6A70cir;\u6A6F;\u624Ad;\u624Bs;\u4027rox\u0100;e\u12C1\u1692\xF1\u1683ing\u803B\xE5\u40E5\u0180cty\u16A1\u16A6\u16A8r;\uC000\u{1D4B6};\u402Amp\u0100;e\u12C1\u16AF\xF1\u0288ilde\u803B\xE3\u40E3ml\u803B\xE4\u40E4\u0100ci\u16C2\u16C8onin\xF4\u0272nt;\u6A11\u0800Nabcdefiklnoprsu\u16ED\u16F1\u1730\u173C\u1743\u1748\u1778\u177D\u17E0\u17E6\u1839\u1850\u170D\u193D\u1948\u1970ot;\u6AED\u0100cr\u16F6\u171Ek\u0200ceps\u1700\u1705\u170D\u1713ong;\u624Cpsilon;\u43F6rime;\u6035im\u0100;e\u171A\u171B\u623Dq;\u62CD\u0176\u1722\u1726ee;\u62BDed\u0100;g\u172C\u172D\u6305e\xBB\u172Drk\u0100;t\u135C\u1737brk;\u63B6\u0100oy\u1701\u1741;\u4431quo;\u601E\u0280cmprt\u1753\u175B\u1761\u1764\u1768aus\u0100;e\u010A\u0109ptyv;\u69B0s\xE9\u170Cno\xF5\u0113\u0180ahw\u176F\u1771\u1773;\u43B2;\u6136een;\u626Cr;\uC000\u{1D51F}g\u0380costuvw\u178D\u179D\u17B3\u17C1\u17D5\u17DB\u17DE\u0180aiu\u1794\u1796\u179A\xF0\u0760rc;\u65EFp\xBB\u1371\u0180dpt\u17A4\u17A8\u17ADot;\u6A00lus;\u6A01imes;\u6A02\u0271\u17B9\0\0\u17BEcup;\u6A06ar;\u6605riangle\u0100du\u17CD\u17D2own;\u65BDp;\u65B3plus;\u6A04e\xE5\u1444\xE5\u14ADarow;\u690D\u0180ako\u17ED\u1826\u1835\u0100cn\u17F2\u1823k\u0180lst\u17FA\u05AB\u1802ozenge;\u69EBriangle\u0200;dlr\u1812\u1813\u1818\u181D\u65B4own;\u65BEeft;\u65C2ight;\u65B8k;\u6423\u01B1\u182B\0\u1833\u01B2\u182F\0\u1831;\u6592;\u65914;\u6593ck;\u6588\u0100eo\u183E\u184D\u0100;q\u1843\u1846\uC000=\u20E5uiv;\uC000\u2261\u20E5t;\u6310\u0200ptwx\u1859\u185E\u1867\u186Cf;\uC000\u{1D553}\u0100;t\u13CB\u1863om\xBB\u13CCtie;\u62C8\u0600DHUVbdhmptuv\u1885\u1896\u18AA\u18BB\u18D7\u18DB\u18EC\u18FF\u1905\u190A\u1910\u1921\u0200LRlr\u188E\u1890\u1892\u1894;\u6557;\u6554;\u6556;\u6553\u0280;DUdu\u18A1\u18A2\u18A4\u18A6\u18A8\u6550;\u6566;\u6569;\u6564;\u6567\u0200LRlr\u18B3\u18B5\u18B7\u18B9;\u655D;\u655A;\u655C;\u6559\u0380;HLRhlr\u18CA\u18CB\u18CD\u18CF\u18D1\u18D3\u18D5\u6551;\u656C;\u6563;\u6560;\u656B;\u6562;\u655Fox;\u69C9\u0200LRlr\u18E4\u18E6\u18E8\u18EA;\u6555;\u6552;\u6510;\u650C\u0280;DUdu\u06BD\u18F7\u18F9\u18FB\u18FD;\u6565;\u6568;\u652C;\u6534inus;\u629Flus;\u629Eimes;\u62A0\u0200LRlr\u1919\u191B\u191D\u191F;\u655B;\u6558;\u6518;\u6514\u0380;HLRhlr\u1930\u1931\u1933\u1935\u1937\u1939\u193B\u6502;\u656A;\u6561;\u655E;\u653C;\u6524;\u651C\u0100ev\u0123\u1942bar\u803B\xA6\u40A6\u0200ceio\u1951\u1956\u195A\u1960r;\uC000\u{1D4B7}mi;\u604Fm\u0100;e\u171A\u171Cl\u0180;bh\u1968\u1969\u196B\u405C;\u69C5sub;\u67C8\u016C\u1974\u197El\u0100;e\u1979\u197A\u6022t\xBB\u197Ap\u0180;Ee\u012F\u1985\u1987;\u6AAE\u0100;q\u06DC\u06DB\u0CE1\u19A7\0\u19E8\u1A11\u1A15\u1A32\0\u1A37\u1A50\0\0\u1AB4\0\0\u1AC1\0\0\u1B21\u1B2E\u1B4D\u1B52\0\u1BFD\0\u1C0C\u0180cpr\u19AD\u19B2\u19DDute;\u4107\u0300;abcds\u19BF\u19C0\u19C4\u19CA\u19D5\u19D9\u6229nd;\u6A44rcup;\u6A49\u0100au\u19CF\u19D2p;\u6A4Bp;\u6A47ot;\u6A40;\uC000\u2229\uFE00\u0100eo\u19E2\u19E5t;\u6041\xEE\u0693\u0200aeiu\u19F0\u19FB\u1A01\u1A05\u01F0\u19F5\0\u19F8s;\u6A4Don;\u410Ddil\u803B\xE7\u40E7rc;\u4109ps\u0100;s\u1A0C\u1A0D\u6A4Cm;\u6A50ot;\u410B\u0180dmn\u1A1B\u1A20\u1A26il\u80BB\xB8\u01ADptyv;\u69B2t\u8100\xA2;e\u1A2D\u1A2E\u40A2r\xE4\u01B2r;\uC000\u{1D520}\u0180cei\u1A3D\u1A40\u1A4Dy;\u4447ck\u0100;m\u1A47\u1A48\u6713ark\xBB\u1A48;\u43C7r\u0380;Ecefms\u1A5F\u1A60\u1A62\u1A6B\u1AA4\u1AAA\u1AAE\u65CB;\u69C3\u0180;el\u1A69\u1A6A\u1A6D\u42C6q;\u6257e\u0261\u1A74\0\0\u1A88rrow\u0100lr\u1A7C\u1A81eft;\u61BAight;\u61BB\u0280RSacd\u1A92\u1A94\u1A96\u1A9A\u1A9F\xBB\u0F47;\u64C8st;\u629Birc;\u629Aash;\u629Dnint;\u6A10id;\u6AEFcir;\u69C2ubs\u0100;u\u1ABB\u1ABC\u6663it\xBB\u1ABC\u02EC\u1AC7\u1AD4\u1AFA\0\u1B0Aon\u0100;e\u1ACD\u1ACE\u403A\u0100;q\xC7\xC6\u026D\u1AD9\0\0\u1AE2a\u0100;t\u1ADE\u1ADF\u402C;\u4040\u0180;fl\u1AE8\u1AE9\u1AEB\u6201\xEE\u1160e\u0100mx\u1AF1\u1AF6ent\xBB\u1AE9e\xF3\u024D\u01E7\u1AFE\0\u1B07\u0100;d\u12BB\u1B02ot;\u6A6Dn\xF4\u0246\u0180fry\u1B10\u1B14\u1B17;\uC000\u{1D554}o\xE4\u0254\u8100\xA9;s\u0155\u1B1Dr;\u6117\u0100ao\u1B25\u1B29rr;\u61B5ss;\u6717\u0100cu\u1B32\u1B37r;\uC000\u{1D4B8}\u0100bp\u1B3C\u1B44\u0100;e\u1B41\u1B42\u6ACF;\u6AD1\u0100;e\u1B49\u1B4A\u6AD0;\u6AD2dot;\u62EF\u0380delprvw\u1B60\u1B6C\u1B77\u1B82\u1BAC\u1BD4\u1BF9arr\u0100lr\u1B68\u1B6A;\u6938;\u6935\u0270\u1B72\0\0\u1B75r;\u62DEc;\u62DFarr\u0100;p\u1B7F\u1B80\u61B6;\u693D\u0300;bcdos\u1B8F\u1B90\u1B96\u1BA1\u1BA5\u1BA8\u622Arcap;\u6A48\u0100au\u1B9B\u1B9Ep;\u6A46p;\u6A4Aot;\u628Dr;\u6A45;\uC000\u222A\uFE00\u0200alrv\u1BB5\u1BBF\u1BDE\u1BE3rr\u0100;m\u1BBC\u1BBD\u61B7;\u693Cy\u0180evw\u1BC7\u1BD4\u1BD8q\u0270\u1BCE\0\0\u1BD2re\xE3\u1B73u\xE3\u1B75ee;\u62CEedge;\u62CFen\u803B\xA4\u40A4earrow\u0100lr\u1BEE\u1BF3eft\xBB\u1B80ight\xBB\u1BBDe\xE4\u1BDD\u0100ci\u1C01\u1C07onin\xF4\u01F7nt;\u6231lcty;\u632D\u0980AHabcdefhijlorstuwz\u1C38\u1C3B\u1C3F\u1C5D\u1C69\u1C75\u1C8A\u1C9E\u1CAC\u1CB7\u1CFB\u1CFF\u1D0D\u1D7B\u1D91\u1DAB\u1DBB\u1DC6\u1DCDr\xF2\u0381ar;\u6965\u0200glrs\u1C48\u1C4D\u1C52\u1C54ger;\u6020eth;\u6138\xF2\u1133h\u0100;v\u1C5A\u1C5B\u6010\xBB\u090A\u016B\u1C61\u1C67arow;\u690Fa\xE3\u0315\u0100ay\u1C6E\u1C73ron;\u410F;\u4434\u0180;ao\u0332\u1C7C\u1C84\u0100gr\u02BF\u1C81r;\u61CAtseq;\u6A77\u0180glm\u1C91\u1C94\u1C98\u803B\xB0\u40B0ta;\u43B4ptyv;\u69B1\u0100ir\u1CA3\u1CA8sht;\u697F;\uC000\u{1D521}ar\u0100lr\u1CB3\u1CB5\xBB\u08DC\xBB\u101E\u0280aegsv\u1CC2\u0378\u1CD6\u1CDC\u1CE0m\u0180;os\u0326\u1CCA\u1CD4nd\u0100;s\u0326\u1CD1uit;\u6666amma;\u43DDin;\u62F2\u0180;io\u1CE7\u1CE8\u1CF8\u40F7de\u8100\xF7;o\u1CE7\u1CF0ntimes;\u62C7n\xF8\u1CF7cy;\u4452c\u026F\u1D06\0\0\u1D0Arn;\u631Eop;\u630D\u0280lptuw\u1D18\u1D1D\u1D22\u1D49\u1D55lar;\u4024f;\uC000\u{1D555}\u0280;emps\u030B\u1D2D\u1D37\u1D3D\u1D42q\u0100;d\u0352\u1D33ot;\u6251inus;\u6238lus;\u6214quare;\u62A1blebarwedg\xE5\xFAn\u0180adh\u112E\u1D5D\u1D67ownarrow\xF3\u1C83arpoon\u0100lr\u1D72\u1D76ef\xF4\u1CB4igh\xF4\u1CB6\u0162\u1D7F\u1D85karo\xF7\u0F42\u026F\u1D8A\0\0\u1D8Ern;\u631Fop;\u630C\u0180cot\u1D98\u1DA3\u1DA6\u0100ry\u1D9D\u1DA1;\uC000\u{1D4B9};\u4455l;\u69F6rok;\u4111\u0100dr\u1DB0\u1DB4ot;\u62F1i\u0100;f\u1DBA\u1816\u65BF\u0100ah\u1DC0\u1DC3r\xF2\u0429a\xF2\u0FA6angle;\u69A6\u0100ci\u1DD2\u1DD5y;\u445Fgrarr;\u67FF\u0900Dacdefglmnopqrstux\u1E01\u1E09\u1E19\u1E38\u0578\u1E3C\u1E49\u1E61\u1E7E\u1EA5\u1EAF\u1EBD\u1EE1\u1F2A\u1F37\u1F44\u1F4E\u1F5A\u0100Do\u1E06\u1D34o\xF4\u1C89\u0100cs\u1E0E\u1E14ute\u803B\xE9\u40E9ter;\u6A6E\u0200aioy\u1E22\u1E27\u1E31\u1E36ron;\u411Br\u0100;c\u1E2D\u1E2E\u6256\u803B\xEA\u40EAlon;\u6255;\u444Dot;\u4117\u0100Dr\u1E41\u1E45ot;\u6252;\uC000\u{1D522}\u0180;rs\u1E50\u1E51\u1E57\u6A9Aave\u803B\xE8\u40E8\u0100;d\u1E5C\u1E5D\u6A96ot;\u6A98\u0200;ils\u1E6A\u1E6B\u1E72\u1E74\u6A99nters;\u63E7;\u6113\u0100;d\u1E79\u1E7A\u6A95ot;\u6A97\u0180aps\u1E85\u1E89\u1E97cr;\u4113ty\u0180;sv\u1E92\u1E93\u1E95\u6205et\xBB\u1E93p\u01001;\u1E9D\u1EA4\u0133\u1EA1\u1EA3;\u6004;\u6005\u6003\u0100gs\u1EAA\u1EAC;\u414Bp;\u6002\u0100gp\u1EB4\u1EB8on;\u4119f;\uC000\u{1D556}\u0180als\u1EC4\u1ECE\u1ED2r\u0100;s\u1ECA\u1ECB\u62D5l;\u69E3us;\u6A71i\u0180;lv\u1EDA\u1EDB\u1EDF\u43B5on\xBB\u1EDB;\u43F5\u0200csuv\u1EEA\u1EF3\u1F0B\u1F23\u0100io\u1EEF\u1E31rc\xBB\u1E2E\u0269\u1EF9\0\0\u1EFB\xED\u0548ant\u0100gl\u1F02\u1F06tr\xBB\u1E5Dess\xBB\u1E7A\u0180aei\u1F12\u1F16\u1F1Als;\u403Dst;\u625Fv\u0100;D\u0235\u1F20D;\u6A78parsl;\u69E5\u0100Da\u1F2F\u1F33ot;\u6253rr;\u6971\u0180cdi\u1F3E\u1F41\u1EF8r;\u612Fo\xF4\u0352\u0100ah\u1F49\u1F4B;\u43B7\u803B\xF0\u40F0\u0100mr\u1F53\u1F57l\u803B\xEB\u40EBo;\u60AC\u0180cip\u1F61\u1F64\u1F67l;\u4021s\xF4\u056E\u0100eo\u1F6C\u1F74ctatio\xEE\u0559nential\xE5\u0579\u09E1\u1F92\0\u1F9E\0\u1FA1\u1FA7\0\0\u1FC6\u1FCC\0\u1FD3\0\u1FE6\u1FEA\u2000\0\u2008\u205Allingdotse\xF1\u1E44y;\u4444male;\u6640\u0180ilr\u1FAD\u1FB3\u1FC1lig;\u8000\uFB03\u0269\u1FB9\0\0\u1FBDg;\u8000\uFB00ig;\u8000\uFB04;\uC000\u{1D523}lig;\u8000\uFB01lig;\uC000fj\u0180alt\u1FD9\u1FDC\u1FE1t;\u666Dig;\u8000\uFB02ns;\u65B1of;\u4192\u01F0\u1FEE\0\u1FF3f;\uC000\u{1D557}\u0100ak\u05BF\u1FF7\u0100;v\u1FFC\u1FFD\u62D4;\u6AD9artint;\u6A0D\u0100ao\u200C\u2055\u0100cs\u2011\u2052\u03B1\u201A\u2030\u2038\u2045\u2048\0\u2050\u03B2\u2022\u2025\u2027\u202A\u202C\0\u202E\u803B\xBD\u40BD;\u6153\u803B\xBC\u40BC;\u6155;\u6159;\u615B\u01B3\u2034\0\u2036;\u6154;\u6156\u02B4\u203E\u2041\0\0\u2043\u803B\xBE\u40BE;\u6157;\u615C5;\u6158\u01B6\u204C\0\u204E;\u615A;\u615D8;\u615El;\u6044wn;\u6322cr;\uC000\u{1D4BB}\u0880Eabcdefgijlnorstv\u2082\u2089\u209F\u20A5\u20B0\u20B4\u20F0\u20F5\u20FA\u20FF\u2103\u2112\u2138\u0317\u213E\u2152\u219E\u0100;l\u064D\u2087;\u6A8C\u0180cmp\u2090\u2095\u209Dute;\u41F5ma\u0100;d\u209C\u1CDA\u43B3;\u6A86reve;\u411F\u0100iy\u20AA\u20AErc;\u411D;\u4433ot;\u4121\u0200;lqs\u063E\u0642\u20BD\u20C9\u0180;qs\u063E\u064C\u20C4lan\xF4\u0665\u0200;cdl\u0665\u20D2\u20D5\u20E5c;\u6AA9ot\u0100;o\u20DC\u20DD\u6A80\u0100;l\u20E2\u20E3\u6A82;\u6A84\u0100;e\u20EA\u20ED\uC000\u22DB\uFE00s;\u6A94r;\uC000\u{1D524}\u0100;g\u0673\u061Bmel;\u6137cy;\u4453\u0200;Eaj\u065A\u210C\u210E\u2110;\u6A92;\u6AA5;\u6AA4\u0200Eaes\u211B\u211D\u2129\u2134;\u6269p\u0100;p\u2123\u2124\u6A8Arox\xBB\u2124\u0100;q\u212E\u212F\u6A88\u0100;q\u212E\u211Bim;\u62E7pf;\uC000\u{1D558}\u0100ci\u2143\u2146r;\u610Am\u0180;el\u066B\u214E\u2150;\u6A8E;\u6A90\u8300>;cdlqr\u05EE\u2160\u216A\u216E\u2173\u2179\u0100ci\u2165\u2167;\u6AA7r;\u6A7Aot;\u62D7Par;\u6995uest;\u6A7C\u0280adels\u2184\u216A\u2190\u0656\u219B\u01F0\u2189\0\u218Epro\xF8\u209Er;\u6978q\u0100lq\u063F\u2196les\xF3\u2088i\xED\u066B\u0100en\u21A3\u21ADrtneqq;\uC000\u2269\uFE00\xC5\u21AA\u0500Aabcefkosy\u21C4\u21C7\u21F1\u21F5\u21FA\u2218\u221D\u222F\u2268\u227Dr\xF2\u03A0\u0200ilmr\u21D0\u21D4\u21D7\u21DBrs\xF0\u1484f\xBB\u2024il\xF4\u06A9\u0100dr\u21E0\u21E4cy;\u444A\u0180;cw\u08F4\u21EB\u21EFir;\u6948;\u61ADar;\u610Firc;\u4125\u0180alr\u2201\u220E\u2213rts\u0100;u\u2209\u220A\u6665it\xBB\u220Alip;\u6026con;\u62B9r;\uC000\u{1D525}s\u0100ew\u2223\u2229arow;\u6925arow;\u6926\u0280amopr\u223A\u223E\u2243\u225E\u2263rr;\u61FFtht;\u623Bk\u0100lr\u2249\u2253eftarrow;\u61A9ightarrow;\u61AAf;\uC000\u{1D559}bar;\u6015\u0180clt\u226F\u2274\u2278r;\uC000\u{1D4BD}as\xE8\u21F4rok;\u4127\u0100bp\u2282\u2287ull;\u6043hen\xBB\u1C5B\u0AE1\u22A3\0\u22AA\0\u22B8\u22C5\u22CE\0\u22D5\u22F3\0\0\u22F8\u2322\u2367\u2362\u237F\0\u2386\u23AA\u23B4cute\u803B\xED\u40ED\u0180;iy\u0771\u22B0\u22B5rc\u803B\xEE\u40EE;\u4438\u0100cx\u22BC\u22BFy;\u4435cl\u803B\xA1\u40A1\u0100fr\u039F\u22C9;\uC000\u{1D526}rave\u803B\xEC\u40EC\u0200;ino\u073E\u22DD\u22E9\u22EE\u0100in\u22E2\u22E6nt;\u6A0Ct;\u622Dfin;\u69DCta;\u6129lig;\u4133\u0180aop\u22FE\u231A\u231D\u0180cgt\u2305\u2308\u2317r;\u412B\u0180elp\u071F\u230F\u2313in\xE5\u078Ear\xF4\u0720h;\u4131f;\u62B7ed;\u41B5\u0280;cfot\u04F4\u232C\u2331\u233D\u2341are;\u6105in\u0100;t\u2338\u2339\u621Eie;\u69DDdo\xF4\u2319\u0280;celp\u0757\u234C\u2350\u235B\u2361al;\u62BA\u0100gr\u2355\u2359er\xF3\u1563\xE3\u234Darhk;\u6A17rod;\u6A3C\u0200cgpt\u236F\u2372\u2376\u237By;\u4451on;\u412Ff;\uC000\u{1D55A}a;\u43B9uest\u803B\xBF\u40BF\u0100ci\u238A\u238Fr;\uC000\u{1D4BE}n\u0280;Edsv\u04F4\u239B\u239D\u23A1\u04F3;\u62F9ot;\u62F5\u0100;v\u23A6\u23A7\u62F4;\u62F3\u0100;i\u0777\u23AElde;\u4129\u01EB\u23B8\0\u23BCcy;\u4456l\u803B\xEF\u40EF\u0300cfmosu\u23CC\u23D7\u23DC\u23E1\u23E7\u23F5\u0100iy\u23D1\u23D5rc;\u4135;\u4439r;\uC000\u{1D527}ath;\u4237pf;\uC000\u{1D55B}\u01E3\u23EC\0\u23F1r;\uC000\u{1D4BF}rcy;\u4458kcy;\u4454\u0400acfghjos\u240B\u2416\u2422\u2427\u242D\u2431\u2435\u243Bppa\u0100;v\u2413\u2414\u43BA;\u43F0\u0100ey\u241B\u2420dil;\u4137;\u443Ar;\uC000\u{1D528}reen;\u4138cy;\u4445cy;\u445Cpf;\uC000\u{1D55C}cr;\uC000\u{1D4C0}\u0B80ABEHabcdefghjlmnoprstuv\u2470\u2481\u2486\u248D\u2491\u250E\u253D\u255A\u2580\u264E\u265E\u2665\u2679\u267D\u269A\u26B2\u26D8\u275D\u2768\u278B\u27C0\u2801\u2812\u0180art\u2477\u247A\u247Cr\xF2\u09C6\xF2\u0395ail;\u691Barr;\u690E\u0100;g\u0994\u248B;\u6A8Bar;\u6962\u0963\u24A5\0\u24AA\0\u24B1\0\0\0\0\0\u24B5\u24BA\0\u24C6\u24C8\u24CD\0\u24F9ute;\u413Amptyv;\u69B4ra\xEE\u084Cbda;\u43BBg\u0180;dl\u088E\u24C1\u24C3;\u6991\xE5\u088E;\u6A85uo\u803B\xAB\u40ABr\u0400;bfhlpst\u0899\u24DE\u24E6\u24E9\u24EB\u24EE\u24F1\u24F5\u0100;f\u089D\u24E3s;\u691Fs;\u691D\xEB\u2252p;\u61ABl;\u6939im;\u6973l;\u61A2\u0180;ae\u24FF\u2500\u2504\u6AABil;\u6919\u0100;s\u2509\u250A\u6AAD;\uC000\u2AAD\uFE00\u0180abr\u2515\u2519\u251Drr;\u690Crk;\u6772\u0100ak\u2522\u252Cc\u0100ek\u2528\u252A;\u407B;\u405B\u0100es\u2531\u2533;\u698Bl\u0100du\u2539\u253B;\u698F;\u698D\u0200aeuy\u2546\u254B\u2556\u2558ron;\u413E\u0100di\u2550\u2554il;\u413C\xEC\u08B0\xE2\u2529;\u443B\u0200cqrs\u2563\u2566\u256D\u257Da;\u6936uo\u0100;r\u0E19\u1746\u0100du\u2572\u2577har;\u6967shar;\u694Bh;\u61B2\u0280;fgqs\u258B\u258C\u0989\u25F3\u25FF\u6264t\u0280ahlrt\u2598\u25A4\u25B7\u25C2\u25E8rrow\u0100;t\u0899\u25A1a\xE9\u24F6arpoon\u0100du\u25AF\u25B4own\xBB\u045Ap\xBB\u0966eftarrows;\u61C7ight\u0180ahs\u25CD\u25D6\u25DErrow\u0100;s\u08F4\u08A7arpoon\xF3\u0F98quigarro\xF7\u21F0hreetimes;\u62CB\u0180;qs\u258B\u0993\u25FAlan\xF4\u09AC\u0280;cdgs\u09AC\u260A\u260D\u261D\u2628c;\u6AA8ot\u0100;o\u2614\u2615\u6A7F\u0100;r\u261A\u261B\u6A81;\u6A83\u0100;e\u2622\u2625\uC000\u22DA\uFE00s;\u6A93\u0280adegs\u2633\u2639\u263D\u2649\u264Bppro\xF8\u24C6ot;\u62D6q\u0100gq\u2643\u2645\xF4\u0989gt\xF2\u248C\xF4\u099Bi\xED\u09B2\u0180ilr\u2655\u08E1\u265Asht;\u697C;\uC000\u{1D529}\u0100;E\u099C\u2663;\u6A91\u0161\u2669\u2676r\u0100du\u25B2\u266E\u0100;l\u0965\u2673;\u696Alk;\u6584cy;\u4459\u0280;acht\u0A48\u2688\u268B\u2691\u2696r\xF2\u25C1orne\xF2\u1D08ard;\u696Bri;\u65FA\u0100io\u269F\u26A4dot;\u4140ust\u0100;a\u26AC\u26AD\u63B0che\xBB\u26AD\u0200Eaes\u26BB\u26BD\u26C9\u26D4;\u6268p\u0100;p\u26C3\u26C4\u6A89rox\xBB\u26C4\u0100;q\u26CE\u26CF\u6A87\u0100;q\u26CE\u26BBim;\u62E6\u0400abnoptwz\u26E9\u26F4\u26F7\u271A\u272F\u2741\u2747\u2750\u0100nr\u26EE\u26F1g;\u67ECr;\u61FDr\xEB\u08C1g\u0180lmr\u26FF\u270D\u2714eft\u0100ar\u09E6\u2707ight\xE1\u09F2apsto;\u67FCight\xE1\u09FDparrow\u0100lr\u2725\u2729ef\xF4\u24EDight;\u61AC\u0180afl\u2736\u2739\u273Dr;\u6985;\uC000\u{1D55D}us;\u6A2Dimes;\u6A34\u0161\u274B\u274Fst;\u6217\xE1\u134E\u0180;ef\u2757\u2758\u1800\u65CAnge\xBB\u2758ar\u0100;l\u2764\u2765\u4028t;\u6993\u0280achmt\u2773\u2776\u277C\u2785\u2787r\xF2\u08A8orne\xF2\u1D8Car\u0100;d\u0F98\u2783;\u696D;\u600Eri;\u62BF\u0300achiqt\u2798\u279D\u0A40\u27A2\u27AE\u27BBquo;\u6039r;\uC000\u{1D4C1}m\u0180;eg\u09B2\u27AA\u27AC;\u6A8D;\u6A8F\u0100bu\u252A\u27B3o\u0100;r\u0E1F\u27B9;\u601Arok;\u4142\u8400<;cdhilqr\u082B\u27D2\u2639\u27DC\u27E0\u27E5\u27EA\u27F0\u0100ci\u27D7\u27D9;\u6AA6r;\u6A79re\xE5\u25F2mes;\u62C9arr;\u6976uest;\u6A7B\u0100Pi\u27F5\u27F9ar;\u6996\u0180;ef\u2800\u092D\u181B\u65C3r\u0100du\u2807\u280Dshar;\u694Ahar;\u6966\u0100en\u2817\u2821rtneqq;\uC000\u2268\uFE00\xC5\u281E\u0700Dacdefhilnopsu\u2840\u2845\u2882\u288E\u2893\u28A0\u28A5\u28A8\u28DA\u28E2\u28E4\u0A83\u28F3\u2902Dot;\u623A\u0200clpr\u284E\u2852\u2863\u287Dr\u803B\xAF\u40AF\u0100et\u2857\u2859;\u6642\u0100;e\u285E\u285F\u6720se\xBB\u285F\u0100;s\u103B\u2868to\u0200;dlu\u103B\u2873\u2877\u287Bow\xEE\u048Cef\xF4\u090F\xF0\u13D1ker;\u65AE\u0100oy\u2887\u288Cmma;\u6A29;\u443Cash;\u6014asuredangle\xBB\u1626r;\uC000\u{1D52A}o;\u6127\u0180cdn\u28AF\u28B4\u28C9ro\u803B\xB5\u40B5\u0200;acd\u1464\u28BD\u28C0\u28C4s\xF4\u16A7ir;\u6AF0ot\u80BB\xB7\u01B5us\u0180;bd\u28D2\u1903\u28D3\u6212\u0100;u\u1D3C\u28D8;\u6A2A\u0163\u28DE\u28E1p;\u6ADB\xF2\u2212\xF0\u0A81\u0100dp\u28E9\u28EEels;\u62A7f;\uC000\u{1D55E}\u0100ct\u28F8\u28FDr;\uC000\u{1D4C2}pos\xBB\u159D\u0180;lm\u2909\u290A\u290D\u43BCtimap;\u62B8\u0C00GLRVabcdefghijlmoprstuvw\u2942\u2953\u297E\u2989\u2998\u29DA\u29E9\u2A15\u2A1A\u2A58\u2A5D\u2A83\u2A95\u2AA4\u2AA8\u2B04\u2B07\u2B44\u2B7F\u2BAE\u2C34\u2C67\u2C7C\u2CE9\u0100gt\u2947\u294B;\uC000\u22D9\u0338\u0100;v\u2950\u0BCF\uC000\u226B\u20D2\u0180elt\u295A\u2972\u2976ft\u0100ar\u2961\u2967rrow;\u61CDightarrow;\u61CE;\uC000\u22D8\u0338\u0100;v\u297B\u0C47\uC000\u226A\u20D2ightarrow;\u61CF\u0100Dd\u298E\u2993ash;\u62AFash;\u62AE\u0280bcnpt\u29A3\u29A7\u29AC\u29B1\u29CCla\xBB\u02DEute;\u4144g;\uC000\u2220\u20D2\u0280;Eiop\u0D84\u29BC\u29C0\u29C5\u29C8;\uC000\u2A70\u0338d;\uC000\u224B\u0338s;\u4149ro\xF8\u0D84ur\u0100;a\u29D3\u29D4\u666El\u0100;s\u29D3\u0B38\u01F3\u29DF\0\u29E3p\u80BB\xA0\u0B37mp\u0100;e\u0BF9\u0C00\u0280aeouy\u29F4\u29FE\u2A03\u2A10\u2A13\u01F0\u29F9\0\u29FB;\u6A43on;\u4148dil;\u4146ng\u0100;d\u0D7E\u2A0Aot;\uC000\u2A6D\u0338p;\u6A42;\u443Dash;\u6013\u0380;Aadqsx\u0B92\u2A29\u2A2D\u2A3B\u2A41\u2A45\u2A50rr;\u61D7r\u0100hr\u2A33\u2A36k;\u6924\u0100;o\u13F2\u13F0ot;\uC000\u2250\u0338ui\xF6\u0B63\u0100ei\u2A4A\u2A4Ear;\u6928\xED\u0B98ist\u0100;s\u0BA0\u0B9Fr;\uC000\u{1D52B}\u0200Eest\u0BC5\u2A66\u2A79\u2A7C\u0180;qs\u0BBC\u2A6D\u0BE1\u0180;qs\u0BBC\u0BC5\u2A74lan\xF4\u0BE2i\xED\u0BEA\u0100;r\u0BB6\u2A81\xBB\u0BB7\u0180Aap\u2A8A\u2A8D\u2A91r\xF2\u2971rr;\u61AEar;\u6AF2\u0180;sv\u0F8D\u2A9C\u0F8C\u0100;d\u2AA1\u2AA2\u62FC;\u62FAcy;\u445A\u0380AEadest\u2AB7\u2ABA\u2ABE\u2AC2\u2AC5\u2AF6\u2AF9r\xF2\u2966;\uC000\u2266\u0338rr;\u619Ar;\u6025\u0200;fqs\u0C3B\u2ACE\u2AE3\u2AEFt\u0100ar\u2AD4\u2AD9rro\xF7\u2AC1ightarro\xF7\u2A90\u0180;qs\u0C3B\u2ABA\u2AEAlan\xF4\u0C55\u0100;s\u0C55\u2AF4\xBB\u0C36i\xED\u0C5D\u0100;r\u0C35\u2AFEi\u0100;e\u0C1A\u0C25i\xE4\u0D90\u0100pt\u2B0C\u2B11f;\uC000\u{1D55F}\u8180\xAC;in\u2B19\u2B1A\u2B36\u40ACn\u0200;Edv\u0B89\u2B24\u2B28\u2B2E;\uC000\u22F9\u0338ot;\uC000\u22F5\u0338\u01E1\u0B89\u2B33\u2B35;\u62F7;\u62F6i\u0100;v\u0CB8\u2B3C\u01E1\u0CB8\u2B41\u2B43;\u62FE;\u62FD\u0180aor\u2B4B\u2B63\u2B69r\u0200;ast\u0B7B\u2B55\u2B5A\u2B5Flle\xEC\u0B7Bl;\uC000\u2AFD\u20E5;\uC000\u2202\u0338lint;\u6A14\u0180;ce\u0C92\u2B70\u2B73u\xE5\u0CA5\u0100;c\u0C98\u2B78\u0100;e\u0C92\u2B7D\xF1\u0C98\u0200Aait\u2B88\u2B8B\u2B9D\u2BA7r\xF2\u2988rr\u0180;cw\u2B94\u2B95\u2B99\u619B;\uC000\u2933\u0338;\uC000\u219D\u0338ghtarrow\xBB\u2B95ri\u0100;e\u0CCB\u0CD6\u0380chimpqu\u2BBD\u2BCD\u2BD9\u2B04\u0B78\u2BE4\u2BEF\u0200;cer\u0D32\u2BC6\u0D37\u2BC9u\xE5\u0D45;\uC000\u{1D4C3}ort\u026D\u2B05\0\0\u2BD6ar\xE1\u2B56m\u0100;e\u0D6E\u2BDF\u0100;q\u0D74\u0D73su\u0100bp\u2BEB\u2BED\xE5\u0CF8\xE5\u0D0B\u0180bcp\u2BF6\u2C11\u2C19\u0200;Ees\u2BFF\u2C00\u0D22\u2C04\u6284;\uC000\u2AC5\u0338et\u0100;e\u0D1B\u2C0Bq\u0100;q\u0D23\u2C00c\u0100;e\u0D32\u2C17\xF1\u0D38\u0200;Ees\u2C22\u2C23\u0D5F\u2C27\u6285;\uC000\u2AC6\u0338et\u0100;e\u0D58\u2C2Eq\u0100;q\u0D60\u2C23\u0200gilr\u2C3D\u2C3F\u2C45\u2C47\xEC\u0BD7lde\u803B\xF1\u40F1\xE7\u0C43iangle\u0100lr\u2C52\u2C5Ceft\u0100;e\u0C1A\u2C5A\xF1\u0C26ight\u0100;e\u0CCB\u2C65\xF1\u0CD7\u0100;m\u2C6C\u2C6D\u43BD\u0180;es\u2C74\u2C75\u2C79\u4023ro;\u6116p;\u6007\u0480DHadgilrs\u2C8F\u2C94\u2C99\u2C9E\u2CA3\u2CB0\u2CB6\u2CD3\u2CE3ash;\u62ADarr;\u6904p;\uC000\u224D\u20D2ash;\u62AC\u0100et\u2CA8\u2CAC;\uC000\u2265\u20D2;\uC000>\u20D2nfin;\u69DE\u0180Aet\u2CBD\u2CC1\u2CC5rr;\u6902;\uC000\u2264\u20D2\u0100;r\u2CCA\u2CCD\uC000<\u20D2ie;\uC000\u22B4\u20D2\u0100At\u2CD8\u2CDCrr;\u6903rie;\uC000\u22B5\u20D2im;\uC000\u223C\u20D2\u0180Aan\u2CF0\u2CF4\u2D02rr;\u61D6r\u0100hr\u2CFA\u2CFDk;\u6923\u0100;o\u13E7\u13E5ear;\u6927\u1253\u1A95\0\0\0\0\0\0\0\0\0\0\0\0\0\u2D2D\0\u2D38\u2D48\u2D60\u2D65\u2D72\u2D84\u1B07\0\0\u2D8D\u2DAB\0\u2DC8\u2DCE\0\u2DDC\u2E19\u2E2B\u2E3E\u2E43\u0100cs\u2D31\u1A97ute\u803B\xF3\u40F3\u0100iy\u2D3C\u2D45r\u0100;c\u1A9E\u2D42\u803B\xF4\u40F4;\u443E\u0280abios\u1AA0\u2D52\u2D57\u01C8\u2D5Alac;\u4151v;\u6A38old;\u69BClig;\u4153\u0100cr\u2D69\u2D6Dir;\u69BF;\uC000\u{1D52C}\u036F\u2D79\0\0\u2D7C\0\u2D82n;\u42DBave\u803B\xF2\u40F2;\u69C1\u0100bm\u2D88\u0DF4ar;\u69B5\u0200acit\u2D95\u2D98\u2DA5\u2DA8r\xF2\u1A80\u0100ir\u2D9D\u2DA0r;\u69BEoss;\u69BBn\xE5\u0E52;\u69C0\u0180aei\u2DB1\u2DB5\u2DB9cr;\u414Dga;\u43C9\u0180cdn\u2DC0\u2DC5\u01CDron;\u43BF;\u69B6pf;\uC000\u{1D560}\u0180ael\u2DD4\u2DD7\u01D2r;\u69B7rp;\u69B9\u0380;adiosv\u2DEA\u2DEB\u2DEE\u2E08\u2E0D\u2E10\u2E16\u6228r\xF2\u1A86\u0200;efm\u2DF7\u2DF8\u2E02\u2E05\u6A5Dr\u0100;o\u2DFE\u2DFF\u6134f\xBB\u2DFF\u803B\xAA\u40AA\u803B\xBA\u40BAgof;\u62B6r;\u6A56lope;\u6A57;\u6A5B\u0180clo\u2E1F\u2E21\u2E27\xF2\u2E01ash\u803B\xF8\u40F8l;\u6298i\u016C\u2E2F\u2E34de\u803B\xF5\u40F5es\u0100;a\u01DB\u2E3As;\u6A36ml\u803B\xF6\u40F6bar;\u633D\u0AE1\u2E5E\0\u2E7D\0\u2E80\u2E9D\0\u2EA2\u2EB9\0\0\u2ECB\u0E9C\0\u2F13\0\0\u2F2B\u2FBC\0\u2FC8r\u0200;ast\u0403\u2E67\u2E72\u0E85\u8100\xB6;l\u2E6D\u2E6E\u40B6le\xEC\u0403\u0269\u2E78\0\0\u2E7Bm;\u6AF3;\u6AFDy;\u443Fr\u0280cimpt\u2E8B\u2E8F\u2E93\u1865\u2E97nt;\u4025od;\u402Eil;\u6030enk;\u6031r;\uC000\u{1D52D}\u0180imo\u2EA8\u2EB0\u2EB4\u0100;v\u2EAD\u2EAE\u43C6;\u43D5ma\xF4\u0A76ne;\u660E\u0180;tv\u2EBF\u2EC0\u2EC8\u43C0chfork\xBB\u1FFD;\u43D6\u0100au\u2ECF\u2EDFn\u0100ck\u2ED5\u2EDDk\u0100;h\u21F4\u2EDB;\u610E\xF6\u21F4s\u0480;abcdemst\u2EF3\u2EF4\u1908\u2EF9\u2EFD\u2F04\u2F06\u2F0A\u2F0E\u402Bcir;\u6A23ir;\u6A22\u0100ou\u1D40\u2F02;\u6A25;\u6A72n\u80BB\xB1\u0E9Dim;\u6A26wo;\u6A27\u0180ipu\u2F19\u2F20\u2F25ntint;\u6A15f;\uC000\u{1D561}nd\u803B\xA3\u40A3\u0500;Eaceinosu\u0EC8\u2F3F\u2F41\u2F44\u2F47\u2F81\u2F89\u2F92\u2F7E\u2FB6;\u6AB3p;\u6AB7u\xE5\u0ED9\u0100;c\u0ECE\u2F4C\u0300;acens\u0EC8\u2F59\u2F5F\u2F66\u2F68\u2F7Eppro\xF8\u2F43urlye\xF1\u0ED9\xF1\u0ECE\u0180aes\u2F6F\u2F76\u2F7Approx;\u6AB9qq;\u6AB5im;\u62E8i\xED\u0EDFme\u0100;s\u2F88\u0EAE\u6032\u0180Eas\u2F78\u2F90\u2F7A\xF0\u2F75\u0180dfp\u0EEC\u2F99\u2FAF\u0180als\u2FA0\u2FA5\u2FAAlar;\u632Eine;\u6312urf;\u6313\u0100;t\u0EFB\u2FB4\xEF\u0EFBrel;\u62B0\u0100ci\u2FC0\u2FC5r;\uC000\u{1D4C5};\u43C8ncsp;\u6008\u0300fiopsu\u2FDA\u22E2\u2FDF\u2FE5\u2FEB\u2FF1r;\uC000\u{1D52E}pf;\uC000\u{1D562}rime;\u6057cr;\uC000\u{1D4C6}\u0180aeo\u2FF8\u3009\u3013t\u0100ei\u2FFE\u3005rnion\xF3\u06B0nt;\u6A16st\u0100;e\u3010\u3011\u403F\xF1\u1F19\xF4\u0F14\u0A80ABHabcdefhilmnoprstux\u3040\u3051\u3055\u3059\u30E0\u310E\u312B\u3147\u3162\u3172\u318E\u3206\u3215\u3224\u3229\u3258\u326E\u3272\u3290\u32B0\u32B7\u0180art\u3047\u304A\u304Cr\xF2\u10B3\xF2\u03DDail;\u691Car\xF2\u1C65ar;\u6964\u0380cdenqrt\u3068\u3075\u3078\u307F\u308F\u3094\u30CC\u0100eu\u306D\u3071;\uC000\u223D\u0331te;\u4155i\xE3\u116Emptyv;\u69B3g\u0200;del\u0FD1\u3089\u308B\u308D;\u6992;\u69A5\xE5\u0FD1uo\u803B\xBB\u40BBr\u0580;abcfhlpstw\u0FDC\u30AC\u30AF\u30B7\u30B9\u30BC\u30BE\u30C0\u30C3\u30C7\u30CAp;\u6975\u0100;f\u0FE0\u30B4s;\u6920;\u6933s;\u691E\xEB\u225D\xF0\u272El;\u6945im;\u6974l;\u61A3;\u619D\u0100ai\u30D1\u30D5il;\u691Ao\u0100;n\u30DB\u30DC\u6236al\xF3\u0F1E\u0180abr\u30E7\u30EA\u30EEr\xF2\u17E5rk;\u6773\u0100ak\u30F3\u30FDc\u0100ek\u30F9\u30FB;\u407D;\u405D\u0100es\u3102\u3104;\u698Cl\u0100du\u310A\u310C;\u698E;\u6990\u0200aeuy\u3117\u311C\u3127\u3129ron;\u4159\u0100di\u3121\u3125il;\u4157\xEC\u0FF2\xE2\u30FA;\u4440\u0200clqs\u3134\u3137\u313D\u3144a;\u6937dhar;\u6969uo\u0100;r\u020E\u020Dh;\u61B3\u0180acg\u314E\u315F\u0F44l\u0200;ips\u0F78\u3158\u315B\u109Cn\xE5\u10BBar\xF4\u0FA9t;\u65AD\u0180ilr\u3169\u1023\u316Esht;\u697D;\uC000\u{1D52F}\u0100ao\u3177\u3186r\u0100du\u317D\u317F\xBB\u047B\u0100;l\u1091\u3184;\u696C\u0100;v\u318B\u318C\u43C1;\u43F1\u0180gns\u3195\u31F9\u31FCht\u0300ahlrst\u31A4\u31B0\u31C2\u31D8\u31E4\u31EErrow\u0100;t\u0FDC\u31ADa\xE9\u30C8arpoon\u0100du\u31BB\u31BFow\xEE\u317Ep\xBB\u1092eft\u0100ah\u31CA\u31D0rrow\xF3\u0FEAarpoon\xF3\u0551ightarrows;\u61C9quigarro\xF7\u30CBhreetimes;\u62CCg;\u42DAingdotse\xF1\u1F32\u0180ahm\u320D\u3210\u3213r\xF2\u0FEAa\xF2\u0551;\u600Foust\u0100;a\u321E\u321F\u63B1che\xBB\u321Fmid;\u6AEE\u0200abpt\u3232\u323D\u3240\u3252\u0100nr\u3237\u323Ag;\u67EDr;\u61FEr\xEB\u1003\u0180afl\u3247\u324A\u324Er;\u6986;\uC000\u{1D563}us;\u6A2Eimes;\u6A35\u0100ap\u325D\u3267r\u0100;g\u3263\u3264\u4029t;\u6994olint;\u6A12ar\xF2\u31E3\u0200achq\u327B\u3280\u10BC\u3285quo;\u603Ar;\uC000\u{1D4C7}\u0100bu\u30FB\u328Ao\u0100;r\u0214\u0213\u0180hir\u3297\u329B\u32A0re\xE5\u31F8mes;\u62CAi\u0200;efl\u32AA\u1059\u1821\u32AB\u65B9tri;\u69CEluhar;\u6968;\u611E\u0D61\u32D5\u32DB\u32DF\u332C\u3338\u3371\0\u337A\u33A4\0\0\u33EC\u33F0\0\u3428\u3448\u345A\u34AD\u34B1\u34CA\u34F1\0\u3616\0\0\u3633cute;\u415Bqu\xEF\u27BA\u0500;Eaceinpsy\u11ED\u32F3\u32F5\u32FF\u3302\u330B\u330F\u331F\u3326\u3329;\u6AB4\u01F0\u32FA\0\u32FC;\u6AB8on;\u4161u\xE5\u11FE\u0100;d\u11F3\u3307il;\u415Frc;\u415D\u0180Eas\u3316\u3318\u331B;\u6AB6p;\u6ABAim;\u62E9olint;\u6A13i\xED\u1204;\u4441ot\u0180;be\u3334\u1D47\u3335\u62C5;\u6A66\u0380Aacmstx\u3346\u334A\u3357\u335B\u335E\u3363\u336Drr;\u61D8r\u0100hr\u3350\u3352\xEB\u2228\u0100;o\u0A36\u0A34t\u803B\xA7\u40A7i;\u403Bwar;\u6929m\u0100in\u3369\xF0nu\xF3\xF1t;\u6736r\u0100;o\u3376\u2055\uC000\u{1D530}\u0200acoy\u3382\u3386\u3391\u33A0rp;\u666F\u0100hy\u338B\u338Fcy;\u4449;\u4448rt\u026D\u3399\0\0\u339Ci\xE4\u1464ara\xEC\u2E6F\u803B\xAD\u40AD\u0100gm\u33A8\u33B4ma\u0180;fv\u33B1\u33B2\u33B2\u43C3;\u43C2\u0400;deglnpr\u12AB\u33C5\u33C9\u33CE\u33D6\u33DE\u33E1\u33E6ot;\u6A6A\u0100;q\u12B1\u12B0\u0100;E\u33D3\u33D4\u6A9E;\u6AA0\u0100;E\u33DB\u33DC\u6A9D;\u6A9Fe;\u6246lus;\u6A24arr;\u6972ar\xF2\u113D\u0200aeit\u33F8\u3408\u340F\u3417\u0100ls\u33FD\u3404lsetm\xE9\u336Ahp;\u6A33parsl;\u69E4\u0100dl\u1463\u3414e;\u6323\u0100;e\u341C\u341D\u6AAA\u0100;s\u3422\u3423\u6AAC;\uC000\u2AAC\uFE00\u0180flp\u342E\u3433\u3442tcy;\u444C\u0100;b\u3438\u3439\u402F\u0100;a\u343E\u343F\u69C4r;\u633Ff;\uC000\u{1D564}a\u0100dr\u344D\u0402es\u0100;u\u3454\u3455\u6660it\xBB\u3455\u0180csu\u3460\u3479\u349F\u0100au\u3465\u346Fp\u0100;s\u1188\u346B;\uC000\u2293\uFE00p\u0100;s\u11B4\u3475;\uC000\u2294\uFE00u\u0100bp\u347F\u348F\u0180;es\u1197\u119C\u3486et\u0100;e\u1197\u348D\xF1\u119D\u0180;es\u11A8\u11AD\u3496et\u0100;e\u11A8\u349D\xF1\u11AE\u0180;af\u117B\u34A6\u05B0r\u0165\u34AB\u05B1\xBB\u117Car\xF2\u1148\u0200cemt\u34B9\u34BE\u34C2\u34C5r;\uC000\u{1D4C8}tm\xEE\xF1i\xEC\u3415ar\xE6\u11BE\u0100ar\u34CE\u34D5r\u0100;f\u34D4\u17BF\u6606\u0100an\u34DA\u34EDight\u0100ep\u34E3\u34EApsilo\xEE\u1EE0h\xE9\u2EAFs\xBB\u2852\u0280bcmnp\u34FB\u355E\u1209\u358B\u358E\u0480;Edemnprs\u350E\u350F\u3511\u3515\u351E\u3523\u352C\u3531\u3536\u6282;\u6AC5ot;\u6ABD\u0100;d\u11DA\u351Aot;\u6AC3ult;\u6AC1\u0100Ee\u3528\u352A;\u6ACB;\u628Alus;\u6ABFarr;\u6979\u0180eiu\u353D\u3552\u3555t\u0180;en\u350E\u3545\u354Bq\u0100;q\u11DA\u350Feq\u0100;q\u352B\u3528m;\u6AC7\u0100bp\u355A\u355C;\u6AD5;\u6AD3c\u0300;acens\u11ED\u356C\u3572\u3579\u357B\u3326ppro\xF8\u32FAurlye\xF1\u11FE\xF1\u11F3\u0180aes\u3582\u3588\u331Bppro\xF8\u331Aq\xF1\u3317g;\u666A\u0680123;Edehlmnps\u35A9\u35AC\u35AF\u121C\u35B2\u35B4\u35C0\u35C9\u35D5\u35DA\u35DF\u35E8\u35ED\u803B\xB9\u40B9\u803B\xB2\u40B2\u803B\xB3\u40B3;\u6AC6\u0100os\u35B9\u35BCt;\u6ABEub;\u6AD8\u0100;d\u1222\u35C5ot;\u6AC4s\u0100ou\u35CF\u35D2l;\u67C9b;\u6AD7arr;\u697Bult;\u6AC2\u0100Ee\u35E4\u35E6;\u6ACC;\u628Blus;\u6AC0\u0180eiu\u35F4\u3609\u360Ct\u0180;en\u121C\u35FC\u3602q\u0100;q\u1222\u35B2eq\u0100;q\u35E7\u35E4m;\u6AC8\u0100bp\u3611\u3613;\u6AD4;\u6AD6\u0180Aan\u361C\u3620\u362Drr;\u61D9r\u0100hr\u3626\u3628\xEB\u222E\u0100;o\u0A2B\u0A29war;\u692Alig\u803B\xDF\u40DF\u0BE1\u3651\u365D\u3660\u12CE\u3673\u3679\0\u367E\u36C2\0\0\0\0\0\u36DB\u3703\0\u3709\u376C\0\0\0\u3787\u0272\u3656\0\0\u365Bget;\u6316;\u43C4r\xEB\u0E5F\u0180aey\u3666\u366B\u3670ron;\u4165dil;\u4163;\u4442lrec;\u6315r;\uC000\u{1D531}\u0200eiko\u3686\u369D\u36B5\u36BC\u01F2\u368B\0\u3691e\u01004f\u1284\u1281a\u0180;sv\u3698\u3699\u369B\u43B8ym;\u43D1\u0100cn\u36A2\u36B2k\u0100as\u36A8\u36AEppro\xF8\u12C1im\xBB\u12ACs\xF0\u129E\u0100as\u36BA\u36AE\xF0\u12C1rn\u803B\xFE\u40FE\u01EC\u031F\u36C6\u22E7es\u8180\xD7;bd\u36CF\u36D0\u36D8\u40D7\u0100;a\u190F\u36D5r;\u6A31;\u6A30\u0180eps\u36E1\u36E3\u3700\xE1\u2A4D\u0200;bcf\u0486\u36EC\u36F0\u36F4ot;\u6336ir;\u6AF1\u0100;o\u36F9\u36FC\uC000\u{1D565}rk;\u6ADA\xE1\u3362rime;\u6034\u0180aip\u370F\u3712\u3764d\xE5\u1248\u0380adempst\u3721\u374D\u3740\u3751\u3757\u375C\u375Fngle\u0280;dlqr\u3730\u3731\u3736\u3740\u3742\u65B5own\xBB\u1DBBeft\u0100;e\u2800\u373E\xF1\u092E;\u625Cight\u0100;e\u32AA\u374B\xF1\u105Aot;\u65ECinus;\u6A3Alus;\u6A39b;\u69CDime;\u6A3Bezium;\u63E2\u0180cht\u3772\u377D\u3781\u0100ry\u3777\u377B;\uC000\u{1D4C9};\u4446cy;\u445Brok;\u4167\u0100io\u378B\u378Ex\xF4\u1777head\u0100lr\u3797\u37A0eftarro\xF7\u084Fightarrow\xBB\u0F5D\u0900AHabcdfghlmoprstuw\u37D0\u37D3\u37D7\u37E4\u37F0\u37FC\u380E\u381C\u3823\u3834\u3851\u385D\u386B\u38A9\u38CC\u38D2\u38EA\u38F6r\xF2\u03EDar;\u6963\u0100cr\u37DC\u37E2ute\u803B\xFA\u40FA\xF2\u1150r\u01E3\u37EA\0\u37EDy;\u445Eve;\u416D\u0100iy\u37F5\u37FArc\u803B\xFB\u40FB;\u4443\u0180abh\u3803\u3806\u380Br\xF2\u13ADlac;\u4171a\xF2\u13C3\u0100ir\u3813\u3818sht;\u697E;\uC000\u{1D532}rave\u803B\xF9\u40F9\u0161\u3827\u3831r\u0100lr\u382C\u382E\xBB\u0957\xBB\u1083lk;\u6580\u0100ct\u3839\u384D\u026F\u383F\0\0\u384Arn\u0100;e\u3845\u3846\u631Cr\xBB\u3846op;\u630Fri;\u65F8\u0100al\u3856\u385Acr;\u416B\u80BB\xA8\u0349\u0100gp\u3862\u3866on;\u4173f;\uC000\u{1D566}\u0300adhlsu\u114B\u3878\u387D\u1372\u3891\u38A0own\xE1\u13B3arpoon\u0100lr\u3888\u388Cef\xF4\u382Digh\xF4\u382Fi\u0180;hl\u3899\u389A\u389C\u43C5\xBB\u13FAon\xBB\u389Aparrows;\u61C8\u0180cit\u38B0\u38C4\u38C8\u026F\u38B6\0\0\u38C1rn\u0100;e\u38BC\u38BD\u631Dr\xBB\u38BDop;\u630Eng;\u416Fri;\u65F9cr;\uC000\u{1D4CA}\u0180dir\u38D9\u38DD\u38E2ot;\u62F0lde;\u4169i\u0100;f\u3730\u38E8\xBB\u1813\u0100am\u38EF\u38F2r\xF2\u38A8l\u803B\xFC\u40FCangle;\u69A7\u0780ABDacdeflnoprsz\u391C\u391F\u3929\u392D\u39B5\u39B8\u39BD\u39DF\u39E4\u39E8\u39F3\u39F9\u39FD\u3A01\u3A20r\xF2\u03F7ar\u0100;v\u3926\u3927\u6AE8;\u6AE9as\xE8\u03E1\u0100nr\u3932\u3937grt;\u699C\u0380eknprst\u34E3\u3946\u394B\u3952\u395D\u3964\u3996app\xE1\u2415othin\xE7\u1E96\u0180hir\u34EB\u2EC8\u3959op\xF4\u2FB5\u0100;h\u13B7\u3962\xEF\u318D\u0100iu\u3969\u396Dgm\xE1\u33B3\u0100bp\u3972\u3984setneq\u0100;q\u397D\u3980\uC000\u228A\uFE00;\uC000\u2ACB\uFE00setneq\u0100;q\u398F\u3992\uC000\u228B\uFE00;\uC000\u2ACC\uFE00\u0100hr\u399B\u399Fet\xE1\u369Ciangle\u0100lr\u39AA\u39AFeft\xBB\u0925ight\xBB\u1051y;\u4432ash\xBB\u1036\u0180elr\u39C4\u39D2\u39D7\u0180;be\u2DEA\u39CB\u39CFar;\u62BBq;\u625Alip;\u62EE\u0100bt\u39DC\u1468a\xF2\u1469r;\uC000\u{1D533}tr\xE9\u39AEsu\u0100bp\u39EF\u39F1\xBB\u0D1C\xBB\u0D59pf;\uC000\u{1D567}ro\xF0\u0EFBtr\xE9\u39B4\u0100cu\u3A06\u3A0Br;\uC000\u{1D4CB}\u0100bp\u3A10\u3A18n\u0100Ee\u3980\u3A16\xBB\u397En\u0100Ee\u3992\u3A1E\xBB\u3990igzag;\u699A\u0380cefoprs\u3A36\u3A3B\u3A56\u3A5B\u3A54\u3A61\u3A6Airc;\u4175\u0100di\u3A40\u3A51\u0100bg\u3A45\u3A49ar;\u6A5Fe\u0100;q\u15FA\u3A4F;\u6259erp;\u6118r;\uC000\u{1D534}pf;\uC000\u{1D568}\u0100;e\u1479\u3A66at\xE8\u1479cr;\uC000\u{1D4CC}\u0AE3\u178E\u3A87\0\u3A8B\0\u3A90\u3A9B\0\0\u3A9D\u3AA8\u3AAB\u3AAF\0\0\u3AC3\u3ACE\0\u3AD8\u17DC\u17DFtr\xE9\u17D1r;\uC000\u{1D535}\u0100Aa\u3A94\u3A97r\xF2\u03C3r\xF2\u09F6;\u43BE\u0100Aa\u3AA1\u3AA4r\xF2\u03B8r\xF2\u09EBa\xF0\u2713is;\u62FB\u0180dpt\u17A4\u3AB5\u3ABE\u0100fl\u3ABA\u17A9;\uC000\u{1D569}im\xE5\u17B2\u0100Aa\u3AC7\u3ACAr\xF2\u03CEr\xF2\u0A01\u0100cq\u3AD2\u17B8r;\uC000\u{1D4CD}\u0100pt\u17D6\u3ADCr\xE9\u17D4\u0400acefiosu\u3AF0\u3AFD\u3B08\u3B0C\u3B11\u3B15\u3B1B\u3B21c\u0100uy\u3AF6\u3AFBte\u803B\xFD\u40FD;\u444F\u0100iy\u3B02\u3B06rc;\u4177;\u444Bn\u803B\xA5\u40A5r;\uC000\u{1D536}cy;\u4457pf;\uC000\u{1D56A}cr;\uC000\u{1D4CE}\u0100cm\u3B26\u3B29y;\u444El\u803B\xFF\u40FF\u0500acdefhiosw\u3B42\u3B48\u3B54\u3B58\u3B64\u3B69\u3B6D\u3B74\u3B7A\u3B80cute;\u417A\u0100ay\u3B4D\u3B52ron;\u417E;\u4437ot;\u417C\u0100et\u3B5D\u3B61tr\xE6\u155Fa;\u43B6r;\uC000\u{1D537}cy;\u4436grarr;\u61DDpf;\uC000\u{1D56B}cr;\uC000\u{1D4CF}\u0100jn\u3B85\u3B87;\u600Dj;\u600C'.split("").map(t=>t.charCodeAt(0)));var s4=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(t=>t.charCodeAt(0)));var Wb,YM=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Vb=(Wb=String.fromCodePoint)!==null&&Wb!==void 0?Wb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function Zb(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=YM.get(t))!==null&&e!==void 0?e:t}var ei;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(ei||(ei={}));var FM=32,zn;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(zn||(zn={}));function Bb(t){return t>=ei.ZERO&&t<=ei.NINE}function HM(t){return t>=ei.UPPER_A&&t<=ei.UPPER_F||t>=ei.LOWER_A&&t<=ei.LOWER_F}function GM(t){return t>=ei.UPPER_A&&t<=ei.UPPER_Z||t>=ei.LOWER_A&&t<=ei.LOWER_Z||Bb(t)}function KM(t){return t===ei.EQUALS||GM(t)}var Jt;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Jt||(Jt={}));var Xs;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Xs||(Xs={}));var Yb=class{constructor(e,i,n){this.decodeTree=e,this.emitCodePoint=i,this.errors=n,this.state=Jt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Xs.Strict}startEntity(e){this.decodeMode=e,this.state=Jt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,i){switch(this.state){case Jt.EntityStart:return e.charCodeAt(i)===ei.NUM?(this.state=Jt.NumericStart,this.consumed+=1,this.stateNumericStart(e,i+1)):(this.state=Jt.NamedEntity,this.stateNamedEntity(e,i));case Jt.NumericStart:return this.stateNumericStart(e,i);case Jt.NumericDecimal:return this.stateNumericDecimal(e,i);case Jt.NumericHex:return this.stateNumericHex(e,i);case Jt.NamedEntity:return this.stateNamedEntity(e,i)}}stateNumericStart(e,i){return i>=e.length?-1:(e.charCodeAt(i)|FM)===ei.LOWER_X?(this.state=Jt.NumericHex,this.consumed+=1,this.stateNumericHex(e,i+1)):(this.state=Jt.NumericDecimal,this.stateNumericDecimal(e,i))}addToNumericResult(e,i,n,r){if(i!==n){let o=n-i;this.result=this.result*Math.pow(r,o)+parseInt(e.substr(i,o),r),this.consumed+=o}}stateNumericHex(e,i){let n=i;for(;i>14;for(;i>14,o!==0){if(s===ei.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Xs.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:i,decodeTree:n}=this,r=(n[i]&zn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(i,r,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,i,n){let{decodeTree:r}=this;return this.emitCodePoint(i===1?r[e]&~zn.VALUE_LENGTH:r[e+1],n),i===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case Jt.NamedEntity:return this.result!==0&&(this.decodeMode!==Xs.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jt.NumericDecimal:return this.emitNumericEntity(0,2);case Jt.NumericHex:return this.emitNumericEntity(0,3);case Jt.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jt.EntityStart:return 0}}};function a4(t){let e="",i=new Yb(t,n=>e+=Vb(n));return function(r,o){let s=0,a=0;for(;(a=r.indexOf("&",a))>=0;){e+=r.slice(s,a),i.startEntity(o);let c=i.write(r,a+1);if(c<0){s=a+i.end();break}s=a+c,a=c===0?s+1:s}let l=e+r.slice(s);return e="",l}}function Fb(t,e,i,n){let r=(e&zn.BRANCH_LENGTH)>>7,o=e&zn.JUMP_TABLE;if(r===0)return o!==0&&n===o?i:-1;if(o){let l=n-o;return l<0||l>=r?-1:t[i+l]-1}let s=i,a=s+r-1;for(;s<=a;){let l=s+a>>>1,c=t[l];if(cn)a=l-1;else return t[l+r]}return-1}var iye=a4(ar),nye=a4(s4);var tl={};hc(tl,{ATTRS:()=>Un,DOCUMENT_MODE:()=>ai,NS:()=>ae,SPECIAL_ELEMENTS:()=>Hb,TAG_ID:()=>g,TAG_NAMES:()=>B,getTagID:()=>Uo,hasUnescapedText:()=>l4,isNumberedHeader:()=>tu});var ae;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(ae=ae||(ae={}));var Un;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Un=Un||(Un={}));var ai;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(ai=ai||(ai={}));var B;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(B=B||(B={}));var g;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SECTION=94]="SECTION",t[t.SELECT=95]="SELECT",t[t.SOURCE=96]="SOURCE",t[t.SMALL=97]="SMALL",t[t.SPAN=98]="SPAN",t[t.STRIKE=99]="STRIKE",t[t.STRONG=100]="STRONG",t[t.STYLE=101]="STYLE",t[t.SUB=102]="SUB",t[t.SUMMARY=103]="SUMMARY",t[t.SUP=104]="SUP",t[t.TABLE=105]="TABLE",t[t.TBODY=106]="TBODY",t[t.TEMPLATE=107]="TEMPLATE",t[t.TEXTAREA=108]="TEXTAREA",t[t.TFOOT=109]="TFOOT",t[t.TD=110]="TD",t[t.TH=111]="TH",t[t.THEAD=112]="THEAD",t[t.TITLE=113]="TITLE",t[t.TR=114]="TR",t[t.TRACK=115]="TRACK",t[t.TT=116]="TT",t[t.U=117]="U",t[t.UL=118]="UL",t[t.SVG=119]="SVG",t[t.VAR=120]="VAR",t[t.WBR=121]="WBR",t[t.XMP=122]="XMP"})(g=g||(g={}));var JM=new Map([[B.A,g.A],[B.ADDRESS,g.ADDRESS],[B.ANNOTATION_XML,g.ANNOTATION_XML],[B.APPLET,g.APPLET],[B.AREA,g.AREA],[B.ARTICLE,g.ARTICLE],[B.ASIDE,g.ASIDE],[B.B,g.B],[B.BASE,g.BASE],[B.BASEFONT,g.BASEFONT],[B.BGSOUND,g.BGSOUND],[B.BIG,g.BIG],[B.BLOCKQUOTE,g.BLOCKQUOTE],[B.BODY,g.BODY],[B.BR,g.BR],[B.BUTTON,g.BUTTON],[B.CAPTION,g.CAPTION],[B.CENTER,g.CENTER],[B.CODE,g.CODE],[B.COL,g.COL],[B.COLGROUP,g.COLGROUP],[B.DD,g.DD],[B.DESC,g.DESC],[B.DETAILS,g.DETAILS],[B.DIALOG,g.DIALOG],[B.DIR,g.DIR],[B.DIV,g.DIV],[B.DL,g.DL],[B.DT,g.DT],[B.EM,g.EM],[B.EMBED,g.EMBED],[B.FIELDSET,g.FIELDSET],[B.FIGCAPTION,g.FIGCAPTION],[B.FIGURE,g.FIGURE],[B.FONT,g.FONT],[B.FOOTER,g.FOOTER],[B.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[B.FORM,g.FORM],[B.FRAME,g.FRAME],[B.FRAMESET,g.FRAMESET],[B.H1,g.H1],[B.H2,g.H2],[B.H3,g.H3],[B.H4,g.H4],[B.H5,g.H5],[B.H6,g.H6],[B.HEAD,g.HEAD],[B.HEADER,g.HEADER],[B.HGROUP,g.HGROUP],[B.HR,g.HR],[B.HTML,g.HTML],[B.I,g.I],[B.IMG,g.IMG],[B.IMAGE,g.IMAGE],[B.INPUT,g.INPUT],[B.IFRAME,g.IFRAME],[B.KEYGEN,g.KEYGEN],[B.LABEL,g.LABEL],[B.LI,g.LI],[B.LINK,g.LINK],[B.LISTING,g.LISTING],[B.MAIN,g.MAIN],[B.MALIGNMARK,g.MALIGNMARK],[B.MARQUEE,g.MARQUEE],[B.MATH,g.MATH],[B.MENU,g.MENU],[B.META,g.META],[B.MGLYPH,g.MGLYPH],[B.MI,g.MI],[B.MO,g.MO],[B.MN,g.MN],[B.MS,g.MS],[B.MTEXT,g.MTEXT],[B.NAV,g.NAV],[B.NOBR,g.NOBR],[B.NOFRAMES,g.NOFRAMES],[B.NOEMBED,g.NOEMBED],[B.NOSCRIPT,g.NOSCRIPT],[B.OBJECT,g.OBJECT],[B.OL,g.OL],[B.OPTGROUP,g.OPTGROUP],[B.OPTION,g.OPTION],[B.P,g.P],[B.PARAM,g.PARAM],[B.PLAINTEXT,g.PLAINTEXT],[B.PRE,g.PRE],[B.RB,g.RB],[B.RP,g.RP],[B.RT,g.RT],[B.RTC,g.RTC],[B.RUBY,g.RUBY],[B.S,g.S],[B.SCRIPT,g.SCRIPT],[B.SECTION,g.SECTION],[B.SELECT,g.SELECT],[B.SOURCE,g.SOURCE],[B.SMALL,g.SMALL],[B.SPAN,g.SPAN],[B.STRIKE,g.STRIKE],[B.STRONG,g.STRONG],[B.STYLE,g.STYLE],[B.SUB,g.SUB],[B.SUMMARY,g.SUMMARY],[B.SUP,g.SUP],[B.TABLE,g.TABLE],[B.TBODY,g.TBODY],[B.TEMPLATE,g.TEMPLATE],[B.TEXTAREA,g.TEXTAREA],[B.TFOOT,g.TFOOT],[B.TD,g.TD],[B.TH,g.TH],[B.THEAD,g.THEAD],[B.TITLE,g.TITLE],[B.TR,g.TR],[B.TRACK,g.TRACK],[B.TT,g.TT],[B.U,g.U],[B.UL,g.UL],[B.SVG,g.SVG],[B.VAR,g.VAR],[B.WBR,g.WBR],[B.XMP,g.XMP]]);function Uo(t){var e;return(e=JM.get(t))!==null&&e!==void 0?e:g.UNKNOWN}var Oe=g,Hb={[ae.HTML]:new Set([Oe.ADDRESS,Oe.APPLET,Oe.AREA,Oe.ARTICLE,Oe.ASIDE,Oe.BASE,Oe.BASEFONT,Oe.BGSOUND,Oe.BLOCKQUOTE,Oe.BODY,Oe.BR,Oe.BUTTON,Oe.CAPTION,Oe.CENTER,Oe.COL,Oe.COLGROUP,Oe.DD,Oe.DETAILS,Oe.DIR,Oe.DIV,Oe.DL,Oe.DT,Oe.EMBED,Oe.FIELDSET,Oe.FIGCAPTION,Oe.FIGURE,Oe.FOOTER,Oe.FORM,Oe.FRAME,Oe.FRAMESET,Oe.H1,Oe.H2,Oe.H3,Oe.H4,Oe.H5,Oe.H6,Oe.HEAD,Oe.HEADER,Oe.HGROUP,Oe.HR,Oe.HTML,Oe.IFRAME,Oe.IMG,Oe.INPUT,Oe.LI,Oe.LINK,Oe.LISTING,Oe.MAIN,Oe.MARQUEE,Oe.MENU,Oe.META,Oe.NAV,Oe.NOEMBED,Oe.NOFRAMES,Oe.NOSCRIPT,Oe.OBJECT,Oe.OL,Oe.P,Oe.PARAM,Oe.PLAINTEXT,Oe.PRE,Oe.SCRIPT,Oe.SECTION,Oe.SELECT,Oe.SOURCE,Oe.STYLE,Oe.SUMMARY,Oe.TABLE,Oe.TBODY,Oe.TD,Oe.TEMPLATE,Oe.TEXTAREA,Oe.TFOOT,Oe.TH,Oe.THEAD,Oe.TITLE,Oe.TR,Oe.TRACK,Oe.UL,Oe.WBR,Oe.XMP]),[ae.MATHML]:new Set([Oe.MI,Oe.MO,Oe.MN,Oe.MS,Oe.MTEXT,Oe.ANNOTATION_XML]),[ae.SVG]:new Set([Oe.TITLE,Oe.FOREIGN_OBJECT,Oe.DESC]),[ae.XLINK]:new Set,[ae.XML]:new Set,[ae.XMLNS]:new Set};function tu(t){return t===Oe.H1||t===Oe.H2||t===Oe.H3||t===Oe.H4||t===Oe.H5||t===Oe.H6}var eN=new Set([B.STYLE,B.SCRIPT,B.XMP,B.IFRAME,B.NOEMBED,B.NOFRAMES,B.PLAINTEXT]);function l4(t,e){return eN.has(t)||e&&t===B.NOSCRIPT}var tN=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),R;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",t[t.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",t[t.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",t[t.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",t[t.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",t[t.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})(R||(R={}));var Pt={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function nu(t){return t>=_.DIGIT_0&&t<=_.DIGIT_9}function iu(t){return t>=_.LATIN_CAPITAL_A&&t<=_.LATIN_CAPITAL_Z}function iN(t){return t>=_.LATIN_SMALL_A&&t<=_.LATIN_SMALL_Z}function Mo(t){return iN(t)||iu(t)}function Gb(t){return Mo(t)||nu(t)}function u4(t){return t>=_.LATIN_CAPITAL_A&&t<=_.LATIN_CAPITAL_F}function f4(t){return t>=_.LATIN_SMALL_A&&t<=_.LATIN_SMALL_F}function nN(t){return nu(t)||u4(t)||f4(t)}function Xd(t){return t+32}function h4(t){return t===_.SPACE||t===_.LINE_FEED||t===_.TABULATION||t===_.FORM_FEED}function rN(t){return t===_.EQUALS_SIGN||Gb(t)}function c4(t){return h4(t)||t===_.SOLIDUS||t===_.GREATER_THAN_SIGN}var ru=class{constructor(e,i){this.options=e,this.handler=i,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new $d(i),this.currentLocation=this.getCurrentLocation(-1)}_err(e){var i,n;(n=(i=this.handler).onParseError)===null||n===void 0||n.call(i,this.preprocessor.getError(e))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,i,n){this.active=!0,this.preprocessor.write(e,i),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}_reconsumeInState(e,i){this.state=e,this._callState(i)}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let i=0;i0&&this._err(ee.endTagWithAttributes),e.selfClosing&&this._err(ee.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case Ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ye.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:Ye.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,i){if(this.currentCharacterToken)if(this.currentCharacterToken.type!==e)this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();else{this.currentCharacterToken.chars+=i;return}this._createCharacterToken(e,i)}_emitCodePoint(e){let i=h4(e)?Ye.WHITESPACE_CHARACTER:e===_.NULL?Ye.NULL_CHARACTER:Ye.CHARACTER;this._appendCharToCurrentCharacterToken(i,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(Ye.CHARACTER,e)}_matchNamedCharacterReference(e){let i=null,n=0,r=!1;for(let o=0,s=ar[0];o>=0&&(o=Fb(ar,s,o+1,e),!(o<0));e=this._consume()){n+=1,s=ar[o];let a=s&zn.VALUE_LENGTH;if(a){let l=(a>>14)-1;if(e!==_.SEMICOLON&&this._isCharacterReferenceInAttribute()&&rN(this.preprocessor.peek(1))?(i=[_.AMPERSAND],o+=l):(i=l===0?[ar[o]&~zn.VALUE_LENGTH]:l===1?[ar[++o]]:[ar[++o],ar[++o]],n=0,r=e!==_.SEMICOLON),l===0){this._consume();break}}}return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(ee.missingSemicolonAfterCharacterReference),this._unconsume(1),i}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case R.DATA:{this._stateData(e);break}case R.RCDATA:{this._stateRcdata(e);break}case R.RAWTEXT:{this._stateRawtext(e);break}case R.SCRIPT_DATA:{this._stateScriptData(e);break}case R.PLAINTEXT:{this._statePlaintext(e);break}case R.TAG_OPEN:{this._stateTagOpen(e);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case R.TAG_NAME:{this._stateTagName(e);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case R.BOGUS_COMMENT:{this._stateBogusComment(e);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case R.COMMENT_START:{this._stateCommentStart(e);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case R.COMMENT:{this._stateComment(e);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case R.COMMENT_END:{this._stateCommentEnd(e);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case R.DOCTYPE:{this._stateDoctype(e);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case R.CDATA_SECTION:{this._stateCdataSection(e);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference(e);break}case R.NAMED_CHARACTER_REFERENCE:{this._stateNamedCharacterReference(e);break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}case R.NUMERIC_CHARACTER_REFERENCE:{this._stateNumericCharacterReference(e);break}case R.HEXADEMICAL_CHARACTER_REFERENCE_START:{this._stateHexademicalCharacterReferenceStart(e);break}case R.HEXADEMICAL_CHARACTER_REFERENCE:{this._stateHexademicalCharacterReference(e);break}case R.DECIMAL_CHARACTER_REFERENCE:{this._stateDecimalCharacterReference(e);break}case R.NUMERIC_CHARACTER_REFERENCE_END:{this._stateNumericCharacterReferenceEnd(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case _.AMPERSAND:{this.returnState=R.DATA,this.state=R.CHARACTER_REFERENCE;break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(e);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case _.AMPERSAND:{this.returnState=R.RCDATA,this.state=R.CHARACTER_REFERENCE;break}case _.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case _.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case _.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case _.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(wt);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Mo(e))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(e);else switch(e){case _.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(e);break}case _.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Mo(e))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(e);else switch(e){case _.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=R.DATA;break}case _.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("");break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(wt);break}case _.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===_.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Mo(e)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Mo(e)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break}case _.NULL:{this._err(ee.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(wt);break}case _.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===_.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Qi.SCRIPT,!1)&&c4(this.preprocessor.peek(Qi.SCRIPT.length))){this._emitCodePoint(e);for(let i=0;i1114111)this._err(ee.characterReferenceOutsideUnicodeRange),this.charRefCode=_.REPLACEMENT_CHARACTER;else if(Qd(this.charRefCode))this._err(ee.surrogateCharacterReference),this.charRefCode=_.REPLACEMENT_CHARACTER;else if(Ad(this.charRefCode))this._err(ee.noncharacterCharacterReference);else if(_d(this.charRefCode)||this.charRefCode===_.CARRIAGE_RETURN){this._err(ee.controlCharacterReference);let i=tN.get(this.charRefCode);i!==void 0&&(this.charRefCode=i)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}};var O4=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),d4=new Set([...O4,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Rd=new Map([[g.APPLET,ae.HTML],[g.CAPTION,ae.HTML],[g.HTML,ae.HTML],[g.MARQUEE,ae.HTML],[g.OBJECT,ae.HTML],[g.TABLE,ae.HTML],[g.TD,ae.HTML],[g.TEMPLATE,ae.HTML],[g.TH,ae.HTML],[g.ANNOTATION_XML,ae.MATHML],[g.MI,ae.MATHML],[g.MN,ae.MATHML],[g.MO,ae.MATHML],[g.MS,ae.MATHML],[g.MTEXT,ae.MATHML],[g.DESC,ae.SVG],[g.FOREIGN_OBJECT,ae.SVG],[g.TITLE,ae.SVG]]),oN=[g.H1,g.H2,g.H3,g.H4,g.H5,g.H6],sN=[g.TR,g.TEMPLATE,g.HTML],aN=[g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML],lN=[g.TABLE,g.TEMPLATE,g.HTML],cN=[g.TD,g.TH],Ld=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,i,n){this.treeAdapter=i,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ae.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,i){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=i,this.currentTagId=i,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,i,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,i){let n=this._indexOf(e);this.items[n]=i,n===this.stackTop&&(this.current=i)}insertAfter(e,i,n){let r=this._indexOf(e)+1;this.items.splice(r,0,i),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let i=this.stackTop+1;do i=this.tagIDs.lastIndexOf(e,i-1);while(i>0&&this.treeAdapter.getNamespaceURI(this.items[i])!==ae.HTML);this.shortenToLength(i<0?0:i)}shortenToLength(e){for(;this.stackTop>=e;){let i=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(i,this.stackTop=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===i)return n;return-1}clearBackTo(e,i){let n=this._indexOfTagNames(e,i);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(lN,ae.HTML)}clearBackToTableBodyContext(){this.clearBackTo(aN,ae.HTML)}clearBackToTableRowContext(){this.clearBackTo(sN,ae.HTML)}remove(e){let i=this._indexOf(e);i>=0&&(i===this.stackTop?this.pop():(this.items.splice(i,1),this.tagIDs.splice(i,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let i=this._indexOf(e)-1;return i>=0?this.items[i]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInScope(e){for(let i=this.stackTop;i>=0;i--){let n=this.tagIDs[i],r=this.treeAdapter.getNamespaceURI(this.items[i]);if(n===e&&r===ae.HTML)return!0;if(Rd.get(n)===r)return!1}return!0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let i=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if(tu(i)&&n===ae.HTML)return!0;if(Rd.get(i)===n)return!1}return!0}hasInListItemScope(e){for(let i=this.stackTop;i>=0;i--){let n=this.tagIDs[i],r=this.treeAdapter.getNamespaceURI(this.items[i]);if(n===e&&r===ae.HTML)return!0;if((n===g.UL||n===g.OL)&&r===ae.HTML||Rd.get(n)===r)return!1}return!0}hasInButtonScope(e){for(let i=this.stackTop;i>=0;i--){let n=this.tagIDs[i],r=this.treeAdapter.getNamespaceURI(this.items[i]);if(n===e&&r===ae.HTML)return!0;if(n===g.BUTTON&&r===ae.HTML||Rd.get(n)===r)return!1}return!0}hasInTableScope(e){for(let i=this.stackTop;i>=0;i--){let n=this.tagIDs[i];if(this.treeAdapter.getNamespaceURI(this.items[i])===ae.HTML){if(n===e)return!0;if(n===g.TABLE||n===g.TEMPLATE||n===g.HTML)return!1}}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){let i=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===ae.HTML){if(i===g.TBODY||i===g.THEAD||i===g.TFOOT)return!0;if(i===g.TABLE||i===g.HTML)return!1}}return!0}hasInSelectScope(e){for(let i=this.stackTop;i>=0;i--){let n=this.tagIDs[i];if(this.treeAdapter.getNamespaceURI(this.items[i])===ae.HTML){if(n===e)return!0;if(n!==g.OPTION&&n!==g.OPTGROUP)return!1}}return!0}generateImpliedEndTags(){for(;O4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;d4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==e&&d4.has(this.currentTagId);)this.pop()}};var yn;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(yn=yn||(yn={}));var p4={type:yn.Marker},Id=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,i){let n=[],r=i.length,o=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let a=0;a[s.name,s.value])),o=0;for(let s=0;sr.get(l.name)===l.value)&&(o+=1,o>=3&&this.entries.splice(a.idx,1))}}insertMarker(){this.entries.unshift(p4)}pushElement(e,i){this._ensureNoahArkCondition(e),this.entries.unshift({type:yn.Element,element:e,token:i})}insertElementAfterBookmark(e,i){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:yn.Element,element:e,token:i})}removeEntry(e){let i=this.entries.indexOf(e);i>=0&&this.entries.splice(i,1)}clearToLastMarker(){let e=this.entries.indexOf(p4);e>=0?this.entries.splice(0,e+1):this.entries.length=0}getElementEntryInScopeWithTagName(e){let i=this.entries.find(n=>n.type===yn.Marker||this.treeAdapter.getTagName(n.element)===e);return i&&i.type===yn.Element?i:null}getElementEntry(e){return this.entries.find(i=>i.type===yn.Element&&i.element===e)}};function m4(t){return{nodeName:"#text",value:t,parentNode:null}}var zr={createDocument(){return{nodeName:"#document",mode:ai.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,i){return{nodeName:t,tagName:t,attrs:i,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,i){let n=t.childNodes.indexOf(i);t.childNodes.splice(n,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,i,n){let r=t.childNodes.find(o=>o.nodeName==="#documentType");if(r)r.name=e,r.publicId=i,r.systemId=n;else{let o={nodeName:"#documentType",name:e,publicId:i,systemId:n,parentNode:null};zr.appendChild(t,o)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){let e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){let i=t.childNodes[t.childNodes.length-1];if(zr.isTextNode(i)){i.value+=e;return}}zr.appendChild(t,m4(e))},insertTextBefore(t,e,i){let n=t.childNodes[t.childNodes.indexOf(i)-1];n&&zr.isTextNode(n)?n.value+=e:zr.insertBefore(t,m4(e),i)},adoptAttributes(t,e){let i=new Set(t.attrs.map(n=>n.name));for(let n=0;nt.startsWith(i))}function v4(t){return t.name===b4&&t.publicId===null&&(t.systemId===null||t.systemId===uN)}function w4(t){if(t.name!==b4)return ai.QUIRKS;let{systemId:e}=t;if(e&&e.toLowerCase()===fN)return ai.QUIRKS;let{publicId:i}=t;if(i!==null){if(i=i.toLowerCase(),dN.has(i))return ai.QUIRKS;let n=e===null?hN:y4;if(g4(i,n))return ai.QUIRKS;if(n=e===null?x4:ON,g4(i,n))return ai.LIMITED_QUIRKS}return ai.NO_QUIRKS}var Ud={};hc(Ud,{SVG_TAG_NAMES_ADJUSTMENT_MAP:()=>S4,adjustTokenMathMLAttrs:()=>Dd,adjustTokenSVGAttrs:()=>zd,adjustTokenSVGTagName:()=>Jb,adjustTokenXMLAttrs:()=>ou,causesExit:()=>Kb,isIntegrationPoint:()=>e1});var k4={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mN="definitionurl",gN="definitionURL",bN=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(t=>[t.toLowerCase(),t])),yN=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ae.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ae.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ae.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ae.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ae.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ae.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ae.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:ae.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:ae.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ae.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ae.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ae.XMLNS}]]),S4=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(t=>[t.toLowerCase(),t])),xN=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function Kb(t){let e=t.tagID;return e===g.FONT&&t.attrs.some(({name:n})=>n===Un.COLOR||n===Un.SIZE||n===Un.FACE)||xN.has(e)}function Dd(t){for(let e=0;e0&&this._setContextModes(e,i)}onItemPop(e,i){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)===null||r===void 0||r.call(n,e,this.openElements.current),i){let o,s;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,s=this.fragmentContextID):{current:o,currentTagId:s}=this.openElements,this._setContextModes(o,s)}}_setContextModes(e,i){let n=e===this.document||this.treeAdapter.getNamespaceURI(e)===ae.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(i,e)}_switchToTextParsing(e,i){this._insertElement(e,ae.HTML),this.tokenizer.state=i,this.originalInsertionMode=this.insertionMode,this.insertionMode=z.TEXT}switchToPlaintextParsing(){this.insertionMode=z.TEXT,this.originalInsertionMode=z.IN_BODY,this.tokenizer.state=Pt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===B.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ae.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Pt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Pt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Pt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Pt.PLAINTEXT;break}default:}}_setDocumentType(e){let i=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,i,n,r),e.location){let s=this.treeAdapter.getChildNodes(this.document).find(a=>this.treeAdapter.isDocumentTypeNode(a));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,i){if(this.options.sourceCodeLocationInfo){let n=i&&Ee(Y({},i),{startTag:i});this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,e)}}_appendElement(e,i){let n=this.treeAdapter.createElement(e.tagName,i,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,i){let n=this.treeAdapter.createElement(e.tagName,i,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,i){let n=this.treeAdapter.createElement(e,ae.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,i)}_insertTemplate(e){let i=this.treeAdapter.createElement(e.tagName,ae.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(i,n),this._attachElementToTree(i,e.location),this.openElements.push(i,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(B.HTML,ae.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,g.HTML)}_appendCommentNode(e,i){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(i,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let i,n;if(this._shouldFosterParentOnInsertion()?({parent:i,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(i,e.chars,n):this.treeAdapter.insertText(i,e.chars)):(i=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(i,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(i),o=n?r.lastIndexOf(n):r.length,s=r[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){let{endLine:l,endCol:c,endOffset:u}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,i){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(i,n)}_setEndLocation(e,i){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&i.location){let n=i.location,r=this.treeAdapter.getTagName(e),o=i.type===Ye.END_TAG&&r===i.tagName?{endTag:Y({},n),endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,o)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let i,n;return this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,n=this.fragmentContextID):{current:i,currentTagId:n}=this.openElements,e.tagID===g.SVG&&this.treeAdapter.getTagName(i)===B.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(i)===ae.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===g.MGLYPH||e.tagID===g.MALIGNMARK)&&!this._isIntegrationPoint(n,i,ae.HTML)}_processToken(e){switch(e.type){case Ye.CHARACTER:{this.onCharacter(e);break}case Ye.NULL_CHARACTER:{this.onNullCharacter(e);break}case Ye.COMMENT:{this.onComment(e);break}case Ye.DOCTYPE:{this.onDoctype(e);break}case Ye.START_TAG:{this._processStartTag(e);break}case Ye.END_TAG:{this.onEndTag(e);break}case Ye.EOF:{this.onEof(e);break}case Ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,i,n){let r=this.treeAdapter.getNamespaceURI(i),o=this.treeAdapter.getAttrList(i);return e1(e,r,o,n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let i=this.activeFormattingElements.entries.findIndex(r=>r.type===yn.Marker||this.openElements.contains(r.element)),n=i<0?e-1:i-1;for(let r=n;r>=0;r--){let o=this.activeFormattingElements.entries[r];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=z.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case g.TR:{this.insertionMode=z.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=z.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=z.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=z.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=z.IN_TABLE;return}case g.BODY:{this.insertionMode=z.IN_BODY;return}case g.FRAMESET:{this.insertionMode=z.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(e);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?z.AFTER_HEAD:z.BEFORE_HEAD;return}case g.TD:case g.TH:{if(e>0){this.insertionMode=z.IN_CELL;return}break}case g.HEAD:{if(e>0){this.insertionMode=z.IN_HEAD;return}break}}this.insertionMode=z.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let i=e-1;i>0;i--){let n=this.openElements.tagIDs[i];if(n===g.TEMPLATE)break;if(n===g.TABLE){this.insertionMode=z.IN_SELECT_IN_TABLE;return}}this.insertionMode=z.IN_SELECT}_isElementCausesFosterParenting(e){return C4.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let i=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(i)===ae.HTML)return{parent:this.treeAdapter.getTemplateContent(i),beforeElement:null};break}case g.TABLE:{let n=this.treeAdapter.getParentNode(i);return n?{parent:n,beforeElement:i}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let i=this._findFosterParentingLocation();i.beforeElement?this.treeAdapter.insertBefore(i.parent,e,i.beforeElement):this.treeAdapter.appendChild(i.parent,e)}_isSpecialElement(e,i){let n=this.treeAdapter.getNamespaceURI(e);return Hb[n].has(i)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ij(this,e);return}switch(this.insertionMode){case z.INITIAL:{su(this,e);break}case z.BEFORE_HTML:{lu(this,e);break}case z.BEFORE_HEAD:{cu(this,e);break}case z.IN_HEAD:{uu(this,e);break}case z.IN_HEAD_NO_SCRIPT:{fu(this,e);break}case z.AFTER_HEAD:{hu(this,e);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:{_4(this,e);break}case z.TEXT:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{t1(this,e);break}case z.IN_TABLE_TEXT:{I4(this,e);break}case z.IN_COLUMN_GROUP:{Nd(this,e);break}case z.AFTER_BODY:{qd(this,e);break}case z.AFTER_AFTER_BODY:{Md(this,e);break}default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tj(this,e);return}switch(this.insertionMode){case z.INITIAL:{su(this,e);break}case z.BEFORE_HTML:{lu(this,e);break}case z.BEFORE_HEAD:{cu(this,e);break}case z.IN_HEAD:{uu(this,e);break}case z.IN_HEAD_NO_SCRIPT:{fu(this,e);break}case z.AFTER_HEAD:{hu(this,e);break}case z.TEXT:{this._insertCharacters(e);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{t1(this,e);break}case z.IN_COLUMN_GROUP:{Nd(this,e);break}case z.AFTER_BODY:{qd(this,e);break}case z.AFTER_AFTER_BODY:{Md(this,e);break}default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){i1(this,e);return}switch(this.insertionMode){case z.INITIAL:case z.BEFORE_HTML:case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_TEMPLATE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{i1(this,e);break}case z.IN_TABLE_TEXT:{au(this,e);break}case z.AFTER_BODY:{XN(this,e);break}case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{RN(this,e);break}default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case z.INITIAL:{LN(this,e);break}case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:{this._err(e,ee.misplacedDoctype);break}case z.IN_TABLE_TEXT:{au(this,e);break}default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?nj(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case z.INITIAL:{su(this,e);break}case z.BEFORE_HTML:{IN(this,e);break}case z.BEFORE_HEAD:{zN(this,e);break}case z.IN_HEAD:{Mn(this,e);break}case z.IN_HEAD_NO_SCRIPT:{NN(this,e);break}case z.AFTER_HEAD:{jN(this,e);break}case z.IN_BODY:{xi(this,e);break}case z.IN_TABLE:{il(this,e);break}case z.IN_TABLE_TEXT:{au(this,e);break}case z.IN_CAPTION:{Uq(this,e);break}case z.IN_COLUMN_GROUP:{s1(this,e);break}case z.IN_TABLE_BODY:{Vd(this,e);break}case z.IN_ROW:{Zd(this,e);break}case z.IN_CELL:{qq(this,e);break}case z.IN_SELECT:{U4(this,e);break}case z.IN_SELECT_IN_TABLE:{Wq(this,e);break}case z.IN_TEMPLATE:{Zq(this,e);break}case z.AFTER_BODY:{Yq(this,e);break}case z.IN_FRAMESET:{Fq(this,e);break}case z.AFTER_FRAMESET:{Gq(this,e);break}case z.AFTER_AFTER_BODY:{Jq(this,e);break}case z.AFTER_AFTER_FRAMESET:{ej(this,e);break}default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?rj(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case z.INITIAL:{su(this,e);break}case z.BEFORE_HTML:{DN(this,e);break}case z.BEFORE_HEAD:{UN(this,e);break}case z.IN_HEAD:{MN(this,e);break}case z.IN_HEAD_NO_SCRIPT:{qN(this,e);break}case z.AFTER_HEAD:{WN(this,e);break}case z.IN_BODY:{Wd(this,e);break}case z.TEXT:{Qq(this,e);break}case z.IN_TABLE:{du(this,e);break}case z.IN_TABLE_TEXT:{au(this,e);break}case z.IN_CAPTION:{Mq(this,e);break}case z.IN_COLUMN_GROUP:{Nq(this,e);break}case z.IN_TABLE_BODY:{n1(this,e);break}case z.IN_ROW:{z4(this,e);break}case z.IN_CELL:{jq(this,e);break}case z.IN_SELECT:{M4(this,e);break}case z.IN_SELECT_IN_TABLE:{Vq(this,e);break}case z.IN_TEMPLATE:{Bq(this,e);break}case z.AFTER_BODY:{q4(this,e);break}case z.IN_FRAMESET:{Hq(this,e);break}case z.AFTER_FRAMESET:{Kq(this,e);break}case z.AFTER_AFTER_BODY:{Md(this,e);break}default:}}onEof(e){switch(this.insertionMode){case z.INITIAL:{su(this,e);break}case z.BEFORE_HTML:{lu(this,e);break}case z.BEFORE_HEAD:{cu(this,e);break}case z.IN_HEAD:{uu(this,e);break}case z.IN_HEAD_NO_SCRIPT:{fu(this,e);break}case z.AFTER_HEAD:{hu(this,e);break}case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{R4(this,e);break}case z.TEXT:{_q(this,e);break}case z.IN_TABLE_TEXT:{au(this,e);break}case z.IN_TEMPLATE:{N4(this,e);break}case z.AFTER_BODY:case z.IN_FRAMESET:case z.AFTER_FRAMESET:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{o1(this,e);break}default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===_.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.TEXT:case z.IN_COLUMN_GROUP:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{this._insertCharacters(e);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:case z.AFTER_BODY:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{Q4(this,e);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{t1(this,e);break}case z.IN_TABLE_TEXT:{L4(this,e);break}default:}}};function PN(t,e){let i=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return i?t.openElements.contains(i.element)?t.openElements.hasInScope(e.tagID)||(i=null):(t.activeFormattingElements.removeEntry(i),i=null):X4(t,e),i}function CN(t,e){let i=null,n=t.openElements.stackTop;for(;n>=0;n--){let r=t.openElements.items[n];if(r===e.element)break;t._isSpecialElement(r,t.openElements.tagIDs[n])&&(i=r)}return i||(t.openElements.shortenToLength(n<0?0:n),t.activeFormattingElements.removeEntry(e)),i}function QN(t,e,i){let n=e,r=t.openElements.getCommonAncestor(e);for(let o=0,s=r;s!==i;o++,s=r){r=t.openElements.getCommonAncestor(s);let a=t.activeFormattingElements.getElementEntry(s),l=a&&o>=TN;!a||l?(l&&t.activeFormattingElements.removeEntry(a),t.openElements.remove(s)):(s=_N(t,a),n===e&&(t.activeFormattingElements.bookmark=a),t.treeAdapter.detachNode(n),t.treeAdapter.appendChild(s,n),n=s)}return n}function _N(t,e){let i=t.treeAdapter.getNamespaceURI(e.element),n=t.treeAdapter.createElement(e.token.tagName,i,e.token.attrs);return t.openElements.replace(e.element,n),e.element=n,n}function AN(t,e,i){let n=t.treeAdapter.getTagName(e),r=Uo(n);if(t._isElementCausesFosterParenting(r))t._fosterParentElement(i);else{let o=t.treeAdapter.getNamespaceURI(e);r===g.TEMPLATE&&o===ae.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,i)}}function $N(t,e,i){let n=t.treeAdapter.getNamespaceURI(i.element),{token:r}=i,o=t.treeAdapter.createElement(r.tagName,n,r.attrs);t._adoptNodes(e,o),t.treeAdapter.appendChild(e,o),t.activeFormattingElements.insertElementAfterBookmark(o,r),t.activeFormattingElements.removeEntry(i),t.openElements.remove(i.element),t.openElements.insertAfter(e,o,r.tagID)}function r1(t,e){for(let i=0;i=i;n--)t._setEndLocation(t.openElements.items[n],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){let n=t.openElements.items[0],r=t.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(t._setEndLocation(n,e),t.openElements.stackTop>=1)){let o=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(o);s&&!s.endTag&&t._setEndLocation(o,e)}}}}function LN(t,e){t._setDocumentType(e);let i=e.forceQuirks?ai.QUIRKS:w4(e);v4(e)||t._err(e,ee.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,i),t.insertionMode=z.BEFORE_HTML}function su(t,e){t._err(e,ee.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,ai.QUIRKS),t.insertionMode=z.BEFORE_HTML,t._processToken(e)}function IN(t,e){e.tagID===g.HTML?(t._insertElement(e,ae.HTML),t.insertionMode=z.BEFORE_HEAD):lu(t,e)}function DN(t,e){let i=e.tagID;(i===g.HTML||i===g.HEAD||i===g.BODY||i===g.BR)&&lu(t,e)}function lu(t,e){t._insertFakeRootElement(),t.insertionMode=z.BEFORE_HEAD,t._processToken(e)}function zN(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.HEAD:{t._insertElement(e,ae.HTML),t.headElement=t.openElements.current,t.insertionMode=z.IN_HEAD;break}default:cu(t,e)}}function UN(t,e){let i=e.tagID;i===g.HEAD||i===g.BODY||i===g.HTML||i===g.BR?cu(t,e):t._err(e,ee.endTagWithoutMatchingOpenElement)}function cu(t,e){t._insertFakeElement(B.HEAD,g.HEAD),t.headElement=t.openElements.current,t.insertionMode=z.IN_HEAD,t._processToken(e)}function Mn(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{t._appendElement(e,ae.HTML),e.ackSelfClosing=!0;break}case g.TITLE:{t._switchToTextParsing(e,Pt.RCDATA);break}case g.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,Pt.RAWTEXT):(t._insertElement(e,ae.HTML),t.insertionMode=z.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{t._switchToTextParsing(e,Pt.RAWTEXT);break}case g.SCRIPT:{t._switchToTextParsing(e,Pt.SCRIPT_DATA);break}case g.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=z.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(z.IN_TEMPLATE);break}case g.HEAD:{t._err(e,ee.misplacedStartTagForHeadElement);break}default:uu(t,e)}}function MN(t,e){switch(e.tagID){case g.HEAD:{t.openElements.pop(),t.insertionMode=z.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{uu(t,e);break}case g.TEMPLATE:{Rs(t,e);break}default:t._err(e,ee.endTagWithoutMatchingOpenElement)}}function Rs(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==g.TEMPLATE&&t._err(e,ee.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,ee.endTagWithoutMatchingOpenElement)}function uu(t,e){t.openElements.pop(),t.insertionMode=z.AFTER_HEAD,t._processToken(e)}function NN(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Mn(t,e);break}case g.NOSCRIPT:{t._err(e,ee.nestedNoscriptInHead);break}default:fu(t,e)}}function qN(t,e){switch(e.tagID){case g.NOSCRIPT:{t.openElements.pop(),t.insertionMode=z.IN_HEAD;break}case g.BR:{fu(t,e);break}default:t._err(e,ee.endTagWithoutMatchingOpenElement)}}function fu(t,e){let i=e.type===Ye.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;t._err(e,i),t.openElements.pop(),t.insertionMode=z.IN_HEAD,t._processToken(e)}function jN(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.BODY:{t._insertElement(e,ae.HTML),t.framesetOk=!1,t.insertionMode=z.IN_BODY;break}case g.FRAMESET:{t._insertElement(e,ae.HTML),t.insertionMode=z.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{t._err(e,ee.abandonedHeadElementChild),t.openElements.push(t.headElement,g.HEAD),Mn(t,e),t.openElements.remove(t.headElement);break}case g.HEAD:{t._err(e,ee.misplacedStartTagForHeadElement);break}default:hu(t,e)}}function WN(t,e){switch(e.tagID){case g.BODY:case g.HTML:case g.BR:{hu(t,e);break}case g.TEMPLATE:{Rs(t,e);break}default:t._err(e,ee.endTagWithoutMatchingOpenElement)}}function hu(t,e){t._insertFakeElement(B.BODY,g.BODY),t.insertionMode=z.IN_BODY,jd(t,e)}function jd(t,e){switch(e.type){case Ye.CHARACTER:{_4(t,e);break}case Ye.WHITESPACE_CHARACTER:{Q4(t,e);break}case Ye.COMMENT:{i1(t,e);break}case Ye.START_TAG:{xi(t,e);break}case Ye.END_TAG:{Wd(t,e);break}case Ye.EOF:{R4(t,e);break}default:}}function Q4(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function _4(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function VN(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function ZN(t,e){let i=t.openElements.tryPeekProperlyNestedBodyElement();i&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(i,e.attrs))}function BN(t,e){let i=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&i&&(t.treeAdapter.detachNode(i),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,ae.HTML),t.insertionMode=z.IN_FRAMESET)}function YN(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML)}function FN(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),tu(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,ae.HTML)}function HN(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function GN(t,e){let i=t.openElements.tmplCount>0;(!t.formElement||i)&&(t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML),i||(t.formElement=t.openElements.current))}function KN(t,e){t.framesetOk=!1;let i=e.tagID;for(let n=t.openElements.stackTop;n>=0;n--){let r=t.openElements.tagIDs[n];if(i===g.LI&&r===g.LI||(i===g.DD||i===g.DT)&&(r===g.DD||r===g.DT)){t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r);break}if(r!==g.ADDRESS&&r!==g.DIV&&r!==g.P&&t._isSpecialElement(t.openElements.items[n],r))break}t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML)}function JN(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML),t.tokenizer.state=Pt.PLAINTEXT}function eq(t,e){t.openElements.hasInScope(g.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML),t.framesetOk=!1}function tq(t,e){let i=t.activeFormattingElements.getElementEntryInScopeWithTagName(B.A);i&&(r1(t,e),t.openElements.remove(i.element),t.activeFormattingElements.removeEntry(i)),t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function iq(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function nq(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(g.NOBR)&&(r1(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,ae.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function rq(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function oq(t,e){t.treeAdapter.getDocumentMode(t.document)!==ai.QUIRKS&&t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ae.HTML),t.framesetOk=!1,t.insertionMode=z.IN_TABLE}function A4(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,ae.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function $4(t){let e=eu(t,Un.TYPE);return e!=null&&e.toLowerCase()===kN}function sq(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,ae.HTML),$4(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function aq(t,e){t._appendElement(e,ae.HTML),e.ackSelfClosing=!0}function lq(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._appendElement(e,ae.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function cq(t,e){e.tagName=B.IMG,e.tagID=g.IMG,A4(t,e)}function uq(t,e){t._insertElement(e,ae.HTML),t.skipNextNewLine=!0,t.tokenizer.state=Pt.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=z.TEXT}function fq(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,Pt.RAWTEXT)}function hq(t,e){t.framesetOk=!1,t._switchToTextParsing(e,Pt.RAWTEXT)}function E4(t,e){t._switchToTextParsing(e,Pt.RAWTEXT)}function dq(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===z.IN_TABLE||t.insertionMode===z.IN_CAPTION||t.insertionMode===z.IN_TABLE_BODY||t.insertionMode===z.IN_ROW||t.insertionMode===z.IN_CELL?z.IN_SELECT_IN_TABLE:z.IN_SELECT}function Oq(t,e){t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML)}function pq(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,ae.HTML)}function mq(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(g.RTC),t._insertElement(e,ae.HTML)}function gq(t,e){t._reconstructActiveFormattingElements(),Dd(e),ou(e),e.selfClosing?t._appendElement(e,ae.MATHML):t._insertElement(e,ae.MATHML),e.ackSelfClosing=!0}function bq(t,e){t._reconstructActiveFormattingElements(),zd(e),ou(e),e.selfClosing?t._appendElement(e,ae.SVG):t._insertElement(e,ae.SVG),e.ackSelfClosing=!0}function P4(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ae.HTML)}function xi(t,e){switch(e.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{iq(t,e);break}case g.A:{tq(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{FN(t,e);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{YN(t,e);break}case g.LI:case g.DD:case g.DT:{KN(t,e);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{A4(t,e);break}case g.HR:{lq(t,e);break}case g.RB:case g.RTC:{pq(t,e);break}case g.RT:case g.RP:{mq(t,e);break}case g.PRE:case g.LISTING:{HN(t,e);break}case g.XMP:{fq(t,e);break}case g.SVG:{bq(t,e);break}case g.HTML:{VN(t,e);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Mn(t,e);break}case g.BODY:{ZN(t,e);break}case g.FORM:{GN(t,e);break}case g.NOBR:{nq(t,e);break}case g.MATH:{gq(t,e);break}case g.TABLE:{oq(t,e);break}case g.INPUT:{sq(t,e);break}case g.PARAM:case g.TRACK:case g.SOURCE:{aq(t,e);break}case g.IMAGE:{cq(t,e);break}case g.BUTTON:{eq(t,e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{rq(t,e);break}case g.IFRAME:{hq(t,e);break}case g.SELECT:{dq(t,e);break}case g.OPTION:case g.OPTGROUP:{Oq(t,e);break}case g.NOEMBED:{E4(t,e);break}case g.FRAMESET:{BN(t,e);break}case g.TEXTAREA:{uq(t,e);break}case g.NOSCRIPT:{t.options.scriptingEnabled?E4(t,e):P4(t,e);break}case g.PLAINTEXT:{JN(t,e);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:P4(t,e)}}function yq(t,e){if(t.openElements.hasInScope(g.BODY)&&(t.insertionMode=z.AFTER_BODY,t.options.sourceCodeLocationInfo)){let i=t.openElements.tryPeekProperlyNestedBodyElement();i&&t._setEndLocation(i,e)}}function xq(t,e){t.openElements.hasInScope(g.BODY)&&(t.insertionMode=z.AFTER_BODY,q4(t,e))}function vq(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(i))}function wq(t){let e=t.openElements.tmplCount>0,{formElement:i}=t;e||(t.formElement=null),(i||e)&&t.openElements.hasInScope(g.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(g.FORM):i&&t.openElements.remove(i))}function kq(t){t.openElements.hasInButtonScope(g.P)||t._insertFakeElement(B.P,g.P),t._closePElement()}function Sq(t){t.openElements.hasInListItemScope(g.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(g.LI),t.openElements.popUntilTagNamePopped(g.LI))}function Tq(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i))}function Eq(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function Pq(t,e){let i=e.tagID;t.openElements.hasInScope(i)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(i),t.activeFormattingElements.clearToLastMarker())}function Cq(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(B.BR,g.BR),t.openElements.pop(),t.framesetOk=!1}function X4(t,e){let i=e.tagName,n=e.tagID;for(let r=t.openElements.stackTop;r>0;r--){let o=t.openElements.items[r],s=t.openElements.tagIDs[r];if(n===s&&(n!==g.UNKNOWN||t.treeAdapter.getTagName(o)===i)){t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.stackTop>=r&&t.openElements.shortenToLength(r);break}if(t._isSpecialElement(o,s))break}}function Wd(t,e){switch(e.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{r1(t,e);break}case g.P:{kq(t);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{vq(t,e);break}case g.LI:{Sq(t);break}case g.DD:case g.DT:{Tq(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{Eq(t);break}case g.BR:{Cq(t);break}case g.BODY:{yq(t,e);break}case g.HTML:{xq(t,e);break}case g.FORM:{wq(t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{Pq(t,e);break}case g.TEMPLATE:{Rs(t,e);break}default:X4(t,e)}}function R4(t,e){t.tmplInsertionModeStack.length>0?N4(t,e):o1(t,e)}function Qq(t,e){var i;e.tagID===g.SCRIPT&&((i=t.scriptHandler)===null||i===void 0||i.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function _q(t,e){t._err(e,ee.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function t1(t,e){if(C4.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=z.IN_TABLE_TEXT,e.type){case Ye.CHARACTER:{I4(t,e);break}case Ye.WHITESPACE_CHARACTER:{L4(t,e);break}}else Ou(t,e)}function Aq(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,ae.HTML),t.insertionMode=z.IN_CAPTION}function $q(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,ae.HTML),t.insertionMode=z.IN_COLUMN_GROUP}function Xq(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(B.COLGROUP,g.COLGROUP),t.insertionMode=z.IN_COLUMN_GROUP,s1(t,e)}function Rq(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,ae.HTML),t.insertionMode=z.IN_TABLE_BODY}function Lq(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(B.TBODY,g.TBODY),t.insertionMode=z.IN_TABLE_BODY,Vd(t,e)}function Iq(t,e){t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function Dq(t,e){$4(e)?t._appendElement(e,ae.HTML):Ou(t,e),e.ackSelfClosing=!0}function zq(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,ae.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function il(t,e){switch(e.tagID){case g.TD:case g.TH:case g.TR:{Lq(t,e);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Mn(t,e);break}case g.COL:{Xq(t,e);break}case g.FORM:{zq(t,e);break}case g.TABLE:{Iq(t,e);break}case g.TBODY:case g.TFOOT:case g.THEAD:{Rq(t,e);break}case g.INPUT:{Dq(t,e);break}case g.CAPTION:{Aq(t,e);break}case g.COLGROUP:{$q(t,e);break}default:Ou(t,e)}}function du(t,e){switch(e.tagID){case g.TABLE:{t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode());break}case g.TEMPLATE:{Rs(t,e);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ou(t,e)}}function Ou(t,e){let i=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,jd(t,e),t.fosterParentingEnabled=i}function L4(t,e){t.pendingCharacterTokens.push(e)}function I4(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function au(t,e){let i=0;if(t.hasNonWhitespacePendingCharacterToken)for(;i0&&t.openElements.currentTagId===g.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===g.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop();break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop();break}case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode());break}case g.TEMPLATE:{Rs(t,e);break}default:}}function Wq(t,e){let i=e.tagID;i===g.CAPTION||i===g.TABLE||i===g.TBODY||i===g.TFOOT||i===g.THEAD||i===g.TR||i===g.TD||i===g.TH?(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t._processStartTag(e)):U4(t,e)}function Vq(t,e){let i=e.tagID;i===g.CAPTION||i===g.TABLE||i===g.TBODY||i===g.TFOOT||i===g.THEAD||i===g.TR||i===g.TD||i===g.TH?t.openElements.hasInTableScope(i)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t.onEndTag(e)):M4(t,e)}function Zq(t,e){switch(e.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Mn(t,e);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.tmplInsertionModeStack[0]=z.IN_TABLE,t.insertionMode=z.IN_TABLE,il(t,e);break}case g.COL:{t.tmplInsertionModeStack[0]=z.IN_COLUMN_GROUP,t.insertionMode=z.IN_COLUMN_GROUP,s1(t,e);break}case g.TR:{t.tmplInsertionModeStack[0]=z.IN_TABLE_BODY,t.insertionMode=z.IN_TABLE_BODY,Vd(t,e);break}case g.TD:case g.TH:{t.tmplInsertionModeStack[0]=z.IN_ROW,t.insertionMode=z.IN_ROW,Zd(t,e);break}default:t.tmplInsertionModeStack[0]=z.IN_BODY,t.insertionMode=z.IN_BODY,xi(t,e)}}function Bq(t,e){e.tagID===g.TEMPLATE&&Rs(t,e)}function N4(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):o1(t,e)}function Yq(t,e){e.tagID===g.HTML?xi(t,e):qd(t,e)}function q4(t,e){var i;if(e.tagID===g.HTML){if(t.fragmentContext||(t.insertionMode=z.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===g.HTML){t._setEndLocation(t.openElements.items[0],e);let n=t.openElements.items[1];n&&!(!((i=t.treeAdapter.getNodeSourceCodeLocation(n))===null||i===void 0)&&i.endTag)&&t._setEndLocation(n,e)}}else qd(t,e)}function qd(t,e){t.insertionMode=z.IN_BODY,jd(t,e)}function Fq(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.FRAMESET:{t._insertElement(e,ae.HTML);break}case g.FRAME:{t._appendElement(e,ae.HTML),e.ackSelfClosing=!0;break}case g.NOFRAMES:{Mn(t,e);break}default:}}function Hq(t,e){e.tagID===g.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==g.FRAMESET&&(t.insertionMode=z.AFTER_FRAMESET))}function Gq(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.NOFRAMES:{Mn(t,e);break}default:}}function Kq(t,e){e.tagID===g.HTML&&(t.insertionMode=z.AFTER_AFTER_FRAMESET)}function Jq(t,e){e.tagID===g.HTML?xi(t,e):Md(t,e)}function Md(t,e){t.insertionMode=z.IN_BODY,jd(t,e)}function ej(t,e){switch(e.tagID){case g.HTML:{xi(t,e);break}case g.NOFRAMES:{Mn(t,e);break}default:}}function tj(t,e){e.chars=wt,t._insertCharacters(e)}function ij(t,e){t._insertCharacters(e),t.framesetOk=!1}function j4(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==ae.HTML&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function nj(t,e){if(Kb(e))j4(t),t._startTagOutsideForeignContent(e);else{let i=t._getAdjustedCurrentElement(),n=t.treeAdapter.getNamespaceURI(i);n===ae.MATHML?Dd(e):n===ae.SVG&&(Jb(e),zd(e)),ou(e),e.selfClosing?t._appendElement(e,n):t._insertElement(e,n),e.ackSelfClosing=!0}}function rj(t,e){if(e.tagID===g.P||e.tagID===g.BR){j4(t),t._endTagOutsideForeignContent(e);return}for(let i=t.openElements.stackTop;i>0;i--){let n=t.openElements.items[i];if(t.treeAdapter.getNamespaceURI(n)===ae.HTML){t._endTagOutsideForeignContent(e);break}let r=t.treeAdapter.getTagName(n);if(r.toLowerCase()===e.tagName){e.tagName=r,t.openElements.shortenToLength(i);break}}}var oj=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),_ye=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function a1(t,e){return function(n){let r,o=0,s="";for(;r=t.exec(n);)o!==r.index&&(s+=n.substring(o,r.index)),s+=e.get(r[0].charCodeAt(0)),o=r.index+1;return s+n.substring(o)}}var Aye=a1(/[&<>'"]/g,oj),sj=a1(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),aj=a1(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Iye=new Set([B.AREA,B.BASE,B.BASEFONT,B.BGSOUND,B.BR,B.COL,B.EMBED,B.FRAME,B.HR,B.IMG,B.INPUT,B.KEYGEN,B.LINK,B.META,B.PARAM,B.SOURCE,B.TRACK,B.WBR]);function W4(t,e){return Ur.parse(t,e)}function V4(t,e,i){typeof t=="string"&&(i=e,e=t,t=null);let n=Ur.getFragmentParser(t,i);return n.tokenizer.write(e,!0),n.getFragment()}var lj=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Z4={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Bd(t,e){let i=bj(t),n=Va("type",{handlers:{root:cj,element:uj,text:fj,comment:Y4,doctype:hj,raw:Oj},unknown:pj}),r={parser:i?new Ur(Z4):Ur.getFragmentParser(void 0,Z4),handle(a){n(a,r)},stitches:!1,options:e||{}};n(t,r),nl(r,mn());let o=i?r.parser.document:r.parser.getFragment(),s=Jc(o,{file:r.options.file});return r.stitches&&bi(s,"comment",function(a,l,c){let u=a;if(u.value.stitch&&c&&l!==void 0){let f=c.children;return f[l]=u.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function B4(t,e){let i=-1;if(t)for(;++ic&&(c=u):u&&(c!==void 0&&c>-1&&l.push(` -`.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function oE(t,e,i){return t.type==="element"?Xj(t,e,i):t.type==="text"?i.whitespace==="normal"?sE(t,i):Rj(t):[]}function Xj(t,e,i){let n=aE(t,i),r=t.children||[],o=-1,s=[];if($j(t))return s;let a,l;for(u1(t)||nE(t)&&Fd(e,t,nE)?l=` -`:Aj(t)?(a=2,l=2):rE(t)&&(a=1,l=1);++o`",url:!1},abruptClosingOfEmptyComment:{reason:"Unexpected abruptly closed empty comment",description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:"Unexpected abruptly closed public identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:"Unexpected abruptly closed system identifier",description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:"Unexpected non-digit at start of numeric character reference",description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:"Unexpected CDATA section in HTML",description:"Unexpected `` in ``",description:"Unexpected text character `%c`. Only use text in `