=0;D--){var N=a[D];if(N.prefix===""&&N.namespace===i.namespaceURI){m=N.namespace;break}}if(m!==i.namespaceURI)for(var D=a.length-1;D>=0;D--){var N=a[D];if(N.namespace===i.namespaceURI){N.prefix&&(h=N.prefix+":"+d);break}}}if(o&&!re.test(h))throw new E(H,'The element name "'+h+'" is not a valid XML QName');t.push("<",h);for(var v=a.slice(),g=0;g"),c&&/^script$/i.test(d)){for(;C;)C.data?t.push(C.data):lt(C,t,c,r,v.slice(),o),C=C.nextSibling;return t.push("",d,">"),null}return{ns:v,isHTML:c,tag:h}}else return t.push("/>"),null;case Pt:case Y:return{ns:a.slice(),isHTML:c,tag:null};case ne:return _e(t,i.name,i.value,o),null;case ge:return t.push(i.data.replace(/[<&>]/g,Xt)),null;case qt:if(o&&i.data.indexOf("]]>")!==-1)throw new E(H,'The CDATASection data contains "]]>"');return t.push("/g,"]]]]>"),"]]>"),null;case ut:if(o&&i.data.indexOf("-->")!==-1)throw new E(H,'The comment node data contains "-->"');return t.push(""),null;case kt:if(o){if(!re.test(i.name))throw new E(H,'The doctype name "'+i.name+'" is not a valid XML Name');if(i.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(i.publicId))throw new E(H,"DocumentType publicId is not a valid PubidLiteral");if(i.systemId&&!/^("[^"]*"|'[^']*')$/.test(i.systemId))throw new E(H,"DocumentType systemId is not a valid SystemLiteral");if(i.internalSubset&&i.internalSubset.indexOf("]>")!==-1)throw new E(H,'DocumentType internalSubset contains "]>"')}var S=i.publicId,T=i.systemId;if(t.push("");else if(T&&T!=".")t.push(" SYSTEM ",T,">");else{var de=i.internalSubset;de&&t.push(" [",de,"]"),t.push(">")}return null;case tt:if(o){if(!re.test(i.target)||i.target.indexOf(":")!==-1||i.target.toLowerCase()==="xml")throw new E(H,'The processing instruction target "'+i.target+'" is not a valid XML NCName or is reserved');if(i.data.indexOf("?>")!==-1)throw new E(H,'The ProcessingInstruction data contains "?>"')}return t.push("",i.target," ",i.data,"?>"),null;case Mt:if(o&&!re.test(i.nodeName))throw new E(H,'The entity reference name "'+i.nodeName+'" is not a valid XML Name');return t.push("&",i.nodeName,";"),null;default:return t.push("??",i.nodeName),null}},exit:function(i,s){s&&s.tag&&t.push("",s.tag,">")}})}function ir(e,t,u){var r;return F(t,null,{enter:function(n,o){var i=n.cloneNode(!1);i.ownerDocument=e,i.parentNode=null,o===null?r=i:o.appendChild(i);var s=n.nodeType===ne||u;return s?i:null}}),r}function Kt(e,t,u){var r;return F(t,null,{enter:function(n,o){var i=new n.constructor;for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var a=n[s];typeof a!="object"&&a!=i[s]&&(i[s]=a)}n.childNodes&&(i.childNodes=new W),i.ownerDocument=e;var c=u;switch(i.nodeType){case z:var l=n.attributes,p=i.attributes=new Le,d=l.length;p._ownerElement=i;for(var h=0;h{"use strict";var tu=ue().freeze;Ne.XML_ENTITIES=tu({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Ne.HTML_ENTITIES=tu({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
-`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Ne.entityMap=Ne.HTML_ENTITIES});var au=K(mt=>{var ye=ue().NAMESPACE,ft=ue().tagNamePattern,oe=0,Q=1,ae=2,Te=3,se=4,ce=5,Se=6,Ge=7;function le(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,le)}le.prototype=new Error;le.prototype.name=le.name;function iu(){}iu.prototype={parse:function(e,t,u){var r=this.domBuilder;r.startDocument(),lr(t,t={}),or(e,t,u,r,this.errorHandler),r.endDocument()}};function or(e,t,u,r,n){function o(w){if(w>65535){w-=65536;var G=55296+(w>>10),_u=56320+(w&1023);return String.fromCharCode(G,_u)}else return String.fromCharCode(w)}function i(w){var G=w.slice(1,-1);return Object.hasOwnProperty.call(u,G)?u[G]:G.charAt(0)==="#"?o(parseInt(G.substr(1).replace("x","0x"))):(n.error("entity not found:"+w),w)}function s(w){if(w>f){var G=e.substring(f,w).replace(/?\w+;/g,i);d&&a(f),r.characters(G,0,w-f),f=w}}function a(w,G){for(;w>=l&&(G=p.exec(e));)c=G.index,l=c+G[0].length,d.lineNumber++;d.columnNumber=w-c+1}for(var c=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,d=r.locator,h=[{currentNSMap:t}],m={},f=0;;){try{var D=e.indexOf("<",f);if(D<0){if(!e.substr(f).match(/^\s*$/)){var N=r.doc,v=N.createTextNode(e.substr(f));N.appendChild(v),r.currentElement=v}return}switch(D>f&&s(D),e.charAt(D+1)){case"/":var T=e.indexOf(">",D+3),g=e.substring(D+2,T).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/,"$1"),A=h.pop();T<0?(g=e.substring(D+2).replace(/[\s<].*/,""),n.error("end tag name: "+g+" is not complete:"+A.tagName),T=D+1+g.length):g.match(/\s)?(g=g.replace(/[\s<].*/,""),n.error("end tag name: "+g+" maybe not complete"),T=D+1+g.length):/[ \t\n\r]/.test(g)&&ft.test(g.split(/[ \t\n\r]/)[0])&&n.error('end tag name is followed by whitespace and trailing content: "'+g+'"');var R=A.localNSMap,q=A.tagName==g,B=q||A.tagName&&A.tagName.toLowerCase()==g.toLowerCase();if(B){if(r.endElement(A.uri,A.localName,g),R)for(var O in R)Object.prototype.hasOwnProperty.call(R,O)&&r.endPrefixMapping(O);q||n.fatalError("end tag name: "+g+" is not match the current start tagName:"+A.tagName)}else h.push(A);T++;break;case"?":d&&a(D),T=fr(e,D,r);break;case"!":d&&a(D),T=pr(e,D,r,n);break;default:d&&a(D);var C=new ou,S=h[h.length-1].currentNSMap,T=ar(e,D,C,S,i,n),de=C.length;if(!C.closed&&cr(e,T,C.tagName,m)&&(C.closed=!0,u.nbsp||n.warning("unclosed xml attribute")),d&&de){for(var xu=ru(d,{}),We=0;Wef?f=T:s(Math.max(D,f)+1)}}function ru(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function ar(e,t,u,r,n,o){function i(h,m,f){u.attributeNames.hasOwnProperty(h)&&o.fatalError("Attribute "+h+" redefined"),u.addValue(h,m.replace(/[\t\n\r]/g," ").replace(/?\w+;/g,n),f)}for(var s,a,c=++t,l=oe;;){var p=e.charAt(c);if(l===oe&&p==="<")throw new Error("unexpected < in tag name: "+e.slice(t,c));switch(p){case"=":if(l===Q)s=e.slice(t,c),l=Te;else if(l===ae)l=Te;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(l===Te||l===Q)if(l===Q&&(o.warning('attribute value must after "="'),s=e.slice(t,c)),t=c+1,c=e.indexOf(p,t),c>0)a=e.slice(t,c),i(s,a,t-1),l=ce;else throw new Error("attribute value no end '"+p+"' match");else if(l==se)a=e.slice(t,c),i(s,a,t),o.warning('attribute "'+s+'" missed start quot('+p+")!!"),t=c+1,l=ce;else throw new Error('attribute value must after "="');break;case"/":switch(l){case oe:u.setTagName(e.slice(t,c));case ce:case Se:case Ge:l=Ge,u.closed=!0;case se:case Q:break;case ae:u.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),l==oe&&u.setTagName(e.slice(t,c)),c;case">":switch(l){case oe:u.setTagName(e.slice(t,c));case ce:case Se:case Ge:break;case se:case Q:a=e.slice(t,c),a.slice(-1)==="/"&&(u.closed=!0,a=a.slice(0,-1));case ae:l===ae&&(a=s),l==se?(o.warning('attribute "'+a+'" missed quot(")!'),i(s,a,t)):((!ye.isHTML(r[""])||!a.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),i(a,a,t));break;case Te:throw new Error("attribute value missed!!")}return c;case"\x80":p=" ";default:if(p<=" ")switch(l){case oe:u.setTagName(e.slice(t,c)),l=Se;break;case Q:s=e.slice(t,c),l=ae;break;case se:var a=e.slice(t,c);o.warning('attribute "'+a+'" missed quot(")!!'),i(s,a,t);case ce:l=Se;break}else switch(l){case ae:var d=u.tagName;(!ye.isHTML(r[""])||!s.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),i(s,s,t),t=c,l=Q;break;case ce:o.warning('attribute space is required"'+s+'"!!');case Se:l=Q,t=c;break;case Te:l=se,t=c;break;case Ge:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function nu(e,t,u){for(var r=e.tagName,n=null,p=e.length;p--;){var o=e[p],i=o.qName,s=o.value,d=i.indexOf(":");if(d>0)var a=o.prefix=i.slice(0,d),c=i.slice(d+1),l=a==="xmlns"&&c;else c=i,a=null,l=i==="xmlns"&&"";o.localName=c,l!==!1&&(n==null&&(n={},u=Object.create(u)),u[l]=n[l]=s,o.uri=ye.XMLNS,t.startPrefixMapping(l,s))}for(var p=e.length;p--;){o=e[p];var a=o.prefix;a&&(a==="xml"&&(o.uri=ye.XML),a!=="xmlns"&&(o.uri=u[a||""]))}var d=r.indexOf(":");d>0?(a=e.prefix=r.slice(0,d),c=e.localName=r.slice(d+1)):(a=null,c=e.localName=r);var h=e.uri=u[a||""];if(t.startElement(h,c,r,e),e.closed){if(t.endElement(h,c,r),n)for(a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.endPrefixMapping(a)}else return e.currentNSMap=u,e.localNSMap=n,!0}function sr(e,t,u,r,n){if(/^(?:script|textarea)$/i.test(u)){var o=e.indexOf(""+u+">",t),i=e.substring(t+1,o);if(/[&<]/.test(i))return/^script$/i.test(u)?(n.characters(i,0,i.length),o):(i=i.replace(/?\w+;/g,r),n.characters(i,0,i.length),o)}return t+1}function cr(e,t,u,r){var n=r[u];return n==null&&(n=e.lastIndexOf(""+u+">"),n",t+4);return o>t?(u.comment(e,t+4,o-t-4),o+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var o=e.indexOf("]]>",t+9);return u.startCDATA(),u.characters(e,t+9,o-t-9),u.endCDATA(),o+3}var i=mr(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,l=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var p=i[s-1];return u.startDTD(a,c,l),u.endDTD(),p.index+p[0].length}}return-1}function fr(e,t,u){var r=e.indexOf("?>",t);if(r){var n=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(n){var o=n[0].length;return u.processingInstruction(n[1],n[2]),r+2}else return-1}return-1}function ou(){this.attributeNames={}}ou.prototype={setTagName:function(e){if(!ft.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,u){if(!ft.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:u}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function mr(e,t){var u,r=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);u=n.exec(e);)if(r.push(u),u[1])return r}mt.XMLReader=iu;mt.ParseError=le});var du=K(He=>{var dr=ue(),Dr=pt(),su=uu(),pu=au(),hr=Dr.DOMImplementation,cu=dr.NAMESPACE,gr=pu.ParseError,Ar=pu.XMLReader;function fu(e){return e.replace(/\r[\n\u0085]/g,`
+(()=>{var Lu=Object.create;var Tt=Object.defineProperty;var Uu=Object.getOwnPropertyDescriptor;var qu=Object.getOwnPropertyNames;var Mu=Object.getPrototypeOf,Pu=Object.prototype.hasOwnProperty;var re=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(u){throw t=0,u}};var ku=(e,t,u,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of qu(t))!Pu.call(e,n)&&n!==u&&Tt(e,n,{get:()=>t[n],enumerable:!(r=Uu(t,n))||r.enumerable});return e};var Ae=(e,t,u)=>(u=e!=null?Lu(Mu(e)):{},ku(t||!e||!e.__esModule?Tt(u,"default",{value:e,enumerable:!0}):u,e));var xe=re((mn,St)=>{var Ee;typeof window<"u"?Ee=window:typeof global<"u"?Ee=global:typeof self<"u"?Ee=self:Ee={};St.exports=Ee});var oe=re(Z=>{"use strict";function zu(e,t,u){if(u===void 0&&(u=Array.prototype),e&&typeof u.find=="function")return u.find.call(e,t);for(var r=0;r{var ut=oe(),Y=ut.find,be=ut.NAMESPACE,ae=ut.tagNamePattern;function ju(e){return e!==""}function $u(e){return e?e.split(/[\t\n\f\r ]+/).filter(ju):[]}function Yu(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Rt(e){if(!e)return[];var t=$u(e);return Object.keys(t.reduce(Yu,{}))}function Wu(e){return function(t){return e&&e.indexOf(t)!==-1}}function Ne(e,t){for(var u in e)Object.prototype.hasOwnProperty.call(e,u)&&(t[u]=e[u])}function G(e,t){var u=e.prototype;if(!(u instanceof t)){let n=function(){};var r=n;n.prototype=t.prototype,n=new n,Ne(u,n),e.prototype=u=n}u.constructor!=e&&(typeof e!="function"&&console.error("unknown Class:"+e),u.constructor=e)}var z={},H=z.ELEMENT_NODE=1,se=z.ATTRIBUTE_NODE=2,ve=z.TEXT_NODE=3,Mt=z.CDATA_SECTION_NODE=4,Pt=z.ENTITY_REFERENCE_NODE=5,Zu=z.ENTITY_NODE=6,rt=z.PROCESSING_INSTRUCTION_NODE=7,nt=z.COMMENT_NODE=8,kt=z.DOCUMENT_NODE=9,Vt=z.DOCUMENT_TYPE_NODE=10,J=z.DOCUMENT_FRAGMENT_NODE=11,Ju=z.NOTATION_NODE=12,q={},x={},An=q.INDEX_SIZE_ERR=(x[1]="Index size error",1),En=q.DOMSTRING_SIZE_ERR=(x[2]="DOMString size error",2),V=q.HIERARCHY_REQUEST_ERR=(x[3]="Hierarchy request error",3),vn=q.WRONG_DOCUMENT_ERR=(x[4]="Wrong document",4),Ot=q.INVALID_CHARACTER_ERR=(x[5]="Invalid character",5),bn=q.NO_DATA_ALLOWED_ERR=(x[6]="No data allowed",6),Cn=q.NO_MODIFICATION_ALLOWED_ERR=(x[7]="No modification allowed",7),Gt=q.NOT_FOUND_ERR=(x[8]="Not found",8),Nn=q.NOT_SUPPORTED_ERR=(x[9]="Not supported",9),Ft=q.INUSE_ATTRIBUTE_ERR=(x[10]="Attribute in use",10),j=q.INVALID_STATE_ERR=(x[11]="Invalid state",11),Tn=q.SYNTAX_ERR=(x[12]="Syntax error",12),Sn=q.INVALID_MODIFICATION_ERR=(x[13]="Invalid modification",13),yn=q.NAMESPACE_ERR=(x[14]="Invalid namespace",14),wn=q.INVALID_ACCESS_ERR=(x[15]="Invalid access",15);function S(e,t){if(t instanceof Error)var u=t;else u=this,Error.call(this,x[e]),this.message=x[e],Error.captureStackTrace&&Error.captureStackTrace(this,S);return u.code=e,t&&(this.message=this.message+": "+t),u}S.prototype=Error.prototype;Ne(q,S);function Q(){}Q.prototype={length:0,item:function(e){return e>=0&&e=0){for(var n=t.length-1;r0},lookupPrefix:function(e){for(var t=this;t;){var u=t._nsMap;if(u){for(var r in u)if(Object.prototype.hasOwnProperty.call(u,r)&&u[r]===e)return r}t=t.nodeType==se?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var u=t._nsMap;if(u&&Object.prototype.hasOwnProperty.call(u,e))return u[e];t=t.nodeType==se?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){var t=this.lookupPrefix(e);return t==null}};function jt(e){return e=="<"&&"<"||e==">"&&">"||e=="&"&&"&"||e=='"'&&"""||""+e.charCodeAt()+";"}Ne(z,y);Ne(z,y.prototype);function Pe(e,t){return _(e,null,{enter:function(u){return t(u)?_.STOP:!0}})===_.STOP}function _(e,t,u){for(var r=[{node:e,context:t,phase:_.ENTER}];r.length>0;){var n=r.pop();if(n.phase===_.ENTER){var o=u.enter(n.node,n.context);if(o===_.STOP)return _.STOP;if(r.push({node:n.node,context:o,phase:_.EXIT}),o==null)continue;for(var i=n.node.lastChild;i;)r.push({node:i,context:o,phase:_.ENTER}),i=i.previousSibling}else u.exit&&u.exit(n.node,n.context)}}_.STOP=Symbol("walkDOM.STOP");_.ENTER=0;_.EXIT=1;function Te(){this.ownerDocument=this}function Ku(e,t,u){e&&e._inc++;var r=u.namespaceURI;r===be.XMLNS&&(t._nsMap[u.prefix?u.localName:""]=u.value)}function $t(e,t,u,r){e&&e._inc++;var n=u.namespaceURI;n===be.XMLNS&&delete t._nsMap[u.prefix?u.localName:""]}function Ge(e,t,u){if(e&&e._inc){e._inc++;var r=t.childNodes;if(u)r[r.length++]=u;else{for(var n=t.firstChild,o=0;n;)r[o++]=n,n=n.nextSibling;r.length=o,delete r[r.length]}}}function Yt(e,t){var u=t.previousSibling,r=t.nextSibling;return u?u.nextSibling=r:e.firstChild=r,r?r.previousSibling=u:e.lastChild=u,t.parentNode=null,t.previousSibling=null,t.nextSibling=null,Ge(e.ownerDocument,e),t}function er(e){return e&&(e.nodeType===y.DOCUMENT_NODE||e.nodeType===y.DOCUMENT_FRAGMENT_NODE||e.nodeType===y.ELEMENT_NODE)}function tr(e){return e&&(W(e)||ot(e)||K(e)||e.nodeType===y.DOCUMENT_FRAGMENT_NODE||e.nodeType===y.COMMENT_NODE||e.nodeType===y.PROCESSING_INSTRUCTION_NODE)}function K(e){return e&&e.nodeType===y.DOCUMENT_TYPE_NODE}function W(e){return e&&e.nodeType===y.ELEMENT_NODE}function ot(e){return e&&e.nodeType===y.TEXT_NODE}function Lt(e,t){var u=e.childNodes||[];if(Y(u,W)||K(t))return!1;var r=Y(u,K);return!(t&&r&&u.indexOf(r)>u.indexOf(t))}function Ut(e,t){var u=e.childNodes||[];function r(o){return W(o)&&o!==t}if(Y(u,r))return!1;var n=Y(u,K);return!(t&&n&&u.indexOf(n)>u.indexOf(t))}function ur(e,t,u){if(!er(e))throw new S(V,"Unexpected parent node type "+e.nodeType);if(u&&u.parentNode!==e)throw new S(Gt,"child not in parent");if(!tr(t)||K(t)&&e.nodeType!==y.DOCUMENT_NODE)throw new S(V,"Unexpected node type "+t.nodeType+" for parent node type "+e.nodeType)}function rr(e,t,u){var r=e.childNodes||[],n=t.childNodes||[];if(t.nodeType===y.DOCUMENT_FRAGMENT_NODE){var o=n.filter(W);if(o.length>1||Y(n,ot))throw new S(V,"More than one element or text in fragment");if(o.length===1&&!Lt(e,u))throw new S(V,"Element in fragment can not be inserted before doctype")}if(W(t)&&!Lt(e,u))throw new S(V,"Only one element can be added and only after doctype");if(K(t)){if(Y(r,K))throw new S(V,"Only one doctype is allowed");var i=Y(r,W);if(u&&r.indexOf(i)1||Y(n,ot))throw new S(V,"More than one element or text in fragment");if(o.length===1&&!Ut(e,u))throw new S(V,"Element in fragment can not be inserted before doctype")}if(W(t)&&!Ut(e,u))throw new S(V,"Only one element can be added and only after doctype");if(K(t)){let a=function(c){return K(c)&&c!==u};var s=a;if(Y(r,a))throw new S(V,"Only one doctype is allowed");var i=Y(r,W);if(u&&r.indexOf(i)0&&Pe(u.documentElement,function(n){if(n!==u&&n.nodeType===H){var o=n.getAttribute("class");if(o){var i=e===o;if(!i){var s=Rt(o);i=t.every(Wu(s))}i&&r.push(n)}}}),r})},createElement:function(e){var t=new ne;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new Q;var u=t.attributes=new Me;return u._ownerElement=t,t},createDocumentFragment:function(){var e=new He;return e.ownerDocument=this,e.childNodes=new Q,e},createTextNode:function(e){var t=new at;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new st;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){if(e.indexOf("]]>")!==-1)throw new S(Ot,'data contains "]]>"');var t=new ct;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var u=new pt;return u.ownerDocument=this,u.tagName=u.nodeName=u.target=e,u.nodeValue=u.data=t,u},createAttribute:function(e){var t=new Ve;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){if(!ae.test(e))throw new S(Ot,'not a valid xml name "'+e+'"');var t=new lt;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var u=new ne,r=t.split(":"),n=u.attributes=new Me;return u.childNodes=new Q,u.ownerDocument=this,u.nodeName=t,u.tagName=t,u.namespaceURI=e,r.length==2?(u.prefix=r[0],u.localName=r[1]):u.localName=t,n._ownerElement=u,u},createAttributeNS:function(e,t){var u=new Ve,r=t.split(":");return u.ownerDocument=this,u.nodeName=t,u.name=t,u.namespaceURI=e,u.specified=!0,r.length==2?(u.prefix=r[0],u.localName=r[1]):u.localName=t,u}};G(Te,y);function ne(){this._nsMap={}}ne.prototype={nodeType:H,hasAttribute:function(e){return this.getAttributeNode(e)!=null},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var u=this.ownerDocument.createAttribute(e);u.value=u.nodeValue=""+t,this.setAttributeNode(u)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===J?this.insertBefore(e,null):nr(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var u=this.getAttributeNodeNS(e,t);u&&this.removeAttributeNode(u)},hasAttributeNS:function(e,t){return this.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){var u=this.getAttributeNodeNS(e,t);return u&&u.value||""},setAttributeNS:function(e,t,u){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+u,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new ce(this,function(t){var u=[];return Pe(t,function(r){r!==t&&r.nodeType==H&&(e==="*"||r.tagName==e)&&u.push(r)}),u})},getElementsByTagNameNS:function(e,t){return new ce(this,function(u){var r=[];return Pe(u,function(n){n!==u&&n.nodeType===H&&(e==="*"||n.namespaceURI===e)&&(t==="*"||n.localName==t)&&r.push(n)}),r})}};Te.prototype.getElementsByTagName=ne.prototype.getElementsByTagName;Te.prototype.getElementsByTagNameNS=ne.prototype.getElementsByTagNameNS;G(ne,y);function Ve(){}Ve.prototype.nodeType=se;G(Ve,y);function Se(){}Se.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(x[V])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,u){var r=this.data.substring(0,e),n=this.data.substring(e+t);u=r+u+n,this.nodeValue=this.data=u,this.length=u.length}};G(Se,y);function at(){}at.prototype={nodeName:"#text",nodeType:ve,splitText:function(e){var t=this.data,u=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(u);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}};G(at,Se);function st(){}st.prototype={nodeName:"#comment",nodeType:nt};G(st,Se);function ct(){}ct.prototype={nodeName:"#cdata-section",nodeType:Mt};G(ct,Se);function ze(){}ze.prototype.nodeType=Vt;G(ze,y);function Zt(){}Zt.prototype.nodeType=Ju;G(Zt,y);function Jt(){}Jt.prototype.nodeType=Zu;G(Jt,y);function lt(){}lt.prototype.nodeType=Pt;G(lt,y);function He(){}He.prototype.nodeName="#document-fragment";He.prototype.nodeType=J;G(He,y);function pt(){}pt.prototype.nodeType=rt;G(pt,y);function Qt(){}Qt.prototype.serializeToString=function(e,t,u,r){return Kt.call(e,t,u,r)};y.prototype.toString=Kt;function Kt(e,t,u){var r=!!u&&!!u.requireWellFormed,n=[],o=this.nodeType==9&&this.documentElement||this,i=o.prefix,s=o.namespaceURI;if(s&&i==null){var i=o.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return ft(this,n,e,t,a,r),n.join("")}function qt(e,t,u){var r=e.prefix||"",n=e.namespaceURI;if(!n||r==="xml"&&n===be.XML||n===be.XMLNS)return!1;for(var o=u.length;o--;){var i=u[o];if(i.prefix===r)return i.namespace!==n}return!0}function qe(e,t,u,r){if(r&&!ae.test(t))throw new S(j,'The attribute name "'+t+'" is not a valid XML QName');e.push(" ",t,'="',u.replace(/[<>&"\t\n\r]/g,jt),'"')}function ft(e,t,u,r,n,o){n||(n=[]),_(e,{ns:n,isHTML:u},{enter:function(i,s){var a=s.ns,c=s.isHTML;if(r)if(i=r(i),i){if(typeof i=="string")return t.push(i),null}else return null;switch(i.nodeType){case H:var l=i.attributes,p=l.length,f=i.tagName;c=be.isHTML(i.namespaceURI)||c;var d=f;if(!c&&!i.prefix&&i.namespaceURI){for(var h,D=0;D=0;g--){var O=a[g];if(O.prefix===""&&O.namespace===i.namespaceURI){h=O.namespace;break}}if(h!==i.namespaceURI)for(var g=a.length-1;g>=0;g--){var O=a[g];if(O.namespace===i.namespaceURI){O.prefix&&(d=O.prefix+":"+f);break}}}if(o&&!ae.test(d))throw new S(j,'The element name "'+d+'" is not a valid XML QName');t.push("<",d);for(var w=a.slice(),N=0;N"),c&&/^script$/i.test(f)){for(;A;)A.data?t.push(A.data):ft(A,t,c,r,w.slice(),o),A=A.nextSibling;return t.push("",f,">"),null}return{ns:w,isHTML:c,tag:d}}else return t.push("/>"),null;case kt:case J:return{ns:a.slice(),isHTML:c,tag:null};case se:return qe(t,i.name,i.value,o),null;case ve:return t.push(i.data.replace(/[<&>]/g,jt)),null;case Mt:if(o&&i.data.indexOf("]]>")!==-1)throw new S(j,'The CDATASection data contains "]]>"');return t.push("/g,"]]]]>"),"]]>"),null;case nt:if(o&&i.data.indexOf("-->")!==-1)throw new S(j,'The comment node data contains "-->"');return t.push(""),null;case Vt:if(o){if(!ae.test(i.name))throw new S(j,'The doctype name "'+i.name+'" is not a valid XML Name');if(i.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(i.publicId))throw new S(j,"DocumentType publicId is not a valid PubidLiteral");if(i.systemId&&!/^("[^"]*"|'[^']*')$/.test(i.systemId))throw new S(j,"DocumentType systemId is not a valid SystemLiteral");if(i.internalSubset&&i.internalSubset.indexOf("]>")!==-1)throw new S(j,'DocumentType internalSubset contains "]>"')}var I=i.publicId,C=i.systemId;if(t.push("");else if(C&&C!=".")t.push(" SYSTEM ",C,">");else{var X=i.internalSubset;X&&t.push(" [",X,"]"),t.push(">")}return null;case rt:if(o){if(!ae.test(i.target)||i.target.indexOf(":")!==-1||i.target.toLowerCase()==="xml")throw new S(j,'The processing instruction target "'+i.target+'" is not a valid XML NCName or is reserved');if(i.data.indexOf("?>")!==-1)throw new S(j,'The ProcessingInstruction data contains "?>"')}return t.push("",i.target," ",i.data,"?>"),null;case Pt:if(o&&!ae.test(i.nodeName))throw new S(j,'The entity reference name "'+i.nodeName+'" is not a valid XML Name');return t.push("&",i.nodeName,";"),null;default:return t.push("??",i.nodeName),null}},exit:function(i,s){s&&s.tag&&t.push("",s.tag,">")}})}function ir(e,t,u){var r;return _(t,null,{enter:function(n,o){var i=n.cloneNode(!1);i.ownerDocument=e,i.parentNode=null,o===null?r=i:o.appendChild(i);var s=n.nodeType===se||u;return s?i:null}}),r}function eu(e,t,u){var r;return _(t,null,{enter:function(n,o){var i=new n.constructor;for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var a=n[s];typeof a!="object"&&a!=i[s]&&(i[s]=a)}n.childNodes&&(i.childNodes=new Q),i.ownerDocument=e;var c=u;switch(i.nodeType){case H:var l=n.attributes,p=i.attributes=new Me,f=l.length;p._ownerElement=i;for(var d=0;d{"use strict";var uu=oe().freeze;ye.XML_ENTITIES=uu({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});ye.HTML_ENTITIES=uu({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
+`,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});ye.entityMap=ye.HTML_ENTITIES});var su=re(Dt=>{var Ie=oe().NAMESPACE,dt=oe().tagNamePattern,le=0,ue=1,pe=2,we=3,fe=4,me=5,Be=6,Xe=7;function de(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,de)}de.prototype=new Error;de.prototype.name=de.name;function ou(){}ou.prototype={parse:function(e,t,u){var r=this.domBuilder;r.startDocument(),lr(t,t={}),or(e,t,u,r,this.errorHandler),r.endDocument()}};function or(e,t,u,r,n){function o(v){if(v>65535){v-=65536;var U=55296+(v>>10),xu=56320+(v&1023);return String.fromCharCode(U,xu)}else return String.fromCharCode(v)}function i(v){var U=v.slice(1,-1);return Object.hasOwnProperty.call(u,U)?u[U]:U.charAt(0)==="#"?o(parseInt(U.substr(1).replace("x","0x"))):(n.error("entity not found:"+v),v)}function s(v){if(v>D){var U=e.substring(D,v).replace(/?\w+;/g,i);f&&a(D),r.characters(U,0,v-D),D=v}}function a(v,U){for(;v>=l&&(U=p.exec(e));)c=U.index,l=c+U[0].length,f.lineNumber++;f.columnNumber=v-c+1}for(var c=0,l=0,p=/.*(?:\r\n?|\n)|.*$/g,f=r.locator,d=[{currentNSMap:t}],h={},D=0;;){try{var g=e.indexOf("<",D);if(g<0){if(!e.substr(D).match(/^\s*$/)){var O=r.doc,w=O.createTextNode(e.substr(D));O.appendChild(w),r.currentElement=w}return}switch(g>D&&s(g),e.charAt(g+1)){case"/":var C=e.indexOf(">",g+3),N=e.substring(g+2,C).replace(/^([\s\S]*?[^ \t\n\r])?[ \t\n\r]*$/,"$1"),m=d.pop();C<0?(N=e.substring(g+2).replace(/[\s<].*/,""),n.error("end tag name: "+N+" is not complete:"+m.tagName),C=g+1+N.length):N.match(/\s)?(N=N.replace(/[\s<].*/,""),n.error("end tag name: "+N+" maybe not complete"),C=g+1+N.length):/[ \t\n\r]/.test(N)&&dt.test(N.split(/[ \t\n\r]/)[0])&&n.error('end tag name is followed by whitespace and trailing content: "'+N+'"');var E=m.localNSMap,b=m.tagName==N,T=b||m.tagName&&m.tagName.toLowerCase()==N.toLowerCase();if(T){if(r.endElement(m.uri,m.localName,N),E)for(var B in E)Object.prototype.hasOwnProperty.call(E,B)&&r.endPrefixMapping(B);b||n.fatalError("end tag name: "+N+" is not match the current start tagName:"+m.tagName)}else d.push(m);C++;break;case"?":f&&a(g),C=fr(e,g,r);break;case"!":f&&a(g),C=pr(e,g,r,n);break;default:f&&a(g);var A=new au,I=d[d.length-1].currentNSMap,C=ar(e,g,A,I,i,n),X=A.length;if(!A.closed&&cr(e,C,A.tagName,h)&&(A.closed=!0,u.nbsp||n.warning("unclosed xml attribute")),f&&X){for(var $=nu(f,{}),P=0;PD?D=C:s(Math.max(g,D)+1)}}function nu(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function ar(e,t,u,r,n,o){function i(d,h,D){u.attributeNames.hasOwnProperty(d)&&o.fatalError("Attribute "+d+" redefined"),u.addValue(d,h.replace(/[\t\n\r]/g," ").replace(/?\w+;/g,n),D)}for(var s,a,c=++t,l=le;;){var p=e.charAt(c);if(l===le&&p==="<")throw new Error("unexpected < in tag name: "+e.slice(t,c));switch(p){case"=":if(l===ue)s=e.slice(t,c),l=we;else if(l===pe)l=we;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(l===we||l===ue)if(l===ue&&(o.warning('attribute value must after "="'),s=e.slice(t,c)),t=c+1,c=e.indexOf(p,t),c>0)a=e.slice(t,c),i(s,a,t-1),l=me;else throw new Error("attribute value no end '"+p+"' match");else if(l==fe)a=e.slice(t,c),i(s,a,t),o.warning('attribute "'+s+'" missed start quot('+p+")!!"),t=c+1,l=me;else throw new Error('attribute value must after "="');break;case"/":switch(l){case le:u.setTagName(e.slice(t,c));case me:case Be:case Xe:l=Xe,u.closed=!0;case fe:case ue:break;case pe:u.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),l==le&&u.setTagName(e.slice(t,c)),c;case">":switch(l){case le:u.setTagName(e.slice(t,c));case me:case Be:case Xe:break;case fe:case ue:a=e.slice(t,c),a.slice(-1)==="/"&&(u.closed=!0,a=a.slice(0,-1));case pe:l===pe&&(a=s),l==fe?(o.warning('attribute "'+a+'" missed quot(")!'),i(s,a,t)):((!Ie.isHTML(r[""])||!a.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+a+'" missed value!! "'+a+'" instead!!'),i(a,a,t));break;case we:throw new Error("attribute value missed!!")}return c;case"\x80":p=" ";default:if(p<=" ")switch(l){case le:u.setTagName(e.slice(t,c)),l=Be;break;case ue:s=e.slice(t,c),l=pe;break;case fe:var a=e.slice(t,c);o.warning('attribute "'+a+'" missed quot(")!!'),i(s,a,t);case me:l=Be;break}else switch(l){case pe:var f=u.tagName;(!Ie.isHTML(r[""])||!s.match(/^(?:disabled|checked|selected)$/i))&&o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),i(s,s,t),t=c,l=ue;break;case me:o.warning('attribute space is required"'+s+'"!!');case Be:l=ue,t=c;break;case we:l=fe,t=c;break;case Xe:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function iu(e,t,u){for(var r=e.tagName,n=null,p=e.length;p--;){var o=e[p],i=o.qName,s=o.value,f=i.indexOf(":");if(f>0)var a=o.prefix=i.slice(0,f),c=i.slice(f+1),l=a==="xmlns"&&c;else c=i,a=null,l=i==="xmlns"&&"";o.localName=c,l!==!1&&(n==null&&(n={},u=Object.create(u)),u[l]=n[l]=s,o.uri=Ie.XMLNS,t.startPrefixMapping(l,s))}for(var p=e.length;p--;){o=e[p];var a=o.prefix;a&&(a==="xml"&&(o.uri=Ie.XML),a!=="xmlns"&&(o.uri=u[a||""]))}var f=r.indexOf(":");f>0?(a=e.prefix=r.slice(0,f),c=e.localName=r.slice(f+1)):(a=null,c=e.localName=r);var d=e.uri=u[a||""];if(t.startElement(d,c,r,e),e.closed){if(t.endElement(d,c,r),n)for(a in n)Object.prototype.hasOwnProperty.call(n,a)&&t.endPrefixMapping(a)}else return e.currentNSMap=u,e.localNSMap=n,!0}function sr(e,t,u,r,n){if(/^(?:script|textarea)$/i.test(u)){var o=e.indexOf(""+u+">",t),i=e.substring(t+1,o);if(/[&<]/.test(i))return/^script$/i.test(u)?(n.characters(i,0,i.length),o):(i=i.replace(/?\w+;/g,r),n.characters(i,0,i.length),o)}return t+1}function cr(e,t,u,r){var n=r[u];return n==null&&(n=e.lastIndexOf(""+u+">"),n",t+4);return o>t?(u.comment(e,t+4,o-t-4),o+3):(r.error("Unclosed comment"),-1)}else return-1;default:if(e.substr(t+3,6)=="CDATA["){var o=e.indexOf("]]>",t+9);return u.startCDATA(),u.characters(e,t+9,o-t-9),u.endCDATA(),o+3}var i=mr(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,l=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],l=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(l=i[3][0]));var p=i[s-1];return u.startDTD(a,c,l),u.endDTD(),p.index+p[0].length}}return-1}function fr(e,t,u){var r=e.indexOf("?>",t);if(r){var n=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)$/);if(n){var o=n[0].length;return u.processingInstruction(n[1],n[2]),r+2}else return-1}return-1}function au(){this.attributeNames={}}au.prototype={setTagName:function(e){if(!dt.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,u){if(!dt.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:u}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}};function mr(e,t){var u,r=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=t,n.exec(e);u=n.exec(e);)if(r.push(u),u[1])return r}Dt.XMLReader=ou;Dt.ParseError=de});var Du=re($e=>{var dr=oe(),Dr=mt(),cu=ru(),fu=su(),hr=Dr.DOMImplementation,lu=dr.NAMESPACE,gr=fu.ParseError,Ar=fu.XMLReader;function mu(e){return e.replace(/\r[\n\u0085]/g,`
`).replace(/[\r\u0085\u2028]/g,`
-`)}function mu(e){this.options=e||{locator:{}}}mu.prototype.parseFromString=function(e,t){var u=this.options,r=new Ar,n=u.domBuilder||new we,o=u.errorHandler,i=u.locator,s=u.xmlns||{},a=/\/x?html?$/.test(t),c=a?su.HTML_ENTITIES:su.XML_ENTITIES;i&&n.setDocumentLocator(i),r.errorHandler=Er(o,n,i),r.domBuilder=u.domBuilder||n,a&&(s[""]=cu.HTML),s.xml=s.xml||cu.XML;var l=u.normalizeLineEndings||fu;return e&&typeof e=="string"?r.parse(l(e),s,c):r.errorHandler.error("invalid doc source"),n.doc};function Er(e,t,u){if(!e){if(t instanceof we)return t;e=t}var r={},n=e instanceof Function;u=u||{};function o(i){var s=e[i];!s&&n&&(s=e.length==2?function(a){e(i,a)}:e),r[i]=s&&function(a){s("[xmldom "+i+"] "+a+dt(u))}||function(){}}return o("warning"),o("error"),o("fatalError"),r}function we(){this.cdata=!1}function pe(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}we.prototype={startDocument:function(){this.doc=new hr().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,u,r){var n=this.doc,o=n.createElementNS(e,u||t),i=r.length;ze(this,o),this.currentElement=o,this.locator&&pe(this.locator,o);for(var s=0;s=t+u||t?new java.lang.String(e,t,u)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){we.prototype[e]=function(){return null}});function ze(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}He.__DOMHandler=we;He.normalizeLineEndings=fu;He.DOMParser=mu});var Dt=K(Xe=>{var Du=pt();Xe.DOMImplementation=Du.DOMImplementation;Xe.XMLSerializer=Du.XMLSerializer;Xe.DOMParser=du().DOMParser});var te=De(Oe()),St="https://example.com",Vu=function(t,u){if(/^[a-z]+:/i.test(u))return u;/^data:/.test(t)&&(t=te.default.location&&te.default.location.href||"");var r=/^\/\//.test(t),n=!te.default.location&&!/\/\//i.test(t);t=new te.default.URL(t,te.default.location||St);var o=new URL(u,t);return n?o.href.slice(St.length):r?o.href.slice(o.protocol.length):o.href},Fe=Vu;var M=De(Oe());var yt=function(t,u,r){u.forEach(function(n){for(var o in t.mediaGroups[n])for(var i in t.mediaGroups[n][o]){var s=t.mediaGroups[n][o][i];r(s,n,o,i)}})};var Ze=De(Oe()),Gu=function(t){return Ze.default.atob?Ze.default.atob(t):Buffer.from(t,"base64").toString("binary")};function Je(e){for(var t=Gu(e),u=new Uint8Array(t.length),r=0;r!!e&&typeof e=="object",_=(...e)=>e.reduce((t,u)=>(typeof u!="object"||Object.keys(u).forEach(r=>{Array.isArray(t[r])&&Array.isArray(u[r])?t[r]=t[r].concat(u[r]):hu(t[r])&&hu(u[r])?t[r]=_(t[r],u[r]):t[r]=u[r]}),t),{}),Tu=e=>Object.keys(e).map(t=>e[t]),vr=(e,t)=>{let u=[];for(let r=e;re.reduce((t,u)=>t.concat(u),[]),Su=e=>{if(!e.length)return[];let t=[];for(let u=0;ue.reduce((u,r,n)=>(r[t]&&u.push(n),u),[]),Cr=(e,t)=>Tu(e.reduce((u,r)=>(r.forEach(n=>{u[t(n)]=n}),u),{})),Be={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},Ie=({baseUrl:e="",source:t="",range:u="",indexRange:r=""})=>{let n={uri:t,resolvedUri:Fe(e||"",t)};if(u||r){let i=(u||r).split("-"),s=M.default.BigInt?M.default.BigInt(i[0]):parseInt(i[0],10),a=M.default.BigInt?M.default.BigInt(i[1]):parseInt(i[1],10);s{let t;return typeof e.offset=="bigint"||typeof e.length=="bigint"?t=M.default.BigInt(e.offset)+M.default.BigInt(e.length)-M.default.BigInt(1):t=e.offset+e.length-1,`${e.offset}-${t}`},gu=e=>(e&&typeof e!="number"&&(e=parseInt(e,10)),isNaN(e)?null:e),Tr={static(e){let{duration:t,timescale:u=1,sourceDuration:r,periodDuration:n}=e,o=gu(e.endNumber),i=t/u;return typeof o=="number"?{start:0,end:o}:typeof n=="number"?{start:0,end:n/i}:{start:0,end:r/i}},dynamic(e){let{NOW:t,clientOffset:u,availabilityStartTime:r,timescale:n=1,duration:o,periodStart:i=0,minimumUpdatePeriod:s=0,timeShiftBufferDepth:a=1/0}=e,c=gu(e.endNumber),l=(t+u)/1e3,p=r+i,h=l+s-p,m=Math.ceil(h*n/o),f=Math.floor((l-p-a)*n/o),D=Math.floor((l-p)*n/o);return{start:Math.max(0,f),end:typeof c=="number"?c:Math.min(m,D)}}},Sr=e=>t=>{let{duration:u,timescale:r=1,periodStart:n,startNumber:o=1}=e;return{number:o+t,duration:u/r,timeline:n,time:t*u}},gt=e=>{let{type:t,duration:u,timescale:r=1,periodDuration:n,sourceDuration:o}=e,{start:i,end:s}=Tr[t](e),a=vr(i,s).map(Sr(e));if(t==="static"){let c=a.length-1,l=typeof n=="number"?n:o;a[c].duration=l-u/r*c}return a},yu=e=>{let{baseUrl:t,initialization:u={},sourceDuration:r,indexRange:n="",periodStart:o,presentationTime:i,number:s=0,duration:a}=e;if(!t)throw new Error(Be.NO_BASE_URL);let c=Ie({baseUrl:t,source:u.sourceURL,range:u.range}),l=Ie({baseUrl:t,source:t,indexRange:n});if(l.map=c,a){let p=gt(e);p.length&&(l.duration=p[0].duration,l.timeline=p[0].timeline)}else r&&(l.duration=r,l.timeline=o);return l.presentationTime=i||o,l.number=s,[l]},yr=(e,t,u)=>{let r=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,o=e.timeline||0,i=e.sidx.byterange,s=i.offset+i.length,a=t.timescale,c=t.references.filter(D=>D.referenceType!==1),l=[],p=e.endList?"static":"dynamic",d=e.sidx.timeline,h=d,m=e.mediaSequence||0,f;typeof t.firstOffset=="bigint"?f=M.default.BigInt(s)+t.firstOffset:f=s+t.firstOffset;for(let D=0;DCr(e,({timeline:t})=>t).sort((t,u)=>t.timeline>u.timeline?1:-1),Ir=(e,t)=>{for(let u=0;u{let t=[];return yt(e,wr,(u,r,n,o)=>{t=t.concat(u.playlists||[])}),t},Eu=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((u,r)=>{u.number=e.mediaSequence+r})},Rr=({oldPlaylists:e,newPlaylists:t,timelineStarts:u})=>{t.forEach(r=>{r.discontinuitySequence=u.findIndex(function({timeline:a}){return a===r.timeline});let n=Ir(e,r.attributes.NAME);if(!n||r.sidx)return;let o=r.segments[0],i=n.segments.findIndex(function(a){return Math.abs(a.presentationTime-o.presentationTime)
n.timeline||n.segments.length&&r.timeline>n.segments[n.segments.length-1].timeline)&&r.discontinuitySequence--;return}n.segments[i].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),Eu({playlist:r,mediaSequence:n.segments[i].number})})},Or=({oldManifest:e,newManifest:t})=>{let u=e.playlists.concat(Au(e)),r=t.playlists.concat(Au(t));return t.timelineStarts=wu([e.timelineStarts,t.timelineStarts]),Rr({oldPlaylists:u,newPlaylists:r,timelineStarts:t.timelineStarts}),t},Fr=e=>e&&e.uri+"-"+Nr(e.byterange),ht=e=>{let t=e.reduce(function(r,n){return r[n.attributes.baseUrl]||(r[n.attributes.baseUrl]=[]),r[n.attributes.baseUrl].push(n),r},{}),u=[];return Object.values(t).forEach(r=>{let n=Tu(r.reduce((o,i)=>{let s=i.attributes.id+(i.attributes.lang||"");return o[s]?(i.segments&&(i.segments[0]&&(i.segments[0].discontinuity=!0),o[s].segments.push(...i.segments)),i.attributes.contentProtection&&(o[s].attributes.contentProtection=i.attributes.contentProtection)):(o[s]=i,o[s].attributes.timelineStarts=[]),o[s].attributes.timelineStarts.push({start:i.attributes.periodStart,timeline:i.attributes.periodStart}),o},{}));u=u.concat(n)}),u.map(r=>(r.discontinuityStarts=br(r.segments||[],"discontinuity"),r))},At=(e,t)=>{let u=Fr(e.sidx),r=u&&t[u]&&t[u].sidx;return r&&yr(e,r,e.sidx.resolvedUri),e},xr=(e,t={})=>{if(!Object.keys(t).length)return e;for(let u in e)e[u]=At(e[u],t);return e},_r=({attributes:e,segments:t,sidx:u,mediaSequence:r,discontinuitySequence:n,discontinuityStarts:o},i)=>{let s={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:o,timelineStarts:e.timelineStarts,mediaSequence:r,segments:t};return e.contentProtection&&(s.contentProtection=e.contentProtection),e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),u&&(s.sidx=u),i&&(s.attributes.AUDIO="audio",s.attributes.SUBTITLES="subs"),s},Lr=({attributes:e,segments:t,mediaSequence:u,discontinuityStarts:r,discontinuitySequence:n})=>{typeof t>"u"&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);let o={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(o.CODECS=e.codecs);let i={attributes:o,uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:r,discontinuitySequence:n,mediaSequence:u,segments:t};return e.serviceLocation&&(i.attributes.serviceLocation=e.serviceLocation),i},Ur=(e,t={},u=!1)=>{let r,n=e.reduce((o,i)=>{let s=i.attributes.role&&i.attributes.role.value||"",a=i.attributes.lang||"",c=i.attributes.label||"main";if(a&&!i.attributes.label){let p=s?` (${s})`:"";c=`${i.attributes.lang}${p}`}o[c]||(o[c]={language:a,autoselect:!0,default:s==="main",playlists:[],uri:""});let l=At(_r(i,u),t);return o[c].playlists.push(l),typeof r>"u"&&s==="main"&&(r=i,r.default=!0),o},{});if(!r){let o=Object.keys(n)[0];n[o].default=!0}return n},qr=(e,t={})=>e.reduce((u,r)=>{let n=r.attributes.label||r.attributes.lang||"text",o=r.attributes.lang||"und";return u[n]||(u[n]={language:o,default:!1,autoselect:!1,playlists:[],uri:""}),u[n].playlists.push(At(Lr(r),t)),u},{}),Mr=e=>e.reduce((t,u)=>(u&&u.forEach(r=>{let{channel:n,language:o}=r;t[o]={autoselect:!1,default:!1,instreamId:n,language:o},r.hasOwnProperty("aspectRatio")&&(t[o].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(t[o].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(t[o]["3D"]=r["3D"])}),t),{}),Pr=({attributes:e,segments:t,sidx:u,discontinuityStarts:r})=>{let n={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:r,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes["FRAME-RATE"]=e.frameRate),e.qualityRanking!==void 0&&(n.attributes.SCORE=1/(e.qualityRanking+1)),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),u&&(n.sidx=u),n},kr=({attributes:e})=>e.mimeType==="video/mp4"||e.mimeType==="video/webm"||e.contentType==="video",Vr=({attributes:e})=>e.mimeType==="audio/mp4"||e.mimeType==="audio/webm"||e.contentType==="audio",Gr=({attributes:e})=>e.mimeType==="text/vtt"||e.contentType==="text",zr=(e,t)=>{e.forEach(u=>{u.mediaSequence=0,u.discontinuitySequence=t.findIndex(function({timeline:r}){return r===u.timeline}),u.segments&&u.segments.forEach((r,n)=>{r.number=n})})},vu=e=>e?Object.keys(e).reduce((t,u)=>{let r=e[u];return t.concat(r.playlists)},[]):[],Bu=({dashPlaylists:e,locations:t,contentSteering:u,sidxMapping:r={},previousManifest:n,eventStream:o})=>{if(!e.length)return{};let{sourceDuration:i,type:s,suggestedPresentationDelay:a,minimumUpdatePeriod:c}=e[0].attributes,l=ht(e.filter(kr)).map(Pr),p=ht(e.filter(Vr)),d=ht(e.filter(Gr)),h=e.map(A=>A.attributes.captionServices).filter(Boolean),m={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:i,playlists:xr(l,r)};c>=0&&(m.minimumUpdatePeriod=c*1e3),t&&(m.locations=t),u&&(m.contentSteering=u),s==="dynamic"&&(m.suggestedPresentationDelay=a),o&&o.length>0&&(m.eventStream=o);let f=m.playlists.length===0,D=p.length?Ur(p,r,f):null,N=d.length?qr(d,r):null,v=l.concat(vu(D),vu(N)),g=v.map(({timelineStarts:A})=>A);return m.timelineStarts=wu(g),zr(v,m.timelineStarts),D&&(m.mediaGroups.AUDIO.audio=D),N&&(m.mediaGroups.SUBTITLES.subs=N),h.length&&(m.mediaGroups["CLOSED-CAPTIONS"].cc=Mr(h)),n?Or({oldManifest:n,newManifest:m}):m},Hr=(e,t,u)=>{let{NOW:r,clientOffset:n,availabilityStartTime:o,timescale:i=1,periodStart:s=0,minimumUpdatePeriod:a=0}=e,c=(r+n)/1e3,l=o+s,d=c+a-l;return Math.ceil((d*i-t)/u)},Iu=(e,t)=>{let{type:u,minimumUpdatePeriod:r=0,media:n="",sourceDuration:o,timescale:i=1,startNumber:s=1,periodStart:a}=e,c=[],l=-1;for(let p=0;pl&&(l=f);let D;if(m<0){let g=p+1;g===t.length?u==="dynamic"&&r>0&&n.indexOf("$Number$")>0?D=Hr(e,l,h):D=(o*i-l)/h:D=(t[g].t-l)/h}else D=m+1;let N=s+c.length+D,v=s+c.length;for(;v(t,u,r,n)=>{if(t==="$$")return"$";if(typeof e[u]>"u")return t;let o=""+e[u];return u==="RepresentationID"||(r?n=parseInt(n,10):n=1,o.length>=n)?o:`${new Array(n-o.length+1).join("0")}${o}`},bu=(e,t)=>e.replace(Xr,jr(t)),$r=(e,t)=>!e.duration&&!t?[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]:e.duration?gt(e):Iu(e,t),Yr=(e,t)=>{let u={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=e,n=Ie({baseUrl:e.baseUrl,source:bu(r.sourceURL,u),range:r.range});return $r(e,t).map(i=>{u.Number=i.number,u.Time=i.time;let s=bu(e.media||"",u),a=e.timescale||1,c=e.presentationTimeOffset||0,l=e.periodStart+(i.time-c)/a;return{uri:s,timeline:i.timeline,duration:i.duration,resolvedUri:Fe(e.baseUrl||"",s),map:n,number:i.number,presentationTime:l}})},Wr=(e,t)=>{let{baseUrl:u,initialization:r={}}=e,n=Ie({baseUrl:u,source:r.sourceURL,range:r.range}),o=Ie({baseUrl:u,source:t.media,range:t.mediaRange});return o.map=n,o},Zr=(e,t)=>{let{duration:u,segmentUrls:r=[],periodStart:n}=e;if(!u&&!t||u&&t)throw new Error(Be.SEGMENT_TIME_UNSPECIFIED);let o=r.map(a=>Wr(e,a)),i;return u&&(i=gt(e)),t&&(i=Iu(e,t)),i.map((a,c)=>{if(o[c]){let l=o[c],p=e.timescale||1,d=e.presentationTimeOffset||0;return l.timeline=a.timeline,l.duration=a.duration,l.number=a.number,l.presentationTime=n+(a.time-d)/p,l}}).filter(a=>a)},Jr=({attributes:e,segmentInfo:t})=>{let u,r;t.template?(r=Yr,u=_(e,t.template)):t.base?(r=yu,u=_(e,t.base)):t.list&&(r=Zr,u=_(e,t.list));let n={attributes:e};if(!r)return n;let o=r(u,t.segmentTimeline);if(u.duration){let{duration:i,timescale:s=1}=u;u.duration=i/s}else o.length?u.duration=o.reduce((i,s)=>Math.max(i,Math.ceil(s.duration)),0):u.duration=0;return n.attributes=u,n.segments=o,t.base&&u.indexRange&&(n.sidx=o[0],n.segments=[]),n},Et=e=>e.map(Jr),y=(e,t)=>Su(e.childNodes).filter(({tagName:u})=>u===t),Re=e=>e.textContent.trim(),Qr=e=>parseFloat(e.split("/").reduce((t,u)=>t/u)),fe=e=>{let s=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!s)return 0;let[a,c,l,p,d,h]=s.slice(1);return parseFloat(a||0)*31536e3+parseFloat(c||0)*2592e3+parseFloat(l||0)*86400+parseFloat(p||0)*3600+parseFloat(d||0)*60+parseFloat(h||0)},Kr=e=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),Date.parse(e)),Cu={mediaPresentationDuration(e){return fe(e)},availabilityStartTime(e){return Kr(e)/1e3},minimumUpdatePeriod(e){return fe(e)},suggestedPresentationDelay(e){return fe(e)},type(e){return e},timeShiftBufferDepth(e){return fe(e)},start(e){return fe(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return Qr(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){let t=parseInt(e,10);return isNaN(t)?fe(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},qualityRanking(e){return parseInt(e,10)},qualityranking(e){return parseInt(e,10)},DEFAULT(e){return e}},en={qualityranking:"qualityRanking"},I=e=>e&&e.attributes?Su(e.attributes).reduce((t,u)=>{let r=Cu[u.name]||Cu.DEFAULT,n=en[u.name]||u.name;return t[n]=r(u.value),t},{}):{},tn={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},je=(e,t)=>t.length?me(e.map(function(u){return t.map(function(r){let n=Re(r),o=Fe(u.baseUrl,n),i=_(I(r),{baseUrl:o});return o!==n&&!i.serviceLocation&&u.serviceLocation&&(i.serviceLocation=u.serviceLocation),i})})):e,vt=e=>{let t=y(e,"SegmentTemplate")[0],u=y(e,"SegmentList")[0],r=u&&y(u,"SegmentURL").map(p=>_({tag:"SegmentURL"},I(p))),n=y(e,"SegmentBase")[0],o=u||t,i=o&&y(o,"SegmentTimeline")[0],s=u||n||t,a=s&&y(s,"Initialization")[0],c=t&&I(t);c&&a?c.initialization=a&&I(a):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});let l={template:c,segmentTimeline:i&&y(i,"S").map(p=>I(p)),list:u&&_(I(u),{segmentUrls:r,initialization:I(a)}),base:n&&_(I(n),{initialization:I(a)})};return Object.keys(l).forEach(p=>{l[p]||delete l[p]}),l},un=(e,t,u)=>r=>{let n=y(r,"BaseURL"),o=je(t,n),i=_(e,I(r)),s=vt(r);return o.map(a=>({segmentInfo:_(u,s),attributes:_(i,a)}))},rn=e=>e.reduce((t,u)=>{let r=I(u);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());let n=tn[r.schemeIdUri];if(n){t[n]={attributes:r};let o=y(u,"cenc:pssh")[0];if(o){let i=Re(o);t[n].pssh=i&&Je(i)}}return t},{}),nn=e=>{if(e.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof e.value!="string"?[]:e.value.split(";")).map(u=>{let r,n;return n=u,/^CC\d=/.test(u)?[r,n]=u.split("="):/^CC\d$/.test(u)&&(r=u),{channel:r,language:n}});if(e.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof e.value!="string"?[]:e.value.split(";")).map(u=>{let r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(u)){let[n,o=""]=u.split("=");r.channel=n,r.language=u,o.split(",").forEach(i=>{let[s,a]=i.split(":");s==="lang"?r.language=a:s==="er"?r.easyReader=Number(a):s==="war"?r.aspectRatio=Number(a):s==="3D"&&(r["3D"]=Number(a))})}else r.language=u;return r.channel&&(r.channel="SERVICE"+r.channel),r})},on=e=>me(y(e.node,"EventStream").map(t=>{let u=I(t),r=u.schemeIdUri;return y(t,"Event").map(n=>{let o=I(n),i=o.presentationTime||0,s=u.timescale||1,a=o.duration||0,c=i/s+e.attributes.start;return{schemeIdUri:r,value:u.value,id:o.id,start:c,end:c+a/s,messageData:Re(n)||o.messageData,contentEncoding:u.contentEncoding,presentationTimeOffset:u.presentationTimeOffset||0}})})),an=(e,t,u)=>r=>{let n=I(r),o=je(t,y(r,"BaseURL")),i=y(r,"Role")[0],s={role:I(i)},a=_(e,n,s),c=y(r,"Accessibility")[0],l=nn(I(c));l&&(a=_(a,{captionServices:l}));let p=y(r,"Label")[0];if(p&&p.childNodes.length){let D=p.childNodes[0].nodeValue.trim();a=_(a,{label:D})}let d=rn(y(r,"ContentProtection"));Object.keys(d).length&&(a=_(a,{contentProtection:d}));let h=vt(r),m=y(r,"Representation"),f=_(u,h);return me(m.map(un(a,o,f)))},sn=(e,t)=>(u,r)=>{let n=je(t,y(u.node,"BaseURL")),o=_(e,{periodStart:u.attributes.start});typeof u.attributes.duration=="number"&&(o.periodDuration=u.attributes.duration);let i=y(u.node,"AdaptationSet"),s=vt(u.node);return me(i.map(an(o,n,s)))},cn=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;let u=_({serverURL:Re(e[0])},I(e[0]));return u.queryBeforeStart=u.queryBeforeStart==="true",u},ln=({attributes:e,priorPeriodAttributes:t,mpdType:u})=>typeof e.start=="number"?e.start:t&&typeof t.start=="number"&&typeof t.duration=="number"?t.start+t.duration:!t&&u==="static"?0:null,Ru=(e,t={})=>{let{manifestUri:u="",NOW:r=Date.now(),clientOffset:n=0,eventHandler:o=function(){}}=t,i=y(e,"Period");if(!i.length)throw new Error(Be.INVALID_NUMBER_OF_PERIOD);let s=y(e,"Location"),a=I(e),c=je([{baseUrl:u}],y(e,"BaseURL")),l=y(e,"ContentSteering");a.type=a.type||"static",a.sourceDuration=a.mediaPresentationDuration||0,a.NOW=r,a.clientOffset=n,s.length&&(a.locations=s.map(Re));let p=[];return i.forEach((d,h)=>{let m=I(d),f=p[h-1];m.start=ln({attributes:m,priorPeriodAttributes:f?f.attributes:null,mpdType:a.type}),p.push({node:d,attributes:m})}),{locations:a.locations,contentSteeringInfo:cn(l,o),representationInfo:me(p.map(sn(a,c))),eventStream:me(p.map(on))}},Ou=e=>{if(e==="")throw new Error(Be.DASH_EMPTY_MANIFEST);let t=new Nu.DOMParser,u,r;try{u=t.parseFromString(e,"application/xml"),r=u&&u.documentElement.tagName==="MPD"?u.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Be.DASH_INVALID_XML);return r};var Fu=De(Dt(),1),U=(e,t)=>Array.from(e.childNodes).filter(u=>u.nodeType===1&&u.localName===t);function bt(e,t){let u=Ou(e);if((u.getAttribute("type")||"static")!=="static"||u.getElementsByTagNameNS("*","ContentProtection").length)throw Error("unsupported_mpd");for(let o of[u,...Array.from(u.getElementsByTagName("*"))])for(let i of Array.from(o.attributes||[]))if(i.namespaceURI==="http://www.w3.org/1999/xlink"&&i.localName==="href")throw Error("external_mpd");let r=0;for(let o of U(u,"Period"))for(let i of U(o,"AdaptationSet"))for(let s of U(i,"Representation"))s.setAttribute("piikSourceNode",String(r++));let n=Ru(u,{manifestUri:t});return{root:u,inherited:n}}var $e=e=>Number.isFinite(e)&&e>0?e:null;function pn(e){let t=e.inherited.representationInfo,u=Bu({dashPlaylists:t.map(o=>({attributes:{...o.attributes},segments:[]}))}),r=[...new Set(t.filter(o=>["video","audio"].includes((o.attributes.mimeType||"").split("/")[0])).map(o=>o.attributes.periodStart))];return[...(u.playlists||[]).map(o=>({p:o,kind:"video",language:""})),...Object.values(u.mediaGroups?.AUDIO||{}).flatMap(o=>Object.values(o).flatMap(i=>i.playlists.map(s=>({p:s,kind:"audio",language:i.language||""}))))].flatMap(({p:o,kind:i,language:s})=>{let a=t.flatMap((d,h)=>{let m=d.attributes;return m.id===o.attributes.NAME&&m.baseUrl===o.resolvedUri&&(m.lang||"")===s&&(m.mimeType||"").split("/")[0]===i?[h]:[]}),c=a.map(d=>t[d].attributes),l=c.map(d=>d.periodStart);if(l.length!==r.length||new Set(l).size!==r.length||r.some(d=>!l.includes(d)))return[];let p=c[0];return c.some(d=>d.mimeType!==p.mimeType||d.codecs!==p.codecs)?[]:[{indices:a,kind:i,label:p.label||p.id||"",mimeType:p.mimeType,codec:p.codecs||"",language:s,role:p.role?.value||"",width:$e(p.width),height:$e(p.height),bandwidth:$e(p.bandwidth),frameRate:$e(p.frameRate)}]})}globalThis.inspectMpd=(e,t)=>JSON.stringify(pn(bt(e,t)));var Ye=e=>e?{url:e.resolvedUri,range:e.byterange??null}:null;globalThis.resolveMpd=(e,t,u)=>{let r=bt(e,t),n=JSON.parse(u),o=n.map(i=>r.inherited.representationInfo[i]);if(o.some(i=>!i))throw Error("invalid_choice");return JSON.stringify(Et(o).map((i,s)=>({index:n[s],mimeType:i.attributes.mimeType,period:i.attributes.periodStart,codecs:i.attributes.codecs||"",indexResource:Ye(i.sidx),indexInit:Ye(i.sidx?.map),segments:i.segments.map(a=>({resource:Ye(a),initialization:Ye(a.map),duration:a.duration,presentationTime:a.presentationTime,timeline:a.timeline}))})))};globalThis.serializeMpd=(e,t,u,r)=>{let n=bt(e,t),o=JSON.parse(u),i=JSON.parse(r),s=n.inherited.representationInfo,a=o.map(m=>s[m]),c=Et(a),l=new Map;for(let m=0;m{let f=i[m];if(typeof f!="string"||!/[0-9a-f-]{36}/.test(f))throw Error("unadmitted_resource");return f},d=(m,f,D,N)=>{let v;for(let g of[f,D,m]){let A=U(g,N)[0];if(A)if(!v)v=A.cloneNode(!0);else{for(let R of Array.from(A.attributes))v.setAttributeNS(R.namespaceURI,R.name,R.value);for(let R of Array.from(A.childNodes).filter(q=>q.nodeType===1)){for(let q of U(v,R.localName))v.removeChild(q);v.appendChild(R.cloneNode(!0))}}}return v},h=(m,f)=>{f?m.setAttribute("range",f.offset+"-"+(f.offset+f.length-1)):m.removeAttribute("range")};for(let m of U(n.root,"Period"))for(let f of U(m,"AdaptationSet")){for(let D of U(f,"Representation")){let N=l.get(D.getAttribute("piikSourceNode"));if(!N){f.removeChild(D);continue}let{info:v,track:g}=N,A=d(D,m,f,"SegmentBase"),R=d(D,m,f,"SegmentTemplate"),q=d(D,m,f,"SegmentList");for(let B of["BaseURL","SegmentBase","SegmentTemplate","SegmentList"])for(let O of U(D,B))D.removeChild(O);if(D.removeAttribute("piikSourceNode"),g.sidx){if(!A)throw Error("missing_index");let B=D.ownerDocument.createElementNS(n.root.namespaceURI,"BaseURL");B.textContent=p(g.sidx.resolvedUri),D.appendChild(B);let O=U(A,"Initialization")[0];O&&g.sidx.map&&(O.setAttribute("sourceURL",p(g.sidx.map.resolvedUri)),h(O,g.sidx.map.byterange)),D.appendChild(A)}else{if(!g.segments.length)throw Error("unsupported_address");let B=R||q;if(!B)throw Error("unsupported_address");let O=D.ownerDocument.createElementNS(n.root.namespaceURI,"SegmentList");for(let S of Array.from(B.attributes))["media","initialization","index","bitstreamSwitching"].includes(S.name)||O.setAttributeNS(S.namespaceURI,S.name,S.value);for(let S of U(B,"SegmentTimeline"))O.appendChild(S.cloneNode(!0));let C=g.segments[0].map;if(C){let S=D.ownerDocument.createElementNS(n.root.namespaceURI,"Initialization");S.setAttribute("sourceURL",p(C.resolvedUri)),h(S,C.byterange),O.appendChild(S)}for(let S of g.segments){if(C&&S.map?.resolvedUri!==C.resolvedUri)throw Error("changing_init");let T=D.ownerDocument.createElementNS(n.root.namespaceURI,"SegmentURL");T.setAttribute("media",p(S.resolvedUri)),S.byterange&&T.setAttribute("mediaRange",S.byterange.offset+"-"+(S.byterange.offset+S.byterange.length-1)),O.appendChild(T)}D.appendChild(O)}}for(let D of["BaseURL","SegmentBase","SegmentTemplate","SegmentList"])for(let N of U(f,D))f.removeChild(N);U(f,"Representation").length||m.removeChild(f)}for(let m of U(n.root,"Period"))for(let f of["BaseURL","SegmentBase","SegmentTemplate","SegmentList"])for(let D of U(m,f))m.removeChild(D);for(let m of["BaseURL","Location","UTCTiming","ContentSteering","PatchLocation","Metrics"])for(let f of U(n.root,m))n.root.removeChild(f);return new Fu.XMLSerializer().serializeToString(n.root)};})();
+`)}function du(e){this.options=e||{locator:{}}}du.prototype.parseFromString=function(e,t){var u=this.options,r=new Ar,n=u.domBuilder||new Re,o=u.errorHandler,i=u.locator,s=u.xmlns||{},a=/\/x?html?$/.test(t),c=a?cu.HTML_ENTITIES:cu.XML_ENTITIES;i&&n.setDocumentLocator(i),r.errorHandler=Er(o,n,i),r.domBuilder=u.domBuilder||n,a&&(s[""]=lu.HTML),s.xml=s.xml||lu.XML;var l=u.normalizeLineEndings||mu;return e&&typeof e=="string"?r.parse(l(e),s,c):r.errorHandler.error("invalid doc source"),n.doc};function Er(e,t,u){if(!e){if(t instanceof Re)return t;e=t}var r={},n=e instanceof Function;u=u||{};function o(i){var s=e[i];!s&&n&&(s=e.length==2?function(a){e(i,a)}:e),r[i]=s&&function(a){s("[xmldom "+i+"] "+a+ht(u))}||function(){}}return o("warning"),o("error"),o("fatalError"),r}function Re(){this.cdata=!1}function De(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}Re.prototype={startDocument:function(){this.doc=new hr().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,u,r){var n=this.doc,o=n.createElementNS(e,u||t),i=r.length;je(this,o),this.currentElement=o,this.locator&&De(this.locator,o);for(var s=0;s=t+u||t?new java.lang.String(e,t,u)+"":e}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){Re.prototype[e]=function(){return null}});function je(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}$e.__DOMHandler=Re;$e.normalizeLineEndings=mu;$e.DOMParser=du});var gt=re(Ye=>{var hu=mt();Ye.DOMImplementation=hu.DOMImplementation;Ye.XMLSerializer=hu.XMLSerializer;Ye.DOMParser=Du().DOMParser});var ie=Ae(xe()),yt="https://example.com",Vu=function(t,u){if(/^[a-z]+:/i.test(u))return u;/^data:/.test(t)&&(t=ie.default.location&&ie.default.location.href||"");var r=/^\/\//.test(t),n=!ie.default.location&&!/\/\//i.test(t);t=new ie.default.URL(t,ie.default.location||yt);var o=new URL(u,t);return n?o.href.slice(yt.length):r?o.href.slice(o.protocol.length):o.href},Le=Vu;var k=Ae(xe());var wt=function(t,u,r){u.forEach(function(n){for(var o in t.mediaGroups[n])for(var i in t.mediaGroups[n][o]){var s=t.mediaGroups[n][o][i];r(s,n,o,i)}})};var Qe=Ae(xe()),Gu=function(t){return Qe.default.atob?Qe.default.atob(t):Buffer.from(t,"base64").toString("binary")};function Ke(e){for(var t=Gu(e),u=new Uint8Array(t.length),r=0;r!!e&&typeof e=="object",L=(...e)=>e.reduce((t,u)=>(typeof u!="object"||Object.keys(u).forEach(r=>{Array.isArray(t[r])&&Array.isArray(u[r])?t[r]=t[r].concat(u[r]):gu(t[r])&&gu(u[r])?t[r]=L(t[r],u[r]):t[r]=u[r]}),t),{}),Su=e=>Object.keys(e).map(t=>e[t]),vr=(e,t)=>{let u=[];for(let r=e;re.reduce((t,u)=>t.concat(u),[]),yu=e=>{if(!e.length)return[];let t=[];for(let u=0;ue.reduce((u,r,n)=>(r[t]&&u.push(n),u),[]),Cr=(e,t)=>Su(e.reduce((u,r)=>(r.forEach(n=>{u[t(n)]=n}),u),{})),Oe={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},Fe=({baseUrl:e="",source:t="",range:u="",indexRange:r=""})=>{let n={uri:t,resolvedUri:Le(e||"",t)};if(u||r){let i=(u||r).split("-"),s=k.default.BigInt?k.default.BigInt(i[0]):parseInt(i[0],10),a=k.default.BigInt?k.default.BigInt(i[1]):parseInt(i[1],10);s{let t;return typeof e.offset=="bigint"||typeof e.length=="bigint"?t=k.default.BigInt(e.offset)+k.default.BigInt(e.length)-k.default.BigInt(1):t=e.offset+e.length-1,`${e.offset}-${t}`},Au=e=>(e&&typeof e!="number"&&(e=parseInt(e,10)),isNaN(e)?null:e),Tr={static(e){let{duration:t,timescale:u=1,sourceDuration:r,periodDuration:n}=e,o=Au(e.endNumber),i=t/u;return typeof o=="number"?{start:0,end:o}:typeof n=="number"?{start:0,end:n/i}:{start:0,end:r/i}},dynamic(e){let{NOW:t,clientOffset:u,availabilityStartTime:r,timescale:n=1,duration:o,periodStart:i=0,minimumUpdatePeriod:s=0,timeShiftBufferDepth:a=1/0}=e,c=Au(e.endNumber),l=(t+u)/1e3,p=r+i,d=l+s-p,h=Math.ceil(d*n/o),D=Math.floor((l-p-a)*n/o),g=Math.floor((l-p)*n/o);return{start:Math.max(0,D),end:typeof c=="number"?c:Math.min(h,g)}}},Sr=e=>t=>{let{duration:u,timescale:r=1,periodStart:n,startNumber:o=1}=e;return{number:o+t,duration:u/r,timeline:n,time:t*u}},Et=e=>{let{type:t,duration:u,timescale:r=1,periodDuration:n,sourceDuration:o}=e,{start:i,end:s}=Tr[t](e),a=vr(i,s).map(Sr(e));if(t==="static"){let c=a.length-1,l=typeof n=="number"?n:o;a[c].duration=l-u/r*c}return a},wu=e=>{let{baseUrl:t,initialization:u={},sourceDuration:r,indexRange:n="",periodStart:o,presentationTime:i,number:s=0,duration:a}=e;if(!t)throw new Error(Oe.NO_BASE_URL);let c=Fe({baseUrl:t,source:u.sourceURL,range:u.range}),l=Fe({baseUrl:t,source:t,indexRange:n});if(l.map=c,a){let p=Et(e);p.length&&(l.duration=p[0].duration,l.timeline=p[0].timeline)}else r&&(l.duration=r,l.timeline=o);return l.presentationTime=i||o,l.number=s,[l]},yr=(e,t,u)=>{let r=e.sidx.map?e.sidx.map:null,n=e.sidx.duration,o=e.timeline||0,i=e.sidx.byterange,s=i.offset+i.length,a=t.timescale,c=t.references.filter(g=>g.referenceType!==1),l=[],p=e.endList?"static":"dynamic",f=e.sidx.timeline,d=f,h=e.mediaSequence||0,D;typeof t.firstOffset=="bigint"?D=k.default.BigInt(s)+t.firstOffset:D=s+t.firstOffset;for(let g=0;gCr(e,({timeline:t})=>t).sort((t,u)=>t.timeline>u.timeline?1:-1),Ir=(e,t)=>{for(let u=0;u{let t=[];return wt(e,wr,(u,r,n,o)=>{t=t.concat(u.playlists||[])}),t},vu=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((u,r)=>{u.number=e.mediaSequence+r})},Rr=({oldPlaylists:e,newPlaylists:t,timelineStarts:u})=>{t.forEach(r=>{r.discontinuitySequence=u.findIndex(function({timeline:a}){return a===r.timeline});let n=Ir(e,r.attributes.NAME);if(!n||r.sidx)return;let o=r.segments[0],i=n.segments.findIndex(function(a){return Math.abs(a.presentationTime-o.presentationTime)
n.timeline||n.segments.length&&r.timeline>n.segments[n.segments.length-1].timeline)&&r.discontinuitySequence--;return}n.segments[i].discontinuity&&!o.discontinuity&&(o.discontinuity=!0,r.discontinuityStarts.unshift(0),r.discontinuitySequence--),vu({playlist:r,mediaSequence:n.segments[i].number})})},Or=({oldManifest:e,newManifest:t})=>{let u=e.playlists.concat(Eu(e)),r=t.playlists.concat(Eu(t));return t.timelineStarts=Bu([e.timelineStarts,t.timelineStarts]),Rr({oldPlaylists:u,newPlaylists:r,timelineStarts:t.timelineStarts}),t},Fr=e=>e&&e.uri+"-"+Nr(e.byterange),At=e=>{let t=e.reduce(function(r,n){return r[n.attributes.baseUrl]||(r[n.attributes.baseUrl]=[]),r[n.attributes.baseUrl].push(n),r},{}),u=[];return Object.values(t).forEach(r=>{let n=Su(r.reduce((o,i)=>{let s=i.attributes.id+(i.attributes.lang||"");return o[s]?(i.segments&&(i.segments[0]&&(i.segments[0].discontinuity=!0),o[s].segments.push(...i.segments)),i.attributes.contentProtection&&(o[s].attributes.contentProtection=i.attributes.contentProtection)):(o[s]=i,o[s].attributes.timelineStarts=[]),o[s].attributes.timelineStarts.push({start:i.attributes.periodStart,timeline:i.attributes.periodStart}),o},{}));u=u.concat(n)}),u.map(r=>(r.discontinuityStarts=br(r.segments||[],"discontinuity"),r))},vt=(e,t)=>{let u=Fr(e.sidx),r=u&&t[u]&&t[u].sidx;return r&&yr(e,r,e.sidx.resolvedUri),e},_r=(e,t={})=>{if(!Object.keys(t).length)return e;for(let u in e)e[u]=vt(e[u],t);return e},xr=({attributes:e,segments:t,sidx:u,mediaSequence:r,discontinuitySequence:n,discontinuityStarts:o},i)=>{let s={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,"PROGRAM-ID":1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:n,discontinuityStarts:o,timelineStarts:e.timelineStarts,mediaSequence:r,segments:t};return e.contentProtection&&(s.contentProtection=e.contentProtection),e.serviceLocation&&(s.attributes.serviceLocation=e.serviceLocation),u&&(s.sidx=u),i&&(s.attributes.AUDIO="audio",s.attributes.SUBTITLES="subs"),s},Lr=({attributes:e,segments:t,mediaSequence:u,discontinuityStarts:r,discontinuitySequence:n})=>{typeof t>"u"&&(t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration);let o={NAME:e.id,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1};e.codecs&&(o.CODECS=e.codecs);let i={attributes:o,uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:r,discontinuitySequence:n,mediaSequence:u,segments:t};return e.serviceLocation&&(i.attributes.serviceLocation=e.serviceLocation),i},Ur=(e,t={},u=!1)=>{let r,n=e.reduce((o,i)=>{let s=i.attributes.role&&i.attributes.role.value||"",a=i.attributes.lang||"",c=i.attributes.label||"main";if(a&&!i.attributes.label){let p=s?` (${s})`:"";c=`${i.attributes.lang}${p}`}o[c]||(o[c]={language:a,autoselect:!0,default:s==="main",playlists:[],uri:""});let l=vt(xr(i,u),t);return o[c].playlists.push(l),typeof r>"u"&&s==="main"&&(r=i,r.default=!0),o},{});if(!r){let o=Object.keys(n)[0];n[o].default=!0}return n},qr=(e,t={})=>e.reduce((u,r)=>{let n=r.attributes.label||r.attributes.lang||"text",o=r.attributes.lang||"und";return u[n]||(u[n]={language:o,default:!1,autoselect:!1,playlists:[],uri:""}),u[n].playlists.push(vt(Lr(r),t)),u},{}),Mr=e=>e.reduce((t,u)=>(u&&u.forEach(r=>{let{channel:n,language:o}=r;t[o]={autoselect:!1,default:!1,instreamId:n,language:o},r.hasOwnProperty("aspectRatio")&&(t[o].aspectRatio=r.aspectRatio),r.hasOwnProperty("easyReader")&&(t[o].easyReader=r.easyReader),r.hasOwnProperty("3D")&&(t[o]["3D"]=r["3D"])}),t),{}),Pr=({attributes:e,segments:t,sidx:u,discontinuityStarts:r})=>{let n={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,"PROGRAM-ID":1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:r,timelineStarts:e.timelineStarts,segments:t};return e.frameRate&&(n.attributes["FRAME-RATE"]=e.frameRate),e.qualityRanking!==void 0&&(n.attributes.SCORE=1/(e.qualityRanking+1)),e.contentProtection&&(n.contentProtection=e.contentProtection),e.serviceLocation&&(n.attributes.serviceLocation=e.serviceLocation),u&&(n.sidx=u),n},kr=({attributes:e})=>e.mimeType==="video/mp4"||e.mimeType==="video/webm"||e.contentType==="video",Vr=({attributes:e})=>e.mimeType==="audio/mp4"||e.mimeType==="audio/webm"||e.contentType==="audio",Gr=({attributes:e})=>e.mimeType==="text/vtt"||e.contentType==="text",zr=(e,t)=>{e.forEach(u=>{u.mediaSequence=0,u.discontinuitySequence=t.findIndex(function({timeline:r}){return r===u.timeline}),u.segments&&u.segments.forEach((r,n)=>{r.number=n})})},bu=e=>e?Object.keys(e).reduce((t,u)=>{let r=e[u];return t.concat(r.playlists)},[]):[],Iu=({dashPlaylists:e,locations:t,contentSteering:u,sidxMapping:r={},previousManifest:n,eventStream:o})=>{if(!e.length)return{};let{sourceDuration:i,type:s,suggestedPresentationDelay:a,minimumUpdatePeriod:c}=e[0].attributes,l=At(e.filter(kr)).map(Pr),p=At(e.filter(Vr)),f=At(e.filter(Gr)),d=e.map(m=>m.attributes.captionServices).filter(Boolean),h={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:i,playlists:_r(l,r)};c>=0&&(h.minimumUpdatePeriod=c*1e3),t&&(h.locations=t),u&&(h.contentSteering=u),s==="dynamic"&&(h.suggestedPresentationDelay=a),o&&o.length>0&&(h.eventStream=o);let D=h.playlists.length===0,g=p.length?Ur(p,r,D):null,O=f.length?qr(f,r):null,w=l.concat(bu(g),bu(O)),N=w.map(({timelineStarts:m})=>m);return h.timelineStarts=Bu(N),zr(w,h.timelineStarts),g&&(h.mediaGroups.AUDIO.audio=g),O&&(h.mediaGroups.SUBTITLES.subs=O),d.length&&(h.mediaGroups["CLOSED-CAPTIONS"].cc=Mr(d)),n?Or({oldManifest:n,newManifest:h}):h},Hr=(e,t,u)=>{let{NOW:r,clientOffset:n,availabilityStartTime:o,timescale:i=1,periodStart:s=0,minimumUpdatePeriod:a=0}=e,c=(r+n)/1e3,l=o+s,f=c+a-l;return Math.ceil((f*i-t)/u)},Ru=(e,t)=>{let{type:u,minimumUpdatePeriod:r=0,media:n="",sourceDuration:o,timescale:i=1,startNumber:s=1,periodStart:a}=e,c=[],l=-1;for(let p=0;pl&&(l=D);let g;if(h<0){let N=p+1;N===t.length?u==="dynamic"&&r>0&&n.indexOf("$Number$")>0?g=Hr(e,l,d):g=(o*i-l)/d:g=(t[N].t-l)/d}else g=h+1;let O=s+c.length+g,w=s+c.length;for(;w(t,u,r,n)=>{if(t==="$$")return"$";if(typeof e[u]>"u")return t;let o=""+e[u];return u==="RepresentationID"||(r?n=parseInt(n,10):n=1,o.length>=n)?o:`${new Array(n-o.length+1).join("0")}${o}`},Cu=(e,t)=>e.replace(Xr,jr(t)),$r=(e,t)=>!e.duration&&!t?[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}]:e.duration?Et(e):Ru(e,t),Yr=(e,t)=>{let u={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:r={sourceURL:"",range:""}}=e,n=Fe({baseUrl:e.baseUrl,source:Cu(r.sourceURL,u),range:r.range});return $r(e,t).map(i=>{u.Number=i.number,u.Time=i.time;let s=Cu(e.media||"",u),a=e.timescale||1,c=e.presentationTimeOffset||0,l=e.periodStart+(i.time-c)/a;return{uri:s,timeline:i.timeline,duration:i.duration,resolvedUri:Le(e.baseUrl||"",s),map:n,number:i.number,presentationTime:l}})},Wr=(e,t)=>{let{baseUrl:u,initialization:r={}}=e,n=Fe({baseUrl:u,source:r.sourceURL,range:r.range}),o=Fe({baseUrl:u,source:t.media,range:t.mediaRange});return o.map=n,o},Zr=(e,t)=>{let{duration:u,segmentUrls:r=[],periodStart:n}=e;if(!u&&!t||u&&t)throw new Error(Oe.SEGMENT_TIME_UNSPECIFIED);let o=r.map(a=>Wr(e,a)),i;return u&&(i=Et(e)),t&&(i=Ru(e,t)),i.map((a,c)=>{if(o[c]){let l=o[c],p=e.timescale||1,f=e.presentationTimeOffset||0;return l.timeline=a.timeline,l.duration=a.duration,l.number=a.number,l.presentationTime=n+(a.time-f)/p,l}}).filter(a=>a)},Jr=({attributes:e,segmentInfo:t})=>{let u,r;t.template?(r=Yr,u=L(e,t.template)):t.base?(r=wu,u=L(e,t.base)):t.list&&(r=Zr,u=L(e,t.list));let n={attributes:e};if(!r)return n;let o=r(u,t.segmentTimeline);if(u.duration){let{duration:i,timescale:s=1}=u;u.duration=i/s}else o.length?u.duration=o.reduce((i,s)=>Math.max(i,Math.ceil(s.duration)),0):u.duration=0;return n.attributes=u,n.segments=o,t.base&&u.indexRange&&(n.sidx=o[0],n.segments=[]),n},bt=e=>e.map(Jr),R=(e,t)=>yu(e.childNodes).filter(({tagName:u})=>u===t),_e=e=>e.textContent.trim(),Qr=e=>parseFloat(e.split("/").reduce((t,u)=>t/u)),he=e=>{let s=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!s)return 0;let[a,c,l,p,f,d]=s.slice(1);return parseFloat(a||0)*31536e3+parseFloat(c||0)*2592e3+parseFloat(l||0)*86400+parseFloat(p||0)*3600+parseFloat(f||0)*60+parseFloat(d||0)},Kr=e=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),Date.parse(e)),Nu={mediaPresentationDuration(e){return he(e)},availabilityStartTime(e){return Kr(e)/1e3},minimumUpdatePeriod(e){return he(e)},suggestedPresentationDelay(e){return he(e)},type(e){return e},timeShiftBufferDepth(e){return he(e)},start(e){return he(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return Qr(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){let t=parseInt(e,10);return isNaN(t)?he(e):t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},qualityRanking(e){return parseInt(e,10)},qualityranking(e){return parseInt(e,10)},DEFAULT(e){return e}},en={qualityranking:"qualityRanking"},F=e=>e&&e.attributes?yu(e.attributes).reduce((t,u)=>{let r=Nu[u.name]||Nu.DEFAULT,n=en[u.name]||u.name;return t[n]=r(u.value),t},{}):{},tn={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},We=(e,t)=>t.length?ge(e.map(function(u){return t.map(function(r){let n=_e(r),o=Le(u.baseUrl,n),i=L(F(r),{baseUrl:o});return o!==n&&!i.serviceLocation&&u.serviceLocation&&(i.serviceLocation=u.serviceLocation),i})})):e,Ct=e=>{let t=R(e,"SegmentTemplate")[0],u=R(e,"SegmentList")[0],r=u&&R(u,"SegmentURL").map(p=>L({tag:"SegmentURL"},F(p))),n=R(e,"SegmentBase")[0],o=u||t,i=o&&R(o,"SegmentTimeline")[0],s=u||n||t,a=s&&R(s,"Initialization")[0],c=t&&F(t);c&&a?c.initialization=a&&F(a):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});let l={template:c,segmentTimeline:i&&R(i,"S").map(p=>F(p)),list:u&&L(F(u),{segmentUrls:r,initialization:F(a)}),base:n&&L(F(n),{initialization:F(a)})};return Object.keys(l).forEach(p=>{l[p]||delete l[p]}),l},un=(e,t,u)=>r=>{let n=R(r,"BaseURL"),o=We(t,n),i=L(e,F(r)),s=Ct(r);return o.map(a=>({segmentInfo:L(u,s),attributes:L(i,a)}))},rn=e=>e.reduce((t,u)=>{let r=F(u);r.schemeIdUri&&(r.schemeIdUri=r.schemeIdUri.toLowerCase());let n=tn[r.schemeIdUri];if(n){t[n]={attributes:r};let o=R(u,"cenc:pssh")[0];if(o){let i=_e(o);t[n].pssh=i&&Ke(i)}}return t},{}),nn=e=>{if(e.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof e.value!="string"?[]:e.value.split(";")).map(u=>{let r,n;return n=u,/^CC\d=/.test(u)?[r,n]=u.split("="):/^CC\d$/.test(u)&&(r=u),{channel:r,language:n}});if(e.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof e.value!="string"?[]:e.value.split(";")).map(u=>{let r={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(u)){let[n,o=""]=u.split("=");r.channel=n,r.language=u,o.split(",").forEach(i=>{let[s,a]=i.split(":");s==="lang"?r.language=a:s==="er"?r.easyReader=Number(a):s==="war"?r.aspectRatio=Number(a):s==="3D"&&(r["3D"]=Number(a))})}else r.language=u;return r.channel&&(r.channel="SERVICE"+r.channel),r})},on=e=>ge(R(e.node,"EventStream").map(t=>{let u=F(t),r=u.schemeIdUri;return R(t,"Event").map(n=>{let o=F(n),i=o.presentationTime||0,s=u.timescale||1,a=o.duration||0,c=i/s+e.attributes.start;return{schemeIdUri:r,value:u.value,id:o.id,start:c,end:c+a/s,messageData:_e(n)||o.messageData,contentEncoding:u.contentEncoding,presentationTimeOffset:u.presentationTimeOffset||0}})})),an=(e,t,u)=>r=>{let n=F(r),o=We(t,R(r,"BaseURL")),i=R(r,"Role")[0],s={role:F(i)},a=L(e,n,s),c=R(r,"Accessibility")[0],l=nn(F(c));l&&(a=L(a,{captionServices:l}));let p=R(r,"Label")[0];if(p&&p.childNodes.length){let g=p.childNodes[0].nodeValue.trim();a=L(a,{label:g})}let f=rn(R(r,"ContentProtection"));Object.keys(f).length&&(a=L(a,{contentProtection:f}));let d=Ct(r),h=R(r,"Representation"),D=L(u,d);return ge(h.map(un(a,o,D)))},sn=(e,t)=>(u,r)=>{let n=We(t,R(u.node,"BaseURL")),o=L(e,{periodStart:u.attributes.start});typeof u.attributes.duration=="number"&&(o.periodDuration=u.attributes.duration);let i=R(u.node,"AdaptationSet"),s=Ct(u.node);return ge(i.map(an(o,n,s)))},cn=(e,t)=>{if(e.length>1&&t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!e.length)return null;let u=L({serverURL:_e(e[0])},F(e[0]));return u.queryBeforeStart=u.queryBeforeStart==="true",u},ln=({attributes:e,priorPeriodAttributes:t,mpdType:u})=>typeof e.start=="number"?e.start:t&&typeof t.start=="number"&&typeof t.duration=="number"?t.start+t.duration:!t&&u==="static"?0:null,Ou=(e,t={})=>{let{manifestUri:u="",NOW:r=Date.now(),clientOffset:n=0,eventHandler:o=function(){}}=t,i=R(e,"Period");if(!i.length)throw new Error(Oe.INVALID_NUMBER_OF_PERIOD);let s=R(e,"Location"),a=F(e),c=We([{baseUrl:u}],R(e,"BaseURL")),l=R(e,"ContentSteering");a.type=a.type||"static",a.sourceDuration=a.mediaPresentationDuration||0,a.NOW=r,a.clientOffset=n,s.length&&(a.locations=s.map(_e));let p=[];return i.forEach((f,d)=>{let h=F(f),D=p[d-1];h.start=ln({attributes:h,priorPeriodAttributes:D?D.attributes:null,mpdType:a.type}),p.push({node:f,attributes:h})}),{locations:a.locations,contentSteeringInfo:cn(l,o),representationInfo:ge(p.map(sn(a,c))),eventStream:ge(p.map(on))}},Fu=e=>{if(e==="")throw new Error(Oe.DASH_EMPTY_MANIFEST);let t=new Tu.DOMParser,u,r;try{u=t.parseFromString(e,"application/xml"),r=u&&u.documentElement.tagName==="MPD"?u.documentElement:null}catch{}if(!r||r&&r.getElementsByTagName("parsererror").length>0)throw new Error(Oe.DASH_INVALID_XML);return r};var _u=Ae(gt(),1),M=(e,t)=>Array.from(e.childNodes).filter(u=>u.nodeType===1&&u.localName===t);function Nt(e,t){let u=Fu(e);if((u.getAttribute("type")||"static")!=="static"||u.getElementsByTagNameNS("*","ContentProtection").length)throw Error("unsupported_mpd");for(let o of[u,...Array.from(u.getElementsByTagName("*"))])for(let i of Array.from(o.attributes||[]))if(i.namespaceURI==="http://www.w3.org/1999/xlink"&&i.localName==="href")throw Error("external_mpd");let r=0;for(let o of M(u,"Period"))for(let i of M(o,"AdaptationSet"))for(let s of M(i,"Representation"))s.setAttribute("piikSourceNode",String(r++));let n=Ou(u,{manifestUri:t});return{root:u,inherited:n}}var Ze=e=>Number.isFinite(e)&&e>0?e:null;function pn(e){let t=e.inherited.representationInfo,u=Iu({dashPlaylists:t.map(o=>({attributes:{...o.attributes},segments:[]}))}),r=[...new Set(t.filter(o=>["video","audio"].includes((o.attributes.mimeType||"").split("/")[0])).map(o=>o.attributes.periodStart))];return[...(u.playlists||[]).map(o=>({p:o,kind:"video",language:""})),...Object.values(u.mediaGroups?.AUDIO||{}).flatMap(o=>Object.values(o).flatMap(i=>i.playlists.map(s=>({p:s,kind:"audio",language:i.language||""}))))].flatMap(({p:o,kind:i,language:s})=>{let a=t.flatMap((f,d)=>{let h=f.attributes;return h.id===o.attributes.NAME&&h.baseUrl===o.resolvedUri&&(h.lang||"")===s&&(h.mimeType||"").split("/")[0]===i?[d]:[]}),c=a.map(f=>t[f].attributes),l=c.map(f=>f.periodStart);if(l.length!==r.length||new Set(l).size!==r.length||r.some(f=>!l.includes(f)))return[];let p=c[0];return c.some(f=>f.mimeType!==p.mimeType||f.codecs!==p.codecs)?[]:[{indices:a,kind:i,label:p.label||p.id||"",mimeType:p.mimeType,codec:p.codecs||"",language:s,role:p.role?.value||"",width:Ze(p.width),height:Ze(p.height),bandwidth:Ze(p.bandwidth),frameRate:Ze(p.frameRate)}]})}globalThis.inspectMpd=(e,t)=>JSON.stringify(pn(Nt(e,t)));var Je=e=>e?{url:e.resolvedUri,range:e.byterange??null}:null;globalThis.resolveMpd=(e,t,u)=>{let r=Nt(e,t),n=JSON.parse(u),o=n.map(i=>r.inherited.representationInfo[i]);if(o.some(i=>!i))throw Error("invalid_choice");return JSON.stringify(bt(o).map((i,s)=>({index:n[s],mimeType:i.attributes.mimeType,period:i.attributes.periodStart,codecs:i.attributes.codecs||"",indexResource:Je(i.sidx),indexInit:Je(i.sidx?.map),segments:i.segments.map(a=>({resource:Je(a),initialization:Je(a.map),duration:a.duration,presentationTime:a.presentationTime,timeline:a.timeline}))})))};globalThis.serializeMpd=(e,t,u,r)=>{let n=Nt(e,t),o=JSON.parse(u),i=JSON.parse(r),s=n.inherited.representationInfo,a=o.map(m=>s[m]),c=bt(a),l=new Map;for(let m=0;m{let E=i[m];if(typeof E!="string"||!/[0-9a-f-]{36}/.test(E))throw Error("unadmitted_resource");return E},f=(m,E,b,T)=>{let B;for(let A of[E,b,m]){let I=M(A,T)[0];if(I)if(!B)B=I.cloneNode(!0);else{for(let C of Array.from(I.attributes))B.setAttributeNS(C.namespaceURI,C.name,C.value);for(let C of Array.from(I.childNodes).filter(X=>X.nodeType===1)){for(let X of M(B,C.localName))B.removeChild(X);B.appendChild(C.cloneNode(!0))}}}return B},d=(m,E)=>{E?m.setAttribute("range",E.offset+"-"+(E.offset+E.length-1)):m.removeAttribute("range")};for(let m of M(n.root,"Period"))for(let E of M(m,"AdaptationSet")){for(let b of M(E,"Representation")){let T=l.get(b.getAttribute("piikSourceNode"));if(!T){E.removeChild(b);continue}let{info:B,track:A}=T,I=f(b,m,E,"SegmentBase"),C=f(b,m,E,"SegmentTemplate"),X=f(b,m,E,"SegmentList");for(let $ of["BaseURL","SegmentBase","SegmentTemplate","SegmentList"])for(let P of M(b,$))b.removeChild(P);if(b.removeAttribute("piikSourceNode"),A.sidx){if(!I)throw Error("missing_index");let $=b.ownerDocument.createElementNS(n.root.namespaceURI,"BaseURL");$.textContent=p(A.sidx.resolvedUri),b.appendChild($);let P=M(I,"Initialization")[0];P&&A.sidx.map&&(P.setAttribute("sourceURL",p(A.sidx.map.resolvedUri)),d(P,A.sidx.map.byterange)),b.appendChild(I)}else{if(!A.segments.length)throw Error("unsupported_address");let $=C||X;if(!$)throw Error("unsupported_address");let P=b.ownerDocument.createElementNS(n.root.namespaceURI,"SegmentList");for(let v of Array.from($.attributes))["media","initialization","index","bitstreamSwitching"].includes(v.name)||P.setAttributeNS(v.namespaceURI,v.name,v.value);for(let v of M($,"SegmentTimeline"))P.appendChild(v.cloneNode(!0));let te=A.segments[0].map;if(te){let v=b.ownerDocument.createElementNS(n.root.namespaceURI,"Initialization");v.setAttribute("sourceURL",p(te.resolvedUri)),d(v,te.byterange),P.appendChild(v)}for(let v of A.segments){if(te&&v.map?.resolvedUri!==te.resolvedUri)throw Error("changing_init");let U=b.ownerDocument.createElementNS(n.root.namespaceURI,"SegmentURL");U.setAttribute("media",p(v.resolvedUri)),v.byterange&&U.setAttribute("mediaRange",v.byterange.offset+"-"+(v.byterange.offset+v.byterange.length-1)),P.appendChild(U)}b.appendChild(P)}}for(let b of["BaseURL","SegmentBase","SegmentTemplate","SegmentList"])for(let T of M(E,b))E.removeChild(T);M(E,"Representation").length||m.removeChild(E)}let h="urn:mpeg:dash:schema:mpd:2011",D=n.root.ownerDocument.implementation.createDocument(h,"MPD",null),g={MPD:"mediaPresentationDuration minBufferTime",Period:"start duration",AdaptationSet:"contentType mimeType codecs width height frameRate audioSamplingRate lang",Representation:"mimeType codecs bandwidth width height frameRate audioSamplingRate",SegmentBase:"indexRange indexRangeExact timescale presentationTimeOffset",SegmentList:"timescale presentationTimeOffset startNumber duration",Initialization:"sourceURL range",SegmentURL:"media mediaRange",S:"t d r"},O={MPD:["Period"],Period:["AdaptationSet"],AdaptationSet:["Representation"],Representation:["BaseURL","SegmentBase","SegmentList"],SegmentBase:["Initialization"],SegmentList:["Initialization","SegmentTimeline","SegmentURL"],SegmentTimeline:["S"]},w=new Map;function N(m,E){let b=E.localName;for(let T of M(m,"EssentialProperty")){let B=T.getAttribute("schemeIdUri"),A=D.createElementNS(h,"EssentialProperty");if(A.setAttribute("schemeIdUri",B),["urn:mpeg:mpegB:cicp:TransferCharacteristics","urn:mpeg:mpegB:cicp:ColourPrimaries","urn:mpeg:mpegB:cicp:MatrixCoefficients"].includes(B)){let I=Number(T.getAttribute("value"));if(!Number.isSafeInteger(I))throw Error("unsupported_mpd");A.setAttribute("value",String(I))}else if(B!=="urn:mpeg:dash:ssr:2023")throw Error("unsupported_mpd");E.appendChild(A)}if(b==="AdaptationSet"||b==="Representation")for(let T of M(m,"AudioChannelConfiguration")){let B=T.getAttribute("schemeIdUri"),A=T.getAttribute("value"),I;if(B==="urn:mpeg:dash:outputChannelPositionList:2012")I=String(A.trim().split(/ +/).length);else if(["urn:mpeg:dash:23003:3:audio_channel_configuration:2011","urn:dts:dash:audio_channel_configuration:2012","urn:mpeg:mpegB:cicp:ChannelConfiguration"].includes(B))I=parseInt(A,10).toString(10);else if(["tag:dolby.com,2015:dash:audio_channel_configuration:2015","tag:dolby.com,2014:dash:audio_channel_configuration:2011","urn:dolby:dash:audio_channel_configuration:2011"].includes(B))I=parseInt(A,16).toString(16);else continue;if(I==="NaN")continue;let C=D.createElementNS(h,"AudioChannelConfiguration");C.setAttribute("schemeIdUri",B==="urn:mpeg:dash:outputChannelPositionList:2012"?"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":B),C.setAttribute("value",I),E.appendChild(C)}for(let T of g[b]?.split(" ")||[])m.hasAttribute(T)&&E.setAttribute(T,m.getAttribute(T));if(b==="Representation"){let T=m.getAttribute("id");w.has(T)||w.set(T,String(w.size+1)),E.setAttribute("id",w.get(T))}b==="BaseURL"&&(E.textContent=m.textContent);for(let T of O[b]||[])for(let B of M(m,T)){let A=D.createElementNS(h,T);E.appendChild(A),N(B,A)}}return N(n.root,D.documentElement),new _u.XMLSerializer().serializeToString(D.documentElement)};})();
/*! Bundled license information:
mpd-parser/dist/mpd-parser.es.js:
diff --git a/prototype/channel-mpd/src/tests.rs b/prototype/channel-mpd/src/tests.rs
index b1c17219b..adae3f3a9 100644
--- a/prototype/channel-mpd/src/tests.rs
+++ b/prototype/channel-mpd/src/tests.rs
@@ -170,3 +170,31 @@ fn static_mpd_without_a_complete_track_is_unsupported() {
);
assert_eq!(result.err().unwrap().to_string(), "watch_mpd_unsupported");
}
+
+#[test]
+fn viewer_manifest_projects_playback_metadata() {
+ let fixture = include_str!("../fixtures/clear-multiperiod.mpd");
+ let serialize = |extra: &str| {
+ let xml = fixture.replacen("fixture-titlefixture-extension"#).unwrap();
+ for marker in [
+ "fixture-note",
+ "fixture-title",
+ "urn:fixture:event",
+ "fixture-extension",
+ ] {
+ assert!(!output.contains(marker));
+ }
+ assert!(serialize(r#""#).is_err());
+}
diff --git a/prototype/channel-native/src/input/tests.rs b/prototype/channel-native/src/input/tests.rs
index 59b70c247..028717650 100644
--- a/prototype/channel-native/src/input/tests.rs
+++ b/prototype/channel-native/src/input/tests.rs
@@ -1186,12 +1186,16 @@ fn browser_webcrypto_vector_authenticates_direction_epoch_and_sequence() {
// key=00..1f, nonce=20..2b, seq=1, direction=0, ASCII simple UUID epoch.
let secret = std::array::from_fn(|i| i as u8);
let flow = Uuid::parse_str("0123456789abcdef0123456789abcdef").unwrap();
- let packet = "AAAAAAAAAAEgISIjJCUmJygpKiupGNIJHP04NDgPO6CiOol+MAJ012RUZOuDGCEWCIGW";
+ let fixture: serde_json::Value = serde_json::from_str(include_str!(
+ "../../../../tests/fixtures/input-cipher.json"
+ )).unwrap();
+ let packet = fixture["packet"].as_str().unwrap();
+ let ready = serde_json::to_vec(&fixture["state"]).unwrap();
let mut cipher = Cipher::new(&secret);
assert!(cipher.open(packet, Uuid::new_v4()).is_err());
assert_eq!(cipher.open(packet, flow).unwrap(), br#"{"type":"sync"}"#);
assert!(cipher.open(packet, flow).is_err());
- let state = cipher.seal(br#"{"state":"ready"}"#, flow).unwrap();
+ let state = cipher.seal(&ready, flow).unwrap();
let bytes = STANDARD.decode(&state).unwrap();
let plain = Aes256Gcm::new((&secret).into())
.decrypt(
@@ -1202,7 +1206,7 @@ fn browser_webcrypto_vector_authenticates_direction_epoch_and_sequence() {
},
)
.unwrap();
- assert_eq!(plain, br#"{"state":"ready"}"#);
+ assert_eq!(plain, ready);
assert!(
Cipher::new(&secret).open(&state, flow).is_err(),
"reflected reply is not controller input"
diff --git a/scripts/app-package-targets.mjs b/scripts/app-package-targets.mjs
index 2798963c6..de3e61b42 100644
--- a/scripts/app-package-targets.mjs
+++ b/scripts/app-package-targets.mjs
@@ -91,6 +91,10 @@ export const APP_PACKAGE_TARGETS = [
},
];
+export function appArtifactName(targetId) {
+ return targetId === ANDROID_APP_PACKAGE_TARGET.id ? ANDROID_APP_PACKAGE_TARGET.artifact : `piik-app-${targetId}.zip`;
+}
+
export function appPackageTarget(id) {
return APP_PACKAGE_TARGETS.find((target) => target.id === id) ?? null;
}
diff --git a/scripts/build-channel-web.mjs b/scripts/build-channel-web.mjs
index b4fbe587a..4534a39e5 100644
--- a/scripts/build-channel-web.mjs
+++ b/scripts/build-channel-web.mjs
@@ -28,7 +28,7 @@ export function buildChannelWeb(root, { version, revision, cargoTarget }) {
writeChannelWebLicenseNotices(root, join(root, 'public', 'third-party-licenses.txt'));
for (const args of [
[join(root, 'prototype', 'channel-browser', 'build.mjs')],
- [join(root, 'node_modules', 'vite', 'bin', 'vite.js'), 'build', '--config', 'prototype/channel-browser/web.vite.config.ts'],
+ [join(root, 'node_modules', 'vite', 'bin', 'vite.js'), 'build'],
]) {
const result = spawnSync(process.execPath, args, { cwd: root, env, stdio: 'inherit', windowsHide: true });
if (result.error) throw result.error;
diff --git a/scripts/package-app-candidate.mjs b/scripts/package-app-candidate.mjs
index 2fbe96772..3c4a04285 100644
--- a/scripts/package-app-candidate.mjs
+++ b/scripts/package-app-candidate.mjs
@@ -17,7 +17,7 @@ import { pipeline } from "node:stream/promises";
import { fileURLToPath } from "node:url";
import { parseArgs } from "node:util";
-import { appPackageTarget, CLOUDFLARED_VERSION } from "./app-package-targets.mjs";
+import { appArtifactName, appPackageTarget, CLOUDFLARED_VERSION } from "./app-package-targets.mjs";
import { createZip, extractZip, tarExecutable } from "./archive-tool.mjs";
import { assertBuildInputRetained, assertCleanRevision, resetBuildWorkspace } from "./build-workspace.mjs";
import { buildVersion } from "./release-version.mjs";
@@ -122,7 +122,7 @@ try {
mkdirSync(outputRoot, { recursive: false, mode: 0o700 });
outputOwned = true;
- const archiveName = `piik-app-${target.id}.zip`;
+ const archiveName = appArtifactName(target.id);
const archive = join(outputRoot, archiveName);
createZip(packageRoot, archive);
const extractedRoot = join(temporaryRoot, "extracted");
diff --git a/scripts/package-server-release.mjs b/scripts/package-server-release.mjs
index 1b7cffc6a..69f636866 100644
--- a/scripts/package-server-release.mjs
+++ b/scripts/package-server-release.mjs
@@ -19,7 +19,7 @@ import { writeServerLicenseNotices } from "./package-licenses.mjs";
import { createZip, extractZip, tarExecutable } from "./archive-tool.mjs";
import { assertBuildInputRetained, assertCleanRevision, resetBuildWorkspace } from "./build-workspace.mjs";
import { buildVersion } from "./release-version.mjs";
-import { SERVER_PACKAGE_TARGETS } from "./server-package-targets.mjs";
+import { SERVER_PACKAGE_TARGETS, serverReleaseNames } from "./server-package-targets.mjs";
import { sha256, fileRecords, compareFileRecords } from "./package-files.mjs";
import { copyChannelWeb } from "./channel-web-artifact.mjs";
import { buildChannelWeb } from "./build-channel-web.mjs";
@@ -180,11 +180,7 @@ try {
const paths = runtimePaths(target);
const records = recordsFor(runtimeRoot, paths);
- const stem = `piik-${releaseId}${target.suffix}`;
- const manifestName = `${stem}.manifest.tsv`;
- const archiveKind = target.goos === "windows" ? "zip" : "tar.gz";
- const artifactName = `${stem}-runtime.${archiveKind}`;
- const descriptorName = `${stem}.release.json`;
+ const { manifest: manifestName, artifact: artifactName, descriptor: descriptorName } = serverReleaseNames(target, revision);
mkdirSync(outputRoot, { recursive: false, mode: 0o700 });
outputOwned = true;
const manifestPath = join(outputRoot, manifestName);
@@ -196,7 +192,7 @@ try {
"ascii",
);
- if (archiveKind === "zip") {
+ if (target.goos === "windows") {
createZip(runtimeRoot, artifactPath);
mkdirSync(verifyRoot);
extractZip(artifactPath, verifyRoot);
diff --git a/scripts/release-artifacts.mjs b/scripts/release-artifacts.mjs
index 97192286b..20045aa1d 100644
--- a/scripts/release-artifacts.mjs
+++ b/scripts/release-artifacts.mjs
@@ -2,8 +2,8 @@ import { createHash, createPublicKey, verify } from "node:crypto";
import { closeSync, existsSync, mkdirSync, openSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
import { basename, join, resolve } from "node:path";
import { isDeepStrictEqual } from "node:util";
-import { APP_PACKAGE_TARGETS, ANDROID_APP_PACKAGE_TARGET } from "./app-package-targets.mjs";
-import { SERVER_PACKAGE_TARGETS } from "./server-package-targets.mjs";
+import { appArtifactName, APP_PACKAGE_TARGETS, ANDROID_APP_PACKAGE_TARGET } from "./app-package-targets.mjs";
+import { SERVER_PACKAGE_TARGETS, serverReleaseNames } from "./server-package-targets.mjs";
export function updateIndex(release) {
return { schema: 1, version: release.version, revision: release.revision,
@@ -109,15 +109,19 @@ export function readReleaseArtifacts(directory, version, revision, { publicKey =
const target = descriptor.target ?? "server";
if (targets.has(target)) throw new Error(`Duplicate release target: ${target}`);
targets.add(target);
+ const serverTarget = SERVER_PACKAGE_TARGETS.find(candidate => candidate.id === target);
+ const serverNames = serverTarget && serverReleaseNames(serverTarget, revision);
+ if (descriptor.artifact !== (serverNames?.artifact ?? appArtifactName(target))) {
+ throw new Error(`Release artifact name mismatch: ${target}`);
+ }
const archive = asset(descriptor.artifact);
if (archive.sha256 !== descriptor.artifactSha256) {
throw new Error(`Release artifact checksum mismatch: ${name}`);
}
packages.push(archive);
packagesByTarget.set(target, archive);
- const serverTarget = SERVER_PACKAGE_TARGETS.find(candidate => candidate.id === target);
if (serverTarget) {
- if (asset(descriptor.manifest).sha256 !== descriptor.manifestSha256) {
+ if (descriptor.manifest !== serverNames.manifest || asset(descriptor.manifest).sha256 !== descriptor.manifestSha256) {
throw new Error("Server manifest checksum mismatch");
}
servers.push({ ...archive, arch: serverTarget.goarch, goos: serverTarget.goos });
diff --git a/scripts/server-package-targets.mjs b/scripts/server-package-targets.mjs
index 65a4d91b1..5d2f75f73 100644
--- a/scripts/server-package-targets.mjs
+++ b/scripts/server-package-targets.mjs
@@ -6,3 +6,9 @@ export const SERVER_PACKAGE_TARGETS = [
{ id: "server-linux-arm64", goos: "linux", goarch: "arm64", rustTarget: "aarch64-unknown-linux-musl", suffix: "-linux-arm64" },
{ id: "server-windows-amd64", goos: "windows", goarch: "amd64", rustTarget: "x86_64-pc-windows-msvc", suffix: "-windows-amd64" },
];
+
+export function serverReleaseNames(target, revision) {
+ const stem = `piik-${revision.slice(0, 7)}${target.suffix}`;
+ const extension = target.goos === "windows" ? "zip" : "tar.gz";
+ return { artifact: `${stem}-runtime.${extension}`, manifest: `${stem}.manifest.tsv`, descriptor: `${stem}.release.json` };
+}
diff --git a/src/client/channel/components/ChannelMessageContent.tsx b/src/client/channel/components/ChannelMessageContent.tsx
index c8af87478..a32679dc3 100644
--- a/src/client/channel/components/ChannelMessageContent.tsx
+++ b/src/client/channel/components/ChannelMessageContent.tsx
@@ -33,7 +33,9 @@ export function ChannelMessageContent({ message, users, selfUserId }: {
// Markdown also decodes entities; neither raw nor decoded text may forge a reference.
const decoded = markdown.utils.unescapeAll(message.text);
let marker = "\uE000";
- while ([message.text, decoded].some(text => text.includes(marker) || text.toLowerCase().includes(encodeURI(marker).toLowerCase()))) marker += "\uE000";
+ while ([message.text, decoded].some(text => text.includes(marker) || text.toLowerCase().includes(encodeURI(marker).toLowerCase()))) {
+ marker = String.fromCharCode(marker.charCodeAt(0) + 1);
+ }
const mentions = message.mentions ?? [];
const references = mentions.map((mention, index) => ({ mention, marker: `${marker}${index}${marker}`,
text: message.text.slice(mention.start, mention.end) }));
@@ -67,13 +69,15 @@ export function ChannelMessageContent({ message, users, selfUserId }: {
else if (token.type === "fence" || token.type === "code_block") result.push();
else if (token.type === "softbreak" || token.type === "hardbreak") result.push(
);
else if (token.nesting === 1) {
+ const contentStart = index;
const inner = children();
if (token.tag === "a") {
const href = references.reduce((href, reference) => href.split(encodeURI(reference.marker)).join(encodeURI(reference.text)),
restore(String(token.attrGet("href") ?? "")));
+ const hasLabel = tokens.slice(contentStart, index - 1).some(token => token.content.trim());
// Chat links never navigate within the app or execute another URL scheme.
result.push(isExternalLink(href)
- ? {inner} : {inner});
+ ? {hasLabel ? inner : href} : {inner});
} else if (tags.has(token.tag)) result.push(createElement(token.tag, { key,
...(token.tag === "ol" && token.attrGet("start") ? { start: Number(token.attrGet("start")) } : {}) }, inner));
else result.push({inner});
diff --git a/src/client/channel/session.ts b/src/client/channel/session.ts
index 6c34566ec..072e23074 100644
--- a/src/client/channel/session.ts
+++ b/src/client/channel/session.ts
@@ -36,7 +36,7 @@ import { AppPage, ChannelApp, RoomSettingsRejected, discoverChannelAppHealth, ty
import { nativeVideoCodecSchema, type NativeCaptureTarget, type EncodingExecution, type NativePageMpdSelection, type NativePageMpdCatalog } from "../native/wire";
import type { RemoteControlMode } from "../remote-control/protocol";
import { readRoomPreferences, saveRoomPreferences, subscribeRoomPreferences, type RoomPreferences } from "../lib/room-preferences";
-import { CHANNEL_EVENT_BYTES, MAX_NAME_UNITS, MAX_RELAY_CAPACITY, PROFILE_PAGE_SIZE } from "../../shared/core-limits";
+import { CHANNEL_EVENT_BYTES, MAX_RELAY_CAPACITY, PROFILE_PAGE_SIZE } from "../../shared/core-limits";
import type { MicrophoneInput } from "../media/microphone-input";
import { VoiceParticipation } from "./voice-participation";
import { debugEvent, debugOperation, debugSample, registerDebugCollector } from "../lib/debug";
@@ -130,7 +130,7 @@ function captureSource(track: MediaStreamTrack | undefined, camera = false): Scr
|| /^(?:current-)?web-contents-media-stream:\/\/[A-F0-9]{32}$/.test(label))) return { kind: "screen", name: null };
let name = "";
for (const character of label) {
- if (name.length + character.length > MAX_NAME_UNITS) break;
+ if (name.length + character.length > 64) break;
name += character;
}
return { kind: camera ? "camera" : "screen", name: name || null };
@@ -3198,8 +3198,7 @@ export class ChannelSession {
const activity = this.view.state?.watchActivities.find(value => value.id === id);
if (!activity || !(await this.watchRoutesOf(activity)).includes(mode)) throw new Error("watch_source_unavailable");
}
- await this.joinWatchRoute(id, mode);
- this.preferRoute(id, mode);
+ await this.joinWatchRoute(id, mode, true);
return;
}
const activity = this.view.state?.watchActivities.find(value => value.id === id);
@@ -3213,9 +3212,15 @@ export class ChannelSession {
const player = this.watchPlayer(id);
if (player) void this.followWatchFailure(id, player);
});
- private async joinWatchRoute(id: string, mode: WatchMode): Promise {
+ private async joinWatchRoute(id: string, mode: WatchMode, manual = false): Promise {
const current = this.watchPlayer(id);
- if (current?.mode === mode && !current.error && current.presentation.kind !== "external") return;
+ if (current?.mode === mode && !current.error && current.presentation.kind !== "external") {
+ if (manual) {
+ await current.ready();
+ if (this.watchPlayer(id) === current) this.preferRoute(id, mode);
+ }
+ return;
+ }
const activity = this.view.state?.watchActivities.find(value => value.id === id);
if (!activity) throw new Error("watch_unavailable");
if (mode === "peer") {
@@ -3223,21 +3228,21 @@ export class ChannelSession {
if (!source) throw new Error("watch_source_unavailable");
await this.joinWatchMedia(id, createResourceWatchMedia(source, (resourceId, offset, length, signal) =>
this.watchBytes.read(activity.roomId, id, source, resourceId, offset, length, signal),
- { hlsDeadlineOwner: "reader", timeline: activity.playback.timeline }), mode);
+ { hlsDeadlineOwner: "reader", timeline: activity.playback.timeline }), mode, manual);
return;
}
const url = activity.source.kind === "media" ? activity.source.url : activity.source.mediaUrl;
if (url) {
- await this.joinWatchMedia(id, new HTMLVideoMedia(url, activity.source.kind === "media" ? directWatchFormat(new URL(url)) : undefined, activity.playback.timeline));
+ await this.joinWatchMedia(id, new HTMLVideoMedia(url, activity.source.kind === "media" ? directWatchFormat(new URL(url)) : undefined, activity.playback.timeline), mode, manual);
return;
}
const embed = sharedWatchEmbed(activity.source);
if (!embed) throw new Error(originalWatchURL(activity.source) ? "watch_page_required" : "watch_source_unavailable");
if (!canWatchInBrowser(activity.source, current)) throw new Error("watch_media_unsupported");
await this.joinWatchMedia(id, embed.provider === "youtube"
- ? new YouTubeMedia(embed.id, undefined, true) : new PeerTubeMedia(embed.id, true));
+ ? new YouTubeMedia(embed.id, undefined, true) : new PeerTubeMedia(embed.id, true), mode, manual);
}
- private async joinWatchMedia(id: string, media: WatchMedia, mode: WatchMode = "direct"): Promise {
+ private async joinWatchMedia(id: string, media: WatchMedia, mode: WatchMode, manual: boolean): Promise {
const activity = this.view.state?.watchActivities.find(value => value.id === id);
if (!activity) { media.close(); throw new Error("watch_unavailable"); }
const previous = this.watchPlayer(id);
@@ -3261,6 +3266,7 @@ export class ChannelSession {
player.mode = mode;
if (previous.mode === mode) player.inheritClock(previous);
stage.useWatch(id, player);
+ if (manual) this.preferRoute(id, mode);
player.update(current.playback);
this.patch({});
if (embedded) await media.waitForPresentation?.(player.signal).catch(() => {});
@@ -3277,7 +3283,8 @@ export class ChannelSession {
this.stage(player.roomId).useWatch(id, player);
player.update(activity.playback);
this.patch({});
- void player.ready().catch(error => {
+ const ready = player.ready();
+ void ready.catch(error => {
if (!player.signal.aborted && this.watchPlayer(id) === player) {
player.error = error instanceof Error ? error.message : "watch_media_failed";
this.patch({});
@@ -3292,6 +3299,14 @@ export class ChannelSession {
this.patch({});
}
this.browseRooms();
+ if (manual) {
+ const intent = this.intents.get(id);
+ const selected = ready.then(() => {
+ if (this.intents.get(id) === intent && this.watchPlayer(id) === player && !player.error) this.preferRoute(id, mode);
+ });
+ if (previous) await selected;
+ else void selected.catch(() => {});
+ }
}
catch (error) {
if (!player.signal.aborted && this.watchPlayer(id) === player) this.retireWatchPlayer(id);
diff --git a/tests/app-candidate.test.ts b/tests/app-candidate.test.ts
index 4f2960769..b848f7b2c 100644
--- a/tests/app-candidate.test.ts
+++ b/tests/app-candidate.test.ts
@@ -28,7 +28,8 @@ vi.mock("node:child_process", async (original) => ({
return { status: 0, stdout: "", stderr: "" };
},
}));
-vi.mock("../scripts/app-package-targets.mjs", () => ({
+vi.mock("../scripts/app-package-targets.mjs", async (original) => ({
+ ...await original(),
CLOUDFLARED_VERSION: "fixture",
appPackageTarget: () => ({
id: "fixture", nodePlatform: process.platform, nodeArch: process.arch,
diff --git a/tests/channel-attachment-retention.test.ts b/tests/channel-attachment-retention.test.ts
index 3c34ba946..6f417477e 100644
--- a/tests/channel-attachment-retention.test.ts
+++ b/tests/channel-attachment-retention.test.ts
@@ -449,8 +449,10 @@ test.each(["local", "host"] as const)("clearing the %s cache retires its complet
removeEntry.mockRejectedValueOnce(new DOMException("busy", "NoModificationAllowedError"));
await expect(clear()).rejects.toThrow("busy");
expect(command).toHaveBeenCalledWith({ type: "file_receive", ...key, enabled: false });
+ const afterFailure = command.mock.calls.length;
removeEntry.mockClear();
await clear();
+ expect(command.mock.calls.slice(afterFailure)).toContainEqual([{ type: "file_receive", ...key, enabled: false }]);
expect(command).toHaveBeenCalledWith({ type: "file_offer", ...key, sha256: attachment.sha256, available: false });
expect(removeEntry).toHaveBeenCalledExactlyOnceWith(getFileHandle.mock.calls[0][0]);
expect(files.originalAvailability(key, attachment, false)).toBeUndefined();
diff --git a/tests/channel-conversation-presentation.test.ts b/tests/channel-conversation-presentation.test.ts
index 389278d28..7156582cc 100644
--- a/tests/channel-conversation-presentation.test.ts
+++ b/tests/channel-conversation-presentation.test.ts
@@ -1,5 +1,5 @@
import { expect, test, vi } from "vitest";
-import { act, createElement } from "react";
+import { act, createElement, useLayoutEffect } from "react";
import { createRoot } from "react-dom/client";
import { renderToStaticMarkup } from "react-dom/server";
import { ChannelConversation as ConversationView } from "../src/client/channel/components/ChannelConversation";
@@ -64,8 +64,10 @@ test("profile pages retry the failed cursor and retire a pending read when the q
let reply!: (page: ProfilePage) => void, reject!: (reason: Error) => void;
const read = vi.fn[0]>(() => new Promise((resolve, fail) => { reply = resolve; reject = fail; }));
let directory!: ReturnType;
+ const committed = vi.fn();
function Reader({ query, known }: { query: { query?: string } | null; known?: { id: string }[] }) {
directory = useProfileDirectory(read, query, known);
+ useLayoutEffect(() => { committed(directory); });
return null;
}
const render = (query: { query?: string } | null, known?: { id: string }[]) => act(() => root.render(createElement(Reader, { query, known })));
@@ -108,7 +110,9 @@ test("profile pages retry the failed cursor and retire a pending read when the q
await load();
const closing = read.mock.lastCall!;
expect(closing[0]).toStrictEqual({ query: "ab", after: "ab" });
+ committed.mockClear();
await render(null);
+ expect(committed.mock.calls[0]?.[0]).toMatchObject({ ids: [], next: undefined, loading: false, failed: false });
expect(closing[1]?.aborted).toBe(true);
await act(() => reject(new Error("aborted")));
await load();
diff --git a/tests/channel-message-content.test.ts b/tests/channel-message-content.test.ts
index aba06eda1..7533e0d1b 100644
--- a/tests/channel-message-content.test.ts
+++ b/tests/channel-message-content.test.ts
@@ -82,3 +82,16 @@ test("leading blank lines and indented code preserve literal mentions and invita
expect(html).not.toContain(' {
+ const href = "https://example.test/room.png";
+ const html = render(label + "(" + href + ")");
+ expect(html).toContain('rel="noopener noreferrer">' + href + "");
+ expect(html).not.toContain("
{
+ const text = "\uE000@Bo";
+ const html = render(text, [{ userId: "bo", start: 1, end: 4 }]);
+ expect(html).toContain('\uE000@Bo');
+});
diff --git a/tests/channel-session.test.ts b/tests/channel-session.test.ts
index ced293156..326c2945a 100644
--- a/tests/channel-session.test.ts
+++ b/tests/channel-session.test.ts
@@ -14302,6 +14302,8 @@ test.each(['withdrawn', 'replaced', 'activity', 'direct viewer'] as const)('watc
const direct = socket.sent.findLast(command => command.type === 'join_watch')!;
expect(direct).toMatchObject({ id: activity.id, mode: 'direct' });
socket.receive({ type: 'reply', roomId: 'first', requestId: direct.requestId, result: { type: 'watch_ready', serverTime: 1100 } });
+ video.readyState = 4;
+ video.dispatchEvent(new Event("loadeddata"));
await switching;
expect(session.getSnapshot().watchPlayers.get(activity.id)?.signal.aborted).toBe(false);
}
@@ -19109,3 +19111,36 @@ test.each(["cancel", "refusal"] as const)("a private borrowed-page preview prese
expect(session.getSnapshot().watchPlayers.get(String(old.id))).toBe(oldPlayer);
} finally { session.close(); }
});
+test("a replacement inherits the confirmed peer while direct media is pending after acknowledgement", async () => {
+ const { session, socket } = await setup(1000, false);
+ let readyState = 2;
+ vi.stubGlobal("document", { createElement: () => Object.assign(new WatchTestVideo(), { readyState }) });
+ vi.spyOn(watchMedia, "canReceivePeerWatch").mockReturnValue(true);
+ vi.spyOn(watchMedia, "createResourceWatchMedia").mockImplementation(() => new HTMLVideoMedia("https://media.test/peer.mp4"));
+ const base = session.getSnapshot().state!;
+ const source = { id: "before", roomId: "first", sessionId: "publisher", userId: "other", viewerSessionIds: [],
+ source: { kind: "media", url: "https://media.test/direct.mp4" },
+ byteSource: { sessionId: crypto.randomUUID(), resourceId: crypto.randomUUID(), format: "file" },
+ playback: { timeline: "media", position: 0, paused: true, rate: 1, anchorTime: 1000 } };
+ const reply = (id: string, mode: string) => {
+ const join = socket.sent.findLast(c => c.type === "join_watch")!;
+ expect(join).toMatchObject({ id, mode });
+ socket.receive({ type: "reply", roomId: "first", requestId: join.requestId, result: { type: "watch_ready", serverTime: 1000 } });
+ };
+ try {
+ socket.receive({ type: "state", state: { ...base, watchActivities: [source] } });
+ const joining = session.joinWatch(source.id, "peer");
+ reply(source.id, "peer");
+ await joining;
+ socket.receive({ type: "state", state: { ...base, watchActivities: [source], watchSubscriptions: [{ id: source.id, mode: "peer" }] } });
+ session.getSnapshot().watchPlayers.get(source.id)!.error = "watch_media_failed";
+ readyState = 0;
+ const switching = session.joinWatch(source.id, "direct").catch(() => {});
+ reply(source.id, "direct");
+ await new Promise(resolve => setTimeout(resolve, 0));
+ const next = { ...source, id: "after", predecessor: { kind: "watch", id: source.id } };
+ socket.receive({ type: "state", state: { ...base, watchActivities: [next] } });
+ await vi.waitFor(() => expect(socket.sent.findLast(c => c.type === "join_watch")).toMatchObject({ id: next.id, mode: "peer" }));
+ await switching;
+ } finally { session.close(); vi.unstubAllGlobals(); }
+});
diff --git a/tests/channel-transport.test.ts b/tests/channel-transport.test.ts
index 8e554c548..915fe9733 100644
--- a/tests/channel-transport.test.ts
+++ b/tests/channel-transport.test.ts
@@ -7,9 +7,7 @@ function track(kind: "audio" | "video"): MediaStreamTrack {
return { kind, readyState: "live", clone: () => track(kind), stop: vi.fn() } as unknown as MediaStreamTrack;
}
-// A refused offer names the senders it carried and no others. The screen goes on with what it had while its
-// picture is live, and fails as a whole, releasing every sender once, when no picture is left.
-test.each([["no picture", false], ["a live picture and its sound", true]] as const)("a refused offer leaves a screen that had %s", async (_, establishedPicture) => {
+function setup() {
vi.stubGlobal("MediaStream", class {
readonly id = crypto.randomUUID();
constructor(private tracks: MediaStreamTrack[] = []) {}
@@ -18,7 +16,7 @@ test.each([["no picture", false], ["a live picture and its sound", true]] as con
removeTrack(track: MediaStreamTrack) { this.tracks = this.tracks.filter(current => current !== track); }
});
const add = vi.fn((track: MediaStreamTrack, init: RTCRtpTransceiverInit) => ({
- sender: { track, stream: init.streams![0], getParameters: () => ({ encodings: [] }) },
+ sender: { track, setStreams() {}, async replaceTrack(next: MediaStreamTrack) { this.track = next; }, stream: init.streams![0], getParameters: () => ({ encodings: [] }) },
receiver: { track: { kind: track.kind } }, currentDirection: "sendrecv",
}));
vi.stubGlobal("RTCPeerConnection", class extends EventTarget {
@@ -38,6 +36,13 @@ test.each([["no picture", false], ["a live picture and its sound", true]] as con
const send = vi.fn(), failed = vi.fn(), outgoingFailed = vi.fn();
const warning = vi.spyOn(console, "warn").mockImplementation(() => {});
const transport = new ChannelTransport({ polite: true, iceServers: [], send, receive() {}, connected() {}, roomData() {}, failed, outgoingFailed });
+ return { add, send, failed, outgoingFailed, warning, transport };
+}
+
+// A refused offer names the senders it carried and no others. The screen goes on with what it had while its
+// picture is live, and fails as a whole, releasing every sender once, when no picture is left.
+test.each([["no picture", false], ["a live picture and its sound", true]] as const)("a refused offer leaves a screen that had %s", async (_, establishedPicture) => {
+ const { add, send, failed, outgoingFailed, warning, transport } = setup();
const picture = track("video"), audio = track("audio");
const source = new MediaStream(establishedPicture ? [picture, audio] : [audio]);
const outputs = new Map([["screen", { kind: "screen" as const, stream: source }]]);
@@ -62,3 +67,31 @@ test.each([["no picture", false], ["a live picture and its sound", true]] as con
expect(transport.setOutgoing(new Map())).toBe(establishedPicture);
} finally { transport.close(); }
});
+
+test.each(["attach", "rebind"] as const)("a refused companion %s preserves the picture and other sound", async failure => {
+ const { add, transport, outgoingFailed } = setup();
+ const picture = track("video"), rejected = track("audio"), sibling = track("audio");
+ const source = new MediaStream([picture]);
+ const publish = (id: string) => transport.setOutgoing(new Map([[id, { kind: "screen", stream: source }]]));
+ try {
+ if (failure === "rebind") {
+ source.removeTrack(picture);
+ source.addTrack(rejected);
+ source.addTrack(sibling);
+ publish("old");
+ transport.setOutgoing(new Map());
+ vi.spyOn(add.mock.results[0].value.sender, "replaceTrack").mockRejectedValueOnce(new Error("slot refused"));
+ source.addTrack(picture);
+ publish("screen");
+ } else {
+ publish("screen");
+ source.addTrack(rejected);
+ add.mockImplementationOnce(() => { throw new Error("attach refused"); });
+ publish("screen");
+ }
+ const wrapper = add.mock.calls[0][1].streams![0];
+ await vi.waitFor(() => expect(wrapper.getTracks()).toEqual(failure === "rebind" ? [sibling, picture] : [picture]));
+ if (failure === "rebind") expect(add.mock.results[1].value.sender.track).toBe(sibling);
+ expect(outgoingFailed).not.toHaveBeenCalled();
+ } finally { transport.close(); }
+});
diff --git a/tests/fixtures/input-cipher.json b/tests/fixtures/input-cipher.json
new file mode 100644
index 000000000..8948fdb0e
--- /dev/null
+++ b/tests/fixtures/input-cipher.json
@@ -0,0 +1,9 @@
+{
+ "packet": "AAAAAAAAAAEgISIjJCUmJygpKiupGNIJHP04NDgPO6CiOol+MAJ012RUZOuDGCEWCIGW",
+ "reply": "AAAAAAAAAAEOsCyXfyNd0rGAA3xGFvNKMkMtmMlc3xc/yShAT4vT8fQZHkUWXDqmlN0tpY4/SVyfMR357YR2X/INLu/ObL1v/1G9DQBjGR+BS+p4WWwH",
+ "state": {
+ "platform": "windows",
+ "mode": "ask",
+ "state": "ready"
+ }
+}
diff --git a/tests/publish-release.test.ts b/tests/publish-release.test.ts
index 21cac97c8..f2b7eb605 100644
--- a/tests/publish-release.test.ts
+++ b/tests/publish-release.test.ts
@@ -1,3 +1,4 @@
+import { serverReleaseNames, SERVER_PACKAGE_TARGETS } from "../scripts/server-package-targets.mjs";
import { createHash, generateKeyPairSync } from "node:crypto";
import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
@@ -26,16 +27,15 @@ const keys = generateKeyPairSync("ed25519");
const publicHex = Buffer.from(keys.publicKey.export({ format: "jwk" }).x!, "base64url").toString("hex");
const pem = keys.privateKey.export({ format: "pem", type: "pkcs8" }).toString();
for (const target of ["server", "server-linux-arm64", "server-windows-amd64", "windows-amd64", "linux-amd64", "linux-arm64", "darwin-arm64", "darwin-amd64", "android-universal"]) {
- const server = target.startsWith("server");
- // The Windows Server package ships a ZIP; the Linux Server packages keep tar.gz.
- const archive = target === "android-universal" ? "apk" : target === "server-windows-amd64" ? "zip" : server ? "tar.gz" : "zip";
- const artifact = `${target}.${archive}`;
+ const serverTarget = SERVER_PACKAGE_TARGETS.find(candidate => candidate.id === target);
+ const server = serverTarget && serverReleaseNames(serverTarget, revision);
+ const artifact = server?.artifact ?? `piik-app-${target}.${target === "android-universal" ? "apk" : "zip"}`;
writeFileSync(join(directory, artifact), target);
writeFileSync(join(directory, `${target}.release.json`), JSON.stringify({
schema: 2, version, revision, artifact, artifactSha256: hash(target),
- target, ...(server ? { manifest: `${target}.manifest.tsv`, manifestSha256: hash("manifest") } : {}),
+ target, ...(server ? { manifest: server.manifest, manifestSha256: hash("manifest") } : {}),
}));
- if (server) writeFileSync(join(directory, `${target}.manifest.tsv`), "manifest");
+ if (server) writeFileSync(join(directory, server.manifest), "manifest");
else writeFileSync(join(directory, `${artifact}.sha256`), `${hash(target)} ${artifact}\n`);
}
afterAll(() => rmSync(directory, { recursive: true, force: true }));
@@ -432,7 +432,7 @@ describe("publisher recovery", () => {
let draftBody = "";
const initial = await publish([], "absent", "upload", body => { draftBody = body; });
expect(initial.failure).toBe("GitHub upload failed");
- const names = ["windows-amd64.zip", "windows-amd64.release.json", "windows-amd64.zip.sha256"];
+ const names = ["piik-app-windows-amd64.zip", "windows-amd64.release.json", "piik-app-windows-amd64.zip.sha256"];
const original = names.map(name => readFileSync(join(directory, name)));
const oldDigest = hash(original[0]!);
const newBytes = Buffer.from("rebuilt Windows archive at the same source SHA");
diff --git a/tests/release-automation.test.ts b/tests/release-automation.test.ts
index 952fb5811..d3cae4aca 100644
--- a/tests/release-automation.test.ts
+++ b/tests/release-automation.test.ts
@@ -1,3 +1,4 @@
+import { serverReleaseNames, SERVER_PACKAGE_TARGETS } from "../scripts/server-package-targets.mjs";
import { execFileSync, spawnSync } from "node:child_process";
import { createHash } from "node:crypto";
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
@@ -284,14 +285,14 @@ describe("release automation", () => {
const run = () => spawnSync(process.execPath, [publisher, root, version, revision, "--dry-run"], { encoding: "utf8" });
try {
for (const target of ["server", "server-linux-arm64", "server-windows-amd64", "windows-amd64", "linux-amd64", "linux-arm64", "darwin-arm64", "darwin-amd64", "android-universal"]) {
- const server = target.startsWith("server");
- const archive = target === "android-universal" ? "apk" : target === "server-windows-amd64" ? "zip" : server ? "tar.gz" : "zip";
- const artifact = `${target}.${archive}`;
+ const serverTarget = SERVER_PACKAGE_TARGETS.find(candidate => candidate.id === target);
+ const server = serverTarget && serverReleaseNames(serverTarget, revision);
+ const artifact = server?.artifact ?? `piik-app-${target}.${target === "android-universal" ? "apk" : "zip"}`;
writeFileSync(join(root, artifact), target);
const descriptor = { schema: 2, version, revision, artifact, artifactSha256: sha(target),
- target, ...(server ? { manifest: `${target}.manifest.tsv`, manifestSha256: sha("manifest") } : {}) };
+ target, ...(server ? { manifest: server.manifest, manifestSha256: sha("manifest") } : {}) };
writeFileSync(join(root, `${target}.release.json`), JSON.stringify(descriptor));
- if (server) writeFileSync(join(root, `${target}.manifest.tsv`), "manifest");
+ if (server) writeFileSync(join(root, server.manifest), "manifest");
else writeFileSync(join(root, `${artifact}.sha256`), `${sha(target)} ${artifact}\n`);
}
const complete = run();
@@ -303,7 +304,7 @@ describe("release automation", () => {
rmSync(androidDescriptor);
expect(run().stderr).toContain("every registered Server and App target");
writeFileSync(androidDescriptor, androidMetadata);
- const checksum = join(root, "windows-amd64.zip.sha256");
+ const checksum = join(root, "piik-app-windows-amd64.zip.sha256");
const originalChecksum = readFileSync(checksum, "utf8");
writeFileSync(checksum, "wrong checksum");
expect(run().stderr).toContain("App checksum file mismatch");
@@ -313,7 +314,7 @@ describe("release automation", () => {
writeFileSync(path, JSON.stringify({ ...JSON.parse(original), revision: "b".repeat(40) }));
expect(run().stderr).toContain("Release identity mismatch");
writeFileSync(path, original);
- writeFileSync(join(root, "windows-amd64.zip"), "changed bytes");
+ writeFileSync(join(root, "piik-app-windows-amd64.zip"), "changed bytes");
expect(run().stderr).toContain("checksum mismatch");
} finally { rmSync(root, { recursive: true, force: true }); }
});
diff --git a/tests/release-update-index.test.ts b/tests/release-update-index.test.ts
index f92e4a646..8d167a0dc 100644
--- a/tests/release-update-index.test.ts
+++ b/tests/release-update-index.test.ts
@@ -6,7 +6,7 @@ import { join } from "node:path";
import { fileURLToPath } from "node:url";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { APP_PACKAGE_TARGETS, ANDROID_APP_PACKAGE_TARGET } from "../scripts/app-package-targets.mjs";
-import { SERVER_PACKAGE_TARGETS } from "../scripts/server-package-targets.mjs";
+import { serverReleaseNames, SERVER_PACKAGE_TARGETS } from "../scripts/server-package-targets.mjs";
import { readReleaseArtifacts } from "../scripts/release-artifacts.mjs";
import { signUpdateIndex } from "../scripts/release-update-index.mjs";
@@ -24,14 +24,15 @@ beforeEach(() => {
vi.stubEnv("PIIK_UPDATE_PUBLIC_KEY", publicHex);
root = mkdtempSync(join(tmpdir(), "piik-update-index-"));
for (const target of [...SERVER_PACKAGE_TARGETS, ...APP_PACKAGE_TARGETS, ANDROID_APP_PACKAGE_TARGET]) {
- const server = SERVER_PACKAGE_TARGETS.some(candidate => candidate.id === target.id);
- const artifact = `${target.id}.${target.id === "android-universal" ? "apk" : "zip"}`;
+ const serverTarget = SERVER_PACKAGE_TARGETS.find(candidate => candidate.id === target.id);
+ const server = serverTarget && serverReleaseNames(serverTarget, revision);
+ const artifact = server?.artifact ?? `piik-app-${target.id}.${target.id === "android-universal" ? "apk" : "zip"}`;
writeFileSync(join(root, artifact), target.id);
writeFileSync(join(root, `${target.id}.release.json`), JSON.stringify({
schema: 2, version, revision, target: target.id, artifact, artifactSha256: sha(target.id),
- ...(server ? { manifest: `${target.id}.manifest.tsv`, manifestSha256: sha("manifest") } : {}),
+ ...(server ? { manifest: server.manifest, manifestSha256: sha("manifest") } : {}),
}));
- if (server) writeFileSync(join(root, `${target.id}.manifest.tsv`), "manifest");
+ if (server) writeFileSync(join(root, server.manifest), "manifest");
else writeFileSync(join(root, `${artifact}.sha256`), `${sha(target.id)} ${artifact}\n`);
}
});
@@ -72,6 +73,18 @@ describe("signed update index", () => {
expect(() => readReleaseArtifacts(root, version, revision, options)).toThrow("must both be present");
});
+ it.each([["windows-amd64", "linux-amd64"], ["server", "server-linux-arm64"]])(
+ "refuses to sign a %s descriptor relabelled as %s", (first, second) => {
+ for (const [actual, claimed] of [[first, second], [second, first]] as const) {
+ const path = join(root, `${actual}.release.json`);
+ const descriptor = JSON.parse(readFileSync(path, "utf8"));
+ writeFileSync(path, JSON.stringify({ ...descriptor, target: claimed }));
+ }
+ expect(() => run()).toThrow("Release artifact name mismatch");
+ expect(existsSync(join(root, "signed"))).toBe(false);
+ },
+ );
+
it("refuses unsigned updater publication", () => {
const result = dryRun("");
expect(result.status).toBe(1);
@@ -135,7 +148,7 @@ describe("signed update index", () => {
rmSync(descriptor);
expect(() => run()).toThrow("every registered Server and App target");
writeFileSync(descriptor, original);
- writeFileSync(join(root, "windows-amd64.zip"), "changed bytes");
+ writeFileSync(join(root, "piik-app-windows-amd64.zip"), "changed bytes");
expect(() => run()).toThrow("checksum mismatch");
expect(existsSync(join(root, "signed"))).toBe(false);
});
diff --git a/tests/remote-input.test.ts b/tests/remote-input.test.ts
index 54f9d6e86..eb28ba77f 100644
--- a/tests/remote-input.test.ts
+++ b/tests/remote-input.test.ts
@@ -1,3 +1,4 @@
+import fixture from "./fixtures/input-cipher.json";
import { expect, it, vi } from "vitest";
import { RemoteInputSession } from "../src/client/remote-control/input-session";
import { picturePoint, rotatePicturePoint, rotatePictureDelta, type VideoRotation } from "../src/client/media/video-geometry";
@@ -544,3 +545,28 @@ it.each([
const point = picturePoint(video, inside.x, inside.y);
expect(point?.x).toBeCloseTo(.2); expect(point?.y).toBeCloseTo(.5);
});
+
+it("exchanges sync and ready packets with the Native input cipher", async () => {
+ const epoch = "0123456789abcdef0123456789abcdef";
+ const secret = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f";
+ const sent = vi.fn();
+ const channel = new EncryptedInput({ endpointId: "a".repeat(32), secret }, { sent: 0n }, sent, epoch);
+ const nonce = vi.spyOn(crypto, "getRandomValues").mockImplementationOnce(bytes => {
+ (bytes as Uint8Array).set(Array.from({ length: 12 }, (_, i) => 32 + i));
+ return bytes;
+ });
+ try {
+ channel.send('{"type":"sync"}');
+ await vi.waitFor(() => expect(sent).toHaveBeenCalledWith({
+ id: "a".repeat(32), epoch, data: fixture.packet,
+ }));
+ } finally {
+ nonce.mockRestore();
+ }
+ const message = new Promise(resolve => {
+ channel.addEventListener("message", event => resolve((event as MessageEvent).data), { once: true });
+ });
+ // Captured from Native Cipher::seal with the same synthetic key and epoch.
+ channel.receive(fixture.reply);
+ expect(remoteInputStateSchema.parse(JSON.parse(await message))).toMatchObject(fixture.state);
+});
diff --git a/tests/watch-peer-errors.test.ts b/tests/watch-peer-errors.test.ts
index bb84cc18c..680b00dda 100644
--- a/tests/watch-peer-errors.test.ts
+++ b/tests/watch-peer-errors.test.ts
@@ -125,11 +125,11 @@ test("actual Session explicit peer command retains the admitted root and reader
stage.useWatch(activity.id, old);
Object.assign(session, { view: { ...view, state: { watchActivities: [activity], publications: [], channel: { rooms: [] } } }, watchBytes: { read }, request });
try {
- await session.joinWatch(activity.id, "peer");
- expect(commands).toEqual([{ type: "join_watch", roomId: activity.roomId, id: activity.id, mode: "peer" }]);
+ const joining = expect(session.joinWatch(activity.id, "peer")).rejects.toThrow("watch_source_unavailable");
+ const hls = await attached;
+ await expect.poll(() => commands).toEqual([{ type: "join_watch", roomId: activity.roomId, id: activity.id, mode: "peer" }]);
const player = session.getSnapshot().watchPlayers.get(activity.id)!;
expect(player.mode).toBe("peer");expect(player).not.toBe(old);
- const hls = await attached;
const Loader = hls.config.loader,loader = new Loader(hls.config),failed=vi.fn();
loader.load({ url: `https://watch-media.invalid/${root.resourceId}`, responseType: "arraybuffer", type: LoaderContextType.MANIFEST }, { loadPolicy: { maxTimeToFirstByteMs: 1000, maxLoadTimeMs: 1000 } } as never,
{ onError: failed, onSuccess: vi.fn(), onTimeout: vi.fn() } as never);
@@ -140,6 +140,7 @@ test("actual Session explicit peer command retains the admitted root and reader
hls.trigger(Hls.Events.ERROR, { fatal: true, type: Hls.ErrorTypes.NETWORK_ERROR,
details: Hls.ErrorDetails.FRAG_LOAD_ERROR, response: failed.mock.calls[0][0] } as never);
await expect.poll(() => player.error).toBe("watch_source_unavailable");
+ await joining;
loader.destroy();
expect(activity.byteSource).toBe(root);
expect(old.error).toBe("watch_media_unavailable");
diff --git a/vite.config.ts b/vite.config.ts
index 5d656fe8d..f74956e48 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -39,6 +39,7 @@ export default defineConfig({
// Local build output includes Browser profiles, not application entries.
optimizeDeps: { entries: ["index.html", "site/**/*.html"] },
build: {
+ manifest: "vite-manifest.json",
outDir: "build/channel-web",
emptyOutDir: true,
},